import{a as ct,D as ht,L as ut}from"./constants.BasPOSZ9.js";import{c as w,g as lt}from"./_commonjsHelpers.1rBs7ZY3.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},a=new Error().stack;a&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[a]="7c283aad-54b9-431b-b4c2-27d590d584c5",r._sentryDebugIdIdentifier="sentry-dbid-7c283aad-54b9-431b-b4c2-27d590d584c5")}catch{}})();var $,z;function pt(){if(z)return $;z=1;var r="Expected a function",a="__lodash_hash_undefined__",s="[object Function]",c="[object GeneratorFunction]",i=/[\\^$.*+?()[\]{}|]/g,f=/^\[object .+?Constructor\]$/,h=typeof w=="object"&&w&&w.Object===Object&&w,g=typeof self=="object"&&self&&self.Object===Object&&self,b=h||g||Function("return this")();function j(t,e){return t?.[e]}function m(t){var e=!1;if(t!=null&&typeof t.toString!="function")try{e=!!(t+"")}catch{}return e}var v=Array.prototype,d=Function.prototype,D=Object.prototype,S=b["__core-js_shared__"],R=function(){var t=/[^.]+$/.exec(S&&S.keys&&S.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),I=d.toString,L=D.hasOwnProperty,F=D.toString,H=RegExp("^"+I.call(L).replace(i,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),N=v.splice,P=T(b,"Map"),_=T(Object,"create");function u(t){var e=-1,n=t?t.length:0;for(this.clear();++e-1}function Z(t,e){var n=this.__data__,o=y(n,t);return o<0?n.push([t,e]):n[o][1]=e,this}p.prototype.clear=B,p.prototype.delete=J,p.prototype.get=V,p.prototype.has=X,p.prototype.set=Z;function l(t){var e=-1,n=t?t.length:0;for(this.clear();++e{const{pathname:a}=new URL(r,"https://nordvpn.com"),s=a.split(".").filter(Boolean);if(s.length<2)return _t;const c=s.pop()||"",i=s.join(".").split("/").slice(1),f=i.pop()||"",h=i.join("/");return{path:h&&`${h}/`,filename:f,extension:c}}),bt=r=>{const{pathname:a,search:s,hash:c}=new URL(r,"https://nordvpn.com"),{extension:i}=gt(a.replace(/\/?$/,"/")+s+c);return i?r:r.replace(/\/?(\?|#|$)/,"/$1")},mt=r=>{const{hostname:a}=new URL(r,"https://nordvpn.com");return ct.includes(a)},wt=({url:r,locale:a,locales:s=ut,forceDefaultLocale:c})=>{if(r.startsWith("#")||r.startsWith("mailto:"))return r;const i=a&&(a!==ht||c)&&s.includes(a)?`/${a}`:"";if(r.startsWith("/")){const[,h]=r.split("/");return s.includes(h)?r.replace(`/${h}`,i):`${i}${r}`}try{const{origin:h,pathname:g,search:b,hash:j}=new URL(r),[,m,...v]=g.split("/");s.includes(m)||v.unshift(m);const d=`${h}${i}/${v.join("/")}`+b+j;return mt(d)?bt(d):d}catch{return r}},vt=r=>r.replace(/[A-Z]/g,a=>`-${a.toLowerCase()}`),jt=r=>r?Object.fromEntries(Object.entries(r).map(([a,s])=>{const c=a[0];if(c!==c.toLowerCase()||a.includes("_"))throw new Error(`${a} should be in camel case`);return[`data-ga-extra-${vt(a)}`,s]})):{};export{jt as b,wt as g}; //# sourceMappingURL=buildGAExtraAttributes.C4x7a-ry.js.map