1"use strict";(self.webpackChunksvk_designsystem=self.webpackChunksvk_designsystem||[]).push([[188,1508,3110,4548,6284,6612],{90797:function(t,e,i){function s(){return(+new Date+Math.random()).toString(36).replace(/[^a-z1-9]+/g,"")}i.d(e,{A:function(){return s}})},33730:function(t,e,i){function s(t){return encodeURIComponent(t).replace(/[!'()*]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`)}function n(t){return"string"!=typeof t?{}:(t=t.trim().replace(/^(\?|#|&)/,""))?t.split("&").reduce(function(t,e){var i=e.replace(/\+/g," ").split("="),s=i.shift(),n=i.length>0?i.join("="):void 0;return s=decodeURIComponent(s),n=void 0===n?null:decodeURIComponent(n),t.hasOwnProperty(s)?Array.isArray(t[s])?t[s].push(n):t[s]=[t[s],n]:t[s]=n,t},{}):{}}function a(t){return t?Object.keys(t).map(function(e){var i=t[e];return void 0===i?"":null===i?e:Array.isArray(i)?i.map(function(t){return s(e)+"="+s(t)}).join("&"):s(e)+"="+s(i)}).filter(function(t){return t.length>0}).join("&"):""}i.d(e,{As:function(){return a},qg:function(){return n}})},6284:function(t,e,i){i.r(e),i.d(e,{SvkAutocomplete:function(){return s}});class s extends HTMLElement{constructor(){super(),this.open=this.hasAttribute("open"),this.minLength=this.getAttribute("min-length")||2,this.setupDom(),this.dom.input.setAttribute("autocomplete","off"),this.currentResult={data:[],list:[],selected:-1}
1,this.createList(),this.currentSearchTerm=this.dom.input.value,""!==this.currentSearchTerm&&(this.dom.input.classList.add("is-autocompleted"),this.dom.input.classList.add("is-active")),this.handleClickOutside=this.handleClickOutside.bind(this),this.handleMenuKeyDown=this.handleMenuKeyDown.bind(this)}setupDom(){this.dom={},this.dom.el=this,this.dom.input=this.querySelector("input"),this.dom.dropdown=this.querySelector(".autocomplete__dropdown"),this.dom.dropdownList=this.querySelector(".autocomplete__dropdown-list"),this.dom.dropdownSupport=this.querySelector(".autocomplete__dropdown-support")}connectedCallback(){this.bindEvents()}reset(){this.dom.input.classList.remove("is-autocompleted"),this.dom.el.querySelectorAll(".is-checked").forEach(t=>{t.classList.remove("is-checked")}),this.dom.el.querySelectorAll("li").forEach(t=>{t.style.display="block"}),this.currentResult.list=[],this.currentResult.selected=-1,this.closeDropDown()}createList(){this.dom.dropdownList.querySelectorAll("button,a").length&&(this.currentResult.list=this.dom.dropdownList.querySelectorAll("button,a"),this.currentResult.list.forEach(t=>{t.setAttribute("tabindex",-1),t.classList.add("paragraph-75")}),this.currentResult.selected=-1)}emit(t="",e="",i={}){const s={...i,text:t,value:e};this.dispatchEvent(new CustomEvent("svk-change",{bubbles:!1,detail:s})),this.dispatchEvent(new CustomEvent("onChange",{bubbles:!1,detail:s}))}selectItem(t){let e="",i=t.dataset.value??t.value??"",s={...t.dataset};e=t.hasAttribute("data-text")?t.getAttribute("data-text"):t.textContent.trim(),t.classList.contains("is-checked")?(t.classList.remove("is-checked"),this.dom.input.value="",this.dom.input.focus(),this.dom.input.classList.remove("is-autocompleted"),e="",i="",s={}):(this.dom.el.querySelectorAll(".is-checked").forEach(t=>{t.classList.remove("is-checked")}),t.classList.add("is-checked"),this.dom.input.value=e,this.dom.input.focus(),this.dom.input.classList.add("is-autocompleted")),this.emit(e,i,s),this.closeDropDown()}inputKeyDownType(t){this.open||this.openDropDown(),this.currentSearchTerm=t.target.value;let e=[];this.currentResult.data.forEach(t=>{t.textContent.toUpperCase().indexOf(this.currentSearchTerm.toUpperCase())>-1?(t.parentElement.style.display="block",e.push(t)):t.parentElement.style.display="none"}),this.currentResult.list=e}openDropDown(){this.setAttribute("open",""),document.addEventListener("click",this.handleClickOutside),this.dom.dropdownList.addEventListener("keydown",this.handleMenuKeyDown)}closeDropDown(){this.removeAttribute("open"),void 0!==this.currentResult.list[this.currentResult.selected]&&this.currentResult.list[this.currentResult.selected].classList.remove("is-selected"),this.currentResult.selected=-1,document.removeEventListener("click",this.handleClickOutside)}directionUp(){let t=this.currentResult.list[this.currentResult.selected],e=this.currentResult.list[this.currentResult.selected-1];this.currentResult.selected-=1,t.classList.remove("is-selected"),void 0===e?(this.dom.input.focus(),this.currentResult.selected=-1):(e.classList.add("is-selected"),this.isElementVisible(e,e.parentElement)||e.parentElement.scrollTo(0,e.offsetTop),e.focus())}directionDown(){if(this.currentResult.list.length===this.currentResult.selected+1)return!1;let t=this.currentResult.list[this.currentResult.selected],e=this.currentResult.list[this.currentResult.selected+1];if(this.currentResult.selected=this.currentResult.selected+1,this.currentResult.list.length===this.currentResult.selected)return!1;void 0!==t&&t.classList.remove("is-selected"),e.classList.add("is-selected"),this.isElementVisible(e,e.parentElement)||e.parentElement.scrollTo(0,e.offsetTop),e.focus()}isElementVisible(t,e){const i=t.offsetTop,s=i+t.clientHeight,n=e.scrollTop,a=n+e.clientHeight;return i>=n&&s<=a||i<n&&n<s||i<a&&a<s}handleClickOutside(t){this.dom.el.contains(t.target)||this.closeDropDown()}handleFocusOut(t){if("SVK-AUTOCOMPLETE"===t.currentTarget.nodeName)return!1;(null===t.relatedTarget||null!==t.relatedTarget&&!this.dom.el.contains(t.relatedTarget))&&(this.dom.input.classList.contains("is-autocompleted")||(this.dom.input.value="",this.emit
1("")),this.closeDropDown())}handleInputClick(t){this.dom.el.hasAttribute("open")?this.closeDropDown():this.openDropDown()}handleInputKeyDown(t){this.dom.input.classList.contains("is-autocompleted")&&!["Enter","Tab","ShiftLeft","ShiftRight","ArrowLeft","ArrowRight"].includes(t.code)&&(this.dom.input.value="",this.emit(""),this.dom.input.classList.remove("is-autocompleted"),this.currentResult.selected=-1,this.dom.el.querySelectorAll(".is-checked").forEach(t=>{t.classList.remove("is-checked")}))}handleInputKeyUp(t){switch(t.code){case"ArrowUp":case"ArrowLeft":case"ArrowRight":case"Space":case"Enter":case"Tab":case"ShiftLeft":case"ShiftRight":break;case"Escape":this.closeDropDown();break;case"ArrowDown":this.openDropDown(),this.directionDown();break;default:this.inputKeyDownType(t)}return!1}handleDropDownClick(t){"BUTTON"===t.target.nodeName?(t.stopPropagation(),t.preventDefault(),this.selectItem(t.target)):"DIV"===t.target.nodeName&&t.preventDefault()}handleMenuKeyDown(t){switch(t.code){case"ArrowUp":t.preventDefault(),this.directionUp();break;case"ArrowDown":t.preventDefault(),this.directionDown();break;case"Enter":t.preventDefault(),"BUTTON"===t.target.nodeName?this.selectItem(t.target):"A"===t.target.nodeName&&(window.location.href=t.target.href);break;case"Escape":this.dom.input.focus(),this.closeDropDown();break;case"Tab":this.closeDropDown();break;default:this.dom.input.focus()}}observeDropdown(){const t=this.dom.dropdownList;new MutationObserver(t=>{for(const e of t)"childList"===e.type&&(this.currentResult.list=this.dom.dropdownList.querySelectorAll("button,a"),this.currentResult.data=this.currentResult.list,this.currentResult.list.forEach(t=>{t.setAttribute("tabindex",-1),t.classList.add("paragraph-75")}),this.currentResult.selected=-1)}).observe(t,{subtree:!0,childList:!0})}bindEvents(){this.dom.el.addEventListener("focusout",this.handleFocusOut.bind(this)),this.dom.input.addEventListener("click",this.handleInputClick.bind(this)),this.dom.input.addEventListener("keyup",this.handleInputKeyUp.bind(this)),this.dom.input.addEventListener("keydown",this.handleInputKeyDown.bind(this)),this.dom.dropdown.addEventListener("click",this.handleDropDownClick.bind(this)),this.observeDropdown()}}window.customElements.define("svk-autocomplete",s)},26612:function(t,e,i){i.r(e),i.d(e,{SvkInputPollingstation:function(){return n}});var s=i(33730);i(6284),i(43110),i(91508),i(64548),i(30188);class n extends HTMLElement{static observedAttributes=["value","range-value"];constructor(){super(),this.dom={},this.dom.el=this,this.label=this.getAttribute("label"),this.required=this.hasAttribute("required"),this.name=this.getAttribute("name"),this.value=this.getAttribute("value"),this.coordinateLat=this.getAttribute("coordinate-lat"),this.coordinateLng=this.getAttribute("coordinate-lng"),this.rangeValue=this.getAttribute("range-value")||25,this.rangeActive="true"===this.getAttribute("range-active"),this.placeholder=this.getAttribute("placeholder"),this.description=this.getAttribute("description"),this.error=this.getAttribute("error"),this.useGeoLocation="geolocation"in navigator,this.searchQuery="",this.filter={},this.controller=null,this.debounce=parseInt(this.getAttribute("debounce"),10)||250,this._debounceTimer=null,this.range=null!==this.getAttribute("range")?this.getAttribute("range").split(","):[],this.coordinateLat&&this.coordinateLng&&(this.filter={radius:1e3*parseInt(this.rangeValue),name:this.value,type:"position",latitude:parseFloat(this.coordinateLat),longitude:parseFloat(this.coordinateLng)}),this.render()}connectedCallback(){this.dom.inputLocation=this.querySelector(".input-pollingstation__input"),this.dom.autocomplete=this.querySelector("svk-autocomplete"),this.dom.autocompleteDropDownList=this.querySelector(".autocomplete__dropdown-list"),this.value&&this.rangeActive&&this.enableRange(),this.bindEvents()}attributeChangedCallback(t,e,i){"value"===t?this.dom.inputLocation&&(this.dom.inputLocation.value=i):"range-value"===t&&this.querySelector("svk-input-select")&&this.querySelector("svk-input-select").setAttribute("value",i)}async fetchAddress(t){this.controller&&this.controller.abort(),this.controller=new AbortController;const e=this.controller.signal,i=await fetch(`/webapi/api-v2/geo/address/search?${s.As({query:t,limit:10,apikey:"a75ee3ab-a448-4147-bf4c-3afae1f4da5d"})}`,{signal:e});return i.ok?(this.clearError(),i.json()):(this.dom.autocompleteDropDownList.innerHTML="",Promise.reject(i))}showError(t=""){this.error=t,this.dom?.el&&(t?this.dom.el.setAttribute("invalid",""):this.dom.el.removeAttribute("invalid"));let e=this.querySelector(".input-pollingstation__error");
1if(t){if(!e){e=document.createElement("span"),e.className="input-pollingstation__error label-50",e.setAttribute("aria-live","polite");const t=this.querySelector(".input-pollingstation__container");t&&t.appendChild(e)}e.textContent=t,e.style.display=""}else e&&(e.textContent="",e.style.display="none")}clearError(){this.showError("")}emit(t){this.dispatchEvent(new CustomEvent("svk-change",{bubbles:!0,cancelable:!0,detail:{filter:t}}))}reset(){this.dom.inputLocation.value="",this.searchQuery="",this.filter={},this.disableRange(),this.dom.inputLocation.classList.remove("is-active"),this.dom.el.querySelector(".input-pollingstation__autocomplete").reset(),this.dom.autocompleteDropDownList.innerHTML='<ul class="list--none"></ul>'}setDistance(t){void 0!==this.filter&&(this.filter.radius=1e3*parseInt(t,10),this.rangeValue=t,this.enableRange())}getGeoLocation(){navigator.geolocation.getCurrentPosition(function(t){this.filter={latitude:t.coords.latitude,longitude:t.coords.longitude,radius:1e3*parseInt(this.rangeValue),name:"Min position",type:"position"};const e=this.querySelector(".js-geo-position");e&&e.removeAttribute("loading"),this.clearError(),this.enableRange(),this.emit(this.filter)}.bind(this),function(t){let e="";switch(t.code){case t.PERMISSION_DENIED:e="Platstjänster nekades. Tillåt åtkomst till plats i din webbläsare eller sök efter en adress.";break;case t.POSITION_UNAVAILABLE:e="Platsinformation är inte tillgänglig just nu. Försök igen eller sök efter en adress.";break;case t.TIMEOUT:e="Hämtning av plats tog för lång tid. Försök igen eller sök efter en adress.";break;default:e="Ett fel uppstod när plats skulle hämtas. Försök igen eller sök efter en adress."}this.showError(e),this.querySelector(".js-geo-position");const i=this.querySelector(".js-geo-position");i&&(i.setAttribute("aria-disabled","true"),i.setAttribute("disabled",""),i.removeAttribute("loading")),this.dispatchEvent(new CustomEvent("svk-error",{bubbles:!0,cancelable:!1,detail:{source:"geolocation",code:t.code,message:e}}))}.bind(this),{timeout:6e4})}enableRange(){this.setAttribute("range-active",!0),this.querySelector("svk-input-select").getAttribute("value")!==this.rangeValue&&this.querySelector("svk-input-select").setAttribute("value",this.rangeValue),this.dom.el.querySelector("svk-input-select").removeAttribute("disabled")}disableRange(){this.setAttribute("range-active",!1),this.querySelector("svk-input-select").setAttribute("value",""),this.dom.el.querySelector("svk-input-select").setAttribute("disabled","")}showLoader(){this.dom.autocompleteDropDownList.setAttribute("aria-busy",!0),this.dom.autocompleteDropDownList.innerHTML='<ul class="list-none" style="margin-top: var(--space-100)">\n\t\t\t<li>
1<svk-loader-skeleton style="margin-left: var(--space-100)" type="text" width="40%"></svk-loader-skeleton></li>\n\t\t\t<li><svk-loader-skeleton style="margin-left: var(--space-100)" type="text" width="60%"></svk-loader-skeleton></li>\n\t\t\t<li><svk-loader-skeleton style="margin-left: var(--space-100)" type="text" width="40%"></svk-loader-skeleton></li>\n\t\t</ul>'}handleKeyUp(t){let e=t.target.value;if(e.length>=1?this.dom.inputLocation.classList.add("is-active"):this.dom.inputLocation.classList.remove("is-active"),0!==e.length&&e.length<3)this._debounceTimer&&(clearTimeout(this._debounceTimer),this._debounceTimer=null),this.dom.autocomplete.setAttribute("status","support"),this.searchQuery="";else if(e.length>=3&&e!==this.searchQuery){this.dom.autocomplete.setAttribute("status","list");let i="";i=t.target.value.replace(/[/]/g,""),i=i.replace(/([,*´`\s]+$)/g,""),this._debounceTimer&&clearTimeout(this._debounceTimer),this.showLoader(),this._debounceTimer=setTimeout(()=>{this.searchQuery=e,this.fetchAddress(i).then(t=>{this.dom.autocompleteDropDownList.removeAttribute("aria-busy"),this.renderList(t)}).catch(t=>{this.dom.autocompleteDropDownList.removeAttribute("aria-busy"),this.dom.autocompleteDropDownList.innerHTML=""})},this.debounce)}else 0===e.length&&(this._debounceTimer&&(clearTimeout(this._debounceTimer),this._debounceTimer=null),this.dom.autocompleteDropDownList.innerHTML="",this.dom.autocomplete.removeAttribute("status"),this.searchQuery="",this.reset(),this.emit(this.filter))}handleAutocompleteChange(t){t.detail?.lat&&t.detail?.lon&&(this.filter={latitude:parseFloat(t.detail.lat),longitude:parseFloat(t.detail.lon),radius:1e3*parseInt(this.rangeValue),name:t.detail.value,type:"position"},this.enableRange(),this.emit(this.filter))}handleGeoPositionClick(t){t.target.setAttribute("loading",""),this.dom.inputLocation.classList.add("is-active"),this.getGeoLocation()}handleInputRangeSliderChange(t){t.stopPropagation(),this.setDistance(t.target.value),this.emit(this.filter)}handleInputRangeSelectChange(t){this.setDistance(t.detail.selected),this.emit(this.filter)}handleReset(){this.reset(),this.emit(this.filter)}bindEvents(){this.querySelector("svk-autocomplete").addEventListener("svk-change",this.handleAutocompleteChange.bind(this)),null!==this.querySelector(".input-pollingstation__reset")&&this.querySelector(".input-pollingstation__reset").addEventListener("click",this.handleReset.bind(this)),null!==this.querySelector("svk-input-range")&&this.querySelector("svk-input-range").addEventListener("svk-change",this.handleInputRangeSliderChange.bind(this)),null!==this.querySelector("svk-input-select")&&this.querySelector("svk-input-select").addEventListener("svk-change",this.handleInputRangeSelectChange.bind(this)),this.dom.inputLocation.addEventListener("keyup",this.handleKeyUp.bind(this)),this.querySelector(".js-geo-position").addEventListener("click",this.handleGeoPositionClick.bind(this))}renderList(t){this.dom.autocompleteDropDownList.innerHTML=`\n\t\t\t<ul class="list--none">\n\t\t\t\t${t.map(t=>`\n\t\t\t\t\t<li>\n\t\t\t\t\t\t<button\n\t\t\t\t\t\t\tdata-type="geo"\n\t\t\t\t\t\t\tdata-lat="${t.latitude}"\n\t\t\t\t\t\t\tdata-lon="${t.longitude}"\n\t\t\t\t\t\t\tvalue="${t.street} ${t.streetNumber}">\n\t\t\t\t\t\t\t\t${t.street} ${t.streetNumber}${null!==t.extraStreetNumber?" "+t.extraStreetNumber:""}${null!==t.letter?t.letter:""}, ${t.postalCode} ${t.locality}\n\t\t\t\t\t\t</button>\n\t\t\t\t\t</li>\n\t\t\t\t`).join("")}\n\t\t\t</ul>\n\t\t`}render(){let t=document.createElement("template");t.innerHTML=`\n\t\t\t<label class="input-pollingstation__container">\n\t\t\t\t<span class="input-pollingstation__label label-100">\n\t\t\t\t\t${this.label}\n\t\t\t\t\t${this.required?' <abbr title="Obligatoriskt">*</abbr>':""}\n\t\t\t\t</span>\n\t\t\t\t<svk-autocomplete class="input-pollingstation__autocomplete">\n\t\t\t\t\t<div class="input-pollingstation__input-container">\n\t\t\t\t\t\t<input\n\t\t\t\t\t\t\tclass="input-pollingstation__input ${this.value&&this.value.length>=1?"is-active":""} ${""!==this.value&&null!==this.value?"is-autocompleted":""}"\n\t\t\t\t\t\t\ttype="text"\n\t\t\t\t\t\t\tname="${this.name}"\n\t\t\t\t\t\t\tdata-matomo-mask=""\n\t\t\t\t\t\t\tdata-matomo-name="${this.label}"\n\t\t\t\t\t\t\t${this.value?`value="${this.value}"`:""}\n\t\t\t\t\t\t\t${this.id?`id="${this.id}-input"`:""}\n\t\t\t\t\t\t\t${this.autocomplete?`autocomplete="${this.autocomplete}"`:""}\n\t\t\t\t\t\t\t${this.placeholder?`placeholder="${this.placeholder}"`:""}\n\t\t\t\t\t\t\t${this.required?"required":""}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t<button class="input-pollingstation__reset svk-button button--icon button--tertiary button--size-75" aria-label="Rensa">\n\t\t\t\t\t\t\t<svk-icon name="close">\n\t\t\t\t\t\t</button>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="autocomplete__dropdown">\n\t\t\t\t\t\t<div class="autocomplete__dropdown-support">Skriv minst 3 bokstäver</div>\n\t\t\t\t\t\t<div class="autocomplete__dropdown-list"></div>\n\t\t\t\t\t\t${this.useGeoLocation?'\t<div class="autocomplete__dropdown-footer">\n\t\t\t\t\t\t\t\t\t<button class="svk-button button--fill button--loader js-geo-position" data-text="Min position">\n\t\t\t\t\t\t\t\t\t\t<svk-icon name="location"></svk-icon>\n\t\t\t\t\t\t\t\t\t\tHitta min position\n\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t</div>':""}\n\t\t\t\t\t</div>\n\t\t\t\t</svk-autocomplete>\n\n\t\t\t\t${this.description?`<span class="input-pollingstation__description label-50">${this.description}</span>`:""}\n\t\t\t\t<span class="input-pollingstation__error label-50"></span>\n\t\t\t</label>\n\t\t\t<div class="input-range__container is-disabled">\n\t\t\t\t<svk-input-select\n\t\t\t\t\tlabel="Avstånd"\n\t\t\t\t\tname="range"\n\t\t\t\t\tvalue="${this.rangeActive&&this.rangeValue?this.rangeValue:""}"\n\t\t\t\t\tdisabled\n\t\t\t\t>\n\t\t\t\t\t${this.range.map(t=>`<option value="${t}" ${this.rangeValue===t?'selected="selected"':""}>Inom ${t} km</option>`)}\n\t\t\t\t</svk-input-select>\n\t\t\t</div>\n\t\t`,this.appendChild(t.content)}}window.customElements.define("svk-input-pollingstation",n)}
1,43110:function(t,e,i){i.r(e),i.d(e,{SvkInputRange:function(){return s}});class s extends HTMLElement{static observedAttributes=["invalid","value","max"];constructor(){super(),this.ariaLabel=this.getAttribute("aria-label")||"Reglage",this.label=this.getAttribute("label"),this.name=this.getAttribute("name"),this.value=this.getAttribute("value")||0,this.min=this.getAttribute("min")||0,this.max=this.getAttribute("max")||100,this.step=this.getAttribute("step")||1,this.useInputNumber=this.hasAttribute("use-input-number"),this.render(),this.setupDom()}connectedCallback(){this.bindEvents(),this.handleInput()}attributeChangedCallback(t,e,i){"value"===t?(this.querySelector(".input-range__input").setAttribute("value",i),this.handleInput()):"max"===t&&this.querySelector(".input-range__input").setAttribute("max",i)}setupDom(){this.dom={},this.dom.el=this,this.dom.input=this.querySelector(".input-range__input"),this.dom.inputNumber=this.querySelector(".input-range__number")}emit(t){this.dispatchEvent(new CustomEvent("svk-change",{bubbles:!0,detail:{value:t}}))}handleInput(){const t=this.dom.input.value,e=t/this.dom.input.max*100;this.dom.input.style.background=`linear-gradient(to right, var(--input-background-color-checked) ${e}%, var(--color-brand-200) ${e}%)`,this.value=t,this.useInputNumber&&(this.dom.inputNumber.value=t)}handleChange(){const t=this.dom.input.value;this.emit(t)}handleNumberChange(t){t.target.max&&(t.target.value=Math.min(parseInt(t.target.max),parseInt(t.target.value)||0)),this.dom.input.value=t.target.value,this.handleInput()}bindEvents(){this.dom.input.addEventListener("change",this.handleChange.bind(this)),this.dom.input.addEventListener("input",this.handleInput.bind(this)),this.useInputNumber&&(this.dom.inputNumber.addEventListener("input",this.handleNumberChange.bind(this)),this.dom.inputNumber.addEventListener("change",this.handleNumberChange.bind(this)),this.dom.inputNumber.addEventListener("paste",this.handleNumberChange.bind(this)),this.dom.inputNumber.addEventListener("keyup",this.handleNumberChange.bind(this)))}render(){let t=document.createElement("template");t.innerHTML=`\n\t\t\t<label class="input-range__container label-100">\n\t\t\t\t${null!==this.label?`<span class="input-range__label">${this.label}</span>`:'<span class="screen-reader">${this.ariaLabel}</span>'}\n\t\t\t\t<div class="input-range__content">\n\t\t\t\t\t<input\n\t\t\t\t\t\taria-label="${this.ariaLabel}"\n\t\t\t\t\t\tclass="input-range__input"\n\t\t\t\t\t\t${this.id?`id="input-range-${this.id}"`:""}\n\t\t\t\t\t\ttype="range"\n\t\t\t\t\t\tname="${this.name}"\n\t\t\t\t\t\tmin="${this.min}"\n\t\t\t\t\t\tmax="${this.max}"\n\t\t\t\t\t\tstep="${this.step}"\n\t\t\t\t\t\tvalue="${this.value}"\n\t\t\t\t\t/>\n\t\t\t\t\t${this.useInputNumber?`<div class="input-range__number-container">\n\t\t\t\t\t\t<input\n\t\t\t\t\t\t\tclass="input-range__number"\n\t\t\t\t\t\t\ttype="number"\n\t\t\t\t\t\t\tid="input-number-${this.id}"\n\t\t\t\t\t\t\tname="${this.name}-number"\n\t\t\t\t\t\t\tmax="${this.max}"\n\t\t\t\t\t\t\tmin="${this.min}"\n\t\t\t\t\t\t\tvalue="${this.value}"\n\t\t\t\t\t\t\t/><span>km</span>\n\t\t\t\t\t\t</div>`:""}\n\t\t\t\t</div>\n\t\t\t</label>\n\t\t`,this.appendChild(t.content)}}window.customElements.define("svk-input-range",s)},91508:function(t,e,i){i.r(e),i.d(e,{SvkInputSelect:function(){return n}});var s=i(90797);class n extends HTMLElement{static observedAttributes=["value","disabled"];get value(){return this.getAttribute("value")??""}set value(t){null==t||""===t?this.removeAttribute("value"):this.setAttribute("value",String(t))}get disabled(){return this.hasAttribute("disabled")}set disabled(t){t?this.setAttribute("disabled",""):this.removeAttribute("disabled")}constructor(){super(),this._select=null,this.elementId=(0,s.A)(),this.label=this.getAttribute("label"),this.labelSize=this.getAttribute("label-size")||"label-100",this.name=this.getAttribute("name"),this.required=this.hasAttribute("required"),this.description=this.getAttribute("description"),this.error=this.getAttribute("error"),this.handleChange=this.handleChange.bind(this)}connectedCallback(){this.render(),this._select=this.querySelector("select"),this.bindEvents(),this._select&&(this.value&&(this._select.value=this.value),this._select.disabled=this.disabled)}attributeChangedCallback(t,e,i){this.isConnected&&this._select&&e!==i&&("value"===t&&(this._select.value=i??""),"disabled"===t&&(this._select.disabled=null!==i))}emit(t){this.dispatchEvent(new CustomEvent("svk-change",{bubbles:!0,cancelable:!0,detail:{selected:t}}))}
1handleChange(t){this.value=t.target.value,this.emit(t.target.value)}bindEvents(){this._select?.addEventListener("change",this.handleChange)}setOptions(t=[]){if(!this._select)return;const e=document.createDocumentFragment();t.forEach(t=>{const i=document.createElement("option");i.value=t.value??"",i.textContent=t.label??"",t.disabled&&(i.disabled=!0),t.selected&&(i.selected=!0),e.appendChild(i)}),this._select.replaceChildren(e),this.value&&(this._select.value=this.value)}render(){let t=this.innerHTML,e=document.createElement("template");e.innerHTML=`\n\t\t\t<label class="${this.labelSize}" for="${this.elementId}">\n\t\t\t\t${this.label}\n\t\t\t\t${this.required?' <abbr title="Obligatoriskt">*</abbr>':""}\n\t\t\t</label>\n\t\t\t<div class="select__input-container">\n\t\t\t\t<select\n\t\t\t\t\tclass="select__input"\n\t\t\t\t\t${this.elementId?`id="${this.elementId}"`:""}\n\t\t\t\t\t${this.required?'required data-pattern="select"':""}\n\t\t\t\t\t${this.disabled?"disabled":""}\n\t\t\t\t\tname="${this.name}">\n\t\t\t\t\t${t}\n\t\t\t\t</select>\n\t\t\t\t<svk-icon name="arrow-down"></svk-icon>\n\t\t\t</div>\n\t\t\t${this.description?`<span class="input-text__description label-50">${this.description}</span>`:""}\n\t\t\t${this.error?`<span class="input-text__error label-50 rs_skip">${this.error}</span>`:""}\n\t\t`,this.replaceChildren(e.content)}}window.customElements.define("svk-input-select",n)},30188:function(t,e,i){i.r(e),i.d(e,{SvkLoaderSkeleton:function(){return s}});class s extends HTMLElement{constructor(){super()}}window.customElements.define("svk-loader-skeleton",s)},64548:function(t,e,i){i.r(e),i.d(e,{SvkLoader:function(){return s}});class s extends HTMLElement{constructor(){super(),this.name=this.getAttribute("name"),this.attachShadow({mode:"open"});let t=document.createElement("template");t.innerHTML='\n\t\t\t<style>\n\t\t\t\t@keyframes loader-bounce-dot-three {\n\t\t\t\t\t0% {\n\t\t\t\t\t\topacity: 1;\n\t\t\t\t\t\ttransform: translate(150%, 100%) scale(1);\n\t\t\t\t\t}\n\n\t\t\t\t\t50% {\n\t\t\t\t\t\topacity: 0.4;\n\t\t\t\t\t\ttransform: translate(0, 0) scale(0.8);\n\t\t\t\t\t}\n\n\t\t\t\t\t100% {\n\t\t\t\t\t\topacity: 1;\n\t\t\t\t\t\ttransform: translate(150%, 100%) scale(1);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t@keyframes loader-rotate360 {\n\t\t\t\t\t0% {\n\t\t\t\t\t\ttransform: rotate(0);\n\t\t\t\t\t}\n\n\t\t\t\t\t100% {\n\t\t\t\t\t\ttransform: rotate(360deg);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t:host {\n\t\t\t\t\tdisplay: block;\n\t\t\t\t}\n\n\t\t\t\t:host([size="100"]) {\n\t\t\t\t\twidth: var(--size-100);\n\t\t\t\t}\n\n\t\t\t\t:host([size="200"]) {\n\t\t\t\t\twidth: var(--size-200);\n\t\t\t\t}\n\n\t\t\t\t:host([size="300"]) {\n\t\t\t\t\twidth: var(--size-300);\n\t\t\t\t}\n\n\t\t\t\t.loader__container {\n\t\t\t\t\theight: 100%;\n\t\t\t\t\twidth: 100%;\n\t\t\t\t\taspect-ratio: 1/1;\n\t\t\t\t\tposition: relative;\n\t\t\t\t}\n\n\t\t\t\t.loader {\n\t\t\t\t\tposition: absolute;\n\t\t\t\t\ttop: 0;\n\t\t\t\t\tleft: 0;\n\t\t\t\t\tbottom: 0;\n\t\t\t\t\tright: 0;\n\t\t\t\t\toverflow: hidden;\n\t\t\t\t\tanimation: loader-rotate360 1100ms infinite ease-in-out;\n\t\t\t\t\tanimation-fill-mode: forwards;\n\t\t\t\t}\n\n\t\t\t\t.loader-dot {\n\t\t\t\t\tposition: absolute;\n\t\t\t\t\ttop: 50%;\n\t\t\t\t\tleft: 50%;\n\t\t\t\t\twidth: 16%;\n\t\t\t\t\theight: 16%;\n\t\t\t\t\tmargin-top: -8%;\n\t\t\t\t\tmargin-left: -8%;\n\t\t\t\t\tborder-radius: 50%;\n\t\t\t\t\tbackground: var(--color-orange-500);\n\t\t\t\t\ttransition: all 500ms;\n\t\t\t\t}\n\n\t\t\t\t.loader-dot--one {\n\t\t\t\t\tanimation: loader-bounce-dot-one $bounce-duration infinite ease-out;\n\t\t\t\t\ttransform: translate(0%, -175%);\n\t\t\t\t}\n\n\t\t\t\t.loader-dot--two {\n\t\t\t\t\tanimation: loader-bounce-dot-two $bounce-duration infinite ease-out;\n\t\t\t\t\ttransform: translate(-150%, 100%);\n\t\t\t\t}\n\n\t\t\t\t.loader-dot--three {\n\t\t\t\t\tanimation: loader-bounce-dot-three $bounce-duration infinite ease-out;\n\t\t\t\t\ttransform: translate(150%, 100%);\n\t\t\t\t}\n\n\t\t\t</style>\n\t\t\t<div class="loader__container">\n\t\t\t\t<div class="loader">\n\t\t\t\t\t<span part="dot" class="loader-dot loader-dot--one"></span>\n\t\t\t\t\t<span part="dot" class="loader-dot loader-dot--two"></span>\n\t\t\t\t\t<span part="dot" class="loader-dot loader-dot loader-dot--three"></span>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t',this.shadowRoot.appendChild(t.content)}}window.customElements.define("svk-loader",s)}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.