{"version":3,"names":["themeConfig","theme","params","Proxy","URLSearchParams","window","location","search","get","searchParams","prop","key","param","selectedValue","localStorage","setItem","getItem","document","documentElement","setAttribute","removeAttribute"],"sources":["../../js/tabler-theme.js"],"sourcesContent":["/**\n * demo-theme is specifically loaded right after the body and not deferred\n * to ensure we switch to the chosen dark/light theme as fast as possible.\n * This will prevent any flashes of the light theme (default) before switching.\n */\nconst themeConfig = {\n\t\"theme\": \"light\",\n\t\"theme-base\": \"gray\",\n\t\"theme-font\": \"sans-serif\",\n\t\"theme-primary\": \"blue\",\n\t\"theme-radius\": \"1\",\n}\n\nconst params = new Proxy(new URLSearchParams(window.location.search), {\n\tget: (searchParams, prop) => searchParams.get(prop),\n})\n\nfor (const key in themeConfig) {\n\tconst param = params[key]\n\tlet selectedValue\n\n\tif (!!param) {\n\t\tlocalStorage.setItem('tabler-' + key, param)\n\t\tselectedValue = param\n\t} else {\n\t\tconst storedTheme = localStorage.getItem('tabler-' + key)\n\t\tselectedValue = storedTheme ? storedTheme : themeConfig[key]\n\t}\n\n\tif (selectedValue !== themeConfig[key]) {\n\t\tdocument.documentElement.setAttribute('data-bs-' + key, selectedValue)\n\t} else {\n\t\tdocument.documentElement.removeAttribute('data-bs-' + key)\n\t}\n}"],"mappings":";;;;;;0FAKA,MAAMA,EAAc,CACnBC,MAAS,QACT,aAAc,OACd,aAAc,aACd,gBAAiB,OACjB,eAAgB,KAGXC,EAAS,IAAIC,MAAM,IAAIC,gBAAgBC,OAAOC,SAASC,QAAS,CACrEC,IAAKA,CAACC,EAAcC,IAASD,EAAaD,IAAIE,KAG/C,IAAK,MAAMC,KAAOX,EAAa,CAC9B,MAAMY,EAAQV,EAAOS,GACrB,IAAIE,EAEJ,GAAMD,EACLE,aAAaC,QAAQ,UAAYJ,EAAKC,GACtCC,EAAgBD,MACV,CAENC,EADoBC,aAAaE,QAAQ,UAAYL,IACTX,EAAYW,EACzD,CAEIE,IAAkBb,EAAYW,GACjCM,SAASC,gBAAgBC,aAAa,WAAaR,EAAKE,GAExDI,SAASC,gBAAgBE,gBAAgB,WAAaT,EAExD,C","ignoreList":[]}