PageSourceSearch

https://ricebyrice.com/cdn/shopifycloud/checkout-web/assets/c1/redemption-promotions.DicFJEgz.js

js ricebyrice.com collected 2026-09-26 09:35:18 UTC 1,689 bytes, 1 lines download raw bytes

1import{g as P,v as d}from"./addresses-is-address-empty.Bn2lNY_L.js";import{S as f}from"./shared-buyer-consent.B_gDyRCR.js";import{c as m}from"./esnext-vendor.B9Da21W6.js";function v(e,n){const a=e?.replace(/\s/g,""),t=n?.replace(/\s/g,"");return t!==void 0&&a!==void 0&&a.length>t.length&&a.startsWith(t)}function A(e){if(!e)return!1;const n=P(e)??e;return f.includes(n)}function N(e,n,a=!1){e.paymentLines.value=d(e.paymentLines.peek(),n,a)}function R(e=[],n){const a=e.filter(o=>o.paymentMethod.giftCardPaymentMethod!=null),t=e.filter(o=>o.paymentMethod.redeemablePaymentMethod!=null);return[n,...a,...t]}const s=(e,n=2)=>Math.round(e*10**n)/10**n,l=e=>({...e,amount:s(e.amount,m(e.currencyCode))}),p={USD:.5,AED:2,ARS:.5,AUD:.5,BRL:.5,CAD:.5,CHF:.5,COP:.5,CZK:15,DKK:2.5,EUR:.5,GBP:.3,HKD:4,HUF:175,IDR:.5,ILS:.5,INR:.5,JPY:50,KRW:50,MXN:10,MYR:2,NOK:3,NZD:.5,PHP:.5,PLN:2,RON:2,RUB:.5,SEK:3,SGD:.5,THB:10,ZAR:.5},i=.5,y=e=>e?p[e]??i:i;function D(e,n){if(!n)return e;const a=[];let t=n;for(const o of e){if(t.amount<=0)break;const r=o.availableBalance;if(!r||r.amount<=0)continue;const u=r.amount>=t.amount?{...o,availableBalance:t}:o;a.push(u),t=l({amount:t.amount-u.availableBalance.amount,currencyCode:t.currencyCode})}return M(a,t)}function S(e,n){return!e||!n?e:D([e],n)[0]??null}function M(e,n){const a=y(n.currencyCode);if(n.amount<=0||n.amount>=a)return e;const t=m(n.currencyCode),o=[...e];let r=s(a-n.amount,t);for(;r>0;){const u=o.pop();if(!u)break;const c=u.availableBalance;c.amount>r?(o.push({...u,availableBalance:l({amount:c.amount-r,currencyCode:c.currencyCode})}),r=0):r=s(r-c.amount,t)}return o}export{s as a,l as b,S as c,D as d,y as g,A as i,R as r,v as s,N as u};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.