@everfur/sdk 0.13.0 → 0.14.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 (202) hide show
  1. package/CHANGELOG.md +126 -0
  2. package/README.md +11 -10
  3. package/dist/{Chat.d-Dts8u_1a.d.cts → Chat.d-aycmX1CA.d.cts} +12 -4
  4. package/dist/{Chat.d-DUNTfzqC.d.ts → Chat.d-puminpyi.d.ts} +12 -4
  5. package/dist/{DepthViews.d-CubkMPbU.d.ts → DepthViews.d-BdvFZgPs.d.cts} +1 -1
  6. package/dist/{DepthViews.d-Ce2Zhnrb.d.ts → DepthViews.d-DIvxzLDf.d.ts} +1 -1
  7. package/dist/{DepthViews.d-BMU2jFPw.d.cts → DepthViews.d-Dy0Zl-s-.d.ts} +1 -1
  8. package/dist/{DepthViews.d-BIp599lz.d.cts → DepthViews.d-wLNkzk9f.d.cts} +1 -1
  9. package/dist/RecordsPage.d-9Ank15PT.d.ts +93 -0
  10. package/dist/RecordsPage.d-DMKU0IKc.d.cts +93 -0
  11. package/dist/animations/index.d.cts +5 -5
  12. package/dist/animations/index.d.ts +5 -5
  13. package/dist/{attachments.d-D1yhJjcZ.d.ts → attachments.d--sIsfk6e.d.ts} +2 -2
  14. package/dist/{attachments.d-Bp2qbHxn.d.cts → attachments.d-DNUCiyy5.d.cts} +6 -24
  15. package/dist/{attachments.d-DisnvB9R.d.cts → attachments.d-ZEpTUeWN.d.cts} +2 -2
  16. package/dist/{attachments.d-Djy9z_0Z.d.ts → attachments.d-rp3xs-Q3.d.ts} +6 -24
  17. package/dist/{bookingCopy.d-BJF6gd1A.d.ts → bookingCopy.d-D0uIIFAJ.d.ts} +2 -2
  18. package/dist/{bookingCopy.d-BlBmhAJc.d.cts → bookingCopy.d-DUrmVcLs.d.cts} +2 -2
  19. package/dist/{branding.d-DI8S400y.d.cts → branding.d-CTXTUg_8.d.cts} +1 -1
  20. package/dist/{branding.d-OIGLbQeM.d.ts → branding.d-DxJSoFce.d.ts} +1 -1
  21. package/dist/{casesRepository.d-CT2LTicS.d.cts → casesRepository.d-DCnix2pT.d.cts} +1 -1
  22. package/dist/{casesRepository.d-UsWOz9bv.d.ts → casesRepository.d-DbirgbyH.d.ts} +1 -1
  23. package/dist/chat/index.cjs +43 -41
  24. package/dist/chat/index.d.cts +26 -13
  25. package/dist/chat/index.d.ts +26 -13
  26. package/dist/chat/index.js +43 -41
  27. package/dist/client/index.cjs +2 -2
  28. package/dist/client/index.d.cts +10 -10
  29. package/dist/client/index.d.ts +10 -10
  30. package/dist/client/index.js +2 -2
  31. package/dist/clinicBatch.d-Ccmrngcu.d.cts +71 -0
  32. package/dist/clinicBatch.d-D9Ci7IpP.d.ts +71 -0
  33. package/dist/clinicModels.d-BXgKZqDb.d.cts +68 -0
  34. package/dist/clinicModels.d-CaS64-P-.d.ts +68 -0
  35. package/dist/clinicRequestProps.d-1dCtouGA.d.cts +65 -0
  36. package/dist/clinicRequestProps.d-CjsMg_OD.d.ts +65 -0
  37. package/dist/{config.d-BR3DT9ho.d.cts → config.d-DJ4mvf_w.d.cts} +1 -1
  38. package/dist/{config.d-Dy6igYlH.d.ts → config.d-MX7IKP2f.d.ts} +1 -1
  39. package/dist/consent/index.d.cts +5 -5
  40. package/dist/consent/index.d.ts +5 -5
  41. package/dist/{context.d-QcCgguzA.d.ts → context.d-BdnBe8Oe.d.ts} +7 -7
  42. package/dist/{context.d-Cwks0p3C.d.cts → context.d-C6MJsMpN.d.cts} +7 -7
  43. package/dist/{copy.d-CiMn2IIt.d.ts → copy.d-BIfQOoDB.d.ts} +2 -2
  44. package/dist/{copy.d-DLJTyRfT.d.cts → copy.d-C_u7shha.d.cts} +2 -2
  45. package/dist/core/index.cjs +3 -3
  46. package/dist/core/index.d.cts +20 -18
  47. package/dist/core/index.d.ts +20 -18
  48. package/dist/core/index.js +3 -3
  49. package/dist/{depth.d-OSALbYM7.d.ts → depth.d-COFxYWLU.d.ts} +6 -133
  50. package/dist/{depth.d-CjPGVPDL.d.cts → depth.d-D2e5WZuE.d.cts} +6 -133
  51. package/dist/{entitlementRepository.d-CVQa1DA1.d.cts → entitlementRepository.d-BP15dFbe.d.cts} +4 -4
  52. package/dist/{entitlementRepository.d-Cf3LbTwD.d.ts → entitlementRepository.d-DLuxnGi5.d.ts} +4 -4
  53. package/dist/{features.d-fNsGcg0R.d.ts → features.d-DrQxTw3-.d.cts} +1 -1
  54. package/dist/{features.d-fNsGcg0R.d.cts → features.d-DrQxTw3-.d.ts} +1 -1
  55. package/dist/{focus.d-DMg2ngHI.d.ts → focus.d-C0Tr0oVJ.d.ts} +109 -348
  56. package/dist/{focus.d-az9cqUz3.d.cts → focus.d-jQWp0hdK.d.cts} +109 -348
  57. package/dist/health-plan/index.cjs +165 -151
  58. package/dist/health-plan/index.d.cts +53 -11
  59. package/dist/health-plan/index.d.ts +53 -11
  60. package/dist/health-plan/index.js +169 -155
  61. package/dist/{idempotency.d-D461_DPD.d.cts → idempotency.d-DXb1BN2A.d.ts} +151 -6
  62. package/dist/{idempotency.d-WpXx9zQo.d.ts → idempotency.d-HF6fyRt2.d.cts} +151 -6
  63. package/dist/{identity.d-DzTijonw.d.ts → identity.d-BePPZ7Uv.d.ts} +1 -1
  64. package/dist/{identity.d-60LeJt_s.d.cts → identity.d-CJfnWOdH.d.cts} +1 -1
  65. package/dist/index.cjs +46 -44
  66. package/dist/index.d.cts +19 -18
  67. package/dist/index.d.ts +19 -18
  68. package/dist/index.js +46 -44
  69. package/dist/introEvents.d-BkGDT_kG.d.cts +175 -0
  70. package/dist/introEvents.d-DHlMvmC7.d.ts +175 -0
  71. package/dist/introEvents.d-dS3fJCH1.d.cts +5 -0
  72. package/dist/introEvents.d-dS3fJCH1.d.ts +5 -0
  73. package/dist/{models.d-BnLm3VAA.d.cts → models.d-BSqvbTE1.d.cts} +8 -1
  74. package/dist/{models.d-BagXhafD.d.ts → models.d-DOwnr8fi.d.ts} +8 -1
  75. package/dist/notifications/index.d.cts +4 -4
  76. package/dist/notifications/index.d.ts +4 -4
  77. package/dist/{optInView.d-CEyHR6PK.d.cts → optInView.d-0iI5JoAf.d.cts} +119 -3
  78. package/dist/{optInView.d-acKpV8V2.d.ts → optInView.d-s-w4aGN3.d.ts} +119 -3
  79. package/dist/{parse.d-C8CXyS58.d.ts → parse.d-COt1qVA6.d.ts} +1 -1
  80. package/dist/{parse.d-tEzufgJX.d.cts → parse.d-EmsgOUMQ.d.cts} +1 -1
  81. package/dist/{pets.d-C_53_fzo.d.ts → pets.d-BFT_b53y.d.ts} +1 -1
  82. package/dist/{pets.d-NbJvP_kh.d.cts → pets.d-nNAVnw7f.d.cts} +1 -1
  83. package/dist/{petsRepository.d-lp1BHRqM.d.cts → petsRepository.d-B2TpRE7r.d.cts} +1 -1
  84. package/dist/{petsRepository.d-BuGHymNx.d.ts → petsRepository.d-RGwSZcYl.d.ts} +1 -1
  85. package/dist/planSignals.d-BDbp2e-k.d.cts +126 -0
  86. package/dist/planSignals.d-DSnxKoWe.d.ts +126 -0
  87. package/dist/{ports.d-COIyN624.d.ts → ports.d-D2n4HRUy.d.ts} +4 -4
  88. package/dist/{ports.d-CEROoqnA.d.cts → ports.d-DBA_gsq5.d.cts} +4 -4
  89. package/dist/{presentation.d-DMbdad7G.d.cts → presentation.d-vy8kTGfR.d.cts} +6 -0
  90. package/dist/{presentation.d-DMbdad7G.d.ts → presentation.d-vy8kTGfR.d.ts} +6 -0
  91. package/dist/quickPrompts.d-NM_81Jc1.d.cts +19 -0
  92. package/dist/quickPrompts.d-NM_81Jc1.d.ts +19 -0
  93. package/dist/records/depth/index.d.cts +13 -9
  94. package/dist/records/depth/index.d.ts +13 -9
  95. package/dist/records/index.cjs +252 -138
  96. package/dist/records/index.d.cts +88 -23
  97. package/dist/records/index.d.ts +88 -23
  98. package/dist/records/index.js +253 -139
  99. package/dist/{requestFunnel.d-CXUMPw1K.d.ts → requestFunnel.d-D9edIEjZ.d.ts} +2 -2
  100. package/dist/{requestFunnel.d-DWQQpjFR.d.cts → requestFunnel.d-RZex94XX.d.cts} +2 -2
  101. package/dist/{resolve.d-jI8FmBj3.d.cts → resolve.d-CoQWUy1Y.d.cts} +1 -1
  102. package/dist/{resolve.d-jI8FmBj3.d.ts → resolve.d-CoQWUy1Y.d.ts} +1 -1
  103. package/dist/{runtimeTypes.d-4yFNNuYR.d.ts → runtimeTypes.d-BYq38b17.d.ts} +6 -6
  104. package/dist/{runtimeTypes.d-D6N_fhxx.d.cts → runtimeTypes.d-LkwZaF7z.d.cts} +6 -6
  105. package/dist/{useRecordsDepth.d-DFcCfiXm.d.ts → screenProps.d-BVzRzowC.d.ts} +5 -91
  106. package/dist/{useRecordsDepth.d-sAq2Qkhr.d.cts → screenProps.d-CQ0qZJkr.d.cts} +5 -91
  107. package/dist/server/events/index.cjs +1 -1
  108. package/dist/server/events/index.d.cts +2 -2
  109. package/dist/server/events/index.d.ts +2 -2
  110. package/dist/server/events/index.js +1 -1
  111. package/dist/server/index.cjs +1 -1
  112. package/dist/server/index.d.cts +3 -3
  113. package/dist/server/index.d.ts +3 -3
  114. package/dist/server/index.js +1 -1
  115. package/dist/{sheetSeam.d-Cviqk89n.d.ts → sheetSeam.d-B09jf4YC.d.ts} +8 -4
  116. package/dist/{sheetSeam.d-DCS3LW8g.d.cts → sheetSeam.d-BBuEIVsa.d.cts} +8 -4
  117. package/dist/shop/index.cjs +224 -58
  118. package/dist/shop/index.d.cts +23 -5
  119. package/dist/shop/index.d.ts +23 -5
  120. package/dist/shop/index.js +225 -59
  121. package/dist/tabs/index.cjs +195 -0
  122. package/dist/tabs/index.d.cts +174 -0
  123. package/dist/tabs/index.d.ts +174 -0
  124. package/dist/tabs/index.js +195 -0
  125. package/dist/tabsModel.d-BfIQg6yS.d.cts +31 -0
  126. package/dist/tabsModel.d-BfIQg6yS.d.ts +31 -0
  127. package/dist/televet/booking/index.d.cts +6 -6
  128. package/dist/televet/booking/index.d.ts +6 -6
  129. package/dist/testing/index.cjs +1 -1
  130. package/dist/testing/index.d.cts +1 -1
  131. package/dist/testing/index.d.ts +1 -1
  132. package/dist/testing/index.js +1 -1
  133. package/dist/testing/rn/index.cjs +1 -1
  134. package/dist/testing/rn/index.d.cts +11 -11
  135. package/dist/testing/rn/index.d.ts +11 -11
  136. package/dist/testing/rn/index.js +1 -1
  137. package/dist/testing/web/index.d.cts +12 -12
  138. package/dist/testing/web/index.d.ts +12 -12
  139. package/dist/texting/index.cjs +40 -5
  140. package/dist/texting/index.d.cts +40 -7
  141. package/dist/texting/index.d.ts +40 -7
  142. package/dist/texting/index.js +40 -5
  143. package/dist/threadOptions.d-9r4Csa7k.d.cts +458 -0
  144. package/dist/threadOptions.d-B6GA09aM.d.ts +458 -0
  145. package/dist/{timelineRows.d-CU5GvvLk.d.ts → timelineRows.d-Bes8ip2v.d.ts} +1 -1
  146. package/dist/{timelineRows.d-BNxgzYRW.d.cts → timelineRows.d-BvM2A7_G.d.cts} +1 -1
  147. package/dist/{typeStyle.d-C1HBRAI3.d.ts → typeStyle.d-Co5KF0up.d.ts} +1 -1
  148. package/dist/{typeStyle.d-Bl8pzbBy.d.cts → typeStyle.d-xIZj02Ru.d.cts} +1 -1
  149. package/dist/useIntroSeen.d-CTWFUthO.d.cts +35 -0
  150. package/dist/useIntroSeen.d-CTWFUthO.d.ts +35 -0
  151. package/dist/usePresentation.d-BGz32Vlm.d.ts +285 -0
  152. package/dist/usePresentation.d-DYTF_ZGf.d.cts +285 -0
  153. package/dist/{useRecords.d-Cb-36SF5.d.cts → useRecords.d-BYNX01El.d.cts} +2 -2
  154. package/dist/{useRecords.d-aQTzQZoV.d.ts → useRecords.d-DWk61a4c.d.ts} +2 -2
  155. package/dist/useRecordsDepth.d--LLA_4ga.d.cts +32 -0
  156. package/dist/useRecordsDepth.d-BQRL0Hez.d.ts +32 -0
  157. package/dist/{view.d-Dps5C8-s.d.cts → view.d-0yBjLTV3.d.cts} +6 -4
  158. package/dist/{view.d-C-SNpDJX.d.ts → view.d-DqbCADFa.d.ts} +6 -4
  159. package/dist/web/consent/index.d.cts +5 -5
  160. package/dist/web/consent/index.d.ts +5 -5
  161. package/dist/web/health-plan/index.cjs +50 -43
  162. package/dist/web/health-plan/index.d.cts +46 -192
  163. package/dist/web/health-plan/index.d.ts +46 -192
  164. package/dist/web/health-plan/index.js +65 -58
  165. package/dist/web/index.cjs +61 -45
  166. package/dist/web/index.d.cts +165 -25
  167. package/dist/web/index.d.ts +165 -25
  168. package/dist/web/index.js +62 -46
  169. package/dist/web/intro/index.cjs +167 -0
  170. package/dist/web/intro/index.d.cts +79 -0
  171. package/dist/web/intro/index.d.ts +79 -0
  172. package/dist/web/intro/index.js +167 -0
  173. package/dist/web/notifications/index.d.cts +3 -3
  174. package/dist/web/notifications/index.d.ts +3 -3
  175. package/dist/web/records/depth/index.d.cts +13 -9
  176. package/dist/web/records/depth/index.d.ts +13 -9
  177. package/dist/web/records/index.cjs +7 -7
  178. package/dist/web/records/index.d.cts +21 -82
  179. package/dist/web/records/index.d.ts +21 -82
  180. package/dist/web/records/index.js +7 -7
  181. package/dist/web/records-sheet/index.cjs +181 -127
  182. package/dist/web/records-sheet/index.d.cts +18 -16
  183. package/dist/web/records-sheet/index.d.ts +18 -16
  184. package/dist/web/records-sheet/index.js +181 -127
  185. package/dist/web/shop/index.cjs +191 -76
  186. package/dist/web/shop/index.d.cts +21 -4
  187. package/dist/web/shop/index.d.ts +21 -4
  188. package/dist/web/shop/index.js +191 -76
  189. package/dist/web/televet/booking/index.d.cts +6 -6
  190. package/dist/web/televet/booking/index.d.ts +6 -6
  191. package/dist/web/texting/index.cjs +36 -5
  192. package/dist/web/texting/index.d.cts +40 -7
  193. package/dist/web/texting/index.d.ts +40 -7
  194. package/dist/web/texting/index.js +36 -5
  195. package/package.json +35 -4
  196. package/tabs/package.json +8 -0
  197. package/web/intro/native-blocked.cjs +12 -0
  198. package/web/intro/package.json +8 -0
  199. package/dist/threadOptions.d-B1pTMmDF.d.cts +0 -260
  200. package/dist/threadOptions.d-B1pTMmDF.d.ts +0 -260
  201. package/dist/usePresentation.d-D6qsFzBz.d.cts +0 -9
  202. package/dist/usePresentation.d-DuGQe_Do.d.ts +0 -9
@@ -1,13 +1,13 @@
1
1
  "use strict";var react=require("react"),reactNative=require("react-native"),jsxRuntime=require("react/jsx-runtime");var EverfurConfigError=class _EverfurConfigError extends Error{constructor(kind,message){super(message),this.name="EverfurConfigError",this.kind=kind,Object.setPrototypeOf(this,_EverfurConfigError.prototype)}};function omsOk(value){/* @__PURE__ */
2
2
  return Object.freeze({ok:true,value:value})}function omsErr(error){/* @__PURE__ */
3
- return Object.freeze({ok:false,error:/* @__PURE__ */Object.freeze(error)})}function isOmsRefusal(error,reasonCode){return error.kind==="refused"&&(reasonCode===void 0||error.reasonCode===reasonCode)}function isOmsUnavailable(error){return error.kind==="unavailable"}function isOmsRetryable(error){return error.kind==="network"||error.kind==="timeout"||error.kind==="serviceUnavailable"||error.kind==="refused"&&error.reasonCode==="order_state_conflict"}var REASON=/^[a-z][a-z0-9_]{0,63}$/,MAX_MESSAGE=300;function cleanMessage(raw){if(typeof raw!="string")return null;let text=raw.replace(/[\u0000-\u001f\u007f]+/g," ").trim();return text.length===0||text.length>MAX_MESSAGE?null:text}function retryAfter(header){if(!header)return null;let seconds=Number(header);return Number.isFinite(seconds)&&seconds>=0?Math.min(Math.round(seconds),3600):null}function omsErrorFromStatus(status,body,headers){let requestId=headers.requestId,rid=requestId?{requestId:requestId}:{};if(status===404)return{kind:"unavailable",...rid};if(status===401)return{kind:"signedOut"};if(status===402||status===409||status===422){let envelope=body&&typeof body=="object"?body:{},reason=typeof envelope.reason_code=="string"&&REASON.test(envelope.reason_code)?envelope.reason_code:null;return{kind:"refused",status:status,reasonCode:reason,message:cleanMessage(envelope.message),...rid}}return status===400?{kind:"invalidRequest",...rid}:status===429?{kind:"rateLimited",retryAfterSeconds:retryAfter(headers.retryAfter??null),...rid}:status===503?{kind:"serviceUnavailable",...rid}:status===403?{kind:"unavailable",...rid}:{kind:"serverError",status:status,...rid}}function newIdempotencyKey(){let c=globalThis.crypto;if(c&&typeof c.randomUUID=="function")return c.randomUUID();if(c&&typeof c.getRandomValues=="function"){let b=c.getRandomValues(new Uint8Array(16));b[6]=b[6]&15|64,b[8]=b[8]&63|128;let h=Array.from(b,x=>x.toString(16).padStart(2,"0")).join("");return`${h.slice(0,8)}-${h.slice(8,12)}-${h.slice(12,16)}-${h.slice(16,20)}-${h.slice(20)}`}throw new EverfurConfigError("missing-peer-dependency","No secure random source: cannot make an idempotency key")}var MAX_ROUNDS=3,ShopActionKeys=class{constructor(make=newIdempotencyKey){this.make=make;this.keys=/* @__PURE__ */new Map}key(step){let k=this.keys.get(step);return k||(k=this.make(),this.keys.set(step,k)),k}next(step){let k=this.make();return this.keys.set(step,k),k}};async function confirmWithPayerActions(confirm,keys,payments,options={reconfirm:true}){let key=keys.key("confirm"),orderIds=[];for(let round=0;round<MAX_ROUNDS;round+=1){let res=await confirm(key);if(!res.ok)return{kind:"failed",error:res.error};orderIds=res.value.resale.map(r=>r.orderId);let pending=res.value.resale.filter(r=>r.outcome==="action_required"&&r.payerAction);if(pending.length===0)return{kind:"confirmed",orderIds:orderIds};if(!payments)return{kind:"needsPayerAction",orderIds:orderIds};for(let entry of pending){let stepResult=await payments.handleNextAction(entry.payerAction,{orderId:entry.orderId});if(!stepResult.ok)return stepResult.closed?{kind:"payerActionClosed",orderIds:orderIds}:{kind:"payerActionFailed",orderIds:orderIds,message:stepResult.message}}if(!options.reconfirm)return{kind:"confirmed",orderIds:orderIds};key=keys.next("confirm")}return{kind:"needsPayerAction",orderIds:orderIds}}var UNAVAILABLE_PACKAGE_SOURCE=/* @__PURE__ */Object.freeze({load:()=>Promise.resolve(omsErr({kind:"unavailable"})),removeLine:()=>Promise.resolve(omsErr({kind:"unavailable"})),skip:()=>Promise.resolve(omsErr({kind:"unavailable"})),approve:()=>Promise.resolve({kind:"failed",error:{kind:"unavailable"}})});async function offersFor(client,ids){let unique=[...new Set(ids)],read=await Promise.all(unique.map(id=>client.offer(id)));return new Map(unique.map((id,i)=>[id,read[i].ok?read[i].value:null]))}function createOmsPackageSource(client){async function build(plan,review){let offers=await offersFor(client,review.lines.map(l=>l.offerId)),lines=review.lines.map(l=>({...l,offer:offers.get(l.offerId)??null})),draft=null;if(review.state==="open"&&lines.length>0){let d=await client.draftCycle(plan.planId,review.cycle);if(d.ok)draft=d.value;else if(d.error.kind!=="refused")return omsErr(d.error)}return omsOk({plan:plan,review:review,lines:lines,draft:draft})}return{async load(){let plans=await client.plans();if(!plans.ok)return omsErr(plans.error);let plan=plans.value.plans.find(p=>p.state==="active")??plans.value.plans.find(p=>p.state!=="cancelled");if(!plan)return omsOk(null);let review=await client.cycleReview(plan.planId);return review.ok?build(plan,review.value):omsErr(review.error)},async removeLine(pkg,index,keys){let rest=pkg.lines.filter((_,i)=>i!==index).map(l=>({offerId:l.offerId,quantity:l.quantity,...l.petId?{petId:l.petId}:{}})),edited=await client.editCycle(pkg.plan.planId,pkg.review.cycle,{idempotencyKey:keys.key(`remove:${index}`),lines:rest});return edited.ok?build(pkg.plan,edited.value):omsErr(edited.error)},async skip(pkg,keys){let res=await client.skipCycle(pkg.plan.planId,pkg.review.cycle,{idempotencyKey:keys.key("skip")});return res.ok?omsOk(void 0):omsErr(res.error)},approve(pkg,keys,payments){let draft=pkg.draft;return draft?confirmWithPayerActions(idempotencyKey=>client.approveCycle(pkg.plan.planId,pkg.review.cycle,{idempotencyKey:idempotencyKey,checkoutId:draft.checkoutId,expectedTotal:draft.total}),keys,payments,{reconfirm:false}):Promise.resolve({kind:"failed",error:{kind:"invalidRequest"}})}}}function placeholder(key){return`[copy:shop.${key}]`}var MONTHS=["January","February","March","April","May","June","July","August","September","October","November","December"];function possessive(name){return`${name}’s`}function listNames(names){return names.length<=1?names[0]??"":`${names.slice(0,-1).join(", ")} and ${names[names.length-1]}`}function asDate(iso){if(!iso)return null;let d=new Date(/^\d{4}-\d{2}-\d{2}$/.test(iso)?`${iso}T00:00:00Z`:iso);return Number.isNaN(d.getTime())?null:d}function formatDay(iso,opts={}){let d=asDate(iso);return d?d.toLocaleDateString("en-US",{timeZone:"UTC",...opts.weekday?{weekday:"short"}:{},month:"short",day:"numeric"}):null}function formatWhen(iso){let d=asDate(iso);if(!d)return null;let day=d.toLocaleDateString("en-US",{weekday:"short",month:"short",day:"numeric"}),time=d.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit"});return`${day} · ${time}`}function monthOf(iso){let d=asDate(iso);return d?MONTHS[d.getUTCMonth()]:null}function formatCents(cents){let sign=cents<0?"-":"",abs=Math.abs(Math.round(cents));return`${sign}$${Math.floor(abs/100).toLocaleString("en-US")}.${String(abs%100).padStart(2,"0")}`}function cardLabel(brand,last4){return`${brand?brand.charAt(0).toUpperCase()+brand.slice(1):""} ending ${last4}`}var SHOP_COPY={tabsLabel:"Care",tabPackage:"Package",tabShop:"Shop",tabOrders:"Orders",tabPlan:"Plan",legal:"Prescription items need a valid prescription from a licensed vet, and are filled by a licensed partner pharmacy.",legalTracking:"Prescription items are filled by a licensed partner pharmacy.",loadFailed:thing=>`We couldn’t load ${thing}. Check your connection and try again.`,tryAgain:"Try again",actionFailed:"That didn’t go through. Try again.",saving:"Saving…",keepIt:"Keep it",close:"Close",thingPackage:placeholder("thing.package"),thingShop:placeholder("thing.shop"),thingProduct:placeholder("thing.product"),thingPlan:placeholder("thing.plan"),thingOrders:"your orders",thingOrder:"this order",packageTitle:month=>`${month} package`,packageSub:(names,reviewBy,arrives)=>{let s=[];return names.length>0&&s.push(`For ${listNames(names)}.`),reviewBy&&arrives&&s.push(`Approve by ${reviewBy} and it arrives ${arrives}.`),s.length?s.join(" "):null},inThisPackage:"In this package",reviewBy:day=>`Review by ${day}`,forPet:name=>`For ${name}`,details:"Details",remove:"Remove",removed:"Removed.",total:"Total",items:"Items",shipping:"Shipping",tax:"Tax",free:"Free",approveAndShip:"Approve and ship",itemCount:n=>n===1?placeholder("package.item_count_one"):`${n} items`,withTotal:(label,total)=>`${label} · ${total}`,approveRegion:"Approve",packageDetailsRegion:"Package details",deliveryPaymentRegion:"Delivery and payment",questionsRegion:"Questions",approving:"Approving…",skipThisMonth:"Skip this month",chargedWhenShips:card=>`Charged to ${card} when it ships.`,rxCheckedFirst:"Prescriptions are checked with the vet who wrote them first.",delivery:"Delivery",arrives:day=>`Arrives ${day}`,change:"Change",outOfStock:"Out of stock",packageOutOfStock:"Out of stock right now, so it won’t ship this month.",packageEmpty:month=>`Nothing in ${possessive(month)} package yet. Add something from the shop, or skip this month.`,itemNoLongerSold:placeholder("package.item_no_longer_sold"),reviewClosed:placeholder("package.review_closed"),approvalInProgress:placeholder("package.approval_in_progress"),priceChanged:placeholder("package.price_changed"),cardStepFailed:placeholder("package.card_step_failed"),cardStepClosed:placeholder("package.card_step_closed"),noCardOnFile:placeholder("package.no_card_on_file"),shopTitle:"Shop",searchLabel:"Search the shop",searchPlaceholder:"Search the shop…",filtersLabel:"Filter",filterAll:"All",refillSoon:"Refill soon",inMonthsPackage:month=>`In ${possessive(month)} package →`,forPets:names=>`For ${listNames(names)}`,allProducts:placeholder("shop.all_products_title"),rx:"Rx",hasPrescription:name=>`${name} has a prescription`,needsPrescription:"Needs a prescription",noMatches:q=>`Nothing in the shop matches ‘${q}’.`,nothingHereYet:"Nothing here yet.",photoToCome:"Photo to come",backToShop:"Shop",howOften:"How often",everyMonthIn:name=>`Every month, in ${possessive(name)} package`,skipOrStop:"Skip or stop any month",justOnce:"Just once",shipsWith:month=>`Ships with ${possessive(month)} package`,justOnceShipsNow:placeholder("product.just_once_meta"),oneFewer:"One fewer",oneMore:"One more",quantity:"Quantity",addToPackage:month=>`Add to ${possessive(month)} package`,refillInPackage:month=>`Refill in ${possessive(month)} package`,buyNow:placeholder("product.buy_now"),startPlan:placeholder("product.start_plan"),adding:"Adding…",outOfStockNow:"Out of stock right now.",prescription:"Prescription",noPrescriptionFor:name=>`No prescription for ${name} on file.`,bookVideoVisit:"Book a video visit",refillsLeft:n=>`${n} ${n===1?"refill":"refills"} left`,rxBeingPrepared:"This prescription is being prepared. You can order it soon.",rxTooSoon:placeholder("rx.too_soon"),rxRenew:placeholder("rx.needs_renewal"),rxPick:placeholder("rx.pick_pet"),educational:"Educational, not a diagnosis.",planTitle:"Your plan",whatRepeats:"What repeats",repeatsLabel:title=>`${title} repeats`,cadenceMonths:months=>months===1?"Every month":`Every ${months} months`,cadenceDays:placeholder("plan.cadence_days"),repeatsEmpty:"Nothing repeats yet. Pick Every month when you add something, and it shows up here.",nextPackage:"Next package",reviewByLabel:"Review by",ships:"Ships",reviewMonthsPackage:month=>`Review ${possessive(month)} package →`,deliveryAndPayment:"Delivery and payment",shipTo:"Ship to",payWith:"Pay with",needABreak:"Need a break?",skipMonth:month=>`Skip ${month}`,skipMonthAsk:month=>`Skip ${month}?`,skipMonthBody:"Nothing ships this month.",pausePlan:"Pause the plan",pausePlanAsk:"Pause the plan?",pausePlanBody:"Nothing ships until you turn it back on.",declined:month=>month?`Declined. Update your card so ${possessive(month)} package can ship.`:"Declined.",resumePlan:placeholder("plan.resume"),stopReason:reason=>placeholder(`plan.stop_reason.${reason}`),consentTitle:placeholder("plan.consent_title"),consentBody:placeholder("plan.consent_body"),consentTermsLink:placeholder("plan.consent_terms_link"),consentAgree:placeholder("plan.consent_agree"),ordersTitle:"Orders",ordersSub:names=>`Packages and one-off orders for ${listNames(names)}.`,allOrders:"All orders",placed:day=>`Placed ${day}`,ordersEmpty:"No orders yet. Your first package shows up here once you approve it.",paymentFailed:"Payment failed",backToCare:"Care",onItsWay:title=>`${title}, on its way`,shouldArrive:day=>`It should arrive ${day}.`,whereItStands:"Where it stands",stepApproved:"Approved",stepChecking:"Checking prescriptions…",stepFilled:"Filled by the pharmacy",stepShipped:"Shipped",stepDelivered:"Delivered",now:"Now",expected:day=>`Expected ${day}.`,inTheBox:"In the box",payment:"Payment",cancelOrder:placeholder("order.cancel"),payOrder:placeholder("order.pay"),trackPackage:placeholder("order.track"),orderStatus:{pending_placement:"Confirmed, sending to the pharmacy",placement_unknown:"Confirmed",placed:"With the pharmacy, in review",accepted:"Approved by the pharmacist",release_sent:"Approved, being prepared",release_unknown:"Approved, being prepared",released:"Being prepared",shipped:"Shipped",delivered:"Delivered",needs_support:"We’re looking into this order",rejected:placeholder("order.status.rejected"),cancelled:"Cancelled",pending_handoff:placeholder("order.status.pending_handoff")},addressTitle:placeholder("address.title"),addressLabel:placeholder("address.label"),addressRecipient:placeholder("address.recipient_name"),addressLine1:placeholder("address.line1"),addressLine2:placeholder("address.line2"),addressCity:placeholder("address.city"),addressRegion:placeholder("address.region"),addressPostal:placeholder("address.postal_code"),addressSave:placeholder("address.save"),addressNeeded:placeholder("address.needed"),cardTitle:placeholder("card.title"),cardBody:placeholder("card.body"),cardStart:placeholder("card.start"),cardUnavailable:placeholder("card.unavailable"),confirmTitle:placeholder("buy.confirm_title"),confirmPay:placeholder("buy.confirm_pay"),refusal:{operation_not_supported:"This action isn’t available for this order.",order_not_sellable:"We can’t ship this order as it is. Add items or contact us.",rx_being_prepared:"This prescription is being prepared. You can order it soon.",rx_not_dispensable:"We can’t send this prescription to the pharmacy yet. Contact us.",order_state_conflict:"This order changed. Refresh and try again.",payment_method_in_use:"A subscription or an order uses this card."},rateLimited:placeholder("error.rate_limited")},SHOP_COPY_PLACEHOLDERS=(()=>{let keys=/* @__PURE__ */new Set,visit=v=>{if(typeof v=="string"){let m=/^\[copy:(shop\.[a-z0-9_.]+)\]$/.exec(v);m&&keys.add(m[1])}else if(typeof v=="function")try{visit(v("x","x","x"))}catch{}else if(v&&typeof v=="object")for(let inner of Object.values(v))visit(inner)};return visit(SHOP_COPY),[...keys].sort()})();function shopCopy(overrides){return overrides?{...SHOP_COPY,...overrides}:SHOP_COPY}function refusalLine(copy,error){if(error.kind==="rateLimited")return copy.rateLimited;if(error.kind==="refused"){let own=error.reasonCode?copy.refusal[error.reasonCode]:void 0;if(own)return own;if(error.message)return error.message}return copy.actionFailed}var ShopContext=react.createContext(null);function ShopProvider(props){let{client:client,pets:pets,payments:payments,packageSource:packageSource,copy:copy,children:children}=props,value=react.useMemo(()=>{let list=pets??[],names=new Map(list.map(p=>[p.petId,p.name]));return{client:client,pets:list,petName:id=>id?names.get(id)??null:null,payments:payments??null,packageSource:packageSource??createOmsPackageSource(client),copy:shopCopy(copy)}},[client,pets,payments,packageSource,copy]);return react.createElement(ShopContext.Provider,{value:value},children)}function useShop(){let ctx=react.useContext(ShopContext);if(!ctx)throw new EverfurConfigError("not-initialized","useShop: wrap the shop in <ShopProvider>");return ctx}function useShopRead(key,read){let[state,setState]=react.useState({key:null,phase:"loading",value:null,error:null}),epoch=react.useRef(0),readRef=react.useRef(read);readRef.current=read;let load=react.useCallback(quiet=>{let mine=++epoch.current;key!==null&&(quiet||setState({key:key,phase:"loading",value:null,error:null}),readRef.current().then(res=>{mine===epoch.current&&(res.ok?setState({key:key,phase:"ready",value:res.value,error:null}):setState({key:key,phase:res.error.kind==="unavailable"?"unavailable":"failed",value:null,error:res.error}))}))},[key]);react.useEffect(()=>(load(false),()=>{epoch.current+=1}),[load]);let refresh=react.useCallback(()=>load(false),[load]);return state.key!==key?{phase:"loading",value:null,error:null,refresh:refresh}:{phase:state.phase,value:state.value,error:state.error,refresh:refresh}}function useShopConfig(){let{client:client}=useShop();return useShopRead("shop-config",()=>client.shopConfig())}function useOffers(query={}){let{client:client}=useShop(),text=query.text?.trim()??"",key=`offers:${text}:${query.requiresRx??""}`;return useShopRead(key,()=>client.offers({...text?{text:text}:{},...query.requiresRx!==void 0?{requiresRx:query.requiresRx}:{},limit:100}))}function useOffer(offerId){let{client:client}=useShop();return useShopRead(offerId?`offer:${offerId}`:null,()=>client.offer(offerId))}function usePrescriptions(){let{client:client}=useShop();return useShopRead("prescriptions",()=>client.prescriptions())}function useAddresses(){let{client:client}=useShop();return useShopRead("addresses",()=>client.addresses())}function useAddress(ref){let{client:client}=useShop();return useShopRead(ref?`address:${ref}`:null,()=>client.address(ref))}function usePaymentMethods(){let{client:client}=useShop();return useShopRead("payment-methods",()=>client.paymentMethods())}function useOrders(){let{client:client}=useShop();return useShopRead("orders",()=>client.orders({limit:50}))}function useOrder(orderId){let{client:client}=useShop();return useShopRead(orderId?`order:${orderId}`:null,()=>client.order(orderId))}function usePlans(){let{client:client}=useShop();return useShopRead("plans",()=>client.plans({limit:100}))}function usePackage(){let{packageSource:packageSource}=useShop();return useShopRead("package",()=>packageSource.load())}function useShopAction(act){let[busy,setBusy]=react.useState(false),[error,setError]=react.useState(null),keys=react.useRef(null),running=react.useRef(false),actRef=react.useRef(act);actRef.current=act;let mounted=react.useRef(true);react.useEffect(()=>(mounted.current=true,()=>{mounted.current=false}),[]);let run=react.useCallback(async(...args)=>{if(running.current)return null;running.current=true,keys.current??=new ShopActionKeys,setBusy(true),setError(null);try{let res=await actRef.current(keys.current,...args);return res.ok?keys.current=null:isRetryWithSameKey(res.error)||(keys.current=null),mounted.current&&setError(res.ok?null:res.error),res}finally{running.current=false,mounted.current&&setBusy(false)}},[]),reset=react.useCallback(()=>{keys.current=null,setError(null)},[]);return{busy:busy,error:error,run:run,reset:reset}}function isRetryWithSameKey(error){return error.kind==="network"||error.kind==="timeout"||error.kind==="serviceUnavailable"||error.kind==="serverError"}function distinct(xs){let out=[];for(let x of xs)x!==null&&!out.includes(x)&&out.push(x);return out}function tileFor(rx){return rx?{tone:"pink",icon:"pill"}:{tone:"yellow",icon:"leaf"}}function addressLine(a){return`${a.line2?`${a.line1}, ${a.line2}`:a.line1}, ${a.city}, ${a.region} ${a.postalCode}`}function rxPill(copy){return{label:copy.rx,tone:"rx"}}function refillsLeft(rx){return rx.fillsTotal!==null&&rx.fillsUsed!==null?Math.max(0,rx.fillsTotal-rx.fillsUsed):null}function toPackageView(i){let{pkg:pkg,copy:copy,petName:petName}=i,review=pkg.review,month=monthOf(review.shipsOn),names=distinct(pkg.lines.map(l=>petName(l.petId))),open=review.state==="open",priced=new Map(review.quoteLines.map(q=>[`${q.offerId}:${q.petId??""}`,q])),items=pkg.lines.map((line,index)=>{let offer=line.offer,q=priced.get(`${line.offerId}:${line.petId??""}`),rx=offer?.requiresRx??false,pills=[];return offer||pills.push({label:copy.outOfStock,tone:"later"}),{petId:line.petId,view:{key:`${line.offerId}:${line.petId??""}:${index}`,name:offer?.title??copy.itemNoLongerSold,rx:rx,meta:null,alert:offer?null:copy.packageOutOfStock,pills:pills,price:q&&offer?formatCents(q.unitPrice*q.quantity-q.discount):null,...tileFor(rx),details:offer?{label:copy.details,to:{name:"product",offerId:offer.offerId,...line.petId?{petId:line.petId}:{}}}:null,remove:open?{label:copy.remove,busy:i.removing===index,disabled:i.removing!==null,onPress:()=>i.onRemove(index)}:null}}}),groups=[];for(let it of items){let name=petName(it.petId),label=name?copy.forPet(name):null,existing=groups.find(g=>g.label===label);existing?existing.items.push(it.view):groups.push({label:label,items:[it.view]})}let sum=[],d=pkg.draft;d?(sum.push({k:copy.items,v:formatCents(d.total-d.shipping-d.tax)}),sum.push({k:copy.shipping,v:d.shipping===0?copy.free:formatCents(d.shipping)}),sum.push({k:copy.tax,v:formatCents(d.tax)}),sum.push({k:copy.total,v:formatCents(d.total)})):review.quoteLines.length>0&&sum.push({k:copy.items,v:formatCents(review.quoteLines.reduce((n,q)=>n+q.unitPrice*q.quantity-q.discount,0))});let card=i.card?cardLabel(i.card.brand,i.card.last4):null,anyRx=pkg.lines.some(l=>l.offer?.requiresRx),note=card?[copy.chargedWhenShips(card),anyRx?copy.rxCheckedFirst:null].filter(Boolean).join(" "):null,error=i.error;!error&&review.state==="approving"?error=copy.approvalInProgress:!error&&review.state!=="open"&&review.state!==null?error=copy.reviewClosed:!error&&open&&!i.card&&(error=copy.noCardOnFile);let approve=open&&d&&i.card?{label:copy.approveAndShip,busyLabel:copy.approving,busy:i.approving,disabled:i.approving||i.placed===true||i.removing!==null,onPress:i.onApprove}:null;return{title:month?copy.packageTitle(month):copy.tabPackage,sub:copy.packageSub(names,formatDay(review.approveBy,{weekday:true}),null),reviewPill:review.approveBy&&open?copy.reviewBy(formatDay(review.approveBy)):null,countPill:pkg.lines.length>0?copy.itemCount(pkg.lines.length):null,fine:null,groups:pkg.lines.length>0?groups:[],empty:pkg.lines.length===0?{line:month?copy.packageEmpty(month):copy.nothingHereYet,shop:{label:copy.tabShop,to:{name:"shop"}},skip:null}:null,add:null,sum:sum,approve:approve,skip:open?{label:copy.skipThisMonth,to:{name:"plan"}}:null,note:note,error:error,delivery:i.address?[{k:copy.shipTo,v:addressLine(i.address),change:{label:copy.change,to:{name:"address",then:{name:"package"}}}}]:[],legal:copy.legal}}function readyRxFor(offerId,prescriptions){return prescriptions.filter(p=>p.status==="ready"&&p.offerId===offerId)}function toTile(offer,prescriptions,copy,petName){let pills=[],meta=null,petId=null;if(offer.requiresRx){pills.push(rxPill(copy));let holder=readyRxFor(offer.offerId,prescriptions).find(p=>petName(p.petId));petId=holder?.petId??null,meta=holder?copy.hasPrescription(petName(holder.petId)):copy.needsPrescription}return{key:offer.offerId,to:{name:"product",offerId:offer.offerId,...petId?{petId:petId}:{}},name:offer.title,meta:meta,price:offer.price!==null?formatCents(offer.price):null,pills:pills,...tileFor(offer.requiresRx)}}function toShelves(i){let{copy:copy}=i,shelves=[],refill=i.searching?[]:i.offers.filter(o=>o.requiresRx&&readyRxFor(o.offerId,i.prescriptions).some(p=>i.petName(p.petId)));return refill.length>0&&shelves.push({key:"refill",title:copy.refillSoon,link:i.packageMonth?{label:copy.inMonthsPackage(i.packageMonth),to:{name:"package"}}:null,tiles:refill.map(o=>toTile(o,i.prescriptions,copy,i.petName))}),shelves.push({key:"all",title:i.petNames.length>0?copy.forPets(i.petNames):copy.allProducts,link:null,tiles:i.offers.map(o=>toTile(o,i.prescriptions,copy,i.petName))}),shelves}function toProductView(i){let{copy:copy,offer:offer}=i,monthly=i.plansOn&&i.petName!==null,choice=monthly?i.choice:"once",submitLabel=choice==="monthly"?i.packageMonth?copy.addToPackage(i.packageMonth):copy.startPlan:copy.buyNow,sellable=offer.price!==null;return{back:{label:copy.backToShop,to:{name:"shop"}},title:offer.title,sub:null,price:sellable?formatCents(offer.price):null,priceUnit:null,...tileFor(false),source:null,stockLine:sellable?null:copy.outOfStockNow,choices:monthly?[{value:"monthly",title:copy.everyMonthIn(i.petName),meta:copy.skipOrStop},{value:"once",title:copy.justOnce,meta:copy.justOnceShipsNow}]:null,choice:monthly?choice:null,onChoice:v=>i.onChoice(v==="once"?"once":"monthly"),quantity:i.quantity,onQuantity:n=>i.onQuantity(Math.min(99,Math.max(1,n))),submit:sellable?{label:submitLabel,busyLabel:copy.adding,busy:i.busy,disabled:i.busy,onPress:i.onSubmit}:{label:copy.outOfStock,disabled:true,onPress:()=>{}},error:i.error,facts:null,cards:[],aside:null,legal:copy.legal}}function toRxProductView(i){let{copy:copy,offer:offer}=i,ready=readyRxFor(offer.offerId,i.prescriptions).filter(p=>i.petName(p.petId)),rx=(i.petId?ready.find(p=>p.petId===i.petId):void 0)??ready[0]??null,sellable=offer.price!==null,script=null,submit=null;if(rx){let left=refillsLeft(rx);script={name:copy.hasPrescription(i.petName(rx.petId)),meta:left!==null&&left>0?copy.refillsLeft(left):null,directions:null},submit=sellable?{label:i.packageMonth?copy.refillInPackage(i.packageMonth):copy.buyNow,busyLabel:copy.adding,busy:i.busy,disabled:i.busy,onPress:()=>i.onSubmit(rx)}:{label:copy.outOfStock,disabled:true,onPress:()=>{}}}else{let who=(i.petId?i.petName(i.petId):null)??i.firstPetName;script=who?{name:copy.noPrescriptionFor(who),meta:null,directions:null}:null,submit=i.bookVisitHref?{label:copy.bookVideoVisit,href:i.bookVisitHref}:null}return{back:{label:copy.backToShop,to:{name:"shop"}},stepLabel:copy.prescription,title:offer.title,sub:null,price:sellable?formatCents(offer.price):null,priceUnit:null,...tileFor(true),script:script,stockLine:sellable?null:copy.outOfStockNow,submit:submit,note:null,error:i.error,cards:[],aside:null,legal:copy.legal}}function cadenceLine(days,copy){let months=Math.round(days/30.4);return months>=1&&Math.abs(days-months*30.4)<=2?copy.cadenceMonths(months):copy.cadenceDays}function toPlanView(i){let{copy:copy}=i,live=i.plans.filter(p=>p.state!=="cancelled"),rows=[];for(let plan of live)plan.lines.forEach((line,n)=>{let offer=i.offers.get(line.offerId)??null,pet=i.petName(line.petId),title=[offer?.title??copy.itemNoLongerSold,pet].filter(Boolean).join(" · "),stop=plan.stopReason,meta=stop==="payment_declined"?copy.declined(i.packageMonth):stop&&stop!=="customer"?copy.stopReason(stop):cadenceLine(plan.cadenceDays,copy);rows.push({key:`${plan.planId}:${n}`,title:title,meta:meta,alert:!!(stop&&stop!=="customer"),on:plan.state==="active",busy:i.busyPlan===plan.planId,onToggle:on=>i.onToggle(plan,on),error:i.rowError&&i.rowError.planId===plan.planId&&n===0?i.rowError.line:null})});let active=live.find(p=>p.state==="active")??null,sum=[],reviewBy=formatDay(i.reviewBy,{weekday:true});reviewBy&&sum.push({k:copy.reviewByLabel,v:reviewBy});let ships=formatDay(active?.nextRun??null,{weekday:true});ships&&sum.push({k:copy.ships,v:ships});let declined=live.some(p=>p.stopReason==="payment_declined"),delivery=[];i.address&&delivery.push({k:copy.shipTo,v:addressLine(i.address),change:{label:copy.change,to:{name:"address",then:{name:"plan"}}}}),i.card&&delivery.push({k:copy.payWith,v:cardLabel(i.card.brand,i.card.last4),alert:declined?copy.declined(i.packageMonth):null,change:{label:copy.change,to:{name:"card",then:{name:"plan"}}}});let month=i.packageMonth??monthOf(active?.nextRun??null);return{sub:null,rows:rows,emptyLine:rows.length===0?copy.repeatsEmpty:null,next:active&&sum.length>0?{sum:sum,link:i.packageMonth?{label:copy.reviewMonthsPackage(i.packageMonth),to:{name:"package"}}:null}:null,delivery:delivery,breakCard:active?{skip:month?{label:copy.skipMonth(month),ask:copy.skipMonthAsk(month),body:copy.skipMonthBody}:null,pause:{label:copy.pausePlan,ask:copy.pausePlanAsk,body:copy.pausePlanBody},busy:i.breakBusy,error:i.breakError,onConfirm:i.onBreak}:null,legal:copy.legal}}var IN_PROGRESS=/* @__PURE__ */new Set(["pending_placement","placement_unknown","placed","accepted","release_sent","release_unknown","released","shipped"]);function statusPill(status,copy){let label=copy.orderStatus[status];if(!label)return null;let tone="plain";return IN_PROGRESS.has(status)?tone="soon":status==="delivered"?tone="clear":(status==="rejected"||status==="needs_support")&&(tone="overdue"),{label:label,tone:tone}}function toOrderRow(o,copy){let placed=formatDay(o.placedAt);return{key:o.orderId,to:{name:"order",orderId:o.orderId},icon:"box",title:o.referenceNumber??copy.tabOrders,meta:[placed?copy.placed(placed):null,formatCents(o.total)].filter(Boolean).join(" · "),pill:statusPill(o.status,copy)}}var STEP_OF={pending_placement:1,placement_unknown:1,placed:1,accepted:2,release_sent:2,release_unknown:2,released:2,shipped:3,delivered:5};function toTrackingView(i){let{order:order,copy:copy}=i,s=order.summary,events=order.shipments.flatMap(sh=>sh.tracking),last=events[events.length-1]??null,deliveryBy=events.map(e=>e.deliveryBy).filter(Boolean).pop()??null,at=STEP_OF[s.status],tracker;if(at===void 0)tracker={kind:"ended",line:copy.orderStatus[s.status]??copy.actionFailed};else{let shippedText=last&&last.carrier&&last.trackingNumber?`${last.carrier} ${last.trackingNumber}`:null,delivered=formatDay(deliveryBy,{weekday:true});tracker={kind:"steps",steps:[{key:"approved",title:copy.stepApproved,when:formatWhen(s.placedAt),text:null},{key:"checking",title:copy.stepChecking,when:null,text:null},{key:"filled",title:copy.stepFilled,when:null,text:null},{key:"shipped",title:copy.stepShipped,when:null,text:shippedText},{key:"delivered",title:copy.stepDelivered,when:null,text:delivered&&s.status!=="delivered"?copy.expected(delivered):null}].map((d,n)=>({...d,state:n<at||at===5?"done":n===at?"now":"next"}))}}let arrive=formatDay(deliveryBy,{weekday:true});return{back:{label:copy.backToCare,to:{name:"orders"}},title:s.referenceNumber??copy.tabOrders,sub:arrive&&s.status!=="delivered"&&at!==void 0?copy.shouldArrive(arrive):null,tracker:tracker,items:order.lines.map(l=>({key:l.lineId,name:l.title,rx:l.requiresRx,meta:i.petName(l.petId),pill:null,...tileFor(l.requiresRx)})),sum:[{k:copy.total,v:formatCents(s.total)}],note:null,track:last?.trackingUrl?{label:last.carrier&&last.trackingNumber?`${last.carrier} ${last.trackingNumber}`:copy.trackPackage,href:last.trackingUrl}:null,actions:i.actions,error:i.error,allOrders:{label:copy.allOrders,to:{name:"orders"}},legal:copy.legalTracking}}var SharedContext=react.createContext(null),ShopSharedProvider=SharedContext.Provider;function useShopShared(){let s=react.useContext(SharedContext);if(!s)throw new EverfurConfigError("not-initialized","shop screens render inside EverfurShop");return s}function packageMonth(pkg){return pkg.phase==="ready"&&pkg.value?monthOf(pkg.value.review.shipsOn):null}function loadable(read,map){return read.phase==="ready"&&read.value!==null?{phase:"ready",value:map(read.value)}:read.phase==="loading"?{phase:"loading"}:{phase:"failed",retry:read.refresh}}function pickCard(cards,id){return!cards||cards.length===0?null:(id?cards.find(c=>c.paymentMethodId===id):void 0)??cards[0]??null}function useOffersById(ids){let{client:client}=useShop(),unique=[...new Set(ids)].sort();return useShopRead(`offers-by-id:${unique.join(",")}`,async()=>{let read=await Promise.all(unique.map(id=>client.offer(id)));return omsOk(new Map(unique.map((id,i)=>[id,read[i].ok?read[i].value:null])))})}function outcomeLine(copy,outcome){return outcome.kind==="confirmed"?null:outcome.kind==="needsPayerAction"?copy.cardStepFailed:outcome.kind==="payerActionFailed"?outcome.message??copy.cardStepFailed:outcome.kind==="payerActionClosed"?copy.cardStepClosed:outcome.error.kind==="refused"&&outcome.error.reasonCode==="price_changed"?copy.priceChanged:refusalLine(copy,outcome.error)}var orderNotices=/* @__PURE__ */new WeakMap;function leaveOrderNotice(client,orderId,line){let notices=orderNotices.get(client);notices||(notices=/* @__PURE__ */new Map,orderNotices.set(client,notices)),line?notices.set(orderId,line):notices.delete(orderId)}function peekOrderNotice(client,orderId){return orderNotices.get(client)?.get(orderId)??null}function dropOrderNotice(client,orderId){orderNotices.get(client)?.delete(orderId)}var CARD_PAGE_NOTICE="\0card";function usePackageScreen(go){let{copy:copy,petName:petName,packageSource:packageSource,payments:payments,client:client}=useShop(),{tabs:tabs,pkg:pkg}=useShopShared(),plan=pkg.phase==="ready"?pkg.value?.plan??null:null,cards=usePaymentMethods(),address=useAddress(plan?.destination??null),[removing,setRemoving]=react.useState(null),[error,setError]=react.useState(null),[approving,setApproving]=react.useState(false),[placed,setPlaced]=react.useState(false),remove=useShopAction((keys,p,index)=>packageSource.removeLine(p,index,keys));if(pkg.phase==="ready"&&pkg.value===null)return{tabs:tabs,view:{phase:"failed",retry:pkg.refresh}};let view=loadable(pkg,p=>toPackageView({pkg:p,card:pickCard(cards.value,p.plan.paymentMethodId),address:address.value?.address??null,copy:copy,petName:petName,removing:removing,approving:approving,placed:placed,error:error,onRemove:index=>{setRemoving(index),setError(null),remove.run(p,index).then(res=>{setRemoving(null),res&&res.ok?pkg.refresh():res&&setError(refusalLine(copy,res.error))})},onApprove:()=>{approving||placed||(setApproving(true),setError(null),(async()=>{let outcome=await approveOnce(packageSource,p,payments);setApproving(false);let line=outcomeLine(copy,outcome),orderId=outcome.kind!=="failed"?outcome.orderIds[0]:void 0;orderId?(setPlaced(true),leaveOrderNotice(client,orderId,line),go({name:"order",orderId:orderId})):(setError(line),outcome.kind==="failed"&&outcome.error.kind==="refused"&&pkg.refresh())})())}}));return{tabs:tabs,view:view}}var approvalKeys=/* @__PURE__ */new WeakMap;async function approveOnce(source,p,payments){let keys=approvalKeys.get(p);keys||(keys=new ShopActionKeys,approvalKeys.set(p,keys));let out=await source.approve(p,keys,payments);return(out.kind!=="failed"||out.error.kind==="refused")&&approvalKeys.delete(p),out}function useDebounced(value,ms){let[v,setV]=react.useState(value);return react.useEffect(()=>{let t=setTimeout(()=>setV(value),ms);return()=>clearTimeout(t)},[value,ms]),v}function useShopScreen(initialQuery){let{copy:copy,petName:petName,pets:pets}=useShop(),{tabs:tabs,pkg:pkg}=useShopShared(),[query,setQuery]=react.useState(initialQuery??""),text=useDebounced(query,250),offers=useOffers({text:text}),rx=usePrescriptions(),prescriptions=rx.value??[],names=pets.map(p=>p.name),month=packageMonth(pkg),shelves;offers.phase==="ready"&&offers.value?shelves={phase:"ready",value:toShelves({offers:offers.value.offers,prescriptions:prescriptions,copy:copy,petName:petName,petNames:names,packageMonth:month,searching:text.trim()!==""})}:offers.phase==="loading"||rx.phase==="loading"?shelves={phase:"loading"}:offers.phase==="unavailable"?shelves={phase:"ready",value:[]}:shelves={phase:"failed",retry:offers.refresh};let count=shelves.phase==="ready"?shelves.value.reduce((n,s)=>n+s.tiles.length,0):1,empty=shelves.phase==="ready"&&count===0?text.trim()?copy.noMatches(text.trim()):copy.nothingHereYet:null;return{tabs:tabs,view:{sub:null,query:query,onQuery:setQuery,filters:[],shelves:shelves,empty:empty,legal:copy.legal}}}function lineFor(offer,quantity,petId,rx){return{offerId:offer.offerId,quantity:rx?.packCount??quantity,...rx?.petId??petId?{petId:rx?.petId??petId}:{},...rx?{rxId:rx.rxId}:{}}}function routeFor(name,line){return{name:name,offerId:line.offerId,quantity:line.quantity,...line.petId?{petId:line.petId}:{},...line.rxId?{rxId:line.rxId}:{}}}function useProductScreen(offerId,petId,go){let{copy:copy,petName:petName,pets:pets,client:client}=useShop(),{config:config,pkg:pkg,bookVisitHref:bookVisitHref}=useShopShared(),offer=useOffer(offerId),rx=usePrescriptions(),[choice,setChoice]=react.useState("monthly"),[quantity,setQuantity]=react.useState(1),[error,setError]=react.useState(null),month=packageMonth(pkg),plans=usePlans(),plan=(pkg.phase==="ready"?pkg.value?.plan??null:null)??plans.value?.plans.find(p=>p.state==="active")??null,addToPlan=useShopAction((keys,p,line)=>client.updatePlan(p.planId,{idempotencyKey:keys.key("add"),lines:[...p.lines.map(l=>({offerId:l.offerId,quantity:l.quantity,...l.petId?{petId:l.petId}:{}})),line]})),submit=(line,monthly)=>{if(setError(null),!monthly)return go(routeFor("buy",line));if(!plan)return go(routeFor("consent",line));addToPlan.run(plan,line).then(res=>{res&&res.ok?(pkg.refresh(),go({name:"package"})):res&&setError(refusalLine(copy,res.error))})};if(offer.phase==="ready"&&offer.value?.requiresRx){let o=offer.value,base={offer:o,copy:copy,petId:petId??null,petName:petName,firstPetName:pets[0]?.name??null,packageMonth:month,error:error,bookVisitHref:bookVisitHref};return rx.phase==="unavailable"?{kind:"rx",view:{phase:"ready",value:toRxProductView({...base,prescriptions:[],busy:false,onSubmit:()=>{}})}}:{kind:"rx",view:loadable(rx,list=>toRxProductView({...base,prescriptions:list,busy:addToPlan.busy,onSubmit:p=>submit(lineFor(o,1,null,p),plan!==null)}))}}let petForChoice=(petId?petName(petId):null)??pets[0]?.name??null;return{kind:"product",view:loadable(offer,o=>toProductView({offer:o,copy:copy,petName:petForChoice,packageMonth:month,plansOn:config.recurringTermsVersion!==null,choice:choice,onChoice:setChoice,quantity:quantity,onQuantity:setQuantity,busy:addToPlan.busy,error:error,onSubmit:()=>submit(lineFor(o,quantity,petId??pets[0]?.petId??null,null),choice==="monthly"&&config.recurringTermsVersion!==null&&petForChoice!==null)}))}}function usePlanScreen(){let{copy:copy,petName:petName,client:client}=useShop(),{tabs:tabs,pkg:pkg}=useShopShared(),plans=usePlans(),cards=usePaymentMethods(),live=(plans.value?.plans??[]).filter(p=>p.state!=="cancelled"),active=live.find(p=>p.state==="active")??live[0]??null,address=useAddress(active?.destination??null),offers=useOffersById(live.flatMap(p=>p.lines.map(l=>l.offerId))),[busyPlan,setBusyPlan]=react.useState(null),[rowError,setRowError]=react.useState(null),[breakError,setBreakError]=react.useState(null),toggle=useShopAction((keys,p,on)=>client.planAction(p.planId,{idempotencyKey:keys.key(on?"resume":"pause"),operation:on?"resume":"pause"})),brk=useShopAction((keys,p,which)=>client.planAction(p.planId,{idempotencyKey:keys.key(which),operation:which})),month=packageMonth(pkg);if(plans.phase==="unavailable")return{tabs:tabs,view:{phase:"failed",retry:plans.refresh}};let view=loadable(plans,()=>toPlanView({plans:live,offers:offers.value??/* @__PURE__ */new Map,copy:copy,petName:petName,card:pickCard(cards.value,active?.paymentMethodId??null),address:address.value?.address??null,reviewBy:pkg.phase==="ready"?pkg.value?.review.approveBy??null:null,packageMonth:month,busyPlan:busyPlan,rowError:rowError,onToggle:(p,on)=>{setBusyPlan(p.planId),setRowError(null),toggle.run(p,on).then(res=>{setBusyPlan(null),toggle.reset(),res&&res.ok?plans.refresh():res&&setRowError({planId:p.planId,line:refusalLine(copy,res.error)})})},breakBusy:brk.busy,breakError:breakError,onBreak:async which=>{if(!active)return false;setBreakError(null);let res=await brk.run(active,which);return res&&res.ok?(brk.reset(),plans.refresh(),pkg.refresh(),true):(res&&setBreakError(refusalLine(copy,res.error)),false)}}));return{tabs:tabs,view:view}}function useOrdersScreen(){let{copy:copy,pets:pets}=useShop(),{tabs:tabs}=useShopShared(),orders=useOrders(),names=pets.map(p=>p.name),rows=loadable(orders,page=>page.orders.map(o=>toOrderRow(o,copy)));return{tabs:tabs,view:{sub:names.length>0?copy.ordersSub(names):null,rows:orders.phase==="unavailable"?{phase:"ready",value:[]}:rows,emptyLine:copy.ordersEmpty,more:null,legal:copy.legal}}}function useTrackingScreen(orderId){let{copy:copy,petName:petName,client:client,payments:payments}=useShop(),order=useOrder(orderId),[error,setError]=react.useState(()=>peekOrderNotice(client,orderId));react.useEffect(()=>dropOrderNotice(client,orderId),[client,orderId]);let cancel=useShopAction(keys=>client.cancelOrder(orderId,{idempotencyKey:keys.key("cancel"),reasonCode:"customer_request"})),pay=useShopAction(async keys=>{let key=keys.key("pay");for(let round=0;round<3;round+=1){let res=await client.payOrder(orderId,{idempotencyKey:key});if(!res.ok)return omsErr(res.error);if(res.value.outcome==="authorized")return omsOk({kind:"confirmed",orderIds:[orderId]});if(!payments||!res.value.payerAction)return omsOk({kind:"needsPayerAction",orderIds:[orderId]});let step=await payments.handleNextAction(res.value.payerAction,{orderId:orderId});if(!step.ok)return omsOk(step.closed?{kind:"payerActionClosed",orderIds:[orderId]}:{kind:"payerActionFailed",orderIds:[orderId],message:step.message});key=keys.next("pay")}return omsOk({kind:"needsPayerAction",orderIds:[orderId]})}),actions=[];return order.value?.canPay&&actions.push({label:copy.payOrder,busyLabel:copy.saving,busy:pay.busy,disabled:pay.busy||cancel.busy,onPress:()=>{setError(null),pay.run().then(res=>{res&&(res.ok?setError(outcomeLine(copy,res.value)):setError(refusalLine(copy,res.error)),order.refresh())})}}),order.value?.canCancel&&actions.push({label:copy.cancelOrder,busyLabel:copy.saving,busy:cancel.busy,disabled:pay.busy||cancel.busy,onPress:()=>{setError(null),cancel.run().then(res=>{res&&!res.ok&&setError(refusalLine(copy,res.error)),order.refresh()})}}),{view:loadable(order,o=>toTrackingView({order:o,copy:copy,petName:petName,actions:actions,error:error}))}}function useAddressStep(then,go){let{copy:copy,client:client}=useShop(),back=then??{name:"package"},save=useShopAction((_keys,input)=>client.addAddress(input));return{back:{label:copy.backToCare,to:back},busy:save.busy,error:save.error?refusalLine(copy,save.error):null,onSave:input=>{save.run(input).then(res=>{res&&res.ok&&go(back)})}}}function useCardStep(then,go,handoff){let{copy:copy,client:client,payments:payments}=useShop(),{config:config}=useShopShared(),back=then??{name:"plan"},[error,setError]=react.useState(()=>peekOrderNotice(client,CARD_PAGE_NOTICE));react.useEffect(()=>dropOrderNotice(client,CARD_PAGE_NOTICE),[client]);let setup=useShopAction(async()=>{if(handoff){let step2=await handoff();return step2.ok?omsOk(true):(setError(step2.closed?copy.cardStepClosed:step2.message??copy.cardStepFailed),omsOk(false))}let s=await client.setupPaymentMethod();if(!s.ok||!payments)return s.ok?omsErr({kind:"invalidRequest"}):omsErr(s.error);let step=await payments.confirmCardSetup(s.value.payerAction);return step.ok?omsOk(true):(setError(step.closed?copy.cardStepClosed:step.message??copy.cardStepFailed),omsOk(false))}),on=handoff?true:payments!==null&&config.stripePublishableKey!==null;return{back:{label:copy.backToCare,to:back},error:error??(setup.error?refusalLine(copy,setup.error):null),start:on?{label:copy.cardStart,busyLabel:copy.saving,busy:setup.busy,disabled:setup.busy,onPress:()=>{setError(null),setup.run().then(res=>{res&&res.ok&&res.value&&go(back)})}}:null}}function useCheckoutBasics(){let addresses=useAddresses(),cards=usePaymentMethods(),address=addresses.value?.find(a=>a.isDefault&&a.isComplete)??addresses.value?.find(a=>a.isComplete)??null,card=pickCard(cards.value,null);return{addresses:addresses,cards:cards,address:address,card:card}}function useBuyStep(route,go){let{copy:copy,client:client,payments:payments,petName:petName}=useShop(),offer=useOffer(route.offerId),{address:address,card:card}=useCheckoutBasics(),line=react.useMemo(()=>({offerId:route.offerId,quantity:route.quantity,...route.petId?{petId:route.petId}:{},...route.rxId?{rxId:route.rxId}:{}}),[route.offerId,route.quantity,route.petId,route.rxId]),quote=useShopRead(address?`quote:${address.ref}:${JSON.stringify(line)}`:null,()=>client.quote({lines:[line],shipTo:address.ref})),[shown,setShown]=react.useState(null),[error,setError]=react.useState(null),[placed,setPlaced]=react.useState(false),buy=useShopAction(async keys=>{let draft=await client.createCheckout({idempotencyKey:keys.key("draft"),lines:[line],shipTo:address.ref});if(!draft.ok)return omsErr(draft.error);if((shown??quote.value?.total??null)!==draft.value.total)return setShown(draft.value.total),omsErr({kind:"refused",status:409,reasonCode:"price_changed",message:null});let out=await confirmWithPayerActions(idempotencyKey=>client.confirmCheckout(draft.value.checkoutId,{idempotencyKey:idempotencyKey,expectedTotal:draft.value.total,paymentMethodId:card.paymentMethodId}),keys,payments);return out.kind==="failed"?omsErr(out.error):omsOk(out)}),needs=[...address?[]:[{label:copy.addressNeeded,to:{name:"address",then:route}}],...card?[]:[{label:copy.cardTitle,to:{name:"card",then:route}}]],q=quote.value,total=shown??q?.total??null;return{back:{label:copy.backToShop,to:{name:"product",offerId:route.offerId}},title:copy.confirmTitle,lines:offer.value?[{key:line.offerId,name:offer.value.title,meta:petName(line.petId),price:offer.value.price!==null?formatCents(offer.value.price*line.quantity):null}]:[],sum:q&&total!==null?[{k:copy.shipping,v:q.shipping===0?copy.free:formatCents(q.shipping)},{k:copy.tax,v:formatCents(q.tax)},{k:copy.total,v:formatCents(total)}]:null,needs:needs,pay:address&&card&&q?{label:copy.confirmPay,busyLabel:copy.saving,busy:buy.busy,disabled:buy.busy||placed,onPress:()=>{placed||(setError(null),buy.run().then(res=>{if(!res)return;let out=res.ok?res.value:{kind:"failed",error:res.error},orderId=out.kind!=="failed"?out.orderIds[0]:void 0;orderId?(setPlaced(true),leaveOrderNotice(client,orderId,outcomeLine(copy,out)),go({name:"order",orderId:orderId})):setError(outcomeLine(copy,out))}))}}:null,note:card?copy.chargedWhenShips(cardLabel(card.brand,card.last4)):null,error:error??(quote.phase==="failed"&&quote.error?refusalLine(copy,quote.error):null)}}function useConsentStep(route,go){let{copy:copy,client:client}=useShop(),{config:config,pkg:pkg}=useShopShared(),{address:address,card:card}=useCheckoutBasics(),create=useShopAction(keys=>client.createPlan({idempotencyKey:keys.key("create"),cadenceDays:30,destination:address.ref,paymentMethodId:card.paymentMethodId,consentTermsVersion:config.recurringTermsVersion,lines:[{offerId:route.offerId,quantity:route.quantity,...route.petId?{petId:route.petId}:{},...route.rxId?{rxId:route.rxId}:{}}]})),needs=[...address?[]:[{label:copy.addressNeeded,to:{name:"address",then:route}}],...card?[]:[{label:copy.cardTitle,to:{name:"card",then:route}}]];return{back:{label:copy.backToShop,to:{name:"product",offerId:route.offerId}},terms:config.recurringTermsUrl?{label:copy.consentTermsLink,href:config.recurringTermsUrl}:null,needs:needs,error:create.error?refusalLine(copy,create.error):null,agree:address&&card&&config.recurringTermsVersion?{label:copy.consentAgree,busyLabel:copy.saving,busy:create.busy,disabled:create.busy,onPress:()=>{create.run().then(res=>{res&&res.ok&&(pkg.refresh(),go({name:"plan"}))})}}:null}}var NavContext=react.createContext({go:()=>{},openExternal:()=>{}});function ShopNativeNavProvider({value:value,children:children}){return react.createElement(NavContext.Provider,{value:value},children)}function useShopNativeNav(){return react.useContext(NavContext)}var PHONE_BOX={body:{paddingTop:8,paddingRight:16,paddingLeft:16},pushBody:{paddingRight:16,paddingLeft:16},subtabs:{backgroundColor:"#ffffff"},subtab:{minHeight:44,rowGap:6,columnGap:6},subtabCurrent:{minHeight:44,rowGap:6,columnGap:6},titleBlock:{paddingTop:4,rowGap:2,columnGap:2},screenTitle:{},screenMeta:{},stack:{marginTop:12,rowGap:12,columnGap:12},card:{paddingTop:16,paddingRight:16,paddingBottom:16,paddingLeft:16,borderWidth:1,borderColor:"#e4e4e4",borderRadius:20,backgroundColor:"#ffffff"},cardHead:{marginBottom:12,rowGap:8,columnGap:16},cardTitle:{marginBottom:12},cardTitleInHead:{},cardLink:{},cardLinkAfterNote:{marginTop:12,marginBottom:2.34},forLabel:{marginTop:4,marginBottom:8},forLabelNext:{marginTop:16,marginBottom:8},itemsLiFirst:{paddingBottom:16,rowGap:12,columnGap:12},itemsLiMid:{paddingTop:16,paddingBottom:16,borderTopWidth:1,borderTopColor:"#e4e4e4",rowGap:12,columnGap:12},itemsLiLast:{paddingTop:16,borderTopWidth:1,borderTopColor:"#e4e4e4",rowGap:12,columnGap:12},thumb:{borderRadius:10,backgroundColor:"#eaeef6",width:48,height:48},thumbIcon:{width:22,height:22},thumbPink:{borderRadius:10,backgroundColor:"#ffeae8"},thumbYellow:{borderRadius:10,backgroundColor:"#fcf0d6"},thumbSage:{borderRadius:10,backgroundColor:"#e6ece8"},itemsName:{rowGap:4,columnGap:8},itemsMeta:{marginTop:2},itemsActs:{marginTop:6,rowGap:16,columnGap:16},itemsActLink:{},itemsActButton:{},itemsEnd:{rowGap:4,columnGap:4},itemsPrice:{},pill:{paddingRight:10,paddingLeft:10,borderRadius:999,backgroundColor:"#eaeef6",minHeight:24},pillSoon:{paddingRight:10,paddingLeft:10,borderRadius:999,backgroundColor:"#ffffff",minHeight:24},btnRow:{paddingRight:14,paddingLeft:14,borderWidth:1,borderColor:"#10462e",borderRadius:999,minHeight:36,rowGap:8,columnGap:8},btnRowIcon:{width:17,height:17},btnRowLabel:{},sumTotal:{paddingRight:24,paddingLeft:24,borderWidth:1,borderColor:"#e4e4e4",borderRadius:20,backgroundColor:"#ffffff"},sumRowFirst:{paddingTop:14,paddingBottom:14,rowGap:2,columnGap:16},sumRowLast:{paddingTop:14,paddingBottom:14,rowGap:2,columnGap:16},sumDt:{},sumDd:{},sumDdTotal:{},noteAfterSum:{marginTop:12},rowsLiFirst:{paddingBottom:16,rowGap:8,columnGap:16},rowsLiNext:{paddingTop:16,borderTopWidth:1,borderTopColor:"#e4e4e4",rowGap:8,columnGap:16},rowsK:{},rowsV:{marginTop:2},rowsMeta:{marginTop:2},legal:{marginTop:32},legalText:{},traybar:{paddingTop:12,paddingRight:16,paddingBottom:8,paddingLeft:16,backgroundColor:"#ffffff",rowGap:6,columnGap:6},btnInk:{paddingRight:24,paddingLeft:24,borderWidth:1,borderColor:"#10462e",borderRadius:999,backgroundColor:"#10462e",minHeight:50,rowGap:8,columnGap:8},traybarFine:{},input:{paddingRight:16,paddingLeft:16,borderWidth:1,borderColor:"#e4e4e4",borderRadius:10,backgroundColor:"#ffffff",minHeight:52,rowGap:10,columnGap:10},inputIcon:{width:20,height:20},inputText:{paddingTop:1,paddingRight:2,paddingBottom:1,paddingLeft:2},inputPlaceholder:{},filters:{paddingBottom:2,rowGap:8,columnGap:8},filter:{paddingRight:14,paddingLeft:14,borderWidth:1,borderColor:"#e4e4e4",borderRadius:999,minHeight:36},filterCurrent:{paddingRight:14,paddingLeft:14,borderWidth:1,borderColor:"#10462e",borderRadius:999,backgroundColor:"#ffeae8",minHeight:36},sectionHead:{marginTop:8,rowGap:8,columnGap:12},prods:{rowGap:16,columnGap:12},prod:{rowGap:12,columnGap:12},prodImg:{borderRadius:10,backgroundColor:"#ffeae8",aspectRatio:1},prodIcon:{width:36,height:36},prodTags:{rowGap:6,columnGap:6,position:"absolute",top:8,left:8},prodBody:{rowGap:4,columnGap:4},prodName:{},prodMeta:{},prodPrice:{marginTop:4,rowGap:8,columnGap:8},pillClear:{paddingRight:10,paddingLeft:10,borderRadius:999,backgroundColor:"#ffffff",minHeight:24},pillPlain:{paddingRight:10,paddingLeft:10,borderRadius:999,backgroundColor:"#ffffff",minHeight:24},pillOverdue:{paddingRight:10,paddingLeft:10,borderRadius:999,backgroundColor:"#ffffff",minHeight:24},hero:{borderRadius:20,backgroundColor:"#fcf0d6",aspectRatio:1.6},heroIcon:{width:56,height:56},source:{rowGap:8,columnGap:8},sourceIcon:{marginTop:2,width:16,height:16},sourceBold:{},sourceLink:{},choices:{rowGap:8,columnGap:8},choiceCurrent:{paddingTop:14,paddingRight:16,paddingBottom:14,paddingLeft:16,borderWidth:1,borderColor:"#10462e",borderRadius:10,backgroundColor:"#ffeae8",rowGap:12,columnGap:12},choice:{paddingTop:14,paddingRight:16,paddingBottom:14,paddingLeft:16,borderWidth:1,borderColor:"#e4e4e4",borderRadius:10,backgroundColor:"#ffffff",rowGap:12,columnGap:12},radioOn:{borderWidth:6,borderColor:"#10462e",borderRadius:10,backgroundColor:"#ffffff",width:20,height:20},radioOff:{borderWidth:1,borderColor:"#819d90",borderRadius:10,backgroundColor:"#ffffff",width:20,height:20},choiceText:{},choiceTitle:{},choiceMeta:{marginTop:2},facts:{marginTop:12,rowGap:8,columnGap:8},factsLi:{paddingTop:12,paddingRight:12,paddingBottom:12,paddingLeft:12,borderRadius:10,backgroundColor:"#e6ece8",rowGap:4,columnGap:4},factsLiHer:{paddingTop:12,paddingRight:12,paddingBottom:12,paddingLeft:12,borderRadius:10,backgroundColor:"#fcf0d6",rowGap:4,columnGap:4},factsK:{},factsN:{},factsUnit:{},noteAfterFacts:{marginTop:12},cardLead:{marginBottom:12},person:{rowGap:12,columnGap:16},avatar:{borderRadius:18,backgroundColor:"#ffffff",width:36,height:36},personName:{},personMeta:{},sourceInCard:{marginTop:12,rowGap:8,columnGap:8},sourceInCardIcon:{marginTop:2,width:16,height:16},noteAfterSource:{marginTop:8},rxLead:{marginBottom:12},btnOutlineSm:{marginTop:12,paddingRight:16,paddingLeft:16,borderWidth:1,borderColor:"#10462e",borderRadius:999,minHeight:46,rowGap:8,columnGap:8},btnOutlineSmIcon:{width:20,height:20},noteStandalone:{},noteLink:{},sumPlain:{paddingRight:24,paddingLeft:24,borderWidth:1,borderColor:"#e4e4e4",borderRadius:20,backgroundColor:"#ffffff"},sumPlainRowFirst:{paddingTop:14,paddingBottom:14,rowGap:2,columnGap:16},sumPlainRowLast:{paddingTop:14,paddingBottom:14,rowGap:2,columnGap:16},sumPlainDd:{},planRowsLiFirst:{paddingTop:12,paddingBottom:12,rowGap:8,columnGap:16},planRowsLiNext:{paddingTop:12,paddingBottom:12,borderTopWidth:1,borderTopColor:"#e4e4e4",rowGap:8,columnGap:16},switch:{width:48,height:28},switchTrack:{borderRadius:999,backgroundColor:"#10462e",width:48,height:28},switchKnob:{borderRadius:11,backgroundColor:"#ffffff",position:"absolute",top:3,left:3,transform:[{translateX:20}],width:22,height:22},switchTrackOff:{borderRadius:999,backgroundColor:"#d0d6d3",width:48,height:28},switchKnobOff:{borderRadius:11,backgroundColor:"#ffffff",position:"absolute",top:3,left:3,width:22,height:22},breaks:{marginTop:12,rowGap:12,columnGap:24},btnSm:{paddingRight:16,paddingLeft:16,borderWidth:1,borderColor:"#10462e",borderRadius:999,minHeight:46,rowGap:8,columnGap:8},linkDanger:{},sheet:{borderTopLeftRadius:28,borderTopRightRadius:28,backgroundColor:"#ffffff"},sheetBackdrop:{backgroundColor:"rgba(0, 0, 0, 0.32)",position:"absolute"},sheetGrab:{height:20},sheetGrabBar:{borderRadius:3,backgroundColor:"#c9c9c9",width:36,height:5},sheetHead:{paddingTop:4,paddingRight:16,paddingBottom:12,paddingLeft:16,rowGap:12,columnGap:12},sheetClose:{paddingTop:1,paddingRight:6,paddingBottom:1,paddingLeft:6,borderRadius:18,backgroundColor:"#e6ece8",width:36,height:36},sheetCloseIcon:{width:20,height:20},sheetBody:{paddingRight:16,paddingBottom:24,paddingLeft:16,rowGap:12,columnGap:12},sheetText:{},sheetActions:{marginTop:16,rowGap:8,columnGap:8},btnDanger:{paddingRight:16,paddingLeft:16,borderWidth:1,borderColor:"#c03410",borderRadius:999,backgroundColor:"#ffffff",minHeight:46,rowGap:8,columnGap:8},btnOutline:{paddingRight:24,paddingLeft:24,borderWidth:1,borderColor:"#10462e",borderRadius:999,minHeight:52,rowGap:8,columnGap:8},rec:{marginRight:-8,marginLeft:-8,rowGap:4,columnGap:4},recRow:{paddingTop:10,paddingRight:8,paddingBottom:10,paddingLeft:8,borderRadius:10,rowGap:12,columnGap:12},recIcon:{width:20,height:20},recText:{rowGap:2,columnGap:2},recTitle:{},recMeta:{},recEnd:{rowGap:8,columnGap:8},trackerLi:{paddingBottom:24,rowGap:16,columnGap:16},trackerLiLast:{rowGap:16,columnGap:16},trackerLineDone:{borderRadius:1,backgroundColor:"#10462e",position:"absolute",top:30,left:13,bottom:2,width:2},trackerLine:{borderRadius:1,backgroundColor:"#e4e4e4",position:"absolute",top:30,left:13,bottom:2,width:2},dotDone:{borderWidth:2,borderColor:"#10462e",borderRadius:14,backgroundColor:"#10462e",width:28,height:28},dotDoneIcon:{width:16,height:16},dotNow:{borderWidth:2,borderColor:"#10462e",borderRadius:14,backgroundColor:"#ffffff",width:28,height:28},dotNowCore:{borderRadius:5,backgroundColor:"#07c168",width:10,height:10},dotNext:{borderWidth:2,borderColor:"#e4e4e4",borderRadius:14,backgroundColor:"#ffffff",width:28,height:28},trackerTitle:{paddingTop:3,rowGap:4,columnGap:8},trackerTitleNext:{paddingTop:3,rowGap:4,columnGap:8},trackerWhen:{marginTop:2},trackerText:{marginTop:2},pillStable:{paddingRight:10,paddingLeft:10,borderRadius:999,backgroundColor:"#dcf6ea",minHeight:24},trackItemsEnd:{rowGap:4,columnGap:4},trackItemsLiFirst:{paddingBottom:16,rowGap:12,columnGap:12},trackItemsLiLast:{paddingTop:16,borderTopWidth:1,borderTopColor:"#e4e4e4",rowGap:12,columnGap:12},noteAfterTotal:{marginTop:8},rowLink:{paddingTop:16,paddingRight:24,paddingBottom:16,paddingLeft:24,borderWidth:1,borderColor:"#e4e4e4",borderRadius:20,backgroundColor:"#ffffff",rowGap:12,columnGap:12},rowLinkIcon:{width:22,height:22},rowLinkChevron:{width:20,height:20},ghost:{marginTop:16,rowGap:10,columnGap:10},ghostBar:{borderRadius:999,backgroundColor:"#e6ece8",height:12},field:{rowGap:6,columnGap:6},fieldLabel:{},fieldInput:{paddingRight:16,paddingLeft:16,borderWidth:1,borderColor:"#e4e4e4",borderRadius:10,backgroundColor:"#ffffff",minHeight:52,rowGap:10,columnGap:10},fieldInputText:{paddingTop:1,paddingRight:2,paddingBottom:1,paddingLeft:2}},PHONE_TEXT={body:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},pushBody:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},subtabs:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},subtab:{color:"#6b6b6b",fontSize:15,fontWeight:"500",lineHeight:23.25},subtabCurrent:{color:"#10462e",fontSize:15,fontWeight:"700",lineHeight:23.25},titleBlock:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},screenTitle:{color:"#10462e",fontSize:22,fontWeight:"500",lineHeight:26.390625,letterSpacing:-.33},screenMeta:{color:"#6b6b6b",fontSize:13,fontWeight:"400",lineHeight:18.84375},stack:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},card:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},cardHead:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},cardTitle:{color:"#10462e",fontSize:18,fontWeight:"700",lineHeight:22.5,letterSpacing:-.36},cardTitleInHead:{color:"#10462e",fontSize:18,fontWeight:"700",lineHeight:22.5,letterSpacing:-.36},cardLink:{color:"#10462e",fontSize:15,fontWeight:"700",lineHeight:21},cardLinkAfterNote:{color:"#10462e",fontSize:15,fontWeight:"700",lineHeight:21},forLabel:{color:"#6b6b6b",fontSize:12,fontWeight:"700",lineHeight:16.796875,letterSpacing:.72,textTransform:"uppercase"},forLabelNext:{color:"#6b6b6b",fontSize:12,fontWeight:"700",lineHeight:16.796875,letterSpacing:.72,textTransform:"uppercase"},itemsLiFirst:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},itemsLiMid:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},itemsLiLast:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},thumb:{color:"#10462e",fontSize:17,fontWeight:"400",lineHeight:26.34375},thumbIcon:{color:"#10462e",fontSize:17,fontWeight:"400",lineHeight:26.34375},thumbPink:{color:"#10462e",fontSize:17,fontWeight:"400",lineHeight:26.34375},thumbYellow:{color:"#10462e",fontSize:17,fontWeight:"400",lineHeight:26.34375},thumbSage:{color:"#10462e",fontSize:17,fontWeight:"400",lineHeight:26.34375},itemsName:{color:"#10462e",fontSize:17,fontWeight:"700",lineHeight:22.09375},itemsMeta:{color:"#6b6b6b",fontSize:13,fontWeight:"400",lineHeight:18.84375},itemsActs:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},itemsActLink:{color:"#10462e",fontSize:13,fontWeight:"700",lineHeight:20.140625,textDecorationLine:"underline"},itemsActButton:{color:"#10462e",fontSize:13,fontWeight:"700",lineHeight:20.140625,textDecorationLine:"underline",textAlign:"center"},itemsEnd:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375,fontVariant:["tabular-nums"]},itemsPrice:{color:"#10462e",fontSize:17,fontWeight:"700",lineHeight:26.34375,fontVariant:["tabular-nums"]},pill:{color:"#10462e",fontSize:12,fontWeight:"700",lineHeight:12,letterSpacing:.72,textTransform:"uppercase"},pillSoon:{color:"#10462e",fontSize:12,fontWeight:"700",lineHeight:12,letterSpacing:.72,textTransform:"uppercase"},btnRow:{color:"#10462e",fontSize:14,fontWeight:"400",lineHeight:14,textAlign:"center",fontVariant:["tabular-nums"]},btnRowIcon:{color:"#10462e",fontSize:14,fontWeight:"400",lineHeight:14,textAlign:"center",fontVariant:["tabular-nums"]},btnRowLabel:{color:"#10462e",fontSize:14,fontWeight:"400",lineHeight:14,textAlign:"center",fontVariant:["tabular-nums"]},sumTotal:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},sumRowFirst:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},sumRowLast:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},sumDt:{color:"#6b6b6b",fontSize:15,fontWeight:"400",lineHeight:23.25},sumDd:{color:"#10462e",fontSize:15,fontWeight:"700",lineHeight:21,textAlign:"right"},sumDdTotal:{color:"#10462e",fontSize:20,fontWeight:"700",lineHeight:28,textAlign:"right"},noteAfterSum:{color:"#6b6b6b",fontSize:13,fontWeight:"400",lineHeight:19.5},rowsLiFirst:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},rowsLiNext:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},rowsK:{color:"#10462e",fontSize:17,fontWeight:"700",lineHeight:22.09375},rowsV:{color:"#000000",fontSize:15,fontWeight:"400",lineHeight:21.75},rowsMeta:{color:"#6b6b6b",fontSize:13,fontWeight:"400",lineHeight:18.84375},legal:{color:"#6b6b6b",fontSize:13,fontWeight:"400",lineHeight:20.796875,textAlign:"center"},legalText:{color:"#6b6b6b",fontSize:13,fontWeight:"400",lineHeight:20.796875,textAlign:"center"},traybar:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},btnInk:{color:"#ffffff",fontSize:17,fontWeight:"700",lineHeight:17,textAlign:"center"},traybarFine:{color:"#6b6b6b",fontSize:12,fontWeight:"400",lineHeight:15.59375,textAlign:"center"},input:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},inputIcon:{color:"#6b6b6b",fontSize:17,fontWeight:"400",lineHeight:26.34375},inputText:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},inputPlaceholder:{color:"#757575",fontSize:17,fontWeight:"400"},filters:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},filter:{color:"#10462e",fontSize:15,fontWeight:"400",lineHeight:18},filterCurrent:{color:"#10462e",fontSize:15,fontWeight:"700",lineHeight:18},sectionHead:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},prods:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},prod:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},prodImg:{color:"#10462e",fontSize:17,fontWeight:"400",lineHeight:26.34375},prodIcon:{color:"#10462e",fontSize:17,fontWeight:"400",lineHeight:26.34375},prodTags:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},prodBody:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},prodName:{color:"#10462e",fontSize:15,fontWeight:"700",lineHeight:19.5},prodMeta:{color:"#6b6b6b",fontSize:13,fontWeight:"400",lineHeight:18.84375},prodPrice:{color:"#10462e",fontSize:15,fontWeight:"700",lineHeight:23.25,fontVariant:["tabular-nums"]},pillClear:{color:"#07c168",fontSize:12,fontWeight:"700",lineHeight:12,letterSpacing:.72,textTransform:"uppercase"},pillPlain:{color:"#10462e",fontSize:12,fontWeight:"700",lineHeight:12,letterSpacing:.72,textTransform:"uppercase"},pillOverdue:{color:"#c03410",fontSize:12,fontWeight:"700",lineHeight:12,letterSpacing:.72,textTransform:"uppercase"},hero:{color:"#10462e",fontSize:17,fontWeight:"400",lineHeight:26.34375},heroIcon:{color:"#10462e",fontSize:17,fontWeight:"400",lineHeight:26.34375},source:{color:"#6b6b6b",fontSize:13,fontWeight:"400",lineHeight:19.5},sourceIcon:{color:"#819d90",fontSize:13,fontWeight:"400",lineHeight:19.5},sourceBold:{color:"#6b6b6b",fontSize:13,fontWeight:"700",lineHeight:19.5},sourceLink:{color:"#10462e",fontSize:13,fontWeight:"700",lineHeight:19.5,textDecorationLine:"underline"},choices:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},choiceCurrent:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},choice:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},radioOn:{color:"#000000",fontSize:13.333,fontWeight:"400"},radioOff:{color:"#000000",fontSize:13.333,fontWeight:"400"},choiceText:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},choiceTitle:{color:"#10462e",fontSize:17,fontWeight:"700",lineHeight:22.09375},choiceMeta:{color:"#6b6b6b",fontSize:13,fontWeight:"400",lineHeight:18.1875},facts:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},factsLi:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},factsLiHer:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},factsK:{color:"#6b6b6b",fontSize:13,fontWeight:"400",lineHeight:18.1875},factsN:{color:"#10462e",fontSize:20,fontWeight:"700",lineHeight:22,letterSpacing:-.4,fontVariant:["tabular-nums"]},factsUnit:{color:"#6b6b6b",fontSize:13,fontWeight:"500",lineHeight:14.296875,letterSpacing:-.4,fontVariant:["tabular-nums"]},noteAfterFacts:{color:"#6b6b6b",fontSize:13,fontWeight:"400",lineHeight:19.5},cardLead:{color:"#000000",fontSize:15,fontWeight:"400",lineHeight:22.5},person:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},avatar:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},personName:{color:"#10462e",fontSize:17,fontWeight:"700",lineHeight:22.09375},personMeta:{color:"#6b6b6b",fontSize:13,fontWeight:"400",lineHeight:18.84375},sourceInCard:{color:"#6b6b6b",fontSize:13,fontWeight:"400",lineHeight:19.5},sourceInCardIcon:{color:"#819d90",fontSize:13,fontWeight:"400",lineHeight:19.5},noteAfterSource:{color:"#6b6b6b",fontSize:13,fontWeight:"400",lineHeight:19.5},rxLead:{color:"#000000",fontSize:15,fontWeight:"400",lineHeight:22.5},btnOutlineSm:{color:"#10462e",fontSize:15,fontWeight:"400",lineHeight:15,textAlign:"center"},btnOutlineSmIcon:{color:"#10462e",fontSize:15,fontWeight:"400",lineHeight:15,textAlign:"center"},noteStandalone:{color:"#6b6b6b",fontSize:13,fontWeight:"400",lineHeight:19.5},noteLink:{color:"#10462e",fontSize:15,fontWeight:"700",lineHeight:21},sumPlain:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},sumPlainRowFirst:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},sumPlainRowLast:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},sumPlainDd:{color:"#10462e",fontSize:15,fontWeight:"700",lineHeight:21,textAlign:"right"},planRowsLiFirst:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},planRowsLiNext:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},switch:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},switchTrack:{color:"#000000",fontSize:13.333,fontWeight:"400"},switchKnob:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},switchTrackOff:{color:"#000000",fontSize:13.333,fontWeight:"400"},switchKnobOff:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},breaks:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},btnSm:{color:"#10462e",fontSize:15,fontWeight:"400",lineHeight:15,textAlign:"center"},linkDanger:{color:"#c03410",fontSize:15,fontWeight:"700",lineHeight:23.25,textDecorationLine:"underline",textAlign:"center"},sheet:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},sheetBackdrop:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},sheetGrab:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},sheetGrabBar:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},sheetHead:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},sheetClose:{color:"#10462e",fontSize:13.333,fontWeight:"400",textAlign:"center"},sheetCloseIcon:{color:"#10462e",fontSize:13.333,fontWeight:"400",textAlign:"center"},sheetBody:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},sheetText:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:25.5},sheetActions:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},btnDanger:{color:"#c03410",fontSize:15,fontWeight:"700",lineHeight:23.25,textAlign:"center"},btnOutline:{color:"#10462e",fontSize:17,fontWeight:"700",lineHeight:17,textAlign:"center"},rec:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},recRow:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},recIcon:{color:"#6b6b6b",fontSize:17,fontWeight:"400",lineHeight:26.34375},recText:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},recTitle:{color:"#10462e",fontSize:17,fontWeight:"700",lineHeight:22.09375},recMeta:{color:"#6b6b6b",fontSize:13,fontWeight:"400",lineHeight:18.1875},recEnd:{color:"#6b6b6b",fontSize:15,fontWeight:"400",lineHeight:23.25},trackerLi:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},trackerLiLast:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},trackerLineDone:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},trackerLine:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},dotDone:{color:"#ffffff",fontSize:17,fontWeight:"400",lineHeight:26.34375},dotDoneIcon:{color:"#ffffff",fontSize:17,fontWeight:"400",lineHeight:26.34375},dotNow:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},dotNowCore:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},dotNext:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},trackerTitle:{color:"#10462e",fontSize:17,fontWeight:"700",lineHeight:22.09375},trackerTitleNext:{color:"#6b6b6b",fontSize:17,fontWeight:"700",lineHeight:22.09375},trackerWhen:{color:"#6b6b6b",fontSize:13,fontWeight:"400",lineHeight:18.1875},trackerText:{color:"#000000",fontSize:15,fontWeight:"400",lineHeight:22.5},pillStable:{color:"#10462e",fontSize:12,fontWeight:"700",lineHeight:12,letterSpacing:.72,textTransform:"uppercase"},trackItemsEnd:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375,fontVariant:["tabular-nums"]},trackItemsLiFirst:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},trackItemsLiLast:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},noteAfterTotal:{color:"#6b6b6b",fontSize:13,fontWeight:"400",lineHeight:19.5},rowLink:{color:"#10462e",fontSize:15,fontWeight:"700",lineHeight:20.25},rowLinkIcon:{color:"#10462e",fontSize:15,fontWeight:"700",lineHeight:20.25},rowLinkChevron:{color:"#819d90",fontSize:15,fontWeight:"700",lineHeight:20.25},ghost:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},ghostBar:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},field:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},fieldLabel:{color:"#10462e",fontSize:15,fontWeight:"700",lineHeight:21},fieldInput:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},fieldInputText:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375}},PHONE_DECOR={body:{font:"sans"},pushBody:{font:"sans"},subtabs:{font:"sans",lineBottom:{width:1,color:"#e4e4e4"}},subtab:{font:"sans"},subtabCurrent:{font:"sans",insetBottom:{width:3,color:"#07c168"}},titleBlock:{font:"sans"},screenTitle:{font:"sans",wrap:"balance"},screenMeta:{font:"mono",wrap:"pretty"},stack:{font:"sans"},card:{font:"sans"},cardHead:{font:"sans"},cardTitle:{font:"sans"},cardTitleInHead:{font:"sans"},cardLink:{font:"sans"},cardLinkAfterNote:{font:"sans"},forLabel:{font:"mono"},forLabelNext:{font:"mono"},itemsLiFirst:{font:"sans"},itemsLiMid:{font:"sans"},itemsLiLast:{font:"sans"},thumb:{font:"sans"},thumbIcon:{font:"sans"},thumbPink:{font:"sans"},thumbYellow:{font:"sans"},thumbSage:{font:"sans"},itemsName:{font:"sans"},itemsMeta:{font:"sans"},itemsActs:{font:"sans"},itemsActLink:{font:"sans",underlineOffset:3},itemsActButton:{font:"sans",underlineOffset:3},itemsEnd:{font:"sans"},itemsPrice:{font:"sans"},pill:{font:"mono"},pillSoon:{font:"mono",ring:{width:1.25,color:"#f6d892"}},btnRow:{font:"sans"},btnRowIcon:{font:"sans"},btnRowLabel:{font:"sans"},sumTotal:{font:"sans"},sumRowFirst:{font:"sans"},sumRowLast:{font:"sans"},sumDt:{font:"sans"},sumDd:{font:"sans"},sumDdTotal:{font:"sans"},noteAfterSum:{font:"sans"},rowsLiFirst:{font:"sans"},rowsLiNext:{font:"sans"},rowsK:{font:"sans"},rowsV:{font:"sans"},rowsMeta:{font:"sans"},legal:{font:"sans"},legalText:{font:"sans"},traybar:{font:"sans",lineTop:{width:1,color:"#e4e4e4"}},btnInk:{font:"sans"},traybarFine:{font:"sans"},input:{font:"sans"},inputIcon:{font:"sans"},inputText:{font:"sans"},inputPlaceholder:{font:"sans"},filters:{font:"sans"},filter:{font:"sans"},filterCurrent:{font:"sans"},sectionHead:{font:"sans"},prods:{font:"sans"},prod:{font:"sans"},prodImg:{font:"sans"},prodIcon:{font:"sans"},prodTags:{font:"sans"},prodBody:{font:"sans"},prodName:{font:"sans"},prodMeta:{font:"sans"},prodPrice:{font:"sans"},pillClear:{font:"mono",ring:{width:1.5,color:"#07c168"}},pillPlain:{font:"mono",ring:{width:1.5,color:"rgba(16, 70, 46, 0.2)"}},pillOverdue:{font:"mono",ring:{width:1.25,color:"#c03410"}},hero:{font:"sans"},heroIcon:{font:"sans"},source:{font:"sans"},sourceIcon:{font:"sans"},sourceBold:{font:"sans"},sourceLink:{font:"sans",underlineOffset:3},choices:{font:"sans"},choiceCurrent:{font:"sans"},choice:{font:"sans"},radioOn:{font:"sans"},radioOff:{font:"sans"},choiceText:{font:"sans"},choiceTitle:{font:"sans"},choiceMeta:{font:"sans"},facts:{font:"sans"},factsLi:{font:"sans"},factsLiHer:{font:"sans"},factsK:{font:"sans"},factsN:{font:"sans"},factsUnit:{font:"sans"},noteAfterFacts:{font:"sans"},cardLead:{font:"sans"},person:{font:"sans"},avatar:{font:"sans",ring:{width:1,color:"#e4e4e4"}},personName:{font:"sans"},personMeta:{font:"sans"},sourceInCard:{font:"sans"},sourceInCardIcon:{font:"sans"},noteAfterSource:{font:"sans"},rxLead:{font:"sans"},btnOutlineSm:{font:"sans"},btnOutlineSmIcon:{font:"sans"},noteStandalone:{font:"sans"},noteLink:{font:"sans"},sumPlain:{font:"sans"},sumPlainRowFirst:{font:"sans"},sumPlainRowLast:{font:"sans"},sumPlainDd:{font:"sans"},planRowsLiFirst:{font:"sans"},planRowsLiNext:{font:"sans"},switch:{font:"sans"},switchTrack:{font:"sans"},switchKnob:{font:"sans",drop:{x:0,y:1,blur:2,spread:0,color:"rgba(16, 70, 46, 0.06)"}},switchTrackOff:{font:"sans"},switchKnobOff:{font:"sans",drop:{x:0,y:1,blur:2,spread:0,color:"rgba(16, 70, 46, 0.06)"}},breaks:{font:"sans"},btnSm:{font:"sans"},linkDanger:{font:"sans",underlineOffset:3},sheet:{font:"sans"},sheetBackdrop:{font:"sans"},sheetGrab:{font:"sans"},sheetGrabBar:{font:"sans"},sheetHead:{font:"sans"},sheetClose:{font:"sans"},sheetCloseIcon:{font:"sans"},sheetBody:{font:"sans"},sheetText:{font:"sans"},sheetActions:{font:"sans"},btnDanger:{font:"sans"},btnOutline:{font:"sans"},rec:{font:"sans"},recRow:{font:"sans"},recIcon:{font:"sans"},recText:{font:"sans"},recTitle:{font:"sans"},recMeta:{font:"sans"},recEnd:{font:"sans"},trackerLi:{font:"sans"},trackerLiLast:{font:"sans"},trackerLineDone:{font:"sans"},trackerLine:{font:"sans"},dotDone:{font:"sans"},dotDoneIcon:{font:"sans"},dotNow:{font:"sans"},dotNowCore:{font:"sans"},dotNext:{font:"sans"},trackerTitle:{font:"sans"},trackerTitleNext:{font:"sans"},trackerWhen:{font:"sans"},trackerText:{font:"sans"},pillStable:{font:"mono"},trackItemsEnd:{font:"sans"},trackItemsLiFirst:{font:"sans"},trackItemsLiLast:{font:"sans"},noteAfterTotal:{font:"sans"},rowLink:{font:"sans"},rowLinkIcon:{font:"sans"},rowLinkChevron:{font:"sans"},ghost:{font:"sans"},ghostBar:{font:"sans"},field:{font:"sans"},fieldLabel:{font:"sans"},fieldInput:{font:"sans"},fieldInputText:{font:"sans"}},PHONE_ICONS={shield:{size:56,uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKgAAACoCAQAAADeQm0/AAAK6klEQVR4Ae3BCbBVhWEA0HPveyDyBSGWzR2GuOMSo6VVo3XBoo5RxAJGDG6ALT/5T2syMdFGo0mclP4X/49bVBStSxBS9QOJURGraINRsxRRcWNxQVwG+YAs0uk4nZjKff/e9+7bnHeOhoaGhoaGhoaGOAK17XAjHWEnA/GW5R4z1wI1LFCrBppkoh191jLXu9EqNSlQm85wk21F63SWWWpQRi36mR/rppDuxtjWQ2pORq3p52GniuNwX3G/9WpKRm05wOP2Ftdg48z1rhqSUUvGmK2PJPo42x+8qGZk1IrtXOcqWUl1N04f82xWEwK14RAz7KZ4zxvjj2pARvVlXe5WfZWin3N0+i9VF6i2L7rHQdLxmDHeUlWBaurpEhfpIT2rXeEaG1VNoFoC4/3IjtL3kpzZqiRQHQe7wcHK52FTLFYFgco73jeNlMR/O9NGtztIEjNd4zEVFqik7s6Us59kOozViR6mO10yz/ipu21QMYFK2c0FztZfUt9zlT/7lqsltco013tFRQTKL2uUiY4WSKrTWB3+0gnu0lty89xglo3KLFBO3Y1wmpN9QTFedqIXfNZQcw1VjPfd714P2qBsAuUxxEH+wYmaFOtW3/ChrdvOvzlfsTrN9gvPeFUZBNKxvV3sbBe72MtehinNShPMVdgItxqkFOu96HkvWGaZ5V7TKQWBUhxtpOF2MkBP6bnLP3lf17Y31bnSs9bbVnjSXPMULVCcrPNdapC0vWKih8V3tGvtKW0rXG6aTYoQKMYBZhkibetc7mrJXeRyTdL2otP8SWKB5Ea5w7bSNsM3vak4A011hrStcab7JJSR1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kJOmaIM2QWSSaxzlNz9IM8MdnnSCSKW8dgW9UkWynO01DSpts9THvrbOWkc7yvGmmmm0SrvEgqJWRSki2SZ63wRD9b0rvaBFUNSqaA852Xo8Y5dT7ada/e5xqe8VtMtL5LUr6DVAzmB2WO5lh5qkGovM9ZYd6FXQLi+R166gV4VINSa61CUmyrLWQi9ar1yLFVoERa2KykSqd5oOJ6lXr97BtunTZ4vPLfSxNC1WaBEUtSr6V2QktVihRVDUqmi3nJHUq6BdXiLvEG/aLTayis5QFFzkALvFRlqnVkWJRf6wW87I6/WGc4z1jfm2+Y+NcqL97PO/8g+Ihe5zzyrCeQAAAABJRU5ErkJggg=="},check:{size:16,uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAQAAAD9CzEMAAABVUlEQVR4Ae3Bu20UQQAA0Lde13AF0AQSLZglQISklphxAUAdyDOSJXIyMlIaOG0CLTAShBTgI1jGd+fznu+XgPY9k8nkP9A4pdfeWXjrizut0wk+mpl55oOFv86cSpAMGivOnUZ0rXrv1p0zpxBcq6JPVjSOFyRVlK1pHCtIqii7p3GcIKmibEPjGEFSRdkDGocLkirKHtQ4VJBUUTaicZggqaJsVGvVhc+C377ZLkqqKNuitXTuqydmXip644KkirKtzqxaGNy4NCZIqih7RGvpVvHKoPPT3KYoqa5kj2qt+q7oDJ4reuuCpIqyHbTW9YrOoFP0loKkirKdtO7rFZ1Bp+gNgqSKsh21NvWKzqBT9AiSKsp21npIr+gMOsVTSRVle2iMeSPbFGV7aY2Z++XCuivZnlrj5orOUpTtrbVNr+gMouwAre16P7zApRuTyWTyz/oDUB1ZN9kNGUEAAAAASUVORK5CYII="},file:{size:16,uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAQAAAD9CzEMAAABtElEQVR4Ad3Bv2rUcAAA4K+/ZndUXARBIp3cxEkQHYq4aOmiHQTvQH0GIw30DYTK3WhdgqBu/sHdQe2mzQNY6wM4V0oI5rze7+5yZNDv889bMm7DTZecNN03W56LWjLqlOeumMcD2yKWjXrjsvlct++LiZY13fPQ/G746ZMJEk23VF54ZM9kh0Zt46ljBU2XVB7bM4u+2raeYwVNJ1S+ms1QX22g5xjBYob6agM9Y4JFDfXVBnr+EixuqK820DMiaONAZUVl6IHawG0NQRu7KpvOqWy7r7alIdHGwKoja9aMO6MhaOOVD2aUiFmXS1VKmULtjmeumkEQk0vVUrk/Dlyz4aV9UyTa27Fj1KExQUymVCtlWkjEFAoLCjoWdCzoWCJmXS4VV8oUJgpicqlpUrmIoGNBTKY0TSkTkYgpFBYUdCzoWNCxRMy6XCqulClMFMTkUtOkchFBx4KYTGmaUiYiEVMoLCjoWNCxoGNB04HKijZWVH5oCJp2VTadM6/zNlU+a0g0Da06smZNe080BE0vfbCo195qWDbqnQvOau+9u35pWDLujpsuOm0+3330yo7/zm9pA1VwIYzMRQAAAABJRU5ErkJggg=="},message:{size:20,uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAQAAACQ9RH5AAAD+UlEQVR4Ae3Bf4iW9QEA8M/7vVfIS67uamWlcZW1cE7SrD8qNK2z2hzbXJ60QtoUrP5IiiiSKJIiCIoo65/KiDIz1jbJ+WtalDXH8kedyVwL71REa8w8Uy/jrDievu/zvK/v/X76z8/HCSf8WAr65wzXmORnGtSpU2efXfbZY7s1tuuHgr76rWtdbbTutVltueX6pKAvrrHQxfpmk7k26VVBby72pBv0x3dedZ+9elTQkwYLzFXUfwc1W60HBd1rtN4IlfZYYa1W++33pQb16l3kJtNUesgC3SrozgjrNcra4Qlrfaq6er93j0ZZy9zssKoKqhvufRdI7fegZ/XuNgv8RGqrKxxSRY1qhnvPKKnHzPC+vthooVNdLjrTWEtUUaOa1S4RtbvSq47qq04r7PJLQeIiRe84To3jNbtb9JUmG/XXR9aZbqjERC22q1Cj0lCrDJM4pMm/DMRuG8wSJH7lLV8oU6PSI64XzbHCQO10wA0SQ1zmeWWCcue5T/S2VwzG014WTXClMkG5eaKj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2y5LRRtE2Qa9oDTrVpWqSZLMsGW0SbRH0itagU12pJkk2y5LRBtF6Qa9oDTpVq5ok2SxLRqtFawW9ojXoVF+rJkk2y5LRStE6Qa9oDTrVdapJks2yZLRKtEbQK1qDTvUt1STJZlkyWiE6LOgVrUGnWlJNkmyWJaODokOCXtEadKpDqkmSzbJkdEC0LOgVrUGnWqOaJNksS0aLomW/+1Vr0KnWqiZJNsui9xYES+450xp0qi0+e2rQOnPHgmDJbSdmg0611WdPDWa3RAuiJR899MgXFzr7VO/8KPviwlsLomV/+uCJT1546Sb+8sETn7zw0o3dd9f3cN9dR0dHR0dHR/97/wCCc9FG6sbg8AAAAABJRU5ErkJggg=="}};function face(f,weight){return f?typeof f=="string"?{fontFamily:f,fontWeight:weight}:{fontFamily:weight==="700"?f.bold??f.regular:weight==="500"?f.medium??f.regular:f.regular}:{fontWeight:weight}}function makeKit(options){let views=/* @__PURE__ */new Map,texts=/* @__PURE__ */new Map,types=/* @__PURE__ */new Map,type=key=>{let s=types.get(key);if(!s){let{fontWeight:fontWeight,...rest}=PHONE_TEXT[key];s={...rest,...face(PHONE_DECOR[key].font==="mono"?options.fonts?.mono:options.fonts?.sans,fontWeight)},types.set(key,s)}return s};return{options:options,v(key){let s=views.get(key);return s||(s={...PHONE_BOX[key]},views.set(key,s)),s},t(key){let s=texts.get(key);return s||(s={...PHONE_BOX[key],...type(key)},texts.set(key,s)),s},tx:type}}var DEFAULT_KIT=makeKit({}),KitContext=react.createContext(DEFAULT_KIT);function ShopKitProvider({fonts:fonts,renderIcon:renderIcon,children:children}){let kit=react.useMemo(()=>makeKit({...fonts?{fonts:fonts}:{},...renderIcon?{renderIcon:renderIcon}:{}}),[fonts,renderIcon]);return react.createElement(KitContext.Provider,{value:kit},children)}function useKit(){return react.useContext(KitContext)}function inkOf(key){return PHONE_TEXT[key].color??"#000000"}function Decor({k:k}){let d=PHONE_DECOR[k],radius=PHONE_BOX[k].borderRadius??0,out=[];if(d.ring){let ring=reactNative.Platform.OS==="web"?{boxShadow:`inset 0 0 0 ${d.ring.width}px ${d.ring.color}`}:{borderWidth:d.ring.width,borderColor:d.ring.color};out.push(react.createElement(reactNative.View,{key:"ring",pointerEvents:"none",style:[{position:"absolute",top:0,right:0,bottom:0,left:0,borderRadius:radius},ring]}))}return d.insetBottom&&out.push(react.createElement(reactNative.View,{key:"bar",pointerEvents:"none",style:{position:"absolute",right:0,bottom:0,left:0,height:d.insetBottom.width,backgroundColor:d.insetBottom.color}})),d.lineTop&&out.push(react.createElement(reactNative.View,{key:"top",pointerEvents:"none",style:{position:"absolute",right:0,top:-d.lineTop.width,left:0,height:d.lineTop.width,backgroundColor:d.lineTop.color}})),d.lineBottom&&out.push(react.createElement(reactNative.View,{key:"bottom",pointerEvents:"none",style:{position:"absolute",right:0,bottom:-d.lineBottom.width,left:0,height:d.lineBottom.width,backgroundColor:d.lineBottom.color}})),out.length?out:null}function dropShadow(k){let d=PHONE_DECOR[k].drop;return d?reactNative.Platform.OS==="web"?{boxShadow:`${d.x}px ${d.y}px ${d.blur}px ${d.spread}px ${d.color}`}:{shadowColor:d.color,shadowOpacity:1,shadowRadius:d.blur/2,shadowOffset:{width:d.x,height:d.y}}:null}function Icon({name:name,size:size,color:color,style:style}){let own=useKit().options.renderIcon?.({name:name,size:size,color:color});if(own!=null)return react.createElement(reactNative.View,{style:[{width:size,height:size},style],pointerEvents:"none"},own);let img=[{width:size,height:size,tintColor:color},style];return react.createElement(reactNative.Image,{source:{uri:PHONE_ICONS[name].uri},style:img,accessible:false,importantForAccessibility:"no",resizeMode:"contain"})}function PartIcon({name:name,k:k,inkKey:inkKey,style:style}){let box=PHONE_BOX[k];return react.createElement(Icon,{name:name,size:box.width??24,color:inkOf(inkKey??k),style:[box.marginTop?{marginTop:box.marginTop}:null,style]})}function T({k:k,style:style,children:children,lines:lines,role:role,bare:bare}){let kit=useKit();return react.createElement(reactNative.Text,{style:[bare?kit.tx(k):kit.t(k),wrapStyle(k),style],...wrapOf(k),...lines?{numberOfLines:lines}:{},...role?{accessibilityRole:role}:{}},children)}function wrapOf(k){return PHONE_DECOR[k].wrap?reactNative.Platform.OS==="web"?{}:reactNative.Platform.OS==="ios"?{lineBreakStrategyIOS:"standard"}:{textBreakStrategy:"balanced"}:{}}function wrapStyle(k){let w=PHONE_DECOR[k].wrap;return w&&reactNative.Platform.OS==="web"?{textWrap:w}:null}function underline(k){let off=PHONE_DECOR[k].underlineOffset;return off?{textUnderlineOffset:off}:{}}function Press({onPress:onPress,disabled:disabled,label:label,style:style,children:children,role:role="button",selected:selected}){return react.createElement(reactNative.Pressable,{onPress:disabled?void 0:onPress,disabled:disabled===true,accessibilityRole:role,...label?{accessibilityLabel:label}:{},accessibilityState:{disabled:disabled===true,...selected!==void 0?{selected:selected,checked:selected}:{}},style:style},children)}function phoneLabel(label){return label.replace(/\s*→$/,"")}var TAB_ROUTE={package:{name:"package"},shop:{name:"shop"},orders:{name:"orders"},plan:{name:"plan"}};function tabLabel(copy,tab){return tab==="package"?copy.tabPackage:tab==="shop"?copy.tabShop:tab==="orders"?copy.tabOrders:copy.tabPlan}function CareTabs({copy:copy,current:current,tabs:tabs}){let kit=useKit(),nav=useShopNativeNav();/* @__PURE__ */
3
+ return Object.freeze({ok:false,error:/* @__PURE__ */Object.freeze(error)})}function isOmsRefusal(error,reasonCode){return error.kind==="refused"&&(reasonCode===void 0||error.reasonCode===reasonCode)}function isOmsUnavailable(error){return error.kind==="unavailable"}function isOmsRetryable(error){return error.kind==="network"||error.kind==="timeout"||error.kind==="serviceUnavailable"||error.kind==="refused"&&error.reasonCode==="order_state_conflict"}var REASON=/^[a-z][a-z0-9_]{0,63}$/,MAX_MESSAGE=300;function cleanMessage(raw){if(typeof raw!="string")return null;let text=raw.replace(/[\u0000-\u001f\u007f]+/g," ").trim();return text.length===0||text.length>MAX_MESSAGE?null:text}function retryAfter(header){if(!header)return null;let seconds=Number(header);return Number.isFinite(seconds)&&seconds>=0?Math.min(Math.round(seconds),3600):null}function omsErrorFromStatus(status,body,headers){let requestId=headers.requestId,rid=requestId?{requestId:requestId}:{};if(status===404)return{kind:"unavailable",...rid};if(status===401)return{kind:"signedOut"};if(status===402||status===409||status===422){let envelope=body&&typeof body=="object"?body:{},reason=typeof envelope.reason_code=="string"&&REASON.test(envelope.reason_code)?envelope.reason_code:null;return{kind:"refused",status:status,reasonCode:reason,message:cleanMessage(envelope.message),...rid}}return status===400?{kind:"invalidRequest",...rid}:status===429?{kind:"rateLimited",retryAfterSeconds:retryAfter(headers.retryAfter??null),...rid}:status===503?{kind:"serviceUnavailable",...rid}:status===403?{kind:"unavailable",...rid}:{kind:"serverError",status:status,...rid}}function newIdempotencyKey(){let c=globalThis.crypto;if(c&&typeof c.randomUUID=="function")return c.randomUUID();if(c&&typeof c.getRandomValues=="function"){let b=c.getRandomValues(new Uint8Array(16));b[6]=b[6]&15|64,b[8]=b[8]&63|128;let h=Array.from(b,x=>x.toString(16).padStart(2,"0")).join("");return`${h.slice(0,8)}-${h.slice(8,12)}-${h.slice(12,16)}-${h.slice(16,20)}-${h.slice(20)}`}throw new EverfurConfigError("missing-peer-dependency","No secure random source: cannot make an idempotency key")}var MAX_ROUNDS=3,NAME_REQUIRED_REASONS=["client_name_missing"];function isNameRequired(error){return!!error&&error.kind==="refused"&&!!error.reasonCode&&NAME_REQUIRED_REASONS.includes(error.reasonCode)}var ShopActionKeys=class{constructor(make=newIdempotencyKey){this.make=make;this.keys=/* @__PURE__ */new Map}key(step){let k=this.keys.get(step);return k||(k=this.make(),this.keys.set(step,k)),k}next(step){let k=this.make();return this.keys.set(step,k),k}};async function confirmWithPayerActions(confirm,keys,payments,options={reconfirm:true}){let key=keys.key("confirm"),orderIds=[];for(let round=0;round<MAX_ROUNDS;round+=1){let res=await confirm(key);if(!res.ok)return{kind:"failed",error:res.error};orderIds=res.value.resale.map(r=>r.orderId);let pending=res.value.resale.filter(r=>r.outcome==="action_required"&&r.payerAction);if(pending.length===0)return{kind:"confirmed",orderIds:orderIds};if(!payments)return{kind:"needsPayerAction",orderIds:orderIds};for(let entry of pending){let stepResult=await payments.handleNextAction(entry.payerAction,{orderId:entry.orderId});if(!stepResult.ok)return stepResult.closed?{kind:"payerActionClosed",orderIds:orderIds}:{kind:"payerActionFailed",orderIds:orderIds,message:stepResult.message}}if(!options.reconfirm)return{kind:"confirmed",orderIds:orderIds};key=keys.next("confirm")}return{kind:"needsPayerAction",orderIds:orderIds}}var UNAVAILABLE_PACKAGE_SOURCE=/* @__PURE__ */Object.freeze({load:()=>Promise.resolve(omsErr({kind:"unavailable"})),removeLine:()=>Promise.resolve(omsErr({kind:"unavailable"})),skip:()=>Promise.resolve(omsErr({kind:"unavailable"})),approve:()=>Promise.resolve({kind:"failed",error:{kind:"unavailable"}})});async function offersFor(client,ids){let unique=[...new Set(ids)],read=await Promise.all(unique.map(id=>client.offer(id)));return new Map(unique.map((id,i)=>[id,read[i].ok?read[i].value:null]))}function createOmsPackageSource(client){async function build(plan,review){let offers=await offersFor(client,review.lines.map(l=>l.offerId)),lines=review.lines.map(l=>({...l,offer:offers.get(l.offerId)??null})),draft=null;if(review.state==="open"&&lines.length>0){let d=await client.draftCycle(plan.planId,review.cycle);if(d.ok)draft=d.value;else if(d.error.kind!=="refused")return omsErr(d.error)}return omsOk({plan:plan,review:review,lines:lines,draft:draft})}return{async load(){let plans=await client.plans();if(!plans.ok)return omsErr(plans.error);let plan=plans.value.plans.find(p=>p.state==="active")??plans.value.plans.find(p=>p.state!=="cancelled");if(!plan)return omsOk(null);let review=await client.cycleReview(plan.planId);return review.ok?build(plan,review.value):omsErr(review.error)},async removeLine(pkg,index,keys){let rest=pkg.lines.filter((_,i)=>i!==index).map(l=>({offerId:l.offerId,quantity:l.quantity,...l.petId?{petId:l.petId}:{}})),edited=await client.editCycle(pkg.plan.planId,pkg.review.cycle,{idempotencyKey:keys.key(`remove:${index}`),lines:rest});return edited.ok?build(pkg.plan,edited.value):omsErr(edited.error)},async skip(pkg,keys){let res=await client.skipCycle(pkg.plan.planId,pkg.review.cycle,{idempotencyKey:keys.key("skip")});return res.ok?omsOk(void 0):omsErr(res.error)},approve(pkg,keys,payments){let draft=pkg.draft;return draft?confirmWithPayerActions(idempotencyKey=>client.approveCycle(pkg.plan.planId,pkg.review.cycle,{idempotencyKey:idempotencyKey,checkoutId:draft.checkoutId,expectedTotal:draft.total}),keys,payments,{reconfirm:false}):Promise.resolve({kind:"failed",error:{kind:"invalidRequest"}})}}}function placeholder(key){return`[copy:shop.${key}]`}var MONTHS=["January","February","March","April","May","June","July","August","September","October","November","December"];function possessive(name){return`${name}’s`}function listNames(names){return names.length<=1?names[0]??"":`${names.slice(0,-1).join(", ")} and ${names[names.length-1]}`}function asDate(iso){if(!iso)return null;let d=new Date(/^\d{4}-\d{2}-\d{2}$/.test(iso)?`${iso}T00:00:00Z`:iso);return Number.isNaN(d.getTime())?null:d}function formatDay(iso,opts={}){let d=asDate(iso);if(!d)return null;if(opts.when&&d.getUTCFullYear()!==(opts.now??/* @__PURE__ */new Date).getUTCFullYear())return d.toLocaleDateString("en-US",{timeZone:"UTC",month:"short",day:"numeric",year:"numeric"});let weekday=opts.weekday===true||opts.when===true;return d.toLocaleDateString("en-US",{timeZone:"UTC",...weekday?{weekday:"short"}:{},month:"short",day:"numeric"})}function monthOf(iso){let d=asDate(iso);return d?MONTHS[d.getUTCMonth()]:null}function formatCents(cents){let sign=cents<0?"-":"",abs=Math.abs(Math.round(cents));return`${sign}$${Math.floor(abs/100).toLocaleString("en-US")}.${String(abs%100).padStart(2,"0")}`}function cardLabel(brand,last4){return`${brand?brand.charAt(0).toUpperCase()+brand.slice(1):""} ending ${last4}`}var PHARMACY_REFUSAL="We can’t send this prescription to the pharmacy yet. Contact us.",PHARMACY_REFUSALS=["prescription_missing","prescription_reference_missing","prescription_unreadable","prescriptions_disagree","first_fill_mixed_with_refill","duplicate_prescription_line","prescription_in_flight","client_email_missing","client_phone_missing","client_phone_not_us","practice_email_missing","practice_phone_missing","practice_phone_not_us","patient_birth_date_missing","patient_weight_missing","weight_below_partner_unit","species_not_supported","sex_not_supported","refills_over_partner_limit","indications_missing","indication_not_mapped","compounding_missing","compounding_reason_not_mapped","compounding_unexplained","delivery_speed_unavailable","address_missing","address_not_deliverable"],SHOP_COPY={tabsLabel:"Care",tabPackage:"Package",tabShop:"Shop",tabOrders:"Orders",tabPlan:"Plan",legal:"Prescription items need a valid prescription from a licensed vet, and are filled by a licensed partner pharmacy.",legalTracking:"Prescription items are filled by a licensed partner pharmacy.",loadFailed:thing=>`We couldn’t load ${thing}. Check your connection and try again.`,tryAgain:"Try again",actionFailed:"That didn’t go through. Try again.",saving:"Saving…",keepIt:"Keep it",close:"Close",thingPackage:placeholder("thing.package"),thingShop:placeholder("thing.shop"),thingProduct:placeholder("thing.product"),thingPlan:placeholder("thing.plan"),thingOrders:"your orders",thingOrder:"this order",packageTitle:month=>`${month} package`,packageSub:(names,reviewBy,arrives)=>{let s=[];return names.length>0&&s.push(`For ${listNames(names)}.`),reviewBy&&arrives&&s.push(`Approve by ${reviewBy} and it arrives ${arrives}.`),s.length?s.join(" "):null},inThisPackage:"In this package",reviewBy:day=>`Review by ${day}`,forPet:name=>`For ${name}`,details:"Details",remove:"Remove",removed:"Removed.",total:"Total",items:"Items",shipping:"Shipping",tax:"Tax",free:"Free",approveAndShip:"Approve and ship",itemCount:n=>n===1?placeholder("package.item_count_one"):`${n} items`,withTotal:(label,total)=>`${label} · ${total}`,approveRegion:"Approve",packageDetailsRegion:"Package details",deliveryPaymentRegion:"Delivery and payment",questionsRegion:"Questions",approving:"Approving…",skipThisMonth:"Skip this month",chargedWhenShips:card=>`Charged to ${card} when it ships.`,rxCheckedFirst:"Prescriptions are checked with the vet who wrote them first.",delivery:"Delivery",arrives:day=>`Arrives ${day}`,change:"Change",outOfStock:"Out of stock",packageOutOfStock:"Out of stock right now, so it won’t ship this month.",packageEmpty:month=>`Nothing in ${possessive(month)} package yet. Add something from the shop, or skip this month.`,itemNoLongerSold:placeholder("package.item_no_longer_sold"),reviewClosed:placeholder("package.review_closed"),approvalInProgress:placeholder("package.approval_in_progress"),priceChanged:placeholder("package.price_changed"),cardStepFailed:placeholder("package.card_step_failed"),cardStepClosed:placeholder("package.card_step_closed"),noCardOnFile:placeholder("package.no_card_on_file"),shopTitle:"Shop",searchLabel:"Search the shop",searchPlaceholder:"Search the shop…",filtersLabel:"Filter",filterAll:"All",refillSoon:"Refill soon",inMonthsPackage:month=>`In ${possessive(month)} package →`,forPets:names=>`For ${listNames(names)}`,allProducts:placeholder("shop.all_products_title"),rx:"Rx",hasPrescription:name=>`${name} has a prescription`,needsPrescription:"Needs a prescription",noMatches:q=>`Nothing in the shop matches ‘${q}’.`,nothingHereYet:"Nothing here yet.",photoToCome:"Photo to come",backToShop:"Shop",howOften:"How often",everyMonthIn:name=>`Every month, in ${possessive(name)} package`,skipOrStop:"Skip or stop any month",justOnce:"Just once",shipsWith:month=>`Ships with ${possessive(month)} package`,justOnceShipsNow:placeholder("product.just_once_meta"),oneFewer:"One fewer",oneMore:"One more",quantity:"Quantity",addToPackage:month=>`Add to ${possessive(month)} package`,refillInPackage:month=>`Refill in ${possessive(month)} package`,buyNow:placeholder("product.buy_now"),startPlan:placeholder("product.start_plan"),adding:"Adding…",outOfStockNow:"Out of stock right now.",prescription:"Prescription",noPrescriptionFor:name=>`No prescription for ${name} on file.`,bookVideoVisit:"Book a video visit",refillsLeft:n=>`${n} ${n===1?"refill":"refills"} left`,rxBeingPrepared:"This prescription is being prepared. You can order it soon.",rxTooSoon:placeholder("rx.too_soon"),rxRenew:placeholder("rx.needs_renewal"),rxPick:placeholder("rx.pick_pet"),educational:"Educational, not a diagnosis.",planTitle:"Your plan",whatRepeats:"What repeats",repeatsLabel:title=>`${title} repeats`,cadenceMonths:months=>months===1?"Every month":`Every ${months} months`,cadenceDays:placeholder("plan.cadence_days"),repeatsEmpty:"Nothing repeats yet. Pick Every month when you add something, and it shows up here.",nextPackage:"Next package",reviewByLabel:"Review by",ships:"Ships",reviewMonthsPackage:month=>`Review ${possessive(month)} package →`,deliveryAndPayment:"Delivery and payment",shipTo:"Ship to",payWith:"Pay with",needABreak:"Need a break?",skipMonth:month=>`Skip ${month}`,skipMonthAsk:month=>`Skip ${month}?`,skipMonthBody:"Nothing ships this month.",pausePlan:"Pause the plan",pausePlanAsk:"Pause the plan?",pausePlanBody:"Nothing ships until you turn it back on.",declined:month=>month?`Declined. Update your card so ${possessive(month)} package can ship.`:"Declined.",resumePlan:placeholder("plan.resume"),stopReason:reason=>placeholder(`plan.stop_reason.${reason}`),consentTitle:placeholder("plan.consent_title"),consentBody:placeholder("plan.consent_body"),consentTermsLink:placeholder("plan.consent_terms_link"),consentAgree:placeholder("plan.consent_agree"),ordersTitle:"Orders",ordersSub:names=>`Packages and one-off orders for ${listNames(names)}.`,allOrders:"All orders",placed:day=>`Placed ${day}`,ordersEmpty:"No orders yet. Your first package shows up here once you approve it.",paymentFailed:"Payment failed",backToCare:"Care",onItsWay:title=>`${title}, on its way`,shouldArrive:day=>`It should arrive ${day}.`,whereItStands:"Where it stands",stepApproved:"Approved",stepChecking:"Checking prescriptions…",stepFilled:"Filled by the pharmacy",stepShipped:"Shipped",stepDelivered:"Delivered",now:"Now",expected:day=>`Expected ${day}.`,inTheBox:"In the box",payment:"Payment",cancelOrder:placeholder("order.cancel"),payOrder:placeholder("order.pay"),trackPackage:placeholder("order.track"),orderStatus:{pending_placement:"Confirmed, sending to the pharmacy",placement_unknown:"Confirmed",placed:"With the pharmacy, in review",accepted:"Approved by the pharmacist",release_sent:"Approved, being prepared",release_unknown:"Approved, being prepared",released:"Being prepared",shipped:"Shipped",delivered:"Delivered",needs_support:"We’re looking into this order",rejected:placeholder("order.status.rejected"),cancelled:"Cancelled",pending_handoff:placeholder("order.status.pending_handoff")},addressTitle:placeholder("address.title"),addressLabel:placeholder("address.label"),addressRecipient:placeholder("address.recipient_name"),addressLine1:placeholder("address.line1"),addressLine2:placeholder("address.line2"),addressCity:placeholder("address.city"),addressRegion:placeholder("address.region"),addressPostal:placeholder("address.postal_code"),addressSave:placeholder("address.save"),addressNeeded:placeholder("address.needed"),cardTitle:placeholder("card.title"),cardBody:placeholder("card.body"),cardStart:placeholder("card.start"),cardUnavailable:placeholder("card.unavailable"),confirmTitle:placeholder("buy.confirm_title"),confirmPay:placeholder("buy.confirm_pay"),nameMissing:placeholder("checkout.name_missing"),addName:placeholder("checkout.add_name"),firstName:placeholder("checkout.first_name"),lastName:placeholder("checkout.last_name"),saveName:placeholder("checkout.save_name"),refusal:{operation_not_supported:"This action isn’t available for this order.",order_not_sellable:"We can’t ship this order as it is. Add items or contact us.",rx_being_prepared:"This prescription is being prepared. You can order it soon.",rx_not_dispensable:PHARMACY_REFUSAL,...Object.fromEntries(PHARMACY_REFUSALS.map(code=>[code,PHARMACY_REFUSAL])),order_state_conflict:"This order changed. Refresh and try again.",payment_method_in_use:"A subscription or an order uses this card."},rateLimited:placeholder("error.rate_limited")},SHOP_COPY_PLACEHOLDERS=(()=>{let keys=/* @__PURE__ */new Set,visit=v=>{if(typeof v=="string"){let m=/^\[copy:(shop\.[a-z0-9_.]+)\]$/.exec(v);m&&keys.add(m[1])}else if(typeof v=="function")try{visit(v("x","x","x"))}catch{}else if(v&&typeof v=="object")for(let inner of Object.values(v))visit(inner)};return visit(SHOP_COPY),[...keys].sort()})();function shopCopy(overrides){return overrides?{...SHOP_COPY,...overrides}:SHOP_COPY}function refusalLine(copy,error){if(error.kind==="rateLimited")return copy.rateLimited;if(error.kind==="refused"){if(isNameRequired(error))return copy.nameMissing;let own=error.reasonCode?copy.refusal[error.reasonCode]:void 0;if(own)return own;if(error.message)return error.message}return copy.actionFailed}var SHOP_V3_COPY={cartTitle:"Cart",cartLabel:n=>n>0?`Cart, ${n} item${n>1?"s":""}`:"Cart, empty",cartEmptyTitle:"Your cart is empty",cartEmptyBody:null,addToCart:"Add to cart",viewCart:"View cart",addedToCart:name=>`${name} is in your cart.`,removedFromCart:name=>`${name} is out of your cart.`,quantityLabel:name=>`How many: ${name}`,fewer:"One fewer",more:"One more",remove:"Remove",subtotal:"Subtotal",shipping:"Shipping",tax:"Tax",free:"Free",total:"Total",checkoutCart:total=>`Checkout · ${total}`,checkoutKicker:"Checkout",itemQuantity:n=>`Qty ${n}`,shipsTo:"Ships to",payWith:"Pay with",placeOrder:total=>`Place order · ${total}`,chooseAddress:placeholder("checkout.choose_address"),chooseCard:placeholder("checkout.choose_card"),addAddress:placeholder("checkout.add_address"),addCard:placeholder("card.start"),makeDefault:placeholder("address.make_default"),editAddress:placeholder("address.edit"),noAddressYet:placeholder("address.needed"),noCardYet:placeholder("package.no_card_on_file"),placedHeader:"Order placed",placedTitle:"Order placed.",placedSteps:"What's coming",placedShips:"It ships.",placedArrives:"It arrives at home.",viewOrder:"View order",ordersTitle:"Orders",ordersEmptyTitle:"No orders yet",ordersEmptyBody:null,moreOrders:placeholder("orders.more"),subscriptionBox:"Subscription box",orderTitle:n=>n===null?"Order":`Order ${n}`,arrivesBy:day=>`Arrives by ${day}`,deliveredOn:day=>`Delivered ${day}`,expected:day=>`Expected ${day}`,orderSteps:["Ordered","Shipped","Out for delivery","Delivered"],tracking:"Tracking",trackOn:carrier=>`Track on ${carrier}`,inThisOrder:"In this order",orderItemLine:n=>`Qty ${n}`,buyAgain:"Buy again",orderHelp:"Get help with this order",paidWith:"Paid with",refund:placeholder("order.refund"),discount:placeholder("order.discount"),cancelAsk:placeholder("order.cancel_ask"),cancelBody:null,cancelRequested:placeholder("order.cancel_requested"),close:"Close",manageKicker:"Your subscription",manageTitle:name=>`Manage ${name}`,manage:"Manage",shipsEvery:"Ships every",daysChip:n=>`${n} days`,skipNext:"Skip the next box",cancelSubscription:"Cancel subscription",nextBox:day=>`Next box ${day}`,everyDays:n=>`Every ${n} days`,subscribedLine:(n,next)=>next===null?`Every ${n} days`:`Every ${n} days · next box ${next}`,skipped:"Skipped.",cancelSubscriptionAsk:placeholder("plan.cancel_ask"),cancelSubscriptionBody:placeholder("plan.cancel_body")},SHOP_V3_COPY_PLACEHOLDERS=Object.values(SHOP_V3_COPY).filter(v=>typeof v=="string"&&v.startsWith("[copy:"));function shopV3Copy(overrides){if(!overrides)return SHOP_V3_COPY;let own={};for(let[k,v]of Object.entries(overrides))k in SHOP_V3_COPY&&v!==void 0&&(own[k]=v);return{...SHOP_V3_COPY,...own}}var ShopContext=react.createContext(null);function ShopProvider(props){let{client:client,pets:pets,payments:payments,packageSource:packageSource,copy:copy,v3Copy:v3Copy,saveProfileName:saveProfileName,onProfileNameRequired:onProfileNameRequired,children:children}=props,saveName=react.useRef(saveProfileName);saveName.current=saveProfileName;let editName=react.useRef(onProfileNameRequired);editName.current=onProfileNameRequired;let canSave=!!saveProfileName,canEdit=!!onProfileNameRequired,value=react.useMemo(()=>{let list=pets??[],names=new Map(list.map(p=>[p.petId,p.name]));return{client:client,pets:list,petName:id=>id?names.get(id)??null:null,payments:payments??null,packageSource:packageSource??createOmsPackageSource(client),copy:shopCopy(copy),v3:shopV3Copy(v3Copy),saveProfileName:canSave?name=>saveName.current?saveName.current(name):Promise.resolve(false):null,onProfileNameRequired:canEdit?()=>editName.current?.():null}},[client,pets,payments,packageSource,copy,v3Copy,canSave,canEdit]);return react.createElement(ShopContext.Provider,{value:value},children)}function useShop(){let ctx=react.useContext(ShopContext);if(!ctx)throw new EverfurConfigError("not-initialized","useShop: wrap the shop in <ShopProvider>");return ctx}function useShopRead(key,read){let[state,setState]=react.useState({key:null,phase:"loading",value:null,error:null}),epoch=react.useRef(0),readRef=react.useRef(read);readRef.current=read;let load=react.useCallback(quiet=>{let mine=++epoch.current;key!==null&&(quiet||setState({key:key,phase:"loading",value:null,error:null}),readRef.current().then(res=>{mine===epoch.current&&(res.ok?setState({key:key,phase:"ready",value:res.value,error:null}):setState({key:key,phase:res.error.kind==="unavailable"?"unavailable":"failed",value:null,error:res.error}))}))},[key]);react.useEffect(()=>(load(false),()=>{epoch.current+=1}),[load]);let refresh=react.useCallback(()=>load(false),[load]);return state.key!==key?{phase:"loading",value:null,error:null,refresh:refresh}:{phase:state.phase,value:state.value,error:state.error,refresh:refresh}}function useShopConfig(){let{client:client}=useShop();return useShopRead("shop-config",()=>client.shopConfig())}function useOffers(query={}){let{client:client}=useShop(),text=query.text?.trim()??"",key=`offers:${text}:${query.requiresRx??""}`;return useShopRead(key,()=>client.offers({...text?{text:text}:{},...query.requiresRx!==void 0?{requiresRx:query.requiresRx}:{},limit:100}))}function useOffer(offerId){let{client:client}=useShop();return useShopRead(offerId?`offer:${offerId}`:null,()=>client.offer(offerId))}function usePrescriptions(){let{client:client}=useShop();return useShopRead("prescriptions",()=>client.prescriptions())}function useAddresses(){let{client:client}=useShop();return useShopRead("addresses",()=>client.addresses())}function useAddress(ref){let{client:client}=useShop();return useShopRead(ref?`address:${ref}`:null,()=>client.address(ref))}function usePaymentMethods(){let{client:client}=useShop();return useShopRead("payment-methods",()=>client.paymentMethods())}function useOrder(orderId){let{client:client}=useShop();return useShopRead(orderId?`order:${orderId}`:null,()=>client.order(orderId))}function usePlans(){let{client:client}=useShop();return useShopRead("plans",()=>client.plans({limit:100}))}function usePackage(){let{packageSource:packageSource}=useShop();return useShopRead("package",()=>packageSource.load())}function useShopAction(act){let[busy,setBusy]=react.useState(false),[error,setError]=react.useState(null),keys=react.useRef(null),running=react.useRef(false),actRef=react.useRef(act);actRef.current=act;let mounted=react.useRef(true);react.useEffect(()=>(mounted.current=true,()=>{mounted.current=false}),[]);let run=react.useCallback(async(...args)=>{if(running.current)return null;running.current=true,keys.current??=new ShopActionKeys,setBusy(true),setError(null);try{let res=await actRef.current(keys.current,...args);return res.ok?keys.current=null:isRetryWithSameKey(res.error)||(keys.current=null),mounted.current&&setError(res.ok?null:res.error),res}finally{running.current=false,mounted.current&&setBusy(false)}},[]),reset=react.useCallback(()=>{keys.current=null,setError(null)},[]);return{busy:busy,error:error,run:run,reset:reset}}function isRetryWithSameKey(error){return error.kind==="network"||error.kind==="timeout"||error.kind==="serviceUnavailable"||error.kind==="serverError"}function distinct(xs){let out=[];for(let x of xs)x!==null&&!out.includes(x)&&out.push(x);return out}function tileFor(rx){return rx?{tone:"pink",icon:"pill"}:{tone:"yellow",icon:"leaf"}}function addressLine(a){return`${a.line2?`${a.line1}, ${a.line2}`:a.line1}, ${a.city}, ${a.region?`${a.region} `:""}${a.postalCode}`}function rxPill(copy){return{label:copy.rx,tone:"rx"}}function refillsLeft(rx){return rx.fillsTotal!==null&&rx.fillsUsed!==null?Math.max(0,rx.fillsTotal-Math.max(rx.fillsUsed,1)):null}function toPackageView(i){let{pkg:pkg,copy:copy,petName:petName}=i,review=pkg.review,month=monthOf(review.shipsOn),names=distinct(pkg.lines.map(l=>petName(l.petId))),open=review.state==="open",priced=new Map(review.quoteLines.map(q=>[`${q.offerId}:${q.petId??""}`,q])),items=pkg.lines.map((line,index)=>{let offer=line.offer,q=priced.get(`${line.offerId}:${line.petId??""}`),rx=offer?.requiresRx??false,pills=[];return offer||pills.push({label:copy.outOfStock,tone:"later"}),{petId:line.petId,view:{key:`${line.offerId}:${line.petId??""}:${index}`,name:offer?.title??copy.itemNoLongerSold,rx:rx,meta:null,alert:offer?null:copy.packageOutOfStock,pills:pills,price:q&&offer?formatCents(q.unitPrice*q.quantity-q.discount):null,...tileFor(rx),details:offer?{label:copy.details,to:{name:"product",offerId:offer.offerId,...line.petId?{petId:line.petId}:{}}}:null,remove:open?{label:copy.remove,busy:i.removing===index,disabled:i.removing!==null,onPress:()=>i.onRemove(index)}:null}}}),groups=[];for(let it of items){let name=petName(it.petId),label=name?copy.forPet(name):null,existing=groups.find(g=>g.label===label);existing?existing.items.push(it.view):groups.push({label:label,items:[it.view]})}let sum=[],d=pkg.draft;d?(sum.push({k:copy.items,v:formatCents(d.total-d.shipping-d.tax)}),sum.push({k:copy.shipping,v:d.shipping===0?copy.free:formatCents(d.shipping)}),sum.push({k:copy.tax,v:formatCents(d.tax)}),sum.push({k:copy.total,v:formatCents(d.total)})):review.quoteLines.length>0&&sum.push({k:copy.items,v:formatCents(review.quoteLines.reduce((n,q)=>n+q.unitPrice*q.quantity-q.discount,0))});let card=i.card?cardLabel(i.card.brand,i.card.last4):null,anyRx=pkg.lines.some(l=>l.offer?.requiresRx),note=card?[copy.chargedWhenShips(card),anyRx?copy.rxCheckedFirst:null].filter(Boolean).join(" "):null,error=i.error;!error&&review.state==="approving"?error=copy.approvalInProgress:!error&&review.state!=="open"&&review.state!==null?error=copy.reviewClosed:!error&&open&&!i.card&&(error=copy.noCardOnFile);let approve=open&&d&&i.card?{label:copy.approveAndShip,busyLabel:copy.approving,busy:i.approving,disabled:i.approving||i.placed===true||i.removing!==null,onPress:i.onApprove}:null;return{title:month?copy.packageTitle(month):copy.tabPackage,sub:copy.packageSub(names,formatDay(review.approveBy,{weekday:true}),null),reviewPill:review.approveBy&&open?copy.reviewBy(formatDay(review.approveBy)):null,countPill:pkg.lines.length>0?copy.itemCount(pkg.lines.length):null,fine:null,groups:pkg.lines.length>0?groups:[],empty:pkg.lines.length===0?{line:month?copy.packageEmpty(month):copy.nothingHereYet,shop:{label:copy.tabShop,to:{name:"shop"}},skip:null}:null,add:null,sum:sum,approve:approve,skip:open?{label:copy.skipThisMonth,to:{name:"plan"}}:null,note:note,error:error,delivery:i.address?[{k:copy.shipTo,v:addressLine(i.address),change:{label:copy.change,to:{name:"address",then:{name:"package"}}}}]:[],legal:copy.legal}}function readyRxFor(offerId,prescriptions){return prescriptions.filter(p=>p.status==="ready"&&p.offerId===offerId)}function toTile(offer,prescriptions,copy,petName,forPetId=null){let pills=[],meta=null,petId=forPetId;if(offer.requiresRx){pills.push(rxPill(copy));let holder=readyRxFor(offer.offerId,prescriptions).find(p=>petName(p.petId));petId=holder?.petId??forPetId,meta=holder?copy.hasPrescription(petName(holder.petId)):copy.needsPrescription}return{key:offer.offerId,to:{name:"product",offerId:offer.offerId,...petId?{petId:petId}:{}},name:offer.title,meta:meta,price:offer.price!==null?formatCents(offer.price):null,pills:pills,...tileFor(offer.requiresRx)}}function toShelves(i){let{copy:copy}=i,shelves=[],refill=i.searching?[]:i.offers.filter(o=>o.requiresRx&&readyRxFor(o.offerId,i.prescriptions).some(p=>i.petName(p.petId)));return refill.length>0&&shelves.push({key:"refill",title:copy.refillSoon,link:i.packageMonth?{label:copy.inMonthsPackage(i.packageMonth),to:{name:"package"}}:null,tiles:refill.map(o=>toTile(o,i.prescriptions,copy,i.petName,i.petId??null))}),shelves.push({key:"all",title:i.petNames.length>0?copy.forPets(i.petNames):copy.allProducts,link:null,tiles:i.offers.map(o=>toTile(o,i.prescriptions,copy,i.petName,i.petId??null))}),shelves}function toProductView(i){let{copy:copy,offer:offer}=i,monthly=i.plansOn&&i.petName!==null,choice=monthly?i.choice:"once",submitLabel=choice==="monthly"?i.packageMonth?copy.addToPackage(i.packageMonth):copy.startPlan:copy.buyNow,sellable=offer.price!==null;return{back:{label:copy.backToShop,to:{name:"shop"}},title:offer.title,sub:null,price:sellable?formatCents(offer.price):null,priceUnit:null,...tileFor(false),source:null,stockLine:sellable?null:copy.outOfStockNow,choices:monthly?[{value:"monthly",title:copy.everyMonthIn(i.petName),meta:copy.skipOrStop},{value:"once",title:copy.justOnce,meta:copy.justOnceShipsNow}]:null,choice:monthly?choice:null,onChoice:v=>i.onChoice(v==="once"?"once":"monthly"),quantity:i.quantity,onQuantity:n=>i.onQuantity(Math.min(99,Math.max(1,n))),submit:sellable?{label:submitLabel,busyLabel:copy.adding,busy:i.busy,disabled:i.busy,onPress:i.onSubmit}:{label:copy.outOfStock,disabled:true,onPress:()=>{}},error:i.error,facts:null,cards:[],aside:null,legal:copy.legal}}function toRxProductView(i){let{copy:copy,offer:offer}=i,ready=readyRxFor(offer.offerId,i.prescriptions).filter(p=>i.petName(p.petId)),rx=(i.petId?ready.find(p=>p.petId===i.petId):void 0)??ready[0]??null,sellable=offer.price!==null,script=null,submit=null;if(rx){let left=refillsLeft(rx);script={name:copy.hasPrescription(i.petName(rx.petId)),meta:left!==null&&left>0?copy.refillsLeft(left):null,directions:null},submit=sellable?{label:i.packageMonth?copy.refillInPackage(i.packageMonth):copy.buyNow,busyLabel:copy.adding,busy:i.busy,disabled:i.busy,onPress:()=>i.onSubmit(rx)}:{label:copy.outOfStock,disabled:true,onPress:()=>{}}}else{let who=(i.petId?i.petName(i.petId):null)??i.firstPetName;script=who?{name:copy.noPrescriptionFor(who),meta:null,directions:null}:null,submit=i.bookVisitHref?{label:copy.bookVideoVisit,href:i.bookVisitHref}:null}return{back:{label:copy.backToShop,to:{name:"shop"}},stepLabel:copy.prescription,title:offer.title,sub:null,price:sellable?formatCents(offer.price):null,priceUnit:null,...tileFor(true),script:script,stockLine:sellable?null:copy.outOfStockNow,submit:submit,note:null,error:i.error,cards:[],aside:null,legal:copy.legal}}function cadenceLine(days,copy){let months=Math.round(days/30.4);return months>=1&&Math.abs(days-months*30.4)<=2?copy.cadenceMonths(months):copy.cadenceDays}function toPlanView(i){let{copy:copy}=i,live=i.plans.filter(p=>p.state!=="cancelled"),rows=[];for(let plan of live)plan.lines.forEach((line,n)=>{let offer=i.offers.get(line.offerId)??null,pet=i.petName(line.petId),title=[offer?.title??copy.itemNoLongerSold,pet].filter(Boolean).join(" · "),stop=plan.stopReason,meta=stop==="payment_declined"?copy.declined(i.packageMonth):stop&&stop!=="customer"?copy.stopReason(stop):cadenceLine(plan.cadenceDays,copy);rows.push({key:`${plan.planId}:${n}`,title:title,meta:meta,alert:!!(stop&&stop!=="customer"),on:plan.state==="active",busy:i.busyPlan===plan.planId,onToggle:on=>i.onToggle(plan,on),error:i.rowError&&i.rowError.planId===plan.planId&&n===0?i.rowError.line:null})});let active=live.find(p=>p.state==="active")??null,sum=[],reviewBy=formatDay(i.reviewBy,{weekday:true});reviewBy&&sum.push({k:copy.reviewByLabel,v:reviewBy});let ships=formatDay(active?.nextRun??null,{weekday:true});ships&&sum.push({k:copy.ships,v:ships});let declined=live.some(p=>p.stopReason==="payment_declined"),delivery=[];i.address&&delivery.push({k:copy.shipTo,v:addressLine(i.address),change:{label:copy.change,to:{name:"address",then:{name:"plan"}}}}),i.card&&delivery.push({k:copy.payWith,v:cardLabel(i.card.brand,i.card.last4),alert:declined?copy.declined(i.packageMonth):null,change:{label:copy.change,to:{name:"card",then:{name:"plan"}}}});let month=i.packageMonth??monthOf(active?.nextRun??null);return{sub:null,rows:rows,emptyLine:rows.length===0?copy.repeatsEmpty:null,next:active&&sum.length>0?{sum:sum,link:i.packageMonth?{label:copy.reviewMonthsPackage(i.packageMonth),to:{name:"package"}}:null}:null,delivery:delivery,breakCard:active?{skip:month?{label:copy.skipMonth(month),ask:copy.skipMonthAsk(month),body:copy.skipMonthBody}:null,pause:{label:copy.pausePlan,ask:copy.pausePlanAsk,body:copy.pausePlanBody},busy:i.breakBusy,error:i.breakError,onConfirm:i.onBreak}:null,legal:copy.legal}}var SharedContext=react.createContext(null),ShopSharedProvider=SharedContext.Provider;function useShopShared(){let s=react.useContext(SharedContext);if(!s)throw new EverfurConfigError("not-initialized","shop screens render inside EverfurShop");return s}function packageMonth(pkg){return pkg.phase==="ready"&&pkg.value?monthOf(pkg.value.review.shipsOn):null}function loadable(read,map){return read.phase==="ready"&&read.value!==null?{phase:"ready",value:map(read.value)}:read.phase==="loading"?{phase:"loading"}:{phase:"failed",retry:read.refresh}}function pickCard(cards,id){return!cards||cards.length===0?null:(id?cards.find(c=>c.paymentMethodId===id):void 0)??cards[0]??null}function useOffersById(ids){let{client:client}=useShop(),unique=[...new Set(ids)].sort();return useShopRead(`offers-by-id:${unique.join(",")}`,async()=>{let read=await Promise.all(unique.map(id=>client.offer(id)));return omsOk(new Map(unique.map((id,i)=>[id,read[i].ok?read[i].value:null])))})}function outcomeLine(copy,outcome){return outcome.kind==="confirmed"?null:outcome.kind==="needsPayerAction"?copy.cardStepFailed:outcome.kind==="payerActionFailed"?outcome.message??copy.cardStepFailed:outcome.kind==="payerActionClosed"?copy.cardStepClosed:outcome.error.kind==="refused"&&outcome.error.reasonCode==="price_changed"?copy.priceChanged:refusalLine(copy,outcome.error)}var orderNotices=/* @__PURE__ */new WeakMap;function leaveOrderNotice(client,orderId,line){let notices=orderNotices.get(client);notices||(notices=/* @__PURE__ */new Map,orderNotices.set(client,notices)),line?notices.set(orderId,line):notices.delete(orderId)}function peekOrderNotice(client,orderId){return orderNotices.get(client)?.get(orderId)??null}function dropOrderNotice(client,orderId){orderNotices.get(client)?.delete(orderId)}var CARD_PAGE_NOTICE="\0card";function usePackageScreen(go){let{copy:copy,petName:petName,packageSource:packageSource,payments:payments,client:client}=useShop(),{tabs:tabs,pkg:pkg}=useShopShared(),plan=pkg.phase==="ready"?pkg.value?.plan??null:null,cards=usePaymentMethods(),address=useAddress(plan?.destination??null),[removing,setRemoving]=react.useState(null),[error,setError]=react.useState(null),[approving,setApproving]=react.useState(false),[placed,setPlaced]=react.useState(false),remove=useShopAction((keys,p,index)=>packageSource.removeLine(p,index,keys));if(pkg.phase==="ready"&&pkg.value===null)return{tabs:tabs,view:{phase:"failed",retry:pkg.refresh}};let view=loadable(pkg,p=>toPackageView({pkg:p,card:pickCard(cards.value,p.plan.paymentMethodId),address:address.value?.address??null,copy:copy,petName:petName,removing:removing,approving:approving,placed:placed,error:error,onRemove:index=>{setRemoving(index),setError(null),remove.run(p,index).then(res=>{setRemoving(null),res&&res.ok?pkg.refresh():res&&setError(refusalLine(copy,res.error))})},onApprove:()=>{approving||placed||(setApproving(true),setError(null),(async()=>{let outcome=await approveOnce(packageSource,p,payments);setApproving(false);let line=outcomeLine(copy,outcome),orderId=outcome.kind!=="failed"?outcome.orderIds[0]:void 0;orderId?(setPlaced(true),leaveOrderNotice(client,orderId,line),go({name:"order",orderId:orderId})):(setError(line),outcome.kind==="failed"&&outcome.error.kind==="refused"&&pkg.refresh())})())}}));return{tabs:tabs,view:view}}var approvalKeys=/* @__PURE__ */new WeakMap;async function approveOnce(source,p,payments){let keys=approvalKeys.get(p);keys||(keys=new ShopActionKeys,approvalKeys.set(p,keys));let out=await source.approve(p,keys,payments);return(out.kind!=="failed"||out.error.kind==="refused")&&approvalKeys.delete(p),out}function useDebounced(value,ms){let[v,setV]=react.useState(value);return react.useEffect(()=>{let t=setTimeout(()=>setV(value),ms);return()=>clearTimeout(t)},[value,ms]),v}function useShopScreen(initialQuery){let{client:client,copy:copy,petName:petName,pets:pets}=useShop(),{tabs:tabs,pkg:pkg}=useShopShared(),[query,setQuery]=react.useState(initialQuery??""),text=useDebounced(query,250),offers=useOffers({text:text}),rx=usePrescriptions(),prescriptions=rx.value??[],names=pets.map(p=>p.name),month=packageMonth(pkg),first=offers.phase==="ready"?offers.value??null:null,[laterState,setLater]=react.useState(null),later=laterState&&first&&laterState.first===first?laterState:null,cursor=later?later.cursor:first?.nextCursor??null,moreBusy=react.useRef(false),onMore=react.useCallback(()=>{if(!first||!cursor||moreBusy.current)return;moreBusy.current=true,setLater(l=>({first:first,offers:l&&l.first===first?l.offers:[],cursor:cursor,loading:true,failed:false}));let words=text.trim();client.offers({...words?{text:words}:{},cursor:cursor,limit:100}).then(res=>{moreBusy.current=false,setLater(l=>!l||l.first!==first?l:res.ok?{first:first,offers:[...l.offers,...res.value.offers],cursor:res.value.nextCursor,loading:false,failed:false}:{...l,loading:false,failed:true})})},[client,first,cursor,text]),shelves;if(first){let seen=/* @__PURE__ */new Set,all=[];for(let o of[...first.offers,...later?.offers??[]])seen.has(o.offerId)||(seen.add(o.offerId),all.push(o));shelves={phase:"ready",value:toShelves({offers:all,prescriptions:prescriptions,copy:copy,petName:petName,petNames:names,packageMonth:month,searching:text.trim()!=="",petId:pets.length===1?pets[0].petId:null})}}else offers.phase==="loading"||rx.phase==="loading"?shelves={phase:"loading"}:offers.phase==="unavailable"?shelves={phase:"ready",value:[]}:shelves={phase:"failed",retry:offers.refresh};let count=shelves.phase==="ready"?shelves.value.reduce((n,s)=>n+s.tiles.length,0):1,empty=shelves.phase==="ready"&&count===0?text.trim()?copy.noMatches(text.trim()):copy.nothingHereYet:null,more=first&&cursor?{onMore:onMore,loading:later?.loading??false,failed:later?.failed??false}:null;return{tabs:tabs,view:{sub:null,query:query,onQuery:setQuery,filters:[],shelves:shelves,empty:empty,legal:copy.legal,more:more}}}function lineFor(offer,quantity,petId,rx){return{offerId:offer.offerId,quantity:rx?.packCount??quantity,...rx?.petId??petId?{petId:rx?.petId??petId}:{},...rx?{rxId:rx.rxId}:{}}}function routeFor(name,line){return{name:name,offerId:line.offerId,quantity:line.quantity,...line.petId?{petId:line.petId}:{},...line.rxId?{rxId:line.rxId}:{}}}function useProductScreen(offerId,petId,go){let{copy:copy,petName:petName,pets:pets,client:client}=useShop(),{config:config,pkg:pkg,bookVisitHref:bookVisitHref}=useShopShared(),offer=useOffer(offerId),rx=usePrescriptions(),[choice,setChoice]=react.useState("monthly"),[quantity,setQuantity]=react.useState(1),[error,setError]=react.useState(null),month=packageMonth(pkg),plans=usePlans(),plan=(pkg.phase==="ready"?pkg.value?.plan??null:null)??plans.value?.plans.find(p=>p.state==="active")??null,addToPlan=useShopAction((keys,p,line)=>client.updatePlan(p.planId,{idempotencyKey:keys.key("add"),lines:[...p.lines.map(l=>({offerId:l.offerId,quantity:l.quantity,...l.petId?{petId:l.petId}:{}})),line]})),submit=(line,monthly)=>{if(setError(null),!monthly)return go(routeFor("buy",line));if(!plan)return go(routeFor("consent",line));addToPlan.run(plan,line).then(res=>{res&&res.ok?(pkg.refresh(),go({name:"package"})):res&&setError(refusalLine(copy,res.error))})};if(offer.phase==="ready"&&offer.value?.requiresRx){let o=offer.value,base={offer:o,copy:copy,petId:petId??null,petName:petName,firstPetName:pets[0]?.name??null,packageMonth:month,error:error,bookVisitHref:bookVisitHref};return rx.phase==="unavailable"?{kind:"rx",view:{phase:"ready",value:toRxProductView({...base,prescriptions:[],busy:false,onSubmit:()=>{}})}}:{kind:"rx",view:loadable(rx,list=>toRxProductView({...base,prescriptions:list,busy:addToPlan.busy,onSubmit:p=>submit(lineFor(o,1,null,p),plan!==null)}))}}let petForChoice=(petId?petName(petId):null)??pets[0]?.name??null;return{kind:"product",view:loadable(offer,o=>toProductView({offer:o,copy:copy,petName:petForChoice,packageMonth:month,plansOn:config.recurringTermsVersion!==null,choice:choice,onChoice:setChoice,quantity:quantity,onQuantity:setQuantity,busy:addToPlan.busy,error:error,onSubmit:()=>submit(lineFor(o,quantity,petId??pets[0]?.petId??null,null),choice==="monthly"&&config.recurringTermsVersion!==null&&petForChoice!==null)}))}}function usePlanScreen(){let{copy:copy,petName:petName,client:client}=useShop(),{tabs:tabs,pkg:pkg}=useShopShared(),plans=usePlans(),cards=usePaymentMethods(),live=(plans.value?.plans??[]).filter(p=>p.state!=="cancelled"),active=live.find(p=>p.state==="active")??live[0]??null,address=useAddress(active?.destination??null),offers=useOffersById(live.flatMap(p=>p.lines.map(l=>l.offerId))),[busyPlan,setBusyPlan]=react.useState(null),[rowError,setRowError]=react.useState(null),[breakError,setBreakError]=react.useState(null),toggle=useShopAction((keys,p,on)=>client.planAction(p.planId,{idempotencyKey:keys.key(on?"resume":"pause"),operation:on?"resume":"pause"})),brk=useShopAction((keys,p,which)=>client.planAction(p.planId,{idempotencyKey:keys.key(which),operation:which})),month=packageMonth(pkg);if(plans.phase==="unavailable")return{tabs:tabs,view:{phase:"failed",retry:plans.refresh}};let view=loadable(plans,()=>toPlanView({plans:live,offers:offers.value??/* @__PURE__ */new Map,copy:copy,petName:petName,card:pickCard(cards.value,active?.paymentMethodId??null),address:address.value?.address??null,reviewBy:pkg.phase==="ready"?pkg.value?.review.approveBy??null:null,packageMonth:month,busyPlan:busyPlan,rowError:rowError,onToggle:(p,on)=>{setBusyPlan(p.planId),setRowError(null),toggle.run(p,on).then(res=>{setBusyPlan(null),toggle.reset(),res&&res.ok?plans.refresh():res&&setRowError({planId:p.planId,line:refusalLine(copy,res.error)})})},breakBusy:brk.busy,breakError:breakError,onBreak:async which=>{if(!active)return false;setBreakError(null);let res=await brk.run(active,which);return res&&res.ok?(brk.reset(),plans.refresh(),pkg.refresh(),true):(res&&setBreakError(refusalLine(copy,res.error)),false)}}));return{tabs:tabs,view:view}}var addedAddresses=/* @__PURE__ */new WeakMap;function peekAddedAddress(client){return addedAddresses.get(client)??null}function dropAddedAddress(client){addedAddresses.delete(client)}function useAddressStep(then,go){let{copy:copy,client:client}=useShop(),{pkg:pkg}=useShopShared(),back=then??{name:"package"},saved=react.useRef(null),save=useShopAction(async(keys,input)=>{let sent=JSON.stringify(input),ref=saved.current?.sent===sent?saved.current.ref:null;if(ref===null){let res=await client.addAddress(input);if(!res.ok)return omsErr(res.error);ref=res.value.ref,saved.current={sent:sent,ref:ref}}if(then?.name==="package"||then?.name==="plan"){let page=await client.plans({limit:100});if(!page.ok)return omsErr(page.error);let live=page.value.plans.filter(p=>p.state!=="cancelled"),shown=then.name==="package"?live.find(p=>p.planId===(pkg.value?.plan.planId??null))??null:live.find(p=>p.state==="active")??live[0]??null,moving=shown?live.filter(p=>p.planId===shown.planId||shown.destination!==null&&p.destination===shown.destination):[];for(let p of moving){if(p.destination===ref)continue;let moved=await client.updatePlan(p.planId,{idempotencyKey:keys.key(`destination:${p.planId}`),destination:ref});if(!moved.ok)return omsErr(moved.error)}}return omsOk(ref)});return{back:{label:copy.backToCare,to:back},busy:save.busy,error:save.error?refusalLine(copy,save.error):null,onSave:input=>{save.run(input).then(res=>{!res||!res.ok||(then?.name==="package"||then?.name==="plan"?pkg.refresh():addedAddresses.set(client,res.value),go(back))})}}}function useCardStep(then,go,handoff){let{copy:copy,client:client,payments:payments}=useShop(),{config:config}=useShopShared(),back=then??{name:"plan"},[error,setError]=react.useState(()=>peekOrderNotice(client,CARD_PAGE_NOTICE));react.useEffect(()=>dropOrderNotice(client,CARD_PAGE_NOTICE),[client]);let setup=useShopAction(async()=>{if(handoff){let step2=await handoff();return step2.ok?omsOk(true):(setError(step2.closed?copy.cardStepClosed:step2.message??copy.cardStepFailed),omsOk(false))}let s=await client.setupPaymentMethod();if(!s.ok||!payments)return s.ok?omsErr({kind:"invalidRequest"}):omsErr(s.error);let step=await payments.confirmCardSetup(s.value.payerAction);return step.ok?omsOk(true):(setError(step.closed?copy.cardStepClosed:step.message??copy.cardStepFailed),omsOk(false))}),on=handoff?true:payments!==null&&config.stripePublishableKey!==null;return{back:{label:copy.backToCare,to:back},error:error??(setup.error?refusalLine(copy,setup.error):null),start:on?{label:copy.cardStart,busyLabel:copy.saving,busy:setup.busy,disabled:setup.busy,onPress:()=>{setError(null),setup.run().then(res=>{res&&res.ok&&res.value&&go(back)})}}:null}}function useNameStep(retry){let{copy:copy,saveProfileName:saveProfileName,onProfileNameRequired:onProfileNameRequired}=useShop(),[open,setOpen]=react.useState(false),[busy,setBusy]=react.useState(false),[error,setError]=react.useState(null),retryRef=react.useRef(retry);retryRef.current=retry;let running=react.useRef(false),mounted=react.useRef(true);return react.useEffect(()=>(mounted.current=true,()=>{mounted.current=false}),[]),{view:open?{line:copy.nameMissing,form:saveProfileName?{firstLabel:copy.firstName,lastLabel:copy.lastName,saveLabel:copy.saveName,busy:busy,error:error,onSave:name=>{let firstName=name.firstName.trim(),lastName=name.lastName.trim();running.current||!firstName||!lastName||(running.current=true,setBusy(true),setError(null),saveProfileName({firstName:firstName,lastName:lastName}).then(saved=>saved,()=>false).then(saved=>{if(running.current=false,!!mounted.current){if(setBusy(false),!saved){setError(copy.actionFailed);return}setOpen(false),retryRef.current()}}))}}:null,handoff:!saveProfileName&&onProfileNameRequired?{label:copy.addName,onPress:onProfileNameRequired}:null}:null,raise:e=>isNameRequired(e)?(setError(null),setOpen(true),true):false,clear:()=>setOpen(false)}}function useCheckoutBasics(){let addresses=useAddresses(),cards=usePaymentMethods(),address=addresses.value?.find(a=>a.isDefault&&a.isComplete)??addresses.value?.find(a=>a.isComplete)??null,card=pickCard(cards.value,null);return{addresses:addresses,cards:cards,address:address,card:card}}function quoteLine(copy,quote){return quote.phase==="unavailable"?copy.actionFailed:quote.phase==="failed"&&quote.error?refusalLine(copy,quote.error):null}function useBuyStep(route,go){let{copy:copy,client:client,payments:payments,petName:petName}=useShop(),offer=useOffer(route.offerId),{address:address,card:card}=useCheckoutBasics(),line=react.useMemo(()=>({offerId:route.offerId,quantity:route.quantity,...route.petId?{petId:route.petId}:{},...route.rxId?{rxId:route.rxId}:{}}),[route.offerId,route.quantity,route.petId,route.rxId]),quote=useShopRead(address?`quote:${address.ref}:${JSON.stringify(line)}`:null,()=>client.quote({lines:[line],shipTo:address.ref})),[shown,setShown]=react.useState(null),[error,setError]=react.useState(null),[placed,setPlaced]=react.useState(false),buy=useShopAction(async keys=>{let draft=await client.createCheckout({idempotencyKey:keys.key("draft"),lines:[line],shipTo:address.ref});if(!draft.ok)return omsErr(draft.error);if((shown??quote.value?.total??null)!==draft.value.total)return setShown(draft.value.total),omsErr({kind:"refused",status:409,reasonCode:"price_changed",message:null});let out=await confirmWithPayerActions(idempotencyKey=>client.confirmCheckout(draft.value.checkoutId,{idempotencyKey:idempotencyKey,expectedTotal:draft.value.total,paymentMethodId:card.paymentMethodId}),keys,payments);return out.kind==="failed"?omsErr(out.error):omsOk(out)}),needs=[...address?[]:[{label:copy.addressNeeded,to:{name:"address",then:route}}],...card?[]:[{label:copy.cardTitle,to:{name:"card",then:route}}]],q=quote.value,total=shown??q?.total??null,placeRef=react.useRef(()=>{}),name=useNameStep(()=>placeRef.current()),place2=()=>{placed||(setError(null),name.clear(),buy.run().then(res=>{if(!res)return;let out=res.ok?res.value:{kind:"failed",error:res.error},orderId=out.kind!=="failed"?out.orderIds[0]:void 0;orderId?(setPlaced(true),leaveOrderNotice(client,orderId,outcomeLine(copy,out)),go({name:"order",orderId:orderId})):out.kind==="failed"&&name.raise(out.error)||setError(outcomeLine(copy,out))}))};return placeRef.current=place2,{back:{label:copy.backToShop,to:{name:"product",offerId:route.offerId}},title:copy.confirmTitle,lines:offer.value?[{key:line.offerId,name:offer.value.title,meta:petName(line.petId),price:offer.value.price!==null?formatCents(offer.value.price*line.quantity):null}]:[],sum:q&&total!==null?[{k:copy.shipping,v:q.shipping===0?copy.free:formatCents(q.shipping)},{k:copy.tax,v:formatCents(q.tax)},{k:copy.total,v:formatCents(total)}]:null,needs:needs,pay:address&&card&&q?{label:copy.confirmPay,busyLabel:copy.saving,busy:buy.busy,disabled:buy.busy||placed,onPress:place2}:null,note:card?copy.chargedWhenShips(cardLabel(card.brand,card.last4)):null,error:error??quoteLine(copy,quote),nameStep:name.view}}function useConsentStep(route,go){let{copy:copy,client:client}=useShop(),{config:config,pkg:pkg}=useShopShared(),{address:address,card:card}=useCheckoutBasics(),create=useShopAction(keys=>client.createPlan({idempotencyKey:keys.key("create"),cadenceDays:30,destination:address.ref,paymentMethodId:card.paymentMethodId,consentTermsVersion:config.recurringTermsVersion,lines:[{offerId:route.offerId,quantity:route.quantity,...route.petId?{petId:route.petId}:{},...route.rxId?{rxId:route.rxId}:{}}]})),needs=[...address?[]:[{label:copy.addressNeeded,to:{name:"address",then:route}}],...card?[]:[{label:copy.cardTitle,to:{name:"card",then:route}}]];return{back:{label:copy.backToShop,to:{name:"product",offerId:route.offerId}},terms:config.recurringTermsUrl?{label:copy.consentTermsLink,href:config.recurringTermsUrl}:null,needs:needs,error:create.error?refusalLine(copy,create.error):null,agree:address&&card&&config.recurringTermsVersion?{label:copy.consentAgree,busyLabel:copy.saving,busy:create.busy,disabled:create.busy,onPress:()=>{create.run().then(res=>{res&&res.ok&&(pkg.refresh(),go({name:"plan"}))})}}:null}}var CART_MAX_QUANTITY=5,stores=/* @__PURE__ */new WeakMap,NONE=[];function storeOf(client){let s=stores.get(client);return s||(s={items:NONE,flash:null,storage:null,listeners:/* @__PURE__ */new Set},stores.set(client,s)),s}function set(client,items){let s=storeOf(client);if(s.items=items,s.storage)try{s.storage.write(JSON.stringify(items))}catch{}for(let l of[...s.listeners])l()}function clamp(n){return Math.max(1,Math.min(CART_MAX_QUANTITY,Math.round(n)))}function cartKey(line){return`${line.offerId}|${line.petId??""}|${line.rxId??""}`}function cartItems(client){return storeOf(client).items}function addToCart(client,input){let key=cartKey(input),items=cartItems(client),was=items.find(i=>i.key===key),quantity=input.rxId?Math.max(1,Math.round(input.quantity)):clamp((was?.quantity??0)+input.quantity),item={...input,key:key,quantity:quantity};return set(client,was?items.map(i=>i.key===key?item:i):[...items,item]),item}function setCartQuantity(client,key,quantity){let items=cartItems(client);set(client,items.map(i=>i.key===key&&!i.rxId?{...i,quantity:clamp(quantity)}:i))}function removeFromCart(client,key){let items=cartItems(client),was=items.find(i=>i.key===key)??null;return was&&set(client,items.filter(i=>i.key!==key)),was}function removePlaced(client,keys){let gone=new Set(keys),items=cartItems(client);items.some(i=>gone.has(i.key))&&set(client,items.filter(i=>!gone.has(i.key)))}function flashCart(client,line){storeOf(client).flash=line}function takeCartFlash(client){let s=storeOf(client),line=s.flash;return s.flash=null,line}function cartLines(items){return items.map(i=>({offerId:i.offerId,quantity:i.quantity,...i.petId?{petId:i.petId}:{},...i.rxId?{rxId:i.rxId}:{}}))}function cartSubtotal(items){let sum=0;for(let i of items){if(i.unitPrice===null)return null;sum+=i.unitPrice*i.quantity}return sum}function cartCount(items){return items.reduce((n,i)=>n+i.quantity,0)}function useCart(client){let s=storeOf(client);return react.useSyncExternalStore(l=>(s.listeners.add(l),()=>{s.listeners.delete(l)}),()=>s.items,()=>s.items)}var NavContext=react.createContext({go:()=>{},openExternal:()=>{}});function ShopNativeNavProvider({value:value,children:children}){return react.createElement(NavContext.Provider,{value:value},children)}function useShopNativeNav(){return react.useContext(NavContext)}var US_STATES=["AL","AK","AZ","AR","CA","CO","CT","DE","DC","FL","GA","HI","ID","IL","IN","IA","KS","KY","LA","ME","MD","MA","MI","MN","MS","MO","MT","NE","NV","NH","NJ","NM","NY","NC","ND","OH","OK","OR","PA","RI","SC","SD","TN","TX","UT","VT","VA","WA","WV","WI","WY","AS","GU","MP","PR","VI","AA","AE","AP"],US_ZIP=/^\d{5}(-\d{4})?$/;function isUsState(region){return US_STATES.includes(region.trim().toUpperCase())}var PHONE_BOX={body:{paddingTop:8,paddingRight:16,paddingLeft:16},pushBody:{paddingRight:16,paddingLeft:16},subtabs:{backgroundColor:"#ffffff"},subtab:{minHeight:44,rowGap:6,columnGap:6},subtabCurrent:{minHeight:44,rowGap:6,columnGap:6},titleBlock:{paddingTop:4,rowGap:2,columnGap:2},screenTitle:{},screenMeta:{},stack:{marginTop:12,rowGap:12,columnGap:12},card:{paddingTop:16,paddingRight:16,paddingBottom:16,paddingLeft:16,borderWidth:1,borderColor:"#e4e4e4",borderRadius:20,backgroundColor:"#ffffff"},cardHead:{marginBottom:12,rowGap:8,columnGap:16},cardTitle:{marginBottom:12},cardTitleInHead:{},cardLink:{},cardLinkAfterNote:{marginTop:12,marginBottom:2.34},forLabel:{marginTop:4,marginBottom:8},forLabelNext:{marginTop:16,marginBottom:8},itemsLiFirst:{paddingBottom:16,rowGap:12,columnGap:12},itemsLiMid:{paddingTop:16,paddingBottom:16,borderTopWidth:1,borderTopColor:"#e4e4e4",rowGap:12,columnGap:12},itemsLiLast:{paddingTop:16,borderTopWidth:1,borderTopColor:"#e4e4e4",rowGap:12,columnGap:12},thumb:{borderRadius:10,backgroundColor:"#eaeef6",width:48,height:48},thumbIcon:{width:22,height:22},thumbPink:{borderRadius:10,backgroundColor:"#ffeae8"},thumbYellow:{borderRadius:10,backgroundColor:"#fcf0d6"},thumbSage:{borderRadius:10,backgroundColor:"#e6ece8"},itemsName:{rowGap:4,columnGap:8},itemsMeta:{marginTop:2},itemsActs:{marginTop:6,rowGap:16,columnGap:16},itemsActLink:{},itemsActButton:{},itemsEnd:{rowGap:4,columnGap:4},itemsPrice:{},pill:{paddingRight:10,paddingLeft:10,borderRadius:999,backgroundColor:"#eaeef6",minHeight:24},pillSoon:{paddingRight:10,paddingLeft:10,borderRadius:999,backgroundColor:"#ffffff",minHeight:24},btnRow:{paddingRight:14,paddingLeft:14,borderWidth:1,borderColor:"#10462e",borderRadius:999,minHeight:36,rowGap:8,columnGap:8},btnRowIcon:{width:17,height:17},btnRowLabel:{},sumTotal:{paddingRight:24,paddingLeft:24,borderWidth:1,borderColor:"#e4e4e4",borderRadius:20,backgroundColor:"#ffffff"},sumRowFirst:{paddingTop:14,paddingBottom:14,rowGap:2,columnGap:16},sumRowLast:{paddingTop:14,paddingBottom:14,rowGap:2,columnGap:16},sumDt:{},sumDd:{},sumDdTotal:{},noteAfterSum:{marginTop:12},rowsLiFirst:{paddingBottom:16,rowGap:8,columnGap:16},rowsLiNext:{paddingTop:16,borderTopWidth:1,borderTopColor:"#e4e4e4",rowGap:8,columnGap:16},rowsK:{},rowsV:{marginTop:2},rowsMeta:{marginTop:2},legal:{marginTop:32},legalText:{},traybar:{paddingTop:12,paddingRight:16,paddingBottom:8,paddingLeft:16,backgroundColor:"#ffffff",rowGap:6,columnGap:6},btnInk:{paddingRight:24,paddingLeft:24,borderWidth:1,borderColor:"#10462e",borderRadius:999,backgroundColor:"#10462e",minHeight:50,rowGap:8,columnGap:8},traybarFine:{},input:{paddingRight:16,paddingLeft:16,borderWidth:1,borderColor:"#e4e4e4",borderRadius:10,backgroundColor:"#ffffff",minHeight:52,rowGap:10,columnGap:10},inputIcon:{width:20,height:20},inputText:{paddingTop:1,paddingRight:2,paddingBottom:1,paddingLeft:2},inputPlaceholder:{},filters:{paddingBottom:2,rowGap:8,columnGap:8},filter:{paddingRight:14,paddingLeft:14,borderWidth:1,borderColor:"#e4e4e4",borderRadius:999,minHeight:36},filterCurrent:{paddingRight:14,paddingLeft:14,borderWidth:1,borderColor:"#10462e",borderRadius:999,backgroundColor:"#ffeae8",minHeight:36},sectionHead:{marginTop:8,rowGap:8,columnGap:12},prods:{rowGap:16,columnGap:12},prod:{rowGap:12,columnGap:12},prodImg:{borderRadius:10,backgroundColor:"#ffeae8",aspectRatio:1},prodIcon:{width:36,height:36},prodTags:{rowGap:6,columnGap:6,position:"absolute",top:8,left:8},prodBody:{rowGap:4,columnGap:4},prodName:{},prodMeta:{},prodPrice:{marginTop:4,rowGap:8,columnGap:8},pillClear:{paddingRight:10,paddingLeft:10,borderRadius:999,backgroundColor:"#ffffff",minHeight:24},pillPlain:{paddingRight:10,paddingLeft:10,borderRadius:999,backgroundColor:"#ffffff",minHeight:24},pillOverdue:{paddingRight:10,paddingLeft:10,borderRadius:999,backgroundColor:"#ffffff",minHeight:24},hero:{borderRadius:20,backgroundColor:"#fcf0d6",aspectRatio:1.6},heroIcon:{width:56,height:56},source:{rowGap:8,columnGap:8},sourceIcon:{marginTop:2,width:16,height:16},sourceBold:{},sourceLink:{},choices:{rowGap:8,columnGap:8},choiceCurrent:{paddingTop:14,paddingRight:16,paddingBottom:14,paddingLeft:16,borderWidth:1,borderColor:"#10462e",borderRadius:10,backgroundColor:"#ffeae8",rowGap:12,columnGap:12},choice:{paddingTop:14,paddingRight:16,paddingBottom:14,paddingLeft:16,borderWidth:1,borderColor:"#e4e4e4",borderRadius:10,backgroundColor:"#ffffff",rowGap:12,columnGap:12},radioOn:{borderWidth:6,borderColor:"#10462e",borderRadius:10,backgroundColor:"#ffffff",width:20,height:20},radioOff:{borderWidth:1,borderColor:"#819d90",borderRadius:10,backgroundColor:"#ffffff",width:20,height:20},choiceText:{},choiceTitle:{},choiceMeta:{marginTop:2},facts:{marginTop:12,rowGap:8,columnGap:8},factsLi:{paddingTop:12,paddingRight:12,paddingBottom:12,paddingLeft:12,borderRadius:10,backgroundColor:"#e6ece8",rowGap:4,columnGap:4},factsLiHer:{paddingTop:12,paddingRight:12,paddingBottom:12,paddingLeft:12,borderRadius:10,backgroundColor:"#fcf0d6",rowGap:4,columnGap:4},factsK:{},factsN:{},factsUnit:{},noteAfterFacts:{marginTop:12},cardLead:{marginBottom:12},person:{rowGap:12,columnGap:16},avatar:{borderRadius:18,backgroundColor:"#ffffff",width:36,height:36},personName:{},personMeta:{},sourceInCard:{marginTop:12,rowGap:8,columnGap:8},sourceInCardIcon:{marginTop:2,width:16,height:16},noteAfterSource:{marginTop:8},rxLead:{marginBottom:12},btnOutlineSm:{marginTop:12,paddingRight:16,paddingLeft:16,borderWidth:1,borderColor:"#10462e",borderRadius:999,minHeight:46,rowGap:8,columnGap:8},btnOutlineSmIcon:{width:20,height:20},noteStandalone:{},noteLink:{},sumPlain:{paddingRight:24,paddingLeft:24,borderWidth:1,borderColor:"#e4e4e4",borderRadius:20,backgroundColor:"#ffffff"},sumPlainRowFirst:{paddingTop:14,paddingBottom:14,rowGap:2,columnGap:16},sumPlainRowLast:{paddingTop:14,paddingBottom:14,rowGap:2,columnGap:16},sumPlainDd:{},planRowsLiFirst:{paddingTop:12,paddingBottom:12,rowGap:8,columnGap:16},planRowsLiNext:{paddingTop:12,paddingBottom:12,borderTopWidth:1,borderTopColor:"#e4e4e4",rowGap:8,columnGap:16},switch:{width:48,height:28},switchTrack:{borderRadius:999,backgroundColor:"#10462e",width:48,height:28},switchKnob:{borderRadius:11,backgroundColor:"#ffffff",position:"absolute",top:3,left:3,transform:[{translateX:20}],width:22,height:22},switchTrackOff:{borderRadius:999,backgroundColor:"#d0d6d3",width:48,height:28},switchKnobOff:{borderRadius:11,backgroundColor:"#ffffff",position:"absolute",top:3,left:3,width:22,height:22},breaks:{marginTop:12,rowGap:12,columnGap:24},btnSm:{paddingRight:16,paddingLeft:16,borderWidth:1,borderColor:"#10462e",borderRadius:999,minHeight:46,rowGap:8,columnGap:8},linkDanger:{},sheet:{borderTopLeftRadius:28,borderTopRightRadius:28,backgroundColor:"#ffffff"},sheetBackdrop:{backgroundColor:"rgba(0, 0, 0, 0.32)",position:"absolute"},sheetGrab:{height:20},sheetGrabBar:{borderRadius:3,backgroundColor:"#c9c9c9",width:36,height:5},sheetHead:{paddingTop:4,paddingRight:16,paddingBottom:12,paddingLeft:16,rowGap:12,columnGap:12},sheetClose:{paddingTop:1,paddingRight:6,paddingBottom:1,paddingLeft:6,borderRadius:18,backgroundColor:"#e6ece8",width:36,height:36},sheetCloseIcon:{width:20,height:20},sheetBody:{paddingRight:16,paddingBottom:24,paddingLeft:16,rowGap:12,columnGap:12},sheetText:{},sheetActions:{marginTop:16,rowGap:8,columnGap:8},btnDanger:{paddingRight:16,paddingLeft:16,borderWidth:1,borderColor:"#c03410",borderRadius:999,backgroundColor:"#ffffff",minHeight:46,rowGap:8,columnGap:8},btnOutline:{paddingRight:24,paddingLeft:24,borderWidth:1,borderColor:"#10462e",borderRadius:999,minHeight:52,rowGap:8,columnGap:8},rec:{marginRight:-8,marginLeft:-8,rowGap:4,columnGap:4},recRow:{paddingTop:10,paddingRight:8,paddingBottom:10,paddingLeft:8,borderRadius:10,rowGap:12,columnGap:12},recIcon:{width:20,height:20},recText:{rowGap:2,columnGap:2},recTitle:{},recMeta:{},recEnd:{rowGap:8,columnGap:8},trackerLi:{paddingBottom:24,rowGap:16,columnGap:16},trackerLiLast:{rowGap:16,columnGap:16},trackerLineDone:{borderRadius:1,backgroundColor:"#10462e",position:"absolute",top:30,left:13,bottom:2,width:2},trackerLine:{borderRadius:1,backgroundColor:"#e4e4e4",position:"absolute",top:30,left:13,bottom:2,width:2},dotDone:{borderWidth:2,borderColor:"#10462e",borderRadius:14,backgroundColor:"#10462e",width:28,height:28},dotDoneIcon:{width:16,height:16},dotNow:{borderWidth:2,borderColor:"#10462e",borderRadius:14,backgroundColor:"#ffffff",width:28,height:28},dotNowCore:{borderRadius:5,backgroundColor:"#07c168",width:10,height:10},dotNext:{borderWidth:2,borderColor:"#e4e4e4",borderRadius:14,backgroundColor:"#ffffff",width:28,height:28},trackerTitle:{paddingTop:3,rowGap:4,columnGap:8},trackerTitleNext:{paddingTop:3,rowGap:4,columnGap:8},trackerWhen:{marginTop:2},trackerText:{marginTop:2},pillStable:{paddingRight:10,paddingLeft:10,borderRadius:999,backgroundColor:"#dcf6ea",minHeight:24},trackItemsEnd:{rowGap:4,columnGap:4},trackItemsLiFirst:{paddingBottom:16,rowGap:12,columnGap:12},trackItemsLiLast:{paddingTop:16,borderTopWidth:1,borderTopColor:"#e4e4e4",rowGap:12,columnGap:12},noteAfterTotal:{marginTop:8},rowLink:{paddingTop:16,paddingRight:24,paddingBottom:16,paddingLeft:24,borderWidth:1,borderColor:"#e4e4e4",borderRadius:20,backgroundColor:"#ffffff",rowGap:12,columnGap:12},rowLinkIcon:{width:22,height:22},rowLinkChevron:{width:20,height:20},ghost:{marginTop:16,rowGap:10,columnGap:10},ghostBar:{borderRadius:999,backgroundColor:"#e6ece8",height:12},field:{rowGap:6,columnGap:6},fieldLabel:{},fieldInput:{paddingRight:16,paddingLeft:16,borderWidth:1,borderColor:"#e4e4e4",borderRadius:10,backgroundColor:"#ffffff",minHeight:52,rowGap:10,columnGap:10},fieldInputText:{paddingTop:1,paddingRight:2,paddingBottom:1,paddingLeft:2}},PHONE_TEXT={body:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},pushBody:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},subtabs:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},subtab:{color:"#6b6b6b",fontSize:15,fontWeight:"500",lineHeight:23.25},subtabCurrent:{color:"#10462e",fontSize:15,fontWeight:"700",lineHeight:23.25},titleBlock:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},screenTitle:{color:"#10462e",fontSize:22,fontWeight:"500",lineHeight:26.390625,letterSpacing:-.33},screenMeta:{color:"#6b6b6b",fontSize:13,fontWeight:"400",lineHeight:18.84375},stack:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},card:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},cardHead:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},cardTitle:{color:"#10462e",fontSize:18,fontWeight:"700",lineHeight:22.5,letterSpacing:-.36},cardTitleInHead:{color:"#10462e",fontSize:18,fontWeight:"700",lineHeight:22.5,letterSpacing:-.36},cardLink:{color:"#10462e",fontSize:15,fontWeight:"700",lineHeight:21},cardLinkAfterNote:{color:"#10462e",fontSize:15,fontWeight:"700",lineHeight:21},forLabel:{color:"#6b6b6b",fontSize:12,fontWeight:"700",lineHeight:16.796875,letterSpacing:.72,textTransform:"uppercase"},forLabelNext:{color:"#6b6b6b",fontSize:12,fontWeight:"700",lineHeight:16.796875,letterSpacing:.72,textTransform:"uppercase"},itemsLiFirst:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},itemsLiMid:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},itemsLiLast:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},thumb:{color:"#10462e",fontSize:17,fontWeight:"400",lineHeight:26.34375},thumbIcon:{color:"#10462e",fontSize:17,fontWeight:"400",lineHeight:26.34375},thumbPink:{color:"#10462e",fontSize:17,fontWeight:"400",lineHeight:26.34375},thumbYellow:{color:"#10462e",fontSize:17,fontWeight:"400",lineHeight:26.34375},thumbSage:{color:"#10462e",fontSize:17,fontWeight:"400",lineHeight:26.34375},itemsName:{color:"#10462e",fontSize:17,fontWeight:"700",lineHeight:22.09375},itemsMeta:{color:"#6b6b6b",fontSize:13,fontWeight:"400",lineHeight:18.84375},itemsActs:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},itemsActLink:{color:"#10462e",fontSize:13,fontWeight:"700",lineHeight:20.140625,textDecorationLine:"underline"},itemsActButton:{color:"#10462e",fontSize:13,fontWeight:"700",lineHeight:20.140625,textDecorationLine:"underline",textAlign:"center"},itemsEnd:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375,fontVariant:["tabular-nums"]},itemsPrice:{color:"#10462e",fontSize:17,fontWeight:"700",lineHeight:26.34375,fontVariant:["tabular-nums"]},pill:{color:"#10462e",fontSize:12,fontWeight:"700",lineHeight:12,letterSpacing:.72,textTransform:"uppercase"},pillSoon:{color:"#10462e",fontSize:12,fontWeight:"700",lineHeight:12,letterSpacing:.72,textTransform:"uppercase"},btnRow:{color:"#10462e",fontSize:14,fontWeight:"400",lineHeight:14,textAlign:"center",fontVariant:["tabular-nums"]},btnRowIcon:{color:"#10462e",fontSize:14,fontWeight:"400",lineHeight:14,textAlign:"center",fontVariant:["tabular-nums"]},btnRowLabel:{color:"#10462e",fontSize:14,fontWeight:"400",lineHeight:14,textAlign:"center",fontVariant:["tabular-nums"]},sumTotal:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},sumRowFirst:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},sumRowLast:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},sumDt:{color:"#6b6b6b",fontSize:15,fontWeight:"400",lineHeight:23.25},sumDd:{color:"#10462e",fontSize:15,fontWeight:"700",lineHeight:21,textAlign:"right"},sumDdTotal:{color:"#10462e",fontSize:20,fontWeight:"700",lineHeight:28,textAlign:"right"},noteAfterSum:{color:"#6b6b6b",fontSize:13,fontWeight:"400",lineHeight:19.5},rowsLiFirst:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},rowsLiNext:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},rowsK:{color:"#10462e",fontSize:17,fontWeight:"700",lineHeight:22.09375},rowsV:{color:"#000000",fontSize:15,fontWeight:"400",lineHeight:21.75},rowsMeta:{color:"#6b6b6b",fontSize:13,fontWeight:"400",lineHeight:18.84375},legal:{color:"#6b6b6b",fontSize:13,fontWeight:"400",lineHeight:20.796875,textAlign:"center"},legalText:{color:"#6b6b6b",fontSize:13,fontWeight:"400",lineHeight:20.796875,textAlign:"center"},traybar:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},btnInk:{color:"#ffffff",fontSize:17,fontWeight:"700",lineHeight:17,textAlign:"center"},traybarFine:{color:"#6b6b6b",fontSize:12,fontWeight:"400",lineHeight:15.59375,textAlign:"center"},input:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},inputIcon:{color:"#6b6b6b",fontSize:17,fontWeight:"400",lineHeight:26.34375},inputText:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},inputPlaceholder:{color:"#757575",fontSize:17,fontWeight:"400"},filters:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},filter:{color:"#10462e",fontSize:15,fontWeight:"400",lineHeight:18},filterCurrent:{color:"#10462e",fontSize:15,fontWeight:"700",lineHeight:18},sectionHead:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},prods:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},prod:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},prodImg:{color:"#10462e",fontSize:17,fontWeight:"400",lineHeight:26.34375},prodIcon:{color:"#10462e",fontSize:17,fontWeight:"400",lineHeight:26.34375},prodTags:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},prodBody:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},prodName:{color:"#10462e",fontSize:15,fontWeight:"700",lineHeight:19.5},prodMeta:{color:"#6b6b6b",fontSize:13,fontWeight:"400",lineHeight:18.84375},prodPrice:{color:"#10462e",fontSize:15,fontWeight:"700",lineHeight:23.25,fontVariant:["tabular-nums"]},pillClear:{color:"#07c168",fontSize:12,fontWeight:"700",lineHeight:12,letterSpacing:.72,textTransform:"uppercase"},pillPlain:{color:"#10462e",fontSize:12,fontWeight:"700",lineHeight:12,letterSpacing:.72,textTransform:"uppercase"},pillOverdue:{color:"#c03410",fontSize:12,fontWeight:"700",lineHeight:12,letterSpacing:.72,textTransform:"uppercase"},hero:{color:"#10462e",fontSize:17,fontWeight:"400",lineHeight:26.34375},heroIcon:{color:"#10462e",fontSize:17,fontWeight:"400",lineHeight:26.34375},source:{color:"#6b6b6b",fontSize:13,fontWeight:"400",lineHeight:19.5},sourceIcon:{color:"#819d90",fontSize:13,fontWeight:"400",lineHeight:19.5},sourceBold:{color:"#6b6b6b",fontSize:13,fontWeight:"700",lineHeight:19.5},sourceLink:{color:"#10462e",fontSize:13,fontWeight:"700",lineHeight:19.5,textDecorationLine:"underline"},choices:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},choiceCurrent:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},choice:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},radioOn:{color:"#000000",fontSize:13.333,fontWeight:"400"},radioOff:{color:"#000000",fontSize:13.333,fontWeight:"400"},choiceText:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},choiceTitle:{color:"#10462e",fontSize:17,fontWeight:"700",lineHeight:22.09375},choiceMeta:{color:"#6b6b6b",fontSize:13,fontWeight:"400",lineHeight:18.1875},facts:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},factsLi:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},factsLiHer:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},factsK:{color:"#6b6b6b",fontSize:13,fontWeight:"400",lineHeight:18.1875},factsN:{color:"#10462e",fontSize:20,fontWeight:"700",lineHeight:22,letterSpacing:-.4,fontVariant:["tabular-nums"]},factsUnit:{color:"#6b6b6b",fontSize:13,fontWeight:"500",lineHeight:14.296875,letterSpacing:-.4,fontVariant:["tabular-nums"]},noteAfterFacts:{color:"#6b6b6b",fontSize:13,fontWeight:"400",lineHeight:19.5},cardLead:{color:"#000000",fontSize:15,fontWeight:"400",lineHeight:22.5},person:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},avatar:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},personName:{color:"#10462e",fontSize:17,fontWeight:"700",lineHeight:22.09375},personMeta:{color:"#6b6b6b",fontSize:13,fontWeight:"400",lineHeight:18.84375},sourceInCard:{color:"#6b6b6b",fontSize:13,fontWeight:"400",lineHeight:19.5},sourceInCardIcon:{color:"#819d90",fontSize:13,fontWeight:"400",lineHeight:19.5},noteAfterSource:{color:"#6b6b6b",fontSize:13,fontWeight:"400",lineHeight:19.5},rxLead:{color:"#000000",fontSize:15,fontWeight:"400",lineHeight:22.5},btnOutlineSm:{color:"#10462e",fontSize:15,fontWeight:"400",lineHeight:15,textAlign:"center"},btnOutlineSmIcon:{color:"#10462e",fontSize:15,fontWeight:"400",lineHeight:15,textAlign:"center"},noteStandalone:{color:"#6b6b6b",fontSize:13,fontWeight:"400",lineHeight:19.5},noteLink:{color:"#10462e",fontSize:15,fontWeight:"700",lineHeight:21},sumPlain:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},sumPlainRowFirst:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},sumPlainRowLast:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},sumPlainDd:{color:"#10462e",fontSize:15,fontWeight:"700",lineHeight:21,textAlign:"right"},planRowsLiFirst:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},planRowsLiNext:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},switch:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},switchTrack:{color:"#000000",fontSize:13.333,fontWeight:"400"},switchKnob:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},switchTrackOff:{color:"#000000",fontSize:13.333,fontWeight:"400"},switchKnobOff:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},breaks:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},btnSm:{color:"#10462e",fontSize:15,fontWeight:"400",lineHeight:15,textAlign:"center"},linkDanger:{color:"#c03410",fontSize:15,fontWeight:"700",lineHeight:23.25,textDecorationLine:"underline",textAlign:"center"},sheet:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},sheetBackdrop:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},sheetGrab:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},sheetGrabBar:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},sheetHead:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},sheetClose:{color:"#10462e",fontSize:13.333,fontWeight:"400",textAlign:"center"},sheetCloseIcon:{color:"#10462e",fontSize:13.333,fontWeight:"400",textAlign:"center"},sheetBody:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},sheetText:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:25.5},sheetActions:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},btnDanger:{color:"#c03410",fontSize:15,fontWeight:"700",lineHeight:23.25,textAlign:"center"},btnOutline:{color:"#10462e",fontSize:17,fontWeight:"700",lineHeight:17,textAlign:"center"},rec:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},recRow:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},recIcon:{color:"#6b6b6b",fontSize:17,fontWeight:"400",lineHeight:26.34375},recText:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},recTitle:{color:"#10462e",fontSize:17,fontWeight:"700",lineHeight:22.09375},recMeta:{color:"#6b6b6b",fontSize:13,fontWeight:"400",lineHeight:18.1875},recEnd:{color:"#6b6b6b",fontSize:15,fontWeight:"400",lineHeight:23.25},trackerLi:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},trackerLiLast:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},trackerLineDone:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},trackerLine:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},dotDone:{color:"#ffffff",fontSize:17,fontWeight:"400",lineHeight:26.34375},dotDoneIcon:{color:"#ffffff",fontSize:17,fontWeight:"400",lineHeight:26.34375},dotNow:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},dotNowCore:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},dotNext:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},trackerTitle:{color:"#10462e",fontSize:17,fontWeight:"700",lineHeight:22.09375},trackerTitleNext:{color:"#6b6b6b",fontSize:17,fontWeight:"700",lineHeight:22.09375},trackerWhen:{color:"#6b6b6b",fontSize:13,fontWeight:"400",lineHeight:18.1875},trackerText:{color:"#000000",fontSize:15,fontWeight:"400",lineHeight:22.5},pillStable:{color:"#10462e",fontSize:12,fontWeight:"700",lineHeight:12,letterSpacing:.72,textTransform:"uppercase"},trackItemsEnd:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375,fontVariant:["tabular-nums"]},trackItemsLiFirst:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},trackItemsLiLast:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},noteAfterTotal:{color:"#6b6b6b",fontSize:13,fontWeight:"400",lineHeight:19.5},rowLink:{color:"#10462e",fontSize:15,fontWeight:"700",lineHeight:20.25},rowLinkIcon:{color:"#10462e",fontSize:15,fontWeight:"700",lineHeight:20.25},rowLinkChevron:{color:"#819d90",fontSize:15,fontWeight:"700",lineHeight:20.25},ghost:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},ghostBar:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},field:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},fieldLabel:{color:"#10462e",fontSize:15,fontWeight:"700",lineHeight:21},fieldInput:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},fieldInputText:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375}},PHONE_DECOR={body:{font:"sans"},pushBody:{font:"sans"},subtabs:{font:"sans",lineBottom:{width:1,color:"#e4e4e4"}},subtab:{font:"sans"},subtabCurrent:{font:"sans",insetBottom:{width:3,color:"#07c168"}},titleBlock:{font:"sans"},screenTitle:{font:"sans",wrap:"balance"},screenMeta:{font:"mono",wrap:"pretty"},stack:{font:"sans"},card:{font:"sans"},cardHead:{font:"sans"},cardTitle:{font:"sans"},cardTitleInHead:{font:"sans"},cardLink:{font:"sans"},cardLinkAfterNote:{font:"sans"},forLabel:{font:"mono"},forLabelNext:{font:"mono"},itemsLiFirst:{font:"sans"},itemsLiMid:{font:"sans"},itemsLiLast:{font:"sans"},thumb:{font:"sans"},thumbIcon:{font:"sans"},thumbPink:{font:"sans"},thumbYellow:{font:"sans"},thumbSage:{font:"sans"},itemsName:{font:"sans"},itemsMeta:{font:"sans"},itemsActs:{font:"sans"},itemsActLink:{font:"sans",underlineOffset:3},itemsActButton:{font:"sans",underlineOffset:3},itemsEnd:{font:"sans"},itemsPrice:{font:"sans"},pill:{font:"mono"},pillSoon:{font:"mono",ring:{width:1.25,color:"#f6d892"}},btnRow:{font:"sans"},btnRowIcon:{font:"sans"},btnRowLabel:{font:"sans"},sumTotal:{font:"sans"},sumRowFirst:{font:"sans"},sumRowLast:{font:"sans"},sumDt:{font:"sans"},sumDd:{font:"sans"},sumDdTotal:{font:"sans"},noteAfterSum:{font:"sans"},rowsLiFirst:{font:"sans"},rowsLiNext:{font:"sans"},rowsK:{font:"sans"},rowsV:{font:"sans"},rowsMeta:{font:"sans"},legal:{font:"sans"},legalText:{font:"sans"},traybar:{font:"sans",lineTop:{width:1,color:"#e4e4e4"}},btnInk:{font:"sans"},traybarFine:{font:"sans"},input:{font:"sans"},inputIcon:{font:"sans"},inputText:{font:"sans"},inputPlaceholder:{font:"sans"},filters:{font:"sans"},filter:{font:"sans"},filterCurrent:{font:"sans"},sectionHead:{font:"sans"},prods:{font:"sans"},prod:{font:"sans"},prodImg:{font:"sans"},prodIcon:{font:"sans"},prodTags:{font:"sans"},prodBody:{font:"sans"},prodName:{font:"sans"},prodMeta:{font:"sans"},prodPrice:{font:"sans"},pillClear:{font:"mono",ring:{width:1.5,color:"#07c168"}},pillPlain:{font:"mono",ring:{width:1.5,color:"rgba(16, 70, 46, 0.2)"}},pillOverdue:{font:"mono",ring:{width:1.25,color:"#c03410"}},hero:{font:"sans"},heroIcon:{font:"sans"},source:{font:"sans"},sourceIcon:{font:"sans"},sourceBold:{font:"sans"},sourceLink:{font:"sans",underlineOffset:3},choices:{font:"sans"},choiceCurrent:{font:"sans"},choice:{font:"sans"},radioOn:{font:"sans"},radioOff:{font:"sans"},choiceText:{font:"sans"},choiceTitle:{font:"sans"},choiceMeta:{font:"sans"},facts:{font:"sans"},factsLi:{font:"sans"},factsLiHer:{font:"sans"},factsK:{font:"sans"},factsN:{font:"sans"},factsUnit:{font:"sans"},noteAfterFacts:{font:"sans"},cardLead:{font:"sans"},person:{font:"sans"},avatar:{font:"sans",ring:{width:1,color:"#e4e4e4"}},personName:{font:"sans"},personMeta:{font:"sans"},sourceInCard:{font:"sans"},sourceInCardIcon:{font:"sans"},noteAfterSource:{font:"sans"},rxLead:{font:"sans"},btnOutlineSm:{font:"sans"},btnOutlineSmIcon:{font:"sans"},noteStandalone:{font:"sans"},noteLink:{font:"sans"},sumPlain:{font:"sans"},sumPlainRowFirst:{font:"sans"},sumPlainRowLast:{font:"sans"},sumPlainDd:{font:"sans"},planRowsLiFirst:{font:"sans"},planRowsLiNext:{font:"sans"},switch:{font:"sans"},switchTrack:{font:"sans"},switchKnob:{font:"sans",drop:{x:0,y:1,blur:2,spread:0,color:"rgba(16, 70, 46, 0.06)"}},switchTrackOff:{font:"sans"},switchKnobOff:{font:"sans",drop:{x:0,y:1,blur:2,spread:0,color:"rgba(16, 70, 46, 0.06)"}},breaks:{font:"sans"},btnSm:{font:"sans"},linkDanger:{font:"sans",underlineOffset:3},sheet:{font:"sans"},sheetBackdrop:{font:"sans"},sheetGrab:{font:"sans"},sheetGrabBar:{font:"sans"},sheetHead:{font:"sans"},sheetClose:{font:"sans"},sheetCloseIcon:{font:"sans"},sheetBody:{font:"sans"},sheetText:{font:"sans"},sheetActions:{font:"sans"},btnDanger:{font:"sans"},btnOutline:{font:"sans"},rec:{font:"sans"},recRow:{font:"sans"},recIcon:{font:"sans"},recText:{font:"sans"},recTitle:{font:"sans"},recMeta:{font:"sans"},recEnd:{font:"sans"},trackerLi:{font:"sans"},trackerLiLast:{font:"sans"},trackerLineDone:{font:"sans"},trackerLine:{font:"sans"},dotDone:{font:"sans"},dotDoneIcon:{font:"sans"},dotNow:{font:"sans"},dotNowCore:{font:"sans"},dotNext:{font:"sans"},trackerTitle:{font:"sans"},trackerTitleNext:{font:"sans"},trackerWhen:{font:"sans"},trackerText:{font:"sans"},pillStable:{font:"mono"},trackItemsEnd:{font:"sans"},trackItemsLiFirst:{font:"sans"},trackItemsLiLast:{font:"sans"},noteAfterTotal:{font:"sans"},rowLink:{font:"sans"},rowLinkIcon:{font:"sans"},rowLinkChevron:{font:"sans"},ghost:{font:"sans"},ghostBar:{font:"sans"},field:{font:"sans"},fieldLabel:{font:"sans"},fieldInput:{font:"sans"},fieldInputText:{font:"sans"}},PHONE_ICONS={shield:{size:56,uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKgAAACoCAQAAADeQm0/AAAK6klEQVR4Ae3BCbBVhWEA0HPveyDyBSGWzR2GuOMSo6VVo3XBoo5RxAJGDG6ALT/5T2syMdFGo0mclP4X/49bVBStSxBS9QOJURGraINRsxRRcWNxQVwG+YAs0uk4nZjKff/e9+7bnHeOhoaGhoaGhoaGOAK17XAjHWEnA/GW5R4z1wI1LFCrBppkoh191jLXu9EqNSlQm85wk21F63SWWWpQRi36mR/rppDuxtjWQ2pORq3p52GniuNwX3G/9WpKRm05wOP2Ftdg48z1rhqSUUvGmK2PJPo42x+8qGZk1IrtXOcqWUl1N04f82xWEwK14RAz7KZ4zxvjj2pARvVlXe5WfZWin3N0+i9VF6i2L7rHQdLxmDHeUlWBaurpEhfpIT2rXeEaG1VNoFoC4/3IjtL3kpzZqiRQHQe7wcHK52FTLFYFgco73jeNlMR/O9NGtztIEjNd4zEVFqik7s6Us59kOozViR6mO10yz/ipu21QMYFK2c0FztZfUt9zlT/7lqsltco013tFRQTKL2uUiY4WSKrTWB3+0gnu0lty89xglo3KLFBO3Y1wmpN9QTFedqIXfNZQcw1VjPfd714P2qBsAuUxxEH+wYmaFOtW3/ChrdvOvzlfsTrN9gvPeFUZBNKxvV3sbBe72MtehinNShPMVdgItxqkFOu96HkvWGaZ5V7TKQWBUhxtpOF2MkBP6bnLP3lf17Y31bnSs9bbVnjSXPMULVCcrPNdapC0vWKih8V3tGvtKW0rXG6aTYoQKMYBZhkibetc7mrJ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ukNRmu0kO61FGIQ67z1MWu0bcFXb7vrR5ctW529sKklGot1X4gqU+I+42ud4036sKllGMjUa71QJDda3Jg1ZoU4SM4rR50o99y3wlcrVa6mGHFCmjeAfd5QnfNVncOnd5Sy9k9M5brnaFtQZo1+LLNuillN7bYLtO223Qayl9QEofkNIHpPQBKX1ASh+Q0gek9AEpoYNC5/gonCv0byekhN4RqvBRmCW0zwkZoS1CS/VX48M0wjJThTY7ISP0rldN1Ok7ZrnXSz4Mp7rfPfoLveI9J2RELTBRaJQ6m9zpj07O11Q7V9wCEWlRjfabKiprjlG2OSSf6bLaNaqVT5k17jBI3M3WiciIW+0fnjVA1I0qLPaow4ozxAKzpcW1uM4vxKQl7bVWqayoEpeZ6bDfi5suq12jWnHzveAyKXGvmmqLhLRc73naThc7Q9QnTDbN2xqEpstq16hWaIJfull/cQ1mut8BOTLye8HLbveAgaLKrFdvrt26NsLjrpPUbKElWuWV1pUPbLbKGcYKRGXNMcJWLZguq12jWpyqyk+MEddmhal+rU0X0rpz2M+9ZLTzRKWMM1fadl+X1a5RrWnWukaJuHpTrNaiG4FCXKvGSEl/8R8XabddqwmSGlSq06NAob7pQQMUrtkjFitIoHBnWmSGlJ61WanKAQUKFGeM5SboXr15dilCoHjXqjFSfg0q1SlSoDf6uUOVgeKaLbREq6IFeutM95mnn3bvW+5RTXolcDKGKnMe3vGGAz520v4HN6Zvz27hkx4AAAAASUVORK5CYII="},bag:{size:22,uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEIAAABCCAQAAABJXchjAAAC/UlEQVR4Ae3BXWiVZQAA4Od792m0UJhSQy+GdZHrSBDLrF0kDbuwELstUgmDfjToIgw0MRW7kSAQEiJJbwJBjcDALgx/yDCK/F8QFKbEmmKazZuQFqLf+c62c7b3bGeH78LncdcdidFN86ipJuZfpw0YRWI0r9qhMVbaqaYWtfXYK9EYSx11Xg1BLbPslWiUxF6z1BBUF+wxQyPNsEdQVYvqNlqu0TokDqsiVc0iG+QO22T8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saBbu0KcqUs6deH7lcLLG/yxzvS1sM5lhPuMsBSiLTFfTKkJOmaIM2QWSSaxzlNz9IM8MdnnSCSKW8dgW9UkWynO01DSpts9THvrbOWkc7yvGmmmm0SrvEgqJWRSki2SZ63wRD9b0rvaBFUNSqaA852Xo8Y5dT7ada/e5xqe8VtMtL5LUr6DVAzmB2WO5lh5qkGovM9ZYd6FXQLi+R166gV4VINSa61CUmyrLWQi9ar1yLFVoERa2KykSqd5oOJ6lXr97BtunTZ4vPLfSxNC1WaBEUtSr6V2QktVihRVDUqmi3nJHUq6BdXiLvEG/aLTayis5QFFzkALvFRlqnVkWJRf6wW87I6/WGc4z1jfm2+Y+NcqL97PO/8g+Ihe5zzyrCeQAAAABJRU5ErkJggg=="},check:{size:16,uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAQAAAD9CzEMAAABVUlEQVR4Ae3Bu20UQQAA0Lde13AF0AQSLZglQISklphxAUAdyDOSJXIyMlIaOG0CLTAShBTgI1jGd+fznu+XgPY9k8nkP9A4pdfeWXjrizut0wk+mpl55oOFv86cSpAMGivOnUZ0rXrv1p0zpxBcq6JPVjSOFyRVlK1pHCtIqii7p3GcIKmibEPjGEFSRdkDGocLkirKHtQ4VJBUUTaicZggqaJsVGvVhc+C377ZLkqqKNuitXTuqydmXip644KkirKtzqxaGNy4NCZIqih7RGvpVvHKoPPT3KYoqa5kj2qt+q7oDJ4reuuCpIqyHbTW9YrOoFP0loKkirKdtO7rFZ1Bp+gNgqSKsh21NvWKzqBT9AiSKsp21npIr+gMOsVTSRVle2iMeSPbFGV7aY2Z++XCuivZnlrj5orOUpTtrbVNr+gMouwAre16P7zApRuTyWTyz/oDUB1ZN9kNGUEAAAAASUVORK5CYII="},file:{size:16,uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAQAAAD9CzEMAAABtElEQVR4Ad3Bv2rUcAAA4K+/ZndUXARBIp3cxEkQHYq4aOmiHQTvQH0GIw30DYTK3WhdgqBu/sHdQe2mzQNY6wM4V0oI5rze7+5yZNDv889bMm7DTZecNN03W56LWjLqlOeumMcD2yKWjXrjsvlct++LiZY13fPQ/G746ZMJEk23VF54ZM9kh0Zt46ljBU2XVB7bM4u+2raeYwVNJ1S+ms1QX22g5xjBYob6agM9Y4JFDfXVBnr+EixuqK820DMiaONAZUVl6IHawG0NQRu7KpvOqWy7r7alIdHGwKoja9aMO6MhaOOVD2aUiFmXS1VKmULtjmeumkEQk0vVUrk/Dlyz4aV9UyTa27Fj1KExQUymVCtlWkjEFAoLCjoWdCzoWCJmXS4VV8oUJgpicqlpUrmIoGNBTKY0TSkTkYgpFBYUdCzoWNCxRMy6XCqulClMFMTkUtOkchFBx4KYTGmaUiYiEVMoLCjoWNCxoGNB04HKijZWVH5oCJp2VTadM6/zNlU+a0g0Da06smZNe080BE0vfbCo195qWDbqnQvOau+9u35pWDLujpsuOm0+3330yo7/zm9pA1VwIYzMRQAAAABJRU5ErkJggg=="},message:{size:20,uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAQAAACQ9RH5AAAD+UlEQVR4Ae3Bf4iW9QEA8M/7vVfIS67uamWlcZW1cE7SrD8qNK2z2hzbXJ60QtoUrP5IiiiSKJIiCIoo65/KiDIz1jbJ+WtalDXH8kedyVwL71REa8w8Uy/jrDievu/zvK/v/X76z8/HCSf8WAr65wzXmORnGtSpU2efXfbZY7s1tuuHgr76rWtdbbTutVltueX6pKAvrrHQxfpmk7k26VVBby72pBv0x3dedZ+9elTQkwYLzFXUfwc1W60HBd1rtN4IlfZYYa1W++33pQb16l3kJtNUesgC3SrozgjrNcra4Qlrfaq6er93j0ZZy9zssKoKqhvufRdI7fegZ/XuNgv8RGqrKxxSRY1qhnvPKKnHzPC+vthooVNdLjrTWEtUUaOa1S4RtbvSq47qq04r7PJLQeIiRe84To3jNbtb9JUmG/XXR9aZbqjERC22q1Cj0lCrDJM4pMm/DMRuG8wSJH7lLV8oU6PSI64X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BWtN/6WzbJktEO0XdArWoPOKMlmWTLaLNoq6BWtQaeqJkk2y5LRRtE2Qa9oDTrVpWqSZLMsGW0SbRH0itagU12pJkk2y5LRBtF6Qa9oDTpVq5ok2SxLRqtFawW9ojXoVF+rJkk2y5LRStE6Qa9oDTrVdapJks2yZLRKtEbQK1qDTvUt1STJZlkyWiE6LOgVrUGnWlJNkmyWJaODokOCXtEadKpDqkmSzbJkdEC0LOgVrUGnWqOaJNksS0aLomW/+1Vr0KnWqiZJNsui9xYES+450xp0qi0+e2rQOnPHgmDJbSdmg0611WdPDWa3RAuiJR899MgXFzr7VO/8KPviwlsLomV/+uCJT1546Sb+8sETn7zw0o3dd9f3cN9dR0dHR0dHR/97/wCCc9FG6sbg8AAAAABJRU5ErkJggg=="}};function face(f,weight){return f?typeof f=="string"?{fontFamily:f,fontWeight:weight}:{fontFamily:weight==="700"?f.bold??f.regular:weight==="500"?f.medium??f.regular:f.regular}:{fontWeight:weight}}function makeKit(options){let views=/* @__PURE__ */new Map,texts=/* @__PURE__ */new Map,types=/* @__PURE__ */new Map,type=key=>{let s=types.get(key);if(!s){let{fontWeight:fontWeight,...rest}=PHONE_TEXT[key];s={...rest,...face(PHONE_DECOR[key].font==="mono"?options.fonts?.mono:options.fonts?.sans,fontWeight)},types.set(key,s)}return s};return{options:options,v(key){let s=views.get(key);return s||(s={...PHONE_BOX[key]},views.set(key,s)),s},t(key){let s=texts.get(key);return s||(s={...PHONE_BOX[key],...type(key)},texts.set(key,s)),s},tx:type}}var DEFAULT_KIT=makeKit({}),KitContext=react.createContext(DEFAULT_KIT);function ShopKitProvider({fonts:fonts,renderIcon:renderIcon,children:children}){let kit=react.useMemo(()=>makeKit({...fonts?{fonts:fonts}:{},...renderIcon?{renderIcon:renderIcon}:{}}),[fonts,renderIcon]);return react.createElement(KitContext.Provider,{value:kit},children)}function useKit(){return react.useContext(KitContext)}function inkOf(key){return PHONE_TEXT[key].color??"#000000"}function Decor({k:k}){let d=PHONE_DECOR[k],radius=PHONE_BOX[k].borderRadius??0,out=[];if(d.ring){let ring=reactNative.Platform.OS==="web"?{boxShadow:`inset 0 0 0 ${d.ring.width}px ${d.ring.color}`}:{borderWidth:d.ring.width,borderColor:d.ring.color};out.push(react.createElement(reactNative.View,{key:"ring",pointerEvents:"none",style:[{position:"absolute",top:0,right:0,bottom:0,left:0,borderRadius:radius},ring]}))}return d.insetBottom&&out.push(react.createElement(reactNative.View,{key:"bar",pointerEvents:"none",style:{position:"absolute",right:0,bottom:0,left:0,height:d.insetBottom.width,backgroundColor:d.insetBottom.color}})),d.lineTop&&out.push(react.createElement(reactNative.View,{key:"top",pointerEvents:"none",style:{position:"absolute",right:0,top:-d.lineTop.width,left:0,height:d.lineTop.width,backgroundColor:d.lineTop.color}})),d.lineBottom&&out.push(react.createElement(reactNative.View,{key:"bottom",pointerEvents:"none",style:{position:"absolute",right:0,bottom:-d.lineBottom.width,left:0,height:d.lineBottom.width,backgroundColor:d.lineBottom.color}})),out.length?out:null}function dropShadow(k){let d=PHONE_DECOR[k].drop;return d?reactNative.Platform.OS==="web"?{boxShadow:`${d.x}px ${d.y}px ${d.blur}px ${d.spread}px ${d.color}`}:{shadowColor:d.color,shadowOpacity:1,shadowRadius:d.blur/2,shadowOffset:{width:d.x,height:d.y}}:null}function Icon({name:name,size:size,color:color,style:style}){let own=useKit().options.renderIcon?.({name:name,size:size,color:color});if(own!=null)return react.createElement(reactNative.View,{style:[{width:size,height:size},style],pointerEvents:"none"},own);let img=[{width:size,height:size,tintColor:color},style];return react.createElement(reactNative.Image,{source:{uri:PHONE_ICONS[name].uri},style:img,accessible:false,importantForAccessibility:"no",resizeMode:"contain"})}function PartIcon({name:name,k:k,inkKey:inkKey,style:style}){let box=PHONE_BOX[k];return react.createElement(Icon,{name:name,size:box.width??24,color:inkOf(inkKey??k),style:[box.marginTop?{marginTop:box.marginTop}:null,style]})}function T({k:k,style:style,children:children,lines:lines,role:role,bare:bare}){let kit=useKit();return react.createElement(reactNative.Text,{style:[bare?kit.tx(k):kit.t(k),wrapStyle(k),style],...wrapOf(k),...lines?{numberOfLines:lines}:{},...role?{accessibilityRole:role}:{}},children)}function wrapOf(k){return PHONE_DECOR[k].wrap?reactNative.Platform.OS==="web"?{}:reactNative.Platform.OS==="ios"?{lineBreakStrategyIOS:"standard"}:{textBreakStrategy:"balanced"}:{}}function wrapStyle(k){let w=PHONE_DECOR[k].wrap;return w&&reactNative.Platform.OS==="web"?{textWrap:w}:null}function underline(k){let off=PHONE_DECOR[k].underlineOffset;return off?{textUnderlineOffset:off}:{}}function Press({onPress:onPress,disabled:disabled,label:label,style:style,children:children,role:role="button",selected:selected}){return react.createElement(reactNative.Pressable,{onPress:disabled?void 0:onPress,disabled:disabled===true,accessibilityRole:role,...label?{accessibilityLabel:label}:{},accessibilityState:{disabled:disabled===true,...selected!==void 0?{selected:selected,checked:selected}:{}},style:style},children)}function phoneLabel(label){return label.replace(/\s*→$/,"")}var TAB_ROUTE={package:{name:"package"},shop:{name:"shop"},orders:{name:"orders"},plan:{name:"plan"}};function tabLabel(copy,tab){return tab==="package"?copy.tabPackage:tab==="shop"?copy.tabShop:tab==="orders"?copy.tabOrders:copy.tabPlan}function CareTabs({copy:copy,current:current,tabs:tabs}){let kit=useKit(),nav=useShopNativeNav();/* @__PURE__ */
4
4
  return jsxRuntime.jsxs(reactNative.View,{style:[kit.v("subtabs"),{flexDirection:"row",zIndex:1}],accessibilityRole:"tablist",accessibilityLabel:copy.tabsLabel,testID:"shop-subtabs",children:[tabs.map(tab=>{let on=tab===current,k=on?"subtabCurrent":"subtab";/* @__PURE__ */
5
5
  return jsxRuntime.jsxs(Press,{role:"tab",selected:on,onPress:()=>nav.go(TAB_ROUTE[tab]),style:[kit.v(k),{flex:1,alignItems:"center",justifyContent:"center"}],children:[
6
6
  /* @__PURE__ */jsxRuntime.jsx(T,{k:k,bare:true,children:tabLabel(copy,tab)}),
7
7
  /* @__PURE__ */jsxRuntime.jsx(Decor,{k:k})]},tab)}),
8
- /* @__PURE__ */jsxRuntime.jsx(Decor,{k:"subtabs"})]})}function Frame({tabs:tabs,tray:tray,children:children}){let kit=useKit();/* @__PURE__ */
8
+ /* @__PURE__ */jsxRuntime.jsx(Decor,{k:"subtabs"})]})}function Frame({tabs:tabs,tray:tray,onNearEnd:onNearEnd,children:children}){let kit=useKit(),near=react.useRef(onNearEnd);near.current=onNearEnd;let box=react.useRef({offset:0,view:0,content:0}),check=()=>{let b=box.current;near.current&&b.view>0&&b.content>0&&b.offset+b.view*2>=b.content&&near.current()},paging=onNearEnd===void 0?{}:{scrollEventThrottle:100,onLayout:e=>{box.current.view=e.nativeEvent.layout.height,check()},onContentSizeChange:(_w,h)=>{box.current.content=h,check()},onScroll:e=>{let n=e.nativeEvent;box.current={offset:n.contentOffset.y,view:n.layoutMeasurement.height,content:n.contentSize.height},check()}};/* @__PURE__ */
9
9
  return jsxRuntime.jsxs(reactNative.View,{style:{flex:1,backgroundColor:PHONE_BOX.subtabs.backgroundColor},children:[tabs?/* @__PURE__ */jsxRuntime.jsx(CareTabs,{copy:tabs.copy,current:tabs.current,tabs:tabs.tabs}):null,
10
- /* @__PURE__ */jsxRuntime.jsx(reactNative.ScrollView,{style:{flex:1},contentContainerStyle:[kit.v(tabs?"body":"pushBody"),BODY_END],keyboardShouldPersistTaps:"handled",children:/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{testID:"shop-body",children:children})}),tray??null]})}var BODY_END={paddingBottom:PHONE_BOX.breaks.columnGap};function TitleBlock({title:title,meta:meta}){let kit=useKit();/* @__PURE__ */
10
+ /* @__PURE__ */jsxRuntime.jsx(reactNative.ScrollView,{style:{flex:1},contentContainerStyle:[kit.v(tabs?"body":"pushBody"),BODY_END],keyboardShouldPersistTaps:"handled",...paging,children:/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{testID:"shop-body",children:children})}),tray??null]})}var BODY_END={paddingBottom:PHONE_BOX.breaks.columnGap};function TitleBlock({title:title,meta:meta}){let kit=useKit();/* @__PURE__ */
11
11
  return jsxRuntime.jsxs(reactNative.View,{style:kit.v("titleBlock"),children:[
12
12
  /* @__PURE__ */jsxRuntime.jsx(T,{k:"screenTitle",role:"header",children:title}),meta?/* @__PURE__ */jsxRuntime.jsx(T,{k:"screenMeta",children:meta}):null]})}function Stack({children:children}){let kit=useKit();/* @__PURE__ */
13
13
  return jsxRuntime.jsx(reactNative.View,{style:kit.v("stack"),children:children})}function Card({children:children,label:label,style:style}){let kit=useKit();/* @__PURE__ */
@@ -35,8 +35,8 @@ return jsxRuntime.jsx(reactNative.View,{testID:"shop-legal",children:/* @__PURE_
35
35
  return jsxRuntime.jsx(Press,{onPress:action.onPress,disabled:action.disabled===true,style:[kit.v("btnInk"),{flexDirection:"row",alignItems:"center",justifyContent:"center"}],children:/* @__PURE__ */jsxRuntime.jsx(T,{k:"btnInk",bare:true,children:busyLabel(action)})})}function OutlineButton({action:action,k:k,icon:icon,iconKey:iconKey}){let kit=useKit();/* @__PURE__ */
36
36
  return jsxRuntime.jsxs(Press,{onPress:action.onPress,disabled:action.disabled===true,style:[kit.v(k),{flexDirection:"row",alignItems:"center",justifyContent:"center",alignSelf:k==="btnOutline"||k==="btnDanger"?"stretch":"flex-start"}],children:[icon&&iconKey?/* @__PURE__ */jsxRuntime.jsx(PartIcon,{name:icon,k:iconKey,inkKey:k}):null,
37
37
  /* @__PURE__ */jsxRuntime.jsx(T,{k:k==="btnRow"?"btnRowLabel":k,bare:true,children:busyLabel(action)})]})}function ActText({label:label,onPress:onPress,disabled:disabled}){/* @__PURE__ */
38
- return jsxRuntime.jsx(Press,{onPress:onPress,disabled:disabled===true,children:/* @__PURE__ */jsxRuntime.jsx(T,{k:"itemsActButton",bare:true,style:[underline("itemsActButton"),{textAlign:"left"}],children:label})})}function TrayBar({action:action,fine:fine,error:error}){let kit=useKit();return!action&&!fine&&!error?null:/* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:kit.v("traybar"),testID:"shop-traybar",children:[
39
- /* @__PURE__ */jsxRuntime.jsx(InlineError,{line:error??null}),action?/* @__PURE__ */jsxRuntime.jsx(InkButton,{action:action}):null,fine?/* @__PURE__ */jsxRuntime.jsx(T,{k:"traybarFine",children:fine}):null,
38
+ return jsxRuntime.jsx(Press,{onPress:onPress,disabled:disabled===true,children:/* @__PURE__ */jsxRuntime.jsx(T,{k:"itemsActButton",bare:true,style:[underline("itemsActButton"),{textAlign:"left"}],children:label})})}function TrayBar({action:action,fine:fine2,error:error}){let kit=useKit();return!action&&!fine2&&!error?null:/* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:kit.v("traybar"),testID:"shop-traybar",children:[
39
+ /* @__PURE__ */jsxRuntime.jsx(InlineError,{line:error??null}),action?/* @__PURE__ */jsxRuntime.jsx(InkButton,{action:action}):null,fine2?/* @__PURE__ */jsxRuntime.jsx(T,{k:"traybarFine",children:fine2}):null,
40
40
  /* @__PURE__ */jsxRuntime.jsx(Decor,{k:"traybar"})]})}function Ghost({rows:rows=3}){let kit=useKit(),widths=["100%","82%","64%"];/* @__PURE__ */
41
41
  return jsxRuntime.jsx(reactNative.View,{style:kit.v("ghost"),accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants",children:Array.from({length:rows},(_,i)=>/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:[kit.v("ghostBar"),{width:widths[i%3]}]},i))})}function LoadFailed({copy:copy,thing:thing,retry:retry}){/* @__PURE__ */
42
42
  return jsxRuntime.jsxs(Card,{children:[
@@ -61,11 +61,11 @@ return jsxRuntime.jsx(reactNative.Modal,{visible:open,transparent:true,animation
61
61
  return jsxRuntime.jsx(reactNative.View,{style:{rowGap:kit.v("stack").rowGap,marginTop:kit.v("stack").rowGap},children:children})}var FIELD_LIMITS={label:60,recipientName:100,line1:100,line2:100,city:60,region:60,postalCode:16},AUTOFILL={label:{autoComplete:"off"},recipientName:{autoComplete:"name",textContentType:"name"},line1:{autoComplete:"address-line1",textContentType:"streetAddressLine1"},line2:{autoComplete:"address-line2",textContentType:"streetAddressLine2"},city:{autoComplete:"off",textContentType:"addressCity"},region:{autoComplete:"off",textContentType:"addressState"},postalCode:{autoComplete:"postal-code",textContentType:"postalCode"}};function Field({label:label,value:value,name:name,onChange:onChange}){let kit=useKit(),fill=AUTOFILL[name];/* @__PURE__ */
62
62
  return jsxRuntime.jsxs(reactNative.View,{style:kit.v("field"),children:[
63
63
  /* @__PURE__ */jsxRuntime.jsx(T,{k:"fieldLabel",children:label}),
64
- /* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:[kit.v("fieldInput"),{flexDirection:"row",alignItems:"center"}],children:/* @__PURE__ */jsxRuntime.jsx(reactNative.TextInput,{style:[kit.t("fieldInputText"),{flex:1,minWidth:0}],value:value,onChangeText:onChange,accessibilityLabel:label,autoComplete:fill.autoComplete,...fill.textContentType?{textContentType:fill.textContentType}:{},autoCapitalize:name==="region"?"characters":"words",autoCorrect:false,maxLength:FIELD_LIMITS[name],...name==="postalCode"?{keyboardType:"number-pad"}:{}})})]})}function AddressFormScreen({copy:copy,busy:busy,error:error,onSave:onSave}){let[f,setF]=react.useState({label:"",recipientName:"",line1:"",line2:"",city:"",region:"",postalCode:""}),set=k=>v=>setF(prev=>({...prev,[k]:v.slice(0,FIELD_LIMITS[k])})),ready=!!(f.label.trim()&&f.recipientName.trim()&&f.line1.trim()&&f.city.trim()&&f.region.trim()&&f.postalCode.trim()),submit=()=>{!ready||busy||onSave({label:f.label.trim(),makeDefault:true,address:{recipientName:f.recipientName.trim(),line1:f.line1.trim(),line2:f.line2.trim()||null,city:f.city.trim(),region:f.region.trim().toUpperCase(),postalCode:f.postalCode.trim(),country:"US"}})},fields=[["label",copy.addressLabel],["recipientName",copy.addressRecipient],["line1",copy.addressLine1],["line2",copy.addressLine2],["city",copy.addressCity],["region",copy.addressRegion],["postalCode",copy.addressPostal]];/* @__PURE__ */
64
+ /* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:[kit.v("fieldInput"),{flexDirection:"row",alignItems:"center"}],children:/* @__PURE__ */jsxRuntime.jsx(reactNative.TextInput,{style:[kit.t("fieldInputText"),{flex:1,minWidth:0}],value:value,onChangeText:onChange,accessibilityLabel:label,autoComplete:fill.autoComplete,...fill.textContentType?{textContentType:fill.textContentType}:{},autoCapitalize:name==="region"?"characters":"words",autoCorrect:false,maxLength:FIELD_LIMITS[name],...name==="postalCode"?{keyboardType:"number-pad"}:{}})})]})}function AddressFormScreen({copy:copy,busy:busy,error:error,onSave:onSave}){let[f,setF]=react.useState({label:"",recipientName:"",line1:"",line2:"",city:"",region:"",postalCode:""}),set2=k=>v=>setF(prev=>({...prev,[k]:v.slice(0,FIELD_LIMITS[k])})),ready=!!(f.label.trim()&&f.recipientName.trim()&&f.line1.trim()&&f.city.trim()&&isUsState(f.region)&&US_ZIP.test(f.postalCode.trim())),submit=()=>{!ready||busy||onSave({label:f.label.trim(),makeDefault:false,address:{recipientName:f.recipientName.trim(),line1:f.line1.trim(),line2:f.line2.trim()||null,city:f.city.trim(),region:f.region.trim().toUpperCase(),postalCode:f.postalCode.trim(),country:"US"}})},fields=[["label",copy.addressLabel],["recipientName",copy.addressRecipient],["line1",copy.addressLine1],["line2",copy.addressLine2],["city",copy.addressCity],["region",copy.addressRegion],["postalCode",copy.addressPostal]];/* @__PURE__ */
65
65
  return jsxRuntime.jsxs(Frame,{children:[
66
66
  /* @__PURE__ */jsxRuntime.jsx(Stack,{children:/* @__PURE__ */jsxRuntime.jsxs(Card,{children:[
67
67
  /* @__PURE__ */jsxRuntime.jsx(CardTitle,{children:copy.addressTitle}),
68
- /* @__PURE__ */jsxRuntime.jsxs(Gap,{children:[fields.map(([k,label])=>/* @__PURE__ */jsxRuntime.jsx(Field,{name:k,label:label,value:f[k],onChange:set(k)},k)),
68
+ /* @__PURE__ */jsxRuntime.jsxs(Gap,{children:[fields.map(([k,label])=>/* @__PURE__ */jsxRuntime.jsx(Field,{name:k,label:label,value:f[k],onChange:set2(k)},k)),
69
69
  /* @__PURE__ */jsxRuntime.jsx(InlineError,{line:error}),
70
70
  /* @__PURE__ */jsxRuntime.jsx(InkButton,{action:{label:copy.addressSave,busyLabel:copy.saving,busy:busy,disabled:!ready||busy,onPress:submit}})]})]})}),
71
71
  /* @__PURE__ */jsxRuntime.jsx(Legal,{line:copy.legal})]})}function CardSetupScreen({copy:copy,start:start,error:error}){/* @__PURE__ */
@@ -92,16 +92,7 @@ return jsxRuntime.jsxs(Frame,{children:[
92
92
  /* @__PURE__ */jsxRuntime.jsx(T,{k:"cardLead",children:copy.consentBody}),
93
93
  /* @__PURE__ */jsxRuntime.jsxs(Gap,{children:[terms?/* @__PURE__ */jsxRuntime.jsx(Press,{role:"link",label:terms.label,onPress:()=>nav.openExternal(terms.href),style:[kit.v("cardLink"),{alignSelf:"flex-start"}],children:/* @__PURE__ */jsxRuntime.jsx(T,{k:"cardLink",bare:true,style:underline("cardLink"),children:terms.label})}):null,needs.map(n=>/* @__PURE__ */jsxRuntime.jsx(ShopLinkText,{link:n,style:{alignSelf:"flex-start"}},n.label)),
94
94
  /* @__PURE__ */jsxRuntime.jsx(InlineError,{line:error}),agree?/* @__PURE__ */jsxRuntime.jsx(InkButton,{action:agree}):null]})]})}),
95
- /* @__PURE__ */jsxRuntime.jsx(Legal,{line:copy.legal})]})}var ICON_COLUMN=22;function OrderRow({row:row}){let kit=useKit(),nav=useShopNativeNav(),gap=kit.v("recRow").columnGap;/* @__PURE__ */
96
- return jsxRuntime.jsxs(Press,{role:"link",label:[row.title,row.meta,row.pill?.label].filter(Boolean).join(", "),onPress:()=>nav.go(row.to),style:[kit.v("recRow"),{flexDirection:"row",alignItems:"center",rowGap:0,columnGap:0}],children:[
97
- /* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:{width:ICON_COLUMN,marginRight:gap},children:/* @__PURE__ */jsxRuntime.jsx(PartIcon,{name:row.icon,k:"recIcon"})}),
98
- /* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:[kit.v("recText"),{flex:1,minWidth:0}],children:[
99
- /* @__PURE__ */jsxRuntime.jsx(T,{k:"recTitle",children:row.title}),
100
- /* @__PURE__ */jsxRuntime.jsx(T,{k:"recMeta",children:row.meta})]}),row.pill?/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:[kit.v("recEnd"),{flexDirection:"row",alignItems:"center",marginLeft:gap}],children:/* @__PURE__ */jsxRuntime.jsx(Pill,{pill:row.pill})}):null]})}function OrdersScreen({copy:copy,tabs:tabs,view:view}){let kit=useKit(),rows=view.rows;/* @__PURE__ */
101
- return jsxRuntime.jsxs(Frame,{tabs:{copy:copy,current:"orders",tabs:tabs},children:[
102
- /* @__PURE__ */jsxRuntime.jsx(TitleBlock,{title:copy.ordersTitle,meta:view.sub}),
103
- /* @__PURE__ */jsxRuntime.jsx(Stack,{children:rows.phase==="failed"?/* @__PURE__ */jsxRuntime.jsx(LoadFailed,{copy:copy,thing:copy.thingOrders,retry:rows.retry}):/* @__PURE__ */jsxRuntime.jsxs(Card,{label:copy.allOrders,children:[rows.phase==="loading"?/* @__PURE__ */jsxRuntime.jsx(Ghost,{}):null,rows.phase==="ready"&&rows.value.length===0?/* @__PURE__ */jsxRuntime.jsx(T,{k:"cardLead",children:view.emptyLine}):null,rows.phase==="ready"&&rows.value.length>0?/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:kit.v("rec"),children:rows.value.map(r=>/* @__PURE__ */jsxRuntime.jsx(OrderRow,{row:r},r.key))}):null,view.more?/* @__PURE__ */jsxRuntime.jsx(OutlineButton,{k:"btnSm",action:view.more}):null]})}),
104
- /* @__PURE__ */jsxRuntime.jsx(Legal,{line:view.legal})]})}var FIRST_LABEL={marginTop:Math.max(0,PHONE_BOX.forLabel.marginTop-PHONE_BOX.cardHead.marginBottom)};function PackageScreen({copy:copy,tabs:tabs,view:view}){let kit=useKit(),nav=useShopNativeNav(),frame={copy:copy,current:"package",tabs:tabs};if(view.phase!=="ready")/* @__PURE__ */
95
+ /* @__PURE__ */jsxRuntime.jsx(Legal,{line:copy.legal})]})}var FIRST_LABEL={marginTop:Math.max(0,PHONE_BOX.forLabel.marginTop-PHONE_BOX.cardHead.marginBottom)};function PackageScreen({copy:copy,tabs:tabs,view:view}){let kit=useKit(),nav=useShopNativeNav(),frame={copy:copy,current:"package",tabs:tabs};if(view.phase!=="ready")/* @__PURE__ */
105
96
  return jsxRuntime.jsxs(Frame,{tabs:frame,children:[
106
97
  /* @__PURE__ */jsxRuntime.jsx(TitleBlock,{title:copy.tabPackage}),
107
98
  /* @__PURE__ */jsxRuntime.jsx(Stack,{children:view.phase==="failed"?/* @__PURE__ */jsxRuntime.jsx(LoadFailed,{copy:copy,thing:copy.thingPackage,retry:view.retry}):/* @__PURE__ */jsxRuntime.jsxs(Card,{children:[
@@ -199,8 +190,8 @@ return jsxRuntime.jsxs(Press,{role:"link",label:label,onPress:()=>nav.go(tile.to
199
190
  /* @__PURE__ */jsxRuntime.jsx(T,{k:"prodName",children:tile.name}),tile.meta?/* @__PURE__ */jsxRuntime.jsx(T,{k:"prodMeta",children:tile.meta}):null,tile.price?/* @__PURE__ */jsxRuntime.jsx(T,{k:"prodPrice",children:tile.price}):null]})]})}function GhostTiles({n:n}){let kit=useKit();/* @__PURE__ */
200
191
  return jsxRuntime.jsx(reactNative.View,{accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants",children:/* @__PURE__ */jsxRuntime.jsx(Prods,{children:Array.from({length:n},(_,i)=>/* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:[kit.v("prod"),{flex:1,minWidth:0}],children:[
201
192
  /* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:[kit.v("prodImg"),{backgroundColor:tileTint("base")}]}),
202
- /* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:kit.v("prodBody"),children:/* @__PURE__ */jsxRuntime.jsx(Ghost,{rows:2})})]},i))})})}function ShopScreen({copy:copy,tabs:tabs,view:view}){let kit=useKit(),nav=useShopNativeNav(),shelves=view.shelves;/* @__PURE__ */
203
- return jsxRuntime.jsxs(Frame,{tabs:{copy:copy,current:"shop",tabs:tabs},children:[
193
+ /* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:kit.v("prodBody"),children:/* @__PURE__ */jsxRuntime.jsx(Ghost,{rows:2})})]},i))})})}function ShopScreen({copy:copy,tabs:tabs,view:view}){let kit=useKit(),nav=useShopNativeNav(),shelves=view.shelves,more=shelves.phase==="ready"?view.more??null:null;/* @__PURE__ */
194
+ return jsxRuntime.jsxs(Frame,{tabs:{copy:copy,current:"shop",tabs:tabs},onNearEnd:more&&!more.loading&&!more.failed?more.onMore:null,children:[
204
195
  /* @__PURE__ */jsxRuntime.jsx(TitleBlock,{title:copy.shopTitle,meta:view.sub}),
205
196
  /* @__PURE__ */jsxRuntime.jsxs(Stack,{children:[
206
197
  /* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:[kit.v("input"),{flexDirection:"row",alignItems:"center"}],children:[
@@ -209,54 +200,229 @@ return jsxRuntime.jsxs(Frame,{tabs:{copy:copy,current:"shop",tabs:tabs},children
209
200
  return jsxRuntime.jsx(Press,{role:"tab",selected:f.current,...f.to?{onPress:()=>nav.go(f.to)}:{},style:[kit.v(k),{flexDirection:"row",alignItems:"center"}],children:/* @__PURE__ */jsxRuntime.jsx(T,{k:k,bare:true,children:f.label})},f.label)})}):null,shelves.phase==="failed"?/* @__PURE__ */jsxRuntime.jsx(LoadFailed,{copy:copy,thing:copy.thingShop,retry:shelves.retry}):null,shelves.phase==="loading"?/* @__PURE__ */jsxRuntime.jsx(GhostTiles,{n:6}):null,shelves.phase==="ready"?shelves.value.filter(s=>s.tiles.length>0).map(s=>/* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{children:[
210
201
  /* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:[kit.v("sectionHead"),{flexDirection:"row",flexWrap:"wrap",alignItems:"center",justifyContent:"space-between"}],children:[
211
202
  /* @__PURE__ */jsxRuntime.jsx(T,{k:"cardTitleInHead",role:"header",children:s.title}),s.link?/* @__PURE__ */jsxRuntime.jsx(ShopLinkText,{link:s.link}):null]}),
212
- /* @__PURE__ */jsxRuntime.jsx(Prods,{children:s.tiles.map(t=>/* @__PURE__ */jsxRuntime.jsx(Tile,{tile:t},t.key))})]},s.key)):null,shelves.phase==="ready"&&view.empty?/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{accessibilityLiveRegion:"polite",children:/* @__PURE__ */jsxRuntime.jsx(T,{k:"cardLead",children:view.empty})}):null]}),
213
- /* @__PURE__ */jsxRuntime.jsx(Legal,{line:view.legal})]})}var DOT_COLUMN=28;function Dot({state:state}){let kit=useKit();return state==="done"?/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:[kit.v("dotDone"),{alignItems:"center",justifyContent:"center"}],children:/* @__PURE__ */jsxRuntime.jsx(PartIcon,{name:"check",k:"dotDoneIcon",inkKey:"dotDone"})}):state==="now"?/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:[kit.v("dotNow"),{alignItems:"center",justifyContent:"center"}],children:/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:kit.v("dotNowCore")})}):/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:kit.v("dotNext")})}function Tracker({copy:copy,steps:steps}){let kit=useKit();/* @__PURE__ */
214
- return jsxRuntime.jsx(reactNative.View,{children:steps.map((s,i)=>{let last=i===steps.length-1,li=kit.v(last?"trackerLiLast":"trackerLi"),titleKey=s.state==="next"?"trackerTitleNext":"trackerTitle";/* @__PURE__ */
215
- return jsxRuntime.jsxs(reactNative.View,{style:[li,{flexDirection:"row",alignItems:"flex-start",rowGap:0,columnGap:0}],accessible:true,accessibilityLabel:[s.title,s.state==="now"?copy.now:null,s.when,s.text].filter(Boolean).join(", "),children:[last?null:/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:kit.v(s.state==="done"?"trackerLineDone":"trackerLine")}),
216
- /* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:{width:DOT_COLUMN,marginRight:li.columnGap},children:/* @__PURE__ */jsxRuntime.jsx(Dot,{state:s.state})}),
217
- /* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:{flex:1,minWidth:0},children:[
218
- /* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:[kit.v(titleKey),{flexDirection:"row",flexWrap:"wrap",alignItems:"center"}],children:[
219
- /* @__PURE__ */jsxRuntime.jsx(T,{k:titleKey,bare:true,children:s.title}),s.state==="now"?/* @__PURE__ */jsxRuntime.jsx(Pill,{pill:{label:copy.now,tone:"stable"}}):null]}),s.when?/* @__PURE__ */jsxRuntime.jsx(T,{k:"trackerWhen",children:s.when}):null,s.text?/* @__PURE__ */jsxRuntime.jsx(T,{k:"trackerText",children:s.text}):null]})]},s.key)})})}function TrackingScreen({copy:copy,view:view}){let kit=useKit(),nav=useShopNativeNav();if(view.phase!=="ready")/* @__PURE__ */
220
- return jsxRuntime.jsxs(Frame,{children:[
221
- /* @__PURE__ */jsxRuntime.jsx(Stack,{children:view.phase==="failed"?/* @__PURE__ */jsxRuntime.jsx(LoadFailed,{copy:copy,thing:copy.thingOrder,retry:view.retry}):/* @__PURE__ */jsxRuntime.jsxs(Card,{children:[
222
- /* @__PURE__ */jsxRuntime.jsx(CardTitle,{children:copy.whereItStands}),
223
- /* @__PURE__ */jsxRuntime.jsx(Ghost,{})]})}),
224
- /* @__PURE__ */jsxRuntime.jsx(Legal,{line:copy.legalTracking})]});let v=view.value,link=kit.v("rowLink");/* @__PURE__ */
225
- return jsxRuntime.jsxs(Frame,{children:[
226
- /* @__PURE__ */jsxRuntime.jsx(TitleBlock,{title:v.title,meta:v.sub}),
227
- /* @__PURE__ */jsxRuntime.jsxs(Stack,{children:[
228
- /* @__PURE__ */jsxRuntime.jsxs(Card,{children:[
229
- /* @__PURE__ */jsxRuntime.jsx(CardTitle,{children:copy.whereItStands}),v.tracker.kind==="ended"?/* @__PURE__ */jsxRuntime.jsx(T,{k:"cardLead",children:v.tracker.line}):/* @__PURE__ */jsxRuntime.jsx(Tracker,{copy:copy,steps:v.tracker.steps}),v.track?/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:{marginTop:PHONE_BOX.noteAfterTotal.marginTop},children:/* @__PURE__ */jsxRuntime.jsx(Press,{role:"link",label:v.track.label,onPress:()=>nav.openExternal(v.track.href),style:[kit.v("cardLink"),{alignSelf:"flex-start"}],children:/* @__PURE__ */jsxRuntime.jsx(T,{k:"cardLink",bare:true,style:underline("cardLink"),children:v.track.label})})}):null]}),v.items.length>0?/* @__PURE__ */jsxRuntime.jsxs(Card,{children:[
230
- /* @__PURE__ */jsxRuntime.jsx(CardTitle,{children:copy.inTheBox}),
231
- /* @__PURE__ */jsxRuntime.jsx(reactNative.View,{children:v.items.map((it,i)=>/* @__PURE__ */jsxRuntime.jsxs(ItemRow,{index:i,count:v.items.length,first:"trackItemsLiFirst",last:"trackItemsLiLast",thumb:/* @__PURE__ */jsxRuntime.jsx(Thumb,{tone:it.tone,icon:it.icon}),end:it.pill?/* @__PURE__ */jsxRuntime.jsx(Pill,{pill:it.pill}):null,children:[
232
- /* @__PURE__ */jsxRuntime.jsx(ItemName,{name:it.name,rx:it.rx,copy:copy}),it.meta?/* @__PURE__ */jsxRuntime.jsx(T,{k:"itemsMeta",children:it.meta}):null]},it.key))})]}):null,
233
- /* @__PURE__ */jsxRuntime.jsxs(Card,{children:[
234
- /* @__PURE__ */jsxRuntime.jsx(CardTitle,{children:copy.payment}),
235
- /* @__PURE__ */jsxRuntime.jsx(Sum,{rows:v.sum,total:true}),v.note?/* @__PURE__ */jsxRuntime.jsx(T,{k:"noteAfterTotal",children:v.note}):null,v.actions.length>0?/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:[kit.v("breaks"),{flexDirection:"row",flexWrap:"wrap",alignItems:"center"}],children:v.actions.map(a=>/* @__PURE__ */jsxRuntime.jsx(OutlineButton,{k:"btnSm",action:a},a.label))}):null,
236
- /* @__PURE__ */jsxRuntime.jsx(InlineError,{line:v.error})]}),
237
- /* @__PURE__ */jsxRuntime.jsxs(Press,{role:"link",label:v.allOrders.label,onPress:()=>nav.go(v.allOrders.to),style:[link,{flexDirection:"row",alignItems:"center",rowGap:0,columnGap:0}],children:[
238
- /* @__PURE__ */jsxRuntime.jsx(PartIcon,{name:"box",k:"rowLinkIcon",inkKey:"rowLink",style:{marginRight:link.columnGap}}),
239
- /* @__PURE__ */jsxRuntime.jsx(T,{k:"rowLink",bare:true,style:{flex:1,minWidth:0},children:v.allOrders.label}),
240
- /* @__PURE__ */jsxRuntime.jsx(PartIcon,{name:"chevron",k:"rowLinkChevron",style:{marginLeft:link.columnGap}})]})]}),
241
- /* @__PURE__ */jsxRuntime.jsx(Legal,{line:v.legal})]})}function LivePackage(){let{copy:copy}=useShop(),nav=useShopNativeNav(),{tabs:tabs,view:view}=usePackageScreen(nav.go);/* @__PURE__ */
203
+ /* @__PURE__ */jsxRuntime.jsx(Prods,{children:s.tiles.map(t=>/* @__PURE__ */jsxRuntime.jsx(Tile,{tile:t},t.key))})]},s.key)):null,more?.loading?/* @__PURE__ */jsxRuntime.jsx(GhostTiles,{n:2}):null,more?.failed?/* @__PURE__ */jsxRuntime.jsx(LoadFailed,{copy:copy,thing:copy.thingShop,retry:more.onMore}):null,shelves.phase==="ready"&&view.empty?/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{accessibilityLiveRegion:"polite",children:/* @__PURE__ */jsxRuntime.jsx(T,{k:"cardLead",children:view.empty})}):null]}),
204
+ /* @__PURE__ */jsxRuntime.jsx(Legal,{line:view.legal})]})}function useCartCheckout(items,go,cardHandoff=null){let{client:client,copy:copy,v3:v3,payments:payments}=useShop(),addresses=useAddresses(),cards=usePaymentMethods(),[open,setOpen]=react.useState(false),[pane,setPane]=react.useState("main"),[addressRef,setAddressRef]=react.useState(()=>peekAddedAddress(client));react.useEffect(()=>dropAddedAddress(client),[client]);let[cardId,setCardId]=react.useState(null),[error,setError]=react.useState(null),usable=(addresses.value??[]).filter(a=>a.isComplete),address=usable.find(a=>a.ref===addressRef)??usable.find(a=>a.isDefault)??usable[0]??null,cardList=cards.value??[],card=cardList.find(c=>c.paymentMethodId===cardId)??cardList[0]??null,lines=react.useMemo(()=>cartLines(items),[items]),linesKey=JSON.stringify(lines),quote=useShopRead(address&&lines.length>0?`cart-quote:${address.ref}:${linesKey}`:null,()=>client.quote({lines:lines,shipTo:address.ref})),[shown,setShown]=react.useState(null),draftKey=`${address?.ref??""}:${linesKey}`,shownTotal=shown&&shown.key===draftKey?shown.total:null,placeRef=react.useRef(()=>{}),nameStep=useNameStep(()=>placeRef.current()),placeAction=useShopAction(async keys=>{let draft=await client.createCheckout({idempotencyKey:keys.key("draft"),lines:lines,shipTo:address.ref});if(!draft.ok)return omsErr(draft.error);if((shownTotal??quote.value?.total??null)!==draft.value.total)return setShown({key:draftKey,total:draft.value.total}),omsErr({kind:"refused",status:409,reasonCode:"price_changed",message:null});let out=await confirmWithPayerActions(idempotencyKey=>client.confirmCheckout(draft.value.checkoutId,{idempotencyKey:idempotencyKey,expectedTotal:draft.value.total,paymentMethodId:card.paymentMethodId}),keys,payments);return out.kind==="failed"?omsErr(out.error):omsOk(out)}),place2=()=>{if(!address||!card||!quote.value||placeAction.busy)return;setError(null),nameStep.clear();let placedKeys=items.map(i=>i.key);placeAction.run().then(res=>{if(!res)return;let out=res.ok?res.value:{kind:"failed",error:res.error};if(out.kind==="failed"){if(nameStep.raise(out.error))return;setError(outcomeLine(copy,out));return}if(out.orderIds.length===0){setError(copy.actionFailed);return}if(removePlaced(client,placedKeys),setOpen(false),setPane("main"),out.kind==="confirmed"){go({name:"placed",orderIds:out.orderIds});return}leaveOrderNotice(client,out.orderIds[0],outcomeLine(copy,out)),go({name:"order",orderId:out.orderIds[0]})})};placeRef.current=place2;let[cardBusy,setCardBusy]=react.useState(false),before=react.useRef(null);react.useEffect(()=>{if(!before.current||cards.phase!=="ready"||!cards.value)return;let added=cards.value.find(c=>!before.current.has(c.paymentMethodId));before.current=null,added&&setCardId(added.paymentMethodId)},[cards.phase,cards.value]);let addCard=cardHandoff?{busy:cardBusy,run:()=>{if(cardBusy)return;setCardBusy(true),setError(null);let ids=new Set(cardList.map(c=>c.paymentMethodId));cardHandoff().then(step=>{setCardBusy(false),step.ok?(before.current=ids,setPane("main"),cards.refresh()):setError(step.closed?copy.cardStepClosed:step.message??copy.cardStepFailed)},()=>{setCardBusy(false),setError(copy.cardStepFailed)})}}:null,save=useShopAction((_keys,input)=>client.addAddress(input)),saveAddress={busy:save.busy,error:save.error?refusalLine(copy,save.error):null,run:input=>{save.run(input).then(res=>{res&&res.ok&&(setAddressRef(res.value.ref),setPane("main"),addresses.refresh())})}},sub=cartSubtotal(items),q=quote.value,totalCents=shownTotal??q?.total??null,sum=[];sub!==null&&sum.push({k:v3.subtotal,v:formatCents(sub)}),q&&totalCents!==null&&(sum.push({k:v3.shipping,v:q.shipping===0?v3.free:formatCents(q.shipping)}),sum.push({k:v3.tax,v:formatCents(q.tax)}),sum.push({k:v3.total,v:formatCents(totalCents),total:true}));let rx=items.some(i=>i.requiresRx),fineParts=[card?copy.chargedWhenShips(cardLabel(card.brand,card.last4)):null,rx?copy.rxCheckedFirst:null].filter(x=>!!x);return{open:open,pane:pane,setPane:setPane,openSheet:()=>{setError(null),setPane("main"),setOpen(true)},closeSheet:()=>{placeAction.busy||(setOpen(false),setPane("main"))},addresses:[...usable].sort((a,b)=>Number(b.isDefault)-Number(a.isDefault)),addressesLoading:addresses.phase==="loading",address:address,chooseAddress:ref=>{setAddressRef(ref),setPane("main")},cards:cardList,cardsLoading:cards.phase==="loading",card:card,chooseCard:id=>{setCardId(id),setPane("main")},addCard:addCard,saveAddress:saveAddress,sum:sum,subtotal:sub!==null?formatCents(sub):null,total:totalCents!==null?formatCents(totalCents):null,canPlace:!!address&&!!card&&!!q&&items.length>0&&!placeAction.busy,placing:placeAction.busy,place:place2,error:nameStep.view!==null?null:error??quoteLine(copy,quote),nameStep:nameStep.view,fine:fineParts.length>0?fineParts.join(" "):null}}var freezeInPlace=Object.freeze;function deepFreeze(value){if(value!==null&&typeof value=="object"&&!Object.isFrozen(value)){freezeInPlace(value);for(let key of Object.keys(value))deepFreeze(value[key])}return value}var TEXT_SCALE_TIER_CAPS=/* @__PURE__ */Object.freeze({content:0,heading:2,control:1.8,compact:1.5,badge:1.3}),SPACE={xs:4,sm:8,md:12,lg:16,xl:24,xxl:32},RADIUS={tile:5,xs:6,sm:10,md:14,lg:20,xl:28,pill:500},TYPE_SIZE={nano:8,small:9,micro:10,tiny:11,caption:13,bodyTight:15,body:17,subtitle:20,heading:22,verdict:24},LINE_HEIGHT={tight:1.15,snug:1.3,normal:1.4,relaxed:1.55},WEIGHT={regular:"400",medium:"500",bold:"700"},LETTER_SPACING={eyebrow:1,monoWide:.9,headerBrand:-.42,tight:-.35},DEFAULT_MAX_FONT_SCALE=0,SYSTEM_FONT_FAMILY="System",SYSTEM_MONO_FAMILY="monospace",TIERS=["content","heading","control","compact","badge"];function authoredTierSizes(size){let out={};for(let tier of TIERS)out[tier]=size;return out}var NO_FONT_SOURCES=[];function baseType(){return{family:SYSTEM_FONT_FAMILY,mono:SYSTEM_MONO_FAMILY,fontUrl:null,families:{regular:SYSTEM_FONT_FAMILY,medium:SYSTEM_FONT_FAMILY,bold:SYSTEM_FONT_FAMILY,mono:SYSTEM_MONO_FAMILY,monoMedium:SYSTEM_MONO_FAMILY,monoBold:SYSTEM_MONO_FAMILY},namedFaces:{regular:false,medium:false,bold:false,mono:false,monoMedium:false,monoBold:false},fontUrls:{},size:TYPE_SIZE,tierSizes:authoredTierSizes(TYPE_SIZE),lineHeight:LINE_HEIGHT,weight:WEIGHT,letterSpacing:LETTER_SPACING,scale:1,maxScale:DEFAULT_MAX_FONT_SCALE,scaleCaps:TEXT_SCALE_TIER_CAPS,headingFamily:null,headingWeight:null,fontSources:NO_FONT_SOURCES}}var NO_SLOTS={},EASING_CURVES=/* @__PURE__ */Object.freeze({standard:/* @__PURE__ */Object.freeze([.2,0,0,1]),emphasized:/* @__PURE__ */Object.freeze([.2,.8,.2,1]),exit:/* @__PURE__ */Object.freeze([.4,0,1,1])});function cssCubicBezier(curve){return`cubic-bezier(${curve.join(", ")})`}var MOTION={duration:{instant:80,fast:140,normal:220,slow:320},spring:{gentle:{damping:18,stiffness:200}},easing:{standard:cssCubicBezier(EASING_CURVES.standard),emphasized:cssCubicBezier(EASING_CURVES.emphasized),exit:cssCubicBezier(EASING_CURVES.exit)},reducedMotion:false},LIGHT_COLOR={brand:"#10462E",brandSoft:"rgba(16,70,46,0.10)",brandSofter:"rgba(16,70,46,0.15)",brandBorder:"rgba(16,70,46,0.18)",borderHairlineGreen:"rgba(16,70,46,0.25)",brandBorderStrong:"rgba(16,70,46,0.55)",brandInk:"#10462E",linkInk:"#10462E",surface:"#FFFFFF",surfaceCream:"#FFFFFF",surfaceSubtle:"#F1F5F2",background:"#FFFFFF",borderRingCream:"#E4E4E4",chatGround:"#FFFFFF",composerFill:"#FFFFFF",composerBorder:"rgba(16,70,46,0.75)",shadow:"#0B3421",text:{primary:"#000000",secondary:"#0E462E",muted:"#6B6B6B",placeholder:"rgba(61,61,61,0.75)",onBrand:"#FFFFFF",metaCool:"#3D3D3D",timestamp:"rgba(61,61,61,0.75)"},primary:"#10462E",onPrimary:"#FFFFFF",accent:"#10462E",onAccent:"#FFFFFF",accentEdge:"#07C168",success:"#07C168",danger:"#C03410",onDanger:"#FFFFFF",errorRed:"#C03410",warningStrong:"#A45610",cautionAccent:"#D9821D",riskConcern:"#EFA700",sentiment:{up:"#07C168",neutral:"#FBC558",down:"#FF1B00"},badgeBgPositive:"rgba(7,193,104,0.12)",badgeBgCaution:"rgba(217,130,29,0.14)",badgeBgCritical:"rgba(192,52,16,0.06)",badgeBgNeutral:"rgba(107,107,107,0.12)",bubbleUser:"#10462E",bubbleAssistant:"#FFFFFF",bubbleVet:"#FFC3BC",onBubbleVet:"#000000",skeleton:"#E9F1E9",scanButtonPink:"#FFC3BC",highlight:"#FFC3BC",onHighlight:"#000000",mark:"#07C168",controlEdge:"rgba(16,70,46,0.18)",structureEdge:"rgba(16,70,46,0.25)",primaryEdge:"#10462E",checkupCardLowRiskBg:"rgba(7,193,104,0.10)",checkupCardConcernBg:"rgba(239,167,0,0.10)",info:"#10462E",badgeBgInfo:"rgba(16,70,46,0.10)",infoEdge:"rgba(16,70,46,0.25)"},EVERFUR_LIGHT=deepFreeze({brightness:"light",highContrast:false,meta:{displayName:"Everfur",logoUrl:null,placeholder:null,hidePoweredBy:false,assistantAvatarUrl:null},color:LIGHT_COLOR,space:SPACE,radius:RADIUS,type:baseType(),motion:MOTION,slots:NO_SLOTS}),DARK_COLOR={brand:"#6BD39A",brandSoft:"rgba(107,211,154,0.12)",brandSofter:"rgba(107,211,154,0.18)",brandBorder:"rgba(107,211,154,0.22)",borderHairlineGreen:"rgba(107,211,154,0.28)",brandBorderStrong:"rgba(107,211,154,0.55)",brandInk:"#6BD39A",linkInk:"#6BD39A",surface:"#1C1F23",surfaceCream:"#23272C",surfaceSubtle:"#23272C",background:"#15171A",borderRingCream:"#3A3F45",chatGround:"#1C1F23",composerFill:"#23272C",composerBorder:"rgba(107,211,154,0.75)",shadow:"#000000",text:{primary:"#F5F3F0",secondary:"#A9E4C4",muted:"#9A9A9A",placeholder:"rgba(255,255,255,0.55)",onBrand:"#0E1F17",metaCool:"#C9C9C9",timestamp:"rgba(245,243,240,0.7)"},primary:"#6BD39A",onPrimary:"#0E1F17",accent:"#6BD39A",onAccent:"#0E1F17",accentEdge:"#34D888",success:"#07C168",danger:"#F87171",onDanger:"#0E1F17",errorRed:"#FF6B5B",warningStrong:"#F0A35E",cautionAccent:"#D9821D",riskConcern:"#EFA700",sentiment:{up:"#07C168",neutral:"#FBC558",down:"#FF1B00"},badgeBgPositive:"rgba(7,193,104,0.18)",badgeBgCaution:"rgba(217,130,29,0.20)",badgeBgCritical:"rgba(185,28,28,0.22)",badgeBgNeutral:"rgba(255,255,255,0.10)",bubbleUser:"#6BD39A",bubbleAssistant:"#1C1F23",bubbleVet:"#FFC3BC",onBubbleVet:"#000000",skeleton:"#23272C",scanButtonPink:"#FFC3BC",highlight:"#605051",onHighlight:"#F5F3F0",mark:"#07C168",controlEdge:"rgba(107,211,154,0.22)",structureEdge:"rgba(107,211,154,0.28)",primaryEdge:"#6BD39A",checkupCardLowRiskBg:"rgba(7,193,104,0.16)",checkupCardConcernBg:"rgba(239,167,0,0.16)",info:"#6BD39A",badgeBgInfo:"rgba(107,211,154,0.12)",infoEdge:"rgba(107,211,154,0.28)"};deepFreeze({brightness:"dark",highContrast:false,meta:{displayName:"Everfur",logoUrl:null,placeholder:null,hidePoweredBy:false,assistantAvatarUrl:null},color:DARK_COLOR,space:SPACE,radius:RADIUS,type:baseType(),motion:MOTION,slots:NO_SLOTS});var EVERFUR_THEME_CONTEXT_SYMBOL=/* @__PURE__ */Symbol.for("@everfur/sdk#EverfurThemeContext@v1"),globalThemeHost=globalThis,EverfurThemeContext=globalThemeHost[EVERFUR_THEME_CONTEXT_SYMBOL]??(globalThemeHost[EVERFUR_THEME_CONTEXT_SYMBOL]=react.createContext(EVERFUR_LIGHT));EverfurThemeContext.displayName??="EverfurThemeContext";function useEverfurTheme(){return react.useContext(EverfurThemeContext)}function tierMultiplier(type,tier){let cap=type.scaleCaps[tier];return cap>0?cap:void 0}function Text4({tier:tier="content",...props}){let{type:type}=useEverfurTheme(),cap=tierMultiplier(type,tier);return react.createElement(reactNative.Text,cap===void 0?props:{maxFontSizeMultiplier:cap,...props})}var TextInput3=react.forwardRef(function(props,ref){return react.createElement(reactNative.TextInput,{...props,...ref===null?{}:{ref:ref}})});var RAPH_RN_PLAN_ICONS=/* @__PURE__ */Object.freeze({shield:{strokes:[{width:1.8,cap:true,closed:true,points:[12,3,19,6,19,12,18.759,14.125,18.074,16,17,17.625,15.593,19,13.907,20.125,12,21,10.093,20.125,8.407,19,7,17.625,5.926,16,5.241,14.125,5,12,5,6]},{width:1.8,cap:true,closed:false,points:[9,12,11,14,15,10]}],boxes:[],triangles:[],seams:[]},arrow:{strokes:[{width:2,cap:true,closed:false,points:[4.5,12,19,12]},{width:2,cap:true,closed:false,points:[13.5,6.5,19,12,13.5,17.5]}],boxes:[],triangles:[],seams:[]},check:{strokes:[{width:2.4,cap:true,closed:false,points:[5,12.6,9.4,17,19,7.4]}],boxes:[],triangles:[],seams:[]},star:{strokes:[],boxes:[],triangles:[[12,16.9,6.8,19.6,7.8,13.8],[16.2,13.8,17.2,19.6,12,16.9],[7.8,13.8,3.5,9.7,9.4,8.8],[14.6,8.8,20.5,9.7,16.2,13.8],[9.4,8.8,12,3.5,14.6,8.8],[16.2,13.8,12,16.9,7.8,13.8],[14.6,8.8,16.2,13.8,7.8,13.8],[14.6,8.8,7.8,13.8,9.4,8.8]],seams:[[12,16.9,7.8,13.8,.245,.677],[12,16.9,16.2,13.8,.245,.677],[7.8,13.8,9.4,8.8,.69,.248],[14.6,8.8,16.2,13.8,.248,.243],[14.6,8.8,9.4,8.8,.68,.245],[16.2,13.8,7.8,13.8,.677,.68],[14.6,8.8,7.8,13.8,.68,.69]]},truck:{strokes:[{width:1.7,cap:false,closed:true,points:[2.8,6.5,14.2,6.5,14.2,16,2.8,16]},{width:1.7,cap:false,closed:false,points:[14.2,9.5,17.8,9.5,21.2,12.9,21.2,16,14.2,16]}],boxes:[{x:5,y:15.8,w:3.6,h:3.6,radius:1.8,width:1.7},{x:15.4,y:15.8,w:3.6,h:3.6,radius:1.8,width:1.7}],triangles:[],seams:[]},refresh:{strokes:[{width:1.7,cap:true,closed:false,points:[4,12,4.343,14.363,5.368,16.52,6.985,18.278,9.048,19.48,11.374,20.021,13.756,19.85,15.981,18.984,17.852,17.5,19.201,15.53,19.909,13.249,19.912,10.861,19.21,8.578,17.865,6.605,15.998,5.116,13.775,4.245,11.393,4.068,9.066,4.602,7,5.8]},{width:1.7,cap:true,closed:false,points:[4,4,4,8,8,8]}],boxes:[],triangles:[],seams:[]},card:{strokes:[{width:1.7,cap:true,closed:false,points:[3,9.5,21,9.5]},{width:1.7,cap:true,closed:false,points:[6.5,15,10.5,15]}],boxes:[{x:3,y:5.5,w:18,h:13,radius:2.2,width:1.7}],triangles:[],seams:[]},alert:{strokes:[{width:1.9,cap:true,closed:true,points:[12,3.5,21.5,20,2.5,20]},{width:1.9,cap:true,closed:false,points:[12,10,12,14.5]},{width:1.9,cap:true,closed:false,points:[12,17.2,12.01,17.2]}],boxes:[],triangles:[],seams:[]},x:{strokes:[{width:2,cap:true,closed:false,points:[6.5,6.5,17.5,17.5]},{width:2,cap:true,closed:false,points:[17.5,6.5,6.5,17.5]}],boxes:[],triangles:[],seams:[]},chat:{strokes:[{width:1.7,cap:false,closed:true,points:[5,5.2,19,5.2,19.8,5.414,20.386,6,20.6,6.8,20.6,15.4,20.386,16.2,19.8,16.786,19,17,10.3,17,5.5,20.6,5.5,17,5,17,4.2,16.786,3.614,16.2,3.4,15.4,3.4,6.8,3.614,6,4.2,5.414,5,5.2]}],boxes:[],triangles:[],seams:[]},repeat:{strokes:[{width:1.8,cap:true,closed:false,points:[4.5,11,4.824,8.824,5.766,6.837,7.244,5.208,9.131,4.077,11.264,3.543,13.461,3.65,15.533,4.391,17.3,5.7,19.5,8]},{width:1.8,cap:true,closed:false,points:[19.5,3.5,19.5,8,15,8]},{width:1.8,cap:true,closed:false,points:[19.5,13,19.176,15.176,18.234,17.163,16.756,18.792,14.869,19.923,12.736,20.457,10.539,20.35,8.467,19.609,6.7,18.3,4.5,16]},{width:1.8,cap:true,closed:false,points:[4.5,20.5,4.5,16,9,16]}],boxes:[],triangles:[],seams:[]},calendar:{strokes:[{width:1.8,cap:true,closed:false,points:[4,10,20,10]},{width:1.8,cap:true,closed:false,points:[8.5,3.5,8.5,7.5]},{width:1.8,cap:true,closed:false,points:[15.5,3.5,15.5,7.5]}],boxes:[{x:4,y:5.5,w:16,h:15,radius:2.5,width:1.8}],triangles:[],seams:[]},flame:{strokes:[],boxes:[],triangles:[[12.15,14.513,13.1,15.2,13.1,13.7],[11.5,13.3,12.15,14.513,13.1,13.7],[16.874,10.907,15.7,9.3,15.381,10.659],[14.7,16.7,16.838,18.516,17.693,16.84],[14.7,16.7,14.489,17.681,16.838,18.516],[18,14.9,14.507,15.633,17.693,16.84],[16.874,10.907,15.381,10.659,14.685,11.707],[17.693,12.759,16.874,10.907,14.685,11.707],[15.538,19.832,16.838,18.516,14.489,17.681],[14.685,11.707,13.959,14.633,17.693,12.759],[17.693,12.759,13.959,14.633,18,14.9],[13.891,20.692,13.055,19.006,12,21],[12,21,12,19.2,10.109,20.692],[8.462,19.832,10.109,20.692,10.659,18.863],[10.659,18.863,9.741,17.97,8.462,19.832],[6.307,16.84,9.602,15.677,6,14.9],[6.273,13.033,6,14.9,9.602,15.677],[9.602,15.677,10.113,14.812,6.273,13.033],[6.988,11.438,6.273,13.033,10.113,14.812],[13.525,7.088,12.856,5.017,12,3.5],[13.856,9.589,13.525,7.088,12,3.5],[13.7,12.4,13.856,9.589,12,3.5],[10.113,14.812,10.792,14.042,6.988,11.438],[14.7,16.7,17.693,16.84,14.507,15.633],[13.7,12.4,13.959,14.633,14.685,11.707],[14.507,15.633,18,14.9,13.959,14.633],[13.1,13.7,13.959,14.633,13.7,12.4],[11.5,13.3,13.1,13.7,13.7,12.4],[7.983,10.048,6.988,11.438,10.792,14.042],[10.792,14.042,11.5,13.3,7.983,10.048],[14.489,17.681,13.913,18.475,15.538,19.832],[13.891,20.692,15.538,19.832,13.913,18.475],[13.891,20.692,13.913,18.475,13.055,19.006],[12,19.2,12,21,13.055,19.006],[10.659,18.863,10.109,20.692,12,19.2],[7.162,18.516,8.462,19.832,9.741,17.97],[9.741,17.97,9.4,16.7,7.162,18.516],[6.307,16.84,7.162,18.516,9.4,16.7],[6.307,16.84,9.4,16.7,9.602,15.677],[9.1,8.8,7.983,10.048,11.5,13.3],[11.5,13.3,13.7,12.4,9.1,8.8],[10.054,7.77,9.1,8.8,13.7,12.4],[10.927,6.683,10.054,7.77,13.7,12.4],[11.613,5.481,10.927,6.683,13.7,12.4],[12.006,4.106,11.613,5.481,13.7,12.4],[12,2.5,12.006,4.106,13.7,12.4],[12,2.5,13.7,12.4,12,3.5]],seams:[[12.15,14.513,13.1,13.7,.121,.428],[11.5,13.3,13.1,13.7,.681,.356],[15.381,10.659,16.874,10.907,.033,.883],[14.7,16.7,16.838,18.516,.648,1.318],[14.7,16.7,17.693,16.84,.648,1.533],[14.489,17.681,16.838,18.516,.51,1.318],[14.507,15.633,18,14.9,.782,1.787],[14.507,15.633,17.693,16.84,.782,1.533],[14.685,11.707,16.874,10.907,.68,.883],[14.685,11.707,17.693,12.759,.61,.484],[14.489,17.681,15.538,19.832,.51,1.115],[13.959,14.633,14.685,11.707,1.333,.576],[13.959,14.633,17.693,12.759,.851,.484],[13.959,14.633,18,14.9,.851,1.787],[13.055,19.006,13.891,20.692,.36,.984],[12,21,13.055,19.006,.945,.395],[12,19.2,12,21,.394,.945],[10.109,20.692,12,19.2,.715,.394],[10.109,20.692,10.659,18.863,.715,.428],[10.659,18.863,8.462,19.832,.428,.809],[8.462,19.832,9.741,17.97,.809,.525],[6.307,16.84,9.602,15.677,1.65,.812],[6,14.9,9.602,15.677,.194,1.012],[6.273,13.033,9.602,15.677,2.068,1.012],[10.113,14.812,6.273,13.033,1.217,2.068],[10.113,14.812,6.988,11.438,1.217,2.2],[12,3.5,13.525,7.088,4.697,5.571],[12,3.5,13.856,9.589,4.697,3.017],[12,3.5,13.7,12.4,4.648,26.765],[10.792,14.042,6.988,11.438,1.339,2.2],[13.7,12.4,13.959,14.633,.819,1.333],[13.1,13.7,13.7,12.4,0,.819],[11.5,13.3,13.7,12.4,.681,.537],[10.792,14.042,7.983,10.048,1.339,2.328],[11.5,13.3,7.983,10.048,1.438,2.328],[13.913,18.475,15.538,19.832,.409,1.115],[13.891,20.692,13.913,18.475,.984,.409],[7.162,18.516,9.741,17.97,.977,.525],[7.162,18.516,9.4,16.7,.977,.677],[6.307,16.84,9.4,16.7,1.65,.677],[11.5,13.3,9.1,8.8,1.438,1.129],[13.7,12.4,9.1,8.8,2.046,1.129],[10.054,7.77,13.7,12.4,.079,2.285],[10.927,6.683,13.7,12.4,.237,3.126],[11.613,5.481,13.7,12.4,.475,5.451],[12.006,4.106,13.7,12.4,.961,15.892],[12,2.5,13.7,12.4,2.974,26.765]]},box:{strokes:[{width:1.7,cap:false,closed:true,points:[3.8,7.8,12,4,20.2,7.8,20.2,16.4,12,20,3.8,16.4]},{width:1.7,cap:false,closed:false,points:[3.8,7.8,12,11.6,20.2,7.8]},{width:1.7,cap:false,closed:false,points:[12,11.6,12,20]}],boxes:[],triangles:[],seams:[]},cart:{strokes:[{width:1.8,cap:true,closed:false,points:[2.8,4,5.4,4,7.7,14.6,8.203,15.401,9.1,15.7,17.3,15.7,18.197,15.401,18.7,14.6,20.4,7.6,6.3,7.6]}],boxes:[{x:8.3,y:18.3,w:2.6,h:2.6,radius:1.3,width:1.8},{x:15.8,y:18.3,w:2.6,h:2.6,radius:1.3,width:1.8}],triangles:[],seams:[]},minus:{strokes:[{width:2.2,cap:true,closed:false,points:[6,12,18,12]}],boxes:[],triangles:[],seams:[]},plus:{strokes:[{width:2.2,cap:true,closed:false,points:[12,6,12,18]},{width:2.2,cap:true,closed:false,points:[6,12,18,12]}],boxes:[],triangles:[],seams:[]},chev:{strokes:[{width:2,cap:true,closed:false,points:[9,5.5,15.5,12,9,18.5]}],boxes:[],triangles:[],seams:[]},pulse:{strokes:[{width:1.8,cap:true,closed:false,points:[3,12.5,6.8,12.5,9.2,6.9,13.4,17.5,15.8,12.5,21,12.5]}],boxes:[],triangles:[],seams:[]},file:{strokes:[{width:1.7,cap:true,closed:true,points:[7,3.5,14.2,3.5,18.5,7.8,18.5,20,18.324,20.424,17.9,20.6,7,20.6,6.576,20.424,6.4,20,6.4,4.1,6.576,3.676,7,3.5]},{width:1.7,cap:true,closed:false,points:[14,3.6,14,8,18.4,8]},{width:1.7,cap:true,closed:false,points:[9.4,12.4,14.6,12.4]},{width:1.7,cap:true,closed:false,points:[9.4,15.8,14.6,15.8]}],boxes:[],triangles:[],seams:[]},kit:{strokes:[{width:1.7,cap:false,closed:true,points:[4,7.6,12,3.6,20,7.6,20,16.4,12,20.4,4,16.4]},{width:1.7,cap:false,closed:false,points:[4,7.6,12,11.6,20,7.6]},{width:1.7,cap:false,closed:false,points:[12,11.6,12,20.4]}],boxes:[],triangles:[],seams:[]},dna:{strokes:[{width:1.7,cap:true,closed:false,points:[7,3.5,7.28,4.645,8.04,5.594,9.16,6.394,10.52,7.097,12,7.75,13.48,8.403,14.84,9.106,15.96,9.906,16.72,10.855,17,12,16.72,13.145,15.96,14.094,14.84,14.894,13.48,15.597,12,16.25,10.52,16.903,9.16,17.606,8.04,18.406,7.28,19.355,7,20.5]},{width:1.7,cap:true,closed:false,points:[17,3.5,16.72,4.645,15.96,5.594,14.84,6.394,13.48,7.097,12,7.75,10.52,8.403,9.16,9.106,8.04,9.906,7.28,10.855,7,12,7.28,13.145,8.04,14.094,9.16,14.894,10.52,15.597,12,16.25,13.48,16.903,14.84,17.606,15.96,18.406,16.72,19.355,17,20.5]},{width:1.7,cap:true,closed:false,points:[8.6,6.3,15.4,6.3]},{width:1.7,cap:true,closed:false,points:[8.6,17.7,15.4,17.7]},{width:1.7,cap:true,closed:false,points:[10.4,9.6,13.6,9.6]},{width:1.7,cap:true,closed:false,points:[10.4,14.4,13.6,14.4]}],boxes:[],triangles:[],seams:[]},heart:{strokes:[{width:1.8,cap:false,closed:true,points:[12,20.2,11.739,20.035,11.041,19.559,10.03,18.804,8.831,17.799,7.569,16.575,6.37,15.163,5.359,13.593,4.661,11.895,4.4,10.1,4.833,8.454,5.87,7.105,7.349,6.264,9.039,6.062,10.675,6.532,12,7.6,13.325,6.532,14.961,6.062,16.651,6.264,18.13,7.105,19.167,8.454,19.6,10.1,19.339,11.895,18.641,13.593,17.63,15.163,16.431,16.575,15.169,17.799,13.97,18.804,12.959,19.559,12.261,20.035,12,20.2]}],boxes:[],triangles:[],seams:[]},bottle:{strokes:[{width:1.7,cap:false,closed:true,points:[7.2,6.2,16.8,6.2,17.507,6.493,17.8,7.2,17.8,19.5,17.572,20.35,16.95,20.972,16.1,21.2,7.9,21.2,7.05,20.972,6.428,20.35,6.2,19.5,6.2,7.2,6.493,6.493,7.2,6.2]},{width:1.7,cap:false,closed:true,points:[9,11,15,11,15,16,9,16]}],boxes:[{x:8,y:2.8,w:8,h:3.4,radius:1,width:1.7}],triangles:[],seams:[]},harness:{strokes:[{width:1.5,cap:true,closed:false,points:[7.5,4.5,7.728,6.82,8.364,8.708,9.336,10.116,10.572,10.996,12,11.3,13.428,10.996,14.664,10.116,15.636,8.708,16.272,6.82,16.5,4.5]},{width:1.5,cap:true,closed:true,points:[5,12.6,19,12.6,19,17.2,18.692,18.35,17.85,19.192,16.7,19.5,7.3,19.5,6.15,19.192,5.308,18.35,5,17.2]},{width:1.5,cap:true,closed:false,points:[8.2,15.3,15.8,15.3]}],boxes:[{x:10.7,y:8.9,w:2.6,h:2.6,radius:1.3,width:1.5}],triangles:[],seams:[]},ramp:{strokes:[{width:1.5,cap:true,closed:false,points:[2.5,19.5,21.5,19.5]},{width:1.5,cap:true,closed:false,points:[3.5,19.5,3.5,16.5,8,16.5,8,13.5,12.5,13.5,12.5,10.5,17,10.5,17,7.5,20.5,7.5,20.5,19.5]},{width:1.5,cap:true,closed:false,points:[3.5,16.5,20.5,7.5],opacity:.35}],boxes:[],triangles:[],seams:[]}});var BOX=24,FINE=16,SEAM=.8,fine=dp=>Math.round(dp*FINE);function place(cx,cy,W,H,ux,uy){let left=cx-W/2,top=cy-H/2,x=Math.round(left),y=Math.round(top);return{position:"absolute",left:x,top:y,width:W,height:H,transform:[{translateX:left-x},{translateY:top-y},{rotate:`${Math.atan2(uy,ux)*180/Math.PI}deg`},{scale:1/FINE}]}}function strokePieces(icon,k,out){for(let s of icon.strokes){let w=s.width*k,pts=s.points,n=pts.length/2,last=s.closed?n:n-1;for(let i=0;i<last;i+=1){let j=(i+1)%n,px=(pts[i*2]??0)*k,py=(pts[i*2+1]??0)*k,dx=(pts[j*2]??0)*k-px,dy=(pts[j*2+1]??0)*k-py,len=Math.hypot(dx,dy);if(len===0&&!(n===2&&s.cap))continue;let ux=len===0?1:dx/len,uy=len===0?0:dy/len,e0=s.closed||i>0||s.cap?w/2:0,e1=s.closed||j!==n-1||s.cap?w/2:0,along=(len+e1-e0)/2;out.push({paint:"backgroundColor",style:{...place(px+ux*along,py+uy*along,fine(len+e0+e1),fine(w),ux,uy),borderTopLeftRadius:e0>0?fine(w)/2:0,borderBottomLeftRadius:e0>0?fine(w)/2:0,borderTopRightRadius:e1>0?fine(w)/2:0,borderBottomRightRadius:e1>0?fine(w)/2:0,...s.opacity===void 0?{}:{opacity:s.opacity}}})}}}function boxPieces(icon,k,out){for(let b of icon.boxes){let w=(b.w+b.width)*k,h=(b.h+b.width)*k;out.push({paint:"borderColor",style:{...place((b.x-b.width/2)*k+w/2,(b.y-b.width/2)*k+h/2,fine(w),fine(h),1,0),borderWidth:fine(b.width*k),borderRadius:(b.radius+b.width/2)*k*FINE,...b.opacity===void 0?{}:{opacity:b.opacity}}})}}function trianglePieces(icon,k,out){for(let t of icon.triangles){let p=[0,1,2].map(i=>[(t[i*2]??0)*k,(t[i*2+1]??0)*k]),base=0,len=-1;for(let i=0;i<3;i+=1){let a2=p[i]??[0,0],b=p[(i+1)%3]??[0,0],d=Math.hypot(b[0]-a2[0],b[1]-a2[1]);d>len&&(len=d,base=i)}if(len<=0)continue;let b0=p[base]??[0,0],b1=p[(base+1)%3]??[0,0],a=p[(base+2)%3]??[0,0],ux=(b1[0]-b0[0])/len,uy=(b1[1]-b0[1])/len,along=(a[0]-b0[0])*ux+(a[1]-b0[1])*uy,across=(a[0]-b0[0])*-uy+(a[1]-b0[1])*ux,h=Math.abs(across),up=across<0,mid=up?-h/2:h/2,bl=fine(along),br=fine(len)-bl,bh=fine(h);out.push({paint:up?"borderBottomColor":"borderTopColor",style:{...place(b0[0]+ux*(len/2)-uy*mid,b0[1]+uy*(len/2)+ux*mid,bl+br,bh,ux,uy),width:0,height:0,borderLeftWidth:bl,borderRightWidth:br,borderLeftColor:"transparent",borderRightColor:"transparent",...up?{borderBottomWidth:bh}:{borderTopWidth:bh}}})}for(let e of icon.seams){let x0=(e[0]??0)*k,y0=(e[1]??0)*k,dx=(e[2]??0)*k-x0,dy=(e[3]??0)*k-y0,d=Math.hypot(dx,dy),in0=SEAM*(e[4]??0),in1=SEAM*(e[5]??0),bar=d-in0-in1;if(d===0||bar<=0)continue;let mid=in0+bar/2;out.push({paint:"backgroundColor",style:place(x0+dx/d*mid,y0+dy/d*mid,fine(bar),fine(SEAM),dx/d,dy/d)})}}var cache=/* @__PURE__ */new Map;function piecesOf(name,size){let key=`${name}:${size}`,hit=cache.get(key);if(hit!==void 0)return hit;let icon=RAPH_RN_PLAN_ICONS[name],out=[],k=size/BOX;return boxPieces(icon,k,out),strokePieces(icon,k,out),trianglePieces(icon,k,out),cache.set(key,out),out}function FocusIcon({name:name,size:size=18,color:color}){let pieces=RAPH_RN_PLAN_ICONS[name]===void 0?[]:piecesOf(name,size);/* @__PURE__ */
205
+ return jsxRuntime.jsx(reactNative.View,{accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants",testID:`health-plan-icon-${name}`,children:/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:{width:size,height:size},children:pieces.map((piece,i)=>/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:[piece.style,{[piece.paint]:color}]},i))})})}var HIDDEN={pointerEvents:"none",accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants"};function ShopV3Icon({name:name,size:size,color:color}){let w=Math.max(1.5,Math.round(size*1.8/24*2)/2),at=n=>Math.round(size*n);switch(name){case"check":case"plus":case"minus":case"cart":case"box":/* @__PURE__ */
206
+ return jsxRuntime.jsx(FocusIcon,{name:name,size:size,color:color});case"close":/* @__PURE__ */
207
+ return jsxRuntime.jsx(FocusIcon,{name:"x",size:size,color:color});case"chev":/* @__PURE__ */
208
+ return jsxRuntime.jsx(FocusIcon,{name:"chev",size:size,color:color});case"rx":/* @__PURE__ */
209
+ return jsxRuntime.jsx(Icon,{name:"pill",size:size,color:color});case"supplement":/* @__PURE__ */
210
+ return jsxRuntime.jsx(Icon,{name:"leaf",size:size,color:color});case"truck":/* @__PURE__ */
211
+ return jsxRuntime.jsxs(reactNative.View,{style:{width:size,height:size},...HIDDEN,children:[
212
+ /* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:{position:"absolute",left:at(.06),top:at(.26),width:at(.56),height:at(.42),borderWidth:w,borderColor:color,borderRadius:at(.04)}}),
213
+ /* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:{position:"absolute",left:at(.6),top:at(.4),width:at(.32),height:at(.28),borderWidth:w,borderColor:color,borderTopRightRadius:at(.12),borderRadius:at(.04)}}),
214
+ /* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:{position:"absolute",left:at(.16),top:at(.66),width:at(.18),height:at(.18),borderWidth:w,borderColor:color,borderRadius:size,backgroundColor:"transparent"}}),
215
+ /* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:{position:"absolute",left:at(.64),top:at(.66),width:at(.18),height:at(.18),borderWidth:w,borderColor:color,borderRadius:size}})]});case"card":/* @__PURE__ */
216
+ return jsxRuntime.jsxs(reactNative.View,{style:{width:size,height:size},...HIDDEN,children:[
217
+ /* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:{position:"absolute",left:at(.1),top:at(.22),width:at(.8),height:at(.56),borderWidth:w,borderColor:color,borderRadius:at(.08)}}),
218
+ /* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:{position:"absolute",left:at(.1),top:at(.4),width:at(.8),height:w,backgroundColor:color}})]});case"calendar":/* @__PURE__ */
219
+ return jsxRuntime.jsxs(reactNative.View,{style:{width:size,height:size},...HIDDEN,children:[
220
+ /* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:{position:"absolute",left:at(.14),top:at(.2),width:at(.72),height:at(.66),borderWidth:w,borderColor:color,borderRadius:at(.08)}}),
221
+ /* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:{position:"absolute",left:at(.14),top:at(.4),width:at(.72),height:w,backgroundColor:color}}),
222
+ /* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:{position:"absolute",left:at(.32),top:at(.1),width:w,height:at(.18),borderRadius:w,backgroundColor:color}}),
223
+ /* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:{position:"absolute",left:at(.66),top:at(.1),width:w,height:at(.18),borderRadius:w,backgroundColor:color}})]});case"pin":/* @__PURE__ */
224
+ return jsxRuntime.jsxs(reactNative.View,{style:{width:size,height:size},...HIDDEN,children:[
225
+ /* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:{position:"absolute",left:at(.24),top:at(.1),width:at(.52),height:at(.52),borderWidth:w,borderColor:color,borderRadius:size}}),
226
+ /* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:{position:"absolute",left:at(.5)-w/2,top:at(.6),width:w,height:at(.28),borderRadius:w,backgroundColor:color}})]})}}var FACE_WEIGHT=/* @__PURE__ */Object.freeze({regular:"regular",medium:"medium",bold:"bold",mono:"regular",monoMedium:"medium",monoBold:"bold"});function face2(theme,weight){let type=theme.type,fontFamily=type.families[weight];return weight==="mono"||type.namedFaces[weight]?{fontFamily:fontFamily}:{fontFamily:fontFamily,fontWeight:type.weight[FACE_WEIGHT[weight]]}}function headingFace(theme,fallback="bold"){let{headingFamily:headingFamily,headingWeight:headingWeight}=theme.type;if(headingFamily===null&&headingWeight===null)return face2(theme,fallback);if(headingFamily!==null)return{fontFamily:headingFamily,fontWeight:headingWeight??theme.type.weight[FACE_WEIGHT[fallback]]};let base=face2(theme,fallback);return base.fontWeight===void 0||headingWeight===null?base:{fontFamily:base.fontFamily,fontWeight:headingWeight}}function toRgba(value){if(typeof value=="number")return argbIntToRgba(value);if(typeof value!="string")return null;let s=value.trim();if(s.length===0)return null;if(s.startsWith("#"))return fromHex(s.slice(1));if(s.toLowerCase().startsWith("0x"))return fromHex(s.slice(2));if(s.toLowerCase().startsWith("rgb"))return fromRgbFunc(s);if(/^[0-9a-fA-F]+$/.test(s)){let hex=fromHex(s);if(hex!==null)return hex}return/^\d+$/.test(s)?argbIntToRgba(Number.parseInt(s,10)):null}function fromHex(hex){let h=hex.trim();if(!/^[0-9a-fA-F]+$/.test(h))return null;if(h.length===3)return{r:dup(h[0]),g:dup(h[1]),b:dup(h[2]),a:1};if(h.length===6)return{r:byte(h,0),g:byte(h,2),b:byte(h,4),a:1};if(h.length===8){let a=byte(h,0);return{r:byte(h,2),g:byte(h,4),b:byte(h,6),a:a/255}}return null}function fromRgbFunc(input){let open=input.indexOf("("),close=input.indexOf(")");if(open<0||close<0||close<open)return null;let parts=input.slice(open+1,close).split(",").map(p=>p.trim());if(parts.length<3)return null;let r=clampByte(Number(parts[0])),g=clampByte(Number(parts[1])),b=clampByte(Number(parts[2]));if(r===null||g===null||b===null)return null;let a=1;if(parts.length>=4){let alpha=Number(parts[3]);if(!Number.isFinite(alpha))return null;a=Math.min(1,Math.max(0,alpha))}return{r:r,g:g,b:b,a:a}}function argbIntToRgba(n){if(!Number.isFinite(n))return null;let int2=Math.trunc(n)>>>0,a=int2>>>24&255;return{r:int2>>>16&255,g:int2>>>8&255,b:int2&255,a:a===0?1:a/255}}function byte(hex,at){return Number.parseInt(hex.slice(at,at+2),16)}function dup(nibble){return Number.parseInt(`${nibble??"0"}${nibble??"0"}`,16)}function clampByte(n){return Number.isFinite(n)?Math.min(255,Math.max(0,Math.round(n))):null}function rgbToHex(r,g,b){return`#${hex2(r)}${hex2(g)}${hex2(b)}`.toUpperCase()}function hex2(n){return n.toString(16).padStart(2,"0")}var NEAR_BLACK="#111111",WHITE="#FFFFFF",BLACK="#000000";function readableOn(background){let rgba=toRgba(background);if(rgba===null)return WHITE;let bg=relativeLuminance(rgba),black=relativeLuminance({r:17,g:17,b:17}),white=relativeLuminance({r:255,g:255,b:255});return luminanceContrast(bg,white)>=luminanceContrast(bg,black)?WHITE:NEAR_BLACK}function legibleOn(background,target){let first=readableOn(background);return contrastRatio(first,background)>=target?first:contrastRatio(WHITE,background)>=contrastRatio(BLACK,background)?WHITE:BLACK}function poleForGrounds(grounds){let worst=ink=>grounds.reduce((low,ground)=>Math.min(low,contrastRatio(ink,ground)),Number.POSITIVE_INFINITY);return worst(WHITE)>=worst(BLACK)?WHITE:BLACK}function relativeLuminance(rgba){let r=linearize(rgba.r/255),g=linearize(rgba.g/255),b=linearize(rgba.b/255);return.2126*r+.7152*g+.0722*b}function linearize(channel){return channel<=.03928?channel/12.92:Math.pow((channel+.055)/1.055,2.4)}function luminanceContrast(l1,l2){let lighter=Math.max(l1,l2),darker=Math.min(l1,l2);return(lighter+.05)/(darker+.05)}function contrastRatio(a,b){let fg=toRgba(a),bg=toRgba(b);if(fg===null||bg===null)return 1;let ground=bg.a>=1?bg:{...bg},fore=fg.a>=1?fg:composite(fg,ground);return luminanceContrast(relativeLuminance(fore),relativeLuminance(ground))}function composite(fg,bg){let a=fg.a,mix=(f,g)=>Math.round(f*a+g*(1-a));return{r:mix(fg.r,bg.r),g:mix(fg.g,bg.g),b:mix(fg.b,bg.b),a:1}}function flattenOnto(color,background){let fg=toRgba(color),bg=toRgba(background);if(fg===null||bg===null)return null;let out=fg.a>=1?fg:composite(fg,{...bg});return rgbToHex(out.r,out.g,out.b)}var PUSH_STEP=.05;function pushToContrast(color,grounds,pole,target){let first=grounds[0];if(first===void 0)return pole;let reads=candidate=>grounds.every(ground=>contrastRatio(candidate,ground)>=target);if(toRgba(color)===null)return pole;if(reads(color))return color;let flat=flattenOnto(color,first),from=flat===null?null:toRgba(flat),to=toRgba(pole);if(from===null||to===null)return pole;for(let step=1;step<1/PUSH_STEP;step+=1){let t=step*PUSH_STEP,mix=(a,b)=>Math.round(a+(b-a)*t),candidate=rgbToHex(mix(from.r,to.r),mix(from.g,to.g),mix(from.b,to.b));if(reads(candidate))return candidate}return pole}var RAPH_V3_LIGHT=/* @__PURE__ */Object.freeze({ink:"#262523",ink2:"#4A4845",ink3:"#6B6863",paper:"#F8F7F4",card:"#FFFFFF",line:"#E7E6E2",tile:"#F2F1EE",shadow:"rgba(38, 37, 35, .07)",riskBg:"#FFE3E1",riskInk:"#B0231B",riskDot:"#E5372B",clearBg:"#E6F4D3",clearInk:"#2F6A12",clearDot:"#5FA82B",watchDot:"#E5A000"}),cache2=/* @__PURE__ */new WeakMap;function v3Palette(theme){let hit=cache2.get(theme);if(hit!==void 0)return hit;let c=theme.color,dark=theme.brightness==="dark",neutrals=dark?{dark:dark,ink:c.text.primary,ink2:c.text.secondary,ink3:c.text.muted,paper:c.background,card:c.surface,line:c.borderRingCream,tile:c.surfaceSubtle,shadow:c.shadow,riskBg:c.badgeBgCritical,riskInk:c.danger,riskDot:c.danger,clearBg:c.badgeBgPositive,clearInk:c.success,clearDot:c.success,watchDot:c.warningStrong}:{dark:dark,...RAPH_V3_LIGHT},textOn=(ink,grounds)=>pushToContrast(ink,grounds,poleForGrounds(grounds),V3_TEXT_CONTRAST),labelOn=(ink,fill)=>contrastRatio(ink,fill)>=V3_TEXT_CONTRAST?ink:legibleOn(fill,V3_TEXT_CONTRAST),badgeGrounds=[neutrals.card,neutrals.paper].map(under=>flattenOnto(c.brandSoft,under)??under),brand={primary:c.primary,onPrimary:labelOn(c.onPrimary,c.primary),accent:c.accent,onAccent:labelOn(c.onAccent,c.accent),link:textOn(c.linkInk,[neutrals.card,neutrals.paper,neutrals.tile]),badge:c.brandSoft,onBadge:textOn(c.brandInk,badgeGrounds)},palette=/* @__PURE__ */Object.freeze({...neutrals,...brand});return cache2.set(theme,palette),palette}var V3_TEXT_CONTRAST=4.5;function shopPalette(theme){let v=v3Palette(theme),c=theme.color,dark=theme.brightness==="dark";return{ink:v.ink,ink2:v.ink2,ink3:v.ink3,paper:v.paper,tile:v.tile,line:v.line,card:v.card,link:v.link,soft:c.brandSofter,onSoft:c.brandInk,accent:v.accent,onAccent:v.onAccent,wait:dark?c.badgeBgCaution:"#FFF3C9",chosen:dark?c.surfaceSubtle:"#FFF7DC",button:v.primary,onButton:v.onPrimary,riskBg:v.riskBg,riskInk:v.riskInk,clearBg:v.clearBg,clearInk:v.clearInk,edge:dark?v.line:"#DAD7D1",rail:dark?v.line:"#E2DFD9",ring:dark?v.line:"#CFCBC4",scrim:dark?"rgba(0,0,0,0.6)":"rgba(38,37,35,0.45)",toastInk:dark?c.text.primary:"#FFFFFF"}}function hostFace(f,weight){return typeof f=="string"?{fontFamily:f,fontWeight:weight==="bold"?"700":weight==="medium"?"500":"400"}:{fontFamily:weight==="bold"?f.bold??f.regular:weight==="medium"?f.medium??f.regular:f.regular}}function faceOf(theme,fonts,w){let host=w==="mono"||w==="monoBold"?fonts?.mono:fonts?.sans;return host?hostFace(host,w==="mono"?"regular":w==="monoBold"?"bold":w):face2(theme,w)}function makeShopStyles(theme,fonts){let P=shopPalette(theme),dark=theme.brightness==="dark",t=(size,ink,weight="regular",ratio=1.35)=>({...faceOf(theme,fonts,weight),fontSize:size,lineHeight:Math.round(size*ratio),color:ink}),heading=(size,ratio)=>({...fonts?.sans?hostFace(fonts.sans,"bold"):headingFace(theme,"bold"),fontSize:size,lineHeight:Math.round(size*ratio),color:P.ink}),lift={shadowColor:"#262523",shadowOpacity:dark?0:.06,shadowRadius:3,shadowOffset:{width:0,height:1},elevation:dark?0:1};return{...reactNative.StyleSheet.create({page:{flex:1,backgroundColor:P.paper},body:{paddingHorizontal:18,paddingTop:8,paddingBottom:28,gap:12},foot:{paddingTop:12,paddingHorizontal:18,gap:10,backgroundColor:P.paper,borderTopWidth:1,borderTopColor:P.line},grow:{flex:1,minWidth:0},row:{flexDirection:"row",alignItems:"center"},title:heading(29,1.08),sub2:{...t(15,P.ink2,"regular",1.45),marginTop:-6},k:{...t(16,P.ink,"bold",1.3),marginTop:6,marginHorizontal:2,marginBottom:-4},card:{paddingVertical:14,paddingHorizontal:16,borderRadius:22,backgroundColor:P.card,...lift},items:{gap:18},item:{flexDirection:"row",alignItems:"flex-start",gap:12},itemImg:{width:64,height:64,borderRadius:14,overflow:"hidden",alignItems:"center",justifyContent:"center",backgroundColor:P.soft},itemName:t(16.5,P.ink,"bold",1.25),itemP:{flexDirection:"row",flexWrap:"wrap",alignItems:"center",columnGap:8,rowGap:2,marginTop:3},itemPrice:{...t(16,P.ink,"bold",1.3),fontVariant:["tabular-nums"]},itemWas:{...t(14,P.ink3,"medium",1.3),textDecorationLine:"line-through"},itemSmall:t(14,P.ink3,"regular",1.35),itemActs:{flexDirection:"row",alignItems:"center",gap:16,marginTop:8},step:{flexDirection:"row",alignItems:"center",height:40,borderRadius:999,borderWidth:1.5,borderColor:P.edge,backgroundColor:P.card},stepButton:{width:40,height:40,borderRadius:999,alignItems:"center",justifyContent:"center"},stepOff:{opacity:.3},stepValue:{...t(15.5,P.ink,"bold",1.2),width:30,textAlign:"center",fontVariant:["tabular-nums"]},rm:{minHeight:40,justifyContent:"center"},rmText:{...t(14.5,P.ink2,"bold",1.3),textDecorationLine:"underline"},sum:{paddingVertical:6,paddingHorizontal:16,borderRadius:16,backgroundColor:P.card,...lift},sumFlat:{paddingVertical:6,paddingHorizontal:16,borderRadius:16,backgroundColor:P.paper},sumRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12,minHeight:34},sumKey:{...t(15,P.ink2,"regular",1.35),flexShrink:1},sumValue:{...t(15,P.ink,"regular",1.35),fontVariant:["tabular-nums"],textAlign:"right"},sumTotalRow:{minHeight:42},sumTotal:{...t(17,P.ink,"bold",1.3),fontVariant:["tabular-nums"]},fine:t(13,P.ink3,"regular",1.45),fineC:{...t(13,P.ink3,"regular",1.45),marginTop:14,textAlign:"center"},coFine:{...t(12.5,P.ink3,"regular",1.45),textAlign:"center"},empty:{alignItems:"center",gap:8,paddingTop:48,paddingHorizontal:12,paddingBottom:8},emptyTile:{width:72,height:72,borderRadius:20,marginBottom:8,alignItems:"center",justifyContent:"center",backgroundColor:P.soft},emptyTitle:{...heading(28,1.1),textAlign:"center"},emptyBody:{...t(15.5,P.ink2,"regular",1.45),textAlign:"center",maxWidth:270},emptyAct:{marginTop:12},link:{minHeight:40,justifyContent:"center",alignSelf:"center"},linkText:{...t(15,P.link,"bold",1.3),textDecorationLine:"underline"},acts:{gap:4,alignItems:"stretch",marginTop:4},cancel:{minHeight:40,justifyContent:"center",alignSelf:"center"},cancelText:t(14.5,P.riskInk,"bold",1.3),orders:{gap:10},order:{flexDirection:"row",alignItems:"center",gap:10,paddingVertical:14,paddingLeft:16,paddingRight:14,borderRadius:22,backgroundColor:P.card,...lift},orderTop:{flexDirection:"row",flexWrap:"wrap",alignItems:"center",columnGap:10,rowGap:4},orderNo:{...t(12,P.ink3,"mono",1.3),letterSpacing:.48},orderWhat:{...t(16,P.ink,"bold",1.3),marginTop:8},orderMeta:{...t(14,P.ink3,"regular",1.4),marginTop:2},pics:{flexDirection:"row",gap:6,marginTop:10},pic:{width:40,height:40,borderRadius:10,overflow:"hidden",alignItems:"center",justifyContent:"center",backgroundColor:P.soft},pill:{flexDirection:"row",alignItems:"center",gap:6,minHeight:26,paddingHorizontal:10,borderRadius:999,backgroundColor:P.wait},pillText:t(13,P.ink,"bold",1.2),pillDone:{backgroundColor:P.clearBg},pillDoneText:{color:P.clearInk},pillSub:{backgroundColor:P.soft},pillSubText:{color:P.onSoft},pillRisk:{backgroundColor:P.riskBg},pillRiskText:{color:P.riskInk},pillQuiet:{backgroundColor:P.tile},pillQuietText:{color:P.ink2},carrier:{flexDirection:"row",alignItems:"center",gap:12},carrierIc:{width:40,height:40,borderRadius:11,alignItems:"center",justifyContent:"center",backgroundColor:P.soft},carrierName:t(16,P.ink,"bold",1.3),carrierNo:{...t(13,P.ink2,"mono",1.35),letterSpacing:.26,marginTop:1},carrierWait:t(14.5,P.ink2,"regular",1.4),carrierGo:{marginTop:10},trackLi:{flexDirection:"row",gap:12,paddingBottom:16},trackLast:{paddingBottom:0},trackRail:{position:"absolute",left:10,top:20,bottom:-2,width:2,borderRadius:1,backgroundColor:P.rail},trackRailDone:{backgroundColor:P.ink},trackDot:{width:22,height:22,borderRadius:11,alignItems:"center",justifyContent:"center",backgroundColor:P.card,borderWidth:2,borderColor:P.ring},trackDotDone:{backgroundColor:P.ink,borderWidth:0},trackDotNow:{backgroundColor:P.accent,borderColor:P.ink},trackT:t(15.5,P.ink,"bold",1.3),trackTNext:{color:P.ink3},trackD:{...t(14,P.ink3,"regular",1.35),marginTop:1},done:{paddingTop:40,paddingHorizontal:22,paddingBottom:20,alignItems:"center"},doneCheck:{width:76,height:76,borderRadius:38,alignItems:"center",justifyContent:"center",backgroundColor:P.accent},doneTitle:{...heading(34,1.1),marginTop:20,textAlign:"center"},doneWhen:{...t(16,P.ink,"bold",1.35),marginTop:10,textAlign:"center"},doneWho:{...t(15,P.ink2,"regular",1.35),marginTop:2,textAlign:"center"},next:{alignSelf:"stretch",marginTop:22,paddingVertical:4,paddingHorizontal:16,borderRadius:18,backgroundColor:P.card,...lift},nextLi:{flexDirection:"row",alignItems:"center",gap:12,paddingVertical:10},nextIc:{width:36,height:36,borderRadius:11,overflow:"hidden",alignItems:"center",justifyContent:"center",backgroundColor:P.soft},nextK:{...t(10.5,P.ink3,"mono",1.3),letterSpacing:.53,textTransform:"uppercase"},nextV:{...t(15,P.ink,"medium",1.35),marginTop:1},btn:{minHeight:48,paddingHorizontal:22,borderRadius:999,alignItems:"center",justifyContent:"center",flexDirection:"row",gap:8,backgroundColor:P.button},btnLg:{minHeight:56,paddingHorizontal:28},btnSm:{minHeight:40,paddingHorizontal:16},btnGhost:{backgroundColor:"transparent",borderWidth:1.5,borderColor:P.ink},btnOff:{opacity:.32},btnText:{...t(16,P.onButton,"bold",1.25),textAlign:"center"},btnTextLg:{fontSize:17,lineHeight:21},btnTextSm:{fontSize:15,lineHeight:19},btnTextGhost:{color:P.ink},scrim:{flex:1,justifyContent:"flex-end",backgroundColor:P.scrim},sheet:{maxHeight:"88%",paddingTop:10,paddingHorizontal:20,borderTopLeftRadius:28,borderTopRightRadius:28,backgroundColor:P.card},grab:{alignSelf:"center",width:40,height:5,borderRadius:3,backgroundColor:P.edge,marginBottom:10},sheetTop:{flexDirection:"row",alignItems:"center",justifyContent:"space-between"},kicker:{...t(11,P.ink3,"mono",1.3),letterSpacing:.88,textTransform:"uppercase",flexShrink:1},x:{width:40,height:40,marginRight:-8,alignItems:"center",justifyContent:"center",borderRadius:20},sheetTitle:{...heading(26,1.1),marginTop:4},co:{gap:10,marginTop:2},coItems:{gap:10},coItem:{flexDirection:"row",alignItems:"center",gap:12},coPic:{width:44,height:44,borderRadius:10,overflow:"hidden",alignItems:"center",justifyContent:"center",backgroundColor:P.soft},coName:t(15.5,P.ink,"bold",1.25),coSmall:t(13.5,P.ink3,"regular",1.35),coPrice:{...t(15,P.ink,"bold",1.3),fontVariant:["tabular-nums"]},coRows:{paddingVertical:2,paddingHorizontal:14,borderRadius:16,backgroundColor:P.paper},coRowsOnPage:{backgroundColor:P.card,...lift},coRow:{flexDirection:"row",alignItems:"center",gap:10,minHeight:44},coKey:{...t(14.5,P.ink3,"regular",1.3),width:74},coValue:{...t(14.5,P.ink,"bold",1.3),flex:1,minWidth:0},opts:{gap:8},opt:{flexDirection:"row",alignItems:"center",gap:12,minHeight:48,paddingVertical:12,paddingHorizontal:14,borderRadius:16,borderWidth:1.5,borderColor:P.edge},optOn:{backgroundColor:P.chosen,borderWidth:2,borderColor:P.ink},optRadio:{width:22,height:22,borderRadius:11,borderWidth:2,borderColor:P.edge,backgroundColor:P.card},optRadioOn:{borderWidth:7,borderColor:P.ink},optName:t(16,P.ink,"bold",1.35),optSmall:t(13,P.ink2,"regular",1.4),every:{flexDirection:"row",gap:4,padding:4,borderRadius:999,borderWidth:1.5,borderColor:P.edge,backgroundColor:P.card},everyBtn:{flex:1,minHeight:36,paddingHorizontal:6,borderRadius:999,alignItems:"center",justifyContent:"center"},everyOn:{backgroundColor:P.ink},everyText:{...t(14,P.ink,"bold",1.2),textAlign:"center"},everyTextOn:{color:P.card},coK:{...t(10.5,P.ink3,"mono",1.3),letterSpacing:.63,textTransform:"uppercase",marginBottom:6},subc:{flexDirection:"row",alignItems:"center",gap:12,paddingVertical:12,paddingLeft:12,paddingRight:14,borderRadius:22,backgroundColor:P.clearBg},subcImg:{width:56,height:56,borderRadius:14,overflow:"hidden",alignItems:"center",justifyContent:"center",backgroundColor:P.card},subcName:t(16,P.ink,"bold",1.25),subcSmall:{...t(14,P.ink2,"regular",1.35),marginTop:2},subcAlert:{...t(14,P.riskInk,"bold",1.35),marginTop:2},subcBtn:{minHeight:40,paddingHorizontal:14,borderRadius:999,alignItems:"center",justifyContent:"center",borderWidth:1.5,borderColor:P.ink,backgroundColor:P.card},subcBtnText:t(14,P.ink,"bold",1.2),coProd:{flexDirection:"row",alignItems:"center",gap:12},coProdImg:{width:56,height:56,borderRadius:14,overflow:"hidden",alignItems:"center",justifyContent:"center",backgroundColor:P.soft},coProdT:t(14,P.ink2,"bold",1.35),coProdP:{...t(14,P.ink2,"regular",1.35),marginTop:2},error:{paddingVertical:12,paddingHorizontal:14,borderRadius:14,backgroundColor:P.riskBg},errorText:t(14.5,P.riskInk,"medium",1.4),toast:{paddingVertical:12,paddingHorizontal:15,borderRadius:16,backgroundColor:P.ink},toastText:t(14.5,P.toastInk,"regular",1.4),ghostLine:{height:14,borderRadius:7,backgroundColor:P.tile},fieldLabel:{...t(15,P.ink,"bold",1.3),marginBottom:8},field:{...t(17,P.ink,"regular",1.25),minHeight:52,paddingHorizontal:16,borderRadius:16,borderWidth:1.5,borderColor:P.edge,backgroundColor:P.card},fieldErr:{...t(14,P.riskInk,"bold",1.35),marginTop:6}}),palette:P}}var HostContext=react.createContext({bottomInset:0,screenBottomInset:0,cardHandoff:null,onOrderHelp:null}),ShopV3HostProvider=HostContext.Provider;function useShopV3Host(){return react.useContext(HostContext)}function useShopStyles(){let theme=useEverfurTheme(),fonts=useKit().options.fonts;return react.useMemo(()=>makeShopStyles(theme,fonts),[theme,fonts])}function Page({head:head,foot:foot,children:children,testID:testID}){let s=useShopStyles(),{bottomInset:bottomInset}=useShopV3Host();/* @__PURE__ */
227
+ return jsxRuntime.jsxs(reactNative.View,{style:s.page,testID:testID,children:[head??null,
228
+ /* @__PURE__ */jsxRuntime.jsx(reactNative.ScrollView,{style:{flex:1},contentContainerStyle:s.body,keyboardShouldPersistTaps:"handled",children:children}),foot?/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:[s.foot,{paddingBottom:Math.max(12,bottomInset)}],children:foot}):null]})}function Title({children:children,sub:sub}){let s=useShopStyles();/* @__PURE__ */
229
+ return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[
230
+ /* @__PURE__ */jsxRuntime.jsx(Text4,{tier:"heading",style:s.title,accessibilityRole:"header",children:children}),sub?/* @__PURE__ */jsxRuntime.jsx(Text4,{style:s.sub2,children:sub}):null]})}function K({children:children}){let s=useShopStyles();/* @__PURE__ */
231
+ return jsxRuntime.jsx(Text4,{tier:"heading",style:s.k,accessibilityRole:"header",children:children})}function Card2({children:children,style:style}){let s=useShopStyles();/* @__PURE__ */
232
+ return jsxRuntime.jsx(reactNative.View,{style:[s.card,style],children:children})}function Thumb2({rx:rx,size:size=64,onCard:onCard}){let s=useShopStyles(),box=size===64?s.itemImg:size===56?onCard?s.subcImg:s.coProdImg:size===44?s.coPic:size===40?s.pic:s.nextIc;/* @__PURE__ */
233
+ return jsxRuntime.jsx(reactNative.View,{style:box,accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants",children:/* @__PURE__ */jsxRuntime.jsx(ShopV3Icon,{name:rx?"rx":"supplement",size:Math.round(size*.46),color:s.palette.onSoft})})}function IconTile({name:name,size:size=36}){let s=useShopStyles(),box=size===72?s.emptyTile:size===40?s.carrierIc:s.nextIc;/* @__PURE__ */
234
+ return jsxRuntime.jsx(reactNative.View,{style:box,accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants",children:/* @__PURE__ */jsxRuntime.jsx(ShopV3Icon,{name:name,size:size===72?30:size===40?21:18,color:s.palette.onSoft})})}var SLOP_40={top:2,bottom:2,left:2,right:2};function Stepper({value:value,max:max,label:label,fewerLabel:fewerLabel,moreLabel:moreLabel,disabled:disabled,onChange:onChange}){let s=useShopStyles(),lessOff=disabled||value<=1,moreOff=disabled||value>=max;/* @__PURE__ */
235
+ return jsxRuntime.jsxs(reactNative.View,{style:s.step,accessibilityLabel:label,accessible:false,children:[
236
+ /* @__PURE__ */jsxRuntime.jsx(reactNative.Pressable,{style:[s.stepButton,lessOff?s.stepOff:null],accessibilityRole:"button",accessibilityLabel:fewerLabel,accessibilityState:{disabled:lessOff},disabled:lessOff,hitSlop:SLOP_40,onPress:()=>onChange(value-1),children:/* @__PURE__ */jsxRuntime.jsx(ShopV3Icon,{name:"minus",size:16,color:s.palette.ink})}),
237
+ /* @__PURE__ */jsxRuntime.jsx(Text4,{tier:"control",style:s.stepValue,accessibilityLabel:`${label}, ${value}`,children:String(value)}),
238
+ /* @__PURE__ */jsxRuntime.jsx(reactNative.Pressable,{style:[s.stepButton,moreOff?s.stepOff:null],accessibilityRole:"button",accessibilityLabel:moreLabel,accessibilityState:{disabled:moreOff},disabled:moreOff,hitSlop:SLOP_40,onPress:()=>onChange(value+1),children:/* @__PURE__ */jsxRuntime.jsx(ShopV3Icon,{name:"plus",size:16,color:s.palette.ink})})]})}function Btn({label:label,onPress:onPress,ghost:ghost,size:size="md",busy:busy,busyLabel:busyLabel2,disabled:disabled,testID:testID}){let s=useShopStyles(),off=!!disabled||!!busy,shown=busy&&busyLabel2?busyLabel2:label;/* @__PURE__ */
239
+ return jsxRuntime.jsx(reactNative.Pressable,{style:[s.btn,size==="lg"?s.btnLg:size==="sm"?s.btnSm:null,ghost?s.btnGhost:null,off?s.btnOff:null],accessibilityRole:"button",accessibilityLabel:shown,accessibilityState:{disabled:off,busy:!!busy},disabled:off,hitSlop:size==="sm"?SLOP_40:void 0,onPress:onPress,testID:testID,children:/* @__PURE__ */jsxRuntime.jsx(Text4,{tier:"control",style:[s.btnText,size==="lg"?s.btnTextLg:size==="sm"?s.btnTextSm:null,ghost?s.btnTextGhost:null],numberOfLines:2,children:shown})})}function LinkBtn({label:label,onPress:onPress,tone:tone="link",role:role="button",disabled:disabled,a11yLabel:a11yLabel}){let s=useShopStyles(),box=tone==="remove"?s.rm:tone==="risk"?s.cancel:s.link,text=tone==="remove"?s.rmText:tone==="risk"?s.cancelText:s.linkText;/* @__PURE__ */
240
+ return jsxRuntime.jsx(reactNative.Pressable,{style:[box,disabled?s.btnOff:null],accessibilityRole:role,accessibilityLabel:a11yLabel??label,accessibilityState:{disabled:!!disabled},disabled:disabled,hitSlop:SLOP_40,onPress:onPress,children:/* @__PURE__ */jsxRuntime.jsx(Text4,{tier:"control",style:text,children:label})})}function Sum2({rows:rows,flat:flat}){let s=useShopStyles();return rows.length===0?null:/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:flat?s.sumFlat:s.sum,children:rows.map(r=>/* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:[s.sumRow,r.total?s.sumTotalRow:null],accessible:true,accessibilityLabel:`${r.k}, ${r.v}`,children:[
241
+ /* @__PURE__ */jsxRuntime.jsx(Text4,{style:r.total?s.sumTotal:s.sumKey,children:r.k}),
242
+ /* @__PURE__ */jsxRuntime.jsx(Text4,{style:r.total?s.sumTotal:s.sumValue,children:r.v})]},r.k))})}function Track({steps:steps,label:label}){let s=useShopStyles();/* @__PURE__ */
243
+ return jsxRuntime.jsx(reactNative.View,{accessibilityLabel:label,children:steps.map((st,i)=>{let last=i===steps.length-1,railDone=st.state==="done"&&steps[i+1]?.state==="done";/* @__PURE__ */
244
+ return jsxRuntime.jsxs(reactNative.View,{style:[s.trackLi,last?s.trackLast:null],accessible:true,accessibilityLabel:[st.title,st.line].filter(Boolean).join(", "),children:[last?null:/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:[s.trackRail,railDone?s.trackRailDone:null]}),
245
+ /* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:[s.trackDot,st.state==="done"?s.trackDotDone:st.state==="now"?s.trackDotNow:null],children:st.state==="done"?/* @__PURE__ */jsxRuntime.jsx(ShopV3Icon,{name:"check",size:13,color:s.palette.card}):null}),
246
+ /* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:s.grow,children:[
247
+ /* @__PURE__ */jsxRuntime.jsx(Text4,{style:[s.trackT,st.state==="next"?s.trackTNext:null],children:st.title}),st.line?/* @__PURE__ */jsxRuntime.jsx(Text4,{style:s.trackD,children:st.line}):null]})]},st.key)})})}function StatusPill({label:label,tone:tone}){let s=useShopStyles(),box=tone==="done"?s.pillDone:tone==="sub"?s.pillSub:tone==="risk"?s.pillRisk:tone==="quiet"?s.pillQuiet:null,ink=tone==="done"?s.pillDoneText:tone==="sub"?s.pillSubText:tone==="risk"?s.pillRiskText:tone==="quiet"?s.pillQuietText:null;/* @__PURE__ */
248
+ return jsxRuntime.jsx(reactNative.View,{style:[s.pill,box],children:/* @__PURE__ */jsxRuntime.jsx(Text4,{tier:"badge",style:[s.pillText,ink],children:label})})}function Empty({icon:icon,title:title,body:body,action:action}){let s=useShopStyles();/* @__PURE__ */
249
+ return jsxRuntime.jsxs(reactNative.View,{style:s.empty,children:[
250
+ /* @__PURE__ */jsxRuntime.jsx(IconTile,{name:icon,size:72}),
251
+ /* @__PURE__ */jsxRuntime.jsx(Text4,{tier:"heading",style:s.emptyTitle,accessibilityRole:"header",children:title}),body?/* @__PURE__ */jsxRuntime.jsx(Text4,{style:s.emptyBody,children:body}):null,action?/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:s.emptyAct,children:action}):null]})}function Ghosts({rows:rows=3}){let s=useShopStyles(),widths=["100%","82%","64%"];/* @__PURE__ */
252
+ return jsxRuntime.jsx(reactNative.View,{style:[s.card,{gap:12}],accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants",testID:"shop-ghost",children:Array.from({length:rows},(_,i)=>/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:[s.ghostLine,{width:widths[i%3]}]},i))})}function ErrorLine({line:line,children:children}){let s=useShopStyles();return line?/* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:[s.error,{gap:10}],accessibilityLiveRegion:"polite",testID:"shop-error",children:[
253
+ /* @__PURE__ */jsxRuntime.jsx(Text4,{style:s.errorText,accessibilityRole:"alert",children:line}),children??null]}):null}function Toast({line:line}){let s=useShopStyles();return line?/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:s.toast,accessibilityLiveRegion:"polite",testID:"shop-toast",children:/* @__PURE__ */jsxRuntime.jsx(Text4,{style:s.toastText,children:line})}):null}function Sheet({open:open,kicker:kicker,closeLabel:closeLabel,onClose:onClose,children:children,foot:foot,testID:testID}){let s=useShopStyles(),{screenBottomInset:screenBottomInset}=useShopV3Host();/* @__PURE__ */
254
+ return jsxRuntime.jsx(reactNative.Modal,{visible:open,transparent:true,animationType:"slide",onRequestClose:onClose,statusBarTranslucent:true,children:/* @__PURE__ */jsxRuntime.jsxs(reactNative.KeyboardAvoidingView,{style:s.scrim,behavior:reactNative.Platform.OS==="ios"?"padding":void 0,children:[
255
+ /* @__PURE__ */jsxRuntime.jsx(reactNative.Pressable,{style:{position:"absolute",top:0,right:0,bottom:0,left:0},onPress:onClose,accessibilityRole:"button",accessibilityLabel:closeLabel}),
256
+ /* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:[s.sheet,{paddingBottom:Math.max(24,screenBottomInset+6)}],accessibilityViewIsModal:true,testID:testID??"shop-sheet",children:[
257
+ /* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:s.grab,accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants"}),
258
+ /* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:s.sheetTop,children:[
259
+ /* @__PURE__ */jsxRuntime.jsx(Text4,{tier:"compact",style:s.kicker,accessibilityRole:"header",children:kicker}),
260
+ /* @__PURE__ */jsxRuntime.jsx(reactNative.Pressable,{style:s.x,onPress:onClose,accessibilityRole:"button",accessibilityLabel:closeLabel,hitSlop:SLOP_40,children:/* @__PURE__ */jsxRuntime.jsx(ShopV3Icon,{name:"close",size:18,color:s.palette.ink})})]}),
261
+ /* @__PURE__ */jsxRuntime.jsx(reactNative.ScrollView,{style:{flexGrow:0},contentContainerStyle:s.co,keyboardShouldPersistTaps:"handled",children:children}),foot?/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:{marginTop:12,gap:10},children:foot}):null]})]})})}function CoRow({icon:icon,k:k,value:value,onPress:onPress,disabled:disabled}){let s=useShopStyles(),body=/* @__PURE__ */jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[icon?/* @__PURE__ */jsxRuntime.jsx(ShopV3Icon,{name:icon,size:20,color:s.palette.ink2}):null,
262
+ /* @__PURE__ */jsxRuntime.jsx(Text4,{style:s.coKey,children:k}),
263
+ /* @__PURE__ */jsxRuntime.jsx(Text4,{style:s.coValue,numberOfLines:2,children:value}),onPress?/* @__PURE__ */jsxRuntime.jsx(ShopV3Icon,{name:"chev",size:16,color:s.palette.ink3}):null]});return onPress?/* @__PURE__ */jsxRuntime.jsx(reactNative.Pressable,{style:[s.coRow,disabled?s.btnOff:null],onPress:onPress,disabled:disabled,accessibilityRole:"button",accessibilityLabel:`${k}, ${value}`,children:body}):/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:s.coRow,accessible:true,accessibilityLabel:`${k}, ${value}`,children:body})}function Opt({on:on,name:name,small:small,onPress:onPress}){let s=useShopStyles();/* @__PURE__ */
264
+ return jsxRuntime.jsxs(reactNative.Pressable,{style:[s.opt,on?s.optOn:null],onPress:onPress,accessibilityRole:"radio",accessibilityState:{checked:on,selected:on},accessibilityLabel:[name,small].filter(Boolean).join(", "),children:[
265
+ /* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:[s.optRadio,on?s.optRadioOn:null]}),
266
+ /* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:s.grow,children:[
267
+ /* @__PURE__ */jsxRuntime.jsx(Text4,{style:s.optName,children:name}),small?/* @__PURE__ */jsxRuntime.jsx(Text4,{style:s.optSmall,children:small}):null]})]})}function Field2({label:label,value:value,onChange:onChange,autoComplete:autoComplete,error:error,kind:kind}){let s=useShopStyles();/* @__PURE__ */
268
+ return jsxRuntime.jsxs(reactNative.View,{children:[
269
+ /* @__PURE__ */jsxRuntime.jsx(Text4,{tier:"control",style:s.fieldLabel,children:label}),
270
+ /* @__PURE__ */jsxRuntime.jsx(TextInput3,{style:s.field,value:value,onChangeText:onChange,accessibilityLabel:label,autoComplete:autoComplete,placeholderTextColor:s.palette.ink3,...kind==="state"?{autoCapitalize:"characters",autoCorrect:false,maxLength:2}:null,...kind==="zip"?{keyboardType:"number-pad",maxLength:10}:null}),error?/* @__PURE__ */jsxRuntime.jsx(Text4,{style:s.fieldErr,children:error}):null]})}var TOAST_MS=3200;function useToast(initial){let[line,setLine]=react.useState(initial);return react.useEffect(()=>{if(!line)return;let t=setTimeout(()=>setLine(null),TOAST_MS);return()=>clearTimeout(t)},[line]),[line,setLine]}function CartScreen({go:go}){let{client:client,copy:copy,v3:v3}=useShop(),{cardHandoff:cardHandoff}=useShopV3Host(),items=useCart(client),co=useCartCheckout(items,go,cardHandoff),[toast,setToast]=useToast(()=>takeCartFlash(client));if(items.length===0)/* @__PURE__ */
271
+ return jsxRuntime.jsxs(Page,{testID:"shop-cart",children:[
272
+ /* @__PURE__ */jsxRuntime.jsx(Toast,{line:toast}),
273
+ /* @__PURE__ */jsxRuntime.jsx(Empty,{icon:"cart",title:v3.cartEmptyTitle,body:v3.cartEmptyBody,action:/* @__PURE__ */jsxRuntime.jsx(Btn,{label:copy.tabShop,onPress:()=>go({name:"shop"})})})]});let barAmount=co.subtotal??co.total;/* @__PURE__ */
274
+ return jsxRuntime.jsxs(Page,{testID:"shop-cart",foot:/* @__PURE__ */jsxRuntime.jsx(Btn,{size:"lg",label:barAmount?v3.checkoutCart(barAmount):v3.checkoutKicker,onPress:co.openSheet,testID:"shop-cart-checkout"}),children:[
275
+ /* @__PURE__ */jsxRuntime.jsx(Title,{children:v3.cartTitle}),
276
+ /* @__PURE__ */jsxRuntime.jsx(Toast,{line:toast}),
277
+ /* @__PURE__ */jsxRuntime.jsx(Card2,{children:/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:{gap:18},children:items.map(item=>/* @__PURE__ */jsxRuntime.jsx(CartLine,{item:item,onQuantity:n=>setCartQuantity(client,item.key,n),onRemove:()=>{let gone=removeFromCart(client,item.key);gone&&setToast(v3.removedFromCart(gone.title))}},item.key))})}),
278
+ /* @__PURE__ */jsxRuntime.jsx(Sum2,{rows:co.sum}),
279
+ /* @__PURE__ */jsxRuntime.jsx(CheckoutSheet,{co:co,items:items})]})}function CartLine({item:item,onQuantity:onQuantity,onRemove:onRemove}){let{copy:copy,v3:v3,petName:petName}=useShop(),s=useShopStyles(),pet=petName(item.petId);/* @__PURE__ */
280
+ return jsxRuntime.jsxs(reactNative.View,{style:s.item,testID:"shop-cart-line",children:[
281
+ /* @__PURE__ */jsxRuntime.jsx(Thumb2,{rx:item.requiresRx}),
282
+ /* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:s.grow,children:[
283
+ /* @__PURE__ */jsxRuntime.jsx(Text4,{style:s.itemName,children:item.title}),
284
+ /* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:s.itemP,children:[item.unitPrice!==null?/* @__PURE__ */jsxRuntime.jsx(Text4,{style:s.itemPrice,children:formatCents(item.unitPrice*item.quantity)}):null,pet?/* @__PURE__ */jsxRuntime.jsx(Text4,{style:s.itemSmall,children:copy.forPet(pet)}):null,item.rxId?/* @__PURE__ */jsxRuntime.jsx(Text4,{style:s.itemSmall,children:v3.itemQuantity(item.quantity)}):null]}),
285
+ /* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:s.itemActs,children:[item.rxId?null:/* @__PURE__ */jsxRuntime.jsx(LineStepper,{item:item,onQuantity:onQuantity}),
286
+ /* @__PURE__ */jsxRuntime.jsx(LinkBtn,{label:v3.remove,tone:"remove",onPress:onRemove,a11yLabel:`${v3.remove}: ${item.title}`})]})]})]})}function LineStepper({item:item,onQuantity:onQuantity}){let{v3:v3}=useShop();/* @__PURE__ */
287
+ return jsxRuntime.jsx(Stepper,{value:item.quantity,max:CART_MAX_QUANTITY,label:v3.quantityLabel(item.title),fewerLabel:v3.fewer,moreLabel:v3.more,onChange:onQuantity})}function CheckoutSheet({co:co,items:items}){let{copy:copy,v3:v3}=useShop(),kicker=co.pane==="address"||co.pane==="addAddress"?v3.shipsTo:co.pane==="card"?v3.payWith:v3.checkoutKicker,foot=co.pane==="main"?/* @__PURE__ */jsxRuntime.jsx(Btn,{size:"lg",label:co.total?v3.placeOrder(co.total):v3.checkoutKicker,busy:co.placing,busyLabel:copy.saving,disabled:!co.canPlace,onPress:co.place,testID:"shop-place-order"}):null;/* @__PURE__ */
288
+ return jsxRuntime.jsxs(Sheet,{open:co.open,kicker:kicker,closeLabel:copy.close,onClose:co.closeSheet,foot:foot,testID:"shop-checkout",children:[co.pane==="main"?/* @__PURE__ */jsxRuntime.jsx(MainPane,{co:co,items:items}):null,co.pane==="address"?/* @__PURE__ */jsxRuntime.jsx(AddressPane,{co:co}):null,co.pane==="addAddress"?/* @__PURE__ */jsxRuntime.jsx(AddAddressPane,{co:co}):null,co.pane==="card"?/* @__PURE__ */jsxRuntime.jsx(CardPane,{co:co}):null]})}function MainPane({co:co,items:items}){let{v3:v3}=useShop(),s=useShopStyles();/* @__PURE__ */
289
+ return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[
290
+ /* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:s.coItems,children:items.map(i=>/* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:s.coItem,accessible:true,accessibilityLabel:[i.title,v3.itemQuantity(i.quantity),i.unitPrice!==null?formatCents(i.unitPrice*i.quantity):null].filter(Boolean).join(", "),children:[
291
+ /* @__PURE__ */jsxRuntime.jsx(Thumb2,{rx:i.requiresRx,size:44}),
292
+ /* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:s.grow,children:[
293
+ /* @__PURE__ */jsxRuntime.jsx(Text4,{style:s.coName,children:i.title}),
294
+ /* @__PURE__ */jsxRuntime.jsx(Text4,{style:s.coSmall,children:v3.itemQuantity(i.quantity)})]}),i.unitPrice!==null?/* @__PURE__ */jsxRuntime.jsx(Text4,{style:s.coPrice,children:formatCents(i.unitPrice*i.quantity)}):null]},i.key))}),
295
+ /* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:s.coRows,children:[
296
+ /* @__PURE__ */jsxRuntime.jsx(CoRow,{icon:"truck",k:v3.shipsTo,value:co.address?co.address.label:co.addressesLoading?" ":v3.noAddressYet,onPress:()=>co.setPane(co.addresses.some(a=>a.isComplete)?"address":"addAddress")}),
297
+ /* @__PURE__ */jsxRuntime.jsx(CoRow,{icon:"card",k:v3.payWith,value:co.card?cardLabel(co.card.brand,co.card.last4):co.cardsLoading?" ":v3.noCardYet,onPress:()=>co.setPane("card")})]}),
298
+ /* @__PURE__ */jsxRuntime.jsx(Sum2,{rows:co.sum,flat:true}),co.nameStep?/* @__PURE__ */jsxRuntime.jsx(NameStep,{step:co.nameStep}):null,
299
+ /* @__PURE__ */jsxRuntime.jsx(ErrorLine,{line:co.error}),co.fine?/* @__PURE__ */jsxRuntime.jsx(Text4,{style:s.coFine,children:co.fine}):null]})}function AddressPane({co:co}){let{v3:v3}=useShop(),s=useShopStyles();/* @__PURE__ */
300
+ return jsxRuntime.jsxs(reactNative.View,{style:s.opts,children:[co.addresses.filter(a=>a.isComplete).map(a=>/* @__PURE__ */jsxRuntime.jsx(Opt,{on:co.address?.ref===a.ref,name:a.label,onPress:()=>co.chooseAddress(a.ref)},a.ref)),
301
+ /* @__PURE__ */jsxRuntime.jsx(Btn,{ghost:true,label:v3.addAddress,onPress:()=>co.setPane("addAddress")})]})}function AddAddressPane({co:co}){let{copy:copy}=useShop(),[f,setF]=react.useState({label:"",recipient:"",line1:"",line2:"",city:"",region:"",postal:""}),set2=k=>v=>setF(x=>({...x,[k]:v})),ready=f.label.trim()&&f.recipient.trim()&&f.line1.trim()&&f.city.trim()&&isUsState(f.region)&&US_ZIP.test(f.postal.trim()),input=()=>({label:f.label.trim().slice(0,60),makeDefault:co.addresses.length===0,address:{recipientName:f.recipient.trim(),line1:f.line1.trim(),line2:f.line2.trim()||null,city:f.city.trim(),region:f.region.trim().toUpperCase(),postalCode:f.postal.trim(),country:"US"}});/* @__PURE__ */
302
+ return jsxRuntime.jsxs(reactNative.View,{style:{gap:14},children:[
303
+ /* @__PURE__ */jsxRuntime.jsx(Field2,{label:copy.addressLabel,value:f.label,onChange:set2("label"),autoComplete:"off"}),
304
+ /* @__PURE__ */jsxRuntime.jsx(Field2,{label:copy.addressRecipient,value:f.recipient,onChange:set2("recipient"),autoComplete:"name"}),
305
+ /* @__PURE__ */jsxRuntime.jsx(Field2,{label:copy.addressLine1,value:f.line1,onChange:set2("line1"),autoComplete:"address-line1"}),
306
+ /* @__PURE__ */jsxRuntime.jsx(Field2,{label:copy.addressLine2,value:f.line2,onChange:set2("line2"),autoComplete:"address-line2"}),
307
+ /* @__PURE__ */jsxRuntime.jsx(Field2,{label:copy.addressCity,value:f.city,onChange:set2("city"),autoComplete:"off"}),
308
+ /* @__PURE__ */jsxRuntime.jsx(Field2,{label:copy.addressRegion,value:f.region,onChange:set2("region"),autoComplete:"off",kind:"state"}),
309
+ /* @__PURE__ */jsxRuntime.jsx(Field2,{label:copy.addressPostal,value:f.postal,onChange:set2("postal"),autoComplete:"postal-code",kind:"zip"}),
310
+ /* @__PURE__ */jsxRuntime.jsx(ErrorLine,{line:co.saveAddress.error}),
311
+ /* @__PURE__ */jsxRuntime.jsx(Btn,{label:copy.addressSave,busy:co.saveAddress.busy,busyLabel:copy.saving,disabled:!ready,onPress:()=>co.saveAddress.run(input())})]})}function CardPane({co:co}){let{copy:copy,v3:v3}=useShop(),s=useShopStyles();/* @__PURE__ */
312
+ return jsxRuntime.jsxs(reactNative.View,{style:s.opts,children:[co.cards.map(c=>/* @__PURE__ */jsxRuntime.jsx(Opt,{on:co.card?.paymentMethodId===c.paymentMethodId,name:cardLabel(c.brand,c.last4),onPress:()=>co.chooseCard(c.paymentMethodId)},c.paymentMethodId)),co.addCard?/* @__PURE__ */jsxRuntime.jsx(Btn,{ghost:true,label:v3.addCard,busy:co.addCard.busy,busyLabel:copy.saving,onPress:co.addCard.run}):null,
313
+ /* @__PURE__ */jsxRuntime.jsx(ErrorLine,{line:co.error})]})}function NameStep({step:step}){let[first,setFirst]=react.useState(""),[last,setLast]=react.useState("");/* @__PURE__ */
314
+ return jsxRuntime.jsxs(ErrorLine,{line:step.line,children:[step.form?/* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:{gap:12},children:[
315
+ /* @__PURE__ */jsxRuntime.jsx(Field2,{label:step.form.firstLabel,value:first,onChange:setFirst,autoComplete:"given-name"}),
316
+ /* @__PURE__ */jsxRuntime.jsx(Field2,{label:step.form.lastLabel,value:last,onChange:setLast,autoComplete:"family-name"}),step.form.error?/* @__PURE__ */jsxRuntime.jsx(Text4,{children:step.form.error}):null,
317
+ /* @__PURE__ */jsxRuntime.jsx(Btn,{label:step.form.saveLabel,busy:step.form.busy,disabled:!first.trim()||!last.trim(),onPress:()=>step.form.onSave({firstName:first,lastName:last}),testID:"shop-save-name"})]}):null,step.handoff?/* @__PURE__ */jsxRuntime.jsx(Btn,{ghost:true,size:"sm",label:step.handoff.label,onPress:step.handoff.onPress,testID:"shop-add-name"}):null]})}var STEP_KEYS=["ordered","shipped","out_for_delivery","delivered"];function paymentFailed(order){return order.paymentStatus==="failed"||order.canPay&&order.paymentStatus==="requires_action"}function statusPill(status,copy,v3,failed=false){if(failed)return{label:copy.paymentFailed,tone:"risk"};let label=copy.orderStatus[status]??v3.orderSteps[0];return status==="delivered"?{label:label,tone:"done"}:status==="cancelled"||status==="rejected"?{label:label,tone:"quiet"}:status==="needs_support"?{label:label,tone:"risk"}:{label:label,tone:"wait"}}function latestTracking(order){if(order.tracking)return order.tracking;let best=null;for(let sh of order.shipments)for(let ev of sh.tracking)(!best||(ev.occurredAt??"")>(best.occurredAt??""))&&(best=ev);return best}function arrivesByOf(order){return order.arrivesBy??latestTracking(order)?.deliveryBy??null}function deliveredAt(order){let step=order.steps?.find(s=>s.key==="delivered");if(step?.at)return step.at;for(let sh of order.shipments){let ev=sh.tracking.find(t=>t.status==="delivered");if(ev?.occurredAt)return ev.occurredAt}return null}function orderEnded(status){return status==="cancelled"||status==="rejected"||status==="needs_support"}function orderHeadline(order,copy,v3){let status=order.summary.status;return paymentFailed(order)?copy.paymentFailed:status==="delivered"?v3.orderSteps[3]:orderEnded(status)?copy.orderStatus[status]??v3.orderSteps[0]:status==="shipped"?v3.orderSteps[1]:v3.orderSteps[0]}function orderSubline(order,copy,v3){let status=order.summary.status;if(orderEnded(status))return null;if(status==="delivered"){let day=formatDay(deliveredAt(order),{when:true});return day?v3.deliveredOn(day):null}let by=formatDay(arrivesByOf(order),{weekday:true});return by?v3.arrivesBy(by):copy.orderStatus[status]??null}function trackSteps(order,v3){let status=order.summary.status;if(status==="cancelled"||status==="rejected")return null;let sent=order.steps&&order.steps.length>0?order.steps:null,tracking=latestTracking(order),shippedAt=order.shipments.flatMap(sh=>sh.tracking).map(t=>t.occurredAt).filter(d=>!!d).sort()[0]??null,derived={ordered:{done:true,at:order.summary.placedAt},shipped:{done:status==="shipped"||status==="delivered"||!!tracking,at:shippedAt},out_for_delivery:{done:status==="delivered",at:null},delivered:{done:status==="delivered",at:deliveredAt(order)}},by=formatDay(arrivesByOf(order),{weekday:true}),steps=STEP_KEYS.map((key,i)=>{let s=sent?.find(x=>x.key===key),done=s?s.done:derived[key].done,at=s?s.at:derived[key].at,line=done?formatDay(at,{when:true}):key==="delivered"&&by?v3.expected(by):null;return{key:key,title:v3.orderSteps[i],line:line,done:done}}),nowAt=steps.reduce((at,s,i)=>s.done?i:at,-1);return steps.map(({done:done,...s},i)=>({...s,state:done?i===nowAt&&i<steps.length-1?"now":"done":"next"}))}function itemNames(items){return items.map(i=>i.title).join(", ")}function orderMeta(summary,copy,total=formatCents(summary.total)){let day=formatDay(summary.placedAt);return day?`${copy.placed(day)} · ${total}`:total}function OrderScreen({orderId:orderId,go:go}){let{client:client,copy:copy,v3:v3,payments:payments,petName:petName}=useShop(),host=useShopV3Host(),nav=useShopNativeNav(),s=useShopStyles(),order=useOrder(orderId),cards=usePaymentMethods(),[line,setLine]=react.useState(()=>peekOrderNotice(client,orderId));react.useEffect(()=>dropOrderNotice(client,orderId),[client,orderId]);let[asking,setAsking]=react.useState(false),cancel=useShopAction(keys=>client.cancelOrder(orderId,{idempotencyKey:keys.key("cancel"),reasonCode:"customer_request"})),pay=useShopAction(async keys=>{let key=keys.key("pay");for(let round=0;round<3;round+=1){let res=await client.payOrder(orderId,{idempotencyKey:key});if(!res.ok)return omsErr(res.error);if(res.value.outcome==="authorized")return omsOk({kind:"confirmed",orderIds:[orderId]});if(!payments||!res.value.payerAction)return omsOk({kind:"needsPayerAction",orderIds:[orderId]});let step=await payments.handleNextAction(res.value.payerAction,{orderId:orderId});if(!step.ok)return omsOk(step.closed?{kind:"payerActionClosed",orderIds:[orderId]}:{kind:"payerActionFailed",orderIds:[orderId],message:step.message});key=keys.next("pay")}return omsOk({kind:"needsPayerAction",orderIds:[orderId]})});if(order.phase==="loading")/* @__PURE__ */
318
+ return jsxRuntime.jsxs(Page,{testID:"shop-order",children:[
319
+ /* @__PURE__ */jsxRuntime.jsx(Ghosts,{}),
320
+ /* @__PURE__ */jsxRuntime.jsx(Ghosts,{rows:2})]});if(order.phase!=="ready"||!order.value)/* @__PURE__ */
321
+ return jsxRuntime.jsx(Page,{testID:"shop-order",children:/* @__PURE__ */jsxRuntime.jsx(ErrorLine,{line:copy.loadFailed(copy.thingOrder),children:/* @__PURE__ */jsxRuntime.jsx(Btn,{ghost:true,size:"sm",label:copy.tryAgain,onPress:order.refresh})})});let o=order.value,ref=o.summary.referenceNumber,steps=trackSteps(o,v3),tracking=latestTracking(o),carrier=tracking?.carrier??null,subtotal=o.subtotal??o.lines.reduce((n,l)=>n+l.unitPrice*l.quantity,0),discount=o.discount??o.lines.reduce((n,l)=>n+l.discount,0),tax=o.tax??o.lines.reduce((n,l)=>n+l.tax,0)+o.shippingTax,refunded=o.refunds.reduce((n,r)=>n+r.amount,0),sum=[{k:v3.subtotal,v:formatCents(subtotal)},...discount>0?[{k:v3.discount,v:formatCents(-discount)}]:[],{k:copy.shipping,v:o.shipping===0?copy.free:formatCents(o.shipping)},{k:copy.tax,v:formatCents(tax)},{k:copy.total,v:formatCents(o.summary.total),total:true},...refunded>0?[{k:v3.refund,v:formatCents(refunded)}]:[]],paidCard=o.paymentMethodId?(cards.value??[]).find(c=>c.paymentMethodId===o.paymentMethodId):void 0,again=o.lines.filter(l=>!l.requiresRx),busy=pay.busy||cancel.busy,onPay=()=>{setLine(null),pay.run().then(res=>{res&&(setLine(res.ok?outcomeLine(copy,res.value):refusalLine(copy,res.error)),order.refresh())})},onCancel=()=>{cancel.run().then(res=>{if(!res)return;if(!res.ok){setLine(refusalLine(copy,res.error)),setAsking(false);return}setAsking(false),cancel.reset();let out=res.value.outcome;setLine(out==="requested"?v3.cancelRequested:out==="not_cancellable"?copy.refusal.operation_not_supported??copy.actionFailed:null),order.refresh()})};/* @__PURE__ */
322
+ return jsxRuntime.jsxs(Page,{testID:"shop-order",children:[ref?/* @__PURE__ */jsxRuntime.jsx(Text4,{style:s.orderNo,children:v3.orderTitle(ref)}):null,
323
+ /* @__PURE__ */jsxRuntime.jsx(Title,{sub:orderSubline(o,copy,v3),children:orderHeadline(o,copy,v3)}),
324
+ /* @__PURE__ */jsxRuntime.jsx(ErrorLine,{line:line}),o.canPay?/* @__PURE__ */jsxRuntime.jsx(Btn,{label:copy.payOrder,busy:pay.busy,busyLabel:copy.saving,disabled:busy,onPress:onPay,testID:"shop-order-pay"}):null,steps?/* @__PURE__ */jsxRuntime.jsx(Card2,{children:/* @__PURE__ */jsxRuntime.jsx(Track,{steps:steps,label:v3.tracking})}):null,tracking&&(carrier||tracking.trackingNumber)?/* @__PURE__ */jsxRuntime.jsxs(Card2,{children:[
325
+ /* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:s.carrier,children:[
326
+ /* @__PURE__ */jsxRuntime.jsx(IconTile,{name:"truck",size:40}),
327
+ /* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:s.grow,children:[
328
+ /* @__PURE__ */jsxRuntime.jsx(Text4,{style:s.carrierName,children:carrier??v3.tracking}),tracking.trackingNumber?/* @__PURE__ */jsxRuntime.jsx(Text4,{style:s.carrierNo,children:tracking.trackingNumber}):null]})]}),tracking.trackingUrl?/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:s.carrierGo,children:/* @__PURE__ */jsxRuntime.jsx(Btn,{ghost:true,size:"sm",label:carrier?v3.trackOn(carrier):copy.trackPackage,onPress:()=>nav.openExternal(tracking.trackingUrl)})}):null]}):null,
329
+ /* @__PURE__ */jsxRuntime.jsx(K,{children:v3.inThisOrder}),
330
+ /* @__PURE__ */jsxRuntime.jsx(Card2,{children:/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:s.items,children:o.lines.map(l=>{let pet=petName(l.petId);/* @__PURE__ */
331
+ return jsxRuntime.jsxs(reactNative.View,{style:s.item,children:[
332
+ /* @__PURE__ */jsxRuntime.jsx(Thumb2,{rx:l.requiresRx}),
333
+ /* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:s.grow,children:[
334
+ /* @__PURE__ */jsxRuntime.jsx(Text4,{style:s.itemName,children:l.title}),
335
+ /* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:s.itemP,children:[
336
+ /* @__PURE__ */jsxRuntime.jsx(Text4,{style:s.itemPrice,children:formatCents(l.unitPrice*l.quantity)}),
337
+ /* @__PURE__ */jsxRuntime.jsx(Text4,{style:s.itemSmall,children:v3.orderItemLine(l.quantity)}),pet?/* @__PURE__ */jsxRuntime.jsx(Text4,{style:s.itemSmall,children:copy.forPet(pet)}):null]})]})]},l.lineId)})})}),
338
+ /* @__PURE__ */jsxRuntime.jsx(Sum2,{rows:sum}),paidCard?/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:[s.coRows,s.coRowsOnPage],children:/* @__PURE__ */jsxRuntime.jsx(CoRow,{icon:"card",k:v3.paidWith,value:cardLabel(paidCard.brand,paidCard.last4)})}):null,
339
+ /* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:s.acts,children:[again.length>0?/* @__PURE__ */jsxRuntime.jsx(Btn,{ghost:true,label:v3.buyAgain,onPress:()=>{for(let l of again)addToCart(client,{offerId:l.offerId,title:l.title,unitPrice:l.unitPrice,requiresRx:false,quantity:l.quantity,...l.petId?{petId:l.petId}:{}});go({name:"cart"})}}):null,host.onOrderHelp?/* @__PURE__ */jsxRuntime.jsx(LinkBtn,{label:v3.orderHelp,onPress:()=>host.onOrderHelp?.(orderId)}):null,o.canCancel?/* @__PURE__ */jsxRuntime.jsx(LinkBtn,{label:copy.cancelOrder,tone:"risk",disabled:busy,onPress:()=>setAsking(true)}):null]}),
340
+ /* @__PURE__ */jsxRuntime.jsxs(Sheet,{open:asking,kicker:v3.orderTitle(ref),closeLabel:copy.close,onClose:()=>!cancel.busy&&setAsking(false),children:[
341
+ /* @__PURE__ */jsxRuntime.jsx(Text4,{tier:"heading",style:s.sheetTitle,accessibilityRole:"header",children:v3.cancelAsk}),v3.cancelBody?/* @__PURE__ */jsxRuntime.jsx(Text4,{style:s.sub2,children:v3.cancelBody}):null,
342
+ /* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:{gap:10,marginTop:8},children:[
343
+ /* @__PURE__ */jsxRuntime.jsx(Btn,{label:copy.cancelOrder,busy:cancel.busy,busyLabel:copy.saving,onPress:onCancel,testID:"shop-order-cancel-confirm"}),
344
+ /* @__PURE__ */jsxRuntime.jsx(Btn,{ghost:true,label:copy.keepIt,disabled:cancel.busy,onPress:()=>setAsking(false)})]})]})]})}var EVERY=[30,60,90];function cadenceChoices(current){return EVERY.includes(current)?EVERY:[...EVERY,current].sort((a,b)=>a-b)}function useSubscriptions(){let{client:client}=useShop(),read=usePlans(),[own,setOwn]=react.useState(/* @__PURE__ */new Map),value=read.value;react.useEffect(()=>setOwn(/* @__PURE__ */new Map),[value]);let plans=react.useMemo(()=>(value?.plans??[]).map(p=>own.get(p.planId)??p).filter(p=>p.state!=="cancelled"),[value,own]),ids=[...new Set(plans.flatMap(p=>p.lines.map(l=>l.offerId)))].sort(),offers=useShopRead(ids.length>0?`v3-plan-offers:${ids.join(",")}`:null,async()=>{let got=await Promise.all(ids.map(id=>client.offer(id)));return omsOk(new Map(ids.map((id,i)=>[id,got[i].ok?got[i].value:null])))});return{phase:read.phase==="unavailable"?"none":read.phase==="failed"?"failed":read.phase==="loading"||ids.length>0&&offers.phase==="loading"?"loading":"ready",plans:plans,offers:offers.value??/* @__PURE__ */new Map,refresh:read.refresh,put:plan=>setOwn(m=>new Map(m).set(plan.planId,plan))}}function planName(plan,offers,gone){return itemNames(plan.lines.map(l=>({title:offers.get(l.offerId)?.title??gone})))}var planRx=(plan,offers)=>plan.lines.some(l=>offers.get(l.offerId)?.requiresRx===true);function Subscriptions({subs:subs,onOrders:onOrders}){let{client:client,copy:copy,v3:v3}=useShop(),{pkg:pkg}=useShopShared(),s=useShopStyles(),[managing,setManaging]=react.useState(null),[pane,setPane]=react.useState("main"),[line,setLine]=react.useState(null),[error,setError]=react.useState(null),cadence=useShopAction((keys,p,days)=>client.updatePlan(p.planId,{idempotencyKey:keys.key(`cadence:${p.planId}:${days}`),cadenceDays:days})),act=useShopAction((keys,p,operation)=>client.planAction(p.planId,{idempotencyKey:keys.key(`${operation}:${p.planId}`),operation:operation})),cancel=useShopAction((_keys,p)=>client.cancelPlan(p.planId)),busy=cadence.busy||act.busy||cancel.busy,month=packageMonth(pkg);if(subs.phase==="none"||subs.phase==="ready"&&subs.plans.length===0)return null;if(subs.phase==="loading")/* @__PURE__ */return jsxRuntime.jsx(Ghosts,{rows:2});if(subs.phase==="failed")/* @__PURE__ */
345
+ return jsxRuntime.jsx(ErrorLine,{line:copy.loadFailed(copy.thingPlan),children:/* @__PURE__ */jsxRuntime.jsx(Btn,{ghost:true,size:"sm",label:copy.tryAgain,onPress:subs.refresh})});let plan=managing?subs.plans.find(p=>p.planId===managing)??null:null,open=p=>{setManaging(p.planId),setPane("main"),setLine(null),setError(null)},close=()=>{busy||(setManaging(null),setPane("main"),setLine(null),setError(null))},done=(res,after,refreshPackage)=>res?res.ok?(setError(null),setLine(after),subs.put(res.value),pkg.refresh(),true):(setError(refusalLine(copy,res.error)),false):false,onEvery=(p,days)=>{busy||days===p.cadenceDays||(setLine(null),cadence.run(p,days).then(res=>done(res,null)))},onOp=(p,operation)=>{setLine(null),act.run(p,operation).then(res=>{done(res,operation==="skip"?v3.skipped:null)&&setPane("main")})},onCancel=p=>{cancel.run(p).then(res=>{done(res,null)&&(setManaging(null),setPane("main"))})};/* @__PURE__ */
346
+ return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[
347
+ /* @__PURE__ */jsxRuntime.jsx(K,{children:v3.manageKicker}),subs.plans.map(p=>/* @__PURE__ */jsxRuntime.jsx(PlanCard,{plan:p,name:planName(p,subs.offers,copy.itemNoLongerSold),rx:planRx(p,subs.offers),month:month,onManage:()=>open(p)},p.planId)),
348
+ /* @__PURE__ */jsxRuntime.jsx(Sheet,{open:plan!==null,kicker:v3.manageKicker,closeLabel:copy.close,onClose:close,testID:"shop-manage",children:plan?pane==="main"?/* @__PURE__ */jsxRuntime.jsx(ManageMain,{plan:plan,name:planName(plan,subs.offers,copy.itemNoLongerSold),rx:planRx(plan,subs.offers),busy:busy,line:line,error:error,onEvery:d=>onEvery(plan,d),onSkip:()=>onOp(plan,"skip"),onPause:()=>{setLine(null),setError(null),setPane("pause")},onResume:()=>onOp(plan,"resume"),onCancel:()=>{setLine(null),setError(null),setPane("cancel")},onOrders:()=>{close(),onOrders()}}):/* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:{gap:10},children:[
349
+ /* @__PURE__ */jsxRuntime.jsx(Text4,{tier:"heading",style:s.sheetTitle,accessibilityRole:"header",children:pane==="pause"?copy.pausePlanAsk:v3.cancelSubscriptionAsk}),
350
+ /* @__PURE__ */jsxRuntime.jsx(Text4,{style:s.sub2,children:pane==="pause"?copy.pausePlanBody:v3.cancelSubscriptionBody}),
351
+ /* @__PURE__ */jsxRuntime.jsx(ErrorLine,{line:error}),
352
+ /* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:{gap:10,marginTop:8},children:[
353
+ /* @__PURE__ */jsxRuntime.jsx(Btn,{label:pane==="pause"?copy.pausePlan:v3.cancelSubscription,busy:busy,busyLabel:copy.saving,onPress:()=>pane==="pause"?onOp(plan,"pause"):onCancel(plan),testID:pane==="pause"?"shop-plan-pause-confirm":"shop-plan-cancel-confirm"}),
354
+ /* @__PURE__ */jsxRuntime.jsx(Btn,{ghost:true,label:copy.keepIt,disabled:busy,onPress:()=>{setError(null),setPane("main")}})]})]}):null})]})}function PlanCard({plan:plan,name:name,rx:rx,month:month,onManage:onManage}){let{copy:copy,v3:v3}=useShop(),s=useShopStyles(),next=plan.state==="active"?formatDay(plan.nextRun):null,stop=stopLine(plan,copy,month);/* @__PURE__ */
355
+ return jsxRuntime.jsxs(reactNative.View,{style:s.subc,testID:"shop-plan-card",children:[
356
+ /* @__PURE__ */jsxRuntime.jsx(Thumb2,{rx:rx,size:56,onCard:true}),
357
+ /* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:s.grow,accessible:true,accessibilityLabel:[name,next?v3.nextBox(next):null,stop??v3.everyDays(plan.cadenceDays)].filter(Boolean).join(", "),children:[
358
+ /* @__PURE__ */jsxRuntime.jsx(Text4,{style:s.subcName,children:name}),next?/* @__PURE__ */jsxRuntime.jsx(Text4,{style:s.subcSmall,children:v3.nextBox(next)}):null,stop?/* @__PURE__ */jsxRuntime.jsx(Text4,{style:plan.state==="paused"&&(plan.stopReason??"customer")==="customer"?s.subcSmall:s.subcAlert,children:stop}):/* @__PURE__ */jsxRuntime.jsx(Text4,{style:s.subcSmall,children:v3.everyDays(plan.cadenceDays)})]}),
359
+ /* @__PURE__ */jsxRuntime.jsx(reactNative.Pressable,{style:s.subcBtn,onPress:onManage,accessibilityRole:"button",accessibilityLabel:v3.manageTitle(name),hitSlop:{top:2,bottom:2,left:2,right:2},children:/* @__PURE__ */jsxRuntime.jsx(Text4,{tier:"control",style:s.subcBtnText,children:v3.manage})})]})}function stopLine(plan,copy,month){let reason=plan.stopReason;return reason==="payment_declined"?copy.declined(month):reason&&reason!=="customer"?copy.stopReason(reason):plan.state==="paused"?copy.pausePlanBody:null}function ManageMain({plan:plan,name:name,rx:rx,busy:busy,line:line,error:error,onEvery:onEvery,onSkip:onSkip,onPause:onPause,onResume:onResume,onCancel:onCancel,onOrders:onOrders}){let{copy:copy,v3:v3}=useShop(),s=useShopStyles(),active=plan.state==="active",paused=plan.state==="paused",next=active?formatDay(plan.nextRun):null;/* @__PURE__ */
360
+ return jsxRuntime.jsxs(reactNative.View,{style:s.co,children:[
361
+ /* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:s.coProd,accessible:true,accessibilityRole:"header",accessibilityLabel:`${v3.manageTitle(name)}, ${v3.subscribedLine(plan.cadenceDays,next)}`,children:[
362
+ /* @__PURE__ */jsxRuntime.jsx(Thumb2,{rx:rx,size:56}),
363
+ /* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:s.grow,children:[
364
+ /* @__PURE__ */jsxRuntime.jsx(Text4,{style:s.coProdT,children:name}),
365
+ /* @__PURE__ */jsxRuntime.jsx(Text4,{style:s.coProdP,children:v3.subscribedLine(plan.cadenceDays,next)})]})]}),
366
+ /* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{children:[
367
+ /* @__PURE__ */jsxRuntime.jsx(Text4,{tier:"compact",style:s.coK,children:v3.shipsEvery}),
368
+ /* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:s.every,accessibilityRole:"radiogroup",accessibilityLabel:v3.shipsEvery,children:cadenceChoices(plan.cadenceDays).map(d=>{let on=d===plan.cadenceDays;/* @__PURE__ */
369
+ return jsxRuntime.jsx(reactNative.Pressable,{style:[s.everyBtn,on?s.everyOn:null],onPress:()=>onEvery(d),disabled:busy,accessibilityRole:"radio",accessibilityLabel:v3.daysChip(d),accessibilityState:{checked:on,disabled:busy},testID:`shop-plan-every-${d}`,children:/* @__PURE__ */jsxRuntime.jsx(Text4,{tier:"control",style:[s.everyText,on?s.everyTextOn:null],numberOfLines:1,children:v3.daysChip(d)})},d)})})]}),
370
+ /* @__PURE__ */jsxRuntime.jsx(Toast,{line:line}),
371
+ /* @__PURE__ */jsxRuntime.jsx(ErrorLine,{line:error}),active?/* @__PURE__ */jsxRuntime.jsx(Btn,{ghost:true,label:v3.skipNext,disabled:busy,onPress:onSkip,testID:"shop-plan-skip"}):null,paused?/* @__PURE__ */jsxRuntime.jsx(Btn,{label:copy.resumePlan,busy:busy,busyLabel:copy.saving,onPress:onResume,testID:"shop-plan-resume"}):null,active?/* @__PURE__ */jsxRuntime.jsx(LinkBtn,{label:copy.pausePlan,disabled:busy,onPress:onPause}):null,
372
+ /* @__PURE__ */jsxRuntime.jsx(LinkBtn,{label:v3.cancelSubscription,tone:"risk",disabled:busy,onPress:onCancel}),
373
+ /* @__PURE__ */jsxRuntime.jsx(LinkBtn,{label:copy.allOrders,onPress:onOrders})]})}var PAGE=20;function OrdersScreen({tabs:tabs,go:go}){let{client:client,copy:copy,v3:v3}=useShop(),s=useShopStyles(),first=useShopRead("v3-orders",()=>client.orders({limit:PAGE})),subs=useSubscriptions(),[more,setMore]=react.useState(null),[moreBusy,setMoreBusy]=react.useState(false),[moreError,setMoreError]=react.useState(null),firstValue=first.value;react.useEffect(()=>setMore(null),[firstValue]);let orders=[...firstValue?.orders??[],...more?.orders??[]],cursor=more?more.cursor:firstValue?.nextCursor??null,missing=orders.filter(o=>!o.items).map(o=>o.orderId),details=useShopRead(missing.length>0?`v3-order-items:${missing.join(",")}`:null,async()=>{let read=await Promise.all(missing.map(id=>client.order(id)));return omsOk(new Map(missing.map((id,i)=>[id,read[i].ok?read[i].value.lines.map(l=>({title:l.title,quantity:l.quantity,rx:l.requiresRx})):[]])))}),named=o=>o.items?o.items.map(i=>({title:i.title,quantity:i.quantity,rx:false})):details.value?.get(o.orderId)??null,busy=react.useRef(false),loadMore=react.useCallback(()=>{!cursor||busy.current||(busy.current=true,setMoreBusy(true),setMoreError(null),client.orders({limit:PAGE,cursor:cursor}).then(res=>{busy.current=false,setMoreBusy(false),res.ok?setMore(m=>({orders:[...m?.orders??[],...res.value.orders],cursor:res.value.nextCursor})):setMoreError(refusalLine(copy,res.error))}))},[client,copy,cursor]),head=/* @__PURE__ */jsxRuntime.jsx(CareTabs,{copy:copy,current:"orders",tabs:tabs});if(first.phase==="loading"||subs.phase==="loading")/* @__PURE__ */
374
+ return jsxRuntime.jsxs(Page,{head:head,testID:"shop-orders",children:[
375
+ /* @__PURE__ */jsxRuntime.jsx(Title,{children:v3.ordersTitle}),
376
+ /* @__PURE__ */jsxRuntime.jsx(Ghosts,{})]});if(first.phase==="failed")/* @__PURE__ */
377
+ return jsxRuntime.jsxs(Page,{head:head,testID:"shop-orders",children:[
378
+ /* @__PURE__ */jsxRuntime.jsx(Title,{children:v3.ordersTitle}),
379
+ /* @__PURE__ */jsxRuntime.jsx(ErrorLine,{line:copy.loadFailed(copy.thingOrders),children:/* @__PURE__ */jsxRuntime.jsx(Btn,{ghost:true,size:"sm",label:copy.tryAgain,onPress:first.refresh})})]});let subbed=subs.phase==="failed"||subs.plans.length>0,section=/* @__PURE__ */jsxRuntime.jsx(Subscriptions,{subs:subs,onOrders:()=>{}});return orders.length===0&&subbed?/* @__PURE__ */jsxRuntime.jsxs(Page,{head:head,testID:"shop-orders",children:[
380
+ /* @__PURE__ */jsxRuntime.jsx(Title,{children:v3.ordersTitle}),section]}):orders.length===0?/* @__PURE__ */jsxRuntime.jsx(Page,{head:head,testID:"shop-orders",children:/* @__PURE__ */jsxRuntime.jsx(Empty,{icon:"box",title:v3.ordersEmptyTitle,body:v3.ordersEmptyBody,action:/* @__PURE__ */jsxRuntime.jsx(Btn,{label:copy.tabShop,onPress:()=>go({name:"shop"})})})}):/* @__PURE__ */jsxRuntime.jsxs(Page,{head:head,testID:"shop-orders",children:[
381
+ /* @__PURE__ */jsxRuntime.jsx(Title,{children:v3.ordersTitle}),subbed?/* @__PURE__ */jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[section,
382
+ /* @__PURE__ */jsxRuntime.jsx(K,{children:v3.ordersTitle})]}):null,
383
+ /* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:s.orders,children:orders.map(o=>/* @__PURE__ */jsxRuntime.jsx(OrderCard,{order:o,items:named(o),onPress:()=>go({name:"order",orderId:o.orderId})},o.orderId))}),
384
+ /* @__PURE__ */jsxRuntime.jsx(ErrorLine,{line:moreError}),cursor?/* @__PURE__ */jsxRuntime.jsx(Btn,{ghost:true,label:v3.moreOrders,busy:moreBusy,busyLabel:copy.saving,onPress:loadMore}):null]})}function OrderCard({order:order,items:items,onPress:onPress}){let{copy:copy,v3:v3}=useShop(),s=useShopStyles(),pill=statusPill(order.status,copy,v3),what=items&&items.length>0?itemNames(items):null,meta=orderMeta(order,copy,formatCents(order.total));/* @__PURE__ */
385
+ return jsxRuntime.jsxs(reactNative.Pressable,{style:s.order,onPress:onPress,accessibilityRole:"button",accessibilityLabel:[pill.label,order.referenceNumber,what,meta].filter(Boolean).join(", "),testID:"shop-order-card",children:[
386
+ /* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:s.grow,children:[
387
+ /* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:s.orderTop,children:[
388
+ /* @__PURE__ */jsxRuntime.jsx(StatusPill,{label:pill.label,tone:pill.tone}),order.referenceNumber?/* @__PURE__ */jsxRuntime.jsx(Text4,{style:s.orderNo,children:order.referenceNumber}):null]}),what?/* @__PURE__ */jsxRuntime.jsx(Text4,{style:s.orderWhat,children:what}):null,
389
+ /* @__PURE__ */jsxRuntime.jsx(Text4,{style:what?s.orderMeta:[s.orderMeta,{marginTop:8}],children:meta}),items&&items.length>0?/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:s.pics,children:items.slice(0,6).map((i,n)=>/* @__PURE__ */jsxRuntime.jsx(Thumb2,{rx:i.rx,size:40},`${i.title}-${n}`))}):null]}),
390
+ /* @__PURE__ */jsxRuntime.jsx(ShopV3Icon,{name:"chev",size:18,color:s.palette.ink3})]})}function PlacedScreen({orderIds:orderIds,go:go}){let{client:client,copy:copy,v3:v3}=useShop(),s=useShopStyles(),orders=(useShopRead(`placed:${orderIds.join(",")}`,async()=>omsOk(await Promise.all(orderIds.map(id=>client.order(id))))).value??[]).flatMap(r=>r.ok?[r.value]:[]),arrives=orders.map(o=>o.arrivesBy??o.tracking?.deliveryBy??null).filter(d=>!!d).sort().pop(),day=formatDay(arrives??null,{weekday:true}),lines=orders.flatMap(o=>o.lines),one=orderIds.length===1;/* @__PURE__ */
391
+ return jsxRuntime.jsx(Page,{testID:"shop-placed",foot:/* @__PURE__ */jsxRuntime.jsx(Btn,{label:one?v3.viewOrder:copy.allOrders,onPress:()=>go(one?{name:"order",orderId:orderIds[0]}:{name:"orders"}),testID:"shop-placed-view"}),children:/* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:s.done,children:[
392
+ /* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:s.doneCheck,accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants",children:/* @__PURE__ */jsxRuntime.jsx(ShopV3Icon,{name:"check",size:34,color:s.palette.onAccent})}),
393
+ /* @__PURE__ */jsxRuntime.jsx(Text4,{tier:"heading",style:s.doneTitle,accessibilityRole:"header",children:v3.placedTitle}),day?/* @__PURE__ */jsxRuntime.jsx(Text4,{style:s.doneWhen,children:v3.arrivesBy(day)}):null,orders.map(o=>o.summary.referenceNumber?/* @__PURE__ */jsxRuntime.jsx(Text4,{style:s.doneWho,children:v3.orderTitle(o.summary.referenceNumber)},o.summary.orderId):null),lines.length>0?/* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:s.next,accessibilityLabel:v3.placedSteps,children:[lines.map(l=>/* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:s.nextLi,accessible:true,accessibilityLabel:`${l.title}, ${v3.itemQuantity(l.quantity)}`,children:[
394
+ /* @__PURE__ */jsxRuntime.jsx(Thumb2,{rx:l.requiresRx,size:36}),
395
+ /* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:s.grow,children:[
396
+ /* @__PURE__ */jsxRuntime.jsx(Text4,{tier:"compact",style:s.nextK,children:v3.itemQuantity(l.quantity)}),
397
+ /* @__PURE__ */jsxRuntime.jsx(Text4,{style:s.nextV,children:l.title})]})]},l.lineId)),day?/* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:s.nextLi,accessible:true,accessibilityLabel:`${day}, ${v3.placedArrives}`,children:[
398
+ /* @__PURE__ */jsxRuntime.jsx(IconTile,{name:"calendar"}),
399
+ /* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:s.grow,children:[
400
+ /* @__PURE__ */jsxRuntime.jsx(Text4,{tier:"compact",style:s.nextK,children:day}),
401
+ /* @__PURE__ */jsxRuntime.jsx(Text4,{style:s.nextV,children:v3.placedArrives})]})]}):null]}):null]})})}function LivePackage(){let{copy:copy}=useShop(),nav=useShopNativeNav(),{tabs:tabs,view:view}=usePackageScreen(nav.go);/* @__PURE__ */
242
402
  return jsxRuntime.jsx(PackageScreen,{copy:copy,tabs:tabs,view:view})}function LiveShop({initialQuery:initialQuery}){let{copy:copy}=useShop(),{tabs:tabs,view:view}=useShopScreen(initialQuery);/* @__PURE__ */
243
- return jsxRuntime.jsx(ShopScreen,{copy:copy,tabs:tabs,view:view})}function LiveProduct({offerId:offerId,petId:petId,avatar:avatar}){let{copy:copy}=useShop(),nav=useShopNativeNav(),state=useProductScreen(offerId,petId,nav.go);return state.kind==="rx"?/* @__PURE__ */jsxRuntime.jsx(RxProductScreen,{copy:copy,view:state.view,...avatar?{avatar:avatar}:{}}):/* @__PURE__ */jsxRuntime.jsx(ProductScreen,{copy:copy,view:state.view})}function LivePlan({reminders:reminders}){let{copy:copy}=useShop(),{tabs:tabs,view:view}=usePlanScreen();/* @__PURE__ */
244
- return jsxRuntime.jsx(PlanScreen,{copy:copy,tabs:tabs,view:view,reminders:reminders})}function LiveOrders(){let{copy:copy}=useShop(),{tabs:tabs,view:view}=useOrdersScreen();/* @__PURE__ */
245
- return jsxRuntime.jsx(OrdersScreen,{copy:copy,tabs:tabs,view:view})}function LiveTracking({orderId:orderId}){let{copy:copy}=useShop(),{view:view}=useTrackingScreen(orderId);/* @__PURE__ */
246
- return jsxRuntime.jsx(TrackingScreen,{copy:copy,view:view})}function LiveAddress({then:then}){let{copy:copy}=useShop(),nav=useShopNativeNav();/* @__PURE__ */
403
+ return jsxRuntime.jsxs(reactNative.View,{style:{flex:1},children:[
404
+ /* @__PURE__ */jsxRuntime.jsx(ShopScreen,{copy:copy,tabs:tabs,view:view}),
405
+ /* @__PURE__ */jsxRuntime.jsx(CartBar,{})]})}function CartBar(){let{client:client,v3:v3}=useShop(),host=useShopV3Host(),nav=useShopNativeNav(),s=useShopStyles(),items=useCart(client);return items.length===0?null:/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:[s.foot,{paddingBottom:Math.max(12,host.bottomInset)}],accessibilityLabel:v3.cartLabel(cartCount(items)),children:/* @__PURE__ */jsxRuntime.jsx(Btn,{label:v3.viewCart,onPress:()=>nav.go({name:"cart"}),testID:"shop-view-cart"})})}function LiveProduct({offerId:offerId,petId:petId,avatar:avatar}){let{copy:copy,v3:v3,client:client}=useShop(),nav=useShopNativeNav(),loaded=useOffer(offerId).value,go=react.useCallback(route=>{if(route.name!=="buy")return nav.go(route);let put=o=>{addToCart(client,{offerId:o.offerId,title:o.title,unitPrice:o.price,requiresRx:o.requiresRx,quantity:route.quantity,...route.petId?{petId:route.petId}:{},...route.rxId?{rxId:route.rxId}:{}}),flashCart(client,v3.addedToCart(o.title)),nav.go({name:"cart"})};if(loaded&&loaded.offerId===route.offerId)return put(loaded);client.offer(route.offerId).then(res=>res.ok?put(res.value):nav.go(route))},[client,loaded,nav,v3]),state=useProductScreen(offerId,petId,go);return state.kind==="rx"?/* @__PURE__ */jsxRuntime.jsx(RxProductScreen,{copy:copy,view:state.view,...avatar?{avatar:avatar}:{}}):/* @__PURE__ */jsxRuntime.jsx(ProductScreen,{copy:copy,view:state.view})}function LivePlan({reminders:reminders}){let{copy:copy}=useShop(),{tabs:tabs,view:view}=usePlanScreen();/* @__PURE__ */
406
+ return jsxRuntime.jsx(PlanScreen,{copy:copy,tabs:tabs,view:view,reminders:reminders})}function LiveOrders({tabs:tabs}){let nav=useShopNativeNav();/* @__PURE__ */
407
+ return jsxRuntime.jsx(OrdersScreen,{tabs:tabs,go:nav.go})}function LiveTracking({orderId:orderId}){let nav=useShopNativeNav();/* @__PURE__ */
408
+ return jsxRuntime.jsx(OrderScreen,{orderId:orderId,go:nav.go})}function LiveCart(){let nav=useShopNativeNav();/* @__PURE__ */
409
+ return jsxRuntime.jsx(CartScreen,{go:nav.go})}function LivePlaced({orderIds:orderIds}){let nav=useShopNativeNav();/* @__PURE__ */
410
+ return jsxRuntime.jsx(PlacedScreen,{orderIds:orderIds,go:nav.go})}function LiveAddress({then:then}){let{copy:copy}=useShop(),nav=useShopNativeNav();/* @__PURE__ */
247
411
  return jsxRuntime.jsx(AddressFormScreen,{copy:copy,...useAddressStep(then,nav.go)})}function LiveCard({then:then,handoff:handoff}){let{copy:copy}=useShop(),nav=useShopNativeNav();/* @__PURE__ */
248
412
  return jsxRuntime.jsx(CardSetupScreen,{copy:copy,...useCardStep(then,nav.go,handoff)})}function LiveBuy({route:route}){let{copy:copy}=useShop(),nav=useShopNativeNav();/* @__PURE__ */
249
413
  return jsxRuntime.jsx(BuyConfirmScreen,{copy:copy,...useBuyStep(route,nav.go)})}function LiveConsent({route:route}){let{copy:copy}=useShop(),nav=useShopNativeNav();/* @__PURE__ */
250
- return jsxRuntime.jsx(PlanConsentScreen,{copy:copy,...useConsentStep(route,nav.go)})}function shopBackRoute(route){switch(route.name){case"package":case"shop":case"plan":case"orders":return null;case"product":return{name:"shop"};case"order":return{name:"orders"};case"address":case"card":return route.then??{name:"plan"};case"buy":case"consent":return{name:"product",offerId:route.offerId,...route.petId?{petId:route.petId}:{}}}}function EverfurShop(props){let{client:client,pets:pets,packageSource:packageSource,copy:copy,fonts:fonts,renderIcon:renderIcon,payments:payments,...rest}=props;/* @__PURE__ */
251
- return jsxRuntime.jsx(ShopProvider,{client:client,payments:payments??null,...pets?{pets:pets}:{},...packageSource?{packageSource:packageSource}:{},...copy?{copy:copy}:{},children:/* @__PURE__ */jsxRuntime.jsx(ShopKitProvider,{...fonts?{fonts:fonts}:{},...renderIcon?{renderIcon:renderIcon}:{},children:/* @__PURE__ */jsxRuntime.jsx(ShopGate,{...rest})})})}function ShopGate({route:route,onRouteChange:onRouteChange,openExternal:openExternal,bookVisitHref:bookVisitHref,cardHandoff:cardHandoff,avatar:avatar,reminders:reminders,onUnavailable:onUnavailable}){let{copy:copy}=useShop(),config=useShopConfig(),nav=react.useMemo(()=>({go:onRouteChange,openExternal:openExternal}),[onRouteChange,openExternal]),unavailable=config.phase==="unavailable"||config.error?.kind==="signedOut";return react.useEffect(()=>{unavailable&&onUnavailable?.()},[unavailable,onUnavailable]),config.phase==="loading"||unavailable?null:config.phase==="failed"||!config.value?/* @__PURE__ */jsxRuntime.jsx(ShopNativeNavProvider,{value:nav,children:/* @__PURE__ */jsxRuntime.jsx(Frame,{children:/* @__PURE__ */jsxRuntime.jsx(Stack,{children:/* @__PURE__ */jsxRuntime.jsx(LoadFailed,{copy:copy,thing:copy.thingShop,retry:config.refresh})})})}):/* @__PURE__ */jsxRuntime.jsx(ShopNativeNavProvider,{value:nav,children:/* @__PURE__ */jsxRuntime.jsx(ShopPages,{route:route,config:config.value,bookVisitHref:bookVisitHref??null,cardHandoff:cardHandoff??null,avatar:avatar,reminders:reminders})})}function ShopPages({route:route,config:config,bookVisitHref:bookVisitHref,cardHandoff:cardHandoff,avatar:avatar,reminders:reminders}){let pkg=usePackage(),packageShown=pkg.phase==="loading"||pkg.phase==="failed"||pkg.phase==="ready"&&pkg.value!==null,tabs=react.useMemo(()=>packageShown?["package","shop","orders","plan"]:["shop","orders","plan"],[packageShown]),shown=route.name==="package"&&!packageShown?{name:"shop"}:route,shared=react.useMemo(()=>({config:config,tabs:tabs,pkg:pkg,bookVisitHref:bookVisitHref}),[config,tabs,pkg,bookVisitHref]);/* @__PURE__ */
252
- return jsxRuntime.jsx(ShopSharedProvider,{value:shared,children:screen(shown,cardHandoff,avatar,reminders)})}function screen(route,cardHandoff,avatar,reminders){switch(route.name){case"package":/* @__PURE__ */
414
+ return jsxRuntime.jsx(PlanConsentScreen,{copy:copy,...useConsentStep(route,nav.go)})}function shopBackRoute(route){switch(route.name){case"package":case"shop":case"plan":case"orders":return null;case"product":return{name:"shop"};case"order":return{name:"orders"};case"cart":case"placed":return{name:"shop"};case"address":case"card":return route.then??{name:"plan"};case"buy":case"consent":return{name:"product",offerId:route.offerId,...route.petId?{petId:route.petId}:{}}}}function EverfurShop(props){let{client:client,pets:pets,packageSource:packageSource,copy:copy,v3Copy:v3Copy,fonts:fonts,renderIcon:renderIcon,payments:payments,bottomInset:bottomInset,screenBottomInset:screenBottomInset,onOrderHelp:onOrderHelp,saveProfileName:saveProfileName,onProfileNameRequired:onProfileNameRequired,...rest}=props,addToCart2=v3Copy?.addToCart??SHOP_V3_COPY.addToCart,shopWords=react.useMemo(()=>({buyNow:addToCart2,...copy??{}}),[addToCart2,copy]),host=react.useMemo(()=>({bottomInset:bottomInset??0,screenBottomInset:screenBottomInset??bottomInset??0,cardHandoff:rest.cardHandoff??null,onOrderHelp:onOrderHelp??null}),[bottomInset,screenBottomInset,rest.cardHandoff,onOrderHelp]);/* @__PURE__ */
415
+ return jsxRuntime.jsx(ShopProvider,{client:client,payments:payments??null,copy:shopWords,...v3Copy?{v3Copy:v3Copy}:{},...pets?{pets:pets}:{},...packageSource?{packageSource:packageSource}:{},...saveProfileName?{saveProfileName:saveProfileName}:{},...onProfileNameRequired?{onProfileNameRequired:onProfileNameRequired}:{},children:/* @__PURE__ */jsxRuntime.jsx(ShopKitProvider,{...fonts?{fonts:fonts}:{},...renderIcon?{renderIcon:renderIcon}:{},children:/* @__PURE__ */jsxRuntime.jsx(ShopV3HostProvider,{value:host,children:/* @__PURE__ */jsxRuntime.jsx(ShopGate,{...rest})})})})}function ShopGate({route:route,onRouteChange:onRouteChange,openExternal:openExternal,bookVisitHref:bookVisitHref,cardHandoff:cardHandoff,avatar:avatar,reminders:reminders,onUnavailable:onUnavailable}){let{copy:copy}=useShop(),config=useShopConfig(),nav=react.useMemo(()=>({go:onRouteChange,openExternal:openExternal}),[onRouteChange,openExternal]),unavailable=config.phase==="unavailable"||config.error?.kind==="signedOut";return react.useEffect(()=>{unavailable&&onUnavailable?.()},[unavailable,onUnavailable]),config.phase==="loading"||unavailable?null:config.phase==="failed"||!config.value?/* @__PURE__ */jsxRuntime.jsx(ShopNativeNavProvider,{value:nav,children:/* @__PURE__ */jsxRuntime.jsx(Frame,{children:/* @__PURE__ */jsxRuntime.jsx(Stack,{children:/* @__PURE__ */jsxRuntime.jsx(LoadFailed,{copy:copy,thing:copy.thingShop,retry:config.refresh})})})}):/* @__PURE__ */jsxRuntime.jsx(ShopNativeNavProvider,{value:nav,children:/* @__PURE__ */jsxRuntime.jsx(ShopPages,{route:route,config:config.value,bookVisitHref:bookVisitHref??null,cardHandoff:cardHandoff??null,avatar:avatar,reminders:reminders})})}function ShopPages({route:route,config:config,bookVisitHref:bookVisitHref,cardHandoff:cardHandoff,avatar:avatar,reminders:reminders}){let pkg=usePackage(),packageShown=pkg.phase==="loading"||pkg.phase==="failed"||pkg.phase==="ready"&&pkg.value!==null,tabs=react.useMemo(()=>packageShown?["package","shop","orders","plan"]:["shop","orders","plan"],[packageShown]),shown=route.name==="package"&&!packageShown?{name:"shop"}:route,shared=react.useMemo(()=>({config:config,tabs:tabs,pkg:pkg,bookVisitHref:bookVisitHref}),[config,tabs,pkg,bookVisitHref]);/* @__PURE__ */
416
+ return jsxRuntime.jsx(ShopSharedProvider,{value:shared,children:screen(shown,tabs,cardHandoff,avatar,reminders)})}function screen(route,tabs,cardHandoff,avatar,reminders){switch(route.name){case"package":/* @__PURE__ */
253
417
  return jsxRuntime.jsx(LivePackage,{});case"shop":/* @__PURE__ */
254
418
  return jsxRuntime.jsx(LiveShop,{...route.query?{initialQuery:route.query}:{}});case"product":/* @__PURE__ */
255
419
  return jsxRuntime.jsx(LiveProduct,{offerId:route.offerId,...route.petId?{petId:route.petId}:{},...avatar?{avatar:avatar}:{}},route.offerId);case"plan":/* @__PURE__ */
256
420
  return jsxRuntime.jsx(LivePlan,{reminders:reminders});case"orders":/* @__PURE__ */
257
- return jsxRuntime.jsx(LiveOrders,{});case"order":/* @__PURE__ */
421
+ return jsxRuntime.jsx(LiveOrders,{tabs:tabs});case"order":/* @__PURE__ */
258
422
  return jsxRuntime.jsx(LiveTracking,{orderId:route.orderId},route.orderId);case"address":/* @__PURE__ */
259
423
  return jsxRuntime.jsx(LiveAddress,{...route.then?{then:route.then}:{}});case"card":/* @__PURE__ */
260
424
  return jsxRuntime.jsx(LiveCard,{handoff:cardHandoff,...route.then?{then:route.then}:{}});case"buy":/* @__PURE__ */
261
425
  return jsxRuntime.jsx(LiveBuy,{route:route});case"consent":/* @__PURE__ */
262
- return jsxRuntime.jsx(LiveConsent,{route:route})}}var SECRET_IN_URL=/(client_secret|_secret_|[?&#](sk|rk)_(live|test)_)/i,FAILED={ok:false,message:null},CLOSED={ok:false,message:null,closed:true};function safePageUrl(raw){if(!raw)return null;let u;try{u=new URL(raw)}catch{return null}return u.protocol!=="https:"||u.username||u.password||SECRET_IN_URL.test(raw)?null:u.toString()}function returnedParam(result,returnUrl,key){if(result.type!=="success"||typeof result.url!="string"||!result.url.startsWith(returnUrl))return;let queryAt=result.url.indexOf("?");if(queryAt===-1)return null;let query=result.url.slice(queryAt+1).split("#")[0]??"";for(let pair of query.split("&")){let[k,v=""]=pair.split("=");if(k===key)try{return decodeURIComponent(v)}catch{return null}}return null}async function runInBrowser(openAuthSession,url,returnUrl,read){let result;try{result=await openAuthSession(url,returnUrl)}catch{return FAILED}return result.type!=="success"?CLOSED:read(result)}function createInAppBrowserCardSetup(options){let{openAuthSession:openAuthSession,pageUrl:pageUrl,client:client,returnUrl:returnUrl}=options,makePage=async()=>{if(pageUrl)return pageUrl();if(!client)return null;let res=await client.startCardSetupSession({idempotencyKey:newIdempotencyKey(),returnUrl:returnUrl});return res.ok?res.value.url:null};return async()=>{let url;try{url=safePageUrl(await makePage())}catch{url=null}return url?runInBrowser(openAuthSession,url,returnUrl,result=>{let outcome=returnedParam(result,returnUrl,"oms_card");return outcome===void 0?FAILED:outcome==="canceled"?CLOSED:outcome===null||outcome==="done"?{ok:true}:FAILED}):FAILED}}function createInAppBrowserPayments(options){let{openAuthSession:openAuthSession,client:client,returnUrl:returnUrl}=options;return{confirmCardSetup:()=>Promise.resolve(FAILED),async handleNextAction(_clientSecret,context){if(!context?.orderId)return FAILED;let url;try{let res=await client.cardActionLink(context.orderId,{returnUrl:returnUrl});url=res.ok?safePageUrl(res.value.url):null}catch{url=null}return url?runInBrowser(openAuthSession,url,returnUrl,result=>{let outcome=returnedParam(result,returnUrl,"oms_card_action");return outcome==="succeeded"?{ok:true}:outcome==="canceled"?CLOSED:FAILED}):FAILED}}}function createInAppBrowserCard(options){return{cardHandoff:createInAppBrowserCardSetup({openAuthSession:options.openAuthSession,client:options.client,returnUrl:options.returnUrl}),payments:createInAppBrowserPayments(options)}}var OmsWireError=class _OmsWireError extends Error{constructor(field){super(`OMS answer could not be read: ${field}`);this.field=field;this.name="OmsWireError",Object.setPrototypeOf(this,_OmsWireError.prototype)}};function obj(value,field){if(value===null||typeof value!="object"||Array.isArray(value))throw new OmsWireError(field);return value}function arr(value,field){if(value==null)return[];if(!Array.isArray(value))throw new OmsWireError(field);return value}function str(o,key,field=key){let v=o[key];if(typeof v!="string"||v.length===0)throw new OmsWireError(field);return v}function optStr(o,key){let v=o[key];return typeof v=="string"&&v.length>0?v:null}function int(o,key,field=key){let v=o[key];if(typeof v!="number"||!Number.isFinite(v))throw new OmsWireError(field);return Math.trunc(v)}function optInt(o,key){let v=o[key];return typeof v=="number"&&Number.isFinite(v)?Math.trunc(v):null}function bool(o,key){return o[key]===true}function petIdOf(value){if(!value||typeof value!="object")return null;let id=value.pet_id;return typeof id=="string"&&id.length>0?id:null}var PACK_UNITS=["each","gram","milliliter"],SPEEDS=["ground","two_day","next_day"];function packUnit(o){let v=o.pack_unit;return typeof v=="string"&&PACK_UNITS.includes(v)?v:null}function speed(v){return typeof v=="string"&&SPEEDS.includes(v)?v:null}function httpsUrl(o,key){let v=optStr(o,key);if(!v)return null;try{return new URL(v).protocol==="https:"?v:null}catch{return null}}function shopConfigFromWire(raw){let o=obj(raw,"shop-config"),delivery=o.delivery&&typeof o.delivery=="object"?o.delivery:null,key=optStr(o,"stripe_publishable_key");return{recurringTermsVersion:optStr(o,"recurring_terms_version"),recurringTermsUrl:httpsUrl(o,"recurring_terms_url"),stripePublishableKey:key&&/^pk_(test|live)_[A-Za-z0-9]+$/.test(key)?key:null,delivery:delivery?{firstFill:speed(delivery.first_fill),refill:speed(delivery.refill)}:null}}function offerFromWire(raw){let o=obj(raw,"offer"),qty=o.pack_quantity;return{offerId:str(o,"offer_id"),sku:optStr(o,"sku")??"",title:str(o,"title"),fulfillmentType:optStr(o,"fulfillment_type")??"physical",requiresRx:bool(o,"requires_rx"),compounded:bool(o,"compounded"),packQuantity:typeof qty=="string"&&/^\d+(\.\d+)?$/.test(qty)?qty:null,packUnit:packUnit(o),price:optInt(o,"price")}}function offerPageFromWire(raw){let o=obj(raw,"offers");return{offers:arr(o.offers,"offers").map(offerFromWire),nextCursor:optStr(o,"next_cursor")}}function quoteFromWire(raw){let o=obj(raw,"quote");return{lines:arr(o.lines,"lines").map(l=>{let line=obj(l,"line");return{offerId:str(line,"offer_id"),quantity:int(line,"quantity"),petId:petIdOf(line.pet),unitPrice:int(line,"unit_price"),discount:optInt(line,"discount")??0,tax:optInt(line,"tax")??0}}),shipping:int(o,"shipping"),tax:optInt(o,"tax")??0,total:int(o,"total"),expiresAt:str(o,"expires_at")}}function checkoutFromWire(raw){let o=obj(raw,"checkout");return{checkoutId:str(o,"checkout_id"),state:optStr(o,"state")??"draft",orderIds:arr(o.order_ids,"order_ids").filter(id=>typeof id=="string"),createdAt:optStr(o,"created_at")??"",total:int(o,"total"),shipping:optInt(o,"shipping")??0,tax:optInt(o,"tax")??0}}function confirmationFromWire(raw){let o=obj(raw,"confirmation");return{checkoutId:str(o,"checkout_id"),resale:arr(o.resale,"resale").map(r=>{let entry=obj(r,"resale"),outcome=str(entry,"outcome");if(outcome!=="confirmed"&&outcome!=="action_required")throw new OmsWireError("resale.outcome");let payerAction=optStr(entry,"payer_action");if(outcome==="action_required"&&!payerAction)throw new OmsWireError("resale.payer_action");return{outcome:outcome,orderId:str(entry,"order_id"),payerAction:outcome==="confirmed"?null:payerAction}})}}function orderSummaryFromWire(raw){let o=obj(raw,"order"),ref=o.reference&&typeof o.reference=="object"?o.reference:null;return{orderId:str(o,"order_id"),referenceNumber:ref?optStr(ref,"number"):null,status:str(o,"status"),total:int(o,"total"),placedAt:optStr(o,"placed_at")}}function orderPageFromWire(raw){let o=obj(raw,"orders");return{orders:arr(o.orders,"orders").map(orderSummaryFromWire),nextCursor:optStr(o,"next_cursor")}}function orderLineFromWire(raw){let o=obj(raw,"line"),qty=o.pack_quantity;return{lineId:str(o,"line_id"),offerId:str(o,"offer_id"),sku:optStr(o,"sku")??"",title:str(o,"title"),requiresRx:bool(o,"requires_rx"),compounded:bool(o,"compounded"),packQuantity:typeof qty=="string"&&/^\d+(\.\d+)?$/.test(qty)?qty:null,packUnit:packUnit(o),quantity:int(o,"quantity"),unitPrice:int(o,"unit_price"),discount:optInt(o,"discount")??0,tax:optInt(o,"tax")??0,fulfillmentType:optStr(o,"fulfillment_type")??"physical",petId:petIdOf(o.pet)}}function trackingFromWire(raw){let o=obj(raw,"tracking");return{carrier:optStr(o,"carrier"),trackingNumber:optStr(o,"tracking_number"),status:str(o,"status"),occurredAt:optStr(o,"occurred_at"),trackingUrl:httpsUrl(o,"tracking_url"),deliveryBy:optStr(o,"delivery_by")}}function shipmentFromWire(raw){let o=obj(raw,"shipment");return{shipmentId:str(o,"shipment_id"),state:str(o,"state"),lines:arr(o.lines,"shipment.lines").map(l=>{let line=obj(l,"shipment.line");return{lineId:str(line,"line_id"),quantity:int(line,"quantity")}}),tracking:arr(o.tracking,"tracking").map(trackingFromWire)}}function orderFromWire(raw){let o=obj(raw,"order");return{summary:orderSummaryFromWire(o.summary),lines:arr(o.lines,"lines").map(orderLineFromWire),shipping:optInt(o,"shipping")??0,shippingTax:optInt(o,"shipping_tax")??0,shipments:arr(o.shipments,"shipments").map(shipmentFromWire),canCancel:bool(o,"can_cancel"),canReturn:bool(o,"can_return"),canPay:bool(o,"can_pay"),paymentStatus:optStr(o,"payment_status"),refunds:arr(o.refunds,"refunds").map(r=>{let refund=obj(r,"refund");return{refundId:str(refund,"refund_id"),amount:int(refund,"amount"),state:str(refund,"state")}}),returnIds:arr(o.return_ids,"return_ids").filter(id=>typeof id=="string")}}function cancelOutcomeFromWire(raw){let o=obj(raw,"cancel");return{outcome:str(o,"outcome"),refunded:optInt(o,"refunded"),reasonCode:optStr(o,"reason_code")}}function payOutcomeFromWire(raw){let o=obj(raw,"pay"),outcome=str(o,"outcome");if(outcome!=="authorized"&&outcome!=="action_required")throw new OmsWireError("pay.outcome");let payerAction=optStr(o,"payer_action");if(outcome==="action_required"&&!payerAction)throw new OmsWireError("pay.payer_action");return{outcome:outcome,orderId:str(o,"order_id"),payerAction:outcome==="authorized"?null:payerAction}}function returnFromWire(raw){let o=obj(raw,"return");return{returnId:str(o,"return_id"),orderId:str(o,"order_id"),lines:arr(o.lines,"return.lines").map(l=>{let line=obj(l,"return.line");return{lineId:str(line,"line_id"),quantity:int(line,"quantity"),reasonCode:str(line,"reason_code")}}),state:str(o,"state"),rma:optStr(o,"rma"),labelUrl:httpsUrl(o,"label_url")}}function caseFromWire(raw){let o=obj(raw,"case");return{caseId:str(o,"case_id"),orderId:str(o,"order_id"),reasonCode:str(o,"reason_code"),message:typeof o.message=="string"?o.message:"",openedAt:str(o,"opened_at"),closedAt:optStr(o,"closed_at")}}function casesFromWire(raw){return arr(obj(raw,"cases").cases,"cases").map(caseFromWire)}function prescriptionsFromWire(raw){return arr(obj(raw,"prescriptions").prescriptions,"prescriptions").map(r=>{let o=obj(r,"prescription");return{rxId:str(o,"rx_id"),petId:str(o,"pet_id"),drug:str(o,"drug"),strength:optStr(o,"strength"),form:optStr(o,"form"),status:str(o,"status"),offerId:optStr(o,"offer_id"),packCount:optInt(o,"pack_count"),fillsUsed:optInt(o,"fills_used"),fillsTotal:optInt(o,"fills_total"),expiresOn:optStr(o,"expires_on"),nextFillOn:optStr(o,"next_fill_on")}})}function addressEntryFromWire(raw){let o=obj(raw,"address");return{ref:str(o,"ref"),label:optStr(o,"label")??"",isDefault:bool(o,"is_default"),isComplete:bool(o,"is_complete")}}function addressesFromWire(raw){return arr(obj(raw,"addresses").addresses,"addresses").map(addressEntryFromWire)}function addressDetailFromWire(raw){let o=obj(raw,"address"),a=obj(o.address,"address.address"),address={recipientName:optStr(a,"recipient_name"),line1:str(a,"line1","address.line1"),line2:optStr(a,"line2"),city:str(a,"city","address.city"),region:str(a,"region","address.region"),postalCode:str(a,"postal_code","address.postal_code"),country:str(a,"country","address.country")};return{...addressEntryFromWire(o),address:address}}function paymentMethodsFromWire(raw){return arr(obj(raw,"payment_methods").payment_methods,"payment_methods").map(r=>{let o=obj(r,"payment_method");return{paymentMethodId:str(o,"payment_method_id"),brand:optStr(o,"brand")??"",last4:optStr(o,"last4")??"",wallet:optStr(o,"wallet")}})}function paymentSetupFromWire(raw){let o=obj(raw,"setup");return{setupId:str(o,"setup_id"),payerAction:str(o,"payer_action")}}function cardSetupLinkFromWire(raw){let o=obj(raw,"card_setup");return{url:str(o,"url")}}function cardActionLinkFromWire(raw){let o=obj(raw,"card_action");return{url:str(o,"url"),expiresAt:str(o,"expires_at")}}function planFromWire(raw){let o=obj(raw,"plan");return{planId:str(o,"plan_id"),lines:arr(o.lines,"plan.lines").map(l=>{let line=obj(l,"plan.line");return{offerId:str(line,"offer_id"),quantity:int(line,"quantity"),petId:petIdOf(line.pet)}}),cadenceDays:int(o,"cadence_days"),destination:optStr(o,"destination"),paymentMethodId:optStr(o,"payment_method_id"),discountBps:optInt(o,"discount_bps")??0,nextRun:optStr(o,"next_run"),state:str(o,"state"),stopReason:optStr(o,"stop_reason")}}function planPageFromWire(raw){let o=obj(raw,"plans");return{plans:arr(o.plans,"plans").map(planFromWire),nextCursor:optStr(o,"next_cursor")}}function cartLineToWire(line){let wire={offer_id:line.offerId,quantity:line.quantity};return line.petId&&(wire.pet={namespace:"consumer",pet_id:line.petId}),line.rxId&&(wire.rx_id=line.rxId),wire}function addressInputToWire(input){let a=input.address;return{label:input.label,make_default:input.makeDefault===true,address:{recipient_name:a.recipientName,line1:a.line1,line2:a.line2,city:a.city,region:a.region,postal_code:a.postalCode,country:a.country}}}function cycleReviewFromWire(raw){let o=obj(raw,"cycle");return{planId:str(o,"plan_id"),reviewId:optStr(o,"review_id"),cycle:int(o,"cycle"),state:optStr(o,"state"),lines:arr(o.lines,"cycle.lines").map(l=>{let line=obj(l,"cycle.line");return{offerId:str(line,"offer_id"),quantity:int(line,"quantity"),petId:petIdOf(line.pet)}}),shipsOn:optStr(o,"ships_on"),approveBy:optStr(o,"approve_by"),quoteLines:arr(o.quote&&typeof o.quote=="object"?o.quote.lines:null,"cycle.quote.lines").map(l=>{let line=obj(l,"cycle.quote.line");return{offerId:str(line,"offer_id"),quantity:int(line,"quantity"),petId:petIdOf(line.pet),unitPrice:int(line,"unit_price"),discount:optInt(line,"discount")??0,tax:optInt(line,"tax")??0}})}}function cycleDraftFromWire(raw){let o=obj(raw,"cycle-draft");return{checkoutId:str(o,"checkout_id"),shipping:optInt(o,"shipping")??0,tax:optInt(o,"tax")??0,total:int(o,"total"),expiresAt:optStr(o,"expires_at")}}var DEFAULT_PATH="/api/v1/oms",DEFAULT_TIMEOUT_MS=3e4,PAYMENT_METHOD_ID=/^[A-Za-z0-9_]+$/,REASON_CODE=/^[a-z][a-z0-9_]{0,63}$/;function checkBaseUrl(raw){let url;try{url=new URL(raw)}catch{throw new EverfurConfigError("invalid-argument","createOmsClient: baseUrl is not a URL")}let local=url.hostname==="localhost"||url.hostname==="127.0.0.1"||url.hostname==="[::1]";if(url.protocol!=="https:"&&!(local&&url.protocol==="http:"))throw new EverfurConfigError("invalid-argument","createOmsClient: baseUrl must be https");if(url.username||url.password||url.search||url.hash)throw new EverfurConfigError("invalid-argument","createOmsClient: baseUrl must be a bare origin or path");return url.origin+url.pathname.replace(/\/+$/,"")}function seg(id){return encodeURIComponent(id)}function isValidId(id){return typeof id=="string"&&id.length>0&&id.length<=256}function createOmsClient(config){let base=checkBaseUrl(config.baseUrl)+(config.path??DEFAULT_PATH).replace(/\/+$/,""),fetchImpl=config.fetch??(typeof globalThis.fetch=="function"?globalThis.fetch.bind(globalThis):void 0);if(!fetchImpl)throw new EverfurConfigError("missing-peer-dependency","createOmsClient: no fetch available; pass config.fetch");if(!config.auth||config.auth.kind!=="everfur_consumer"||typeof config.auth.getToken!="function")throw new EverfurConfigError("invalid-argument",'createOmsClient: auth must be { kind: "everfur_consumer", getToken }');let getToken=config.auth.getToken,channel=config.channel??"web",timeoutMs=config.timeoutMs??DEFAULT_TIMEOUT_MS;async function token(){try{let t=await getToken();return typeof t=="string"&&t.length>0?t:null}catch{return null}}async function send(call){let bearer=await token();if(!bearer)return omsErr({kind:"signedOut"});let url=base+call.path;if(call.query){let params=new URLSearchParams;for(let[k,v]of Object.entries(call.query))v!==void 0&&params.set(k,String(v));let qs=params.toString();qs&&(url+=`?${qs}`)}let headers={accept:"application/json",authorization:`Bearer ${bearer}`},init={method:call.method,headers:headers};call.body!==void 0&&(headers["content-type"]="application/json",init.body=JSON.stringify(call.body));let controller=typeof AbortController=="function"?new AbortController:null;controller&&(init.signal=controller.signal);let timedOut=false,timer=setTimeout(()=>{timedOut=true,controller?.abort()},timeoutMs),res;try{res=await fetchImpl(url,init)}catch{return clearTimeout(timer),omsErr({kind:timedOut?"timeout":"network"})}try{let requestId=res.headers.get("x-request-id")??void 0,rid=requestId?{requestId:requestId}:{};if(res.status<200||res.status>=300){let body=res.status===402||res.status===409||res.status===422?await res.json().catch(()=>null):null;return omsErr(omsErrorFromStatus(res.status,body,{...rid,retryAfter:res.headers.get("retry-after")}))}if(call.read===null||res.status===204)return omsOk(void 0);let raw;try{raw=await res.json()}catch{return omsErr({kind:"badResponse",...rid})}try{return omsOk(call.read(raw))}catch{return omsErr({kind:"badResponse",...rid})}}catch{return omsErr({kind:timedOut?"timeout":"network"})}finally{clearTimeout(timer)}}let invalid=()=>Promise.resolve(omsErr({kind:"invalidRequest"}));function withId(id,run){return isValidId(id)?run(seg(id)):invalid()}let lines=ls=>ls.map(cartLineToWire);return{shopConfig:()=>send({method:"GET",path:"/shop-config",read:shopConfigFromWire}),offers:(q={})=>send({method:"GET",path:"/catalog/offers",query:{text:q.text,requires_rx:q.requiresRx,cursor:q.cursor,limit:q.limit},read:offerPageFromWire}),offer:offerId=>withId(offerId,id=>send({method:"GET",path:`/catalog/offers/${id}`,read:offerFromWire})),prescriptions:()=>send({method:"GET",path:"/prescriptions",read:prescriptionsFromWire}),addresses:()=>send({method:"GET",path:"/addresses",read:addressesFromWire}),address:ref=>withId(ref,id=>send({method:"GET",path:`/addresses/${id}`,read:addressDetailFromWire})),addAddress:input=>send({method:"POST",path:"/addresses",body:addressInputToWire(input),read:addressEntryFromWire}),updateAddress:(ref,input)=>withId(ref,id=>send({method:"PUT",path:`/addresses/${id}`,body:addressInputToWire(input),read:addressEntryFromWire})),removeAddress:ref=>withId(ref,id=>send({method:"DELETE",path:`/addresses/${id}`,read:null})),makeDefaultAddress:ref=>withId(ref,id=>send({method:"POST",path:`/addresses/${id}/default`,read:addressEntryFromWire})),paymentMethods:()=>send({method:"GET",path:"/payment-methods",read:paymentMethodsFromWire}),setupPaymentMethod:()=>send({method:"POST",path:"/payment-methods/setup",read:paymentSetupFromWire}),startCardSetupSession:r=>send({method:"POST",path:"/payment-methods/setup-session",body:{idempotency_key:r.idempotencyKey,return_url:r.returnUrl},read:cardSetupLinkFromWire}),removePaymentMethod:pm=>PAYMENT_METHOD_ID.test(pm)?send({method:"DELETE",path:`/payment-methods/${pm}`,read:null}):invalid(),quote:r=>send({method:"POST",path:"/cart/quote",body:{lines:lines(r.lines),ship_to:r.shipTo,promo_code:r.promoCode??null},read:quoteFromWire}),createCheckout:r=>send({method:"POST",path:"/checkouts",body:{idempotency_key:r.idempotencyKey,channel:channel,lines:lines(r.lines),ship_to:r.shipTo,receipt_email:r.receiptEmail??null,promo_code:r.promoCode??null},read:checkoutFromWire}),confirmCheckout:(checkoutId,r)=>PAYMENT_METHOD_ID.test(r.paymentMethodId)&&Number.isInteger(r.expectedTotal)?withId(checkoutId,id=>send({method:"POST",path:`/checkouts/${id}/confirm`,body:{idempotency_key:r.idempotencyKey,expected_total:r.expectedTotal,payment_method_id:r.paymentMethodId},read:confirmationFromWire})):invalid(),orders:(q={})=>send({method:"GET",path:"/orders",query:{cursor:q.cursor,limit:q.limit,reference:q.reference},read:orderPageFromWire}),order:orderId=>withId(orderId,id=>send({method:"GET",path:`/orders/${id}`,read:orderFromWire})),cancelOrder:(orderId,r)=>REASON_CODE.test(r.reasonCode)?withId(orderId,id=>send({method:"POST",path:`/orders/${id}/cancel`,body:{idempotency_key:r.idempotencyKey,reason_code:r.reasonCode},read:cancelOutcomeFromWire})):invalid(),payOrder:(orderId,r)=>{if(r.paymentMethodId!==void 0&&!PAYMENT_METHOD_ID.test(r.paymentMethodId))return invalid();let body={idempotency_key:r.idempotencyKey};return r.paymentMethodId&&(body.payment_method_id=r.paymentMethodId),withId(orderId,id=>send({method:"POST",path:`/orders/${id}/pay`,body:body,read:payOutcomeFromWire}))},cardActionLink:(orderId,r)=>withId(orderId,id=>send({method:"POST",path:`/orders/${id}/card-action-link`,body:{return_url:r.returnUrl},read:cardActionLinkFromWire})),requestReturn:(orderId,r)=>r.lines.every(l=>REASON_CODE.test(l.reasonCode))?withId(orderId,id=>send({method:"POST",path:`/orders/${id}/returns`,body:{idempotency_key:r.idempotencyKey,lines:r.lines.map(l=>({line_id:l.lineId,quantity:l.quantity,reason_code:l.reasonCode}))},read:returnFromWire})):invalid(),getReturn:returnId=>withId(returnId,id=>send({method:"GET",path:`/returns/${id}`,read:returnFromWire})),cancelReturn:returnId=>withId(returnId,id=>send({method:"POST",path:`/returns/${id}/cancel`,read:returnFromWire})),openCase:(orderId,r)=>REASON_CODE.test(r.reasonCode)&&r.message.length<=4e3?withId(orderId,id=>send({method:"POST",path:`/orders/${id}/cases`,body:{idempotency_key:r.idempotencyKey,reason_code:r.reasonCode,message:r.message},read:caseFromWire})):invalid(),orderCases:orderId=>withId(orderId,id=>send({method:"GET",path:`/orders/${id}/cases`,read:casesFromWire})),plans:(q={})=>send({method:"GET",path:"/subscriptions",query:{cursor:q.cursor,limit:q.limit},read:planPageFromWire}),createPlan:input=>PAYMENT_METHOD_ID.test(input.paymentMethodId)?send({method:"POST",path:"/subscriptions",body:{idempotency_key:input.idempotencyKey,cadence_days:input.cadenceDays,destination:input.destination,payment_method_id:input.paymentMethodId,consent_terms_version:input.consentTermsVersion,lines:lines(input.lines)},read:planFromWire}):invalid(),updatePlan:(planId,patch)=>{if(patch.paymentMethodId!==void 0&&!PAYMENT_METHOD_ID.test(patch.paymentMethodId))return invalid();let body={idempotency_key:patch.idempotencyKey};return patch.lines&&(body.lines=lines(patch.lines)),patch.cadenceDays!==void 0&&(body.cadence_days=patch.cadenceDays),patch.destination!==void 0&&(body.destination=patch.destination),patch.paymentMethodId!==void 0&&(body.payment_method_id=patch.paymentMethodId),withId(planId,id=>send({method:"PATCH",path:`/subscriptions/${id}`,body:body,read:planFromWire}))},planAction:(planId,r)=>withId(planId,id=>send({method:"POST",path:`/subscriptions/${id}/actions`,body:{idempotency_key:r.idempotencyKey,operation:r.operation},read:planFromWire})),cancelPlan:planId=>withId(planId,id=>send({method:"POST",path:`/subscriptions/${id}/cancel`,read:planFromWire})),cycleReview:planId=>withId(planId,id=>send({method:"GET",path:`/subscriptions/${id}/cycle`,read:cycleReviewFromWire})),editCycle:(planId,cycle,r)=>Number.isInteger(cycle)&&cycle>0?withId(planId,id=>send({method:"PUT",path:`/subscriptions/${id}/cycles/${cycle}/lines`,body:{idempotency_key:r.idempotencyKey,lines:lines(r.lines)},read:cycleReviewFromWire})):invalid(),draftCycle:(planId,cycle)=>Number.isInteger(cycle)&&cycle>0?withId(planId,id=>send({method:"POST",path:`/subscriptions/${id}/cycles/${cycle}/draft`,read:cycleDraftFromWire})):invalid(),approveCycle:(planId,cycle,r)=>Number.isInteger(cycle)&&cycle>0&&Number.isInteger(r.expectedTotal)?withId(planId,id=>send({method:"POST",path:`/subscriptions/${id}/cycles/${cycle}/approve`,body:{idempotency_key:r.idempotencyKey,checkout_id:r.checkoutId,expected_total:r.expectedTotal},read:confirmationFromWire})):invalid(),skipCycle:(planId,cycle,r)=>Number.isInteger(cycle)&&cycle>0?withId(planId,id=>send({method:"POST",path:`/subscriptions/${id}/cycles/${cycle}/skip`,body:{idempotency_key:r.idempotencyKey},read:planFromWire})):invalid()}}exports.EverfurShop=EverfurShop;exports.SHOP_COPY=SHOP_COPY;exports.SHOP_COPY_PLACEHOLDERS=SHOP_COPY_PLACEHOLDERS;exports.ShopSwitchCard=ShopSwitchCard;exports.UNAVAILABLE_PACKAGE_SOURCE=UNAVAILABLE_PACKAGE_SOURCE;exports.createInAppBrowserCard=createInAppBrowserCard;exports.createInAppBrowserCardSetup=createInAppBrowserCardSetup;exports.createInAppBrowserPayments=createInAppBrowserPayments;exports.createOmsClient=createOmsClient;exports.createOmsPackageSource=createOmsPackageSource;exports.isOmsRefusal=isOmsRefusal;exports.isOmsRetryable=isOmsRetryable;exports.isOmsUnavailable=isOmsUnavailable;exports.newIdempotencyKey=newIdempotencyKey;exports.shopBackRoute=shopBackRoute;exports.shopCopy=shopCopy;
426
+ return jsxRuntime.jsx(LiveConsent,{route:route});case"cart":/* @__PURE__ */
427
+ return jsxRuntime.jsx(LiveCart,{});case"placed":/* @__PURE__ */
428
+ return jsxRuntime.jsx(LivePlaced,{orderIds:route.orderIds},route.orderIds.join(","))}}var SECRET_IN_URL=/(client_secret|_secret_|[?&#](sk|rk)_(live|test)_)/i,FAILED={ok:false,message:null},CLOSED={ok:false,message:null,closed:true};function safePageUrl(raw){if(!raw)return null;let u;try{u=new URL(raw)}catch{return null}return u.protocol!=="https:"||u.username||u.password||SECRET_IN_URL.test(raw)?null:u.toString()}function returnedParam(result,returnUrl,key){if(result.type!=="success"||typeof result.url!="string"||!result.url.startsWith(returnUrl))return;let queryAt=result.url.indexOf("?");if(queryAt===-1)return null;let query=result.url.slice(queryAt+1).split("#")[0]??"";for(let pair of query.split("&")){let[k,v=""]=pair.split("=");if(k===key)try{return decodeURIComponent(v)}catch{return null}}return null}async function runInBrowser(openAuthSession,url,returnUrl,read){let result;try{result=await openAuthSession(url,returnUrl)}catch{return FAILED}return result.type!=="success"?CLOSED:read(result)}function createInAppBrowserCardSetup(options){let{openAuthSession:openAuthSession,pageUrl:pageUrl,client:client,returnUrl:returnUrl}=options,makePage=async()=>{if(pageUrl)return pageUrl();if(!client)return null;let res=await client.startCardSetupSession({idempotencyKey:newIdempotencyKey(),returnUrl:returnUrl});return res.ok?res.value.url:null};return async()=>{let url;try{url=safePageUrl(await makePage())}catch{url=null}return url?runInBrowser(openAuthSession,url,returnUrl,result=>{let outcome=returnedParam(result,returnUrl,"oms_card");return outcome===void 0?FAILED:outcome==="canceled"?CLOSED:outcome===null||outcome==="done"?{ok:true}:FAILED}):FAILED}}function createInAppBrowserPayments(options){let{openAuthSession:openAuthSession,client:client,returnUrl:returnUrl}=options;return{confirmCardSetup:()=>Promise.resolve(FAILED),async handleNextAction(_clientSecret,context){if(!context?.orderId)return FAILED;let url;try{let res=await client.cardActionLink(context.orderId,{returnUrl:returnUrl});url=res.ok?safePageUrl(res.value.url):null}catch{url=null}return url?runInBrowser(openAuthSession,url,returnUrl,result=>{let outcome=returnedParam(result,returnUrl,"oms_card_action");return outcome==="succeeded"?{ok:true}:outcome==="canceled"?CLOSED:FAILED}):FAILED}}}function createInAppBrowserCard(options){return{cardHandoff:createInAppBrowserCardSetup({openAuthSession:options.openAuthSession,client:options.client,returnUrl:options.returnUrl}),payments:createInAppBrowserPayments(options)}}var OmsWireError=class _OmsWireError extends Error{constructor(field){super(`OMS answer could not be read: ${field}`);this.field=field;this.name="OmsWireError",Object.setPrototypeOf(this,_OmsWireError.prototype)}};function obj(value,field){if(value===null||typeof value!="object"||Array.isArray(value))throw new OmsWireError(field);return value}function arr(value,field){if(value==null)return[];if(!Array.isArray(value))throw new OmsWireError(field);return value}function str(o,key,field=key){let v=o[key];if(typeof v!="string"||v.length===0)throw new OmsWireError(field);return v}function optStr(o,key){let v=o[key];return typeof v=="string"&&v.length>0?v:null}function int(o,key,field=key){let v=o[key];if(typeof v!="number"||!Number.isFinite(v))throw new OmsWireError(field);return Math.trunc(v)}function optInt(o,key){let v=o[key];return typeof v=="number"&&Number.isFinite(v)?Math.trunc(v):null}function bool(o,key){return o[key]===true}function petIdOf(value){if(!value||typeof value!="object")return null;let id=value.pet_id;return typeof id=="string"&&id.length>0?id:null}var PACK_UNITS=["each","gram","milliliter"],SPEEDS=["ground","two_day","next_day"];function packUnit(o){let v=o.pack_unit;return typeof v=="string"&&PACK_UNITS.includes(v)?v:null}function speed(v){return typeof v=="string"&&SPEEDS.includes(v)?v:null}function httpsUrl(o,key){let v=optStr(o,key);if(!v)return null;try{return new URL(v).protocol==="https:"?v:null}catch{return null}}function shopConfigFromWire(raw){let o=obj(raw,"shop-config"),delivery=o.delivery&&typeof o.delivery=="object"?o.delivery:null,key=optStr(o,"stripe_publishable_key");return{recurringTermsVersion:optStr(o,"recurring_terms_version"),recurringTermsUrl:httpsUrl(o,"recurring_terms_url"),stripePublishableKey:key&&/^pk_(test|live)_[A-Za-z0-9]+$/.test(key)?key:null,delivery:delivery?{firstFill:speed(delivery.first_fill),refill:speed(delivery.refill)}:null,rxContactMissing:Array.isArray(o.rx_contact_missing)?o.rx_contact_missing.filter(p=>typeof p=="string"):null}}function offerFromWire(raw){let o=obj(raw,"offer"),qty=o.pack_quantity;return{offerId:str(o,"offer_id"),sku:optStr(o,"sku")??"",title:str(o,"title"),fulfillmentType:optStr(o,"fulfillment_type")??"physical",requiresRx:bool(o,"requires_rx"),compounded:bool(o,"compounded"),packQuantity:typeof qty=="string"&&/^\d+(\.\d+)?$/.test(qty)?qty:null,packUnit:packUnit(o),price:optInt(o,"price")}}function offerPageFromWire(raw){let o=obj(raw,"offers");return{offers:arr(o.offers,"offers").map(offerFromWire),nextCursor:optStr(o,"next_cursor")}}function quoteFromWire(raw){let o=obj(raw,"quote");return{lines:arr(o.lines,"lines").map(l=>{let line=obj(l,"line");return{offerId:str(line,"offer_id"),quantity:int(line,"quantity"),petId:petIdOf(line.pet),unitPrice:int(line,"unit_price"),discount:optInt(line,"discount")??0,tax:optInt(line,"tax")??0}}),shipping:int(o,"shipping"),tax:optInt(o,"tax")??0,total:int(o,"total"),expiresAt:str(o,"expires_at")}}function checkoutFromWire(raw){let o=obj(raw,"checkout");return{checkoutId:str(o,"checkout_id"),state:optStr(o,"state")??"draft",orderIds:arr(o.order_ids,"order_ids").filter(id=>typeof id=="string"),createdAt:optStr(o,"created_at")??"",total:int(o,"total"),shipping:optInt(o,"shipping")??0,tax:optInt(o,"tax")??0}}function confirmationFromWire(raw){let o=obj(raw,"confirmation");return{checkoutId:str(o,"checkout_id"),resale:arr(o.resale,"resale").map(r=>{let entry=obj(r,"resale"),outcome=str(entry,"outcome");if(outcome!=="confirmed"&&outcome!=="action_required")throw new OmsWireError("resale.outcome");let payerAction=optStr(entry,"payer_action");if(outcome==="action_required"&&!payerAction)throw new OmsWireError("resale.payer_action");return{outcome:outcome,orderId:str(entry,"order_id"),payerAction:outcome==="confirmed"?null:payerAction}})}}function orderSummaryFromWire(raw){let o=obj(raw,"order"),ref=o.reference&&typeof o.reference=="object"?o.reference:null;return{orderId:str(o,"order_id"),referenceNumber:ref?optStr(ref,"number"):null,status:str(o,"status"),total:int(o,"total"),placedAt:optStr(o,"placed_at"),itemCount:optInt(o,"item_count"),items:Array.isArray(o.items)?o.items.flatMap(orderItemFromWire):null}}function orderItemFromWire(raw){if(raw===null||typeof raw!="object"||Array.isArray(raw))return[];let o=raw,offerId=optStr(o,"offer_id"),title=optStr(o,"title"),quantity=optInt(o,"quantity");return offerId&&title&&quantity!==null?[{offerId:offerId,title:title,quantity:quantity}]:[]}function orderStepFromWire(raw){if(raw===null||typeof raw!="object"||Array.isArray(raw))return[];let o=raw,key=optStr(o,"key");return key?[{key:key,done:o.done===true,at:optStr(o,"at")}]:[]}function optTrackingFromWire(raw){if(raw===null||typeof raw!="object"||Array.isArray(raw))return null;try{return trackingFromWire(raw)}catch{return null}}function orderPageFromWire(raw){let o=obj(raw,"orders");return{orders:arr(o.orders,"orders").map(orderSummaryFromWire),nextCursor:optStr(o,"next_cursor")}}function orderLineFromWire(raw){let o=obj(raw,"line"),qty=o.pack_quantity;return{lineId:str(o,"line_id"),offerId:str(o,"offer_id"),sku:optStr(o,"sku")??"",title:str(o,"title"),requiresRx:bool(o,"requires_rx"),compounded:bool(o,"compounded"),packQuantity:typeof qty=="string"&&/^\d+(\.\d+)?$/.test(qty)?qty:null,packUnit:packUnit(o),quantity:int(o,"quantity"),unitPrice:int(o,"unit_price"),discount:optInt(o,"discount")??0,tax:optInt(o,"tax")??0,fulfillmentType:optStr(o,"fulfillment_type")??"physical",petId:petIdOf(o.pet)}}function trackingFromWire(raw){let o=obj(raw,"tracking");return{carrier:optStr(o,"carrier"),trackingNumber:optStr(o,"tracking_number"),status:str(o,"status"),occurredAt:optStr(o,"occurred_at"),trackingUrl:httpsUrl(o,"tracking_url"),deliveryBy:optStr(o,"delivery_by")}}function shipmentFromWire(raw){let o=obj(raw,"shipment");return{shipmentId:str(o,"shipment_id"),state:str(o,"state"),lines:arr(o.lines,"shipment.lines").map(l=>{let line=obj(l,"shipment.line");return{lineId:str(line,"line_id"),quantity:int(line,"quantity")}}),tracking:arr(o.tracking,"tracking").map(trackingFromWire)}}function orderFromWire(raw){let o=obj(raw,"order");return{summary:orderSummaryFromWire(o.summary),lines:arr(o.lines,"lines").map(orderLineFromWire),shipping:optInt(o,"shipping")??0,shippingTax:optInt(o,"shipping_tax")??0,shipments:arr(o.shipments,"shipments").map(shipmentFromWire),canCancel:bool(o,"can_cancel"),canReturn:bool(o,"can_return"),canPay:bool(o,"can_pay"),paymentStatus:optStr(o,"payment_status"),refunds:arr(o.refunds,"refunds").map(r=>{let refund=obj(r,"refund");return{refundId:str(refund,"refund_id"),amount:int(refund,"amount"),state:str(refund,"state")}}),returnIds:arr(o.return_ids,"return_ids").filter(id=>typeof id=="string"),subtotal:optInt(o,"subtotal"),discount:optInt(o,"discount"),tax:optInt(o,"tax"),arrivesBy:optStr(o,"arrives_by"),tracking:optTrackingFromWire(o.tracking),steps:Array.isArray(o.steps)?o.steps.flatMap(orderStepFromWire):null,paymentMethodId:optStr(o,"payment_method_id")}}function cancelOutcomeFromWire(raw){let o=obj(raw,"cancel");return{outcome:str(o,"outcome"),refunded:optInt(o,"refunded"),reasonCode:optStr(o,"reason_code")}}function payOutcomeFromWire(raw){let o=obj(raw,"pay"),outcome=str(o,"outcome");if(outcome!=="authorized"&&outcome!=="action_required")throw new OmsWireError("pay.outcome");let payerAction=optStr(o,"payer_action");if(outcome==="action_required"&&!payerAction)throw new OmsWireError("pay.payer_action");return{outcome:outcome,orderId:str(o,"order_id"),payerAction:outcome==="authorized"?null:payerAction}}function returnFromWire(raw){let o=obj(raw,"return");return{returnId:str(o,"return_id"),orderId:str(o,"order_id"),lines:arr(o.lines,"return.lines").map(l=>{let line=obj(l,"return.line");return{lineId:str(line,"line_id"),quantity:int(line,"quantity"),reasonCode:str(line,"reason_code")}}),state:str(o,"state"),rma:optStr(o,"rma"),labelUrl:httpsUrl(o,"label_url")}}function caseFromWire(raw){let o=obj(raw,"case");return{caseId:str(o,"case_id"),orderId:str(o,"order_id"),reasonCode:str(o,"reason_code"),message:typeof o.message=="string"?o.message:"",openedAt:str(o,"opened_at"),closedAt:optStr(o,"closed_at")}}function casesFromWire(raw){return arr(obj(raw,"cases").cases,"cases").map(caseFromWire)}function prescriptionsFromWire(raw){return arr(obj(raw,"prescriptions").prescriptions,"prescriptions").map(r=>{let o=obj(r,"prescription");return{rxId:str(o,"rx_id"),petId:str(o,"pet_id"),drug:optStr(o,"drug")??"",strength:optStr(o,"strength"),form:optStr(o,"form"),status:str(o,"status"),offerId:optStr(o,"offer_id"),packCount:optInt(o,"pack_count"),fillsUsed:optInt(o,"fills_used"),fillsTotal:optInt(o,"fills_total"),expiresOn:optStr(o,"expires_on"),nextFillOn:optStr(o,"next_fill_on")}})}function addressEntryFromWire(raw){let o=obj(raw,"address");return{ref:str(o,"ref"),label:optStr(o,"label")??"",isDefault:bool(o,"is_default"),isComplete:bool(o,"is_complete")}}function addressesFromWire(raw){return arr(obj(raw,"addresses").addresses,"addresses").map(addressEntryFromWire)}function addressDetailFromWire(raw){let o=obj(raw,"address"),a=obj(o.address,"address.address"),address={recipientName:optStr(a,"recipient_name"),line1:str(a,"line1","address.line1"),line2:optStr(a,"line2"),city:str(a,"city","address.city"),region:optStr(a,"region")??"",postalCode:str(a,"postal_code","address.postal_code"),country:str(a,"country","address.country")};return{...addressEntryFromWire(o),address:address}}function paymentMethodsFromWire(raw){return arr(obj(raw,"payment_methods").payment_methods,"payment_methods").map(r=>{let o=obj(r,"payment_method");return{paymentMethodId:str(o,"payment_method_id"),brand:optStr(o,"brand")??"",last4:optStr(o,"last4")??"",wallet:optStr(o,"wallet")}})}function paymentSetupFromWire(raw){let o=obj(raw,"setup");return{setupId:str(o,"setup_id"),payerAction:str(o,"payer_action")}}function cardSetupLinkFromWire(raw){let o=obj(raw,"card_setup");return{url:str(o,"url")}}function cardActionLinkFromWire(raw){let o=obj(raw,"card_action");return{url:str(o,"url"),expiresAt:str(o,"expires_at")}}function planFromWire(raw){let o=obj(raw,"plan");return{planId:str(o,"plan_id"),lines:arr(o.lines,"plan.lines").map(l=>{let line=obj(l,"plan.line");return{offerId:str(line,"offer_id"),quantity:int(line,"quantity"),petId:petIdOf(line.pet)}}),cadenceDays:int(o,"cadence_days"),destination:optStr(o,"destination"),paymentMethodId:optStr(o,"payment_method_id"),discountBps:optInt(o,"discount_bps")??0,nextRun:optStr(o,"next_run"),state:str(o,"state"),stopReason:optStr(o,"stop_reason")}}function planPageFromWire(raw){let o=obj(raw,"plans");return{plans:arr(o.plans,"plans").map(planFromWire),nextCursor:optStr(o,"next_cursor")}}function cartLineToWire(line){let wire={offer_id:line.offerId,quantity:line.quantity};return line.petId&&(wire.pet={namespace:"consumer",pet_id:line.petId}),line.rxId&&(wire.rx_id=line.rxId),wire}function addressInputToWire(input){let a=input.address;return{label:input.label,make_default:input.makeDefault===true,address:{recipient_name:a.recipientName,line1:a.line1,line2:a.line2,city:a.city,region:a.region,postal_code:a.postalCode,country:a.country}}}function cycleReviewFromWire(raw){let o=obj(raw,"cycle"),review=o.review&&typeof o.review=="object"&&!Array.isArray(o.review)?o.review:null,pick=key=>review&&review[key]!==void 0&&review[key]!==null?review[key]:o[key];return{planId:str(o,"plan_id"),reviewId:optStr(o,"review_id")??(review?optStr(review,"review_id"):null),cycle:int(o,"cycle"),state:review?optStr(review,"state")??optStr(o,"state"):optStr(o,"state"),lines:arr(pick("lines"),"cycle.lines").map(l=>{let line=obj(l,"cycle.line");return{offerId:str(line,"offer_id"),quantity:int(line,"quantity"),petId:petIdOf(line.pet)}}),shipsOn:review?optStr(review,"ships_on")??optStr(o,"ships_on"):optStr(o,"ships_on"),approveBy:review?optStr(review,"approve_by")??optStr(o,"approve_by"):optStr(o,"approve_by"),quoteLines:arr(o.quote&&typeof o.quote=="object"?o.quote.lines:null,"cycle.quote.lines").map(l=>{let line=obj(l,"cycle.quote.line");return{offerId:str(line,"offer_id"),quantity:int(line,"quantity"),petId:petIdOf(line.pet),unitPrice:int(line,"unit_price"),discount:optInt(line,"discount")??0,tax:optInt(line,"tax")??0}})}}function cycleDraftFromWire(raw){let o=obj(raw,"cycle-draft");return{checkoutId:str(o,"checkout_id"),shipping:optInt(o,"shipping")??0,tax:optInt(o,"tax")??0,total:int(o,"total"),expiresAt:optStr(o,"expires_at")}}var DEFAULT_PATH="/api/v1/oms",DEFAULT_TIMEOUT_MS=3e4,PAYMENT_METHOD_ID=/^[A-Za-z0-9_]+$/,REASON_CODE=/^[a-z][a-z0-9_]{0,63}$/;function checkBaseUrl(raw){let url;try{url=new URL(raw)}catch{throw new EverfurConfigError("invalid-argument","createOmsClient: baseUrl is not a URL")}let local=url.hostname==="localhost"||url.hostname==="127.0.0.1"||url.hostname==="[::1]";if(url.protocol!=="https:"&&!(local&&url.protocol==="http:"))throw new EverfurConfigError("invalid-argument","createOmsClient: baseUrl must be https");if(url.username||url.password||url.search||url.hash)throw new EverfurConfigError("invalid-argument","createOmsClient: baseUrl must be a bare origin or path");return url.origin+url.pathname.replace(/\/+$/,"")}function seg(id){return encodeURIComponent(id)}function isValidId(id){return typeof id=="string"&&id.length>0&&id.length<=256}function createOmsClient(config){let base=checkBaseUrl(config.baseUrl)+(config.path??DEFAULT_PATH).replace(/\/+$/,""),fetchImpl=config.fetch??(typeof globalThis.fetch=="function"?globalThis.fetch.bind(globalThis):void 0);if(!fetchImpl)throw new EverfurConfigError("missing-peer-dependency","createOmsClient: no fetch available; pass config.fetch");if(!config.auth||config.auth.kind!=="everfur_consumer"||typeof config.auth.getToken!="function")throw new EverfurConfigError("invalid-argument",'createOmsClient: auth must be { kind: "everfur_consumer", getToken }');let getToken=config.auth.getToken,channel=config.channel??"web",timeoutMs=config.timeoutMs??DEFAULT_TIMEOUT_MS;async function token(){try{let t=await getToken();return typeof t=="string"&&t.length>0?t:null}catch{return null}}async function send(call){let bearer=await token();if(!bearer)return omsErr({kind:"signedOut"});let url=base+call.path;if(call.query){let params=new URLSearchParams;for(let[k,v]of Object.entries(call.query))v!==void 0&&params.set(k,String(v));let qs=params.toString();qs&&(url+=`?${qs}`)}let headers={accept:"application/json",authorization:`Bearer ${bearer}`},init={method:call.method,headers:headers};call.body!==void 0&&(headers["content-type"]="application/json",init.body=JSON.stringify(call.body));let controller=typeof AbortController=="function"?new AbortController:null;controller&&(init.signal=controller.signal);let timedOut=false,timer=setTimeout(()=>{timedOut=true,controller?.abort()},timeoutMs),res;try{res=await fetchImpl(url,init)}catch{return clearTimeout(timer),omsErr({kind:timedOut?"timeout":"network"})}try{let requestId=res.headers.get("x-request-id")??void 0,rid=requestId?{requestId:requestId}:{};if(res.status<200||res.status>=300){let body=res.status===402||res.status===409||res.status===422?await res.json().catch(()=>null):null;return omsErr(omsErrorFromStatus(res.status,body,{...rid,retryAfter:res.headers.get("retry-after")}))}if(call.read===null||res.status===204)return omsOk(void 0);let raw;try{raw=await res.json()}catch{return omsErr({kind:"badResponse",...rid})}try{return omsOk(call.read(raw))}catch{return omsErr({kind:"badResponse",...rid})}}catch{return omsErr({kind:timedOut?"timeout":"network"})}finally{clearTimeout(timer)}}let invalid=()=>Promise.resolve(omsErr({kind:"invalidRequest"}));function withId(id,run){return isValidId(id)?run(seg(id)):invalid()}let lines=ls=>ls.map(cartLineToWire);return{shopConfig:()=>send({method:"GET",path:"/shop-config",read:shopConfigFromWire}),offers:(q={})=>send({method:"GET",path:"/catalog/offers",query:{text:q.text,requires_rx:q.requiresRx,cursor:q.cursor,limit:q.limit},read:offerPageFromWire}),offer:offerId=>withId(offerId,id=>send({method:"GET",path:`/catalog/offers/${id}`,read:offerFromWire})),prescriptions:()=>send({method:"GET",path:"/prescriptions",read:prescriptionsFromWire}),addresses:()=>send({method:"GET",path:"/addresses",read:addressesFromWire}),address:ref=>withId(ref,id=>send({method:"GET",path:`/addresses/${id}`,read:addressDetailFromWire})),addAddress:input=>send({method:"POST",path:"/addresses",body:addressInputToWire(input),read:addressEntryFromWire}),updateAddress:(ref,input)=>withId(ref,id=>send({method:"PUT",path:`/addresses/${id}`,body:addressInputToWire(input),read:addressEntryFromWire})),removeAddress:ref=>withId(ref,id=>send({method:"DELETE",path:`/addresses/${id}`,read:null})),makeDefaultAddress:ref=>withId(ref,id=>send({method:"POST",path:`/addresses/${id}/default`,read:addressEntryFromWire})),paymentMethods:()=>send({method:"GET",path:"/payment-methods",read:paymentMethodsFromWire}),setupPaymentMethod:()=>send({method:"POST",path:"/payment-methods/setup",read:paymentSetupFromWire}),startCardSetupSession:r=>send({method:"POST",path:"/payment-methods/setup-session",body:{idempotency_key:r.idempotencyKey,return_url:r.returnUrl},read:cardSetupLinkFromWire}),removePaymentMethod:pm=>PAYMENT_METHOD_ID.test(pm)?send({method:"DELETE",path:`/payment-methods/${pm}`,read:null}):invalid(),quote:r=>send({method:"POST",path:"/cart/quote",body:{lines:lines(r.lines),ship_to:r.shipTo,promo_code:r.promoCode??null},read:quoteFromWire}),createCheckout:r=>send({method:"POST",path:"/checkouts",body:{idempotency_key:r.idempotencyKey,channel:channel,lines:lines(r.lines),ship_to:r.shipTo,receipt_email:r.receiptEmail??null,promo_code:r.promoCode??null},read:checkoutFromWire}),confirmCheckout:(checkoutId,r)=>PAYMENT_METHOD_ID.test(r.paymentMethodId)&&Number.isInteger(r.expectedTotal)?withId(checkoutId,id=>send({method:"POST",path:`/checkouts/${id}/confirm`,body:{idempotency_key:r.idempotencyKey,expected_total:r.expectedTotal,payment_method_id:r.paymentMethodId},read:confirmationFromWire})):invalid(),orders:(q={})=>send({method:"GET",path:"/orders",query:{cursor:q.cursor,limit:q.limit,reference:q.reference},read:orderPageFromWire}),order:orderId=>withId(orderId,id=>send({method:"GET",path:`/orders/${id}`,read:orderFromWire})),cancelOrder:(orderId,r)=>REASON_CODE.test(r.reasonCode)?withId(orderId,id=>send({method:"POST",path:`/orders/${id}/cancel`,body:{idempotency_key:r.idempotencyKey,reason_code:r.reasonCode},read:cancelOutcomeFromWire})):invalid(),payOrder:(orderId,r)=>{if(r.paymentMethodId!==void 0&&!PAYMENT_METHOD_ID.test(r.paymentMethodId))return invalid();let body={idempotency_key:r.idempotencyKey};return r.paymentMethodId&&(body.payment_method_id=r.paymentMethodId),withId(orderId,id=>send({method:"POST",path:`/orders/${id}/pay`,body:body,read:payOutcomeFromWire}))},cardActionLink:(orderId,r)=>withId(orderId,id=>send({method:"POST",path:`/orders/${id}/card-action-link`,body:{return_url:r.returnUrl},read:cardActionLinkFromWire})),requestReturn:(orderId,r)=>r.lines.every(l=>REASON_CODE.test(l.reasonCode))?withId(orderId,id=>send({method:"POST",path:`/orders/${id}/returns`,body:{idempotency_key:r.idempotencyKey,lines:r.lines.map(l=>({line_id:l.lineId,quantity:l.quantity,reason_code:l.reasonCode}))},read:returnFromWire})):invalid(),getReturn:returnId=>withId(returnId,id=>send({method:"GET",path:`/returns/${id}`,read:returnFromWire})),cancelReturn:returnId=>withId(returnId,id=>send({method:"POST",path:`/returns/${id}/cancel`,read:returnFromWire})),openCase:(orderId,r)=>REASON_CODE.test(r.reasonCode)&&r.message.length<=4e3?withId(orderId,id=>send({method:"POST",path:`/orders/${id}/cases`,body:{idempotency_key:r.idempotencyKey,reason_code:r.reasonCode,message:r.message},read:caseFromWire})):invalid(),orderCases:orderId=>withId(orderId,id=>send({method:"GET",path:`/orders/${id}/cases`,read:casesFromWire})),plans:(q={})=>send({method:"GET",path:"/subscriptions",query:{cursor:q.cursor,limit:q.limit},read:planPageFromWire}),createPlan:input=>PAYMENT_METHOD_ID.test(input.paymentMethodId)?send({method:"POST",path:"/subscriptions",body:{idempotency_key:input.idempotencyKey,cadence_days:input.cadenceDays,destination:input.destination,payment_method_id:input.paymentMethodId,consent_terms_version:input.consentTermsVersion,lines:lines(input.lines)},read:planFromWire}):invalid(),updatePlan:(planId,patch)=>{if(patch.paymentMethodId!==void 0&&!PAYMENT_METHOD_ID.test(patch.paymentMethodId))return invalid();let body={idempotency_key:patch.idempotencyKey};return patch.lines&&(body.lines=lines(patch.lines)),patch.cadenceDays!==void 0&&(body.cadence_days=patch.cadenceDays),patch.destination!==void 0&&(body.destination=patch.destination),patch.paymentMethodId!==void 0&&(body.payment_method_id=patch.paymentMethodId),withId(planId,id=>send({method:"PATCH",path:`/subscriptions/${id}`,body:body,read:planFromWire}))},planAction:(planId,r)=>withId(planId,id=>send({method:"POST",path:`/subscriptions/${id}/actions`,body:{idempotency_key:r.idempotencyKey,operation:r.operation},read:planFromWire})),cancelPlan:planId=>withId(planId,id=>send({method:"POST",path:`/subscriptions/${id}/cancel`,read:planFromWire})),cycleReview:planId=>withId(planId,id=>send({method:"GET",path:`/subscriptions/${id}/cycle`,read:cycleReviewFromWire})),editCycle:(planId,cycle,r)=>Number.isInteger(cycle)&&cycle>0?withId(planId,id=>send({method:"PUT",path:`/subscriptions/${id}/cycles/${cycle}/lines`,body:{idempotency_key:r.idempotencyKey,lines:lines(r.lines)},read:cycleReviewFromWire})):invalid(),draftCycle:(planId,cycle)=>Number.isInteger(cycle)&&cycle>0?withId(planId,id=>send({method:"POST",path:`/subscriptions/${id}/cycles/${cycle}/draft`,read:cycleDraftFromWire})):invalid(),approveCycle:(planId,cycle,r)=>Number.isInteger(cycle)&&cycle>0&&Number.isInteger(r.expectedTotal)?withId(planId,id=>send({method:"POST",path:`/subscriptions/${id}/cycles/${cycle}/approve`,body:{idempotency_key:r.idempotencyKey,checkout_id:r.checkoutId,expected_total:r.expectedTotal},read:confirmationFromWire})):invalid(),skipCycle:(planId,cycle,r)=>Number.isInteger(cycle)&&cycle>0?withId(planId,id=>send({method:"POST",path:`/subscriptions/${id}/cycles/${cycle}/skip`,body:{idempotency_key:r.idempotencyKey},read:planFromWire})):invalid()}}exports.EverfurShop=EverfurShop;exports.SHOP_COPY=SHOP_COPY;exports.SHOP_COPY_PLACEHOLDERS=SHOP_COPY_PLACEHOLDERS;exports.SHOP_V3_COPY=SHOP_V3_COPY;exports.SHOP_V3_COPY_PLACEHOLDERS=SHOP_V3_COPY_PLACEHOLDERS;exports.ShopSwitchCard=ShopSwitchCard;exports.UNAVAILABLE_PACKAGE_SOURCE=UNAVAILABLE_PACKAGE_SOURCE;exports.createInAppBrowserCard=createInAppBrowserCard;exports.createInAppBrowserCardSetup=createInAppBrowserCardSetup;exports.createInAppBrowserPayments=createInAppBrowserPayments;exports.createOmsClient=createOmsClient;exports.createOmsPackageSource=createOmsPackageSource;exports.isOmsRefusal=isOmsRefusal;exports.isOmsRetryable=isOmsRetryable;exports.isOmsUnavailable=isOmsUnavailable;exports.newIdempotencyKey=newIdempotencyKey;exports.shopBackRoute=shopBackRoute;exports.shopCopy=shopCopy;exports.shopV3Copy=shopV3Copy;