import{a as f}from"./chunk-CP4WO7MM.mjs";import{a as n}from"./chunk-IHX4EDUF.mjs";import{randomBytes as a}from"crypto";function E(r){let o="ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789",m=a(r),e="";for(let t=0;t<r;t++){let p=m[t]%o.length;e+=o[p]}return e}function b({domain:r,key:o,pretty:m,searchParams:e}){if(!r)return"";let t=`https://${n(r)}${o&&o!=="_root"?`/${n(o)}`:""}`;if(e){let p=new URLSearchParams;for(let[x,i]of Object.entries(e))p.set(x,i);t+=`?${p.toString()}`}return m?t.replace(/^https?:\/\//,""):t}function w({domain:r,key:o}){return`https://${r}${o==="_root"?"":`/${o}`}`}var hr=r=>!r.periodStart||!r.periodEnd?"-":`${f(r.periodStart,{month:"short",year:new Date(r.periodStart).getUTCFullYear()===new Date(r.periodEnd).getUTCFullYear()?void 0:"numeric",timeZone:"utc"})}-${f(r.periodEnd,{month:"short",timeZone:"utc"})}`;export{hr as a,E as b,b as c,w as d};
