@everfur/sdk 0.16.1 → 0.17.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.
- package/CHANGELOG.md +141 -0
- package/dist/{Chat.d-D3ScVQ22.d.cts → Chat.d-BYY1U61e.d.cts} +1 -1
- package/dist/{Chat.d-CzI2228d.d.ts → Chat.d-uETscjrL.d.ts} +1 -1
- package/dist/{DepthViews.d-DVIydPLt.d.ts → DepthViews.d-B4SE5GUD.d.ts} +1 -1
- package/dist/{DepthViews.d-Cwbel5o4.d.ts → DepthViews.d-BsZ73mzL.d.ts} +1 -1
- package/dist/{DepthViews.d-BLx_ZTwa.d.cts → DepthViews.d-DL8MP_kA.d.cts} +1 -1
- package/dist/{DepthViews.d-6U4QqaW3.d.cts → DepthViews.d-D_Qp4glO.d.cts} +1 -1
- package/dist/{RecordsPage.d-Do7T8Fns.d.cts → RecordsPage.d-CYotk2R9.d.cts} +1 -1
- package/dist/{RecordsPage.d-Bwalb0wU.d.ts → RecordsPage.d-D4gP4leq.d.ts} +1 -1
- package/dist/animations/index.d.cts +3 -3
- package/dist/animations/index.d.ts +3 -3
- package/dist/{appStateLifecycle.d-Bd-rNy6K.d.ts → appStateLifecycle.d-CXJzBS3c.d.ts} +3 -3
- package/dist/{appStateLifecycle.d-_mh4CEAq.d.cts → appStateLifecycle.d-DJXdDOJY.d.cts} +3 -3
- package/dist/{attachments.d-GlO5UP7H.d.cts → attachments.d-B8kOCb6q.d.cts} +5 -5
- package/dist/{attachments.d-BiBGBE4o.d.ts → attachments.d-BTIGzXWD.d.ts} +5 -5
- package/dist/{attachments.d-CyB8hzDo.d.ts → attachments.d-BgatKf7d.d.ts} +2 -2
- package/dist/{attachments.d-Y-qvSHVU.d.cts → attachments.d-C61URT8r.d.cts} +2 -2
- package/dist/{bookingCopy.d-BIaCiRuW.d.cts → bookingCopy.d-B-bSYgqS.d.cts} +2 -2
- package/dist/{bookingCopy.d-DgWvNKD5.d.ts → bookingCopy.d-JQW2SLM-.d.ts} +2 -2
- package/dist/{casesRepository.d-BW8DTYeN.d.ts → casesRepository.d-CHEjzT4h.d.ts} +1 -1
- package/dist/{casesRepository.d-_0AO2YrL.d.cts → casesRepository.d-CVG2EXcg.d.cts} +1 -1
- package/dist/chat/index.d.cts +10 -10
- package/dist/chat/index.d.ts +10 -10
- package/dist/chat/lite/index.d.cts +10 -10
- package/dist/chat/lite/index.d.ts +10 -10
- package/dist/client/index.cjs +1 -1
- package/dist/client/index.d.cts +6 -6
- package/dist/client/index.d.ts +6 -6
- package/dist/client/index.js +1 -1
- package/dist/{clinicBatch.d-BcuSaOkv.d.cts → clinicBatch.d-DdlFy4pD.d.cts} +2 -2
- package/dist/{clinicBatch.d-BXwATY3-.d.ts → clinicBatch.d-oNwH_dbI.d.ts} +2 -2
- package/dist/{config.d-D1xcxALX.d.cts → config.d-Cy_hJBJG.d.cts} +1 -1
- package/dist/{config.d-jTVsAeky.d.ts → config.d-DopRLD4f.d.ts} +1 -1
- package/dist/consent/index.d.cts +5 -5
- package/dist/consent/index.d.ts +5 -5
- package/dist/{context.d-goZeZO2I.d.ts → context.d-Ban-Hhqu.d.ts} +5 -5
- package/dist/{context.d-C3x-z665.d.cts → context.d-C42juGn6.d.cts} +5 -5
- package/dist/{copy.d-DPwFY4r5.d.cts → copy.d-BTS5l6Ri.d.cts} +2 -2
- package/dist/{copy.d-yfJv7fl6.d.ts → copy.d-qdbygul9.d.ts} +2 -2
- package/dist/core/index.cjs +1 -1
- package/dist/core/index.d.cts +13 -13
- package/dist/core/index.d.ts +13 -13
- package/dist/core/index.js +1 -1
- package/dist/{depth.d-SJzknw_P.d.ts → depth.d-BGkHm2Se.d.ts} +2 -2
- package/dist/{depth.d-e_8_icip.d.cts → depth.d-BfVrhq9o.d.cts} +2 -2
- package/dist/{entitlementRepository.d-BNgZhwoE.d.ts → entitlementRepository.d-CjwqCyhS.d.ts} +2 -2
- package/dist/{entitlementRepository.d-C_LdzINM.d.cts → entitlementRepository.d-npT7L_7_.d.cts} +2 -2
- package/dist/{focus.d-CXpIkIuU.d.cts → focus.d-DS7Ze1Pp.d.cts} +2 -2
- package/dist/{focus.d-DzIgOqNB.d.ts → focus.d-S0nq_k1A.d.ts} +2 -2
- package/dist/health-plan/index.cjs +1 -1
- package/dist/health-plan/index.d.cts +9 -9
- package/dist/health-plan/index.d.ts +9 -9
- package/dist/health-plan/index.js +1 -1
- package/dist/{idempotency.d-0biUa_Vw.d.cts → idempotency.d-COIrwuCb.d.ts} +334 -3
- package/dist/{idempotency.d-DcqIqmf9.d.ts → idempotency.d-gfiN4Qnp.d.cts} +334 -3
- package/dist/{identity.d-BEJcHY-5.d.ts → identity.d-B3mFvvRq.d.ts} +1 -1
- package/dist/{identity.d-COcNGuCJ.d.cts → identity.d-D76vXtkJ.d.cts} +1 -1
- package/dist/index.cjs +3 -3
- package/dist/index.d.cts +13 -13
- package/dist/index.d.ts +13 -13
- package/dist/index.js +3 -3
- package/dist/{introEvents.d-D8N9bbGO.d.cts → introEvents.d-3FLEemX3.d.cts} +1 -1
- package/dist/{introEvents.d-GCdyQyUG.d.ts → introEvents.d-BYnr37bd.d.ts} +1 -1
- package/dist/notifications/index.d.cts +4 -4
- package/dist/notifications/index.d.ts +4 -4
- package/dist/{optInView.d-CY2IueSZ.d.ts → optInView.d-BqFMcum4.d.ts} +2 -2
- package/dist/{optInView.d-DVuuWDRw.d.cts → optInView.d-DXRUGDiD.d.cts} +2 -2
- package/dist/{parse.d--ztmWIIP.d.ts → parse.d-CY22hFxb.d.ts} +1 -1
- package/dist/{parse.d-B-WrkW2C.d.cts → parse.d-rvA_aRSO.d.cts} +1 -1
- package/dist/{pets.d-DwsImaHU.d.ts → pets.d-Cicz-aIO.d.ts} +1 -1
- package/dist/{pets.d-BSW0oEYx.d.cts → pets.d-RoHTZsaV.d.cts} +1 -1
- package/dist/{petsRepository.d-BQfWC3d4.d.cts → petsRepository.d-BxMyt6Aj.d.cts} +1 -1
- package/dist/{petsRepository.d-BudLFHVe.d.ts → petsRepository.d-DtAZf_Ja.d.ts} +1 -1
- package/dist/{ports.d-DzPbmiDT.d.cts → ports.d-D7cjFUoL.d.cts} +4 -4
- package/dist/{ports.d-B6kDPKF7.d.ts → ports.d-DrgKa73F.d.ts} +4 -4
- package/dist/records/depth/index.d.cts +9 -9
- package/dist/records/depth/index.d.ts +9 -9
- package/dist/records/index.cjs +1 -1
- package/dist/records/index.d.cts +10 -10
- package/dist/records/index.d.ts +10 -10
- package/dist/records/index.js +1 -1
- package/dist/{requestFunnel.d-BPsCHJWf.d.ts → requestFunnel.d-B5y7Py8Z.d.ts} +2 -2
- package/dist/{requestFunnel.d-BdpL7gwg.d.cts → requestFunnel.d-BdQf53zs.d.cts} +2 -2
- package/dist/{runtimeTypes.d-C_Pcxn-n.d.ts → runtimeTypes.d-D5EDgS3Y.d.ts} +4 -4
- package/dist/{runtimeTypes.d-Cfq3IrZG.d.cts → runtimeTypes.d-r4Q5vASZ.d.cts} +4 -4
- package/dist/{screenProps.d-DGrfO17l.d.ts → screenProps.d-KLCrP43b.d.ts} +1 -1
- package/dist/{screenProps.d-BJMn1kTR.d.cts → screenProps.d-v4a4kzxA.d.cts} +1 -1
- package/dist/server/events/index.cjs +2 -2
- package/dist/server/events/index.d.cts +29 -5
- package/dist/server/events/index.d.ts +29 -5
- package/dist/server/events/index.js +2 -2
- package/dist/server/index.cjs +1 -1
- package/dist/server/index.d.cts +3 -3
- package/dist/server/index.d.ts +3 -3
- package/dist/server/index.js +1 -1
- package/dist/shop/index.cjs +212 -163
- package/dist/shop/index.d.cts +38 -4
- package/dist/shop/index.d.ts +38 -4
- package/dist/shop/index.js +214 -165
- package/dist/shop/orders-v2/index.cjs +127 -0
- package/dist/shop/orders-v2/index.d.cts +7 -0
- package/dist/shop/orders-v2/index.d.ts +7 -0
- package/dist/shop/orders-v2/index.js +127 -0
- package/dist/tabs/index.d.cts +6 -6
- package/dist/tabs/index.d.ts +6 -6
- package/dist/televet/booking/index.d.cts +6 -6
- package/dist/televet/booking/index.d.ts +6 -6
- package/dist/testing/index.d.cts +1 -1
- package/dist/testing/index.d.ts +1 -1
- package/dist/testing/rn/index.d.cts +7 -7
- package/dist/testing/rn/index.d.ts +7 -7
- package/dist/testing/web/index.d.cts +7 -7
- package/dist/testing/web/index.d.ts +7 -7
- package/dist/texting/index.d.cts +5 -5
- package/dist/texting/index.d.ts +5 -5
- package/dist/{threadOptions.d-BnhE7T8Y.d.ts → threadOptions.d-Crh_LiDe.d.ts} +2 -2
- package/dist/{threadOptions.d-B8HTJa9A.d.cts → threadOptions.d-EFJaNBP1.d.cts} +2 -2
- package/dist/{timelineRows.d-BTcUdNeI.d.cts → timelineRows.d-6-Cw8xGd.d.cts} +1 -1
- package/dist/{timelineRows.d-kmBms1W5.d.ts → timelineRows.d-DpSis9HR.d.ts} +1 -1
- package/dist/{useHealthPlanSubscription.d-BzNaVl89.d.ts → useHealthPlanSubscription.d-DD30EkUR.d.ts} +2 -2
- package/dist/{useHealthPlanSubscription.d-B_cth_iF.d.cts → useHealthPlanSubscription.d-DWrzUXf4.d.cts} +2 -2
- package/dist/{usePresentation.d-BkAMOfb5.d.cts → usePresentation.d-C8rqY56C.d.cts} +1 -1
- package/dist/{usePresentation.d-B7Uf44Ax.d.ts → usePresentation.d-CRG3Gaaq.d.ts} +1 -1
- package/dist/{useRecordsDepth.d-BxHpKipf.d.cts → useRecordsDepth.d-BYk7m7gF.d.cts} +1 -1
- package/dist/{useRecordsDepth.d-BHkZi0tM.d.ts → useRecordsDepth.d-DlRda5jp.d.ts} +1 -1
- package/dist/view.d-B31M8rCG.d.cts +11 -0
- package/dist/view.d-B31M8rCG.d.ts +11 -0
- package/dist/{view.d-CoDbnv0f.d.cts → view.d-CLpEHKOp.d.cts} +3 -3
- package/dist/{view.d-2BYMRnWj.d.ts → view.d-DuIXHr08.d.ts} +3 -3
- package/dist/web/consent/index.d.cts +5 -5
- package/dist/web/consent/index.d.ts +5 -5
- package/dist/web/health-plan/index.cjs +1 -1
- package/dist/web/health-plan/index.d.cts +11 -11
- package/dist/web/health-plan/index.d.ts +11 -11
- package/dist/web/health-plan/index.js +1 -1
- package/dist/web/index.cjs +1 -1
- package/dist/web/index.d.cts +22 -22
- package/dist/web/index.d.ts +22 -22
- package/dist/web/index.js +1 -1
- package/dist/web/intro/index.d.cts +6 -6
- package/dist/web/intro/index.d.ts +6 -6
- package/dist/web/notifications/index.d.cts +3 -3
- package/dist/web/notifications/index.d.ts +3 -3
- package/dist/web/records/depth/index.d.cts +9 -9
- package/dist/web/records/depth/index.d.ts +9 -9
- package/dist/web/records/index.d.cts +11 -11
- package/dist/web/records/index.d.ts +11 -11
- package/dist/web/records-sheet/index.cjs +1 -1
- package/dist/web/records-sheet/index.js +1 -1
- package/dist/web/shop/index.cjs +194 -50
- package/dist/web/shop/index.d.cts +32 -4
- package/dist/web/shop/index.d.ts +32 -4
- package/dist/web/shop/index.js +194 -50
- package/dist/web/shop/orders-v2/index.cjs +124 -0
- package/dist/web/shop/orders-v2/index.d.cts +14 -0
- package/dist/web/shop/orders-v2/index.d.ts +14 -0
- package/dist/web/shop/orders-v2/index.js +124 -0
- package/dist/web/televet/booking/index.d.cts +6 -6
- package/dist/web/televet/booking/index.d.ts +6 -6
- package/dist/web/texting/index.d.cts +5 -5
- package/dist/web/texting/index.d.ts +5 -5
- package/package.json +29 -1
- package/shop/orders-v2/package.json +8 -0
- package/web/shop/orders-v2/native-blocked.cjs +12 -0
- package/web/shop/orders-v2/package.json +8 -0
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
/*! @everfur/sdk. Copyright (c) 2026 Strand Health Inc. dba Everfur. All rights reserved. Use is subject to the Everfur SDK License: https://docs.everfur.com/license */
|
|
2
|
+
"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)}};var SeamContext=react.createContext(null);function OrdersV2SeamProvider({seam:seam,children:children}){return react.createElement(SeamContext.Provider,{value:seam},children)}function useOrdersV2Seam(){let seam=react.useContext(SeamContext);if(!seam)throw new EverfurConfigError("not-initialized","Orders v2 renders inside EverfurShop");return seam}function useShop(){return useOrdersV2Seam().useShop()}function useShopShared(){return useOrdersV2Seam().useShopShared()}function useCart(client){return useOrdersV2Seam().useCart(client)}function usePrescriptions(){return useOrdersV2Seam().usePrescriptions()}function usePlans(){return useOrdersV2Seam().usePlans()}function useShopRead(key,read){return useOrdersV2Seam().useShopRead(key,read)}function useShopAction(act){return useOrdersV2Seam().useShopAction(act)}function useCartOps(){let seam=useOrdersV2Seam();return{add:seam.addToCart,remove:seam.removeFromCart,setQuantity:seam.setCartQuantity,max:seam.cartMaxQuantity}}function cartKey(line){return`${line.offerId}|${line.petId??""}|${line.rxId??""}`}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")}`}var WK=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],MO=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],DAY_MS=864e5;function dayNumber(iso){if(!iso)return null;let m=/^(\d{4})-(\d{2})-(\d{2})/.exec(iso);if(!m)return null;let t=Date.UTC(Number(m[1]),Number(m[2])-1,Number(m[3]));return Number.isNaN(t)?null:Math.round(t/DAY_MS)}function isoOf(n){return new Date(n*DAY_MS).toISOString().slice(0,10)}function localToday(now=/* @__PURE__ */new Date){let p=x=>String(x).padStart(2,"0");return`${now.getFullYear()}-${p(now.getMonth()+1)}-${p(now.getDate())}`}function addDays(iso,n){return isoOf((dayNumber(iso)??0)+n)}function threeMonthsBefore(iso){let m=/^(\d{4})-(\d{2})-(\d{2})/.exec(iso);if(!m)return iso;let d=new Date(Date.UTC(Number(m[1]),Number(m[2])-1-3,1)),last=new Date(Date.UTC(d.getUTCFullYear(),d.getUTCMonth()+1,0)).getUTCDate();return d.setUTCDate(Math.min(Number(m[3]),last)),d.toISOString().slice(0,10)}function ovDay(iso){let n=dayNumber(iso);if(n===null)return null;let d=new Date(n*DAY_MS);return{iso:isoOf(n),weekday:WK[d.getUTCDay()],date:d.getUTCDate(),month:MO[d.getUTCMonth()]}}function fmtDay(iso){let d=ovDay(iso);return d?`${d.weekday}, ${d.month} ${d.date}`:null}function shortDay(iso){let d=ovDay(iso);return d?`${d.month} ${d.date}`:null}function dateOf(time){if(!time)return null;let m=/^(\d{4}-\d{2}-\d{2})/.exec(time);return m?m[1]:null}function dollars(cents){return cents%100===0?`$${(cents/100).toLocaleString("en-US")}`:formatCents(cents)}var ENDED=/* @__PURE__ */new Set(["delivered","cancelled","rejected"]);function inFlight(o){return!ENDED.has(o.status)&&o.placedAt!==null}function isRxOrder(o){return o.fulfiller==="pharmacy"}function firstToRunOut(prescriptions){let best=null;for(let p of prescriptions)p.supply&&(!best||(dayNumber(p.supply.runsOutOn)??1/0)<(dayNumber(best.supply.runsOutOn)??1/0))&&(best=p);return best}var HERO_DAYS=14;function rxDrugFor(o,prescriptions){let ids=new Set((o.items??[]).map(i=>i.offerId));return prescriptions.find(p=>p.offerId!==null&&ids.has(p.offerId))??null}function packageRow(o,prescriptions,copy){let items=o.items??[],rx=isRxOrder(o)?rxDrugFor(o,prescriptions):null,first=items[0]??null,n=o.itemCount??items.reduce((s,i)=>s+i.quantity,0),lines=items.length,title,what;if(isRxOrder(o)){let drug=rx?.drug||first?.title||null;title=drug?copy.rxArrives(drug):copy.boxArrives,what=rx?.packCount&&rx.supply?copy.units(rx.packCount,rx.supply.unitLabel):first?.title??null}else title=copy.boxArrives,what=lines>1?copy.items(n||lines):first?.title??null;let steps=null;return o.steps&&o.steps.length>0&&(steps=o.steps.map(s=>({done:s.doneAt!==null&&s.key!==o.currentStep,now:s.key===o.currentStep}))),{kind:"package",key:`pkg:${o.orderId}`,orderId:o.orderId,day:ovDay(o.arrivesBy),title:title,what:what,steps:steps,status:statusLine(o,copy),imageUrl:first?.imageUrl??null,count:lines>1?lines:null,label:[title,what].filter(Boolean).join(", ")}}function statusLine(o,copy){switch(o.statusLineKey){case"ships_tomorrow":return{text:copy.shipsTomorrow,tone:"go"};case"needs_vet_ok":return o.prescriberName?{text:copy.needsVetOk(o.prescriberName),tone:"wait"}:null;default:return null}}function heroView({today:today,prescriptions:prescriptions,orders:orders,petName:petName,copy:copy}){let flying=orders.filter(inFlight),rows=[],rx=firstToRunOut(prescriptions),pet=rx?petName(rx.petId):null,todayDay=ovDay(today);rx&&rx.supply&&pet&&rx.drug&&rx.supply.unitsLeft>0&&rows.push({kind:"today",key:"today",day:todayDay,title:copy.hasLeft(pet,rx.supply.unitsLeft,rx.drug),line:copy.enoughUntil(fmtDay(rx.supply.runsOutOn))});let later=[...flying.map(o=>packageRow(o,prescriptions,copy)).sort((a,b)=>(dayNumber(a.day?.iso)??1/0)-(dayNumber(b.day?.iso)??1/0))];if(rx&&rx.supply&&rx.drug){let todayN=dayNumber(today),outIso=dayNumber(rx.supply.runsOutOn)<todayN?today:rx.supply.runsOutOn,out=dayNumber(outIso);if(out<=todayN+HERO_DAYS){let bringing=flying.filter(o=>rxDrugFor(o,[rx])!==null),inTime=bringing.find(o=>{let d=dayNumber(o.arrivesBy);return d!==null&&d<=out}),day=ovDay(outIso);if(inTime)later.push({kind:"runout",key:"runout",day:day,out:false,title:copy.wontRunOut,line:copy.oldBottleEnds(fmtDay(inTime.arrivesBy)),refill:null});else{let canFill=bringing.length===0&&rx.status==="ready"&&rx.offerId!==null,arrives=bringing.length===0?fmtDay(rx.supply.refillArrivesOn??null):null;later.push({kind:"runout",key:"runout",day:day,out:true,title:copy.runsOut(rx.drug),line:arrives?copy.orderToday(arrives):null,refill:canFill?rx:null})}later.sort((a,b)=>(dayNumber(a.day?.iso)??1/0)-(dayNumber(b.day?.iso)??1/0))}}return rows.push(...later),{headline:copy.onTheWay(flying.length),rows:rows}}var MAX_PIPS=12;function shownPlans(plans){return plans.filter(p=>p.state==="active"||p.state==="paused")}function cadenceSay(days,byMonth,amount,copy){let months=byMonth&&days%30===0?days/30:null;return amount?copy.amountEvery(amount,months?copy.everyMonthsAfter(months):copy.everyDays(days)):months?copy.everyMonths(months):copy.everyDaysAlone(days)}function readsInMonths(rx,script){return!rx||(script?.supply?script.supply.dailyUnits<1:false)}function planOffer(plan,offers){let line=plan.lines[0];if(!line)return null;let offer=offers.get(line.offerId);if(offer)return offer;let own=plan.changeOptions?.find(o=>o.offerId===line.offerId);return own?{offerId:own.offerId,sku:"",title:own.title,fulfillmentType:"physical",requiresRx:own.unitLabel!==null,compounded:false,packQuantity:own.packQuantity,packUnit:own.packUnit,price:null,imageUrl:null}:null}function refillCard(plan,{offers:offers,prescriptions:prescriptions,copy:copy}){let line=plan.lines[0],offer=planOffer(plan,offers);if(!offer)return null;let rx=plan.chargedWhenFilled??offer.requiresRx,packs=new Set((plan.changeOptions??[]).map(o=>o.offerId)),script=prescriptions.find(p=>p.offerId===offer.offerId)??(rx?prescriptions.find(p=>p.offerId!==null&&packs.has(p.offerId))??null:null),pack=offer.packQuantity?Number(offer.packQuantity):null,amount=rx&&script?.supply&&pack&&line?copy.units(pack*line.quantity,script.supply.unitLabel):null,byMonth=readsInMonths(rx,script),say=cadenceSay(plan.cadenceDays,byMonth,amount,copy),price=plan.priceCentsPerCycle!=null?formatCents(plan.priceCentsPerCycle):null,paused=plan.state==="paused",prescriber=plan.prescriberName??null,left=plan.refillsLeft??null,vet=rx&&prescriber?{line:copy.vetOks(prescriber),small:left!==null?copy.leftOnRx(left):null,pips:left!==null?Math.min(left,MAX_PIPS):0}:null,discount=!rx&&plan.autoDiscountPct?copy.offOnAuto(plan.autoDiscountPct):null,skippedDay=fmtDay(plan.skippedCycleOn);return{planId:plan.planId,offerId:offer.offerId,name:offer.title,imageUrl:offer.imageUrl??null,rx:rx,say:say,meta:copy.planMeta(say,price,rx),paused:paused,next:ovDay(plan.nextShipOn??null),cadenceDays:plan.cadenceDays,byMonth:byMonth,vet:vet,discount:discount,skipped:!paused&&skippedDay?copy.skipped(skippedDay):null,resumeLabel:copy.resume(fmtDay(plan.nextShipOn??null)),prescriber:prescriber,refillsLeft:left,options:plan.changeOptions&&plan.changeOptions.length>0?plan.changeOptions:null}}function refillCards(input){return shownPlans(input.plans).map(p=>refillCard(p,input)).filter(c=>c!==null).sort((a,b)=>(dayNumber(a.next?.iso)??1/0)-(dayNumber(b.next?.iso)??1/0))}function autoCountLine(cards,copy){let n=cards.filter(c=>!c.paused).length;return n>0?copy.onAuto(n):copy.nothingOnAuto}var CADENCES=[14,21,30,45,60,90];function packSay(o,many,copy){let pack=o.packQuantity?Number(o.packQuantity):null;return o.unitLabel&&pack?copy.units(pack*o.quantity,o.unitLabel):many&&o.size?o.size:null}function changeChoices(card,copy){let options=card.options;if(!options){let choices2=CADENCES.map(days=>({key:String(days),days:days,offerId:null,label:cadenceSay(days,card.byMonth,null,copy),price:null}));return{choices:choices2,picked:choices2.some(c=>c.days===card.cadenceDays)?String(card.cadenceDays):null}}let many=options.length>1,choices=options.flatMap(o=>o.cadenceDays.map(days=>({key:`${o.offerId}:${days}`,days:days,offerId:o.offerId,label:cadenceSay(days,card.byMonth,packSay(o,many,copy),copy),price:formatCents(o.priceCentsPerCycle)}))),own=options.find(o=>o.current),picked=own?`${own.offerId}:${card.cadenceDays}`:null;return{choices:choices,picked:choices.some(c=>c.key===picked)?picked:null}}function changeOf(card,choice){return choice.offerId&&choice.offerId!==card.offerId?{cadenceDays:choice.days,offerId:choice.offerId}:{cadenceDays:choice.days}}function sheetView(mode,card,copy){let nextDay=card.next?fmtDay(card.next.iso):null,itemMeta=copy.sheetMeta(card.say,nextDay);if(mode==="skip"){let after=card.next?addDays(card.next.iso,card.cadenceDays):null;return{mode:mode,title:nextDay?copy.skipTitle(nextDay):copy.sheetTitle,itemMeta:itemMeta,say:after?{text:copy.skipSay(fmtDay(after)),warn:false}:null,choices:[],picked:null,go:after?copy.skipGo(shortDay(after)):null}}if(mode==="change")return{mode:mode,title:copy.changeTitle,itemMeta:itemMeta,say:card.rx&&card.prescriber?{text:copy.changeRxSay(card.prescriber),warn:false}:null,...changeChoices(card,copy),go:copy.save};let rxLine=card.rx&&card.prescriber&&card.refillsLeft!==null;return{mode:mode,title:copy.pauseTitle,itemMeta:itemMeta,say:rxLine?{text:copy.pauseRxSay(card.prescriber,card.refillsLeft),warn:true}:{text:copy.pauseSay,warn:false},choices:[],picked:null,go:copy.pauseGo}}function savedLine(mode,card,after,copy){if(mode==="pause")return copy.saidPaused;let next=fmtDay(after?.nextShipOn??null)??(card.next?fmtDay(card.next.iso):null)??"";return mode==="skip"?copy.saidSkipped(card.name,next):copy.saidSaved(card.name,next)}function readyScript(offerId,prescriptions){return prescriptions.find(p=>p.offerId===offerId&&p.status==="ready")??null}function againItems(items,copy){return items.map(i=>{let add=i.isRx?null:{offerId:i.offerId,title:i.title,unitPrice:i.priceCents,requiresRx:false,quantity:1,...i.imageUrl?{imageUrl:i.imageUrl}:{}},ordered=shortDay(i.lastOrderedOn);return{offerId:i.offerId,title:i.title,price:i.priceCents!=null?formatCents(i.priceCents):null,imageUrl:i.imageUrl,meta:i.likelyOut?copy.likelyOut:ordered?copy.ordered(ordered):null,due:i.likelyOut,add:add,cartKey:add?cartKey(add):null}})}function pastOrders(orders,since){let from=dayNumber(since)??-1/0;return orders.filter(o=>ENDED.has(o.status)&&(dayNumber(dateOf(o.placedAt))??-1/0)>=from).sort((a,b)=>(b.placedAt??"").localeCompare(a.placedAt??""))}function pastOrderView(o,statusLabel,prescriptions,copy){let items=o.items??[],delivered=o.status==="delivered",doneDay=delivered?dateOf(o.steps?.find(s=>s.key==="delivered")?.doneAt):null,n=o.itemCount??items.reduce((s,i)=>s+i.quantity,0),meta=[delivered?copy.delivered:statusLabel(o.status),o.fulfiller==="everfur_box"?copy.everfurBox:null,n>0?copy.itemCount(n):null].filter(Boolean).join(" · "),addable=items.filter(i=>!prescriptions.some(p=>p.offerId===i.offerId)||readyScript(i.offerId,prescriptions)!==null);return{orderId:o.orderId,day:fmtDay(doneDay??dateOf(o.placedAt)),meta:meta,total:formatCents(o.total),shots:items.map(i=>({offerId:i.offerId,title:i.title,imageUrl:i.imageUrl??null})),addCount:addable.length,offerIds:addable.map(i=>i.offerId)}}function allInCart(offerIds,cart){return offerIds.length>0&&offerIds.every(id=>cart.some(c=>c.offerId===id))}function cartBar(items,thresholdCents,copy,whenFilledOffCents=null){let count=items.reduce((n2,i)=>n2+(i.rxId?1:i.quantity),0);if(count===0)return null;let everyday=0,rx=0,anyRx=false,anyEveryday=false;for(let i of items){let line=i.unitPrice===null?null:i.unitPrice*i.quantity;i.requiresRx?(anyRx=true,rx=rx===null||line===null?null:rx+line):(anyEveryday=true,everyday=everyday===null||line===null?null:everyday+line)}let thumbs=items.slice(-3).map(i=>i.imageUrl??null),n=copy.itemCount(count);if(!anyRx){let sub=thresholdCents===null||everyday===null?n:everyday>=thresholdCents?copy.shipsFree(n):copy.freeOver(n,dollars(thresholdCents));return{count:count,thumbs:thumbs,total:everyday===null?null:formatCents(everyday),sub:sub}}let off=whenFilledOffCents&&rx!==null?Math.min(whenFilledOffCents,rx):0,rxNet=rx===null?null:rx-off;return anyEveryday?{count:count,thumbs:thumbs,total:everyday===null?null:formatCents(everyday),sub:rxNet===null?n:copy.todayPlusRx(formatCents(rxNet))}:{count:count,thumbs:thumbs,total:rxNet===null?null:formatCents(rxNet),sub:copy.whenFilled(off>0?dollars(off):null)}}async function refillInput(client,rx){if(!rx.offerId)return null;let offer=await client.offer(rx.offerId);return offer.ok?{offerId:rx.offerId,title:offer.value.title,unitPrice:offer.value.price,requiresRx:true,quantity:rx.packCount??1,petId:rx.petId,rxId:rx.rxId,...offer.value.imageUrl?{imageUrl:offer.value.imageUrl}:{}}:null}async function addAllInputs(client,order,cart){let[res,rx]=await Promise.all([client.order(order.orderId),client.prescriptions()]);if(!res.ok)return null;let scripts=rx.ok?rx.value:[],inputs=[];for(let l of res.value.lines){if(!order.offerIds.includes(l.offerId))continue;let script=l.requiresRx?readyScript(l.offerId,scripts):null;if(l.requiresRx&&!script)continue;let shot=order.shots.find(s=>s.offerId===l.offerId),input={offerId:l.offerId,title:l.title,unitPrice:l.unitPrice,requiresRx:l.requiresRx,quantity:script?script.packCount??1:1,...shot?.imageUrl?{imageUrl:shot.imageUrl}:{},...script?{petId:script.petId,rxId:script.rxId}:l.petId?{petId:l.petId}:{}};cart.some(c=>c.key===cartKey(input))||inputs.push(input)}return inputs}function omsOk(value){/* @__PURE__ */
|
|
3
|
+
return Object.freeze({ok:true,value:value})}function quiet(read,empty){return read.phase==="unavailable"?{...read,phase:"ready",value:empty}:read}function useOrdersV2(copy){let{client:client,pets:pets,petName:petName,copy:shopCopy,v3:v3}=useShop(),{config:config}=useShopShared(),[today]=react.useState(()=>localToday()),since=threeMonthsBefore(today),rx=quiet(usePrescriptions(),[]),orders=useShopRead(`orders-v2:${since}`,()=>client.orders({since:since,limit:50})),plans=quiet(usePlans(),{plans:[],nextCursor:null}),buyAgain=useShopRead("buy-again",()=>client.buyAgain()),[savedPlans,setSaved]=react.useState(/* @__PURE__ */new Map),cart=useCart(client),planList=react.useMemo(()=>(plans.value?.plans??[]).map(p=>savedPlans.get(p.planId)??p),[plans.value,savedPlans]),offerIds=react.useMemo(()=>[...new Set(shownPlans(planList).flatMap(p=>p.lines.map(l=>l.offerId)))].sort(),[planList]),offers=useShopRead(`orders-v2-offers:${offerIds.join(",")}`,async()=>{let read=await Promise.all(offerIds.map(id=>client.offer(id))),map=/* @__PURE__ */new Map;return read.forEach(r=>{r.ok&&map.set(r.value.offerId,r.value)}),omsOk(map)}),lastOffers=react.useRef(null);offers.phase==="ready"&&offers.value&&(lastOffers.current=offers.value);let offerMap=offers.value??lastOffers.current,core=[rx,orders,plans],failed=core.some(r=>r.phase==="failed"||r.phase==="unavailable"),loading=!failed&&(core.some(r=>r.phase==="loading")||offerIds.length>0&&offers.phase==="loading"&&lastOffers.current===null),phase=failed?"failed":loading?"loading":"ready",view=react.useMemo(()=>{if(phase!=="ready")return null;let prescriptions=rx.value??[],list=orders.value?.orders??[],onePet=pets.length===1?pets[0].name:null,refills=refillCards({plans:planList,offers:offerMap??/* @__PURE__ */new Map,prescriptions:prescriptions,copy:copy}),items=buyAgain.phase==="ready"&&buyAgain.value&&buyAgain.value.length>0?againItems(buyAgain.value,copy):null,past=pastOrders(list,since).map(o=>pastOrderView(o,s=>shopCopy.orderStatus[s]??v3.orderSteps[0]??s,prescriptions,copy));return{title:onePet?copy.title(onePet):shopCopy.ordersTitle,autoLine:autoCountLine(refills,copy),hero:heroView({today:today,prescriptions:prescriptions,orders:list,petName:petName,copy:copy}),refills:refills,again:items,past:past,moreLabel:onePet?copy.everythingElse(onePet):shopCopy.tabShop}},[phase,rx.value,orders.value,planList,offerMap,buyAgain.phase,buyAgain.value,pets,petName,copy,shopCopy,v3,today,since]),bar=react.useMemo(()=>cartBar(cart,config.freeShippingThresholdCents??null,copy,config.firstRxDiscountCents??null),[cart,config.freeShippingThresholdCents,config.firstRxDiscountCents,copy]),retry=react.useCallback(()=>{for(let r of[rx,orders,plans,buyAgain])r.phase!=="ready"&&r.refresh()},[rx,orders,plans,buyAgain]),reread=react.useCallback(async()=>{await Promise.all([rx.reread(),orders.reread(),plans.reread(),buyAgain.reread()])},[rx,orders,plans,buyAgain]),saved=react.useCallback(plan2=>{setSaved(prev=>new Map(prev).set(plan2.planId,plan2)),plans.reread().then(()=>setSaved(/* @__PURE__ */new Map))},[plans]),plan=react.useCallback(planId=>planList.find(p=>p.planId===planId)??null,[planList]);return{phase:phase,view:view,bar:bar,plan:plan,retry:retry,reread:reread,saved:saved}}function usePlanChange(){let{client:client}=useShop();return useShopAction((keys,change)=>{let idempotencyKey=keys.key(`plan-${change.mode}`);if(change.mode==="change"){let cadenceDays=change.cadenceDays??30;return client.updatePlan(change.planId,change.offerId?{idempotencyKey:idempotencyKey,cadenceDays:cadenceDays,offerId:change.offerId}:{idempotencyKey:idempotencyKey,cadenceDays:cadenceDays})}return client.planAction(change.planId,{idempotencyKey:idempotencyKey,operation:change.mode})})}function useSystemReducedMotion(provided){let enabledRef=react.useRef(true);return react.useEffect(()=>{let active=true,probe=reactNative.AccessibilityInfo.isReduceMotionEnabled?.();probe&&typeof probe.then=="function"&&probe.then(value=>{active&&(enabledRef.current=value)});let subscription=reactNative.AccessibilityInfo.addEventListener?.("reduceMotionChanged",value=>{enabledRef.current=value});return()=>{active=false,subscription?.remove?.()}},[provided]),react.useMemo(()=>()=>enabledRef.current,[provided])}function fontFace(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 Press({onPress:onPress,disabled:disabled,label:label,style:style,children:children,role:role="button",selected:selected,hitSlop:hitSlop}){return react.createElement(reactNative.Pressable,{...hitSlop?{hitSlop:hitSlop}:{},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)}var appForeground=listener=>{let away=reactNative.AppState.currentState==="background",subscription=reactNative.AppState.addEventListener("change",next=>{next==="background"?away=true:next==="active"&&away&&(away=false,listener())});return()=>subscription.remove()};var CO_BOX={body:{paddingTop:12,paddingRight:16,paddingLeft:16},subtabs:{backgroundColor:"#ffffff"},subtab:{minHeight:44,rowGap:6,columnGap:6},subtabCurrent:{minHeight:44,rowGap:6,columnGap:6},head:{rowGap:2,columnGap:2},headTitle:{},headLine:{marginTop:2},way:{marginTop:24},wayTitle:{},tl:{marginTop:16,rowGap:12,columnGap:12},tlRow:{rowGap:12,columnGap:12},date:{paddingTop:8,paddingBottom:8,borderRadius:14,rowGap:3,columnGap:3,width:48,height:68},dateSmall:{},dateBig:{},dateToday:{paddingTop:8,paddingBottom:8,borderRadius:14,backgroundColor:"#000000",rowGap:3,columnGap:3,width:48,height:68},dateTodaySmall:{},dateTodayBig:{},dateOutSmall:{},dateOutBig:{},say:{paddingTop:4,paddingBottom:4},sayTitle:{rowGap:6,columnGap:6},sayLine:{marginTop:2},sayOutTitle:{rowGap:6,columnGap:6},run:{rowGap:12,columnGap:12},pkg:{paddingTop:12,paddingRight:12,paddingBottom:12,paddingLeft:16,borderRadius:20,backgroundColor:"#f3f3f3",rowGap:12,columnGap:12},pkgWhen:{},pkgWhat:{marginTop:2},pkgNow:{marginTop:8,rowGap:6,columnGap:6},pkgDot:{borderRadius:4,backgroundColor:"#07c168",width:8,height:8},steps:{marginTop:8,rowGap:3,columnGap:3},step:{borderRadius:2,backgroundColor:"#e4e4e4",height:4},stepDone:{borderRadius:2,backgroundColor:"#000000",height:4},tile:{paddingTop:6,paddingRight:6,paddingBottom:6,paddingLeft:6,borderRadius:14,backgroundColor:"#ffffff",width:56,height:56},tileCount:{paddingRight:5,paddingLeft:5,borderRadius:10,backgroundColor:"#000000",position:"absolute",width:20,height:20,top:-5,right:-5},sec:{marginTop:32},secHead:{marginBottom:12,rowGap:12,columnGap:12},secTitle:{},secSub:{},refs:{rowGap:12,columnGap:12},ref:{paddingTop:16,paddingRight:16,paddingBottom:16,paddingLeft:16,borderRadius:20,backgroundColor:"#f3f3f3",columnGap:12},refName:{rowGap:4,columnGap:6},refNameLink:{},rx:{paddingRight:7,paddingLeft:7,borderRadius:999,backgroundColor:"#ffc3bc",height:20},refMeta:{marginTop:2},when:{},whenSmall:{},whenBig:{marginTop:4,marginBottom:2},whenPausedBig:{marginTop:4,marginBottom:2},vet:{marginTop:12,rowGap:8,columnGap:8},vetIcon:{width:18,height:18},vetLeaf:{width:18,height:18},vetSmall:{},pips:{rowGap:3,columnGap:3},pip:{borderRadius:3,backgroundColor:"#ca4463",width:6,height:6},note:{marginTop:8},noteButton:{},acts:{marginTop:12,rowGap:8,columnGap:8},btn:{paddingRight:12,paddingLeft:12,borderRadius:999,backgroundColor:"#ffffff",minHeight:40,rowGap:6,columnGap:6},btnIcon:{width:16,height:16},btnGo:{paddingRight:12,paddingLeft:12,borderRadius:999,backgroundColor:"#07c168",minHeight:40,rowGap:6,columnGap:6},btnInk:{paddingRight:12,paddingLeft:12,borderRadius:999,backgroundColor:"#000000",minHeight:40,rowGap:6,columnGap:6},shelf:{paddingRight:16,marginRight:-16,paddingBottom:4,paddingLeft:16,marginLeft:-16,rowGap:12,columnGap:12},item:{rowGap:2,columnGap:2,width:128},itemImg:{marginBottom:8,borderRadius:20,backgroundColor:"#f3f3f3",aspectRatio:1},itemPhoto:{paddingTop:12,paddingRight:12,paddingBottom:16,paddingLeft:12},itemPrice:{},itemName:{},itemMeta:{},itemMetaDue:{},more:{paddingTop:14,paddingRight:14,paddingBottom:14,paddingLeft:14,borderRadius:20,backgroundColor:"#ffffff",aspectRatio:1,width:128},moreIcon:{width:24,height:24},moreLabel:{},stepper:{borderRadius:18,backgroundColor:"#ffffff",position:"absolute",width:104,height:36,right:8,bottom:8},stepperButton:{borderRadius:18,width:36,height:36},stepperIcon:{width:18,height:18},stepperPlusOut:{borderRadius:18,width:36,height:36},past:{rowGap:24,columnGap:24},order:{},orderTop:{rowGap:12,columnGap:12},orderMeta:{},orderDay:{},orderTotal:{},shots:{marginTop:8,rowGap:8,columnGap:8},shot:{paddingTop:8,paddingRight:8,paddingBottom:8,paddingLeft:8,borderRadius:14,backgroundColor:"#f3f3f3",width:64,height:64},shotPhoto:{width:48,height:48},orderActs:{marginTop:12,rowGap:8,columnGap:8},orderBtn:{paddingRight:12,paddingLeft:12,borderRadius:999,backgroundColor:"#f3f3f3",minHeight:40,rowGap:6,columnGap:6},help:{paddingTop:16,marginTop:32,paddingRight:24,paddingBottom:16,paddingLeft:24,borderWidth:1,borderColor:"#e4e4e4",borderRadius:20,backgroundColor:"#ffffff",rowGap:12,columnGap:12},helpIcon:{width:22,height:22},helpChevron:{width:20,height:20},helpLabel:{},legal:{marginTop:32},legalText:{},backdrop:{backgroundColor:"rgba(0, 0, 0, 0.32)"},sheet:{paddingBottom:34,borderTopLeftRadius:28,borderTopRightRadius:28,backgroundColor:"#ffffff"},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},sheetTitle:{},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},sheetItem:{rowGap:12,columnGap:12},sheetItemText:{},sheetItemName:{},sheetSayWarn:{marginTop:16,rowGap:12,columnGap:12},sheetSayIcon:{marginTop:2,width:20,height:20},sheetActs:{marginTop:24,paddingBottom:16,rowGap:8,columnGap:8},sheetGo:{paddingRight:12,paddingLeft:12,borderRadius:999,backgroundColor:"#000000",minHeight:50,rowGap:6,columnGap:6},sheetKeep:{paddingRight:12,paddingLeft:12,borderRadius:999,backgroundColor:"#f3f3f3",minHeight:50,rowGap:6,columnGap:6},sheetSay:{marginTop:16},choices:{marginTop:16,rowGap:8,columnGap:8},choice:{paddingTop:14,paddingRight:16,paddingBottom:14,paddingLeft:16,borderWidth:1,borderColor:"#e4e4e4",borderRadius:10,backgroundColor:"#ffffff",rowGap:12,columnGap:12},choiceOn:{paddingTop:14,paddingRight:16,paddingBottom:14,paddingLeft:16,borderWidth:1,borderColor:"#10462e",borderRadius:10,backgroundColor:"#ffffff",rowGap:12,columnGap:12},radioOff:{borderWidth:1,borderColor:"#819d90",borderRadius:10,backgroundColor:"#ffffff",width:20,height:20,marginRight:2},radioOn:{borderWidth:6,borderColor:"#10462e",borderRadius:10,backgroundColor:"#ffffff",width:20,height:20,marginRight:2},choiceTitle:{},choiceEnd:{},stepperIn:{borderRadius:18,backgroundColor:"#000000",position:"absolute",width:104,height:36,right:8,bottom:8},stepperCount:{},bar:{paddingTop:8,paddingRight:8,paddingBottom:8,paddingLeft:10,borderRadius:22,backgroundColor:"#ffffff",minHeight:60,rowGap:10,columnGap:10},thumbs:{paddingRight:4},thumb:{paddingTop:3,paddingRight:3,paddingBottom:3,paddingLeft:3,borderRadius:12,backgroundColor:"#f3f3f3",width:40,height:40},thumbCount:{paddingRight:5,paddingLeft:5,borderRadius:10,backgroundColor:"#000000",position:"absolute",width:20,height:20,top:-4,right:-4},barSum:{rowGap:2,columnGap:2},barTotal:{},barSub:{},barGo:{paddingRight:18,paddingLeft:18,borderRadius:999,backgroundColor:"#07c168",minHeight:44,rowGap:6,columnGap:6}},CO_TEXT={body:{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},head:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},headTitle:{color:"#000000",fontSize:26,fontWeight:"700",lineHeight:27.296875,letterSpacing:-.78},headLine:{color:"#6b6b6b",fontSize:14,fontWeight:"400",lineHeight:18.890625},way:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},wayTitle:{color:"#000000",fontSize:24,fontWeight:"700",lineHeight:26.390625,letterSpacing:-.6},tl:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},tlRow:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},date:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:17,fontVariant:["tabular-nums"]},dateSmall:{color:"#6b6b6b",fontSize:12,fontWeight:"700",lineHeight:12,letterSpacing:.48,textTransform:"uppercase",fontVariant:["tabular-nums"]},dateBig:{color:"#000000",fontSize:22,fontWeight:"700",lineHeight:22,letterSpacing:-.66,fontVariant:["tabular-nums"]},dateToday:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:17,fontVariant:["tabular-nums"]},dateTodaySmall:{color:"#ffffff",fontSize:12,fontWeight:"700",lineHeight:12,letterSpacing:.48,textTransform:"uppercase",fontVariant:["tabular-nums"]},dateTodayBig:{color:"#ffffff",fontSize:22,fontWeight:"700",lineHeight:22,letterSpacing:-.66,fontVariant:["tabular-nums"]},dateOutSmall:{color:"#c03410",fontSize:12,fontWeight:"700",lineHeight:12,letterSpacing:.48,textTransform:"uppercase",fontVariant:["tabular-nums"]},dateOutBig:{color:"#c03410",fontSize:22,fontWeight:"700",lineHeight:22,letterSpacing:-.66,fontVariant:["tabular-nums"]},say:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},sayTitle:{color:"#000000",fontSize:16,fontWeight:"700",lineHeight:20,letterSpacing:-.16},sayLine:{color:"#6b6b6b",fontSize:15,fontWeight:"400",lineHeight:20.25},sayOutTitle:{color:"#c03410",fontSize:16,fontWeight:"700",lineHeight:20,letterSpacing:-.16},run:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},pkg:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},pkgWhen:{color:"#000000",fontSize:16,fontWeight:"700",lineHeight:20,letterSpacing:-.16},pkgWhat:{color:"#6b6b6b",fontSize:14,fontWeight:"400",lineHeight:18.890625},pkgNow:{color:"#000000",fontSize:14,fontWeight:"500",lineHeight:18.1875},pkgDot:{color:"#000000",fontSize:14,fontWeight:"500",lineHeight:18.1875},steps:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},step:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},stepDone:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},tile:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},tileCount:{color:"#ffffff",fontSize:12,fontWeight:"700",lineHeight:12},sec:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},secHead:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},secTitle:{color:"#000000",fontSize:20,fontWeight:"700",lineHeight:23,letterSpacing:-.4},secSub:{color:"#6b6b6b",fontSize:13,fontWeight:"400",lineHeight:20.140625},refs:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},ref:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},refName:{color:"#000000",fontSize:16,fontWeight:"700",lineHeight:20,letterSpacing:-.16},refNameLink:{color:"#000000",fontSize:16,fontWeight:"700",lineHeight:20,letterSpacing:-.16},rx:{color:"#000000",fontSize:12,fontWeight:"700",lineHeight:12,letterSpacing:-.16},refMeta:{color:"#6b6b6b",fontSize:13,fontWeight:"400",lineHeight:17.546875},when:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:17,textAlign:"right"},whenSmall:{color:"#6b6b6b",fontSize:12,fontWeight:"700",lineHeight:12,letterSpacing:.48,textTransform:"uppercase",textAlign:"right"},whenBig:{color:"#000000",fontSize:24,fontWeight:"700",lineHeight:24,letterSpacing:-.84,textAlign:"right",fontVariant:["tabular-nums"]},whenPausedBig:{color:"#6b6b6b",fontSize:17,fontWeight:"700",lineHeight:17,letterSpacing:-.17,textAlign:"right",fontVariant:["tabular-nums"]},vet:{color:"#000000",fontSize:13,fontWeight:"400",lineHeight:17.546875},vetIcon:{color:"#ca4463",fontSize:13,fontWeight:"400",lineHeight:17.546875},vetLeaf:{color:"#16864a",fontSize:13,fontWeight:"400",lineHeight:17.546875},vetSmall:{color:"#6b6b6b",fontSize:12,fontWeight:"400",lineHeight:16.1875},pips:{color:"#000000",fontSize:13,fontWeight:"400",lineHeight:17.546875},pip:{color:"#000000",fontSize:13,fontWeight:"400",lineHeight:17.546875},note:{color:"#000000",fontSize:13,fontWeight:"500",lineHeight:17.546875},noteButton:{color:"#000000",fontSize:13,fontWeight:"700",lineHeight:17.546875,textDecorationLine:"underline",textAlign:"center"},acts:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},btn:{color:"#000000",fontSize:14,fontWeight:"700",lineHeight:21.6875,textAlign:"center"},btnIcon:{color:"#ffffff",fontSize:14,fontWeight:"700",lineHeight:21.6875},btnGo:{color:"#000000",fontSize:14,fontWeight:"700",lineHeight:21.6875,textAlign:"center"},btnInk:{color:"#ffffff",fontSize:14,fontWeight:"700",lineHeight:21.6875},shelf:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},item:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},itemImg:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},itemPhoto:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},itemPrice:{color:"#000000",fontSize:16,fontWeight:"700",lineHeight:24.796875,letterSpacing:-.16,fontVariant:["tabular-nums"]},itemName:{color:"#000000",fontSize:14,fontWeight:"500",lineHeight:18.1875},itemMeta:{color:"#6b6b6b",fontSize:12,fontWeight:"400",lineHeight:16.1875},itemMetaDue:{color:"#b25e05",fontSize:12,fontWeight:"500",lineHeight:16.1875},more:{color:"#000000",fontSize:15,fontWeight:"700",lineHeight:18.75},moreIcon:{color:"#b6407f",fontSize:15,fontWeight:"700",lineHeight:18.75},moreLabel:{color:"#000000",fontSize:15,fontWeight:"700",lineHeight:18.75},stepper:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},stepperButton:{color:"#000000",fontSize:13.333,fontWeight:"400",textAlign:"center"},stepperIcon:{color:"#000000",fontSize:13.333,fontWeight:"400",textAlign:"center"},stepperPlusOut:{color:"#000000",fontSize:13.333,fontWeight:"400",textAlign:"center"},past:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},order:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},orderTop:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},orderMeta:{color:"#6b6b6b",fontSize:13,fontWeight:"400",lineHeight:17.546875},orderDay:{color:"#000000",fontSize:16,fontWeight:"700",lineHeight:20,letterSpacing:-.16},orderTotal:{color:"#000000",fontSize:16,fontWeight:"700",lineHeight:24.796875,fontVariant:["tabular-nums"]},shots:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},shot:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375,textDecorationLine:"underline"},shotPhoto:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},orderActs:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},orderBtn:{color:"#000000",fontSize:14,fontWeight:"700",lineHeight:21.6875},help:{color:"#10462e",fontSize:15,fontWeight:"700",lineHeight:20.25},helpIcon:{color:"#10462e",fontSize:15,fontWeight:"700",lineHeight:20.25},helpChevron:{color:"#819d90",fontSize:15,fontWeight:"700",lineHeight:20.25},helpLabel:{color:"#10462e",fontSize:15,fontWeight:"700",lineHeight:20.25},legal:{color:"#6b6b6b",fontSize:13,fontWeight:"400",lineHeight:20.796875,textAlign:"center"},legalText:{color:"#6b6b6b",fontSize:13,fontWeight:"400",lineHeight:20.796875,textAlign:"center"},backdrop:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},sheet:{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},sheetTitle:{color:"#10462e",fontSize:18,fontWeight:"700",lineHeight:22.5,letterSpacing:-.36},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},sheetItem:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},sheetItemText:{color:"#6b6b6b",fontSize:13,fontWeight:"400",lineHeight:17.546875},sheetItemName:{color:"#000000",fontSize:16,fontWeight:"700",lineHeight:21.59375},sheetSayWarn:{color:"#000000",fontSize:15,fontWeight:"400",lineHeight:21.75},sheetSayIcon:{color:"#b25e05",fontSize:15,fontWeight:"400",lineHeight:21.75},sheetActs:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},sheetGo:{color:"#ffffff",fontSize:16,fontWeight:"700",lineHeight:24.796875,textAlign:"center"},sheetKeep:{color:"#000000",fontSize:16,fontWeight:"700",lineHeight:24.796875,textAlign:"center"},sheetSay:{color:"#000000",fontSize:15,fontWeight:"400",lineHeight:21.75},choices:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},choice:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},choiceOn:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},radioOff:{color:"#000000",fontSize:13.333,fontWeight:"400"},radioOn:{color:"#000000",fontSize:13.333,fontWeight:"400"},choiceTitle:{color:"#10462e",fontSize:17,fontWeight:"700",lineHeight:22.09375},choiceEnd:{color:"#6b6b6b",fontSize:13,fontWeight:"400",lineHeight:20.140625},stepperIn:{color:"#ffffff",fontSize:17,fontWeight:"400",lineHeight:26.34375},stepperCount:{color:"#ffffff",fontSize:15,fontWeight:"700",lineHeight:23.25,textAlign:"center",fontVariant:["tabular-nums"]},bar:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},thumbs:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},thumb:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},thumbCount:{color:"#ffffff",fontSize:12,fontWeight:"700",lineHeight:12,fontVariant:["tabular-nums"]},barSum:{color:"#000000",fontSize:17,fontWeight:"400",lineHeight:26.34375},barTotal:{color:"#000000",fontSize:17,fontWeight:"700",lineHeight:18.6875,letterSpacing:-.17,fontVariant:["tabular-nums"]},barSub:{color:"#6b6b6b",fontSize:12,fontWeight:"400",lineHeight:15},barGo:{color:"#000000",fontSize:15,fontWeight:"700",lineHeight:23.25}},CO_DECOR={body:{font:"sans"},subtabs:{font:"sans",lineBottom:{width:1,color:"#e4e4e4"}},subtab:{font:"sans"},subtabCurrent:{font:"sans",insetBottom:{width:3,color:"#07c168"}},head:{font:"sans"},headTitle:{font:"sans"},headLine:{font:"sans",wrap:"pretty"},way:{font:"sans"},wayTitle:{font:"sans",wrap:"pretty"},tl:{font:"sans"},tlRow:{font:"sans"},date:{font:"sans",wrap:"pretty"},dateSmall:{font:"mono",wrap:"pretty"},dateBig:{font:"sans",wrap:"pretty"},dateToday:{font:"sans",wrap:"pretty"},dateTodaySmall:{font:"mono",wrap:"pretty"},dateTodayBig:{font:"sans",wrap:"pretty"},dateOutSmall:{font:"mono",wrap:"pretty"},dateOutBig:{font:"sans",wrap:"pretty"},say:{font:"sans",wrap:"pretty"},sayTitle:{font:"sans",wrap:"pretty"},sayLine:{font:"sans",wrap:"pretty"},sayOutTitle:{font:"sans",wrap:"pretty"},run:{font:"sans"},pkg:{font:"sans"},pkgWhen:{font:"sans",wrap:"pretty"},pkgWhat:{font:"sans",wrap:"pretty"},pkgNow:{font:"sans",wrap:"pretty"},pkgDot:{font:"sans",wrap:"pretty"},steps:{font:"sans"},step:{font:"sans"},stepDone:{font:"sans"},tile:{font:"sans"},tileCount:{font:"sans"},sec:{font:"sans"},secHead:{font:"sans"},secTitle:{font:"sans",wrap:"pretty"},secSub:{font:"sans"},refs:{font:"sans"},ref:{font:"sans"},refName:{font:"sans",wrap:"pretty"},refNameLink:{font:"sans",wrap:"pretty"},rx:{font:"mono",wrap:"pretty"},refMeta:{font:"sans",wrap:"pretty"},when:{font:"sans",wrap:"pretty"},whenSmall:{font:"mono",wrap:"pretty"},whenBig:{font:"sans",wrap:"pretty"},whenPausedBig:{font:"sans",wrap:"pretty"},vet:{font:"sans",wrap:"pretty"},vetIcon:{font:"sans",wrap:"pretty"},vetLeaf:{font:"sans",wrap:"pretty"},vetSmall:{font:"sans",wrap:"pretty"},pips:{font:"sans",wrap:"pretty"},pip:{font:"sans",wrap:"pretty"},note:{font:"sans",wrap:"pretty"},noteButton:{font:"sans",underlineOffset:3,wrap:"pretty"},acts:{font:"sans"},btn:{font:"sans"},btnIcon:{font:"sans"},btnGo:{font:"sans"},btnInk:{font:"sans"},shelf:{font:"sans"},item:{font:"sans"},itemImg:{font:"sans"},itemPhoto:{font:"sans"},itemPrice:{font:"sans",wrap:"pretty"},itemName:{font:"sans",wrap:"balance"},itemMeta:{font:"sans",wrap:"pretty"},itemMetaDue:{font:"sans",wrap:"pretty"},more:{font:"sans",ring:{width:1.5,color:"#f3f3f3"}},moreIcon:{font:"sans"},moreLabel:{font:"sans"},stepper:{font:"sans"},stepperButton:{font:"sans"},stepperIcon:{font:"sans"},stepperPlusOut:{font:"sans"},past:{font:"sans"},order:{font:"sans"},orderTop:{font:"sans"},orderMeta:{font:"sans",wrap:"pretty"},orderDay:{font:"sans",wrap:"pretty"},orderTotal:{font:"sans"},shots:{font:"sans"},shot:{font:"sans"},shotPhoto:{font:"sans"},orderActs:{font:"sans"},orderBtn:{font:"sans"},help:{font:"sans"},helpIcon:{font:"sans"},helpChevron:{font:"sans"},helpLabel:{font:"sans"},legal:{font:"sans"},legalText:{font:"sans",wrap:"balance"},backdrop:{font:"sans"},sheet:{font:"sans"},sheetGrab:{font:"sans"},sheetGrabBar:{font:"sans"},sheetHead:{font:"sans"},sheetTitle:{font:"sans",wrap:"pretty"},sheetClose:{font:"sans"},sheetCloseIcon:{font:"sans"},sheetBody:{font:"sans"},sheetItem:{font:"sans"},sheetItemText:{font:"sans",wrap:"pretty"},sheetItemName:{font:"sans",wrap:"pretty"},sheetSayWarn:{font:"sans",wrap:"pretty"},sheetSayIcon:{font:"sans",wrap:"pretty"},sheetActs:{font:"sans"},sheetGo:{font:"sans"},sheetKeep:{font:"sans"},sheetSay:{font:"sans",wrap:"pretty"},choices:{font:"sans"},choice:{font:"sans"},choiceOn:{font:"sans"},radioOff:{font:"sans"},radioOn:{font:"sans"},choiceTitle:{font:"sans"},choiceEnd:{font:"sans"},stepperIn:{font:"sans"},stepperCount:{font:"sans"},bar:{font:"sans",drop:{x:0,y:10,blur:30,spread:0,color:"rgba(0, 0, 0, 0.16)"}},thumbs:{font:"sans"},thumb:{font:"sans"},thumbCount:{font:"sans"},barSum:{font:"sans",wrap:"pretty"},barTotal:{font:"sans",wrap:"pretty"},barSub:{font:"sans",wrap:"pretty"},barGo:{font:"sans"}},CO_ICONS={chevron:{size:20,uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAQAAACQ9RH5AAABfklEQVR4Ae3BPWoWQQAA0LeZz9gMeA1rywFzBsVSELzDbpEUgj9osVuJN8gF7Af1ChIsxRsIgm1iJMWw7cxsCsF9z2632+3+eUG9p14bfHMrglrPnLvviYMvbkFQ59hH99w4EWWbHal1rRjNNgvqXPnlkSK547NNglpfRUlxIso2COplUVIkUdYtaJFFSZFEWaegTRYlRRJlXYJWWZQUSZR1CNplUVIkUdYs6JFFSZFEWaOgTxYlRRJlTYJeWZQUSZQ1CPplUVIkUVYt2CKLkiKJskrBNtldDxXJDxeqBFt9EiXFAx/8UeHIdr9dKq5VOtjqrVOrFy5VOdhmNlotzlUabDEbrRaTaoN+s9FqMWkw6DUbrRaTJoM+s9FqMWk06DEbrRaTZoN2s9FqMekwaDUbrRaTLoM2s9FqMek0aDEbrRaTboN6s9FqMdngoNZzo9U7ZzY5UufYS6vFmY2O1LpWLCabBXWu/PTYjTdO3YKg1oXvDl55b7fb7Xb/ib+2W04he97hEgAAAABJRU5ErkJggg=="},minus:{size:18,uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADYAAAA2CAQAAAAmTKJWAAAAVklEQVR4Ae3BsRFAQBBA0X+bXjlXlJhCiHWlFgUYuRWYY0T/PSRJkqQHCncqjaDfwcZOUshGZt6bWLgIsoEvDCTBj4Js5QsrSeFOpRH0O9jYkSRJkrqcfrkKCu2Ez5QAAAAASUVORK5CYII="},plus:{size:18,uri:"data:image/png;base64,iVBORw0KGg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qypJgFiRZdUDnkGjUayaD4nFVlgSzIMmqvTr7RaNeMxkU16myJJgFSVbt0dknGvWayaBYUmVJMAuSrFrUWRaNes1kUOxTZUkwC5KsWtBZ9q2o+c0bfnFIlSXBLEiy6lo7S971smbymrvWKM4VTXTbgp3DJoNireJccdDOkk/87NKvXldsUZwrLv3gcwtOLHvORx54zx+2e8EHeN/vjo6Ojo7+t/4BB1bK7cyUDzAAAAAASUVORK5CYII="},check:{size:16,uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAQAAAD9CzEMAAABVUlEQVR4Ae3Bu20UQQAA0Lde13AF0AQSLZglQISklphxAUAdyDOSJXIyMlIaOG0CLTAShBTgI1jGd+fznu+XgPY9k8nkP9A4pdfeWXjrizut0wk+mpl55oOFv86cSpAMGivOnUZ0rXrv1p0zpxBcq6JPVjSOFyRVlK1pHCtIqii7p3GcIKmibEPjGEFSRdkDGocLkirKHtQ4VJBUUTaicZggqaJsVGvVhc+C377ZLkqqKNuitXTuqydmXip644KkirKtzqxaGNy4NCZIqih7RGvpVvHKoPPT3KYoqa5kj2qt+q7oDJ4reuuCpIqyHbTW9YrOoFP0loKkirKdtO7rFZ1Bp+gNgqSKsh21NvWKzqBT9AiSKsp21npIr+gMOsVTSRVle2iMeSPbFGV7aY2Z++XCuivZnlrj5orOUpTtrbVNr+gMouwAre16P7zApRuTyWTyz/oDUB1ZN9kNGUEAAAAASUVORK5CYII="},pill:{size:18,uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADYAAAA2CAQAAAAmTKJWAAAEFUlEQVR4Ae3BXaibZwEA4Cffdzp2oVSs23Elk3oSD9vAriUXxqYH8Wf+MMSKFv9uBMGLiYN07UwV/LmwUZhn8UKLIHMWwbOjsGmpK1OXUn8YKJvo2I02Lptx7XSjdqsr1EWT8+7dyUmTky+nXonP439Wzn/Ddu8yZ9YrPe2vHnbMOSPkXK5bVW0z7KjPetSQnMux4G5zxrnLp/3TgNTGfcy9thhv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WqEkzNgmlKzXUNJIpyHhkFc1M+GwMKpdA0kjZV3CJs1VbRaKBjSQ1Ldan7DbpDz22ycMKqorqW+HlTIV/fLaoirTYURdST291gnPmZbXEWPCBmvUkdRWMC5MG9KKsmPCuDqS2jbqEQZUtGLGNqFkvZqSWjoNCYe8plUTDguj2tWQ1FLWJWzSuqrNQtGAGpKlVusTdpt0KvbbJwwqWiJZaoeVMhX9ajsofKu2LaoyHUYs0ea/eg0Lz3pPbd+72EX+8IZRx9Xymy4lmWvs9bNFChYr+FaPzLRLVZy6TlO6ZL50vUWSxTbqER5RcTpmbBNK1lskWajTkDBpl9M14bAwqt0CyUJlXcImp69qs1A0YIHkpNX6hF0OORP22ycMKvpXm5Ne0SNTcYc/NTZoj4ec64DGvvKAZM5KF3rLCUnotU4YNq2xWw3r1u1pd2nsiDFhgzVOSMKY8KOnNLNWKGmm7Fdh3AlJ5l5XCQOaOygc1MyMslByt3lJpl+Y9LrmPvCSo4562duaG/edUDZvhTk3u0Lok8ff7tOKrT6SudKNPiOZc4Pwoa8th499JlxtVjLnEuFzy+VrodusZM5Pwk2Wy1phyqxkzjfCzZ50gTOtaNS1wudmrTBnrymrZMrKltNXvjMrmXPcY/4v281LMnu87f/wivfMaxPe0eE6Bcunali/4+YVLHS5rW60ynnOrN/94FMvmnLWWcvvH7Y60heQz4TcAAAAAElFTkSuQmCC"}};function useRnSeam(){return useOrdersV2Seam()}function useKit(){return useRnSeam().useKit()}function useShopNativeNav(){return useRnSeam().useShopNativeNav()}function useShopV3Host(){return useRnSeam().useShopV3Host()}function CareTabs(props){return react.createElement(useRnSeam().CareTabs,props)}function LoadFailed(props){return react.createElement(useRnSeam().LoadFailed,props)}function useCo(){let{options:options}=useKit(),fonts=options.fonts;return react.useMemo(()=>{let types=/* @__PURE__ */new Map,texts=/* @__PURE__ */new Map,type=key=>{let s=types.get(key);if(!s){let{fontWeight:fontWeight,...rest}=CO_TEXT[key];s={...rest,...fontFace(CO_DECOR[key].font==="mono"?fonts?.mono:fonts?.sans,fontWeight)},types.set(key,s)}return s};return{v:key=>CO_BOX[key],t(key){let s=texts.get(key);return s||(s={...CO_BOX[key],...type(key)},texts.set(key,s)),s},tx:type}},[fonts])}function coInk(key){return CO_TEXT[key].color??"#000000"}function coNum(key,prop){let v=CO_BOX[key][prop];return typeof v=="number"?v:0}function wrapProps(key){let w=CO_DECOR[key].wrap;return w?reactNative.Platform.OS==="web"?{style:{textWrap:w},props:{}}:{style:null,props:reactNative.Platform.OS==="ios"?{lineBreakStrategyIOS:"standard"}:{textBreakStrategy:"balanced"}}:{style:null,props:{}}}function CoT({k:k,bare:bare,style:style,lines:lines,role:role,children:children}){let co=useCo(),wrap=wrapProps(k);return react.createElement(reactNative.Text,{style:[bare?co.tx(k):co.t(k),wrap.style,style],...wrap.props,...lines?{numberOfLines:lines}:{},...role?{accessibilityRole:role}:{}},children)}function CoIcon({name:name,k:k,ink:ink,style:style}){let box=CO_BOX[k],size=box.width??CO_ICONS[name].size;return react.createElement(reactNative.Image,{source:{uri:CO_ICONS[name].uri},style:[{width:size,height:size,tintColor:coInk(ink??k)},box.marginTop?{marginTop:box.marginTop}:null,style],accessible:false,importantForAccessibility:"no",resizeMode:"contain"})}function CoRing({k:k}){let ring=CO_DECOR[k].ring;if(!ring)return null;let radius=CO_BOX[k].borderRadius??0,style=reactNative.Platform.OS==="web"?{boxShadow:`inset 0 0 0 ${ring.width}px ${ring.color}`}:{borderWidth:ring.width,borderColor:ring.color};return react.createElement(reactNative.View,{pointerEvents:"none",style:[{position:"absolute",top:0,right:0,bottom:0,left:0,borderRadius:radius},style]})}function coShadow(k){let d=CO_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},elevation:Math.round(d.blur/3)}:null}function CoTile({uri:uri,count:count,k:k="tile",bg:bg}){let co=useCo();/* @__PURE__ */
|
|
4
|
+
return jsxRuntime.jsxs(reactNative.View,{style:[co.v(k),bg?{backgroundColor:CO_BOX[bg].backgroundColor}:null],children:[uri?/* @__PURE__ */jsxRuntime.jsx(Photo,{uri:uri}):null,count&&count>1?/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:[co.v("tileCount"),CENTER],children:/* @__PURE__ */jsxRuntime.jsx(CoT,{k:"tileCount",bare:true,children:count})}):null]})}function Photo({uri:uri,style:style}){return react.createElement(reactNative.Image,{source:{uri:uri},resizeMode:"contain",accessible:false,accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants",style:[{width:"100%",height:"100%"},style]})}function bezier(x1,y1,x2,y2){let f=null;return t=>(f??=reactNative.Easing.bezier(x1,y1,x2,y2))(t)}var CENTER={alignItems:"center",justifyContent:"center"},ROW={flexDirection:"row",alignItems:"center"};var EASE=bezier(.23,1,.32,1),BAR_GAP=coNum("acts","rowGap"),BAR_SIDE=coNum("body","paddingLeft");function CartBar({bar:bar,copy:copy,onHeight:onHeight,onShown:onShown}){let co=useCo(),nav=useShopNativeNav(),host=useShopV3Host(),still=useSystemReducedMotion(void 0),rise=react.useRef(new reactNative.Animated.Value(0)).current,pop=react.useRef(new reactNative.Animated.Value(1)).current,was=react.useRef(null),up=bar!==null;if(react.useEffect(()=>{onShown?.(up),up||onHeight(0)},[up]),react.useEffect(()=>()=>onShown?.(false),[]),react.useEffect(()=>{let before=was.current;was.current=bar,!(!bar||still())&&(before?bar.count>before.count&&(pop.setValue(1),reactNative.Animated.sequence([reactNative.Animated.timing(pop,{toValue:1.12,duration:120,easing:reactNative.Easing.out(reactNative.Easing.ease),useNativeDriver:true}),reactNative.Animated.timing(pop,{toValue:1,duration:120,easing:reactNative.Easing.out(reactNative.Easing.ease),useNativeDriver:true})]).start()):(rise.setValue(1),reactNative.Animated.timing(rise,{toValue:0,duration:240,easing:EASE,useNativeDriver:true}).start()))},[bar]),!bar)return null;let height=e=>onHeight(e.nativeEvent.layout.height+BAR_GAP),thumbs=bar.thumbs.filter(t=>t!==null),offset=rise.interpolate({inputRange:[0,1],outputRange:[0,co.v("bar").minHeight+RISE_FROM]});/* @__PURE__ */
|
|
5
|
+
return jsxRuntime.jsxs(reactNative.Animated.View,{onLayout:height,style:[co.v("bar"),ROW,coShadow("bar"),{position:"absolute",left:BAR_SIDE,right:BAR_SIDE,bottom:host.bottomInset+BAR_GAP,transform:[{translateY:offset}]}],testID:"shop-orders-cartbar",children:[
|
|
6
|
+
/* @__PURE__ */jsxRuntime.jsxs(reactNative.Animated.View,{style:[co.v("thumbs"),ROW,THUMBS_BOX,{transform:[{scale:pop}]}],accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants",children:[thumbs.map((src,i)=>/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:[co.v("thumb"),i>0?{marginLeft:-18}:null],children:/* @__PURE__ */jsxRuntime.jsx(Photo,{uri:src})},`${i}:${src}`)),thumbs.length===0?/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:[co.v("thumb"),{opacity:0}]}):null,
|
|
7
|
+
/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:[co.v("thumbCount"),CENTER],children:/* @__PURE__ */jsxRuntime.jsx(CoT,{k:"thumbCount",bare:true,children:bar.count})})]}),
|
|
8
|
+
/* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:[co.v("barSum"),{flex:1,minWidth:0}],children:[bar.total?/* @__PURE__ */jsxRuntime.jsx(CoT,{k:"barTotal",children:bar.total}):null,
|
|
9
|
+
/* @__PURE__ */jsxRuntime.jsx(CoT,{k:"barSub",children:bar.sub})]}),
|
|
10
|
+
/* @__PURE__ */jsxRuntime.jsx(Press,{role:"link",onPress:()=>nav.go({name:"cart"}),style:[co.v("barGo"),CENTER],children:/* @__PURE__ */jsxRuntime.jsx(CoT,{k:"barGo",bare:true,children:copy.checkout})})]})}var THUMBS_BOX={height:44},RISE_FROM=24;var DRAWER=bezier(.32,.72,0,1),CLOSE_SLOP={top:4,bottom:4,left:4,right:4},FAILED_INK=coInk("dateOutBig"),FAILED_GAP=coNum("acts","marginTop")-coNum("sheetActs","rowGap"),CHOICE_TITLE={flex:1,minWidth:0,lineHeight:CO_TEXT.choice.lineHeight};function ManageSheet({copy:copy,open:open,busy:busy,failed:failed,onGo:onGo,onClose:onClose}){let co=useCo(),host=useShopV3Host(),still=useSystemReducedMotion(void 0),[shown,setShown]=react.useState(open),[visible,setVisible]=react.useState(open!==null);open&&open!==shown&&setShown(open),open&&!visible&&setVisible(true);let[pick,setPick]=react.useState(open?.sheet.picked??null);react.useEffect(()=>setPick(open?.sheet.picked??null),[open?.card.planId,open?.sheet.mode,open?.sheet.picked]);let height=react.useRef(600),y=react.useRef(new reactNative.Animated.Value(0)).current,busyRef=react.useRef(busy);busyRef.current=busy;let closeRef=react.useRef(onClose);closeRef.current=onClose,react.useEffect(()=>{if(open){if(still()){y.setValue(0);return}y.setValue(height.current),reactNative.Animated.timing(y,{toValue:0,duration:240,easing:DRAWER,useNativeDriver:true}).start();return}if(!visible)return;let done=()=>{setVisible(false),setShown(null)};if(still())return done();reactNative.Animated.timing(y,{toValue:height.current,duration:240,easing:DRAWER,useNativeDriver:true}).start(done)},[open]);let close=()=>{busyRef.current||closeRef.current()},pan=react.useRef(reactNative.PanResponder.create({onMoveShouldSetPanResponder:(_e,g)=>g.dy>4&&Math.abs(g.dy)>Math.abs(g.dx),onPanResponderMove:(_e,g)=>y.setValue(Math.max(0,g.dy)),onPanResponderRelease:(_e,g)=>{if(!busyRef.current&&(g.dy>height.current*.3||g.vy>.11)){closeRef.current();return}still()?y.setValue(0):reactNative.Animated.timing(y,{toValue:0,duration:240,easing:DRAWER,useNativeDriver:true}).start()},onPanResponderTerminate:()=>y.setValue(0)})).current,view=open??shown,card=view?.card,sheet=view?.sheet,onLayout=e=>{height.current=e.nativeEvent.layout.height};/* @__PURE__ */
|
|
11
|
+
return jsxRuntime.jsx(reactNative.Modal,{visible:visible,transparent:true,animationType:"none",onRequestClose:close,statusBarTranslucent:true,children:/* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:{flex:1,justifyContent:"flex-end"},children:[
|
|
12
|
+
/* @__PURE__ */jsxRuntime.jsx(reactNative.Pressable,{style:[{position:"absolute",top:0,right:0,bottom:0,left:0},co.v("backdrop")],onPress:close,accessibilityRole:"button",accessibilityLabel:copy.close}),
|
|
13
|
+
/* @__PURE__ */jsxRuntime.jsxs(reactNative.Animated.View,{style:[co.v("sheet"),{paddingBottom:Math.max(co.v("sheet").paddingBottom,host.screenBottomInset),transform:[{translateY:y}]}],accessibilityViewIsModal:true,onLayout:onLayout,testID:"shop-orders-sheet",children:[
|
|
14
|
+
/* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{...pan.panHandlers,children:[
|
|
15
|
+
/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:[co.v("sheetGrab"),CENTER],accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants",children:/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:co.v("sheetGrabBar")})}),
|
|
16
|
+
/* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:[co.v("sheetHead"),ROW,{justifyContent:"space-between"}],children:[
|
|
17
|
+
/* @__PURE__ */jsxRuntime.jsx(CoT,{k:"sheetTitle",role:"header",style:{flex:1,minWidth:0},children:sheet?.title??copy.sheetTitle}),
|
|
18
|
+
/* @__PURE__ */jsxRuntime.jsx(Press,{label:copy.close,onPress:close,hitSlop:CLOSE_SLOP,style:[co.v("sheetClose"),CENTER],children:/* @__PURE__ */jsxRuntime.jsx(CoIcon,{name:"x",k:"sheetCloseIcon"})})]})]}),card&&sheet?/* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:co.v("sheetBody"),children:[
|
|
19
|
+
/* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:[co.v("sheetItem"),ROW],children:[
|
|
20
|
+
/* @__PURE__ */jsxRuntime.jsx(CoTile,{uri:card.imageUrl,bg:"pkg"}),
|
|
21
|
+
/* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:{flex:1,minWidth:0},children:[
|
|
22
|
+
/* @__PURE__ */jsxRuntime.jsx(CoT,{k:"sheetItemName",children:card.name}),
|
|
23
|
+
/* @__PURE__ */jsxRuntime.jsx(CoT,{k:"sheetItemText",children:sheet.itemMeta})]})]}),sheet.mode==="change"?/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:co.v("choices"),accessibilityRole:"radiogroup",accessibilityLabel:copy.changeTitle,children:sheet.choices.map(c=>{let on=pick===c.key;/* @__PURE__ */
|
|
24
|
+
return jsxRuntime.jsxs(Press,{role:"radio",selected:on,label:c.price?`${c.label}, ${c.price}`:c.label,onPress:()=>setPick(c.key),style:[co.v(on?"choiceOn":"choice"),ROW],children:[
|
|
25
|
+
/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:co.v(on?"radioOn":"radioOff")}),
|
|
26
|
+
/* @__PURE__ */jsxRuntime.jsx(CoT,{k:"choiceTitle",bare:true,style:CHOICE_TITLE,children:c.label}),c.price?/* @__PURE__ */jsxRuntime.jsx(CoT,{k:"choiceEnd",bare:true,children:c.price}):null]},c.key)})}):null,sheet.say?sheet.say.warn?/* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:[co.v("sheetSayWarn"),{flexDirection:"row",alignItems:"flex-start"}],children:[
|
|
27
|
+
/* @__PURE__ */jsxRuntime.jsx(CoIcon,{name:"alert",k:"sheetSayIcon"}),
|
|
28
|
+
/* @__PURE__ */jsxRuntime.jsx(CoT,{k:"sheetSayWarn",bare:true,style:{flex:1,minWidth:0},children:sheet.say.text})]}):/* @__PURE__ */jsxRuntime.jsx(CoT,{k:"sheetSay",children:sheet.say.text}):null,
|
|
29
|
+
/* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:co.v("sheetActs"),children:[failed?/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{accessibilityRole:"alert",accessibilityLiveRegion:"polite",style:{marginBottom:FAILED_GAP},children:/* @__PURE__ */jsxRuntime.jsx(CoT,{k:"pkgNow",bare:true,style:{color:FAILED_INK},children:copy.saveFailed})}):null,sheet.go?/* @__PURE__ */jsxRuntime.jsx(Press,{disabled:busy,onPress:()=>onGo(sheet.mode==="change"?sheet.choices.find(c=>c.key===pick)??null:null),style:[co.v("sheetGo"),CENTER],children:/* @__PURE__ */jsxRuntime.jsx(CoT,{k:"sheetGo",bare:true,children:sheet.go})}):null,
|
|
30
|
+
/* @__PURE__ */jsxRuntime.jsx(Press,{onPress:close,style:[co.v("sheetKeep"),CENTER],children:/* @__PURE__ */jsxRuntime.jsx(CoT,{k:"sheetKeep",bare:true,children:copy.keep})})]})]}):null]})]})})}var EASE2=bezier(.23,1,.32,1),FAILED_INK2=coInk("dateOutBig"),AMBER=coInk("itemMetaDue"),PILL_SLOP={top:2,bottom:2,left:0,right:0},STEP_SLOP={top:4,bottom:4,left:4,right:4},NOTE_SLOP={top:12,bottom:12,left:4,right:4};function OrdersV2Screen({tabs:tabs,copy:copy,onHelp:onHelp,onCartBar:onCartBar}){let shop=useShop(),{client:client}=shop,co=useCo(),nav=useShopNativeNav(),data=useOrdersV2(copy),cart=useCart(client),ops=useCartOps(),kit=useKit(),change=usePlanChange(),[sheet,setSheet]=react.useState(null),[bump,setBump]=react.useState(null),[cardFailed,setCardFailed]=react.useState(null),[pulling,setPulling]=react.useState(false),[barHeight,setBarHeight]=react.useState(0),[entered,setEntered]=react.useState(false);react.useEffect(()=>{data.phase==="ready"&&setEntered(true)},[data.phase]);let reread=react.useRef(data.reread);reread.current=data.reread,react.useEffect(()=>appForeground(()=>{reread.current()}),[]);let run=react.useCallback(async(c,card)=>{let res=await change.run(c);return!res||!res.ok?false:(data.saved(res.value),change.reset(),setBump(b=>({planId:c.planId,n:(b?.n??0)+1})),(c.mode==="skip"||c.mode==="change"||c.mode==="pause")&&reactNative.AccessibilityInfo.announceForAccessibility?.(savedLine(c.mode,card,res.value,copy)),true)},[change,data,copy]),add=react.useCallback(inputs=>{for(let input of inputs)ops.add(client,input)},[client,ops]),view=data.view,open=sheet&&view?view.refills.find(r=>r.planId===sheet.planId)??null:null,sheetOpen=open&&sheet?{card:open,sheet:sheetView(sheet.mode,open,copy)}:null,content;return data.phase==="failed"?content=/* @__PURE__ */jsxRuntime.jsx(LoadFailed,{copy:shop.copy,thing:shop.copy.thingOrders,retry:data.retry}):data.phase==="loading"||!view?content=/* @__PURE__ */jsxRuntime.jsx(Loading,{copy:copy,title:shop.pets.length===1?copy.title(shop.pets[0].name):shop.copy.ordersTitle}):content=/* @__PURE__ */jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[
|
|
31
|
+
/* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:co.v("head"),children:[
|
|
32
|
+
/* @__PURE__ */jsxRuntime.jsx(CoT,{k:"headTitle",role:"header",children:view.title}),
|
|
33
|
+
/* @__PURE__ */jsxRuntime.jsx(CoT,{k:"headLine",children:view.autoLine})]}),
|
|
34
|
+
/* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:co.v("way"),children:[
|
|
35
|
+
/* @__PURE__ */jsxRuntime.jsx(CoT,{k:"wayTitle",role:"header",children:view.hero.headline}),view.hero.rows.length>0?/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:co.v("tl"),children:view.hero.rows.map((row,i)=>/* @__PURE__ */jsxRuntime.jsx(Mark,{index:i,play:!entered,children:/* @__PURE__ */jsxRuntime.jsx(HeroRow,{row:row,copy:copy,cart:cart,onRefill:input=>add([input])})},row.key))}):null]}),view.refills.length>0?/* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:co.v("sec"),children:[
|
|
36
|
+
/* @__PURE__ */jsxRuntime.jsx(SecHead,{title:copy.autoTitle,sub:copy.autoSub}),
|
|
37
|
+
/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:co.v("refs"),children:view.refills.map(card=>/* @__PURE__ */jsxRuntime.jsx(RefillCard,{card:card,copy:copy,busy:change.busy,failed:cardFailed===card.planId,bump:bump?.planId===card.planId?bump.n:0,onSheet:mode=>{change.reset(),setCardFailed(null),setSheet({mode:mode,planId:card.planId})},onNow:async mode=>{setCardFailed(null),await run({mode:mode,planId:card.planId},card)||setCardFailed(card.planId)}},card.planId))})]}):null,view.again?/* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:co.v("sec"),children:[
|
|
38
|
+
/* @__PURE__ */jsxRuntime.jsx(SecHead,{title:copy.buyAgainTitle,sub:copy.buyAgainSub}),
|
|
39
|
+
/* @__PURE__ */jsxRuntime.jsxs(reactNative.ScrollView,{horizontal:true,showsHorizontalScrollIndicator:false,style:{marginLeft:co.v("shelf").marginLeft,marginRight:co.v("shelf").marginRight},contentContainerStyle:[ROW,{alignItems:"flex-start",paddingLeft:co.v("shelf").paddingLeft,paddingRight:co.v("shelf").paddingRight,paddingBottom:co.v("shelf").paddingBottom,columnGap:co.v("shelf").columnGap}],snapToInterval:coNum("item","width")+coNum("shelf","columnGap"),decelerationRate:"fast",testID:"shop-orders-shelf",children:[view.again.map(item=>/* @__PURE__ */jsxRuntime.jsx(ShelfItem,{item:item,copy:copy,cart:cart,onAdd:input=>add([input])},item.offerId)),
|
|
40
|
+
/* @__PURE__ */jsxRuntime.jsxs(Press,{role:"link",onPress:()=>nav.go({name:"shop"}),style:[co.v("more"),{justifyContent:"space-between"}],children:[
|
|
41
|
+
/* @__PURE__ */jsxRuntime.jsx(CoIcon,{name:"bag",k:"moreIcon"}),
|
|
42
|
+
/* @__PURE__ */jsxRuntime.jsx(CoT,{k:"moreLabel",bare:true,children:view.moreLabel}),
|
|
43
|
+
/* @__PURE__ */jsxRuntime.jsx(CoRing,{k:"more"})]})]})]}):null,view.past.length>0?/* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:co.v("sec"),children:[
|
|
44
|
+
/* @__PURE__ */jsxRuntime.jsx(SecHead,{title:copy.pastTitle,sub:copy.pastSub}),
|
|
45
|
+
/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:co.v("past"),children:view.past.map(o=>/* @__PURE__ */jsxRuntime.jsx(PastOrder,{order:o,copy:copy,cart:cart,onAdd:add},o.orderId))})]}):null]}),/* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:{flex:1,backgroundColor:kit.v("subtabs").backgroundColor},testID:"shop-orders-v2",children:[tabs.length>1?/* @__PURE__ */jsxRuntime.jsx(CareTabs,{copy:shop.copy,current:"orders",tabs:tabs}):null,
|
|
46
|
+
/* @__PURE__ */jsxRuntime.jsxs(reactNative.ScrollView,{style:{flex:1},contentContainerStyle:[co.v("body"),{paddingBottom:kit.v("breaks").columnGap+barHeight}],refreshControl:/* @__PURE__ */jsxRuntime.jsx(reactNative.RefreshControl,{refreshing:pulling,tintColor:coInk("headLine"),colors:[coInk("headLine")],onRefresh:()=>{setPulling(true),data.reread().finally(()=>setPulling(false))}}),children:[
|
|
47
|
+
/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{accessibilityState:{busy:data.phase==="loading"},children:content}),onHelp?/* @__PURE__ */jsxRuntime.jsxs(Press,{role:"link",onPress:onHelp,style:[co.v("help"),ROW],children:[
|
|
48
|
+
/* @__PURE__ */jsxRuntime.jsx(CoIcon,{name:"help",k:"helpIcon"}),
|
|
49
|
+
/* @__PURE__ */jsxRuntime.jsx(CoT,{k:"helpLabel",bare:true,style:{flex:1,minWidth:0},children:copy.help}),
|
|
50
|
+
/* @__PURE__ */jsxRuntime.jsx(CoIcon,{name:"chevron",k:"helpChevron"})]}):null,
|
|
51
|
+
/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:co.v("legal"),children:/* @__PURE__ */jsxRuntime.jsx(CoT,{k:"legalText",children:copy.legal})})]}),
|
|
52
|
+
/* @__PURE__ */jsxRuntime.jsx(CartBar,{bar:data.bar,copy:copy,onHeight:setBarHeight,onShown:onCartBar}),
|
|
53
|
+
/* @__PURE__ */jsxRuntime.jsx(ManageSheet,{copy:copy,open:sheetOpen,busy:change.busy,failed:change.error!==null,onClose:()=>setSheet(null),onGo:async choice=>{if(!sheet||!open)return;await run({mode:sheet.mode,planId:sheet.planId,...choice?changeOf(open,choice):{}},open)&&setSheet(null)}})]})}function Mark({index:index,play:play,children:children}){let still=useSystemReducedMotion(void 0),t=react.useRef(new reactNative.Animated.Value(play?0:1)).current;react.useEffect(()=>{if(play){if(still()){t.setValue(1);return}reactNative.Animated.timing(t,{toValue:1,duration:240,delay:60+index*60,easing:EASE2,useNativeDriver:true}).start()}},[]);let translateY=t.interpolate({inputRange:[0,1],outputRange:[8,0]});/* @__PURE__ */
|
|
54
|
+
return jsxRuntime.jsx(reactNative.Animated.View,{style:{opacity:t,transform:[{translateY:translateY}]},children:children})}function SecHead({title:title,sub:sub}){let co=useCo();/* @__PURE__ */
|
|
55
|
+
return jsxRuntime.jsxs(reactNative.View,{style:[co.v("secHead"),{flexDirection:"row",alignItems:"baseline",justifyContent:"space-between"}],children:[
|
|
56
|
+
/* @__PURE__ */jsxRuntime.jsx(CoT,{k:"secTitle",role:"header",style:{flexShrink:1},children:title}),
|
|
57
|
+
/* @__PURE__ */jsxRuntime.jsx(CoT,{k:"secSub",children:sub})]})}function Pill({label:label,kind:kind="btn",icon:icon,disabled:disabled,role:role="button",onPress:onPress,style:style}){let co=useCo();/* @__PURE__ */
|
|
58
|
+
return jsxRuntime.jsx(reactNative.View,{style:style,children:/* @__PURE__ */jsxRuntime.jsxs(Press,{role:role,label:label,disabled:disabled===true,onPress:onPress,hitSlop:PILL_SLOP,style:[co.v(kind),ROW,{justifyContent:"center"}],children:[icon?/* @__PURE__ */jsxRuntime.jsx(CoIcon,{name:icon,k:"btnIcon",ink:kind}):null,
|
|
59
|
+
/* @__PURE__ */jsxRuntime.jsx(CoT,{k:kind,bare:true,children:label})]})})}function DateBlock({day:day,today:today,out:out}){let co=useCo(),box=today?"dateToday":"date",small=today?"dateTodaySmall":out?"dateOutSmall":"dateSmall",big=today?"dateTodayBig":out?"dateOutBig":"dateBig";return day?/* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:[co.v(box),{alignItems:"center"}],children:[
|
|
60
|
+
/* @__PURE__ */jsxRuntime.jsx(CoT,{k:small,bare:true,children:today??day.weekday}),
|
|
61
|
+
/* @__PURE__ */jsxRuntime.jsx(CoT,{k:big,bare:true,children:day.date}),
|
|
62
|
+
/* @__PURE__ */jsxRuntime.jsx(CoT,{k:small,bare:true,children:day.month})]}):/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:co.v(box)})}function HeroRow({row:row,copy:copy,cart:cart,onRefill:onRefill}){let co=useCo();return row.kind==="today"?/* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:[co.v("tlRow"),ROW],children:[
|
|
63
|
+
/* @__PURE__ */jsxRuntime.jsx(DateBlock,{day:row.day,today:copy.today}),
|
|
64
|
+
/* @__PURE__ */jsxRuntime.jsx(Say,{title:row.title,line:row.line,out:false})]}):row.kind==="package"?/* @__PURE__ */jsxRuntime.jsx(PackageRow,{row:row}):/* @__PURE__ */jsxRuntime.jsx(RunOutRow,{row:row,copy:copy,cart:cart,onRefill:onRefill})}function Say({title:title,line:line,out:out}){let co=useCo();/* @__PURE__ */
|
|
65
|
+
return jsxRuntime.jsxs(reactNative.View,{style:[co.v("say"),{flex:1,minWidth:0}],children:[
|
|
66
|
+
/* @__PURE__ */jsxRuntime.jsx(CoT,{k:out?"sayOutTitle":"sayTitle",bare:true,children:title}),line?/* @__PURE__ */jsxRuntime.jsx(CoT,{k:"sayLine",children:line}):null]})}function PackageRow({row:row}){let co=useCo(),nav=useShopNativeNav();/* @__PURE__ */
|
|
67
|
+
return jsxRuntime.jsxs(reactNative.View,{style:[co.v("tlRow"),ROW],children:[
|
|
68
|
+
/* @__PURE__ */jsxRuntime.jsx(DateBlock,{day:row.day}),
|
|
69
|
+
/* @__PURE__ */jsxRuntime.jsxs(Press,{role:"link",label:row.label,onPress:()=>nav.go({name:"order",orderId:row.orderId}),style:[co.v("pkg"),ROW,{flex:1,minWidth:0}],children:[
|
|
70
|
+
/* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:{flex:1,minWidth:0},children:[
|
|
71
|
+
/* @__PURE__ */jsxRuntime.jsx(CoT,{k:"pkgWhen",children:row.title}),row.what?/* @__PURE__ */jsxRuntime.jsx(CoT,{k:"pkgWhat",children:row.what}):null,row.steps?/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:[co.v("steps"),{flexDirection:"row"}],children:row.steps.map((s,i)=>/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:[co.v(s.done?"stepDone":"step"),{flex:1,overflow:"hidden"}],children:s.now?/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:[co.v("stepDone"),{width:"50%"}]}):null},i))}):null,row.status?/* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:[co.v("pkgNow"),ROW],children:[
|
|
72
|
+
/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:[co.v("pkgDot"),row.status.tone==="wait"?{backgroundColor:AMBER}:null]}),
|
|
73
|
+
/* @__PURE__ */jsxRuntime.jsx(CoT,{k:"pkgNow",bare:true,style:{flexShrink:1},children:row.status.text})]}):null]}),
|
|
74
|
+
/* @__PURE__ */jsxRuntime.jsx(CoTile,{uri:row.imageUrl,count:row.count})]})]})}function RunOutRow({row:row,copy:copy,cart:cart,onRefill:onRefill}){let co=useCo(),{client:client}=useShop(),nav=useShopNativeNav(),[busy,setBusy]=react.useState(false);if(!row.out)/* @__PURE__ */
|
|
75
|
+
return jsxRuntime.jsxs(reactNative.View,{style:[co.v("tlRow"),ROW],children:[
|
|
76
|
+
/* @__PURE__ */jsxRuntime.jsx(DateBlock,{day:row.day}),
|
|
77
|
+
/* @__PURE__ */jsxRuntime.jsx(Say,{title:row.title,line:row.line,out:false})]});let rx=row.refill,inCart=rx?cart.some(c=>c.rxId===rx.rxId):false,refill=async()=>{if(!rx||busy)return;setBusy(true);let input=await refillInput(client,rx);setBusy(false),input&&onRefill(input)};/* @__PURE__ */
|
|
78
|
+
return jsxRuntime.jsxs(reactNative.View,{style:[co.v("tlRow"),ROW],children:[
|
|
79
|
+
/* @__PURE__ */jsxRuntime.jsx(DateBlock,{day:row.day,out:true}),
|
|
80
|
+
/* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:[co.v("run"),ROW,{flex:1,minWidth:0}],children:[
|
|
81
|
+
/* @__PURE__ */jsxRuntime.jsx(Say,{title:row.title,line:row.line,out:true}),rx&&inCart?/* @__PURE__ */jsxRuntime.jsx(Pill,{kind:"btnInk",icon:"check",role:"link",label:copy.inCart,onPress:()=>nav.go({name:"cart"})}):rx?/* @__PURE__ */jsxRuntime.jsx(Pill,{kind:"btnGo",label:copy.refill,disabled:busy,onPress:()=>{refill()}}):null]})]})}function RefillCard({card:card,copy:copy,busy:busy,failed:failed,bump:bump,onSheet:onSheet,onNow:onNow}){let co=useCo(),nav=useShopNativeNav(),still=useSystemReducedMotion(void 0),settle=react.useRef(new reactNative.Animated.Value(1)).current;react.useEffect(()=>{bump===0||still()||(settle.setValue(0),reactNative.Animated.timing(settle,{toValue:1,duration:220,easing:EASE2,useNativeDriver:true}).start())},[bump]);let next=card.next,gap=co.v("ref").columnGap;/* @__PURE__ */
|
|
82
|
+
return jsxRuntime.jsxs(reactNative.View,{style:co.v("ref"),testID:`shop-orders-refill-${card.planId}`,children:[
|
|
83
|
+
/* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:[ROW,{columnGap:gap}],children:[
|
|
84
|
+
/* @__PURE__ */jsxRuntime.jsx(CoTile,{uri:card.imageUrl}),
|
|
85
|
+
/* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:{flex:1,minWidth:0},children:[
|
|
86
|
+
/* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:[co.v("refName"),ROW,{flexWrap:"wrap"}],children:[card.offerId?/* @__PURE__ */jsxRuntime.jsx(Press,{role:"link",hitSlop:NOTE_SLOP,onPress:()=>nav.go({name:"product",offerId:card.offerId}),children:/* @__PURE__ */jsxRuntime.jsx(CoT,{k:"refNameLink",bare:true,children:card.name})}):/* @__PURE__ */jsxRuntime.jsx(CoT,{k:"refName",bare:true,children:card.name}),card.rx?/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:[co.v("rx"),CENTER],children:/* @__PURE__ */jsxRuntime.jsx(CoT,{k:"rx",bare:true,children:copy.rxTag})}):null]}),
|
|
87
|
+
/* @__PURE__ */jsxRuntime.jsx(CoT,{k:"refMeta",children:card.meta})]}),card.paused?/* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:{alignItems:"flex-end"},children:[
|
|
88
|
+
/* @__PURE__ */jsxRuntime.jsx(CoT,{k:"whenSmall",bare:true,children:copy.autoRefill}),
|
|
89
|
+
/* @__PURE__ */jsxRuntime.jsx(CoT,{k:"whenPausedBig",children:copy.paused})]}):next?/* @__PURE__ */jsxRuntime.jsxs(reactNative.Animated.View,{style:{alignItems:"flex-end",opacity:settle,transform:[{translateY:settle.interpolate({inputRange:[0,1],outputRange:[6,0]})}]},children:[
|
|
90
|
+
/* @__PURE__ */jsxRuntime.jsx(CoT,{k:"whenSmall",bare:true,children:copy.ships}),
|
|
91
|
+
/* @__PURE__ */jsxRuntime.jsxs(CoT,{k:"whenBig",children:[next.month," ",next.date]}),
|
|
92
|
+
/* @__PURE__ */jsxRuntime.jsx(CoT,{k:"whenSmall",bare:true,children:next.weekday})]}):null]}),card.vet?/* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:[co.v("vet"),ROW],children:[
|
|
93
|
+
/* @__PURE__ */jsxRuntime.jsx(CoIcon,{name:"pill",k:"vetIcon"}),
|
|
94
|
+
/* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:{flex:1,minWidth:0},children:[
|
|
95
|
+
/* @__PURE__ */jsxRuntime.jsx(CoT,{k:"vet",bare:true,children:card.vet.line}),card.vet.small?/* @__PURE__ */jsxRuntime.jsx(CoT,{k:"vetSmall",children:card.vet.small}):null]}),card.vet.pips>0?/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:[co.v("pips"),{flexDirection:"row"}],accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants",children:Array.from({length:card.vet.pips},(_,i)=>/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:co.v("pip")},i))}):null]}):null,card.discount?/* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:[co.v("vet"),ROW],children:[
|
|
96
|
+
/* @__PURE__ */jsxRuntime.jsx(CoIcon,{name:"leaf",k:"vetLeaf"}),
|
|
97
|
+
/* @__PURE__ */jsxRuntime.jsx(CoT,{k:"vet",bare:true,style:{flex:1,minWidth:0},children:card.discount})]}):null,card.skipped?/* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:[co.v("note"),ROW,{flexWrap:"wrap"}],children:[
|
|
98
|
+
/* @__PURE__ */jsxRuntime.jsxs(CoT,{k:"note",bare:true,children:[card.skipped," "]}),
|
|
99
|
+
/* @__PURE__ */jsxRuntime.jsx(Press,{disabled:busy,hitSlop:NOTE_SLOP,onPress:()=>onNow("unskip"),children:/* @__PURE__ */jsxRuntime.jsx(CoT,{k:"noteButton",bare:true,children:copy.undo})})]}):null,failed?/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:co.v("note"),accessibilityRole:"alert",accessibilityLiveRegion:"polite",children:/* @__PURE__ */jsxRuntime.jsx(CoT,{k:"note",bare:true,style:{color:FAILED_INK2},children:copy.saveFailed})}):null,card.paused?/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:co.v("acts"),children:/* @__PURE__ */jsxRuntime.jsx(Pill,{kind:"btnGo",label:card.resumeLabel,disabled:busy,onPress:()=>onNow("resume")})}):/* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:[co.v("acts"),{flexDirection:"row"}],children:[
|
|
100
|
+
/* @__PURE__ */jsxRuntime.jsx(Pill,{label:copy.skip,onPress:()=>onSheet("skip"),style:{flex:1}}),
|
|
101
|
+
/* @__PURE__ */jsxRuntime.jsx(Pill,{label:copy.change,onPress:()=>onSheet("change"),style:{flex:1}}),
|
|
102
|
+
/* @__PURE__ */jsxRuntime.jsx(Pill,{label:copy.pause,onPress:()=>onSheet("pause"),style:{flex:1}})]})]})}function ShelfItem({item:item,copy:copy,cart:cart,onAdd:onAdd}){let co=useCo(),nav=useShopNativeNav(),{client:client}=useShop(),ops=useCartOps(),line=item.cartKey?cart.find(c=>c.key===item.cartKey):void 0,q=line?.quantity??0,plus=()=>{!item.add||q>=ops.max||onAdd(item.add)},minus=()=>{line&&(q>1?ops.setQuantity(client,line.key,q-1):ops.remove(client,line.key))};/* @__PURE__ */
|
|
103
|
+
return jsxRuntime.jsxs(reactNative.View,{style:co.v("item"),children:[
|
|
104
|
+
/* @__PURE__ */jsxRuntime.jsxs(Press,{role:"link",label:item.title,onPress:()=>nav.go({name:"product",offerId:item.offerId}),style:{rowGap:coNum("item","rowGap")},children:[
|
|
105
|
+
/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:[co.v("itemImg"),co.v("itemPhoto")],children:item.imageUrl?/* @__PURE__ */jsxRuntime.jsx(Photo,{uri:item.imageUrl}):null}),item.price?/* @__PURE__ */jsxRuntime.jsx(CoT,{k:"itemPrice",children:item.price}):null,
|
|
106
|
+
/* @__PURE__ */jsxRuntime.jsx(CoT,{k:"itemName",children:item.title}),item.meta?/* @__PURE__ */jsxRuntime.jsx(CoT,{k:item.due?"itemMetaDue":"itemMeta",children:item.meta}):null]}),item.add?/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:[{position:"absolute",top:0,left:0,width:coNum("item","width"),aspectRatio:1}],pointerEvents:"box-none",children:/* @__PURE__ */jsxRuntime.jsx(Stepper,{q:q,title:item.title,copy:copy,onPlus:plus,onMinus:minus})}):null]})}function Stepper({q:q,title:title,copy:copy,onPlus:onPlus,onMinus:onMinus}){let co=useCo(),still=useSystemReducedMotion(void 0),inside=q>0,closed=coNum("stepperButton","width"),full=coNum("stepperIn","width"),w=react.useRef(new reactNative.Animated.Value(inside?full:closed)).current;react.useEffect(()=>{let to=inside?full:closed;still()?w.setValue(to):reactNative.Animated.timing(w,{toValue:to,duration:200,easing:EASE2,useNativeDriver:false}).start()},[inside]);let box=co.v(inside?"stepperIn":"stepper"),ink=inside?"stepperIn":"stepperPlusOut";/* @__PURE__ */
|
|
107
|
+
return jsxRuntime.jsx(reactNative.Animated.View,{style:[box,{width:w,overflow:"hidden"}],children:/* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:[ROW,{position:"absolute",top:0,right:0,width:full,height:coNum("stepperIn","height")}],children:[
|
|
108
|
+
/* @__PURE__ */jsxRuntime.jsx(Press,{label:copy.oneLess(title),disabled:!inside,hitSlop:STEP_SLOP,onPress:onMinus,style:[co.v("stepperButton"),CENTER],children:/* @__PURE__ */jsxRuntime.jsx(CoIcon,{name:"minus",k:"stepperIcon",ink:ink})}),
|
|
109
|
+
/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:[{flex:1},CENTER],accessibilityLiveRegion:"polite",children:/* @__PURE__ */jsxRuntime.jsx(CoT,{k:"stepperCount",bare:true,children:q})}),
|
|
110
|
+
/* @__PURE__ */jsxRuntime.jsx(Press,{label:copy.addOne(title),hitSlop:STEP_SLOP,onPress:onPlus,style:[co.v("stepperButton"),CENTER],children:/* @__PURE__ */jsxRuntime.jsx(CoIcon,{name:"plus",k:"stepperIcon",ink:ink})})]})})}function PastOrder({order:order,copy:copy,cart:cart,onAdd:onAdd}){let co=useCo(),nav=useShopNativeNav(),{client:client,copy:shopCopy}=useShop(),[busy,setBusy]=react.useState(false),[failed,setFailed]=react.useState(false),all=allInCart(order.offerIds,cart),addAll=async()=>{if(busy)return;setBusy(true),setFailed(false);let inputs=await addAllInputs(client,order,cart);if(setBusy(false),!inputs){setFailed(true);return}onAdd(inputs)};/* @__PURE__ */
|
|
111
|
+
return jsxRuntime.jsxs(reactNative.View,{style:co.v("order"),children:[
|
|
112
|
+
/* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:[co.v("orderTop"),{flexDirection:"row",alignItems:"baseline",justifyContent:"space-between"}],children:[
|
|
113
|
+
/* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:{flexShrink:1},children:[order.day?/* @__PURE__ */jsxRuntime.jsx(CoT,{k:"orderDay",children:order.day}):null,
|
|
114
|
+
/* @__PURE__ */jsxRuntime.jsx(CoT,{k:"orderMeta",children:order.meta})]}),
|
|
115
|
+
/* @__PURE__ */jsxRuntime.jsx(CoT,{k:"orderTotal",children:order.total})]}),order.shots.length>0?/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:[co.v("shots"),{flexDirection:"row"}],children:order.shots.map(s=>/* @__PURE__ */jsxRuntime.jsx(Press,{role:"link",label:s.title,onPress:()=>nav.go({name:"product",offerId:s.offerId}),style:co.v("shot"),children:s.imageUrl?/* @__PURE__ */jsxRuntime.jsx(Photo,{uri:s.imageUrl}):null},s.offerId))}):null,failed?/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:co.v("note"),accessibilityRole:"alert",accessibilityLiveRegion:"polite",children:/* @__PURE__ */jsxRuntime.jsx(CoT,{k:"note",bare:true,style:{color:FAILED_INK2},children:shopCopy.loadFailed(shopCopy.thingOrders)})}):null,
|
|
116
|
+
/* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:[co.v("orderActs"),{flexDirection:"row"}],children:[order.addCount>0?all?/* @__PURE__ */jsxRuntime.jsx(Pill,{kind:"orderBtn",icon:"check",role:"link",label:copy.inTheCart,onPress:()=>nav.go({name:"cart"}),style:{flex:1}}):/* @__PURE__ */jsxRuntime.jsx(Pill,{kind:"btnGo",label:copy.addAll(order.addCount),disabled:busy,onPress:()=>{addAll()},style:{flex:1}}):null,
|
|
117
|
+
/* @__PURE__ */jsxRuntime.jsx(Pill,{kind:"orderBtn",role:"link",label:copy.receipt,onPress:()=>nav.go({name:"order",orderId:order.orderId}),style:{flex:1}})]})]})}function Loading({copy:copy,title:title}){let co=useCo(),today=ovDay(localToday()),block=/* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:[co.v("pkg"),ROW,{flex:1}],children:[
|
|
118
|
+
/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:{flex:1}}),
|
|
119
|
+
/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:[co.v("tile"),{opacity:0}]})]});/* @__PURE__ */
|
|
120
|
+
return jsxRuntime.jsxs(reactNative.View,{accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants",testID:"shop-orders-loading",children:[
|
|
121
|
+
/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:co.v("head"),children:/* @__PURE__ */jsxRuntime.jsx(CoT,{k:"headTitle",children:title})}),
|
|
122
|
+
/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:co.v("way"),children:/* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:co.v("tl"),children:[
|
|
123
|
+
/* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:[co.v("tlRow"),ROW],children:[
|
|
124
|
+
/* @__PURE__ */jsxRuntime.jsx(DateBlock,{day:today,today:copy.today}),block]}),
|
|
125
|
+
/* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:[co.v("tlRow"),ROW],children:[
|
|
126
|
+
/* @__PURE__ */jsxRuntime.jsx(DateBlock,{day:null}),block]})]})}),
|
|
127
|
+
/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:[co.v("sec"),co.v("refs")],children:[0,1].map(n=>/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:co.v("ref"),children:/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:[co.v("tile"),{opacity:0}]})},n))})]})}function Screen({seam:seam,...props}){return react.createElement(OrdersV2SeamProvider,{seam:seam},react.createElement(OrdersV2Screen,props))}var screen={kind:"everfur-shop-orders-v2",Screen:Screen},EverfurShopOrdersV2=screen;exports.EverfurShopOrdersV2=EverfurShopOrdersV2;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/*! @everfur/sdk. Copyright (c) 2026 Strand Health Inc. dba Everfur. All rights reserved. Use is subject to the Everfur SDK License: https://docs.everfur.com/license */
|
|
2
|
+
import { E as EverfurShopOrdersV2Screen } from '../../view.d-B31M8rCG.cjs';
|
|
3
|
+
|
|
4
|
+
/** Raph's Care > Orders v2 screen, for `EverfurShop`'s `ordersV2Screen` (with `ordersDesign="v2"`). */
|
|
5
|
+
declare const EverfurShopOrdersV2: EverfurShopOrdersV2Screen;
|
|
6
|
+
|
|
7
|
+
export { EverfurShopOrdersV2, EverfurShopOrdersV2Screen };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/*! @everfur/sdk. Copyright (c) 2026 Strand Health Inc. dba Everfur. All rights reserved. Use is subject to the Everfur SDK License: https://docs.everfur.com/license */
|
|
2
|
+
import { E as EverfurShopOrdersV2Screen } from '../../view.d-B31M8rCG.js';
|
|
3
|
+
|
|
4
|
+
/** Raph's Care > Orders v2 screen, for `EverfurShop`'s `ordersV2Screen` (with `ordersDesign="v2"`). */
|
|
5
|
+
declare const EverfurShopOrdersV2: EverfurShopOrdersV2Screen;
|
|
6
|
+
|
|
7
|
+
export { EverfurShopOrdersV2, EverfurShopOrdersV2Screen };
|