1import{K as c}from"./CmOKha68.js";function u(t,a){return t==null?"":a==null||a===t?c(t):`${c(t)} - ${c(a)}`}function o(t){return(t??0)>=1}function l(t,a){return`${a?"":"Up to "}${Math.round(t)}% OFF`}function _(t){const a=t.filter(e=>(e.price??0)>0),n=a.filter(e=>e.is_on_sale&&e.compare_at_price&&o(e.savings_percent));if(!n.length)return null;const i=a.map(e=>n.includes(e)?e.compare_at_price:e.price),r=Math.max(...n.map(e=>e.savings_percent??0)),s=n.length===a.length&&n.every(e=>e.savings_percent===r);return{originalDisplay:u(Math.min(...i),Math.max(...i)),badge:l(r,s)}}function f(t){return t?t.is_purchasable??t.is_in_stock??t.in_stock??!1:!1}function m(t){return t?.availability?t.availability:f(t)?"in_stock":"out_of_stock"}function p(t){return{in_stock:"https://schema.org/InStock",backorder:"https://schema.org/BackOrder",out_of_stock:"https://schema.org/OutOfStock"}[m(t)]}function g(t,a=99,n=1){const i=Math.floor(Number(t));return Number.isFinite(i)?Math.min(Math.max(i,n),Math.max(n,a)):n}function d(t,a,n,i){return(t?.items.find(s=>s.item_id===a)?.price??i)*n}export{m as a,d as b,g as c,l as d,p as e,u as f,o as h,f as i,_ as s};
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.