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EAK7Fy+C,EAJEr/C,KAAKQ,IAAI0/C,EAAkBL,EAAQ,IAAK,EAIRK,EAAkBC,SACpDb,EAAYa,OAAqBF,GAJ7BjgD,KAAKC,IAAI4/C,EAASE,EAAsBpC,EAAQ2B,UAAU,GAAKN,EAAgBr0B,OAAQ,IAAK,EAMtG,OAAQgzB,EAAQyB,oBACT,UACA,SAEH//C,KAAKoP,SAASovC,SAAS8B,EAAehC,EAAQ0B,UAAU,IAAIS,QAAKT,IAEjEhgD,KAAKoP,SAASovC,SAAS8B,EAAehC,EAAQ2B,UAAU,IAAIQ,QAAKnC,EAAQ2B,UAAU,GAAKO,IACxF,UAEG,YACA,OAEHxgD,KAAKoP,SAASovC,SAAS8B,EAAehC,EAAQ2B,UAAU,IAAIQ,QAAKR,IAEjEjgD,KAAKoP,SAASovC,SAAS8B,EAAehC,EAAQ0B,UAAU,IAAIS,QAAKnC,EAAQ0B,UAAU,GAAKQ,IACxF,wCA9TKO,GAAgBxhD,MA0FjBuJ,MAAQvJ,oDA1FPwhD,EAAgBvgD,+FA0Jbs9C,EAAqB,8GAJEhV,gBACKA,gBACAA,kPAxJ/B7kC,eAAe,mCAAfA,eAAe,oCAAfA,eAAe,gCAAfA,eAAe,gCAAfA,eAAe,2BAAfA,eAAe,0BAAfA,eAAe,2BAAfA,uBAAuB,oCAAvBA,eAAU,iaCvEvB1E,SACAA,mBAaEA,mBACAA,mBACFA,eATEA,8BAAmB,gBAAnBA,CAAmB,wBAAnBA,CAAmB,4BAAnBA,CAAmB,0BAAnBA,CAAmB,2BAFnBA,mBACAA,6zCDiNA2E,UADCC,QAAS,KACV0mC","names":["CalendarModule","DatePipe","imports","CommonModule","CarouselModule","ChartModule","DialogModule","ErrorModule","i0","COLORS","green","theme","red","blue","yellow","HeatmapPlotDirective","constructor","this","data","_data","value","coerceNumberProperty","outline","_outline","coerceBooleanProperty","selectors","HeatmapSectionDirective","highValue","Math","max","heatmapPlotDirectives","map","heatmapPlotDirective","filter","Number","lowValue","min","gradient","lowColor","highColor","width","heatmapSectionDirectives","reduce","chars","heatmapSectionDirective","label","length","labels","A","get","_a","onResize","setLabels","ngAfterViewInit","setColors","labelElements","tableElement","nativeElement","querySelectorAll","forEach","labelElement","textContent","dataset","scope","style","setProperty","plotSize","querySelector","getBoundingClientRect","index","zScores","getZScores","minScore","maxScore","zScore","isNaN","color","colorRatio","rgbToHex","hexToRgb","round","HeatmapComponent","ctx","__decorate","Debounce","C","OptionsModule","InputsModule","InputCheckboxModule","InputDateModule","DatesModule","InputEmailModule","InputMonthModule","InputOptionGroupModule","ListsModule","InputOptionModule","InputSelectModule","InputSwitchModule","InputTelModule","InputTextModule","InputTextareaModule","FormsModule","ReactiveFormsModule","InputWeekModule","InputYearModule","InputModule","LoadingModule","SnackbarComponent","elementRef","onClose","snackbarElement","firstElementChild","classList","add","setTimeout","isDisplay","SnackbarService","document","appRef","resolver","injector","Map","message","options","parentElement","re","body","parentElements","has","set","getWrapperElement","appendChild","duration","Pe","_b","wrapperElement","wrapperElementClass","componentRef","resolveComponentFactory","create","instance","buttonMessage","title","type","attachView","hostView","messageElement","rootNodes","location","removeChild","isSameNode","getFixedPositionElement","getAbsolutePositionElement","createElement","bottom","left","position","transform","zIndex","DOCUMENT","factory","SnackbarModule","TabsModule","TooltipModule","TruncateModule","CalendarComponent","CalendarDirective","changeDetectorRef","super","selected","_selected","range","VERY_BIG_NUMBER","start","end","Date","EventEmitter","ngAfterContentInit","resolution","active","DateRange","_resolution","dateRange","_dateRange","_min","startOfDay","subDays","date","_max","endOfDay","addDays","disabledDateRanges","v","_disabledDateRanges","_active","onResolutionChange","detectChanges","selectRange","selectedChange","emit","updateActive","activeStart","activeEnd","setFullYear","getFullYear","setMonth","getMonth","setDate","getDate","onActiveChange","month","calendar","startDate","startOfISOWeek","startOfMonth","endOfMonth","endOfISOWeek","current","isBefore","push","Array","fill","isValidRange","DayComponent","onClick","selectedDayChange","day","onKeydownHandler","MonthComponent","select","selectDayEvent","notInSameMonth","dateToCompare","isSameMonth","isSelected","isWithinInterval","isHidden","isDisabled","isOutsideMinAndMaxRange","some","onSelectedChange","selectedMonth","MonthsComponent","months","activeOrSelectedDay","firstDayOfYear","startOfYear","addMonths","monthRange","isMonthRangeOverlapping","areIntervalsOverlapping","getStartDate","isDateWithinDisabledRanges","isAfter","selectMonthRange","selectMonthEvent","i","ctx_r3","ctx_r6","QuickNavigationComponent","datePipe","renderer","ngOnChanges","changes","currentValue","displayMonth","displayYear","year","zoomIn","resolutionChange","zoomOut","WeekComponent","selectedWeekEvent","isSelectedWeek","weekRange","isSameDay","endOfWeeKDate","YearsComponent","size","startAt","keys","ngOnInit","years","focusNext","el","sibling","nextSibling","focus","focusPrevious","previousSibling","lastDayOfYear","isDateRangeOverlapping","isSameYear","isSelectedYear","selectedYearStart","getYear","selectedYearEnd","selectYearRange","yearDate","selectedYear","endOfYear","selectYearEvent","past","future","target","props","descriptor","enumerable","configurable","writable","Object","defineProperty","key","MEDIA_PREFERS_REDUCED_MOTION","array","arrayLike","prototype","slice","call","func","bind","apply","concat","arguments","nextTick","noop","requestAnimationFrame","subject","isNull","typeOf","isArray","isFunction","isString","isUndefined","ownerDocument","defaultView","window","HTMLElement","e","values","iteratee","toArray","indexOf","items","elm","classes","name","toggleClass","split","parent","children","nodes","ref","node","parentNode","insertBefore","selector","isHTMLElement","msMatchesSelector","matches","children2","child","ownKeys","object","right","reverse","source","forOwn","j","merge","isObject","elms","attrs","attr","removeAttribute","value2","setAttribute","String","tag","addClass","append","prop","getComputedStyle","display2","setActive","preventScroll","getAttribute","className","contains","html","DOMParser","parseFromString","stopPropagation","preventDefault","stopImmediatePropagation","timeStamp","PROJECT_CODE","DATA_ATTRIBUTE","condition","Error","floor","ceil","abs","x","y","epsilon","number","exclusive","minimum","maximum","string","replacements","replacement","replace","ids","listeners","targets","events","events2","eventNS","fragment","callback","forEachEvent","event","namespace","isEventTarget","remover","removeEventListener","removeListener","addEventListener","addListener","unbind","listener","dispatch","detail","CustomEvent","bubbles","createEvent","initCustomEvent","dispatchEvent","destroy","empty","EVENT_MOUNTED","EVENT_MOVE","EVENT_MOVED","EVENT_REFRESH","EVENT_UPDATED","EVENT_RESIZE","EVENT_RESIZED","EVENT_SCROLL","EVENT_SCROLLED","EVENT_DESTROY","EVENT_NAVIGATION_MOUNTED","EVENT_AUTOPLAY_PLAY","EVENT_AUTOPLAY_PAUSE","EVENT_LAZYLOAD_LOADED","Splide2","bus","createDocumentFragment","binder","EventBinder","on","assign","join","off","interval","onInterval","onUpdate","limit","startTime","id","now","rate","paused","count","pause","raf","update","cancelAnimationFrame","resume","cancel","rewind","time","isPaused","ARROW","ARROW_LEFT","ARROW_RIGHT","ARROW_UP","ARROW_DOWN","TTB","ORIENTATION_MAP","X","Y","ArrowLeft","ArrowRight","ROLE","TAB_INDEX","ARIA_PREFIX","ARIA_CONTROLS","ARIA_CURRENT","ARIA_SELECTED","ARIA_LABEL","ARIA_LABELLEDBY","ARIA_HIDDEN","ARIA_ORIENTATION","ARIA_ROLEDESCRIPTION","ARIA_LIVE","ARIA_BUSY","ARIA_ATOMIC","ALL_ATTRIBUTES","CLASS_PREFIX","CLASS_ROOT","CLASS_TRACK","CLASS_SLIDE","CLASS_CLONE","CLASS_ARROWS","CLASS_ARROW","CLASS_ARROW_PREV","CLASS_ARROW_NEXT","CLASS_PAGINATION","CLASS_PAGINATION_PAGE","CLASS_ACTIVE","STATUS_CLASS_PREFIX","CLASS_PREV","CLASS_NEXT","CLASS_VISIBLE","CLASS_LOADING","CLASS_FOCUS_IN","CLASS_OVERFLOW","STATUS_CLASSES","CLASSES","slide","clone","arrows","arrow","prev","next","pagination","page","spinner","POINTER_DOWN_EVENTS","POINTER_MOVE_EVENTS","POINTER_UP_EVENTS","SLIDE","LOOP","FADE","SCROLL_LISTENER_OPTIONS","passive","capture","NORMALIZATION_MAP","Spacebar","Right","Left","Up","Down","KEYBOARD_EVENT","SRC_DATA_ATTRIBUTE","SRCSET_DATA_ATTRIBUTE","TRIGGER_KEYS","ComponentConstructors","freeze","__proto__","Media","Components2","state","breakpoints","reducedMotion","queries","completely","options2","query","queryList","matchMedia","destroyed","is","direction","merged","merged2","entry","omit","r","P","mount","refresh","opts","base","notify","getPrototypeOf","setup","isMin","mediaQuery","sort","n","m","register","enable","Direction","resolve","axisOnly","match","offset","toLowerCase","charAt","toUpperCase","orient","Elements","track","list","isUsingKey","_EventInterface","EventInterface","root","i18n","elements","slides","rootClasses","trackClasses","role","find","assert","bar","CLASS_PROGRESS","toggle","prefix","pad","uniqueId","tagName","carousel","removeClass","getClasses","labelledby","from","closest","nodeType","drag","isNavigation","Slides","_EventInterface2","_Components2$Elements","Slides2","forEach$1","Slide2","slideIndex","Components","updateOnMove","slideFocus","styles","isClone","container","controls","splides","splide","getAt","format","slideX","curr","isActive","hasClass","self","updateActivity","visible","trackRect","rect","slideRect","isVisible","hidden","queryAll","focusableNodes","activeElement","updateVisibility","cloneStatus","slideLabel","initNavigation","onMove","listen","useContainer","isWithin","distance","diff","Slide$1","Slide1","excludeClones","matcher","includes","init","getIn","Controller","toIndex","hasFocus","perPage","between","parseHtml","before","images","img","observeImages","remove","getLength","isEnough","Layout","vertical","rootRect","overflow","_EventInterface3","_Components2$Elements2","styleSlides","unit","cssPadding","resize","force","newRect","height","cssHeight","cssTrackHeight","gap","autoWidth","fixedWidth","cssSlideSize","fixedHeight","autoHeight","isOverflow","padding","heightRatio","withoutGap","Slide","getGap","totalSize","slideSize","parseFloat","sliderSize","listSize","RequestInterval","Throttle","getPadding","Clones","cloneCount","clones","remount","observe","computeCloneCount","isHead","cloneNode","cloneDeep","generate","clones2","fixedSize","MULTIPLIER","Move","Transition","_EventInterface4","_Components2$Layout","_Components2$Directio","_Components2$Elements3","isBusy","Scroll","jump","translate","toPosition","preventLoop","destination","exceededMax","getEnd","shift","loop","EVENT_SHIFTED","backwards","excess","getLimit","getPosition","minDistance","Infinity","trimming","trimSpace","clamp","trim","reposition","move","dest","shifted","canShift","exceededLimit","exceededMin","endIndex","slideCount","perMove","_EventInterface5","_Components2$Slides","omitEnd","isLoop","isSlide","getNext","getAdjacent","getPrev","currIndex","prevIndex","EVENT_END_INDEX_CHANGED","computeDestIndex","approximatelyEqual","snapPage","computeMovableDestIndex","toPage","waitForTransition","onResized","go","control","allowSameIndex","_ref","indicator","Ue","parse","setIndex","scroll","snap","getIndex","toDest","Arrows","created","wrapperClasses","placeholder","wrapper","enabled","createArrow","display","K","prev2","arrowPath","nextIndex","prevLabel","last","nextLabel","first","disabled","Autoplay","hovered","focused","_EventInterface6","_Components2$Elements4","autoplay","stopped","resetProgress","stop","play","pauseOnHover","autoToggle","pauseOnFocus","Cover","cover2","src","cover","_EventInterface8","friction","onScrolled","noConstrain","clear","sign","noDistance","onEnd","to","t","easingFunc","pow","easing","Drag","basePosition","baseEvent","prevBaseEvent","isFree","dragging","clickPrevented","_EventInterface9","_Components2$Directio2","exceeded","disable","isTouch","isTouchEvent","target2","noDrag","isDraggable","button","prevent","onPointerMove","onPointerUp","save","cancelable","constrain","diffCoord","expired","diffTime","hasExceeded","isSliderDirection","thresholds","dragMinThreshold","isObj","mouse","touch","shouldStart","velocity","computeVelocity","flickPower","flickMaxPages","computeDestination","rewindByDrag","Te","a","orthogonal","coordOf","getBaseEvent","timeOf","changedTouches","TouchEvent","onPointerDown","isDragging","Keyboard","_EventInterface10","keyboard","onKeydown","_disabled","normalizeKey","LazyLoad","_EventInterface11","isSequential","lazyLoad","entries","srcset","k","loadNext","check","preloadPages","load","onLoad","Pagination","paginationClasses","dir","getDirection","nextPage","ue","item","paginationDirection","_button","li","class","text","pageX","paginationKeyboard","createPagination","Sync","isParent","sync","navigate","Wheel","lastTime","deltaY","wheelMinThreshold","sleep","wheelSleep","releaseWheel","shouldPrevent","wheel","onWheel","Live","live","sr","DEFAULTS","speed","rewindSpeed","done","endCallback","transition","getSpeed","useScroll","Splide","initialState","states","State","_o","_E","_Splide","defaults","JSON","_proto","Extensions","_this","_C","_T","Fade","Component","component","_this$event","Constructor","protoProps","staticProps","_defineProperties","_createClass","STATES","CREATED","MOUNTED","IDLE","MOVING","SCROLLING","DRAGGING","DESTROYED","components","TYPES","parseInt","slideTransition","CarouselComponent","ngAfterViewChecked","splideInstance","expression","transitionDoneCallback","transitionEndHandler","doneCallback","createSlideTransition","splideTarget","defaultExtension","ngOnDestroy","CarouselSlideComponent","TemplateRef","GRADIENTS","isGradient","colors","simpleChanges","previousValue","stringify","SeriesDirective","viewContainerRef","random","toString","axisDirective","_axisDirective","isNullable","projection","console","warn","AxisDirective","chartComponent","ChartComponent","le","chart","hasChanged","series","userOptions","getOptions","seriesOptions","xAxisOptions","xAxis","setCategories","categories","PlotlineDirective","PlotbandDirective","Subscription","isOptionsProvided","undefined","getSeries","seriesDirectives","yAxis","getYAxis","axisDirectives","getXAxis","tooltip","getTooltip","responsive","rules","maxWidth","chartOptions","marginLeft","marginRight","getYAxisMobile","startOnTick","endOnTick","plotOptions","pointStart","marker","showMarkers","symbol","dataLabels","align","legendItemClick","afterAnimate","legend","itemStyle","fontWeight","fontFamily","hasAttribute","credits","isEmpty","I","highcharts","p","then","commonJsModule","default","seriesDirectivesSubscription","subscribe","updateChart","axisDirectivesSubscription","plotbandDirectivesSubscription","plotbandDirectives","plotlineDirectivesSubscription","plotlineDirectives","unsubscribe","seriesDirective","valueSuffix","F","valueDecimals","Q","tooltipDecimals","zones","dashStyle","linearGradient","x1","x2","y1","y2","stops","getZones","getDataLabels","innerText","opacity","dash","animation","serie","inactive","getInactiveState","getDynamicProperties","lineWidth","zoneAxis","step","clip","opposite","lineColor","gridLineColor","gridLineWidth","gridLineDashStyle","useHTML","formatter","tickInterval","tickmarkPlacement","plotLines","getPlotLines","plotBands","getPlotBands","plotlineDirective","DEFAULT","plotbandDirective","shadow","shared","borderColor","backgroundColor","outside","points","currentSeries","nextSeries","point","valueOf","tooltipMarkup","tooltipFormatterContextObject","toFixed","tooltipOptions","fontSize","DialogHeaderDirective","DialogBodyDirective","DialogFooterDirective","DialogComponent","ReplaySubject","open","_open","$actions","detached","_detached","actionsSubscription","asObservable","action","dialogElement","close","showModal","show","complete","openChange","ErrorComponent","error","_error","errorMessage","ElementRef","InputCheckboxComponent","OptionsElementAccessor","InputDateComponent","DatesElementAccessor","weekday","_weekday","inputElement","dateFormat","_selectionRanges","encodedPhrase","phraseIndex","encodedPhrases","phrases","phrase","isDateUnit","char","selectionStart","selectionEnd","selectionNextIndex","selectionPreviousIndex","precedingPhraseIndex","findIndex","searchPhrase","sum","selectionRange","selectionRangeIndex","selectionRanges","searchSelectionRange","searchSelectionRangeIndex","unmaskedChar","d","toSelectionRange","toChars","toSelectionNavigation","_selectionPosition","_value","getMaskedValue","setSelection","charPosition","setSelectionFromSelectionRange","setSelectionNext","setSelectionPrevious","setInputMask","character","selection","getSelection","selectionLength","sectionValue","test","padStart","startValue","substring","endValue","clearInputMask","setSelectionRange","CALENDAR_ICONS","InputsElementAccessor","ngControl","_","input","getInputFromDate","dateFromInput","setValue","valueAsDate","inputFromDate","minAsDate","maxAsDate","readonly","_readonly","fluid","_fluid","onDocumentClick","composedPath","calendarElement","onOpenChange","_datesElementAdapter","DatesElementAdapter","_isMouseEvent","onTouched","RegExp","pattern","getDateFromInput","onDateChange","activeDate","changeAsDate","dateString","onChange","currentDateIcon","patternFromFormat","getLocalDate","weekStartsOn","useAdditionalWeekYearTokens","viewQuery","InputCalendarComponent","$event","InputCalendarDirective","inputs","InputCalendarSectionDirective","callbacks","isWithinLowerBound","isWithinHigherBound","endDateUnitCallback","startDateUnitCallback","dates","startDateCallback","endDateCallback","intervalCallback","getRows","columnCount","chunk","onNext","activeDateChange","nextCallback","onPrevious","previousCallback","onSelected","valueChange","trackBy","features","adjustDateToAllowedRange","activeType","isYearDisabled","isMonthDisabled","onActiveType","selectedType","onValue","InputCalendarSectionDateComponent","InputCalendarSectionWeekComponent","InputCalendarSectionMonthComponent","InputCalendarSectionYearComponent","pipes","InputCalendarFooterComponent","locale","pipe","subMonths","eachDayOfInterval","isValidSwedishWeekday","isValidFinnishWeekday","isWeekend","LOCALE_ID","addYears","subYears","eachMonthOfInterval","startOfDecade","endOfDecade","eachYearOfInterval","InputEmailComponent","TextsElementAccessor","InputValueAccessor","POSITIVE_INFINITY","_isNgControl","valueAccessor","isPending","_isPending","isReady","isValid","valid","l","checkValidity","isInvalid","isEnabled","isDirty","dirty","_isDirty","isPristine","isTouched","touched","_isTouched","isUntouched","_setPropertySubject","_setPropertySubscription","markForCheck","markAsDirty","change","markAsTouched","writeValue","registerOnTouched","fn","registerOnChange","setDisabledState","nextUniqueId","hint","_hint","required","_required","_id","_name","validate","_validate","inputLabelDirective","inputHintDirective","inputMessageDirective","contentQueries","InputLabelDirective","InputHintDirective","InputMessageDirective","ListsElementAccessor","multiple","_multiple","selectedLabels","inputOptionDirectives","inputOptionDirective","sublabel","selectedValues","inputOptionElements","inputOptionElement","checked","setSelectedOptions","onSelectChange","setRequiredValidator","o","setCustomValidity","inputListDirective","listsElementAccessor","InputOptionDirective","InputSublabelDirective","_hostMutationObserver","MutationObserver","parentMarkForCheck","attributes","childList","subtree","characterData","disconnect","inputSublabelDirective","getTextContent","childNodes","Node","TEXT_NODE","InputOptionGroupComponent","determinate","_determinate","horizontal","_horizontal","small","_small","onNavigate","previousElementSibling","nextElementSibling","lastElementChild","code","tabIndex","_checked","radio","_radio","indeterminate","_indeterminate","onCheckboxChange","checkedChange","InputSelectComponent","detailsElement","relative","_relative","truncate","_truncate","_size","L","maxHeight","offsetHeight","getSelectedTitle","selectedLabel","onToggle","firstInputElementChecked","firstInputElement","hasOpened","W","_c","_d","ae","w","_e","_f","Ee","_g","onBlur","InputSwitchComponent","InputTelComponent","InputTextComponent","InputTextareaComponent","minRows","_minRows","maxRows","_maxRows","_resize","_ngControlSubscription","valueChanges","_setAutosizeSubject","_setAutosizeSubscription","lineHeight","f","currentHeight","scrollHeight","onInputChange","_pattern","maxlength","_maxlength","minlength","_minlength","TabLabelComponent","TabPanelComponent","HeaderDirective","FooterDirective","TabDirective","autofocus","_autofocus","TabsComponent","QueryList","tabs","tab","hasActive","hasAutofocus","tabDirective","isAutofocus","isHash","hash","endsWith","newLabel","oldLabel","switchTab","panels","tabsSubscription","setActiveTab","currentTarget","oldLabelIndex","emitEvent","newLabelIndex","history","replaceState","pathname","search","activeChange","HTMLAnchorElementDirective","i1","HTMLSectionElementDirective","encapsulation","TooltipLabelDirective","uuid","contexts","getContexts","tooltipLabelElement","setElementPosition","tooltipArrowElement","_isClipped","context","getContextBasedOnScreenEstate","setStyle","tooltipElement","setTooltipPosition","_position","trigger","_trigger","isMobile","_label","_isClick","setOpen","onHover","_isHover","onFocus","_isFocus","sourceElementRect","top","isClippedHorizontal","tooltipLabelDirective","setDocument","bodyElementRect","xCenterPosition","yCenterPosition","availableScreenEstate","anchorPosition","xPosition","yPosition","innerWidth","innerHeight","currentContext","resetElementPositionProperties","sourceElement","removeStyle","margin","toPx","sourceElementHeight","sourceElementWidth","yPositionCenter","xPositionCenter","offsetPosition","TooltipComponent"],"sources":["../ui/src/lib/calendar/calendar.module.ts","../ui/src/lib/carousel/carousel.module.ts","../ui/src/lib/chart/chart.module.ts","../ui/src/lib/dialog/dialog.module.ts","../ui/src/lib/error/error.module.ts","../ui/src/lib/heatmap/heatmap.component.html","../ui/src/lib/heatmap/heatmap.component.ts","../ui/src/lib/input/options.ts","../ui/src/lib/input/checkbox/checkbox.module.ts","../ui/src/lib/input/date/date.module.ts","../ui/src/lib/input/email/email.module.ts","../ui/src/lib/input/month/month.module.ts","../ui/src/lib/input/option-group/option-group.module.ts","../ui/src/lib/input/option/option.module.ts","../ui/src/lib/input/select/select.module.ts","../ui/src/lib/input/switch/switch.module.ts","../ui/src/lib/input/tel/tel.module.ts","../ui/src/lib/input/text/text.module.ts","../ui/src/lib/input/textarea/textarea.module.ts","../ui/src/lib/input/week/week.module.ts","../ui/src/lib/input/year/year.module.ts","../ui/src/lib/input/input-module.ts","../ui/src/lib/input/year/year.component.ts","../ui/src/lib/loading/loading.module.ts","../ui/src/lib/snackbar/snackbar.component.html","../ui/src/lib/snackbar/snackbar.component.ts","../ui/src/lib/snackbar/snackbar.service.ts","../ui/src/lib/snackbar/snackbar.module.ts","../ui/src/lib/tabs/tabs.module.ts","../ui/src/lib/tooltip/tooltip.module.ts","../ui/src/lib/truncate/truncate.module.ts","../ui/src/lib/calendar/calendar.component.ts","../ui/src/lib/calendar/calendar.component.html","../ui/src/lib/calendar/calendar.directive.ts","../ui/src/lib/calendar/day/day.component.ts","../ui/src/lib/calendar/month/month.component.html","../ui/src/lib/calendar/month/month.component.ts","../ui/src/lib/calendar/months/months.component.html","../ui/src/lib/calendar/months/months.component.ts","../ui/src/lib/calendar/quick-navigation/quick-navigation.component.html","../ui/src/lib/calendar/quick-navigation/quick-navigation.component.ts","../ui/src/lib/calendar/week/week.component.html","../ui/src/lib/calendar/week/week.component.ts","../ui/src/lib/calendar/years/years.component.html","../ui/src/lib/calendar/years/years.component.ts","../node_modules/@splidejs/splide/dist/js/splide.esm.js","../ui/src/lib/carousel/extensions/default.extension.ts","../ui/src/lib/carousel/carousel.component.html","../ui/src/lib/carousel/carousel.component.ts","../ui/src/lib/carousel/transitions/create-slide-transition.ts","../ui/src/lib/carousel/slide/carousel-slide.component.html","../ui/src/lib/carousel/slide/carousel-slide.component.ts","../ui/src/lib/chart/chart.component.ts","../ui/src/lib/dialog/dialog.component.html","../ui/src/lib/dialog/dialog.component.ts","../ui/src/lib/error/error.component.ts","../ui/src/lib/error/error.component.html","../ui/src/lib/input/checkbox/checkbox.component.html","../ui/src/lib/input/checkbox/checkbox.component.ts","../ui/src/lib/input/date/date.component.html","../ui/src/lib/input/date/date.component.ts","../ui/src/lib/input/dates-adapter.ts","../ui/src/lib/input/dates-accessor.ts","../ui/src/lib/input/dates.ts","../ui/src/lib/input/email/email.component.html","../ui/src/lib/input/email/email.component.ts","../ui/src/lib/input/inputs-accessor.ts","../ui/src/lib/input/inputs.ts","../ui/src/lib/input/lists-accessor.ts","../ui/src/lib/input/lists.ts","../ui/src/lib/input/option-group/option-group.component.html","../ui/src/lib/input/option-group/option-group.component.ts","../ui/src/lib/input/options-accessor.ts","../ui/src/lib/input/select/select.component.html","../ui/src/lib/input/select/select.component.ts","../ui/src/lib/input/switch/switch.component.html","../ui/src/lib/input/switch/switch.component.ts","../ui/src/lib/input/tel/tel.component.html","../ui/src/lib/input/tel/tel.component.ts","../ui/src/lib/input/text/text.component.html","../ui/src/lib/input/text/text.component.ts","../ui/src/lib/input/textarea/textarea.component.html","../ui/src/lib/input/textarea/textarea.component.ts","../ui/src/lib/input/texts-accessor.ts","../ui/src/lib/tabs/tab-child.component.html","../ui/src/lib/tabs/tabs.component.html","../ui/src/lib/tabs/tabs.component.ts","../ui/src/lib/tooltip/tooltip.component.ts","../ui/src/lib/tooltip/tooltip.component.html"],"sourcesContent":["import { CommonModule, DatePipe } from \"@angular/common\";\nimport { NgModule } from \"@angular/core\";\n\nimport { CalendarComponent } from \"./calendar.component\";\nimport { CalendarDirective } from \"./calendar.directive\";\nimport { DayComponent } from \"./day/day.component\";\nimport { MonthComponent } from \"./month/month.component\";\nimport { MonthsComponent } from \"./months/months.component\";\nimport { QuickNavigationComponent } from \"./quick-navigation/quick-navigation.component\";\nimport { WeekComponent } from \"./week/week.component\";\nimport { YearsComponent } from \"./years/years.component\";\n\n@NgModule({\n declarations: [\n QuickNavigationComponent,\n CalendarComponent,\n YearsComponent,\n MonthsComponent,\n MonthComponent,\n WeekComponent,\n DayComponent,\n CalendarDirective,\n ],\n imports: [CommonModule],\n providers: [DatePipe],\n exports: [\n QuickNavigationComponent,\n CalendarComponent,\n YearsComponent,\n MonthsComponent,\n MonthComponent,\n WeekComponent,\n DayComponent,\n CalendarDirective,\n ],\n})\nexport class CalendarModule {}\n","import { CommonModule } from \"@angular/common\";\nimport { NgModule } from \"@angular/core\";\n\nimport { CarouselComponent } from \"./carousel.component\";\nimport { CarouselSlideComponent } from \"./slide/carousel-slide.component\";\n\n@NgModule({\n declarations: [CarouselComponent, CarouselSlideComponent],\n imports: [CommonModule],\n exports: [CarouselComponent, CarouselSlideComponent],\n})\nexport class CarouselModule {}\n","import { CommonModule } from \"@angular/common\";\nimport { NgModule } from \"@angular/core\";\n\nimport { ChartComponent, SeriesDirective, AxisDirective, PlotlineDirective, PlotbandDirective } from \"./chart.component\";\n\n@NgModule({\n declarations: [ChartComponent, SeriesDirective, AxisDirective, PlotlineDirective, PlotbandDirective],\n imports: [CommonModule],\n exports: [ChartComponent, SeriesDirective, AxisDirective, PlotlineDirective, PlotbandDirective],\n})\nexport class ChartModule {}\n","import { CommonModule } from \"@angular/common\";\nimport { NgModule } from \"@angular/core\";\n\nimport { DialogComponent, DialogHeaderDirective, DialogBodyDirective, DialogFooterDirective } from \"./dialog.component\";\n\n@NgModule({\n declarations: [DialogComponent, DialogHeaderDirective, DialogBodyDirective, DialogFooterDirective],\n imports: [CommonModule],\n exports: [DialogComponent, DialogHeaderDirective, DialogBodyDirective, DialogFooterDirective],\n})\nexport class DialogModule {}\n","import { CommonModule } from \"@angular/common\";\nimport { NgModule } from \"@angular/core\";\n\nimport { ErrorComponent } from \"./error.component\";\n\n@NgModule({\n declarations: [ErrorComponent],\n imports: [CommonModule],\n exports: [ErrorComponent],\n})\nexport class ErrorModule {}\n","
\n \n \n \n \n {{ label }}\n \n \n \n \n \n \n {{ heatmapSectionDirective.label }}\n \n \n \n \n \n \n \n \n
{{ lowValue }} {{ unit }}
\n
\n {{ activeValue }} {{ activeValue !== null ? unit : \"\" }}\n
\n
{{ highValue }} {{ unit }}
\n
\n \n
\n","/* eslint-disable @typescript-eslint/no-non-null-assertion */\n\nimport {\n Component,\n ContentChildren,\n Directive,\n Input,\n ViewEncapsulation,\n QueryList,\n ChangeDetectionStrategy,\n AfterViewInit,\n HostListener,\n ViewChild,\n ElementRef,\n} from \"@angular/core\";\nimport { theme } from \"@vattenfall/design-system\";\nimport {\n Debounce,\n BooleanInput,\n coerceBooleanProperty,\n coerceNumberProperty,\n getZScores,\n hexToRgb,\n NumberInput,\n rgbToHex,\n} from \"@vattenfall/util\";\n\n/** Color variations supported by heatmap */\nconst COLORS = {\n green: theme.colors.secondary.green.DEFAULT,\n red: theme.colors.secondary.red.DEFAULT,\n blue: theme.colors.primary.blue.DEFAULT,\n yellow: theme.colors.primary.yellow.DEFAULT,\n};\n\n/** Type describing heatmap color variations */\ntype Color = keyof typeof COLORS;\n\n/**\n * Heat map table cell directly nested under ``\n */\n@Directive({\n selector: \"ui-heatmap-plot\",\n})\nexport class HeatmapPlotDirective {\n /** Label of column. Required. */\n @Input() label!: string;\n /** Data value of heatmap cell. Required. */\n @Input()\n get data(): number | null {\n return this._data;\n }\n set data(value: NumberInput) {\n this._data = coerceNumberProperty(value);\n }\n _data: number | null = null;\n /** Whether the table cell should be wrapped in a yellow outline */\n @Input()\n get outline(): boolean {\n return this._outline;\n }\n set outline(value: BooleanInput) {\n this._outline = coerceBooleanProperty(value);\n }\n private _outline = false;\n\n color = \"\";\n}\n\n/**\n * Heat map table row directly nested under ``\n */\n@Directive({\n selector: \"ui-heatmap-section\",\n})\nexport class HeatmapSectionDirective {\n /** Label of row. Required. */\n @Input() label!: string;\n @ContentChildren(HeatmapPlotDirective) readonly heatmapPlotDirectives!: QueryList;\n}\n\n/**\n * Vattenfall UI `ui-heatmap` is a graphical representation of data that uses a system of color-coding to represent different values.\n *\n * Data is drawn in two ordinal dimensions by declaring `` elements on the _x_ axis and nested `` elements on the `y` axis. A `unit` value can be provided for specifying the type of data that is being presented.\n *\n * A restricted range of brand colors can be used for representing low and and high values.\n */\n@Component({\n selector: \"ui-heatmap\",\n templateUrl: \"./heatmap.component.html\",\n styleUrls: [\"./heatmap.component.scss\"],\n encapsulation: ViewEncapsulation.Emulated,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class HeatmapComponent implements AfterViewInit {\n /** Unit of heatmap data */\n @Input() unit = \"\";\n /** Color of lowest value */\n @Input() lowColor: Color = \"blue\";\n /** Color of highest value */\n @Input() highColor: Color = \"red\";\n\n @ViewChild(\"tableElement\") private tableElement!: ElementRef;\n @ContentChildren(HeatmapPlotDirective, { descendants: true }) readonly heatmapPlotDirectives!: QueryList;\n @ContentChildren(HeatmapSectionDirective) readonly heatmapSectionDirectives!: QueryList;\n\n // Value of table cell on hover\n activeValue: number | null = null;\n\n /** Highest value in provided range of data */\n get highValue() {\n return Math.max(...this.heatmapPlotDirectives.map((heatmapPlotDirective) => heatmapPlotDirective.data!).filter(Number));\n }\n\n /** Lowest value in provided range of data */\n get lowValue() {\n return Math.min(...this.heatmapPlotDirectives.map((heatmapPlotDirective) => heatmapPlotDirective.data!).filter(Number));\n }\n\n /** Gradient from lowest to highest value in range of data */\n get gradient() {\n return `linear-gradient(90deg, ${COLORS[this.lowColor]}, ${COLORS[this.highColor]})`;\n }\n\n /** Minimum width of row labels */\n get width() {\n return (\n this.heatmapSectionDirectives.reduce(\n (chars, heatmapSectionDirective) =>\n chars > heatmapSectionDirective.label.length ? chars : heatmapSectionDirective.label.length,\n 0\n ) + \"ch\"\n );\n }\n\n /** Column labels */\n get labels() {\n return this.heatmapSectionDirectives.get(0)?.heatmapPlotDirectives.map((heatmapPlotDirective) => heatmapPlotDirective.label);\n }\n\n @HostListener(\"window:resize\")\n @Debounce(50)\n onResize() {\n this.setLabels();\n }\n\n ngAfterViewInit() {\n this.setColors();\n this.setLabels();\n }\n\n /**\n * Adjusts the number of labels displayed to match the available screen real estate\n */\n setLabels() {\n // Minimum spacing between labels\n const MIN_LABEL_SPACING = 14;\n\n const labelElements = this.tableElement.nativeElement.querySelectorAll(\"th[data-label]\");\n\n // Reset height and width to get the correct plot size\n labelElements.forEach((labelElement) => {\n labelElement.textContent = labelElement.dataset.label!;\n if (labelElement.scope === \"row\") labelElement.style.setProperty(\"height\", \"\");\n });\n\n const plotSize = this.tableElement.nativeElement.querySelector(\"td\")!.getBoundingClientRect().width;\n\n labelElements.forEach((labelElement, index) => {\n // Labels are to condensed\n if (plotSize < MIN_LABEL_SPACING) {\n // Remove text for every odd label\n if (index % 2 === 0) labelElement.textContent = \"\";\n else labelElement.textContent = labelElement.dataset.label!;\n // Ensure that there is no whitespace between rows when plot size is less than label line-height\n if (labelElement.scope === \"row\") labelElement.style.setProperty(\"height\", plotSize + \"px\");\n }\n });\n }\n\n /**\n * Sets heatmap plot background color based on its provided data property\n */\n setColors() {\n const zScores = getZScores(this.heatmapPlotDirectives.map((heatmapPlotDirective) => heatmapPlotDirective.data));\n // Calculate the range of z-scores\n const minScore = Math.min(...zScores.filter(Number));\n const maxScore = Math.max(...zScores.filter(Number));\n // Map the z-scores to an array of color codes\n zScores.forEach((zScore, index) => {\n // Use white background color for non-number values\n if (Number.isNaN(zScore)) this.heatmapPlotDirectives.get(index)!.color = \"#FFFFFF\";\n // Calculate the color of the cell based on the z-score\n const colorRatio = (zScore - minScore) / (maxScore - minScore);\n // Calculated color represented as hex value\n const color = rgbToHex(\n hexToRgb(COLORS[this.lowColor]).map((value, index) =>\n Math.round(value + colorRatio * (hexToRgb(COLORS[this.highColor])[index] - value))\n )\n );\n this.heatmapPlotDirectives.get(index)!.color = color;\n });\n }\n}\n","import { Directive, forwardRef, NgModule } from \"@angular/core\";\nimport { CheckboxRequiredValidator, NG_VALIDATORS } from \"@angular/forms\";\n\nimport { InputsModule } from \"./inputs\";\n\n/**\n * Validator for Vattenfall checkbox's required attribute in template-driven checkbox.\n * Current `CheckboxRequiredValidator` only work with `input type=checkbox` and does not\n * work with `ui-input`.\n */\n@Directive({\n selector: `\n ui-input[type=checkbox][required][formControlName], ui-input[type=checkbox][required][formControl], ui-input[type=checkbox][required][ngModel],\n ui-input[type=option][required][formControlName], ui-input[type=option][required][formControl], ui-input[type=option][required][ngModel],\n ui-input[type=switch][required][formControlName], ui-input[type=switch][required][formControl], ui-input[type=switch][required][ngModel],\n `,\n providers: [\n {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => OptionsCheckboxRequiredValidator),\n multi: true,\n },\n ],\n})\n// eslint-disable-next-line @angular-eslint/directive-class-suffix\nexport class OptionsCheckboxRequiredValidator extends CheckboxRequiredValidator {}\n\n/**\n * The `OptionsModule` contains utilities for input components that selects single options.\n */\n@NgModule({\n declarations: [OptionsCheckboxRequiredValidator],\n imports: [InputsModule],\n exports: [OptionsCheckboxRequiredValidator],\n})\nexport class OptionsModule {}\n","import { CommonModule } from \"@angular/common\";\nimport { NgModule } from \"@angular/core\";\n\nimport { OptionsModule } from \"../options\";\n\nimport { InputCheckboxComponent } from \"./checkbox.component\";\n\n@NgModule({\n declarations: [InputCheckboxComponent],\n imports: [CommonModule, OptionsModule],\n exports: [InputCheckboxComponent],\n})\nexport class InputCheckboxModule {}\n","import { CommonModule } from \"@angular/common\";\nimport { NgModule } from \"@angular/core\";\n\nimport { DatesModule } from \"../dates\";\n\nimport { InputDateComponent } from \"./date.component\";\n\n@NgModule({\n declarations: [InputDateComponent],\n imports: [CommonModule, DatesModule],\n exports: [InputDateComponent],\n})\nexport class InputDateModule {}\n","import { CommonModule } from \"@angular/common\";\nimport { NgModule } from \"@angular/core\";\n\nimport { InputsModule } from \"../inputs\";\n\nimport { InputEmailComponent } from \"./email.component\";\n\n@NgModule({\n declarations: [InputEmailComponent],\n imports: [CommonModule, InputsModule],\n exports: [InputEmailComponent],\n})\nexport class InputEmailModule {}\n","import { CommonModule } from \"@angular/common\";\nimport { NgModule } from \"@angular/core\";\n\nimport { DatesModule } from \"../dates\";\n\nimport { InputMonthComponent } from \"./month.component\";\n\n@NgModule({\n declarations: [InputMonthComponent],\n imports: [CommonModule, DatesModule],\n exports: [InputMonthComponent],\n})\nexport class InputMonthModule {}\n","import { CommonModule } from \"@angular/common\";\nimport { NgModule } from \"@angular/core\";\n\nimport { ListsModule } from \"../lists\";\n\nimport { InputOptionGroupComponent } from \"./option-group.component\";\n\n@NgModule({\n declarations: [InputOptionGroupComponent],\n imports: [CommonModule, ListsModule],\n exports: [InputOptionGroupComponent],\n})\nexport class InputOptionGroupModule {}\n","import { CommonModule } from \"@angular/common\";\nimport { NgModule } from \"@angular/core\";\n\nimport { OptionsModule } from \"../options\";\n\nimport { InputOptionComponent } from \"./option.component\";\n\n@NgModule({\n declarations: [InputOptionComponent],\n imports: [CommonModule, OptionsModule],\n exports: [InputOptionComponent],\n})\nexport class InputOptionModule {}\n","import { CommonModule } from \"@angular/common\";\nimport { NgModule } from \"@angular/core\";\n\nimport { ListsModule } from \"../lists\";\n\nimport { InputSelectComponent } from \"./select.component\";\n\n@NgModule({\n declarations: [InputSelectComponent],\n imports: [CommonModule, ListsModule],\n exports: [InputSelectComponent],\n})\nexport class InputSelectModule {}\n","import { CommonModule } from \"@angular/common\";\nimport { NgModule } from \"@angular/core\";\n\nimport { OptionsModule } from \"../options\";\n\nimport { InputSwitchComponent } from \"./switch.component\";\n\n@NgModule({\n declarations: [InputSwitchComponent],\n imports: [CommonModule, OptionsModule],\n exports: [InputSwitchComponent],\n})\nexport class InputSwitchModule {}\n","import { CommonModule } from \"@angular/common\";\nimport { NgModule } from \"@angular/core\";\n\nimport { InputsModule } from \"../inputs\";\n\nimport { InputTelComponent } from \"./tel.component\";\n\n@NgModule({\n declarations: [InputTelComponent],\n imports: [CommonModule, InputsModule],\n exports: [InputTelComponent],\n})\nexport class InputTelModule {}\n","import { CommonModule } from \"@angular/common\";\nimport { NgModule } from \"@angular/core\";\n\nimport { InputsModule } from \"../inputs\";\n\nimport { InputTextComponent } from \"./text.component\";\n\n@NgModule({\n declarations: [InputTextComponent],\n imports: [CommonModule, InputsModule],\n exports: [InputTextComponent],\n})\nexport class InputTextModule {}\n","import { CommonModule } from \"@angular/common\";\nimport { NgModule } from \"@angular/core\";\nimport { FormsModule, ReactiveFormsModule } from \"@angular/forms\";\n\nimport { InputsModule } from \"../inputs\";\n\nimport { InputTextareaComponent } from \"./textarea.component\";\n\n@NgModule({\n declarations: [InputTextareaComponent],\n imports: [CommonModule, FormsModule, ReactiveFormsModule, InputsModule],\n exports: [InputTextareaComponent],\n})\nexport class InputTextareaModule {}\n","import { CommonModule } from \"@angular/common\";\nimport { NgModule } from \"@angular/core\";\n\nimport { DatesModule } from \"../dates\";\n\nimport { InputWeekComponent } from \"./week.component\";\n\n@NgModule({\n declarations: [InputWeekComponent],\n imports: [CommonModule, DatesModule],\n exports: [InputWeekComponent],\n})\nexport class InputWeekModule {}\n","import { CommonModule } from \"@angular/common\";\nimport { NgModule } from \"@angular/core\";\n\nimport { DatesModule } from \"../dates\";\n\nimport { InputYearComponent } from \"./year.component\";\n\n@NgModule({\n declarations: [InputYearComponent],\n imports: [CommonModule, DatesModule],\n exports: [InputYearComponent],\n})\nexport class InputYearModule {}\n","import { NgModule } from \"@angular/core\";\n\nimport { InputCheckboxModule } from \"./checkbox/checkbox.module\";\nimport { InputDateModule } from \"./date/date.module\";\nimport { DatesModule } from \"./dates\";\nimport { InputEmailModule } from \"./email/email.module\";\nimport { InputsModule } from \"./inputs\";\nimport { ListsModule } from \"./lists\";\nimport { InputMonthModule } from \"./month/month.module\";\nimport { InputOptionGroupModule } from \"./option-group/option-group.module\";\nimport { InputOptionModule } from \"./option/option.module\";\nimport { OptionsModule } from \"./options\";\nimport { InputSelectModule } from \"./select/select.module\";\nimport { InputSwitchModule } from \"./switch/switch.module\";\nimport { InputTelModule } from \"./tel/tel.module\";\nimport { InputTextModule } from \"./text/text.module\";\nimport { InputTextareaModule } from \"./textarea/textarea.module\";\nimport { InputWeekModule } from \"./week/week.module\";\nimport { InputYearModule } from \"./year/year.module\";\n\n/**\n * The `InputModule` contains all input components.\n *\n * @deprecated – This module is deprecated. Please import each respective module for the input that you are using. This will improve the bundle size for your component.\n */\n@NgModule({\n imports: [\n InputCheckboxModule,\n InputDateModule,\n InputEmailModule,\n InputMonthModule,\n InputOptionModule,\n InputOptionGroupModule,\n InputSelectModule,\n InputSwitchModule,\n InputTelModule,\n InputTextModule,\n InputTextareaModule,\n InputWeekModule,\n InputYearModule,\n // TODO(stefan): Not sure why these modules needs to be imported for it to build but here they are\n DatesModule,\n InputsModule,\n ListsModule,\n OptionsModule,\n ],\n exports: [\n InputCheckboxModule,\n InputDateModule,\n InputEmailModule,\n InputMonthModule,\n InputOptionModule,\n InputOptionGroupModule,\n InputSelectModule,\n InputSwitchModule,\n InputTelModule,\n InputTextModule,\n InputTextareaModule,\n InputWeekModule,\n InputYearModule,\n // TODO(stefan): Not sure why these modules needs to be imported for it to build but here they are\n DatesModule,\n InputsModule,\n ListsModule,\n OptionsModule,\n ],\n})\nexport class InputModule {}\n","import { Component, ViewEncapsulation, ChangeDetectionStrategy, Input } from \"@angular/core\";\n\nimport { ArgTypes } from \"@storybook/angular/types-6-0\";\nimport { InputYear } from \"@vattenfall/util\";\n\nimport { DatesElementAccessor } from \"../dates-accessor\";\n\nexport const argTypesYear: ArgTypes = {\n format: {\n control: \"text\",\n description:\n \"Date format string. The characters in the format string wrapped between two single quotes characters (') are escaped. Two single quotes in a row, whether inside or outside a quoted sequence, represent a 'real' single quote. Default is `YYYY`.\",\n table: {\n category: \"Inputs\",\n type: {\n summary: \"string\",\n },\n },\n },\n};\n\n/**\n * A control for entering a date consisting of a year number.\n *\n * Values can be provided and read as a integer representing a year, in which case the properties ending in `AsDate` should be used. A custom `format` can be provided to support regional variations for displaying dates.\n *\n * Text inputs can be used as an Angular `FormControl`, in both reactive and template driven forms.\n */\n@Component({\n selector: \"ui-input[type=year]\",\n templateUrl: \"./year.component.html\",\n encapsulation: ViewEncapsulation.Emulated,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class InputYearComponent extends DatesElementAccessor {\n /**\n * Date format string.\n *\n * The characters in the format string wrapped between two single quotes characters (') are escaped. Two single quotes in a row, whether inside or outside a quoted sequence, represent a 'real' single quote.\n *\n * Read more at [date-fns](https://date-fns.org/v2.29.3/docs/parse).\n *\n * Default is `YYYY`.\n */\n @Input() format = \"YYYY\";\n}\n","import { CommonModule } from \"@angular/common\";\nimport { NgModule } from \"@angular/core\";\n\nimport { LoadingComponent } from \"./loading.component\";\n\n@NgModule({\n declarations: [LoadingComponent],\n imports: [CommonModule],\n exports: [LoadingComponent],\n})\nexport class LoadingModule {}\n","\n
\n
\n \n \n \n \n \n
\n
\n
\n {{ title }}\n
\n
\n {{ message }}\n
\n
\n
\n \n {{ buttonMessage }}\n \n
\n
\n
\n","import { Component, ElementRef, Input } from \"@angular/core\";\n@Component({\n selector: \"ui-snackbar\",\n templateUrl: \"./snackbar.component.html\",\n styleUrls: [\"./snackbar.component.scss\"],\n})\nexport class SnackbarComponent {\n constructor(public elementRef: ElementRef) {}\n\n /**\n * Optional, Type = info | success | error.\n */\n @Input() type = \"info\";\n /**\n * The message for the snackbar.\n */\n @Input() message = \"\";\n /**\n * Optional, If it is empty or not sent, the title will remain hidden.\n */\n @Input() title = \"\";\n /**\n * Optional, If it is empty or not sent, the button will remain hidden.\n */\n @Input() buttonMessage = \"\";\n /**\n * True to show the snackbar.\n */\n @Input() isDisplay = true;\n\n onClose() {\n const snackbarElement = this.elementRef.nativeElement.firstElementChild;\n snackbarElement && snackbarElement.classList.add(\"slide-out\");\n setTimeout(() => {\n this.isDisplay = false;\n }, 500);\n }\n}\n","/* eslint-disable @typescript-eslint/no-non-null-assertion */\nimport { DOCUMENT } from \"@angular/common\";\nimport { ApplicationRef, ComponentFactoryResolver, EmbeddedViewRef, Inject, Injectable, Injector } from \"@angular/core\";\n\nimport { SnackbarComponent } from \"./snackbar.component\";\n\n/**\n * Options for displaying the snackbar\n */\nexport type SnackbarOptions = {\n type?: string;\n /** Duration expressed in ms until snackbar will be hidden. If a negative number it will stay on screen (until the user manually removes it). Default is 5000ms. */\n duration?: number;\n /** The snackbar title. */\n title?: string;\n /** The message text to display in the button. If empty the button will stay hidden. */\n buttonMessage?: string;\n /** The element where the snackbar will be displayed. Default is `document.body`. */\n parentElement?: HTMLElement;\n /** Class to add on the wrapper element. */\n wrapperElementClass?: string;\n};\n\n/**\n * Default duration expressed in ms until snackbar will be hidden\n */\nconst DURATION_UNTIL_HIDDEN = 5_000;\n\n/**\n * This service allows the import of snackbar into components.\n *\n * Snackbar can be used to alert use to messages after a form submit.\n *\n * The reference to the service will be placed in the element ts file, and span slots like usual will be added to html file. The duration for how long the snack will be visible on screen can be customized as well as the parent element for the snackbar.\n *\n * **Usage**\n *\n * ```typescript\n * import { SnackbarService } from \"@vattenfall/ui\";\n *\n * @Component({ ... })\n * export class ExampleComponent {\n * constructor(private elementRef: ElementRef, private snackbarService: SnackbarService) {\n * // Displays a success message\n * this.snackbarService.message(\"We made it!\")\n * // Displays a message with a button\n * this.snackbarService.message(\"We made it!\", { buttonMessage: \"Close\" })\n * // Displays a message on the bottom of the component\n * this.snackbarService.message(\"We made it!\", { parentElement: elementRef.nativeElement })\n * }\n *\n * }\n */\n@Injectable({\n providedIn: \"root\",\n})\nexport class SnackbarService {\n parentElements = new Map();\n\n constructor(\n @Inject(DOCUMENT) private document: Document,\n private appRef: ApplicationRef,\n private resolver: ComponentFactoryResolver,\n private injector: Injector\n ) {}\n\n /**\n * Displays a snackbar message at the bottom of the screen (or parent element if provided) that is hidden after a specified duration of time.\n */\n message(message = \"\", options: SnackbarOptions = {}) {\n const parentElement = options.parentElement ?? this.document.body;\n // Add wrapper to parent element if it doesn't already exist\n if (!this.parentElements.has(parentElement)) {\n this.parentElements.set(parentElement, this.getWrapperElement(parentElement));\n parentElement.appendChild(this.parentElements.get(parentElement)!);\n }\n\n const duration = options.duration ?? DURATION_UNTIL_HIDDEN;\n const wrapperElement = this.parentElements.get(parentElement)!;\n\n if (options.wrapperElementClass) wrapperElement.classList.add(options.wrapperElementClass);\n\n const componentRef = this.resolver.resolveComponentFactory(SnackbarComponent).create(this.injector);\n\n componentRef.instance.message = message;\n\n if (options.buttonMessage) componentRef.instance.buttonMessage = options.buttonMessage;\n if (options.title) componentRef.instance.title = options.title;\n if (options.type) componentRef.instance.type = options.type;\n\n this.appRef.attachView(componentRef.hostView);\n\n const messageElement = (componentRef.hostView as EmbeddedViewRef).rootNodes[0] as HTMLElement;\n\n wrapperElement.appendChild(messageElement);\n\n const snackbarElement = componentRef.location.nativeElement.firstElementChild;\n\n setTimeout(() => {\n snackbarElement && snackbarElement.classList.add(\"slide-out\");\n }, duration);\n // setTimeout below 500ms extra time to see the effect slideOut before it's removed from the DOM\n setTimeout(() => {\n componentRef.instance.isDisplay = false;\n wrapperElement.removeChild(messageElement);\n }, duration + 500);\n }\n\n private getWrapperElement(parentElement: HTMLElement) {\n const isParentElementBody = this.document.body.isSameNode(parentElement);\n if (isParentElementBody) return this.getFixedPositionElement();\n return this.getAbsolutePositionElement();\n }\n\n private getFixedPositionElement() {\n const wrapperElement = this.document.createElement(\"div\");\n wrapperElement.style.bottom = \"0.625rem\";\n wrapperElement.style.left = \"50%\";\n wrapperElement.style.position = \"fixed\";\n wrapperElement.style.transform = \"translateX(-50%)\";\n wrapperElement.style.width = \"100%\";\n wrapperElement.style.zIndex = \"999\";\n return wrapperElement;\n }\n\n private getAbsolutePositionElement() {\n const wrapperElement = this.document.createElement(\"div\");\n wrapperElement.style.bottom = \"0.625rem\";\n wrapperElement.style.left = \"50%\";\n wrapperElement.style.position = \"absolute\";\n wrapperElement.style.transform = \"translateX(-50%)\";\n wrapperElement.style.width = \"100%\";\n wrapperElement.style.zIndex = \"999\";\n return wrapperElement;\n }\n}\n","import { CommonModule } from \"@angular/common\";\nimport { NgModule } from \"@angular/core\";\n\nimport { SnackbarComponent } from \"./snackbar.component\";\n\n@NgModule({\n declarations: [SnackbarComponent],\n imports: [CommonModule],\n exports: [SnackbarComponent],\n})\nexport class SnackbarModule {}\n","import { CommonModule } from \"@angular/common\";\nimport { NgModule } from \"@angular/core\";\n\nimport {\n HTMLAnchorElementDirective,\n HTMLSectionElementDirective,\n TabDirective,\n TabLabelComponent,\n TabPanelComponent,\n TabsComponent,\n HeaderDirective,\n FooterDirective,\n} from \"./tabs.component\";\n\n@NgModule({\n declarations: [\n TabsComponent,\n TabDirective,\n TabPanelComponent,\n TabLabelComponent,\n HeaderDirective,\n FooterDirective,\n HTMLAnchorElementDirective,\n HTMLSectionElementDirective,\n ],\n imports: [CommonModule],\n exports: [TabsComponent, TabDirective, TabPanelComponent, TabLabelComponent, HeaderDirective, FooterDirective],\n})\nexport class TabsModule {}\n","import { CommonModule } from \"@angular/common\";\nimport { NgModule } from \"@angular/core\";\n\nimport { TooltipComponent, TooltipLabelDirective } from \"./tooltip.component\";\n\n@NgModule({\n declarations: [TooltipComponent, TooltipLabelDirective],\n imports: [CommonModule],\n exports: [TooltipComponent, TooltipLabelDirective],\n})\nexport class TooltipModule {}\n","import { CommonModule } from \"@angular/common\";\nimport { NgModule } from \"@angular/core\";\n\nimport { TruncateComponent } from \"./truncate.component\";\n\n@NgModule({\n declarations: [TruncateComponent],\n imports: [CommonModule],\n exports: [TruncateComponent],\n})\nexport class TruncateModule {}\n","import { ChangeDetectorRef, Component, Input } from \"@angular/core\";\n\nimport { CalendarDirective, DateRange } from \"./calendar.directive\";\n\n/**\n * Vattenfall UI Calendar provides the functionality for selecting a date, month or year from a calendar.\n * The calendar outputs a user selected date range depending on the type when creating it. Default calendar type is \"day\"\n * Usage:\n * To use a day calendar (i.e to select a single day from a given month)\n * pass in a Date object as [date] property and listen to (dateChange) event emmiter for date selection.\n * If [date] input is not passed in - the calendar will display current month with no preselected date.\n * ` `\n *\n * To select a range of date:\n * pass in [type]=\"'month'\" input if you want to select a month or [type]=\"'year\" for year selection.\n * To mark a pre selected range - pass in a DateRange object via the [dateRange] input.\n * To receive the range selection from the calendar, subscribe to the (dateRangeChange) output.\n * ` \n */\n@Component({\n selector: \"ui-calendar\",\n templateUrl: \"./calendar.component.html\",\n host: {\n class: \"ds-p-sm ds-block\",\n },\n})\nexport class CalendarComponent extends CalendarDirective {\n constructor(public changeDetectorRef: ChangeDetectorRef) {\n super(changeDetectorRef);\n }\n @Input()\n override get selected(): DateRange {\n return this._selected;\n }\n override set selected(range: DateRange) {\n this._selected = range;\n }\n override _selected!: DateRange;\n}\n","\n \n \n \n \n \n","import { AfterContentInit, ChangeDetectorRef, Directive, EventEmitter, Input, Output } from \"@angular/core\";\nimport {\n addDays,\n endOfDay,\n endOfISOWeek,\n endOfMonth,\n isBefore,\n startOfDay,\n startOfISOWeek,\n startOfMonth,\n subDays,\n} from \"@vattenfall/util\";\nconst VERY_BIG_NUMBER = 9999999;\n\nexport type CalendarType = \"day\" | \"week\" | \"month\" | \"months\" | \"year\";\n\nexport class DateRange {\n constructor(readonly start: Date, readonly end = new Date()) {}\n}\n\n@Directive({\n selector: \"[ui-calendar]\",\n})\nexport class CalendarDirective implements AfterContentInit {\n constructor(public changeDetectorRef: ChangeDetectorRef) {}\n\n @Output()\n readonly selectedChange: EventEmitter = new EventEmitter();\n\n ngAfterContentInit() {\n // Set the default resolution. Show the view that the calendar is initialized with.\n this.resolution = this.type;\n // Set active date (the date that the calendar default screen will be built around)\n this.active = this.selected || new DateRange(new Date());\n }\n\n @Input() type: CalendarType = \"day\";\n\n // Holds the value for what type of calendar this component will render. By default we show a month of days.\n _resolution!: CalendarType;\n @Input()\n get resolution(): CalendarType {\n return this._resolution;\n }\n set resolution(resolution: CalendarType) {\n this._resolution = resolution;\n }\n\n _dateRange!: DateRange;\n\n @Input()\n get dateRange(): DateRange {\n return this._dateRange;\n }\n set dateRange(range: DateRange) {\n this._dateRange = range;\n }\n\n @Output()\n readonly dateRangeChange: EventEmitter = new EventEmitter();\n\n /**\n * min - returns the earliest selectable date in the calendar.\n */\n _min!: Date;\n @Input()\n get min(): Date {\n // Otherwise create the date from start of the date provided and return\n return this._min ? startOfDay(this._min as Date) : subDays(startOfDay(new Date()), VERY_BIG_NUMBER);\n }\n set min(date: Date) {\n this._min = date;\n }\n\n /**\n * _max - the maximum selectable date\n */\n _max!: Date;\n @Input()\n get max(): Date {\n return this._max ? endOfDay(this._max) : addDays(startOfDay(new Date()), VERY_BIG_NUMBER);\n }\n /**\n * set max date\n */\n set max(date: Date) {\n this._max = date;\n }\n\n /**\n * DisabledDateRanges is introduced to allow disabling date ranges.\n * Date ranges are disabled between the minimum and maximum selectable intervals in the calendar.\n */\n _disabledDateRanges?: DateRange[];\n\n /**\n * returns the Disabled date range\n */\n @Input()\n get disabledDateRanges() {\n return this._disabledDateRanges ?? [];\n }\n /**\n *\n */\n set disabledDateRanges(range: DateRange[]) {\n this._disabledDateRanges = range;\n }\n\n /**\n * Holds the currently selected range in the calendar.\n */\n _selected!: DateRange;\n\n /**\n * returns the selected range\n */\n @Input()\n get selected() {\n return this._selected;\n }\n /**\n *\n */\n set selected(range: DateRange) {\n this._active = range;\n this._selected = range;\n }\n\n _active!: DateRange;\n @Input()\n get active(): DateRange {\n this.active = new DateRange(this._active.start, this._active.end);\n return this._active;\n }\n set active(range: DateRange) {\n this._active = range;\n }\n\n @Output() readonly activeChange: EventEmitter = new EventEmitter();\n\n onResolutionChange(resolution: CalendarType) {\n this.resolution = resolution;\n this.changeDetectorRef.detectChanges();\n }\n /**\n * Selects a date range with start and end.\n * @param range - the range with start|end dates.\n */\n selectRange(range: DateRange) {\n // Only emmit change if we are not zoomed in the calendar.\n // If the zoomed legnth is one, then we are expecting that the calendar is just changing resolution via the quick navigation.\n if (this.resolution === this.type) {\n this.selected = range;\n this.selectedChange.emit(range);\n this.active = range;\n this.changeDetectorRef.detectChanges();\n } else {\n this.updateActive(range);\n // if resolution is different to calendar type, that means that we are in zoomed state,\n // reset zoom after updating active to neutralize side effects\n this.resolution = this.type;\n this.changeDetectorRef.detectChanges();\n }\n }\n\n public updateActive(range: DateRange) {\n const { start: activeStart, end: activeEnd } = this.active;\n\n switch (this.resolution) {\n case \"year\": {\n activeStart.setFullYear(range.start.getFullYear());\n activeEnd.setFullYear(range.end.getFullYear());\n break;\n }\n case \"month\": {\n activeStart.setMonth(range.start.getMonth());\n activeEnd.setMonth(range.end.getMonth());\n break;\n }\n\n case \"day\": {\n const { start: activeStart, end: activeEnd } = this.active;\n activeStart.setDate(range.start.getDate());\n activeEnd.setDate(range.end.getDate());\n break;\n }\n default:\n break;\n }\n this.active = new DateRange(activeStart, activeEnd);\n }\n onActiveChange(range: DateRange) {\n this.active = range;\n }\n /**\n * Create a month around the given date (i.e return an all weeks of the month as an array of 7 days. )\n * @param date - the date to build the month around\n * @returns - an array of weeks where each week is an array of days.\n */\n get month(): Date[][] {\n const calendar = [];\n const active = this.active && this.active.start ? this.active.start : new Date();\n const startDate = startOfISOWeek(startOfMonth(active));\n const end = endOfMonth(endOfISOWeek(active));\n // Start with one day before start of month,\n // to correct the issue of momnths starting on a Sunday (ISO standard)\n let current = subDays(startDate, 1);\n\n while (isBefore(current, end)) {\n calendar.push(\n Array(7)\n .fill(null)\n .map(() => {\n current = addDays(current, 1);\n return current;\n })\n );\n }\n return calendar;\n }\n\n isValidRange(range: DateRange) {\n return range && range.start && range.end && isBefore(range.start, range.end);\n }\n}\n","import { ChangeDetectorRef, Component, EventEmitter, HostListener, Input, Output } from \"@angular/core\";\n\nimport { CalendarDirective } from \"../calendar.directive\";\n\n@Component({\n selector: \"ui-day\",\n // eslint-disable-next-line prettier/prettier\n template: `{{ day | date: \"dd\" }} \n`,\n host: {\n class: \"ds-day\",\n \"[class.ds-is-selected]\": \"isSelected\",\n \"[class.ds-is-disabled]\": \"isDisabled\",\n \"[class.ds-invisible]\": \"isHidden\",\n \"[attr.tabindex]\": \"isDisabled ? '-1' : '0'\",\n },\n})\nexport class DayComponent extends CalendarDirective {\n @Input() day!: Date;\n /**\n * If the day is hidden from the view (i.e not belonging to the current month view)\n */\n @Input() isHidden!: boolean;\n /**\n * If the day is disabled (ex outside min|max dates in the calenar)\n */\n @Input() isDisabled!: boolean;\n /**\n * Marks the day as selected\n */\n @Input() isSelected!: boolean;\n\n @Output() readonly selectedDayChange: EventEmitter = new EventEmitter();\n\n constructor(changeDetectorRef: ChangeDetectorRef) {\n super(changeDetectorRef);\n }\n\n /**\n * Emits the day as selected.\n */\n @HostListener(\"click\") onClick() {\n this.selectedDayChange.emit(this.day);\n }\n @HostListener(\"keydown.enter\") onKeydownHandler() {\n this.selectedDayChange.emit(this.day);\n }\n}\n","\n \n \n {{ day | date: \"EEEEE\" }} \n \n \n \n \n \n \n \n
\n","import { ChangeDetectorRef, Component, EventEmitter, Output, ViewEncapsulation } from \"@angular/core\";\nimport { endOfDay, isSameMonth, isWithinInterval, startOfDay } from \"@vattenfall/util\";\n\nimport { CalendarDirective, DateRange } from \"../calendar.directive\";\n\n@Component({\n selector: \"ui-month\",\n styleUrls: [\"./month.component.scss\"],\n templateUrl: \"./month.component.html\",\n encapsulation: ViewEncapsulation.Emulated,\n host: {\n \"[class.ds-invisible]\": \"hidden\",\n },\n})\nexport class MonthComponent extends CalendarDirective {\n @Output()\n readonly selectDayEvent: EventEmitter = new EventEmitter();\n constructor(changeDetectorRef: ChangeDetectorRef) {\n super(changeDetectorRef);\n }\n\n /**\n * Selects a day from the calendar view.\n * @param day - the day to select\n */\n select(day: Date): void {\n this.selectDayEvent.emit(new DateRange(day));\n }\n\n /**\n *\n * @param date - returns true if the date is not in the same month as the current date\n */\n notInSameMonth(date: Date) {\n const dateToCompare = this.selected.start || new Date();\n return !isSameMonth(date, dateToCompare);\n }\n\n /**\n *\n * @param date - compares if two dates are the same\n */\n isSelected(date: Date): boolean {\n if (!this.isValidRange(this.selected)) return false;\n return isWithinInterval(date, this.selected);\n }\n /**\n * This function will check if a given date needs to be removed from the view. For example if the date is not part of the month we are currently showing.\n * @param date - checks if the current view needs to hide a given date from the calendar.\n * @returns - boolean - true if its not in the same month\n */\n isHidden(date: Date) {\n const active = this.active && this.active.start ? this.active.start : new Date();\n return !isSameMonth(date, active);\n }\n\n /**\n * This function checks if a given date should be disabled.\n * It is disabled if the date is outside the min/max range or within the disabledDateRanges.\n * @param date - The date to check for being outside the min/max scope or within disabledDateRanges.\n * @returns a boolean value.\n */\n isDisabled(date: Date) {\n const isOutsideMinAndMaxRange = !isWithinInterval(date, { start: startOfDay(this.min), end: startOfDay(this.max) });\n const isDateDisabledInRanges = this.disabledDateRanges.some((range: DateRange) =>\n isWithinInterval(date, { start: startOfDay(range.start), end: startOfDay(range.end) })\n );\n\n return isDateDisabledInRanges || isOutsideMinAndMaxRange;\n }\n\n /**\n * Emit the newly selected day to the parent element\n * @param day - the selected date to be emmited\n */\n onSelectedChange(day: Date) {\n const selectedMonth = new DateRange(startOfDay(day), endOfDay(day));\n this.selectDayEvent.emit(selectedMonth);\n }\n}\n","\n\n \n {{ month | date: \"LLLL\" }}\n \n \n","import { ChangeDetectorRef, Component, EventEmitter, Output } from \"@angular/core\";\nimport {\n addMonths,\n areIntervalsOverlapping,\n endOfMonth,\n isAfter,\n isBefore,\n startOfMonth,\n startOfYear,\n isSameMonth,\n startOfDay,\n} from \"@vattenfall/util\";\n\nimport { endOfDay } from \"date-fns\";\n\nimport { CalendarDirective, DateRange } from \"../calendar.directive\";\n\n@Component({\n selector: \"ui-months\",\n templateUrl: \"./months.component.html\",\n styles: [\":host { width: 100% }\"],\n})\nexport class MonthsComponent extends CalendarDirective {\n /**\n * Outputs the selected month range from the calendar.\n */\n @Output()\n readonly selectMonthEvent = new EventEmitter();\n\n constructor(public changeDetectorRef: ChangeDetectorRef) {\n super(changeDetectorRef);\n }\n /**\n * Setup 12 element array - to store 12 dates for each month\n */\n get months(): Date[] {\n const activeOrSelectedDay: DateRange = this.active ? this.active : new DateRange(new Date());\n // Create an array of 12 empty spaces to be filled with month start dates.\n const months = Array(12).fill(null);\n // Get the first day of the year for the current active or selected day.\n const firstDayOfYear = startOfYear(activeOrSelectedDay.start);\n // For each empty record create the first of the month, each index.\n // return example [1 Jan yyyy, 1 Feb yyyy ..... , 1 Dec yyyy];\n return months.map((month, index) => new Date(addMonths(firstDayOfYear, index)));\n }\n\n /**\n * This function verifies whether the given month falls within the specified min and max date inputs.\n * A month is considered disabled only when all of its days fall within the disabled date ranges.\n * If the month contains at least one day available for selection, it will be displayed as an option.\n * @param month - The month to check for disabled status.\n * @returns a boolean value.\n */\n isDisabled(month: Date): boolean {\n const monthRange = new DateRange(startOfMonth(month), endOfMonth(month));\n const isMonthRangeOverlapping = areIntervalsOverlapping(monthRange, { start: startOfDay(this.min), end: endOfDay(this.max) });\n /**\n * If the month range start is before the minimum date, it returns the minimum date.\n * Otherwise, it returns the month range start.\n */\n const getStartDate = startOfDay(isBefore(monthRange.start, this.min) ? this.min : monthRange.start);\n const isDateWithinDisabledRanges = this.disabledDateRanges.some(\n (range: DateRange) =>\n (isBefore(range.start, getStartDate) || isSameMonth(range.start, getStartDate)) && isAfter(range.end, monthRange.end)\n );\n\n return !isMonthRangeOverlapping || isDateWithinDisabledRanges;\n }\n\n /**\n * Checks if a given date belongs to the currently selected range\n * @param startOfMonth the date to check\n * @returns boolean value if the date is in the same month as the selected range\n */\n isSelected(month: Date): boolean {\n // Return false if there is no selection yet\n if (!this.selected) return false;\n const { start, end } = this.selected;\n // Check if the selection spans across months\n if (isAfter(end, endOfMonth(month)) && isBefore(start, startOfMonth(addMonths(month, 1)))) {\n return true;\n }\n\n // Check if the selection is within the current month\n const monthRange = new DateRange(startOfMonth(month), endOfMonth(month));\n return isSameMonth(monthRange.start, start) && isSameMonth(monthRange.end, end);\n }\n /**\n * Will trigger the output with the selected month range\n * @param month - the date to buid the month around\n */\n selectMonthRange(month: Date): void {\n const monthRange = new DateRange(startOfMonth(month), endOfMonth(month));\n this.selectMonthEvent.emit(monthRange);\n }\n}\n","\n \n \n
\n","import { DatePipe } from \"@angular/common\";\nimport {\n ChangeDetectorRef,\n Component,\n ElementRef,\n EventEmitter,\n OnChanges,\n Output,\n Renderer2,\n SimpleChanges,\n ViewChild,\n ViewEncapsulation,\n} from \"@angular/core\";\n\nimport { CalendarDirective, CalendarType } from \"../calendar.directive\";\n\n@Component({\n selector: \"ui-quick-navigation\",\n templateUrl: \"./quick-navigation.component.html\",\n styleUrls: [\"./quick-navigation.component.scss\"],\n encapsulation: ViewEncapsulation.Emulated,\n})\nexport class QuickNavigationComponent extends CalendarDirective implements OnChanges {\n constructor(public changeDetectorRef: ChangeDetectorRef, private datePipe: DatePipe, private renderer: Renderer2) {\n super(changeDetectorRef);\n }\n\n @Output()\n readonly resolutionChange: EventEmitter = new EventEmitter();\n\n @ViewChild(\"displayMonth\")\n public displayMonth!: ElementRef;\n @ViewChild(\"displayYear\")\n public displayYear!: ElementRef;\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes.active.currentValue) {\n if (this.displayMonth) {\n const month = this.datePipe.transform(changes.active.currentValue.start, \"LLLL\");\n if (month) this.renderer.setProperty(this.displayMonth.nativeElement, \"innerText\", month);\n }\n if (this.displayYear) {\n const year = this.datePipe.transform(changes.active.currentValue.start, \"yyyy\");\n if (year) this.renderer.setProperty(this.displayYear.nativeElement, \"innerText\", year);\n }\n }\n }\n\n zoomIn(resolution: CalendarType) {\n // Then zoom into the resoution.\n this.resolutionChange.emit(resolution);\n }\n zoomOut(): void {\n // Reset resolution to its default one.\n this.resolutionChange.emit(this.type);\n }\n}\n","\n \n \n \n {{ day | date: \"EEEEE\" }} \n \n \n \n \n \n {{ week[0] | date: \"ww\" }} \n \n \n \n \n
\n","import { ChangeDetectorRef, Component, EventEmitter, Input, Output } from \"@angular/core\";\nimport { endOfISOWeek, isAfter, isBefore, isSameDay, isWithinInterval, startOfISOWeek } from \"@vattenfall/util\";\n\nimport { CalendarDirective, DateRange } from \"../calendar.directive\";\n\n@Component({\n selector: \"ui-week\",\n templateUrl: \"./week.component.html\",\n styles: [\"table {width: 100%; border-collapse: colapse;}\"],\n})\nexport class WeekComponent extends CalendarDirective {\n @Input() week!: Date[];\n\n @Output() readonly selectedWeekEvent: EventEmitter = new EventEmitter();\n constructor(changeDetectorRef: ChangeDetectorRef) {\n super(changeDetectorRef);\n }\n /**\n * Selects the week the day belongs to.\n * @param day - select the week by day\n */\n public select(day: Date) {\n const start = startOfISOWeek(day);\n const end = endOfISOWeek(day);\n const selected = new DateRange(start, end);\n this.selectedWeekEvent.emit(selected);\n }\n /**\n * Checks if the given day is within the selected week\n * @param day - day to check\n * @returns - boolean value if the day is within the selected week\n */\n isSelectedWeek(day: Date) {\n if (!this.selected) return false;\n const weekRange = new DateRange(startOfISOWeek(day), endOfISOWeek(day));\n return isSameDay(weekRange.start, this.selected.start) && isSameDay(weekRange.end, this.selected.end);\n }\n\n /**\n * This function checks if a given date should be disabled.\n * It is disabled if the date is outside the min/max range or within the disabledDateRanges.\n * @param date - The date to check for being outside the min/max scope or within disabledDateRanges.\n * @returns a boolean value.\n */\n isDisabled(date: Date): boolean {\n const endOfWeeKDate = endOfISOWeek(date);\n const isOutsideMinAndMaxRange = !isWithinInterval(endOfWeeKDate, { start: this.min, end: this.max });\n const isWithinDisabledRanges = this.disabledDateRanges.some(\n (range: DateRange) => isBefore(range.start, startOfISOWeek(date)) && isAfter(range.end, endOfWeeKDate)\n );\n\n return isWithinDisabledRanges || isOutsideMinAndMaxRange;\n }\n}\n","\n\n","import { ChangeDetectorRef, Component, EventEmitter, OnInit, Output } from \"@angular/core\";\nimport {\n areIntervalsOverlapping,\n endOfYear,\n getYear,\n isAfter,\n isBefore,\n isSameYear,\n lastDayOfYear,\n startOfYear,\n} from \"@vattenfall/util\";\n\nimport { CalendarDirective, DateRange } from \"../calendar.directive\";\n\n@Component({\n selector: \"ui-years\",\n templateUrl: \"./years.component.html\",\n})\nexport class YearsComponent extends CalendarDirective implements OnInit {\n constructor(changeDetectorRef: ChangeDetectorRef) {\n super(changeDetectorRef);\n }\n /**\n * Will create an array with SIZE elements, in a subsequent range. Ex: if param.size = 3 and param.startAt = 2015, the array [2015, 2016, 2017] will be generated\n * @param size - how many elements in the range we want to have\n * @param startAt - at what number we want the range to start at, defaults 0\n * @returns\n */\n private range(size: number, startAt = 0) {\n return [...Array(size).keys()].map((index) => index + startAt);\n }\n\n ngOnInit() {\n // If we have pre-selected date passed in - build years around the selected year.\n if (this.selected) {\n const { start } = this.selected;\n if (start) this.years = this.range(12, start.getFullYear() - 6);\n }\n }\n /**\n * Setup 12 element array - to store 12 dates for each month\n */\n years = this.range(12, new Date().getFullYear() - 6);\n /**\n * Outputs the newly selected value from the calendar.\n */\n @Output()\n readonly selectYearEvent: EventEmitter = new EventEmitter();\n\n /**\n * Focuses the next element via keyboard (tab or arrow)\n * @param el - the currently focused element\n */\n focusNext(el: HTMLElement) {\n const sibling: HTMLElement = el.nextSibling as HTMLElement;\n if (sibling) sibling.focus();\n }\n /**\n * Focuses the previous element via keyboard (tab or arrow)\n * @param el - the currently focused element\n */\n focusPrevious(el: HTMLElement) {\n const sibling: HTMLElement = el.previousSibling as HTMLElement;\n if (sibling) sibling.focus();\n }\n\n /**\n * This function verifies whether the given year falls within the specified min and max date inputs.\n * A year is considered disabled only when all of its days/moths fall within the disabled date ranges.\n * If the year contains at least one day available for selection, it will be displayed as an option.\n * @param year - The year to check for disabled status.\n * @returns a boolean value.\n */\n isDisabled(year: number): boolean {\n // Create a year date from string, ex: new Date('2021') => will output 2021-01-01\n const firstDayOfYear = new Date(`${year}-01-01`);\n const dateRange = new DateRange(firstDayOfYear, lastDayOfYear(firstDayOfYear));\n const isDateRangeOverlapping = areIntervalsOverlapping(dateRange, { start: this.min, end: this.max });\n const isDateWithinDisabledRanges = this.disabledDateRanges.some(\n (range: DateRange) =>\n isSameYear(range.start, dateRange.start) || (isBefore(range.start, dateRange.start) && isAfter(range.end, dateRange.end))\n );\n\n return !isDateRangeOverlapping || isDateWithinDisabledRanges;\n }\n\n /**\n * Checks if a given year is currently selected in the calendar.\n * @param year - the year to check against\n * @returns\n */\n isSelectedYear(year: number): boolean {\n // return if there is no `dateRange` does not hold any value, ie no year selected yet.\n if (!this.selected) return false;\n const selectedYearStart = getYear(this.selected.start);\n const selectedYearEnd = getYear(this.selected.end);\n return selectedYearStart === year && selectedYearEnd === year;\n }\n /**\n * Select the year range by creating a date with year sting and taking startOfYear and endOfYear\n * @param year - the selected year\n */\n selectYearRange(year: number): void {\n // Create a year date from string, ex: new Date('2021') => will output 2021-01-01\n const yearDate = new Date(`${year}`);\n // Set the range for the selected year from beginning of year (January 1) until last day (December 31)\n const selectedYear = { start: startOfYear(yearDate), end: endOfYear(yearDate) };\n this.selectYearEvent.emit(selectedYear);\n }\n // Update the current years array with 12 years in the past.\n past() {\n this.years = this.range(12, this.years[0] - 12);\n this.changeDetectorRef.detectChanges();\n }\n // Update the current years array with 12 years in the future.\n future() {\n const lastVisibleYear = this.years[this.years.length / 2];\n this.years = this.range(12, lastVisibleYear + 6);\n this.changeDetectorRef.detectChanges();\n }\n}\n","function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\n/*!\n * Splide.js\n * Version : 4.1.4\n * License : MIT\n * Copyright: 2022 Naotoshi Fujita\n */\nvar MEDIA_PREFERS_REDUCED_MOTION = \"(prefers-reduced-motion: reduce)\";\nvar CREATED = 1;\nvar MOUNTED = 2;\nvar IDLE = 3;\nvar MOVING = 4;\nvar SCROLLING = 5;\nvar DRAGGING = 6;\nvar DESTROYED = 7;\nvar STATES = {\n CREATED: CREATED,\n MOUNTED: MOUNTED,\n IDLE: IDLE,\n MOVING: MOVING,\n SCROLLING: SCROLLING,\n DRAGGING: DRAGGING,\n DESTROYED: DESTROYED\n};\n\nfunction empty(array) {\n array.length = 0;\n}\n\nfunction slice(arrayLike, start, end) {\n return Array.prototype.slice.call(arrayLike, start, end);\n}\n\nfunction apply(func) {\n return func.bind.apply(func, [null].concat(slice(arguments, 1)));\n}\n\nvar nextTick = setTimeout;\n\nvar noop = function noop() {};\n\nfunction raf(func) {\n return requestAnimationFrame(func);\n}\n\nfunction typeOf(type, subject) {\n return typeof subject === type;\n}\n\nfunction isObject(subject) {\n return !isNull(subject) && typeOf(\"object\", subject);\n}\n\nvar isArray = Array.isArray;\nvar isFunction = apply(typeOf, \"function\");\nvar isString = apply(typeOf, \"string\");\nvar isUndefined = apply(typeOf, \"undefined\");\n\nfunction isNull(subject) {\n return subject === null;\n}\n\nfunction isHTMLElement(subject) {\n try {\n return subject instanceof (subject.ownerDocument.defaultView || window).HTMLElement;\n } catch (e) {\n return false;\n }\n}\n\nfunction toArray(value) {\n return isArray(value) ? value : [value];\n}\n\nfunction forEach(values, iteratee) {\n toArray(values).forEach(iteratee);\n}\n\nfunction includes(array, value) {\n return array.indexOf(value) > -1;\n}\n\nfunction push(array, items) {\n array.push.apply(array, toArray(items));\n return array;\n}\n\nfunction toggleClass(elm, classes, add) {\n if (elm) {\n forEach(classes, function (name) {\n if (name) {\n elm.classList[add ? \"add\" : \"remove\"](name);\n }\n });\n }\n}\n\nfunction addClass(elm, classes) {\n toggleClass(elm, isString(classes) ? classes.split(\" \") : classes, true);\n}\n\nfunction append(parent, children) {\n forEach(children, parent.appendChild.bind(parent));\n}\n\nfunction before(nodes, ref) {\n forEach(nodes, function (node) {\n var parent = (ref || node).parentNode;\n\n if (parent) {\n parent.insertBefore(node, ref);\n }\n });\n}\n\nfunction matches(elm, selector) {\n return isHTMLElement(elm) && (elm[\"msMatchesSelector\"] || elm.matches).call(elm, selector);\n}\n\nfunction children(parent, selector) {\n var children2 = parent ? slice(parent.children) : [];\n return selector ? children2.filter(function (child) {\n return matches(child, selector);\n }) : children2;\n}\n\nfunction child(parent, selector) {\n return selector ? children(parent, selector)[0] : parent.firstElementChild;\n}\n\nvar ownKeys = Object.keys;\n\nfunction forOwn(object, iteratee, right) {\n if (object) {\n (right ? ownKeys(object).reverse() : ownKeys(object)).forEach(function (key) {\n key !== \"__proto__\" && iteratee(object[key], key);\n });\n }\n\n return object;\n}\n\nfunction assign(object) {\n slice(arguments, 1).forEach(function (source) {\n forOwn(source, function (value, key) {\n object[key] = source[key];\n });\n });\n return object;\n}\n\nfunction merge(object) {\n slice(arguments, 1).forEach(function (source) {\n forOwn(source, function (value, key) {\n if (isArray(value)) {\n object[key] = value.slice();\n } else if (isObject(value)) {\n object[key] = merge({}, isObject(object[key]) ? object[key] : {}, value);\n } else {\n object[key] = value;\n }\n });\n });\n return object;\n}\n\nfunction omit(object, keys) {\n forEach(keys || ownKeys(object), function (key) {\n delete object[key];\n });\n}\n\nfunction removeAttribute(elms, attrs) {\n forEach(elms, function (elm) {\n forEach(attrs, function (attr) {\n elm && elm.removeAttribute(attr);\n });\n });\n}\n\nfunction setAttribute(elms, attrs, value) {\n if (isObject(attrs)) {\n forOwn(attrs, function (value2, name) {\n setAttribute(elms, name, value2);\n });\n } else {\n forEach(elms, function (elm) {\n isNull(value) || value === \"\" ? removeAttribute(elm, attrs) : elm.setAttribute(attrs, String(value));\n });\n }\n}\n\nfunction create(tag, attrs, parent) {\n var elm = document.createElement(tag);\n\n if (attrs) {\n isString(attrs) ? addClass(elm, attrs) : setAttribute(elm, attrs);\n }\n\n parent && append(parent, elm);\n return elm;\n}\n\nfunction style(elm, prop, value) {\n if (isUndefined(value)) {\n return getComputedStyle(elm)[prop];\n }\n\n if (!isNull(value)) {\n elm.style[prop] = \"\" + value;\n }\n}\n\nfunction display(elm, display2) {\n style(elm, \"display\", display2);\n}\n\nfunction focus(elm) {\n elm[\"setActive\"] && elm[\"setActive\"]() || elm.focus({\n preventScroll: true\n });\n}\n\nfunction getAttribute(elm, attr) {\n return elm.getAttribute(attr);\n}\n\nfunction hasClass(elm, className) {\n return elm && elm.classList.contains(className);\n}\n\nfunction rect(target) {\n return target.getBoundingClientRect();\n}\n\nfunction remove(nodes) {\n forEach(nodes, function (node) {\n if (node && node.parentNode) {\n node.parentNode.removeChild(node);\n }\n });\n}\n\nfunction parseHtml(html) {\n return child(new DOMParser().parseFromString(html, \"text/html\").body);\n}\n\nfunction prevent(e, stopPropagation) {\n e.preventDefault();\n\n if (stopPropagation) {\n e.stopPropagation();\n e.stopImmediatePropagation();\n }\n}\n\nfunction query(parent, selector) {\n return parent && parent.querySelector(selector);\n}\n\nfunction queryAll(parent, selector) {\n return selector ? slice(parent.querySelectorAll(selector)) : [];\n}\n\nfunction removeClass(elm, classes) {\n toggleClass(elm, classes, false);\n}\n\nfunction timeOf(e) {\n return e.timeStamp;\n}\n\nfunction unit(value) {\n return isString(value) ? value : value ? value + \"px\" : \"\";\n}\n\nvar PROJECT_CODE = \"splide\";\nvar DATA_ATTRIBUTE = \"data-\" + PROJECT_CODE;\n\nfunction assert(condition, message) {\n if (!condition) {\n throw new Error(\"[\" + PROJECT_CODE + \"] \" + (message || \"\"));\n }\n}\n\nvar min = Math.min,\n max = Math.max,\n floor = Math.floor,\n ceil = Math.ceil,\n abs = Math.abs;\n\nfunction approximatelyEqual(x, y, epsilon) {\n return abs(x - y) < epsilon;\n}\n\nfunction between(number, x, y, exclusive) {\n var minimum = min(x, y);\n var maximum = max(x, y);\n return exclusive ? minimum < number && number < maximum : minimum <= number && number <= maximum;\n}\n\nfunction clamp(number, x, y) {\n var minimum = min(x, y);\n var maximum = max(x, y);\n return min(max(minimum, number), maximum);\n}\n\nfunction sign(x) {\n return +(x > 0) - +(x < 0);\n}\n\nfunction camelToKebab(string) {\n return string.replace(/([a-z0-9])([A-Z])/g, \"$1-$2\").toLowerCase();\n}\n\nfunction format(string, replacements) {\n forEach(replacements, function (replacement) {\n string = string.replace(\"%s\", \"\" + replacement);\n });\n return string;\n}\n\nfunction pad(number) {\n return number < 10 ? \"0\" + number : \"\" + number;\n}\n\nvar ids = {};\n\nfunction uniqueId(prefix) {\n return \"\" + prefix + pad(ids[prefix] = (ids[prefix] || 0) + 1);\n}\n\nfunction EventBinder() {\n var listeners = [];\n\n function bind(targets, events, callback, options) {\n forEachEvent(targets, events, function (target, event, namespace) {\n var isEventTarget = (\"addEventListener\" in target);\n var remover = isEventTarget ? target.removeEventListener.bind(target, event, callback, options) : target[\"removeListener\"].bind(target, callback);\n isEventTarget ? target.addEventListener(event, callback, options) : target[\"addListener\"](callback);\n listeners.push([target, event, namespace, callback, remover]);\n });\n }\n\n function unbind(targets, events, callback) {\n forEachEvent(targets, events, function (target, event, namespace) {\n listeners = listeners.filter(function (listener) {\n if (listener[0] === target && listener[1] === event && listener[2] === namespace && (!callback || listener[3] === callback)) {\n listener[4]();\n return false;\n }\n\n return true;\n });\n });\n }\n\n function dispatch(target, type, detail) {\n var e;\n var bubbles = true;\n\n if (typeof CustomEvent === \"function\") {\n e = new CustomEvent(type, {\n bubbles: bubbles,\n detail: detail\n });\n } else {\n e = document.createEvent(\"CustomEvent\");\n e.initCustomEvent(type, bubbles, false, detail);\n }\n\n target.dispatchEvent(e);\n return e;\n }\n\n function forEachEvent(targets, events, iteratee) {\n forEach(targets, function (target) {\n target && forEach(events, function (events2) {\n events2.split(\" \").forEach(function (eventNS) {\n var fragment = eventNS.split(\".\");\n iteratee(target, fragment[0], fragment[1]);\n });\n });\n });\n }\n\n function destroy() {\n listeners.forEach(function (data) {\n data[4]();\n });\n empty(listeners);\n }\n\n return {\n bind: bind,\n unbind: unbind,\n dispatch: dispatch,\n destroy: destroy\n };\n}\n\nvar EVENT_MOUNTED = \"mounted\";\nvar EVENT_READY = \"ready\";\nvar EVENT_MOVE = \"move\";\nvar EVENT_MOVED = \"moved\";\nvar EVENT_CLICK = \"click\";\nvar EVENT_ACTIVE = \"active\";\nvar EVENT_INACTIVE = \"inactive\";\nvar EVENT_VISIBLE = \"visible\";\nvar EVENT_HIDDEN = \"hidden\";\nvar EVENT_REFRESH = \"refresh\";\nvar EVENT_UPDATED = \"updated\";\nvar EVENT_RESIZE = \"resize\";\nvar EVENT_RESIZED = \"resized\";\nvar EVENT_DRAG = \"drag\";\nvar EVENT_DRAGGING = \"dragging\";\nvar EVENT_DRAGGED = \"dragged\";\nvar EVENT_SCROLL = \"scroll\";\nvar EVENT_SCROLLED = \"scrolled\";\nvar EVENT_OVERFLOW = \"overflow\";\nvar EVENT_DESTROY = \"destroy\";\nvar EVENT_ARROWS_MOUNTED = \"arrows:mounted\";\nvar EVENT_ARROWS_UPDATED = \"arrows:updated\";\nvar EVENT_PAGINATION_MOUNTED = \"pagination:mounted\";\nvar EVENT_PAGINATION_UPDATED = \"pagination:updated\";\nvar EVENT_NAVIGATION_MOUNTED = \"navigation:mounted\";\nvar EVENT_AUTOPLAY_PLAY = \"autoplay:play\";\nvar EVENT_AUTOPLAY_PLAYING = \"autoplay:playing\";\nvar EVENT_AUTOPLAY_PAUSE = \"autoplay:pause\";\nvar EVENT_LAZYLOAD_LOADED = \"lazyload:loaded\";\nvar EVENT_SLIDE_KEYDOWN = \"sk\";\nvar EVENT_SHIFTED = \"sh\";\nvar EVENT_END_INDEX_CHANGED = \"ei\";\n\nfunction EventInterface(Splide2) {\n var bus = Splide2 ? Splide2.event.bus : document.createDocumentFragment();\n var binder = EventBinder();\n\n function on(events, callback) {\n binder.bind(bus, toArray(events).join(\" \"), function (e) {\n callback.apply(callback, isArray(e.detail) ? e.detail : []);\n });\n }\n\n function emit(event) {\n binder.dispatch(bus, event, slice(arguments, 1));\n }\n\n if (Splide2) {\n Splide2.event.on(EVENT_DESTROY, binder.destroy);\n }\n\n return assign(binder, {\n bus: bus,\n on: on,\n off: apply(binder.unbind, bus),\n emit: emit\n });\n}\n\nfunction RequestInterval(interval, onInterval, onUpdate, limit) {\n var now = Date.now;\n var startTime;\n var rate = 0;\n var id;\n var paused = true;\n var count = 0;\n\n function update() {\n if (!paused) {\n rate = interval ? min((now() - startTime) / interval, 1) : 1;\n onUpdate && onUpdate(rate);\n\n if (rate >= 1) {\n onInterval();\n startTime = now();\n\n if (limit && ++count >= limit) {\n return pause();\n }\n }\n\n id = raf(update);\n }\n }\n\n function start(resume) {\n resume || cancel();\n startTime = now() - (resume ? rate * interval : 0);\n paused = false;\n id = raf(update);\n }\n\n function pause() {\n paused = true;\n }\n\n function rewind() {\n startTime = now();\n rate = 0;\n\n if (onUpdate) {\n onUpdate(rate);\n }\n }\n\n function cancel() {\n id && cancelAnimationFrame(id);\n rate = 0;\n id = 0;\n paused = true;\n }\n\n function set(time) {\n interval = time;\n }\n\n function isPaused() {\n return paused;\n }\n\n return {\n start: start,\n rewind: rewind,\n pause: pause,\n cancel: cancel,\n set: set,\n isPaused: isPaused\n };\n}\n\nfunction State(initialState) {\n var state = initialState;\n\n function set(value) {\n state = value;\n }\n\n function is(states) {\n return includes(toArray(states), state);\n }\n\n return {\n set: set,\n is: is\n };\n}\n\nfunction Throttle(func, duration) {\n var interval = RequestInterval(duration || 0, func, null, 1);\n return function () {\n interval.isPaused() && interval.start();\n };\n}\n\nfunction Media(Splide2, Components2, options) {\n var state = Splide2.state;\n var breakpoints = options.breakpoints || {};\n var reducedMotion = options.reducedMotion || {};\n var binder = EventBinder();\n var queries = [];\n\n function setup() {\n var isMin = options.mediaQuery === \"min\";\n ownKeys(breakpoints).sort(function (n, m) {\n return isMin ? +n - +m : +m - +n;\n }).forEach(function (key) {\n register(breakpoints[key], \"(\" + (isMin ? \"min\" : \"max\") + \"-width:\" + key + \"px)\");\n });\n register(reducedMotion, MEDIA_PREFERS_REDUCED_MOTION);\n update();\n }\n\n function destroy(completely) {\n if (completely) {\n binder.destroy();\n }\n }\n\n function register(options2, query) {\n var queryList = matchMedia(query);\n binder.bind(queryList, \"change\", update);\n queries.push([options2, queryList]);\n }\n\n function update() {\n var destroyed = state.is(DESTROYED);\n var direction = options.direction;\n var merged = queries.reduce(function (merged2, entry) {\n return merge(merged2, entry[1].matches ? entry[0] : {});\n }, {});\n omit(options);\n set(merged);\n\n if (options.destroy) {\n Splide2.destroy(options.destroy === \"completely\");\n } else if (destroyed) {\n destroy(true);\n Splide2.mount();\n } else {\n direction !== options.direction && Splide2.refresh();\n }\n }\n\n function reduce(enable) {\n if (matchMedia(MEDIA_PREFERS_REDUCED_MOTION).matches) {\n enable ? merge(options, reducedMotion) : omit(options, ownKeys(reducedMotion));\n }\n }\n\n function set(opts, base, notify) {\n merge(options, opts);\n base && merge(Object.getPrototypeOf(options), opts);\n\n if (notify || !state.is(CREATED)) {\n Splide2.emit(EVENT_UPDATED, options);\n }\n }\n\n return {\n setup: setup,\n destroy: destroy,\n reduce: reduce,\n set: set\n };\n}\n\nvar ARROW = \"Arrow\";\nvar ARROW_LEFT = ARROW + \"Left\";\nvar ARROW_RIGHT = ARROW + \"Right\";\nvar ARROW_UP = ARROW + \"Up\";\nvar ARROW_DOWN = ARROW + \"Down\";\nvar LTR = \"ltr\";\nvar RTL = \"rtl\";\nvar TTB = \"ttb\";\nvar ORIENTATION_MAP = {\n width: [\"height\"],\n left: [\"top\", \"right\"],\n right: [\"bottom\", \"left\"],\n x: [\"y\"],\n X: [\"Y\"],\n Y: [\"X\"],\n ArrowLeft: [ARROW_UP, ARROW_RIGHT],\n ArrowRight: [ARROW_DOWN, ARROW_LEFT]\n};\n\nfunction Direction(Splide2, Components2, options) {\n function resolve(prop, axisOnly, direction) {\n direction = direction || options.direction;\n var index = direction === RTL && !axisOnly ? 1 : direction === TTB ? 0 : -1;\n return ORIENTATION_MAP[prop] && ORIENTATION_MAP[prop][index] || prop.replace(/width|left|right/i, function (match, offset) {\n var replacement = ORIENTATION_MAP[match.toLowerCase()][index] || match;\n return offset > 0 ? replacement.charAt(0).toUpperCase() + replacement.slice(1) : replacement;\n });\n }\n\n function orient(value) {\n return value * (options.direction === RTL ? 1 : -1);\n }\n\n return {\n resolve: resolve,\n orient: orient\n };\n}\n\nvar ROLE = \"role\";\nvar TAB_INDEX = \"tabindex\";\nvar DISABLED = \"disabled\";\nvar ARIA_PREFIX = \"aria-\";\nvar ARIA_CONTROLS = ARIA_PREFIX + \"controls\";\nvar ARIA_CURRENT = ARIA_PREFIX + \"current\";\nvar ARIA_SELECTED = ARIA_PREFIX + \"selected\";\nvar ARIA_LABEL = ARIA_PREFIX + \"label\";\nvar ARIA_LABELLEDBY = ARIA_PREFIX + \"labelledby\";\nvar ARIA_HIDDEN = ARIA_PREFIX + \"hidden\";\nvar ARIA_ORIENTATION = ARIA_PREFIX + \"orientation\";\nvar ARIA_ROLEDESCRIPTION = ARIA_PREFIX + \"roledescription\";\nvar ARIA_LIVE = ARIA_PREFIX + \"live\";\nvar ARIA_BUSY = ARIA_PREFIX + \"busy\";\nvar ARIA_ATOMIC = ARIA_PREFIX + \"atomic\";\nvar ALL_ATTRIBUTES = [ROLE, TAB_INDEX, DISABLED, ARIA_CONTROLS, ARIA_CURRENT, ARIA_LABEL, ARIA_LABELLEDBY, ARIA_HIDDEN, ARIA_ORIENTATION, ARIA_ROLEDESCRIPTION];\nvar CLASS_PREFIX = PROJECT_CODE + \"__\";\nvar STATUS_CLASS_PREFIX = \"is-\";\nvar CLASS_ROOT = PROJECT_CODE;\nvar CLASS_TRACK = CLASS_PREFIX + \"track\";\nvar CLASS_LIST = CLASS_PREFIX + \"list\";\nvar CLASS_SLIDE = CLASS_PREFIX + \"slide\";\nvar CLASS_CLONE = CLASS_SLIDE + \"--clone\";\nvar CLASS_CONTAINER = CLASS_SLIDE + \"__container\";\nvar CLASS_ARROWS = CLASS_PREFIX + \"arrows\";\nvar CLASS_ARROW = CLASS_PREFIX + \"arrow\";\nvar CLASS_ARROW_PREV = CLASS_ARROW + \"--prev\";\nvar CLASS_ARROW_NEXT = CLASS_ARROW + \"--next\";\nvar CLASS_PAGINATION = CLASS_PREFIX + \"pagination\";\nvar CLASS_PAGINATION_PAGE = CLASS_PAGINATION + \"__page\";\nvar CLASS_PROGRESS = CLASS_PREFIX + \"progress\";\nvar CLASS_PROGRESS_BAR = CLASS_PROGRESS + \"__bar\";\nvar CLASS_TOGGLE = CLASS_PREFIX + \"toggle\";\nvar CLASS_TOGGLE_PLAY = CLASS_TOGGLE + \"__play\";\nvar CLASS_TOGGLE_PAUSE = CLASS_TOGGLE + \"__pause\";\nvar CLASS_SPINNER = CLASS_PREFIX + \"spinner\";\nvar CLASS_SR = CLASS_PREFIX + \"sr\";\nvar CLASS_INITIALIZED = STATUS_CLASS_PREFIX + \"initialized\";\nvar CLASS_ACTIVE = STATUS_CLASS_PREFIX + \"active\";\nvar CLASS_PREV = STATUS_CLASS_PREFIX + \"prev\";\nvar CLASS_NEXT = STATUS_CLASS_PREFIX + \"next\";\nvar CLASS_VISIBLE = STATUS_CLASS_PREFIX + \"visible\";\nvar CLASS_LOADING = STATUS_CLASS_PREFIX + \"loading\";\nvar CLASS_FOCUS_IN = STATUS_CLASS_PREFIX + \"focus-in\";\nvar CLASS_OVERFLOW = STATUS_CLASS_PREFIX + \"overflow\";\nvar STATUS_CLASSES = [CLASS_ACTIVE, CLASS_VISIBLE, CLASS_PREV, CLASS_NEXT, CLASS_LOADING, CLASS_FOCUS_IN, CLASS_OVERFLOW];\nvar CLASSES = {\n slide: CLASS_SLIDE,\n clone: CLASS_CLONE,\n arrows: CLASS_ARROWS,\n arrow: CLASS_ARROW,\n prev: CLASS_ARROW_PREV,\n next: CLASS_ARROW_NEXT,\n pagination: CLASS_PAGINATION,\n page: CLASS_PAGINATION_PAGE,\n spinner: CLASS_SPINNER\n};\n\nfunction closest(from, selector) {\n if (isFunction(from.closest)) {\n return from.closest(selector);\n }\n\n var elm = from;\n\n while (elm && elm.nodeType === 1) {\n if (matches(elm, selector)) {\n break;\n }\n\n elm = elm.parentElement;\n }\n\n return elm;\n}\n\nvar FRICTION = 5;\nvar LOG_INTERVAL = 200;\nvar POINTER_DOWN_EVENTS = \"touchstart mousedown\";\nvar POINTER_MOVE_EVENTS = \"touchmove mousemove\";\nvar POINTER_UP_EVENTS = \"touchend touchcancel mouseup click\";\n\nfunction Elements(Splide2, Components2, options) {\n var _EventInterface = EventInterface(Splide2),\n on = _EventInterface.on,\n bind = _EventInterface.bind;\n\n var root = Splide2.root;\n var i18n = options.i18n;\n var elements = {};\n var slides = [];\n var rootClasses = [];\n var trackClasses = [];\n var track;\n var list;\n var isUsingKey;\n\n function setup() {\n collect();\n init();\n update();\n }\n\n function mount() {\n on(EVENT_REFRESH, destroy);\n on(EVENT_REFRESH, setup);\n on(EVENT_UPDATED, update);\n bind(document, POINTER_DOWN_EVENTS + \" keydown\", function (e) {\n isUsingKey = e.type === \"keydown\";\n }, {\n capture: true\n });\n bind(root, \"focusin\", function () {\n toggleClass(root, CLASS_FOCUS_IN, !!isUsingKey);\n });\n }\n\n function destroy(completely) {\n var attrs = ALL_ATTRIBUTES.concat(\"style\");\n empty(slides);\n removeClass(root, rootClasses);\n removeClass(track, trackClasses);\n removeAttribute([track, list], attrs);\n removeAttribute(root, completely ? attrs : [\"style\", ARIA_ROLEDESCRIPTION]);\n }\n\n function update() {\n removeClass(root, rootClasses);\n removeClass(track, trackClasses);\n rootClasses = getClasses(CLASS_ROOT);\n trackClasses = getClasses(CLASS_TRACK);\n addClass(root, rootClasses);\n addClass(track, trackClasses);\n setAttribute(root, ARIA_LABEL, options.label);\n setAttribute(root, ARIA_LABELLEDBY, options.labelledby);\n }\n\n function collect() {\n track = find(\".\" + CLASS_TRACK);\n list = child(track, \".\" + CLASS_LIST);\n assert(track && list, \"A track/list element is missing.\");\n push(slides, children(list, \".\" + CLASS_SLIDE + \":not(.\" + CLASS_CLONE + \")\"));\n forOwn({\n arrows: CLASS_ARROWS,\n pagination: CLASS_PAGINATION,\n prev: CLASS_ARROW_PREV,\n next: CLASS_ARROW_NEXT,\n bar: CLASS_PROGRESS_BAR,\n toggle: CLASS_TOGGLE\n }, function (className, key) {\n elements[key] = find(\".\" + className);\n });\n assign(elements, {\n root: root,\n track: track,\n list: list,\n slides: slides\n });\n }\n\n function init() {\n var id = root.id || uniqueId(PROJECT_CODE);\n var role = options.role;\n root.id = id;\n track.id = track.id || id + \"-track\";\n list.id = list.id || id + \"-list\";\n\n if (!getAttribute(root, ROLE) && root.tagName !== \"SECTION\" && role) {\n setAttribute(root, ROLE, role);\n }\n\n setAttribute(root, ARIA_ROLEDESCRIPTION, i18n.carousel);\n setAttribute(list, ROLE, \"presentation\");\n }\n\n function find(selector) {\n var elm = query(root, selector);\n return elm && closest(elm, \".\" + CLASS_ROOT) === root ? elm : void 0;\n }\n\n function getClasses(base) {\n return [base + \"--\" + options.type, base + \"--\" + options.direction, options.drag && base + \"--draggable\", options.isNavigation && base + \"--nav\", base === CLASS_ROOT && CLASS_ACTIVE];\n }\n\n return assign(elements, {\n setup: setup,\n mount: mount,\n destroy: destroy\n });\n}\n\nvar SLIDE = \"slide\";\nvar LOOP = \"loop\";\nvar FADE = \"fade\";\n\nfunction Slide$1(Splide2, index, slideIndex, slide) {\n var event = EventInterface(Splide2);\n var on = event.on,\n emit = event.emit,\n bind = event.bind;\n var Components = Splide2.Components,\n root = Splide2.root,\n options = Splide2.options;\n var isNavigation = options.isNavigation,\n updateOnMove = options.updateOnMove,\n i18n = options.i18n,\n pagination = options.pagination,\n slideFocus = options.slideFocus;\n var resolve = Components.Direction.resolve;\n var styles = getAttribute(slide, \"style\");\n var label = getAttribute(slide, ARIA_LABEL);\n var isClone = slideIndex > -1;\n var container = child(slide, \".\" + CLASS_CONTAINER);\n var destroyed;\n\n function mount() {\n if (!isClone) {\n slide.id = root.id + \"-slide\" + pad(index + 1);\n setAttribute(slide, ROLE, pagination ? \"tabpanel\" : \"group\");\n setAttribute(slide, ARIA_ROLEDESCRIPTION, i18n.slide);\n setAttribute(slide, ARIA_LABEL, label || format(i18n.slideLabel, [index + 1, Splide2.length]));\n }\n\n listen();\n }\n\n function listen() {\n bind(slide, \"click\", apply(emit, EVENT_CLICK, self));\n bind(slide, \"keydown\", apply(emit, EVENT_SLIDE_KEYDOWN, self));\n on([EVENT_MOVED, EVENT_SHIFTED, EVENT_SCROLLED], update);\n on(EVENT_NAVIGATION_MOUNTED, initNavigation);\n\n if (updateOnMove) {\n on(EVENT_MOVE, onMove);\n }\n }\n\n function destroy() {\n destroyed = true;\n event.destroy();\n removeClass(slide, STATUS_CLASSES);\n removeAttribute(slide, ALL_ATTRIBUTES);\n setAttribute(slide, \"style\", styles);\n setAttribute(slide, ARIA_LABEL, label || \"\");\n }\n\n function initNavigation() {\n var controls = Splide2.splides.map(function (target) {\n var Slide2 = target.splide.Components.Slides.getAt(index);\n return Slide2 ? Slide2.slide.id : \"\";\n }).join(\" \");\n setAttribute(slide, ARIA_LABEL, format(i18n.slideX, (isClone ? slideIndex : index) + 1));\n setAttribute(slide, ARIA_CONTROLS, controls);\n setAttribute(slide, ROLE, slideFocus ? \"button\" : \"\");\n slideFocus && removeAttribute(slide, ARIA_ROLEDESCRIPTION);\n }\n\n function onMove() {\n if (!destroyed) {\n update();\n }\n }\n\n function update() {\n if (!destroyed) {\n var curr = Splide2.index;\n updateActivity();\n updateVisibility();\n toggleClass(slide, CLASS_PREV, index === curr - 1);\n toggleClass(slide, CLASS_NEXT, index === curr + 1);\n }\n }\n\n function updateActivity() {\n var active = isActive();\n\n if (active !== hasClass(slide, CLASS_ACTIVE)) {\n toggleClass(slide, CLASS_ACTIVE, active);\n setAttribute(slide, ARIA_CURRENT, isNavigation && active || \"\");\n emit(active ? EVENT_ACTIVE : EVENT_INACTIVE, self);\n }\n }\n\n function updateVisibility() {\n var visible = isVisible();\n var hidden = !visible && (!isActive() || isClone);\n\n if (!Splide2.state.is([MOVING, SCROLLING])) {\n setAttribute(slide, ARIA_HIDDEN, hidden || \"\");\n }\n\n setAttribute(queryAll(slide, options.focusableNodes || \"\"), TAB_INDEX, hidden ? -1 : \"\");\n\n if (slideFocus) {\n setAttribute(slide, TAB_INDEX, hidden ? -1 : 0);\n }\n\n if (visible !== hasClass(slide, CLASS_VISIBLE)) {\n toggleClass(slide, CLASS_VISIBLE, visible);\n emit(visible ? EVENT_VISIBLE : EVENT_HIDDEN, self);\n }\n\n if (!visible && document.activeElement === slide) {\n var Slide2 = Components.Slides.getAt(Splide2.index);\n Slide2 && focus(Slide2.slide);\n }\n }\n\n function style$1(prop, value, useContainer) {\n style(useContainer && container || slide, prop, value);\n }\n\n function isActive() {\n var curr = Splide2.index;\n return curr === index || options.cloneStatus && curr === slideIndex;\n }\n\n function isVisible() {\n if (Splide2.is(FADE)) {\n return isActive();\n }\n\n var trackRect = rect(Components.Elements.track);\n var slideRect = rect(slide);\n var left = resolve(\"left\", true);\n var right = resolve(\"right\", true);\n return floor(trackRect[left]) <= ceil(slideRect[left]) && floor(slideRect[right]) <= ceil(trackRect[right]);\n }\n\n function isWithin(from, distance) {\n var diff = abs(from - index);\n\n if (!isClone && (options.rewind || Splide2.is(LOOP))) {\n diff = min(diff, Splide2.length - diff);\n }\n\n return diff <= distance;\n }\n\n var self = {\n index: index,\n slideIndex: slideIndex,\n slide: slide,\n container: container,\n isClone: isClone,\n mount: mount,\n destroy: destroy,\n update: update,\n style: style$1,\n isWithin: isWithin\n };\n return self;\n}\n\nfunction Slides(Splide2, Components2, options) {\n var _EventInterface2 = EventInterface(Splide2),\n on = _EventInterface2.on,\n emit = _EventInterface2.emit,\n bind = _EventInterface2.bind;\n\n var _Components2$Elements = Components2.Elements,\n slides = _Components2$Elements.slides,\n list = _Components2$Elements.list;\n var Slides2 = [];\n\n function mount() {\n init();\n on(EVENT_REFRESH, destroy);\n on(EVENT_REFRESH, init);\n }\n\n function init() {\n slides.forEach(function (slide, index) {\n register(slide, index, -1);\n });\n }\n\n function destroy() {\n forEach$1(function (Slide2) {\n Slide2.destroy();\n });\n empty(Slides2);\n }\n\n function update() {\n forEach$1(function (Slide2) {\n Slide2.update();\n });\n }\n\n function register(slide, index, slideIndex) {\n var object = Slide$1(Splide2, index, slideIndex, slide);\n object.mount();\n Slides2.push(object);\n Slides2.sort(function (Slide1, Slide2) {\n return Slide1.index - Slide2.index;\n });\n }\n\n function get(excludeClones) {\n return excludeClones ? filter(function (Slide2) {\n return !Slide2.isClone;\n }) : Slides2;\n }\n\n function getIn(page) {\n var Controller = Components2.Controller;\n var index = Controller.toIndex(page);\n var max = Controller.hasFocus() ? 1 : options.perPage;\n return filter(function (Slide2) {\n return between(Slide2.index, index, index + max - 1);\n });\n }\n\n function getAt(index) {\n return filter(index)[0];\n }\n\n function add(items, index) {\n forEach(items, function (slide) {\n if (isString(slide)) {\n slide = parseHtml(slide);\n }\n\n if (isHTMLElement(slide)) {\n var ref = slides[index];\n ref ? before(slide, ref) : append(list, slide);\n addClass(slide, options.classes.slide);\n observeImages(slide, apply(emit, EVENT_RESIZE));\n }\n });\n emit(EVENT_REFRESH);\n }\n\n function remove$1(matcher) {\n remove(filter(matcher).map(function (Slide2) {\n return Slide2.slide;\n }));\n emit(EVENT_REFRESH);\n }\n\n function forEach$1(iteratee, excludeClones) {\n get(excludeClones).forEach(iteratee);\n }\n\n function filter(matcher) {\n return Slides2.filter(isFunction(matcher) ? matcher : function (Slide2) {\n return isString(matcher) ? matches(Slide2.slide, matcher) : includes(toArray(matcher), Slide2.index);\n });\n }\n\n function style(prop, value, useContainer) {\n forEach$1(function (Slide2) {\n Slide2.style(prop, value, useContainer);\n });\n }\n\n function observeImages(elm, callback) {\n var images = queryAll(elm, \"img\");\n var length = images.length;\n\n if (length) {\n images.forEach(function (img) {\n bind(img, \"load error\", function () {\n if (! --length) {\n callback();\n }\n });\n });\n } else {\n callback();\n }\n }\n\n function getLength(excludeClones) {\n return excludeClones ? slides.length : Slides2.length;\n }\n\n function isEnough() {\n return Slides2.length > options.perPage;\n }\n\n return {\n mount: mount,\n destroy: destroy,\n update: update,\n register: register,\n get: get,\n getIn: getIn,\n getAt: getAt,\n add: add,\n remove: remove$1,\n forEach: forEach$1,\n filter: filter,\n style: style,\n getLength: getLength,\n isEnough: isEnough\n };\n}\n\nfunction Layout(Splide2, Components2, options) {\n var _EventInterface3 = EventInterface(Splide2),\n on = _EventInterface3.on,\n bind = _EventInterface3.bind,\n emit = _EventInterface3.emit;\n\n var Slides = Components2.Slides;\n var resolve = Components2.Direction.resolve;\n var _Components2$Elements2 = Components2.Elements,\n root = _Components2$Elements2.root,\n track = _Components2$Elements2.track,\n list = _Components2$Elements2.list;\n var getAt = Slides.getAt,\n styleSlides = Slides.style;\n var vertical;\n var rootRect;\n var overflow;\n\n function mount() {\n init();\n bind(window, \"resize load\", Throttle(apply(emit, EVENT_RESIZE)));\n on([EVENT_UPDATED, EVENT_REFRESH], init);\n on(EVENT_RESIZE, resize);\n }\n\n function init() {\n vertical = options.direction === TTB;\n style(root, \"maxWidth\", unit(options.width));\n style(track, resolve(\"paddingLeft\"), cssPadding(false));\n style(track, resolve(\"paddingRight\"), cssPadding(true));\n resize(true);\n }\n\n function resize(force) {\n var newRect = rect(root);\n\n if (force || rootRect.width !== newRect.width || rootRect.height !== newRect.height) {\n style(track, \"height\", cssTrackHeight());\n styleSlides(resolve(\"marginRight\"), unit(options.gap));\n styleSlides(\"width\", cssSlideWidth());\n styleSlides(\"height\", cssSlideHeight(), true);\n rootRect = newRect;\n emit(EVENT_RESIZED);\n\n if (overflow !== (overflow = isOverflow())) {\n toggleClass(root, CLASS_OVERFLOW, overflow);\n emit(EVENT_OVERFLOW, overflow);\n }\n }\n }\n\n function cssPadding(right) {\n var padding = options.padding;\n var prop = resolve(right ? \"right\" : \"left\");\n return padding && unit(padding[prop] || (isObject(padding) ? 0 : padding)) || \"0px\";\n }\n\n function cssTrackHeight() {\n var height = \"\";\n\n if (vertical) {\n height = cssHeight();\n assert(height, \"height or heightRatio is missing.\");\n height = \"calc(\" + height + \" - \" + cssPadding(false) + \" - \" + cssPadding(true) + \")\";\n }\n\n return height;\n }\n\n function cssHeight() {\n return unit(options.height || rect(list).width * options.heightRatio);\n }\n\n function cssSlideWidth() {\n return options.autoWidth ? null : unit(options.fixedWidth) || (vertical ? \"\" : cssSlideSize());\n }\n\n function cssSlideHeight() {\n return unit(options.fixedHeight) || (vertical ? options.autoHeight ? null : cssSlideSize() : cssHeight());\n }\n\n function cssSlideSize() {\n var gap = unit(options.gap);\n return \"calc((100%\" + (gap && \" + \" + gap) + \")/\" + (options.perPage || 1) + (gap && \" - \" + gap) + \")\";\n }\n\n function listSize() {\n return rect(list)[resolve(\"width\")];\n }\n\n function slideSize(index, withoutGap) {\n var Slide = getAt(index || 0);\n return Slide ? rect(Slide.slide)[resolve(\"width\")] + (withoutGap ? 0 : getGap()) : 0;\n }\n\n function totalSize(index, withoutGap) {\n var Slide = getAt(index);\n\n if (Slide) {\n var right = rect(Slide.slide)[resolve(\"right\")];\n var left = rect(list)[resolve(\"left\")];\n return abs(right - left) + (withoutGap ? 0 : getGap());\n }\n\n return 0;\n }\n\n function sliderSize(withoutGap) {\n return totalSize(Splide2.length - 1) - totalSize(0) + slideSize(0, withoutGap);\n }\n\n function getGap() {\n var Slide = getAt(0);\n return Slide && parseFloat(style(Slide.slide, resolve(\"marginRight\"))) || 0;\n }\n\n function getPadding(right) {\n return parseFloat(style(track, resolve(\"padding\" + (right ? \"Right\" : \"Left\")))) || 0;\n }\n\n function isOverflow() {\n return Splide2.is(FADE) || sliderSize(true) > listSize();\n }\n\n return {\n mount: mount,\n resize: resize,\n listSize: listSize,\n slideSize: slideSize,\n sliderSize: sliderSize,\n totalSize: totalSize,\n getPadding: getPadding,\n isOverflow: isOverflow\n };\n}\n\nvar MULTIPLIER = 2;\n\nfunction Clones(Splide2, Components2, options) {\n var event = EventInterface(Splide2);\n var on = event.on;\n var Elements = Components2.Elements,\n Slides = Components2.Slides;\n var resolve = Components2.Direction.resolve;\n var clones = [];\n var cloneCount;\n\n function mount() {\n on(EVENT_REFRESH, remount);\n on([EVENT_UPDATED, EVENT_RESIZE], observe);\n\n if (cloneCount = computeCloneCount()) {\n generate(cloneCount);\n Components2.Layout.resize(true);\n }\n }\n\n function remount() {\n destroy();\n mount();\n }\n\n function destroy() {\n remove(clones);\n empty(clones);\n event.destroy();\n }\n\n function observe() {\n var count = computeCloneCount();\n\n if (cloneCount !== count) {\n if (cloneCount < count || !count) {\n event.emit(EVENT_REFRESH);\n }\n }\n }\n\n function generate(count) {\n var slides = Slides.get().slice();\n var length = slides.length;\n\n if (length) {\n while (slides.length < count) {\n push(slides, slides);\n }\n\n push(slides.slice(-count), slides.slice(0, count)).forEach(function (Slide, index) {\n var isHead = index < count;\n var clone = cloneDeep(Slide.slide, index);\n isHead ? before(clone, slides[0].slide) : append(Elements.list, clone);\n push(clones, clone);\n Slides.register(clone, index - count + (isHead ? 0 : length), Slide.index);\n });\n }\n }\n\n function cloneDeep(elm, index) {\n var clone = elm.cloneNode(true);\n addClass(clone, options.classes.clone);\n clone.id = Splide2.root.id + \"-clone\" + pad(index + 1);\n return clone;\n }\n\n function computeCloneCount() {\n var clones2 = options.clones;\n\n if (!Splide2.is(LOOP)) {\n clones2 = 0;\n } else if (isUndefined(clones2)) {\n var fixedSize = options[resolve(\"fixedWidth\")] && Components2.Layout.slideSize(0);\n var fixedCount = fixedSize && ceil(rect(Elements.track)[resolve(\"width\")] / fixedSize);\n clones2 = fixedCount || options[resolve(\"autoWidth\")] && Splide2.length || options.perPage * MULTIPLIER;\n }\n\n return clones2;\n }\n\n return {\n mount: mount,\n destroy: destroy\n };\n}\n\nfunction Move(Splide2, Components2, options) {\n var _EventInterface4 = EventInterface(Splide2),\n on = _EventInterface4.on,\n emit = _EventInterface4.emit;\n\n var set = Splide2.state.set;\n var _Components2$Layout = Components2.Layout,\n slideSize = _Components2$Layout.slideSize,\n getPadding = _Components2$Layout.getPadding,\n totalSize = _Components2$Layout.totalSize,\n listSize = _Components2$Layout.listSize,\n sliderSize = _Components2$Layout.sliderSize;\n var _Components2$Directio = Components2.Direction,\n resolve = _Components2$Directio.resolve,\n orient = _Components2$Directio.orient;\n var _Components2$Elements3 = Components2.Elements,\n list = _Components2$Elements3.list,\n track = _Components2$Elements3.track;\n var Transition;\n\n function mount() {\n Transition = Components2.Transition;\n on([EVENT_MOUNTED, EVENT_RESIZED, EVENT_UPDATED, EVENT_REFRESH], reposition);\n }\n\n function reposition() {\n if (!Components2.Controller.isBusy()) {\n Components2.Scroll.cancel();\n jump(Splide2.index);\n Components2.Slides.update();\n }\n }\n\n function move(dest, index, prev, callback) {\n if (dest !== index && canShift(dest > prev)) {\n cancel();\n translate(shift(getPosition(), dest > prev), true);\n }\n\n set(MOVING);\n emit(EVENT_MOVE, index, prev, dest);\n Transition.start(index, function () {\n set(IDLE);\n emit(EVENT_MOVED, index, prev, dest);\n callback && callback();\n });\n }\n\n function jump(index) {\n translate(toPosition(index, true));\n }\n\n function translate(position, preventLoop) {\n if (!Splide2.is(FADE)) {\n var destination = preventLoop ? position : loop(position);\n style(list, \"transform\", \"translate\" + resolve(\"X\") + \"(\" + destination + \"px)\");\n position !== destination && emit(EVENT_SHIFTED);\n }\n }\n\n function loop(position) {\n if (Splide2.is(LOOP)) {\n var index = toIndex(position);\n var exceededMax = index > Components2.Controller.getEnd();\n var exceededMin = index < 0;\n\n if (exceededMin || exceededMax) {\n position = shift(position, exceededMax);\n }\n }\n\n return position;\n }\n\n function shift(position, backwards) {\n var excess = position - getLimit(backwards);\n var size = sliderSize();\n position -= orient(size * (ceil(abs(excess) / size) || 1)) * (backwards ? 1 : -1);\n return position;\n }\n\n function cancel() {\n translate(getPosition(), true);\n Transition.cancel();\n }\n\n function toIndex(position) {\n var Slides = Components2.Slides.get();\n var index = 0;\n var minDistance = Infinity;\n\n for (var i = 0; i < Slides.length; i++) {\n var slideIndex = Slides[i].index;\n var distance = abs(toPosition(slideIndex, true) - position);\n\n if (distance <= minDistance) {\n minDistance = distance;\n index = slideIndex;\n } else {\n break;\n }\n }\n\n return index;\n }\n\n function toPosition(index, trimming) {\n var position = orient(totalSize(index - 1) - offset(index));\n return trimming ? trim(position) : position;\n }\n\n function getPosition() {\n var left = resolve(\"left\");\n return rect(list)[left] - rect(track)[left] + orient(getPadding(false));\n }\n\n function trim(position) {\n if (options.trimSpace && Splide2.is(SLIDE)) {\n position = clamp(position, 0, orient(sliderSize(true) - listSize()));\n }\n\n return position;\n }\n\n function offset(index) {\n var focus = options.focus;\n return focus === \"center\" ? (listSize() - slideSize(index, true)) / 2 : +focus * slideSize(index) || 0;\n }\n\n function getLimit(max) {\n return toPosition(max ? Components2.Controller.getEnd() : 0, !!options.trimSpace);\n }\n\n function canShift(backwards) {\n var shifted = orient(shift(getPosition(), backwards));\n return backwards ? shifted >= 0 : shifted <= list[resolve(\"scrollWidth\")] - rect(track)[resolve(\"width\")];\n }\n\n function exceededLimit(max, position) {\n position = isUndefined(position) ? getPosition() : position;\n var exceededMin = max !== true && orient(position) < orient(getLimit(false));\n var exceededMax = max !== false && orient(position) > orient(getLimit(true));\n return exceededMin || exceededMax;\n }\n\n return {\n mount: mount,\n move: move,\n jump: jump,\n translate: translate,\n shift: shift,\n cancel: cancel,\n toIndex: toIndex,\n toPosition: toPosition,\n getPosition: getPosition,\n getLimit: getLimit,\n exceededLimit: exceededLimit,\n reposition: reposition\n };\n}\n\nfunction Controller(Splide2, Components2, options) {\n var _EventInterface5 = EventInterface(Splide2),\n on = _EventInterface5.on,\n emit = _EventInterface5.emit;\n\n var Move = Components2.Move;\n var getPosition = Move.getPosition,\n getLimit = Move.getLimit,\n toPosition = Move.toPosition;\n var _Components2$Slides = Components2.Slides,\n isEnough = _Components2$Slides.isEnough,\n getLength = _Components2$Slides.getLength;\n var omitEnd = options.omitEnd;\n var isLoop = Splide2.is(LOOP);\n var isSlide = Splide2.is(SLIDE);\n var getNext = apply(getAdjacent, false);\n var getPrev = apply(getAdjacent, true);\n var currIndex = options.start || 0;\n var endIndex;\n var prevIndex = currIndex;\n var slideCount;\n var perMove;\n var perPage;\n\n function mount() {\n init();\n on([EVENT_UPDATED, EVENT_REFRESH, EVENT_END_INDEX_CHANGED], init);\n on(EVENT_RESIZED, onResized);\n }\n\n function init() {\n slideCount = getLength(true);\n perMove = options.perMove;\n perPage = options.perPage;\n endIndex = getEnd();\n var index = clamp(currIndex, 0, omitEnd ? endIndex : slideCount - 1);\n\n if (index !== currIndex) {\n currIndex = index;\n Move.reposition();\n }\n }\n\n function onResized() {\n if (endIndex !== getEnd()) {\n emit(EVENT_END_INDEX_CHANGED);\n }\n }\n\n function go(control, allowSameIndex, callback) {\n if (!isBusy()) {\n var dest = parse(control);\n var index = loop(dest);\n\n if (index > -1 && (allowSameIndex || index !== currIndex)) {\n setIndex(index);\n Move.move(dest, index, prevIndex, callback);\n }\n }\n }\n\n function scroll(destination, duration, snap, callback) {\n Components2.Scroll.scroll(destination, duration, snap, function () {\n var index = loop(Move.toIndex(getPosition()));\n setIndex(omitEnd ? min(index, endIndex) : index);\n callback && callback();\n });\n }\n\n function parse(control) {\n var index = currIndex;\n\n if (isString(control)) {\n var _ref = control.match(/([+\\-<>])(\\d+)?/) || [],\n indicator = _ref[1],\n number = _ref[2];\n\n if (indicator === \"+\" || indicator === \"-\") {\n index = computeDestIndex(currIndex + +(\"\" + indicator + (+number || 1)), currIndex);\n } else if (indicator === \">\") {\n index = number ? toIndex(+number) : getNext(true);\n } else if (indicator === \"<\") {\n index = getPrev(true);\n }\n } else {\n index = isLoop ? control : clamp(control, 0, endIndex);\n }\n\n return index;\n }\n\n function getAdjacent(prev, destination) {\n var number = perMove || (hasFocus() ? 1 : perPage);\n var dest = computeDestIndex(currIndex + number * (prev ? -1 : 1), currIndex, !(perMove || hasFocus()));\n\n if (dest === -1 && isSlide) {\n if (!approximatelyEqual(getPosition(), getLimit(!prev), 1)) {\n return prev ? 0 : endIndex;\n }\n }\n\n return destination ? dest : loop(dest);\n }\n\n function computeDestIndex(dest, from, snapPage) {\n if (isEnough() || hasFocus()) {\n var index = computeMovableDestIndex(dest);\n\n if (index !== dest) {\n from = dest;\n dest = index;\n snapPage = false;\n }\n\n if (dest < 0 || dest > endIndex) {\n if (!perMove && (between(0, dest, from, true) || between(endIndex, from, dest, true))) {\n dest = toIndex(toPage(dest));\n } else {\n if (isLoop) {\n dest = snapPage ? dest < 0 ? -(slideCount % perPage || perPage) : slideCount : dest;\n } else if (options.rewind) {\n dest = dest < 0 ? endIndex : 0;\n } else {\n dest = -1;\n }\n }\n } else {\n if (snapPage && dest !== from) {\n dest = toIndex(toPage(from) + (dest < from ? -1 : 1));\n }\n }\n } else {\n dest = -1;\n }\n\n return dest;\n }\n\n function computeMovableDestIndex(dest) {\n if (isSlide && options.trimSpace === \"move\" && dest !== currIndex) {\n var position = getPosition();\n\n while (position === toPosition(dest, true) && between(dest, 0, Splide2.length - 1, !options.rewind)) {\n dest < currIndex ? --dest : ++dest;\n }\n }\n\n return dest;\n }\n\n function loop(index) {\n return isLoop ? (index + slideCount) % slideCount || 0 : index;\n }\n\n function getEnd() {\n var end = slideCount - (hasFocus() || isLoop && perMove ? 1 : perPage);\n\n while (omitEnd && end-- > 0) {\n if (toPosition(slideCount - 1, true) !== toPosition(end, true)) {\n end++;\n break;\n }\n }\n\n return clamp(end, 0, slideCount - 1);\n }\n\n function toIndex(page) {\n return clamp(hasFocus() ? page : perPage * page, 0, endIndex);\n }\n\n function toPage(index) {\n return hasFocus() ? min(index, endIndex) : floor((index >= endIndex ? slideCount - 1 : index) / perPage);\n }\n\n function toDest(destination) {\n var closest = Move.toIndex(destination);\n return isSlide ? clamp(closest, 0, endIndex) : closest;\n }\n\n function setIndex(index) {\n if (index !== currIndex) {\n prevIndex = currIndex;\n currIndex = index;\n }\n }\n\n function getIndex(prev) {\n return prev ? prevIndex : currIndex;\n }\n\n function hasFocus() {\n return !isUndefined(options.focus) || options.isNavigation;\n }\n\n function isBusy() {\n return Splide2.state.is([MOVING, SCROLLING]) && !!options.waitForTransition;\n }\n\n return {\n mount: mount,\n go: go,\n scroll: scroll,\n getNext: getNext,\n getPrev: getPrev,\n getAdjacent: getAdjacent,\n getEnd: getEnd,\n setIndex: setIndex,\n getIndex: getIndex,\n toIndex: toIndex,\n toPage: toPage,\n toDest: toDest,\n hasFocus: hasFocus,\n isBusy: isBusy\n };\n}\n\nvar XML_NAME_SPACE = \"http://www.w3.org/2000/svg\";\nvar PATH = \"m15.5 0.932-4.3 4.38 14.5 14.6-14.5 14.5 4.3 4.4 14.6-14.6 4.4-4.3-4.4-4.4-14.6-14.6z\";\nvar SIZE = 40;\n\nfunction Arrows(Splide2, Components2, options) {\n var event = EventInterface(Splide2);\n var on = event.on,\n bind = event.bind,\n emit = event.emit;\n var classes = options.classes,\n i18n = options.i18n;\n var Elements = Components2.Elements,\n Controller = Components2.Controller;\n var placeholder = Elements.arrows,\n track = Elements.track;\n var wrapper = placeholder;\n var prev = Elements.prev;\n var next = Elements.next;\n var created;\n var wrapperClasses;\n var arrows = {};\n\n function mount() {\n init();\n on(EVENT_UPDATED, remount);\n }\n\n function remount() {\n destroy();\n mount();\n }\n\n function init() {\n var enabled = options.arrows;\n\n if (enabled && !(prev && next)) {\n createArrows();\n }\n\n if (prev && next) {\n assign(arrows, {\n prev: prev,\n next: next\n });\n display(wrapper, enabled ? \"\" : \"none\");\n addClass(wrapper, wrapperClasses = CLASS_ARROWS + \"--\" + options.direction);\n\n if (enabled) {\n listen();\n update();\n setAttribute([prev, next], ARIA_CONTROLS, track.id);\n emit(EVENT_ARROWS_MOUNTED, prev, next);\n }\n }\n }\n\n function destroy() {\n event.destroy();\n removeClass(wrapper, wrapperClasses);\n\n if (created) {\n remove(placeholder ? [prev, next] : wrapper);\n prev = next = null;\n } else {\n removeAttribute([prev, next], ALL_ATTRIBUTES);\n }\n }\n\n function listen() {\n on([EVENT_MOUNTED, EVENT_MOVED, EVENT_REFRESH, EVENT_SCROLLED, EVENT_END_INDEX_CHANGED], update);\n bind(next, \"click\", apply(go, \">\"));\n bind(prev, \"click\", apply(go, \"<\"));\n }\n\n function go(control) {\n Controller.go(control, true);\n }\n\n function createArrows() {\n wrapper = placeholder || create(\"div\", classes.arrows);\n prev = createArrow(true);\n next = createArrow(false);\n created = true;\n append(wrapper, [prev, next]);\n !placeholder && before(wrapper, track);\n }\n\n function createArrow(prev2) {\n var arrow = \" \";\n return parseHtml(arrow);\n }\n\n function update() {\n if (prev && next) {\n var index = Splide2.index;\n var prevIndex = Controller.getPrev();\n var nextIndex = Controller.getNext();\n var prevLabel = prevIndex > -1 && index < prevIndex ? i18n.last : i18n.prev;\n var nextLabel = nextIndex > -1 && index > nextIndex ? i18n.first : i18n.next;\n prev.disabled = prevIndex < 0;\n next.disabled = nextIndex < 0;\n setAttribute(prev, ARIA_LABEL, prevLabel);\n setAttribute(next, ARIA_LABEL, nextLabel);\n emit(EVENT_ARROWS_UPDATED, prev, next, prevIndex, nextIndex);\n }\n }\n\n return {\n arrows: arrows,\n mount: mount,\n destroy: destroy,\n update: update\n };\n}\n\nvar INTERVAL_DATA_ATTRIBUTE = DATA_ATTRIBUTE + \"-interval\";\n\nfunction Autoplay(Splide2, Components2, options) {\n var _EventInterface6 = EventInterface(Splide2),\n on = _EventInterface6.on,\n bind = _EventInterface6.bind,\n emit = _EventInterface6.emit;\n\n var interval = RequestInterval(options.interval, Splide2.go.bind(Splide2, \">\"), onAnimationFrame);\n var isPaused = interval.isPaused;\n var Elements = Components2.Elements,\n _Components2$Elements4 = Components2.Elements,\n root = _Components2$Elements4.root,\n toggle = _Components2$Elements4.toggle;\n var autoplay = options.autoplay;\n var hovered;\n var focused;\n var stopped = autoplay === \"pause\";\n\n function mount() {\n if (autoplay) {\n listen();\n toggle && setAttribute(toggle, ARIA_CONTROLS, Elements.track.id);\n stopped || play();\n update();\n }\n }\n\n function listen() {\n if (options.pauseOnHover) {\n bind(root, \"mouseenter mouseleave\", function (e) {\n hovered = e.type === \"mouseenter\";\n autoToggle();\n });\n }\n\n if (options.pauseOnFocus) {\n bind(root, \"focusin focusout\", function (e) {\n focused = e.type === \"focusin\";\n autoToggle();\n });\n }\n\n if (toggle) {\n bind(toggle, \"click\", function () {\n stopped ? play() : pause(true);\n });\n }\n\n on([EVENT_MOVE, EVENT_SCROLL, EVENT_REFRESH], interval.rewind);\n on(EVENT_MOVE, onMove);\n }\n\n function play() {\n if (isPaused() && Components2.Slides.isEnough()) {\n interval.start(!options.resetProgress);\n focused = hovered = stopped = false;\n update();\n emit(EVENT_AUTOPLAY_PLAY);\n }\n }\n\n function pause(stop) {\n if (stop === void 0) {\n stop = true;\n }\n\n stopped = !!stop;\n update();\n\n if (!isPaused()) {\n interval.pause();\n emit(EVENT_AUTOPLAY_PAUSE);\n }\n }\n\n function autoToggle() {\n if (!stopped) {\n hovered || focused ? pause(false) : play();\n }\n }\n\n function update() {\n if (toggle) {\n toggleClass(toggle, CLASS_ACTIVE, !stopped);\n setAttribute(toggle, ARIA_LABEL, options.i18n[stopped ? \"play\" : \"pause\"]);\n }\n }\n\n function onAnimationFrame(rate) {\n var bar = Elements.bar;\n bar && style(bar, \"width\", rate * 100 + \"%\");\n emit(EVENT_AUTOPLAY_PLAYING, rate);\n }\n\n function onMove(index) {\n var Slide = Components2.Slides.getAt(index);\n interval.set(Slide && +getAttribute(Slide.slide, INTERVAL_DATA_ATTRIBUTE) || options.interval);\n }\n\n return {\n mount: mount,\n destroy: interval.cancel,\n play: play,\n pause: pause,\n isPaused: isPaused\n };\n}\n\nfunction Cover(Splide2, Components2, options) {\n var _EventInterface7 = EventInterface(Splide2),\n on = _EventInterface7.on;\n\n function mount() {\n if (options.cover) {\n on(EVENT_LAZYLOAD_LOADED, apply(toggle, true));\n on([EVENT_MOUNTED, EVENT_UPDATED, EVENT_REFRESH], apply(cover, true));\n }\n }\n\n function cover(cover2) {\n Components2.Slides.forEach(function (Slide) {\n var img = child(Slide.container || Slide.slide, \"img\");\n\n if (img && img.src) {\n toggle(cover2, img, Slide);\n }\n });\n }\n\n function toggle(cover2, img, Slide) {\n Slide.style(\"background\", cover2 ? \"center/cover no-repeat url(\\\"\" + img.src + \"\\\")\" : \"\", true);\n display(img, cover2 ? \"none\" : \"\");\n }\n\n return {\n mount: mount,\n destroy: apply(cover, false)\n };\n}\n\nvar BOUNCE_DIFF_THRESHOLD = 10;\nvar BOUNCE_DURATION = 600;\nvar FRICTION_FACTOR = 0.6;\nvar BASE_VELOCITY = 1.5;\nvar MIN_DURATION = 800;\n\nfunction Scroll(Splide2, Components2, options) {\n var _EventInterface8 = EventInterface(Splide2),\n on = _EventInterface8.on,\n emit = _EventInterface8.emit;\n\n var set = Splide2.state.set;\n var Move = Components2.Move;\n var getPosition = Move.getPosition,\n getLimit = Move.getLimit,\n exceededLimit = Move.exceededLimit,\n translate = Move.translate;\n var isSlide = Splide2.is(SLIDE);\n var interval;\n var callback;\n var friction = 1;\n\n function mount() {\n on(EVENT_MOVE, clear);\n on([EVENT_UPDATED, EVENT_REFRESH], cancel);\n }\n\n function scroll(destination, duration, snap, onScrolled, noConstrain) {\n var from = getPosition();\n clear();\n\n if (snap && (!isSlide || !exceededLimit())) {\n var size = Components2.Layout.sliderSize();\n var offset = sign(destination) * size * floor(abs(destination) / size) || 0;\n destination = Move.toPosition(Components2.Controller.toDest(destination % size)) + offset;\n }\n\n var noDistance = approximatelyEqual(from, destination, 1);\n friction = 1;\n duration = noDistance ? 0 : duration || max(abs(destination - from) / BASE_VELOCITY, MIN_DURATION);\n callback = onScrolled;\n interval = RequestInterval(duration, onEnd, apply(update, from, destination, noConstrain), 1);\n set(SCROLLING);\n emit(EVENT_SCROLL);\n interval.start();\n }\n\n function onEnd() {\n set(IDLE);\n callback && callback();\n emit(EVENT_SCROLLED);\n }\n\n function update(from, to, noConstrain, rate) {\n var position = getPosition();\n var target = from + (to - from) * easing(rate);\n var diff = (target - position) * friction;\n translate(position + diff);\n\n if (isSlide && !noConstrain && exceededLimit()) {\n friction *= FRICTION_FACTOR;\n\n if (abs(diff) < BOUNCE_DIFF_THRESHOLD) {\n scroll(getLimit(exceededLimit(true)), BOUNCE_DURATION, false, callback, true);\n }\n }\n }\n\n function clear() {\n if (interval) {\n interval.cancel();\n }\n }\n\n function cancel() {\n if (interval && !interval.isPaused()) {\n clear();\n onEnd();\n }\n }\n\n function easing(t) {\n var easingFunc = options.easingFunc;\n return easingFunc ? easingFunc(t) : 1 - Math.pow(1 - t, 4);\n }\n\n return {\n mount: mount,\n destroy: clear,\n scroll: scroll,\n cancel: cancel\n };\n}\n\nvar SCROLL_LISTENER_OPTIONS = {\n passive: false,\n capture: true\n};\n\nfunction Drag(Splide2, Components2, options) {\n var _EventInterface9 = EventInterface(Splide2),\n on = _EventInterface9.on,\n emit = _EventInterface9.emit,\n bind = _EventInterface9.bind,\n unbind = _EventInterface9.unbind;\n\n var state = Splide2.state;\n var Move = Components2.Move,\n Scroll = Components2.Scroll,\n Controller = Components2.Controller,\n track = Components2.Elements.track,\n reduce = Components2.Media.reduce;\n var _Components2$Directio2 = Components2.Direction,\n resolve = _Components2$Directio2.resolve,\n orient = _Components2$Directio2.orient;\n var getPosition = Move.getPosition,\n exceededLimit = Move.exceededLimit;\n var basePosition;\n var baseEvent;\n var prevBaseEvent;\n var isFree;\n var dragging;\n var exceeded = false;\n var clickPrevented;\n var disabled;\n var target;\n\n function mount() {\n bind(track, POINTER_MOVE_EVENTS, noop, SCROLL_LISTENER_OPTIONS);\n bind(track, POINTER_UP_EVENTS, noop, SCROLL_LISTENER_OPTIONS);\n bind(track, POINTER_DOWN_EVENTS, onPointerDown, SCROLL_LISTENER_OPTIONS);\n bind(track, \"click\", onClick, {\n capture: true\n });\n bind(track, \"dragstart\", prevent);\n on([EVENT_MOUNTED, EVENT_UPDATED], init);\n }\n\n function init() {\n var drag = options.drag;\n disable(!drag);\n isFree = drag === \"free\";\n }\n\n function onPointerDown(e) {\n clickPrevented = false;\n\n if (!disabled) {\n var isTouch = isTouchEvent(e);\n\n if (isDraggable(e.target) && (isTouch || !e.button)) {\n if (!Controller.isBusy()) {\n target = isTouch ? track : window;\n dragging = state.is([MOVING, SCROLLING]);\n prevBaseEvent = null;\n bind(target, POINTER_MOVE_EVENTS, onPointerMove, SCROLL_LISTENER_OPTIONS);\n bind(target, POINTER_UP_EVENTS, onPointerUp, SCROLL_LISTENER_OPTIONS);\n Move.cancel();\n Scroll.cancel();\n save(e);\n } else {\n prevent(e, true);\n }\n }\n }\n }\n\n function onPointerMove(e) {\n if (!state.is(DRAGGING)) {\n state.set(DRAGGING);\n emit(EVENT_DRAG);\n }\n\n if (e.cancelable) {\n if (dragging) {\n Move.translate(basePosition + constrain(diffCoord(e)));\n var expired = diffTime(e) > LOG_INTERVAL;\n var hasExceeded = exceeded !== (exceeded = exceededLimit());\n\n if (expired || hasExceeded) {\n save(e);\n }\n\n clickPrevented = true;\n emit(EVENT_DRAGGING);\n prevent(e);\n } else if (isSliderDirection(e)) {\n dragging = shouldStart(e);\n prevent(e);\n }\n }\n }\n\n function onPointerUp(e) {\n if (state.is(DRAGGING)) {\n state.set(IDLE);\n emit(EVENT_DRAGGED);\n }\n\n if (dragging) {\n move(e);\n prevent(e);\n }\n\n unbind(target, POINTER_MOVE_EVENTS, onPointerMove);\n unbind(target, POINTER_UP_EVENTS, onPointerUp);\n dragging = false;\n }\n\n function onClick(e) {\n if (!disabled && clickPrevented) {\n prevent(e, true);\n }\n }\n\n function save(e) {\n prevBaseEvent = baseEvent;\n baseEvent = e;\n basePosition = getPosition();\n }\n\n function move(e) {\n var velocity = computeVelocity(e);\n var destination = computeDestination(velocity);\n var rewind = options.rewind && options.rewindByDrag;\n reduce(false);\n\n if (isFree) {\n Controller.scroll(destination, 0, options.snap);\n } else if (Splide2.is(FADE)) {\n Controller.go(orient(sign(velocity)) < 0 ? rewind ? \"<\" : \"-\" : rewind ? \">\" : \"+\");\n } else if (Splide2.is(SLIDE) && exceeded && rewind) {\n Controller.go(exceededLimit(true) ? \">\" : \"<\");\n } else {\n Controller.go(Controller.toDest(destination), true);\n }\n\n reduce(true);\n }\n\n function shouldStart(e) {\n var thresholds = options.dragMinThreshold;\n var isObj = isObject(thresholds);\n var mouse = isObj && thresholds.mouse || 0;\n var touch = (isObj ? thresholds.touch : +thresholds) || 10;\n return abs(diffCoord(e)) > (isTouchEvent(e) ? touch : mouse);\n }\n\n function isSliderDirection(e) {\n return abs(diffCoord(e)) > abs(diffCoord(e, true));\n }\n\n function computeVelocity(e) {\n if (Splide2.is(LOOP) || !exceeded) {\n var time = diffTime(e);\n\n if (time && time < LOG_INTERVAL) {\n return diffCoord(e) / time;\n }\n }\n\n return 0;\n }\n\n function computeDestination(velocity) {\n return getPosition() + sign(velocity) * min(abs(velocity) * (options.flickPower || 600), isFree ? Infinity : Components2.Layout.listSize() * (options.flickMaxPages || 1));\n }\n\n function diffCoord(e, orthogonal) {\n return coordOf(e, orthogonal) - coordOf(getBaseEvent(e), orthogonal);\n }\n\n function diffTime(e) {\n return timeOf(e) - timeOf(getBaseEvent(e));\n }\n\n function getBaseEvent(e) {\n return baseEvent === e && prevBaseEvent || baseEvent;\n }\n\n function coordOf(e, orthogonal) {\n return (isTouchEvent(e) ? e.changedTouches[0] : e)[\"page\" + resolve(orthogonal ? \"Y\" : \"X\")];\n }\n\n function constrain(diff) {\n return diff / (exceeded && Splide2.is(SLIDE) ? FRICTION : 1);\n }\n\n function isDraggable(target2) {\n var noDrag = options.noDrag;\n return !matches(target2, \".\" + CLASS_PAGINATION_PAGE + \", .\" + CLASS_ARROW) && (!noDrag || !matches(target2, noDrag));\n }\n\n function isTouchEvent(e) {\n return typeof TouchEvent !== \"undefined\" && e instanceof TouchEvent;\n }\n\n function isDragging() {\n return dragging;\n }\n\n function disable(value) {\n disabled = value;\n }\n\n return {\n mount: mount,\n disable: disable,\n isDragging: isDragging\n };\n}\n\nvar NORMALIZATION_MAP = {\n Spacebar: \" \",\n Right: ARROW_RIGHT,\n Left: ARROW_LEFT,\n Up: ARROW_UP,\n Down: ARROW_DOWN\n};\n\nfunction normalizeKey(key) {\n key = isString(key) ? key : key.key;\n return NORMALIZATION_MAP[key] || key;\n}\n\nvar KEYBOARD_EVENT = \"keydown\";\n\nfunction Keyboard(Splide2, Components2, options) {\n var _EventInterface10 = EventInterface(Splide2),\n on = _EventInterface10.on,\n bind = _EventInterface10.bind,\n unbind = _EventInterface10.unbind;\n\n var root = Splide2.root;\n var resolve = Components2.Direction.resolve;\n var target;\n var disabled;\n\n function mount() {\n init();\n on(EVENT_UPDATED, destroy);\n on(EVENT_UPDATED, init);\n on(EVENT_MOVE, onMove);\n }\n\n function init() {\n var keyboard = options.keyboard;\n\n if (keyboard) {\n target = keyboard === \"global\" ? window : root;\n bind(target, KEYBOARD_EVENT, onKeydown);\n }\n }\n\n function destroy() {\n unbind(target, KEYBOARD_EVENT);\n }\n\n function disable(value) {\n disabled = value;\n }\n\n function onMove() {\n var _disabled = disabled;\n disabled = true;\n nextTick(function () {\n disabled = _disabled;\n });\n }\n\n function onKeydown(e) {\n if (!disabled) {\n var key = normalizeKey(e);\n\n if (key === resolve(ARROW_LEFT)) {\n Splide2.go(\"<\");\n } else if (key === resolve(ARROW_RIGHT)) {\n Splide2.go(\">\");\n }\n }\n }\n\n return {\n mount: mount,\n destroy: destroy,\n disable: disable\n };\n}\n\nvar SRC_DATA_ATTRIBUTE = DATA_ATTRIBUTE + \"-lazy\";\nvar SRCSET_DATA_ATTRIBUTE = SRC_DATA_ATTRIBUTE + \"-srcset\";\nvar IMAGE_SELECTOR = \"[\" + SRC_DATA_ATTRIBUTE + \"], [\" + SRCSET_DATA_ATTRIBUTE + \"]\";\n\nfunction LazyLoad(Splide2, Components2, options) {\n var _EventInterface11 = EventInterface(Splide2),\n on = _EventInterface11.on,\n off = _EventInterface11.off,\n bind = _EventInterface11.bind,\n emit = _EventInterface11.emit;\n\n var isSequential = options.lazyLoad === \"sequential\";\n var events = [EVENT_MOVED, EVENT_SCROLLED];\n var entries = [];\n\n function mount() {\n if (options.lazyLoad) {\n init();\n on(EVENT_REFRESH, init);\n }\n }\n\n function init() {\n empty(entries);\n register();\n\n if (isSequential) {\n loadNext();\n } else {\n off(events);\n on(events, check);\n check();\n }\n }\n\n function register() {\n Components2.Slides.forEach(function (Slide) {\n queryAll(Slide.slide, IMAGE_SELECTOR).forEach(function (img) {\n var src = getAttribute(img, SRC_DATA_ATTRIBUTE);\n var srcset = getAttribute(img, SRCSET_DATA_ATTRIBUTE);\n\n if (src !== img.src || srcset !== img.srcset) {\n var className = options.classes.spinner;\n var parent = img.parentElement;\n var spinner = child(parent, \".\" + className) || create(\"span\", className, parent);\n entries.push([img, Slide, spinner]);\n img.src || display(img, \"none\");\n }\n });\n });\n }\n\n function check() {\n entries = entries.filter(function (data) {\n var distance = options.perPage * ((options.preloadPages || 1) + 1) - 1;\n return data[1].isWithin(Splide2.index, distance) ? load(data) : true;\n });\n entries.length || off(events);\n }\n\n function load(data) {\n var img = data[0];\n addClass(data[1].slide, CLASS_LOADING);\n bind(img, \"load error\", apply(onLoad, data));\n setAttribute(img, \"src\", getAttribute(img, SRC_DATA_ATTRIBUTE));\n setAttribute(img, \"srcset\", getAttribute(img, SRCSET_DATA_ATTRIBUTE));\n removeAttribute(img, SRC_DATA_ATTRIBUTE);\n removeAttribute(img, SRCSET_DATA_ATTRIBUTE);\n }\n\n function onLoad(data, e) {\n var img = data[0],\n Slide = data[1];\n removeClass(Slide.slide, CLASS_LOADING);\n\n if (e.type !== \"error\") {\n remove(data[2]);\n display(img, \"\");\n emit(EVENT_LAZYLOAD_LOADED, img, Slide);\n emit(EVENT_RESIZE);\n }\n\n isSequential && loadNext();\n }\n\n function loadNext() {\n entries.length && load(entries.shift());\n }\n\n return {\n mount: mount,\n destroy: apply(empty, entries),\n check: check\n };\n}\n\nfunction Pagination(Splide2, Components2, options) {\n var event = EventInterface(Splide2);\n var on = event.on,\n emit = event.emit,\n bind = event.bind;\n var Slides = Components2.Slides,\n Elements = Components2.Elements,\n Controller = Components2.Controller;\n var hasFocus = Controller.hasFocus,\n getIndex = Controller.getIndex,\n go = Controller.go;\n var resolve = Components2.Direction.resolve;\n var placeholder = Elements.pagination;\n var items = [];\n var list;\n var paginationClasses;\n\n function mount() {\n destroy();\n on([EVENT_UPDATED, EVENT_REFRESH, EVENT_END_INDEX_CHANGED], mount);\n var enabled = options.pagination;\n placeholder && display(placeholder, enabled ? \"\" : \"none\");\n\n if (enabled) {\n on([EVENT_MOVE, EVENT_SCROLL, EVENT_SCROLLED], update);\n createPagination();\n update();\n emit(EVENT_PAGINATION_MOUNTED, {\n list: list,\n items: items\n }, getAt(Splide2.index));\n }\n }\n\n function destroy() {\n if (list) {\n remove(placeholder ? slice(list.children) : list);\n removeClass(list, paginationClasses);\n empty(items);\n list = null;\n }\n\n event.destroy();\n }\n\n function createPagination() {\n var length = Splide2.length;\n var classes = options.classes,\n i18n = options.i18n,\n perPage = options.perPage;\n var max = hasFocus() ? Controller.getEnd() + 1 : ceil(length / perPage);\n list = placeholder || create(\"ul\", classes.pagination, Elements.track.parentElement);\n addClass(list, paginationClasses = CLASS_PAGINATION + \"--\" + getDirection());\n setAttribute(list, ROLE, \"tablist\");\n setAttribute(list, ARIA_LABEL, i18n.select);\n setAttribute(list, ARIA_ORIENTATION, getDirection() === TTB ? \"vertical\" : \"\");\n\n for (var i = 0; i < max; i++) {\n var li = create(\"li\", null, list);\n var button = create(\"button\", {\n class: classes.page,\n type: \"button\"\n }, li);\n var controls = Slides.getIn(i).map(function (Slide) {\n return Slide.slide.id;\n });\n var text = !hasFocus() && perPage > 1 ? i18n.pageX : i18n.slideX;\n bind(button, \"click\", apply(onClick, i));\n\n if (options.paginationKeyboard) {\n bind(button, \"keydown\", apply(onKeydown, i));\n }\n\n setAttribute(li, ROLE, \"presentation\");\n setAttribute(button, ROLE, \"tab\");\n setAttribute(button, ARIA_CONTROLS, controls.join(\" \"));\n setAttribute(button, ARIA_LABEL, format(text, i + 1));\n setAttribute(button, TAB_INDEX, -1);\n items.push({\n li: li,\n button: button,\n page: i\n });\n }\n }\n\n function onClick(page) {\n go(\">\" + page, true);\n }\n\n function onKeydown(page, e) {\n var length = items.length;\n var key = normalizeKey(e);\n var dir = getDirection();\n var nextPage = -1;\n\n if (key === resolve(ARROW_RIGHT, false, dir)) {\n nextPage = ++page % length;\n } else if (key === resolve(ARROW_LEFT, false, dir)) {\n nextPage = (--page + length) % length;\n } else if (key === \"Home\") {\n nextPage = 0;\n } else if (key === \"End\") {\n nextPage = length - 1;\n }\n\n var item = items[nextPage];\n\n if (item) {\n focus(item.button);\n go(\">\" + nextPage);\n prevent(e, true);\n }\n }\n\n function getDirection() {\n return options.paginationDirection || options.direction;\n }\n\n function getAt(index) {\n return items[Controller.toPage(index)];\n }\n\n function update() {\n var prev = getAt(getIndex(true));\n var curr = getAt(getIndex());\n\n if (prev) {\n var button = prev.button;\n removeClass(button, CLASS_ACTIVE);\n removeAttribute(button, ARIA_SELECTED);\n setAttribute(button, TAB_INDEX, -1);\n }\n\n if (curr) {\n var _button = curr.button;\n addClass(_button, CLASS_ACTIVE);\n setAttribute(_button, ARIA_SELECTED, true);\n setAttribute(_button, TAB_INDEX, \"\");\n }\n\n emit(EVENT_PAGINATION_UPDATED, {\n list: list,\n items: items\n }, prev, curr);\n }\n\n return {\n items: items,\n mount: mount,\n destroy: destroy,\n getAt: getAt,\n update: update\n };\n}\n\nvar TRIGGER_KEYS = [\" \", \"Enter\"];\n\nfunction Sync(Splide2, Components2, options) {\n var isNavigation = options.isNavigation,\n slideFocus = options.slideFocus;\n var events = [];\n\n function mount() {\n Splide2.splides.forEach(function (target) {\n if (!target.isParent) {\n sync(Splide2, target.splide);\n sync(target.splide, Splide2);\n }\n });\n\n if (isNavigation) {\n navigate();\n }\n }\n\n function destroy() {\n events.forEach(function (event) {\n event.destroy();\n });\n empty(events);\n }\n\n function remount() {\n destroy();\n mount();\n }\n\n function sync(splide, target) {\n var event = EventInterface(splide);\n event.on(EVENT_MOVE, function (index, prev, dest) {\n target.go(target.is(LOOP) ? dest : index);\n });\n events.push(event);\n }\n\n function navigate() {\n var event = EventInterface(Splide2);\n var on = event.on;\n on(EVENT_CLICK, onClick);\n on(EVENT_SLIDE_KEYDOWN, onKeydown);\n on([EVENT_MOUNTED, EVENT_UPDATED], update);\n events.push(event);\n event.emit(EVENT_NAVIGATION_MOUNTED, Splide2.splides);\n }\n\n function update() {\n setAttribute(Components2.Elements.list, ARIA_ORIENTATION, options.direction === TTB ? \"vertical\" : \"\");\n }\n\n function onClick(Slide) {\n Splide2.go(Slide.index);\n }\n\n function onKeydown(Slide, e) {\n if (includes(TRIGGER_KEYS, normalizeKey(e))) {\n onClick(Slide);\n prevent(e);\n }\n }\n\n return {\n setup: apply(Components2.Media.set, {\n slideFocus: isUndefined(slideFocus) ? isNavigation : slideFocus\n }, true),\n mount: mount,\n destroy: destroy,\n remount: remount\n };\n}\n\nfunction Wheel(Splide2, Components2, options) {\n var _EventInterface12 = EventInterface(Splide2),\n bind = _EventInterface12.bind;\n\n var lastTime = 0;\n\n function mount() {\n if (options.wheel) {\n bind(Components2.Elements.track, \"wheel\", onWheel, SCROLL_LISTENER_OPTIONS);\n }\n }\n\n function onWheel(e) {\n if (e.cancelable) {\n var deltaY = e.deltaY;\n var backwards = deltaY < 0;\n var timeStamp = timeOf(e);\n\n var _min = options.wheelMinThreshold || 0;\n\n var sleep = options.wheelSleep || 0;\n\n if (abs(deltaY) > _min && timeStamp - lastTime > sleep) {\n Splide2.go(backwards ? \"<\" : \">\");\n lastTime = timeStamp;\n }\n\n shouldPrevent(backwards) && prevent(e);\n }\n }\n\n function shouldPrevent(backwards) {\n return !options.releaseWheel || Splide2.state.is(MOVING) || Components2.Controller.getAdjacent(backwards) !== -1;\n }\n\n return {\n mount: mount\n };\n}\n\nvar SR_REMOVAL_DELAY = 90;\n\nfunction Live(Splide2, Components2, options) {\n var _EventInterface13 = EventInterface(Splide2),\n on = _EventInterface13.on;\n\n var track = Components2.Elements.track;\n var enabled = options.live && !options.isNavigation;\n var sr = create(\"span\", CLASS_SR);\n var interval = RequestInterval(SR_REMOVAL_DELAY, apply(toggle, false));\n\n function mount() {\n if (enabled) {\n disable(!Components2.Autoplay.isPaused());\n setAttribute(track, ARIA_ATOMIC, true);\n sr.textContent = \"\\u2026\";\n on(EVENT_AUTOPLAY_PLAY, apply(disable, true));\n on(EVENT_AUTOPLAY_PAUSE, apply(disable, false));\n on([EVENT_MOVED, EVENT_SCROLLED], apply(toggle, true));\n }\n }\n\n function toggle(active) {\n setAttribute(track, ARIA_BUSY, active);\n\n if (active) {\n append(track, sr);\n interval.start();\n } else {\n remove(sr);\n interval.cancel();\n }\n }\n\n function destroy() {\n removeAttribute(track, [ARIA_LIVE, ARIA_ATOMIC, ARIA_BUSY]);\n remove(sr);\n }\n\n function disable(disabled) {\n if (enabled) {\n setAttribute(track, ARIA_LIVE, disabled ? \"off\" : \"polite\");\n }\n }\n\n return {\n mount: mount,\n disable: disable,\n destroy: destroy\n };\n}\n\nvar ComponentConstructors = /*#__PURE__*/Object.freeze({\n __proto__: null,\n Media: Media,\n Direction: Direction,\n Elements: Elements,\n Slides: Slides,\n Layout: Layout,\n Clones: Clones,\n Move: Move,\n Controller: Controller,\n Arrows: Arrows,\n Autoplay: Autoplay,\n Cover: Cover,\n Scroll: Scroll,\n Drag: Drag,\n Keyboard: Keyboard,\n LazyLoad: LazyLoad,\n Pagination: Pagination,\n Sync: Sync,\n Wheel: Wheel,\n Live: Live\n});\nvar I18N = {\n prev: \"Previous slide\",\n next: \"Next slide\",\n first: \"Go to first slide\",\n last: \"Go to last slide\",\n slideX: \"Go to slide %s\",\n pageX: \"Go to page %s\",\n play: \"Start autoplay\",\n pause: \"Pause autoplay\",\n carousel: \"carousel\",\n slide: \"slide\",\n select: \"Select a slide to show\",\n slideLabel: \"%s of %s\"\n};\nvar DEFAULTS = {\n type: \"slide\",\n role: \"region\",\n speed: 400,\n perPage: 1,\n cloneStatus: true,\n arrows: true,\n pagination: true,\n paginationKeyboard: true,\n interval: 5e3,\n pauseOnHover: true,\n pauseOnFocus: true,\n resetProgress: true,\n easing: \"cubic-bezier(0.25, 1, 0.5, 1)\",\n drag: true,\n direction: \"ltr\",\n trimSpace: true,\n focusableNodes: \"a, button, textarea, input, select, iframe\",\n live: true,\n classes: CLASSES,\n i18n: I18N,\n reducedMotion: {\n speed: 0,\n rewindSpeed: 0,\n autoplay: \"pause\"\n }\n};\n\nfunction Fade(Splide2, Components2, options) {\n var Slides = Components2.Slides;\n\n function mount() {\n EventInterface(Splide2).on([EVENT_MOUNTED, EVENT_REFRESH], init);\n }\n\n function init() {\n Slides.forEach(function (Slide) {\n Slide.style(\"transform\", \"translateX(-\" + 100 * Slide.index + \"%)\");\n });\n }\n\n function start(index, done) {\n Slides.style(\"transition\", \"opacity \" + options.speed + \"ms \" + options.easing);\n nextTick(done);\n }\n\n return {\n mount: mount,\n start: start,\n cancel: noop\n };\n}\n\nfunction Slide(Splide2, Components2, options) {\n var Move = Components2.Move,\n Controller = Components2.Controller,\n Scroll = Components2.Scroll;\n var list = Components2.Elements.list;\n var transition = apply(style, list, \"transition\");\n var endCallback;\n\n function mount() {\n EventInterface(Splide2).bind(list, \"transitionend\", function (e) {\n if (e.target === list && endCallback) {\n cancel();\n endCallback();\n }\n });\n }\n\n function start(index, done) {\n var destination = Move.toPosition(index, true);\n var position = Move.getPosition();\n var speed = getSpeed(index);\n\n if (abs(destination - position) >= 1 && speed >= 1) {\n if (options.useScroll) {\n Scroll.scroll(destination, speed, false, done);\n } else {\n transition(\"transform \" + speed + \"ms \" + options.easing);\n Move.translate(destination, true);\n endCallback = done;\n }\n } else {\n Move.jump(index);\n done();\n }\n }\n\n function cancel() {\n transition(\"\");\n Scroll.cancel();\n }\n\n function getSpeed(index) {\n var rewindSpeed = options.rewindSpeed;\n\n if (Splide2.is(SLIDE) && rewindSpeed) {\n var prev = Controller.getIndex(true);\n var end = Controller.getEnd();\n\n if (prev === 0 && index >= end || prev >= end && index === 0) {\n return rewindSpeed;\n }\n }\n\n return options.speed;\n }\n\n return {\n mount: mount,\n start: start,\n cancel: cancel\n };\n}\n\nvar _Splide = /*#__PURE__*/function () {\n function _Splide(target, options) {\n this.event = EventInterface();\n this.Components = {};\n this.state = State(CREATED);\n this.splides = [];\n this._o = {};\n this._E = {};\n var root = isString(target) ? query(document, target) : target;\n assert(root, root + \" is invalid.\");\n this.root = root;\n options = merge({\n label: getAttribute(root, ARIA_LABEL) || \"\",\n labelledby: getAttribute(root, ARIA_LABELLEDBY) || \"\"\n }, DEFAULTS, _Splide.defaults, options || {});\n\n try {\n merge(options, JSON.parse(getAttribute(root, DATA_ATTRIBUTE)));\n } catch (e) {\n assert(false, \"Invalid JSON\");\n }\n\n this._o = Object.create(merge({}, options));\n }\n\n var _proto = _Splide.prototype;\n\n _proto.mount = function mount(Extensions, Transition) {\n var _this = this;\n\n var state = this.state,\n Components2 = this.Components;\n assert(state.is([CREATED, DESTROYED]), \"Already mounted!\");\n state.set(CREATED);\n this._C = Components2;\n this._T = Transition || this._T || (this.is(FADE) ? Fade : Slide);\n this._E = Extensions || this._E;\n var Constructors = assign({}, ComponentConstructors, this._E, {\n Transition: this._T\n });\n forOwn(Constructors, function (Component, key) {\n var component = Component(_this, Components2, _this._o);\n Components2[key] = component;\n component.setup && component.setup();\n });\n forOwn(Components2, function (component) {\n component.mount && component.mount();\n });\n this.emit(EVENT_MOUNTED);\n addClass(this.root, CLASS_INITIALIZED);\n state.set(IDLE);\n this.emit(EVENT_READY);\n return this;\n };\n\n _proto.sync = function sync(splide) {\n this.splides.push({\n splide: splide\n });\n splide.splides.push({\n splide: this,\n isParent: true\n });\n\n if (this.state.is(IDLE)) {\n this._C.Sync.remount();\n\n splide.Components.Sync.remount();\n }\n\n return this;\n };\n\n _proto.go = function go(control) {\n this._C.Controller.go(control);\n\n return this;\n };\n\n _proto.on = function on(events, callback) {\n this.event.on(events, callback);\n return this;\n };\n\n _proto.off = function off(events) {\n this.event.off(events);\n return this;\n };\n\n _proto.emit = function emit(event) {\n var _this$event;\n\n (_this$event = this.event).emit.apply(_this$event, [event].concat(slice(arguments, 1)));\n\n return this;\n };\n\n _proto.add = function add(slides, index) {\n this._C.Slides.add(slides, index);\n\n return this;\n };\n\n _proto.remove = function remove(matcher) {\n this._C.Slides.remove(matcher);\n\n return this;\n };\n\n _proto.is = function is(type) {\n return this._o.type === type;\n };\n\n _proto.refresh = function refresh() {\n this.emit(EVENT_REFRESH);\n return this;\n };\n\n _proto.destroy = function destroy(completely) {\n if (completely === void 0) {\n completely = true;\n }\n\n var event = this.event,\n state = this.state;\n\n if (state.is(CREATED)) {\n EventInterface(this).on(EVENT_READY, this.destroy.bind(this, completely));\n } else {\n forOwn(this._C, function (component) {\n component.destroy && component.destroy(completely);\n }, true);\n event.emit(EVENT_DESTROY);\n event.destroy();\n completely && empty(this.splides);\n state.set(DESTROYED);\n }\n\n return this;\n };\n\n _createClass(_Splide, [{\n key: \"options\",\n get: function get() {\n return this._o;\n },\n set: function set(options) {\n this._C.Media.set(options, true, true);\n }\n }, {\n key: \"length\",\n get: function get() {\n return this._C.Slides.getLength(true);\n }\n }, {\n key: \"index\",\n get: function get() {\n return this._C.Controller.getIndex();\n }\n }]);\n\n return _Splide;\n}();\n\nvar Splide = _Splide;\nSplide.defaults = {};\nSplide.STATES = STATES;\nvar CLASS_RENDERED = \"is-rendered\";\nvar RENDERER_DEFAULT_CONFIG = {\n listTag: \"ul\",\n slideTag: \"li\"\n};\n\nvar Style = /*#__PURE__*/function () {\n function Style(id, options) {\n this.styles = {};\n this.id = id;\n this.options = options;\n }\n\n var _proto2 = Style.prototype;\n\n _proto2.rule = function rule(selector, prop, value, breakpoint) {\n breakpoint = breakpoint || \"default\";\n var selectors = this.styles[breakpoint] = this.styles[breakpoint] || {};\n var styles = selectors[selector] = selectors[selector] || {};\n styles[prop] = value;\n };\n\n _proto2.build = function build() {\n var _this2 = this;\n\n var css = \"\";\n\n if (this.styles.default) {\n css += this.buildSelectors(this.styles.default);\n }\n\n Object.keys(this.styles).sort(function (n, m) {\n return _this2.options.mediaQuery === \"min\" ? +n - +m : +m - +n;\n }).forEach(function (breakpoint) {\n if (breakpoint !== \"default\") {\n css += \"@media screen and (max-width: \" + breakpoint + \"px) {\";\n css += _this2.buildSelectors(_this2.styles[breakpoint]);\n css += \"}\";\n }\n });\n return css;\n };\n\n _proto2.buildSelectors = function buildSelectors(selectors) {\n var _this3 = this;\n\n var css = \"\";\n forOwn(selectors, function (styles, selector) {\n selector = (\"#\" + _this3.id + \" \" + selector).trim();\n css += selector + \" {\";\n forOwn(styles, function (value, prop) {\n if (value || value === 0) {\n css += prop + \": \" + value + \";\";\n }\n });\n css += \"}\";\n });\n return css;\n };\n\n return Style;\n}();\n\nvar SplideRenderer = /*#__PURE__*/function () {\n function SplideRenderer(contents, options, config, defaults) {\n this.slides = [];\n this.options = {};\n this.breakpoints = [];\n merge(DEFAULTS, defaults || {});\n merge(merge(this.options, DEFAULTS), options || {});\n this.contents = contents;\n this.config = assign({}, RENDERER_DEFAULT_CONFIG, config || {});\n this.id = this.config.id || uniqueId(\"splide\");\n this.Style = new Style(this.id, this.options);\n this.Direction = Direction(null, null, this.options);\n assert(this.contents.length, \"Provide at least 1 content.\");\n this.init();\n }\n\n SplideRenderer.clean = function clean(splide) {\n var _EventInterface14 = EventInterface(splide),\n on = _EventInterface14.on;\n\n var root = splide.root;\n var clones = queryAll(root, \".\" + CLASS_CLONE);\n on(EVENT_MOUNTED, function () {\n remove(child(root, \"style\"));\n });\n remove(clones);\n };\n\n var _proto3 = SplideRenderer.prototype;\n\n _proto3.init = function init() {\n this.parseBreakpoints();\n this.initSlides();\n this.registerRootStyles();\n this.registerTrackStyles();\n this.registerSlideStyles();\n this.registerListStyles();\n };\n\n _proto3.initSlides = function initSlides() {\n var _this4 = this;\n\n push(this.slides, this.contents.map(function (content, index) {\n content = isString(content) ? {\n html: content\n } : content;\n content.styles = content.styles || {};\n content.attrs = content.attrs || {};\n\n _this4.cover(content);\n\n var classes = _this4.options.classes.slide + \" \" + (index === 0 ? CLASS_ACTIVE : \"\");\n assign(content.attrs, {\n class: (classes + \" \" + (content.attrs.class || \"\")).trim(),\n style: _this4.buildStyles(content.styles)\n });\n return content;\n }));\n\n if (this.isLoop()) {\n this.generateClones(this.slides);\n }\n };\n\n _proto3.registerRootStyles = function registerRootStyles() {\n var _this5 = this;\n\n this.breakpoints.forEach(function (_ref2) {\n var width = _ref2[0],\n options = _ref2[1];\n\n _this5.Style.rule(\" \", \"max-width\", unit(options.width), width);\n });\n };\n\n _proto3.registerTrackStyles = function registerTrackStyles() {\n var _this6 = this;\n\n var Style2 = this.Style;\n var selector = \".\" + CLASS_TRACK;\n this.breakpoints.forEach(function (_ref3) {\n var width = _ref3[0],\n options = _ref3[1];\n Style2.rule(selector, _this6.resolve(\"paddingLeft\"), _this6.cssPadding(options, false), width);\n Style2.rule(selector, _this6.resolve(\"paddingRight\"), _this6.cssPadding(options, true), width);\n Style2.rule(selector, \"height\", _this6.cssTrackHeight(options), width);\n });\n };\n\n _proto3.registerListStyles = function registerListStyles() {\n var _this7 = this;\n\n var Style2 = this.Style;\n var selector = \".\" + CLASS_LIST;\n this.breakpoints.forEach(function (_ref4) {\n var width = _ref4[0],\n options = _ref4[1];\n Style2.rule(selector, \"transform\", _this7.buildTranslate(options), width);\n\n if (!_this7.cssSlideHeight(options)) {\n Style2.rule(selector, \"aspect-ratio\", _this7.cssAspectRatio(options), width);\n }\n });\n };\n\n _proto3.registerSlideStyles = function registerSlideStyles() {\n var _this8 = this;\n\n var Style2 = this.Style;\n var selector = \".\" + CLASS_SLIDE;\n this.breakpoints.forEach(function (_ref5) {\n var width = _ref5[0],\n options = _ref5[1];\n Style2.rule(selector, \"width\", _this8.cssSlideWidth(options), width);\n Style2.rule(selector, \"height\", _this8.cssSlideHeight(options) || \"100%\", width);\n Style2.rule(selector, _this8.resolve(\"marginRight\"), unit(options.gap) || \"0px\", width);\n Style2.rule(selector + \" > img\", \"display\", options.cover ? \"none\" : \"inline\", width);\n });\n };\n\n _proto3.buildTranslate = function buildTranslate(options) {\n var _this$Direction = this.Direction,\n resolve = _this$Direction.resolve,\n orient = _this$Direction.orient;\n var values = [];\n values.push(this.cssOffsetClones(options));\n values.push(this.cssOffsetGaps(options));\n\n if (this.isCenter(options)) {\n values.push(this.buildCssValue(orient(-50), \"%\"));\n values.push.apply(values, this.cssOffsetCenter(options));\n }\n\n return values.filter(Boolean).map(function (value) {\n return \"translate\" + resolve(\"X\") + \"(\" + value + \")\";\n }).join(\" \");\n };\n\n _proto3.cssOffsetClones = function cssOffsetClones(options) {\n var _this$Direction2 = this.Direction,\n resolve = _this$Direction2.resolve,\n orient = _this$Direction2.orient;\n var cloneCount = this.getCloneCount();\n\n if (this.isFixedWidth(options)) {\n var _this$parseCssValue = this.parseCssValue(options[resolve(\"fixedWidth\")]),\n value = _this$parseCssValue.value,\n unit2 = _this$parseCssValue.unit;\n\n return this.buildCssValue(orient(value) * cloneCount, unit2);\n }\n\n var percent = 100 * cloneCount / options.perPage;\n return orient(percent) + \"%\";\n };\n\n _proto3.cssOffsetCenter = function cssOffsetCenter(options) {\n var _this$Direction3 = this.Direction,\n resolve = _this$Direction3.resolve,\n orient = _this$Direction3.orient;\n\n if (this.isFixedWidth(options)) {\n var _this$parseCssValue2 = this.parseCssValue(options[resolve(\"fixedWidth\")]),\n value = _this$parseCssValue2.value,\n unit2 = _this$parseCssValue2.unit;\n\n return [this.buildCssValue(orient(value / 2), unit2)];\n }\n\n var values = [];\n var perPage = options.perPage,\n gap = options.gap;\n values.push(orient(50 / perPage) + \"%\");\n\n if (gap) {\n var _this$parseCssValue3 = this.parseCssValue(gap),\n _value = _this$parseCssValue3.value,\n _unit = _this$parseCssValue3.unit;\n\n var gapOffset = (_value / perPage - _value) / 2;\n values.push(this.buildCssValue(orient(gapOffset), _unit));\n }\n\n return values;\n };\n\n _proto3.cssOffsetGaps = function cssOffsetGaps(options) {\n var cloneCount = this.getCloneCount();\n\n if (cloneCount && options.gap) {\n var orient = this.Direction.orient;\n\n var _this$parseCssValue4 = this.parseCssValue(options.gap),\n value = _this$parseCssValue4.value,\n unit2 = _this$parseCssValue4.unit;\n\n if (this.isFixedWidth(options)) {\n return this.buildCssValue(orient(value * cloneCount), unit2);\n }\n\n var perPage = options.perPage;\n var gaps = cloneCount / perPage;\n return this.buildCssValue(orient(gaps * value), unit2);\n }\n\n return \"\";\n };\n\n _proto3.resolve = function resolve(prop) {\n return camelToKebab(this.Direction.resolve(prop));\n };\n\n _proto3.cssPadding = function cssPadding(options, right) {\n var padding = options.padding;\n var prop = this.Direction.resolve(right ? \"right\" : \"left\", true);\n return padding && unit(padding[prop] || (isObject(padding) ? 0 : padding)) || \"0px\";\n };\n\n _proto3.cssTrackHeight = function cssTrackHeight(options) {\n var height = \"\";\n\n if (this.isVertical()) {\n height = this.cssHeight(options);\n assert(height, '\"height\" is missing.');\n height = \"calc(\" + height + \" - \" + this.cssPadding(options, false) + \" - \" + this.cssPadding(options, true) + \")\";\n }\n\n return height;\n };\n\n _proto3.cssHeight = function cssHeight(options) {\n return unit(options.height);\n };\n\n _proto3.cssSlideWidth = function cssSlideWidth(options) {\n return options.autoWidth ? \"\" : unit(options.fixedWidth) || (this.isVertical() ? \"\" : this.cssSlideSize(options));\n };\n\n _proto3.cssSlideHeight = function cssSlideHeight(options) {\n return unit(options.fixedHeight) || (this.isVertical() ? options.autoHeight ? \"\" : this.cssSlideSize(options) : this.cssHeight(options));\n };\n\n _proto3.cssSlideSize = function cssSlideSize(options) {\n var gap = unit(options.gap);\n return \"calc((100%\" + (gap && \" + \" + gap) + \")/\" + (options.perPage || 1) + (gap && \" - \" + gap) + \")\";\n };\n\n _proto3.cssAspectRatio = function cssAspectRatio(options) {\n var heightRatio = options.heightRatio;\n return heightRatio ? \"\" + 1 / heightRatio : \"\";\n };\n\n _proto3.buildCssValue = function buildCssValue(value, unit2) {\n return \"\" + value + unit2;\n };\n\n _proto3.parseCssValue = function parseCssValue(value) {\n if (isString(value)) {\n var number = parseFloat(value) || 0;\n var unit2 = value.replace(/\\d*(\\.\\d*)?/, \"\") || \"px\";\n return {\n value: number,\n unit: unit2\n };\n }\n\n return {\n value: value,\n unit: \"px\"\n };\n };\n\n _proto3.parseBreakpoints = function parseBreakpoints() {\n var _this9 = this;\n\n var breakpoints = this.options.breakpoints;\n this.breakpoints.push([\"default\", this.options]);\n\n if (breakpoints) {\n forOwn(breakpoints, function (options, width) {\n _this9.breakpoints.push([width, merge(merge({}, _this9.options), options)]);\n });\n }\n };\n\n _proto3.isFixedWidth = function isFixedWidth(options) {\n return !!options[this.Direction.resolve(\"fixedWidth\")];\n };\n\n _proto3.isLoop = function isLoop() {\n return this.options.type === LOOP;\n };\n\n _proto3.isCenter = function isCenter(options) {\n if (options.focus === \"center\") {\n if (this.isLoop()) {\n return true;\n }\n\n if (this.options.type === SLIDE) {\n return !this.options.trimSpace;\n }\n }\n\n return false;\n };\n\n _proto3.isVertical = function isVertical() {\n return this.options.direction === TTB;\n };\n\n _proto3.buildClasses = function buildClasses() {\n var options = this.options;\n return [CLASS_ROOT, CLASS_ROOT + \"--\" + options.type, CLASS_ROOT + \"--\" + options.direction, options.drag && CLASS_ROOT + \"--draggable\", options.isNavigation && CLASS_ROOT + \"--nav\", CLASS_ACTIVE, !this.config.hidden && CLASS_RENDERED].filter(Boolean).join(\" \");\n };\n\n _proto3.buildAttrs = function buildAttrs(attrs) {\n var attr = \"\";\n forOwn(attrs, function (value, key) {\n attr += value ? \" \" + camelToKebab(key) + \"=\\\"\" + value + \"\\\"\" : \"\";\n });\n return attr.trim();\n };\n\n _proto3.buildStyles = function buildStyles(styles) {\n var style = \"\";\n forOwn(styles, function (value, key) {\n style += \" \" + camelToKebab(key) + \":\" + value + \";\";\n });\n return style.trim();\n };\n\n _proto3.renderSlides = function renderSlides() {\n var _this10 = this;\n\n var tag = this.config.slideTag;\n return this.slides.map(function (content) {\n return \"<\" + tag + \" \" + _this10.buildAttrs(content.attrs) + \">\" + (content.html || \"\") + \"\" + tag + \">\";\n }).join(\"\");\n };\n\n _proto3.cover = function cover(content) {\n var styles = content.styles,\n _content$html = content.html,\n html = _content$html === void 0 ? \"\" : _content$html;\n\n if (this.options.cover && !this.options.lazyLoad) {\n var src = html.match(//);\n\n if (src && src[2]) {\n styles.background = \"center/cover no-repeat url('\" + src[2] + \"')\";\n }\n }\n };\n\n _proto3.generateClones = function generateClones(contents) {\n var classes = this.options.classes;\n var count = this.getCloneCount();\n var slides = contents.slice();\n\n while (slides.length < count) {\n push(slides, slides);\n }\n\n push(slides.slice(-count).reverse(), slides.slice(0, count)).forEach(function (content, index) {\n var attrs = assign({}, content.attrs, {\n class: content.attrs.class + \" \" + classes.clone\n });\n var clone = assign({}, content, {\n attrs: attrs\n });\n index < count ? contents.unshift(clone) : contents.push(clone);\n });\n };\n\n _proto3.getCloneCount = function getCloneCount() {\n if (this.isLoop()) {\n var options = this.options;\n\n if (options.clones) {\n return options.clones;\n }\n\n var perPage = max.apply(void 0, this.breakpoints.map(function (_ref6) {\n var options2 = _ref6[1];\n return options2.perPage;\n }));\n return perPage * ((options.flickMaxPages || 1) + 1);\n }\n\n return 0;\n };\n\n _proto3.renderArrows = function renderArrows() {\n var html = \"\";\n html += \"\";\n html += this.renderArrow(true);\n html += this.renderArrow(false);\n html += \"
\";\n return html;\n };\n\n _proto3.renderArrow = function renderArrow(prev) {\n var _this$options = this.options,\n classes = _this$options.classes,\n i18n = _this$options.i18n;\n var attrs = {\n class: classes.arrow + \" \" + (prev ? classes.prev : classes.next),\n type: \"button\",\n ariaLabel: prev ? i18n.prev : i18n.next\n };\n return \" \";\n };\n\n _proto3.html = function html() {\n var _this$config = this.config,\n rootClass = _this$config.rootClass,\n listTag = _this$config.listTag,\n arrows = _this$config.arrows,\n beforeTrack = _this$config.beforeTrack,\n afterTrack = _this$config.afterTrack,\n slider = _this$config.slider,\n beforeSlider = _this$config.beforeSlider,\n afterSlider = _this$config.afterSlider;\n var html = \"\";\n html += \"\";\n html += \"\";\n\n if (slider) {\n html += beforeSlider || \"\";\n html += \"
\";\n }\n\n html += beforeTrack || \"\";\n\n if (arrows) {\n html += this.renderArrows();\n }\n\n html += \"
\";\n html += \"<\" + listTag + \" class=\\\"splide__list\\\">\";\n html += this.renderSlides();\n html += \"\" + listTag + \">\";\n html += \"
\";\n html += afterTrack || \"\";\n\n if (slider) {\n html += \"
\";\n html += afterSlider || \"\";\n }\n\n html += \"
\";\n return html;\n };\n\n return SplideRenderer;\n}();\n\nexport { CLASSES, CLASS_ACTIVE, CLASS_ARROW, CLASS_ARROWS, CLASS_ARROW_NEXT, CLASS_ARROW_PREV, CLASS_CLONE, CLASS_CONTAINER, CLASS_FOCUS_IN, CLASS_INITIALIZED, CLASS_LIST, CLASS_LOADING, CLASS_NEXT, CLASS_OVERFLOW, CLASS_PAGINATION, CLASS_PAGINATION_PAGE, CLASS_PREV, CLASS_PROGRESS, CLASS_PROGRESS_BAR, CLASS_ROOT, CLASS_SLIDE, CLASS_SPINNER, CLASS_SR, CLASS_TOGGLE, CLASS_TOGGLE_PAUSE, CLASS_TOGGLE_PLAY, CLASS_TRACK, CLASS_VISIBLE, DEFAULTS, EVENT_ACTIVE, EVENT_ARROWS_MOUNTED, EVENT_ARROWS_UPDATED, EVENT_AUTOPLAY_PAUSE, EVENT_AUTOPLAY_PLAY, EVENT_AUTOPLAY_PLAYING, EVENT_CLICK, EVENT_DESTROY, EVENT_DRAG, EVENT_DRAGGED, EVENT_DRAGGING, EVENT_END_INDEX_CHANGED, EVENT_HIDDEN, EVENT_INACTIVE, EVENT_LAZYLOAD_LOADED, EVENT_MOUNTED, EVENT_MOVE, EVENT_MOVED, EVENT_NAVIGATION_MOUNTED, EVENT_OVERFLOW, EVENT_PAGINATION_MOUNTED, EVENT_PAGINATION_UPDATED, EVENT_READY, EVENT_REFRESH, EVENT_RESIZE, EVENT_RESIZED, EVENT_SCROLL, EVENT_SCROLLED, EVENT_SHIFTED, EVENT_SLIDE_KEYDOWN, EVENT_UPDATED, EVENT_VISIBLE, EventBinder, EventInterface, FADE, LOOP, LTR, RTL, RequestInterval, SLIDE, STATUS_CLASSES, Splide, SplideRenderer, State, TTB, Throttle, Splide as default };\n","import Splide, { Components, EventInterface, SlideComponent } from \"@splidejs/splide\";\n\n/**\n * Splide extension that manages CSS class \"is-moving\" on slides. When the Splide container is moving, the class \"is-moving\"\n * is added to every slide, and removed from every slide once it stops moving.\n * @see https://splidejs.com/guides/extension/\n *\n * @param splide\n * @param components\n */\nexport function defaultExtension(splide: Splide, components: Components) {\n const { on, off } = EventInterface(splide);\n\n const mount = () => {\n on(\"move\", () => components.Slides.forEach((slide: SlideComponent) => slide.slide.classList.add(\"is-moving\")));\n on(\"moved\", () => components.Slides.forEach((slide: SlideComponent) => slide.slide.classList.remove(\"is-moving\")));\n };\n\n const destroy = () => {\n off(\"move\");\n off(\"moved\");\n };\n\n return {\n mount,\n destroy,\n };\n}\n","\n
\n\n
\n
\n
\n \n \n \n \n \n \n
\n
\n
\n","import { AfterViewChecked, Component, ContentChildren, ElementRef, Input, OnDestroy, QueryList, ViewChild } from \"@angular/core\";\n\nimport Splide, { Options } from \"@splidejs/splide\";\n\nimport { theme } from \"@vattenfall/design-system\";\n\nimport { defaultExtension } from \"./extensions/default.extension\";\nimport { CarouselSlideComponent } from \"./slide/carousel-slide.component\";\nimport { createSlideTransition } from \"./transitions/create-slide-transition\";\n\ntype ExtendedOptions = Options & {\n slideTransition?: string;\n};\n\n/** Type describing carousel variations */\nexport type CarouselType = \"max-3-slides\";\n\n/** Spline configuration object for the different types */\nconst TYPES: Readonly<{ [key in CarouselType]: Partial }> = {\n \"max-3-slides\": {\n autoWidth: false,\n mediaQuery: \"min\",\n breakpoints: {\n [parseInt(theme.screens[\"xs\"], 10)]: {\n perPage: 1,\n padding: \"calc(32px - 8px)\" /* 32px: content margin, 16px: slides gap */,\n },\n [parseInt(theme.screens[\"sm\"], 10)]: {\n perPage: 2,\n padding: \"calc(32px - 8px)\" /* 32px: content margin, 16px: slides gap */,\n },\n [parseInt(theme.screens[\"md\"], 10)]: {\n perPage: 2,\n padding: \"calc(72px - 14px)\" /* 74px: content margin, 14px: slides gap */,\n },\n [parseInt(theme.screens[\"lg\"], 10)]: {\n perPage: 3,\n padding: \"calc(72px - 14px)\" /* 60px: content margin, 14px: slides gap */,\n },\n [parseInt(theme.screens[\"xl\"], 10)]: {\n perPage: 3,\n padding: \"calc(((100% - 1320px) / 2) - 22px)\" /* 1320: content max-width, 22px: slides gap */,\n },\n },\n slideTransition: \"transform 300ms cubic-bezier(.6,0,0,1)\",\n },\n};\n\n/**\n * Vattenfall UI `ui-carousel` is a container for rendering a carousel with slides. Slides are organized into pages,\n * where each page may have one or more slides.\n *\n * This component is a wrapper for [SplideJs](https://splidejs.com/).\n *\n * The provided configuration `max-3-slides` displays a variable number of pages (but never more than three), depending\n * on the current screen size. It also provides a basic slide transition. Apart from this, it mostly relies on default\n * SplideJs options.\n *\n * More configurations may be added.\n *\n * [SplideJs Options](https://splidejs.com/guides/options/).\n */\n@Component({\n selector: \"ui-carousel\",\n styleUrls: [\"./carousel.component.scss\"],\n templateUrl: \"./carousel.component.html\",\n})\nexport class CarouselComponent implements AfterViewChecked, OnDestroy {\n @Input() type: CarouselType = \"max-3-slides\";\n @ViewChild(\"splideTarget\", { static: true }) private readonly splideTarget?: ElementRef;\n @ContentChildren(CarouselSlideComponent, { descendants: true }) readonly slides?: QueryList;\n\n private splideInstance?: Splide;\n\n ngAfterViewChecked(): void {\n if (this.splideInstance) return;\n\n const options = TYPES[this.type];\n const transition = createSlideTransition(options.slideTransition);\n const target = this.splideTarget?.nativeElement;\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n this.splideInstance = new Splide(target!, options).mount({ defaultExtension }, transition);\n }\n\n ngOnDestroy(): void {\n this.splideInstance?.destroy(true);\n }\n}\n","import Splide, { Components, EventInterface } from \"@splidejs/splide\";\n\n/**\n * Sets up a transition for slides that will come into play when navigating using the [Splide arrows](https://splidejs.com/guides/arrows/).\n *\n * Note: Splide already has an inbuilt transition for slides, but that transition is only used for swiping.\n *\n * @see https://splidejs.com/guides/transition/\n * @param expression CSS transition expression, e.g. \"transform 300ms cubic-bezier(.6,0,0,1)\"\n */\nexport const createSlideTransition = (expression?: string) => {\n if (!expression) return undefined;\n return (splide: Splide, components: Components) => {\n const { translate, toPosition } = components.Move;\n const { bind, unbind } = EventInterface(splide);\n const { list } = components.Elements;\n\n let transitionDoneCallback: () => void;\n const transitionEndHandler = (event: TransitionEvent) => {\n (event.target as HTMLElement).style.transition = \"\";\n transitionDoneCallback && transitionDoneCallback();\n };\n\n const cancel = () => (list.style.transition = \"\");\n\n const mount = () => bind(list, \"transitionend\", transitionEndHandler);\n\n const start = (index: number, doneCallback: () => void) => {\n transitionDoneCallback = doneCallback;\n list.style.transition = expression;\n translate(toPosition(index, true));\n };\n\n const destroy = () => unbind(list, \"transitionend\", transitionEndHandler);\n\n return {\n cancel,\n mount,\n start,\n destroy,\n };\n };\n};\n"," \n","import { Component, TemplateRef, ViewChild } from \"@angular/core\";\n\n@Component({\n selector: \"ui-carousel-slide\",\n templateUrl: \"./carousel-slide.component.html\",\n})\nexport class CarouselSlideComponent {\n @ViewChild(TemplateRef, { static: true }) templateRef?: TemplateRef;\n}\n","/* eslint-disable id-length */\nimport {\n Component,\n ContentChildren,\n Directive,\n ElementRef,\n Input,\n OnChanges,\n OnDestroy,\n OnInit,\n QueryList,\n SimpleChanges,\n ViewContainerRef,\n} from \"@angular/core\";\nimport { theme } from \"@vattenfall/design-system\";\nimport { isEmpty, isNullable } from \"@vattenfall/util\";\nimport {\n Axis,\n Chart,\n DashStyleValue,\n GradientColorStopObject,\n Options,\n Series,\n SeriesOptionsType,\n SeriesZonesOptionsObject,\n TooltipFormatterContextObject,\n TooltipOptions,\n XAxisOptions,\n XAxisPlotBandsOptions,\n XAxisPlotLinesOptions,\n XrangePointOptionsObject,\n YAxisOptions,\n} from \"highcharts\";\nimport { Subscription } from \"rxjs\";\n\n/**\n * Key-value hash holding gradient coloring information in a format that can be consumed by Highchart\n */\nconst GRADIENTS = {\n \"blue-red\": [\n [0, theme.colors.energysource.gas.DEFAULT],\n [1, theme.colors.primary.blue.DEFAULT],\n ],\n \"blue-yellow\": [\n [0, theme.colors.primary.yellow.DEFAULT],\n [1, theme.colors.primary.blue.DEFAULT],\n ],\n \"black-gray\": [\n [0, theme.colors.primary.gray[\"70\"]],\n [1, theme.colors.primary.black.DEFAULT],\n ],\n};\n\n/**\n * Type guard that checks whether the provided value is a valid gradient color code\n */\nconst isGradient = (value: string): value is Gradient => value in GRADIENTS;\n\nexport type Gradient = keyof typeof GRADIENTS;\n\nexport type Color =\n | \"green\"\n | \"darkgreen\"\n | \"blue\"\n | \"darkblue\"\n | \"pink\"\n | \"darkpurple\"\n | \"red\"\n | \"purple\"\n | \"yellow\"\n | \"white\"\n | \"black\"\n | \"gray\"\n | \"hydro\"\n | \"wind\"\n | \"solar\"\n | \"biomass\"\n | \"coal\"\n | \"gas\"\n | \"nuclear\"\n | \"district\";\nexport type Dash = \"solid\" | \"dot\" | \"dash\" | \"shortdash\";\nexport type Type = \"spline\" | \"column\" | \"pie\" | \"bar\" | \"line\";\n\nconst colors = { ...theme.colors.primary, ...theme.colors.secondary, ...theme.colors.energysource };\n\ntype Highcharts = { chart: (element: Element, options: Options) => Chart };\n\n/** Check if values of simple changes has changed. */\nfunction hasChanged(simpleChanges: SimpleChanges) {\n return Object.values(simpleChanges).some(({ previousValue, currentValue }) => {\n if (Array.isArray(previousValue) && Array.isArray(currentValue))\n return previousValue.length !== currentValue.length || JSON.stringify(previousValue) !== JSON.stringify(currentValue);\n return previousValue !== currentValue;\n });\n}\n\n@Directive({\n selector: \"ui-chart-series\",\n})\nexport class SeriesDirective implements OnInit, OnChanges {\n /**\n * Series chart data represented as a range of numbers\n */\n @Input() data: Array<[string, number]> = [];\n /**\n * Series line color. Default is `darkgreen`.\n */\n @Input() color: Color | Gradient = \"darkgreen\";\n /**\n * Series line opacity. Default is \"DEFAULT\", which means no opacity\n */\n @Input() opacity: \"DEFAULT\" | \"70\" | \"50\" | \"30\" | \"10\" = \"DEFAULT\";\n /**\n * Series line dash style. Default is `solid`;\n */\n @Input() dash: Dash = \"solid\";\n /**\n * Series chart type. Default is `spline`;\n */\n @Input() type: Type = \"spline\";\n /**\n * If series should animate when added on the chart.\n */\n @Input() animation = true;\n /**\n * Slice chart data into a projected section represented by a dash line. Applicable for line charts.\n */\n @Input() projection?: number;\n /**\n * Whether the series should be visible in view. Default is `true`.\n */\n @Input() visible = true;\n\n id = Math.random().toString();\n\n private _axisDirective?: AxisDirective;\n get axisDirective() {\n return this._axisDirective;\n }\n\n constructor(private viewContainerRef: ViewContainerRef, public elementRef: ElementRef) {}\n\n ngOnInit(): void {\n if (!isNullable(this.projection) && isGradient(this.color)) {\n console.warn(\"Gradient is not supported for projection series. Please use a solid color instead.\");\n }\n this._axisDirective = this.viewContainerRef.injector.get(AxisDirective);\n }\n ngOnChanges(simpleChanges: SimpleChanges) {\n const chartComponent = this.viewContainerRef.injector.get(ChartComponent);\n // Wait until chart has been instantiated\n if (chartComponent?.chart && hasChanged(simpleChanges)) {\n const series = chartComponent.chart.series.find((series) => series.userOptions.id === this.id) as Series;\n\n // Repaint the graph\n if (series) {\n // Reconstruct options based on new input\n const seriesOptions = chartComponent.getOptions().series as Array;\n const options = seriesOptions.find((seriesOptions) => seriesOptions.id === this.id) as SeriesOptionsType;\n series.update(options, true);\n // Repaint the categories, as update doesn't repaint categories with new data set.\n const xAxisOptions = chartComponent.getOptions().xAxis as Array;\n series.xAxis.setCategories([...xAxisOptions].shift()?.categories as Array);\n }\n }\n }\n}\n\n@Directive({\n selector: \"ui-chart-axis\",\n})\nexport class AxisDirective implements OnChanges {\n /**\n * Unit suffix that will be added after axis value\n */\n @Input() unit = \"\";\n /**\n * Number of decimals shown in tooltip after axis value\n */\n @Input() tooltipDecimals = 2;\n /**\n * Whether the axis should be visible in view. Default is `true`.\n */\n @Input() visible = true;\n /**\n * Indicates on which side the axis should be placed. Default is `left`.\n */\n @Input() align: \"left\" | \"right\" = \"left\";\n\n id = Math.random().toString();\n\n constructor(private viewContainerRef: ViewContainerRef, public elementRef: ElementRef) {}\n ngOnChanges(simpleChanges: SimpleChanges) {\n const chartComponent = this.viewContainerRef.injector.get(ChartComponent);\n // Wait until chart has been instantiated\n if (chartComponent?.chart && hasChanged(simpleChanges)) {\n const xAxis = chartComponent.chart.xAxis.find((xAxis) => xAxis.userOptions.id === this.id) as Axis;\n // Reconstruct options based on new input\n const xAxisOptions = chartComponent.getOptions().xAxis as Array;\n const options = xAxisOptions.find((xAxisOptions) => xAxisOptions.id === this.id) as XAxisOptions;\n // Repaint the graph\n xAxis?.update(options, true);\n }\n }\n}\n/**\n * Vattenfall UI `ui-chart-plotline` is a container for rendering plotlines in chart components.\n *\n * TODO (stefan): This example seems to be incorrect. From and to should be the index positions and not the values it seems?\n *\n * @example\n * \n * Will render a plotline at 2014 with a darkgreen color, solid dash and width 1.\n */\n@Directive({\n selector: \"ui-chart-plotline\",\n})\nexport class PlotlineDirective {\n /**\n * Plotline background color. Default is `darkgreen`.\n */\n @Input() color: Color = \"darkgreen\";\n /**\n * Plotline line dash style. Default is `solid`;\n */\n @Input() dash: Dash = \"solid\";\n /**\n * Plotline line dash width. Default is `1`;\n */\n @Input() width = 1;\n /**\n * Plotline value;\n */\n @Input() value?: number;\n}\n\n/**\n * Vattenfall UI `ui-chart-plotband` is a container for rendering plotbands in chart components.\n * Plotband is a vertical band that marks an area in the chart. It can be used to highlight a range of values, for example high and low values\n *\n * TODO (stefan): This example seems to be incorrect. From and to should be the index positions and not the values it seems?\n *\n * @example\n * \n * This will render a plotband from 2014 to 2015 with a red color.\n */\n@Directive({\n selector: \"ui-chart-plotband\",\n})\nexport class PlotbandDirective {\n /**\n * Plotband background color. Default is `darkgreen`.\n */\n @Input() color: Color = \"darkgreen\";\n /**\n * The start position of the plot band in axis units.\n */\n @Input() from?: number;\n /**\n * The end position of the plot band in axis units.\n */\n @Input() to?: number;\n}\n\n/**\n * Vattenfall UI `ui-chart` is a container for rendering chart components.\n *\n * This component is a wrapper used for rendering [Highcharts](https://www.highcharts.com) charts that follows Vattenfall brand guidlines. It takes takes one or two `` components where each accepts one or several `` components.\n *\n * Use `pointStart` to mark the start of a range of values (typically the chart x axis), for example if a series contains one yearly value starting from 1945, set `pointStart` to 1945.\n *\n * Optionally, an [Highchart configuration object](https://api.highcharts.com/highcharts) can be provided. This allows for full flexibility to style and configure the behavior of the chart component.\n */\n@Component({\n selector: \"ui-chart\",\n template: \"\",\n})\nexport class ChartComponent implements OnInit, OnDestroy {\n /**\n * Defines on what value to start. For example, if a series contains one yearly value starting from 1945, set `pointStart` to 1945. Default is `0`.\n */\n @Input() pointStart: number | string | Date = 0;\n /**\n * The categories represent labels for x-axis, If categories are present for the xAxis, names are used instead of numbers for that axis. `categories` have higher Precedence than `pointStart` if it has values. Defaults to undefined.\n */\n @Input() categories?: Array;\n /**\n * Highcharts configuration options object. Allows you to override the default values by passing chart configuration as a data object. Read the [documentation](https://api.highcharts.com/highcharts) for more details.\n */\n @Input() options: Options = {};\n /**\n * Whether the chart should be rendered with markers. Default is `true`.\n */\n @Input() showMarkers = true;\n\n @ContentChildren(AxisDirective, { descendants: true }) private readonly axisDirectives!: QueryList;\n @ContentChildren(SeriesDirective, { descendants: true }) private readonly seriesDirectives!: QueryList;\n @ContentChildren(PlotlineDirective, { descendants: true })\n private readonly plotlineDirectives!: QueryList;\n @ContentChildren(PlotbandDirective, { descendants: true }) private readonly plotbandDirectives!: QueryList;\n\n chart?: Chart;\n\n private isOptionsProvided = false;\n\n highcharts!: Highcharts;\n\n private seriesDirectivesSubscription = Subscription.EMPTY;\n private axisDirectivesSubscription = Subscription.EMPTY;\n private plotbandDirectivesSubscription = Subscription.EMPTY;\n private plotlineDirectivesSubscription = Subscription.EMPTY;\n\n constructor(private elementRef: ElementRef) {}\n\n async ngOnInit() {\n if (!isEmpty(this.options)) this.isOptionsProvided = true;\n // Make sure that the host element spans the width of its parent\n this.elementRef.nativeElement.style.display = \"block\";\n // this.elementRef.nativeElement.style.width = \"100%\";\n this.highcharts = (await import(\"highcharts\").then(\n (commonJsModule) => commonJsModule.default ?? commonJsModule\n )) as Highcharts;\n this.options = this.getOptions();\n // Instantiate the graph with incomplete options\n this.chart = this.highcharts.chart(this.elementRef.nativeElement, this.options as Options);\n // Redraws chart when or elements are added or removed from DOM\n this.seriesDirectivesSubscription = this.seriesDirectives.changes.subscribe(this.updateChart);\n this.axisDirectivesSubscription = this.axisDirectives.changes.subscribe(this.updateChart);\n this.plotbandDirectivesSubscription = this.plotbandDirectives.changes.subscribe(this.updateChart);\n this.plotlineDirectivesSubscription = this.plotlineDirectives.changes.subscribe(this.updateChart);\n }\n\n ngOnDestroy(): void {\n this.chart?.destroy();\n this.seriesDirectivesSubscription.unsubscribe();\n this.axisDirectivesSubscription.unsubscribe();\n this.plotbandDirectivesSubscription.unsubscribe();\n this.plotlineDirectivesSubscription.unsubscribe();\n }\n /**\n * Reconstruct options and and repaint graph.\n *\n * Called whenever or updates its properties or are added or removed from DOM.\n */\n updateChart = () => {\n this.options = this.getOptions();\n this.chart?.update(this.options, true, true);\n };\n\n getOptions = (): Options => {\n // Override default configurations if an options object has been passed\n if (this.isOptionsProvided) return this.options;\n else\n return {\n title: undefined,\n series: this.getSeries(this.seriesDirectives),\n yAxis: this.getYAxis(this.axisDirectives),\n xAxis: this.getXAxis(this.categories),\n tooltip: this.getTooltip(),\n responsive: {\n rules: [\n {\n condition: {\n maxWidth: 600,\n },\n chartOptions: {\n chart: {\n height: 550,\n marginLeft: 1,\n marginRight: 1,\n },\n yAxis: this.getYAxisMobile(this.axisDirectives),\n xAxis: {\n startOnTick: false,\n endOnTick: false,\n },\n },\n },\n ],\n },\n plotOptions: {\n series: {\n pointStart: this.pointStart,\n marker: {\n enabled: this.showMarkers,\n symbol: \"circle\",\n },\n dataLabels: {\n // Disable to show value on each point in series\n enabled: false,\n },\n align: \"left\",\n events: {\n // Disables the ability to add/remove series from chart\n // by clicking on the serie's legend, the default behavior\n // is that series are added or removed cy the inclusion or\n // removal of elements\n // eslint-disable-next-line ramda/prefer-ramda-boolean\n legendItemClick: function () {\n return false;\n },\n /* Add attribute `data-e2e-animation-completed` once animation\n on the graph is completed. This behaviour help us to capture\n imagesnapshot untill the series in graph is update with animation.*/\n afterAnimate: () => {\n this.elementRef.nativeElement.setAttribute(\"data-e2e-animation-completed\", \"\");\n },\n },\n },\n },\n legend: {\n itemStyle: {\n fontWeight: theme.fontWeight.regular,\n color: theme.colors.primary.black.DEFAULT,\n },\n },\n chart: {\n style: {\n fontFamily: theme.fontFamily.regular.join(\", \"),\n },\n events: {\n // Remove attribute `data-e2e-animation-completed` if already present,\n // and add it again after animation is completed on graph\n load: () => {\n if (this.elementRef.nativeElement.hasAttribute(\"data-e2e-animation-completed\"))\n this.elementRef.nativeElement.removeAttribute(\"data-e2e-animation-completed\");\n },\n },\n },\n credits: {\n enabled: false,\n },\n } as Options;\n };\n\n getSeries(seriesDirectives: QueryList): Array {\n const getZones = (seriesDirective: SeriesDirective): Array => {\n const zones: SeriesZonesOptionsObject[] = [];\n if (!isNullable(seriesDirective.projection)) zones.push({ value: seriesDirective.projection }, { dashStyle: \"ShortDash\" });\n if (isGradient(seriesDirective.color))\n zones.push({\n color: {\n linearGradient: { x1: 0, x2: 0, y1: 0, y2: 1 },\n stops: GRADIENTS[seriesDirective.color] as unknown as GradientColorStopObject[],\n },\n });\n return zones;\n };\n\n const getYAxis = (seriesDirective: SeriesDirective) => {\n return this.axisDirectives.first === seriesDirective.axisDirective ? 0 : 1;\n };\n const getTooltip = (seriesDirective: SeriesDirective) => {\n return { valueSuffix: seriesDirective.axisDirective?.unit, valueDecimals: seriesDirective.axisDirective?.tooltipDecimals };\n };\n const getDataLabels = (seriesDirective: SeriesDirective) => {\n return { format: \"{y} \" + seriesDirective.axisDirective?.unit };\n };\n const getInactiveState = (seriesDirective: SeriesDirective) => {\n // If at least one serie in the graph has opacity set, decrease the opacity for inactive state (whenhover on serie in legend).\n // This is done in order not to get similar colors for the active/inactive columns.\n // Set this serie's inactive opacity higher if it already has opacity or it will be close to invisible.\n const graphHasAtLeastOneSerieWithOpacity = seriesDirectives.some((serie) => serie.opacity !== \"DEFAULT\");\n const thisSerieHasOpacity = seriesDirective.opacity === \"DEFAULT\";\n if (graphHasAtLeastOneSerieWithOpacity) {\n return { inactive: { opacity: thisSerieHasOpacity ? 0.1 : 0.05 } };\n }\n return { inactive: { opacity: 0.2 } }; // default value in highchart\n };\n const getDynamicProperties = (seriesDirective: SeriesDirective) => {\n const yAxis = getYAxis(seriesDirective);\n const tooltip = getTooltip(seriesDirective);\n const zones = getZones(seriesDirective);\n const dataLabels = getDataLabels(seriesDirective);\n const id = seriesDirective.id;\n const name = seriesDirective.elementRef.nativeElement.innerText.trim();\n const data = seriesDirective.data as Array;\n const color = !isGradient(seriesDirective.color)\n ? colors[seriesDirective.color][seriesDirective.opacity]\n : GRADIENTS[seriesDirective.color];\n const dashStyle = seriesDirective.dash as DashStyleValue;\n const type = seriesDirective.type;\n const visible = seriesDirective.visible;\n const animation = seriesDirective.animation ? { duration: 250 } : false;\n const states = getInactiveState(seriesDirective);\n return { id, visible, yAxis, tooltip, zones, name, data, dataLabels, color, dashStyle, type, animation, states };\n };\n return seriesDirectives.map((seriesDirective) => {\n return {\n ...getDynamicProperties(seriesDirective),\n lineWidth: 3,\n zoneAxis: \"x\",\n step: \"left\",\n clip: false,\n };\n }) as SeriesOptionsType[];\n }\n\n getYAxis(axisDirectives: QueryList): Array {\n return axisDirectives.map((axisDirective, index) => {\n return {\n lineWidth: 1,\n title: undefined,\n id: axisDirective.id,\n opposite: index % 2 !== 0,\n lineColor: theme.colors.tertiary.lightgrey,\n gridLineColor: theme.colors.tertiary.lightergrey,\n gridLineWidth: 1,\n gridLineDashStyle: \"LongDash\",\n visible: axisDirective.visible,\n className: \"vattenfall-elements\",\n labels: {\n useHTML: true,\n formatter: function () {\n return `${this.value} ${axisDirective.unit} `;\n },\n style: {\n color: theme.colors.primary.black.DEFAULT,\n },\n },\n };\n });\n }\n /**\n * This function is introduced to help the graph identify on how to render the graph on mobile\n * @param axisDirectives\n * @returns\n */\n getYAxisMobile(axisDirectives: QueryList): Array {\n return axisDirectives.map((axisDirective) => {\n return {\n labels: {\n align: axisDirective.align,\n x: 1,\n y: -1,\n // the width of the label must be specified to prevent line breaks in the mobile labels\n style: {\n width: 100,\n },\n },\n };\n });\n }\n\n getXAxis(categories?: Array): Array {\n return [\n {\n categories,\n lineColor: theme.colors.tertiary.lightgrey,\n gridLineColor: theme.colors.tertiary.lightergrey,\n // TODO: Should probably be optional?\n gridLineWidth: 1,\n gridLineDashStyle: \"LongDash\",\n tickInterval: 1,\n // Place vertical grid lines just above category labels\n startOnTick: true,\n endOnTick: true,\n tickmarkPlacement: \"on\",\n labels: {\n style: {\n color: theme.colors.primary.black.DEFAULT,\n },\n },\n plotLines: this.getPlotLines(),\n plotBands: this.getPlotBands(),\n },\n ];\n }\n\n getPlotLines(): Array {\n return this.plotlineDirectives.map((plotlineDirective: PlotlineDirective) => {\n return {\n width: 2,\n zIndex: 5, // maybe this should be configurable\n value: plotlineDirective.value,\n color: colors[plotlineDirective.color].DEFAULT,\n dashStyle: plotlineDirective.dash as DashStyleValue,\n };\n });\n }\n\n getPlotBands(): Array {\n return this.plotbandDirectives.map((plotbandDirective) => {\n return {\n zIndex: 0,\n to: plotbandDirective.to,\n from: plotbandDirective.from,\n color: `${colors[plotbandDirective.color].DEFAULT}10`,\n };\n });\n }\n\n getTooltip(): TooltipOptions {\n return {\n shadow: true,\n shared: true,\n split: true,\n borderColor: theme.colors.primary.white,\n backgroundColor: theme.colors.primary.white,\n outside: true,\n useHTML: true,\n className: \"vattenfall-elements\",\n formatter: function () {\n const keys: Array = [];\n return this.points\n ?.sort((currentSeries, nextSeries) => {\n if (new Date(nextSeries.point.name) instanceof Date && new Date(currentSeries.point.name) instanceof Date)\n return new Date(nextSeries.point.name).valueOf() - new Date(currentSeries.point.name).valueOf();\n return 0; // Do not sort array if instance is not date.\n })\n .reduce((tooltipMarkup: string, tooltipFormatterContextObject: TooltipFormatterContextObject) => {\n const getKey = () => {\n if (!keys.includes(tooltipFormatterContextObject.key)) {\n keys.push(tooltipFormatterContextObject.key);\n return `${tooltipFormatterContextObject.key} `;\n }\n return \"\";\n };\n const series = tooltipFormatterContextObject.point.series as Series & {\n tooltipOptions: { valueSuffix: string; valueDecimals: number };\n };\n const getPath = () => {\n if (series.type === \"spline\")\n return ` \n\t `;\n return ` `;\n };\n return `\n ${tooltipMarkup}\n ${getKey()}\n \n \n ${getPath()}\n \n \n \n ${tooltipFormatterContextObject.y.toFixed(series.tooltipOptions.valueDecimals)} ${\n series.tooltipOptions.valueSuffix\n }\n \n \n `;\n }, \"\");\n },\n style: {\n // default font size similar to y-axis units\n fontSize: \"11px\",\n },\n };\n }\n}\n","\n \n \n \n \n
\n \n \n\n \n","import {\n Component,\n Directive,\n ViewEncapsulation,\n Input,\n ViewChild,\n ContentChild,\n ElementRef,\n AfterViewInit,\n OnDestroy,\n ChangeDetectionStrategy,\n EventEmitter,\n Output,\n} from \"@angular/core\";\n\nimport { coerceBooleanProperty, BooleanInput } from \"@vattenfall/util\";\nimport { ReplaySubject, Subscription } from \"rxjs\";\n\n@Directive({\n selector: \"ui-dialog-header\",\n})\nexport class DialogHeaderDirective {}\n\n@Directive({\n selector: \"ui-dialog-body\",\n})\nexport class DialogBodyDirective {}\n\n@Directive({\n selector: \"ui-dialog-footer\",\n})\nexport class DialogFooterDirective {}\n\ntype Action = {\n open: boolean;\n detached: boolean;\n};\n\n/**\n * Dialogs inform users about a task and can contain critical information, require decisions, or involve multiple tasks.\n *\n * Should be used for:\n *\n * * Errors that block an app’s normal operation\n * * Critical information that requires a specific user task, decision, or acknowledgement\n *\n * If you detach the dialog it will occupy the entire screen when activated, if not attached it will only occupy the content area of the element.\n *\n * Dialogs are purposefully interruptive, so they should be used sparingly.\n */\n@Component({\n selector: \"ui-dialog\",\n templateUrl: \"./dialog.component.html\",\n encapsulation: ViewEncapsulation.Emulated,\n changeDetection: ChangeDetectionStrategy.OnPush,\n styles: [\n `\n :host {\n position: relative;\n display: block;\n }\n :host.open::before {\n content: \" \";\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n background-color: rgba(0, 0, 0, 0.5);\n }\n :host:not([detached]).open dialog {\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n }\n `,\n ],\n})\nexport class DialogComponent implements AfterViewInit, OnDestroy {\n /**\n * Whether the dialog should be opened or closed.\n *\n * Default is `false`.\n */\n @Input()\n get open(): boolean {\n return this._open;\n }\n set open(value: BooleanInput) {\n this._open = coerceBooleanProperty(value);\n this.$actions.next({\n open: this.open,\n detached: this.detached,\n });\n }\n private _open = false;\n @Output() readonly openChange = new EventEmitter();\n /**\n * Whether the dialog should be shown a top of the entire page or not.\n *\n * Default is `false`.\n */\n @Input()\n get detached(): boolean {\n return this._detached;\n }\n set detached(value: BooleanInput) {\n this._detached = coerceBooleanProperty(value);\n this.$actions.next({\n open: this.open,\n detached: this.detached,\n });\n }\n private _detached = false;\n\n // Whether the dialog element has been detected or not\n _initialized = false;\n\n $actions: ReplaySubject = new ReplaySubject();\n actionsSubscription = Subscription.EMPTY;\n\n @ViewChild(\"dialogElement\") dialogElement!: ElementRef;\n\n @ContentChild(DialogHeaderDirective) dialogHeaderDirective?: DialogHeaderDirective;\n @ContentChild(DialogBodyDirective) dialogBodyDirective?: DialogBodyDirective;\n @ContentChild(DialogFooterDirective) dialogFooterDirective?: DialogBodyDirective;\n\n constructor(private elementRef: ElementRef) {}\n\n ngAfterViewInit() {\n this.actionsSubscription = this.$actions.asObservable().subscribe((action) => {\n this.dialogElement.nativeElement.close();\n if (action.open) {\n if (action.detached) this.dialogElement.nativeElement.showModal();\n else {\n this.elementRef.nativeElement.classList.add(\"open\");\n this.dialogElement.nativeElement.show();\n }\n } else this.elementRef.nativeElement.classList.remove(\"open\");\n });\n }\n\n ngOnDestroy() {\n this.$actions.complete();\n this.actionsSubscription.unsubscribe();\n }\n\n onClose() {\n this.open = false;\n this.openChange.emit(false);\n }\n}\n","import { AfterContentInit, ChangeDetectionStrategy, Component, ContentChild, ElementRef, Input, Renderer2 } from \"@angular/core\";\nimport { BooleanInput, coerceBooleanProperty } from \"@vattenfall/util\";\n\n/**\n * Vattenfall UI `ui-error` is common interface for displaying an error to the user.\n *\n * The `#errorMessage` template reference is used for declaring which element should be displayed to the user if an error has occurred. There can only be one message element.\n *\n * Optionally, you can use a different icons by setting the `icon` property.\n */\n@Component({\n selector: \"ui-error, [ui-error]\",\n templateUrl: \"./error.component.html\",\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: \"ds-error\",\n \"[class.ds-is-error]\": \"error && icon === 'error'\",\n \"[class.ds-is-warning]\": \"error && icon === 'warning'\",\n \"[class.ds-is-waiting]\": \"error && icon === 'waiting'\",\n },\n})\nexport class ErrorComponent implements AfterContentInit {\n /**\n * Whether the component error state is activated\n */\n @Input()\n get error(): boolean {\n return this._error;\n }\n set error(value: BooleanInput) {\n this._error = coerceBooleanProperty(value);\n }\n private _error = true;\n /**\n * Which icon to show in case of an error. Default is `error`.\n */\n @Input()\n public icon: \"warning\" | \"error\" | \"waiting\" = \"error\";\n /**\n * A user message to display to the client in case of an error\n */\n @ContentChild(\"errorMessage\", { read: ElementRef })\n private errorMessage!: ElementRef;\n\n constructor(private renderer: Renderer2) {}\n\n ngAfterContentInit() {\n if (this.errorMessage) this.renderer.addClass(this.errorMessage.nativeElement, \"ds-error-message\");\n }\n}\n"," \n \n","\n","import { Component, ViewEncapsulation, ChangeDetectionStrategy } from \"@angular/core\";\n\nimport { OptionsElementAccessor } from \"../options-accessor\";\n\n/**\n * Checkboxes allow users to select one or more items from a set. Checkboxes can turn an option on or off.\n *\n * Use checkboxes to:\n *\n * * Select one or more options from a list\n * * Present a list containing sub-selections\n * * Turn an item on or off in a desktop environment\n *\n * Checkboxes should be used instead of switches if multiple options can be selected from a list.\n *\n * Checkboxes can be used as an Angular `FormControl`, in both reactive and template driven forms.\n */\n@Component({\n selector: \"ui-input[type=checkbox]\",\n templateUrl: \"./checkbox.component.html\",\n encapsulation: ViewEncapsulation.Emulated,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class InputCheckboxComponent extends OptionsElementAccessor {}\n","\n","import { Component, ViewEncapsulation, ChangeDetectionStrategy, Input } from \"@angular/core\";\n\nimport { ArgTypes } from \"@storybook/angular/types-6-0\";\nimport { BooleanInput, coerceBooleanProperty, InputDate } from \"@vattenfall/util\";\n\nimport { DatesElementAccessor } from \"../dates-accessor\";\n\nexport const argTypesDate: ArgTypes = {\n format: {\n control: \"text\",\n description:\n \"Date format string. The characters in the format string wrapped between two single quotes characters (') are escaped. Two single quotes in a row, whether inside or outside a quoted sequence, represent a 'real' single quote. Default is `yyyy-MM-dd`.\",\n table: {\n category: \"Inputs\",\n type: {\n summary: \"string\",\n },\n },\n },\n weekday: {\n control: \"boolean\",\n description:\n \"An attribute which, if present, disables all non-weekdays in calendar from user interaction. Public holidays will be disabled for Swedish and Finnish locale, otherwise weekends only.\",\n defaultValue: false,\n table: {\n category: \"Inputs\",\n type: {\n summary: \"boolean\",\n },\n },\n },\n};\n\n/**\n * A control for entering a date (year, month, and day, with no time zone).\n *\n * A string representing the date entered in the input. The date is formatted according to ISO8601, described in Date strings format. Values can also be provided as a `Date` object, in which case the properties ending in `AsDate` should be used. A custom `format` can be provided to support regional variations for displaying dates.\n *\n * Text inputs can be used as an Angular `FormControl`, in both reactive and template driven forms.\n */\n@Component({\n selector: \"ui-input[type=date]\",\n templateUrl: \"./date.component.html\",\n encapsulation: ViewEncapsulation.Emulated,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class InputDateComponent extends DatesElementAccessor {\n /**\n * Date format string.\n *\n * The characters in the format string wrapped between two single quotes characters (') are escaped. Two single quotes in a row, whether inside or outside a quoted sequence, represent a 'real' single quote.\n *\n * Read more at [date-fns](https://date-fns.org/v2.29.3/docs/parse).\n *\n * Default is `yyyy-MM-dd`.\n */\n @Input() format = \"yyyy-MM-dd\";\n /**\n * An attribute which, if present, disables all non-weekdays in calendar from user interaction.\n *\n * Public holidays will be disabled for Swedish and Finnish locale, otherwise weekends only.\n */\n @Input()\n get weekday(): boolean {\n return this._weekday;\n }\n set weekday(value: BooleanInput) {\n this._weekday = coerceBooleanProperty(value);\n }\n private _weekday = false;\n}\n","/* eslint-disable @typescript-eslint/no-non-null-assertion */\n\n/** Position of selection range */\nexport interface SelectionRangePosition {\n /** The start position of selectable range. */\n selectionStart: number;\n /** The end position of selectable range. */\n selectionEnd: number;\n /** The next possible selection position if any. */\n selectionNextIndex: number;\n /** The previous possible selection position if any. */\n selectionPreviousIndex: number;\n}\n\n/** Selectable context for each character index of string. */\nexport interface SelectionRange extends SelectionRangePosition {\n /** Whether the character is a unit representing a date, i.e. Y, m, D, etc. */\n isDateUnit: boolean;\n /** The phrase which the character belongs. */\n phrase: string;\n /** The character (date units are masked with *). */\n char: string;\n}\n\n/**\n * The `DatesElementAdapter` contains methods and properties for intercepting user interaction with date input elements.\n */\nexport class DatesElementAdapter {\n /** Masked value of input. */\n get value() {\n return this._value;\n }\n set value(value: string | null) {\n this._value = value ?? this.getMaskedValue();\n }\n private _value: string | null = \"\";\n\n // List of selection ranges for provided input element\n private _selectionRanges: Array = [];\n // Selection range currently selected\n private _selectionPosition: SelectionRangePosition = this._selectionRanges[0];\n\n /** Moves selection to specific character index. */\n setSelection(charPosition?: number | null) {\n if (charPosition != null) {\n if (charPosition >= this._selectionRanges.length)\n this._selectionPosition = this._selectionRanges[this._selectionRanges.length - 1];\n else if (charPosition < 0) this._selectionPosition = this._selectionRanges[0];\n else this._selectionPosition = this._selectionRanges[charPosition];\n }\n this.setSelectionFromSelectionRange();\n }\n /** Moves selection to the next selectable range if possible. */\n setSelectionNext(callback?: () => void) {\n if (this._selectionPosition.selectionNextIndex >= 0) {\n this._selectionPosition = this._selectionRanges[this._selectionPosition.selectionNextIndex];\n this.setSelectionFromSelectionRange();\n if (callback) callback();\n }\n }\n /** Moves selection to the previous selectable range if possible. */\n setSelectionPrevious(callback?: () => void) {\n if (this._selectionPosition.selectionPreviousIndex >= 0) {\n this._selectionPosition = this._selectionRanges[this._selectionPosition.selectionPreviousIndex];\n this.setSelectionFromSelectionRange();\n if (callback) callback();\n }\n }\n /** Adds character and mask input for selected range. */\n setInputMask(character: string) {\n const selection = document.getSelection()!.toString();\n const selectionLength = selection.toString().length;\n const sectionValue = /^[0-9]*$/.test(selection)\n ? // If the user has completed a full date, and entered an additional character\n // like 5 create a new mask, for example 1234 => ***5\n `${character}`.padStart(selectionLength, \"*\")\n : // The user has not yet completed a full date, keep masking until the section has completed\n `${selection.replace(/\\*/g, \"\")}${character}`.padStart(selectionLength, \"*\");\n const startValue = this.value!.substring(0, this.inputElement.selectionStart!);\n const endValue = this.value!.substring(this.inputElement.selectionStart! + selectionLength);\n this.value = `${startValue}${sectionValue}${endValue}`;\n }\n /** Clears input mask from numbers for deleted range. */\n clearInputMask() {\n const selection = document.getSelection()!.toString();\n const selectionLength = selection.toString().length;\n const sectionValue = selection.replace(/./g, \"*\");\n const startValue = this.value!.substring(0, this.inputElement.selectionStart!);\n const endValue = this.value!.substring(this.inputElement.selectionStart! + selectionLength);\n this.value = `${startValue}${sectionValue}${endValue}`;\n }\n\n constructor(protected inputElement: HTMLInputElement, protected dateFormat: string) {\n this._selectionRanges = (dateFormat.match(/'[^']*'|(.)\\1*/g) ?? [])\n .map(this.toSelectionRange)\n .reduce(this.toChars, [])\n .map(this.toSelectionNavigation);\n this._selectionPosition = this._selectionRanges[0];\n this._value = this.getMaskedValue();\n }\n\n /** Moves selection to current selection range. */\n private setSelectionFromSelectionRange() {\n this.inputElement.setSelectionRange(this._selectionPosition.selectionStart, this._selectionPosition.selectionEnd);\n }\n\n /** Returns a masked string based on current value in the input. */\n private getMaskedValue() {\n return this._selectionRanges\n .map((selection, index) => {\n const char = this.inputElement.value.charAt(index);\n return selection.isDateUnit && /[0-9]/.test(char) ? char : selection.char;\n })\n .join(\"\");\n }\n /** Returns whether the provided input represent a date unit like Y, m, D, etc. */\n private isDateUnit(value: string) {\n return /^[Yy|Mm|Dd|Ww]*$/.test(value);\n }\n /** Generates selection start and end properties for selection range object. */\n private toSelectionRange = (encodedPhrase: string, phraseIndex: number, encodedPhrases: Array) => {\n const phrases = encodedPhrases.map((encodedPhrase) => encodedPhrase.replace(/'/g, \"\"));\n const phrase = phrases[phraseIndex];\n\n if (!this.isDateUnit(encodedPhrase))\n return {\n char: \"\",\n phrase,\n isDateUnit: false,\n selectionStart: -1,\n selectionEnd: -1,\n selectionNextIndex: -1,\n selectionPreviousIndex: -1,\n };\n\n const precedingPhraseIndex = phrases.findIndex((searchPhrase) => this.isDateUnit(searchPhrase) && searchPhrase === phrase);\n const selectionStart = phrases.slice(0, precedingPhraseIndex).reduce((sum, phrase) => sum + phrase.length, 1) - 1;\n return {\n char: \"\",\n phrase,\n isDateUnit: true,\n selectionStart,\n selectionEnd: selectionStart + phrase.length,\n selectionNextIndex: -1,\n selectionPreviousIndex: -1,\n };\n };\n /** Generate next and previous selection property for selection range object. */\n private toSelectionNavigation = (\n selectionRange: SelectionRange,\n selectionRangeIndex: number,\n selectionRanges: Array\n ) => {\n const selectionNextIndex = selectionRanges.findIndex(\n (searchSelectionRange, searchSelectionRangeIndex) =>\n searchSelectionRange.isDateUnit &&\n searchSelectionRangeIndex > selectionRangeIndex &&\n searchSelectionRange.phrase !== selectionRange.phrase\n );\n const selectionPreviousIndex = selectionRanges.findIndex(\n (searchSelectionRange, searchSelectionRangeIndex) =>\n searchSelectionRange.isDateUnit &&\n searchSelectionRangeIndex < selectionRangeIndex &&\n searchSelectionRange.phrase !== selectionRange.phrase\n );\n return { ...selectionRange, selectionNextIndex, selectionPreviousIndex };\n };\n /** Generates char property for selection range object. */\n private toChars = (selectionRanges: Array, selectionRange: SelectionRange) => {\n selectionRange.phrase.split(\"\").forEach((unmaskedChar) => {\n const char = selectionRange.isDateUnit ? \"*\" : unmaskedChar;\n selectionRanges.push({ ...selectionRange, char });\n });\n return selectionRanges;\n };\n}\n","/* eslint-disable @typescript-eslint/no-non-null-assertion */\nimport {\n Directive,\n Input,\n Output,\n EventEmitter,\n HostListener,\n ViewChild,\n ElementRef,\n HostBinding,\n AfterViewInit,\n} from \"@angular/core\";\n\nimport {\n coerceBooleanProperty,\n BooleanInput,\n getDate,\n inputFromDate,\n InputName,\n InputType,\n dateFromInput,\n parse,\n format,\n patternFromFormat,\n getLocalDate,\n startOfDay,\n} from \"@vattenfall/util\";\n\nimport { InputCalendarComponent } from \"./dates\";\n\nimport { DatesElementAdapter } from \"./dates-adapter\";\nimport { InputsElementAccessor } from \"./inputs-accessor\";\n\n/**\n * The class name for each calendar icon date listed in order. We are doing this as opposed to a dynamic solution to ensure Tailwind doesn't purge them when building the project.\n */\nconst CALENDAR_ICONS = [\n \"ds-icons-calendar-01\",\n \"ds-icons-calendar-01\",\n \"ds-icons-calendar-02\",\n \"ds-icons-calendar-03\",\n \"ds-icons-calendar-04\",\n \"ds-icons-calendar-05\",\n \"ds-icons-calendar-06\",\n \"ds-icons-calendar-07\",\n \"ds-icons-calendar-08\",\n \"ds-icons-calendar-09\",\n \"ds-icons-calendar-10\",\n \"ds-icons-calendar-11\",\n \"ds-icons-calendar-12\",\n \"ds-icons-calendar-13\",\n \"ds-icons-calendar-14\",\n \"ds-icons-calendar-15\",\n \"ds-icons-calendar-16\",\n \"ds-icons-calendar-17\",\n \"ds-icons-calendar-18\",\n \"ds-icons-calendar-19\",\n \"ds-icons-calendar-20\",\n \"ds-icons-calendar-21\",\n \"ds-icons-calendar-22\",\n \"ds-icons-calendar-23\",\n \"ds-icons-calendar-24\",\n \"ds-icons-calendar-25\",\n \"ds-icons-calendar-26\",\n \"ds-icons-calendar-27\",\n \"ds-icons-calendar-28\",\n \"ds-icons-calendar-29\",\n \"ds-icons-calendar-30\",\n \"ds-icons-calendar-31\",\n];\n\n/**\n * The `DatesElementAccessor` contains methods and properties shared by all date-like input components like date, month, week, and year.\n * It require a generic type to be specified, this type should correspond to the value emitted on input change.\n */\n@Directive()\nexport class DatesElementAccessor\n extends InputsElementAccessor\n implements AfterViewInit\n{\n /**\n * Date format string.\n *\n * The characters in the format string wrapped between two single quotes characters (') are escaped. Two single quotes in a row, whether inside or outside a quoted sequence, represent a 'real' single quote.\n *\n * Read more at [date-fns](https://date-fns.org/v2.29.3/docs/parse).\n */\n @Input() format = \"\";\n /**\n * The value of the control.\n *\n * A string representing the date entered in the input. The date is formatted according to ISO8601, described in Date strings format.\n */\n @Input()\n get value(): T | null {\n if (this.ngControl) return this.ngControl.control?.value;\n return this._value;\n }\n set value(value: T | null) {\n this._value = value;\n // Converting ISO input string to a string that matches the format\n const input = this._value ? this.getInputFromDate(dateFromInput(this._value)) : null;\n this.setProperty(\"value\", input);\n if (this.ngControl) this.ngControl.control?.setValue(this._value);\n }\n private _value: T | null = null;\n /**\n * The latest date to accept for `value`.\n *\n * Default is `null`.\n */\n @Input()\n get max(): T | null {\n return this._max;\n }\n set max(value: T | null) {\n this._max = value;\n this.setProperty(\"max\", value);\n }\n private _max: T | null = null;\n /**\n * The earliest date to accept for `value`.\n *\n * Default is `null`.\n */\n @Input()\n get min(): T | null {\n return this._min;\n }\n set min(value: T | null) {\n this._min = value;\n this.setProperty(\"min\", value);\n }\n private _min: T | null = null;\n /**\n * Event emitted when the input value changes with the value represented as a `Date` object.\n */\n @Output() readonly changeAsDate: EventEmitter = new EventEmitter();\n /**\n * The date value of the control.\n *\n * A `Date` object representing the date entered in the input.\n */\n @Input()\n get valueAsDate(): Date | null {\n return this.value ? dateFromInput(this.value) : null;\n }\n set valueAsDate(value: Date | null) {\n this.value = inputFromDate(this.type as InputName, value);\n }\n /**\n * The earliest date to accept for `valueAsDate`.\n *\n * Default is `null`.\n */\n @Input()\n get minAsDate(): Date | null {\n return this.min ? dateFromInput(this.min) : null;\n }\n set minAsDate(value: Date | null) {\n this.min = inputFromDate(this.type as InputName, value);\n }\n /**\n * The latest date to accept for `valueAsDate`.\n *\n * Default is `null`.\n */\n @Input()\n get maxAsDate(): Date | null {\n return this.max ? dateFromInput(this.max) : null;\n }\n set maxAsDate(value: Date | null) {\n this.max = inputFromDate(this.type as InputName, value);\n }\n /**\n * An attribute which, if present, indicates that the user should not be able to edit the value of the input.\n */\n @Input()\n get readonly(): boolean {\n return this._readonly;\n }\n set readonly(value: BooleanInput) {\n this._readonly = coerceBooleanProperty(value);\n this.setProperty(\"readOnly\", this._readonly);\n }\n private _readonly = false;\n /**\n * Whether the form field should stretch the entire width of its parent. Default is `false`.\n */\n @Input()\n get fluid(): boolean {\n return this._fluid;\n }\n set fluid(value: BooleanInput) {\n this._fluid = coerceBooleanProperty(value);\n }\n private _fluid = false;\n\n @ViewChild(InputCalendarComponent, { read: ElementRef }) calendarElement!: ElementRef;\n\n /** Close calendar when `click` event is fired outside of the input or calendar */\n @HostListener(\"document:click\", [\"$event\"])\n onDocumentClick(event: PointerEvent) {\n if (this.open) {\n // Remove last item of event path since it's a 'Window' object (and not a 'Node').\n const composedPath = event.composedPath().slice(0, -1) as Array;\n // Ignore clicks inside input element or calendar\n const isInside = composedPath.some(\n (node) =>\n this.calendarElement.nativeElement.isSameNode(node) || this.inputElement.nativeElement.parentNode!.isSameNode(node)\n );\n if (!isInside) this.onOpenChange();\n }\n }\n\n /** Make sure host element is positioned relative to ensure calender width is calculated correctly */\n @HostBinding(\"style.position\") readonly position = \"relative\";\n\n ngAfterViewInit() {\n super.ngAfterViewInit();\n this._datesElementAdapter = new DatesElementAdapter(this.inputElement.nativeElement, this.format);\n this.inputElement.nativeElement.addEventListener(\"mousedown\", () => {\n this._isMouseEvent = true;\n });\n this.inputElement.nativeElement.addEventListener(\"focus\", () => {\n this.setProperty(\"value\", this._datesElementAdapter.value!);\n // Always set focus to the first selection range when entering using keyboard\n if (!this._isMouseEvent) this._datesElementAdapter.setSelection(0);\n this.onTouched();\n });\n this.inputElement.nativeElement.addEventListener(\"mouseup\", () => {\n this._isMouseEvent = false;\n this._datesElementAdapter.setSelection(this.inputElement.nativeElement.selectionStart ?? 0);\n });\n this.inputElement.nativeElement.addEventListener(\"blur\", () => {\n if (!this.value) {\n // Clear input mask if user has not entered any information\n this.setProperty(\"value\", null);\n }\n });\n this.inputElement.nativeElement.addEventListener(\"input\", () => {\n // We are only dispatching change event when the inputted value is valid\n // otherwise we will mask the input string to give some indication to the user\n // how to complete the input\n if (new RegExp(this.pattern).test(this._datesElementAdapter.value!)) {\n const date = this.getDateFromInput(this._datesElementAdapter.value!);\n this.onDateChange(date);\n } else {\n this.setProperty(\"value\", this._datesElementAdapter.value);\n }\n this._datesElementAdapter.setSelection();\n });\n this.inputElement.nativeElement.addEventListener(\"keydown\", (event: KeyboardEvent) => {\n switch (event.key) {\n case \"Tab\": {\n this._datesElementAdapter.setSelectionNext(event.preventDefault.bind(event));\n break;\n }\n case \"ArrowRight\": {\n this._datesElementAdapter.setSelectionNext();\n event.preventDefault();\n break;\n }\n case \"ArrowLeft\": {\n this._datesElementAdapter.setSelectionPrevious();\n event.preventDefault();\n break;\n }\n case \"Backspace\": {\n this._datesElementAdapter.clearInputMask();\n break;\n }\n case \" \": {\n this.open = !this.open;\n break;\n }\n default: {\n // Only process numbers from here on\n if (!/[0-9]/.test(event.key)) {\n event.preventDefault();\n return;\n }\n this._datesElementAdapter.setInputMask(event.key);\n }\n }\n });\n }\n onOpenChange() {\n this.open = !this.open;\n }\n /** Invoked when a date has been selected in the calendar by the user. */\n onDateChange(date: Date) {\n this.valueAsDate = date;\n this.activeDate = date;\n this.changeAsDate.emit(date);\n const dateString = inputFromDate(this.type as InputName, date);\n // When a date is selected from the calendar then the input is no longer pristine\n // this ensures that the input validates correctly when dates are selected\n // for the first time\n this.onTouched();\n this.onChange(dateString);\n // Close the calendar upon selection\n this.onOpenChange();\n }\n /** Keeps track of the activate date selected in calendar */\n activeDate = startOfDay(new Date());\n /* Keep tracks of the select open and close state */\n open = false;\n /** Name of icon class that displays the selected date. */\n get currentDateIcon() {\n return CALENDAR_ICONS[getDate(this.activeDate) - 1];\n }\n /** `RegExp` pattern of the provided date format. */\n get pattern() {\n return patternFromFormat(this.format);\n }\n /** Keeps track of whether the input element was focused as a result of a mouse or keyboard event. */\n private _isMouseEvent = false;\n /** Instantiated elements adapter. */\n private _datesElementAdapter!: DatesElementAdapter;\n /** Returns `Date` object from string value of input field. */\n private getDateFromInput(input: string) {\n return getLocalDate(\n parse(input, this.format, new Date(), {\n weekStartsOn: 4,\n useAdditionalWeekYearTokens: true,\n })\n );\n }\n /** Returns string input value from `Date` object. */\n private getInputFromDate(date: Date) {\n return format(date, this.format, {\n weekStartsOn: 4,\n useAdditionalWeekYearTokens: true,\n }) as T;\n }\n}\n","import { CommonModule } from \"@angular/common\";\nimport {\n NgModule,\n Input,\n Component,\n Directive,\n EventEmitter,\n Output,\n ChangeDetectionStrategy,\n OnInit,\n Inject,\n LOCALE_ID,\n} from \"@angular/core\";\n\nimport {\n chunk,\n isAfter,\n isBefore,\n addYears,\n eachMonthOfInterval,\n endOfYear,\n InputName,\n startOfYear,\n subYears,\n isSameDay,\n startOfDecade,\n endOfDecade,\n eachYearOfInterval,\n getMonth,\n startOfMonth,\n startOfISOWeek,\n pipe,\n endOfDay,\n endOfMonth,\n endOfISOWeek,\n addMonths,\n subMonths,\n eachDayOfInterval,\n startOfDay,\n isValidSwedishWeekday,\n isValidFinnishWeekday,\n isWeekend,\n isSameYear,\n isSameMonth,\n} from \"@vattenfall/util\";\n\nimport { InputsModule } from \"./inputs\";\n\n/** Callback functions used for navigating different calendar sections. */\nexport type InputCalendarDirectiveCallbacks = {\n /** To to next panel for calendar section, i.e. next month. */\n nextCallback: (date: Date, amount: number) => Date;\n /** To to previous panel for calendar section, i.e. next month. */\n previousCallback: (date: Date, amount: number) => Date;\n /** To extract the first millisecond of a date unit (day, week, month, year) in the current calendar section. */\n startDateUnitCallback: (date: Date) => Date;\n /** To extract the first date in a range of dates to display in the current calendar section. */\n startDateCallback: (date: Date) => Date;\n /** To extract the last date in a range of dates to display in the current calendar section. */\n endDateCallback: (date: Date) => Date;\n /** To extract the last millisecond of a date unit (day, week, month, year) in the current calendar section. */\n endDateUnitCallback: (date: Date) => Date;\n /** To generate a range of dates between the start and end date, i.e. a range of months. */\n intervalCallback: (interval: Interval) => Array;\n};\n\n/** Shared properties used to communicating between different calendar components. */\n@Directive()\nexport class InputCalendarDirective {\n /** The type of calendar. */\n @Input() type: InputName | null = null;\n /** The type of calendar currently displayed. */\n @Input() activeType: InputName | null = null;\n /** The earliest date to accept for `value`. */\n @Input() min: Date | null = null;\n /** The latest date to accept for `value`. */\n @Input() max: Date | null = null;\n /** Date selected by user. */\n @Input() value: Date | null = null;\n /** Date displayed in panel. */\n @Input() activeDate = startOfDay(new Date());\n /** Disables all non-weekdays in calendar from user interaction. */\n @Input() weekday = false;\n /** Emits every time user selects a new date. */\n @Output() readonly valueChange = new EventEmitter();\n /** Emits every time the panel change date. */\n @Output() readonly activeDateChange = new EventEmitter();\n}\n\n/** Shared utilities for all calendar sections. */\n@Directive()\nexport class InputCalendarSectionDirective extends InputCalendarDirective {\n constructor(protected callbacks: InputCalendarDirectiveCallbacks) {\n super();\n }\n /** Whether the provided date is higher or lower than current `min` and `max` dates. */\n isDisabled(date: Date) {\n return !this.isWithinLowerBound(date) || !this.isWithinHigherBound(date);\n }\n /** Whether the provided date is lower than current `min` date. */\n isWithinLowerBound(date?: Date) {\n if (!date || !this.min) return true;\n return isAfter(this.callbacks.endDateUnitCallback(date), this.callbacks.startDateUnitCallback(this.min));\n }\n /** Whether the provided date is higher than current `max` date. */\n isWithinHigherBound(date?: Date) {\n if (!date || !this.max) return true;\n return isBefore(this.callbacks.startDateUnitCallback(date), this.callbacks.endDateUnitCallback(this.max));\n }\n /** Whether the provided date is the current selected date. */\n isSelected(date: Date) {\n return this.value && isSameDay(date, this.value);\n }\n /** Whether the provided date is the current active date. */\n isActive(date: Date) {\n return this.value && isSameDay(date, this.activeDate);\n }\n /** Range of dates displayed in the current calendar panel. */\n get dates() {\n const start = this.callbacks.startDateCallback(this.activeDate);\n const end = this.callbacks.endDateCallback(this.activeDate);\n return this.callbacks.intervalCallback({ start, end });\n }\n /** Breaks range of dates into rows */\n getRows(columnCount: number) {\n return chunk(this.dates, columnCount);\n }\n /** Change panel to later range of dates. */\n onNext() {\n this.activeDateChange.emit(this.callbacks.nextCallback(this.activeDate, 1));\n }\n /** Change panel to earlier range of dates. */\n onPrevious() {\n this.activeDateChange.emit(this.callbacks.previousCallback(this.activeDate, 1));\n }\n /** Method invoked when the user selects a date from calendar. */\n onSelected(date: Date, event?: Event) {\n event?.preventDefault();\n if (!this.isDisabled(date) && !this.isSelected(date)) {\n this.activeDateChange.emit(date);\n this.valueChange.emit(date);\n }\n }\n /** Track function for *ngFor loop (to ensure rerender when `dates` list change). */\n trackBy(index: number) {\n return index;\n }\n}\n\n@Component({\n selector: \"ui-input-calendar\",\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n \n `,\n})\nexport class InputCalendarComponent extends InputCalendarDirective implements OnInit {\n @Input() fluid = false;\n\n ngOnInit() {\n this.activeDate = this.adjustDateToAllowedRange(this.activeDate);\n this.activeType = this.type;\n }\n get isYearDisabled() {\n return this.min && this.max && isSameYear(this.min, this.max);\n }\n get isMonthDisabled() {\n return this.min && this.max && isSameMonth(this.min, this.max);\n }\n onActiveType(selectedType: InputName) {\n this.activeType = this.activeType === selectedType ? this.type : selectedType;\n }\n onValue(date: Date) {\n date = this.adjustDateToAllowedRange(date);\n // Reset the calendar panel to the base after you have selected a year for example\n this.activeType = this.type;\n this.valueChange.emit(date);\n }\n\n /**\n * This function is used to adjust the active date when calendar opens or a value has been selected.\n * @param date - the date to be adjusted\n * When calendar opens or a value has been selected:\n * If current date is less then min date, move calendar panel to min date.\n * If current date is greater than max date, move calendar panel to max date.\n * Otherwise, move calendar panel to current date if neither min nor max is specified.\n * @returns date\n */\n adjustDateToAllowedRange(date: Date) {\n if (this.min) date = isBefore(this.activeDate, this.min) ? this.min : this.activeDate;\n else if (this.max) date = isAfter(this.activeDate, this.max) ? this.max : this.activeDate;\n return date;\n }\n}\n\n@Component({\n selector: \"ui-input-calendar-footer\",\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n \n `,\n})\nexport class InputCalendarFooterComponent {\n @Input() isNextActive!: boolean;\n @Input() isPreviousActive!: boolean;\n @Output() readonly nextChange = new EventEmitter();\n @Output() readonly previousChange = new EventEmitter();\n}\n\n@Component({\n selector: \"ui-input-calendar-section-date\",\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n \n \n \n \n {{ date | date: \"EEEEE\" }} \n \n \n \n \n {{ week[0] | date: \"w\" }} \n \n {{ date | date: \"d\" }}\n \n \n \n
\n \n `,\n})\nexport class InputCalendarSectionDateComponent extends InputCalendarSectionDirective {\n constructor(@Inject(LOCALE_ID) private locale: string) {\n super({\n startDateUnitCallback: startOfDay,\n endDateUnitCallback: endOfDay,\n startDateCallback: pipe(startOfMonth, startOfISOWeek),\n endDateCallback: pipe(endOfMonth, endOfISOWeek),\n nextCallback: addMonths,\n previousCallback: subMonths,\n intervalCallback: eachDayOfInterval,\n });\n }\n override isDisabled(date: Date) {\n const isDisabled = super.isDisabled(date) || getMonth(date) !== getMonth(this.activeDate);\n if (this.weekday)\n switch (this.locale.slice(0, 2)) {\n case \"sv\":\n return isDisabled || !isValidSwedishWeekday(date);\n case \"fi\":\n return isDisabled || !isValidFinnishWeekday(date);\n default:\n return isDisabled || isWeekend(date);\n }\n return isDisabled;\n }\n}\n\n@Component({\n selector: \"ui-input-calendar-section-week\",\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n \n \n \n \n {{ date | date: \"EEEEE\" }} \n \n \n \n \n {{ week[0] | date: \"w\" }} \n \n {{ date | date: \"d\" }}\n \n \n \n
\n \n `,\n})\nexport class InputCalendarSectionWeekComponent extends InputCalendarSectionDirective {\n constructor(@Inject(LOCALE_ID) private locale: string) {\n super({\n startDateUnitCallback: startOfISOWeek,\n endDateUnitCallback: endOfISOWeek,\n startDateCallback: pipe(startOfMonth, startOfISOWeek),\n endDateCallback: pipe(endOfMonth, endOfISOWeek),\n nextCallback: addMonths,\n previousCallback: subMonths,\n intervalCallback: eachDayOfInterval,\n });\n }\n override isDisabled(date: Date) {\n const isDisabled = super.isDisabled(date) || getMonth(date) !== getMonth(this.activeDate);\n if (this.weekday)\n switch (this.locale.slice(0, 2)) {\n case \"sv\":\n return isDisabled || !isValidSwedishWeekday(date);\n case \"fi\":\n return isDisabled || !isValidFinnishWeekday(date);\n default:\n return isDisabled || isWeekend(date);\n }\n return isDisabled;\n }\n override onSelected(date: Date, event?: Event) {\n event?.preventDefault();\n if (!this.isSelected(date)) {\n this.activeDateChange.emit(date);\n this.valueChange.emit(date);\n }\n }\n}\n\n@Component({\n selector: \"ui-input-calendar-section-month\",\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n \n \n \n \n {{ date | date: \"MMMM\" }}\n \n \n \n
\n \n `,\n})\nexport class InputCalendarSectionMonthComponent extends InputCalendarSectionDirective {\n constructor() {\n super({\n startDateUnitCallback: startOfMonth,\n endDateUnitCallback: endOfMonth,\n startDateCallback: startOfYear,\n endDateCallback: endOfYear,\n nextCallback: addYears,\n previousCallback: subYears,\n intervalCallback: eachMonthOfInterval,\n });\n }\n}\n\n@Component({\n selector: \"ui-input-calendar-section-year\",\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n \n \n \n \n {{ date | date: \"yyyy\" }}\n \n \n \n
\n \n `,\n})\nexport class InputCalendarSectionYearComponent extends InputCalendarSectionDirective {\n constructor() {\n super({\n startDateUnitCallback: startOfYear,\n endDateUnitCallback: endOfYear,\n startDateCallback: startOfDecade,\n endDateCallback: endOfDecade,\n nextCallback: (date: Date) => addYears(startOfDecade(date), 10),\n previousCallback: (date: Date) => subYears(endOfDecade(date), 10),\n intervalCallback: eachYearOfInterval,\n });\n }\n}\n\n/**\n * The `DatesModule` contains utilities for date input components.\n */\n@NgModule({\n declarations: [\n InputCalendarComponent,\n InputCalendarFooterComponent,\n InputCalendarSectionDateComponent,\n InputCalendarSectionWeekComponent,\n InputCalendarSectionMonthComponent,\n InputCalendarSectionYearComponent,\n ],\n imports: [CommonModule, InputsModule],\n exports: [\n InputCalendarComponent,\n InputCalendarFooterComponent,\n InputCalendarSectionDateComponent,\n InputCalendarSectionWeekComponent,\n InputCalendarSectionMonthComponent,\n InputCalendarSectionYearComponent,\n ],\n})\nexport class DatesModule {}\n","\n","import { Component, ViewEncapsulation, ChangeDetectionStrategy } from \"@angular/core\";\n\nimport { TextsElementAccessor } from \"../texts-accessor\";\n\n/**\n * Text fields allow users to enter an email address into a UI. They typically appear in forms and dialogs. Line-breaks are automatically removed from the input value.\n *\n * Email inputs can be used as an Angular `FormControl`, in both reactive and template driven forms.\n */\n@Component({\n selector: \"ui-input[type=email]\",\n templateUrl: \"./email.component.html\",\n encapsulation: ViewEncapsulation.Emulated,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class InputEmailComponent extends TextsElementAccessor {}\n","import {\n Directive,\n Renderer2,\n ChangeDetectorRef,\n AfterContentInit,\n Input,\n Self,\n Optional,\n ContentChild,\n ViewChild,\n EventEmitter,\n Output,\n AfterViewInit,\n ElementRef,\n OnDestroy,\n} from \"@angular/core\";\nimport { NgControl, ControlValueAccessor } from \"@angular/forms\";\n\nimport { coerceBooleanProperty, BooleanInput } from \"@vattenfall/util\";\n\nimport { Subscription, ReplaySubject } from \"rxjs\";\n\nimport { InputLabelDirective, InputHintDirective, InputMessageDirective } from \"./inputs\";\n\n@Directive()\n// eslint-disable-next-line @angular-eslint/directive-class-suffix\nexport class InputValueAccessor\n implements ControlValueAccessor, AfterViewInit, OnDestroy\n{\n /**\n * Event emitted when the input value changes.\n */\n @Output() readonly change: EventEmitter = new EventEmitter();\n /**\n * Whether the input is pending (before view has been initialized)\n */\n get isPending() {\n return this._isPending;\n }\n /**\n * Whether the input is ready (after view has been initialized)\n */\n get isReady() {\n return !this.isPending;\n }\n /**\n * Whether the input is valid\n */\n get isValid() {\n if (this._isNgControl) return this.ngControl.valid;\n return this.inputElement?.nativeElement?.checkValidity();\n }\n /**\n * Whether the input is invalid\n */\n get isInvalid() {\n return !this.isValid;\n }\n /**\n * Whether the input is disabled\n */\n get isDisabled() {\n if (this._isNgControl) return this.ngControl.disabled;\n return this.inputElement?.nativeElement?.disabled;\n }\n /**\n * Whether the input is enabled\n */\n get isEnabled() {\n return !this.isDisabled;\n }\n /**\n * Whether the input is dirty\n */\n get isDirty() {\n if (this._isNgControl) return this.ngControl.dirty;\n return this._isDirty;\n }\n /**\n * Whether the input is pristine\n */\n get isPristine() {\n return !this.isDirty;\n }\n /**\n * Whether the input is touched\n */\n get isTouched() {\n if (this._isNgControl) return this.ngControl.touched;\n return this._isTouched;\n }\n /**\n * Whether the input is untouched\n */\n get isUntouched() {\n return !this.isTouched;\n }\n /**\n * Helper method that sets a property on a target element using the current Renderer implementation.\n */\n protected setProperty(key: string, value: unknown): void {\n this._setPropertySubject.next([key, value]);\n }\n\n @ViewChild(\"inputElement\", { read: ElementRef }) inputElement!: ElementRef;\n\n private _isNgControl = false;\n private _isPending = true;\n private _isDirty = false;\n private _isTouched = false;\n\n private _setPropertySubject = new ReplaySubject<[string, unknown]>(Number.POSITIVE_INFINITY);\n private _setPropertySubscription = Subscription.EMPTY;\n\n constructor(public ngControl: NgControl, protected renderer: Renderer2, public changeDetectorRef: ChangeDetectorRef) {\n if (this.ngControl) {\n this._isNgControl = true;\n // Allows `` component to register as a `ControlValueAccessor`.\n this.ngControl.valueAccessor = this;\n }\n }\n\n ngAfterViewInit() {\n this._isPending = false;\n this._setPropertySubscription = this._setPropertySubject.subscribe(([key, value = null]) => {\n this.renderer.setProperty(this.inputElement.nativeElement, key, value);\n this.changeDetectorRef.markForCheck();\n });\n }\n\n ngOnDestroy() {\n this._setPropertySubject.complete();\n this._setPropertySubscription.unsubscribe();\n }\n\n /**\n * The registered callback function called when a change or input event occurs on the input\n * element.\n */\n onChange(value: T | T[]) {\n if (this._isNgControl) {\n this.ngControl.control?.setValue(value);\n this.ngControl.control?.markAsDirty();\n }\n this._isDirty = true;\n this.change.emit(value);\n }\n /**\n * The registered callback function called when a blur event occurs on the input element.\n */\n onTouched() {\n if (this._isNgControl) {\n this.ngControl.control?.markAsTouched();\n }\n this._isTouched = true;\n }\n /**\n * Writes a new value to the element.\n */\n writeValue(value: T): void {\n this.setProperty(\"value\", value);\n }\n /**\n * Registers a function called when the control is touched.\n */\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n /**\n * Registers a function called when the control value changes.\n */\n // eslint-disable-next-line @typescript-eslint/ban-types\n registerOnChange(fn: (_: unknown) => {}): void {\n this.onChange = fn;\n }\n /**\n * Sets the \"disabled\" property on the range input element.\n */\n setDisabledState(disabled: boolean): void {\n this.setProperty(\"disabled\", disabled);\n }\n}\n\n/**\n * Increasing integer for generating unique ids.\n */\nlet nextUniqueId = 0;\n\n/**\n * The `InputsElementAccessor` is the access layer to the `InputValueAccessor`.\n *\n * It handles attributes and content projection that is shared across all type of inputs, such as `name`, `id` and `required`.\n * The `InputsElementAccessor` require a generic type to be specified, this type should correspond to the value emitted on input change.\n */\n@Directive()\nexport class InputsElementAccessor\n extends InputValueAccessor\n implements AfterContentInit\n{\n /**\n * Type of form control.\n *\n * Default is `text`.\n */\n @Input() type:\n | \"text\"\n | \"textarea\"\n | \"tel\"\n | \"email\"\n | \"number\"\n | \"checkbox\"\n | \"radio\"\n | \"switch\"\n | \"select\"\n | \"option\"\n | \"option-group\"\n | \"date\"\n | \"month\"\n | \"year\"\n | \"week\" = \"text\";\n /**\n * Label for input element. Behaves the same as `` element.\n */\n @Input() label: string | null = null;\n /**\n * Text that hints the input element usage. Behaves the same as `` element.\n */\n @Input()\n get hint(): string | null {\n return this.isUntouched || (this.isValid && this._hint) ? this._hint : null;\n }\n set hint(value: string | null) {\n this._hint = value;\n }\n private _hint: string | null = null;\n /**\n * Text to display when the input element is invalid. Behaves the same as `` element.\n */\n @Input()\n get error(): string | null {\n return this.isTouched && this.isInvalid && this._error ? this._error : null;\n }\n set error(value: string | null) {\n this._error = value;\n }\n private _error: string | null = null;\n /**\n * Whether the checkbox is disabled.\n *\n * Default is `false`.\n */\n @Input()\n get disabled(): boolean {\n return this._disabled;\n }\n set disabled(value: BooleanInput) {\n this._disabled = coerceBooleanProperty(value);\n this.setProperty(\"disabled\", this._disabled);\n if (this.ngControl)\n if (this._disabled) this.ngControl.control?.disable();\n else this.ngControl.control?.enable();\n }\n private _disabled = false;\n /**\n * Whether the checkbox is required.\n *\n * Default is `false`.\n */\n @Input()\n get required(): boolean {\n return this._required;\n }\n set required(value: BooleanInput) {\n this._required = coerceBooleanProperty(value);\n this.setProperty(\"required\", this._required);\n }\n private _required = false;\n /**\n * A unique id for the checkbox input. If none is supplied, it will be auto-generated.\n */\n @Input()\n get id(): string {\n return this._id;\n }\n set id(value: string) {\n this._id = value;\n this.setProperty(\"id\", this._id);\n }\n private _id = `ui-input-${nextUniqueId++}`;\n /**\n * Name value will be applied to the input element if present.\n */\n @Input()\n get name(): string | null {\n return this._name;\n }\n set name(value: string | null) {\n this._name = value;\n this.setProperty(\"name\", this._name);\n }\n private _name: string | null = null;\n /**\n * Whether the control should display valid and invalid states.\n *\n * Default is `false`.\n */\n @Input()\n get validate(): boolean {\n return this._validate;\n }\n set validate(value: BooleanInput) {\n this._validate = coerceBooleanProperty(value);\n }\n private _validate = false;\n\n constructor(\n @Self()\n @Optional()\n public ngControl: NgControl,\n protected renderer: Renderer2,\n public changeDetectorRef: ChangeDetectorRef\n ) {\n super(ngControl, renderer, changeDetectorRef);\n }\n\n ngAfterContentInit() {\n if (this.inputLabelDirective) this.label = this.inputLabelDirective.elementRef.nativeElement.textContent;\n if (this.inputHintDirective) this.hint = this.inputHintDirective.elementRef.nativeElement.textContent;\n if (this.inputMessageDirective) this.error = this.inputMessageDirective.elementRef.nativeElement.textContent;\n }\n\n @ContentChild(InputLabelDirective) protected inputLabelDirective?: InputLabelDirective;\n @ContentChild(InputHintDirective) protected inputHintDirective?: InputHintDirective;\n @ContentChild(InputMessageDirective) protected inputMessageDirective?: InputMessageDirective;\n}\n","import { NgModule, Directive, ElementRef } from \"@angular/core\";\n\n/**\n * The input label text element\n */\n@Directive({\n selector: \"ui-input-label\",\n})\nexport class InputLabelDirective {\n constructor(public elementRef: ElementRef) {}\n}\n\n/**\n * The input helper text element\n */\n@Directive({\n selector: \"ui-input-hint\",\n})\nexport class InputHintDirective {\n constructor(public elementRef: ElementRef) {}\n}\n\n/**\n * The input validation error text element\n */\n@Directive({\n selector: \"ui-input-message\",\n})\nexport class InputMessageDirective {\n constructor(public elementRef: ElementRef) {}\n}\n\n/**\n * The `InputsModule` contains utilities for input components.\n */\n@NgModule({\n declarations: [InputLabelDirective, InputHintDirective, InputMessageDirective],\n exports: [InputLabelDirective, InputHintDirective, InputMessageDirective],\n})\nexport class InputsModule {}\n","import { AfterContentInit, ContentChildren, Directive, ElementRef, Input, QueryList, ViewChildren } from \"@angular/core\";\nimport { coerceBooleanProperty, BooleanInput } from \"@vattenfall/util\";\n\nimport { InputsElementAccessor } from \"./inputs-accessor\";\nimport { InputOptionDirective } from \"./lists\";\n\n/**\n * The `ListsElementAccessor` contains methods and properties shared by all list-like input components.\n * It require a generic type to be specified, this type should correspond to the value emitted on input change.\n */\n@Directive()\nexport class ListsElementAccessor extends InputsElementAccessor implements AfterContentInit {\n @ContentChildren(InputOptionDirective, { descendants: true }) readonly inputOptionDirectives!: QueryList;\n @ViewChildren(\"inputOptionElement\") protected readonly inputOptionElements!: QueryList>;\n /**\n * Whether multiple items can be selected. When enabled, the output value of `change` will be an array containing the selected values.\n *\n * Default is `false`.\n */\n @Input()\n get multiple(): boolean {\n return this._multiple;\n }\n set multiple(value: BooleanInput) {\n this._multiple = coerceBooleanProperty(value);\n }\n private _multiple = false;\n\n /**\n * The labels of the selected options\n */\n get selectedLabels(): Array<{ label: string; sublabel: string }> {\n return this.inputOptionDirectives\n .filter((inputOptionDirective) => coerceBooleanProperty(inputOptionDirective.selected))\n .map((inputOptionDirective) => ({\n label: inputOptionDirective.label ?? \"\",\n sublabel: inputOptionDirective.sublabel ?? \"\",\n }));\n }\n /**\n * The values of the selected options\n */\n get selectedValues(): Array {\n return this.inputOptionDirectives\n .filter((inputOptionDirective) => coerceBooleanProperty(inputOptionDirective.selected))\n .map((inputOptionDirective) => inputOptionDirective.value);\n }\n /**\n * Overriding base method to ensure that the option is selected when the value is set programmatically\n */\n override writeValue(value: unknown): void {\n this.inputOptionElements.forEach((inputOptionElement) => {\n if (Array.isArray(value)) {\n if (value.includes(inputOptionElement.nativeElement.value)) inputOptionElement.nativeElement.checked = true;\n } else if (inputOptionElement.nativeElement.value == value) inputOptionElement.nativeElement.checked = true;\n else inputOptionElement.nativeElement.checked = false;\n });\n this.setSelectedOptions();\n super.writeValue(value);\n }\n /**\n * Callback function to be invoked every time an option has been selected or deselected.\n */\n onSelectChange() {\n this.setSelectedOptions();\n this.setRequiredValidator();\n // Dispatch array of values if multiple, otherwise dispatch a single value\n if (this.multiple) super.onChange(this.selectedValues);\n else super.onChange(this.selectedValues[0]);\n }\n\n /**\n * Check list elements if selected and selects them in view\n */\n private setSelectedOptions() {\n this.inputOptionDirectives.forEach((inputOptionDirective, index) => {\n inputOptionDirective.selected = this.inputOptionElements.get(index)?.nativeElement.checked ?? false;\n });\n }\n /**\n * Custom validator to check if multiple list element has a selected value.\n * This functionality is not supported in native select elements.\n */\n private setRequiredValidator() {\n // Putting this at the end of callstack to ensure the options\n // has been rendered in the ngFor loop first\n setTimeout(() => {\n if (this.multiple && this.required) {\n if (this.inputOptionElements.some((inputOptionElement) => inputOptionElement.nativeElement.checked)) {\n this.inputElement.nativeElement.setCustomValidity(\"\");\n } else this.inputElement.nativeElement.setCustomValidity(\"At least one value must be selected\");\n this.changeDetectorRef.markForCheck();\n }\n });\n }\n override ngAfterContentInit() {\n super.ngAfterContentInit();\n // Pass this class to children so that change detection can be invoked when value change programmatically\n this.inputOptionDirectives.forEach((inputListDirective) => (inputListDirective.listsElementAccessor = this));\n this.setRequiredValidator();\n }\n}\n","import { AfterContentInit, Directive, ElementRef, Input, OnDestroy, ContentChild, NgModule } from \"@angular/core\";\nimport { coerceBooleanProperty, BooleanInput } from \"@vattenfall/util\";\n\nimport { InputLabelDirective, InputsModule } from \"./inputs\";\nimport { ListsElementAccessor } from \"./lists-accessor\";\n\n/**\n * The input sublabel text element\n */\n@Directive({\n selector: \"ui-input-sublabel\",\n})\nexport class InputSublabelDirective {\n constructor(public elementRef: ElementRef) {}\n}\n\n/**\n * The input option element\n */\n@Directive({\n selector: \"ui-input-option\",\n})\nexport class InputOptionDirective implements OnDestroy, AfterContentInit {\n /**\n * Value of the control.\n */\n @Input() value!: unknown;\n /**\n * Whether the control should be selected by default.\n */\n @Input()\n get selected(): boolean {\n return this._selected;\n }\n set selected(value: BooleanInput) {\n this._selected = coerceBooleanProperty(value);\n // We need this to tell the parent when the selected value change programmatically\n this.parentMarkForCheck();\n }\n /**\n * Label for input option element. Behaves the same as `` element.\n */\n @Input() label: string | null = null;\n /**\n * Sublabel for input option element. Behaves the same as `` element.\n */\n @Input() sublabel: string | null = null;\n\n listsElementAccessor?: ListsElementAccessor;\n\n private _selected = false;\n\n private _hostMutationObserver: MutationObserver;\n\n constructor(public elementRef: ElementRef) {\n // This ensure that change detection is fired when the content of the label change\n this._hostMutationObserver = new MutationObserver(this.parentMarkForCheck);\n this._hostMutationObserver.observe(this.elementRef.nativeElement, {\n attributes: true,\n childList: true,\n subtree: true,\n characterData: true,\n });\n }\n\n ngOnDestroy() {\n this._hostMutationObserver.disconnect();\n }\n\n ngAfterContentInit() {\n if (this.inputLabelDirective) this.label = this.inputLabelDirective?.elementRef.nativeElement.textContent;\n if (this.inputSublabelDirective) this.sublabel = this.inputSublabelDirective?.elementRef.nativeElement.textContent;\n if (!this.label) this.label = this.getTextContent();\n }\n\n @ContentChild(InputLabelDirective) protected inputLabelDirective?: InputLabelDirective;\n @ContentChild(InputSublabelDirective) protected inputSublabelDirective?: InputSublabelDirective;\n\n private parentMarkForCheck = () => {\n if (this.listsElementAccessor) this.listsElementAccessor.changeDetectorRef.markForCheck();\n };\n\n private getTextContent() {\n return (\n Array.from(this.elementRef.nativeElement.childNodes).find((node) => node.nodeType === Node.TEXT_NODE)?.textContent ?? \"\"\n ).trim();\n }\n}\n\n/**\n * The `ListsModule` contains utilities for input components that selects multiple options.\n */\n@NgModule({\n declarations: [InputSublabelDirective, InputOptionDirective],\n imports: [InputsModule],\n exports: [InputSublabelDirective, InputOptionDirective],\n})\nexport class ListsModule {}\n","\n \n \n \n \n {{\n inputOptionDirective.label ||\n inputOptionDirective.elementRef.nativeElement.textContent\n }}\n \n \n {{ inputOptionDirective.sublabel }}\n \n
\n \n \n\n \n {{ error }}\n \n \n {{ hint }}\n \n
\n\n\n \n \n \n {{ inputOptionDirective.elementRef.nativeElement.textContent }}\n \n \n","import { Component, ViewEncapsulation, ChangeDetectionStrategy, AfterContentInit, Input } from \"@angular/core\";\n\nimport { ArgTypes } from \"@storybook/angular/types-6-0\";\n\nimport { coerceBooleanProperty, BooleanInput } from \"@vattenfall/util\";\n\nimport { ListsElementAccessor } from \"../lists-accessor\";\n\nexport const argTypesOptionGroup: ArgTypes = {\n determinate: {\n control: \"boolean\",\n description: \"Whether the control is allowed to be empty after dirty.\",\n defaultValue: false,\n table: {\n category: \"Inputs\",\n type: {\n summary: \"boolean\",\n },\n },\n },\n fluid: {\n control: \"boolean\",\n description: \"Whether the element width should be fluid or fixed.\",\n defaultValue: false,\n table: {\n category: \"Inputs\",\n type: {\n summary: \"boolean\",\n },\n },\n },\n horizontal: {\n control: \"boolean\",\n description: \"Whether the elements should be stacked horizontally.\",\n defaultValue: false,\n table: {\n category: \"Inputs\",\n type: {\n summary: \"boolean\",\n },\n },\n },\n small: {\n control: \"boolean\",\n description: \"Whether the font-size should be smaller.\",\n defaultValue: false,\n table: {\n category: \"Inputs\",\n type: {\n summary: \"boolean\",\n },\n },\n },\n};\n\n/**\n * Option groups display a list of choices on permanent surfaces.\n *\n * Use option groups to:\n *\n * * Provide a list of related options\n * * Where the options are few\n *\n * Option groups can be navigated using arrow keys. Selects should be used instead of options if the number of options are more than 6.\n *\n * Option groups can be used as an Angular `FormControl`, in both reactive and template driven forms.\n */\n@Component({\n selector: \"ui-input[type=option-group]\",\n templateUrl: \"./option-group.component.html\",\n encapsulation: ViewEncapsulation.Emulated,\n changeDetection: ChangeDetectionStrategy.OnPush,\n styles: [\n `\n :host {\n min-width: 100%;\n }\n `,\n ],\n})\nexport class InputOptionGroupComponent extends ListsElementAccessor implements AfterContentInit {\n /**\n * Whether the control is allowed to be empty after dirty.\n *\n * Default is `false`.\n */\n @Input()\n get determinate(): boolean {\n return this._determinate;\n }\n set determinate(value: BooleanInput) {\n this._determinate = coerceBooleanProperty(value);\n }\n private _determinate = false;\n /**\n * Whether the element width should be fluid or fixed.\n *\n * Default is `false`.\n */\n @Input()\n get fluid(): boolean {\n return this._fluid;\n }\n set fluid(value: BooleanInput) {\n this._fluid = coerceBooleanProperty(value);\n }\n private _fluid = false;\n /**\n * Whether the elements should be stacked horizontally.\n *\n * Default is `false`.\n */\n @Input()\n get horizontal(): boolean {\n return this._horizontal;\n }\n set horizontal(value: BooleanInput) {\n this._horizontal = coerceBooleanProperty(value);\n }\n private _horizontal = false;\n /**\n * Whether the font-size should be smaller.\n *\n * Default is `false`.\n */\n @Input()\n get small(): boolean {\n return this._small;\n }\n set small(value: BooleanInput) {\n this._small = coerceBooleanProperty(value);\n }\n private _small = false;\n /**\n * Callback function invoked when navigating the listbox using keyboard.\n *\n * Enables keyboard navigation that behaves similarly as a native select element.\n */\n onNavigate(event: KeyboardEvent) {\n const labelElement = event.target as HTMLLabelElement;\n const inputElement = labelElement.querySelector(\"input\") as HTMLInputElement;\n const previousElementSibling = labelElement.previousElementSibling as HTMLLabelElement | null;\n const nextElementSibling = labelElement.nextElementSibling as HTMLLabelElement | null;\n const firstElementChild = labelElement.parentNode?.firstElementChild as HTMLLabelElement | null;\n const lastElementChild = labelElement.parentNode?.lastElementChild as HTMLLabelElement | null;\n // Switch between navigation key to focus the next or previous element in list\n switch (event.code) {\n // Go to previous option or the last option if the current option is the first in the list\n case \"ArrowUp\":\n case \"ArrowRight\": {\n labelElement.tabIndex = -1;\n if (previousElementSibling) {\n previousElementSibling.tabIndex = 0;\n previousElementSibling.focus();\n } else if (lastElementChild) {\n lastElementChild.tabIndex = 0;\n lastElementChild.focus();\n }\n break;\n }\n // Go to next option or the first option if the current option is the last in the list\n case \"ArrowDown\":\n case \"ArrowLeft\": {\n labelElement.tabIndex = -1;\n if (nextElementSibling) {\n nextElementSibling.tabIndex = 0;\n nextElementSibling.focus();\n } else if (firstElementChild) {\n firstElementChild.tabIndex = 0;\n firstElementChild.focus();\n }\n break;\n }\n // Selected the focused option\n case \"Enter\":\n case \"Space\": {\n labelElement.tabIndex = -1;\n if (firstElementChild) {\n firstElementChild.tabIndex = 0;\n }\n this.onSelected(event, inputElement);\n break;\n }\n }\n }\n /**\n * Callback function invoked when an option has been selected.\n *\n * Close the select element and resets focus. Emit select change event.\n */\n onSelected(event: Event, inputElement: HTMLInputElement) {\n // Prevent default click event\n event.preventDefault();\n // Prevent event propagation in details element\n event.stopImmediatePropagation();\n super.onTouched();\n // Do not collapse options list when a value has been selected\n if (!this.multiple) {\n const hasSelectionRejected =\n !this.determinate &&\n inputElement.checked &&\n this.inputOptionElements.filter((inputOptionElement) => inputOptionElement.nativeElement.checked).length === 1;\n // Do not deselect a determinate select if there is only one selected value remaining\n if (!hasSelectionRejected) {\n inputElement.checked = !inputElement.checked;\n super.onSelectChange();\n }\n } else {\n inputElement.checked = !inputElement.checked;\n super.onSelectChange();\n }\n }\n}\n","import { Directive, Input, Output, EventEmitter } from \"@angular/core\";\n\nimport { coerceBooleanProperty, BooleanInput } from \"@vattenfall/util\";\n\nimport { InputsElementAccessor } from \"./inputs-accessor\";\n\n/**\n * The `OptionsElementAccessor` contains methods and properties shared by all input components that selects single options.\n * It require a generic type to be specified, this type should correspond to the value emitted on input change.\n */\n@Directive()\nexport class OptionsElementAccessor extends InputsElementAccessor {\n /**\n * The initial value of the control.\n *\n * A string value or an array of string values in case the input is a multi-select option list.\n */\n @Input()\n get value(): string | null {\n return this._value;\n }\n set value(value: string | null) {\n this._value = value;\n this.setProperty(\"value\", this._value);\n if (this.ngControl) this.ngControl.control?.setValue(value);\n }\n private _value: string | null = null;\n /**\n * Whether the checkbox or radio is checked.\n *\n * Default is `false`.\n */\n @Input()\n get checked(): boolean {\n return this._checked;\n }\n set checked(value: BooleanInput) {\n this._checked = coerceBooleanProperty(value);\n this.setProperty(\"checked\", this._checked);\n }\n private _checked = false;\n @Output() readonly checkedChange = new EventEmitter();\n /**\n * Whether only one checkbox can be selected at the same time.\n *\n * Default is `false`.\n */\n @Input()\n get radio(): boolean {\n return this._radio;\n }\n set radio(value: BooleanInput) {\n this._radio = coerceBooleanProperty(value);\n }\n private _radio = false;\n /**\n * Whether the checkbox or radio is indeterminate. Indeterminate checkboxes are displayed in a state which is distinct both from being checked or being unchecked.\n *\n * Default is `false`.\n */\n @Input()\n get indeterminate(): boolean {\n return this._indeterminate;\n }\n set indeterminate(value: BooleanInput) {\n this._indeterminate = coerceBooleanProperty(value);\n this.setProperty(\"indeterminate\", this._indeterminate);\n }\n private _indeterminate = false;\n\n onCheckboxChange(checked: boolean) {\n this.onChange(checked);\n this.checkedChange.emit(checked);\n }\n}\n","\n \n \n \n \n \n \n {{ selectedLabel.label }}\n \n {{ selectedLabel.sublabel }}\n \n \n {{ last ? \"\" : \", \" }} \n \n \n
\n \n \n \n \n \n {{ inputOptionDirective.label }}\n \n {{ inputOptionDirective.sublabel }}\n \n \n \n \n
\n \n \n \n {{ error }}\n \n \n {{ hint }}\n \n
\n \n\n\n {{ label }} \n \n \n \n \n {{ sublabel }}\n \n \n\n\n\n \n \n \n {{ inputOptionDirective.elementRef.nativeElement.textContent }}\n \n \n","import {\n Component,\n ViewEncapsulation,\n ChangeDetectionStrategy,\n ViewChildren,\n ElementRef,\n Input,\n AfterContentInit,\n ContentChild,\n ViewChild,\n QueryList,\n HostListener,\n} from \"@angular/core\";\n\nimport { ArgTypes } from \"@storybook/angular/types-6-0\";\nimport { BooleanInput, coerceBooleanProperty, coerceNumberProperty, NumberInput } from \"@vattenfall/util\";\n\nimport { InputSublabelDirective } from \"../lists\";\nimport { ListsElementAccessor } from \"../lists-accessor\";\n\nexport const argTypesSelect: ArgTypes = {\n sublabel: {\n control: \"text\",\n description: \"Sublabel for input element. Behaves the same as `` element.\",\n defaultValue: \"Input sublabel\",\n table: {\n category: \"Content\",\n type: {\n summary: \"string | null\",\n },\n },\n },\n relative: {\n control: \"boolean\",\n description:\n \"Whether the select should expand over surrounding elements, or if the surrounding elements should expand with it.\",\n defaultValue: false,\n table: {\n category: \"Inputs\",\n type: {\n summary: \"boolean\",\n },\n },\n },\n truncate: {\n control: \"boolean\",\n description: \"Whether the select text content should break into rows or be truncated.\",\n defaultValue: true,\n table: {\n category: \"Inputs\",\n type: {\n summary: \"boolean\",\n },\n },\n },\n determinate: {\n control: \"boolean\",\n description: \"Whether the control is allowed to be empty after dirty.\",\n defaultValue: false,\n table: {\n category: \"Inputs\",\n type: {\n summary: \"boolean\",\n },\n },\n },\n fluid: {\n control: \"boolean\",\n description: \"Whether the element width should be fluid or fixed.\",\n defaultValue: false,\n table: {\n category: \"Inputs\",\n type: {\n summary: \"boolean\",\n },\n },\n },\n size: {\n control: \"number\",\n description: \"The number of visible items in the control.\",\n defaultValue: null,\n table: {\n category: \"Inputs\",\n type: {\n summary: \"number | null\",\n },\n },\n },\n};\n\n/**\n * Select menus display a list of choices on temporary surfaces.\n *\n * Use select menus to:\n *\n * * Provide a list of related options\n * * Where the options are plenty\n *\n * Select menus support the same keyboard interaction as native `` elements.\n *\n * Select menus can be used as an Angular `FormControl`, in both reactive and template driven forms.\n */\n@Component({\n selector: \"ui-input[type=select]\",\n templateUrl: \"./select.component.html\",\n encapsulation: ViewEncapsulation.Emulated,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class InputSelectComponent extends ListsElementAccessor implements AfterContentInit {\n @ViewChild(\"detailsElement\", { read: ElementRef }) private detailsElement!: ElementRef;\n\n /**\n * Close select when clicked outside of its content area.\n */\n @HostListener(\"document:click\", [\"$event\"]) onClick($event: PointerEvent) {\n if (!$event.composedPath().includes(this.detailsElement.nativeElement)) {\n this.open = false;\n }\n }\n\n /**\n * Sublabel for input element. Behaves the same as `` element.\n */\n @Input() sublabel: string | null = null;\n /**\n * Whether the select should expand over surrounding elements, or if the surrounding elements should expand with it.\n *\n * Default is `false`.\n */\n @Input()\n get relative(): boolean {\n return this._relative;\n }\n set relative(value: BooleanInput) {\n this._relative = coerceBooleanProperty(value);\n }\n private _relative = false;\n /**\n * Whether the select text content should break into rows or be truncated.\n *\n * Default is `true`.\n */\n @Input()\n get truncate(): boolean {\n return this._truncate;\n }\n set truncate(value: BooleanInput) {\n this._truncate = coerceBooleanProperty(value);\n }\n private _truncate = true;\n /**\n * Whether the control is allowed to be empty after dirty.\n *\n * Default is `false`.\n */\n @Input()\n get determinate(): boolean {\n return this._determinate;\n }\n set determinate(value: BooleanInput) {\n this._determinate = coerceBooleanProperty(value);\n }\n private _determinate = false;\n /**\n * Whether the element width should be fluid or fixed.\n *\n * Default is `false`.\n */\n @Input()\n get fluid(): boolean {\n return this._fluid;\n }\n set fluid(value: BooleanInput) {\n this._fluid = coerceBooleanProperty(value);\n }\n private _fluid = false;\n /**\n * The number of visible items in the control.\n *\n * Default is `null`.\n */\n @Input()\n get size(): NumberInput {\n return this._size;\n }\n set size(value: NumberInput) {\n if (value != null) {\n this._size = coerceNumberProperty(value);\n // Size attribute should only be applied on multiple select elements\n if (this.multiple) this.setProperty(\"size\", this._size);\n }\n }\n private _size: NumberInput = null;\n\n // Keep tracks of the select open and close state\n open = false;\n\n // Maximum height of select element when expanded\n maxHeight = \"auto\";\n\n // Whether the input has been opened or not\n hasOpened = false;\n\n override ngAfterContentInit() {\n super.ngAfterContentInit();\n if (this.inputSublabelDirective) this.sublabel = this.inputSublabelDirective?.elementRef.nativeElement.textContent;\n // Placing last in callstack to ensure the *ngFor loop has completed\n setTimeout(() => {\n if (this.size && this.size < this.inputOptionDirectives.length)\n this.maxHeight =\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n this.labelElements!.reduce((maxHeight, labelElement, index) => {\n if (index < Number(this.size) + 1) maxHeight += labelElement.nativeElement.offsetHeight;\n return maxHeight;\n }, 0) -\n 24 +\n \"px\";\n });\n }\n\n getSelectedTitle() {\n return this.selectedLabels.map((selectedLabel) => selectedLabel.label).join(\", \");\n }\n\n /**\n * Callback function invoked when the select is opened or closed.\n *\n * When the selected is opened, this will set the focus on the first selected option\n * or the first option in the list if none has been selected.\n */\n onToggle(event: Event) {\n // Do nothing if empty\n if (!this.inputOptionDirectives.length) return;\n // Override browser default open event, we will set the open state manually\n event.preventDefault();\n if (this.isEnabled) {\n if (!this.open) {\n const firstInputElementChecked = this.inputOptionElements.find(\n (inputOptionElement) => inputOptionElement.nativeElement.checked\n )?.nativeElement;\n const firstInputElement = this.inputOptionElements.first.nativeElement;\n const inputElement = firstInputElementChecked ?? firstInputElement;\n // Putting this at the end of callstack to ensure the options\n // has been rendered in the ngFor loop first\n setTimeout(() => inputElement.focus());\n this.hasOpened = true;\n }\n this.open = !this.open;\n }\n }\n /**\n * Callback function invoked when navigating the select using keyboard.\n *\n * Enables keyboard navigation that behaves similarly as a native select element.\n */\n onNavigate(event: KeyboardEvent) {\n // Prevent default keyboard events\n event.preventDefault();\n // Prevent event propagation in details element\n event.stopImmediatePropagation();\n const inputElement = event.target as HTMLInputElement;\n const labelElement = inputElement.parentNode as HTMLLabelElement;\n const previousElementSibling = labelElement.previousElementSibling?.querySelector(\"input\") as HTMLInputElement | null;\n const nextElementSibling = labelElement.nextElementSibling?.querySelector(\"input\") as HTMLInputElement | null;\n const firstElementChild = labelElement.parentNode?.firstElementChild?.querySelector(\"input\") as HTMLInputElement | null;\n const lastElementChild = labelElement.parentNode?.lastElementChild?.querySelector(\"input\") as HTMLInputElement | null;\n // Switch between navigation key to focus the next or previous element in list\n switch (event.code) {\n // Go to previous option or the last option if the current option is the first in the list\n case \"ArrowUp\": {\n inputElement.tabIndex = -1;\n if (previousElementSibling) {\n previousElementSibling.tabIndex = 0;\n previousElementSibling.focus();\n } else if (lastElementChild) {\n lastElementChild.tabIndex = 0;\n lastElementChild.focus();\n }\n break;\n }\n // Go to next option or the first option if the current option is the last in the list\n case \"ArrowDown\": {\n inputElement.tabIndex = -1;\n if (nextElementSibling) {\n nextElementSibling.tabIndex = 0;\n nextElementSibling.focus();\n } else if (firstElementChild) {\n firstElementChild.tabIndex = 0;\n firstElementChild.focus();\n }\n break;\n }\n // Close the dropdown on escape and reset focus\n case \"Escape\": {\n inputElement.tabIndex = -1;\n if (firstElementChild) {\n firstElementChild.tabIndex = 0;\n }\n this.detailsElement.nativeElement.querySelector(\"summary\")?.focus();\n this.open = false;\n break;\n }\n // Selected the focused option\n case \"Enter\":\n case \"Space\": {\n inputElement.tabIndex = -1;\n if (firstElementChild) {\n firstElementChild.tabIndex = 0;\n }\n this.onSelected(event, inputElement);\n break;\n }\n }\n }\n\n onBlur() {\n if (!this.hasOpened) super.onTouched();\n }\n\n /**\n * Callback function invoked when an option has been selected.\n *\n * Close the select element and resets focus. Emit select change event.\n */\n onSelected(event: Event, inputElement: HTMLInputElement) {\n // Prevent default click event\n event.preventDefault();\n // Prevent event propagation in details element\n event.stopImmediatePropagation();\n super.onTouched();\n // Do not collapse options list when a value has been selected\n if (!this.multiple) {\n const hasSelectionRejected =\n !this.determinate &&\n inputElement.checked &&\n this.inputOptionElements.filter((inputOptionElement) => inputOptionElement.nativeElement.checked).length === 1;\n // Do not deselect a determinate select if there is only one selected value remaining\n if (!hasSelectionRejected) {\n inputElement.checked = !inputElement.checked;\n this.detailsElement.nativeElement.querySelector(\"summary\")?.focus();\n this.open = false;\n super.onSelectChange();\n }\n } else {\n inputElement.checked = !inputElement.checked;\n super.onSelectChange();\n }\n }\n\n @ViewChildren(\"labelElement\", { read: ElementRef }) protected labelElements?: QueryList>;\n @ContentChild(InputSublabelDirective) protected inputSublabelDirective?: InputSublabelDirective;\n}\n","\n","import { Component, ViewEncapsulation, ChangeDetectionStrategy } from \"@angular/core\";\n\nimport { OptionsElementAccessor } from \"../options-accessor\";\n\n/**\n * Switches toggle the state of a single item on or off.\n *\n * Use switches to:\n *\n * * Toggle a single item on or off, on mobile and tablet\n * * Immediately activate or deactivate something\n *\n * Switches should be used instead of radio buttons if each item in a set can be independently controlled.\n *\n * Switches can be used as an Angular `FormControl`, in both reactive and template driven forms.\n */\n@Component({\n selector: \"ui-input[type=switch]\",\n templateUrl: \"./switch.component.html\",\n encapsulation: ViewEncapsulation.Emulated,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class InputSwitchComponent extends OptionsElementAccessor {}\n","\n","import { Component, ViewEncapsulation, ChangeDetectionStrategy } from \"@angular/core\";\n\nimport { TextsElementAccessor } from \"../texts-accessor\";\n\n/**\n * Text fields allow users to enter a phone number into a UI. They typically appear in forms and dialogs. Line-breaks are automatically removed from the input value.\n *\n * Tel inputs can be used as an Angular `FormControl`, in both reactive and template driven forms.\n */\n@Component({\n selector: \"ui-input[type=tel]\",\n templateUrl: \"./tel.component.html\",\n encapsulation: ViewEncapsulation.Emulated,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class InputTelComponent extends TextsElementAccessor {}\n","\n","import { Component, ViewEncapsulation, ChangeDetectionStrategy } from \"@angular/core\";\n\nimport { TextsElementAccessor } from \"../texts-accessor\";\n\n/**\n * Text fields allow users to enter text into a UI. They typically appear in forms and dialogs. Line-breaks are automatically removed from the input value.\n *\n * Text inputs can be used as an Angular `FormControl`, in both reactive and template driven forms.\n */\n@Component({\n selector: \"ui-input[type=text]\",\n templateUrl: \"./text.component.html\",\n encapsulation: ViewEncapsulation.Emulated,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class InputTextComponent extends TextsElementAccessor {}\n","\n \n \n \n {{ label }} \n \n \n \n \n
\n \n \n {{ error }}\n \n \n {{ hint }}\n \n
\n \n","import { Component, ViewEncapsulation, ChangeDetectionStrategy, Input, AfterViewInit, OnDestroy, OnInit } from \"@angular/core\";\n\nimport { ArgTypes } from \"@storybook/angular/types-6-0\";\nimport { coerceNumberProperty, coerceBooleanProperty, BooleanInput, NumberInput } from \"@vattenfall/util\";\nimport { Subscription, ReplaySubject } from \"rxjs\";\n\nimport { TextsElementAccessor } from \"../texts-accessor\";\n\nexport const argTypesTextarea: ArgTypes = {\n minRows: {\n control: \"number\",\n description: \"Minimum number of rows the control can contract.\",\n table: {\n category: \"Inputs\",\n type: {\n summary: \"number\",\n },\n },\n },\n maxRows: {\n control: \"number\",\n description: \"Maximum number of rows the control can expand.\",\n table: {\n category: \"Inputs\",\n type: {\n summary: \"number\",\n },\n },\n },\n resize: {\n control: \"boolean\",\n description: \"Whether the user should be allowed to resize the textarea.\",\n table: {\n category: \"Inputs\",\n type: {\n summary: \"boolean\",\n },\n },\n },\n};\n\n/**\n * Textarea fields show all user input at once. Overflow text causes the text field to expand (shifting screen elements downward), and text wraps onto a new line.\n *\n * Optionally, the number of rows in which the input should initially appear can be specified using the `rows` input.\n *\n * Text inputs can be used as an Angular `FormControl`, in both reactive and template driven forms.\n */\n@Component({\n selector: \"ui-input[type=textarea]\",\n templateUrl: \"./textarea.component.html\",\n encapsulation: ViewEncapsulation.Emulated,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class InputTextareaComponent extends TextsElementAccessor implements AfterViewInit, OnDestroy, OnInit {\n /**\n * Minimum number of rows the control can contract.\n *\n * Default is `2`.\n */\n @Input()\n get minRows(): number {\n return this._minRows;\n }\n set minRows(value: NumberInput) {\n this._minRows = coerceNumberProperty(value);\n this.setProperty(\"rows\", this._minRows);\n }\n private _minRows = 2;\n /**\n * Maximum number of rows the control can expand.\n *\n * Default is `Infinity`.\n */\n @Input()\n get maxRows(): number {\n return this._maxRows;\n }\n set maxRows(value: NumberInput) {\n this._maxRows = coerceNumberProperty(value);\n }\n private _maxRows: number = Number.POSITIVE_INFINITY;\n /**\n * Whether the user should be allowed to resize the textarea.\n *\n * Default is `true`.\n */\n @Input()\n get resize(): boolean {\n return this._resize;\n }\n set resize(value: BooleanInput) {\n this._resize = coerceBooleanProperty(value);\n }\n private _resize = false;\n\n private _setAutosizeSubject = new ReplaySubject(Number.POSITIVE_INFINITY);\n private _setAutosizeSubscription = Subscription.EMPTY;\n public _ngControlSubscription = Subscription.EMPTY;\n\n // TODO (stefan): Check if removing this is causing regression\n // constructor(\n // public ngControl: NgControl,\n // protected renderer: Renderer2,\n // public changeDetectorRef: ChangeDetectorRef,\n // @Inject(DOCUMENT) private document: Document\n // ) {\n // super(ngControl, renderer, changeDetectorRef);\n // }\n\n ngOnInit() {\n if (this.ngControl)\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n this._ngControlSubscription = this.ngControl.valueChanges!.pipe().subscribe(() => this._setAutosizeSubject.next());\n }\n\n override ngAfterViewInit() {\n super.ngAfterViewInit();\n this._setAutosizeSubscription = this._setAutosizeSubject.subscribe(() => {\n // Need to set size auto or else the textarea will not contract\n this.inputElement.nativeElement.style.height = \"auto\";\n const lineHeight = Number.parseInt(\n document.defaultView?.getComputedStyle(this.inputElement.nativeElement).lineHeight ?? \"\"\n );\n const maxHeight = lineHeight * this.maxRows + 22;\n const currentHeight = this.inputElement.nativeElement.scrollHeight || 43 + 2;\n this.inputElement.nativeElement.style.height = (currentHeight > maxHeight ? maxHeight : currentHeight) + \"px\";\n });\n }\n\n override ngOnDestroy() {\n super.ngOnDestroy();\n this._setAutosizeSubject.complete();\n this._setAutosizeSubscription.unsubscribe();\n this._ngControlSubscription.unsubscribe();\n }\n\n onInputChange(value: string) {\n this.onChange(value);\n // Avoid resizing twice if used as a FormControl\n if (!this.ngControl) this._setAutosizeSubject.next();\n }\n}\n","import { Directive, Input } from \"@angular/core\";\n\nimport { coerceNumberProperty, coerceBooleanProperty, BooleanInput, NumberInput } from \"@vattenfall/util\";\n\nimport { InputsElementAccessor } from \"./inputs-accessor\";\n\n/**\n * The `TextsElementAccessor` contains methods and properties shared by all free-text-like input components, like password, search, tel, text and url.\n */\n@Directive()\nexport class TextsElementAccessor extends InputsElementAccessor {\n /**\n * Whether the form field should stretch the entire width of its parent. Default is `false`.\n */\n @Input()\n get fluid(): boolean {\n return this._fluid;\n }\n set fluid(value: BooleanInput) {\n this._fluid = coerceBooleanProperty(value);\n }\n private _fluid = false;\n /**\n * The initial value of the control.\n *\n * A string value or an array of string values in case the input is a multi-select option list.\n */\n @Input()\n get value(): string | null {\n return this._value;\n }\n set value(value: string | null) {\n this._value = value;\n this.setProperty(\"value\", this._value);\n if (this.ngControl) this.ngControl.control?.setValue(value);\n }\n private _value: string | null = null;\n /**\n * The pattern attribute, when specified, is a regular expression that the input's value must match in order for the value to pass constraint validation.\n */\n @Input()\n get pattern(): string | null {\n return this._pattern;\n }\n set pattern(value: string | null) {\n this._pattern = value;\n this.setProperty(\"pattern\", this._pattern);\n }\n private _pattern: string | null = null;\n /**\n * An attribute which, if present, indicates that the user should not be able to edit the value of the input.\n */\n @Input()\n get readonly(): boolean {\n return this._readonly;\n }\n set readonly(value: BooleanInput) {\n this._readonly = coerceBooleanProperty(value);\n this.setProperty(\"readOnly\", this._readonly);\n }\n private _readonly = false;\n /**\n * Maximum length (number of characters) of `value`.\n *\n * Default is `null`.\n */\n @Input()\n get maxlength(): number | null {\n return this._maxlength;\n }\n set maxlength(value: NumberInput) {\n this._maxlength = coerceNumberProperty(value);\n this.setProperty(\"maxLength\", this._maxlength);\n }\n private _maxlength: number | null = null;\n /**\n * Minimum length (number of characters) of `value`.\n *\n * Default is `null`.\n */\n @Input()\n get minlength(): number | null {\n return this._minlength;\n }\n set minlength(value: NumberInput) {\n this._minlength = coerceNumberProperty(value);\n this.setProperty(\"minLength\", this._minlength);\n }\n private _minlength: number | null = null;\n}\n"," \n","\n \n\n \n","import {\n AfterContentInit,\n ChangeDetectionStrategy,\n Component,\n ContentChild,\n ContentChildren,\n Directive,\n ElementRef,\n EventEmitter,\n Input,\n OnChanges,\n OnDestroy,\n Output,\n QueryList,\n TemplateRef,\n ViewChild,\n ViewEncapsulation,\n ChangeDetectorRef,\n} from \"@angular/core\";\nimport { coerceBooleanProperty, BooleanInput } from \"@vattenfall/util\";\nimport { Subscription } from \"rxjs\";\n\n@Component({\n selector: \"ui-tabs-label\",\n templateUrl: \"./tab-child.component.html\",\n})\nexport class TabLabelComponent {\n @ViewChild(TemplateRef, { static: true }) templateRef!: TemplateRef;\n}\n\n@Component({\n selector: \"ui-tabs-panel\",\n templateUrl: \"./tab-child.component.html\",\n})\nexport class TabPanelComponent {\n @ViewChild(TemplateRef, { static: true }) templateRef!: TemplateRef;\n}\n\n@Directive({\n selector: \"ui-tabs-header\",\n})\nexport class HeaderDirective {\n constructor(elementRef: ElementRef) {\n elementRef.nativeElement.style.display = \"block\";\n }\n}\n\n@Directive({\n selector: \"ui-tabs-footer\",\n})\nexport class FooterDirective {\n constructor(elementRef: ElementRef) {\n elementRef.nativeElement.style.display = \"block\";\n }\n}\n\n@Directive({\n selector: \"ui-tabs-tab\",\n})\nexport class TabDirective {\n /**\n * Tab anchor name. This is used for connecting a tab label (anchor point) to a tab panel (page fragment). Tabs can be displayed by specifying the name as a page fragment identifier, e.g. `example.com#tab1`.\n */\n @Input() name?: string;\n /**\n * Whether this tab should automatically get focus when the page loads. The first tab will be focused by default. If the href location contains a fragment that match a tab name, then that tab will be focused regardless if `autofocus` has been declared or not.\n */\n @Input()\n get autofocus(): boolean {\n return this._autofocus;\n }\n set autofocus(autofocus: BooleanInput) {\n this._autofocus = coerceBooleanProperty(autofocus);\n }\n _autofocus = false;\n\n @ContentChild(TabLabelComponent)\n public readonly label!: TabLabelComponent;\n\n @ContentChild(TabPanelComponent)\n public readonly panel!: TabPanelComponent;\n\n /**\n * Whether this tab is the active tab or not.\n */\n public active = false;\n}\n\n/**\n * Vattenfall UI `ui-tabs` organize content into separate views where only one view can be visible at a time.\n *\n * Each tab must have an `name`. This is used for connecting a tab label (anchor point) to a tab panel (page fragment). Tabs can be displayed by specifying the name as a page fragment identifier, e.g. `example.com#tab1`.\n *\n * `` are accessible and can be navigated using keypress events alone. Right and left arrow buttons switches the active tab, while the down arrow button sets the focus on the tab panel. The tab button will tab out of the tab labels to the n tab index according to [accessability guidelines for tabbed interfaces](https://inclusive-components.design/tabbed-interfaces).\n */\n@Component({\n selector: \"ui-tabs\",\n templateUrl: \"./tabs.component.html\",\n encapsulation: ViewEncapsulation.Emulated,\n changeDetection: ChangeDetectionStrategy.Default,\n})\nexport class TabsComponent implements AfterContentInit, OnDestroy {\n /**\n * Sets the active tab based on its name\n */\n @Input()\n get active() {\n return this._active;\n }\n set active(value: string) {\n if (value) {\n const newLabel = this.elementRef.nativeElement.querySelector(`[data-id=\"${value}\"]`);\n const oldLabel = this.elementRef.nativeElement.querySelector(\"[aria-selected]\");\n if (newLabel && oldLabel && !newLabel.isSameNode(oldLabel)) {\n this.switchTab(oldLabel, newLabel, false);\n }\n }\n this._active = value;\n }\n private _active = \"\";\n @Output() readonly activeChange = new EventEmitter();\n\n @ContentChildren(TabDirective, { descendants: true })\n public readonly tabs = new QueryList();\n\n private get labels() {\n return this.elementRef.nativeElement.querySelectorAll(\"[role='tab']\");\n }\n private get panels() {\n return this.elementRef.nativeElement.querySelectorAll(\"[role='tabpanel']\");\n }\n\n private tabsSubscription = Subscription.EMPTY;\n\n constructor(private elementRef: ElementRef, private changeDetectorRef: ChangeDetectorRef) {}\n\n ngAfterContentInit() {\n this.tabsSubscription = this.tabs.changes.subscribe(this.setActiveTab);\n this.setActiveTab(this.tabs);\n }\n\n ngOnDestroy() {\n this.tabsSubscription.unsubscribe();\n }\n\n /**\n * Handle clicking of labels for mouse users\n */\n onClick(event: MouseEvent) {\n // prevent the click to redirect the page to root page with hashed parameter.\n event.preventDefault();\n event.stopPropagation();\n const newLabel = event.currentTarget as HTMLAnchorElement;\n const oldLabel = this.elementRef.nativeElement.querySelector(\"[aria-selected]\");\n if (oldLabel && !newLabel.isSameNode(oldLabel)) {\n this.switchTab(oldLabel, newLabel);\n }\n }\n\n /**\n * Handle keydown events for keyboard users\n */\n onKeydown(event: KeyboardEvent) {\n // Make sure that tabbing works\n if (event.key === \"Tab\") return;\n // prevent the click to redirect the page to root page with hashed parameter.\n event.preventDefault();\n event.stopPropagation();\n const oldLabel = event.currentTarget as HTMLAnchorElement;\n // Get the index of the current tab in the tabs node list\n const oldLabelIndex = Array.from(this.labels).findIndex((label) => label.isSameNode(oldLabel));\n // Work out which key the user is pressing\n switch (event.key) {\n // If the down key is pressed, move focus to the open panel\n case \"ArrowDown\": {\n this.panels[oldLabelIndex].focus();\n break;\n }\n // If the left or right key is pressed, switch to the previous tab\n case \"ArrowLeft\": {\n // Get the index of the new label, will be last in order if the old label is the first in order\n const newLabelIndex = oldLabelIndex === 0 ? this.labels.length - 1 : oldLabelIndex - 1;\n this.switchTab(oldLabel, this.labels.item(newLabelIndex));\n break;\n }\n // If the right or right key is pressed, switch to the next tab\n case \"ArrowRight\": {\n // Get the index of the new label, will be first in order if the old label is the last in order\n const newLabelIndex = oldLabelIndex === this.labels.length - 1 ? 0 : oldLabelIndex + 1;\n this.switchTab(oldLabel, this.labels.item(newLabelIndex));\n break;\n }\n }\n }\n\n private setActiveTab = (tabs: QueryList) => {\n // Set the active tab in the prioritized order:\n // 1) The tab that match the name of the active property,\n // 2) The tab that has autofocus declared,\n // 3) The tab that match the href location hash (if any),\n tabs.forEach((tab) => {\n const hasActive = this.active !== \"\";\n const hasAutofocus = tabs.some((tabDirective) => tabDirective.autofocus as boolean);\n const isActive = tab.name === this.active;\n const isAutofocus = !hasActive && (tab.autofocus as boolean);\n const isHash = !hasActive && !hasAutofocus && window.location.hash.endsWith(`${tab.name}`);\n tab.active = isAutofocus || isActive || isHash;\n });\n // 4) The first tab in order of tabs\n if (tabs.length && !tabs.some((tabDirective) => tabDirective.active === false)) tabs.first.active = true;\n };\n\n private switchTab(oldLabel: HTMLAnchorElement, newLabel: HTMLAnchorElement, emitEvent = true) {\n // Get the indices of the new and old tabs to find the correct\n // tab panels to show and hide\n const newLabelIndex = Array.from(this.labels).findIndex((label) => label.isSameNode(newLabel));\n this.panels[newLabelIndex].hidden = false;\n const oldLabelIndex = Array.from(this.labels).findIndex((label) => label.isSameNode(oldLabel));\n this.panels[oldLabelIndex].hidden = true;\n // Set page fragment identifier\n history.replaceState(\n null,\n \"\",\n document.location.pathname + document.location.search + \"#\" + newLabel.getAttribute(\"data-id\") ?? \"\"\n );\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n this._active = newLabel.getAttribute(\"data-id\")!;\n // Sets active property inside tabs\n this.tabs.forEach((tabDirective) => {\n tabDirective.active = tabDirective.name === this.active;\n });\n // Dispatch new active value\n if (emitEvent && newLabel.getAttribute(\"data-id\")) this.activeChange.next(this.active);\n newLabel.focus();\n this.changeDetectorRef.detectChanges();\n }\n}\n\n@Directive({\n selector: \"[role='tab']\",\n})\nexport class HTMLAnchorElementDirective implements OnChanges {\n @Input() name!: string;\n @Input() active!: boolean;\n constructor(private elementRef: ElementRef) {}\n ngOnChanges() {\n this.elementRef.nativeElement.setAttribute(\"data-id\", `${this.name}`);\n this.elementRef.nativeElement.setAttribute(\"role\", \"tab\");\n this.elementRef.nativeElement.setAttribute(\"href\", `#${this.name}`);\n this.elementRef.nativeElement.setAttribute(\"id\", `label-${this.name}`);\n if (this.active) {\n this.elementRef.nativeElement.setAttribute(\"tabindex\", \"0\");\n this.elementRef.nativeElement.setAttribute(\"aria-selected\", \"\");\n this.elementRef.nativeElement.classList.add(\"ds-font-bold\", \"!ds-border-primary-blue\", \"focus:ds-bg-background-blue\");\n } else {\n this.elementRef.nativeElement.setAttribute(\"tabindex\", \"-1\");\n this.elementRef.nativeElement.removeAttribute(\"aria-selected\");\n this.elementRef.nativeElement.classList.remove(\"ds-font-bold\", \"!ds-border-primary-blue\", \"focus:ds-bg-background-blue\");\n }\n }\n}\n\n@Directive({\n selector: \"[role='tabpanel']\",\n})\nexport class HTMLSectionElementDirective implements OnChanges {\n @Input() name!: string;\n @Input() active!: boolean;\n constructor(private elementRef: ElementRef) {}\n ngOnChanges() {\n this.elementRef.nativeElement.hidden = !this.active;\n this.elementRef.nativeElement.setAttribute(\"id\", `${this.name}`);\n this.elementRef.nativeElement.setAttribute(\"tabindex\", \"-1\");\n this.elementRef.nativeElement.setAttribute(\"aria-labelledby\", `${this.name}`);\n }\n}\n","import { DOCUMENT } from \"@angular/common\";\nimport {\n AfterViewInit,\n ChangeDetectionStrategy,\n Directive,\n Component,\n ElementRef,\n HostListener,\n Inject,\n Input,\n OnDestroy,\n Renderer2,\n ViewChild,\n Output,\n HostBinding,\n EventEmitter,\n ViewEncapsulation,\n ContentChild,\n} from \"@angular/core\";\nimport { BooleanInput, coerceBooleanProperty, toPx, uuid, Debounce, isMobile } from \"@vattenfall/util\";\n\n/** The trigger of the tooltip element */\nexport type TooltipTrigger = \"auto\" | \"click\" | \"hover\" | \"focus\" | \"custom\";\n\n/** The color of the tooltip element */\nexport type TooltipColor = \"blue\" | \"yellow\" | \"black\" | \"white\";\n\n/** The position of the tooltip element */\nexport type TooltipPosition = \"top\" | \"right\" | \"bottom\" | \"left\";\n\n/** The coordinates for a tooltip position variant */\nexport type TooltipContext = {\n /** The screen estate available from the anchor position to the viewport anchor position */\n readonly availableScreenEstate: number;\n /** The position of the host element from which the tooltip will be anchored to (for example a tooltip positioned to the right will be anchored to the left of the host element) */\n readonly anchorPosition: TooltipPosition;\n /** Horizontal position of host element relative to anchor position */\n readonly xPosition: [\"left\" | \"right\", number];\n /** Vertical position of host element relative to anchor position */\n readonly yPosition: [\"top\" | \"bottom\", number];\n};\n\n/** Hash of the coordinates for each position variation */\nexport type TooltipContexts = {\n readonly [key in TooltipPosition]: TooltipContext;\n};\n\n/**\n * The tooltip label element\n */\n@Directive({\n selector: \"ui-tooltip-label\",\n})\nexport class TooltipLabelDirective {\n constructor(public elementRef: ElementRef) {}\n}\n\n/**\n * Vattenfall UI `ui-tooltip` display informative text when users clicks, hover over, focus on, or tap an element.\n *\n * Pass in the element which the tooltip will be anchored to. A position (such as top or right) of the tooltip can be specified, but if there is not sufficient screen estate, it will be moved to a better position.\n *\n * The tooltip must have a label. You can provide the label as an input on the `` element or by providing it inside an element.\n */\n@Component({\n selector: \"ui-tooltip, [ui-tooltip]\",\n templateUrl: \"./tooltip.component.html\",\n styleUrls: [\"./tooltip.component.scss\"],\n encapsulation: ViewEncapsulation.Emulated,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TooltipComponent implements AfterViewInit, OnDestroy {\n /**\n * Whether the dialog should be opened or closed.\n *\n * Default is `false`.\n */\n @Input()\n get open(): boolean {\n return this._open;\n }\n set open(value: BooleanInput) {\n this._open = coerceBooleanProperty(value);\n if (this.tooltipElement) this.setTooltipPosition();\n }\n private _open = false;\n\n /**\n * Event emitted every time the tooltip is enabled or disabled by the user.\n */\n @Output() readonly openChange = new EventEmitter();\n\n /**\n * Defines the preferred position of the tooltip label. Will change to a different position is the available screen estate is not enough to display the label.\n *\n * Default is `top`.\n */\n @Input()\n get position(): TooltipPosition {\n return this._position;\n }\n set position(value: TooltipPosition) {\n // Ensure assigned value is not null or undefined\n this._position = value ?? this._position;\n }\n private _position: TooltipPosition = \"top\";\n\n /**\n * Defines the trigger for the tooltip.\n *\n * **auto**\n * Tooltip appears when you hover over the target or when the target element receives the focus. Will trigger on click (or tap) on mobile devices.\n *\n * **click**\n * Tooltip appears when you click a target element.\n *\n * **hover**\n * Tooltip appears when you hover over the target. Will trigger on click (or tap) on mobile devices.\n *\n * **focus**\n * Tooltip appears when you focus (say through tab key) on a target element. Will trigger on click (or tap) on mobile devices.\n *\n * **custom**\n * Tooltip is not triggered by any default action. So, you have to bind your own events and use the `open` input property.\n *\n * Default is `click`.\n */\n @Input()\n get trigger(): TooltipTrigger {\n return this._trigger;\n }\n set trigger(value: TooltipTrigger) {\n // Should trigger on click (or tap) on mobile devices\n this._trigger = isMobile ? \"click\" : value;\n }\n private _trigger: TooltipTrigger = \"click\";\n\n /**\n * Label of target element shown inside tooltip.\n *\n * May also be projected using the ` element, if both are used then the input will have higher priority.\n *\n * Note that the title is static and can only be set once (on initialization).\n */\n @Input()\n get label(): string {\n return this._label;\n }\n set label(value: string | undefined) {\n this._label = value ?? \"\";\n }\n private _label = \"\";\n\n /**\n * Defines the background color for the tooltip label.\n *\n * Default is `blue`.\n */\n @Input() color: TooltipColor = \"blue\";\n\n constructor(\n @Inject(DOCUMENT) private document: Document,\n private renderer: Renderer2,\n private elementRef: ElementRef\n ) {}\n\n /** Toggle tooltip when host element is clicked, taped or activated using keyboard */\n @HostListener(\"click\", [\"$event\"])\n @HostListener(\"keydown.space\", [\"$event\"])\n @HostListener(\"keydown.escape\", [\"$event\"])\n onClick(event: KeyboardEvent) {\n if (this._isClick) {\n if (event.type === \"click\") this.setOpen(!this.open);\n if (event.type === \"keydown\") {\n if (event.code === \"Space\") this.setOpen(!this.open);\n if (event.code === \"Escape\") this.setOpen(false);\n }\n }\n }\n\n /** Toggle tooltip when host element is hovered */\n @HostListener(\"mouseenter\", [\"$event\"])\n @HostListener(\"mouseleave\", [\"$event\"])\n onHover(event: PointerEvent) {\n if (this._isHover) {\n if (event.type === \"mouseenter\") this.setOpen(true);\n if (event.type === \"mouseleave\") this.setOpen(false);\n }\n }\n\n /** Toggle tooltip when host element is activated */\n @HostListener(\"focus\", [\"$event\"])\n @HostListener(\"blur\", [\"$event\"])\n onFocus(event: PointerEvent) {\n if (this._isFocus) {\n if (event.type === \"focus\") this.setOpen(true);\n if (event.type === \"blur\") this.setOpen(false);\n }\n }\n\n /** Close tooltip when `click` event is fired outside of the tooltip */\n @HostListener(\"document:click\", [\"$event\"])\n onDocumentClick(event: PointerEvent) {\n // Only run when tooltip is open to avoid unnecessary calculations (his event is triggered every time the user clicks).\n if (this.open && this._isClick) {\n // Remove last item of event path since it's a 'Window' object (and not a 'Node').\n const composedPath = event.composedPath().slice(0, -1) as Array;\n const isOutsideTooltip = !composedPath.some((node) => this.elementRef.nativeElement.isSameNode(node));\n if (isOutsideTooltip) this.setOpen(false);\n }\n }\n\n /** Re-calculate the position when the screen is adjusted */\n @HostListener(\"window:resize\")\n @Debounce(50)\n onResize() {\n this.setTooltipPosition();\n }\n\n @HostBinding(\"attr.aria-describedby\") uuid = uuid();\n\n @ViewChild(\"tooltipElement\", { read: ElementRef }) private tooltipElement!: ElementRef;\n @ViewChild(\"tooltipLabelElement\", { read: ElementRef }) private tooltipLabelElement!: ElementRef;\n @ViewChild(\"tooltipArrowElement\", { read: ElementRef }) private tooltipArrowElement!: ElementRef;\n\n @ContentChild(TooltipLabelDirective) private tooltipLabelDirective!: TooltipLabelDirective;\n\n private get _isClipped() {\n const sourceElementRect = this.tooltipLabelElement.nativeElement.getBoundingClientRect();\n const isClippedVertical = sourceElementRect.top < 0 && sourceElementRect.bottom > 0;\n const isClippedHorizontal = sourceElementRect.left < 0 && sourceElementRect.right > 0;\n return isClippedVertical || isClippedHorizontal;\n }\n private get _isClick() {\n return this.trigger !== \"custom\" && [\"click\"].includes(this.trigger);\n }\n private get _isHover() {\n return this.trigger !== \"custom\" && [\"auto\", \"hover\"].includes(this.trigger);\n }\n private get _isFocus() {\n return this.trigger !== \"custom\" && [\"auto\", \"focus\"].includes(this.trigger);\n }\n\n ngAfterViewInit() {\n // Set title text to projected content unless a title has already been defined\n if (this.tooltipLabelDirective) this.label = this.tooltipLabelDirective.elementRef.nativeElement.textContent ?? \"\";\n this.setDocument();\n // We need to place this last in call stack to ensure view is fully rendered\n // if not the tooltip might not be correctly positioned\n setTimeout(this.setTooltipPosition);\n }\n\n ngOnDestroy() {\n if (this.document.body.contains(this.tooltipElement.nativeElement))\n this.renderer.removeChild(this.document.body, this.tooltipElement.nativeElement);\n }\n\n /** Set body position and append tooltip as child */\n private setDocument() {\n // Body element needs to be relative to correctly position tooltip element using absolute positioning\n this.renderer.setStyle(this.document.body, \"position\", \"relative\");\n // Attaching tooltip element as child to body to ensure it will not be clipped in case overflow hidden is used\n this.renderer.appendChild(this.document.body, this.tooltipElement.nativeElement);\n }\n\n /** Sets the position of the tooltip label and the arrow */\n private setTooltipPosition = () => {\n // No need to recalculate position if the tooltip is hidden\n if (!this.open) return;\n const contexts = this.getContexts();\n // We are adding the label here to ensure that we get the width when the\n // inner text has been fully rendered\n this.tooltipLabelElement.nativeElement.innerText = this.label;\n this.setElementPosition(this.tooltipLabelElement.nativeElement, contexts[this.position], 15);\n this.setElementPosition(this.tooltipArrowElement.nativeElement, contexts[this.position], 10);\n // If the tooltip doesn't fit into the specified position we will move it to\n // a better suited position where it will appear in view\n if (this._isClipped) {\n const context = this.getContextBasedOnScreenEstate(contexts);\n this.setElementPosition(this.tooltipLabelElement.nativeElement, context, 15);\n this.setElementPosition(this.tooltipArrowElement.nativeElement, context, 10);\n }\n // We need to put the rotation here otherwise the calculation\n // will not be based on the real dimensions and the arrow will be off center\n this.renderer.setStyle(this.tooltipArrowElement.nativeElement, \"transform\", \"rotate(45deg)\");\n };\n\n /** Returns a hash object with positioning instructions based on the current position (of the tooltip element) */\n private getContexts(): TooltipContexts {\n const sourceElementRect = this.elementRef.nativeElement.getBoundingClientRect();\n const bodyElementRect = this.document.body.getBoundingClientRect();\n\n const xCenterPosition = sourceElementRect.left + sourceElementRect.width / 2;\n const yCenterPosition = sourceElementRect.top - bodyElementRect.top + sourceElementRect.height / 2;\n\n return {\n top: {\n availableScreenEstate: sourceElementRect.top,\n anchorPosition: \"bottom\",\n xPosition: [\"left\", xCenterPosition],\n yPosition: [\"bottom\", bodyElementRect.bottom - sourceElementRect.top],\n },\n right: {\n availableScreenEstate: window.innerWidth - sourceElementRect.right,\n anchorPosition: \"left\",\n xPosition: [\"left\", sourceElementRect.right],\n yPosition: [\"top\", yCenterPosition],\n },\n bottom: {\n availableScreenEstate: window.innerHeight - sourceElementRect.bottom,\n anchorPosition: \"top\",\n xPosition: [\"left\", xCenterPosition],\n yPosition: [\"top\", sourceElementRect.bottom - bodyElementRect.top],\n },\n left: {\n availableScreenEstate: sourceElementRect.left,\n anchorPosition: \"right\",\n xPosition: [\"right\", bodyElementRect.width - sourceElementRect.left],\n yPosition: [\"top\", yCenterPosition],\n },\n };\n }\n\n /** Sets open state and dispatch event */\n private setOpen(open: boolean) {\n this.open = open;\n this.openChange.emit(open);\n }\n\n /** Returns the context for the position (top, right, etc.) with the most available screen estate */\n private getContextBasedOnScreenEstate(contexts: TooltipContexts) {\n return Object.values(contexts).reduce((context, currentContext) =>\n currentContext.availableScreenEstate > context?.availableScreenEstate ?? 0 ? currentContext : context\n );\n }\n\n /** Resets the position style properties to auto */\n private resetElementPositionProperties(sourceElement: HTMLElement) {\n [\"top\", \"right\", \"bottom\", \"left\", \"transform\"].forEach((position) => this.renderer.removeStyle(sourceElement, position));\n }\n\n /** Sets source element position according to the provided context */\n private setElementPosition(sourceElement: HTMLElement, context: TooltipContext, margin: number) {\n this.resetElementPositionProperties(sourceElement);\n\n const bodyElementRect = this.document.body.getBoundingClientRect();\n const sourceElementRect = sourceElement.getBoundingClientRect();\n\n const isSourceElementWidthExceedingBody = bodyElementRect.width < sourceElementRect.width + margin * 2;\n\n if (isSourceElementWidthExceedingBody) {\n // Set width of source element to the width of body\n sourceElementRect.width = bodyElementRect.width - margin * 2;\n this.renderer.setStyle(sourceElement, \"width\", toPx(sourceElementRect.width));\n }\n\n const sourceElementHeight = sourceElementRect.height / 2;\n const sourceElementWidth = sourceElementRect.width / 2;\n\n const yPositionCenter = context.yPosition[1] - sourceElementHeight;\n const xPositionCenter = context.xPosition[1] - sourceElementWidth;\n\n // If the tooltip is bleeding outside of the viewport we have to shift in\n // the relevant direction until its completely visible in the view\n const offsetPosition = {\n top: Math.min(yPositionCenter - margin, 0) / -1,\n right: Math.max(margin + sourceElementWidth + context.xPosition[1] - bodyElementRect.width, 0) / -1,\n left: Math.min(xPositionCenter - margin, 0) / -1,\n bottom: Math.max(margin + sourceElementHeight + context.yPosition[1] - bodyElementRect.height, 0) / -1,\n };\n\n const xPosition = offsetPosition.left + xPositionCenter + offsetPosition.right;\n const yPosition = offsetPosition.top + yPositionCenter + offsetPosition.bottom;\n\n switch (context.anchorPosition) {\n case \"top\":\n case \"bottom\": {\n // Center horizontally\n this.renderer.setStyle(sourceElement, context.xPosition[0], toPx(xPosition));\n // Add margin\n this.renderer.setStyle(sourceElement, context.yPosition[0], toPx(context.yPosition[1] + margin));\n break;\n }\n case \"right\":\n case \"left\": {\n // Center vertically\n this.renderer.setStyle(sourceElement, context.yPosition[0], toPx(yPosition));\n // Add margin\n this.renderer.setStyle(sourceElement, context.xPosition[0], toPx(context.xPosition[1] + margin));\n break;\n }\n }\n }\n}\n"," \n\n"],"sourceRoot":"webpack:///","file":"812.js"}