PluginProbe
FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler / 1.6.5
FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler v1.6.5
1.6.5 1.6.4 1.6.3 1.6.2 1.6.1 1.6.0 1.5.4 1.5.5 1.5.3 1.5.2 1.5.1 1.5.0 1.4.2 1.4.1 1.4.0 1.3.28 1.3.27 1.3.26 1.3.25 1.3.23 1.3.22 1.3.21 1.3.20 1.3.19 trunk All 48 releases
← All changes | assets/chunks/Url.js +1 -1 1.3.21 → 1.6.5 View file →
@@ -1 +1 @@
1 -import{S as o}from"./Str.js?ver=1.3.21";import{A as h}from"./Arr.js?ver=1.3.21";import{a as p}from"./vue-router.js?ver=1.3.21";class U{static appendQueryParams(r,t={}){const e=new URL(r);return Object.entries(t).forEach(([n,s])=>{s!=null&&e.searchParams.append(n,s.toString())}),e.toString()}static join(r,t,e={}){return o.endsWith(r,"/")||(r=r+"/"),o.startsWith(t,"/")&&(t=t.substring(1)),this.appendQueryParams(r+t,e)}static addParam(r,t,e){const n=new URL(r);return n.searchParams.append(t,e),n.toString()}static getParam(r,t){return new URL(r??window.location.href).searchParams.get(t)}static removeParam(r,t){const e=new URL(r);return e.searchParams.delete(t),e.toString()}static pushToVueUrl(r=null,t={}){const e=this.appendToVueUrl(r,t);e&&window.history.replaceState({},"",e)}static appendToVueUrl(r=null,t={}){if(typeof window>"u")return;const e=r??window.location.href,n=new URL(e),s=e.split("#")[0],a=n.hash;if(!a.includes("?")){const i=a.replace(/\/?$/,"/")+"?"+new URLSearchParams(t).toString();return`${s}${i}`}const[u,l]=a.slice(1).split("?"),c=new URLSearchParams(l||"");Object.entries(t).forEach(([i,m])=>{c.set(i,m.toString())});const d=`#${u}?${c.toString()}`;return`${s}${d}`}static getAdminRoute(r=""){return h.get(window,"fluentCartAdminApp.admin_url")+r}static getVueParams(r){var e;const t=p();return((e=t==null?void 0:t.query)==null?void 0:e[r])??(t==null?void 0:t.query)??null}}export{U};
1 +import{S as o}from"./Str.js?ver=1.6.5";import{A as f}from"./Arr.js?ver=1.6.5";import{a as w}from"./vue-router.js?ver=1.6.5";class S{static appendQueryParams(e,t={}){const r=new URL(e);return Object.entries(t).forEach(([n,s])=>{s!=null&&r.searchParams.append(n,s.toString())}),r.toString()}static join(e,t,r={}){return o.endsWith(e,"/")||(e=e+"/"),o.startsWith(t,"/")&&(t=t.substring(1)),this.appendQueryParams(e+t,r)}static addParam(e,t,r){const n=new URL(e);return n.searchParams.append(t,r),n.toString()}static getParam(e,t){return new URL(e??window.location.href).searchParams.get(t)}static removeParam(e,t){const r=new URL(e);return r.searchParams.delete(t),r.toString()}static pushToVueUrl(e=null,t={}){const r=this.appendToVueUrl(e,t);r&&window.history.replaceState({},"",r)}static appendToVueUrl(e=null,t={}){if(typeof window>"u")return;const r=e??window.location.href,n=new URL(r),s=r.split("#")[0],i=n.hash;if(!i.includes("?")){const a=(i||"#").replace(/\/?$/,"/")+"?"+new URLSearchParams(t).toString();return`${s}${a}`}const[l,u]=i.slice(1).split("?"),c=new URLSearchParams(u||"");Object.entries(t).forEach(([a,m])=>{c.set(a,m.toString())});const d=`#${l}?${c.toString()}`;return`${s}${d}`}static getAdminRoute(e=""){return f.get(window,"fluentCartAdminApp.admin_url")+e}static getVueParams(e){var r;const t=w();return((r=t==null?void 0:t.query)==null?void 0:r[e])??(t==null?void 0:t.query)??null}static scrollToHashSection(e){const t=e!=null&&e.startsWith("#")?e.slice(1):e||"";if(!t)return;const r=document.getElementById(t);r&&(r.scrollIntoView({behavior:"smooth",block:"start"}),r.classList.add("fct-scroll-highlight"),r.addEventListener("animationend",()=>r.classList.remove("fct-scroll-highlight"),{once:!0}))}}export{S as U};