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AAe,CACjB,kBAAmB,GACnB,UAAW,EACf,EACM4zB,GAAsBpyB,GAAY,CACpC,KAAM,iBACN,aAAAxB,GACA,SAAU,CACN,IAAIV,EAAO,CACPA,EAAM,kBAAoB,EAC7B,EACD,SAASA,EAAO,CACZA,EAAM,kBAAoB,GAC1BA,EAAM,UAAY,EACrB,EACD,OAAOA,EAAO,CACV,OAAO,OAAOA,EAAOU,EAAY,CACpC,CACJ,CACL,CAAC,EAEc6zB,GAAAD,GAAoB","names":["pushToDataLayer","payload","trackTool","name","type","labels","action","trackProsesshjelp","trackPageview","hasContent","trackError","level","details","trackNavigation","label","pageSection","track404","trackLanguage","language","isAuthorized","_b","_a","LOGGED_IN_COOKIE_NAME","SESSION_ID_COOKIE_NAME","IDENTITY_PROVIDER_COOKIE_NAME","hasCookie","cookieName","value","cookie","e","getSuffix","suffix","hasCookieWithSuffix","hasLoggedInCookie","getCookieValue","cookieWithSuffix","getHostnameWithoutSubdomain","IdentityProvider","getIdentityProvider","parseParams","params","queryString","key","x","createBaseHeaders","checkStatus","response","contentType","correlationId","getCorrelationIdFromResponse","error","HelsenorgeHttpError","decycle","object","objects","paths","derez","path","nu","LogLevel","unwrapError","potentialError","HelsenorgeProxyError","innerError","generateEntry","message","optionalParams","fullMessage","previous","current","postLogEntry","logEntry","getTjenesterUrl","logToServer","logLevel","getServerLogLevel","exportFunctions","captureErrors","stack","debug","allowConsoleOutput","info","trace","warn","assert","test","clear","count","countTitle","dir","dirxml","group","groupTitle","groupCollapsed","groupEnd","log","profile","reportName","profileEnd","table","data","time","timerName","timeEnd","isProxyErrorResponse","isPascalCaseProxyErrorResponse","mapPascalCaseErrorToCamelCase","saveCorrelationId","statusCode","_c","erTjenester","getTjenesterApiUrl","proxyName","endpoint","apiUrl","getRequestHeaders","headers","createHeaders","getHelsenorgeUrl","createQueryString","handleError","baseCrud","method","baseUrl","requestBody","get","endPoint","getBaseQuery","args","LanguageLocales","decapitalize","s","DateFormat","loadLocale","setDefaultOptions","nb","nn","enGB","se","__cookieOptions__","getCookieDomainAndPath","setSharedCookie","maxAgeInDays","maxAgeInSeconds","HeaderFooterEvents","CmsBlocksEvents","CommonEvents","WebComponents","StepEvents","SamtykkeType","SamtykkeLevel","FullmaktType","SamtykkeStatusType","RepresentasjonforholdType","StatusKodeType","SessionTimeoutAction","PersonverninnstillingKategori","TjenesteTilgangStatus","Personverninnstilling","CmsContentApiVersions","getInnloggetFornavn","getRepresentertBruker","getVisPersonvelger","getErRepresentasjon","getErRepresentasjonViaFullmakt","setAllowNavigation","getErInnloggetViaHnApp","getErInnloggetViaHnAppUngdom","getScopes","hasScope","scope","getHarInnsynssperre","getHarReservasjonAktivPaaHelsenorge","getHarAktivtForeldreSamtykke","getPersonverninnstillinger","hasPersonverninnstilling","guid","useEffect","dispatchCustomEvent","selector","eventType","detail","element","HNeventSetHiddenHeader","isHidden","HNeventSetHiddenFooter","HNeventSetNoMarginFooter","noMargin","HNeventShowAppInvitation","onAppOpen","onWebLogin","onClose","HNeventSetRedirectTo","redirectTo","HNeventSetRedirectToUrlAfterLogin","redirectToUrlAfterLogin","HNaddEventListener","event","handler","passive","LANGUAGE_COOKIE_NAME","LANGUAGE_COOKIE_EXPIRES_IN_DAYS","getUserLanguage","setUserLanguage","options","useSetUserLanguageEvent","callback","getIsoLanguageName","setDocumentLanguage","isoLanguage","selectCurrentLanguage","state","selectLanguages","languageChanged","createAction","allowedLanguagesReplaced","safeLoadLocale","createLanguageReducer","allowedLanguages","userLanguage","initialCurrentLanguage","initialState","createReducer","builder","_defaultLanguageReducer","getDefaultLanguageReducer","defaultLanguageReducer","_","prop","isDebug","getResourceKey","project","getResourcesFromState","getResourceWithId","json","getModifiedResourcesForTest","resourceText","shouldFetchResources","resource","fetchResources","createAsyncThunk","getResources","rejectWithValue","getState","resourcesSlice","createSlice","resources$2","useResources","dispatch","useDispatch","resources","useSelector","SideSomIkkeFinnesSvg","_jsx","_jsxs","__glob","map","fn","globImport_json","__vitePreload","Projects","getResourceItem","projectName","frameworkNbNo","contentNbNo","PageNotFound","forsideUrl","Title","styles","Button","Loader","getFeatureToggle","featureName","getFeatureToggles","_d","_e","handleIOSSafariUA","ua","iOS","isAppleMobileDevice","webkit","isAndroid","getContentApiUrl","getContentApiPreviewUrl","enableContentApiPreview","version","preview","hostName","credentials","languageCode","restParams","post","patch","selectCmsTjenesteTekster","getTjenesteTeksterKey","selectCmsTjenesteTekstForHjelpetekstId","hjelpetekstId","t","_h","_g","_f","h","selectFeedbackResources","getCanShowHjelpetekstInPageHeader","tjenesteNavn","spesifikkHjelpeTekst","tjenesteTekster","shouldFetchTjenesteTekster","cmsTjenesteTekster","fetchTjenesteTekster","cmsTjenesteTeksterSlice","getPath","getAssetsUrl","getSidetittelId","Samtykke","getSamtykke","hasSamtykke","hasFulltSamtykke","Breadcrumb","homeLabel","homeUrl","link","ariaLabel","hoverRef","isHovered","useHover","innerContent","_Fragment","Icon","ChevronLeft","handleLinkClick","Link","currentConfiguration","resolve","originalKey","getCurrentConfiguration","getRedirectToUrlAfterLogin","configuration","getDelAvForeldresamtykke","getBreadcrumbLink","contentResources","pageConfiguration","url","helsenorgeUrlPlaceholder","props","pageBreadcrumbLinks","getCmsBreadcrumbLink","BreadcrumbComponent","ErrorMessage","labelId","description","NotificationPanel","Spacer","React","withErrorBoundary","COMPONENT","GuardedComponent","logError","ErrorPanel","ErrorBoundary","getIcon","EmoticonDelighted","EmoticonHappy","EmoticonMeh","EmoticonDisappointed","EmoticonAnnoyed","ScoreInput","disabled","selected","expanded","onChange","rest","ref","id","classNames","theme","scoreValueList","trackScore","score","trackComment","sanitizeValue","string","createFeedback","body","updateFeedback","sanitized","CHARACTER_LIMIT","TEXTAREA_ID","DESCRIPTION_ID","FeedbackForm","pageTitle","register","handleSubmit","watch","setError","errors","isSubmitting","isSubmitSuccessful","useForm","setId","useState","showComment","handleUpdate","debouncedUpdate","teardown","debounce","createFeedbackResponse","api.createFeedback","api.updateFeedback","getButtonAriaLabel","onSubmit","Validation","FormGroup","TextArea","Label","Sublabel","Feedback","useAppDispatch","useAppSelector","FeedbackContainer","feedbackResources","useLanguageEvent","currentLanguage","supportedLanguages","newLanguage","LanguageNames","BokmaalLanguageName","getLanguageName","languages","LanguagePicker","onLanguageChange","className","testId","selectedLanguage","handleLanguageChange","languageChangedMessage","IconSize","Globe","LanguagePickerOriginName","LanguagePickerWrapper","envSafeUrl","DOMPurify","TRUSTED_TYPES_FEATURE_NAME","hasDefaultTrustedTypesPolicy","isTrustedTypesEnabled","DefaultSanitizeConfig","sanitize","html","parseHtml","SafeHTML","tagName","parsedHtml","CustomTag","designsystemtypography","Markdown","AnchorLink","List","aria","domEl","siblings","i","sibling","child","keyCode","getEventTarget","getDocumentActiveElement","logCallback","domNode","root","TrapFocus","isTriggerWithinTrappedArea","activeElement","target","tabbable","itemWithFocus","currentFocusIndex","previousElement","previousFocusIndex","nextElement","nextFocusIndex","item","radioGrouItems","selectedItems","EkspanderendeTekstBlock","title","mainContent","Expander","PortableText","EkspanderendeBlock","EkspanderendeBlockComponent","PromoBlockType","PromoBlockColors","ImageType","WindowActionEnum","Size","VideoType","CardsPerRow","VideoTheme","Image","imageUrl","caption","copyright","size","alternativeText","figureClass","imageClass","captionClass","typography","cmsstyles","ImageBlock","ImageBlockComponent","children","CmsLinkList","color","links","LinkList","href","text","iconName","index","LazyIcon","LinkListBlock","titleHtmlMarkup","additionalLinkList","useGridLayout","contentClassName","cn","useContext","backgroundColor","PortableTextContext","LinkListBlockComponent","getAppUrl","getSigninAppUrl","urlSearch","getSigninTjenesteUrl","tjenesteParam","sourceUrl","signinUrl","LoginButton","htmlMarkup","icon","rightSideIcon","appUrl","setAppUrl","buttonRef","triggerOriginalBehaviour","useAppUrl","mobileOnClick","getIconColor","bindClassNames","Panel","emphasize","linkTitle","intro","colorName","linkTarget","large","iconComponent","iconOrEmphasisComponent","spacingClassNames","titleComponent","ArrowRight","renderSection","linkClassNames","LoginBlock","authenticatedTitle","authenticatedIntro","hideIfAuthenticated","buttonText","showOnlyButton","isAuthenticated","setIsAuthenticated","getColorName","contextColor","blockColor","LoginBlockComponent","TextBlockComponent","titleAppearance","mainIntro","mainBody","fontStyles","TextBlock","RichTextTitle","htmlMarkupAppearanceMap","VimeoSubtitleLanguageCodes","useRef","YouTubeTermsOfService","handleAccept","checkboxRef","Checkbox","YOUTUBE_TOS_COOKIE_NAME","YOUTUBE_EVENT_NAME","YOUTUBE_COOKIE_AGE_DAYS","VideoSpiller","videoId","videoType","altText","showTextContent","subtitleLanguageCode","tosAccepted","setTosAccepted","remember","handleAcceptEvent","getVideoUrl","getAllowAttribute","videoUrl","allowAttribute","showTermsOfService","renderTextContent","VideoBlock","VideoSpillerComponent","AnalyticsId","VideoKort","onClick","wrapperClassName","hasFullWidth","cardsPerRow","playVideoLabel","uuid","useUuid","buttonId","titleId","descriptionId","wrapperClasses","videoCardClasses","imageClasses","buttonAriaLabelledBy","buttonAriaDescribedBy","playLabelClasses","titleClasses","designTheme","Play","VideoMatrise","videoCards","currentIndex","setIndex","matriseRef","card","VideoMatriseBlock","VideoMatriseComponent","isVideoThemeColor","globalComponents","createContext","components","PortableTextReact","Seksjon","seksjon","errorMessage","seksjonComponent","loader","sectionClasses","ChevronUp","ChevronDown","Collapse","HjelpeskuffComponent","isVisible","defaultSeksjon","seksjoner","breakpoint","useBreakpoint","disableTransition","setDisableTransition","helpTitleRef","helpDrawerRef","helpContentsRef","prevAriaHiddens","setPrevAriaHiddens","trapFocus","setTrapFocus","prevFocus","setPrevFocus","useFocusToggle","trackToggleOpen","activeSeksjonId","isOpen","activeSeksjon","enableTrapFocus","toggleFocus","node","releaseFocus","handleToggleClick","elementIsInHelpDrawer","eventTarget","elementIsInHjelpetrigger","isMobile","Breakpoint","isOpenInHistoryState","removePreventscroll","isLightboxOpen","setScroll","open","close","disableTransitionToPreventDoubleAnimation","popStateListener","helpDrawerOpen","clickListener","eventPath","removeSeksjon","triggerId","helpDrawerClasses","defaultSeksjonComponent","seksjonerComponent","style","ariaLabelTitleText","HelpSign","ChevronRight","X","TOGGLE_SHOW","TOGGLE_SHOW_HELPITEM","SET_ACTIVE_HELPBUBBLE","HIDE","SHOW","REMOVE_SEKSJON","TOGGLE_EXPANDED","ADD_HJELPETRIGGER","REMOVE_HJELPETRIGGER","POPULATE_SKUFF","collapseAll","isDefaultTrigger","processToggleShowHelp","activeTriggerComponentId","sameTriggerId","sameTriggerComponentId","getBlankSeksjonIdIfActiv","removeSection","reducer","toggleShowHjelpeskuff","toggleShowHelpItem","triggerComponentId","removeSeksjonTekst","toggleExpanded","hideHjelpeskuff","showHjelpeskuff","addHjelpetrigger","removeHjelpetrigger","setActiveBubble","populateSkuff","getTriggerData","triggerData","sporsmaalTekst","hjelpeboble","hjelpetekst","overskrift","getActiveBubble","getDefaultTekst","spesifikkHjelpetekst","tjenesteTeksterDetails","getSeksjonTekst","hjelpeteksterForTjeneste","ht","TriggerHelpItemEvent","AddHjelpetrigger","RemoveHjelpetrigger","HjelpeskuffContainer","triggerComponentIds","mount","other","mapStateToProps","mapDispatchToProps","connect","HjelpetriggerComponent","sporsmalstekst","classes","helpBubbleIsExpanded","stopPropagation","useCustomEvent","handleHelpClick","helpElement","triggerHelpItemEvent","trigger","HelpQuestion","Trigger","HjelpebobleComponent","onShowMoreClick","visible","bubbleText","moreHelpText","hjelpetriggerRef","showMoreButton","renderBubbleContent","showMoreClickHandler","renderBubble","HelpBubble","HjelpetriggerContainer","addHjelpetriggerEvent","getResourcesEvent","GetResourcesEvent","removeHjelpetriggerEvent","isDefault","Hjelpetrigger","overrideHelpetekstId","overrideTjenesteNavn","activeBubble","extraProps","helpTriggerItem","SharingStatus","selectedStatusType","sharingStatus","FrankensteinSharingStatus","Eye","NoEye","PageHeader","subtitle","delAvForeldresamtykke","headerClassName","headerSubtitleClassName","headerTitleClassName","headerIngressClassName","showHjelpetrigger","hasHjelpetrigger","renderHjelpetrigger","frameworkstyles","pageHeaderClasses","Personvelger","webcompIsReady","setWebcompIsReady","location","useLocation","Master","mainAriaLabelledby","visPersonvelger","breadcrumbLink","hasFullwidth","noBreadcrumb","noDriftspanel","noLanguagePicker","showFeedbackForm","hasPageHeader","showHjelpeskuffInPageHeader","canShowHjelpetekstInPageHeader","showHjelpeskuffInPageHeaderState","getTitleId","useTrackPageView","enabled","previousPathname","TrackPageView","PageRoot","noHjelpeskuff","pageDescription","enablePageviewTracking","visPersonvelgerState","setVisPersonvelgerState","handleVisPersonvelgerUpdate","Hjelpeskuff","PageRoot$1","isCustomElementRegistered","isTemplateRenderedServerSide","templateElement","createMicrowebTemplate","templateName","isWebpackAssetsJson","getHelsenorgeCssUrl","elementList","linkElement","blockUntilEvent","fetchWebComp","domain","entryName","componentName","includeHelsenorgeCss","microwebTemplate","assetsUrl","assets","appendStylesheet","cssElement","appendScript","src","scriptElement","helsenorgeCssUrl","asset","getPromoBlockGroups","blocks","groups","currentGroupIndex","currentGroupType","block","PromoSection","mode","imageType","captionId","hoverMode","linkClasses","titleLinkClasses","contentClasses","promoBlockColorMap","Promoboard","isLarge","promoSection","PromopanelGroup","block1","block2","color1","color2","mode1","mode2","promoBlock","blockIndex","isPreviousNotFullWidth","reverse","Promopanel","promoblocks","promoBlockGroups","createRef","removeSsn","sanitizeSearchValue","newString","getMaxSuggestions","getSearchApiUrl","updateSuggestionListRef","refCount","maxCount","refArray","totalCount","goToSearchResults","searchArguments","query","crQueryParam","referrerQueryParam","updatedUrl","helsenorgeUrl","fetchSuggestions","errMsg","triggerSearch","actionOnSearch","handleSuggestions","suggestions","previousQueriesWithAutosuggestions","updateQueriesWithAutosuggestions","updatedQueriesWithAutosuggestions","autosuggestion","newQueryWithAutosuggestions","handleKeySwitch","prevQuery","highlightedSuggestionIndex","listSuggestionsRef","searchasyoutypeTimeoutId","updateSearchasyoutypeTimeoutId","handleArrowNavigation","shouldRenderSuggestions","onSearchSubmit","updateHighlightedSuggestionIndex","suggestionListRef","prevIndex","nextIndex","SearchAutoSuggest","cachedAutosuggestions","suggestionsRef","highlightedSuggestion","handleKeyDown","handleSuggestionClick","currentSuggestions","suggestion","maxSuggestions","getResourcesTestHelper","SearchBox","contentReference","referrer","skip","handleChange","getDirectSearchResults","searchInputId","searchUrl","submitLabel","isAutoSuggestDisabled","isSubmitButtonInverted","isSearchAsYouTypeEnabled","testIdIcon","autoFocusSearchInput","setPrevQuery","activeQuery","setActiveQuery","activeAutosuggestionQuery","setActiveAutosuggestionQuery","setCachedAutosuggestions","shouldShowSuggestions","setShouldShowSuggestions","setHighlightedSuggestionIndex","setSearchasyoutypeTimeoutId","autosuggestTimeoutId","setAutosuggestTimeoutId","searchButtonRef","searchInputRef","triggerAutosuggest","matchingAutosuggestion","r","rejectedError","handleSuggestionArrowNavigation","currentElement","handleInputChange","newAutoSuggestTimeout","currentTimeout","newTimeout","directQuery","searchAutoSuggest","Input","FormOnColor","SearchIcon","SearchBlock","linkText","hasWrapper","imageAltText","searchBoxProps","searchBlockClasses","SearchBlockWrapper","Tjenestepanel","fliser","eksterneFliser","eksterneFliserHeader","visFlereButtonText","visFarreButtonText","visAlleFliser","onClickFlis","sharingStatusText","visFlere","setVisFlere","tjenesteRef","moreTilesRef","INITIAL_FLIS_COUNT","renderFlis","flis","Tile","f","Articles","article","SharingStatusWrapper","Favorites","favoriteCount","useCompact","TjenestepanelContainerProps","ToggleButton","useLayoutEffect","scrollIntoViewIfNeeded","rect","isAboveViewport","isBelowViewport","Tjenester","setExpanded","divRef","groupsRef","firstLinkElement","toggleButton","prev","TjenesterGroup","TjenesterList","TjenesterTiles","favorites","hasFavorites","hasGroups","TjenestepanelContainer","pendingChangesSlice","pendingChanges"],"ignoreList":[],"sources":["../../../../npm/packages/framework-utils/lib/adobe-analytics.js","../../../../npm/packages/framework-utils/lib/hn-authorize.js","../../../../npm/packages/framework-utils/lib/cookie.js","../../../../npm/packages/framework-utils/lib/hn-service.js","../../../../npm/packages/framework-utils/lib/cycle.js","../../../../npm/packages/framework-utils/lib/logger.js","../../../../npm/packages/framework-utils/lib/hn-proxy-service.js","../../../../npm/packages/utils/lib/constants/languages.js","../../../../npm/packages/utils/lib/string-utils.js","../../../../npm/packages/utils/lib/date-fns-utils.js","../../../../npm/packages/framework-utils/lib/shared-cookies.js","../../../../npm/packages/framework-utils/lib/web-component/constants.js","../../../../npm/packages/framework-utils/lib/types/entities.js","../../../../npm/packages/framework-utils/lib/hn-user.js","../../../../npm/packages/framework-utils/lib/web-component/events.js","../../../../npm/packages/framework-utils/lib/hn-language.js","../../../../npm/packages/framework-utils/lib/language/index.js","../../../../npm/packages/framework-utils/lib/hn-debug.js","../../../../npm/packages/framework-utils/lib/resources/index.js","../../../../npm/packages/framework-utils/lib/resources/useResources.js","../../../../npm/packages/framework/lib/page-not-found/side-som-ikke-finnes-svg.js","../../../../npm/packages/framework/lib/resources/index.js","../../../../npm/packages/framework/lib/page-not-found/index.js","../../../../npm/packages/framework-utils/lib/hn-feature-toggle.js","../../../../npm/packages/utils/lib/user-agents-utils.js","../../../../npm/packages/framework-utils/lib/cms-content-api-service.js","../../../../npm/packages/framework-utils/lib/cms-tjeneste-tekster/index.js","../../../../npm/packages/framework-utils/lib/hn-page.js","../../../../npm/packages/framework-utils/lib/samtykke-utils.js","../../../../npm/packages/cms/lib/breadcrumb/index.js","../../../../npm/packages/framework/lib/common/configuration.js","../../../../npm/packages/framework/lib/breadcrumb/index.js","../../../../npm/packages/framework/lib/error-message/index.js","../../../../npm/packages/framework/lib/error-boundary/with-error-boundary.js","../../../../npm/packages/framework/lib/error-boundary/index.js","../../../../npm/packages/framework/lib/feedback/score-input/utils.js","../../../../npm/packages/framework/lib/feedback/score-input/index.js","../../../../npm/packages/framework/lib/feedback/utils/entities.js","../../../../npm/packages/framework/lib/feedback/utils/analytics.js","../../../../npm/packages/cms/lib/userfeedback/utils/string.js","../../../../npm/packages/framework/lib/feedback/utils/api.js","../../../../npm/packages/framework/lib/feedback/index.js","../../../../npm/packages/framework/lib/store/hooks.js","../../../../npm/packages/framework/lib/feedback/container/index.js","../../../../npm/packages/framework-utils/lib/language/useLanguageEvent.js","../../../../npm/packages/framework/lib/language-picker-wrapper/resources.js","../../../../npm/packages/framework/lib/language-picker/index.js","../../../../npm/packages/framework/lib/language-picker-wrapper/index.js","../../../../npm/packages/framework-utils/lib/components/safe-html/safe-html.js","../../../../npm/packages/framework-utils/lib/trusted-types.js","../../../../npm/packages/framework-utils/lib/components/safe-html/index.js","../../../../npm/packages/utils/lib/aria-hidden.js","../../../../npm/packages/utils/lib/constants/key-code.js","../../../../npm/packages/utils/lib/events.js","../../../../npm/packages/utils/lib/focus-utils.js","../../../../npm/packages/utils/lib/trapfocus.js","../../../../npm/packages/cms/lib/behandlingsvalg/ekspanderendeblock/index.js","../../../../npm/packages/cms/lib/richtext/components/ekspanderendeblock/index.js","../../../../npm/packages/cms/lib/types/entities.js","../../../../npm/packages/cms/lib/image/index.js","../../../../npm/packages/cms/lib/richtext/components/imageblock/index.js","../../../../npm/packages/cms/lib/richtext/components/link/index.js","../../../../npm/packages/cms/lib/linklistblock/linklist/index.js","../../../../npm/packages/cms/lib/linklistblock/index.js","../../../../npm/packages/cms/lib/richtext/components/linklistblock/index.js","../../../../npm/packages/framework-utils/lib/url.js","../../../../npm/packages/cms/lib/loginblock/LoginButton.js","../../../../npm/packages/cms/lib/shared/getIconColor.js","../../../../npm/packages/cms/lib/panel/index.js","../../../../npm/packages/cms/lib/loginblock/index.js","../../../../npm/packages/cms/lib/richtext/components/loginblock/index.js","../../../../npm/packages/cms/lib/richtext/components/textblock/index.js","../../../../npm/packages/cms/lib/richtext/components/title/index.js","../../../../npm/packages/cms/lib/videospiller/constants.js","../../../../npm/packages/cms/lib/videospiller/youtube-terms-of-service.js","../../../../npm/packages/cms/lib/videospiller/index.js","../../../../npm/packages/cms/lib/richtext/components/videoblock/index.js","../../../../npm/packages/cms/lib/shared/analytics.js","../../../../npm/packages/cms/lib/videokort/index.js","../../../../npm/packages/cms/lib/videomatrise/index.js","../../../../npm/packages/cms/lib/richtext/components/videomatriseblock/index.js","../../../../npm/packages/cms/lib/richtext/portable-text-utils.js","../../../../npm/packages/cms/lib/richtext/index.js","../../../../npm/packages/framework/lib/prosesshjelp/hjelpeskuff/seksjon.js","../../../../npm/packages/framework/lib/prosesshjelp/hjelpeskuff/hjelpeskuff-component.js","../../../../npm/packages/framework/lib/prosesshjelp/hjelpeskuff/hjelpeskuff-state.js","../../../../npm/packages/framework/lib/prosesshjelp/hjelpeskuff/index.js","../../../../npm/packages/framework/lib/prosesshjelp/hjelpetrigger/hjelpetrigger-component.js","../../../../npm/packages/framework/lib/prosesshjelp/hjelpetrigger/hjelpeboble-component.js","../../../../npm/packages/framework/lib/prosesshjelp/hjelpetrigger/hjelpetrigger-container.js","../../../../npm/packages/framework/lib/prosesshjelp/hjelpetrigger/index.js","../../../../npm/packages/framework/lib/sharing-status/index.js","../../../../npm/packages/framework/lib/page-header/index.js","../../../../npm/packages/framework/lib/personvelger/index.js","../../../../npm/packages/framework/lib/pageroot/master.js","../../../../npm/packages/framework/lib/track-pageview/useTrackPageView.js","../../../../npm/packages/framework/lib/track-pageview/index.js","../../../../npm/packages/framework/lib/pageroot/index.js","../../../../npm/packages/framework-utils/lib/web-component/register.js","../../../../npm/packages/framework-utils/lib/web-component/fetcher.js","../../../../npm/packages/cms/lib/promopanel/helper.js","../../../../npm/packages/cms/lib/promosection/index.js","../../../../npm/packages/cms/lib/diveboard/index.js","../../../../npm/packages/cms/lib/promoboard/index.js","../../../../npm/packages/cms/lib/promopanel/promopanel-group.js","../../../../npm/packages/cms/lib/promopanel/index.js","../../../../npm/packages/cms/lib/search/search-utils.js","../../../../npm/packages/cms/lib/search/search-autosuggest.js","../../../../npm/packages/cms/lib/resources/index.js","../../../../npm/packages/cms/lib/search/index.js","../../../../npm/packages/cms/lib/search/block/index.js","../../../../npm/packages/cms/lib/tjenestepanel/index.js","../../../../npm/packages/cms/lib/articles/index.js","../../../../npm/packages/cms/lib/tjenestepanel-v2/sharing-status/index.js","../../../../npm/packages/cms/lib/tjenestepanel-v2/favorites/index.js","../../../../npm/packages/cms/lib/tjenestepanel-v2/tjenestepanel-container/index.js","../../../../npm/packages/cms/lib/tjenestepanel-v2/toggle-button/index.js","../../../../npm/packages/cms/lib/tjenestepanel-v2/tjenester/index.js","../../../../npm/packages/cms/lib/tjenestepanel-v2/tjenester-group/index.js","../../../../npm/packages/cms/lib/tjenestepanel-v2/tjenester-list/index.js","../../../../npm/packages/cms/lib/tjenestepanel-v2/tjenester-tiles/index.js","../../../../npm/packages/cms/lib/tjenestepanel-v2/index.js","../../../../npm/packages/framework/lib/pending-changes/pending-changes-state.js"],"sourcesContent":["/**\n * Send data til Adobe Analytics via adobeDataLayer\n *\n * @param payload Data som skal spores\n */\nexport const pushToDataLayer = (payload) => {\n window.adobeDataLayer = window.adobeDataLayer || [];\n window.adobeDataLayer.push(payload);\n};\n/**\n * Spor handling i tjeneste\n * @param trackAction type handling som skal spores\n * @param serviceName navnet på tjenesten, f.eks. \"pasientreiser\"\n * @param action spesifiserer hvilken handling man utfører, f.eks. \"send søknad\"\n * @param flow type prosess\n */\nexport const trackSelfService = (trackAction, serviceName, action, flow) => {\n const payload = {\n event: `self service ${trackAction}`,\n selfService: {\n name: `${serviceName}: ${action}`,\n flow,\n },\n };\n pushToDataLayer(payload);\n};\n/**\n * Spor bruk av samtykkeflyt\n * @param action definerer consentStart, consentFunnel eller consentComplete videre\n * @param stepName definerer consentFunnelStep på ConsentSelfService\n * @param stepNumber definerer selfServiceFunnelStepNumber på ConsentSelfService\n * @param type definerer consentType på ConsentSelfService\n */\nexport const trackConsent = (action, stepName, stepNumber, type) => {\n const payload = {\n event: `consent ${action}`,\n consent: {\n stepName,\n stepNumber,\n type,\n },\n };\n pushToDataLayer(payload);\n};\n/**\n * Spor bruk av filterkomponent\n * @param name definerer navnet fil Filter\n * @param action definerer type tracking: 'usage' | 'expand' | 'search' | 'group expand'\n */\nexport const trackFilters = (name, action) => {\n const payload = {\n event: `filter ${action}`,\n filter: {\n name,\n },\n };\n pushToDataLayer(payload);\n};\n/**\n * Spor partner - setter informasjon om tjenesteeier\n * @param partner definerer partner\n */\nexport const updatePagePartner = (partner) => {\n const payload = {\n page: {\n partner,\n },\n };\n pushToDataLayer(payload);\n};\n/**\n * Setter informasjon om innlogget status i window.adobeDataLayer\n * @param loggedIn Om bruker er logget inn eller ikke\n */\nexport const updateLoginStatus = (loggedIn) => {\n const payload = {\n user: {\n loggedIn,\n },\n };\n pushToDataLayer(payload);\n};\n/**\n * Spor uleste varslinger\n * @param unreadAlerts Antall uleste varslinger\n */\nexport const trackUnreadAlert = (unreadAlerts) => {\n const payload = {\n event: 'unread alerts',\n notifications: {\n unreadAlerts,\n },\n };\n pushToDataLayer(payload);\n};\n/**\n * Spor uleste meldinger\n * @param unreadMessages Antall uleste meldinger\n */\nexport const trackUnreadMessage = (unreadMessages) => {\n const payload = {\n event: 'unread messages',\n notifications: {\n unreadMessages,\n },\n };\n pushToDataLayer(payload);\n};\n/**\n * Spor leste meldinger med type.\n * @param type Meldingstype\n */\nexport const trackReadMessageType = (type) => {\n const payload = {\n event: 'message read',\n message: {\n type,\n },\n };\n pushToDataLayer(payload);\n};\n/**\n * Spor internsøk\n * @param phrase nøkkelord som settes på search searchTerm\n * @param type type som settes på search searchType\n * @param resultsCount antall søkeresultater som settes på search resultsCount\n */\nexport const trackSearch = (phrase, type, resultsCount) => {\n const payload = {\n event: 'internal search',\n search: {\n phrase,\n type,\n resultsCount,\n },\n };\n pushToDataLayer(payload);\n};\n/**\n * Spor klikk på internsøkeresultater\n * @param searchPosition position til søkeresultatet som lagres på search searchposition\n */\nexport const trackSearchThrough = (searchPosition) => {\n const payload = {\n event: 'search click through',\n search: {\n searchPosition,\n },\n };\n pushToDataLayer(payload);\n};\n/**\n * Spor endring av profilinnstillinger\n * @param interactionName navn som lagres på user profileInteractionName\n */\nexport const trackProfileInteraction = (interactionName) => {\n const payload = {\n event: 'profile interaction',\n profile: {\n interactionName,\n },\n };\n pushToDataLayer(payload);\n};\n/**\n * spor handlinger med kun ett steg, e.g.\n * trackTool('kontaktskjema', 'hjelp', 'bytte fastlege', 'send')\n * @param name navn som lagres på tool toolName\n * @param type type som lagres på tool toolType\n * @param labels label som lagres på tool toolLabels\n * @param action handlingen som utføres\n */\nexport const trackTool = (name, type, labels, action) => {\n const payload = {\n event: 'use tool',\n tool: {\n name,\n type,\n labels,\n action,\n },\n };\n pushToDataLayer(payload);\n};\n/**\n * Spor åpning/lukking av hjelpeskuff\n * @param name navn som lagres på tool.name\n * @param type type som lagres på tool.type\n * @param labels labels som lagres på tool.labels\n * @param action 'Close' | 'Open'\n */\nexport const trackProsesshjelp = (name, type, labels, action) => {\n trackTool(name, type, labels, action);\n};\n/**\n * Oppdater data om brukeren, f.eks.\n * updateUserAttributes({ userStatus: \"something\" })\n * @param userAttributes objekt med verdier som enten legges til eller oppdaterer eksisterende data om brukeren\n */\nexport const updateUserAttributes = (userAttributes) => {\n const payload = {\n user: userAttributes,\n };\n pushToDataLayer(payload);\n};\n/**\n * spor sidevisninger, e.g.\n * trackPageview()\n * @param hasContent (valgfri) om siden har innhold\n */\nexport const trackPageview = (hasContent) => {\n const payload = {\n event: 'pageview',\n page: {\n hasContent: !!hasContent,\n },\n };\n pushToDataLayer(payload);\n};\n/**\n * Spor om en tjeneste har innhold eller ikke\n * @param hasContent Boolean som sier om det er innhold i tjenesten eller ikke\n */\nexport const trackHasContent = (hasContent) => {\n trackPageview(hasContent);\n};\n/**\n * Spor feil, f.eks.\n * trackError(\"level1\", \"Beskrivelse av feilen\")\n * @param level Alvorlighetsgrad (level1, level2, level3 eller level4)\n * @param details Tekst som beskriver feilen\n */\nexport const trackError = (level, details) => {\n const payload = {\n event: 'site error',\n error: {\n level,\n details,\n },\n };\n pushToDataLayer(payload);\n};\n/**\n * Spor klikk i toppmenyen\n * @param name string\n * @param label navigationLabel\n * @param pageSection navigationPageSection\n */\nexport const trackNavigation = (name, label, pageSection) => {\n const payload = {\n event: 'navigation',\n navigation: {\n name,\n label,\n pageSection,\n },\n };\n pushToDataLayer(payload);\n};\n/**\n * Spor tilbakemelding i invitasjon til spørreundersøkelse\n * @param name string\n * @param label string\n */\nexport const trackFeedback = (name, label) => {\n const payload = {\n event: 'feedback',\n feedback: {\n name,\n label,\n },\n };\n pushToDataLayer(payload);\n};\n/**\n * Spor 404-feil\n */\nexport const track404 = () => {\n const payload = {\n event: '404 not found',\n };\n pushToDataLayer(payload);\n};\n/**\n * Spor at bruker bytter språk.\n * trackLanguage('English')\n * @param language Språket bruker valgte.\n */\nexport const trackLanguage = (language) => {\n const payload = {\n event: 'change language',\n page: {\n language,\n },\n };\n pushToDataLayer(payload);\n};\n/**\n * Spor endring i hvem brukeren representerer\n * @param onBehalfOf Hvilken type representasjon er det\n * @param role Hvilken rolle har bruker i representasjonen\n */\nexport const trackRepresentation = (onBehalfOf, role) => {\n const payload = {\n user: {\n representation: {\n onBehalfOf,\n role,\n },\n },\n };\n pushToDataLayer(payload);\n};\n/**\n * Spor visning av informasjon\n * @param type Hvilken type informasjon som vises\n * @param name Navn på informasjonen\n */\nexport const trackInfoShown = (type, name) => {\n const payload = {\n event: 'info shown',\n info: {\n type,\n name,\n },\n };\n pushToDataLayer(payload);\n};\n/**\n * Spor klikk på informasjon\n * @param type Hvilken type informasjon som vises\n * @param name Navn på informasjonen\n * @param option Navn på informasjonen\n */\nexport const trackInfoClick = (type, name, option) => {\n const payload = {\n event: 'info click',\n info: {\n type,\n name,\n option,\n },\n };\n pushToDataLayer(payload);\n};\n","/**\n * Returnerer Authorized fra HN.rest objektet\n */\nexport const isAuthorized = () => {\n if (typeof document === 'undefined') {\n return false;\n }\n return !!window.HN?.Rest?.Authorized;\n};\n/**\n * Returnerer HashIsAuthorized fra HN.rest objektet\n */\nexport const hashIsAuthorized = () => {\n return window.HN?.Rest?.HashIsAuthorized ?? false;\n};\n","/** Cookie-navn for om man er logget inn */\nexport const LOGGED_IN_COOKIE_NAME = 'MH_LoggedIn';\n/** Cookie-navn for sesjons-ID */\nexport const SESSION_ID_COOKIE_NAME = 'MH_SessionId';\n/** Cookie-navn for måten man har logget inn på */\nexport const IDENTITY_PROVIDER_COOKIE_NAME = 'MH_Idp';\n/** Cookie-navn for versjon av appen */\nexport const APP_VERSION_COOKIE_NAME = 'MH_App_Version';\n/**\n * Sjekker om cookie finnes og om den har verdi\n * @param cookieName navn på cookie\n * @param value cookie verdi\n */\nexport const hasCookie = (cookieName, value) => {\n if (typeof document === 'undefined') {\n return false;\n }\n const cookie = document.cookie;\n if (cookie === undefined) {\n return false;\n }\n if (value === undefined) {\n return cookie.split('; ').find(e => e.split('=')[0] === cookieName) !== undefined;\n }\n const cookieValue = '; '.concat(document.cookie);\n const parts = cookieValue.split('; '.concat(cookieName).concat('='));\n if (parts.length === 2) {\n const lastPart = parts.pop();\n return lastPart ? lastPart.split(';').shift() === value.toString() : false;\n }\n return false;\n};\n/**\n * Henter cookienavn inkludert eventuelt suffix for å støtte ulike domener.\n * @param cookieName navn på cookie\n */\nexport const getSuffix = (cookieName) => {\n let suffix = '';\n if (window.HN?.Rest?.Environment) {\n suffix = '_' + window.HN.Rest.Environment;\n }\n return cookieName + suffix;\n};\n/**\n * Sjekker om cookie finnes og om den har verdi\n * @param cookieName navn på cookie\n */\nexport const hasCookieWithSuffix = (cookieName) => {\n return hasCookie(getSuffix(cookieName));\n};\n/**\n * Sjekker om bruker er logget inn basert på cookie\n */\nexport const hasLoggedInCookie = () => {\n return hasCookieWithSuffix(LOGGED_IN_COOKIE_NAME) || hasCookieWithSuffix(SESSION_ID_COOKIE_NAME);\n};\n/**\n * Setter en cookie med van + verdi\n * @param cookieName navn på cookie\n * @param value cookie verdi\n */\nexport const setCookie = (name, value = '') => {\n document.cookie = `${name}=${value};path=/;`;\n};\n/**\n * Sletter en cookie basert på navnet\n * @param cookieName navn på cookie\n */\nexport const deleteCookie = (name) => {\n document.cookie = `${name}=; expires=Thu, 01 Jan 1970 00:00:01 GMT;`;\n};\n/**\n * Henter verdien til en cookie basert på navnet\n * @param cookieName navn på cookie\n */\nexport const getCookieValue = (name) => {\n const cookie = hasCookie(name);\n const cookieWithSuffix = hasCookieWithSuffix(name);\n if (!cookie && !cookieWithSuffix) {\n return undefined;\n }\n const cookieName = cookieWithSuffix ? getSuffix(name) : name;\n return document.cookie\n .split('; ')\n .find(e => e.split('=')[0] === cookieName)\n ?.split('=')[1];\n};\n/**\n * Returnerer domenenavnet uten subdomene, f.eks. \"helsenorge.no\" dersom domenet er \"www.helsenorge.no\" eller \"tjenester.helsenorge.no\"\n * @returns domenenavn for bruk i cookie\n */\nexport const getHostnameWithoutSubdomain = () => {\n if (['127.0.0.1', 'localhost'].includes(window.location.hostname)) {\n return window.location.hostname;\n }\n return window.location.hostname.substring(window.location.hostname.indexOf('.') + 1);\n};\nexport var IdentityProvider;\n(function (IdentityProvider) {\n IdentityProvider[\"HnApp\"] = \"hnapp\";\n IdentityProvider[\"HnAppUngdom\"] = \"idportenlevel3\";\n IdentityProvider[\"IdPorten\"] = \"idporten\";\n IdentityProvider[\"IdPortenLevel4\"] = \"idportenlevel4\";\n})(IdentityProvider || (IdentityProvider = {}));\n/**\n * Henter måten bruker har logget inn på\n * @returns IdentityProvider\n */\nexport const getIdentityProvider = () => getCookieValue(IDENTITY_PROVIDER_COOKIE_NAME);\n/**\n * Parse en string til et objekt med minor/minor/patch-versjon\n * @param input Versjon på semver-format 25.01.00\n * @returns Version-objekt eller undefined dersom versjonen ikke kan parses\n */\nexport const parseVersion = (input) => {\n if (!/^\\d+\\.\\d+\\.\\d+$/.test(input))\n return undefined;\n const [major, minor, patch] = input.split('.').map(Number);\n return { major, minor, patch };\n};\n/**\n * Sjekk om en versjon er lik eller høyere enn påkrevd versjon\n * @param compare Versjon å sammenlikne med\n * @param required Påkrevd versjon\n * @returns true dersom input er lik eller høyere enn base\n */\nexport const isVersionEqualOrHigher = (compare, required) => {\n if (compare.major > required.major)\n return true;\n if (compare.major < required.major)\n return false;\n if (compare.minor > required.minor)\n return true;\n if (compare.minor < required.minor)\n return false;\n return compare.patch >= required.patch;\n};\n/**\n * Les app-versjon fra cookie\n * @returns Versjons-info om appen dersom cookie finnes og inneholder gyldig versjonsinfo\n */\nexport const getAppVersion = () => {\n const value = getCookieValue(APP_VERSION_COOKIE_NAME);\n if (value) {\n return parseVersion(value);\n }\n};\n/**\n * Sjekk om innlogget bruker har tilstrekkelig ny versjon av appen\n * @param required Versjon å sammenlikne med, på formatet 25.01.00\n * @returns true dersom appen har høyere eller lik versjon som input\n */\nexport const hasAppVersionOrHigher = (required) => {\n const appVersion = getAppVersion();\n const requiredVersion = parseVersion(required);\n if (appVersion && requiredVersion) {\n return isVersionEqualOrHigher(appVersion, requiredVersion);\n }\n return false;\n};\n","import { HelsenorgeHttpError, getCorrelationIdFromResponse } from './hn-proxy-service';\n/**\n * Returnerer en url-friendly string fra et objekt, f.eks. ?a=b&x=y\n * @param params Objekt med parametere som skal gjøres om til en string { a : 'b', x: 'y' }\n */\nexport const parseParams = (params) => {\n if (params) {\n const queryString = Object.keys(params)\n .map(key => {\n if (Object.prototype.hasOwnProperty.call(params, key) && typeof params[key] !== 'undefined') {\n return `${key}=${params[key]}`;\n }\n })\n .filter(x => !!x)\n .join('&');\n if (queryString) {\n return `?${queryString}`;\n }\n }\n return '';\n};\n/**\n * Oppretter nytt Header-objekt med Accept og Content-type\n * @param type application/json er default\n */\nexport const createBaseHeaders = (type = 'application/json') => new Headers({\n Accept: type,\n 'Content-Type': type,\n});\n/**\n * Sjekker status på en Response og returnerer en Promise avhengig av status\n * @param response Response objektet fra HTTP request\n * @throws {HelsenorgeHttpError} Dersom APIet svarer med en feil som ikke er i standard-format\n * @throws {Error} Dersom det skjer andre feil\n */\nexport const checkStatus = (response) => {\n const contentType = response.headers.get('content-type');\n const correlationId = getCorrelationIdFromResponse(response);\n if (contentType?.indexOf('application/json') !== -1) {\n if (response.status === 204) {\n return Promise.resolve(null);\n }\n if (response.ok) {\n return response.json();\n }\n return response\n .json()\n .then(error => {\n // Håndtering av feil der serveren har respondert med gyldig JSON\n throw new HelsenorgeHttpError(response.status, 'Det har skjedd en teknisk feil. Prøv igjen senere.', correlationId, error);\n })\n .catch(error => {\n if (error instanceof HelsenorgeHttpError) {\n throw error;\n }\n // Håndtering av feil der serveren har respondert med ugyldig JSON\n throw new HelsenorgeHttpError(response.status, 'Det har skjedd en teknisk feil. Prøv igjen senere.', correlationId);\n });\n }\n throw new Error('Det har skjedd en teknisk feil. Prøv igjen senere.');\n};\n","/*\n cycle.js\n 2013-02-19\n\n Public Domain.\n\n NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.\n\n This code should be minified before deployment.\n See http://javascript.crockford.com/jsmin.html\n\n USE YOUR OWN COPY. IT IS EXTREMELY UNWISE TO LOAD CODE FROM SERVERS YOU DO\n NOT CONTROL.\n*/\nexport const decycle = (object) => {\n // Make a deep copy of an object or array, assuring that there is at most\n // one instance of each object or array in the resulting structure. The\n // duplicate references (which might be forming cycles) are replaced with\n // an object of the form\n // {$ref: PATH}\n // where the PATH is a JSONPath string that locates the first occurance.\n // So,\n // var a = [];\n // a[0] = a;\n // return JSON.stringify(JSON.decycle(a));\n // produces the string '[{\"$ref\":\"$\"}]'.\n // JSONPath is used to locate the unique object. $ indicates the top level of\n // the object or array. [NUMBER] or [STRING] indicates a child member or\n // property.\n const objects = [], // Keep a reference to each unique object or array\n paths = []; // Keep the path to each unique object or array\n return (function derez(value, path) {\n // The derez recurses through the object, producing the deep copy.\n let i, // The loop counter\n name, // Property name\n nu; // The new object or array\n // typeof null === 'object', so go on if this value is really an object but not\n // one of the weird builtin objects.\n if (typeof value === 'object' &&\n value !== null &&\n !(value instanceof Boolean) &&\n !(value instanceof Date) &&\n !(value instanceof Number) &&\n !(value instanceof RegExp) &&\n !(value instanceof String)) {\n // If the value is an object or array, look to see if we have already\n // encountered it. If so, return a $ref/path object. This is a hard way,\n // linear search that will get slower as the number of unique objects grows.\n for (i = 0; i < objects.length; i += 1) {\n if (objects[i] === value) {\n return { $ref: paths[i] };\n }\n }\n // Otherwise, accumulate the unique value and its path.\n objects.push(value);\n paths.push(path);\n // If it is an array, replicate the array.\n if (Object.prototype.toString.apply(value) === '[object Array]') {\n nu = [];\n for (i = 0; i < value.length; i += 1) {\n nu[i] = derez(value[i], path + '[' + i + ']');\n }\n }\n else {\n // If it is an object, replicate the object.\n nu = {};\n for (name in value) {\n if (Object.prototype.hasOwnProperty.call(value, name)) {\n nu[name] = derez(value[name], path + '[' + JSON.stringify(name) + ']');\n }\n }\n }\n return nu;\n }\n return value;\n })(object, '$');\n};\n","/* eslint-disable no-console */\n/* eslint-disable @typescript-eslint/no-use-before-define */\nimport { decycle } from './cycle';\nimport { getServerLogLevel, getTjenesterUrl, HelsenorgeHttpError, HelsenorgeProxyError } from './hn-proxy-service';\nimport { createBaseHeaders } from './hn-service';\nexport var LogLevel;\n(function (LogLevel) {\n LogLevel[LogLevel[\"Trace\"] = 0] = \"Trace\";\n LogLevel[LogLevel[\"Debug\"] = 1] = \"Debug\";\n LogLevel[LogLevel[\"Info\"] = 2] = \"Info\";\n LogLevel[LogLevel[\"Warn\"] = 3] = \"Warn\";\n LogLevel[LogLevel[\"Error\"] = 4] = \"Error\";\n LogLevel[LogLevel[\"Fatal\"] = 5] = \"Fatal\";\n LogLevel[LogLevel[\"Off\"] = 6] = \"Off\";\n})(LogLevel || (LogLevel = {}));\nconst unwrapError = (potentialError) => {\n if (potentialError instanceof HelsenorgeProxyError) {\n return `${potentialError.message} Status code: ${potentialError.statusCode} CorrelationId: ${potentialError.correlationId} Stack: ${potentialError.stack}`;\n }\n else if (potentialError instanceof HelsenorgeHttpError) {\n return `${potentialError.message} Status code: ${potentialError.statusCode} Stack: ${potentialError.stack}`;\n }\n else if (potentialError instanceof Error) {\n return `${potentialError.message} Stack: ${potentialError.stack}`;\n }\n else if (typeof potentialError === 'string' || potentialError instanceof String) {\n return potentialError;\n }\n else if (potentialError.length > 0) {\n const innerError = potentialError[0];\n return unwrapError(innerError);\n }\n else {\n return JSON.stringify(decycle(potentialError));\n }\n};\nconst generateEntry = (level, message, ...optionalParams) => {\n let fullMessage = message;\n fullMessage = optionalParams.reduce((previous, current) => {\n return previous + ' ' + unwrapError(current);\n }, fullMessage ?? '');\n return {\n Level: level,\n Message: fullMessage,\n Url: window.location.href,\n };\n};\nconst postLogEntry = (logEntry) => {\n fetch(getTjenesterUrl() + '/api/v1/Frontend/Log', {\n method: 'post',\n headers: createBaseHeaders(),\n credentials: 'include',\n body: JSON.stringify(logEntry),\n }).catch();\n};\n/**\n * Logger error til serveren\n */\nexport const logToServer = (level, message, ...optionalParams) => {\n const logLevel = getServerLogLevel();\n if (logLevel !== null && level >= logLevel) {\n exportFunctions.postLogEntry(generateEntry(level, message, optionalParams));\n }\n};\n/**\n * Lager en event listener på errors og logger error til serveren\n */\nexport const captureErrors = () => {\n window.addEventListener('error', function (e) {\n let message = e.message;\n const error = e.error;\n if (error) {\n message = error;\n const stack = error.stack;\n if (stack) {\n message = stack;\n }\n }\n else {\n message = message + '. Access to error information is restricted on this domain!';\n if (e.filename) {\n message = message + ' Filename:' + e.filename;\n }\n }\n exportFunctions.logToServer(LogLevel.Error, message);\n });\n};\n/**\n * Lager en console.debug og logger til serveren\n * @param message - string som sendes i console.debug og logges til serveren\n * @param optionalParams params som sendes til console.debug og logges til serveren\n */\nexport const debug = (message, ...optionalParams) => {\n if (allowConsoleOutput()) {\n console.debug(message, optionalParams);\n }\n exportFunctions.logToServer(LogLevel.Debug, message, optionalParams);\n};\n/**\n * Lager en console.error og logger til serveren\n * @param message - string som sendes i console.error og logges til serveren\n * @param optionalParams params som sendes til console.error og logges til serveren\n */\nexport const error = (message, ...optionalParams) => {\n if (allowConsoleOutput()) {\n console.error(message, optionalParams);\n }\n exportFunctions.logToServer(LogLevel.Error, message, optionalParams);\n};\n/**\n * Lager en console.info og logger til serveren\n * @param message - string som sendes i console.info og logges til serveren\n * @param optionalParams params som sendes til console.info og logges til serveren\n */\nexport const info = (message, ...optionalParams) => {\n if (allowConsoleOutput()) {\n console.info(message, optionalParams);\n }\n exportFunctions.logToServer(LogLevel.Info, message, optionalParams);\n};\n/**\n * Lager en console.trace og logger til serveren\n * @param message - string som sendes i console.trace og til serveren\n * @param optionalParams params som sendes til console.trace og til serveren\n */\nexport const trace = (message, ...optionalParams) => {\n if (allowConsoleOutput()) {\n console.trace(message, optionalParams);\n }\n exportFunctions.logToServer(LogLevel.Trace, message, optionalParams);\n};\n/**\n * Lager en console.warn og logger til serveren\n * @param message - string som sendes i console.warn og til serveren\n * @param optionalParams params som sendes til console.warn og til serveren\n */\nexport const warn = (message, ...optionalParams) => {\n if (allowConsoleOutput()) {\n console.warn(message, optionalParams);\n }\n exportFunctions.logToServer(LogLevel.Warn, message, optionalParams);\n};\nexport const allowConsoleOutput = () => !['production', 'test'].includes(process.env.NODE_ENV ?? '');\n/**\n * Lager en console.assert\n * @param test - test som sendes til console assert\n * @param message - message som sendes til console assert\n * @param optionalParams params som sendes til console assert\n */\nexport const assert = (test, message, ...optionalParams) => {\n if (allowConsoleOutput()) {\n console.assert(test, message, optionalParams);\n }\n};\n/**\n * Lager en console.clear\n */\nexport const clear = () => {\n if (allowConsoleOutput()) {\n console.clear();\n }\n};\n/**\n * Lager en console.count\n * @param countTitle - string som sendes i console.count\n */\nexport const count = (countTitle) => {\n if (allowConsoleOutput()) {\n console.count(countTitle);\n }\n};\n/**\n * Lager en console.dir\n * @param value - string som sendes i console.dir og logges til serveren\n * @param optionalParams params som sendes til console.dir og logges til serveren\n */\nexport const dir = (value, ...optionalParams) => {\n if (allowConsoleOutput()) {\n console.dir(value, optionalParams);\n }\n};\n/**\n * Lager en console.dirxml\n * @param value - string som sendes i console.dirxml og logges til serveren\n */\nexport const dirxml = (value) => {\n if (allowConsoleOutput()) {\n console.dirxml(value);\n }\n};\n/**\n * Lager en console.group\n * @param groupTitle - string som sendes i console.group\n */\nexport const group = (groupTitle) => {\n if (allowConsoleOutput()) {\n console.group(groupTitle);\n }\n};\n/**\n * Lager en console.groupCollapsed\n * @param groupTitle - string som sendes i console.groupCollapsed\n */\nexport const groupCollapsed = (groupTitle) => {\n if (allowConsoleOutput()) {\n console.groupCollapsed(groupTitle);\n }\n};\n/**\n * Lager en console.groupEnd\n */\nexport const groupEnd = () => {\n if (allowConsoleOutput()) {\n console.groupEnd();\n }\n};\n/**\n * Lager en console.log\n * @param message - string som sendes i console.log\n * @param optionalParams params som sendes til console.log\n */\nexport const log = (message, ...optionalParams) => {\n if (allowConsoleOutput()) {\n if (optionalParams && optionalParams.length > 0) {\n console.log(message, optionalParams);\n }\n else {\n console.log(message);\n }\n }\n};\n/**\n * Lager en console.profile\n * @param reportName - string som sendes i console.groupCollapsed\n */\nexport const profile = (reportName) => {\n if (allowConsoleOutput()) {\n console.profile(reportName);\n }\n};\n/**\n * Lager en console.profileEnd\n */\nexport const profileEnd = () => {\n if (allowConsoleOutput()) {\n console.profileEnd();\n }\n};\n/**\n * Lager en console.table\n * @param data - array av ukjent data som sendes videre til console.table\n */\nexport const table = (...data) => {\n if (allowConsoleOutput()) {\n console.table(data);\n }\n};\n/**\n * Lager en console.time\n * @param timerName - string som sendes videre til console.time\n */\nexport const time = (timerName) => {\n if (allowConsoleOutput()) {\n console.time(timerName);\n }\n};\n/**\n * Lager en console.timeEnd\n * @param timerName - string som sendes videre til console.timeEnd\n */\nexport const timeEnd = (timerName) => {\n if (allowConsoleOutput()) {\n console.timeEnd(timerName);\n }\n};\n// This wrapping is necessary for being able to Mock function in vi-tests\nconst exportFunctions = {\n postLogEntry,\n logToServer,\n debug,\n error,\n info,\n trace,\n warn,\n assert,\n clear,\n count,\n dir,\n dirxml,\n group,\n groupCollapsed,\n groupEnd,\n log,\n profile,\n profileEnd,\n table,\n time,\n timeEnd,\n};\nexport default exportFunctions;\n","import { format } from 'date-fns';\nimport { trackError } from './adobe-analytics';\nimport { getCookieValue } from './cookie';\nimport { parseParams } from './hn-service';\nimport { warn, error as logError } from './logger';\nconst isProxyErrorResponse = (response) => {\n return (typeof response === 'object' &&\n response !== null &&\n response.code !== undefined &&\n response.errorCategory !== undefined &&\n response.message !== undefined);\n};\nconst isPascalCaseProxyErrorResponse = (response) => {\n return (typeof response === 'object' &&\n response !== null &&\n response.Code !== undefined &&\n response.ErrorCategory !== undefined &&\n response.Message !== undefined);\n};\nconst mapPascalCaseErrorToCamelCase = (response) => ({\n code: response.Code,\n errorCategory: response.ErrorCategory,\n message: response.Message,\n});\nconst saveCorrelationId = (correlationId) => {\n window.HN = window.HN || {};\n window.HN.CorrelationIdList = window.HN.CorrelationIdList || [];\n window.HN.CorrelationIdList.push(correlationId);\n};\n/**\n * Hent correlationId fra API-respons\n * @param response Response fra APIet\n * @returns correlationId som guid\n */\nexport const getCorrelationIdFromResponse = (response) => {\n const correlationId = response.headers.get('CorrelationId');\n if (correlationId) {\n saveCorrelationId(correlationId);\n }\n return correlationId;\n};\nexport const getCorrelationIdList = () => window.HN?.CorrelationIdList;\n/**\n * Custom error i tilfelle APIet returnerer en 4XX- eller 5XX-feil, og en standard\n * Helsenorge-feilrespons med code, errorCategory og message.\n *\n * Eksempel på bruk med get():\n *\n * try {\n * await get('koronasertifikat', 'v1/CoronaCertificate');\n * } catch (error) {\n * if (error instanceof HelsenorgeProxyError && error.response.code === \"HFU-100400\") {\n * // I tilfelle backend svarer med en spesiell feilkode\n * }\n * // Gjør noe annet for andre feil\n * }\n */\nexport class HelsenorgeProxyError extends Error {\n constructor(statusCode, message, correlationId, response, ...params) {\n // Pass remaining arguments (including vendor specific ones) to parent constructor\n super(...params);\n Object.defineProperty(this, \"statusCode\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"correlationId\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"response\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.setPrototypeOf(this, new.target.prototype); // restore prototype chain\n // Maintains proper stack trace for where our error was thrown (only available on V8)\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, HelsenorgeProxyError);\n }\n this.name = 'HelsenorgeProxyError';\n // Custom debugging information\n this.statusCode = statusCode;\n this.message = message;\n this.correlationId = correlationId;\n this.response = response;\n }\n}\n/**\n * Custom error i tilfelle APIet returnerer en 4XX- eller 5XX-feil, men der responsen\n * ikke er i henhold til standard.\n */\nexport class HelsenorgeHttpError extends Error {\n constructor(statusCode, message, correlationId, response, ...params) {\n // Pass remaining arguments (including vendor specific ones) to parent constructor\n super(...params);\n Object.defineProperty(this, \"statusCode\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"correlationId\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"response\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.setPrototypeOf(this, new.target.prototype); // restore prototype chain\n // Maintains proper stack trace for where our error was thrown (only available on V8)\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, HelsenorgeHttpError);\n }\n this.name = 'HelsenorgeHttpError';\n // Custom debugging information\n this.statusCode = statusCode;\n this.message = message;\n this.correlationId = correlationId;\n this.response = response;\n }\n}\n/**\n * Returnerer baseUrl til Tjenester basert på HN Rest objektet\n */\nexport const getTjenesterUrl = () => {\n return window.HN?.Rest?.TjenesterUrl ?? '';\n};\n/**\n * Returnerer true når window urlen er lik tjenester baseUrl\n */\nexport const erTjenester = () => {\n if (window && window.location) {\n return window.location.origin === getTjenesterUrl();\n }\n return false;\n};\n/**\n * Returnerer proxy url med MinHelse baseUrl og proxynavnet\n * @param proxyName navn på api-et/løsningsområdet. Eks pasientjournal eller velgbehandlingssted\n * @param endpoint path for endepunktet inkludert versjon. Eks: api/v1/Behandlinger eller v1/Behandlinger\n */\nexport const getTjenesterApiUrl = (proxyName, endpoint) => {\n const apiUrl = window.HN?.Rest?.TjenesterApiUrl ?? '';\n return `${apiUrl}/proxy/${proxyName}/${endpoint}`;\n};\nexport function getServerLogLevel() {\n return window.HN?.Rest?.LogLevel ?? null;\n}\n/**\n * Returnerer default params som trengs i en vanlig request\n * @returns Objekt med headers\n */\nconst getRequestHeaders = () => {\n const headers = {};\n if (window.HN?.Rest?.HendelseLoggType) {\n headers['X-hn-hendelselogg'] = window.HN.Rest.HendelseLoggType;\n }\n if (getCookieValue('HN_CSRF_Token')) {\n headers['X-HN-CSRF-Token'] = getCookieValue('HN_CSRF_Token');\n }\n return headers;\n};\n/**\n * Returnerer true når window urlen er lik Helsenorge baseUrl\n */\nexport const erHelsenorge = () => {\n return window.location.origin === getHelsenorgeUrl();\n};\n/**\n * Returnerer Headers som trengs i en vanlig request\n * @param type optional content-type - default er json\n */\nexport const createHeaders = (type = 'application/json') => {\n const headers = new Headers(getRequestHeaders());\n headers.append('Accept', type);\n headers.append('Content-Type', type);\n return headers;\n};\n/**\n * Returnerer filnavn fra et Response-objekt ved nedlasting av filer\n * @param response Responsen fra et fetch-kall\n * @returns filnavn fra Content-Disposition-header, eller en fallback dersom headeren ikke finnes\n */\nexport const getFilenameFromResponse = (response) => {\n let filename = 'nedlasting-' + format(new Date(), 'yyyy-M-d') + '-helseNorge';\n const contentDisposition = response.headers.get('content-disposition');\n if (contentDisposition) {\n const utf8Regex = /filename\\*=utf-8''(.+)/i;\n const asciiRegex = /filename=\"(.+)\"/i;\n const asciiRegexWithoutQuotes = /filename=(.+)/i;\n const match = contentDisposition.match(utf8Regex) ??\n contentDisposition.match(asciiRegex) ??\n contentDisposition.match(asciiRegexWithoutQuotes) ??\n false;\n if (match) {\n try {\n filename = decodeURI(match[1]);\n }\n catch (e) {\n logError(`Responsen fra ${response.url} inneholder ugyldige tegn i filnavnet i Content-Disposition-headeren: ${contentDisposition}`);\n }\n }\n }\n return filename;\n};\n/**\n * Returnerer JSON error objekt - f.eks '{ \"Code\":\"EHAPI-100000\", \"Message\":\"Teknisk feil\", \"ErrorCategory\": 0}'\n * @param html ErrorMsg i html\n */\nexport const getErrorFromHTML = (html) => {\n const first = html.indexOf('{');\n const last = html.lastIndexOf('}');\n const everything = html.substring(first, last + 1);\n if (everything === '') {\n return null;\n }\n return JSON.parse(everything);\n};\n/**\n * Returnerer url basert på HN Rest objektet\n */\nexport function getHelsenorgeUrl() {\n return window.HN?.Rest?.HelseNorgeUrl ?? '';\n}\n/**\n * Returnerer full query string basert på parametrene sendt som argument '?param1=value¶m2=value'\n * @param params opjekt med parametrene\n */\nconst createQueryString = (params) => {\n return ('?' +\n Object.keys(params)\n .map((key) => {\n return Array.isArray(params[key])\n ? params[key].map((x) => `${key}=${x}`).join('&')\n : `${key}=${params[key]}`;\n })\n .join('&'));\n};\n/**\n * Sjekker status på en Response og returnerer en Promise avhengig av status\n * @param response Response objektet fra HTTP request\n * @throws {HelsenorgeProxyError} Dersom APIet svarer med en feil etter Helsenorge-standard\n * @throws {HelsenorgeHttpError} Dersom APIet svarer med en feil som ikke er i standard-format\n * @throws {Error} Dersom det skjer andre feil\n */\nexport const checkStatus = (response) => {\n const contentType = response.headers.get('content-type');\n const correlationId = getCorrelationIdFromResponse(response);\n if (contentType?.indexOf('application/json') !== -1) {\n if (response.status === 204) {\n return Promise.resolve(null);\n }\n if (response.status === 429) {\n throw new HelsenorgeHttpError(429, 'Denne tjenesten er ikke tilgjengelig for øyeblikket. Det er for mange som ønsker å bruke tjenesten samtidig.', correlationId);\n }\n if (response.ok) {\n return response.json();\n }\n return response.json().then(error => {\n if (isProxyErrorResponse(error) &&\n (error.code === 'SEC-110000' || error.code === 'EHSEC-110000') &&\n document.location?.href.indexOf('autosignout=1') === -1) {\n // redirect dersom token er utgått eller ugyldig\n window.location.href = `${getTjenesterUrl()}/auth/autosignout`;\n }\n if (isProxyErrorResponse(error)) {\n throw new HelsenorgeProxyError(response.status, error.message, correlationId, error);\n }\n if (isPascalCaseProxyErrorResponse(error)) {\n throw new HelsenorgeProxyError(response.status, error.Message, correlationId, mapPascalCaseErrorToCamelCase(error));\n }\n throw new HelsenorgeHttpError(response.status, 'Det har skjedd en teknisk feil. Prøv igjen senere.', correlationId, error);\n });\n }\n throw new Error('Det har skjedd en teknisk feil. Prøv igjen senere.');\n};\nconst handleError = (error, apiUrl) => {\n trackError('level1', 'Feil ved henting av data fra proxy');\n if (error instanceof TypeError && error.message === 'Failed to fetch') {\n warn(`Kall til følgende URL feilet: ${apiUrl}. Mottok ingen respons fra tjenesten.`);\n throw new Error('Det har skjedd en teknisk feil. Prøv igjen senere.');\n }\n throw error;\n};\n/**\n * baseCrud som brukes for å fetche. Logger eventuelle nettverksfeil med warn().\n * @param method\n * @param proxyName navn på api-et/løsningsområdet. Eks pasientjournal eller velgbehandlingssted\n * @param endpoint path for endepunktet inkludert versjon. Eks: api/v1/Behandlinger eller v1/Behandlinger\n * @param params parametere som sendes med som query string\n * @param data\n * @throws {Error} Dersom det skjedde en feil under fetch-kallet\n */\nconst baseCrud = (method, proxyName, endpoint, params, data) => {\n const queryString = params && Object.keys(params).length > 0 ? createQueryString(params) : '';\n const baseUrl = getTjenesterApiUrl(proxyName, endpoint);\n const requestBody = data ? { body: JSON.stringify(data) } : {};\n const apiUrl = baseUrl + queryString;\n return fetch(apiUrl, {\n ...requestBody,\n method,\n credentials: 'include',\n headers: createHeaders(),\n })\n .then(response => checkStatus(response))\n .catch(error => handleError(error, apiUrl));\n};\n/**\n * get method\n * @param proxyName navn på api-et/løsningsområdet. Eks pasientjournal eller velgbehandlingssted\n * @param endpoint path for endepunktet inkludert versjon. Eks: api/v1/Behandlinger eller v1/Behandlinger\n * @param params parametere som sendes med som query string\n */\nexport const get = (proxyName, endPoint, params) => {\n return baseCrud('get', proxyName, endPoint, params);\n};\n/**\n * Hjelpemetode for å sende get-requester til proxy-API sammen med createApi fra RTK\n * @param args\n * @returns\n */\nexport const getBaseQuery = async (args) => {\n try {\n const response = await get(...args);\n return { data: response };\n }\n catch (error) {\n return { error: error instanceof Error ? error.message : 'Teknisk feil' };\n }\n};\n/**\n * post method\n * @param proxyName navn på api-et/løsningsområdet. Eks pasientjournal eller velgbehandlingssted\n * @param endpoint path for endepunktet inkludert versjon. Eks: api/v1/Behandlinger eller v1/Behandlinger\n * @param params parametere som sendes med som query string\n * @param data\n */\nexport const post = (proxyName, endPoint, data, params) => {\n return baseCrud('post', proxyName, endPoint, params, data);\n};\n/**\n * put method\n * @param proxyName navn på api-et/løsningsområdet. Eks pasientjournal eller velgbehandlingssted\n * @param endpoint path for endepunktet inkludert versjon. Eks: api/v1/Behandlinger eller v1/Behandlinger\n * @param params parametere som sendes med som query string\n * @param data\n */\nexport const put = (proxyName, endpoint, data, params) => {\n return baseCrud('put', proxyName, endpoint, params, data);\n};\n/**\n * patch method\n * @param proxyName navn på api-et/løsningsområdet. Eks pasientjournal eller velgbehandlingssted\n * @param endpoint path for endepunktet inkludert versjon. Eks: api/v1/Behandlinger eller v1/Behandlinger\n * @param params parametere som sendes med som query string\n * @param data\n */\nexport const patch = (proxyName, endpoint, data, params) => {\n return baseCrud('patch', proxyName, endpoint, params, data);\n};\n/**\n * remove method\n * @param proxyName navn på api-et/løsningsområdet. Eks pasientjournal eller velgbehandlingssted\n * @param endpoint path for endepunktet inkludert versjon. Eks: api/v1/Behandlinger eller v1/Behandlinger\n * @param params parametere som sendes med som query string\n * @param data\n */\nexport const remove = (proxyName, endpoint, data, params) => {\n return baseCrud('delete', proxyName, endpoint, params, data);\n};\n/**\n * Konkatenerer url-lenke basert på environment, proxy, url, request params og custom params\n * @param proxyName navn på api-et/løsningsområdet. Eks pasientjournal eller velgbehandlingssted\n * @param endpoint path for endepunktet inkludert versjon. Eks: api/v1/Behandlinger eller v1/Behandlinger\n * @param params parametere som sendes med som query string\n */\nexport const link = (proxyName, endpoint, params) => {\n return getTjenesterApiUrl(proxyName, endpoint) + (params ? createQueryString(params) : '');\n};\n/**\n * Las ned en fil/Blob i nettleseren\n * @param download Info om fil som skal lastes ned\n */\nconst downloadFileInBrowser = async (download) => {\n const blob = await download.blob;\n const a = document.createElement('a');\n document.body.appendChild(a);\n const url = window.URL.createObjectURL(blob);\n a.href = url;\n a.download = download.fileName;\n a.click();\n window.URL.revokeObjectURL(url);\n};\n/**\n * Sjekker status på en Response og returnerer info om fil som skal nedlastes\n * @param response Response objektet fra HTTP request\n * @throws {HelsenorgeProxyError} Dersom APIet svarer med en feil etter Helsenorge-standard\n * @throws {HelsenorgeHttpError} Dersom APIet svarer med en feil som ikke er i standard-format\n */\nconst handleDownloadResponse = async (response) => {\n if (!response.ok) {\n const error = await response.text();\n const correlationId = getCorrelationIdFromResponse(response);\n if (error === '401') {\n window.location.reload();\n throw new HelsenorgeHttpError(401, 'Det har skjedd en teknisk feil. Prøv igjen senere.', correlationId, error);\n }\n else {\n logError('responseHtml', error);\n const errorResponse = getErrorFromHTML(error);\n if (isProxyErrorResponse(errorResponse)) {\n throw new HelsenorgeProxyError(response.status, errorResponse.message, correlationId, errorResponse);\n }\n else if (isPascalCaseProxyErrorResponse(errorResponse)) {\n throw new HelsenorgeProxyError(response.status, errorResponse.Message, correlationId, mapPascalCaseErrorToCamelCase(errorResponse));\n }\n throw new HelsenorgeHttpError(response.status, 'Det har skjedd en teknisk feil. Prøv igjen senere.', correlationId, error);\n }\n }\n const fileName = getFilenameFromResponse(response);\n const blob = response.blob();\n return { blob, fileName };\n};\n/**\n * Fetch for nedlasting av filer\n * @param proxyName navn på api-et/løsningsområdet. Eks pasientjournal eller velgbehandlingssted\n * @param endpoint path for endepunktet inkludert versjon. Eks: api/v1/Behandlinger eller v1/Behandlinger\n * @param params parametere som sendes med som query string\n * @param method HTTP-metode: get eller post\n * @param data Data som som sendes som body med fetch\n */\nexport const download = (proxyName, endpoint, params, method = 'get', data) => {\n const queryString = method === 'get' ? parseParams(params) : '';\n const baseUrl = getTjenesterApiUrl(proxyName, endpoint);\n const requestBody = data ? { body: JSON.stringify(data) } : {};\n const apiUrl = baseUrl + queryString;\n const headers = createHeaders();\n if (method === 'get') {\n headers.set('Content-Type', 'multipart/form-data');\n }\n return new Promise((resolve, reject) => {\n fetch(apiUrl, {\n ...requestBody,\n method,\n credentials: 'include',\n headers,\n })\n .then(handleDownloadResponse)\n .then(downloadFileInBrowser)\n .then(() => resolve())\n .catch(error => {\n trackError('level1', 'Feil ved nedlasting av fil');\n if (error instanceof TypeError && error.message === 'Failed to fetch') {\n reject(new Error('Det har skjedd en teknisk feil. Prøv igjen senere.'));\n }\n reject(error);\n });\n });\n};\n/**\n * Last opp fil\n * @param proxyName navn på api-et/løsningsområdet. Eks pasientjournal eller velgbehandlingssted\n * @param endpoint path for endepunktet inkludert versjon. Eks: api/v1/Behandlinger eller v1/Behandlinger\n * @param formData Fil som skal lastes opp\n * @param params parametere som sendes med som query string\n * @throws {Error} Dersom det skjedde en feil under fetch-kallet\n */\nexport const upload = (proxyName, endpoint, formData, params) => {\n const baseUrl = getTjenesterApiUrl(proxyName, endpoint);\n const queryString = params && Object.keys(params).length > 0 ? createQueryString(params) : '';\n const apiUrl = baseUrl + queryString;\n return fetch(apiUrl, {\n body: formData,\n method: 'POST',\n credentials: 'include',\n headers: new Headers(getRequestHeaders()),\n })\n .then(response => checkStatus(response))\n .catch(error => handleError(error, apiUrl));\n};\n/**\n * Hent XML fra proxy\n * @param proxyName navn på api-et/løsningsområdet. Eks pasientjournal eller velgbehandlingssted\n * @param endpoint path for endepunktet inkludert versjon. Eks: api/v1/Behandlinger eller v1/Behandlinger\n * @param params parametere som sendes med som query string\n * @returns XML som string\n */\nexport const getXml = (proxyName, endpoint, params) => {\n const baseUrl = getTjenesterApiUrl(proxyName, endpoint);\n const apiUrl = baseUrl + parseParams(params);\n const headers = createHeaders('application/xml');\n const checkStatus = (response) => {\n const contentType = response.headers.get('content-type');\n if (contentType?.indexOf('application/xml') !== -1 && response.ok) {\n return response.text();\n }\n return response.text().then(error => {\n const correlationId = getCorrelationIdFromResponse(response);\n throw new HelsenorgeHttpError(response.status, 'Teknisk feil', correlationId, error);\n });\n };\n return fetch(apiUrl, {\n credentials: 'include',\n headers,\n })\n .then(checkStatus)\n .catch(error => handleError(error, apiUrl));\n};\n","export var LanguageLocales;\n(function (LanguageLocales) {\n LanguageLocales[\"NORWEGIAN\"] = \"nb-NO\";\n LanguageLocales[\"NORWEGIAN_NYNORSK\"] = \"nn-NO\";\n LanguageLocales[\"ENGLISH\"] = \"en-GB\";\n LanguageLocales[\"LITHUANIAN\"] = \"lt-LT\";\n LanguageLocales[\"POLISH\"] = \"pl-PL\";\n LanguageLocales[\"RUSSIAN\"] = \"ru-RU\";\n LanguageLocales[\"ROMANIAN\"] = \"ro-RO\";\n LanguageLocales[\"SAMI_NORTHERN\"] = \"se-NO\";\n})(LanguageLocales || (LanguageLocales = {}));\nexport default LanguageLocales;\n","import { unescapeHexEntities, unescapeHtmlEntities } from './html-entities';\n/**\n * Returnerer true når en streng er null, undefined eller tom\n * @param s - streng som skal sjekkes\n */\nexport const isEmpty = (string) => {\n if (string && string.trim)\n string = string.trim();\n return string === '' || string === null || string === undefined;\n};\n/**\n * Returnerer true når strengen inneholder følgende symboler: \"!#¤%=?`´^¨~*:;£${[\\]}|§€><\\|\n * @param s - streng som skal sjekkes\n */\nexport const hasInvalidCharacters = (s) => {\n return /[\"\"!#¤%=?`´^¨~*:;£${[\\]}|§€><\\|]/.test(s);\n};\n/**\n * Returnerer en streng med uppercase på første bokstav\n * @param s - streng å konvertere\n */\nexport const capitalize = (s) => {\n const capitalized = s.charAt(0).toUpperCase() + s.substring(1);\n return capitalized;\n};\n/**\n * Returnerer en streng uten uppercase på første bokstav\n * @param s - streng å konvertere\n */\nexport const decapitalize = (s) => {\n const decapitalized = s.charAt(0).toLowerCase() + s.substring(1);\n return decapitalized;\n};\n/**\n * Returns true if the input corresponds with a norwegian phone number format\n * @param phoneNumber - string or number of the phone number\n */\nexport const isNorwegianPhoneNumber = (phoneNumber) => {\n const regexString = '^(0047|[+]47)?[4|9][0-9]{7,7}$';\n return new RegExp(regexString, 'i').test(phoneNumber.toString().replace(new RegExp(' ', 'g'), ''));\n};\n/**\n * Returns a new string where plaeholders {number} have been replaced by items\n * ex: 'my string {0} ' where 0 will be replaced by the first element in args array\n * Note: The order of elements in string decide what order it should be replaced, not number!\n * @param s - string to format\n * @param args is a array in order you want them replaced ex: ['foo', 'bar']\n * @param allowEmptyStrings if '' is allowed or not\n */\nexport const format = (s, args, allowEmptyStrings) => {\n return s.replace(/{(\\d+)}/g, function replace(match, number) {\n if (allowEmptyStrings) {\n return args[number];\n }\n return args[number] ? args[number] : match;\n });\n};\nconst regexEmoticonsRule = /(?:[\\u2700-\\u27bf]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff]|[\\u0023-\\u0039]\\ufe0f?\\u20e3|\\u3299|\\u3297|\\u303d|\\u3030|\\u24c2|\\ud83c[\\udd70-\\udd71]|\\ud83c[\\udd7e-\\udd7f]|\\ud83c\\udd8e|\\ud83c[\\udd91-\\udd9a]|\\ud83c[\\udde6-\\uddff]|\\ud83c[\\ude01-\\ude02]|\\ud83c\\ude1a|\\ud83c\\ude2f|\\ud83c[\\ude32-\\ude3a]|\\ud83c[\\ude50-\\ude51]|\\u203c|\\u2049|[\\u25aa-\\u25ab]|\\u25b6|\\u25c0|[\\u25fb-\\u25fe]|\\u00a9|\\u00ae|\\u2122|\\u2139|\\ud83c\\udc04|[\\u2600-\\u26FF]|\\u2b05|\\u2b06|\\u2b07|\\u2b1b|\\u2b1c|\\u2b50|\\u2b55|\\u231a|\\u231b|\\u2328|\\u23cf|[\\u23e9-\\u23f3]|[\\u23f8-\\u23fa]|\\ud83c\\udccf|\\u2934|\\u2935|[\\u2190-\\u21ff])/g;\n/**\n * Returns en Array med alle html tags som er funnet i en string <...>\n * @param s - string som skal sjekkes\n */\nexport const invalidNodes = (s) => {\n const tagsMatches = unescapeHtmlEntities(unescapeHexEntities(s)).match(/<.*?>/g);\n const tags = tagsMatches ? tagsMatches.map(i => i.toString()) : [];\n const emoticonsMatches = s.match(regexEmoticonsRule);\n const emoticons = emoticonsMatches ? emoticonsMatches.map(i => i.toString()) : [];\n return tags.concat(emoticons);\n};\n/**\n * Returns true når strengen ikke inneholder emoticon og tags\n * @param s - string som skal sjekkes\n */\nexport const isValid = (s) => {\n return (!/<.*?>/g.test(s) &&\n !regexEmoticonsRule.test(s) &&\n !/<.*?>/g.test(unescapeHtmlEntities(s)) &&\n !/<.*?>/g.test(unescapeHtmlEntities(unescapeHexEntities(s))));\n};\n","import { setDefaultOptions, format as formatDF, isEqual as isEqualDF, isSameDay as isSameDayDF, parseJSON as parseJSONDF, isBefore as isBeforeDF, isAfter as isAfterDF, startOfDay as startOfDayDF, isSameMonth as isSameMonthDF, } from 'date-fns';\nimport { enGB } from 'date-fns/locale/en-GB';\nimport { nb } from 'date-fns/locale/nb';\nimport { nn } from 'date-fns/locale/nn';\nimport { se } from 'date-fns/locale/se';\nimport LanguageLocales from './constants/languages';\nimport { capitalize as ucfirst } from './string-utils';\n/**\n * Vanlige datoformater brukt på helsenorge.no\n *\n * Eksemplene viser formattert dato med norsk bokmål (nb) locale\n */\nexport var DateFormat;\n(function (DateFormat) {\n /** 02:08 */\n DateFormat[\"Time\"] = \"p\";\n /** 09.02.2023 */\n DateFormat[\"ShortDate\"] = \"P\";\n /** 09.02.2023 02:08 */\n DateFormat[\"ShortDateTime\"] = \"Pp\";\n /** 9. feb. 2023 */\n DateFormat[\"MediumDate\"] = \"PP\";\n /** 9. feb. 2023 02:08 */\n DateFormat[\"MediumDateTime\"] = \"PPp\";\n /** 9. februar 2023 */\n DateFormat[\"LongDate\"] = \"PPP\";\n /** 9. februar 2023 kl. 02:08 */\n DateFormat[\"LongDateTime\"] = \"PPPp\";\n /** torsdag 9. februar 2023 kl. 02:08 */\n DateFormat[\"LongDateWeekdayTime\"] = \"PPPPp\";\n /** feb. 2023 */\n DateFormat[\"ShortMonthYear\"] = \"MMM yyyy\";\n /** februar 2023 */\n DateFormat[\"MonthYear\"] = \"MMMM yyyy\";\n})(DateFormat || (DateFormat = {}));\n/**\n * Laster date-fns locale for et begrenset utvalg språk.\n */\nexport const loadLocale = (language) => {\n switch (language) {\n case LanguageLocales.NORWEGIAN:\n setDefaultOptions({ locale: nb });\n break;\n case LanguageLocales.NORWEGIAN_NYNORSK:\n setDefaultOptions({ locale: nn });\n break;\n case LanguageLocales.ENGLISH:\n setDefaultOptions({ locale: enGB });\n break;\n case LanguageLocales.SAMI_NORTHERN:\n setDefaultOptions({ locale: se });\n break;\n }\n};\n/**\n * Returnerer date-fns locale for et begrenset utvalg språk.\n */\nexport const getLocale = (language) => {\n switch (language) {\n case LanguageLocales.NORWEGIAN:\n return nb;\n case LanguageLocales.NORWEGIAN_NYNORSK:\n return nn;\n case LanguageLocales.ENGLISH:\n return enGB;\n case LanguageLocales.SAMI_NORTHERN:\n return se;\n default:\n return nb;\n }\n};\n/**\n * Parser en dato-streng til en gyldig Date.\n *\n * @param date Dato som skal parses\n * @returns En gyldig Date, eller undefined hvis dato ikke kan parses\n */\nexport const safeParseJSON = (date) => {\n if (!date) {\n return;\n }\n if (date instanceof Date && isNaN(date.getTime())) {\n return;\n }\n if (date instanceof Date) {\n return date;\n }\n const _date = parseJSONDF(date);\n if (isNaN(_date.getTime())) {\n return;\n }\n return _date;\n};\n/**\n * Konverterer en Date til Central European Time (tidssonen i Norge).\n * Merk at datoer i JS ikke inneholder informasjon om tidssone.\n * Denne funksjonen endrer datoen slik at den vises som norsk tid selv\n * om brukerens datamaskin er stilt inn på en annen tidssone.\n *\n * @param date Dato som skal konverteres til CET\n * @returns Dato justert slik at den vises som norsk tid selv om brukerens\n * datamaskin er stilt inn på en annen tidssone.\n */\nexport const toCentralEuropeanTime = (date) => {\n const cetDate = new Date(date.toLocaleString('en-US', {\n timeZone: 'CET',\n }));\n return isNaN(cetDate.getTime()) ? date : cetDate;\n};\n/**\n * Konverterer dato til CET og formatterer den\n *\n * @param date Dato\n * @param formatStr Format\n * @param options Innstillinger for formattering\n * @returns Formattert dato\n */\nexport const formatCET = (date, formatStr, options) => formatDF(toCentralEuropeanTime(date), formatStr, options);\n/**\n * Parser en dato med safeParseJSON og formatterer datoen dersom den er gyldig.\n * Dersom datoen ikke er gyldig, returneres tom streng.\n *\n * @param date Dato som skal parses\n * @param formatStr Datoformat\n * @returns Formattert dato, eller tom streng\n */\nexport const safeFormatCET = (date, formatStr) => {\n const _date = safeParseJSON(date);\n if (!_date) {\n return '';\n }\n return formatCET(_date, formatStr);\n};\n/**\n * Formatterer dato som:\n * 22. mai 2020 kl. 09:05\n *\n * @param a - Dato som skal formatteres\n */\nexport const longDateTime = (date) => formatDF(date, DateFormat.LongDateTime);\n/**\n * Formatterer dato som:\n * 22. mai 2020 eller 22. mai 2020 kl. 09:05\n *\n * @param a - Dato som skal formatteres\n */\nexport const longDate = (date) => {\n const startOfDay = startOfDayDF(date);\n return isEqualDF(date, startOfDay) ? formatDF(date, DateFormat.LongDate) : formatDF(date, DateFormat.LongDateTime);\n};\n/**\n * Formatterer dato som:\n * fredag 22. mai 2020 kl. 09:05\n *\n * @param date Dato som skal formatteres\n */\nexport const longDateNumbersClock = (date) => formatDF(date, DateFormat.LongDateWeekdayTime);\n/**\n * Formatterer dato som:\n * 22. mai 2020 09:05\n *\n * @param date Dato som skal formatteres\n */\nexport const mediumDate = (date) => formatDF(date, DateFormat.MediumDateTime);\n/**\n * Formatterer dato som:\n * 22.05.2020 09:05\n *\n * @param date Dato som skal formatteres\n */\nexport const mediumDateNumbers = (date) => formatDF(date, DateFormat.ShortDateTime);\n/**\n * Formatterer dato som:\n * 5. nov. 2020\n *\n * @param date Dato som skal formatteres\n */\nexport const shortDate = (date) => formatDF(date, DateFormat.MediumDate);\n/**\n * Formatterer dato som:\n * 5. november 2020\n *\n * @param date Dato som skal formatteres\n */\nexport const shortDateFullMonth = (date) => formatDF(date, DateFormat.LongDate);\n/**\n * Formatterer dato som:\n * 05.11.2020\n *\n * @param date Dato som skal formatteres\n */\nexport const shortDateNumbers = (date) => formatDF(date, DateFormat.ShortDate);\n/**\n * Formatterer tidspunkt som tom streng hvis tiden er midnatt, eller som:\n * 09:08\n *\n * @param date Dato som skal sjekkes\n * @param prefix - Tekst før formattert dato\n */\nexport const timeOfDay = (start, prefix = '') => {\n let value = '';\n const startOfDay = startOfDayDF(start);\n if (!isEqualDF(start, startOfDay)) {\n value = prefix + formatDF(start, DateFormat.Time);\n }\n return value;\n};\n/**\n * Formatterer dato som:\n * November 2020\n *\n * @param date Dato som skal formatteres\n */\nexport const monthYear = (date) => ucfirst(formatDF(date, DateFormat.MonthYear));\n/**\n * Formatterer dato som:\n * Nov 2020\n *\n * @param date Dato som skal formatteres\n */\nexport const shortMonthYear = (date) => ucfirst(formatDF(date, DateFormat.ShortMonthYear).replace('.', ''));\n/**\n * Formatterer to datoer som:\n * Mai 2020 – August 2020\n *\n * @param start Startdato\n * @param end Sluttdato\n */\nexport const monthRange = (start, end) => {\n let range;\n if (isSameMonthDF(start, end)) {\n range = ucfirst(formatDF(start, DateFormat.MonthYear));\n }\n else {\n range =\n ucfirst(formatDF(start, DateFormat.MonthYear)) +\n String.fromCharCode(160) +\n String.fromCharCode(8211) +\n String.fromCharCode(160) +\n ucfirst(formatDF(end, DateFormat.MonthYear));\n }\n return range;\n};\n/**\n * Formatterer to datoer som:\n * 22. mai 2020, mellom kl. 08:32 og 12:54\n * Forutsetter at begge tidspunktene er på samme dag\n *\n * @param start Startdato\n * @param end Sluttdato\n * @param betweenText \", mellom kl. \"\n * @param andText \"og\"\n */\nexport const timeRangeBetween = (start, end, between = ', mellom kl. ', andText = ' og ') => {\n let range;\n if (isEqualDF(start, end)) {\n range = formatDF(start, DateFormat.LongDateTime);\n }\n else {\n range = formatDF(start, DateFormat.MediumDate) + between + formatDF(start, DateFormat.Time) + andText + formatDF(end, DateFormat.Time);\n }\n return range;\n};\n/**\n * Formatterer to datoer som:\n * 22. mai 2020 kl. 08:32 - 12:54\n * Forutsetter at begge tidspunktene er på samme dag\n *\n * @param start Startdato\n * @param end Sluttdato\n */\nexport const timeRange = (start, end) => {\n let range;\n if (isEqualDF(start, end)) {\n range = formatDF(start, DateFormat.LongDateTime);\n }\n else {\n range = formatDF(start, DateFormat.LongDateTime) + ' - ' + formatDF(end, DateFormat.Time);\n }\n return range;\n};\n/**\n * Formatterer to datoer som:\n * Fredag 22. mai 2020 kl. 08:32 - 12:54\n * Forutsetter at begge tidspunktene er på samme dag\n *\n * @param start Startdato\n * @param end Sluttdato\n */\nexport const longTimeRange = (start, end) => {\n let range = formatDF(start, DateFormat.LongDateWeekdayTime);\n if (end) {\n range = range + ' - ' + formatDF(end, DateFormat.Time);\n }\n return ucfirst(range);\n};\n/**\n * Returnerer true hvis dato a er før dato b\n * @param a Dato som skal sammenlignes\n * @param b Dato som skal sammenlignes\n */\nexport const isBeforeDay = (a, b) => isBeforeDF(a.setHours(0, 0, 0, 0), b.setHours(0, 0, 0, 0));\n/**\n * Returnerer true hvis dato a er etter dato b\n * @param a Dato som skal sammenlignes\n * @param b Dato som skal sammenlignes\n */\nexport const isAfterDay = (a, b) => isAfterDF(a.setHours(0, 0, 0, 0), b.setHours(0, 0, 0, 0));\n/**\n * Returnerer true hvis dato a er på samme dag eller etter dato b\n * @param a Dato som skal sammenlignes\n * @param b Dato som skal sammenlignes\n */\nexport const isInclusivelyAfterDay = (a, b) => isSameDayDF(a, b) || isAfterDay(a, b);\n/**\n * Returnerer true hvis input (inkludert minutter) er etter nåtid\n * @param date Dato som skal sammenlignes\n */\nexport const isAfter = (date) => isAfterDF(date, new Date());\n/**\n * Returnerer true hvis input er etter dagens dato\n * Forskjell med 'isAfter' er at denne tar utgangspunkt i dager\n * @param date Dato som skal sammenlignes\n */\nexport const isAfterToday = (date) => isAfterDF(date.setHours(0, 0, 0, 0), new Date().setHours(0, 0, 0, 0));\n/**\n * Sammenligner to datoer og returnerer true hvis den første datoen er etter den andre (fungerer også med tid)\n * @param a - Date\n * @param max - maksimum dato grense\n */\nexport const isAfterMaxDate = (a, b) => !!b && isAfterDF(a, b);\n/**\n * Returnerer true hvis dato a er på samme dag eller før dato b\n * @param a Dato som skal sammenlignes\n * @param b Dato som skal sammenlignes\n */\nexport const isInclusivelyBeforeDay = (a, b) => isSameDayDF(a, b) || isBeforeDay(a, b);\n/**\n * Returnerer true hvis input (inkludert minutter) er før nåtid\n * @param date Dato som skal sammenlignes\n */\nexport const isBefore = (date) => isBeforeDF(date, new Date());\n/**\n * Returnerer true hvis input er før dagens dato\n * Forskjell med 'isBefore' er at denne tar utgangspunkt i dager\n * @param date Dato som skal sammenlignes\n */\nexport const isBeforeToday = (date) => isBeforeDF(date.setHours(0, 0, 0, 0), new Date().setHours(0, 0, 0, 0));\n/**\n * Sammenligner to datoer og returnerer true hvis den første datoen er før den andre (fungerer også med tid)\n * @param date - Date\n * @param min - minimum dato grense\n */\nexport const isBeforeMinDate = (a, b) => !!b && isBeforeDF(a, b);\n/**\n * Returnerer true hvis input er dagens dato og tid er tidligere enn nåtid\n * @param date Dato som skal sammenlignes\n */\nexport const isEarlierToday = (date) => {\n const now = new Date();\n return isSameDayDF(date, now) && isBeforeDF(date, now);\n};\n/**\n * Returnerer true hvis input er lik 0001-01-01T00:00:00\n * @param date Dato som skal sammenlignes\n */\nexport const isDotNetMinDate = (date) => isEqualDF(date, new Date('0001-01-01T00:00:00'));\n","import { getHostnameWithoutSubdomain } from './cookie';\nexport const __cookieOptions__ = { secure: 'secure' };\n/**\n * Returnerer domene og path for bruk i cookie som skal gjelde på tvers av åpne sider og tjenester\n * @returns domain og path for bruk i cookie\n */\nexport const getCookieDomainAndPath = () => `domain=${getHostnameWithoutSubdomain()}; path=/;`;\n/**\n * Lagrer cookie på tvers av åpne sider og tjenester\n * @param name navn på cookie\n * @param value verdi på cookie\n * @param maxAgeInDays levetid på cookie i dager\n */\nexport const setSharedCookie = (name, value, maxAgeInDays = 365) => {\n const maxAgeInSeconds = maxAgeInDays * 24 * 60 * 60;\n document.cookie = `${name}=${value}; ${getCookieDomainAndPath()} max-age=${maxAgeInSeconds}; ${__cookieOptions__.secure}`;\n};\n/**\n * Sletter cookie på tvers av åpne sider og tjenester\n * @param name navn på cookie\n */\nexport const deleteSharedCookie = (name) => {\n document.cookie = `${name}=; ${getCookieDomainAndPath()} expires=Thu, 01 Jan 1970 00:00:01 GMT;`;\n};\n","export var HeaderFooterEvents;\n(function (HeaderFooterEvents) {\n HeaderFooterEvents[\"setlistenerready\"] = \"hn-webcomp-header-footer-event-setlistenerready\";\n HeaderFooterEvents[\"setfirsttimelogin\"] = \"hn-webcomp-header-footer-event-setfirsttimelogin\";\n HeaderFooterEvents[\"setanonymousheader\"] = \"hn-webcomp-header-footer-event-setanonymousheader\";\n HeaderFooterEvents[\"sethiddenheader\"] = \"hn-webcomp-header-footer-event-sethiddenheader\";\n HeaderFooterEvents[\"setdriftsmeldingpath\"] = \"hn-webcomp-header-footer-event-setdriftsmeldingpath\";\n HeaderFooterEvents[\"sethiddenfooter\"] = \"hn-webcomp-header-footer-event-sethiddenfooter\";\n HeaderFooterEvents[\"setnomarginfooter\"] = \"hn-webcomp-header-footer-event-setnomarginfooter\";\n HeaderFooterEvents[\"setvarslinger\"] = \"hn-webcomp-header-footer-event-setvarslinger\";\n HeaderFooterEvents[\"refreshvarslinger\"] = \"hn-webcomp-header-footer-event-refreshvarslinger\";\n HeaderFooterEvents[\"setonshowsignoutbox\"] = \"hn-webcomp-header-footer-event-setonshowsignoutbox\";\n HeaderFooterEvents[\"setredirectto\"] = \"hn-webcomp-header-footer-event-setredirectto\";\n HeaderFooterEvents[\"setredirecttourlafterlogin\"] = \"hn-webcomp-header-footer-event-setredirecttourlafterlogin\";\n HeaderFooterEvents[\"setloginredirecturl\"] = \"hn-webcomp-header-footer-event-setloginredirecturl\";\n HeaderFooterEvents[\"setpersonvelgerredirecturl\"] = \"hn-webcomp-header-footer-event-setpersonvelgerredirecturl\";\n HeaderFooterEvents[\"setnavigate\"] = \"hn-webcomp-header-footer-event-setnavigate\";\n HeaderFooterEvents[\"setlocation\"] = \"hn-webcomp-header-footer-event-setlocation\";\n HeaderFooterEvents[\"setuserloading\"] = \"hn-webcomp-header-footer-event-setuserloading\";\n HeaderFooterEvents[\"setvispersonvelger\"] = \"hn-webcomp-header-footer-event-setvispersonvelger\";\n HeaderFooterEvents[\"setsurveys\"] = \"hn-webcomp-header-footer-event-setsurveys\";\n HeaderFooterEvents[\"setfooterdata\"] = \"hn-webcomp-header-footer-event-setfooterdata\";\n HeaderFooterEvents[\"soonautosignout\"] = \"hn-webcomp-header-footer-event-soonautosignout\";\n HeaderFooterEvents[\"showappinvitation\"] = \"hn-webcomp-header-footer-event-showappinvitation\";\n})(HeaderFooterEvents || (HeaderFooterEvents = {}));\nexport var CmsBlocksEvents;\n(function (CmsBlocksEvents) {\n CmsBlocksEvents[\"setHiddenPromopanel\"] = \"hn-webcomp-cms-blocks-event-sethiddenpromopanel\";\n})(CmsBlocksEvents || (CmsBlocksEvents = {}));\nexport var CommonEvents;\n(function (CommonEvents) {\n CommonEvents[\"isMounted\"] = \"hn-webcomp-common-ismounted\";\n CommonEvents[\"setLanguage\"] = \"hn-language-event-set-language\";\n CommonEvents[\"attemptNavigation\"] = \"hn-pending-changes-attempt-navigation\";\n})(CommonEvents || (CommonEvents = {}));\nexport var WebComponents;\n(function (WebComponents) {\n WebComponents[\"Promopanel\"] = \"hn-webcomp-cms-block-promopanel\";\n})(WebComponents || (WebComponents = {}));\nexport var StepEvents;\n(function (StepEvents) {\n StepEvents[\"Navigate\"] = \"hn-step-navigate\";\n StepEvents[\"SendFromWebComponent\"] = \"hn-step-send-from-web-component\";\n})(StepEvents || (StepEvents = {}));\n","/* FULLMAKT OG SAMTYKKE */\nexport var SamtykkeType;\n(function (SamtykkeType) {\n SamtykkeType[SamtykkeType[\"None\"] = 0] = \"None\";\n SamtykkeType[SamtykkeType[\"Pha\"] = 1] = \"Pha\";\n SamtykkeType[SamtykkeType[\"Bruksvilkar\"] = 2] = \"Bruksvilkar\";\n SamtykkeType[SamtykkeType[\"RefusjonPasientreiser\"] = 3] = \"RefusjonPasientreiser\";\n SamtykkeType[SamtykkeType[\"UngdomsLosning\"] = 4] = \"UngdomsLosning\";\n})(SamtykkeType || (SamtykkeType = {}));\nexport var SamtykkeLevel;\n(function (SamtykkeLevel) {\n SamtykkeLevel[SamtykkeLevel[\"None\"] = 0] = \"None\";\n SamtykkeLevel[SamtykkeLevel[\"Registerinnsyn\"] = 1] = \"Registerinnsyn\";\n SamtykkeLevel[SamtykkeLevel[\"Journalinnsyn\"] = 2] = \"Journalinnsyn\";\n SamtykkeLevel[SamtykkeLevel[\"Helsetjeneste\"] = 3] = \"Helsetjeneste\";\n})(SamtykkeLevel || (SamtykkeLevel = {}));\nexport var FullmaktType;\n(function (FullmaktType) {\n FullmaktType[FullmaktType[\"OrdinaerFullmakt\"] = 3] = \"OrdinaerFullmakt\";\n FullmaktType[FullmaktType[\"BekreftetFullmakt\"] = 4] = \"BekreftetFullmakt\";\n FullmaktType[FullmaktType[\"UtenSamtykkekompenanseOver12\"] = 7] = \"UtenSamtykkekompenanseOver12\";\n})(FullmaktType || (FullmaktType = {}));\nexport var SamtykkeStatusType;\n(function (SamtykkeStatusType) {\n SamtykkeStatusType[SamtykkeStatusType[\"Samtykket\"] = 0] = \"Samtykket\";\n SamtykkeStatusType[SamtykkeStatusType[\"Trukket\"] = 1] = \"Trukket\";\n SamtykkeStatusType[SamtykkeStatusType[\"Utsatt\"] = 2] = \"Utsatt\";\n})(SamtykkeStatusType || (SamtykkeStatusType = {}));\n/**\n * Representasjoner, samtykke og personverninnstillinger\n */\nexport var RepresentasjonforholdType;\n(function (RepresentasjonforholdType) {\n RepresentasjonforholdType[RepresentasjonforholdType[\"InnloggetBruker\"] = 0] = \"InnloggetBruker\";\n RepresentasjonforholdType[RepresentasjonforholdType[\"Fullmakt\"] = 1] = \"Fullmakt\";\n RepresentasjonforholdType[RepresentasjonforholdType[\"Foreldrerepresentasjon\"] = 2] = \"Foreldrerepresentasjon\";\n RepresentasjonforholdType[RepresentasjonforholdType[\"Saksbehandler\"] = 3] = \"Saksbehandler\";\n RepresentasjonforholdType[RepresentasjonforholdType[\"SaksbehandlerFullmakt\"] = 4] = \"SaksbehandlerFullmakt\";\n})(RepresentasjonforholdType || (RepresentasjonforholdType = {}));\nexport var StatusKodeType;\n(function (StatusKodeType) {\n StatusKodeType[StatusKodeType[\"Reservert\"] = 1] = \"Reservert\";\n StatusKodeType[StatusKodeType[\"IkkeReservert\"] = 2] = \"IkkeReservert\";\n StatusKodeType[StatusKodeType[\"Samtykket\"] = 3] = \"Samtykket\";\n StatusKodeType[StatusKodeType[\"IkkeSamtykket\"] = 4] = \"IkkeSamtykket\";\n StatusKodeType[StatusKodeType[\"TilgangsbegrensningOpprettet\"] = 5] = \"TilgangsbegrensningOpprettet\";\n StatusKodeType[StatusKodeType[\"TilgangsbegrensningFjernet\"] = 6] = \"TilgangsbegrensningFjernet\";\n StatusKodeType[StatusKodeType[\"AnmodningTilbakeTrekkingSamtykke\"] = 7] = \"AnmodningTilbakeTrekkingSamtykke\";\n})(StatusKodeType || (StatusKodeType = {}));\nexport var SessionTimeoutAction;\n(function (SessionTimeoutAction) {\n SessionTimeoutAction[SessionTimeoutAction[\"Default\"] = 0] = \"Default\";\n SessionTimeoutAction[SessionTimeoutAction[\"RequestExtension\"] = 1] = \"RequestExtension\";\n SessionTimeoutAction[SessionTimeoutAction[\"RequestLogout\"] = 2] = \"RequestLogout\";\n})(SessionTimeoutAction || (SessionTimeoutAction = {}));\nexport var PersonverninnstillingKategori;\n(function (PersonverninnstillingKategori) {\n PersonverninnstillingKategori[PersonverninnstillingKategori[\"Samtykke\"] = 1] = \"Samtykke\";\n PersonverninnstillingKategori[PersonverninnstillingKategori[\"Reservasjon\"] = 2] = \"Reservasjon\";\n PersonverninnstillingKategori[PersonverninnstillingKategori[\"Tilgangsbegrensning\"] = 3] = \"Tilgangsbegrensning\";\n})(PersonverninnstillingKategori || (PersonverninnstillingKategori = {}));\nexport var TjenesteTilgangStatus;\n(function (TjenesteTilgangStatus) {\n TjenesteTilgangStatus[TjenesteTilgangStatus[\"None\"] = 0] = \"None\";\n TjenesteTilgangStatus[TjenesteTilgangStatus[\"Ja\"] = 1] = \"Ja\";\n TjenesteTilgangStatus[TjenesteTilgangStatus[\"Nei\"] = 2] = \"Nei\";\n TjenesteTilgangStatus[TjenesteTilgangStatus[\"VetIkke\"] = 3] = \"VetIkke\";\n})(TjenesteTilgangStatus || (TjenesteTilgangStatus = {}));\nexport var Personverninnstilling;\n(function (Personverninnstilling) {\n Personverninnstilling[\"SamtykkeDigitalHelsetjeneste\"] = \"fb640456-ae6f-4664-92c8-c6739d76caec\";\n Personverninnstilling[\"SamtykkeJournalinnsyn\"] = \"dc5b5d14-deed-48e5-bf6d-99ed77f08a09\";\n Personverninnstilling[\"SamtykkeRegisterinnsyn\"] = \"6ea1aa04-fad7-48c8-8432-1acb3fbf6d7b\";\n})(Personverninnstilling || (Personverninnstilling = {}));\nexport class TjenesteType {\n}\nObject.defineProperty(TjenesteType, \"TekniskTjeneste\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: -1\n});\nObject.defineProperty(TjenesteType, \"IkkeInnloggetTjeneste\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 0\n});\nObject.defineProperty(TjenesteType, \"Timeavtaler\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 1\n});\nObject.defineProperty(TjenesteType, \"Fastlegetjenester\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 6\n});\nObject.defineProperty(TjenesteType, \"Legemidler\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 7\n});\nObject.defineProperty(TjenesteType, \"PersonligHelsearkiv\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 8\n});\nObject.defineProperty(TjenesteType, \"Fastlegevisning\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 9\n});\nObject.defineProperty(TjenesteType, \"InnsynPasientjournal\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 10\n});\nObject.defineProperty(TjenesteType, \"InnsynKjernejournal\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 11\n});\nObject.defineProperty(TjenesteType, \"Egenandeler\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 12\n});\nObject.defineProperty(TjenesteType, \"Profil\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 13\n});\nObject.defineProperty(TjenesteType, \"MinHelseForside\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 15\n});\nObject.defineProperty(TjenesteType, \"EksterneTjenester\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 16\n});\nObject.defineProperty(TjenesteType, \"Henvisninger\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 17\n});\nObject.defineProperty(TjenesteType, \"Pasientreiser\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 18\n});\nObject.defineProperty(TjenesteType, \"Forlopskoordinator\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 19\n});\nObject.defineProperty(TjenesteType, \"Meldinger\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 20\n});\nObject.defineProperty(TjenesteType, \"ByttFastlege\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 21\n});\nObject.defineProperty(TjenesteType, \"DialogForlop\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 22\n});\nObject.defineProperty(TjenesteType, \"DialogHelsehjelp\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 23\n});\nObject.defineProperty(TjenesteType, \"Fullmaktsadministrasjon\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 24\n});\nObject.defineProperty(TjenesteType, \"Helsekontakter\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 25\n});\nObject.defineProperty(TjenesteType, \"DialogOkonomi\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 26\n});\nObject.defineProperty(TjenesteType, \"Beslutningsstotte\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 27\n});\nObject.defineProperty(TjenesteType, \"DialogInnsyn\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 28\n});\nObject.defineProperty(TjenesteType, \"DialogPersonvern\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 29\n});\nObject.defineProperty(TjenesteType, \"Helseregistre\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 30\n});\nObject.defineProperty(TjenesteType, \"LoggOverBrukAvResepter\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 31\n});\nObject.defineProperty(TjenesteType, \"SykdomOgKritiskInformasjon\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 32\n});\nObject.defineProperty(TjenesteType, \"Forskning\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 33\n});\nObject.defineProperty(TjenesteType, \"MinHelse\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 34\n});\nObject.defineProperty(TjenesteType, \"Timeadministrasjon\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 35\n});\nObject.defineProperty(TjenesteType, \"Foreldresamtykke\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 36\n});\nObject.defineProperty(TjenesteType, \"DialogEgenHelseUngdom\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 37\n});\nObject.defineProperty(TjenesteType, \"KprTjenester\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 38\n});\nObject.defineProperty(TjenesteType, \"Vaksiner\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 39\n});\nObject.defineProperty(TjenesteType, \"LegemidlerLiB\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 40\n});\nObject.defineProperty(TjenesteType, \"InnsynRegisterinnhold\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 41\n});\nObject.defineProperty(TjenesteType, \"InnsynRegisterbruk\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 42\n});\nObject.defineProperty(TjenesteType, \"EKonsultasjon\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 43\n});\nObject.defineProperty(TjenesteType, \"Reseptfornyelse\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 44\n});\nObject.defineProperty(TjenesteType, \"EKontakt\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 45\n});\nObject.defineProperty(TjenesteType, \"Timebestilling\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 46\n});\nObject.defineProperty(TjenesteType, \"KritiskInfo\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 47\n});\nObject.defineProperty(TjenesteType, \"AapneKjernejournal\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 48\n});\nObject.defineProperty(TjenesteType, \"ProfildataOgKjernejournal\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 49\n});\nObject.defineProperty(TjenesteType, \"HelsekontakterIKjernejournal\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 50\n});\nObject.defineProperty(TjenesteType, \"LegemidlerFraKjernejournal\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 51\n});\nObject.defineProperty(TjenesteType, \"ProfildataOgKjernejournalReservasjon\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 52\n});\nObject.defineProperty(TjenesteType, \"PersonopplysningerFraKjernejournal\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 53\n});\nObject.defineProperty(TjenesteType, \"Donorkort\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 54\n});\nObject.defineProperty(TjenesteType, \"Samtykkeforesporsel\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 55\n});\nObject.defineProperty(TjenesteType, \"DialogForlopInformasjon\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 56\n});\nObject.defineProperty(TjenesteType, \"Pasientreiseradministrasjon\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 57\n});\nObject.defineProperty(TjenesteType, \"NyttHelsenorgeSamtykke\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 58\n});\nObject.defineProperty(TjenesteType, \"InngripendeForPersonvern\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 59\n});\nObject.defineProperty(TjenesteType, \"Skjemautfyller\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 60\n});\nObject.defineProperty(TjenesteType, \"SamvalgUtenLagring\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 61\n});\nObject.defineProperty(TjenesteType, \"MeldeFeilIBesokshistorikkKj\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 62\n});\nObject.defineProperty(TjenesteType, \"Verktoy\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 63\n});\nObject.defineProperty(TjenesteType, \"VerktoyUtforelse\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 64\n});\nObject.defineProperty(TjenesteType, \"InnsynRegisterinnholdReseptformidler\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 65\n});\nObject.defineProperty(TjenesteType, \"DialogSkjemaRegisterinnsyn\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 66\n});\nObject.defineProperty(TjenesteType, \"DialogSkjemaJournalinnsyn\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 67\n});\nObject.defineProperty(TjenesteType, \"DialogSkjemaHelsetjeneste\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 68\n});\nObject.defineProperty(TjenesteType, \"DialogSkjemaHelsetjenesteStreng\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 69\n});\nObject.defineProperty(TjenesteType, \"RegisterinnsynNasjonaleKvalitetsregister\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 70\n});\nObject.defineProperty(TjenesteType, \"ReiserMedRekvisisjon\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 71\n});\n/* CMS-CONTENT-API-SERVICE */\nexport var CmsContentApiVersions;\n(function (CmsContentApiVersions) {\n CmsContentApiVersions[\"V1\"] = \"v1/\";\n CmsContentApiVersions[\"V2\"] = \"v2/\";\n})(CmsContentApiVersions || (CmsContentApiVersions = {}));\n","import { getIdentityProvider, IdentityProvider } from './cookie';\nimport { FullmaktType } from './types/entities';\n/**\n * Returnerer verdien satt på HN User LastLogOn\n */\nexport const getSistPalogget = () => {\n return window.HN?.User?.SistPalogget;\n};\n/**\n * Returnerer verdien satt på HN User Name\n */\nexport const getInnloggetFulltNavn = () => {\n return window.HN?.User?.InnloggetFulltNavn;\n};\n/**\n * Returnerer verdien satt på HN User FirstName\n */\nexport const getInnloggetFornavn = () => {\n return window.HN?.User?.InnloggetFornavn;\n};\n/**\n * Returnerer verdien satt på HN User RepresentertBruker\n */\nexport const getRepresentertBruker = () => {\n return window.HN?.User?.RepresentertBruker;\n};\n/**\n * Returnerer verdien satt på HN User HasRepresentation\n */\nexport const getHarRepresentasjon = () => {\n return window.HN?.User?.HarRepresentasjon;\n};\n/**\n * Returnerer verdien satt på HN User VisPersonvelger\n */\nexport const getVisPersonvelger = () => {\n return window.HN?.User?.VisPersonvelger;\n};\n/**\n * Setter verdien til HN User VisPersonvelger\n */\nexport const setVisPersonvelger = (visPersonvelger) => {\n window.HN = window.HN || {};\n window.HN.User = window.HN.User || {};\n window.HN.User.VisPersonvelger = visPersonvelger;\n};\n/**\n * Returnerer verdien satt på HN User ErRepresentasjon\n */\nexport const getErRepresentasjon = () => {\n return window.HN?.User?.ErRepresentasjon;\n};\n/**\n * Returnerer true når innnbygger representerer en annen via fullmakt\n */\nexport const getErRepresentasjonViaFullmakt = () => getErRepresentasjon() === true && window.HN?.User?.FullmaktEgenskaper !== null;\n/**\n * Returnerer true når innnbygger representerer en annen de har foreldreansvar for\n */\nexport const getErRepresentasjonMedForeldreansvar = () => getErRepresentasjon() === true && window.HN?.User?.ForeldreansvarEgenskaper !== null;\n/**\n * Returnerer verdien satt på HN User SamtykkekonverteringInformert\n */\nexport const getSamtykkekonverteringInformert = () => {\n return window.HN?.User?.SamtykkekonverteringInformert;\n};\n/**\n * Returnerer verdien satt på HN User ErMellom12Og16\n */\nexport const getErMellom12Og16 = () => {\n return window.HN?.User?.ErMellom12Og16;\n};\n/**\n * Returnerer verdien satt på HN User RequiredSamtykkeLevel\n */\nexport const getRequiredSamtykkeLevel = () => {\n return window.HN?.User?.RequiredSamtykkeLevel;\n};\n/**\n * Bestemmer om bruker kan navigere vekk fra siden, uten å måtte bekrefte først\n */\nexport const getAllowNavigation = () => {\n return window.HN?.User?.AllowNavigation ?? false;\n};\n/**\n * Bestemmer om bruker kan navigere vekk fra siden, uten å måtte bekrefte først\n * @param value true dersom navigasjon skal være lov, false dersom bruker må bekrefte eventuelle endringer først\n */\nexport const setAllowNavigation = (value) => {\n window.HN = window.HN || {};\n window.HN.User = window.HN.User || {};\n window.HN.User.AllowNavigation = value;\n};\n/**\n * Returnerer true når FullmaktEgenskaper er analog og ordinær\n */\nexport const getErOrdinaerAnalogFullmakt = () => window.HN?.User?.FullmaktEgenskaper?.FullmaktType === FullmaktType.OrdinaerFullmakt;\n/**\n * Returnerer true når FullmaktEgenskaper er analog og UtenSamtykkekompenanseOver12\n */\nexport const getErIkkeSamtykkeKompetentFullmakt = () => !!window.HN?.User?.FullmaktEgenskaper?.Analog &&\n window.HN?.User?.FullmaktEgenskaper?.FullmaktType === FullmaktType.UtenSamtykkekompenanseOver12;\n/**\n * Returnerer true når bruker er logget inn via helsenorge-app\n */\nexport const getErInnloggetViaHnApp = () => getIdentityProvider() === IdentityProvider.HnApp;\n/**\n * Returnerer true når bruker er logget inn via helsenorge-app for ungdom\n */\nexport const getErInnloggetViaHnAppUngdom = () => getIdentityProvider() === IdentityProvider.HnAppUngdom;\n/**\n * Hent brukerens scopes\n * @returns Liste med scopes fra HN.User.Scopes, eller tom liste\n */\nexport const getScopes = () => {\n return window.HN?.User?.Scopes ?? [];\n};\n/**\n * Sjekk om bruker har scope\n * @param scope Navn på scope i HN.User.Scopes\n * @returns true dersom bruker har scope\n */\nexport const hasScope = (scope) => {\n return getScopes().includes(scope) ?? false;\n};\n/**\n * Sjekk om bruker har innsynssperre\n * @returns true dersom bruker har innsynssperre\n */\nexport const getHarInnsynssperre = () => {\n return window.HN?.User?.HarInnsynssperre;\n};\n/**\n * Sjekk om bruker har reservasjon mot egen bruk av Helsenorge\n * @returns true dersom bruker har reservasjon mot egen bruk av Helsenorge\n */\nexport const getHarReservasjonAktivPaaHelsenorge = () => {\n return window.HN?.User?.HarReservasjonAktivPaaHelsenorge;\n};\n/**\n * Sjekk om bruker har aktivt foreldresamtykke.\n * Denne brukes når en foreldre har samtykket på vegne av barnet at de kan bruke helsenorge selv,\n * og da tilgjengeliggjøres et sett med forhåndsdefinerte tjenester.\n * @returns true dersom bruker har foreldresamtykke\n */\nexport const getHarAktivtForeldreSamtykke = () => {\n return window.HN?.User?.HarAktivtForeldreSamtykke;\n};\n/**\n * Hent innbyggers personverninnstillinger\n * @returns Liste med guids fra HN.User.AktiveUtvalgtePersonverninnstillinger, eller tom liste\n */\nexport const getPersonverninnstillinger = () => {\n return window.HN?.User?.AktiveUtvalgtePersonverninnstillinger ?? [];\n};\n/**\n * Sjekk om bruker har personverninnstilling\n * @param guid Guid i HN.User.AktiveUtvalgtePersonverninnstillinger\n * @returns true dersom bruker har personverninnstilling\n */\nexport const hasPersonverninnstilling = (guid) => {\n return getPersonverninnstillinger().includes(guid) ?? false;\n};\n","import { useEffect } from 'react';\nimport { HeaderFooterEvents, CmsBlocksEvents, CommonEvents, WebComponents, StepEvents } from './constants';\nimport { setAllowNavigation, setVisPersonvelger } from '../hn-user';\nconst dispatchCustomEvent = (selector, eventType, detail) => {\n const element = document.querySelector(selector);\n if (element?.dispatchEvent) {\n element.dispatchEvent(new CustomEvent(eventType, {\n cancelable: true,\n detail,\n }));\n }\n};\nexport const HNeventSetFirstTimeLogin = (isFirstTime = true) => dispatchCustomEvent('hn-webcomp-header', HeaderFooterEvents.setfirsttimelogin, { firstTimeLogin: isFirstTime });\nexport const HNeventSetAnonymousHeader = (isAnonymous = true) => dispatchCustomEvent('hn-webcomp-header', HeaderFooterEvents.setanonymousheader, { anonymousHeader: isAnonymous });\nexport const HNeventSetHiddenHeader = (isHidden = true) => dispatchCustomEvent('hn-webcomp-header', HeaderFooterEvents.sethiddenheader, { hiddenHeader: isHidden });\nexport const HNeventSetHiddenFooter = (isHidden = true) => dispatchCustomEvent('hn-webcomp-footer', HeaderFooterEvents.sethiddenfooter, {\n hiddenFooter: isHidden,\n});\nexport const HNeventSetNoMarginFooter = (noMargin = true) => dispatchCustomEvent('hn-webcomp-footer', HeaderFooterEvents.setnomarginfooter, {\n noMarginFooter: noMargin,\n});\nexport const HNeventRefreshVarslinger = () => dispatchCustomEvent('hn-webcomp-header', HeaderFooterEvents.refreshvarslinger, {});\nexport const HNeventSetDriftsmeldingPath = (path) => dispatchCustomEvent('hn-webcomp-driftspanel', HeaderFooterEvents.setdriftsmeldingpath, { path });\nexport const HNeventSetOnShowSignoutbox = (fn) => dispatchCustomEvent('hn-webcomp-header', HeaderFooterEvents.setonshowsignoutbox, { onShowSignOutBox: fn });\nexport const HNeventSetUserLoading = (userLoading) => dispatchCustomEvent('hn-webcomp-header', HeaderFooterEvents.setuserloading, { userLoading });\nexport const HNeventSoonAutoSignOut = () => dispatchCustomEvent('hn-webcomp-header', HeaderFooterEvents.soonautosignout, {});\nexport const HNeventShowAppInvitation = (onAppOpen, onWebLogin, onClose) => dispatchCustomEvent('hn-webcomp-header', HeaderFooterEvents.showappinvitation, { onAppOpen, onWebLogin, onClose });\nexport const HNeventSetRedirectTo = (redirectTo) => dispatchCustomEvent('hn-webcomp-personvelger', HeaderFooterEvents.setredirectto, { redirectTo });\nexport const HNeventSetRedirectToUrlAfterLogin = (redirectToUrlAfterLogin) => dispatchCustomEvent('hn-webcomp-personvelger', HeaderFooterEvents.setredirecttourlafterlogin, {\n redirectToUrlAfterLogin,\n});\n/**\n * Bestemmer hvilken URL man skal redirecte til etter å klikket på Logg inn-knappen i header\n *\n * @param redirectUrl URL som skal redirectes til\n */\nexport const HNeventSetLoginRedirectUrl = (redirectUrl) => dispatchCustomEvent('hn-webcomp-header', HeaderFooterEvents.setloginredirecturl, { redirectUrl });\n/**\n * Bestemmer hvilken URL man skal redirecte til etter å byttet representasjon via personvelgeren i header\n *\n * @param redirectUrl URL som skal redirectes til\n */\nexport const HNeventSetPersonvelgerRedirectUrl = (redirectUrl) => dispatchCustomEvent('hn-webcomp-header', HeaderFooterEvents.setpersonvelgerredirecturl, { redirectUrl });\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport const HNeventSetSurveys = (surveys) => dispatchCustomEvent('hn-webcomp-footer', HeaderFooterEvents.setsurveys, { surveys });\nexport const HNeventSetFooterData = (data) => dispatchCustomEvent('hn-webcomp-footer', HeaderFooterEvents.setfooterdata, data);\nexport const HNeventSetVisPersonvelger = (visPersonvelger) => {\n setVisPersonvelger(visPersonvelger);\n window.dispatchEvent(new CustomEvent(HeaderFooterEvents.setvispersonvelger, {\n detail: { visPersonvelger },\n }));\n};\n/**\n * Dispatcher event før forsøk på å navigasjon vekk fra siden. Brukes i av webkomponenter (f.eks. header-footer),\n * slik at de kan trigge advarsel i PendingChanges om at navigasjon er i ferd med å skje.\n *\n * @returns true dersom bruker godtar navigasjon bort fra siden\n */\nexport const HNeventAttemptNavigation = () => {\n return window.dispatchEvent(new CustomEvent(CommonEvents.attemptNavigation, {\n cancelable: true,\n }));\n};\n/**\n * Lytter etter forsøk på navigasjon vekk fra siden, og viser dialog med advarsel før man eventuelt får gå videre.\n *\n * @param message Beskjed til brukeren\n * @param hasChanges Returnerer true dersom navigasjon skal blokkeres\n */\nexport const useAttemptNavigationEvent = (message, hasChanges) => HNaddEventListener(CommonEvents.attemptNavigation, window, (event) => {\n if (hasChanges()) {\n const confirmLeave = window.confirm(message);\n if (!confirmLeave) {\n event.preventDefault();\n return;\n }\n else {\n setAllowNavigation(true);\n }\n }\n});\nexport const HNeventSetHiddenPromopanel = (isHidden) => dispatchCustomEvent(WebComponents.Promopanel, CmsBlocksEvents.setHiddenPromopanel, { hiddenPromopanel: isHidden });\nexport const HNeventIsMicroFrontendMounted = (webcomponentName) => {\n const webcomponent = document.querySelector(webcomponentName);\n if (webcomponent?.dispatchEvent) {\n webcomponent.dispatchEvent(new CustomEvent(CommonEvents.isMounted));\n }\n};\nexport const HNaddEventListener = (event, element, handler, passive = false) => {\n useEffect(() => {\n if (element)\n element.addEventListener(event, handler, passive);\n return function cleanup() {\n if (element)\n element.removeEventListener(event, handler);\n };\n });\n};\nexport const HNeventNavigateStep = (stepId, detail) => dispatchCustomEvent(`#${stepId}`, StepEvents.Navigate, detail);\nexport const HNeventSendFromWebComponent = (stepId, detail) => dispatchCustomEvent(`#${stepId}`, StepEvents.SendFromWebComponent, detail);\n","import LanguageLocales from '@helsenorge/core-utils/constants/languages';\nimport { getCookieValue } from './cookie';\nimport { setSharedCookie } from './shared-cookies';\nimport { CommonEvents } from './web-component/constants';\nimport { HNaddEventListener } from './web-component/events';\n/**\n * Navn på cookie som brukes til å lagre brukerens språk\n */\nconst LANGUAGE_COOKIE_NAME = 'hn-language';\n/**\n * Hvor lang tid cookien varer\n */\nconst LANGUAGE_COOKIE_EXPIRES_IN_DAYS = 1;\n/**\n * Hent brukerens språk fra cookie\n * @returns Valgt språk\n */\nexport const getUserLanguage = () => {\n const language = getCookieValue(LANGUAGE_COOKIE_NAME);\n if (typeof language === 'string' && Object.values(LanguageLocales).includes(language)) {\n return language;\n }\n};\n/**\n * Lagre brukerens språk i cookie og dispatch event for bytte av språk\n * @param language Valgt språk\n */\nexport const setUserLanguage = (language, options) => {\n setSharedCookie(LANGUAGE_COOKIE_NAME, language, LANGUAGE_COOKIE_EXPIRES_IN_DAYS);\n document.dispatchEvent(new CustomEvent(CommonEvents.setLanguage, { detail: { language, options } }));\n};\n/**\n * Lytt på endringer i brukerens språk\n * @param callback Funksjon som kalles når brukeren endrer språk\n */\nexport const useSetUserLanguageEvent = (callback) => HNaddEventListener(CommonEvents.setLanguage, document, event => callback(event.detail.language, event.detail.options));\n/**\n * Hent riktig språkkode for bruk i -atributtet\n * @param language Valgt språk\n * @returns ISO 639-1 språkkode https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes\n */\nexport const getIsoLanguageName = (language) => {\n switch (language) {\n case LanguageLocales.NORWEGIAN:\n return 'no';\n case LanguageLocales.NORWEGIAN_NYNORSK:\n return 'nn';\n case LanguageLocales.ENGLISH:\n return 'en';\n case LanguageLocales.LITHUANIAN:\n return 'lt';\n case LanguageLocales.POLISH:\n return 'pl';\n case LanguageLocales.RUSSIAN:\n return 'ru';\n case LanguageLocales.ROMANIAN:\n return 'ro';\n case LanguageLocales.SAMI_NORTHERN:\n return 'se';\n default:\n return undefined;\n }\n};\n/**\n * Oppdater -atributtet med valgt språk ihht ISO 639-1-standard. Brukes på tjenester, på åpne sider settes dette av backend.\n * @param language Valgt språk\n */\nexport const setDocumentLanguage = (language) => {\n const isoLanguage = getIsoLanguageName(language);\n if (isoLanguage) {\n document.documentElement.lang = isoLanguage;\n }\n};\n","import { createAction, createReducer } from '@reduxjs/toolkit';\nimport LanguageLocales from '@helsenorge/core-utils/constants/languages';\nimport { loadLocale } from '@helsenorge/core-utils/date-fns-utils';\nimport { getUserLanguage, setDocumentLanguage } from '../hn-language';\nimport { debug, warn } from '../logger';\nexport const selectCurrentLanguage = (state) => state.currentLanguage;\nexport const selectLanguages = (state) => state.allowedLanguages;\nexport const languageChanged = createAction('language/languageChanged');\nexport const allowedLanguagesReplaced = createAction('language/allowedLanguagesReplaced');\n/**\n * Load date-fns locale for the most commonly used languages\n * @param language Language to load date-fns locale for\n\n */\nexport const safeLoadLocale = (language) => {\n if (language === LanguageLocales.NORWEGIAN ||\n language === LanguageLocales.NORWEGIAN_NYNORSK ||\n language === LanguageLocales.ENGLISH ||\n language === LanguageLocales.SAMI_NORTHERN) {\n loadLocale(language);\n }\n else {\n debug(`Language changed to ${language}. You need to load the correct date-fns locale yourself and call setDefaultOptions.`);\n }\n};\nexport const createLanguageReducer = (allowedLanguages = [LanguageLocales.NORWEGIAN]) => {\n const userLanguage = getUserLanguage();\n const initialCurrentLanguage = userLanguage && allowedLanguages.includes(userLanguage) ? userLanguage : allowedLanguages[0];\n const initialState = {\n allowedLanguages,\n currentLanguage: initialCurrentLanguage,\n };\n safeLoadLocale(initialCurrentLanguage);\n setDocumentLanguage(initialCurrentLanguage);\n return createReducer(initialState, builder => {\n builder.addCase(languageChanged, (state, action) => {\n if (state.allowedLanguages.includes(action.payload)) {\n state.currentLanguage = action.payload;\n safeLoadLocale(action.payload);\n setDocumentLanguage(action.payload);\n }\n else {\n warn(`${action.payload} is not a valid language for this service`);\n }\n });\n builder.addCase(allowedLanguagesReplaced, (state, action) => {\n state.allowedLanguages = action.payload;\n if (!action.payload.includes(state.currentLanguage)) {\n state.currentLanguage = action.payload[0];\n }\n });\n });\n};\n/**\n * En intern referanse til standard språk-reducer.\n * Initialiseres først når den faktisk brukes.\n *\n * @todo I V35 kan koden fjernes, og alle vertikalene må kalle createLanguageReducer() selv for å forenkle denne koden. Proxy er laget for bakoverkompabilitet i V34.\n */\nlet _defaultLanguageReducer = null;\n/**\n * Henter standard språk-reduceren, og oppretter den hvis den ikke finnes.\n *\n * @returns Reducer for språkstate\n */\nconst getDefaultLanguageReducer = () => {\n if (!_defaultLanguageReducer) {\n _defaultLanguageReducer = createLanguageReducer();\n }\n return _defaultLanguageReducer;\n};\n/**\n * Standard språk-reducer som venter med å opprette reduceren til den faktisk brukes.\n *\n * Bruker en Proxy for å sikre at reduceren kan brukes som en funksjon.\n * Kaller getDefaultLanguageReducer for å hente den faktiske reduceren.\n */\nconst defaultLanguageReducer = new Proxy(function (state, action) {\n return getDefaultLanguageReducer()(state, action);\n}, {\n get: (_, prop) => {\n const reducer = getDefaultLanguageReducer();\n return reducer[prop];\n },\n});\nexport default defaultLanguageReducer;\n","/**\n * Returnerer Debug fra HN objektet\n * @returns true dersom window.HN.Debug er satt\n */\nexport const isDebug = () => {\n return !!window?.HN?.Debug;\n};\n","import { createAsyncThunk, createSlice } from '@reduxjs/toolkit';\nimport { isDebug } from '../hn-debug';\nexport const getResourceKey = (project, language) => JSON.stringify({ project, language });\n/**\n * Returnerer ResourceItem fra resourcesState basert på project og language\n * @param resourcesState - incoming ResourcesState\n * @param project - project string\n * @param language - language string\n */\nexport const getResources = (resourcesState, project, language) => {\n const key = getResourceKey(project, language);\n return key in resourcesState ? resourcesState[key].items : {};\n};\n/**\n * Returnerer ResourceItem fra global Staten basert på project\n * @param state - incoming GlobalStateWithResources\n * @param project - project string\n */\nexport const getResourcesFromState = (state, project) => {\n const key = getResourceKey(project, state.language.currentLanguage);\n const value = state.resources[key];\n return value && value.status === 'succeeded' ? value.items : null;\n};\n/**\n * Returnerer Resource fra global Staten basert på project og language\n * Returnerer ny Resource med default status hvis den ikke finnes\n * @param state - incoming GlobalStateWithResources\n * @param project - project string\n */\nexport const getResourcesObjectFromState = (state, project) => {\n const key = getResourceKey(project, state.language.currentLanguage);\n return key in state.resources ? state.resources[key] : { items: {} };\n};\nexport const getResourceWithId = (json) => {\n return Object.keys(json).reduce((previous, key) => {\n if (typeof json[key] === 'string') {\n previous[key] = json[key] + ' [' + key + ']';\n }\n return previous;\n }, {});\n};\nexport function getModifiedResourcesForTest(resourceText) {\n if (isDebug() && window.document.URL.includes('hjelpetekst=true')) {\n return getResourceWithId(resourceText);\n }\n if (process.env.NODE_ENV === 'test') {\n return Object.keys(resourceText).reduce((previous, key) => {\n previous[key] = key;\n return previous;\n }, {});\n }\n return resourceText;\n}\n/**\n * Returnerer false om resources allerede ligger i staten eller er i ferd med å lastes\n * @param state - incoming GlobalStateWithResources\n * @param project - project string\n * @param language - language LanguageLocales\n */\nexport const shouldFetchResources = (state, project, language) => {\n const key = getResourceKey(project, language);\n const resource = state.resources[key];\n return resource?.status !== 'loading' && resource?.status !== 'succeeded';\n};\n/**\n * Hent nye resources basert på project name og language\n */\nexport const fetchResources = createAsyncThunk('resources/fetchResources', async ({ project, language, getResources }, { rejectWithValue }) => {\n try {\n const data = await getResources(project, language);\n return getModifiedResourcesForTest(data);\n }\n catch {\n return rejectWithValue(`Kunne ikke hente resources for ${project} på ${language}`);\n }\n}, {\n condition: ({ project, language }, { getState }) => {\n return shouldFetchResources(getState(), project, language);\n },\n});\nconst initialState = {};\nconst resourcesSlice = createSlice({\n name: 'resources',\n initialState,\n reducers: {},\n extraReducers: builder => {\n builder\n .addCase(fetchResources.pending, (state, action) => {\n const key = getResourceKey(action.meta.arg.project, action.meta.arg.language);\n state[key] = {\n status: 'loading',\n items: null,\n };\n })\n .addCase(fetchResources.fulfilled, (state, action) => {\n const key = getResourceKey(action.meta.arg.project, action.meta.arg.language);\n state[key] = {\n status: 'succeeded',\n items: action.payload,\n };\n })\n .addCase(fetchResources.rejected, (state, action) => {\n const key = getResourceKey(action.meta.arg.project, action.meta.arg.language);\n state[key] = {\n status: 'failed',\n items: null,\n };\n });\n },\n});\nexport default resourcesSlice.reducer;\n","import { useEffect } from 'react';\nimport { useDispatch, useSelector } from 'react-redux';\nimport { selectCurrentLanguage } from '../language';\nimport { getResourcesFromState, fetchResources } from '.';\n/**\n * Get resources from state or retrieve resources as needed\n * @param project Project name\n * @param getResources Utility for reading resources from file\n * @returns Resource object\n */\nconst useResources = (project, getResources) => {\n const dispatch = useDispatch();\n const resources = useSelector(state => getResourcesFromState(state, project));\n const language = useSelector(state => selectCurrentLanguage(state.language));\n useEffect(() => {\n dispatch(fetchResources({ project, language, getResources }));\n }, [dispatch, project, language]);\n return resources;\n};\nexport default useResources;\n","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst SideSomIkkeFinnesSvg = () => {\n return (_jsx(\"svg\", { \"aria-hidden\": true, role: \"img\", tabIndex: -1, color: \"inherit\", viewBox: \"0 0 544 544\", children: _jsxs(\"g\", { \"data-name\": \"Layer 1\", children: [_jsx(\"path\", { fill: \"#fff\", d: \"M246.79 339.47l23.88 4.5 24.19 10.93 25.44-14.69v36.37l-24.87-13.91-21.69 9.25-26.62 5.83-.33-38.28zM207.77 343.69c-13.18 3-32.46 15.26-32.46 15.26s20.28 12.5 27.78 14.9c8.26 2.64 34.42 4.41 34.42 4.41v-39.1s-22.4 2.84-29.74 4.53z\" }), _jsx(\"path\", { fill: \"#42adc5\", d: \"M365.59 283.77a23.75 23.75 0 1023.76 23.76 23.76 23.76 0 00-23.76-23.76zm.72 36l-13.24-13.23 13.24-13.24 13.23 13.24zM47.43 329.07s26.91 8.53 47.47 25.05 38.84 46 38.84 46v32.34l-19-1-27.87-22.39-21.33-23.21L53 360.47 49.19 346zM363.74 459.58h134.05l-.95 41.78H363.99l-.25-41.78zM96.39 212.49h36.82v17.4H96.39zM143.77 212.49v17.4h17.25l-.47-17.4h-16.78zM170.67 211.98v17.91h36.87v-17.4l-36.87-.51zM218.08 212.49v17.4l19.54-.72v-17.19l-19.54.51zM247.56 212.49v16.31H448.88v-16.31H247.56zM392.85 92.56l-1.68 7.85-8.85 11.83-10.98 4.58h-12.91l-13.18-8.7L340 92.56l2.05-10.53 4.34-8.69 12.04-7.78 11.53-1.18 11.22 4.38 7.32 6.87 3.89 8.46.46 8.47z\" }), _jsx(\"circle\", { fill: \"#1d1d1b\", cx: \"332.41\", cy: \"405.05\", r: \"10.4\" }), _jsx(\"path\", { fill: \"#1d1d1b\", d: \"M136.34 176.33h-.14a31.71 31.71 0 01-24.32-15.09 27.43 27.43 0 01-15 4.39c-10.37 0-19.56-5.5-23.87-14.14a20.92 20.92 0 01-9.16 2.1c-10.94 0-19.83-8.27-19.83-18.43s8.89-18.43 19.83-18.43a21.05 21.05 0 014.8.56c3.25-11.89 14.86-20.36 28.23-20.36A30.81 30.81 0 01110.3 100c4.16-8.86 13.64-14.7 24.14-14.7a26.8 26.8 0 0121.5 10.35 27.16 27.16 0 0117.94-6.57c12.7 0 23.51 8.41 25.86 19.82a28.41 28.41 0 016-.65A26.65 26.65 0 01228.29 120a1.5 1.5 0 11-2.5 1.65 23.7 23.7 0 00-20-10.4 25.41 25.41 0 00-6.83.94 1.48 1.48 0 01-1.23-.19 1.47 1.47 0 01-.66-1.06c-1.41-10.75-11.37-18.86-23.17-18.86A24.07 24.07 0 00156.76 99a1.49 1.49 0 01-2.31-.24 23.67 23.67 0 00-20-10.44c-9.86 0-18.7 5.75-22 14.32a1.49 1.49 0 01-2.12.77 27.77 27.77 0 00-13.49-3.48c-12.53 0-23.32 8.21-25.66 19.52a1.53 1.53 0 01-.71 1 1.56 1.56 0 01-1.21.14 17.87 17.87 0 00-5.45-.85c-9.28 0-16.83 6.92-16.83 15.43s7.55 15.43 16.83 15.43a17.8 17.8 0 009.09-2.47 1.5 1.5 0 012.15.72c3.44 8.25 12.2 13.79 21.79 13.79a24.35 24.35 0 0014.67-4.78 1.49 1.49 0 012.23.53c4.19 8.28 12.91 14 22.76 15a1.5 1.5 0 01-.15 3z\" }), _jsx(\"path\", { fill: \"#42adc5\", d: \"M449.24 413.89A27.62 27.62 0 00472.93 398a22.92 22.92 0 0035.78-9.64 16.94 16.94 0 103.65-30.27A25.48 25.48 0 00474.17 341a22.94 22.94 0 00-24.93-15M133.74 432.43h9.63V480s.07 6.75-4.91 7-4.72-7-4.72-7zM161 432.43h9.09V480s-.13 6.79-4.83 7-4.26-7-4.26-7zM208.13 432.43h9.36V480c0 .15 0 6.5-4.38 6.73-5.84.29-5-6.73-5-6.73zM238 432.43h8.76c0 28.46-.07 47.56-.07 47.56s-.54 6.2-3.92 6c-4.88-.28-4.77-6-4.77-6zM296.52 101.08c-6.77-6.23-13.8-31.74-31.39-4.09s-18.95 81-18.41 88.79c.1 1.36.16 11.07.2 26.2H238v-8.44s1.22-14.18-8.91-14.18-11.63 15.45-11.63 15.45V212h-9.36v-6.86s.46-12.63-15-12.22-23 9.68-23 13.9V212H161v-4.86s-.47-9.67-9.16-9.18-8.49 9.45-8.49 9.45V212h-9.63v-4.31s-.06-41.11 12.84-53.13c20.11-18.72 68.57-2.75 76.37-21.53s21.76-66.32 60-72.26c8-1.24 23.56 6.5 30 27.07s-9.64 19.47-16.41 13.24z\" }), _jsx(\"path\", { fill: \"#1d1d1b\", d: \"M95.47 283.49A160.37 160.37 0 0043.57 302L9.45 282.27v49.19l34.06-19.66a141.64 141.64 0 0051.72 18.89M277.79 213.48h-30.23a1.5 1.5 0 010-3h30.23a1.5 1.5 0 010 3zM237.62 213.48h-19.54a1.5 1.5 0 010-3h19.54a1.5 1.5 0 010 3zM207.55 213.48h-36.28a1.5 1.5 0 010-3h36.28a1.5 1.5 0 010 3zM159.88 213.48h-15.54a1.5 1.5 0 010-3h15.54a1.5 1.5 0 010 3z\" }), _jsx(\"path\", { fill: \"#1d1d1b\", d: \"M96 355.62a1.5 1.5 0 01-1.5-1.5V212a1.5 1.5 0 011.5-1.5h37.24a1.5 1.5 0 010 3H97.47v140.62a1.5 1.5 0 01-1.47 1.5zM133.74 433.93H96a1.5 1.5 0 01-1.5-1.5v-14.22a1.5 1.5 0 013 0v12.72h36.27a1.5 1.5 0 110 3zM160.52 433.93H144a1.5 1.5 0 110-3h16.56a1.5 1.5 0 110 3zM207.53 433.93h-37a1.5 1.5 0 010-3h37a1.5 1.5 0 110 3zM237.67 433.93H218a1.5 1.5 0 110-3h19.69a1.5 1.5 0 110 3zM449.24 433.93H247.12a1.5 1.5 0 110-3h200.62V213.48h-137a1.5 1.5 0 010-3h138.5a1.5 1.5 0 011.5 1.5v220.45a1.5 1.5 0 01-1.5 1.5z\" }), _jsx(\"path\", { fill: \"#1d1d1b\", d: \"M449.24 231.39H306.85a1.5 1.5 0 010-3h142.39a1.5 1.5 0 010 3zM296.58 231.39h-49a1.5 1.5 0 010-3h49a1.5 1.5 0 110 3zM237.62 231.39h-19.54a1.5 1.5 0 010-3h19.54a1.5 1.5 0 010 3zM207.55 231.39h-36.88a1.5 1.5 0 110-3h36.88a1.5 1.5 0 010 3zM160.55 231.39h-16.78a1.5 1.5 0 110-3h16.78a1.5 1.5 0 010 3zM133.52 231.39H96a1.5 1.5 0 010-3h37.55a1.5 1.5 0 010 3z\" }), _jsx(\"circle\", { fill: \"#1d1d1b\", cx: \"107.55\", cy: \"221.3\", r: \"2.71\" }), _jsx(\"circle\", { fill: \"#1d1d1b\", cx: \"121.45\", cy: \"221.3\", r: \"2.71\" }), _jsx(\"path\", { fill: \"#1d1d1b\", d: \"M435.78 217.7h6.14v6.14h-6.14zM236.59 379.76a106.75 106.75 0 01-19-1.7 1.5 1.5 0 11.54-2.95 103.51 103.51 0 0019.38 1.65 1.5 1.5 0 010 3z\" }), _jsx(\"path\", { fill: \"#1d1d1b\", d: \"M217.85 378.08h-.19C199.48 375.71 186 368 174.1 360a1.53 1.53 0 01-.66-1.22 1.51 1.51 0 01.63-1.24 119.65 119.65 0 0143.49-17.71 1.5 1.5 0 01.58 3 121.4 121.4 0 00-40.49 16c11.12 7.35 23.77 14.23 40.39 16.39a1.5 1.5 0 01-.19 3z\" }), _jsx(\"path\", { fill: \"#1d1d1b\", d: \"M217.85 342.75a1.5 1.5 0 01-.29-3 114 114 0 0119.93-2.12 1.5 1.5 0 010 3 110.71 110.71 0 00-19.39 2.07 1.46 1.46 0 01-.25.05zM247.12 379.25a1.5 1.5 0 01-.15-3 121.25 121.25 0 0047.1-15.07 1.5 1.5 0 011.49 0l24.06 13.89v-32.73l-24 13.86a1.53 1.53 0 01-1.52 0 106.79 106.79 0 00-46.71-15.2 1.51 1.51 0 01-1.38-1.61 1.48 1.48 0 011.62-1.38 109.7 109.7 0 0147.24 15.18l25.5-14.72a1.49 1.49 0 011.5 0 1.51 1.51 0 01.75 1.3v37.93a1.51 1.51 0 01-.75 1.3 1.49 1.49 0 01-1.5 0l-25.57-14.79a124.44 124.44 0 01-47.53 15zM464.3 283.09c-13.88 0-29.64-3.68-45.85-14.62a1.49 1.49 0 010-2.45 85.84 85.84 0 0127.06-11.9 80.13 80.13 0 0161.35 8.6l18.4-10.63a1.5 1.5 0 012.25 1.3v27.68a1.5 1.5 0 01-2.25 1.3l-18.46-10.65c-8.3 4.6-23.67 11.37-42.5 11.37zM422 267.23c36.75 23.54 70.88 8.94 84 1.46a1.47 1.47 0 011.49 0l17 9.79V256l-16.91 9.76a1.48 1.48 0 01-1.52 0c-39.13-23.36-75.54-3.76-84.06 1.47zM415.4 301.28a1.52 1.52 0 01-.83-.25c-28-18.58-52.92-17.6-68.92-13.51a78.59 78.59 0 00-28.23 13.41 1.5 1.5 0 11-1.92-2.3c.46-.38 11.43-9.41 29.41-14 16.58-4.24 42.42-5.27 71.32 13.92a1.5 1.5 0 01-.83 2.75z\" }), _jsx(\"path\", { fill: \"#1d1d1b\", d: \"M365.72 332.78a25.38 25.38 0 1125.37-25.38 25.4 25.4 0 01-25.37 25.38zm0-47.75a22.38 22.38 0 1022.37 22.37 22.4 22.4 0 00-22.37-22.4z\" }), _jsx(\"path\", { fill: \"#1d1d1b\", d: \"M365.93 321.69a1.5 1.5 0 01-1.06-.44l-12.79-12.79a1.49 1.49 0 01-.43-1.06 1.51 1.51 0 01.43-1.06l12.79-12.78a1.49 1.49 0 012.12 0l12.79 12.78a1.52 1.52 0 01.44 1.06 1.5 1.5 0 01-.44 1.06L367 321.25a1.5 1.5 0 01-1.07.44zm-10.66-14.29l10.66 10.67 10.66-10.67-10.66-10.66zM447.91 415.42a29.24 29.24 0 01-22.4-10.52 24.29 24.29 0 01-15.87 5.86 24.59 24.59 0 01-22.39-14.67h-.56a24.45 24.45 0 110-48.9 23.88 23.88 0 015.46.62 24.41 24.41 0 0140.54-13.32 24.36 24.36 0 0115.95-9.94 1.5 1.5 0 11.48 3 21.39 21.39 0 00-14.9 10.12 1.53 1.53 0 01-1.13.71 1.49 1.49 0 01-1.26-.47 21.42 21.42 0 00-37 12 1.47 1.47 0 01-.67 1.08 1.53 1.53 0 01-1.25.18 21.45 21.45 0 10-6.25 42c.39 0 .77 0 1.15-.06h.29a1.51 1.51 0 011.5 1 21.56 21.56 0 0020 13.77 21.31 21.31 0 0015-6.13 1.51 1.51 0 012.26.18 26.21 26.21 0 0021 10.61h.84a1.5 1.5 0 01.09 3zM305.88 240.87l-48.96-44.57L320 176.19l-14.12 64.68zM366.45 118.84a28 28 0 1128-28 28 28 0 01-28 28zm0-53a25 25 0 1025 25 25 25 0 00-25-25.02zM497.78 502.81h-134a1.5 1.5 0 01-1.5-1.5V460a1.5 1.5 0 011.5-1.5h134a1.5 1.5 0 011.5 1.5v41.33a1.5 1.5 0 01-1.5 1.48zm-132.54-3h131v-38.33h-131zM302.89 472.84h-30.28a1.5 1.5 0 01-1.5-1.5v-66.29a1.5 1.5 0 011.5-1.5h30.28a1.5 1.5 0 011.5 1.5v66.29a1.5 1.5 0 01-1.5 1.5zm-28.78-3h27.28v-63.29h-27.28zM293 293.43h-29.1a1.5 1.5 0 01-1.5-1.5V262.8a1.5 1.5 0 011.5-1.5H293a1.5 1.5 0 011.5 1.5v29.13a1.5 1.5 0 01-1.5 1.5zm-27.63-3h26.13V264.3h-26.1zM116.33 433.93a1.49 1.49 0 01-.78-.22 197.4 197.4 0 01-35.5-29.36C63.93 387.43 45 360.62 46.22 329a1.49 1.49 0 011.93-1.38c.65.2 66 20.41 86.46 75.54a1.5 1.5 0 11-2.81 1.05c-18-48.53-71.87-69.36-82.64-73.1-.67 57.56 67.26 99.6 68 100a1.5 1.5 0 01-.78 2.78z\" }), _jsx(\"path\", { fill: \"#1d1d1b\", d: \"M125.23 423.87a1.5 1.5 0 01-1.29-.73c-26.84-44.91-63.33-77.07-63.69-77.39a1.5 1.5 0 012-2.26c.37.33 37.22 32.8 64.3 78.11a1.5 1.5 0 01-.52 2 1.46 1.46 0 01-.8.27z\" }), _jsx(\"path\", { fill: \"#1d1d1b\", d: \"M89.87 375.57a1.49 1.49 0 01-1.47-1.21l-5.28-27.19a1.5 1.5 0 112.94-.57l5.28 27.19a1.49 1.49 0 01-1.19 1.75 1.33 1.33 0 01-.28.03zM114 406.55a1.51 1.51 0 01-1.41-1.58l1.83-31a1.5 1.5 0 013 .18l-1.82 31a1.5 1.5 0 01-1.6 1.4zM81.53 366.29h-.22L52.77 362a1.5 1.5 0 01.44-3l28.55 4.31a1.5 1.5 0 01-.23 3zM104.34 393.27h-.09l-34.95-2.21a1.5 1.5 0 01.19-3l35 2.21a1.5 1.5 0 01-.1 3zM58.83 258.93a34.58 34.58 0 110-69.16 1.5 1.5 0 01.79 2.78c-.14.08-14.15 9.2-14.23 31.81-.09 22.23 14.11 31.72 14.25 31.81a1.5 1.5 0 01-.81 2.76zm-4.55-65.83a31.58 31.58 0 00.07 62.51c-4.64-4.59-12-14.54-12-31.26.1-16.91 7.32-26.71 11.93-31.25zM332.41 417a11.9 11.9 0 1111.9-11.9 11.91 11.91 0 01-11.9 11.9zm0-20.8a8.9 8.9 0 108.9 8.9 8.91 8.91 0 00-8.9-8.95zM383.88 112.3h-.27a1.5 1.5 0 01-1.21-1.75c.52-2.88-3.33-4.85-8.82-7.32-5-2.25-10.21-4.59-10.21-9 0-6.18 3.63-7.6 6.54-8.75 2.75-1.08 4.73-1.86 4.91-6 .32-7.49-10.57-13.69-10.68-13.76a1.5 1.5 0 111.46-2.61c.52.28 12.62 7.16 12.22 16.5-.26 6.12-3.89 7.55-6.81 8.7s-4.64 1.82-4.64 6c0 2.46 4.29 4.39 8.44 6.26 5.4 2.42 11.52 5.17 10.54 10.59a1.5 1.5 0 01-1.47 1.14z\" }), _jsx(\"path\", { fill: \"#1d1d1b\", d: \"M366.45 108.38a1.54 1.54 0 01-.46-.08c-.6-.19-14.67-4.83-15.23-13.81-.39-6.28 3.7-9.66 7-12.37 2.07-1.7 3.85-3.17 3.87-4.81.06-5.27-11.18-6.07-11.3-6.07a1.51 1.51 0 01-1.41-1.59 1.53 1.53 0 011.59-1.41c.58 0 14.22.92 14.12 9.11 0 3-2.43 5-5 7.08-3 2.52-6.19 5.12-5.9 9.87.36 5.78 9.63 10 13.16 11.15a1.5 1.5 0 01-.46 2.93zM389.14 106a1.5 1.5 0 01-1.48-1.24c-.64-3.76-3.6-4.87-7-6.15-.84-.31-1.71-.63-2.55-1a1.5 1.5 0 011.21-2.75c.76.34 1.55.63 2.39.94 3.75 1.4 8 3 8.94 8.45a1.5 1.5 0 01-1.25 1.75 1.18 1.18 0 01-.26 0zM143.37 433.93h-9.63a1.5 1.5 0 01-1.5-1.5V212a1.5 1.5 0 011.5-1.5h9.63a1.5 1.5 0 011.5 1.5v220.43a1.5 1.5 0 01-1.5 1.5zm-8.13-3h6.63V213.48h-6.63zM170.11 433.93H161a1.5 1.5 0 01-1.5-1.5V212a1.5 1.5 0 011.5-1.5h9.09a1.5 1.5 0 011.5 1.5v220.43a1.5 1.5 0 01-1.48 1.5zm-7.59-3h6.09V213.48h-6.09zM217.49 433.93h-9.36a1.5 1.5 0 01-1.5-1.5v-57.08a1.5 1.5 0 013 0v55.58H216v-54.35a1.5 1.5 0 113 0v55.85a1.5 1.5 0 01-1.51 1.5zM208.13 344.38a1.51 1.51 0 01-1.5-1.5V212a1.5 1.5 0 011.5-1.5h9.36A1.5 1.5 0 01219 212v129.25a1.5 1.5 0 01-3 0V213.48h-6.36v129.4a1.5 1.5 0 01-1.51 1.5zM246.79 433.93H238a1.5 1.5 0 01-1.5-1.5V212a1.5 1.5 0 011.5-1.5h8.88a1.51 1.51 0 011.5 1.49c.16 58.36-.07 193.89-.12 220.46a1.5 1.5 0 01-1.47 1.48zm-7.26-3h5.77c0-29.55.27-159.36.11-217.45h-5.88zM405.53 213.08a1.47 1.47 0 01-1.22-.64 1.5 1.5 0 01.35-2.09 72.4 72.4 0 0016.39-15.75l-21.27 3a1.5 1.5 0 01-1.09-2.7c19.09-13.78 29.5-26.59 33.27-31.74l-18.29.63a1.5 1.5 0 01-1.14-2.52 224.77 224.77 0 0032.34-43.92c-19.48 5.58-40.16 27.56-40.38 27.79a1.49 1.49 0 01-2.51-1.5l6.42-19c-15.19 11.12-33.6 40.31-33.8 40.62a1.5 1.5 0 01-2.74-1.12l5.27-23.63c-17.73 18-29.21 57.4-29.33 57.82a1.5 1.5 0 01-2.93-.24l-2.4-20.33c-4.74 7.8-7.74 19.06-8.93 33.54a1.5 1.5 0 11-3-.25c1.42-17.2 5.37-30.11 11.75-38.35a1.51 1.51 0 012.68.74l2.03 17.41c1.55-4.6 3.92-11.15 7-18.22 7.78-18 16.08-30.62 24.67-37.61a1.5 1.5 0 012.41 1.49l-4.52 20.31c7.25-10.62 21.86-30.48 33.91-37.09a1.49 1.49 0 012.14 1.79l-5.75 17c7.9-7.5 24.69-21.83 40.57-24.88a1.49 1.49 0 011.64 2.12c-.1.21-10.12 20.83-31.93 44.9l17.69-.61a1.49 1.49 0 011.33 2.28c-.39.64-9.31 14.82-31 31.49l18.84-2.65a1.49 1.49 0 011.45.65 1.52 1.52 0 01.06 1.59c-.24.4-5.92 10.08-19.09 19.39a1.5 1.5 0 01-.89.28z\" }), _jsx(\"path\", { fill: \"#1d1d1b\", d: \"M361.83 213.08a1.47 1.47 0 01-.73-.19 1.51 1.51 0 01-.59-2c15.28-27.66 30.5-47.66 45.22-59.46a1.5 1.5 0 011.88 2.34c-14.42 11.55-29.38 31.26-44.47 58.57a1.49 1.49 0 01-1.31.74z\" }), _jsx(\"path\", { fill: \"#1d1d1b\", d: \"M360.61 212.46h-.13a1.51 1.51 0 01-1.36-1.63l3.38-39.05a1.5 1.5 0 113 .26l-3.37 39.05a1.51 1.51 0 01-1.52 1.37zM378.2 186.38a1.5 1.5 0 01-.51-2.92l30.87-10.94a1.5 1.5 0 111 2.83l-30.86 10.94a1.51 1.51 0 01-.5.09z\" })] }) }));\n};\nexport default SideSomIkkeFinnesSvg;\n","var __glob = (map) => (path) => {\n var fn = map[path];\n if (fn) return fn();\n throw new Error(\"Module not found in bundle: \" + path);\n};\n\n// src/resources/index.ts\nimport LanguageLocales from \"@helsenorge/core-utils/constants/languages\";\nimport { getModifiedResourcesForTest } from \"@helsenorge/framework-utils/resources\";\nimport frameworkNbNo from \"./HN.Core.Framework.NPM.JS.nb-NO.json\";\nimport contentNbNo from \"./HN.Tjenester.Content.nb-NO.json\";\n\n// import(\"./**/*.*.json\") in src/resources/index.ts\nvar globImport_json = __glob({\n \"./HN.Core.Framework.NPM.JS.en-GB.json\": () => import(\"./HN.Core.Framework.NPM.JS.en-GB.json\"),\n \"./HN.Core.Framework.NPM.JS.lt-LT.json\": () => import(\"./HN.Core.Framework.NPM.JS.lt-LT.json\"),\n \"./HN.Core.Framework.NPM.JS.nb-NO.json\": () => import(\"./HN.Core.Framework.NPM.JS.nb-NO.json\"),\n \"./HN.Core.Framework.NPM.JS.nn-NO.json\": () => import(\"./HN.Core.Framework.NPM.JS.nn-NO.json\"),\n \"./HN.Core.Framework.NPM.JS.pl-PL.json\": () => import(\"./HN.Core.Framework.NPM.JS.pl-PL.json\"),\n \"./HN.Core.Framework.NPM.JS.ro-RO.json\": () => import(\"./HN.Core.Framework.NPM.JS.ro-RO.json\"),\n \"./HN.Core.Framework.NPM.JS.ru-RU.json\": () => import(\"./HN.Core.Framework.NPM.JS.ru-RU.json\"),\n \"./HN.Core.Framework.NPM.JS.se-NO.json\": () => import(\"./HN.Core.Framework.NPM.JS.se-NO.json\"),\n \"./HN.Tjenester.Content.en-GB.json\": () => import(\"./HN.Tjenester.Content.en-GB.json\"),\n \"./HN.Tjenester.Content.nb-NO.json\": () => import(\"./HN.Tjenester.Content.nb-NO.json\"),\n \"./HN.Tjenester.Content.nn-NO.json\": () => import(\"./HN.Tjenester.Content.nn-NO.json\"),\n \"./HN.Tjenester.Content.se-NO.json\": () => import(\"./HN.Tjenester.Content.se-NO.json\")\n});\n\n// src/resources/index.ts\nvar Projects = {\n FRAMEWORK: \"HN.Core.Framework.NPM.JS\",\n CONTENT: \"HN.Tjenester.Content\"\n};\nvar getResourceItem = (projectName, language) => {\n if (projectName === Projects.FRAMEWORK && language === LanguageLocales.NORWEGIAN) {\n return frameworkNbNo;\n }\n if (projectName === Projects.CONTENT && language === LanguageLocales.NORWEGIAN) {\n return contentNbNo;\n }\n};\nvar getResources = async (projectName, language) => {\n const resources = getResourceItem(projectName, language);\n if (resources) {\n return Promise.resolve(resources);\n }\n try {\n const resources2 = await globImport_json(`./${projectName}.${language}.json`);\n return resources2.default;\n } catch (error) {\n throw new Error(`Failed to load resources for ${projectName} in ${language}: ${error}`);\n }\n};\nvar getResourcesTestHelper = async (projectName, language) => {\n const resources = await getResources(projectName, language);\n if (resources) {\n return getModifiedResourcesForTest(resources);\n }\n throw new Error(`Mangler ressurs ${projectName}.${language}`);\n};\nexport {\n Projects,\n getResources,\n getResourcesTestHelper\n};\n","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { useEffect } from 'react';\nimport Button from '@helsenorge/designsystem-react/components/Button';\nimport Loader from '@helsenorge/designsystem-react/components/Loader';\nimport Title from '@helsenorge/designsystem-react/components/Title';\nimport { track404 } from '@helsenorge/framework-utils/adobe-analytics';\nimport { isAuthorized } from '@helsenorge/framework-utils/hn-authorize';\nimport { getTjenesterUrl, getHelsenorgeUrl } from '@helsenorge/framework-utils/hn-proxy-service';\nimport useResources from '@helsenorge/framework-utils/resources/useResources';\nimport SideSomIkkeFinnesSvg from './side-som-ikke-finnes-svg';\nimport { getResources, Projects } from '../resources';\nimport styles from './styles.module.scss';\nconst PageNotFound = () => {\n const resources = useResources(Projects.FRAMEWORK, getResources);\n const forsideUrl = isAuthorized() ? getTjenesterUrl() : getHelsenorgeUrl();\n useEffect(() => {\n track404();\n }, []);\n if (!resources) {\n return _jsx(Loader, { overlay: \"screen\", size: 'medium' });\n }\n return (!!resources && (_jsxs(\"div\", { className: \"container mb-6 mb-lg-7\", children: [_jsx(\"div\", { className: \"row\", children: _jsxs(\"div\", { className: \"col-md-10 offset-md-1 col-lg-8 offset-lg-2\", children: [_jsx(Title, { htmlMarkup: \"h2\", appearance: \"title1\", children: resources.pageNotFoundHeader }), _jsx(\"p\", { className: styles['page-not-found__preamble'], children: resources.pageNotFoundDescription }), _jsx(Button, { htmlMarkup: \"a\", href: forsideUrl, children: resources.pageNotFoundToStart })] }) }), _jsx(\"div\", { className: \"row\", children: _jsx(\"div\", { className: \"col-md-10 offset-md-1 col-lg-8 offset-lg-2\", children: _jsx(\"div\", { className: \"mt-7\", children: _jsx(SideSomIkkeFinnesSvg, {}) }) }) })] })));\n};\nexport default PageNotFound;\n","/**\n * Get feature-toggle from window.HN.\n * @param featureName name of feature\n */\nexport default function getFeatureToggle(featureName) {\n const getFeatureToggles = window.HN?.PortalCommands?.GetFeatureToggles || window.HN?.Commands?.GetFeatureToggles;\n return !!getFeatureToggles?.FeatureToggles?.[featureName];\n}\n","/**\n * Returns true når brukeren er på mobil (native check on user agent)\n */\nexport const isMobileUA = () => {\n let check = false;\n (function (a) {\n const regexString = '(android|bbd+|meego).+mobile|avantgo|bada/|blackberry\\\n |blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|\\\n midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)/|plucker|\\\n pocket|psp|series(4|6)0|symbian|treo|up.(browser|link)|vodafone|wap|windows ce|xda|\\\n xiino';\n const regexString2 = '1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|\\\n ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|\\\n avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55/|capi|ccwa|cdm-|cell|\\\n chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|\\\n el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|\\\n gf-5|g-mo|go(.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|\\\n hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|/)|ibro|idea|\\\n ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |/)|klon|kpt |\\\n kwc-|kyo(c|k)|le(no|xi)|lg( g|/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50/|\\\n ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |\\\n o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|\\\n ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|\\\n pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|\\\n qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55/|sa(ge|ma|\\\n mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|\\\n sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|\\\n t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|\\\n m-|m3|m5)|tx-9|up(.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|\\\n vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|\\\n whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-';\n const regex = new RegExp(regexString, 'i');\n const regex2 = new RegExp(regexString2, 'i');\n if (regex.test(a) || regex2.test(a.substr(0, 4))) {\n check = true;\n }\n })(navigator.userAgent || navigator.vendor || window.opera);\n return check;\n};\n/**\n * Legger til 'ios-safari' className på body når nettleseren er safari (native check on user agent)\n */\nexport const handleIOSSafariUA = () => {\n if (!document.body.classList.contains('ios-safari')) {\n const ua = window.navigator.userAgent;\n const iOS = isAppleMobileDevice();\n const webkit = !!ua.match(/WebKit/i);\n const iOSSafari = iOS && webkit && !ua.match(/CriOS/i) && !ua.match(/OPiOS/i);\n if (iOSSafari) {\n document.body.classList.add('ios-safari');\n }\n }\n};\nexport const isAndroid = () => {\n return navigator.userAgent.toLowerCase().indexOf('android') > -1;\n};\nexport const isAppleMobileDevice = () => {\n const ua = navigator.userAgent;\n return !!ua.match(/iPad/i) || !!ua.match(/iPhone/i);\n};\n","import { trackError } from './adobe-analytics';\nimport { getUserLanguage } from './hn-language';\nimport { getHelsenorgeUrl } from './hn-proxy-service';\nimport { checkStatus, createBaseHeaders, parseParams } from './hn-service';\nimport { warn } from './logger';\nimport { CmsContentApiVersions } from './types/entities';\n/**\n * Returnerer CmsContentApiUrl fra window.HN.Rest\n */\nexport const getContentApiUrl = () => {\n return !!window.HN && !!window.HN.Rest && !!window.HN.Rest.CmsContentApiUrl ? window.HN.Rest.CmsContentApiUrl : '';\n};\n/**\n * Returnerer CmsContentApiPreviewUrl fra window.HN.Rest\n */\nexport const getContentApiPreviewUrl = () => {\n return !!window.HN && !!window.HN.Rest && !!window.HN.Rest.CmsContentApiPreviewUrl ? window.HN.Rest.CmsContentApiPreviewUrl : '';\n};\n/**\n * Returnerer true dersom URLen man står på inneholder content-api-preview=true\n */\nexport const enableContentApiPreview = () => {\n return !!window && window.location.href.indexOf('content-api-preview=true') !== -1;\n};\nconst handleError = (error, apiUrl) => {\n trackError('level1', 'Feil ved henting av data fra CMS');\n if (error instanceof TypeError && error.message === 'Failed to fetch') {\n warn(`Kall til content-apiet feilet: ${apiUrl}. Mottok ingen respons fra tjenesten.`);\n }\n else if (error instanceof Error) {\n warn(`Kall til content-apiet feilet: ${apiUrl}`, error);\n }\n throw error;\n};\n/**\n * Henter JSON fra content-apiet med fetch(). Returnerer et Promise.\n * Logger eventuelle feil med warn().\n * @param endpoint command strengen som sendes mot content-apiet\n * @param params object med parameters { param1 : 'myparam1', param2: 'myparam2'}\n * @param version setter hvilken versjon av conetnapi som skal kalles (v1/, v2/)\n * @throws {Error} Dersom det skjedde en feil under henting av data fra content-apiet.\n */\nexport const get = (endpoint, params = {}, version = CmsContentApiVersions.V1) => {\n const preview = enableContentApiPreview();\n const hostName = preview ? getContentApiPreviewUrl() : getContentApiUrl();\n const credentials = preview ? 'include' : 'omit'; // Må settes til omit for å kunne bruke wildcard for domener i CORS\n const headers = createBaseHeaders();\n if (preview) {\n headers.append('X-Preview', 'true');\n }\n const { languageCode = getUserLanguage(), ...restParams } = params;\n const apiUrl = `${hostName}/contentapi/internal/${version}${endpoint}${parseParams({ languageCode, ...restParams })}`;\n return fetch(apiUrl, {\n method: 'get',\n credentials,\n headers: headers,\n })\n .then(response => checkStatus(response))\n .catch(error => handleError(error, apiUrl));\n};\n/**\n * Hjelpemetode for å sende get-requester til content-API sammen med createApi fra RTK\n * @param args\n * @returns\n */\nexport const getBaseQuery = async (args) => {\n try {\n const response = await get(...args);\n return { data: response };\n }\n catch (error) {\n return { error: error instanceof Error ? error.message : 'Teknisk feil' };\n }\n};\n/**\n * Send JSON til CMS-apiet med fetch() som POST-request. Returnerer et Promise.\n * Logger eventuelle feil med warn().\n * @param endpoint command strengen som sendes mot apiet\n * @param data object med data { param1 : 'myparam1', param2: 'myparam2'}\n * @param params object med parameters { param1 : 'myparam1', param2: 'myparam2'}\n * @throws {Error} Dersom det skjedde en feil under henting av data fra content-apiet.\n */\nexport const post = (endpoint, data, params = {}) => {\n const hostName = getContentApiUrl();\n const headers = createBaseHeaders();\n const apiUrl = `${hostName}/api/${endpoint}${parseParams(params)}`;\n return fetch(apiUrl, {\n method: 'POST',\n headers: headers,\n body: JSON.stringify(data),\n })\n .then(response => checkStatus(response))\n .catch(error => handleError(error, apiUrl));\n};\n/**\n * Send JSON til CMS-apiet med fetch() som PATCH-request. Returnerer et Promise.\n * Logger eventuelle feil med warn().\n * @param endpoint command strengen som sendes mot apiet\n * @param data object med data { param1 : 'myparam1', param2: 'myparam2'}\n * @param params object med parameters { param1 : 'myparam1', param2: 'myparam2'}\n * @throws {Error} Dersom det skjedde en feil under henting av data fra content-apiet.\n */\nexport const patch = (endpoint, data, params = {}) => {\n const hostName = getContentApiUrl();\n const headers = createBaseHeaders();\n const apiUrl = `${hostName}/api/${endpoint}${parseParams(params)}`;\n return fetch(apiUrl, {\n method: 'PATCH',\n headers: headers,\n body: JSON.stringify(data),\n })\n .then(response => checkStatus(response))\n .catch(error => handleError(error, apiUrl));\n};\n/**\n * Henter JSON fra Helsenorge-proxy (samme domene som content-apiet) med fetch().\n * Skal kun benyttes for åpne api-kall til tjenester der det er satt opp proxy (SOT).\n * Returnerer et Promise.\n * Logger eventuelle feil med warn().\n * @param proxyName navn på api-et/løsningsområdet. Eks pasientjournal eller velgbehandlingssted\n * @param endpoint path for endepunktet inkludert versjon. Eks: api/v1/Behandlinger eller v1/Behandlinger\n * @param params object med parameters { param1 : 'myparam1', param2: 'myparam2'}\n * @throws {Error} Dersom det skjedde en feil under henting av data fra content-apiet.\n */\nexport const getHelsenorgeProxy = (proxyName, endpoint, params) => {\n const apiUrl = getHelsenorgeUrl() + '/proxy/' + proxyName + '/' + endpoint + parseParams(params);\n return fetch(apiUrl, {\n method: 'get',\n credentials: 'omit', // Må settes til omit for å kunne bruke wildcard for domener i CORS\n headers: createBaseHeaders(),\n })\n .then(response => checkStatus(response))\n .catch(error => {\n if (error == 'TypeError: Failed to fetch') {\n warn(`Kall til helsenorge proxy: ${apiUrl}. Mottok ingen respons fra tjenesten.`);\n }\n else {\n warn(`Kall til helsenorge proxy feilet: ${apiUrl}. Feilmelding: ${JSON.stringify(error)}`);\n }\n throw error;\n });\n};\n","import { createAsyncThunk, createSlice } from '@reduxjs/toolkit';\nimport { get } from '../cms-content-api-service';\nexport const selectCmsTjenesteTekster = (state, name) => state.cmsTjenesteTekster[getTjenesteTeksterKey(name, state.language.currentLanguage)];\nexport const selectCmsTjenesteTekstForHjelpetekstId = (state, name, hjelpetekstId) => {\n if (typeof hjelpetekstId === 'string') {\n return selectCmsTjenesteTekster(state, name)?.data?.hjelpetekster?.spesifikkeHjelpetekster?.find(t => t.id?.toLowerCase() === hjelpetekstId?.toLowerCase());\n }\n return selectCmsTjenesteTekster(state, name)?.data?.hjelpetekster?.spesifikkeHjelpetekster?.find(t => hjelpetekstId.map(h => h.toLowerCase()).includes(t.id?.toLowerCase()));\n};\nexport const selectFeedbackResources = (state, name) => selectCmsTjenesteTekster(state, name)?.data?.feedback;\nexport const selectCmsTjenesteContent = (state, name) => selectCmsTjenesteTekster(state, name)?.data?.tjenesteContent;\nexport const selectWordExplanation = (state, name, word) => selectCmsTjenesteTekster(state, name)?.data?.oppslagsverk?.ordforklaringer?.find(o => {\n const wordTrimmed = word.trim().toLowerCase();\n const synonymList = o.synonyms?.split(';').map(s => s.trim().toLowerCase());\n return wordTrimmed === o.title?.trim().toLowerCase() || synonymList?.includes(wordTrimmed);\n});\nexport const getCanShowHjelpetekstInPageHeader = (state, tjenesteNavn, hjelpetekstId) => {\n const spesifikkHjelpeTekst = hjelpetekstId ? selectCmsTjenesteTekstForHjelpetekstId(state, tjenesteNavn, hjelpetekstId) : undefined;\n const tjenesteTekster = selectCmsTjenesteTekster(state, tjenesteNavn);\n return !!spesifikkHjelpeTekst?.hjelpetekst || (tjenesteTekster?.data?.hjelpetekster?.hjelpetekst?.length ?? 0) > 0;\n};\nconst shouldFetchTjenesteTekster = (state, name, language) => {\n const key = getTjenesteTeksterKey(name, language);\n const cmsTjenesteTekster = state.cmsTjenesteTekster[key];\n return cmsTjenesteTekster?.status !== 'loading' && cmsTjenesteTekster?.status !== 'succeeded';\n};\n/**\n * Hent nye tjenestetekster basert på tjenestenavn og language\n */\nexport const fetchTjenesteTekster = createAsyncThunk('cmsTjenesteTekster/fetchTjenesteTekster', async ({ name, language }, { rejectWithValue }) => {\n try {\n const tjenesteTekster = await get('tjeneste', {\n navn: name,\n languageCode: language,\n });\n if (tjenesteTekster) {\n return tjenesteTekster;\n }\n throw new Error(`Kunne ikke hente tjenestetekster for ${name} på ${language}`);\n }\n catch {\n return rejectWithValue(`Kunne ikke hente tjenestetekster for ${name} på ${language}`);\n }\n}, {\n condition: ({ name, language }, { getState }) => {\n return shouldFetchTjenesteTekster(getState(), name, language);\n },\n});\nexport const getTjenesteTeksterKey = (name, languageCode) => `${name}.${languageCode}`;\nconst initialState = {};\nconst cmsTjenesteTeksterSlice = createSlice({\n name: 'cmsTjenesteTekster',\n initialState,\n reducers: {\n addSpesifikkeHjelpetekster(state, action) {\n const key = getTjenesteTeksterKey(action.payload.name, action.payload.language);\n state[key] = {\n status: 'succeeded',\n data: {\n ...state[key]?.data,\n hjelpetekster: {\n ...state[key]?.data?.hjelpetekster,\n spesifikkeHjelpetekster: [\n ...(state[key]?.data?.hjelpetekster?.spesifikkeHjelpetekster ?? []),\n ...action.payload.spesifikkeHjelpetekster,\n ],\n },\n },\n };\n },\n setDefaultHjelpetekst(state, action) {\n const key = getTjenesteTeksterKey(action.payload.name, action.payload.language);\n state[key] = {\n status: 'succeeded',\n data: {\n ...state[key]?.data,\n hjelpetekster: {\n ...state[key]?.data?.hjelpetekster,\n overskift: action.payload.overskift,\n hjelpetekst: action.payload.hjelpetekst,\n },\n },\n };\n },\n },\n extraReducers: builder => {\n builder\n .addCase(fetchTjenesteTekster.pending, (state, action) => {\n const key = getTjenesteTeksterKey(action.meta.arg.name, action.meta.arg.language);\n state[key] = {\n status: 'loading',\n data: null,\n };\n })\n .addCase(fetchTjenesteTekster.fulfilled, (state, action) => {\n const key = getTjenesteTeksterKey(action.meta.arg.name, action.meta.arg.language);\n state[key] = {\n status: 'succeeded',\n data: action.payload,\n };\n })\n .addCase(fetchTjenesteTekster.rejected, (state, action) => {\n const key = getTjenesteTeksterKey(action.meta.arg.name, action.meta.arg.language);\n state[key] = {\n status: 'failed',\n data: null,\n };\n });\n },\n});\nexport const { addSpesifikkeHjelpetekster, setDefaultHjelpetekst } = cmsTjenesteTeksterSlice.actions;\nexport default cmsTjenesteTeksterSlice.reducer;\n","/**\n * Returnerer Path fra HN.Page objektet - eller tom string hvis den ikke finnes\n */\nexport const getPath = () => {\n return window.HN?.Page?.Path ?? '';\n};\n/**\n * Returnerer Version fra HN.Page objektet\n */\nexport const getVersion = () => {\n return window.HN?.Page?.Version;\n};\n/**\n * Returnerer Assets fra HN.Page objektet\n */\nexport const getAssets = () => {\n return window.HN?.Page?.Assets;\n};\n/**\n * Returnerer Assets fra HN.Page objektet - eller tom string hvis den ikke finnes\n */\nexport const getAssetsUrl = () => {\n return window.HN?.Page?.Assets ?? '';\n};\n/**\n * Returnerer VerticalAssetsPath fra HN.Page objektet - eller tom string hvis den ikke finnes\n */\nexport const getVerticalAssetsPath = () => {\n return window.HN?.Page?.VerticalAssetsPath ?? '';\n};\n/**\n * Oppdaterer Path key på HN.Page objektet\n * @param newPath verdien som settes i Path\n */\nexport const setPath = (newPath) => {\n window.HN = window.HN || {};\n window.HN.Page = window.HN.Page || {};\n window.HN.Page.Path = newPath;\n};\n/**\n * Hent ID som skal brukes på h1-elementet på siden\n * @returns ID\n */\nexport const getSidetittelId = () => 'sidetittel';\n","import { hasPersonverninnstilling } from './hn-user';\nimport { Personverninnstilling } from './types/entities';\nexport var Samtykke;\n(function (Samtykke) {\n /** Bruker har ikke samtykket til Helsenorge */\n Samtykke[Samtykke[\"Ingen\"] = 0] = \"Ingen\";\n /** Bruker har basis-samtykke */\n Samtykke[Samtykke[\"Basis\"] = 1] = \"Basis\";\n /** Bruker har Basis+-samtykke */\n Samtykke[Samtykke[\"BasisPluss\"] = 2] = \"BasisPluss\";\n /** Bruker har fullt samtykke */\n Samtykke[Samtykke[\"Full\"] = 3] = \"Full\";\n})(Samtykke || (Samtykke = {}));\n/**\n * Sjekker hvilket nivå av bruk av helsenorge innbygger har samtykket til.\n * @returns Full, BasisPluss, Basis eller Ingen\n */\nexport const getSamtykke = () => {\n if (hasPersonverninnstilling(Personverninnstilling.SamtykkeDigitalHelsetjeneste)) {\n return Samtykke.Full;\n }\n if (hasPersonverninnstilling(Personverninnstilling.SamtykkeJournalinnsyn)) {\n return Samtykke.BasisPluss;\n }\n if (hasPersonverninnstilling(Personverninnstilling.SamtykkeRegisterinnsyn)) {\n return Samtykke.Basis;\n }\n return Samtykke.Ingen;\n};\n/**\n * Sjekk om bruker har samtykket til bruk av Helsenorge\n * @returns true dersom bruker har samtykket\n */\nexport const hasSamtykke = () => getSamtykke() !== Samtykke.Ingen;\n/**\n * Sjekker etter om bruker har fullt samtykke\n * @returns true dersom bruker har fullt samtykke\n */\nexport const hasFulltSamtykke = () => getSamtykke() == Samtykke.Full;\n/**\n * Sjekker etter om bruker har samtykket til bare basis eller basis+\n * @returns true dersom bruker har samtykket til bare basis eller basis+\n */\nexport const hasBasisOrBasisPlussSamtykke = () => getSamtykke() == Samtykke.Basis || getSamtykke() == Samtykke.BasisPluss;\n/**\n * Sjekk om bruker ikke har samtykket til bruk av Helsenorge\n * @returns true dersom bruker ikke har samtykket\n */\nexport const doesNotHaveSamtykke = () => !hasSamtykke();\n","import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { Link } from 'react-router-dom';\nimport Icon from '@helsenorge/designsystem-react/components/Icon';\nimport ChevronLeft from '@helsenorge/designsystem-react/components/Icons/ChevronLeft';\nimport { useHover } from '@helsenorge/designsystem-react';\nimport { trackNavigation } from '@helsenorge/framework-utils/adobe-analytics';\nimport styles from './styles.module.scss';\nconst Breadcrumb = ({ homeLabel, homeUrl, link, ariaLabel = 'Brødsmulesti' }) => {\n const { hoverRef, isHovered } = useHover();\n if (!homeLabel || !homeUrl) {\n return null;\n }\n const innerContent = (_jsxs(_Fragment, { children: [_jsx(Icon, { svgIcon: ChevronLeft, isHovered: isHovered }), _jsx(\"span\", { className: styles.breadcrumb__label, children: link ? link.name : homeLabel })] }));\n const handleLinkClick = () => trackNavigation('brødsmulesti', link ? link.name : homeLabel, 'brødsmulesti');\n return (_jsxs(_Fragment, { children: [_jsx(\"div\", { className: styles.border }), _jsx(\"div\", { className: 'container', children: _jsx(\"div\", { className: 'row', children: _jsx(\"div\", { className: 'col', children: _jsx(\"nav\", { className: styles.breadcrumb__content, \"aria-label\": ariaLabel, children: link?.renderAsRouterLink ? (_jsx(Link, { ref: hoverRef, className: styles.breadcrumb__link, to: link.url, onClick: handleLinkClick, children: innerContent })) : (_jsx(\"a\", { ref: hoverRef, className: styles.breadcrumb__link, href: link?.url ?? homeUrl, onClick: handleLinkClick, children: innerContent })) }) }) }) }), _jsx(\"div\", { className: styles.border })] }));\n};\nexport default Breadcrumb;\n","/// \nimport { decapitalize } from '@helsenorge/core-utils/string-utils';\nimport { error } from '@helsenorge/framework-utils/logger';\nexport function currentConfiguration() {\n return (window.HN?.Page ?? {});\n}\nexport function resolve(originalKey, resources) {\n const key = decapitalize(originalKey);\n if (Object.prototype.hasOwnProperty.call(resources, key)) {\n return resources[key];\n }\n error(`The key ${key} is missing in HNTjenesterContent`);\n return undefined;\n}\nexport function getCurrentConfiguration() {\n return (window.HN?.Page ?? {});\n}\nexport function getService(resources) {\n const configuration = getCurrentConfiguration();\n if (resources && configuration && configuration.Tjenestemeny) {\n return resolve(configuration.Tjenestemeny, resources);\n }\n return undefined;\n}\nexport function getRedirectToUrlAfterLogin() {\n const configuration = getCurrentConfiguration();\n if (configuration && configuration.RedirectToUrlAfterLogin) {\n return configuration.RedirectToUrlAfterLogin;\n }\n return;\n}\nexport function getDelAvForeldresamtykke() {\n const configuration = getCurrentConfiguration();\n if (configuration && configuration.DelAvForeldresamtykke) {\n return configuration.DelAvForeldresamtykke;\n }\n return undefined;\n}\n","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport BreadcrumbComponent from '@helsenorge/core-cms/breadcrumb';\nimport { getTjenesterUrl, getHelsenorgeUrl } from '@helsenorge/framework-utils/hn-proxy-service';\nimport useResources from '@helsenorge/framework-utils/resources/useResources';\nimport { currentConfiguration, resolve } from '../common/configuration';\nimport { getResources, Projects } from '../resources';\nimport styles from './styles.module.scss';\nconst getBreadcrumbLink = (contentResources, pageConfiguration) => {\n if (contentResources && pageConfiguration?.NavigateBackLinkTitle && pageConfiguration.NavigateBackLinkURL) {\n const name = resolve(pageConfiguration.NavigateBackLinkTitle, contentResources);\n let url = resolve(pageConfiguration.NavigateBackLinkURL, contentResources);\n if (name && url) {\n const helsenorgeUrlPlaceholder = '{HelsenorgeUrl}'; // TODO: Bør kanskje flyttes til utils-funksjon\n if (url.includes(helsenorgeUrlPlaceholder)) {\n url = url.replace(helsenorgeUrlPlaceholder, getHelsenorgeUrl());\n }\n return {\n name: name,\n url: url,\n };\n }\n else {\n return undefined;\n }\n }\n else {\n return undefined;\n }\n};\nconst Breadcrumb = props => {\n const resources = useResources(Projects.FRAMEWORK, getResources);\n const contentResources = useResources(Projects.CONTENT, getResources);\n const pageConfiguration = currentConfiguration();\n const pageBreadcrumbLinks = getBreadcrumbLink(contentResources, pageConfiguration);\n const homeLabel = resources?.breadCrumb_Forsiden;\n const getCmsBreadcrumbLink = (link) => {\n let name = undefined;\n if (link && link.resourceId && contentResources) {\n name = contentResources[link.resourceId];\n }\n else if (link && link.name) {\n name = link.name;\n }\n return !name\n ? undefined\n : {\n name: name,\n url: link ? link.url : '',\n renderAsRouterLink: link?.renderAsRouterLink,\n };\n };\n return (_jsx(\"div\", { className: styles.breadcrumb, children: _jsx(BreadcrumbComponent, { homeLabel: homeLabel, homeUrl: getTjenesterUrl(), link: getCmsBreadcrumbLink(props.link || pageBreadcrumbLinks) }) }));\n};\nexport default Breadcrumb;\n","import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport NotificationPanel from '@helsenorge/designsystem-react/components/NotificationPanel';\nimport Spacer from '@helsenorge/designsystem-react/components/Spacer';\nimport styles from './styles.module.scss';\nconst ErrorMessage = ({ label, labelId, description, correlationId }) => {\n return (_jsxs(NotificationPanel, { role: \"alert\", variant: 'error', label: label, labelId: labelId, children: [description && _jsx(\"p\", { children: description }), correlationId && (_jsxs(_Fragment, { children: [_jsx(Spacer, { size: \"s\" }), _jsx(\"p\", { className: styles.errormessage__correlationid, children: `Id: ${correlationId}` })] }))] }));\n};\nexport default ErrorMessage;\n","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport React from 'react';\nimport { trackError } from '@helsenorge/framework-utils/adobe-analytics';\nimport { isDebug } from '@helsenorge/framework-utils/hn-debug';\nimport { HelsenorgeProxyError } from '@helsenorge/framework-utils/hn-proxy-service';\nimport { error as logError } from '@helsenorge/framework-utils/logger';\nimport ErrorMessage from '../error-message';\nexport default function withErrorBoundary(COMPONENT) {\n class GuardedComponent extends React.Component {\n constructor(props) {\n super(props);\n this.state = {\n error: false,\n };\n }\n componentDidCatch(error) {\n trackError('level3', 'Uhåndtert teknisk feil');\n this.setState({ error: true });\n if (error instanceof HelsenorgeProxyError) {\n this.setState({ correlationId: error.correlationId });\n }\n if (isDebug() || process.env.NODE_ENV !== 'production') {\n this.setState({ name: `${error.name} ${error.message}`, message: error.stack });\n }\n logError('Error in ' + COMPONENT.name + ' component or a child component', error);\n }\n render() {\n if (this.state.error) {\n return (_jsx(ErrorMessage, { label: this.state.name || (this.props.resources && this.props.resources.unknownError), description: this.state.message || (this.props.resources && this.props.resources.unknownErrorAction), correlationId: this.state.correlationId }));\n }\n return _jsx(COMPONENT, { ...this.props });\n }\n }\n return GuardedComponent;\n}\n","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport React from 'react';\nimport withErrorBoundary from './with-error-boundary';\nclass ErrorPanel extends React.Component {\n render() {\n return _jsx(\"div\", { children: this.props.children });\n }\n}\nexport default withErrorBoundary(ErrorPanel);\n","import EmoticonAnnoyed from '@helsenorge/designsystem-react/components/Icons/EmoticonAnnoyed';\nimport EmoticonDelighted from '@helsenorge/designsystem-react/components/Icons/EmoticonDelighted';\nimport EmoticonDisappointed from '@helsenorge/designsystem-react/components/Icons/EmoticonDisappointed';\nimport EmoticonHappy from '@helsenorge/designsystem-react/components/Icons/EmoticonHappy';\nimport EmoticonMeh from '@helsenorge/designsystem-react/components/Icons/EmoticonMeh';\nexport const getIcon = (value) => {\n switch (value) {\n case '5':\n return EmoticonDelighted;\n case '4':\n return EmoticonHappy;\n case '3':\n return EmoticonMeh;\n case '2':\n return EmoticonDisappointed;\n case '1':\n return EmoticonAnnoyed;\n }\n};\n","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport React from 'react';\nimport classNames from 'classnames';\nimport Icon from '@helsenorge/designsystem-react/components/Icon';\nimport { theme, useHover } from '@helsenorge/designsystem-react';\nimport { getIcon } from './utils';\nimport styles from './styles.module.scss';\nconst ScoreInput = React.forwardRef(({ label, value, disabled, selected, expanded, onChange, ...rest }, ref) => {\n const { hoverRef, isHovered } = useHover();\n const id = `feedback-score-${value}`;\n return (_jsxs(\"label\", { htmlFor: id, className: classNames(styles.scoreinput, selected && styles['scoreinput--selected']), ref: hoverRef, children: [_jsx(\"input\", { type: \"radio\", value: value, disabled: disabled, \"aria-expanded\": expanded, className: styles.scoreinput__radio, id: id, ref: ref, onChange: onChange, ...rest }), _jsx(Icon, { svgIcon: getIcon(value), color: selected ? theme.palette.white : theme.palette.black, isHovered: isHovered }), _jsx(\"span\", { className: styles.scoreinput__text, children: label })] }));\n});\nScoreInput.displayName = 'ScoreInput';\nexport default ScoreInput;\n","export const scoreValueList = ['1', '2', '3', '4', '5'];\n","import { pushToDataLayer } from '@helsenorge/framework-utils/adobe-analytics';\nexport const trackScore = (score) => {\n const testData = {\n event: 'feedback',\n feedback: {\n name: 'brukertilfredshet: score',\n score: score,\n label: score,\n },\n };\n pushToDataLayer(testData);\n};\nexport const trackComment = () => {\n const testData = {\n event: 'feedback',\n feedback: {\n name: 'brukertilfredshet: tilbakemelding',\n },\n };\n pushToDataLayer(testData);\n};\n","// Removes specific characters from string\nexport const sanitizeValue = (string) => {\n return string\n .replace(//g, '') // script>\n .replace(/(\\\\|\\/)/, ''); // / or \\\n};\n// Remove email address from string\nexport const removeEmail = (string) => {\n return string.replace(/([^.@\\s]+)(\\.[^.@\\s]+)*@([^.@\\s]+\\.)+([^.@\\s]+)/, '*epost*');\n};\n","import { sanitizeValue } from '@helsenorge/core-cms/userfeedback/utils/string';\nimport { post, patch } from '@helsenorge/framework-utils/cms-content-api-service';\nexport const createFeedback = async (body) => {\n return post(`usertjenestefeedback`, body);\n};\nexport const updateFeedback = async (body) => {\n const sanitized = { id: body.id, score: body.score, comment: body.comment && sanitizeValue(body.comment) };\n return patch(`usertjenestefeedback`, sanitized);\n};\n","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { useEffect, useState } from 'react';\nimport { useForm } from 'react-hook-form';\nimport Button from '@helsenorge/designsystem-react/components/Button';\nimport FormGroup from '@helsenorge/designsystem-react/components/FormGroup';\nimport Label, { Sublabel } from '@helsenorge/designsystem-react/components/Label';\nimport NotificationPanel from '@helsenorge/designsystem-react/components/NotificationPanel';\nimport Spacer from '@helsenorge/designsystem-react/components/Spacer';\nimport TextArea from '@helsenorge/designsystem-react/components/Textarea';\nimport Validation from '@helsenorge/designsystem-react/components/Validation';\nimport { debounce } from '@helsenorge/designsystem-react/utils/debounce';\nimport { error as logError } from '@helsenorge/framework-utils/logger';\nimport ScoreInput from './score-input';\nimport { scoreValueList } from './utils/entities';\nimport { trackComment, trackScore } from '../feedback/utils/analytics';\nimport * as api from '../feedback/utils/api';\nimport styles from './styles.module.scss';\nexport const CHARACTER_LIMIT = 250;\nexport const TEXTAREA_ID = 'textarea-description';\nexport const DESCRIPTION_ID = 'feedback-description';\nconst FeedbackForm = ({ url, pageTitle, resources }) => {\n const { register, handleSubmit, watch, setError, formState: { errors, isSubmitting, isSubmitSuccessful }, } = useForm();\n const [id, setId] = useState();\n const score = watch('score');\n const showComment = id !== undefined;\n useEffect(() => {\n if (!score) {\n return;\n }\n const handleUpdate = async () => {\n if (id) {\n updateFeedback({ id, score });\n trackScore(score);\n }\n };\n const [debouncedUpdate, teardown] = debounce(handleUpdate, 1000);\n if (id) {\n debouncedUpdate();\n }\n else {\n createFeedback({ score, url: url, pageTitle: pageTitle });\n }\n return () => {\n teardown();\n };\n }, [score]);\n const createFeedback = async (data) => {\n try {\n const createFeedbackResponse = await api.createFeedback(data);\n setId(createFeedbackResponse?.id);\n trackScore(data.score);\n }\n catch {\n setError('root', { message: resources.serverErrorMessage });\n }\n };\n const updateFeedback = async (data) => {\n try {\n if (id) {\n await api.updateFeedback(data);\n if (data.comment) {\n trackComment();\n }\n }\n }\n catch (e) {\n setError('root', { message: resources.serverErrorMessage });\n throw e;\n }\n };\n if (isSubmitSuccessful) {\n return _jsx(NotificationPanel, { role: \"alert\", label: resources.successMessage, variant: \"success\", compactVariant: \"basic\", size: \"medium\" });\n }\n if (errors.root) {\n return _jsx(NotificationPanel, { label: resources.serverErrorMessage, variant: \"error\", compactVariant: \"basic\", size: \"medium\" });\n }\n const getButtonAriaLabel = (value) => {\n switch (value) {\n case '5':\n return resources.veryPleasedText;\n case '4':\n return resources.slightlyPleasedText;\n case '3':\n return resources.neutralText;\n case '2':\n return resources.slightlyDispleasedText;\n case '1':\n return resources.displeasedText;\n }\n };\n const onSubmit = async (data) => {\n if (!id || id === undefined) {\n logError('Skjema for tilbakemelding fra bruker ble forsøkt sendt inn uten id.');\n setError('root', { message: resources.serverErrorMessage });\n }\n try {\n await api.updateFeedback({\n id: id,\n score: data.score,\n comment: data.comment,\n });\n if (data.comment) {\n trackComment();\n }\n }\n catch {\n setError('root', { message: resources.serverErrorMessage });\n }\n };\n return (_jsx(Validation, { errorTitle: resources.serverErrorMessage, children: _jsxs(\"form\", { onSubmit: handleSubmit(onSubmit), children: [_jsx(FormGroup, { legend: resources.questionText, fieldsetClassName: styles.feedbackform__questionwrapper, children: _jsx(\"div\", { className: styles.feedbackform__scores, children: scoreValueList.map(value => (_jsx(ScoreInput, { label: getButtonAriaLabel(value), value: value, selected: score === value, disabled: isSubmitting, expanded: showComment, ...register('score') }, value))) }) }), showComment && (_jsx(FormGroup, { error: errors?.comment ? errors?.comment.message : undefined, children: _jsx(TextArea, { label: _jsx(Label, { htmlFor: TEXTAREA_ID, className: styles.feedbackform__commentlabel, labelTexts: [{ text: resources.commentLabel }, { text: resources.commentSubLabel }], sublabel: _jsx(Sublabel, { id: DESCRIPTION_ID, sublabelTexts: [{ text: resources.commentDescription, type: 'subdued' }] }) }), textareaId: TEXTAREA_ID, \"aria-describedby\": DESCRIPTION_ID, maxCharacters: CHARACTER_LIMIT, maxText: resources.maxText, width: 48, disabled: isSubmitting, ...register('comment', { maxLength: { value: CHARACTER_LIMIT, message: resources.commentTooLongErrorMessage } }) }) })), _jsx(Spacer, { size: \"m\" }), _jsx(Button, { type: \"submit\", disabled: isSubmitting, className: styles.feedbackform__button, children: resources.submitButtonText })] }) }));\n};\nconst Feedback = ({ ...props }) => (_jsx(\"div\", { className: styles.feedbackform, children: _jsx(FeedbackForm, { ...props }) }));\nexport default Feedback;\n","import { useDispatch, useSelector } from 'react-redux';\nexport const useAppDispatch = useDispatch.withTypes();\nexport const useAppSelector = useSelector.withTypes();\n","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport { useEffect } from 'react';\nimport { fetchTjenesteTekster, selectFeedbackResources } from '@helsenorge/framework-utils/cms-tjeneste-tekster';\nimport { getPath } from '@helsenorge/framework-utils/hn-page';\nimport { selectCurrentLanguage } from '@helsenorge/framework-utils/language';\nimport FeedbackForm from '..';\nimport { useAppDispatch, useAppSelector } from '../../store/hooks';\nconst FeedbackContainer = ({ url, pageTitle, tjenesteNavn = getPath() }) => {\n const dispatch = useAppDispatch();\n const feedbackResources = useAppSelector(state => selectFeedbackResources(state, tjenesteNavn));\n const language = useAppSelector(state => selectCurrentLanguage(state.language));\n useEffect(() => {\n dispatch(fetchTjenesteTekster({ name: tjenesteNavn, language }));\n }, [tjenesteNavn, language]);\n if (!feedbackResources) {\n return null;\n }\n return _jsx(FeedbackForm, { url: url, pageTitle: pageTitle, resources: feedbackResources });\n};\nexport default FeedbackContainer;\n","import { useDispatch, useSelector } from 'react-redux';\nimport { setDocumentLanguage, useSetUserLanguageEvent } from '../hn-language';\nimport { languageChanged, selectCurrentLanguage, selectLanguages } from '.';\n/**\n * useLanguageEvent lytter på global språkbytte-event og oppdater document language og global state\n * @param callback Optional callback som må returnere true for at hooken skal oppdatere språket. Brukes for å unngå at store oppdateres unødvendig mange ganger.\n */\nconst useLanguageEvent = (callback) => {\n const dispatch = useDispatch();\n const currentLanguage = useSelector(state => selectCurrentLanguage(state.language));\n const supportedLanguages = useSelector(state => selectLanguages(state.language));\n useSetUserLanguageEvent((newLanguage, options) => {\n if (callback && !callback(options)) {\n return;\n }\n if (newLanguage === currentLanguage) {\n return;\n }\n if (!supportedLanguages.includes(newLanguage)) {\n return;\n }\n // @todo: Fjern kallet til setDocumentLanguage i v35, dette håndteres nå i reduceren\n setDocumentLanguage(newLanguage);\n dispatch(languageChanged(newLanguage));\n });\n};\nexport default useLanguageEvent;\n","import LanguageLocales from '@helsenorge/core-utils/constants/languages';\nimport resources from '../resources/HN.Core.Framework.NPM.JS.nb-NO.json';\nconst LanguageNames = {\n [LanguageLocales.NORWEGIAN]: resources.language_norwegian,\n [LanguageLocales.ENGLISH]: resources.language_english,\n [LanguageLocales.SAMI_NORTHERN]: resources.language_sami,\n [LanguageLocales.NORWEGIAN_NYNORSK]: resources.language_nynorsk,\n [LanguageLocales.LITHUANIAN]: resources.language_lithuanian,\n [LanguageLocales.POLISH]: resources.language_polish,\n [LanguageLocales.RUSSIAN]: resources.language_russian,\n [LanguageLocales.ROMANIAN]: resources.language_romanian,\n};\n/**\n * Used to handle a situation where both bokmål and nynorsk are available, in which\n * Bokmål and Nynorsk should appear in the languagepicker, and not Norsk and Nynorsk.\n */\nexport const BokmaalLanguageName = resources.language_bokmaal;\nexport default LanguageNames;\n","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport classNames from 'classnames';\nimport Icon, { IconSize } from '@helsenorge/designsystem-react/components/Icon';\nimport Globe from '@helsenorge/designsystem-react/components/Icons/Globe';\nimport LanguageLocales from '@helsenorge/core-utils/constants/languages';\nimport { theme } from '@helsenorge/designsystem-react';\nimport { trackLanguage } from '@helsenorge/framework-utils/adobe-analytics';\nimport { selectCurrentLanguage } from '@helsenorge/framework-utils/language';\nimport useResources from '@helsenorge/framework-utils/resources/useResources';\nimport LanguageNames, { BokmaalLanguageName } from '../language-picker-wrapper/resources';\nimport { getResources, Projects } from '../resources';\nimport { useAppSelector } from '../store/hooks';\nimport styles from './styles.module.scss';\nconst getLanguageName = (language, languages) => {\n if (language == LanguageLocales.NORWEGIAN && languages.includes(LanguageLocales.NORWEGIAN_NYNORSK)) {\n return BokmaalLanguageName;\n }\n return LanguageNames[language];\n};\nexport const LanguagePicker = ({ languages, onLanguageChange, className, testId }) => {\n const selectedLanguage = useAppSelector(state => selectCurrentLanguage(state.language));\n const resources = useResources(Projects.FRAMEWORK, getResources);\n const handleLanguageChange = async (newLanguage) => {\n trackLanguage(newLanguage);\n onLanguageChange(newLanguage);\n };\n const languageChangedMessage = resources?.languageChanged ?? `Language changed to ${LanguageNames[selectedLanguage]}`;\n return (_jsxs(\"nav\", { className: classNames(styles['language-picker'], className), \"aria-label\": resources?.language_picker_label ?? 'Språkvalg', children: [_jsx(Icon, { className: styles['language-picker__icon'], size: IconSize.XSmall, svgIcon: Globe, color: theme.palette.blueberry700 }), _jsx(\"span\", { className: styles['language-picker__message'], \"aria-live\": \"polite\", children: languageChangedMessage }), _jsx(\"ul\", { className: styles['language-picker__list'], children: languages.map(language => (_jsx(\"li\", { className: styles['language-picker__item'], \"data-testid\": testId && `${testId}-${language}`, children: language === selectedLanguage ? (getLanguageName(language, languages)) : (_jsx(\"button\", { className: styles['language-picker__button'], type: \"button\", value: language, onClick: () => handleLanguageChange(language), children: getLanguageName(language, languages) })) }, language))) })] }));\n};\nexport default LanguagePicker;\n","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport { setDocumentLanguage, setUserLanguage } from '@helsenorge/framework-utils/hn-language';\nimport { languageChanged, selectLanguages } from '@helsenorge/framework-utils/language';\nimport useLanguageEvent from '@helsenorge/framework-utils/language/useLanguageEvent';\nimport LanguagePicker from '../language-picker';\nimport { useAppDispatch, useAppSelector } from '../store/hooks';\nimport styles from './styles.module.scss';\nconst LanguagePickerOriginName = 'LanguagePicker';\nexport const LanguagePickerWrapper = () => {\n const dispatch = useAppDispatch();\n const languages = useAppSelector(state => selectLanguages(state.language));\n const handleLanguageChange = (newLanguage) => {\n setDocumentLanguage(newLanguage);\n setUserLanguage(newLanguage, { origin: LanguagePickerOriginName });\n dispatch(languageChanged(newLanguage));\n };\n useLanguageEvent(options => options?.origin !== LanguagePickerOriginName);\n if (languages.length <= 1) {\n return null;\n }\n return (_jsx(\"div\", { className: styles['language-picker-wrapper'], children: _jsx(\"div\", { className: \"container\", children: _jsx(\"div\", { className: \"row\", children: _jsx(\"div\", { className: \"col-12 col-lg-10\", children: _jsx(LanguagePicker, { languages: languages, onLanguageChange: handleLanguageChange }) }) }) }) }));\n};\nexport default LanguagePickerWrapper;\n","import { getHelsenorgeUrl, getTjenesterUrl } from '../../hn-proxy-service';\n/**\n * Replaces \"{tjenesterUrl}\" and \"{helsenorgeUrl}\" with url according to environment.\n * @param url text that may include {tjenesterUrl} or {helsenorgeUrl}.\n */\nexport const envSafeUrl = (url) => {\n return url\n .replace(/{tjenesterUrl}/g, getTjenesterUrl())\n .replace(/{helsenorgeUrl}/g, getHelsenorgeUrl())\n .replace(/tjenesterUrl/g, getTjenesterUrl())\n .replace(/helsenorgeUrl/g, getHelsenorgeUrl());\n};\n","import DOMPurify from 'dompurify';\nimport getFeatureToggle from './hn-feature-toggle';\nexport const TRUSTED_TYPES_FEATURE_NAME = 'TrustedTypes';\nconst hasDefaultTrustedTypesPolicy = () => !!window.trustedTypes?.defaultPolicy;\n/**\n * Sjekk om det finnes en default policy for trusted types og om Trusted Types er togglet på.\n *\n * @returns true dersom Trusted Types skal enables\n */\nexport const isTrustedTypesEnabled = () => hasDefaultTrustedTypesPolicy() && getFeatureToggle(TRUSTED_TYPES_FEATURE_NAME);\nconst DefaultSanitizeConfig = {\n ADD_ATTR: ['target'],\n};\n/**\n * Sanitize html før den vises til bruker. Returnerer Trusted Types dersom dette er i bruk.\n *\n * @param html string med HTML som skal sanitizes\n * @returns sanitized HTML\n */\nexport const sanitize = (html) => {\n if (DOMPurify && typeof DOMPurify.sanitize === 'function') {\n return DOMPurify.sanitize(html ?? '', { ...DefaultSanitizeConfig, RETURN_TRUSTED_TYPE: isTrustedTypesEnabled() });\n }\n return '';\n};\n","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport React from 'react';\nimport classNames from 'classnames';\nimport Markdown from 'markdown-to-jsx';\nimport AnchorLink from '@helsenorge/designsystem-react/components/AnchorLink';\nimport List from '@helsenorge/designsystem-react/components/List';\nimport Title from '@helsenorge/designsystem-react/components/Title';\nimport designsystemtypography from '@helsenorge/designsystem-react/scss/typography.module.scss';\nimport { envSafeUrl } from './safe-html';\nimport { sanitize } from '../../trusted-types';\nimport styles from './styles.module.scss';\nconst parseHtml = (html, type) => {\n if (typeof html === 'string' && type === 'markdown') {\n return {\n type: 'markdown',\n value: html,\n };\n }\n else if (typeof html === 'string') {\n return html;\n }\n if (html?.value) {\n return html;\n }\n return null;\n};\nconst SafeHTML = ({ html, tagName, type, testId, className, ...rest }) => {\n const parsedHtml = parseHtml(html, type);\n if (!parsedHtml) {\n return null;\n }\n if (typeof parsedHtml === 'string') {\n const CustomTag = tagName || 'span';\n return (_jsx(CustomTag, { className: classNames(designsystemtypography['anchorlink-wrapper'], styles['safe-html'], className), \"data-testid\": testId, dangerouslySetInnerHTML: { __html: sanitize(envSafeUrl(parsedHtml)) }, ...rest }));\n }\n else {\n if (!parsedHtml?.value) {\n return null;\n }\n const CustomTag = tagName || 'div';\n return (_jsx(CustomTag, { className: classNames(styles['safe-html'], className), \"data-testid\": testId, children: _jsx(Markdown, { options: {\n wrapper: React.Fragment,\n overrides: {\n h2: {\n component: Title,\n props: {\n htmlMarkup: 'h2',\n appearance: 'title2',\n },\n },\n h3: {\n component: Title,\n props: {\n htmlMarkup: 'h3',\n appearance: 'title3',\n },\n },\n h4: {\n component: Title,\n props: {\n htmlMarkup: 'h4',\n appearance: 'title4',\n },\n },\n h5: {\n component: Title,\n props: {\n htmlMarkup: 'h5',\n appearance: 'title5',\n },\n },\n a: {\n component: AnchorLink,\n },\n ul: {\n component: List,\n props: {\n variant: 'bullet',\n },\n },\n ol: {\n component: List,\n props: {\n variant: 'numbered',\n },\n },\n li: {\n component: List.Item,\n },\n },\n }, children: envSafeUrl(parsedHtml.value) }) }));\n }\n};\nexport default SafeHTML;\n","/*\n * aria hidden\n * ----------------\n * Traverse dom upwards and set aria-hidden on all siblings.\n * Used on modals to hide all other content from screen readers when modal\n * is placed within wrappers in dom, and we are unable to set aria-hidden on the rest\n * of the page.\n *\n * Example:\n *
\n *
\n *

Page title

\n *
\n *
\n *\n *
\n *
\n *\n * Here we are unable to set aria-hidden on article as it would also hide the modal.\n * The script then traverses the dom upwards and set aria-hidden on all siblings of parent element\n * until it reaches the body element.\n *\n */\nexport default {\n setAriaHidden(domEl) {\n // Set aria hidden on siblings\n const siblings = this._getSiblings(domEl);\n for (let i = 0; i < siblings.allSiblings.length; i++) {\n siblings.allSiblings[i].setAttribute('aria-hidden', 'true');\n }\n // Return siblings so aria-hiddens can be restored later\n return siblings;\n },\n resetAriaHidden(siblings) {\n if (siblings) {\n siblings.allSiblings.forEach(sibling => {\n sibling.removeAttribute('aria-hidden');\n });\n siblings.ariaHiddens.forEach(sibling => {\n siblings.allSiblings[sibling.elIndex].setAttribute('aria-hidden', sibling.val);\n });\n return siblings;\n }\n },\n _getSiblings(domEl) {\n // Get siblings\n const siblings = { allSiblings: [], ariaHiddens: [] };\n let x = 0;\n while (domEl && domEl !== document.body) {\n if (domEl.parentElement) {\n for (let i = 0; i < domEl.parentElement.children.length; i++) {\n const child = domEl.parentElement.children[i];\n if (child.nodeType === 1 && child !== domEl) {\n // If element already has aria set, store it for later\n if (child.hasAttribute('aria-hidden')) {\n const value = child.getAttribute('aria-hidden');\n if (value) {\n siblings.ariaHiddens.push({ elIndex: x, val: value.toString() });\n }\n }\n siblings.allSiblings.push(child);\n x++;\n }\n }\n }\n domEl = domEl.parentElement;\n }\n return siblings;\n },\n};\n","export default {\n DOWN: 40,\n ESC: 27,\n ENTER: 13,\n LEFT: 37,\n RIGHT: 39,\n SPACE: 32,\n TAB: 9,\n UP: 38,\n};\n","/* This is a util to get the event target, wether it comes from the lightDOM or shadowDOM - this requires the Shadow DOM to be of type 'open' */\nexport const getEventTarget = (e) => e.composedPath()[0];\n","const allowConsoleOutput = () => !['production', 'test'].includes(process.env.NODE_ENV ?? '');\nconst log = (message, ...optionalParams) => {\n if (!allowConsoleOutput())\n return;\n // eslint-disable-next-line no-console\n console.log(message, optionalParams);\n};\n/**\n * Returnerer document.activeElement (element in focus), uavhengig av om den er i document-dom rllrt shadow-dom\n * @param element HtmlElement som den skal søke i\n * @param logCallback Funksjon som om det oppstår en feil. Brukes for å logge til server.\n */\nexport const getDocumentActiveElement = (element, logCallback) => {\n try {\n const domNode = typeof element === 'string' ? document.querySelector(element) : element;\n const root = domNode?.getRootNode();\n return root?.activeElement;\n }\n catch (e) {\n const logger = logCallback ?? log;\n logger('Feil ved å ta tak i active element basert på angitt node: ', element, e);\n return null;\n }\n};\n","import { tabbable } from 'tabbable';\nimport keyCode from './constants/key-code';\nimport { getEventTarget } from './events';\nimport { getDocumentActiveElement } from './focus-utils';\n/**\n * Class som ved init låser fokuset inne i én DOMElement. Bruksområder er f.eks Modalvinduer.\n * Tar imot en DomNode (HTMLElement eller string) som fokuset skal låses i.\n * @deprecated Bruk useFocusTrap-hook fra @helsenorge/designsystem-react i stedet\n */\nexport class TrapFocus {\n constructor(domNode, isTriggerWithinTrappedArea = false) {\n Object.defineProperty(this, \"domNode\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"previouslyFocusedItem\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"focusableItems\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.focusableItems = [];\n this.domNode = typeof domNode === 'string' ? document.querySelector(domNode) : domNode;\n const activeElement = getDocumentActiveElement(domNode);\n this.previouslyFocusedItem = activeElement ? activeElement : document.activeElement;\n // Get focusable elements\n this.updateFocusableItems();\n // Set focus to element to be able to listen for keypress\n if (!isTriggerWithinTrappedArea && this.focusableItems.length) {\n this.focusableItems[0].focus();\n }\n window.addEventListener('keydown', this, false);\n }\n deactivate() {\n window.removeEventListener('keydown', this, false);\n this.focusableItems = [];\n this.domNode = null;\n if (this.previouslyFocusedItem && this.previouslyFocusedItem.focus) {\n this.previouslyFocusedItem.focus();\n }\n }\n handleEvent(e) {\n if (e.keyCode !== keyCode.TAB) {\n return null;\n }\n e.stopPropagation();\n e.preventDefault();\n const target = getEventTarget(e);\n this.updateFocusableItems();\n const currentFocusIndex = this.getItemIndex(target);\n // When the element focused is not in list, sets focus on the first focusable element of the list\n if (currentFocusIndex === -1) {\n if (this.focusableItems.length > 0 && this.focusableItems[0]) {\n this.focusableItems[0].focus();\n }\n return null;\n }\n if (e.shiftKey) {\n this.previousFocusableItem(target).focus();\n }\n else {\n this.nextFocusableItem(target).focus();\n }\n return null;\n }\n updateFocusableItems() {\n if (this.domNode) {\n this.focusableItems = tabbable(this.domNode);\n }\n }\n previousFocusableRadioButton(itemWithFocus) {\n const currentFocusIndex = this.getItemIndex(itemWithFocus);\n // Previous focusable item should not be a radio button in same group\n for (let i = currentFocusIndex; i >= 0; i--) {\n const previousElement = this.focusableItems[i];\n if (!this.isRadioButton(previousElement)) {\n return previousElement;\n }\n // Element is a radio button, but not in same group\n if (previousElement.name !== itemWithFocus.name) {\n return this.getSelectedRadioInGroup(previousElement);\n }\n }\n // All the previous items are in the same radio group, start from end\n for (let i = this.focusableItems.length - 1; i > currentFocusIndex; i--) {\n const previousElement = this.focusableItems[i];\n if (!this.isRadioButton(previousElement)) {\n return previousElement;\n }\n // Element is a radio button, but not in same group\n if (previousElement.name !== itemWithFocus.name) {\n return this.getSelectedRadioInGroup(previousElement);\n }\n }\n // Still no element found: we have only radio buttons in the same group\n return this.getSelectedRadioInGroup(itemWithFocus);\n }\n previousFocusableItem(itemWithFocus) {\n const currentFocusIndex = this.getItemIndex(itemWithFocus);\n if (!this.isRadioButton(itemWithFocus)) {\n let previousFocusIndex = currentFocusIndex - 1;\n // Wrap around\n if (previousFocusIndex < 0) {\n previousFocusIndex = this.focusableItems.length - 1;\n }\n return this.getSelectedRadioInGroup(this.focusableItems[previousFocusIndex]);\n }\n return this.previousFocusableRadioButton(itemWithFocus);\n }\n nextFocusableRadioButton(itemWithFocus) {\n const currentFocusIndex = this.getItemIndex(itemWithFocus);\n // Next focusable item should not be a radio button in same group\n for (let i = currentFocusIndex + 1; i < this.focusableItems.length; i++) {\n const nextElement = this.focusableItems[i];\n if (!this.isRadioButton(nextElement)) {\n return nextElement;\n }\n // Element is a radio button, but not in same group\n if (nextElement.name !== itemWithFocus.name) {\n return this.getSelectedRadioInGroup(nextElement);\n }\n }\n // All the next items are in the same radio group, start from beginning\n for (let i = 0; i < currentFocusIndex; i++) {\n const nextElement = this.focusableItems[i];\n if (!this.isRadioButton(nextElement)) {\n return nextElement;\n }\n // Element is a radio button, but not in same group\n if (nextElement.name !== itemWithFocus.name) {\n return this.getSelectedRadioInGroup(nextElement);\n }\n }\n // Still no element found: we have only radio buttons in the same group\n return this.getSelectedRadioInGroup(itemWithFocus);\n }\n nextFocusableItem(itemWithFocus) {\n const currentFocusIndex = this.getItemIndex(itemWithFocus);\n if (!this.isRadioButton(itemWithFocus)) {\n let nextFocusIndex = currentFocusIndex + 1;\n // Wrap around\n if (nextFocusIndex > this.focusableItems.length - 1) {\n nextFocusIndex = 0;\n }\n return this.getSelectedRadioInGroup(this.focusableItems[nextFocusIndex]);\n }\n return this.nextFocusableRadioButton(itemWithFocus);\n }\n // If user tabbed into a radio group, we need to focus the selected radio button in the group\n getSelectedRadioInGroup(item) {\n if (!this.isRadioButton(item)) {\n return item;\n }\n const currentFocusIndex = this.getItemIndex(item);\n const radioGrouItems = [];\n let i;\n for (i = currentFocusIndex; i < this.focusableItems.length; i++) {\n if (this.focusableItems[i].name === item.name) {\n radioGrouItems.push(this.focusableItems[i]);\n }\n else {\n break; // Element is not in radio group, no need to continue loop\n }\n }\n for (i = currentFocusIndex - 1; i >= 0; i--) {\n if (this.focusableItems[i].name === item.name) {\n radioGrouItems.push(this.focusableItems[i]);\n }\n else {\n break; // Element is not in radio group, no need to continue loop\n }\n }\n const selectedItems = radioGrouItems.filter(i => i.checked);\n if (selectedItems.length === 0) {\n return item; // No element in this group is selected\n }\n return selectedItems[0];\n }\n getItemIndex(item) {\n return this.focusableItems.indexOf(item);\n }\n isRadioButton(element) {\n return element.type === 'radio';\n }\n}\nexport default TrapFocus;\n","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport Expander from '@helsenorge/designsystem-react/components/Expander';\nimport { PortableText } from '../../richtext';\nconst EkspanderendeTekstBlock = ({ title, mainContent, }) => {\n if (title.length === 0 || mainContent.length === 0) {\n return null;\n }\n return (_jsx(Expander, { title: title, noNestedLine: true, renderChildrenWhenClosed: true, children: _jsx(PortableText, { value: mainContent }) }));\n};\nexport default EkspanderendeTekstBlock;\n","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport EkspanderendeBlockComponent from '../../../behandlingsvalg/ekspanderendeblock';\nconst EkspanderendeBlock = ({ value }) => (_jsx(EkspanderendeBlockComponent, { title: value.title, mainContent: value.mainContent }));\nexport default EkspanderendeBlock;\n","export var PromoBlockType;\n(function (PromoBlockType) {\n PromoBlockType[\"promoboard\"] = \"promoboard\";\n PromoBlockType[\"diveboard\"] = \"diveboard\";\n})(PromoBlockType || (PromoBlockType = {}));\nexport var PromoBlockColors;\n(function (PromoBlockColors) {\n PromoBlockColors[\"blueberry50\"] = \"blueberry50\";\n PromoBlockColors[\"blueberry500\"] = \"blueberry500\";\n PromoBlockColors[\"cherry50\"] = \"cherry50\";\n PromoBlockColors[\"cherry500\"] = \"cherry500\";\n PromoBlockColors[\"neutral50\"] = \"neutral50\";\n PromoBlockColors[\"neutral700\"] = \"neutral700\";\n})(PromoBlockColors || (PromoBlockColors = {}));\nexport var ImageType;\n(function (ImageType) {\n ImageType[\"illustration\"] = \"illustration\";\n ImageType[\"photo\"] = \"photo\";\n})(ImageType || (ImageType = {}));\n// search\nexport var WindowActionEnum;\n(function (WindowActionEnum) {\n WindowActionEnum[WindowActionEnum[\"None\"] = 0] = \"None\";\n WindowActionEnum[WindowActionEnum[\"RefreshPage\"] = 1] = \"RefreshPage\";\n})(WindowActionEnum || (WindowActionEnum = {}));\nexport var Size;\n(function (Size) {\n Size[\"Small\"] = \"Small\";\n Size[\"Medium\"] = \"Medium\";\n Size[\"Large\"] = \"Large\";\n})(Size || (Size = {}));\nexport var VideoType;\n(function (VideoType) {\n VideoType[VideoType[\"notSupported\"] = 0] = \"notSupported\";\n VideoType[VideoType[\"youtube\"] = 1] = \"youtube\";\n VideoType[VideoType[\"vimeo\"] = 2] = \"vimeo\";\n VideoType[VideoType[\"vimeoShowcase\"] = 3] = \"vimeoShowcase\";\n})(VideoType || (VideoType = {}));\n// Setter antall cards per bootstrap rad (eks: four = 12/4)\nexport var CardsPerRow;\n(function (CardsPerRow) {\n CardsPerRow[CardsPerRow[\"four\"] = 3] = \"four\";\n CardsPerRow[CardsPerRow[\"three\"] = 4] = \"three\";\n CardsPerRow[CardsPerRow[\"two\"] = 6] = \"two\";\n CardsPerRow[CardsPerRow[\"one\"] = 12] = \"one\";\n})(CardsPerRow || (CardsPerRow = {}));\n// Setter fargetema for videokort\nexport var VideoTheme;\n(function (VideoTheme) {\n VideoTheme[\"neutral\"] = \"neutral\";\n VideoTheme[\"cherry\"] = \"cherry\";\n VideoTheme[\"blueberry\"] = \"blueberry\";\n})(VideoTheme || (VideoTheme = {}));\n","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport classNames from 'classnames';\nimport { Size } from '../types/entities';\nimport typography from '@helsenorge/designsystem-react/scss/typography.module.scss';\nimport cmsstyles from './styles.module.scss';\nconst Image = ({ imageUrl, caption, copyright, size = Size.Large, alternativeText, }) => {\n const figureClass = 'row no-gutters';\n let imageClass = 'col-12 align-self-start';\n let captionClass = 'col-12';\n if (size === Size.Small) {\n imageClass = 'col-12 col-md-10 offset-md-1 col-lg-5 offset-lg-2 align-self-start';\n captionClass = classNames(typography['image-caption'], 'col-12 col-md-10 offset-md-1 col-lg-3 offset-lg-0 pl-lg-4');\n }\n else if (size === Size.Large) {\n captionClass = classNames(typography['image-caption'], 'col-12 col-lg-8');\n }\n else if (size === Size.Medium) {\n imageClass = 'col-12 col-md-10 offset-md-1 col-lg-8 offset-lg-2';\n captionClass = classNames(typography['image-caption'], 'col-12 col-md-10 offset-md-1 col-lg-8 offset-lg-2 ');\n }\n return (_jsxs(\"figure\", { className: figureClass, children: [_jsx(\"img\", { src: imageUrl, alt: alternativeText, className: imageClass }), _jsxs(\"figcaption\", { className: captionClass, children: [_jsx(\"p\", { className: classNames(cmsstyles.image, size === Size.Small && cmsstyles['image--small']), children: caption }), _jsx(\"p\", { className: classNames(typography['image-credit'], cmsstyles['image__copyright']), children: copyright })] })] }));\n};\nexport default Image;\n","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport ImageBlockComponent from '../../../image';\nconst ImageBlock = ({ value }) => (_jsx(ImageBlockComponent, { imageUrl: value.imageUrl, caption: value.caption, copyright: value.copyright, size: value.size, alternativeText: value.alternativeText }));\nexport default ImageBlock;\n","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport AnchorLink from '@helsenorge/designsystem-react/components/AnchorLink';\nconst Link = ({ value, children }) => value ? (_jsx(AnchorLink, { href: value.href, target: value.target, children: children })) : null;\nexport default Link;\n","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport LazyIcon from '@helsenorge/designsystem-react/components/LazyIcon';\nimport LinkList from '@helsenorge/designsystem-react/components/LinkList';\nconst CmsLinkList = ({ color, links, size, className }) => (_jsx(LinkList, { color: color, chevron: true, size: size, className: className, children: links.map(({ href, text, iconName, target, title }, index) => (_jsx(LinkList.Link, { href: href, icon: iconName ? _jsx(LazyIcon, { iconName: iconName }) : undefined, target: target ? target : undefined, title: title ? title : undefined, children: text }, index))) }));\nexport default CmsLinkList;\n","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport cn from 'classnames';\nimport Title from '@helsenorge/designsystem-react/components/Title';\nimport LinkList from './linklist';\nimport styles from './styles.module.scss';\nconst LinkListBlock = ({ links, title, titleHtmlMarkup = 'h2', additionalLinkList, color = 'neutral', useGridLayout = false, children, }) => {\n const contentClassName = cn(styles['linklistblock__content'], {\n [styles['linklistblock__content--neutral']]: color === 'neutral',\n [styles['linklistblock__content--cherry']]: color === 'cherry',\n [styles['linklistblock__content--blueberry']]: color === 'blueberry',\n [styles['linklistblock__content--grid']]: useGridLayout,\n });\n return (_jsx(\"div\", { className: styles['linklistblock'], children: _jsxs(\"div\", { className: contentClassName, children: [title && (_jsx(Title, { htmlMarkup: titleHtmlMarkup, appearance: \"title3\", margin: { marginTop: 0, marginBottom: 1 }, children: title })), children, _jsx(LinkList, { color: color, links: links }), additionalLinkList && (_jsx(LinkList, { links: additionalLinkList, color: color, size: \"small\", className: styles['linklistblock__additional-link-list'] }))] }) }));\n};\nexport default LinkListBlock;\n","import { jsx as _jsx } from \"react/jsx-runtime\";\n/* eslint-disable react/prop-types */\nimport { useContext } from 'react';\nimport { PortableTextContext } from '../..';\nimport LinkListBlockComponent from '../../../linklistblock';\nconst LinkListBlock = ({ value }) => {\n const backgroundColor = useContext(PortableTextContext)?.backgroundColor;\n return (_jsx(LinkListBlockComponent, { links: value.links, title: value.title, titleHtmlMarkup: value.titleHtmlMarkup, additionalLinkList: value.additionalLinkList, color: backgroundColor ? backgroundColor : value.color, useGridLayout: value.useGridLayout }));\n};\nexport default LinkListBlock;\n","import { getUrlHostname } from '@helsenorge/core-utils/url';\nimport { isAndroid, isAppleMobileDevice } from '@helsenorge/core-utils/user-agents-utils';\nimport { getAssetsUrl } from './hn-page';\nimport { getTjenesterUrl } from './hn-proxy-service';\n/**\n * Sjekk om URL peker til et helsenorge-domene\n * @param url En gyldig URL, f.eks. https://www.helsenorge.no/sykdom/\n * @returns returnerer true dersom domene er tjenester.helsenorge.no eller www.helsenorge.no\n */\nexport const isHelsenorgeUrl = (url) => {\n const hostname = getUrlHostname(url);\n return !!hostname && ['tjenester.helsenorge.no', 'www.helsenorge.no'].includes(hostname);\n};\nexport const getAppUrl = () => {\n if (isAndroid()) {\n return getAssetsUrl() + '/core/app-login/android.html';\n }\n else if (isAppleMobileDevice()) {\n return getAssetsUrl() + '/core/app-login/apple.html';\n }\n else {\n return undefined;\n }\n};\nexport const getSigninAppUrl = () => {\n const appUrl = getAppUrl();\n if (appUrl) {\n const urlSearch = new URL(window.location.href).search;\n return `${getAppUrl()}${urlSearch}`;\n }\n return undefined;\n};\nexport const getSigninTjenesteUrl = () => {\n const currentUrl = new URL(window.location.href);\n const tjenesteParam = currentUrl.searchParams.get('tjeneste') || '';\n const sourceUrl = `${getTjenesterUrl()}/${tjenesteParam}`;\n const signinUrl = new URL(`${getTjenesterUrl()}/auth/signin`);\n signinUrl.searchParams.set('Source', sourceUrl);\n return signinUrl.toString();\n};\n","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport React from 'react';\nimport Button from '@helsenorge/designsystem-react/components/Button';\nimport Icon from '@helsenorge/designsystem-react/components/Icon';\nimport LazyIcon from '@helsenorge/designsystem-react/components/LazyIcon';\nimport { getAppUrl } from '@helsenorge/framework-utils/url';\nimport { HNeventShowAppInvitation } from '@helsenorge/framework-utils/web-component/events';\nconst LoginButton = ({ htmlMarkup, href, icon, rightSideIcon, children, ...rest }) => {\n const [appUrl, setAppUrl] = React.useState(undefined);\n const buttonRef = React.useRef(null);\n React.useEffect(() => {\n setAppUrl(getAppUrl());\n }, []);\n const triggerOriginalBehaviour = (e) => {\n rest.onClick && rest.onClick(e);\n if (href)\n window.location.href = href;\n };\n const useAppUrl = (appUrl) => {\n const url = new URL(href ? href : '');\n window.location.href = `${appUrl}?tjeneste=${url.pathname}${url.search}`;\n };\n const mobileOnClick = (e) => {\n if (appUrl) {\n e?.preventDefault();\n HNeventShowAppInvitation(() => {\n useAppUrl(appUrl);\n }, () => {\n triggerOriginalBehaviour();\n }, () => {\n buttonRef.current?.focus();\n });\n }\n };\n return (_jsxs(Button, { ...rest, href: appUrl ? undefined : href, onClick: appUrl ? mobileOnClick : rest.onClick, htmlMarkup: appUrl ? 'button' : htmlMarkup, ref: buttonRef, children: [!!icon && _jsx(LazyIcon, { iconName: icon }), children, !!rightSideIcon && _jsx(Icon, { svgIcon: rightSideIcon })] }));\n};\nLoginButton.defaultProps = {\n size: 'medium',\n concept: 'normal',\n href: '#',\n htmlMarkup: 'button',\n fluid: false,\n};\nexport default LoginButton;\n","import { theme } from '@helsenorge/designsystem-react';\nexport const getIconColor = (name) => {\n if (name === 'black') {\n return theme.palette.black;\n }\n else if (name === 'white') {\n return theme.palette.white;\n }\n else if (name === 'plum') {\n return theme.palette.plum600;\n }\n else if (name === 'neutral') {\n return theme.palette.neutral600;\n }\n else if (name === 'kiwi') {\n return theme.palette.kiwi600;\n }\n else if (name === 'cherry') {\n return theme.palette.cherry600;\n }\n else if (name === 'blueberry') {\n return theme.palette.blueberry600;\n }\n else if (name === 'banana') {\n return theme.palette.banana600;\n }\n return theme.palette.black;\n};\n","import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport bindClassNames from 'classnames/bind';\nimport Icon, { IconSize } from '@helsenorge/designsystem-react/components/Icon';\nimport ArrowRight from '@helsenorge/designsystem-react/components/Icons/ArrowRight';\nimport LazyIcon from '@helsenorge/designsystem-react/components/LazyIcon';\nimport Title from '@helsenorge/designsystem-react/components/Title';\nimport { useHover } from '@helsenorge/designsystem-react';\nimport { getIconColor } from '../shared/getIconColor';\nimport styles from './styles.module.scss';\nconst classNames = bindClassNames.bind(styles);\nconst Panel = ({ url, icon, emphasize, title, linkTitle, intro, colorName = 'neutral', children, linkTarget = '_self', className, large, }) => {\n const { hoverRef, isHovered } = useHover();\n const iconComponent = icon &&\n (large ? (_jsxs(_Fragment, { children: [_jsx(LazyIcon, { iconName: icon, size: IconSize.Medium, isHovered: isHovered, className: \"d-lg-none\" }), _jsx(LazyIcon, { iconName: icon, size: IconSize.Large, isHovered: isHovered, className: \"d-none d-lg-inline\" })] })) : (_jsx(LazyIcon, { iconName: icon, size: IconSize.Medium, isHovered: isHovered })));\n const iconOrEmphasisComponent = (icon || emphasize) && (_jsx(\"span\", { className: classNames('col-6', 'col-md-2', {\n 'pl-lg-7': icon && large && !emphasize,\n 'panel__emphasize pr-md-3': !icon && emphasize,\n }), children: icon ? iconComponent : emphasize }));\n const spacingClassNames = classNames(className, 'px-5', 'pt-5', 'pt-md-6', 'pb-7', 'pb-md-8', 'my-7', 'my-lg-8', `panel--${colorName}`, {\n 'pt-lg-5': large && iconOrEmphasisComponent,\n });\n const titleComponent = (_jsxs(Title, { htmlMarkup: \"h2\", appearance: \"title3\", className: classNames('my-0', 'row', 'no-gutters', 'align-items-center', {\n 'align-items-md-baseline': !icon && emphasize,\n }), children: [iconOrEmphasisComponent, url && (_jsx(\"span\", { className: classNames(styles.panel__arrow, 'align-self-md-baseline', {\n 'col-6 col-md-2 order-md-3': iconOrEmphasisComponent,\n 'col-2 order-3': !iconOrEmphasisComponent,\n }), children: _jsx(Icon, { size: IconSize.XSmall, svgIcon: ArrowRight, color: getIconColor('blueberry'), isHovered: isHovered }) })), _jsx(\"span\", { className: classNames({\n 'col-md-8 mt-5 mt-md-0': iconOrEmphasisComponent,\n 'col-10': !iconOrEmphasisComponent,\n }), children: title })] }));\n const renderSection = (_jsxs(\"div\", { className: classNames({\n [spacingClassNames]: !url,\n }), children: [title && titleComponent, (intro || children) && (_jsx(\"div\", { className: \"row no-gutters\", children: _jsxs(\"div\", { className: classNames('mt-3', 'mt-md-5', 'mb-0', {\n 'col-md-8 offset-md-2': icon || emphasize,\n 'col-md-10': !icon && !emphasize,\n }), children: [intro, children] }) }))] }));\n if (!url) {\n return renderSection;\n }\n const linkClassNames = classNames(styles.panel__link, `panel__link--${colorName}`);\n return (_jsx(\"a\", { href: url, className: classNames('d-block', linkClassNames, spacingClassNames), title: linkTitle ? linkTitle : title, ref: hoverRef, target: linkTarget, rel: linkTarget && linkTarget === '_blank' ? 'noopener noreferrer' : undefined, children: renderSection }));\n};\nexport default Panel;\n","import { jsx as _jsx, Fragment as _Fragment } from \"react/jsx-runtime\";\nimport { useEffect, useState } from 'react';\nimport ArrowRight from '@helsenorge/designsystem-react/components/Icons/ArrowRight';\nimport { hasLoggedInCookie } from '@helsenorge/framework-utils/cookie';\nimport LoginButton from './LoginButton';\nimport Panel from '../panel';\nconst LoginBlock = ({ title, intro, authenticatedTitle, authenticatedIntro, hideIfAuthenticated = false, url, iconName, buttonText, colorName, showOnlyButton, }) => {\n const [isAuthenticated, setIsAuthenticated] = useState(false);\n useEffect(() => {\n const isAuthorized = hasLoggedInCookie();\n setIsAuthenticated(isAuthorized);\n }, []);\n if (isAuthenticated && hideIfAuthenticated) {\n return null;\n }\n return (_jsx(_Fragment, { children: showOnlyButton && !isAuthenticated ? (_jsx(LoginButton, { icon: iconName, concept: \"normal\", fluid: true, htmlMarkup: \"a\", rightSideIcon: ArrowRight, size: \"large\", href: url, children: buttonText })) : (_jsx(Panel, { icon: iconName, title: isAuthenticated && authenticatedTitle ? authenticatedTitle : title, intro: isAuthenticated && authenticatedIntro ? authenticatedIntro : intro, url: isAuthenticated ? url : '', colorName: colorName, children: !isAuthenticated && (_jsx(\"div\", { className: \"mt-5\", children: _jsx(LoginButton, { htmlMarkup: \"a\", href: url, children: buttonText }) })) })) }));\n};\nexport default LoginBlock;\n","import { jsx as _jsx } from \"react/jsx-runtime\";\n/* eslint-disable react/prop-types */\nimport { useContext } from 'react';\nimport { PortableTextContext } from '../..';\nimport LoginBlockComponent from '../../../loginblock';\nconst getColorName = (contextColor, blockColor) => {\n // Når farge på blokken er \"Ingen\", bruk farge hentet fra parent-komponent\n if (contextColor && blockColor === 'none') {\n return contextColor;\n }\n // Ellers, bruk farge fra blokken\n if (blockColor !== 'none') {\n return blockColor;\n }\n};\nconst LoginBlock = ({ value }) => {\n const backgroundColor = useContext(PortableTextContext)?.backgroundColor;\n const colorName = getColorName(backgroundColor, value.colorName);\n return (_jsx(LoginBlockComponent, { title: value.title, intro: value.intro, authenticatedTitle: value.authenticatedTitle, authenticatedIntro: value.authenticatedIntro, hideIfAuthenticated: value.hideIfAuthenticated, url: value.url, iconName: value.iconName, buttonText: value.buttonText, colorName: colorName, showOnlyButton: value.showOnlyButton }));\n};\nexport default LoginBlock;\n","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport Title from '@helsenorge/designsystem-react/components/Title';\nimport fontStyles from '@helsenorge/designsystem-react/scss/typography.module.scss';\nimport PortableText from '../..';\nconst TextBlockComponent = ({ title, titleHtmlMarkup = 'h2', titleAppearance = 'title2', mainIntro, mainBody, }) => (_jsxs(\"div\", { children: [_jsx(Title, { htmlMarkup: titleHtmlMarkup, appearance: titleAppearance, children: title }), mainIntro && _jsx(\"p\", { className: fontStyles.preamble, children: mainIntro }), _jsx(PortableText, { value: mainBody })] }));\nconst TextBlock = ({ value }) => (_jsx(TextBlockComponent, { title: value.title, titleHtmlMarkup: value.titleHtmlMarkup, titleAppearance: value.titleAppearance, mainIntro: value.mainIntro, mainBody: value.mainBody, removePadding: value.removePadding }));\nexport default TextBlock;\n","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport Title from '@helsenorge/designsystem-react/components/Title';\nimport cmsstyles from './styles.module.scss';\nconst RichTextTitle = ({ htmlMarkup, children }) => {\n const htmlMarkupAppearanceMap = {\n h1: 'title1',\n h2: 'title2',\n h3: 'title3',\n h4: 'title4',\n h5: 'title5',\n h6: 'title6',\n span: 'title5',\n };\n return (_jsx(Title, { className: cmsstyles.richtext, htmlMarkup: htmlMarkup, appearance: htmlMarkupAppearanceMap[htmlMarkup], children: children }));\n};\nexport default RichTextTitle;\n","export var VimeoSubtitleLanguageCodes;\n(function (VimeoSubtitleLanguageCodes) {\n VimeoSubtitleLanguageCodes[\"NORWEGIAN\"] = \"nb\";\n VimeoSubtitleLanguageCodes[\"NORWEGIAN_NYNORSK\"] = \"nn\";\n VimeoSubtitleLanguageCodes[\"ENGLISH\"] = \"en-GB\";\n VimeoSubtitleLanguageCodes[\"LITHUANIAN\"] = \"lt\";\n VimeoSubtitleLanguageCodes[\"POLISH\"] = \"pl\";\n VimeoSubtitleLanguageCodes[\"RUSSIAN\"] = \"ru\";\n VimeoSubtitleLanguageCodes[\"ROMANIAN\"] = \"ro\";\n VimeoSubtitleLanguageCodes[\"SAMI_NORTHERN\"] = \"se\";\n})(VimeoSubtitleLanguageCodes || (VimeoSubtitleLanguageCodes = {}));\n","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { useRef } from 'react';\nimport classNames from 'classnames';\nimport Button from '@helsenorge/designsystem-react/components/Button';\nimport Checkbox from '@helsenorge/designsystem-react/components/Checkbox';\nimport Title from '@helsenorge/designsystem-react/components/Title';\nimport designsystemtypography from '@helsenorge/designsystem-react/scss/typography.module.scss';\nimport cmsstyles from './styles.module.scss';\nconst YouTubeTermsOfService = ({ title, imageUrl, resources, handleAccept, }) => {\n const checkboxRef = useRef(null);\n return (_jsxs(\"div\", { className: cmsstyles['tos-overlay'], style: {\n backgroundImage: imageUrl ? `linear-gradient(rgba(0, 0, 0, 0.60), rgba(0, 0, 0, 0.60)), url(${imageUrl})` : undefined,\n }, children: [title && (_jsx(Title, { className: cmsstyles['tos-overlay__title'], htmlMarkup: \"h2\", appearance: \"title3\", children: title })), _jsxs(\"div\", { className: cmsstyles['tos'], children: [_jsxs(\"p\", { className: classNames(cmsstyles['tos__text'], designsystemtypography['anchorlink-wrapper']), children: [resources.youtubeTosText, ' ', _jsx(\"a\", { href: resources.youtubeTosLinkHref ?? 'https://www.youtube.com/t/terms', target: \"_blank\", rel: \"noopener noreferrer\", children: resources.youtubeTosLinkText }), ' ', resources.youtubeTosTextSuffix] }), _jsx(\"div\", { className: cmsstyles['tos__remember'], children: _jsx(Checkbox, { label: resources.tosRememberLabel, ref: checkboxRef }) }), _jsx(Button, { onClick: () => handleAccept(checkboxRef.current?.checked ?? false), children: resources.tosButtonText })] })] }));\n};\nexport default YouTubeTermsOfService;\n","import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from \"react/jsx-runtime\";\nimport { useState, useEffect } from 'react';\nimport classNames from 'classnames';\nimport { VideoType } from '../types/entities';\nimport designsystemtypography from '@helsenorge/designsystem-react/scss/typography.module.scss';\nimport { hasCookie } from '@helsenorge/framework-utils/cookie';\nimport { setSharedCookie } from '@helsenorge/framework-utils/shared-cookies';\nimport { VimeoSubtitleLanguageCodes } from './constants';\nimport YouTubeTermsOfService from './youtube-terms-of-service';\nimport cmsstyles from './styles.module.scss';\n/**\n * Navn på cookien som brukes til å huske at brukeren har akseptert YouTubes vilkår\n */\nconst YOUTUBE_TOS_COOKIE_NAME = 'hn-youtube-tos-accepted';\n/**\n * Navn på event som brukes til å skjule vilkår fra alle YouTube-videoer samtidig.\n */\nconst YOUTUBE_EVENT_NAME = 'hn-youtube-settosaccepted';\n/**\n * Hvor mange dager før brukeren på nytt må ta stilling til YouTubes vilkår\n */\nconst YOUTUBE_COOKIE_AGE_DAYS = 365;\nconst VideoSpiller = props => {\n const { title, description, videoId, videoType, imageUrl, altText, showTextContent = false, resources, subtitleLanguageCode = VimeoSubtitleLanguageCodes.NORWEGIAN, className, } = props;\n const [tosAccepted, setTosAccepted] = useState(false);\n const handleAccept = (remember) => {\n setTosAccepted(true);\n document.dispatchEvent(new CustomEvent(YOUTUBE_EVENT_NAME));\n if (remember) {\n setSharedCookie(YOUTUBE_TOS_COOKIE_NAME, '1', YOUTUBE_COOKIE_AGE_DAYS);\n }\n };\n const handleAcceptEvent = () => {\n setTosAccepted(true);\n };\n useEffect(() => {\n setTosAccepted(hasCookie(YOUTUBE_TOS_COOKIE_NAME));\n document.addEventListener(YOUTUBE_EVENT_NAME, handleAcceptEvent);\n return () => {\n document.removeEventListener(YOUTUBE_EVENT_NAME, handleAcceptEvent);\n };\n }, []);\n const getVideoUrl = () => {\n if (videoType === VideoType.youtube) {\n return `https://www.youtube-nocookie.com/embed/${videoId}?&rel=0`;\n }\n else if (videoType === VideoType.vimeo) {\n return `https://player.vimeo.com/video/${videoId}?texttrack=${subtitleLanguageCode}`;\n }\n else if (videoType === VideoType.vimeoShowcase) {\n return `https://vimeo.com/showcase/${videoId}/embed?texttrack=${subtitleLanguageCode}`;\n }\n return '';\n };\n const getAllowAttribute = () => {\n if (videoType === VideoType.youtube) {\n return 'accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture';\n }\n else if (videoType === VideoType.vimeo) {\n return 'fullscreen;';\n }\n else if (videoType === VideoType.vimeoShowcase) {\n return 'fullscreen;';\n }\n return '';\n };\n const videoUrl = getVideoUrl();\n const allowAttribute = getAllowAttribute();\n const showTermsOfService = videoType === VideoType.youtube && !tosAccepted && resources;\n if (!allowAttribute || !videoUrl) {\n return null;\n }\n const renderTextContent = () => (_jsxs(\"div\", { className: cmsstyles.videobeskrivelse, children: [title && _jsx(\"h3\", { className: classNames(designsystemtypography.title3, cmsstyles.videobeskrivelse__title), children: title }), description && _jsx(\"p\", { className: cmsstyles.videobeskrivelse__description, children: description })] }));\n return (_jsxs(_Fragment, { children: [_jsxs(\"div\", { className: classNames(cmsstyles.videospiller, cmsstyles['videospiller--16by9'], className), children: [showTermsOfService && (_jsx(YouTubeTermsOfService, { title: title || altText, imageUrl: imageUrl, resources: resources, handleAccept: handleAccept })), _jsx(\"iframe\", { src: showTermsOfService ? '' : videoUrl, className: cmsstyles.videospiller__iframe, allow: allowAttribute, title: altText || title })] }), showTextContent && renderTextContent()] }));\n};\nVideoSpiller.displayName = 'VideoSpiller';\nexport default VideoSpiller;\n","import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport Spacer from '@helsenorge/designsystem-react/components/Spacer';\nimport VideoSpillerComponent from '../../../videospiller';\nconst VideoBlock = ({ value }) => (_jsxs(_Fragment, { children: [_jsx(VideoSpillerComponent, { title: value.title, description: value.description, videoId: value.videoId, videoType: value.videoType, altText: value.altText, imageUrl: value.imageUrl, resources: value.resources, showTextContent: true }), _jsx(Spacer, { size: \"m\" })] }));\nexport default VideoBlock;\n","export var AnalyticsId;\n(function (AnalyticsId) {\n AnalyticsId[\"Videokort\"] = \"videokort\";\n})(AnalyticsId || (AnalyticsId = {}));\n","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport classNames from 'classnames';\nimport { CardsPerRow, VideoTheme } from '../types/entities';\nimport Icon from '@helsenorge/designsystem-react/components/Icon';\nimport Play from '@helsenorge/designsystem-react/components/Icons/Play';\nimport designsystemtypography from '@helsenorge/designsystem-react/scss/typography.module.scss';\nimport { theme as designTheme, useHover, useUuid } from '@helsenorge/designsystem-react';\nimport { AnalyticsId } from '../shared/analytics';\nimport cmsstyles from './styles.module.scss';\nconst VideoKort = ({ title, description, imageUrl, onClick, wrapperClassName, selected, theme = VideoTheme.cherry, hasFullWidth, cardsPerRow, testId, playVideoLabel = 'Spill av video', }) => {\n const uuid = useUuid();\n const buttonId = `videocard-button-${uuid}`;\n const titleId = `videocard-title-${uuid}`;\n const descriptionId = `videocard-description-${uuid}`;\n const { hoverRef, isHovered } = useHover();\n const wrapperClasses = classNames(wrapperClassName, cmsstyles['videocard-wrapper']);\n const videoCardClasses = classNames(cmsstyles.videocard, cmsstyles[`videocard--${theme}`], selected && cmsstyles['videocard--selected']);\n const imageClasses = classNames(cmsstyles.videocard__image, cardsPerRow == CardsPerRow.two && !hasFullWidth ? cmsstyles['videocard__image--medium-height'] : '', cardsPerRow == CardsPerRow.two && hasFullWidth ? cmsstyles['videocard__image--tall-height'] : '', cardsPerRow == CardsPerRow.four && hasFullWidth ? cmsstyles['videocard__image--tall-height-tablet'] : '', cardsPerRow == CardsPerRow.one ? cmsstyles['videocard__image--max-height'] : '');\n const buttonAriaLabelledBy = title ? `${buttonId} ${titleId}` : buttonId;\n const buttonAriaDescribedBy = description ? descriptionId : undefined;\n if (imageUrl?.length === 0) {\n return null;\n }\n const playLabelClasses = classNames(designsystemtypography.title3, cmsstyles.playbutton__label, {\n [cmsstyles['playbutton__label--active']]: isHovered || selected,\n });\n const titleClasses = classNames(designsystemtypography.title3, cmsstyles.videocard__title);\n return (_jsx(\"div\", { className: wrapperClasses, ref: hoverRef, children: _jsxs(\"div\", { className: videoCardClasses, \"data-analyticsid\": AnalyticsId.Videokort, \"data-testid\": testId, children: [_jsx(\"div\", { className: cmsstyles['videocard__image-wrapper'], children: _jsx(\"img\", { className: imageClasses, alt: \"\", src: imageUrl }) }), _jsxs(\"div\", { className: cmsstyles.videocard__content, children: [_jsxs(\"button\", { className: cmsstyles.playbutton, \"aria-labelledby\": buttonAriaLabelledBy, \"aria-describedby\": buttonAriaDescribedBy, \"aria-expanded\": selected, onClick: onClick, children: [_jsx(Icon, { size: 36, color: isHovered ? designTheme.palette.blueberry800 : designTheme.palette.blueberry700, svgIcon: Play, isHovered: isHovered }), _jsx(\"span\", { id: buttonId, className: playLabelClasses, children: playVideoLabel })] }), title && (_jsx(\"h3\", { id: titleId, className: titleClasses, children: title })), description && (_jsx(\"p\", { className: cmsstyles.videocard__description, id: buttonAriaDescribedBy, children: description }))] })] }) }));\n};\nexport default VideoKort;\n","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport React, { useRef } from 'react';\nimport classNames from 'classnames';\nimport { CardsPerRow, VideoTheme } from '../types/entities';\nimport Title from '@helsenorge/designsystem-react/components/Title';\nimport VideoKort from '../videokort';\nimport VideoSpiller from './../videospiller';\nimport { VimeoSubtitleLanguageCodes } from '../videospiller/constants';\nimport styles from './styles.module.scss';\nconst VideoMatrise = ({ title, videoCards, cardsPerRow = CardsPerRow.four, theme = VideoTheme.cherry, hasFullWidth = false, resources, subtitleLanguageCode = VimeoSubtitleLanguageCodes.NORWEGIAN, }) => {\n const [currentIndex, setIndex] = React.useState();\n const matriseRef = useRef(null);\n React.useEffect(() => {\n const scrollToVideo = () => {\n if (typeof currentIndex !== 'undefined' && matriseRef.current) {\n matriseRef.current.scrollIntoView();\n }\n };\n scrollToVideo();\n }, [currentIndex]);\n if (videoCards.length === 0) {\n return null;\n }\n return (_jsxs(\"div\", { ref: matriseRef, children: [title && (_jsx(Title, { margin: 1.5, htmlMarkup: \"h2\", appearance: \"title3\", children: title })), _jsx(\"div\", { className: \"row\", children: videoCards.map((card, index) => {\n const wrapperClasses = classNames('col-12 col-md-6', {\n ['col-lg-3']: cardsPerRow === CardsPerRow.four,\n ['col-lg-4']: cardsPerRow === CardsPerRow.three,\n ['col-lg-6']: cardsPerRow === CardsPerRow.two,\n ['col-lg-12']: cardsPerRow === CardsPerRow.one,\n });\n return (_jsxs(React.Fragment, { children: [_jsx(VideoKort, { title: card.title, description: card.description, imageUrl: card.imageUrl, onClick: () => setIndex(index), wrapperClassName: wrapperClasses, cardsPerRow: cardsPerRow, selected: currentIndex === index, theme: theme, hasFullWidth: hasFullWidth, playVideoLabel: resources?.playVideo, testId: 'videoKort' }), currentIndex === index && (_jsx(VideoSpiller, { videoId: card.videoId, videoType: card.videoType, imageUrl: card.imageUrl, title: card.title, altText: card.altText, resources: resources, className: styles['videospiller--matrise'], subtitleLanguageCode: subtitleLanguageCode }))] }, index));\n }) })] }));\n};\nexport default VideoMatrise;\n","import { jsx as _jsx } from \"react/jsx-runtime\";\n/* eslint-disable react/prop-types */\nimport { useContext } from 'react';\nimport { VideoTheme } from '../../../types/entities';\nimport { PortableTextContext } from '../..';\nimport VideoMatriseComponent from '../../../videomatrise';\nconst VideoMatriseBlock = ({ value }) => {\n const backgroundColor = useContext(PortableTextContext)?.backgroundColor;\n return (_jsx(VideoMatriseComponent, { title: value.title, videoCards: value.videoCards, cardsPerRow: value.cardsPerRow, theme: backgroundColor && isVideoThemeColor(backgroundColor) ? backgroundColor : value.theme, resources: value.resources }));\n};\nfunction isVideoThemeColor(value) {\n return Object.values(VideoTheme).includes(value);\n}\nexport default VideoMatriseBlock;\n","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport EkspanderendeBlock from './components/ekspanderendeblock';\nimport ImageBlock from './components/imageblock';\nimport Link from './components/link';\nimport LinkListBlock from './components/linklistblock';\nimport LoginBlock from './components/loginblock';\nimport TextBlock from './components/textblock';\nimport RichTextTitle from './components/title';\nimport VideoBlock from './components/videoblock';\nimport VideoMatriseBlock from './components/videomatriseblock';\nexport const globalComponents = {\n types: {\n EkspanderendeBlock,\n ImageBlock,\n LinkListBlock,\n TextBlock,\n VideoBlock,\n VideoMatriseBlock,\n LoginBlock,\n },\n block: {\n h1: ({ children }) => _jsx(RichTextTitle, { htmlMarkup: \"h1\", children: children }),\n h2: ({ children }) => _jsx(RichTextTitle, { htmlMarkup: \"h2\", children: children }),\n h3: ({ children }) => _jsx(RichTextTitle, { htmlMarkup: \"h3\", children: children }),\n h4: ({ children }) => _jsx(RichTextTitle, { htmlMarkup: \"h4\", children: children }),\n h5: ({ children }) => _jsx(RichTextTitle, { htmlMarkup: \"h5\", children: children }),\n },\n marks: {\n link: Link,\n superscript: ({ children }) => _jsx(\"sup\", { children: children }),\n subscript: ({ children }) => _jsx(\"sub\", { children: children }),\n },\n};\nexport const isBlockModelList = (list) => Array.isArray(list) && list.length > 0 && list.every(item => '_type' in item);\n","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport { createContext } from 'react';\nimport { PortableText as PortableTextReact } from '@portabletext/react';\nimport { globalComponents } from './portable-text-utils';\nexport const PortableTextContext = createContext(undefined);\nexport const PortableText = ({ components, value, className, backgroundColor, ...rest }) => {\n if (!value) {\n return null;\n }\n return (_jsx(PortableTextContext.Provider, { value: { backgroundColor: backgroundColor }, children: _jsx(\"div\", { className: className, children: _jsx(PortableTextReact, { components: { ...globalComponents, ...components }, value: value, ...rest }) }) }));\n};\nexport default PortableText;\n","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\n/* eslint-disable jsx-a11y/interactive-supports-focus */\n/* eslint-disable jsx-a11y/click-events-have-key-events */\nimport React from 'react';\nimport classNames from 'classnames';\nimport { Collapse } from 'react-collapse';\nimport Icon from '@helsenorge/designsystem-react/components/Icon';\nimport ChevronDown from '@helsenorge/designsystem-react/components/Icons/ChevronDown';\nimport ChevronUp from '@helsenorge/designsystem-react/components/Icons/ChevronUp';\nimport Loader from '@helsenorge/designsystem-react/components/Loader';\nimport NotificationPanel from '@helsenorge/designsystem-react/components/NotificationPanel';\nimport PortableText from '@helsenorge/core-cms/richtext';\nimport { theme } from '@helsenorge/designsystem-react';\nimport { trackProsesshjelp } from '@helsenorge/framework-utils/adobe-analytics';\nexport class Seksjon extends React.Component {\n constructor(props) {\n super(props);\n this.state = {\n expanded: this.props.expanded,\n };\n this.toggleExpanded = this.toggleExpanded.bind(this);\n this.removeSeksjonClick = this.removeSeksjonClick.bind(this);\n }\n toggleExpanded() {\n if (this.props.toggleExpanded && this.props.seksjon) {\n if (this.props.seksjon.overskrift) {\n trackProsesshjelp('Prosesshjelp', 'Hjelp', this.props.seksjon.overskrift, !this.props.expanded ? 'Open' : 'Close');\n }\n this.props.toggleExpanded(this.props.seksjon.hjelpetekstId, this.props.seksjon.tjenesteNavn);\n }\n }\n removeSeksjonClick(event) {\n if (event !== undefined) {\n event.preventDefault();\n event.stopPropagation();\n }\n if (this.props.removeSeksjon && this.props.seksjon && this.props.seksjon.hjelpetekstId && this.props.seksjon.tjenesteNavn) {\n this.props.removeSeksjon(this.props.seksjon.hjelpetekstId, this.props.seksjon.tjenesteNavn);\n }\n }\n render() {\n const { resources, id, seksjon, expanded } = this.props;\n if (!seksjon || !resources) {\n return null;\n }\n let errorMessage;\n let seksjonComponent;\n const loader = seksjon.loading ? _jsx(Loader, { center: true, size: 'medium' }) : undefined;\n if (seksjon.error) {\n errorMessage = (_jsx(NotificationPanel, { label: resources.prosessHjelpError, variant: 'error', children: _jsx(\"p\", { children: resources.prosessHjelpErrorDescription }) }));\n }\n else {\n const sectionClasses = classNames('step', { open: expanded });\n seksjonComponent = (_jsxs(\"section\", { className: sectionClasses, children: [_jsx(\"div\", { className: \"org_helpdrawer__draweraccordionstepheader\", children: _jsx(\"h2\", { children: _jsxs(\"button\", { type: \"button\", onClick: this.toggleExpanded, className: \"org_helpdrawer__draweraccordionsteptitle\", \"aria-expanded\": expanded, \"aria-controls\": id, children: [_jsx(Icon, { svgIcon: expanded ? ChevronUp : ChevronDown, color: theme.palette.blueberry700 }), this.props.seksjon ? this.props.seksjon.overskrift : ''] }) }) }), _jsx(\"div\", { id: id, children: _jsx(Collapse, { isOpened: !!expanded, children: _jsx(\"div\", { children: _jsx(\"div\", { className: \"org_helpdrawer__draweraccordionstepcontents\", children: seksjon.brodtekst?.length && _jsx(PortableText, { value: seksjon.brodtekst }) }) }) }) })] }));\n }\n return (_jsxs(\"div\", { className: \"org_helpdrawer__draweraccordion\", children: [errorMessage, seksjonComponent, loader] }));\n }\n}\nObject.defineProperty(Seksjon, \"defaultProps\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: {\n resources: undefined,\n }\n});\n","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\n// Løses i forbindelse med #282399\n/* eslint-disable jsx-a11y/no-noninteractive-tabindex */\n/* eslint-disable jsx-a11y/role-has-required-aria-props */\nimport { useEffect, useState, useRef } from 'react';\nimport classNames from 'classnames';\nimport { Icon, IconSize } from '@helsenorge/designsystem-react/components/Icon';\nimport ChevronLeft from '@helsenorge/designsystem-react/components/Icons/ChevronLeft';\nimport ChevronRight from '@helsenorge/designsystem-react/components/Icons/ChevronRight';\nimport HelpSign from '@helsenorge/designsystem-react/components/Icons/HelpSign';\nimport X from '@helsenorge/designsystem-react/components/Icons/X';\nimport aria from '@helsenorge/core-utils/aria-hidden';\nimport TrapFocus from '@helsenorge/core-utils/trapfocus';\nimport { Breakpoint, theme, useBreakpoint, useFocusToggle, useHover } from '@helsenorge/designsystem-react';\nimport { trackProsesshjelp } from '@helsenorge/framework-utils/adobe-analytics';\nimport { setAllowNavigation } from '@helsenorge/framework-utils/hn-user';\nimport { Seksjon } from './seksjon';\nimport styles from './styles.module.scss';\nimport './styles.scss';\nexport const HjelpeskuffComponent = props => {\n const { isVisible = true, defaultSeksjon, resources, seksjoner } = props;\n const breakpoint = useBreakpoint();\n const [disableTransition, setDisableTransition] = useState(false);\n const { hoverRef, isHovered } = useHover();\n const helpTitleRef = useRef(null);\n const helpDrawerRef = useRef(null);\n const helpContentsRef = useRef(null);\n const [prevAriaHiddens, setPrevAriaHiddens] = useState();\n const [trapFocus, setTrapFocus] = useState();\n const [prevFocus, setPrevFocus] = useState();\n useFocusToggle(helpContentsRef, props.isOpen);\n const trackToggleOpen = (activeSeksjonId, isOpen) => {\n let activeSeksjon;\n if (activeSeksjonId && seksjoner) {\n activeSeksjon = seksjoner.find((seksjon) => {\n return activeSeksjonId === seksjon.hjelpetekstId;\n });\n }\n else {\n activeSeksjon = props.defaultSeksjon;\n }\n if (activeSeksjon && activeSeksjon.overskrift) {\n trackProsesshjelp('Prosesshjelp', 'Hjelp', activeSeksjon.overskrift, isOpen ? 'Open' : 'Close');\n }\n };\n const enableTrapFocus = () => {\n if (trapFocus) {\n return; // Focus already trapped\n }\n setPrevFocus(document.activeElement);\n setTrapFocus(new TrapFocus(helpDrawerRef.current));\n };\n const toggleFocus = () => {\n if (props.isOpen && isVisible) {\n enableTrapFocus();\n const node = helpDrawerRef.current;\n if (node instanceof Element) {\n setPrevAriaHiddens(aria.setAriaHidden(node));\n if (helpTitleRef.current) {\n helpTitleRef.current.focus();\n }\n }\n }\n };\n const releaseFocus = () => {\n if (prevAriaHiddens) {\n aria.resetAriaHidden(prevAriaHiddens);\n }\n if (trapFocus) {\n trapFocus.deactivate();\n setTrapFocus(undefined);\n if (prevFocus) {\n prevFocus.focus();\n }\n setPrevFocus(undefined);\n }\n };\n const handleToggleClick = () => {\n if (props.toggleShowHjelpeskuff) {\n props.toggleShowHjelpeskuff();\n }\n };\n const elementIsInHelpDrawer = (eventTarget) => {\n for (const target of eventTarget) {\n if (target?.classList?.contains('org_helpdrawer')) {\n return true;\n }\n }\n return false;\n };\n const elementIsInHjelpetrigger = (eventTarget) => {\n for (const target of eventTarget) {\n if (target?.classList?.contains('js-prosesshjelp')) {\n return true;\n }\n }\n return false;\n };\n const isMobile = () => {\n return breakpoint <= Breakpoint.sm;\n };\n const isOpenInHistoryState = () => {\n return window.history.state && window.history.state.helpDrawerOpen;\n };\n const removePreventscroll = () => {\n document.documentElement.classList.remove('preventscroll');\n };\n const isLightboxOpen = () => {\n return document.querySelectorAll('.toolkit-lightbox').length > 0;\n };\n const setScroll = () => {\n if (document.documentElement.classList.contains('preventscroll') && !props.isOpen && !isLightboxOpen()) {\n removePreventscroll();\n }\n else {\n document.documentElement.classList.add('preventscroll');\n }\n };\n const open = () => {\n // Only push state to enable back/forward browser navigation if help drawer use the full width (mobile)\n if (isMobile() && !isOpenInHistoryState()) {\n window.history.pushState(Object.assign({}, window.history.state, { helpDrawerOpen: true }), '', window.location.href);\n }\n setScroll();\n };\n const close = () => {\n if (isMobile() && isOpenInHistoryState()) {\n setAllowNavigation(true);\n window.history.back();\n }\n if (!isLightboxOpen()) {\n removePreventscroll();\n }\n };\n const disableTransitionToPreventDoubleAnimation = (callback) => {\n setDisableTransition(true);\n callback();\n window.setTimeout(() => {\n setDisableTransition(false);\n }, 500);\n };\n const popStateListener = () => {\n setAllowNavigation(false);\n const helpDrawerOpen = window.history.state && window.history.state.helpDrawerOpen;\n if (helpDrawerOpen && !props.isOpen && props.showHjelpeskuff) {\n disableTransitionToPreventDoubleAnimation(props.showHjelpeskuff);\n }\n else if (!helpDrawerOpen && props.isOpen && props.hideHjelpeskuff) {\n disableTransitionToPreventDoubleAnimation(props.hideHjelpeskuff);\n }\n };\n const clickListener = (e) => {\n if (isVisible && props.isOpen) {\n const eventPath = e.composedPath();\n if (!elementIsInHelpDrawer(eventPath) && !elementIsInHjelpetrigger(eventPath) && props.hideHjelpeskuff) {\n props.hideHjelpeskuff();\n }\n }\n };\n const removeSeksjon = (triggerId, tjenesteNavn) => {\n toggleFocus();\n if (props.removeSeksjon) {\n props.removeSeksjon(triggerId, tjenesteNavn);\n }\n };\n useEffect(() => {\n toggleFocus();\n }, []);\n useEffect(() => {\n if (props.isOpen) {\n window.addEventListener('popstate', popStateListener);\n window.addEventListener('click', clickListener);\n toggleFocus();\n open();\n trackToggleOpen(props.activeSeksjonId, props.isOpen);\n }\n else {\n releaseFocus();\n close();\n }\n return () => {\n releaseFocus();\n window.removeEventListener('popstate', popStateListener);\n window.removeEventListener('click', clickListener);\n };\n }, [props.isOpen]);\n if (!isVisible || !resources) {\n return null;\n }\n const helpDrawerClasses = classNames({\n org_helpdrawer: true,\n open: props.isOpen,\n });\n let defaultSeksjonComponent;\n let seksjonerComponent;\n if (defaultSeksjon != null) {\n defaultSeksjonComponent = (_jsx(Seksjon, { id: \"default\", seksjon: defaultSeksjon, expanded: !!defaultSeksjon.expanded, resources: resources, toggleExpanded: props.toggleExpanded }));\n }\n if (seksjoner != null) {\n seksjonerComponent = (_jsx(\"div\", { children: seksjoner.map((seksjon, index) => (_jsx(Seksjon, { id: index.toString(), seksjon: seksjon, expanded: !!seksjon.expanded, resources: resources, removeSeksjon: removeSeksjon, toggleExpanded: props.toggleExpanded }, index.toString()))) }));\n }\n let style = {};\n if (disableTransition) {\n style = { transitionDuration: '0s' };\n }\n const ariaLabelTitleText = defaultSeksjon && defaultSeksjon.overskrift\n ? defaultSeksjon.overskrift\n : seksjoner && seksjoner.length && seksjoner[0].overskrift\n ? seksjoner[0].overskrift\n : '';\n return (_jsxs(\"div\", { ref: helpDrawerRef, className: helpDrawerClasses, style: style, children: [_jsx(\"span\", { className: \"org_helpdrawer__control\", children: _jsxs(\"button\", { className: \"org_helpdrawer__controlbutton\", type: \"button\", onClick: handleToggleClick, tabIndex: 0, \"aria-label\": props.isOpen ? resources.helpDrawerCloseHelpButton : resources.helpDrawerToggleHelpButton, \"data-testid\": 'helpdrawer', children: [_jsx(Icon, { svgIcon: HelpSign, color: theme.palette.white, className: 'org_helpdrawer__icon' }), props.isOpen ? (_jsx(Icon, { svgIcon: ChevronRight, color: theme.palette.white })) : (_jsx(Icon, { svgIcon: ChevronLeft, color: theme.palette.white }))] }) }), _jsxs(\"div\", { className: \"org_helpdrawer__contents\", \"aria-hidden\": !props.isOpen, ref: helpContentsRef, children: [_jsxs(\"div\", { className: \"org_helpdrawer__drawerheader\", children: [_jsxs(\"div\", { className: \"helptitle-wrap\", role: \"heading\", tabIndex: 0, \"aria-label\": `${resources.helpDrawerHelpIconLabel} ${ariaLabelTitleText}`, ref: helpTitleRef, children: [_jsx(Icon, { svgIcon: HelpSign, color: theme.palette.white, className: 'org_helpdrawer__icon' }), _jsx(\"h1\", { className: \"helptitle\", children: resources.helpDrawerTitle })] }), _jsxs(\"button\", { ref: hoverRef, className: styles['close-button'], onClick: props.hideHjelpeskuff, type: \"button\", children: [_jsx(Icon, { size: IconSize.XSmall, svgIcon: X, color: theme.palette.white, isHovered: isHovered }), _jsx(\"span\", { className: styles['close-button__screen-reader-text'], children: resources.helpDrawerCloseHelpButton })] })] }), _jsxs(\"div\", { children: [defaultSeksjonComponent, seksjonerComponent] })] })] }));\n};\nexport default HjelpeskuffComponent;\n","import { selectCmsTjenesteTekster, selectCmsTjenesteTekstForHjelpetekstId } from '@helsenorge/framework-utils/cms-tjeneste-tekster';\nconst TOGGLE_SHOW = 'hjelpeskuff/TOGGLE_SHOW';\nconst TOGGLE_SHOW_HELPITEM = 'hjelpeskuff/TOGGLE_SHOW_HELPITEM';\nconst SET_ACTIVE_HELPBUBBLE = 'hjelpeskuff/SET_ACTIVE_HELPBUBBLE';\nconst HIDE = 'hjelpeskuff/HIDE';\nconst SHOW = 'hjelpeskuff/SHOW';\nconst REMOVE_SEKSJON = 'hjelpeskuff/REMOVE_SEKSJON';\nconst TOGGLE_EXPANDED = 'hjelpeskuff/TOGGLE_EXPANDED';\nconst ADD_HJELPETRIGGER = 'hjelpeskuff/ADD_HJELPETRIGGER';\nconst REMOVE_HJELPETRIGGER = 'hjelpeskuff/ADD_HJELPETRIGGER';\nconst POPULATE_SKUFF = 'hjelpeskuff/POPULATE_SKUFF';\nconst initialState = {\n isOpen: false,\n activeBubble: undefined,\n activeSeksjonId: undefined,\n activeTriggerComponentId: undefined,\n seksjoner: [],\n defaultIsExpanded: undefined,\n triggerComponentIds: [],\n};\nfunction collapseAll(seksjoner) {\n return seksjoner.map((seksjon) => {\n if (seksjon.expanded) {\n return Object.assign({}, seksjon, {\n expanded: false,\n });\n }\n return seksjon;\n });\n}\nfunction isDefaultTrigger(action) {\n return action.hjelpetekstId === undefined;\n}\nexport function processToggleShowHelp(state = initialState, action) {\n const { activeSeksjonId, activeTriggerComponentId } = state;\n let seksjoner = state.seksjoner;\n const sameTriggerId = activeSeksjonId === action.hjelpetekstId;\n const sameTriggerComponentId = activeTriggerComponentId ? activeTriggerComponentId === action.triggerComponentId : false;\n if (!isDefaultTrigger(action)) {\n if (seksjoner && !seksjoner.some(s => s.hjelpetekstId === action.hjelpetekstId)) {\n seksjoner = collapseAll(seksjoner).concat({\n hjelpetekstId: action.hjelpetekstId,\n tjenesteNavn: action.tjenesteNavn,\n expanded: true,\n });\n }\n else {\n seksjoner =\n state.seksjoner &&\n state.seksjoner.map((seksjon) => {\n if (seksjon.hjelpetekstId === action.hjelpetekstId && seksjon.tjenesteNavn === action.tjenesteNavn) {\n return Object.assign({}, seksjon, { expanded: true });\n }\n if (seksjon.expanded) {\n return Object.assign({}, seksjon, { expanded: false });\n }\n return seksjon;\n });\n }\n }\n else if (seksjoner) {\n seksjoner = collapseAll(seksjoner);\n }\n if (!sameTriggerId || !state.isOpen) {\n // Add new helpsection to state\n return Object.assign({}, state, {\n isOpen: true,\n activeSeksjonId: action.hjelpetekstId,\n activeTriggerComponentId: action.triggerComponentId,\n tjenesteNavn: action.tjenesteNavn,\n activeBubble: undefined,\n seksjoner,\n defaultIsExpanded: isDefaultTrigger(action),\n });\n }\n else if (sameTriggerId && state.isOpen) {\n return Object.assign({}, state, {\n isOpen: false,\n activeSeksjonId: undefined,\n activeTriggerComponentId: undefined,\n activeBubble: undefined,\n });\n }\n else if (!sameTriggerComponentId) {\n // Add new active trigger id\n return Object.assign({}, state, {\n activeTriggerComponentId: action.triggerComponentId,\n });\n }\n // Same trigger clicked as last time, close drawer\n return Object.assign({}, state, {\n isOpen: false,\n activeSeksjonId: undefined,\n activeTriggerComponentId: undefined,\n activeBubble: undefined,\n });\n}\nfunction getBlankSeksjonIdIfActiv(action, state) {\n if (state.activeSeksjonId === action.hjelpetekstId) {\n return '';\n }\n return state.activeSeksjonId ? state.activeSeksjonId : '';\n}\nfunction removeSection(seksjoner, triggerId, tjenesteNavn) {\n if (triggerId != null && triggerId !== '' && seksjoner != null) {\n if (seksjoner.some(s => s.hjelpetekstId === triggerId)) {\n return seksjoner.filter(item => !(item.hjelpetekstId === triggerId && item.tjenesteNavn === tjenesteNavn));\n }\n }\n return seksjoner;\n}\nexport default function reducer(state = initialState, action) {\n switch (action.type) {\n case TOGGLE_SHOW:\n return Object.assign({}, state, {\n isOpen: !state.isOpen,\n activeBubble: undefined,\n activeTriggerComponentId: undefined,\n defaultIsExpanded: state.defaultIsExpanded === undefined ? true : state.defaultIsExpanded,\n });\n case TOGGLE_SHOW_HELPITEM:\n return processToggleShowHelp(state, action);\n case SET_ACTIVE_HELPBUBBLE:\n return Object.assign({}, state, {\n isOpen: false,\n activeBubble: action.triggerComponentId,\n activeSeksjonId: undefined,\n });\n case HIDE:\n return Object.assign({}, state, {\n isOpen: false,\n activeTriggerComponentId: undefined,\n });\n case SHOW:\n return Object.assign({}, state, {\n isOpen: true,\n defaultIsExpanded: state.defaultIsExpanded === undefined ? true : state.defaultIsExpanded,\n });\n case REMOVE_SEKSJON:\n return Object.assign({}, state, {\n activeSeksjonId: getBlankSeksjonIdIfActiv(action, state),\n seksjoner: removeSection(state.seksjoner ? state.seksjoner : [], action.hjelpetekstId ? action.hjelpetekstId : '', action.tjenesteNavn ? action.tjenesteNavn : ''),\n });\n case TOGGLE_EXPANDED:\n if (isDefaultTrigger(action)) {\n return Object.assign({}, state, { defaultIsExpanded: !state.defaultIsExpanded });\n }\n return Object.assign({}, state, {\n seksjoner: state.seksjoner\n ? state.seksjoner.map((seksjon) => {\n if (seksjon.hjelpetekstId === action.hjelpetekstId && seksjon.tjenesteNavn === action.tjenesteNavn) {\n return Object.assign({}, seksjon, {\n expanded: !seksjon.expanded,\n });\n }\n return seksjon;\n })\n : [],\n });\n case ADD_HJELPETRIGGER:\n return Object.assign({}, state, {\n triggerComponentIds: state.triggerComponentIds\n ? [...state.triggerComponentIds, action.triggerComponentId]\n : [action.triggerComponentId],\n });\n case REMOVE_HJELPETRIGGER:\n return Object.assign({}, state, {\n triggerComponentIds: state.triggerComponentIds ? state.triggerComponentIds.filter(id => id !== action.triggerComponentId) : [],\n });\n case POPULATE_SKUFF:\n return Object.assign({}, state, {\n seksjoner: state.seksjoner\n ? state.seksjoner.concat({\n hjelpetekstId: action.hjelpetekstId,\n tjenesteNavn: action.tjenesteNavn,\n expanded: true,\n })\n : [],\n });\n default:\n return state;\n }\n}\nexport function toggleShowHjelpeskuff() {\n return {\n type: TOGGLE_SHOW,\n };\n}\nexport function toggleShowHelpItem(triggerComponentId, hjelpetekstId, tjenesteNavn) {\n return {\n type: TOGGLE_SHOW_HELPITEM,\n triggerComponentId,\n hjelpetekstId,\n tjenesteNavn,\n };\n}\nexport function removeSeksjonTekst(hjelpetekstId, tjenesteNavn) {\n return {\n type: REMOVE_SEKSJON,\n hjelpetekstId,\n tjenesteNavn,\n };\n}\nexport function toggleExpanded(hjelpetekstId, tjenesteNavn) {\n return {\n type: TOGGLE_EXPANDED,\n hjelpetekstId,\n tjenesteNavn,\n };\n}\nexport function hideHjelpeskuff() {\n return {\n type: HIDE,\n };\n}\nexport function showHjelpeskuff() {\n return {\n type: SHOW,\n };\n}\nexport function addHjelpetrigger(triggerComponentId) {\n return {\n type: ADD_HJELPETRIGGER,\n triggerComponentId: triggerComponentId,\n };\n}\nexport function removeHjelpetrigger(triggerComponentId) {\n return {\n type: REMOVE_HJELPETRIGGER,\n triggerComponentId: triggerComponentId,\n };\n}\nexport function setActiveBubble(triggerComponentId) {\n return {\n type: SET_ACTIVE_HELPBUBBLE,\n triggerComponentId: triggerComponentId,\n };\n}\nexport function populateSkuff(hjelpetekstId, tjenesteNavn) {\n return {\n type: POPULATE_SKUFF,\n hjelpetekstId,\n tjenesteNavn,\n };\n}\nexport function getTriggerData(state, hjelpetekstId, tjenesteNavn) {\n const triggerData = selectCmsTjenesteTekstForHjelpetekstId(state, tjenesteNavn, hjelpetekstId);\n if (triggerData != null) {\n const { sporsmaalTekst, hjelpeboble, hjelpetekst, overskrift } = triggerData;\n return {\n sporsmalstekst: sporsmaalTekst,\n bobletekst: hjelpeboble,\n hasSeksjonText: !!hjelpetekst?.length && !!overskrift,\n };\n }\n return undefined;\n}\nexport function getActiveBubble(state) {\n const skuff = state.hjelpeskuff;\n return skuff.activeBubble ?? '';\n}\nexport function getDefaultTekst(state, tjenesteNavn, hjelpetekstId) {\n const getDefaultTjenesteTekst = () => {\n const tjenesteTeksterDetails = selectCmsTjenesteTekster(state, tjenesteNavn);\n return {\n overskrift: tjenesteTeksterDetails?.data?.hjelpetekster?.overskift,\n brodtekst: tjenesteTeksterDetails?.data?.hjelpetekster?.hjelpetekst,\n };\n };\n const getSpesifikkHjelpetekst = () => {\n const spesifikkHjelpetekst = hjelpetekstId ? selectCmsTjenesteTekstForHjelpetekstId(state, tjenesteNavn, hjelpetekstId) : undefined;\n return {\n overskrift: spesifikkHjelpetekst?.overskrift,\n brodtekst: spesifikkHjelpetekst?.hjelpetekst,\n };\n };\n const shouldUseSpesifikkHjelpetekst = !!hjelpetekstId;\n const hjelpetekst = shouldUseSpesifikkHjelpetekst ? getSpesifikkHjelpetekst() : getDefaultTjenesteTekst();\n if (hjelpetekst.brodtekst && hjelpetekst.overskrift) {\n return {\n overskrift: hjelpetekst?.overskrift,\n brodtekst: hjelpetekst?.brodtekst,\n loading: false,\n error: false,\n expanded: state.hjelpeskuff.defaultIsExpanded,\n };\n }\n return null;\n}\nexport function getSeksjonTekst(state, seksjon) {\n if (!seksjon.tjenesteNavn)\n return null;\n const hjelpeteksterForTjeneste = selectCmsTjenesteTekster(state, seksjon.tjenesteNavn);\n const hjelpetekst = hjelpeteksterForTjeneste?.data?.hjelpetekster?.spesifikkeHjelpetekster?.find(ht => ht.id === seksjon.hjelpetekstId);\n if (hjelpetekst) {\n return {\n overskrift: hjelpetekst.overskrift,\n brodtekst: hjelpetekst.hjelpetekst,\n hjelpetekstId: seksjon.hjelpetekstId,\n tjenesteNavn: seksjon.tjenesteNavn,\n loading: false,\n error: false,\n expanded: seksjon.expanded,\n };\n }\n return null;\n}\n","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport React from 'react';\nimport { connect } from 'react-redux';\nimport { fetchTjenesteTekster } from '@helsenorge/framework-utils/cms-tjeneste-tekster';\nimport { getPath } from '@helsenorge/framework-utils/hn-page';\nimport { fetchResources, getResourcesFromState } from '@helsenorge/framework-utils/resources';\nimport HjelpeskuffComponent from './hjelpeskuff-component';\nimport { toggleShowHjelpeskuff, hideHjelpeskuff, showHjelpeskuff, getDefaultTekst, getSeksjonTekst, removeSeksjonTekst, toggleExpanded, toggleShowHelpItem, addHjelpetrigger, removeHjelpetrigger, } from './hjelpeskuff-state';\nimport { getResources, Projects } from '../../resources';\nexport const TriggerHelpItemEvent = 'HN-trigger-help-item';\nexport const AddHjelpetrigger = 'HN-add-hjelpetrigger';\nexport const RemoveHjelpetrigger = 'HN-remove-hjelpetrigger';\nclass HjelpeskuffContainer extends React.Component {\n constructor(props) {\n super(props);\n this.handleAddHjelpetriggerEvent = this.handleAddHjelpetriggerEvent.bind(this);\n this.handleRemoveHjelpetriggerEvent = this.handleRemoveHjelpetriggerEvent.bind(this);\n this.handleTriggerHelpEvent = this.handleTriggerHelpEvent.bind(this);\n }\n componentDidMount() {\n if (this.props.mount) {\n this.props.mount();\n }\n window.addEventListener(AddHjelpetrigger, this.handleAddHjelpetriggerEvent);\n window.addEventListener(RemoveHjelpetrigger, this.handleRemoveHjelpetriggerEvent);\n window.addEventListener(TriggerHelpItemEvent, this.handleTriggerHelpEvent);\n }\n componentWillUnmount() {\n window.removeEventListener(AddHjelpetrigger, this.handleAddHjelpetriggerEvent, false);\n window.removeEventListener(RemoveHjelpetrigger, this.handleRemoveHjelpetriggerEvent, false);\n window.removeEventListener(TriggerHelpItemEvent, this.handleTriggerHelpEvent, false);\n }\n handleAddHjelpetriggerEvent(event) {\n if (event.detail && this.props.addHjelpetrigger) {\n const triggerComponentId = event.detail.triggerComponentId;\n this.props.addHjelpetrigger(triggerComponentId);\n }\n }\n handleRemoveHjelpetriggerEvent(event) {\n if (event.detail && this.props.removeHjelpetrigger) {\n const triggerComponentId = event.detail.triggerComponentId;\n this.props.removeHjelpetrigger(triggerComponentId);\n }\n }\n handleTriggerHelpEvent(event) {\n if (event.detail && this.props.triggerHelpItem) {\n const hjelpetekstId = event.detail.hjelpetekstId;\n const tjenesteNavn = event.detail.tjenesteNavn;\n const triggerComponentId = event.detail.triggerComponentId;\n this.props.triggerHelpItem(hjelpetekstId, tjenesteNavn, triggerComponentId);\n }\n }\n render() {\n const { triggerComponentIds, mount, ...other } = this.props;\n if (!this.props.resources || (!this.props.defaultSeksjon && this.props.seksjoner && this.props.seksjoner.length === 0)) {\n return null;\n }\n return (_jsx(\"div\", { children: _jsx(HjelpeskuffComponent, { ...other }) }));\n }\n}\nfunction mapStateToProps(state, props) {\n const tjenesteNavn = props.tjenesteNavn ?? getPath();\n const defaultSeksjon = getDefaultTekst(state, tjenesteNavn, props.hjelpetekstId);\n const seksjoner = (state.hjelpeskuff.seksjoner?.map(seksjon => getSeksjonTekst(state, seksjon))?.filter(s => s != null) ??\n []);\n return {\n activeSeksjonId: state.hjelpeskuff.activeSeksjonId,\n seksjoner,\n defaultSeksjon,\n isOpen: state.hjelpeskuff.isOpen,\n triggerComponentIds: state.hjelpeskuff.triggerComponentIds,\n resources: getResourcesFromState(state, Projects.FRAMEWORK),\n };\n}\nfunction mapDispatchToProps(dispatch, props) {\n return {\n mount: () => {\n dispatch(fetchResources({ project: Projects.FRAMEWORK, language: props.language, getResources }));\n dispatch(fetchTjenesteTekster({ name: props.tjenesteNavn ?? getPath(), language: props.language }));\n },\n toggleExpanded: (hjelpetekstId, tjenesteNavn) => {\n dispatch(toggleExpanded(hjelpetekstId, tjenesteNavn));\n },\n toggleShowHjelpeskuff: () => {\n dispatch(toggleShowHjelpeskuff());\n },\n hideHjelpeskuff: () => {\n dispatch(hideHjelpeskuff());\n },\n showHjelpeskuff: () => {\n dispatch(showHjelpeskuff());\n },\n removeSeksjon: (hjelpetekstId, tjenesteNavn) => {\n dispatch(removeSeksjonTekst(hjelpetekstId, tjenesteNavn));\n },\n triggerHelpItem: (hjelpetekstId, tjenesteNavn, triggerComponentId) => {\n dispatch(toggleShowHelpItem(triggerComponentId ? triggerComponentId : '', hjelpetekstId, tjenesteNavn ?? ''));\n },\n addHjelpetrigger: (triggerComponentId) => {\n dispatch(addHjelpetrigger(triggerComponentId ? triggerComponentId : ''));\n },\n removeHjelpetrigger: (triggerComponentId) => {\n dispatch(removeHjelpetrigger(triggerComponentId ? triggerComponentId : ''));\n },\n language: props.language,\n };\n}\nexport default connect(mapStateToProps, mapDispatchToProps)(HjelpeskuffContainer);\n","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport React from 'react';\nimport HelpQuestion from '@helsenorge/designsystem-react/components/HelpQuestion';\nimport Trigger from '@helsenorge/designsystem-react/components/Trigger';\nimport { TriggerHelpItemEvent } from '../hjelpeskuff';\nconst HjelpetriggerComponent = React.forwardRef(({ resources, sporsmalstekst, classes, tjenesteNavn, hjelpetekstId, helpBubbleIsExpanded, size, stopPropagation, useCustomEvent, onClick, }, ref) => {\n if (!resources) {\n return null;\n }\n const handleHelpClick = (event) => {\n if (stopPropagation && event) {\n event.stopPropagation();\n }\n if (useCustomEvent) {\n const helpElement = {\n hjelpetekstId: hjelpetekstId,\n tjenesteNavn,\n triggerComponentId: hjelpetekstId, // denne skal egentlig være unik\n };\n const triggerHelpItemEvent = new CustomEvent(TriggerHelpItemEvent, {\n detail: helpElement,\n });\n window.dispatchEvent(triggerHelpItemEvent);\n }\n if (onClick) {\n onClick();\n }\n };\n let trigger;\n if (sporsmalstekst) {\n trigger = (_jsx(HelpQuestion, { className: classes, onClick: handleHelpClick, ref: ref, children: sporsmalstekst }));\n }\n else {\n trigger = (_jsx(Trigger, { className: classes, onClick: handleHelpClick, ariaLabel: resources.helpTriggerLabel, selected: helpBubbleIsExpanded, size: size, ref: ref }));\n }\n return _jsx(\"span\", { className: \"js-prosesshjelp\", children: trigger });\n});\nHjelpetriggerComponent.displayName = 'HjelpetriggerComponent';\nexport default HjelpetriggerComponent;\n","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport React from 'react';\nimport HelpBubble from '@helsenorge/designsystem-react/components/HelpBubble';\nimport SafeHTML from '@helsenorge/framework-utils/components/safe-html';\nimport HjelpetriggerComponent from './hjelpetrigger-component';\nexport const HjelpebobleComponent = ({ hjelpetekstId, resources, onChange, onShowMoreClick, visible, triggerData, tjenesteNavn, bubbleText, moreHelpText, }) => {\n const hjelpetriggerRef = React.useRef(null);\n const showMoreButton = triggerData ? triggerData.hasSeksjonText : false;\n const renderBubbleContent = () => {\n return bubbleText ? _jsx(SafeHTML, { html: bubbleText }) : _jsx(\"span\", { children: triggerData?.bobletekst ?? '' });\n };\n const showMoreClickHandler = (event) => {\n event?.stopPropagation();\n if (onShowMoreClick) {\n onShowMoreClick(hjelpetekstId, tjenesteNavn);\n }\n };\n const renderBubble = () => {\n return (_jsx(HelpBubble, { controllerRef: hjelpetriggerRef, linkText: moreHelpText ? moreHelpText : resources?.moreHelp, onLinkClick: showMoreButton ? showMoreClickHandler : undefined, showBubble: visible, closeAriaLabel: resources?.helpBubbleClose, onClose: () => {\n onChange && onChange();\n }, children: renderBubbleContent() }));\n };\n if (!triggerData || !resources) {\n return _jsx(\"div\", {});\n }\n return (_jsxs(\"span\", { children: [_jsx(HjelpetriggerComponent, { ref: hjelpetriggerRef, hjelpetekstId: hjelpetekstId, resources: resources, sporsmalstekst: triggerData.sporsmalstekst, tjenesteNavn: tjenesteNavn, onClick: onChange, helpBubbleIsExpanded: visible }), renderBubble()] }));\n};\nexport default HjelpebobleComponent;\n","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport React from 'react';\nimport { connect } from 'react-redux';\nimport LanguageLocales from '@helsenorge/core-utils/constants/languages';\nimport { fetchTjenesteTekster } from '@helsenorge/framework-utils/cms-tjeneste-tekster';\nimport { fetchResources, getResourcesFromState } from '@helsenorge/framework-utils/resources';\nimport { GetResourcesEvent } from './../hjelpetrigger';\nimport HjelpetriggerComponent from './hjelpetrigger-component';\nimport { getResources, Projects } from '../../resources';\nimport { AddHjelpetrigger, RemoveHjelpetrigger } from '../hjelpeskuff';\nexport class HjelpetriggerContainer extends React.Component {\n componentDidMount() {\n if (this.props.useCustomEvent) {\n const helpElement = {\n triggerComponentId: this.props.triggerComponentId, // denne skal egentlig være unik. this.createUniqueId() benyttes i container\n tjenesteNavn: this.props.tjenesteNavn,\n hjelpetekstId: this.props.hjelpetekstId,\n language: this.props.language,\n };\n const addHjelpetriggerEvent = new CustomEvent(AddHjelpetrigger, {\n detail: helpElement,\n });\n window.dispatchEvent(addHjelpetriggerEvent);\n const getResourcesEvent = new CustomEvent(GetResourcesEvent, {\n detail: helpElement,\n });\n window.dispatchEvent(getResourcesEvent);\n }\n }\n componentWillUnmount() {\n if (this.props.useCustomEvent) {\n const helpElement = {\n triggerComponentId: this.props.triggerComponentId, // denne skal egentlig være unik. this.createUniqueId() benyttes i container\n };\n const removeHjelpetriggerEvent = new CustomEvent(RemoveHjelpetrigger, {\n detail: helpElement,\n });\n window.dispatchEvent(removeHjelpetriggerEvent);\n }\n }\n render() {\n const { resources, sporsmalstekst, classes, hjelpetekstId, isDefault, size, tjenesteNavn, onClick, helpBubbleIsExpanded, stopPropagation, useCustomEvent, } = this.props;\n return (_jsx(HjelpetriggerComponent, { hjelpetekstId: hjelpetekstId, isDefault: isDefault, resources: resources, classes: classes, size: size, sporsmalstekst: sporsmalstekst, tjenesteNavn: tjenesteNavn, onClick: onClick, helpBubbleIsExpanded: helpBubbleIsExpanded, stopPropagation: stopPropagation, useCustomEvent: useCustomEvent }));\n }\n}\nfunction mapStateToProps(state, props) {\n return {\n ...props,\n resources: getResourcesFromState(state, Projects.FRAMEWORK),\n };\n}\nfunction mapDispatchToProps(dispatch, props) {\n const language = props.language ?? LanguageLocales.NORWEGIAN;\n return {\n ...props,\n mount: () => {\n dispatch(fetchResources({ project: Projects.FRAMEWORK, language: language, getResources }));\n if (props.tjenesteNavn) {\n dispatch(fetchTjenesteTekster({ name: props.tjenesteNavn, language: language }));\n }\n },\n dispatch,\n };\n}\nexport default connect(mapStateToProps, mapDispatchToProps)(HjelpetriggerContainer);\n","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport React from 'react';\nimport { connect } from 'react-redux';\nimport LanguageLocales from '@helsenorge/core-utils/constants/languages';\nimport { uuid } from '@helsenorge/designsystem-react';\nimport { fetchTjenesteTekster } from '@helsenorge/framework-utils/cms-tjeneste-tekster';\nimport { getPath } from '@helsenorge/framework-utils/hn-page';\nimport { fetchResources, getResourcesFromState } from '@helsenorge/framework-utils/resources';\nimport HjelpebobleComponent from './hjelpeboble-component';\nimport HjelpetriggerContainer from './hjelpetrigger-container';\nimport { getResources, Projects } from '../../resources';\nimport { addHjelpetrigger, removeHjelpetrigger, populateSkuff, getTriggerData, getActiveBubble, setActiveBubble, toggleShowHelpItem, } from '../hjelpeskuff/hjelpeskuff-state';\nexport const GetResourcesEvent = 'HN-Get-Resources';\nclass Hjelpetrigger extends React.Component {\n constructor(props) {\n super(props);\n this.validateProps(props);\n this.handleBubbleClick = this.handleBubbleClick.bind(this);\n this.handleTriggerClick = this.handleTriggerClick.bind(this);\n this.getResourcesEvent = this.getResourcesEvent.bind(this);\n this.state = {\n triggerComponentId: this.createUniqueId(),\n };\n }\n componentDidMount() {\n if (this.props.mount) {\n this.props.mount();\n }\n const { dispatch } = this.props;\n if (!this.props.isDefault && dispatch && this.state.triggerComponentId) {\n dispatch(addHjelpetrigger(this.state.triggerComponentId));\n }\n if (this.props.populateSkuff && dispatch && this.props.hjelpetekstId && this.props.tjenesteNavn) {\n dispatch(populateSkuff(this.props.hjelpetekstId, this.props.tjenesteNavn));\n }\n window.addEventListener(GetResourcesEvent, this.getResourcesEvent);\n }\n componentWillUnmount() {\n const { dispatch } = this.props;\n if (!this.props.isDefault && dispatch && this.state.triggerComponentId) {\n dispatch(removeHjelpetrigger(this.state.triggerComponentId));\n }\n window.removeEventListener(GetResourcesEvent, this.getResourcesEvent);\n }\n getResourcesEvent(event) {\n if (event.detail && event.detail.tjenesteNavn && this.props.dispatch) {\n this.props.dispatch(fetchResources({ project: Projects.FRAMEWORK, language: event.detail.language, getResources }));\n this.props.dispatch(fetchTjenesteTekster({ name: event.detail.tjenesteNavn, language: event.detail.language }));\n }\n }\n createUniqueId() {\n return uuid();\n }\n validateProps(props) {\n if (props.isDefault) {\n this.validateDefaultProps(props);\n }\n else if (!props.hjelpetekstId) {\n throw new Error('HjelpetekstId må angis for helpTrigger');\n }\n }\n validateDefaultProps(props) {\n if (!props.isDefault) {\n return;\n }\n if (props.hjelpetekstId) {\n throw new Error('Default helptrigger kan ikke ha en hjelpetekstId...');\n }\n }\n handleBubbleClick() {\n const { dispatch } = this.props;\n const { triggerComponentId } = this.state;\n if (dispatch) {\n if (this.isBubbleVisible()) {\n dispatch(setActiveBubble(''));\n }\n else if (triggerComponentId) {\n dispatch(setActiveBubble(triggerComponentId));\n }\n }\n }\n handleTriggerClick(overrideHelpetekstId, overrideTjenesteNavn) {\n const { dispatch, hjelpetekstId, tjenesteNavn } = this.props;\n const { triggerComponentId } = this.state;\n const newHjelpetekstId = overrideHelpetekstId || hjelpetekstId;\n const newTjenesteNavn = overrideTjenesteNavn || tjenesteNavn;\n if (dispatch) {\n dispatch(toggleShowHelpItem(triggerComponentId ? triggerComponentId : '', newHjelpetekstId, newTjenesteNavn || ''));\n }\n }\n isBubbleVisible() {\n const { activeBubble } = this.props;\n const { triggerComponentId } = this.state;\n return activeBubble === triggerComponentId;\n }\n renderHjelpetrigger() {\n const { isDefault, triggerData, stopPropagation, ...other } = this.props;\n const extraProps = {\n triggerComponentId: this.state.triggerComponentId,\n };\n if (!isDefault && triggerData) {\n extraProps.sporsmalstekst = triggerData.sporsmalstekst;\n }\n return (_jsx(HjelpetriggerContainer, { size: this.props.size, ...other, ...extraProps, onClick: this.handleTriggerClick, stopPropagation: stopPropagation }));\n }\n render() {\n const { resources, triggerData, hjelpetekstId, tjenesteNavn, isDefault, bubbleText, moreHelpText } = this.props;\n if (!resources) {\n return null;\n }\n let helpTriggerItem;\n if (bubbleText || (triggerData && triggerData.bobletekst)) {\n helpTriggerItem = (_jsx(HjelpebobleComponent, { hjelpetekstId: hjelpetekstId, resources: resources, onChange: this.handleBubbleClick, onShowMoreClick: this.handleTriggerClick, visible: this.isBubbleVisible(), triggerData: triggerData, tjenesteNavn: tjenesteNavn, bubbleText: bubbleText, moreHelpText: moreHelpText }));\n }\n else if (isDefault || triggerData) {\n helpTriggerItem = this.renderHjelpetrigger();\n }\n return _jsx(\"span\", { children: helpTriggerItem });\n }\n}\nfunction mapStateToProps(state, props) {\n return {\n resources: getResourcesFromState(state, Projects.FRAMEWORK),\n tjenesteNavn: props.tjenesteNavn || getPath(),\n triggerData: props.isDefault ? undefined : getTriggerData(state, props.hjelpetekstId || '', props.tjenesteNavn || getPath() || ''),\n activeBubble: getActiveBubble(state),\n };\n}\nfunction mapDispatchToProps(dispatch, props) {\n return {\n mount: () => {\n dispatch(fetchResources({ project: Projects.FRAMEWORK, language: props.language ?? LanguageLocales.NORWEGIAN, getResources }));\n const tjenesteNavn = props.tjenesteNavn ?? getPath();\n if (tjenesteNavn) {\n dispatch(fetchTjenesteTekster({ name: tjenesteNavn, language: props.language ?? LanguageLocales.NORWEGIAN }));\n }\n },\n dispatch,\n };\n}\nexport default connect(mapStateToProps, mapDispatchToProps)(Hjelpetrigger);\n","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport Eye from '@helsenorge/designsystem-react/components/Icons/Eye';\nimport NoEye from '@helsenorge/designsystem-react/components/Icons/NoEye';\nimport FrankensteinSharingStatus from '@helsenorge/designsystem-react/components/SharingStatus';\nimport useResources from '@helsenorge/framework-utils/resources/useResources';\nimport { getResources, Projects } from '../resources';\nimport styles from './styles.module.scss';\nconst SharingStatus = ({ classNames, selectedStatusType }) => {\n const resources = useResources(Projects.FRAMEWORK, getResources);\n if (!resources) {\n return null;\n }\n let sharingStatus = null;\n if (selectedStatusType === 'deltMedBarnet') {\n sharingStatus = (_jsx(FrankensteinSharingStatus, { icon: Eye, color: 'kiwi', className: styles['sharing-status-label'], children: resources.sharing_Status_Delt_Med_Barnet }));\n }\n if (selectedStatusType === 'bareSynligForDeg') {\n sharingStatus = (_jsx(FrankensteinSharingStatus, { icon: NoEye, color: 'cherry', className: styles['sharing-status-label'], children: resources.sharing_Status_Bare_Synlig_For_Deg }));\n }\n return _jsx(\"div\", { className: classNames, children: sharingStatus });\n};\nexport default SharingStatus;\n","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport classNames from 'classnames';\nimport Title from '@helsenorge/designsystem-react/components/Title';\nimport designsystemtypography from '@helsenorge/designsystem-react/scss/typography.module.scss';\nimport LanguageLocales from '@helsenorge/core-utils/constants/languages';\nimport SafeHTML from '@helsenorge/framework-utils/components/safe-html';\nimport { getSidetittelId } from '@helsenorge/framework-utils/hn-page';\nimport { getErRepresentasjon, getHarAktivtForeldreSamtykke } from '@helsenorge/framework-utils/hn-user';\nimport { Hjelpetrigger } from '../prosesshjelp/index';\nimport SharingStatus from '../sharing-status';\nimport frameworkstyles from './styles.module.scss';\nconst PageHeader = ({ title, titleId = getSidetittelId(), subtitle, description, tjenesteNavn, hjelpetekstId, delAvForeldresamtykke, headerClassName, headerSubtitleClassName, headerTitleClassName, headerIngressClassName, showHjelpetrigger, language = LanguageLocales.NORWEGIAN, }) => {\n const hasHjelpetrigger = tjenesteNavn && showHjelpetrigger;\n const renderHjelpetrigger = () => (_jsx(\"span\", { className: frameworkstyles.pageheader__hjelpetrigger, children: _jsx(Hjelpetrigger, { size: 'large', isDefault: hjelpetekstId === undefined, tjenesteNavn: tjenesteNavn, hjelpetekstId: hjelpetekstId, language: language }) }));\n if (!title && !description) {\n return null;\n }\n const pageHeaderClasses = classNames('col-12', 'col-lg-10', frameworkstyles.pageheader, headerClassName);\n const titleClasses = classNames(frameworkstyles.pageheader__title, hasHjelpetrigger && frameworkstyles['pageheader__title--trigger'], headerTitleClassName);\n return (_jsx(\"div\", { className: \"row\", children: _jsxs(\"div\", { className: pageHeaderClasses, children: [subtitle && _jsx(\"div\", { className: classNames(frameworkstyles['pageheader__subtitle'], headerSubtitleClassName), children: subtitle }), _jsx(Title, { id: titleId, htmlMarkup: 'h1', appearance: 'title1', margin: 0, className: titleClasses, children: title }), hasHjelpetrigger && renderHjelpetrigger(), _jsx(\"hn-webcomp-infopanel\", {}), description && (_jsx(SafeHTML, { html: description, tagName: \"p\", className: classNames(designsystemtypography['anchorlink-wrapper'], frameworkstyles.pageheader__ingress, headerIngressClassName) })), getHarAktivtForeldreSamtykke() && getErRepresentasjon() && delAvForeldresamtykke && (_jsx(SharingStatus, { classNames: frameworkstyles['pageheader__sharing-status'], selectedStatusType: 'deltMedBarnet' }))] }) }));\n};\nexport default PageHeader;\n","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport { useEffect, useState } from 'react';\nimport { useLocation } from 'react-router-dom';\nimport { HNeventSetRedirectTo, HNeventSetRedirectToUrlAfterLogin } from '@helsenorge/framework-utils/web-component/events';\nconst Personvelger = ({ redirectTo, redirectToUrlAfterLogin }) => {\n const [webcompIsReady, setWebcompIsReady] = useState(false);\n const location = useLocation();\n useEffect(() => {\n setWebcompIsReady(true);\n }, []);\n useEffect(() => {\n if (webcompIsReady) {\n if (redirectTo) {\n HNeventSetRedirectTo(redirectTo);\n }\n if (redirectToUrlAfterLogin) {\n HNeventSetRedirectToUrlAfterLogin(redirectToUrlAfterLogin);\n }\n }\n }, [redirectTo, redirectToUrlAfterLogin, history, location, webcompIsReady]);\n return _jsx(\"hn-webcomp-personvelger\", {});\n};\nexport default Personvelger;\n","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { useEffect } from 'react';\nimport { handleIOSSafariUA } from '@helsenorge/core-utils/user-agents-utils';\nimport { getCanShowHjelpetekstInPageHeader } from '@helsenorge/framework-utils/cms-tjeneste-tekster';\nimport { getPath, getSidetittelId } from '@helsenorge/framework-utils/hn-page';\nimport { getVisPersonvelger } from '@helsenorge/framework-utils/hn-user';\nimport useResources from '@helsenorge/framework-utils/resources/useResources';\nimport { hasSamtykke } from '@helsenorge/framework-utils/samtykke-utils';\nimport Breadcrumb from '../breadcrumb';\nimport { getRedirectToUrlAfterLogin, getDelAvForeldresamtykke } from '../common/configuration';\nimport ErrorBoundary from '../error-boundary';\nimport FeedbackContainer from '../feedback/container';\nimport LanguagePickerWrapper from '../language-picker-wrapper';\nimport PageHeader from '../page-header';\nimport Personvelger from '../personvelger';\nimport { getResources, Projects } from '../resources';\nimport { useAppSelector } from '../store/hooks';\nimport './styles.scss';\nconst Master = props => {\n const { title, description, mainAriaLabelledby, tjenesteNavn = getPath(), className, visPersonvelger = getVisPersonvelger(), breadcrumbLink, redirectTo, hasFullwidth, noBreadcrumb = false, noDriftspanel, noLanguagePicker, showFeedbackForm, hasPageHeader = true, headerClassName, headerSubtitleClassName, headerTitleClassName, headerIngressClassName, subtitle, hjelpetekstId, showHjelpeskuffInPageHeader, } = props;\n const resources = useResources(Projects.FRAMEWORK, getResources);\n const redirectToUrlAfterLogin = getRedirectToUrlAfterLogin();\n const canShowHjelpetekstInPageHeader = useAppSelector(state => getCanShowHjelpetekstInPageHeader(state, tjenesteNavn, hjelpetekstId));\n const showHjelpeskuffInPageHeaderState = !!showHjelpeskuffInPageHeader && canShowHjelpetekstInPageHeader;\n useEffect(() => {\n handleIOSSafariUA();\n if (props.mount) {\n props.mount();\n }\n }, []);\n const getTitleId = () => {\n if (mainAriaLabelledby) {\n return mainAriaLabelledby;\n }\n if (title && hasPageHeader) {\n return getSidetittelId();\n }\n };\n if (visPersonvelger && hasSamtykke()) {\n return _jsx(Personvelger, { redirectTo: redirectTo, redirectToUrlAfterLogin: redirectToUrlAfterLogin });\n }\n return (_jsxs(\"div\", { className: className, children: [!noDriftspanel && _jsx(\"hn-webcomp-driftspanel\", {}), !noBreadcrumb && _jsx(Breadcrumb, { link: breadcrumbLink }), !noLanguagePicker && _jsx(LanguagePickerWrapper, {}), _jsxs(\"main\", { className: !hasFullwidth ? 'container' : '', \"aria-labelledby\": getTitleId(), children: [hasPageHeader && (_jsx(PageHeader, { title: title, titleId: getTitleId(), subtitle: subtitle, showHjelpetrigger: showHjelpeskuffInPageHeaderState, delAvForeldresamtykke: getDelAvForeldresamtykke(), description: description, tjenesteNavn: tjenesteNavn, headerClassName: headerClassName, headerSubtitleClassName: headerSubtitleClassName, headerTitleClassName: headerTitleClassName, headerIngressClassName: headerIngressClassName })), resources && (_jsxs(ErrorBoundary, { resources: resources, children: [props.children, showFeedbackForm && _jsx(FeedbackContainer, { url: getPath(), pageTitle: title ?? 'Uten tittel', tjenesteNavn: tjenesteNavn })] }))] })] }));\n};\nexport default Master;\n","import { useEffect, useRef } from 'react';\nimport { useLocation } from 'react-router-dom';\nimport { trackPageview } from '@helsenorge/framework-utils/adobe-analytics';\nconst useTrackPageView = (enabled = true) => {\n const location = useLocation();\n const previousPathname = useRef();\n useEffect(() => {\n if (enabled && previousPathname.current !== location.pathname) {\n trackPageview();\n previousPathname.current = location.pathname;\n }\n }, [location, enabled]);\n};\nexport default useTrackPageView;\n","import useTrackPageView from './useTrackPageView';\nconst TrackPageView = (props) => {\n useTrackPageView(props.enabled);\n return null;\n};\nexport default TrackPageView;\n","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { useEffect, useState } from 'react';\nimport getFeatureToggle from '@helsenorge/framework-utils/hn-feature-toggle';\nimport { getVisPersonvelger } from '@helsenorge/framework-utils/hn-user';\nimport { selectCurrentLanguage } from '@helsenorge/framework-utils/language';\nimport { HeaderFooterEvents } from '@helsenorge/framework-utils/web-component/constants';\nimport Master from './master';\nimport withErrorBoundary from '../error-boundary/with-error-boundary';\nimport { Hjelpeskuff } from '../prosesshjelp/index';\nimport { useAppSelector } from '../store/hooks';\nimport TrackPageView from '../track-pageview';\nconst PageRoot = props => {\n const { subtitle, breadcrumbLink, className, redirectTo, hasFullwidth, hasPageHeader, noBreadcrumb, noDriftspanel, noLanguagePicker, showFeedbackForm = false, noHjelpeskuff, pageTitle, pageDescription, mainAriaLabelledby, headerClassName, headerSubtitleClassName, headerTitleClassName, headerIngressClassName, tjenesteNavn, visPersonvelger = getVisPersonvelger() || window.location.pathname.endsWith('/velg-person'), hjelpetekstId, enablePageviewTracking = true, } = props;\n const language = useAppSelector(state => selectCurrentLanguage(state.language));\n const [visPersonvelgerState, setVisPersonvelgerState] = useState(visPersonvelger);\n const handleVisPersonvelgerUpdate = (event) => {\n setVisPersonvelgerState(event.detail.visPersonvelger);\n };\n useEffect(() => {\n window.addEventListener(HeaderFooterEvents.setvispersonvelger, handleVisPersonvelgerUpdate);\n return () => {\n window.removeEventListener(HeaderFooterEvents.setvispersonvelger, handleVisPersonvelgerUpdate);\n };\n }, []);\n return (_jsxs(Master, { title: pageTitle, subtitle: subtitle, description: pageDescription, mainAriaLabelledby: mainAriaLabelledby, className: className, breadcrumbLink: breadcrumbLink, redirectTo: redirectTo, hasFullwidth: hasFullwidth, hasPageHeader: hasPageHeader, noBreadcrumb: noBreadcrumb, noDriftspanel: noDriftspanel, noLanguagePicker: noLanguagePicker, showFeedbackForm: showFeedbackForm && !getFeatureToggle('DisableFeedbackForm'), headerClassName: headerClassName, headerTitleClassName: headerTitleClassName, headerSubtitleClassName: headerSubtitleClassName, headerIngressClassName: headerIngressClassName, visPersonvelger: visPersonvelgerState, tjenesteNavn: tjenesteNavn, hjelpetekstId: hjelpetekstId, showHjelpeskuffInPageHeader: !noHjelpeskuff, children: [_jsx(TrackPageView, { enabled: enablePageviewTracking }), props.children, !noHjelpeskuff && _jsx(Hjelpeskuff, { tjenesteNavn: tjenesteNavn, hjelpetekstId: hjelpetekstId, language: language })] }));\n};\nexport default withErrorBoundary(PageRoot);\n","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport ReactDOM, { render } from 'react-dom';\nimport { error } from './../logger';\nimport { RegisterWebCompSetup } from './helpers';\nexport const isCustomElementRegistered = (name) => {\n return !!window.customElements.get(name);\n};\nexport function registerWebComp(ChildComponent, name, config, templateName) {\n class WebComponent extends HTMLElement {\n constructor() {\n super();\n Object.defineProperty(this, \"mountPoint\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"props\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"observer\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"eventDispatcher\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: (event) => {\n this.dispatchEvent(event);\n }\n });\n // Listen to Events from outside\n Object.defineProperty(this, \"subscribeDispatcher\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: (eventname, callback) => {\n this.addEventListener(eventname, e => {\n return callback(e);\n });\n }\n });\n }\n connectedCallback() {\n this.mountReactComponent();\n this.observer = new MutationObserver(mutations => {\n let shouldRerender = false;\n mutations.forEach(mutation => {\n if (mutation.type === 'attributes' &&\n mutation.attributeName &&\n mutation.oldValue !== mutation.target.getAttribute(mutation.attributeName)) {\n shouldRerender = true;\n }\n });\n if (shouldRerender) {\n this.renderReactComponent();\n }\n });\n this.observer.observe(this, { attributes: true });\n }\n disconnectedCallback() {\n if (this.mountPoint) {\n ReactDOM.unmountComponentAtNode(this.mountPoint);\n }\n this.observer?.disconnect();\n }\n get value() {\n return Array.from(this.attributes).reduce((p, c) => {\n p[c.name] = c.value;\n return p;\n }, {});\n }\n mountReactComponent() {\n this.mountPoint = document.createElement('div');\n if (!templateName) {\n error('Registrering av webcomp feiler: finner ikke template name');\n return;\n }\n // TEMPLATE\n // Her settes id til templatet\n const tmpl = document.getElementById(templateName);\n if (!tmpl) {\n error(`Kunne ikke finne html