{ "version": 3, "sources": ["../../../Vettvangur.Frontend/src/scripts/utility/helpers.ts"], "sourcesContent": ["export const combineSearchParameters = (...urls) => {\n const combinedParams = new URLSearchParams()\n\n // Loop through each URL\n urls.forEach((url) => {\n // Parse URL parameters\n const params = new URLSearchParams(url.search)\n\n // Append each parameter to the combinedParams object\n params.forEach((value, key) => {\n combinedParams.append(key, value)\n })\n })\n\n // Construct the new URL with combined parameters\n const combinedUrl = new URL(window.location.href)\n // const combinedUrl = new URL(urls[0].href)\n combinedUrl.search = combinedParams.toString()\n\n return combinedUrl.href\n}\n\nexport const getParameterFromUrl = (url, parameterName) => {\n const params = new URLSearchParams(url.search)\n return params.get(parameterName)\n}\n\nexport const icelandicToLatin = (text: string): string => {\n return text.normalize('NFKD').replace(/[\\u0300-\\u036f]/g, '')\n}\n\nexport const toCamelCase = (string: string): string => {\n return string.replace(/[-_](.)/g, (_, c) => c.toUpperCase())\n}\n"], "mappings": "AAsBO,IAAMA,EAAsB,CAACC,EAAKC,IACxB,IAAI,gBAAgBD,EAAI,MAAM,EAC/B,IAAIC,CAAa,EAGpBC,EAAoBC,GACxBA,EAAK,UAAU,MAAM,EAAE,QAAQ,mBAAoB,EAAE", "names": ["getParameterFromUrl", "url", "parameterName", "icelandicToLatin", "text"] }