From a644fd8eba843d9191a53b1bd2fec6d0fb018900 Mon Sep 17 00:00:00 2001 From: kasperg Date: Tue, 19 Dec 2023 06:41:36 +0000 Subject: [PATCH] deploy: 4a5c09fb7818f4d5f7e332066feacbf6393f74ac --- iframe.html | 2 +- ....c7bbb101.iframe.bundle.js => main.b39c73a3.iframe.bundle.js | 2 +- project.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) rename main.c7bbb101.iframe.bundle.js => main.b39c73a3.iframe.bundle.js (99%) diff --git a/iframe.html b/iframe.html index 3b3ca38f0f..8fb57795fb 100644 --- a/iframe.html +++ b/iframe.html @@ -361,4 +361,4 @@ - window['STORIES'] = [{"titlePrefix":"","directory":"./src","files":"**/*.dev.@(jsx|tsx)","importPathMatcher":"^\\.[\\\\/](?:src(?:\\/(?!\\.)(?:(?:(?!(?:^|\\/)\\.).)*?)\\/|\\/|$)(?!\\.)(?=.)[^/]*?\\.dev\\.(jsx|tsx))$"}]; \ No newline at end of file + window['STORIES'] = [{"titlePrefix":"","directory":"./src","files":"**/*.dev.@(jsx|tsx)","importPathMatcher":"^\\.[\\\\/](?:src(?:\\/(?!\\.)(?:(?:(?!(?:^|\\/)\\.).)*?)\\/|\\/|$)(?!\\.)(?=.)[^/]*?\\.dev\\.(jsx|tsx))$"}]; \ No newline at end of file diff --git a/main.c7bbb101.iframe.bundle.js b/main.b39c73a3.iframe.bundle.js similarity index 99% rename from main.c7bbb101.iframe.bundle.js rename to main.b39c73a3.iframe.bundle.js index 0ad9f2775e..4058a24757 100644 --- a/main.c7bbb101.iframe.bundle.js +++ b/main.b39c73a3.iframe.bundle.js @@ -1 +1 @@ -(globalThis.webpackChunk_danskernesdigitalebibliotek_dpl_react=globalThis.webpackChunk_danskernesdigitalebibliotek_dpl_react||[]).push([[179],{"./.storybook/preview.js-generated-config-entry.js":(__unused_webpack_module,__unused_webpack___webpack_exports__,__webpack_require__)=>{"use strict";var preview_namespaceObject={};__webpack_require__.r(preview_namespaceObject),__webpack_require__.d(preview_namespaceObject,{decorators:()=>decorators});var ClientApi=__webpack_require__("./node_modules/@storybook/client-api/dist/esm/ClientApi.js"),injectStylesIntoStyleTag=__webpack_require__("./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),injectStylesIntoStyleTag_default=__webpack_require__.n(injectStylesIntoStyleTag),styleDomAPI=__webpack_require__("./node_modules/style-loader/dist/runtime/styleDomAPI.js"),styleDomAPI_default=__webpack_require__.n(styleDomAPI),insertBySelector=__webpack_require__("./node_modules/style-loader/dist/runtime/insertBySelector.js"),insertBySelector_default=__webpack_require__.n(insertBySelector),setAttributesWithoutAttributes=__webpack_require__("./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js"),setAttributesWithoutAttributes_default=__webpack_require__.n(setAttributesWithoutAttributes),insertStyleElement=__webpack_require__("./node_modules/style-loader/dist/runtime/insertStyleElement.js"),insertStyleElement_default=__webpack_require__.n(insertStyleElement),styleTagTransform=__webpack_require__("./node_modules/style-loader/dist/runtime/styleTagTransform.js"),styleTagTransform_default=__webpack_require__.n(styleTagTransform),dev_fonts=__webpack_require__("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js!./.storybook/dev-fonts.scss"),options={};options.styleTagTransform=styleTagTransform_default(),options.setAttributes=setAttributesWithoutAttributes_default(),options.insert=insertBySelector_default().bind(null,"head"),options.domAPI=styleDomAPI_default(),options.insertStyleElement=insertStyleElement_default();injectStylesIntoStyleTag_default()(dev_fonts.Z,options);dev_fonts.Z&&dev_fonts.Z.locals&&dev_fonts.Z.locals;var components=__webpack_require__("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js!./src/components/components.scss"),components_options={};components_options.styleTagTransform=styleTagTransform_default(),components_options.setAttributes=setAttributesWithoutAttributes_default(),components_options.insert=insertBySelector_default().bind(null,"head"),components_options.domAPI=styleDomAPI_default(),components_options.insertStyleElement=insertStyleElement_default();injectStylesIntoStyleTag_default()(components.Z,components_options);components.Z&&components.Z.locals&&components.Z.locals;__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/css/base.css");var token=__webpack_require__("./src/core/token.js"),react=__webpack_require__("./node_modules/react/index.js"),react_dom=__webpack_require__("./node_modules/react-dom/index.js"),react_error_boundary_umd=__webpack_require__("./node_modules/react-error-boundary/dist/react-error-boundary.umd.js"),prop_types=__webpack_require__("./node_modules/prop-types/index.js"),prop_types_default=__webpack_require__.n(prop_types),es=__webpack_require__("./node_modules/react-redux/es/index.js"),integration_react=__webpack_require__("./node_modules/redux-persist/es/integration/react.js"),react_query_es=__webpack_require__("./node_modules/react-query/es/index.js"),store=__webpack_require__("./src/core/store.ts"),FetcherHttpError=__webpack_require__("./src/core/fetchers/FetcherHttpError.ts"),FetcherError=__webpack_require__("./src/core/fetchers/FetcherError.ts"),FetcherCriticalHttpError=__webpack_require__("./src/core/fetchers/FetcherCriticalHttpError.ts"),InvalidUrlError=__webpack_require__("./src/core/errors/InvalidUrlError.ts");const queryErrorHandler=error=>!(error instanceof FetcherHttpError.Z||error instanceof FetcherCriticalHttpError.Z||error instanceof FetcherError.Z||error instanceof InvalidUrlError.Z)||error.useErrorBoundary,queryClient=new react_query_es.QueryClient({defaultOptions:{queries:{staleTime:12e4,useErrorBoundary:queryErrorHandler},mutations:{useErrorBoundary:queryErrorHandler}}}),Store=({children})=>react.createElement(es.zt,{store:store.h},react.createElement(react_query_es.QueryClientProvider,{client:queryClient},react.createElement(integration_react.r,{persistor:store.Dj},children)));Store.propTypes={children:prop_types_default().node.isRequired};const components_store=Store;var reach_alert_esm=__webpack_require__("./node_modules/@reach/alert/dist/reach-alert.esm.js"),utils_text=__webpack_require__("./src/core/utils/text.tsx");const ErrorBoundaryAlert=({className,type,variant,resetErrorBoundary})=>{const t=(0,utils_text.X)();return react.createElement(reach_alert_esm.Z,{className:`dpl-alert dpl-alert--${variant} ${className}`,type},react.createElement(react.Fragment,null,t("alertErrorMessageText"),react.createElement("button",{type:"button","aria-label":t("closeErrorWindow"),onClick:resetErrorBoundary},"(",t("alertErrorCloseText"),")")))},error_boundary_alert_ErrorBoundaryAlert=ErrorBoundaryAlert;try{ErrorBoundaryAlert.displayName="ErrorBoundaryAlert",ErrorBoundaryAlert.__docgenInfo={description:"A simple alert that serves as the foundation of all alerts.",displayName:"ErrorBoundaryAlert",props:{className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string | undefined"}},type:{defaultValue:null,description:"",name:"type",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"assertive"'},{value:'"polite"'}]}},variant:{defaultValue:null,description:"",name:"variant",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"info"'},{value:'"success"'},{value:'"warning"'},{value:'"blank"'}]}},resetErrorBoundary:{defaultValue:null,description:"",name:"resetErrorBoundary",required:!0,type:{name:"() => void"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/error-boundary-alert/ErrorBoundaryAlert.tsx#ErrorBoundaryAlert"]={docgenInfo:ErrorBoundaryAlert.__docgenInfo,name:"ErrorBoundaryAlert",path:"src/components/error-boundary-alert/ErrorBoundaryAlert.tsx#ErrorBoundaryAlert"})}catch(__react_docgen_typescript_loader_error){}var modal_slice=__webpack_require__("./src/core/modal.slice.ts");function mount(context){if(!context)return;context.querySelectorAll("[data-dpl-app]").forEach((app=>setTimeout((()=>function mountApp(container){var _container$dataset,_window$dplReact,_window$dplReact$apps;const appName=null==container||null===(_container$dataset=container.dataset)||void 0===_container$dataset?void 0:_container$dataset.dplApp,app=null===(_window$dplReact=window.dplReact)||void 0===_window$dplReact||null===(_window$dplReact$apps=_window$dplReact.apps)||void 0===_window$dplReact$apps?void 0:_window$dplReact$apps[appName];app&&(0,react_dom.render)((0,react.createElement)(components_store,{},(0,react.createElement)((0,react_error_boundary_umd.withErrorBoundary)(app,{FallbackComponent:error_boundary_alert_ErrorBoundaryAlert,onError(error,info){console.error(error,info)}}),{...container.dataset})),container)}(app)),0)))}function unmount(context){if(!context)return;context.querySelectorAll("[data-dpl-app]").forEach((function unMountApp(container){container.innerHTML=""}))}function mount_reset(){return store.Dj.purge()}!function init(){document.addEventListener("keydown",(e=>{"Escape"===e.key&&store.h.dispatch((0,modal_slice.jQ)())}));const initial={apps:{},setToken:token.o4,mount,unmount,reset:mount_reset};window.dplReact={...window.dplReact||{},...initial}}();__webpack_require__("./src/core/user.slice.js");var process=__webpack_require__("./node_modules/process/browser.js");const getSessionStorage=type=>window.sessionStorage.getItem(type),userToken=process.env.STORYBOOK_USER_TOKEN??getSessionStorage(token.b4),libraryToken=process.env.STORYBOOK_LIBRARY_TOKEN??getSessionStorage(token.t8);userToken&&(0,token.o4)(token.b4,userToken),libraryToken&&(0,token.o4)(token.t8,libraryToken),!libraryToken&&userToken&&(0,token.o4)(token.t8,userToken);const App=({story})=>{return react.createElement(components_store,null,(app=story,(0,react_error_boundary_umd.withErrorBoundary)(app,{FallbackComponent:error_boundary_alert_ErrorBoundaryAlert,onError(error,info){console.error(error,info)}})));var app},decorators=[Story=>react.createElement(react.Fragment,null,react.createElement(App,{story:Story}))];function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter((function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable}))),keys.push.apply(keys,symbols)}return keys}function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}Object.keys(preview_namespaceObject).forEach((function(key){var value=preview_namespaceObject[key];switch(key){case"args":return(0,ClientApi.uc)(value);case"argTypes":return(0,ClientApi.v9)(value);case"decorators":return value.forEach((function(decorator){return(0,ClientApi.$9)(decorator,!1)}));case"loaders":return value.forEach((function(loader){return(0,ClientApi.HZ)(loader,!1)}));case"parameters":return(0,ClientApi.h1)(function _objectSpread(target){for(var i=1;i{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{SignIn:()=>SignIn,default:()=>auth_dev});var react=__webpack_require__("./node_modules/react/index.js"),es=__webpack_require__("./node_modules/react-redux/es/index.js"),unfetch_module=__webpack_require__("./node_modules/unfetch/dist/unfetch.module.js"),core_token=__webpack_require__("./src/core/token.js"),user_slice=__webpack_require__("./src/core/user.slice.js");const ORIGIN=window.location.origin,PATHNAME=window.location.pathname.replace("/iframe.html","/"),REDIRECT_URL=`${ORIGIN}${PATHNAME}?path=/story/sb-utilities-adgangsplatformen--sign-in`;const auth=function Auth(){const dispatch=(0,es.I0)(),status=(0,es.v9)((s=>s.user.status)),handleCleanUp=(0,react.useCallback)((()=>{window.sessionStorage.removeItem(core_token.b4),dispatch((0,user_slice.ig)())}),[dispatch]);return react.useEffect((()=>{const code=new URLSearchParams(window.location.search).get("code");code&&(0,unfetch_module.Z)("https://login.bib.dk/oauth/token",{method:"POST",headers:{},body:new URLSearchParams({grant_type:"authorization_code",code,client_id:"",client_secret:"secret",redirect_uri:REDIRECT_URL})}).then((res=>res.json())).then((res=>{if(null==res||!res.access_token)throw res;window.sessionStorage.setItem(core_token.b4,res.access_token),(0,core_token.o4)(core_token.b4,res.access_token),(0,core_token.o4)(core_token.t8,res.access_token),dispatch((0,user_slice.Ot)())})).catch((err=>{console.error(err),handleCleanUp()}))}),[dispatch,handleCleanUp]),react.createElement("div",{style:{width:"300px"}},react.createElement("h2",null,"Adgangsplatformen"),react.createElement("h5",null,"Status:","authenticated"===status?react.createElement("span",{style:{color:"green"}}," Signed in"):react.createElement("span",{style:{color:"red"}}," Signed out")),react.createElement("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gridColumnGap:10}},react.createElement("button",{type:"button",onClick:()=>{window.parent.location.href=`https://login.bib.dk/oauth/authorize?response_type=code&client_id=&redirect_uri=${REDIRECT_URL}`},style:{width:"100%"}},"Sign in"),react.createElement("button",{type:"button",onClick:()=>{handleCleanUp();const token=(0,core_token.LP)(core_token.b4);window.parent.location.href=`https://login.bib.dk/logout/?access_token=${token}`},style:{width:"100%"}},"Sign out")))},auth_dev={title:"SB Utilities / Adgangsplatformen"},SignIn=(args=>react.createElement(auth,args)).bind({})},"./src/apps/adgangsplatformen/library-token.dev.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{LibraryTokenApp:()=>LibraryTokenApp,default:()=>library_token_dev});var react=__webpack_require__("./node_modules/react/index.js"),es=__webpack_require__("./node_modules/react-query/es/index.js"),token=__webpack_require__("./src/core/token.js");const library_token=()=>{const[inputValue,setInputValue]=(0,react.useState)(""),[shouldShowSuccessMessage,setShowSuccessMessage]=(0,react.useState)(!1),queryClient=(0,es.useQueryClient)(),setInputValueHandler=(0,react.useCallback)((event=>{const{target:{value:token}}=event;setInputValue(token)}),[setInputValue]),setLibraryTokenHandler=(0,react.useCallback)((()=>{window.sessionStorage.setItem(token.t8,inputValue),(0,token.o4)(token.t8,inputValue),setShowSuccessMessage(!0),queryClient.clear()}),[queryClient,inputValue]);return react.createElement("div",{className:"p-8"},react.createElement("p",null,"Insert Library token:"),react.createElement("input",{className:"mt-8 mr-8",value:inputValue,onChange:setInputValueHandler,size:41}),react.createElement("button",{type:"submit",onClick:setLibraryTokenHandler},"Save"),react.createElement("p",{className:"text-small-caption mt-8"},"In order to test apps for anonymous users,",react.createElement("br",null),"you can insert a library token in this field."),shouldShowSuccessMessage&&react.createElement("p",{className:"text-small-caption mt-8"},"The token was saved"))};try{librarytoken.displayName="librarytoken",librarytoken.__docgenInfo={description:"This component is only to be used in Storybook context.\nLike the auth component it offers a way to set the needed context\nin order for the apps to be able to operate properly.\n\nThis component offers a way to set the current library token.",displayName:"librarytoken",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/adgangsplatformen/library-token.tsx#librarytoken"]={docgenInfo:librarytoken.__docgenInfo,name:"librarytoken",path:"src/apps/adgangsplatformen/library-token.tsx#librarytoken"})}catch(__react_docgen_typescript_loader_error){}const library_token_dev={title:"SB Utilities / Set Library Token",component:library_token},LibraryTokenApp=()=>react.createElement(library_token,null)},"./src/apps/adgangsplatformen/user-token.dev.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{UserTokenApp:()=>UserTokenApp,default:()=>user_token_dev});var react=__webpack_require__("./node_modules/react/index.js"),es=__webpack_require__("./node_modules/react-query/es/index.js"),token=__webpack_require__("./src/core/token.js");const user_token=()=>{const[inputValue,setInputValue]=(0,react.useState)(""),[shouldShowSuccessMessage,setShowSuccessMessage]=(0,react.useState)(!1),queryClient=(0,es.useQueryClient)(),setInputValueHandler=(0,react.useCallback)((event=>{const{target:{value:token}}=event;setInputValue(token)}),[setInputValue]),setUserTokenHandler=(0,react.useCallback)((()=>{window.sessionStorage.setItem(token.b4,inputValue),(0,token.o4)(token.b4,inputValue),setShowSuccessMessage(!0),queryClient.clear()}),[queryClient,inputValue]);return react.createElement("div",{className:"p-8"},react.createElement("p",null,"Insert User token:"),react.createElement("input",{className:"mt-8 mr-8",value:inputValue,onChange:setInputValueHandler,size:41}),react.createElement("button",{type:"submit",onClick:setUserTokenHandler},"Save"),react.createElement("p",{className:"text-small-caption mt-8"},"In order to test apps for logged in users,",react.createElement("br",null),"you can insert a user token in this field."),shouldShowSuccessMessage&&react.createElement("p",{className:"text-small-caption mt-8"},"The token was saved"))};try{usertoken.displayName="usertoken",usertoken.__docgenInfo={description:"This component is only to be used in Storybook context.\nLike the auth component it offers a way to set the needed context\nin order for the apps to be able to operate properly.\n\nThis component offers a way to set the current user token.",displayName:"usertoken",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/adgangsplatformen/user-token.tsx#usertoken"]={docgenInfo:usertoken.__docgenInfo,name:"usertoken",path:"src/apps/adgangsplatformen/user-token.tsx#usertoken"})}catch(__react_docgen_typescript_loader_error){}const user_token_dev={title:"SB Utilities / Set User Token",component:user_token},UserTokenApp=()=>react.createElement(user_token,null)},"./src/apps/advanced-search/AdvancedSearch.dev.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{AdvancedSearch:()=>AdvancedSearch_dev_AdvancedSearch,default:()=>AdvancedSearch_dev});var react=__webpack_require__("./node_modules/react/index.js"),serviceUrlArgs=__webpack_require__("./src/core/storybook/serviceUrlArgs.ts"),guarded_app=__webpack_require__("./src/components/guarded-app.tsx"),config=__webpack_require__("./src/core/utils/config.tsx"),general=__webpack_require__("./src/core/utils/helpers/general.ts"),utils_text=__webpack_require__("./src/core/utils/text.tsx"),url=__webpack_require__("./src/core/utils/url.tsx"),useEffectOnce=__webpack_require__("./node_modules/react-use/esm/useEffectOnce.js"),ExpandMore=(__webpack_require__("./node_modules/core-js/modules/esnext.string.at.js"),__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/ExpandMore.svg")),ExpandMore_default=__webpack_require__.n(ExpandMore),MinusButton=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/MinusButton.svg"),MinusButton_default=__webpack_require__.n(MinusButton),PlusButton=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/PlusButton.svg"),PlusButton_default=__webpack_require__.n(PlusButton),clsx=__webpack_require__("./node_modules/clsx/dist/clsx.mjs");const advancedSearchIndexes=["all","creator","subject","genre","language","date","mainCreator","mainTitle","source","dateFirstEdition","decimaldk5","type","audience","publisher","identifier","acSource"],advancedSearchIndexTranslations={all:"advancedSearchAllIndexesText",creator:"advancedSearchCreatorText",subject:"advancedSearchSubjectText",genre:"advancedSearchGenreText",language:"advancedSearchLanguageText",date:"advancedSearchDateText",mainCreator:"advancedSearchMainCreatorText",mainTitle:"advancedSearchMainTitleText",source:"advancedSearchSourceText",dateFirstEdition:"advancedSearchDateFirstEditionText",decimaldk5:"advancedSearchDecimalDk5Text",type:"advancedSearchTypeText",audience:"advancedSearchAudienceText",publisher:"advancedSearchPublisherText",identifier:"advancedSearchIdentifierText",acSource:"advancedSearchAcSourceText"},advancedSearchClauses=[{value:"AND",translation:"clauseAndText"},{value:"OR",translation:"clauseOrText"},{value:"NOT",translation:"clauseNotText"}],initialAdvancedSearchQuery={rows:[{term:"",searchIndex:"all",clause:advancedSearchClauses[0],id:0},{term:"",searchIndex:"all",clause:advancedSearchClauses[0],id:1}],filters:{materialTypes:[{item:"All",value:"all"}],fiction:[{item:"All",value:"all"}],accessibility:[{item:"All",value:"all"}]}},advancedSearchMaterialTypes=[{item:"advancedSearchFilterBookText",value:"bøger"},{item:"advancedSearchFilterEbookText",value:"e-bøger"},{item:"advancedSearchFilterAudioBookText",value:"lydbøger"},{item:"advancedSearchFilterArticleText",value:"artikler"},{item:"advancedSearchFilterMovieText",value:"film"},{item:"advancedSearchFilterMusicText",value:"musik"}],advancedSearchAccessibility=[{item:"advancedSearchFilterPhysicalText",value:"fysisk"},{item:"advancedSearchFilterOnlineText",value:"online"}],advancedSearchFiction=[{item:"advancedSearchFilterFictionText",value:"fiction"},{item:"advancedSearchFilterNonFictionText",value:"nonfiction"}],advancedSearchFilters={materialTypes:"generalmaterialtype",fiction:"fictionnonfiction",accessibility:"accesstype"},AdvancedSearchRow=({dataCy="advanced-search-row",data,rowIndex,setSearchObject})=>{const t=(0,utils_text.X)(),updateRowData=(rowAspect,update,updateData)=>{const newData={...data};newData.rows[rowIndex][rowAspect]=update,updateData(newData)};return react.createElement(react.Fragment,null,rowIndex>0&&react.createElement("div",{className:"advanced-search__clauses","data-cy":"clauses"},advancedSearchClauses.map((clause=>{return react.createElement("button",{key:`${rowIndex}-${clause.value}`,"data-cy":`clause-${clause.value}`,type:"button",className:(clickedClause=clause.value,currentClause=data.rows[rowIndex].clause.value,(0,clsx.Z)("advanced-search__clause focus-styling cursor-pointer capitalize-all",{"advanced-search__clause--grey":currentClause!==clickedClause})),onClick:()=>{updateRowData("clause",clause,setSearchObject)}},t(clause.translation));var clickedClause,currentClause}))),react.createElement("div",{className:"input-with-dropdown","data-cy":dataCy},react.createElement("input",{className:"input-with-dropdown__input focus-styling__input capitalize-first",type:"text",placeholder:t("advancedSearchInputPlaceholderText"),value:data.rows[rowIndex].term,onChange:e=>{updateRowData("term",e.target.value,setSearchObject)}}),react.createElement("div",{className:"dropdown dropdown--grey-borders input-with-dropdown__dropdown"},react.createElement("select",{className:"dropdown__select dropdown__select--inline focus-styling","aria-label":"input field dropdown",value:data.rows[rowIndex].searchIndex,onChange:e=>{updateRowData("searchIndex",e.target.value,setSearchObject)}},advancedSearchIndexes.map((index=>react.createElement("option",{key:index,className:"dropdown__option",value:index},t(advancedSearchIndexTranslations[index]))))),react.createElement("div",{className:"dropdown__arrows dropdown__arrows--inline"},react.createElement("img",{className:"dropdown__arrow",src:ExpandMore_default(),alt:""}))),data.rows.length>1&&react.createElement("button",{type:"button",onClick:()=>{((index,updateData)=>{const newData={...data};newData.rows.splice(index,1),updateData(newData)})(rowIndex,setSearchObject)}},react.createElement("img",{className:"input-with-dropdown__icon",src:MinusButton_default(),alt:""}))),rowIndex===data.rows.length-1&&react.createElement("button",{type:"button",className:"advanced-search__clauses cursor-pointer",onClick:()=>{(updateData=>{const newData={...data};newData.rows.push(structuredClone(initialAdvancedSearchQuery.rows.at(0))),newData.rows[newData.rows.length-1].id=newData.rows[newData.rows.length-2].id+1,updateData(newData)})(setSearchObject)},"data-cy":"advanced-search-add-row"},react.createElement("img",{className:"mr-8",src:PlusButton_default(),alt:""}),t("advancedSearchAddRowText")))},advanced_search_AdvancedSearchRow=AdvancedSearchRow;try{AdvancedSearchRow.displayName="AdvancedSearchRow",AdvancedSearchRow.__docgenInfo={description:"",displayName:"AdvancedSearchRow",props:{data:{defaultValue:null,description:"",name:"data",required:!0,type:{name:"AdvancedSearchQuery"}},dataCy:{defaultValue:{value:"advanced-search-row"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}},rowIndex:{defaultValue:null,description:"",name:"rowIndex",required:!0,type:{name:"number"}},setSearchObject:{defaultValue:null,description:"",name:"setSearchObject",required:!0,type:{name:"(searchObject: AdvancedSearchQuery) => void"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/advanced-search/AdvancedSearchRow.tsx#AdvancedSearchRow"]={docgenInfo:AdvancedSearchRow.__docgenInfo,name:"AdvancedSearchRow",path:"src/apps/advanced-search/AdvancedSearchRow.tsx#AdvancedSearchRow"})}catch(__react_docgen_typescript_loader_error){}var useCopyToClipboard=__webpack_require__("./node_modules/react-use/esm/useCopyToClipboard.js"),Check=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/Check.svg"),Check_default=__webpack_require__.n(Check);const PreviewSection=({dataCy="preview-section",translatedCql,reset,isMobile,setIsFormMode})=>{const t=(0,utils_text.X)(),[,copy]=(0,useCopyToClipboard.Z)(),[copiedToClipboard,setCopiedToClipboard]=(0,react.useState)(!1);return(0,react.useEffect)((()=>(copiedToClipboard&&setTimeout((()=>{setCopiedToClipboard(!1)}),2e3),()=>{})),[copiedToClipboard]),react.createElement("div",{"data-cy":dataCy,className:(0,clsx.Z)("pagefold-parent--large input-and-preview__preview",{"input-and-preview__preview--mobile":isMobile})},react.createElement("div",{className:"pagefold-triangle--large pagefold-inherit-parent"}),react.createElement("h3",{className:"text-body-medium-medium mb-24 capitalize-first"},t("advancedSearchPreviewHeadlineText")),react.createElement("p",{"data-cy":`${dataCy}-preview`,className:"text-body-medium-regular mb-32"},translatedCql||t("advancedSearchPreviewEmptyText")),react.createElement("section",null,react.createElement("button",{type:"button",className:"link-tag mr-16 cursor-pointer capitalize-first",onClick:()=>reset(),"data-cy":"advanced-search-reset"},t("advancedSearchResetText")),translatedCql&&react.createElement("button",{type:"button",className:(0,clsx.Z)("link-tag mr-16 capitalize-first",{"cursor-pointer":!copiedToClipboard}),onClick:()=>{copy(translatedCql),setCopiedToClipboard(!0)},onKeyUp:e=>{"Enter"===e.key&&(copy(translatedCql),setCopiedToClipboard(!0))}},copiedToClipboard&&react.createElement(react.Fragment,null,t("copiedToClipboardText"),react.createElement("img",{className:"inline-icon",src:Check_default(),alt:""})),!copiedToClipboard&&t("advancedSearchCopyStringText")),react.createElement("button",{type:"button",className:"link-tag link-tag cursor-pointer capitalize-first",onClick:()=>setIsFormMode(!1),onKeyUp:e=>"Enter"===e.key??setIsFormMode(!1),"data-cy":"advanced-search-edit-cql"},t("advancedSearchEditCqlText"))))},advanced_search_PreviewSection=PreviewSection;try{PreviewSection.displayName="PreviewSection",PreviewSection.__docgenInfo={description:"",displayName:"PreviewSection",props:{dataCy:{defaultValue:{value:"preview-section"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}},translatedCql:{defaultValue:null,description:"",name:"translatedCql",required:!0,type:{name:"string"}},reset:{defaultValue:null,description:"",name:"reset",required:!0,type:{name:"() => void"}},isMobile:{defaultValue:null,description:"",name:"isMobile",required:!1,type:{name:"boolean | undefined"}},setIsFormMode:{defaultValue:null,description:"",name:"setIsFormMode",required:!0,type:{name:"(newState: boolean) => void"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/advanced-search/PreviewSection.tsx#PreviewSection"]={docgenInfo:PreviewSection.__docgenInfo,name:"PreviewSection",path:"src/apps/advanced-search/PreviewSection.tsx#PreviewSection"})}catch(__react_docgen_typescript_loader_error){}var Multiselect=__webpack_require__("./src/components/multiselect/Multiselect.tsx");const CqlSearchHeader=({dataCy="cql-search-header",initialCql,setCql})=>{const t=(0,utils_text.X)();return(0,react.useEffect)((()=>{""!==initialCql.trim()&&setCql(initialCql)}),[initialCql,setCql]),react.createElement(react.Fragment,null,react.createElement("h1",{className:"text-header-h2 advanced-search__title capitalize-first","data-cy":dataCy},t("cqlSearchTitleText")),react.createElement("textarea",{className:"advanced-search__cql-input focus-styling__input",cols:100,rows:5,placeholder:"e.g. title=snemand*","data-cy":`${dataCy}-input`,onChange:e=>setCql(e.target.value),defaultValue:initialCql}))},advanced_search_CqlSearchHeader=CqlSearchHeader;try{CqlSearchHeader.displayName="CqlSearchHeader",CqlSearchHeader.__docgenInfo={description:"",displayName:"CqlSearchHeader",props:{dataCy:{defaultValue:{value:"cql-search-header"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}},initialCql:{defaultValue:null,description:"",name:"initialCql",required:!0,type:{name:"string"}},setCql:{defaultValue:null,description:"",name:"setCql",required:!0,type:{name:"(newState: string) => void"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/advanced-search/CqlSearchHeader.tsx#CqlSearchHeader"]={docgenInfo:CqlSearchHeader.__docgenInfo,name:"CqlSearchHeader",path:"src/apps/advanced-search/CqlSearchHeader.tsx#CqlSearchHeader"})}catch(__react_docgen_typescript_loader_error){}const translateFiltersToCql=filtersToTranslate=>Object.keys(filtersToTranslate).map((key=>filtersToTranslate[key])).reduce(((acc,curr,index)=>{return acc+(filterToTranslate=curr,cqlKey=Object.keys(filtersToTranslate)[index],filterToTranslate.reduce(((acc,curr)=>{let filterTranslation="";const relation=""===acc.trim()?" AND":" OR";return"all"===curr.value?`${acc}`:(filterTranslation=filterTranslation.concat(relation,` ${advancedSearchFilters[cqlKey]}=`,`'${curr.value}'`),acc+filterTranslation)}),""));var filterToTranslate,cqlKey}),""),translateSearchObjectToCql=searchObject=>searchObject.rows.reduce(((acc,curr)=>{let rowTranslation="";return""!==acc&&""!==curr.term.trim()&&(rowTranslation=rowTranslation.concat(" ",curr.clause.value)),"all"!==curr.searchIndex&&""!==curr.term.trim()&&(rowTranslation=rowTranslation.concat(" ",curr.searchIndex,"=")),""!==curr.term&&(rowTranslation=rowTranslation.concat((currentText=>{let space="";switch(currentText.trim()){case"":space="";break;default:if(currentText.trim().endsWith("=")){space="";break}space=" "}return space})(acc),"'",curr.term,"'")),acc+rowTranslation}),"")+translateFiltersToCql(searchObject.filters);try{translateSearchObjectToCql.displayName="translateSearchObjectToCql",translateSearchObjectToCql.__docgenInfo={description:"",displayName:"translateSearchObjectToCql",props:{rows:{defaultValue:null,description:"",name:"rows",required:!0,type:{name:"AdvancedSearchRowData[]"}},filters:{defaultValue:null,description:"",name:"filters",required:!0,type:{name:"AdvancedSearchFilterData"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/advanced-search/helpers.tsx#translateSearchObjectToCql"]={docgenInfo:translateSearchObjectToCql.__docgenInfo,name:"translateSearchObjectToCql",path:"src/apps/advanced-search/helpers.tsx#translateSearchObjectToCql"})}catch(__react_docgen_typescript_loader_error){}var Button=__webpack_require__("./src/components/Buttons/Button.tsx");const AdvancedSearchHeader=({dataCy="advanced-search-header",searchQuery,setSearchQuery,searchObject,setSearchObject})=>{const t=(0,utils_text.X)(),[isFormMode,setIsFormMode]=(0,react.useState)(!0),[internalSearchObject,setInternalSearchObject]=(0,react.useState)(searchObject||structuredClone(initialAdvancedSearchQuery)),[previewCql,setPreviewCql]=(0,react.useState)(searchQuery||""),[rawCql,setRawCql]=(0,react.useState)("");(0,react.useEffect)((()=>{null!==searchObject&&setInternalSearchObject(searchObject)}),[searchObject]),(0,react.useEffect)((()=>{const cql=translateSearchObjectToCql(internalSearchObject);setPreviewCql(cql)}),[internalSearchObject]);const updateFiltersData=filtersUpdate=>{if(null==internalSearchObject||!internalSearchObject.filters[filtersUpdate.key].length)return;const newSearchObject={...internalSearchObject};newSearchObject.filters={...newSearchObject.filters,[filtersUpdate.key]:filtersUpdate.value},setInternalSearchObject(newSearchObject)},reset=()=>{setSearchObject(structuredClone(initialAdvancedSearchQuery))},scrollToResults=()=>{const element=document.getElementById("advanced-search-result");element&&element.scrollIntoView({behavior:"smooth"})},[isSearchButtonDisabled,setIsSearchButtonDisabled]=(0,react.useState)(!0),translatedCql=previewCql||searchQuery||"";return(0,react.useEffect)((()=>{searchQuery&&!searchObject&&setIsFormMode(!1)}),[searchObject,searchQuery]),(0,react.useEffect)((()=>{var object,cql;setIsSearchButtonDisabled((object=internalSearchObject,cql=rawCql,!0===isFormMode?!(object&&object.rows.find((row=>""!==row.term))):""===cql.trim()))}),[internalSearchObject,rawCql,isFormMode]),react.createElement(react.Fragment,null,isFormMode&&react.createElement(react.Fragment,null,react.createElement("h1",{className:"text-header-h2 advanced-search__title capitalize-first"},t("advancedSearchTitleText")),react.createElement("div",{className:"input-and-preview"},react.createElement("div",{className:"input-and-preview__input"},internalSearchObject.rows.map(((row,index)=>react.createElement(advanced_search_AdvancedSearchRow,{key:row.id,data:internalSearchObject,rowIndex:index,setSearchObject:setInternalSearchObject,dataCy:`${dataCy}-row`})))),react.createElement(advanced_search_PreviewSection,{translatedCql,reset,setIsFormMode})),react.createElement("section",{className:"advanced-search__filters"},react.createElement("div",{className:"advanced-search__filter"},react.createElement(Multiselect.Z,{caption:t("advancedSearchFilterMaterialTypeText"),options:advancedSearchMaterialTypes,defaultValue:internalSearchObject.filters.materialTypes,updateExternalState:{key:"materialTypes",externalUpdateFunction:updateFiltersData},dataCy:"advanced-search-material-types"})),react.createElement("div",{className:"advanced-search__filter"},react.createElement(Multiselect.Z,{caption:t("advancedSearchFilterLiteratureFormText"),options:advancedSearchFiction,defaultValue:internalSearchObject.filters.fiction,updateExternalState:{key:"fiction",externalUpdateFunction:updateFiltersData},dataCy:"advanced-search-fiction"})),react.createElement("div",{className:"advanced-search__filter"},react.createElement(Multiselect.Z,{caption:t("advancedSearchFilterAccessText"),options:advancedSearchAccessibility,defaultValue:internalSearchObject.filters.accessibility,updateExternalState:{key:"accessibility",externalUpdateFunction:updateFiltersData},dataCy:"advanced-search-accessibility"}))),react.createElement(advanced_search_PreviewSection,{translatedCql,reset,isMobile:!0,setIsFormMode})),!isFormMode&&react.createElement(advanced_search_CqlSearchHeader,{initialCql:translatedCql,setCql:setRawCql}),react.createElement("section",{className:"advanced-search__footer"},!isFormMode&&react.createElement("button",{type:"button",className:"link-tag advanced-search__back-button cursor-pointer",onClick:()=>setIsFormMode(!0),onKeyUp:e=>"Enter"===e.key??setIsFormMode(!1)},t("toAdvancedSearchButtonText")),react.createElement(Button.z,{dataCy:"search-button",buttonType:"none",disabled:isSearchButtonDisabled,size:"xlarge",variant:"filled",classNames:"advanced-search__search-button",collapsible:!0,label:t("advancedSearchSearchButtonText"),onClick:()=>{if(""!==rawCql.trim()&&!isFormMode)return setSearchQuery(rawCql),void setTimeout((()=>{scrollToResults()}),500);setSearchObject(internalSearchObject),setTimeout((()=>{scrollToResults()}),500)}})))},advanced_search_AdvancedSearchHeader=AdvancedSearchHeader;try{AdvancedSearchHeader.displayName="AdvancedSearchHeader",AdvancedSearchHeader.__docgenInfo={description:"",displayName:"AdvancedSearchHeader",props:{dataCy:{defaultValue:{value:"advanced-search-header"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}},searchQuery:{defaultValue:null,description:"",name:"searchQuery",required:!0,type:{name:"string | null"}},setSearchQuery:{defaultValue:null,description:"",name:"setSearchQuery",required:!0,type:{name:"(searchQuery: string | null) => void"}},searchObject:{defaultValue:null,description:"",name:"searchObject",required:!0,type:{name:"AdvancedSearchQuery | null"}},setSearchObject:{defaultValue:null,description:"",name:"setSearchObject",required:!0,type:{name:"(searchObject: AdvancedSearchQuery | null) => void"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/advanced-search/AdvancedSearchHeader.tsx#AdvancedSearchHeader"]={docgenInfo:AdvancedSearchHeader.__docgenInfo,name:"AdvancedSearchHeader",path:"src/apps/advanced-search/AdvancedSearchHeader.tsx#AdvancedSearchHeader"})}catch(__react_docgen_typescript_loader_error){}var branches=__webpack_require__("./src/core/utils/branches.tsx"),graphql=__webpack_require__("./src/core/dbc-gateway/generated/graphql.tsx"),use_pager=__webpack_require__("./src/components/result-pager/use-pager.tsx"),SearchResultList=__webpack_require__("./src/components/card-item-list/SearchResultList.tsx"),search_result_zero_hits=__webpack_require__("./src/apps/search-result/search-result-zero-hits.tsx"),helpers_url=__webpack_require__("./src/core/utils/helpers/url.ts");const advanced_search_AdvancedSearchResults=({q,pageSize,showContentOnly})=>{const t=(0,utils_text.X)(),[copiedLinkToSearch,setCopiedLinkToSearch]=(0,react.useState)(!1),cleanBranches=(0,branches.ZP)(),[resultItems,setResultItems]=(0,react.useState)([]),[hitcount,setHitCount]=(0,react.useState)(0),{PagerComponent,page}=(0,use_pager.Z)({hitcount,pageSize}),[cql,setCql]=(0,react.useState)(q),[,copy]=(0,useCopyToClipboard.Z)();(0,react.useEffect)((()=>{setCql(q)}),[q]),(0,react.useEffect)((()=>{const searchParams=new URLSearchParams(window.location.search);searchParams.get("q")&&setCql((prev=>searchParams.get("q")||prev))}),[]),(0,react.useEffect)((()=>{setResultItems([])}),[q,pageSize]);const{data,isLoading}=(0,graphql.KZ)({cql,offset:page*pageSize,limit:pageSize,filters:{branchId:cleanBranches}});(0,react.useEffect)((()=>{if(!data)return;const{complexSearch:{works:resultWorks,hitcount:resultCount}}=data;setHitCount(resultCount),setResultItems(page>0?prev=>[...prev,...resultWorks]:resultWorks)}),[data,page]);const shouldShowSearchResults=isLoading||!isLoading&&hitcount>0,shouldShowResultHeadline=hitcount&&!isLoading;return(0,react.useEffect)((()=>{copiedLinkToSearch&&setTimeout((()=>{setCopiedLinkToSearch(!1)}),2e3)}),[copiedLinkToSearch]),react.createElement(react.Fragment,null,!showContentOnly&&react.createElement("div",{className:"advanced-search__divider"}),react.createElement("h2",{className:"text-header-h2 advanced-search__title capitalize-first",id:"advanced-search-result"},isLoading&&t("loadingResultsText"),shouldShowResultHeadline&&t("showingMaterialsText",{placeholders:{"@hitcount":hitcount}})),!showContentOnly&&react.createElement("button",{type:"button",className:(0,clsx.Z)("link-tag mb-16 capitalize-first",{"cursor-pointer":!copiedLinkToSearch}),onClick:()=>{copy((0,helpers_url.uW)({linked:"true"}).href),setCopiedLinkToSearch(!0)}},!copiedLinkToSearch&&t("advancedSearchLinkToThisSearchText"),copiedLinkToSearch&&react.createElement(react.Fragment,null,t("copiedLinkToThisSearchText"),react.createElement("img",{className:"inline-icon",src:Check_default(),alt:""})," ")),shouldShowSearchResults&&react.createElement(react.Fragment,null,react.createElement(SearchResultList.Z,{resultItems,page,pageSize}),react.createElement(PagerComponent,{isLoading})),!isLoading&&0===hitcount&&react.createElement(search_result_zero_hits.Z,null))};try{AdvancedSearchResults.displayName="AdvancedSearchResults",AdvancedSearchResults.__docgenInfo={description:"",displayName:"AdvancedSearchResults",props:{q:{defaultValue:null,description:"",name:"q",required:!0,type:{name:"string"}},pageSize:{defaultValue:null,description:"",name:"pageSize",required:!0,type:{name:"number"}},showContentOnly:{defaultValue:null,description:"",name:"showContentOnly",required:!0,type:{name:"boolean"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/advanced-search/AdvancedSearchResults.tsx#AdvancedSearchResults"]={docgenInfo:AdvancedSearchResults.__docgenInfo,name:"AdvancedSearchResults",path:"src/apps/advanced-search/AdvancedSearchResults.tsx#AdvancedSearchResults"})}catch(__react_docgen_typescript_loader_error){}const AdvancedSearch=({pageSize})=>{const[searchQuery,setSearchQuery]=(0,react.useState)(null),[searchObject,setSearchObject]=(0,react.useState)(null),[showResultOnly,setShowResultOnly]=(0,react.useState)(!1),[executedQuery,setExecutedQuery]=(0,react.useState)(null);return(0,useEffectOnce.Z)((()=>{const advancedSearchQuery=(0,helpers_url.wo)("advancedSearchQuery");if(advancedSearchQuery){const queryObject=JSON.parse(advancedSearchQuery);setSearchObject(queryObject)}const advancedSearchCql=(0,helpers_url.wo)("advancedSearchCql");advancedSearchCql&&setSearchQuery(advancedSearchCql),"true"===(0,helpers_url.wo)("linked")&&setShowResultOnly(!0)})),(0,react.useEffect)((()=>{if(!searchObject)return;const cql=translateSearchObjectToCql(searchObject);""!==cql.trim()&&((0,helpers_url.ul)({advancedSearchQuery:JSON.stringify(searchObject)}),(0,helpers_url.oC)("advancedSearchCql"),setExecutedQuery(cql))}),[searchObject]),(0,react.useEffect)((()=>{searchQuery&&((0,helpers_url.ul)({advancedSearchCql:searchQuery}),(0,helpers_url.oC)("advancedSearchQuery"),setExecutedQuery(searchQuery))}),[searchQuery]),react.createElement("div",{className:"advanced-search"},!showResultOnly&&react.createElement(advanced_search_AdvancedSearchHeader,{searchObject,setSearchObject,searchQuery,setSearchQuery}),executedQuery&&react.createElement(advanced_search_AdvancedSearchResults,{q:executedQuery,pageSize,showContentOnly:showResultOnly}))},advanced_search_AdvancedSearch=AdvancedSearch;try{AdvancedSearch.displayName="AdvancedSearch",AdvancedSearch.__docgenInfo={description:"",displayName:"AdvancedSearch",props:{pageSize:{defaultValue:null,description:"",name:"pageSize",required:!0,type:{name:"number"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/advanced-search/AdvancedSearch.tsx#AdvancedSearch"]={docgenInfo:AdvancedSearch.__docgenInfo,name:"AdvancedSearch",path:"src/apps/advanced-search/AdvancedSearch.tsx#AdvancedSearch"})}catch(__react_docgen_typescript_loader_error){}const AdvancedSearch_entry=(0,config.Rh)((0,url.XL)((0,utils_text.z)((({pageSizeDesktop,pageSizeMobile})=>{const pageSize=(0,general.Rh)({desktop:pageSizeDesktop,mobile:pageSizeMobile});return react.createElement("div",null,react.createElement(guarded_app.Z,{app:"advanced-search"},react.createElement(advanced_search_AdvancedSearch,{pageSize})))}))));try{AdvancedSearchentry.displayName="AdvancedSearchentry",AdvancedSearchentry.__docgenInfo={description:"",displayName:"AdvancedSearchentry",props:{pageSizeDesktop:{defaultValue:null,description:"",name:"pageSizeDesktop",required:!1,type:{name:"number | undefined"}},pageSizeMobile:{defaultValue:null,description:"",name:"pageSizeMobile",required:!1,type:{name:"number | undefined"}},materialUrl:{defaultValue:null,description:"",name:"materialUrl",required:!0,type:{name:"string"}},searchUrl:{defaultValue:null,description:"",name:"searchUrl",required:!0,type:{name:"string"}},advancedSearchUrl:{defaultValue:null,description:"",name:"advancedSearchUrl",required:!0,type:{name:"string"}},fbsBaseUrl:{defaultValue:null,description:"",name:"fbsBaseUrl",required:!0,type:{name:"string"}},loanListEreolenUrl:{defaultValue:null,description:"",name:"loanListEreolenUrl",required:!0,type:{name:"string"}},feesPageUrl:{defaultValue:null,description:"",name:"feesPageUrl",required:!0,type:{name:"string"}},publizonBaseUrl:{defaultValue:null,description:"",name:"publizonBaseUrl",required:!0,type:{name:"string"}},dplCmsBaseUrl:{defaultValue:null,description:"",name:"dplCmsBaseUrl",required:!0,type:{name:"string"}},coverBaseUrl:{defaultValue:null,description:"",name:"coverBaseUrl",required:!0,type:{name:"string"}},materialBaseUrl:{defaultValue:null,description:"",name:"materialBaseUrl",required:!0,type:{name:"string"}},fbiBaseUrl:{defaultValue:null,description:"",name:"fbiBaseUrl",required:!0,type:{name:"string"}},authUrl:{defaultValue:null,description:"",name:"authUrl",required:!0,type:{name:"string"}},ereolenHomepageUrl:{defaultValue:null,description:"",name:"ereolenHomepageUrl",required:!0,type:{name:"string"}},blacklistedAvailabilityBranchesConfig:{defaultValue:null,description:"",name:"blacklistedAvailabilityBranchesConfig",required:!0,type:{name:"string"}},blacklistedPickupBranchesConfig:{defaultValue:null,description:"",name:"blacklistedPickupBranchesConfig",required:!1,type:{name:"string | undefined"}},blacklistedSearchBranchesConfig:{defaultValue:null,description:"",name:"blacklistedSearchBranchesConfig",required:!1,type:{name:"string | undefined"}},branchesConfig:{defaultValue:null,description:"",name:"branchesConfig",required:!0,type:{name:"string"}},addToFavoritesAriaLabelText:{defaultValue:null,description:"",name:"addToFavoritesAriaLabelText",required:!0,type:{name:"string"}},alertErrorCloseText:{defaultValue:null,description:"",name:"alertErrorCloseText",required:!0,type:{name:"string"}},alertErrorMessageText:{defaultValue:null,description:"",name:"alertErrorMessageText",required:!0,type:{name:"string"}},byAuthorText:{defaultValue:null,description:"",name:"byAuthorText",required:!0,type:{name:"string"}},etAlText:{defaultValue:null,description:"",name:"etAlText",required:!0,type:{name:"string"}},inSeriesText:{defaultValue:null,description:"",name:"inSeriesText",required:!0,type:{name:"string"}},loadingText:{defaultValue:null,description:"",name:"loadingText",required:!0,type:{name:"string"}},numberDescriptionText:{defaultValue:null,description:"",name:"numberDescriptionText",required:!0,type:{name:"string"}},removeFromFavoritesAriaLabelText:{defaultValue:null,description:"",name:"removeFromFavoritesAriaLabelText",required:!0,type:{name:"string"}},resultPagerStatusText:{defaultValue:null,description:"",name:"resultPagerStatusText",required:!0,type:{name:"string"}},noSearchResultText:{defaultValue:null,description:"",name:"noSearchResultText",required:!0,type:{name:"string"}},showMoreText:{defaultValue:null,description:"",name:"showMoreText",required:!0,type:{name:"string"}},showingResultsForWithoutQueryText:{defaultValue:null,description:"",name:"showingResultsForWithoutQueryText",required:!0,type:{name:"string"}},advancedSearchLinkToThisSearchText:{defaultValue:null,description:"",name:"advancedSearchLinkToThisSearchText",required:!0,type:{name:"string"}},advancedSearchAllIndexesText:{defaultValue:null,description:"",name:"advancedSearchAllIndexesText",required:!0,type:{name:"string"}},advancedSearchCreatorText:{defaultValue:null,description:"",name:"advancedSearchCreatorText",required:!0,type:{name:"string"}},advancedSearchSubjectText:{defaultValue:null,description:"",name:"advancedSearchSubjectText",required:!0,type:{name:"string"}},advancedSearchGenreText:{defaultValue:null,description:"",name:"advancedSearchGenreText",required:!0,type:{name:"string"}},advancedSearchLanguageText:{defaultValue:null,description:"",name:"advancedSearchLanguageText",required:!0,type:{name:"string"}},advancedSearchDateText:{defaultValue:null,description:"",name:"advancedSearchDateText",required:!0,type:{name:"string"}},advancedSearchMainCreatorText:{defaultValue:null,description:"",name:"advancedSearchMainCreatorText",required:!0,type:{name:"string"}},advancedSearchMainTitleText:{defaultValue:null,description:"",name:"advancedSearchMainTitleText",required:!0,type:{name:"string"}},advancedSearchSourceText:{defaultValue:null,description:"",name:"advancedSearchSourceText",required:!0,type:{name:"string"}},advancedSearchDateFirstEditionText:{defaultValue:null,description:"",name:"advancedSearchDateFirstEditionText",required:!0,type:{name:"string"}},advancedSearchDecimalDk5Text:{defaultValue:null,description:"",name:"advancedSearchDecimalDk5Text",required:!0,type:{name:"string"}},advancedSearchTypeText:{defaultValue:null,description:"",name:"advancedSearchTypeText",required:!0,type:{name:"string"}},advancedSearchAudienceText:{defaultValue:null,description:"",name:"advancedSearchAudienceText",required:!0,type:{name:"string"}},advancedSearchPublisherText:{defaultValue:null,description:"",name:"advancedSearchPublisherText",required:!0,type:{name:"string"}},advancedSearchIdentifierText:{defaultValue:null,description:"",name:"advancedSearchIdentifierText",required:!0,type:{name:"string"}},advancedSearchAcSourceText:{defaultValue:null,description:"",name:"advancedSearchAcSourceText",required:!0,type:{name:"string"}},advancedSearchAddRowText:{defaultValue:null,description:"",name:"advancedSearchAddRowText",required:!0,type:{name:"string"}},advancedSearchTitleText:{defaultValue:null,description:"",name:"advancedSearchTitleText",required:!0,type:{name:"string"}},advancedSearchPreviewHeadlineText:{defaultValue:null,description:"",name:"advancedSearchPreviewHeadlineText",required:!0,type:{name:"string"}},advancedSearchPreviewEmptyText:{defaultValue:null,description:"",name:"advancedSearchPreviewEmptyText",required:!0,type:{name:"string"}},advancedSearchResetText:{defaultValue:null,description:"",name:"advancedSearchResetText",required:!0,type:{name:"string"}},advancedSearchCopyStringText:{defaultValue:null,description:"",name:"advancedSearchCopyStringText",required:!0,type:{name:"string"}},advancedSearchEditCqlText:{defaultValue:null,description:"",name:"advancedSearchEditCqlText",required:!0,type:{name:"string"}},advancedSearchSearchButtonText:{defaultValue:null,description:"",name:"advancedSearchSearchButtonText",required:!0,type:{name:"string"}},loadingResultsText:{defaultValue:null,description:"",name:"loadingResultsText",required:!0,type:{name:"string"}},toAdvancedSearchButtonText:{defaultValue:null,description:"",name:"toAdvancedSearchButtonText",required:!0,type:{name:"string"}},cqlSearchTitleText:{defaultValue:null,description:"",name:"cqlSearchTitleText",required:!0,type:{name:"string"}},copiedToClipboardText:{defaultValue:null,description:"",name:"copiedToClipboardText",required:!0,type:{name:"string"}},copiedLinkToThisSearchText:{defaultValue:null,description:"",name:"copiedLinkToThisSearchText",required:!0,type:{name:"string"}},clauseAndText:{defaultValue:null,description:"",name:"clauseAndText",required:!0,type:{name:"string"}},clauseOrText:{defaultValue:null,description:"",name:"clauseOrText",required:!0,type:{name:"string"}},clauseNotText:{defaultValue:null,description:"",name:"clauseNotText",required:!0,type:{name:"string"}},advancedSearchFilterMaterialTypeText:{defaultValue:null,description:"",name:"advancedSearchFilterMaterialTypeText",required:!0,type:{name:"string"}},advancedSearchFilterLiteratureFormText:{defaultValue:null,description:"",name:"advancedSearchFilterLiteratureFormText",required:!0,type:{name:"string"}},advancedSearchFilterAccessText:{defaultValue:null,description:"",name:"advancedSearchFilterAccessText",required:!0,type:{name:"string"}},advancedSearchFilterBookText:{defaultValue:null,description:"",name:"advancedSearchFilterBookText",required:!0,type:{name:"string"}},advancedSearchFilterEbookText:{defaultValue:null,description:"",name:"advancedSearchFilterEbookText",required:!0,type:{name:"string"}},advancedSearchFilterAudioBookText:{defaultValue:null,description:"",name:"advancedSearchFilterAudioBookText",required:!0,type:{name:"string"}},advancedSearchFilterArticleText:{defaultValue:null,description:"",name:"advancedSearchFilterArticleText",required:!0,type:{name:"string"}},advancedSearchFilterMovieText:{defaultValue:null,description:"",name:"advancedSearchFilterMovieText",required:!0,type:{name:"string"}},advancedSearchFilterMusicText:{defaultValue:null,description:"",name:"advancedSearchFilterMusicText",required:!0,type:{name:"string"}},advancedSearchFilterPhysicalText:{defaultValue:null,description:"",name:"advancedSearchFilterPhysicalText",required:!0,type:{name:"string"}},advancedSearchFilterOnlineText:{defaultValue:null,description:"",name:"advancedSearchFilterOnlineText",required:!0,type:{name:"string"}},advancedSearchFilterFictionText:{defaultValue:null,description:"",name:"advancedSearchFilterFictionText",required:!0,type:{name:"string"}},advancedSearchFilterNonFictionText:{defaultValue:null,description:"",name:"advancedSearchFilterNonFictionText",required:!0,type:{name:"string"}},multiselectAllOptionText:{defaultValue:null,description:"",name:"multiselectAllOptionText",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/advanced-search/AdvancedSearch.entry.tsx#AdvancedSearchentry"]={docgenInfo:AdvancedSearchentry.__docgenInfo,name:"AdvancedSearchentry",path:"src/apps/advanced-search/AdvancedSearch.entry.tsx#AdvancedSearchentry"})}catch(__react_docgen_typescript_loader_error){}const AdvancedSearch_dev={title:"Apps / Advanced Search",component:AdvancedSearch_entry,argTypes:{...serviceUrlArgs.Z,pageSizeDesktop:{name:"Number of search result items on desktop",defaultValue:50,control:{type:"number"}},pageSizeMobile:{name:"Number of search result items on mobile",defaultValue:20,control:{type:"number"}},materialUrl:{name:"Path to the material page",defaultValue:"/work/:workid",control:{type:"text"}},authUrl:{name:"Url where user can authenticate",defaultValue:"",control:{type:"text"}},searchUrl:{name:"Path to the search result page",defaultValue:"/search",control:{type:"text"}},etAlText:{name:"Et al. Text",defaultValue:"et al.",control:{type:"text"}},byAuthorText:{name:"By (author) Text",defaultValue:"By",control:{type:"text"}},showMoreText:{name:"Show more Text",defaultValue:"show more",control:{type:"text"}},resultPagerStatusText:{name:"Result pager status text",defaultValue:"Showing @itemsShown out of @hitcount results",control:{type:"text"}},numberDescriptionText:{name:"Number description",defaultValue:"Nr.",control:{type:"text"}},inSeriesText:{name:"In series",defaultValue:"in series",control:{type:"text"}},showingMaterialsText:{name:"Showing materials",defaultValue:"Showing materials (@hitcount)",control:{type:"text"}},noSearchResultText:{name:"0-hit search result",defaultValue:"Your search has 0 results",control:{type:"text"}},blacklistedPickupBranchesConfig:{name:"Blacklisted Pickup branches",defaultValue:"FBS-751032,FBS-751031,FBS-751009,FBS-751027,FBS-751024",control:{type:"text"}},blacklistedAvailabilityBranchesConfig:{name:"Blacklisted Availability branches",defaultValue:"FBS-751032,FBS-751031,FBS-751009,FBS-751027,FBS-751024",control:{type:"text"}},blacklistedSearchBranchesConfig:{name:"Blacklisted branches",defaultValue:"FBS-751032,FBS-751031,FBS-751009,FBS-751027,FBS-751024",control:{type:"text"}},branchesConfig:{name:"Branches",defaultValue:'[\n {\n "branchId":"DK-775120",\n "title":"Højbjerg"\n },\n {\n "branchId":"DK-775122",\n "title":"Beder-Malling"\n },\n {\n "branchId":"DK-775144",\n "title":"Gellerup"\n },\n {\n "branchId":"DK-775167",\n "title":"Lystrup"\n },\n {\n "branchId":"DK-775146",\n "title":"Harlev"\n },\n {\n "branchId":"DK-775168",\n "title":"Skødstrup"\n },\n {\n "branchId":"FBS-751010",\n "title":"Arresten"\n },\n {\n "branchId":"DK-775147",\n "title":"Hasle"\n },\n {\n "branchId":"FBS-751032",\n "title":"Må ikke benyttes"\n },\n {\n "branchId":"FBS-751031",\n "title":"Fjernlager 1"\n },\n {\n "branchId":"DK-775126",\n "title":"Solbjerg"\n },\n {\n "branchId":"FBS-751030",\n "title":"ITK"\n },\n {\n "branchId":"DK-775149",\n "title":"Sabro"\n },\n {\n "branchId":"DK-775127",\n "title":"Tranbjerg"\n },\n {\n "branchId":"DK-775160",\n "title":"Risskov"\n },\n {\n "branchId":"DK-775162",\n "title":"Hjortshøj"\n },\n {\n "branchId":"DK-775140",\n "title":"Åby"\n },\n {\n "branchId":"FBS-751009",\n "title":"Fjernlager 2"\n },\n {\n "branchId":"FBS-751029",\n "title":"Stadsarkivet"\n },\n {\n "branchId":"FBS-751027",\n "title":"Intern"\n },\n {\n "branchId":"FBS-751026",\n "title":"Fælles undervejs"\n },\n {\n "branchId":"FBS-751025",\n "title":"Fællessekretariatet"\n },\n {\n "branchId":"DK-775133",\n "title":"Bavnehøj"\n },\n {\n "branchId":"FBS-751024",\n "title":"Fjernlånte materialer"\n },\n {\n "branchId":"DK-775100",\n "title":"Hovedbiblioteket"\n },\n {\n "branchId":"DK-775170",\n "title":"Trige"\n },\n {\n "branchId":"DK-775150",\n "title":"Tilst"\n },\n {\n "branchId":"DK-775130",\n "title":"Viby"\n },\n {\n "branchId":"DK-775164",\n "title":"Egå"\n }\n]',control:{type:"text"}},addToFavoritesAriaLabelText:{control:{type:"text"},defaultValue:"Add @title to favorites list"},removeFromFavoritesAriaLabelText:{control:{type:"text"},defaultValue:"Remove @title from favorites list"},alertErrorCloseText:{name:"Alert error close text",defaultValue:"close",control:{type:"text"}},alertErrorMessageText:{name:"Alert error message text",defaultValue:"An error occurred",control:{type:"text"}},loadingText:{name:"Loading",defaultValue:"Loading",control:{type:"text"}},advancedSearchLinkToThisSearchText:{name:"Advanced search copy to clipboard button text",defaultValue:"Link to this search",control:{type:"text"}},advancedSearchAllIndexesText:{name:"Advanced search indexes - all",defaultValue:"All indexes",control:{type:"text"}},advancedSearchCreatorText:{name:"Advanced search indexes - creator",defaultValue:"Creator",control:{type:"text"}},advancedSearchSubjectText:{name:"Advanced search indexes - subject",defaultValue:"Subject",control:{type:"text"}},advancedSearchGenreText:{name:"Advanced search indexes - genre",defaultValue:"Genre",control:{type:"text"}},advancedSearchLanguageText:{name:"Advanced search indexes - language",defaultValue:"Language",control:{type:"text"}},advancedSearchDateText:{name:"Advanced search indexes - date",defaultValue:"Date",control:{type:"text"}},advancedSearchMainCreatorText:{name:"Advanced search indexes - main creator",defaultValue:"Main creator",control:{type:"text"}},advancedSearchMainTitleText:{name:"Advanced search indexes - main title",defaultValue:"Main title",control:{type:"text"}},advancedSearchSourceText:{name:"Advanced search indexes - source",defaultValue:"Source",control:{type:"text"}},advancedSearchDateFirstEditionText:{name:"Advanced search indexes - edition",defaultValue:"Edition",control:{type:"text"}},advancedSearchDecimalDk5Text:{name:"Advanced search indexes - DK5",defaultValue:"DK5",control:{type:"text"}},advancedSearchTypeText:{name:"Advanced search indexes - type",defaultValue:"Type",control:{type:"text"}},advancedSearchAudienceText:{name:"Advanced search indexes - audience",defaultValue:"Audience",control:{type:"text"}},advancedSearchPublisherText:{name:"Advanced search indexes - publisher",defaultValue:"Publisher",control:{type:"text"}},advancedSearchIdentifierText:{name:"Advanced search indexes - identifier",defaultValue:"Identifier",control:{type:"text"}},advancedSearchAcSourceText:{name:"Advanced search indexes - source",defaultValue:"Source",control:{type:"text"}},advancedSearchAddRowText:{name:"Add row",defaultValue:"Add row",control:{type:"text"}},advancedSearchInputPlaceholderText:{name:"Advanced search input placeholder",defaultValue:"Search term",control:{type:"text"}},advancedSearchTitleText:{name:"Advanced search page title",defaultValue:"Advanced search",control:{type:"text"}},advancedSearchPreviewHeadlineText:{name:"Advanced search CQL preview headline",defaultValue:"CQL search string",control:{type:"text"}},advancedSearchPreviewEmptyText:{name:"Advanced search empty preview",defaultValue:"-",control:{type:"text"}},advancedSearchResetText:{name:"Advanced search reset button text",defaultValue:"Reset",control:{type:"text"}},advancedSearchCopyStringText:{name:"Advanced search page copy string button text",defaultValue:"Copy CQL",control:{type:"text"}},advancedSearchEditCqlText:{name:"Advanced search page edit CQL button text",defaultValue:"Edit CQL",control:{type:"text"}},advancedSearchSearchButtonText:{name:"Advanced search search button text",defaultValue:"Search",control:{type:"text"}},loadingResultsText:{name:"Advanced search loading results text",defaultValue:"Loading results...",control:{type:"text"}},toAdvancedSearchButtonText:{name:"To advanced search button text",defaultValue:"Back to advanced search",control:{type:"text"}},cqlSearchTitleText:{name:"CQL search title text",defaultValue:"CQL search",control:{type:"text"}},copiedToClipboardText:{name:"Text that appears after copying to clipboard",defaultValue:"Copied",control:{type:"text"}},copiedLinkToThisSearchText:{name:"Text that appears after getting link to a search copied to clipboard",defaultValue:"Link copied to clipboard",control:{type:"text"}},clauseAndText:{name:"Advanced search clause - AND",defaultValue:"AND",control:{type:"text"}},clauseOrText:{name:"Advanced search clause - OR",defaultValue:"OR",control:{type:"text"}},clauseNotText:{name:"Advanced search clause - NOT",defaultValue:"NOT",control:{type:"text"}},advancedSearchFilterMaterialTypeText:{name:"Advanced search filter - material type",defaultValue:"Material Type",control:{type:"text"}},advancedSearchFilterLiteratureFormText:{name:"Advanced search filter - literature form",defaultValue:"Literature form",control:{type:"text"}},advancedSearchFilterAccessText:{name:"Advanced search filter - access",defaultValue:"Accessibility",control:{type:"text"}},advancedSearchFilterBookText:{name:"Advanced search filter - book",defaultValue:"Book",control:{type:"text"}},advancedSearchFilterEbookText:{name:"Advanced search filter - ebook",defaultValue:"Ebook",control:{type:"text"}},advancedSearchFilterAudioBookText:{name:"Advanced search filter - audio book",defaultValue:"Audio book",control:{type:"text"}},advancedSearchFilterArticleText:{name:"Advanced search filter - article",defaultValue:"Article",control:{type:"text"}},advancedSearchFilterMovieText:{name:"Advanced search filter - movie",defaultValue:"Movie",control:{type:"text"}},advancedSearchFilterMusicText:{name:"Advanced search filter - music",defaultValue:"Music",control:{type:"text"}},advancedSearchFilterPhysicalText:{name:"Advanced search filter - physical access",defaultValue:"Physical",control:{type:"text"}},advancedSearchFilterOnlineText:{name:"Advanced search filter - online access",defaultValue:"Online",control:{type:"text"}},advancedSearchFilterFictionText:{name:"Advanced search filter - fiction",defaultValue:"Fiction",control:{type:"text"}},advancedSearchFilterNonFictionText:{name:"Advanced search filter - non-fiction",defaultValue:"Non-fiction",control:{type:"text"}},multiselectAllOptionText:{name:"Multiselect - all option",defaultValue:"All",control:{type:"text"}}}},AdvancedSearch_dev_AdvancedSearch=args=>react.createElement(AdvancedSearch_entry,args)},"./src/apps/create-patron-user-info/CreatePatron.dev.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{CreatePatronEntry:()=>CreatePatron_dev_CreatePatronEntry,default:()=>CreatePatron_dev});var react=__webpack_require__("./node_modules/react/index.js"),utils_config=__webpack_require__("./src/core/utils/config.tsx"),utils_text=__webpack_require__("./src/core/utils/text.tsx"),utils_url=__webpack_require__("./src/core/utils/url.tsx"),set=__webpack_require__("./node_modules/lodash/set.js"),set_default=__webpack_require__.n(set),PincodeSection=__webpack_require__("./src/apps/patron-page/sections/PincodeSection.tsx"),BranchesDropdown=__webpack_require__("./src/apps/patron-page/util/BranchesDropdown.tsx"),ContactInfoSection=__webpack_require__("./src/components/contact-info-section/ContactInfoSection.tsx"),fbs=__webpack_require__("./src/core/fbs/fbs.ts"),general=__webpack_require__("./src/core/utils/helpers/general.ts"),url=__webpack_require__("./src/core/utils/helpers/url.ts");const UserInfo=({cpr})=>{const t=(0,utils_text.X)(),u=(0,utils_url.J_)(),logoutUrl=u("logoutUrl"),redirectOnUserCreatedUrl=u("redirectOnUserCreatedUrl"),config=(0,utils_config.ZR)(),formRef=(0,react.useRef)(null),[pin,setPin]=(0,react.useState)(null),minAge=parseInt(config("minAgeConfig"),10),[validCpr]=(0,react.useState)((0,general.IX)(cpr,minAge)),{mutate}=(0,fbs.RI)(),[patron,setPatron]=(0,react.useState)({preferredPickupBranch:"",receiveEmail:!0,receivePostalMail:!1,receiveSms:!1,phoneNumber:"",emailAddress:""}),changePatron=(newValue,key)=>{const copyUser=JSON.parse(JSON.stringify(patron));set_default()(copyUser,key,newValue),setPatron(copyUser)};return react.createElement(react.Fragment,null,validCpr&&react.createElement("form",{onSubmit:e=>(e=>{e.preventDefault();const{preferredPickupBranch,phoneNumber,emailAddress}=patron;pin&&preferredPickupBranch&&phoneNumber&&emailAddress&&mutate({data:{cprNumber:cpr,patron,pincode:pin}},{onSuccess:()=>{(0,url.gB)(redirectOnUserCreatedUrl)}})})(e),ref:formRef,className:"dpl-patron-page"},react.createElement("h1",{className:"text-header-h1 mb-48"},t("createPatronHeaderText")),react.createElement(ContactInfoSection.Z,{showCheckboxes:!1,inLine:!0,changePatron,patron,requiredFields:["email"]}),react.createElement(PincodeSection.Z,{required:!0,changePincode:setPin}),t("createPatronChangePickupHeaderText")&&react.createElement("h2",{className:"text-subtitle mt-32 mb-16"},t("createPatronChangePickupHeaderText")),t("createPatronChangePickupBodyText")&&react.createElement("p",{className:"text-body-small-regular my-32"},t("createPatronChangePickupBodyText")),react.createElement("div",{className:"mt-32"},react.createElement(BranchesDropdown.Z,{classNames:"dropdow dropdown__desktop",selected:(null==patron?void 0:patron.preferredPickupBranch)||"",onChange:newPreferredPickupBranch=>changePatron(newPreferredPickupBranch,"preferredPickupBranch")})),react.createElement("div",{className:"patron-buttons"},react.createElement("button",{type:"submit",className:"btn-primary btn-filled btn-small"},t("createPatronConfirmButtonText")),react.createElement("button",{type:"button",className:"link-tag mx-16",onClick:()=>{(0,url.gB)(logoutUrl)}},t("createPatronCancelButtonText")))),!validCpr&&react.createElement("div",{className:"dpl-patron-page"},react.createElement("h1",{className:"text-header-h1 mb-48"},t("createPatronInvalidSSNHeaderText")),react.createElement("p",null,t("createPatronInvalidSSNBodyText"))))},create_patron_user_info_UserInfo=UserInfo;try{UserInfo.displayName="UserInfo",UserInfo.__docgenInfo={description:"",displayName:"UserInfo",props:{cpr:{defaultValue:null,description:"",name:"cpr",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/create-patron-user-info/UserInfo.tsx#UserInfo"]={docgenInfo:UserInfo.__docgenInfo,name:"UserInfo",path:"src/apps/create-patron-user-info/UserInfo.tsx#UserInfo"})}catch(__react_docgen_typescript_loader_error){}var es=__webpack_require__("./node_modules/react-query/es/index.js"),FetchFailedCriticalError=__webpack_require__("./src/core/fetchers/FetchFailedCriticalError.ts"),token=__webpack_require__("./src/core/token.js"),FetcherCriticalHttpError=__webpack_require__("./src/core/fetchers/FetcherCriticalHttpError.ts");function _defineProperty(obj,key,value){return(key=function _toPropertyKey(t){var i=function _toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==typeof i?i:String(i)}(key))in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}class AdgangsPlatformenServiceHttpError extends FetcherCriticalHttpError.Z{constructor(...args){super(...args),_defineProperty(this,"name","AdgangsPlatformenServiceHttpError")}}const adgangsplatformen_useUserInfo=queryOptions=>{const userinfoUrl=(0,utils_url.J_)()("userinfoUrl"),url=String(userinfoUrl),queryKey=(null==queryOptions?void 0:queryOptions.queryKey)??(url=>{const userToken=(0,token.LP)(token.b4);if(!userToken)throw new Error("User token is missing");return`${url}:${userToken}`})(url),getUserInfo=(infoUrl,signal)=>(async({url,method,headers,data})=>{const userToken=(0,token.LP)(token.b4);if(!userToken)throw new Error("User token is missing");const authHeaders=userToken?{Authorization:`Bearer ${userToken}`}:{},body=data?JSON.stringify(data):null;try{const response=await fetch(url,{method,headers:{...headers,...authHeaders},body});if(!response.ok)throw new AdgangsPlatformenServiceHttpError(response.status,response.statusText,url);try{return await response.json()}catch(e){if(!(e instanceof SyntaxError))throw e}}catch(error){if(error instanceof AdgangsPlatformenServiceHttpError)throw error;const message=error instanceof Error?error.message:"Unknown error";throw new FetchFailedCriticalError.Z(message,url)}return null})({url:infoUrl,method:"get",signal});return{queryKey,...(0,es.useQuery)(queryKey,(()=>getUserInfo(url)),queryOptions)}},CreatePatron=()=>{const[cpr,setCpr]=(0,react.useState)(null),config=(0,utils_config.ZR)(),t=(0,utils_text.X)(),dashboardUrl=(0,utils_url.J_)()("dashboardUrl"),{id:agencyId}=config("agencyConfig",{transformer:"jsonParse"}),{data:userInfo,isLoading}=adgangsplatformen_useUserInfo();return(0,react.useEffect)((()=>{if(isLoading||!userInfo)return;const{attributes:{agencies,cpr:userCpr}}=userInfo;agencies.some((agency=>agency.agencyId===agencyId))&&(0,url.gB)(dashboardUrl),setCpr(String(userCpr))}),[agencyId,dashboardUrl,isLoading,userInfo]),isLoading?react.createElement("div",null,t("loadingText")):cpr?react.createElement(create_patron_user_info_UserInfo,{cpr}):null},create_patron_user_info_CreatePatron=CreatePatron;try{CreatePatron.displayName="CreatePatron",CreatePatron.__docgenInfo={description:"",displayName:"CreatePatron",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/create-patron-user-info/CreatePatron.tsx#CreatePatron"]={docgenInfo:CreatePatron.__docgenInfo,name:"CreatePatron",path:"src/apps/create-patron-user-info/CreatePatron.tsx#CreatePatron"})}catch(__react_docgen_typescript_loader_error){}const CreatePatron_entry=(0,utils_config.Rh)((0,utils_text.z)((0,utils_url.XL)((()=>((0,token.hA)("user")?(0,token.LP)("user"):null)?react.createElement(create_patron_user_info_CreatePatron,null):null))));try{CreatePatronentry.displayName="CreatePatronentry",CreatePatronentry.__docgenInfo={description:"",displayName:"CreatePatronentry",props:{agencyConfig:{defaultValue:null,description:"",name:"agencyConfig",required:!0,type:{name:"string"}},pincodeLengthMinConfig:{defaultValue:null,description:"",name:"pincodeLengthMinConfig",required:!0,type:{name:"string"}},pincodeLengthMaxConfig:{defaultValue:null,description:"",name:"pincodeLengthMaxConfig",required:!0,type:{name:"string"}},blacklistedPickupBranchesConfig:{defaultValue:null,description:"",name:"blacklistedPickupBranchesConfig",required:!0,type:{name:"string"}},branchesConfig:{defaultValue:null,description:"",name:"branchesConfig",required:!0,type:{name:"string"}},textNotificationsEnabledConfig:{defaultValue:null,description:"",name:"textNotificationsEnabledConfig",required:!0,type:{name:"string"}},loginUrl:{defaultValue:null,description:"",name:"loginUrl",required:!0,type:{name:"string"}},redirectOnUserCreatedUrl:{defaultValue:null,description:"",name:"redirectOnUserCreatedUrl",required:!0,type:{name:"string"}},fbsBaseUrl:{defaultValue:null,description:"",name:"fbsBaseUrl",required:!0,type:{name:"string"}},publizonBaseUrl:{defaultValue:null,description:"",name:"publizonBaseUrl",required:!0,type:{name:"string"}},dashboardUrl:{defaultValue:null,description:"",name:"dashboardUrl",required:!0,type:{name:"string"}},pickupBranchesDropdownLabelText:{defaultValue:null,description:"",name:"pickupBranchesDropdownLabelText",required:!0,type:{name:"string"}},createPatronCancelButtonText:{defaultValue:null,description:"",name:"createPatronCancelButtonText",required:!0,type:{name:"string"}},createPatronChangePickupBodyText:{defaultValue:null,description:"",name:"createPatronChangePickupBodyText",required:!0,type:{name:"string"}},createPatronChangePickupHeaderText:{defaultValue:null,description:"",name:"createPatronChangePickupHeaderText",required:!0,type:{name:"string"}},createPatronConfirmButtonText:{defaultValue:null,description:"",name:"createPatronConfirmButtonText",required:!0,type:{name:"string"}},createPatronHeaderText:{defaultValue:null,description:"",name:"createPatronHeaderText",required:!0,type:{name:"string"}},createPatronInvalidSSNBodyText:{defaultValue:null,description:"",name:"createPatronInvalidSSNBodyText",required:!0,type:{name:"string"}},createPatronInvalidSSNHeaderText:{defaultValue:null,description:"",name:"createPatronInvalidSSNHeaderText",required:!0,type:{name:"string"}},patronContactEmailCheckboxText:{defaultValue:null,description:"",name:"patronContactEmailCheckboxText",required:!0,type:{name:"string"}},patronContactEmailLabelText:{defaultValue:null,description:"",name:"patronContactEmailLabelText",required:!0,type:{name:"string"}},patronContactInfoBodyText:{defaultValue:null,description:"",name:"patronContactInfoBodyText",required:!0,type:{name:"string"}},patronContactInfoHeaderText:{defaultValue:null,description:"",name:"patronContactInfoHeaderText",required:!0,type:{name:"string"}},patronContactNameLabelText:{defaultValue:null,description:"",name:"patronContactNameLabelText",required:!0,type:{name:"string"}},patronContactPhoneCheckboxText:{defaultValue:null,description:"",name:"patronContactPhoneCheckboxText",required:!0,type:{name:"string"}},patronContactPhoneLabelText:{defaultValue:null,description:"",name:"patronContactPhoneLabelText",required:!0,type:{name:"string"}},patronPageChangePincodeBodyText:{defaultValue:null,description:"",name:"patronPageChangePincodeBodyText",required:!0,type:{name:"string"}},patronPageChangePincodeHeaderText:{defaultValue:null,description:"",name:"patronPageChangePincodeHeaderText",required:!0,type:{name:"string"}},patronPageConfirmPincodeLabelText:{defaultValue:null,description:"",name:"patronPageConfirmPincodeLabelText",required:!0,type:{name:"string"}},patronPagePincodeLabelText:{defaultValue:null,description:"",name:"patronPagePincodeLabelText",required:!0,type:{name:"string"}},patronPagePincodesNotTheSameText:{defaultValue:null,description:"",name:"patronPagePincodesNotTheSameText",required:!0,type:{name:"string"}},patronPagePincodeTooShortValidationText:{defaultValue:null,description:"",name:"patronPagePincodeTooShortValidationText",required:!0,type:{name:"string"}},phoneInputMessageText:{defaultValue:null,description:"",name:"phoneInputMessageText",required:!0,type:{name:"string"}},pickupBranchesDropdownNothingSelectedText:{defaultValue:null,description:"",name:"pickupBranchesDropdownNothingSelectedText",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/create-patron-user-info/CreatePatron.entry.tsx#CreatePatronentry"]={docgenInfo:CreatePatronentry.__docgenInfo,name:"CreatePatronentry",path:"src/apps/create-patron-user-info/CreatePatron.entry.tsx#CreatePatronentry"})}catch(__react_docgen_typescript_loader_error){}var serviceUrlArgs=__webpack_require__("./src/core/storybook/serviceUrlArgs.ts"),pincodeArgs=__webpack_require__("./src/core/storybook/pincodeArgs.ts");const CreatePatron_dev={title:"Apps / Create patron",component:CreatePatron_entry,argTypes:{...serviceUrlArgs.Z,...pincodeArgs.Z,blacklistedPickupBranchesConfig:{defaultValue:"FBS-751032,FBS-751031,FBS-751009,FBS-751027,FBS-751024",control:{type:"text"}},minAgeConfig:{defaultValue:"18",control:{type:"text"}},branchesConfig:{defaultValue:'[\n {\n "branchId":"DK-775120",\n "title":"Højbjerg"\n },\n {\n "branchId":"DK-775122",\n "title":"Beder-Malling"\n },\n {\n "branchId":"DK-775144",\n "title":"Gellerup"\n },\n {\n "branchId":"DK-775167",\n "title":"Lystrup"\n },\n {\n "branchId":"DK-775146",\n "title":"Harlev"\n },\n {\n "branchId":"DK-775168",\n "title":"Skødstrup"\n },\n {\n "branchId":"FBS-751010",\n "title":"Arresten"\n },\n {\n "branchId":"DK-775147",\n "title":"Hasle"\n },\n {\n "branchId":"FBS-751032",\n "title":"Må ikke benyttes"\n },\n {\n "branchId":"FBS-751031",\n "title":"Fjernlager 1"\n },\n {\n "branchId":"DK-775126",\n "title":"Solbjerg"\n },\n {\n "branchId":"FBS-751030",\n "title":"ITK"\n },\n {\n "branchId":"DK-775149",\n "title":"Sabro"\n },\n {\n "branchId":"DK-775127",\n "title":"Tranbjerg"\n },\n {\n "branchId":"DK-775160",\n "title":"Risskov"\n },\n {\n "branchId":"DK-775162",\n "title":"Hjortshøj"\n },\n {\n "branchId":"DK-775140",\n "title":"Åby"\n },\n {\n "branchId":"FBS-751009",\n "title":"Fjernlager 2"\n },\n {\n "branchId":"FBS-751029",\n "title":"Stadsarkivet"\n },\n {\n "branchId":"FBS-751027",\n "title":"Intern"\n },\n {\n "branchId":"FBS-751026",\n "title":"Fælles undervejs"\n },\n {\n "branchId":"FBS-751025",\n "title":"Fællessekretariatet"\n },\n {\n "branchId":"DK-775133",\n "title":"Bavnehøj"\n },\n {\n "branchId":"FBS-751024",\n "title":"Fjernlånte materialer"\n },\n {\n "branchId":"DK-775100",\n "title":"Hovedbiblioteket"\n },\n {\n "branchId":"DK-775170",\n "title":"Trige"\n },\n {\n "branchId":"DK-775150",\n "title":"Tilst"\n },\n {\n "branchId":"DK-775130",\n "title":"Viby"\n },\n {\n "branchId":"DK-775164",\n "title":"Egå"\n }\n]',control:{type:"text"}},userinfoUrl:{defaultValue:"https://login.bib.dk/userinfo",control:{type:"text"}},logOutUrl:{defaultValue:"/Logout",control:{type:"text"}},dashboardUrl:{defaultValue:"/user/me/dashboard",control:{type:"text"}},agencyConfig:{defaultValue:'{ "id": "999999" }',control:{type:"text"}},textNotificationsEnabledConfig:{defaultValue:"1",control:{type:"text"}},pickupBranchesDropdownLabelText:{defaultValue:"Choose pickup branch",control:{type:"text"}},patronPageChangePincodeHeaderText:{defaultValue:"Pincode",control:{type:"text"}},pickupBranchesDropdownNothingSelectedText:{defaultValue:"Nothing selected",control:{type:"text"}},patronPageChangePincodeBodyText:{defaultValue:"Change current pin by entering a new pin and saving",control:{type:"text"}},patronPagePincodeLabelText:{defaultValue:"New pin",control:{type:"text"}},patronPageConfirmPincodeLabelText:{defaultValue:"Confirm new pin",control:{type:"text"}},patronContactNameLabelText:{defaultValue:"Name",control:{type:"text"}},patronPagePincodeTooShortValidationText:{defaultValue:"The pincode should be minimum @pincodeLengthMin and maximum @pincodeLengthMax characters long",control:{type:"text"}},patronPagePincodesNotTheSameText:{defaultValue:"The pincodes are not the same",control:{type:"text"}},patronContactPhoneLabelText:{defaultValue:"Phone number",control:{type:"text"}},patronContactInfoBodyText:{defaultValue:"Please enter contact information below",control:{type:"text"}},patronContactInfoHeaderText:{defaultValue:"Contact information",control:{type:"text"}},patronContactPhoneCheckboxText:{defaultValue:"Receive text messages about your loans, reservations, and so forth",control:{type:"text"}},patronContactEmailLabelText:{defaultValue:"E-mail",control:{type:"text"}},patronContactEmailCheckboxText:{defaultValue:"Receive emails about your loans, reservations, and so forth",control:{type:"text"}},createPatronChangePickupHeaderText:{defaultValue:"",control:{type:"text"}},createPatronChangePickupBodyText:{defaultValue:"",control:{type:"text"}},createPatronHeaderText:{defaultValue:"Register as patron",control:{type:"text"}},createPatronInvalidSSNHeaderText:{defaultValue:"Invalid SSN",control:{type:"text"}},createPatronInvalidSSNBodyText:{defaultValue:"This SSN is invalid",control:{type:"text"}},redirectOnUserCreatedUrl:{defaultValue:"https://unsplash.com/photos/KRztl5I6xac",control:{type:"text"}},createPatronConfirmButtonText:{defaultValue:"Confirm",control:{type:"text"}},phoneInputMessageText:{name:"Phone input validation message",defaultValue:"The phone number must be 6 to 15 characters in length and should be comprised solely of numbers or begin with a +",control:{type:"text"}}}},CreatePatron_dev_CreatePatronEntry=(props=>react.createElement(CreatePatron_entry,props)).bind({});CreatePatron_dev_CreatePatronEntry.args={}},"./src/apps/dashboard/dashboard-notification-list/dashboard-notification-list.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>dashboard_notification_list});var react=__webpack_require__("./node_modules/react/index.js"),utils_text=__webpack_require__("./src/core/utils/text.tsx"),url=__webpack_require__("./src/core/utils/url.tsx"),dayjs_min=__webpack_require__("./node_modules/dayjs/dayjs.min.js"),dayjs_min_default=__webpack_require__.n(dayjs_min),date_format=__webpack_require__("./src/core/configuration/date-format.json");const yesterday=dayjs_min_default()().subtract(1,"day").format(date_format.d0),soon=dayjs_min_default()().add(7,"days").format(date_format.d0),longer=dayjs_min_default()().add(1,"year").format(date_format.d0);var Link=__webpack_require__("./src/components/atoms/links/Link.tsx"),empty_list=__webpack_require__("./src/components/empty-list/empty-list.tsx"),arrow=__webpack_require__("./src/components/atoms/icons/arrow/arrow.tsx"),status_badge=__webpack_require__("./src/apps/loan-list/materials/utils/status-badge.tsx");const dashboard_notification=({notificationNumber,notificationText,dataCy,notificationColor,notificationClickEvent,showNotificationDot,badge})=>0===notificationNumber?null:react.createElement("button",{type:"button","data-cy":dataCy,onClick:notificationClickEvent,className:"mb-16"},react.createElement("div",{className:"list-dashboard shadow-medium-hover arrow__hover--right-small"},react.createElement("div",{className:`color-secondary-gray number number--${notificationColor}`},notificationNumber),react.createElement("span",{className:"list-dashboard__title text-header-h4 color-secondary-gray"},notificationText),"danger"===notificationColor&&react.createElement(status_badge.Z,{dangerText:badge}),"warning"===notificationColor&&react.createElement(status_badge.Z,{warningText:badge}),"info"===notificationColor&&react.createElement(status_badge.Z,{infoText:badge}),showNotificationDot&&react.createElement("div",{className:"list-dashboard__dot"}),react.createElement("div",{className:"list-dashboard__arrow"},react.createElement(arrow.Z,null))));try{dashboardnotification.displayName="dashboardnotification",dashboardnotification.__docgenInfo={description:"",displayName:"dashboardnotification",props:{notificationNumber:{defaultValue:null,description:"",name:"notificationNumber",required:!0,type:{name:"number"}},showNotificationDot:{defaultValue:null,description:"",name:"showNotificationDot",required:!0,type:{name:"boolean"}},notificationText:{defaultValue:null,description:"",name:"notificationText",required:!0,type:{name:"string"}},dataCy:{defaultValue:null,description:"",name:"dataCy",required:!0,type:{name:"string"}},notificationColor:{defaultValue:null,description:"",name:"notificationColor",required:!0,type:{name:"string"}},badge:{defaultValue:null,description:"",name:"badge",required:!1,type:{name:"string | undefined"}},notificationClickEvent:{defaultValue:null,description:"",name:"notificationClickEvent",required:!0,type:{name:"() => void"}},notificationClickEventParam:{defaultValue:null,description:"",name:"notificationClickEventParam",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/dashboard/dashboard-notification/dashboard-notification.tsx#dashboardnotification"]={docgenInfo:dashboardnotification.__docgenInfo,name:"dashboardnotification",path:"src/apps/dashboard/dashboard-notification/dashboard-notification.tsx#dashboardnotification"})}catch(__react_docgen_typescript_loader_error){}const Notifications=({materials,showOnlyNotifications})=>{const displayedNotifications=showOnlyNotifications?materials.filter((({showNotificationDot})=>showNotificationDot)):materials;return react.createElement(react.Fragment,null,displayedNotifications.map((({listLength,header:headerNotification,color,notificationClickEvent,showNotificationDot,badge,dataCy})=>react.createElement(dashboard_notification,{notificationNumber:listLength,notificationText:headerNotification,showNotificationDot,badge,dataCy,key:headerNotification,notificationColor:color,notificationClickEvent}))))},dashboard_notification_list_Notifications=Notifications;try{Notifications.displayName="Notifications",Notifications.__docgenInfo={description:"",displayName:"Notifications",props:{materials:{defaultValue:null,description:"",name:"materials",required:!0,type:{name:"NotificationMaterialsList[]"}},showOnlyNotifications:{defaultValue:null,description:"",name:"showOnlyNotifications",required:!0,type:{name:"boolean"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/dashboard/dashboard-notification-list/Notifications.tsx#Notifications"]={docgenInfo:Notifications.__docgenInfo,name:"Notifications",path:"src/apps/dashboard/dashboard-notification-list/Notifications.tsx#Notifications"})}catch(__react_docgen_typescript_loader_error){}const NotificationColumn=({materials,materialsCount,headerUrl,emptyListText,header})=>react.createElement("div",{className:"status-userprofile__column my-32"},react.createElement("div",{className:"link-filters"},react.createElement("div",{className:"link-filters__tag-wrapper mb-16"},react.createElement("h2",{"data-cy":`dashboard-${header.toLowerCase()}-header`},react.createElement(Link.Z,{href:headerUrl,className:"link-tag link-tag link-filters__tag"},header),react.createElement("span",{className:"link-filters__counter"},materialsCount)))),0===materialsCount&&react.createElement(empty_list.Z,{emptyListText}),0!==materialsCount&&react.createElement(dashboard_notification_list_Notifications,{showOnlyNotifications:!1,materials})),dashboard_notification_list_NotificationColumn=NotificationColumn;try{NotificationColumn.displayName="NotificationColumn",NotificationColumn.__docgenInfo={description:"",displayName:"NotificationColumn",props:{materials:{defaultValue:null,description:"",name:"materials",required:!0,type:{name:"NotificationMaterialsList[]"}},materialsCount:{defaultValue:null,description:"",name:"materialsCount",required:!0,type:{name:"number"}},headerUrl:{defaultValue:null,description:"",name:"headerUrl",required:!0,type:{name:"URL"}},header:{defaultValue:null,description:"",name:"header",required:!0,type:{name:"string"}},emptyListText:{defaultValue:null,description:"",name:"emptyListText",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/dashboard/dashboard-notification-list/NotificationColumn.tsx#NotificationColumn"]={docgenInfo:NotificationColumn.__docgenInfo,name:"NotificationColumn",path:"src/apps/dashboard/dashboard-notification-list/NotificationColumn.tsx#NotificationColumn"})}catch(__react_docgen_typescript_loader_error){}var modal=__webpack_require__("./src/core/utils/modal.tsx"),LoansGroupModal=__webpack_require__("./src/components/GroupModal/LoansGroupModal.tsx"),material_details_modal=__webpack_require__("./src/apps/loan-list/modal/material-details-modal.tsx"),material_details=__webpack_require__("./src/apps/loan-list/modal/material-details.tsx"),SimpleModalHeader=__webpack_require__("./src/components/GroupModal/SimpleModalHeader.tsx"),GroupModalContent=__webpack_require__("./src/components/GroupModal/GroupModalContent.tsx"),Button=__webpack_require__("./src/components/Buttons/Button.tsx"),isEqual=__webpack_require__("./node_modules/lodash/isEqual.js"),isEqual_default=__webpack_require__.n(isEqual),selectable_material=__webpack_require__("./src/apps/loan-list/materials/selectable-material/selectable-material.tsx"),use_pager=__webpack_require__("./src/components/result-pager/use-pager.tsx"),reservation_type=__webpack_require__("./src/core/utils/types/reservation-type.ts");const GroupModalReservationsList=({materials,selectedMaterials,selectMaterials,pageSize,header,marginBottonPager,openDetailsModal})=>{const t=(0,utils_text.X)(),[displayedMaterials,setDisplayedMaterials]=(0,react.useState)([]),{itemsShown,PagerComponent,firstInNewPage}=(0,use_pager.Z)({hitcount:materials.length,pageSize});(0,react.useEffect)((()=>{setDisplayedMaterials([...materials].splice(0,itemsShown))}),[itemsShown,materials]);const onMaterialChecked=item=>{const selectedMaterialsCopy=[...selectedMaterials],indexOfItemToRemove=selectedMaterials.indexOf(item);indexOfItemToRemove>-1?selectedMaterialsCopy.splice(indexOfItemToRemove,1):selectedMaterialsCopy.push(item),selectMaterials(selectedMaterialsCopy)};return 0===displayedMaterials.length?null:react.createElement(react.Fragment,null,react.createElement("h3",{className:"text-body-medium-regular"},header),react.createElement("ul",{className:"modal-loan__list-materials"},displayedMaterials.map(((material,i)=>{const{expiryDate,faust,identifier,numberInQueue,reservationIds}=material,selected=null==selectedMaterials?void 0:selectedMaterials.some((selectedMaterial=>isEqual_default()(selectedMaterial,material)));return react.createElement(react.Fragment,null,(identifier||reservationIds||faust)&&react.createElement(selectable_material.Z,{item:material,displayedMaterial:material,focused:i===firstInNewPage,statusBadgeComponent:faust&&react.createElement(status_badge.Z,{badgeDate:expiryDate,neutralText:numberInQueue?t("dashboardNumberInLineText",{count:numberInQueue,placeholders:{"@count":numberInQueue}}):"",infoText:""}),openDetailsModal,key:(0,reservation_type._p)(material),selected,onMaterialChecked,disabled:!1,statusMessageComponentMobile:null,statusMessageComponentDesktop:null}),!identifier&&null)}))),react.createElement(PagerComponent,{classNames:marginBottonPager?"result-pager--margin-bottom":""}))},GroupModal_GroupModalReservationsList=GroupModalReservationsList;try{GroupModalReservationsList.displayName="GroupModalReservationsList",GroupModalReservationsList.__docgenInfo={description:"",displayName:"GroupModalReservationsList",props:{materials:{defaultValue:null,description:"",name:"materials",required:!0,type:{name:"Nullable>[]"}},pageSize:{defaultValue:null,description:"",name:"pageSize",required:!0,type:{name:"number"}},selectedMaterials:{defaultValue:null,description:"",name:"selectedMaterials",required:!0,type:{name:"Nullable>[]"}},header:{defaultValue:null,description:"",name:"header",required:!0,type:{name:"string"}},selectMaterials:{defaultValue:null,description:"",name:"selectMaterials",required:!0,type:{name:"(materialIds: Nullable>[]) => void"}},marginBottonPager:{defaultValue:null,description:"",name:"marginBottonPager",required:!0,type:{name:"boolean"}},openDetailsModal:{defaultValue:null,description:"",name:"openDetailsModal",required:!0,type:{name:"(reservation: Nullable>) => void"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/GroupModal/GroupModalReservationsList.tsx#GroupModalReservationsList"]={docgenInfo:GroupModalReservationsList.__docgenInfo,name:"GroupModalReservationsList",path:"src/components/GroupModal/GroupModalReservationsList.tsx#GroupModalReservationsList"})}catch(__react_docgen_typescript_loader_error){}var StatusCircleModalHeader=__webpack_require__("./src/components/GroupModal/StatusCircleModalHeader.tsx"),status_circle=__webpack_require__("./src/apps/loan-list/materials/utils/status-circle.tsx"),useReservations=__webpack_require__("./src/core/utils/useReservations.tsx"),modal_helpers=__webpack_require__("./src/core/utils/helpers/modal-helpers.ts");const modal_ReservationsGroupModal=({pageSize,modalId,setReservationsToDelete,openDetailsModal})=>{const{fbs,publizon}=(0,useReservations.Z)(),t=(0,utils_text.X)(),{reservationsReady,reservationsQueued}=(0,modal_helpers.GM)(),[materialsToDelete,setMaterialsToDelete]=(0,react.useState)([]);let physicalReservations=[],digitalReservations=[];modalId===reservationsReady&&(physicalReservations=fbs.readyToLoan,digitalReservations=publizon.readyToLoan),modalId===reservationsQueued&&(physicalReservations=fbs.queued,digitalReservations=publizon.queued),(0,react.useEffect)((()=>{setMaterialsToDelete([])}),[modalId]);const selectableReservations=[...physicalReservations,...digitalReservations],selectMaterials=materials=>{setMaterialsToDelete(materials)};return react.createElement(modal.Z,{modalId,closeModalAriaLabelText:t("groupModalReservationsCloseModalAriaLabelText"),screenReaderModalDescriptionText:t("groupModalReservationsLoansAriaDescriptionText")},react.createElement("div",{className:"modal-loan"},react.createElement("div",{className:"modal-loan__list"},modalId===reservationsQueued&&react.createElement(SimpleModalHeader.Z,{header:t("queuedReservationsText")}),modalId===reservationsReady&&react.createElement(StatusCircleModalHeader.Z,{header:t("reservationsReadyForPickupText"),statusCircleComponent:react.createElement(status_circle.Z,{loanDate:""})}),react.createElement(GroupModalContent.Z,{buttonComponent:react.createElement(Button.z,{label:t("removeAllReservationsText",{placeholders:{"@amount":materialsToDelete.length}}),buttonType:"none",disabled:!materialsToDelete.length,collapsible:!1,size:"small",variant:"filled",onClick:()=>(setReservationsToDelete(materialsToDelete),void setMaterialsToDelete([])),dataCy:"remove-reservations-button"}),amountOfSelectableMaterials:selectableReservations.length,selectableMaterials:selectableReservations,selectedMaterials:materialsToDelete,selectMaterials},react.createElement(GroupModal_GroupModalReservationsList,{openDetailsModal,header:t("physicalReservationsHeaderText"),materials:physicalReservations,pageSize,selectedMaterials:materialsToDelete,selectMaterials,marginBottonPager:0===digitalReservations.length}),react.createElement(GroupModal_GroupModalReservationsList,{marginBottonPager:!0,openDetailsModal,header:t("digitalReservationsHeaderText"),materials:digitalReservations,pageSize,selectedMaterials:materialsToDelete,selectMaterials})))))};try{ReservationsGroupModal.displayName="ReservationsGroupModal",ReservationsGroupModal.__docgenInfo={description:"",displayName:"ReservationsGroupModal",props:{pageSize:{defaultValue:null,description:"",name:"pageSize",required:!0,type:{name:"number"}},modalId:{defaultValue:null,description:"",name:"modalId",required:!0,type:{name:"string"}},setReservationsToDelete:{defaultValue:null,description:"",name:"setReservationsToDelete",required:!0,type:{name:"(reservations: Nullable>[]) => void"}},openDetailsModal:{defaultValue:null,description:"",name:"openDetailsModal",required:!0,type:{name:"(reservation: Nullable>) => void"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/dashboard/modal/ReservationsGroupModal.tsx#ReservationsGroupModal"]={docgenInfo:ReservationsGroupModal.__docgenInfo,name:"ReservationsGroupModal",path:"src/apps/dashboard/modal/ReservationsGroupModal.tsx#ReservationsGroupModal"})}catch(__react_docgen_typescript_loader_error){}var reservation_details=__webpack_require__("./src/apps/reservation-list/modal/reservation-details/reservation-details.tsx"),delete_reservation_modal=__webpack_require__("./src/apps/reservation-list/modal/delete-reservation/delete-reservation-modal.tsx"),AcceptFeesModal=__webpack_require__("./src/components/accept-fees-modal/AcceptFeesModal.tsx"),useLoans=__webpack_require__("./src/core/utils/useLoans.tsx");const dashboard_notification_list=({pageSize,columns})=>{const t=(0,utils_text.X)(),u=(0,url.J_)(),physicalLoansUrl=u("physicalLoansUrl"),reservationsUrl=u("reservationsUrl"),{all:{reservations,readyToLoan:reservationsReadyToLoan,queued:reservationsQueued}}=(0,useReservations.Z)(),{all:{loans,overdue:loansOverdue,soonOverdue:loansSoonOverdue,farFromOverdue:loansFarFromOverdue}}=(0,useLoans.Z)(),[accepted,setAccepted]=(0,react.useState)(!1),[reservationsForDeleting,setReservationsForDeleting]=(0,react.useState)([]),[loansToDisplay,setLoansToDisplay]=(0,react.useState)(null),[modalHeader,setModalHeader]=(0,react.useState)(""),{open}=(0,modal.f)(),{acceptModal,dueDateModal,deleteReservations}=(0,modal_helpers.GM)(),[dueDate,setDueDate]=(0,react.useState)(null),[modalLoan,setModalLoan]=(0,react.useState)(null),[reservationForModal,setReservationForModal]=(0,react.useState)(null),[reservationModalId,setReservationModalId]=(0,react.useState)(""),openModalHandler=(0,react.useCallback)((modalId=>{setReservationModalId(modalId),open(modalId)}),[open]),{reservationsReady:reservationsReadyID,reservationsQueued:reservationsQueueID}=(0,modal_helpers.GM)(),openLoanDetailsModal=(0,react.useCallback)((loan=>{setModalLoan(loan),open((0,material_details_modal.ae)(loan))}),[open]),openReservationDetailsModal=(0,react.useCallback)((reservation=>{setReservationForModal(reservation),open((0,material_details_modal.Wu)(reservation))}),[open]),openReservationDeleteModal=(0,react.useCallback)((()=>{reservationForModal&&open((0,delete_reservation_modal._)(reservationForModal))}),[open,reservationForModal]),openDueDateModal=(0,react.useCallback)((dueDateInput=>{switch(setDueDate(dueDateInput),dueDateInput){case yesterday:setLoansToDisplay(loansOverdue),setModalHeader(t("loansOverdueText"));break;case soon:setLoansToDisplay(loansSoonOverdue),setModalHeader(t("loansSoonOverdueText"));break;case longer:setLoansToDisplay(loansFarFromOverdue),setModalHeader(t("loansNotOverdueText"));break;default:throw new Error("Invalid due date input")}open((0,modal_helpers.V$)(dueDateModal,[dueDateInput]))}),[dueDateModal,open,loansFarFromOverdue,loansOverdue,loansSoonOverdue,t]),dashboardNotificationsLoan=[{listLength:loansOverdue.length,badge:t("materialDetailsOverdueText"),header:t("loansOverdueText"),color:"danger",dataCy:"physical-loans-overdue",showNotificationDot:!0,notificationClickEvent:()=>1===loansOverdue.length?openLoanDetailsModal(loansOverdue[0]):openDueDateModal(yesterday)},{listLength:loansSoonOverdue.length,badge:t("statusBadgeWarningText"),header:t("loansSoonOverdueText"),color:"warning",dataCy:"physical-loans-soon-overdue",showNotificationDot:!0,notificationClickEvent:()=>1===loansSoonOverdue.length?openLoanDetailsModal(loansSoonOverdue[0]):openDueDateModal(soon)},{listLength:loansFarFromOverdue.length,header:t("loansNotOverdueText"),dataCy:"loans-not-overdue",color:"neutral",showNotificationDot:!1,notificationClickEvent:()=>1===loansFarFromOverdue.length?openLoanDetailsModal(loansFarFromOverdue[0]):openDueDateModal(longer)}],openAcceptModal=(0,react.useCallback)((()=>{open(`${acceptModal}`)}),[acceptModal,open]),dashboardNotificationsReservations=[{listLength:reservationsReadyToLoan.length,header:t("reservationsReadyText"),badge:t("readyForLoanText"),dataCy:"reservations-ready",showNotificationDot:!0,color:"info",notificationClickEvent:()=>1===reservationsReadyToLoan.length?openReservationDetailsModal(reservationsReadyToLoan[0]):openModalHandler(reservationsReadyID)},{listLength:reservationsQueued.length,header:t("reservationsStillInQueueForText"),dataCy:"reservations-queued",color:"neutral",showNotificationDot:!1,notificationClickEvent:()=>1===reservationsQueued.length?openReservationDetailsModal(reservationsQueued[0]):openModalHandler(reservationsQueueID)}];return react.createElement(react.Fragment,null,react.createElement("div",{className:"status-userprofile"},columns&&react.createElement(react.Fragment,null,react.createElement(dashboard_notification_list_NotificationColumn,{materials:dashboardNotificationsLoan,materialsCount:loans.length,headerUrl:physicalLoansUrl,header:t("physicalLoansText"),emptyListText:t("noPhysicalLoansText")}),react.createElement(dashboard_notification_list_NotificationColumn,{materials:dashboardNotificationsReservations,materialsCount:reservations.length,headerUrl:reservationsUrl,header:t("reservationsText"),emptyListText:t("noReservationsText")}))),!columns&&react.createElement(dashboard_notification_list_Notifications,{showOnlyNotifications:!0,materials:[...dashboardNotificationsLoan,...dashboardNotificationsReservations]}),modalLoan&&react.createElement(material_details_modal.ZP,{modalId:(0,material_details_modal.ae)(modalLoan)},react.createElement(material_details.Z,{item:modalLoan,loan:modalLoan,modalId:(0,material_details_modal.ae)(modalLoan)})),dueDate&&loans&&loansToDisplay&&react.createElement(LoansGroupModal.Z,{accepted,resetAccepted:()=>{setAccepted(!1)},openAcceptModal,pageSize,openDetailsModal:openLoanDetailsModal,dueDate,loansModal:loansToDisplay},react.createElement(SimpleModalHeader.Z,{header:modalHeader})),reservations&&react.createElement(modal_ReservationsGroupModal,{openDetailsModal:openReservationDetailsModal,modalId:reservationModalId,setReservationsToDelete:resForDeleting=>{setReservationsForDeleting(resForDeleting),open(deleteReservations)},pageSize}),reservationForModal&&react.createElement(delete_reservation_modal.Z,{modalId:(0,delete_reservation_modal._)(reservationForModal),reservations:[reservationForModal]}),reservationsForDeleting&&react.createElement(delete_reservation_modal.Z,{modalId:`${deleteReservations}`,reservations:reservationsForDeleting}),reservationForModal&&react.createElement(material_details_modal.ZP,{modalId:(0,material_details_modal.Wu)(reservationForModal)},react.createElement(reservation_details.Z,{openReservationDeleteModal,item:reservationForModal,reservation:reservationForModal})),react.createElement(AcceptFeesModal.Z,{accept:()=>setAccepted(!0)}))};try{dashboardnotificationlist.displayName="dashboardnotificationlist",dashboardnotificationlist.__docgenInfo={description:"",displayName:"dashboardnotificationlist",props:{pageSize:{defaultValue:null,description:"",name:"pageSize",required:!0,type:{name:"number"}},columns:{defaultValue:null,description:"",name:"columns",required:!0,type:{name:"boolean"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/dashboard/dashboard-notification-list/dashboard-notification-list.tsx#dashboardnotificationlist"]={docgenInfo:dashboardnotificationlist.__docgenInfo,name:"dashboardnotificationlist",path:"src/apps/dashboard/dashboard-notification-list/dashboard-notification-list.tsx#dashboardnotificationlist"})}catch(__react_docgen_typescript_loader_error){}},"./src/apps/dashboard/dashboard.dev.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{DashboardEntry:()=>dashboard_dev_DashboardEntry,default:()=>dashboard_dev});var react=__webpack_require__("./node_modules/react/index.js"),serviceUrlArgs=__webpack_require__("./src/core/storybook/serviceUrlArgs.ts"),config=__webpack_require__("./src/core/utils/config.tsx"),general=__webpack_require__("./src/core/utils/helpers/general.ts"),utils_text=__webpack_require__("./src/core/utils/text.tsx"),url=__webpack_require__("./src/core/utils/url.tsx"),fbs=__webpack_require__("./src/core/fbs/fbs.ts"),Link=__webpack_require__("./src/components/atoms/links/Link.tsx"),warning_bar=__webpack_require__("./src/apps/loan-list/materials/utils/warning-bar.tsx");const dashboard_fees=()=>{const t=(0,utils_text.X)(),feesPageUrl=(0,url.J_)()("feesPageUrl"),{data:fbsFees}=(0,fbs.CI)(),[feeCount,setFeeCount]=(0,react.useState)(),[totalFeeAmount,setTotalFeeAmount]=(0,react.useState)("0");return(0,react.useEffect)((()=>{fbsFees&&(setFeeCount(fbsFees.length),setTotalFeeAmount((0,general.e8)(fbsFees)))}),[fbsFees,feeCount,totalFeeAmount]),react.createElement("div",{className:"fee-container"},fbsFees&&!!feeCount&&react.createElement("div",null,react.createElement("div",{className:"status-userprofile__column my-16"},react.createElement("div",{className:"link-filters"},react.createElement("div",{className:"link-filters__tag-wrapper"},react.createElement("h2",{"data-cy":"dashboard-fees-header"},react.createElement(Link.Z,{href:feesPageUrl,className:"link-tag link-tag link-filters__tag"},t("feesText")),react.createElement("span",{className:"link-filters__counter"},feeCount)))),react.createElement(warning_bar.Z,{rightText:t("totalAmountFeeText",{placeholders:{"@total":totalFeeAmount}}),overdueText:t("totalOwedText"),rightButtonText:t("dashboardSeeMoreFeesText"),rightButtonAriaLabelText:t("dashboardSeeMoreFeesAriaLabelText"),rightLink:feesPageUrl}))))};try{dashboardfees.displayName="dashboardfees",dashboardfees.__docgenInfo={description:"",displayName:"dashboardfees",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/dashboard/dashboard-fees/dashboard-fees.tsx#dashboardfees"]={docgenInfo:dashboardfees.__docgenInfo,name:"dashboardfees",path:"src/apps/dashboard/dashboard-fees/dashboard-fees.tsx#dashboardfees"})}catch(__react_docgen_typescript_loader_error){}var dashboard_notification_list=__webpack_require__("./src/apps/dashboard/dashboard-notification-list/dashboard-notification-list.tsx");const dashboard_dashboard=({pageSize})=>{const t=(0,utils_text.X)();return react.createElement("div",{className:"dashboard-page"},react.createElement("h1",{className:"text-header-h1 my-32","data-cy":"dashboard-header"},t("yourProfileText")),react.createElement(dashboard_fees,null),react.createElement(dashboard_notification_list.Z,{columns:!0,pageSize}))};try{dashboard.displayName="dashboard",dashboard.__docgenInfo={description:"",displayName:"dashboard",props:{pageSize:{defaultValue:null,description:"",name:"pageSize",required:!0,type:{name:"number"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/dashboard/dashboard.tsx#dashboard"]={docgenInfo:dashboard.__docgenInfo,name:"dashboard",path:"src/apps/dashboard/dashboard.tsx#dashboard"})}catch(__react_docgen_typescript_loader_error){}const dashboard_entry=(0,config.Rh)((0,url.XL)((0,utils_text.z)((({pageSizeDesktop,pageSizeMobile})=>{const pageSize=(0,general.Rh)({desktop:pageSizeDesktop,mobile:pageSizeMobile},"pageSizeLoanList");return react.createElement(dashboard_dashboard,{pageSize})}))));try{dashboardentry.displayName="dashboardentry",dashboardentry.__docgenInfo={description:"",displayName:"dashboardentry",props:{loansOverdueUrl:{defaultValue:null,description:"",name:"loansOverdueUrl",required:!0,type:{name:"string"}},physicalLoansUrl:{defaultValue:null,description:"",name:"physicalLoansUrl",required:!0,type:{name:"string"}},feesPageUrl:{defaultValue:null,description:"",name:"feesPageUrl",required:!0,type:{name:"string"}},reservationsUrl:{defaultValue:null,description:"",name:"reservationsUrl",required:!0,type:{name:"string"}},ereolenHomepageUrl:{defaultValue:null,description:"",name:"ereolenHomepageUrl",required:!0,type:{name:"string"}},blacklistedPickupBranchesConfig:{defaultValue:null,description:"",name:"blacklistedPickupBranchesConfig",required:!0,type:{name:"string"}},branchesConfig:{defaultValue:null,description:"",name:"branchesConfig",required:!0,type:{name:"string"}},expirationWarningDaysBeforeConfig:{defaultValue:null,description:"",name:"expirationWarningDaysBeforeConfig",required:!0,type:{name:"string"}},dashboardNumberInLineText:{defaultValue:null,description:"",name:"dashboardNumberInLineText",required:!0,type:{name:"string"}},deleteReservationModalButtonText:{defaultValue:null,description:"",name:"deleteReservationModalButtonText",required:!0,type:{name:"string"}},deleteReservationModalDeleteButtonText:{defaultValue:null,description:"",name:"deleteReservationModalDeleteButtonText",required:!0,type:{name:"string"}},deleteReservationModalDeleteProcessingText:{defaultValue:null,description:"",name:"deleteReservationModalDeleteProcessingText",required:!0,type:{name:"string"}},deleteReservationModalErrorsStatusText:{defaultValue:null,description:"",name:"deleteReservationModalErrorsStatusText",required:!0,type:{name:"string"}},deleteReservationModalErrorsTitleText:{defaultValue:null,description:"",name:"deleteReservationModalErrorsTitleText",required:!0,type:{name:"string"}},deleteReservationModalSuccessStatusText:{defaultValue:null,description:"",name:"deleteReservationModalSuccessStatusText",required:!0,type:{name:"string"}},deleteReservationModalSuccessTitleText:{defaultValue:null,description:"",name:"deleteReservationModalSuccessTitleText",required:!0,type:{name:"string"}},etAlText:{defaultValue:null,description:"",name:"etAlText",required:!0,type:{name:"string"}},feesText:{defaultValue:null,description:"",name:"feesText",required:!0,type:{name:"string"}},loanListMaterialDaysText:{defaultValue:null,description:"",name:"loanListMaterialDaysText",required:!0,type:{name:"string"}},loansNotOverdueText:{defaultValue:null,description:"",name:"loansNotOverdueText",required:!0,type:{name:"string"}},loansOverdueText:{defaultValue:null,description:"",name:"loansOverdueText",required:!0,type:{name:"string"}},loansSoonOverdueText:{defaultValue:null,description:"",name:"loansSoonOverdueText",required:!0,type:{name:"string"}},materialAndAuthorText:{defaultValue:null,description:"",name:"materialAndAuthorText",required:!0,type:{name:"string"}},materialByAuthorText:{defaultValue:null,description:"",name:"materialByAuthorText",required:!0,type:{name:"string"}},noPhysicalLoansText:{defaultValue:null,description:"",name:"noPhysicalLoansText",required:!0,type:{name:"string"}},noReservationsText:{defaultValue:null,description:"",name:"noReservationsText",required:!0,type:{name:"string"}},dashboardSeeMoreFeesText:{defaultValue:null,description:"",name:"dashboardSeeMoreFeesText",required:!0,type:{name:"string"}},dashboardSeeMoreFeesAriaLabelText:{defaultValue:null,description:"",name:"dashboardSeeMoreFeesAriaLabelText",required:!0,type:{name:"string"}},physicalLoansText:{defaultValue:null,description:"",name:"physicalLoansText",required:!0,type:{name:"string"}},publizonAudioBookText:{defaultValue:null,description:"",name:"publizonAudioBookText",required:!0,type:{name:"string"}},publizonEbookText:{defaultValue:null,description:"",name:"publizonEbookText",required:!0,type:{name:"string"}},publizonPodcastText:{defaultValue:null,description:"",name:"publizonPodcastText",required:!0,type:{name:"string"}},queuedReservationsText:{defaultValue:null,description:"",name:"queuedReservationsText",required:!0,type:{name:"string"}},readyForLoanText:{defaultValue:null,description:"",name:"readyForLoanText",required:!0,type:{name:"string"}},reservationDetailsOthersInQueueText:{defaultValue:null,description:"",name:"reservationDetailsOthersInQueueText",required:!0,type:{name:"string"}},reservationsReadyText:{defaultValue:null,description:"",name:"reservationsReadyText",required:!0,type:{name:"string"}},reservationsStillInQueueForText:{defaultValue:null,description:"",name:"reservationsStillInQueueForText",required:!0,type:{name:"string"}},reservationsText:{defaultValue:null,description:"",name:"reservationsText",required:!0,type:{name:"string"}},resultPagerStatusText:{defaultValue:null,description:"",name:"resultPagerStatusText",required:!0,type:{name:"string"}},statusBadgeWarningText:{defaultValue:null,description:"",name:"statusBadgeWarningText",required:!0,type:{name:"string"}},totalAmountFeeText:{defaultValue:null,description:"",name:"totalAmountFeeText",required:!0,type:{name:"string"}},totalOwedText:{defaultValue:null,description:"",name:"totalOwedText",required:!0,type:{name:"string"}},yourProfileText:{defaultValue:null,description:"",name:"yourProfileText",required:!0,type:{name:"string"}},pageSizeMobile:{defaultValue:null,description:"",name:"pageSizeMobile",required:!0,type:{name:"number"}},pageSizeDesktop:{defaultValue:null,description:"",name:"pageSizeDesktop",required:!0,type:{name:"number"}},groupModalDueDateLinkToPageWithFeesText:{defaultValue:null,description:"",name:"groupModalDueDateLinkToPageWithFeesText",required:!0,type:{name:"string"}},showMoreText:{defaultValue:null,description:"",name:"showMoreText",required:!0,type:{name:"string"}},groupModalDueDateMaterialText:{defaultValue:null,description:"",name:"groupModalDueDateMaterialText",required:!0,type:{name:"string"}},groupModalGoToMaterialText:{defaultValue:null,description:"",name:"groupModalGoToMaterialText",required:!0,type:{name:"string"}},groupModalDueDateHeaderText:{defaultValue:null,description:"",name:"groupModalDueDateHeaderText",required:!0,type:{name:"string"}},groupModalReturnLibraryText:{defaultValue:null,description:"",name:"groupModalReturnLibraryText",required:!0,type:{name:"string"}},groupModalCheckboxText:{defaultValue:null,description:"",name:"groupModalCheckboxText",required:!0,type:{name:"string"}},groupModalHiddenLabelCheckboxOnMaterialText:{defaultValue:null,description:"",name:"groupModalHiddenLabelCheckboxOnMaterialText",required:!0,type:{name:"string"}},groupModalButtonText:{defaultValue:null,description:"",name:"groupModalButtonText",required:!0,type:{name:"string"}},groupModalDueDateWarningLoanOverdueText:{defaultValue:null,description:"",name:"groupModalDueDateWarningLoanOverdueText",required:!0,type:{name:"string"}},groupModalLoansAriaDescriptionText:{defaultValue:null,description:"",name:"groupModalLoansAriaDescriptionText",required:!0,type:{name:"string"}},groupModalLoansCloseModalAriaLabelText:{defaultValue:null,description:"",name:"groupModalLoansCloseModalAriaLabelText",required:!0,type:{name:"string"}},groupModalRenewLoanDeniedInterLibraryLoanText:{defaultValue:null,description:"",name:"groupModalRenewLoanDeniedInterLibraryLoanText",required:!0,type:{name:"string"}},groupModalRenewLoanDeniedMaxRenewalsReachedText:{defaultValue:null,description:"",name:"groupModalRenewLoanDeniedMaxRenewalsReachedText",required:!0,type:{name:"string"}},groupModalRenewLoanDeniedReservedText:{defaultValue:null,description:"",name:"groupModalRenewLoanDeniedReservedText",required:!0,type:{name:"string"}},deleteReservationModalHeaderText:{defaultValue:null,description:"",name:"deleteReservationModalHeaderText",required:!0,type:{name:"string"}},deleteReservationModalDeleteQuestionText:{defaultValue:null,description:"",name:"deleteReservationModalDeleteQuestionText",required:!0,type:{name:"string"}},deleteReservationModalNotRegrettableText:{defaultValue:null,description:"",name:"deleteReservationModalNotRegrettableText",required:!0,type:{name:"string"}},deleteReservationModalCloseModalText:{defaultValue:null,description:"",name:"deleteReservationModalCloseModalText",required:!0,type:{name:"string"}},deleteReservationModalAriaDescriptionText:{defaultValue:null,description:"",name:"deleteReservationModalAriaDescriptionText",required:!0,type:{name:"string"}},acceptModalHeaderText:{defaultValue:null,description:"",name:"acceptModalHeaderText",required:!0,type:{name:"string"}},acceptModalAreYouSureText:{defaultValue:null,description:"",name:"acceptModalAreYouSureText",required:!0,type:{name:"string"}},acceptModalBodyText:{defaultValue:null,description:"",name:"acceptModalBodyText",required:!0,type:{name:"string"}},acceptModalCancelButtonText:{defaultValue:null,description:"",name:"acceptModalCancelButtonText",required:!0,type:{name:"string"}},acceptModalAcceptButtonText:{defaultValue:null,description:"",name:"acceptModalAcceptButtonText",required:!0,type:{name:"string"}},acceptModalAriaDescriptionText:{defaultValue:null,description:"",name:"acceptModalAriaDescriptionText",required:!0,type:{name:"string"}},acceptModalAriaLabelText:{defaultValue:null,description:"",name:"acceptModalAriaLabelText",required:!0,type:{name:"string"}},groupModalReservationsCloseModalAriaLabelText:{defaultValue:null,description:"",name:"groupModalReservationsCloseModalAriaLabelText",required:!0,type:{name:"string"}},groupModalReservationsLoansAriaDescriptionText:{defaultValue:null,description:"",name:"groupModalReservationsLoansAriaDescriptionText",required:!0,type:{name:"string"}},readyForLoanCounterLabelText:{defaultValue:null,description:"",name:"readyForLoanCounterLabelText",required:!0,type:{name:"string"}},removeAllReservationsText:{defaultValue:null,description:"",name:"removeAllReservationsText",required:!0,type:{name:"string"}},pickUpLatestText:{defaultValue:null,description:"",name:"pickUpLatestText",required:!0,type:{name:"string"}},reservationsReadyForPickupText:{defaultValue:null,description:"",name:"reservationsReadyForPickupText",required:!0,type:{name:"string"}},physicalReservationsHeaderText:{defaultValue:null,description:"",name:"physicalReservationsHeaderText",required:!0,type:{name:"string"}},digitalReservationsHeaderText:{defaultValue:null,description:"",name:"digitalReservationsHeaderText",required:!0,type:{name:"string"}},renewGroupModalLoansButtonText:{defaultValue:null,description:"",name:"renewGroupModalLoansButtonText",required:!0,type:{name:"string"}},renewGroupModalLoansErrorStatusText:{defaultValue:null,description:"",name:"renewGroupModalLoansErrorStatusText",required:!0,type:{name:"string"}},renewGroupModalLoansErrorTitleText:{defaultValue:null,description:"",name:"renewGroupModalLoansErrorTitleText",required:!0,type:{name:"string"}},renewGroupModalLoansNoRenewalsPossibleErrorStatusText:{defaultValue:null,description:"",name:"renewGroupModalLoansNoRenewalsPossibleErrorStatusText",required:!0,type:{name:"string"}},renewGroupModalLoansNoRenewalsPossibleErrorTitleText:{defaultValue:null,description:"",name:"renewGroupModalLoansNoRenewalsPossibleErrorTitleText",required:!0,type:{name:"string"}},renewGroupModalLoansSuccessStatusText:{defaultValue:null,description:"",name:"renewGroupModalLoansSuccessStatusText",required:!0,type:{name:"string"}},renewGroupModalLoansSuccessTitleText:{defaultValue:null,description:"",name:"renewGroupModalLoansSuccessTitleText",required:!0,type:{name:"string"}},renewMaterialLoanButtonText:{defaultValue:null,description:"",name:"renewMaterialLoanButtonText",required:!0,type:{name:"string"}},renewMaterialLoanErrorStatusText:{defaultValue:null,description:"",name:"renewMaterialLoanErrorStatusText",required:!0,type:{name:"string"}},renewMaterialLoanErrorTitleText:{defaultValue:null,description:"",name:"renewMaterialLoanErrorTitleText",required:!0,type:{name:"string"}},renewMaterialLoanNoRenewalsPossibleErrorStatusText:{defaultValue:null,description:"",name:"renewMaterialLoanNoRenewalsPossibleErrorStatusText",required:!0,type:{name:"string"}},renewMaterialLoanNoRenewalsPossibleErrorTitleText:{defaultValue:null,description:"",name:"renewMaterialLoanNoRenewalsPossibleErrorTitleText",required:!0,type:{name:"string"}},renewMaterialLoanSuccessStatusText:{defaultValue:null,description:"",name:"renewMaterialLoanSuccessStatusText",required:!0,type:{name:"string"}},renewMaterialLoanSuccessTitleText:{defaultValue:null,description:"",name:"renewMaterialLoanSuccessTitleText",required:!0,type:{name:"string"}},renewProcessingText:{defaultValue:null,description:"",name:"renewProcessingText",required:!0,type:{name:"string"}},reservationDetailsRemoveDigitalReservationText:{defaultValue:null,description:"",name:"reservationDetailsRemoveDigitalReservationText",required:!0,type:{name:"string"}},reservationDetailsDateOfReservationTitleText:{defaultValue:null,description:"",name:"reservationDetailsDateOfReservationTitleText",required:!0,type:{name:"string"}},reservationDetailsNumberInQueueLabelText:{defaultValue:null,description:"",name:"reservationDetailsNumberInQueueLabelText",required:!0,type:{name:"string"}},reservationDetailsNoInterestAfterTitleText:{defaultValue:null,description:"",name:"reservationDetailsNoInterestAfterTitleText",required:!0,type:{name:"string"}},reservationDetailsChangeText:{defaultValue:null,description:"",name:"reservationDetailsChangeText",required:!0,type:{name:"string"}},reservationDetailsPickUpAtTitleText:{defaultValue:null,description:"",name:"reservationDetailsPickUpAtTitleText",required:!0,type:{name:"string"}},reservationDetailsButtonRemoveText:{defaultValue:null,description:"",name:"reservationDetailsButtonRemoveText",required:!0,type:{name:"string"}},reservationDetailsStatusTitleText:{defaultValue:null,description:"",name:"reservationDetailsStatusTitleText",required:!0,type:{name:"string"}},reservationDetailsBorrowBeforeText:{defaultValue:null,description:"",name:"reservationDetailsBorrowBeforeText",required:!0,type:{name:"string"}},reservationDetailsDigitalReservationGoToEreolenText:{defaultValue:null,description:"",name:"reservationDetailsDigitalReservationGoToEreolenText",required:!0,type:{name:"string"}},reservationDetailsReadyForLoanText:{defaultValue:null,description:"",name:"reservationDetailsReadyForLoanText",required:!0,type:{name:"string"}},reservationDetailsPickupDeadlineTitleText:{defaultValue:null,description:"",name:"reservationDetailsPickupDeadlineTitleText",required:!0,type:{name:"string"}},interestPeriodsConfig:{defaultValue:null,description:"",name:"interestPeriodsConfig",required:!0,type:{name:"string"}},reservationDetailsConfig:{defaultValue:null,description:"",name:"reservationDetailsConfig",required:!0,type:{name:"string"}},shiftText:{defaultValue:null,description:"",name:"shiftText",required:!0,type:{name:"string"}},modalReservationFormPickupHeaderTitleText:{defaultValue:null,description:"",name:"modalReservationFormPickupHeaderTitleText",required:!0,type:{name:"string"}},modalReservationFormPickupHeaderDescriptionText:{defaultValue:null,description:"",name:"modalReservationFormPickupHeaderDescriptionText",required:!0,type:{name:"string"}},saveButtonText:{defaultValue:null,description:"",name:"saveButtonText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterHeaderTitleText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterHeaderTitleText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterHeaderDescriptionText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterHeaderDescriptionText",required:!0,type:{name:"string"}},chooseOneText:{defaultValue:null,description:"",name:"chooseOneText",required:!0,type:{name:"string"}},loadingText:{defaultValue:null,description:"",name:"loadingText",required:!0,type:{name:"string"}},reservationSuccessTitleText:{defaultValue:null,description:"",name:"reservationSuccessTitleText",required:!0,type:{name:"string"}},reservationSuccessSubTitleText:{defaultValue:null,description:"",name:"reservationSuccessSubTitleText",required:!0,type:{name:"string"}},reservationerrorTitleText:{defaultValue:null,description:"",name:"reservationerrorTitleText",required:!0,type:{name:"string"}},reservationerrorSubTitleText:{defaultValue:null,description:"",name:"reservationerrorSubTitleText",required:!0,type:{name:"string"}},reservationStatusButtonText:{defaultValue:null,description:"",name:"reservationStatusButtonText",required:!0,type:{name:"string"}},materialDetailsWarningLoanOverdueText:{defaultValue:null,description:"",name:"materialDetailsWarningLoanOverdueText",required:!0,type:{name:"string"}},materialDetailsPhysicalDueDateLabelText:{defaultValue:null,description:"",name:"materialDetailsPhysicalDueDateLabelText",required:!0,type:{name:"string"}},materialDetailsLoanDateLabelText:{defaultValue:null,description:"",name:"materialDetailsLoanDateLabelText",required:!0,type:{name:"string"}},materialDetailsMaterialNumberLabelText:{defaultValue:null,description:"",name:"materialDetailsMaterialNumberLabelText",required:!0,type:{name:"string"}},materialDetailsCloseModalAriaLabelText:{defaultValue:null,description:"",name:"materialDetailsCloseModalAriaLabelText",required:!0,type:{name:"string"}},materialDetailsLinkToPageWithFeesText:{defaultValue:null,description:"",name:"materialDetailsLinkToPageWithFeesText",required:!0,type:{name:"string"}},materialDetailsOverdueText:{defaultValue:null,description:"",name:"materialDetailsOverdueText",required:!0,type:{name:"string"}},ereolenMyPageUrl:{defaultValue:null,description:"",name:"ereolenMyPageUrl",required:!0,type:{name:"string"}},materialDetailsModalAriaDescriptionText:{defaultValue:null,description:"",name:"materialDetailsModalAriaDescriptionText",required:!0,type:{name:"string"}},materialDetailsGoToEreolenText:{defaultValue:null,description:"",name:"materialDetailsGoToEreolenText",required:!0,type:{name:"string"}},materialDetailsDigitalDueDateLabelText:{defaultValue:null,description:"",name:"materialDetailsDigitalDueDateLabelText",required:!0,type:{name:"string"}},materialDetailsRenewLoanButtonText:{defaultValue:null,description:"",name:"materialDetailsRenewLoanButtonText",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/dashboard/dashboard.entry.tsx#dashboardentry"]={docgenInfo:dashboardentry.__docgenInfo,name:"dashboardentry",path:"src/apps/dashboard/dashboard.entry.tsx#dashboardentry"})}catch(__react_docgen_typescript_loader_error){}var groupModalArgs=__webpack_require__("./src/core/storybook/groupModalArgs.ts"),loanGroupModalArgs=__webpack_require__("./src/core/storybook/loanGroupModalArgs.ts"),renewalArgs=__webpack_require__("./src/core/storybook/renewalArgs.ts"),reservationGroupModalArgs=__webpack_require__("./src/core/storybook/reservationGroupModalArgs.ts"),reservationMaterialDetailsArgs=__webpack_require__("./src/core/storybook/reservationMaterialDetailsArgs.ts"),materialDetailsModalArgs=__webpack_require__("./src/core/storybook/materialDetailsModalArgs.ts"),deleteReservationModalArgs=__webpack_require__("./src/core/storybook/deleteReservationModalArgs.ts"),acceptFeesModalArgs=__webpack_require__("./src/core/storybook/acceptFeesModalArgs.ts"),reservationListArgs=__webpack_require__("./src/core/storybook/reservationListArgs.ts");const dashboard_dev={title:"Apps / Dashboard",argTypes:{...serviceUrlArgs.Z,...groupModalArgs.Z,...loanGroupModalArgs.Z,...renewalArgs.Z,...reservationGroupModalArgs.Z,...reservationMaterialDetailsArgs.Z,...acceptFeesModalArgs.Z,...materialDetailsModalArgs.Z,...deleteReservationModalArgs.Z,...reservationListArgs.Z,physicalLoansUrl:{defaultValue:"/user/me/loans",control:{type:"text"}},reservationsUrl:{defaultValue:"/user/me/reservations",control:{type:"text"}},ereolenHomepageUrl:{defaultValue:"https://ereolen.dk/",control:{type:"text"}},yourProfileText:{defaultValue:"Your profile",control:{type:"text"}},feesText:{defaultValue:"Fees",control:{type:"text"}},totalOwedText:{defaultValue:"You owe in total",control:{type:"text"}},dashboardSeeMoreFeesText:{defaultValue:"See more",control:{type:"text"}},dashboardSeeMoreFeesAriaLabelText:{defaultValue:"See your fees and how to pay",control:{type:"text"}},totalAmountFeeText:{defaultValue:"@total,-",control:{type:"text"}},physicalLoansText:{defaultValue:"Loans",control:{type:"text"}},loansOverdueText:{defaultValue:"Returned too late",control:{type:"text"}},loansSoonOverdueText:{defaultValue:"To be returned soon",control:{type:"text"}},loansNotOverdueText:{defaultValue:"Longer return time",control:{type:"text"}},reservationsText:{defaultValue:"Reservations",control:{type:"text"}},queuedReservationsText:{defaultValue:"Queued reservations",control:{type:"text"}},reservationsReadyText:{defaultValue:"Ready for you",control:{type:"text"}},reservationsStillInQueueForText:{defaultValue:"Still in queue",control:{type:"text"}},noPhysicalLoansText:{defaultValue:"At the moment, you have 0 physical loans",control:{type:"text"}},noReservationsText:{defaultValue:"At the moment, you have 0 reservations",control:{type:"text"}},statusBadgeWarningText:{control:{type:"text"},defaultValue:"Expires soon"},readyForLoanText:{defaultValue:"Ready for pickup",control:{type:"text"}},publizonAudioBookText:{control:{type:"text"},defaultValue:"Audiobook"},publizonEbookText:{control:{type:"text"},defaultValue:"E-book"},publizonPodcastText:{control:{type:"text"},defaultValue:"Podcast"},dashboardNumberInLineText:{control:{type:"text"},defaultValue:"Number @count in line"},reservationDetailsOthersInQueueText:{defaultValue:"Others are queueing for this material",control:{type:"text"}},loanListMaterialDaysText:{control:{type:"text"},defaultValue:"days"},etAlText:{control:{type:"text"},defaultValue:"et al."},materialByAuthorText:{defaultValue:"By",control:{type:"text"}},materialAndAuthorText:{defaultValue:"and",control:{type:"text"}},reservationListLoanBeforeText:{defaultValue:"Borrow before @date",control:{type:"text"}},expirationWarningDaysBeforeConfig:{defaultValue:"6",control:{type:"text"}}},component:dashboard_entry},dashboard_dev_DashboardEntry=(props=>react.createElement(dashboard_entry,props)).bind({});dashboard_dev_DashboardEntry.args={}},"./src/apps/demo-modal/demo-modal.dev.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{App:()=>App,default:()=>demo_modal_dev});var react=__webpack_require__("./node_modules/react/index.js"),esm=__webpack_require__("./node_modules/@storybook/addon-queryparams/dist/esm/index.js"),utils_text=__webpack_require__("./src/core/utils/text.tsx"),modal=__webpack_require__("./src/core/utils/modal.tsx");const demo_modal=(0,utils_text.z)((()=>{const{open}=(0,modal.f)(),t=(0,utils_text.X)(),modalIdOne="demo-modal-one",modalIdTwo="demo-modal-two",onClick=modalId=>()=>{open(modalId)};return react.createElement(react.Fragment,null,react.createElement(modal.Z,{modalId:modalIdTwo,screenReaderModalDescriptionText:t("screenReaderModalDescriptionText"),closeModalAriaLabelText:t("ariaLabelModalTwoText")},react.createElement("h1",{id:`${modalIdTwo}-header`},modalIdTwo)),react.createElement(modal.Z,{modalId:modalIdOne,screenReaderModalDescriptionText:t("screenReaderModalDescriptionText"),closeModalAriaLabelText:t("ariaLabelModalOneText")},react.createElement("h1",{id:`${modalIdOne}-header`},modalIdOne),react.createElement("button",{type:"button",id:`${modalIdTwo}-button`,onClick:onClick(modalIdTwo)},"Show Modal 2")),react.createElement("button",{type:"button",id:`${modalIdOne}-button`,onClick:onClick(modalIdOne)},"Show Modal 1"))}));try{demomodal.displayName="demomodal",demomodal.__docgenInfo={description:"",displayName:"demomodal",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/demo-modal/demo-modal.tsx#demomodal"]={docgenInfo:demomodal.__docgenInfo,name:"demomodal",path:"src/apps/demo-modal/demo-modal.tsx#demomodal"})}catch(__react_docgen_typescript_loader_error){}const demo_modal_entry=(0,utils_text.z)((props=>react.createElement(demo_modal,null)));try{demomodalentry.displayName="demomodalentry",demomodalentry.__docgenInfo={description:"",displayName:"demomodalentry",props:{ariaLabelModalOneText:{defaultValue:null,description:"",name:"ariaLabelModalOneText",required:!0,type:{name:"string"}},ariaLabelModalTwoText:{defaultValue:null,description:"",name:"ariaLabelModalTwoText",required:!0,type:{name:"string"}},screenReaderModalDescriptionText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionText",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/demo-modal/demo-modal.entry.tsx#demomodalentry"]={docgenInfo:demomodalentry.__docgenInfo,name:"demomodalentry",path:"src/apps/demo-modal/demo-modal.entry.tsx#demomodalentry"})}catch(__react_docgen_typescript_loader_error){}const demo_modal_dev={title:"Apps / Demo modal",component:demo_modal_entry,decorators:[esm.j],parameters:{query:{modal:"demo-modal-one"}},argTypes:{ariaLabelModalOneText:{defaultValue:"Luk dialog et"},ariaLabelModalTwoText:{defaultValue:"Luk dialog to"},screenReaderModalDescriptionText:{defaultValue:"Denne modal dækker sidens indhold, og er en demo"}}},App=props=>react.createElement(demo_modal_entry,props)},"./src/apps/favorites-list-material-component/FavoritesListMaterialComponent.dev.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{FavoritesListMaterialComponentEntry:()=>FavoritesListMaterialComponentEntry,default:()=>FavoritesListMaterialComponent_dev});var react=__webpack_require__("./node_modules/react/index.js"),esm=__webpack_require__("./node_modules/@storybook/addon-queryparams/dist/esm/index.js"),serviceUrlArgs=__webpack_require__("./src/core/storybook/serviceUrlArgs.ts"),utils_text=__webpack_require__("./src/core/utils/text.tsx"),material_list=__webpack_require__("./src/core/material-list-api/material-list.ts"),graphql=__webpack_require__("./src/core/dbc-gateway/generated/graphql.tsx"),SimpleMaterial=__webpack_require__("./src/components/simple-material/SimpleMaterial.tsx");const SimpleMaterialAdapter=({pid,app,bright})=>{var _data$work;const{data}=(0,graphql.Qk)({id:pid});return react.createElement("div",null,data&&data.work&&react.createElement(SimpleMaterial.Z,{key:null===(_data$work=data.work)||void 0===_data$work?void 0:_data$work.workId,work:data.work,app,bright}))},simple_material_SimpleMaterialAdapter=SimpleMaterialAdapter;try{SimpleMaterialAdapter.displayName="SimpleMaterialAdapter",SimpleMaterialAdapter.__docgenInfo={description:"",displayName:"SimpleMaterialAdapter",props:{pid:{defaultValue:null,description:"",name:"pid",required:!0,type:{name:"`${number}-${string}:${number}`"}},app:{defaultValue:null,description:"",name:"app",required:!0,type:{name:"enum",value:[{value:'"material"'},{value:'"search-result"'},{value:'"advanced-search"'},{value:'"recommender"'},{value:'"something-similar"'},{value:'"favorites-list-mc"'},{value:'"inspiration-recommender"'}]}},bright:{defaultValue:null,description:"",name:"bright",required:!1,type:{name:"boolean | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/simple-material/SimpleMaterialAdapter.tsx#SimpleMaterialAdapter"]={docgenInfo:SimpleMaterialAdapter.__docgenInfo,name:"SimpleMaterialAdapter",path:"src/components/simple-material/SimpleMaterialAdapter.tsx#SimpleMaterialAdapter"})}catch(__react_docgen_typescript_loader_error){}var Link=__webpack_require__("./src/components/atoms/links/Link.tsx"),url=__webpack_require__("./src/core/utils/url.tsx");const FavoritesListMaterialComponent=()=>{const t=(0,utils_text.X)(),[materials,setMaterials]=(0,react.useState)([]),favoritesListMaterialComponentGoToListUrl=(0,url.J_)()("favoritesListMaterialComponentGoToListUrl"),{data}=(0,material_list.YV)("default"),{collections}=data||[];return(0,react.useEffect)((()=>{data&&data.collections&&setMaterials(collections.slice(0,4))}),[collections,data]),0===materials.length?null:react.createElement("div",{className:"recommender recommender--bright"},react.createElement("h2",{className:"recommender__left-title text-header-h1"},t("favoritesListMaterialComponentTitleText")),react.createElement("div",{className:"recommender__buttons"},react.createElement(Link.Z,{href:favoritesListMaterialComponentGoToListUrl,className:"button-link button-link--bright button-link--selected"},t("favoritesListMaterialComponentGoToListText"))),react.createElement("ul",{className:"recommender__grid"},materials.map((pid=>react.createElement(simple_material_SimpleMaterialAdapter,{app:"favorites-list-mc",bright:!0,pid})))))},favorites_list_material_component_FavoritesListMaterialComponent=FavoritesListMaterialComponent;try{FavoritesListMaterialComponent.displayName="FavoritesListMaterialComponent",FavoritesListMaterialComponent.__docgenInfo={description:"",displayName:"FavoritesListMaterialComponent",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/favorites-list-material-component/FavoritesListMaterialComponent.tsx#FavoritesListMaterialComponent"]={docgenInfo:FavoritesListMaterialComponent.__docgenInfo,name:"FavoritesListMaterialComponent",path:"src/apps/favorites-list-material-component/FavoritesListMaterialComponent.tsx#FavoritesListMaterialComponent"})}catch(__react_docgen_typescript_loader_error){}var config=__webpack_require__("./src/core/utils/config.tsx");const FavoritesListMaterialComponent_entry=(0,url.XL)((0,config.Rh)((0,utils_text.z)((()=>react.createElement(favorites_list_material_component_FavoritesListMaterialComponent,null)))));try{FavoritesListMaterialComponententry.displayName="FavoritesListMaterialComponententry",FavoritesListMaterialComponententry.__docgenInfo={description:"",displayName:"FavoritesListMaterialComponententry",props:{fbsBaseUrl:{defaultValue:null,description:"",name:"fbsBaseUrl",required:!0,type:{name:"string"}},publizonBaseUrl:{defaultValue:null,description:"",name:"publizonBaseUrl",required:!0,type:{name:"string"}},dplCmsBaseUrl:{defaultValue:null,description:"",name:"dplCmsBaseUrl",required:!0,type:{name:"string"}},coverBaseUrl:{defaultValue:null,description:"",name:"coverBaseUrl",required:!0,type:{name:"string"}},materialBaseUrl:{defaultValue:null,description:"",name:"materialBaseUrl",required:!0,type:{name:"string"}},fbiBaseUrl:{defaultValue:null,description:"",name:"fbiBaseUrl",required:!0,type:{name:"string"}},materialUrl:{defaultValue:null,description:"",name:"materialUrl",required:!0,type:{name:"string"}},favoritesListMaterialComponentTitleText:{defaultValue:null,description:"",name:"favoritesListMaterialComponentTitleText",required:!0,type:{name:"string"}},materialByAuthorText:{defaultValue:null,description:"",name:"materialByAuthorText",required:!0,type:{name:"string"}},materialAndAuthorText:{defaultValue:null,description:"",name:"materialAndAuthorText",required:!0,type:{name:"string"}},etAlText:{defaultValue:null,description:"",name:"etAlText",required:!0,type:{name:"string"}},favoritesListMaterialComponentGoToListText:{defaultValue:null,description:"",name:"favoritesListMaterialComponentGoToListText",required:!0,type:{name:"string"}},favoritesListMaterialComponentGoToListUrl:{defaultValue:null,description:"",name:"favoritesListMaterialComponentGoToListUrl",required:!0,type:{name:"string"}},addToFavoritesAriaLabelText:{defaultValue:null,description:"",name:"addToFavoritesAriaLabelText",required:!0,type:{name:"string"}},removeFromFavoritesAriaLabelText:{defaultValue:null,description:"",name:"removeFromFavoritesAriaLabelText",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/favorites-list-material-component/FavoritesListMaterialComponent.entry.tsx#FavoritesListMaterialComponententry"]={docgenInfo:FavoritesListMaterialComponententry.__docgenInfo,name:"FavoritesListMaterialComponententry",path:"src/apps/favorites-list-material-component/FavoritesListMaterialComponent.entry.tsx#FavoritesListMaterialComponententry"})}catch(__react_docgen_typescript_loader_error){}const FavoritesListMaterialComponent_dev={title:"Apps / Favorites list material component",component:FavoritesListMaterialComponent_entry,decorators:[esm.j],argTypes:{...serviceUrlArgs.Z,favoritesListMaterialComponentTitleText:{control:{type:"text"},defaultValue:"Your list"},materialUrl:{defaultValue:"/work/:workid",control:{type:"text"}},materialByAuthorText:{control:{type:"text"},defaultValue:"By"},materialAndAuthorText:{control:{type:"text"},defaultValue:"and"},etAlText:{control:{type:"text"},defaultValue:"et al."},favoritesListMaterialComponentGoToListText:{control:{type:"text"},defaultValue:"Go to My list"},favoritesListMaterialComponentGoToListUrl:{control:{type:"text"},defaultValue:"https://unsplash.com/photos/wd6YQy0PJt8"},addToFavoritesAriaLabelText:{control:{type:"text"},defaultValue:"Add @title to favorites list"},removeFromFavoritesAriaLabelText:{control:{type:"text"},defaultValue:"Remove @title from favorites list"}}},FavoritesListMaterialComponentEntry=(props=>react.createElement(FavoritesListMaterialComponent_entry,props)).bind({})},"./src/apps/favorites-list/FavoritesList.dev.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{FavoritesList:()=>FavoritesList_dev_FavoritesList,default:()=>FavoritesList_dev});var react=__webpack_require__("./node_modules/react/index.js"),esm=__webpack_require__("./node_modules/@storybook/addon-queryparams/dist/esm/index.js"),serviceUrlArgs=__webpack_require__("./src/core/storybook/serviceUrlArgs.ts"),config=__webpack_require__("./src/core/utils/config.tsx"),general=__webpack_require__("./src/core/utils/helpers/general.ts"),utils_text=__webpack_require__("./src/core/utils/text.tsx"),url=__webpack_require__("./src/core/utils/url.tsx"),empty_list=__webpack_require__("./src/components/empty-list/empty-list.tsx"),use_pager=__webpack_require__("./src/components/result-pager/use-pager.tsx"),material_list=__webpack_require__("./src/core/material-list-api/material-list.ts"),graphql=__webpack_require__("./src/core/dbc-gateway/generated/graphql.tsx"),card_list_item=__webpack_require__("./src/components/card-item-list/card-list-item/card-list-item.tsx");const card_list_item_adapter=({pid})=>{var _data$work;const{data}=(0,graphql.Qk)({id:pid});return react.createElement("div",null,data&&data.work&&react.createElement(card_list_item.Z,{key:null===(_data$work=data.work)||void 0===_data$work?void 0:_data$work.workId,item:data.work,coverTint:"100",resultNumber:0}))};try{cardlistitemadapter.displayName="cardlistitemadapter",cardlistitemadapter.__docgenInfo={description:"",displayName:"cardlistitemadapter",props:{pid:{defaultValue:null,description:"",name:"pid",required:!0,type:{name:"`${number}-${string}:${number}`"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/card-item-list/card-list-item/card-list-item-adapter.tsx#cardlistitemadapter"]={docgenInfo:cardlistitemadapter.__docgenInfo,name:"cardlistitemadapter",path:"src/components/card-item-list/card-list-item/card-list-item-adapter.tsx#cardlistitemadapter"})}catch(__react_docgen_typescript_loader_error){}var MaterialListItem=__webpack_require__("./src/components/card-item-list/MaterialListItem.tsx");const FavoritesList=({pageSize})=>{const t=(0,utils_text.X)(),{data}=(0,material_list.YV)("default"),[displayedMaterials,setDisplayedMaterials]=(0,react.useState)([]),[materials,setMaterials]=(0,react.useState)([]),{itemsShown,PagerComponent,page}=(0,use_pager.Z)({hitcount:materials.length,pageSize}),{collections}=data||[],lastItemRef=(0,react.useRef)(null);return(0,react.useEffect)((()=>{page>0&&lastItemRef.current&&lastItemRef.current.focus()}),[page,displayedMaterials]),(0,react.useEffect)((()=>setDisplayedMaterials([...materials].splice(0,itemsShown))),[itemsShown,materials]),(0,react.useEffect)((()=>{data&&data.collections&&setMaterials(collections)}),[collections,data]),react.createElement("div",{className:"card-list-page"},react.createElement("h1",{className:"text-header-h2 mb-16 search-result-title"},t("favoritesListHeaderText")),materials.length>0&&react.createElement("p",{className:"text-small-caption my-32"},t("favoritesListMaterialsText",{placeholders:{"@count":materials.length}})),displayedMaterials.length>0&&react.createElement("ul",{className:"card-list-page__list my-32"},displayedMaterials.map(((pid,i)=>{const isFirstNewItem=i===page*pageSize;return react.createElement(MaterialListItem.Z,{key:pid,ref:isFirstNewItem?lastItemRef:null},react.createElement(card_list_item_adapter,{key:pid,pid}))}))),0===displayedMaterials.length&&react.createElement(empty_list.Z,{classNames:"mt-24",emptyListText:t("favoritesListEmptyText")}),react.createElement(PagerComponent,null))},favorites_list_FavoritesList=FavoritesList;try{FavoritesList.displayName="FavoritesList",FavoritesList.__docgenInfo={description:"",displayName:"FavoritesList",props:{pageSize:{defaultValue:null,description:"",name:"pageSize",required:!0,type:{name:"number"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/favorites-list/FavoritesList.tsx#FavoritesList"]={docgenInfo:FavoritesList.__docgenInfo,name:"FavoritesList",path:"src/apps/favorites-list/FavoritesList.tsx#FavoritesList"})}catch(__react_docgen_typescript_loader_error){}const FavoritesList_entry=(0,config.Rh)((0,url.XL)((0,utils_text.z)((({pageSizeDesktop,pageSizeMobile})=>{const pageSize=(0,general.Rh)({desktop:pageSizeDesktop,mobile:pageSizeMobile});return react.createElement(favorites_list_FavoritesList,{pageSize})}))));try{FavoritesListentry.displayName="FavoritesListentry",FavoritesListentry.__docgenInfo={description:"",displayName:"FavoritesListentry",props:{pageSizeDesktop:{defaultValue:null,description:"",name:"pageSizeDesktop",required:!1,type:{name:"number | undefined"}},pageSizeMobile:{defaultValue:null,description:"",name:"pageSizeMobile",required:!1,type:{name:"number | undefined"}},blacklistedAvailabilityBranchesConfig:{defaultValue:null,description:"",name:"blacklistedAvailabilityBranchesConfig",required:!0,type:{name:"string"}},fbsBaseUrlConfig:{defaultValue:null,description:"",name:"fbsBaseUrlConfig",required:!0,type:{name:"string"}},availabilityAvailableText:{defaultValue:null,description:"",name:"availabilityAvailableText",required:!0,type:{name:"string"}},availabilityUnavailableText:{defaultValue:null,description:"",name:"availabilityUnavailableText",required:!0,type:{name:"string"}},favoritesListMaterialsText:{defaultValue:null,description:"",name:"favoritesListMaterialsText",required:!0,type:{name:"string"}},favoritesListHeaderText:{defaultValue:null,description:"",name:"favoritesListHeaderText",required:!0,type:{name:"string"}},byAuthorText:{defaultValue:null,description:"",name:"byAuthorText",required:!0,type:{name:"string"}},etAlText:{defaultValue:null,description:"",name:"etAlText",required:!0,type:{name:"string"}},showMoreText:{defaultValue:null,description:"",name:"showMoreText",required:!0,type:{name:"string"}},resultPagerStatusText:{defaultValue:null,description:"",name:"resultPagerStatusText",required:!0,type:{name:"string"}},favoritesListEmptyText:{defaultValue:null,description:"",name:"favoritesListEmptyText",required:!0,type:{name:"string"}},inSeriesText:{defaultValue:null,description:"",name:"inSeriesText",required:!0,type:{name:"string"}},numberDescriptionText:{defaultValue:null,description:"",name:"numberDescriptionText",required:!0,type:{name:"string"}},materialUrl:{defaultValue:null,description:"",name:"materialUrl",required:!0,type:{name:"string"}},searchUrl:{defaultValue:null,description:"",name:"searchUrl",required:!0,type:{name:"string"}},advancedSearchUrl:{defaultValue:null,description:"",name:"advancedSearchUrl",required:!0,type:{name:"string"}},fbsBaseUrl:{defaultValue:null,description:"",name:"fbsBaseUrl",required:!0,type:{name:"string"}},loanListEreolenUrl:{defaultValue:null,description:"",name:"loanListEreolenUrl",required:!0,type:{name:"string"}},feesPageUrl:{defaultValue:null,description:"",name:"feesPageUrl",required:!0,type:{name:"string"}},publizonBaseUrl:{defaultValue:null,description:"",name:"publizonBaseUrl",required:!0,type:{name:"string"}},dplCmsBaseUrl:{defaultValue:null,description:"",name:"dplCmsBaseUrl",required:!0,type:{name:"string"}},coverBaseUrl:{defaultValue:null,description:"",name:"coverBaseUrl",required:!0,type:{name:"string"}},materialBaseUrl:{defaultValue:null,description:"",name:"materialBaseUrl",required:!0,type:{name:"string"}},fbiBaseUrl:{defaultValue:null,description:"",name:"fbiBaseUrl",required:!0,type:{name:"string"}},authUrl:{defaultValue:null,description:"",name:"authUrl",required:!0,type:{name:"string"}},ereolenHomepageUrl:{defaultValue:null,description:"",name:"ereolenHomepageUrl",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/favorites-list/FavoritesList.entry.tsx#FavoritesListentry"]={docgenInfo:FavoritesListentry.__docgenInfo,name:"FavoritesListentry",path:"src/apps/favorites-list/FavoritesList.entry.tsx#FavoritesListentry"})}catch(__react_docgen_typescript_loader_error){}const FavoritesList_dev={title:"Apps / Favorite list",component:FavoritesList_entry,argTypes:{...serviceUrlArgs.Z,pageSizeDesktop:{name:"Number of favorite items on desktop",defaultValue:50,control:{type:"number"}},blacklistedAvailabilityBranchesConfig:{name:"Blacklisted Availability branches",defaultValue:"FBS-751032,FBS-751031,FBS-751009,FBS-751027,FBS-751024",control:{type:"text"}},searchUrl:{name:"Path to the search result page",defaultValue:"/search",control:{type:"text"}},pageSizeMobile:{name:"Number of favorite items on mobile",defaultValue:20,control:{type:"number"}},showMoreText:{name:"Show more Text",defaultValue:"show more",control:{type:"text"}},resultPagerStatusText:{name:"Result pager status text",defaultValue:"Showing @itemsShown out of @hitcount results",control:{type:"text"}},materialUrl:{name:"Path to the material page",defaultValue:"/work/:workid",control:{type:"text"}},availabilityAvailableText:{name:"Availability: available text",defaultValue:"Available",control:{type:"text"}},availabilityUnavailableText:{name:"Availability: unavailable text",defaultValue:"Unavailable",control:{type:"text"}},favoritesListMaterialsText:{defaultValue:"@count materials",control:{type:"text"}},favoritesListHeaderText:{defaultValue:"Favorites",control:{type:"text"}},byAuthorText:{defaultValue:"By",control:{type:"text"}},etAlText:{defaultValue:"...",control:{type:"text"}},favoritesListEmptyText:{defaultValue:"Your favorites list is empty",control:{type:"text"}},numberDescriptionText:{name:"Number description",defaultValue:"Nr.",control:{type:"text"}},inSeriesText:{name:"In series",defaultValue:"in series",control:{type:"text"}}},decorators:[esm.j]},FavoritesList_dev_FavoritesList=args=>react.createElement(FavoritesList_entry,args)},"./src/apps/fee-list/FeeList.dev.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{FeeListEntry:()=>FeeList_dev_FeeListEntry,FeeListFeeDetailsModal:()=>FeeListFeeDetailsModal,default:()=>FeeList_dev});var react=__webpack_require__("./node_modules/react/index.js"),esm=__webpack_require__("./node_modules/@storybook/addon-queryparams/dist/esm/index.js"),blockedArgs=__webpack_require__("./src/core/storybook/blockedArgs.ts"),serviceUrlArgs=__webpack_require__("./src/core/storybook/serviceUrlArgs.ts"),withIsPatronBlockedHoc=__webpack_require__("./src/core/utils/withIsPatronBlockedHoc.tsx"),utils_text=__webpack_require__("./src/core/utils/text.tsx"),url=__webpack_require__("./src/core/utils/url.tsx"),Link=__webpack_require__("./src/components/atoms/links/Link.tsx"),fbs=__webpack_require__("./src/core/fbs/fbs.ts"),modal=__webpack_require__("./src/core/utils/modal.tsx");const list_header=({header,amount,children,dataCy="list-header"})=>react.createElement("div",{className:"dpl-list-buttons"},react.createElement("h2",{"data-cy":dataCy,className:"dpl-list-buttons__header"},header,null!==amount&&react.createElement("div",{className:"dpl-list-buttons__power"},amount)),react.createElement("div",{className:"dpl-list-buttons__buttons"},children));try{listheader.displayName="listheader",listheader.__docgenInfo={description:"",displayName:"listheader",props:{header:{defaultValue:null,description:"",name:"header",required:!0,type:{name:"ReactNode"}},amount:{defaultValue:null,description:"",name:"amount",required:!0,type:{name:"number | null"}},dataCy:{defaultValue:{value:"list-header"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/list-header/list-header.tsx#listheader"]={docgenInfo:listheader.__docgenInfo,name:"listheader",path:"src/components/list-header/list-header.tsx#listheader"})}catch(__react_docgen_typescript_loader_error){}var clsx=__webpack_require__("./node_modules/clsx/dist/clsx.mjs"),authorYear=__webpack_require__("./src/components/author-year/authorYear.tsx"),cover=__webpack_require__("./src/components/cover/cover.tsx");const fee_info=({material,materialItemNumber,children})=>{const{authorsShort="",materialType="",year="",title="",description="",pid,series=""}=material;return react.createElement("div",{className:"list-reservation__material"},react.createElement("div",null,react.createElement(cover.Y,{id:pid,idType:"pid",size:"small",animate:!1,description:description||""})),react.createElement("div",{className:"list-reservation__information"},react.createElement("div",null,react.createElement("div",{className:"status-label status-label--outline"},materialType)),react.createElement("div",{className:"list-reservation__about"},react.createElement("h3",{className:"text-header-h4"},title),react.createElement("p",{className:"text-small-caption color-secondary-gray"},react.createElement(authorYear.Z,{author:authorsShort,year:year||""})),react.createElement("p",{className:"text-small-caption color-secondary-gray"},series)),react.createElement("div",null),react.createElement("p",{className:"text-small-caption color-secondary-gray"},materialItemNumber),children))};try{feeinfo.displayName="feeinfo",feeinfo.__docgenInfo={description:"",displayName:"feeinfo",props:{material:{defaultValue:null,description:"",name:"material",required:!0,type:{name:"Nullable>"}},materialItemNumber:{defaultValue:null,description:"",name:"materialItemNumber",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/fee-list/stackable-fees/fee-info.tsx#feeinfo"]={docgenInfo:feeinfo.__docgenInfo,name:"feeinfo",path:"src/apps/fee-list/stackable-fees/fee-info.tsx#feeinfo"})}catch(__react_docgen_typescript_loader_error){}var material_fetch_hoc=__webpack_require__("./src/apps/loan-list/materials/utils/material-fetch-hoc.tsx"),dayjs_min=__webpack_require__("./node_modules/dayjs/dayjs.min.js"),dayjs_min_default=__webpack_require__.n(dayjs_min),date_format=__webpack_require__("./src/core/configuration/date-format.json");const fee_status=({dueDate,reasonMessage})=>{const t=(0,utils_text.X)(),dueDateFormatted=dayjs_min_default()(dueDate).format(date_format.d4);return react.createElement("div",null,react.createElement("div",{className:"list-reservation__deadline"},react.createElement("div",{className:"status-label status-label--danger"},reasonMessage),react.createElement("p",{className:"text-small-caption"},t("feeCreatedText",{placeholders:{"@date":dueDateFormatted}}))))};try{feestatus.displayName="feestatus",feestatus.__docgenInfo={description:"",displayName:"feestatus",props:{dueDate:{defaultValue:null,description:"",name:"dueDate",required:!0,type:{name:"string"}},reasonMessage:{defaultValue:null,description:"",name:"reasonMessage",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/fee-list/stackable-fees/fee-status.tsx#feestatus"]={docgenInfo:feestatus.__docgenInfo,name:"feestatus",path:"src/apps/fee-list/stackable-fees/fee-status.tsx#feestatus"})}catch(__react_docgen_typescript_loader_error){}const stackable_fees=(0,material_fetch_hoc.Z)((({amountOfMaterialsWithDueDate,faust,material={},feeData,materialItemNumber,openDetailsModalClickEvent})=>{const t=(0,utils_text.X)(),{amount=0,creationDate="",reasonMessage=""}=feeData,stackSize=amountOfMaterialsWithDueDate-1,listReservationClass=(0,clsx.Z)(["list-reservation","my-32"],{"list-reservation--stacked":stackSize>1});return react.createElement("button",{type:"button",onClick:()=>openDetailsModalClickEvent(faust),className:listReservationClass},feeData&&react.createElement(fee_info,{materialItemNumber,material},stackSize>0&&react.createElement("p",{className:"text-small-caption color-secondary-gray","data-cy":"stack-size"},t("plusXOtherMaterialsText",{placeholders:{"@amount":stackSize}}))),react.createElement("div",{className:"list-reservation__status"},react.createElement(fee_status,{dueDate:creationDate,reasonMessage}),react.createElement("div",{className:"list-reservation__fee"},react.createElement("p",{className:"text-body-medium-regular"},t("itemFeeAmountText",{placeholders:{"@fee":amount}})))))}));try{stackablefees.displayName="stackablefees",stackablefees.__docgenInfo={description:"",displayName:"stackablefees",props:{amountOfMaterialsWithDueDate:{defaultValue:null,description:"",name:"amountOfMaterialsWithDueDate",required:!0,type:{name:"number"}},material:{defaultValue:{value:"{}"},description:"",name:"material",required:!1,type:{name:"Nullable> | undefined"}},faust:{defaultValue:null,description:"",name:"faust",required:!0,type:{name:"`${number}`"}},feeData:{defaultValue:null,description:"",name:"feeData",required:!0,type:{name:"FeeV2"}},materialItemNumber:{defaultValue:null,description:"",name:"materialItemNumber",required:!0,type:{name:"string"}},openDetailsModalClickEvent:{defaultValue:null,description:"",name:"openDetailsModalClickEvent",required:!0,type:{name:"(faustId: `${number}`) => void"}},digitalMaterial:{defaultValue:null,description:"",name:"digitalMaterial",required:!1,type:{name:"Product | null | undefined"}},item:{defaultValue:null,description:"",name:"item",required:!1,type:{name:"Nullable> | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/fee-list/stackable-fees/stackable-fees.tsx#stackablefees"]={docgenInfo:stackablefees.__docgenInfo,name:"stackablefees",path:"src/apps/fee-list/stackable-fees/stackable-fees.tsx#stackablefees"})}catch(__react_docgen_typescript_loader_error){}const fee_list_list=({openDetailsModalClickEvent,fees,listHeader,dataCy,totalText})=>react.createElement("div",null,fees&&react.createElement("div",{"data-cy":dataCy},react.createElement(list_header,{header:listHeader,amount:null}),fees.map((itemData=>react.createElement(stackable_fees,{amountOfMaterialsWithDueDate:itemData.materials.length,item:{faust:itemData.materials[0].recordId},faust:itemData.materials[0].recordId,materialItemNumber:itemData.materials[0].materialItemNumber,feeData:itemData,openDetailsModalClickEvent}))),react.createElement("div",{className:"fee-list-bottom"},react.createElement("div",{className:"fee-list-bottom__paymenttypes"}),react.createElement("div",{className:"fee-list-bottom__actions"},react.createElement("p",{className:"text-body-small-medium"},totalText)))));try{list.displayName="list",list.__docgenInfo={description:"",displayName:"list",props:{openDetailsModalClickEvent:{defaultValue:null,description:"",name:"openDetailsModalClickEvent",required:!0,type:{name:"(faustId: string) => void"}},fees:{defaultValue:null,description:"",name:"fees",required:!0,type:{name:"FeeV2[] | null"}},dataCy:{defaultValue:null,description:"",name:"dataCy",required:!0,type:{name:"string"}},listHeader:{defaultValue:null,description:"",name:"listHeader",required:!0,type:{name:"ReactNode"}},totalText:{defaultValue:null,description:"",name:"totalText",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/fee-list/list.tsx#list"]={docgenInfo:list.__docgenInfo,name:"list",path:"src/apps/fee-list/list.tsx#list"})}catch(__react_docgen_typescript_loader_error){}const fee_details_modal=({modalId,children})=>{const t=(0,utils_text.X)();return react.createElement(modal.Z,{modalId:modalId||"",classNames:"modal-details",closeModalAriaLabelText:t("FeeDetailsModalCloseModalAriaLabelText"),screenReaderModalDescriptionText:t("FeeDetailsModalDescriptionText")},children)};try{feedetailsmodal.displayName="feedetailsmodal",feedetailsmodal.__docgenInfo={description:"",displayName:"feedetailsmodal",props:{modalId:{defaultValue:null,description:"",name:"modalId",required:!0,type:{name:"string"}},material:{defaultValue:null,description:"",name:"material",required:!0,type:{name:"Nullable> | null | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/fee-list/modal/fee-details-modal.tsx#feedetailsmodal"]={docgenInfo:feedetailsmodal.__docgenInfo,name:"feedetailsmodal",path:"src/apps/fee-list/modal/fee-details-modal.tsx#feedetailsmodal"})}catch(__react_docgen_typescript_loader_error){}var icon_btn_external_link=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/buttons/icon-btn-external-link.svg"),icon_btn_external_link_default=__webpack_require__.n(icon_btn_external_link);const my_payment_overview_modal=()=>{const t=(0,utils_text.X)(),paymentOverviewUrl=(0,url.J_)()("paymentOverviewUrl"),{close}=(0,modal.f)();return react.createElement(modal.Z,{modalId:"intermediate-payment-modal",closeModalAriaLabelText:"test",screenReaderModalDescriptionText:"test",classNames:"modal-cta"},react.createElement("div",{className:"modal-cta__container"},react.createElement("h2",{className:"text-header-h2"},t("feePaymentModalHeaderText")),react.createElement("div",{className:"mt-48 color-secondary-gray"},react.createElement("p",{className:"text-body-medium-regular"},t("feePaymentModalBodyText")),react.createElement("p",{className:"text-body-medium-regular mt-24"},t("feePaymentModalNoticeText"))),react.createElement("div",{className:"modal-cta__buttons mt-48"},react.createElement(Link.Z,{className:"btn-primary btn-filled btn-large arrow__hover--right-small",href:paymentOverviewUrl,isNewTab:!0},t("feePaymentModalGotoText")," ",react.createElement("img",{src:icon_btn_external_link_default(),className:"btn-icon invert",alt:""})),react.createElement("div",{className:"modal-cta__link"},react.createElement("button",{className:"link-tag color-secondary-gray ml-8",type:"button",onClick:()=>{close("intermediate-payment-modal")}},t("feePaymentModalCancelText"))))))};try{mypaymentoverviewmodal.displayName="mypaymentoverviewmodal",mypaymentoverviewmodal.__docgenInfo={description:"",displayName:"mypaymentoverviewmodal",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/fee-list/modal/my-payment-overview-modal.tsx#mypaymentoverviewmodal"]={docgenInfo:mypaymentoverviewmodal.__docgenInfo,name:"mypaymentoverviewmodal",path:"src/apps/fee-list/modal/my-payment-overview-modal.tsx#mypaymentoverviewmodal"})}catch(__react_docgen_typescript_loader_error){}var general=__webpack_require__("./src/core/utils/helpers/general.ts"),status_circle_icon=__webpack_require__("./src/apps/loan-list/materials/utils/status-circle-icon.tsx");const fee_status_circle=({dueDate,feeCreationDate})=>{const t=(0,utils_text.X)(),colors=(0,general.EC)(),daysBetweenDueAndDelivered=dayjs_min_default()(dueDate).diff(feeCreationDate,"day");return react.createElement(status_circle_icon.Z,{percent:100,color:colors.danger},react.createElement("span",{className:"counter__value"},daysBetweenDueAndDelivered),react.createElement("span",{className:"counter__label"},t("feeListDaysText")))};try{feestatuscircle.displayName="feestatuscircle",feestatuscircle.__docgenInfo={description:"",displayName:"feestatuscircle",props:{dueDate:{defaultValue:null,description:"",name:"dueDate",required:!0,type:{name:"string"}},feeCreationDate:{defaultValue:null,description:"",name:"feeCreationDate",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/fee-list/utils/fee-status-circle.tsx#feestatuscircle"]={docgenInfo:feestatuscircle.__docgenInfo,name:"feestatuscircle",path:"src/apps/fee-list/utils/fee-status-circle.tsx#feestatuscircle"})}catch(__react_docgen_typescript_loader_error){}const getFeesInRelationToPaymentChangeDate=(feeObj,beforePaymentChangeDate)=>{const paymentMethodChangeDate=dayjs_min_default()("2020-10-27");return feeObj.filter((fee=>{const{dueDate}=fee;if(dueDate){const feeDate=dayjs_min_default()(dueDate);if(beforePaymentChangeDate){if(feeDatepaymentMethodChangeDate)return fee}return!1}))};var selectable_material=__webpack_require__("./src/apps/loan-list/materials/selectable-material/selectable-material.tsx"),status_badge=__webpack_require__("./src/apps/loan-list/materials/utils/status-badge.tsx");const stackable_fees_list=(0,material_fetch_hoc.Z)((({materials,creationDateFormatted})=>{const t=(0,utils_text.X)();return react.createElement("ul",{className:"modal-loan__list-materials"},materials.map((({recordId,materialItemNumber})=>react.createElement(selectable_material.Z,{focused:!1,disabled:!0,statusBadgeComponent:react.createElement(status_badge.Z,{dangerText:t("turnedInText",{placeholders:{"@date":creationDateFormatted}})}),item:{faust:recordId},key:recordId,statusMessageComponentMobile:react.createElement("div",{className:"list-materials__status__note-mobile"},materialItemNumber),statusMessageComponentDesktop:react.createElement("div",{className:"list-materials__status__note-desktop"},materialItemNumber)}))))}));try{stackablefeeslist.displayName="stackablefeeslist",stackablefeeslist.__docgenInfo={description:"",displayName:"stackablefeeslist",props:{creationDateFormatted:{defaultValue:null,description:"",name:"creationDateFormatted",required:!0,type:{name:"string"}},materials:{defaultValue:null,description:"",name:"materials",required:!0,type:{name:"FeeMaterialV2[]"}},digitalMaterial:{defaultValue:null,description:"",name:"digitalMaterial",required:!1,type:{name:"Product | null | undefined"}},item:{defaultValue:null,description:"",name:"item",required:!1,type:{name:"Nullable> | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/fee-list/stackable-fees/stackable-fees-list.tsx#stackablefeeslist"]={docgenInfo:stackablefeeslist.__docgenInfo,name:"stackablefeeslist",path:"src/apps/fee-list/stackable-fees/stackable-fees-list.tsx#stackablefeeslist"})}catch(__react_docgen_typescript_loader_error){}var Checkbox=__webpack_require__("./src/components/checkbox/Checkbox.tsx");const AcceptTermsCheckbox=({handleAcceptedTerms})=>{const t=(0,utils_text.X)(),termsOfTradeUrl=(0,url.J_)()("termsOfTradeUrl");return react.createElement(Checkbox.Z,{id:"checkbox_id__fee_details",onChecked:()=>handleAcceptedTerms(),label:react.createElement(react.Fragment,null,t("iAcceptText")," ",react.createElement(Link.Z,{href:termsOfTradeUrl},t("termsOfTradeText"),react.createElement("sup",null,"*")))})},stackable_fees_AcceptTermsCheckbox=AcceptTermsCheckbox;try{AcceptTermsCheckbox.displayName="AcceptTermsCheckbox",AcceptTermsCheckbox.__docgenInfo={description:"",displayName:"AcceptTermsCheckbox",props:{handleAcceptedTerms:{defaultValue:null,description:"",name:"handleAcceptedTerms",required:!0,type:{name:"() => void"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/fee-list/stackable-fees/AcceptTermsCheckbox.tsx#AcceptTermsCheckbox"]={docgenInfo:AcceptTermsCheckbox.__docgenInfo,name:"AcceptTermsCheckbox",path:"src/apps/fee-list/stackable-fees/AcceptTermsCheckbox.tsx#AcceptTermsCheckbox"})}catch(__react_docgen_typescript_loader_error){}var GroupModalContent=__webpack_require__("./src/components/GroupModal/GroupModalContent.tsx");const fee_details_content=({feeDetailsData})=>{const t=(0,utils_text.X)(),paymentOverviewUrl=(0,url.J_)()("paymentOverviewUrl"),[check,setCheck]=(0,react.useState)(!1),{amount=0,creationDate="",dueDate="",materials=[]}=feeDetailsData,prePaymentTypeChange=(date=dueDate,dayjs_min_default()(date){setCheck(!check)}}),react.createElement("div",null,react.createElement("p",null,t("amountText",{placeholders:{"@amount":amount}}))),!showPaymentButton&&react.createElement("button",{type:"button",className:"btn-primary btn-outline btn-small arrow__hover--right-small",disabled:!showPaymentButton},t("payText")),showPaymentButton&&react.createElement(Link.Z,{className:"btn-primary btn-filled btn-small arrow__hover--right-small disabled",href:paymentOverviewUrl},t("payText")))},react.createElement("div",null)),materials.map((({recordId})=>react.createElement(stackable_fees_list,{materials,key:recordId,item:{faust:`${recordId}`},creationDateFormatted}))))};try{feedetailscontent.displayName="feedetailscontent",feedetailscontent.__docgenInfo={description:"",displayName:"feedetailscontent",props:{feeDetailsData:{defaultValue:null,description:"",name:"feeDetailsData",required:!0,type:{name:"FeeV2"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/fee-list/stackable-fees/fee-details-content.tsx#feedetailscontent"]={docgenInfo:feedetailscontent.__docgenInfo,name:"feedetailscontent",path:"src/apps/fee-list/stackable-fees/fee-details-content.tsx#feedetailscontent"})}catch(__react_docgen_typescript_loader_error){}var modal_ids=__webpack_require__("./src/core/configuration/modal-ids.json"),empty_list=__webpack_require__("./src/components/empty-list/empty-list.tsx");const FeeList=()=>{const t=(0,utils_text.X)(),viewFeesAndCompensationRatesUrl=(0,url.J_)()("viewFeesAndCompensationRatesUrl"),[feeDetailsModalId,setFeeDetailsModalId]=(0,react.useState)(""),{open}=(0,modal.f)(),{data:fbsFees=[]}=(0,fbs.CI)(),[itemsPrePaymentChange,setItemsPrePaymentChange]=(0,react.useState)(null),[totalFeePrePaymentChange,setTotalFeePrePaymentChange]=(0,react.useState)(0),[itemsPostPaymentChange,setItemsPostPaymentChange]=(0,react.useState)(null),[totalFeePostPaymentChange,setTotalFeePostPaymentChange]=(0,react.useState)(0),[feeDetailsData,setFeeDetailsData]=(0,react.useState)(),openDetailsModalClickEvent=(0,react.useCallback)((faustId=>{faustId&&(fbsFees.length>0&&setFeeDetailsData(((feeObj,faustId)=>feeObj.filter((item=>item.materials[0].recordId===faustId)))(fbsFees,faustId)),setFeeDetailsModalId(modal_ids.feeDetails+faustId),open(modal_ids.feeDetails+faustId||""))}),[fbsFees,open]);return(0,react.useEffect)((()=>{if(fbsFees){getFeesInRelationToPaymentChangeDate(fbsFees,!0).length>0&&setItemsPrePaymentChange(getFeesInRelationToPaymentChangeDate(fbsFees,!0));getFeesInRelationToPaymentChangeDate(fbsFees,!0).length>0&&setItemsPostPaymentChange(getFeesInRelationToPaymentChangeDate(fbsFees,!1))}}),[fbsFees]),(0,react.useEffect)((()=>{if(totalFeePrePaymentChange>0)return;const totalFee=null==itemsPrePaymentChange?void 0:itemsPrePaymentChange.reduce(((accumulator,{amount})=>accumulator+amount),0);totalFee&&setTotalFeePrePaymentChange(totalFee)}),[itemsPrePaymentChange,totalFeePrePaymentChange]),(0,react.useEffect)((()=>{if(totalFeePostPaymentChange>0)return;const totalFee=null==itemsPostPaymentChange?void 0:itemsPostPaymentChange.reduce(((accumulator,{amount})=>accumulator+amount),0);totalFee&&setTotalFeePostPaymentChange(totalFee)}),[itemsPostPaymentChange,totalFeePostPaymentChange]),react.createElement(react.Fragment,null,react.createElement("div",{className:"fee-list-page"},react.createElement("h1",{"data-cy":"fee-list-headline",className:"text-header-h1 my-32"},t("feeListHeadlineText")),react.createElement("span",{"data-cy":"fee-list-body"},t("feeListBodyText")," ",react.createElement(Link.Z,{className:"link-tag",href:viewFeesAndCompensationRatesUrl},t("viewFeesAndCompensationRatesText"))),!itemsPrePaymentChange&&!itemsPostPaymentChange&&react.createElement(react.Fragment,null,react.createElement(list_header,{header:react.createElement(react.Fragment,null,t("unpaidFeesFirstHeadlineText")),amount:0}),react.createElement(empty_list.Z,{classNames:"mt-24",emptyListText:t("emptyFeeListText")})),react.createElement(fee_list_list,{dataCy:"fee-list-before",listHeader:t("unpaidFeesFirstHeadlineText"),openDetailsModalClickEvent,fees:itemsPrePaymentChange,totalText:t("totalText",{placeholders:{"@total":totalFeePrePaymentChange}})}),react.createElement(fee_list_list,{listHeader:t("unpaidFeesSecondHeadlineText"),dataCy:"fee-list-after",openDetailsModalClickEvent,fees:itemsPostPaymentChange,totalText:t("totalText",{placeholders:{"@total":totalFeePostPaymentChange}})})),react.createElement(fee_details_modal,{modalId:feeDetailsModalId,material:{}},feeDetailsData&&react.createElement(fee_details_content,{feeDetailsData:feeDetailsData[0]})),react.createElement(my_payment_overview_modal,null))},fee_list_FeeList=FeeList;try{FeeList.displayName="FeeList",FeeList.__docgenInfo={description:"",displayName:"FeeList",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/fee-list/FeeList.tsx#FeeList"]={docgenInfo:FeeList.__docgenInfo,name:"FeeList",path:"src/apps/fee-list/FeeList.tsx#FeeList"})}catch(__react_docgen_typescript_loader_error){}var config=__webpack_require__("./src/core/utils/config.tsx");const FeeList_entry=(0,url.XL)((0,utils_text.z)((0,withIsPatronBlockedHoc.Z)((0,config.Rh)((()=>react.createElement(fee_list_FeeList,null))))));try{FeeListentry.displayName="FeeListentry",FeeListentry.__docgenInfo={description:"",displayName:"FeeListentry",props:{totalFeeAmountText:{defaultValue:null,description:"",name:"totalFeeAmountText",required:!0,type:{name:"string"}},otherMaterialsText:{defaultValue:null,description:"",name:"otherMaterialsText",required:!0,type:{name:"string"}},materialByAuthorText:{defaultValue:null,description:"",name:"materialByAuthorText",required:!0,type:{name:"string"}},materialAndAuthorText:{defaultValue:null,description:"",name:"materialAndAuthorText",required:!0,type:{name:"string"}},feeListDaysText:{defaultValue:null,description:"",name:"feeListDaysText",required:!0,type:{name:"string"}},payText:{defaultValue:null,description:"",name:"payText",required:!0,type:{name:"string"}},totalText:{defaultValue:null,description:"",name:"totalText",required:!0,type:{name:"string"}},iAcceptText:{defaultValue:null,description:"",name:"iAcceptText",required:!0,type:{name:"string"}},termsOfTradeText:{defaultValue:null,description:"",name:"termsOfTradeText",required:!0,type:{name:"string"}},termsOfTradeUrl:{defaultValue:null,description:"",name:"termsOfTradeUrl",required:!0,type:{name:"string"}},feeListHeadlineText:{defaultValue:null,description:"",name:"feeListHeadlineText",required:!0,type:{name:"string"}},feeListBodyText:{defaultValue:null,description:"",name:"feeListBodyText",required:!0,type:{name:"string"}},viewFeesAndCompensationRatesText:{defaultValue:null,description:"",name:"viewFeesAndCompensationRatesText",required:!0,type:{name:"string"}},etAlText:{defaultValue:null,description:"",name:"etAlText",required:!0,type:{name:"string"}},viewFeesAndCompensationRatesUrl:{defaultValue:null,description:"",name:"viewFeesAndCompensationRatesUrl",required:!0,type:{name:"string"}},unpaidFeesFirstHeadlineText:{defaultValue:null,description:"",name:"unpaidFeesFirstHeadlineText",required:!0,type:{name:"string"}},unpaidFeesSecondHeadlineText:{defaultValue:null,description:"",name:"unpaidFeesSecondHeadlineText",required:!0,type:{name:"string"}},alreadyPaidText:{defaultValue:null,description:"",name:"alreadyPaidText",required:!0,type:{name:"string"}},feePaymentModalHeaderText:{defaultValue:null,description:"",name:"feePaymentModalHeaderText",required:!0,type:{name:"string"}},feePaymentModalBodyText:{defaultValue:null,description:"",name:"feePaymentModalBodyText",required:!0,type:{name:"string"}},feePaymentModalNoticeText:{defaultValue:null,description:"",name:"feePaymentModalNoticeText",required:!0,type:{name:"string"}},feePaymentModalGotoText:{defaultValue:null,description:"",name:"feePaymentModalGotoText",required:!0,type:{name:"string"}},feePaymentModalCancelText:{defaultValue:null,description:"",name:"feePaymentModalCancelText",required:!0,type:{name:"string"}},feeDetailsModalScreenReaderText:{defaultValue:null,description:"",name:"feeDetailsModalScreenReaderText",required:!0,type:{name:"string"}},emptyFeeListText:{defaultValue:null,description:"",name:"emptyFeeListText",required:!0,type:{name:"string"}},turnedInText:{defaultValue:null,description:"",name:"turnedInText",required:!0,type:{name:"string"}},plusXOtherMaterialsText:{defaultValue:null,description:"",name:"plusXOtherMaterialsText",required:!0,type:{name:"string"}},itemFeeAmountText:{defaultValue:null,description:"",name:"itemFeeAmountText",required:!0,type:{name:"string"}},feeCreatedText:{defaultValue:null,description:"",name:"feeCreatedText",required:!0,type:{name:"string"}},availablePaymentTypesUrl:{defaultValue:null,description:"",name:"availablePaymentTypesUrl",required:!0,type:{name:"string"}},paymentOverviewUrl:{defaultValue:null,description:"",name:"paymentOverviewUrl",required:!0,type:{name:"string"}},blockedPatronDTitleText:{defaultValue:null,description:"",name:"blockedPatronDTitleText",required:!0,type:{name:"string"}},blockedPatronDBodyText:{defaultValue:null,description:"",name:"blockedPatronDBodyText",required:!0,type:{name:"string"}},blockedPatronSTitleText:{defaultValue:null,description:"",name:"blockedPatronSTitleText",required:!0,type:{name:"string"}},blockedPatronSBodyText:{defaultValue:null,description:"",name:"blockedPatronSBodyText",required:!0,type:{name:"string"}},blockedPatronFTitleText:{defaultValue:null,description:"",name:"blockedPatronFTitleText",required:!0,type:{name:"string"}},blockedPatronFBodyText:{defaultValue:null,description:"",name:"blockedPatronFBodyText",required:!0,type:{name:"string"}},blockedPatronETitleText:{defaultValue:null,description:"",name:"blockedPatronETitleText",required:!0,type:{name:"string"}},blockedPatronEBodyText:{defaultValue:null,description:"",name:"blockedPatronEBodyText",required:!0,type:{name:"string"}},blockedPatronWTitleText:{defaultValue:null,description:"",name:"blockedPatronWTitleText",required:!0,type:{name:"string"}},blockedPatronWBodyText:{defaultValue:null,description:"",name:"blockedPatronWBodyText",required:!0,type:{name:"string"}},blockedPatronOTitleText:{defaultValue:null,description:"",name:"blockedPatronOTitleText",required:!0,type:{name:"string"}},blockedPatronOBodyText:{defaultValue:null,description:"",name:"blockedPatronOBodyText",required:!0,type:{name:"string"}},blockedPatronUTitleText:{defaultValue:null,description:"",name:"blockedPatronUTitleText",required:!0,type:{name:"string"}},blockedPatronUBodyText:{defaultValue:null,description:"",name:"blockedPatronUBodyText",required:!0,type:{name:"string"}},blockedPatronELinkText:{defaultValue:null,description:"",name:"blockedPatronELinkText",required:!0,type:{name:"string"}},blockedPatronELinkUrl:{defaultValue:null,description:"",name:"blockedPatronELinkUrl",required:!0,type:{name:"string"}},blockedPatronCloseModalAriaLabelText:{defaultValue:null,description:"",name:"blockedPatronCloseModalAriaLabelText",required:!0,type:{name:"string"}},blockedPatronModalAriaDescriptionText:{defaultValue:null,description:"",name:"blockedPatronModalAriaDescriptionText",required:!0,type:{name:"string"}},BlockedPatronEntryTextProps:{defaultValue:null,description:"",name:"BlockedPatronEntryTextProps",required:!0,type:{name:"string"}},redirectOnBlocked:{defaultValue:null,description:"",name:"redirectOnBlocked",required:!0,type:{name:"string"}},expirationWarningDaysBeforeConfig:{defaultValue:null,description:"",name:"expirationWarningDaysBeforeConfig",required:!0,type:{name:"string"}},materialUrl:{defaultValue:null,description:"",name:"materialUrl",required:!0,type:{name:"string"}},searchUrl:{defaultValue:null,description:"",name:"searchUrl",required:!0,type:{name:"string"}},advancedSearchUrl:{defaultValue:null,description:"",name:"advancedSearchUrl",required:!0,type:{name:"string"}},fbsBaseUrl:{defaultValue:null,description:"",name:"fbsBaseUrl",required:!0,type:{name:"string"}},loanListEreolenUrl:{defaultValue:null,description:"",name:"loanListEreolenUrl",required:!0,type:{name:"string"}},feesPageUrl:{defaultValue:null,description:"",name:"feesPageUrl",required:!0,type:{name:"string"}},publizonBaseUrl:{defaultValue:null,description:"",name:"publizonBaseUrl",required:!0,type:{name:"string"}},dplCmsBaseUrl:{defaultValue:null,description:"",name:"dplCmsBaseUrl",required:!0,type:{name:"string"}},coverBaseUrl:{defaultValue:null,description:"",name:"coverBaseUrl",required:!0,type:{name:"string"}},materialBaseUrl:{defaultValue:null,description:"",name:"materialBaseUrl",required:!0,type:{name:"string"}},fbiBaseUrl:{defaultValue:null,description:"",name:"fbiBaseUrl",required:!0,type:{name:"string"}},authUrl:{defaultValue:null,description:"",name:"authUrl",required:!0,type:{name:"string"}},ereolenHomepageUrl:{defaultValue:null,description:"",name:"ereolenHomepageUrl",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/fee-list/FeeList.entry.tsx#FeeListentry"]={docgenInfo:FeeListentry.__docgenInfo,name:"FeeListentry",path:"src/apps/fee-list/FeeList.entry.tsx#FeeListentry"})}catch(__react_docgen_typescript_loader_error){}var modal_helpers=__webpack_require__("./src/core/utils/helpers/modal-helpers.ts");const FeeList_dev={title:"Apps / Fee list",component:FeeList_entry,argTypes:{...serviceUrlArgs.Z,...blockedArgs.Z,feeListHeadlineText:{defaultValue:"Fees & Replacement costs",control:{type:"text"}},feeListBodyText:{defaultValue:"Overdue fees and replacement costs that were created before 27/10/2020 can still be paid on this page.",control:{type:"text"}},viewFeesAndCompensationRatesText:{defaultValue:"See our fees and replacement costs",control:{type:"text"}},etAlText:{control:{type:"text"},defaultValue:"et al."},viewFeesAndCompensationRatesUrl:{defaultValue:"https://unsplash.com/photos/NEJcmvLFcws",control:{type:"text"}},totalFeeAmountText:{defaultValue:"Fee",control:{type:"text"}},otherMaterialsText:{defaultValue:"Other materials",control:{type:"text"}},materialByAuthorText:{defaultValue:"By",control:{type:"text"}},materialAndAuthorText:{defaultValue:"and",control:{type:"text"}},feeListDaysText:{defaultValue:"Days",control:{type:"text"}},payText:{defaultValue:"Pay",control:{type:"text"}},totalText:{defaultValue:"Total @total,-",control:{type:"text"}},amountText:{defaultValue:"@amount,-",control:{type:"text"}},expirationWarningDaysBeforeConfig:{defaultValue:"6",control:{type:"text"}},iAcceptText:{defaultValue:"I accept the",control:{type:"text"}},termsOfTradeText:{defaultValue:"Terms of trade",control:{type:"text"}},termsOfTradeUrl:{defaultValue:"https://unsplash.com/photos/JDzoTGfoogA",control:{type:"text"}},unpaidFeesFirstHeadlineText:{defaultValue:"Unsettled debt 1",control:{type:"text"}},unpaidFeesSecondHeadlineText:{defaultValue:"Unsettled debt 2",control:{type:"text"}},alreadyPaidText:{defaultValue:"Please note that paid fees are not registered up until 72 hours after your payment after which your debt is updated and your user unblocked if it has been blocked.",control:{type:"text"}},feePaymentModalHeaderText:{defaultValue:"Unpaid fees post 27/10 2020",control:{type:"text"}},feePaymentModalBodyText:{defaultValue:"You will be redirected to Mit Betalingsoverblik.",control:{type:"text"}},feePaymentModalNoticeText:{defaultValue:"Paid fees can take up to 24 hours to registrer.",control:{type:"text"}},feePaymentModalGotoText:{defaultValue:"Go to Mit Betalingsoverblik",control:{type:"text"}},feePaymentModalCancelText:{defaultValue:"Cancel",control:{type:"text"}},feeDetailsModalScreenReaderText:{defaultValue:"A modal containing details about a fee",control:{type:"text"}},emptyFeeListText:{defaultValue:"You have 0 unpaid fees or replacement costs",control:{type:"text"}},FeeDetailsModalCloseModalAriaLabelText:{defaultValue:"Close fee details modal",control:{type:"text"}},FeeDetailsModalDescriptionText:{defaultValue:"Modal containing information about this element or group of elements fees",control:{type:"text"}},turnedInText:{control:{type:"text"},defaultValue:"Turned in @date"},plusXOtherMaterialsText:{control:{type:"text"},defaultValue:"+ @amount other materials"},itemFeeAmountText:{control:{type:"text"},defaultValue:"Fee @fee,-"},feeCreatedText:{control:{type:"text"},defaultValue:"Fees charged @date"},availablePaymentTypesUrl:{defaultValue:"https://unsplash.com/photos/JDzoTGfoogA",control:{type:"text"}},paymentOverviewUrl:{defaultValue:"https://unsplash.com/photos/yjI3ozta2Zk",control:{type:"text"}}},decorators:[esm.j]},Template=props=>react.createElement(FeeList_entry,props),FeeList_dev_FeeListEntry=Template.bind({});FeeList_dev_FeeListEntry.args={};const{feeDetails}=(0,modal_helpers.GM)(),FeeListFeeDetailsModal=Template.bind({});FeeListFeeDetailsModal.parameters={query:{modal:`${feeDetails}48724566`}}},"./src/apps/hello-world/hello-world.dev.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{App:()=>App,default:()=>hello_world_dev});var react=__webpack_require__("./node_modules/react/index.js"),utils_text=__webpack_require__("./src/core/utils/text.tsx"),hello=__webpack_require__("./src/components/hello/hello.tsx");const hello_world=()=>{const t=(0,utils_text.X)();return react.createElement("article",null,react.createElement("h2",null,t("titleText")),react.createElement("p",null,t("introductionText")),react.createElement("p",null,react.createElement(hello.q,{shouldBeEmphasized:!0})))};try{helloworld.displayName="helloworld",helloworld.__docgenInfo={description:"",displayName:"helloworld",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/hello-world/hello-world.tsx#helloworld"]={docgenInfo:helloworld.__docgenInfo,name:"helloworld",path:"src/apps/hello-world/hello-world.tsx#helloworld"})}catch(__react_docgen_typescript_loader_error){}const hello_world_entry=(0,utils_text.z)((()=>react.createElement(hello_world,null)));try{helloworldentry.displayName="helloworldentry",helloworldentry.__docgenInfo={description:"",displayName:"helloworldentry",props:{titleText:{defaultValue:null,description:"",name:"titleText",required:!0,type:{name:"string"}},introductionText:{defaultValue:null,description:"",name:"introductionText",required:!0,type:{name:"string"}},whatText:{defaultValue:null,description:"",name:"whatText",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/hello-world/hello-world.entry.tsx#helloworldentry"]={docgenInfo:helloworldentry.__docgenInfo,name:"helloworldentry",path:"src/apps/hello-world/hello-world.entry.tsx#helloworldentry"})}catch(__react_docgen_typescript_loader_error){}const hello_world_dev={title:"Apps / Hello World",component:hello_world_entry,argTypes:{titleText:{defaultValue:"Greetings",control:{type:"text"}},introductionText:{defaultValue:"We warmly welcome everybody by saying:",control:{type:"text"}},whatText:{defaultValue:"world",control:{type:"text"}}}},App=args=>react.createElement(hello_world_entry,args)},"./src/apps/loan-list/list/loan-list.dev.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{LoanListDetailsModal:()=>LoanListDetailsModal,LoanListDueDateModal:()=>LoanListDueDateModal,LoanListEntry:()=>loan_list_dev_LoanListEntry,LoanListRenewLoansModal:()=>LoanListRenewLoansModal,default:()=>loan_list_dev});var esm=__webpack_require__("./node_modules/@storybook/addon-queryparams/dist/esm/index.js"),react=__webpack_require__("./node_modules/react/index.js"),serviceUrlArgs=__webpack_require__("./src/core/storybook/serviceUrlArgs.ts"),blockedArgs=__webpack_require__("./src/core/storybook/blockedArgs.ts"),es=(__webpack_require__("./node_modules/core-js/modules/esnext.string.at.js"),__webpack_require__("./node_modules/react-redux/es/index.js")),dayjs_min=__webpack_require__("./node_modules/dayjs/dayjs.min.js"),dayjs_min_default=__webpack_require__.n(dayjs_min),general=__webpack_require__("./src/core/utils/helpers/general.ts"),url=__webpack_require__("./src/core/utils/helpers/url.ts"),utils_text=__webpack_require__("./src/core/utils/text.tsx"),modal=__webpack_require__("./src/core/utils/modal.tsx"),empty_list=__webpack_require__("./src/components/empty-list/empty-list.tsx"),helpers=__webpack_require__("./src/apps/loan-list/utils/helpers.ts"),clsx=__webpack_require__("./node_modules/clsx/dist/clsx.mjs"),Link=__webpack_require__("./src/components/atoms/links/Link.tsx"),utils_url=__webpack_require__("./src/core/utils/url.tsx");const material_overdue_link=({dueDate,showOn})=>{const t=(0,utils_text.X)(),viewFeesAndCompensationRatesUrl=(0,utils_url.J_)()("viewFeesAndCompensationRatesUrl");return!dueDate||dueDate&&!(0,general.cf)(dueDate)?null:react.createElement(Link.Z,{href:viewFeesAndCompensationRatesUrl,className:`list-reservation__note list-reservation__note--${showOn} color-signal-alert`},t("loanListMaterialLateFeeText"))};try{materialoverduelink.displayName="materialoverduelink",materialoverduelink.__docgenInfo={description:"",displayName:"materialoverduelink",props:{dueDate:{defaultValue:null,description:"",name:"dueDate",required:!0,type:{name:"string | null | undefined"}},showOn:{defaultValue:null,description:"",name:"showOn",required:!0,type:{name:"enum",value:[{value:'"mobile"'},{value:'"desktop"'}]}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/loan-list/materials/stackable-material/material-overdue-link.tsx#materialoverduelink"]={docgenInfo:materialoverduelink.__docgenInfo,name:"materialoverduelink",path:"src/apps/loan-list/materials/stackable-material/material-overdue-link.tsx#materialoverduelink"})}catch(__react_docgen_typescript_loader_error){}const additional_materials_button=({additionalMaterials,openDueDateModal,showOn})=>{const t=(0,utils_text.X)(),openDueDateModalCallBack=(0,react.useCallback)((e=>{e.stopPropagation(),openDueDateModal()}),[openDueDateModal]);return additionalMaterials<1?react.createElement("div",null):react.createElement("button",{type:"button",onClick:e=>openDueDateModalCallBack(e),"aria-describedby":"materials-modal-text",className:`list-reservation__note list-reservation__note--${showOn}`},t("loanListAdditionalMaterialsText",{count:additionalMaterials,placeholders:{"@count":additionalMaterials}}))};try{additionalmaterialsbutton.displayName="additionalmaterialsbutton",additionalmaterialsbutton.__docgenInfo={description:"",displayName:"additionalmaterialsbutton",props:{additionalMaterials:{defaultValue:null,description:"",name:"additionalMaterials",required:!0,type:{name:"number"}},openDueDateModal:{defaultValue:null,description:"",name:"openDueDateModal",required:!0,type:{name:"() => void"}},showOn:{defaultValue:null,description:"",name:"showOn",required:!0,type:{name:"enum",value:[{value:'"mobile"'},{value:'"desktop"'}]}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/loan-list/materials/stackable-material/additional-materials-button.tsx#additionalmaterialsbutton"]={docgenInfo:additionalmaterialsbutton.__docgenInfo,name:"additionalmaterialsbutton",path:"src/apps/loan-list/materials/stackable-material/additional-materials-button.tsx#additionalmaterialsbutton"})}catch(__react_docgen_typescript_loader_error){}var material_info=__webpack_require__("./src/apps/loan-list/materials/stackable-material/material-info.tsx"),material_fetch_hoc=__webpack_require__("./src/apps/loan-list/materials/utils/material-fetch-hoc.tsx"),digital_material_fetch_hoc=__webpack_require__("./src/apps/loan-list/materials/utils/digital-material-fetch-hoc.tsx"),status_circle=__webpack_require__("./src/apps/loan-list/materials/utils/status-circle.tsx"),status_badge=__webpack_require__("./src/apps/loan-list/materials/utils/status-badge.tsx"),ArrowButton=__webpack_require__("./src/components/Buttons/ArrowButton.tsx"),date=__webpack_require__("./src/core/utils/helpers/date.ts");const material_status=({loan,children,additionalMaterials,openDetailsModal,openDueDateModal,arrowLabelledBy})=>{const t=(0,utils_text.X)(),{dueDate,loanDate}=loan,isStacked=(0,helpers.ug)(additionalMaterials),notificationClickEventHandler=()=>{isStacked&&openDueDateModal&&dueDate&&openDueDateModal(dueDate),isStacked||openDetailsModal(loan)};return dueDate&&loanDate?react.createElement("div",{className:"list-reservation__status"},react.createElement("div",{className:"list-reservation__counter"},react.createElement(status_circle.Z,{loanDate,dueDate})),react.createElement("div",null,react.createElement("div",{className:"list-reservation__deadline"},dueDate&&react.createElement(status_badge.Z,{showBadgeWithDueDate:!0,badgeDate:dueDate,dangerText:t("loanListStatusBadgeDangerText"),warningText:t("loanListStatusBadgeWarningText")}),react.createElement("p",{className:"text-small-caption color-secondary-gray"},(0,helpers.u8)(loan)?t("loanListToBeDeliveredDigitalMaterialText",{placeholders:{"@date":(0,date.o0)(dueDate)}}):t("loanListToBeDeliveredText",{placeholders:{"@date":(0,date.p6)(dueDate)}})),children)),react.createElement(ArrowButton.Z,{arrowLabelledBy,cursorPointer:!0,clickEventHandler:notificationClickEventHandler})):react.createElement("div",{className:"list-reservation__status"},react.createElement("div",{className:"list-reservation__counter"}),react.createElement("div",{className:"list-reservation__deadline"}),react.createElement(ArrowButton.Z,{arrowLabelledBy,cursorPointer:!0,clickEventHandler:notificationClickEventHandler}))};try{materialstatus.displayName="materialstatus",materialstatus.__docgenInfo={description:"",displayName:"materialstatus",props:{loan:{defaultValue:null,description:"",name:"loan",required:!0,type:{name:"LoanType"}},additionalMaterials:{defaultValue:null,description:"",name:"additionalMaterials",required:!0,type:{name:"number"}},openDetailsModal:{defaultValue:null,description:"",name:"openDetailsModal",required:!0,type:{name:"(loan: LoanType) => void"}},openDueDateModal:{defaultValue:null,description:"",name:"openDueDateModal",required:!1,type:{name:"((dueDate: string) => void) | undefined"}},arrowLabelledBy:{defaultValue:null,description:"",name:"arrowLabelledBy",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/loan-list/materials/stackable-material/material-status.tsx#materialstatus"]={docgenInfo:materialstatus.__docgenInfo,name:"materialstatus",path:"src/apps/loan-list/materials/stackable-material/material-status.tsx#materialstatus"})}catch(__react_docgen_typescript_loader_error){}const stackable_material=(0,digital_material_fetch_hoc.Z)((0,material_fetch_hoc.Z)((({additionalMaterials,material,loan,openDueDateModal,openLoanDetailsModal,focused,loanId})=>{const{dueDate,identifier,periodical}=loan,handleOpenDueDateModal=()=>{openDueDateModal&&dueDate&&openDueDateModal(dueDate)};return react.createElement("div",{className:(0,clsx.Z)("list-reservation my-32 cursor-pointer",{"list-reservation--stacked":additionalMaterials>0}),role:"button",onClick:handleOpenDueDateModal,onKeyUp:e=>{"Enter"!==e.key&&"Space"!==e.key||handleOpenDueDateModal()},tabIndex:0},material&&react.createElement(material_info.Z,{arrowLabelledBy:`${loanId||identifier}-title`,openDetailsModal:()=>{openLoanDetailsModal(loan)},periodical,material,focused,isbnForCover:identifier||""},react.createElement(additional_materials_button,{showOn:"desktop",openDueDateModal:handleOpenDueDateModal,additionalMaterials}),react.createElement(material_overdue_link,{showOn:"desktop",dueDate})),react.createElement(material_status,{arrowLabelledBy:`${loanId||identifier}-title`,loan,openDetailsModal:openLoanDetailsModal,openDueDateModal:handleOpenDueDateModal,additionalMaterials},react.createElement(additional_materials_button,{showOn:"mobile",openDueDateModal:handleOpenDueDateModal,additionalMaterials}),react.createElement(material_overdue_link,{showOn:"mobile",dueDate})))})));try{stackablematerial.displayName="stackablematerial",stackablematerial.__docgenInfo={description:"",displayName:"stackablematerial",props:{loan:{defaultValue:null,description:"",name:"loan",required:!0,type:{name:"LoanType"}},additionalMaterials:{defaultValue:null,description:"",name:"additionalMaterials",required:!0,type:{name:"number"}},openLoanDetailsModal:{defaultValue:null,description:"",name:"openLoanDetailsModal",required:!0,type:{name:"(loan: LoanType) => void"}},openDueDateModal:{defaultValue:null,description:"",name:"openDueDateModal",required:!1,type:{name:"((dueDate: string) => void) | undefined"}},focused:{defaultValue:null,description:"",name:"focused",required:!0,type:{name:"boolean"}},loanId:{defaultValue:null,description:"",name:"loanId",required:!1,type:{name:"number | null | undefined"}},digitalMaterial:{defaultValue:null,description:"",name:"digitalMaterial",required:!1,type:{name:"Product | null | undefined"}},item:{defaultValue:null,description:"",name:"item",required:!1,type:{name:"Nullable>"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/loan-list/materials/stackable-material/stackable-material.tsx#stackablematerial"]={docgenInfo:stackablematerial.__docgenInfo,name:"stackablematerial",path:"src/apps/loan-list/materials/stackable-material/stackable-material.tsx#stackablematerial"})}catch(__react_docgen_typescript_loader_error){}var loan_type=__webpack_require__("./src/core/utils/types/loan-type.ts");const loan_list_items=({loans,view,dueDates,openDueDateModal,openLoanDetailsModal,indexOfFocus,dataCy="loan-list-items"})=>{const t=(0,utils_text.X)();return react.createElement("div",{"data-cy":dataCy,className:"list-reservation-container my-32"},react.createElement("div",{className:"list-reservation__hidden-explanation",id:"materials-modal-text"},t("loanListDueDateModalAriaLabelText")),"stack"===view&&dueDates&&dueDates.map(((uniqueDueDate,i)=>{const loansUniqueDueDate=(0,helpers.Kp)(uniqueDueDate,loans),loan=loansUniqueDueDate[0]||{};return react.createElement("div",null,loan&&react.createElement(stackable_material,{focused:i===indexOfFocus,openDueDateModal,openLoanDetailsModal,loan,item:loan,loanId:loan.loanId,key:loan.faust||loan.identifier,additionalMaterials:loansUniqueDueDate.length-1}))})),"list"===view&&loans.map(((loan,i)=>react.createElement(stackable_material,{focused:i===indexOfFocus,openLoanDetailsModal,item:loan,loanId:loan.loanId,key:(0,loan_type.e)(loan),loan,additionalMaterials:0}))))};try{loanlistitems.displayName="loanlistitems",loanlistitems.__docgenInfo={description:"",displayName:"loanlistitems",props:{loans:{defaultValue:null,description:"",name:"loans",required:!0,type:{name:"LoanType[]"}},view:{defaultValue:null,description:"",name:"view",required:!0,type:{name:"enum",value:[{value:'"list"'},{value:'"stack"'}]}},dueDates:{defaultValue:null,description:"",name:"dueDates",required:!1,type:{name:"string[] | undefined"}},openLoanDetailsModal:{defaultValue:null,description:"",name:"openLoanDetailsModal",required:!0,type:{name:"(loan: LoanType) => void"}},openDueDateModal:{defaultValue:null,description:"",name:"openDueDateModal",required:!0,type:{name:"(dueDate: string) => void"}},indexOfFocus:{defaultValue:null,description:"",name:"indexOfFocus",required:!0,type:{name:"number | null"}},dataCy:{defaultValue:{value:"loan-list-items"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/loan-list/list/loan-list-items.tsx#loanlistitems"]={docgenInfo:loanlistitems.__docgenInfo,name:"loanlistitems",path:"src/apps/loan-list/list/loan-list-items.tsx#loanlistitems"})}catch(__react_docgen_typescript_loader_error){}var use_pager=__webpack_require__("./src/components/result-pager/use-pager.tsx");const list_list=({loans,dueDates,view,emptyListLabel,pageSize,openLoanDetailsModal,openDueDateModal,children})=>{const[displayedLoans,setDisplayedLoans]=(0,react.useState)([]),{itemsShown,PagerComponent,firstInNewPage}=(0,use_pager.Z)({hitcount:loans.length,pageSize,overrideItemsShown:"list"===view?void 0:()=>displayedLoans.length});return(0,react.useEffect)((()=>{if("list"===view)setDisplayedLoans((0,general.qZ)(loans,itemsShown));else{const stackedLoans=(0,helpers.t4)(view,loans,itemsShown,dueDates);setDisplayedLoans([...stackedLoans])}}),[dueDates,loans,itemsShown,view]),react.createElement(react.Fragment,null,children,loans.length>0&&react.createElement(react.Fragment,null,react.createElement(loan_list_items,{indexOfFocus:firstInNewPage,openLoanDetailsModal,openDueDateModal,dueDates,loans:displayedLoans,view}),react.createElement(PagerComponent,null)),0===loans.length&&react.createElement(empty_list.Z,{classNames:"mt-24",emptyListText:emptyListLabel}))};try{list.displayName="list",list.__docgenInfo={description:"",displayName:"list",props:{loans:{defaultValue:null,description:"",name:"loans",required:!0,type:{name:"LoanType[]"}},dueDates:{defaultValue:null,description:"",name:"dueDates",required:!1,type:{name:"string[] | undefined"}},view:{defaultValue:null,description:"",name:"view",required:!0,type:{name:"enum",value:[{value:'"list"'},{value:'"stack"'}]}},emptyListLabel:{defaultValue:null,description:"",name:"emptyListLabel",required:!0,type:{name:"string"}},pageSize:{defaultValue:null,description:"",name:"pageSize",required:!0,type:{name:"number"}},openLoanDetailsModal:{defaultValue:null,description:"",name:"openLoanDetailsModal",required:!0,type:{name:"(loan: LoanType) => void"}},openDueDateModal:{defaultValue:null,description:"",name:"openDueDateModal",required:!0,type:{name:"(dueDate: string) => void"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/loan-list/list/list.tsx#list"]={docgenInfo:list.__docgenInfo,name:"list",path:"src/apps/loan-list/list/list.tsx#list"})}catch(__react_docgen_typescript_loader_error){}const icon_list=()=>react.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},react.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M21 17.25C21.4142 17.25 21.75 17.5858 21.75 18C21.75 18.3797 21.4678 18.6935 21.1018 18.7432L21 18.75H3C2.58579 18.75 2.25 18.4142 2.25 18C2.25 17.6203 2.53215 17.3065 2.89823 17.2568L3 17.25H21ZM21 11.25C21.4142 11.25 21.75 11.5858 21.75 12C21.75 12.3797 21.4678 12.6935 21.1018 12.7432L21 12.75H3C2.58579 12.75 2.25 12.4142 2.25 12C2.25 11.6203 2.53215 11.3065 2.89823 11.2568L3 11.25H21ZM21 5.25C21.4142 5.25 21.75 5.58579 21.75 6C21.75 6.3797 21.4678 6.69349 21.1018 6.74315L21 6.75H3C2.58579 6.75 2.25 6.41421 2.25 6C2.25 5.6203 2.53215 5.30651 2.89823 5.25685L3 5.25H21Z"})),icon_stack=()=>react.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},react.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.1291 2.78217C11.6687 2.47235 12.3323 2.47235 12.8719 2.78217L19.5721 6.62914C20.4103 7.11038 20.6996 8.17997 20.2184 9.01814C20.064 9.28701 19.841 9.51004 19.5721 9.66442L18.861 10.0718L19.5721 10.481C20.4103 10.9622 20.6996 12.0318 20.2184 12.87C20.0949 13.0851 19.9274 13.2708 19.7277 13.4156L19.5721 13.5163L18.861 13.9238L19.5721 14.3328C20.4103 14.8141 20.6996 15.8837 20.2184 16.7218C20.0949 16.9369 19.9274 17.1227 19.7277 17.2674L19.5721 17.3681L12.8719 21.2151C12.3772 21.4991 11.7785 21.5228 11.2665 21.2861L11.1291 21.2151L4.42892 17.3681C3.59075 16.8869 3.3014 15.8173 3.78264 14.9791C3.90614 14.764 4.07358 14.5783 4.27328 14.4335L4.42892 14.3328L5.13899 13.9238L4.42892 13.5163C3.59075 13.035 3.3014 11.9654 3.78264 11.1273C3.90614 10.9122 4.07358 10.7264 4.27328 10.5817L4.42892 10.481L5.13899 10.0718L4.42892 9.66442C3.63732 9.20991 3.33525 8.23061 3.70953 7.41711L3.78264 7.27541C3.93702 7.00654 4.16005 6.78351 4.42892 6.62914L11.1291 2.78217ZM17.354 14.7888L12.8719 17.3632C12.3772 17.6472 11.7785 17.6709 11.2665 17.4342L11.1291 17.3632L6.64599 14.7888L5.1758 15.6337C5.13739 15.6557 5.10553 15.6876 5.08348 15.726C5.02455 15.8286 5.0465 15.9556 5.12938 16.033L5.1758 16.0673L11.876 19.9143C11.9338 19.9475 12.0016 19.9557 12.0644 19.9392L12.125 19.9143L18.8252 16.0673C18.8636 16.0452 18.8955 16.0134 18.9175 15.975C18.9765 15.8723 18.9545 15.7454 18.8716 15.6679L18.8252 15.6337L17.354 14.7888ZM17.354 10.9368L12.8719 13.5114C12.3323 13.8212 11.6687 13.8212 11.1291 13.5114L6.64599 10.9368L5.1758 11.7818C5.13739 11.8039 5.10553 11.8357 5.08348 11.8741C5.02455 11.9768 5.0465 12.1037 5.12938 12.1812L5.1758 12.2154L11.876 16.0624C11.9338 16.0956 12.0016 16.1039 12.0644 16.0873L12.125 16.0624L18.8252 12.2154C18.8636 12.1934 18.8955 12.1615 18.9175 12.1231C18.9765 12.0205 18.9545 11.8936 18.8716 11.8161L18.8252 11.7818L17.354 10.9368ZM12.125 4.083C12.0479 4.03874 11.9531 4.03874 11.876 4.083L5.1758 7.92997C5.13739 7.95202 5.10553 7.98389 5.08348 8.0223C5.01473 8.14203 5.05607 8.29483 5.1758 8.36358L11.876 12.2106C11.9531 12.2548 12.0479 12.2548 12.125 12.2106L18.8252 8.36358C18.8636 8.34153 18.8955 8.30967 18.9175 8.27126C18.9863 8.15152 18.945 7.99872 18.8252 7.92997L12.125 4.083Z"}));var Button=__webpack_require__("./src/components/Buttons/Button.tsx");const ToggleListViewButtons=({setView,view,disableRenewLoansButton,openRenewLoansModal})=>{const t=(0,utils_text.X)(),setViewHandler=(0,react.useCallback)((inputView=>{(0,url.ul)({listview:inputView}),setView(inputView)}),[setView]);return react.createElement("div",{className:"dpl-list-buttons__buttons"},react.createElement("div",{id:"renew-multiple-modal",className:"dpl-list-buttons__screen-reader-description"},t("loanListRenewMultipleButtonExplanationText")),react.createElement("div",{className:"dpl-list-buttons__buttons__button"},react.createElement("button",{onClick:()=>setViewHandler("list"),"aria-pressed":"list"===view,className:"dpl-icon-button "+("list"===view?"dpl-icon-button--selected":""),id:"test-list",type:"button","aria-label":t("loanListAriaLabelListButtonText")},react.createElement(icon_list,null))),react.createElement("div",{className:"dpl-list-buttons__buttons__button"},react.createElement("button",{"aria-pressed":"stack"===view,className:"dpl-icon-button "+("stack"===view?"dpl-icon-button--selected":""),"data-cy":"stack",onClick:()=>setViewHandler("stack"),type:"button","aria-label":t("loanListAriaLabelStackButtonText")},react.createElement(icon_stack,null)),react.createElement("div",{className:"dpl-list-buttons__buttons__button dpl-list-buttons__buttons__button--hide-on-mobile"},react.createElement("button",{type:"button",onClick:()=>{openRenewLoansModal()},disabled:disableRenewLoansButton,className:"btn-primary btn-filled btn-small arrow__hover--right-small "+(disableRenewLoansButton?"btn-outline":""),id:"test-renew-button","aria-describedby":"renew-multiple-modal"},t("loanListRenewMultipleButtonText"))),react.createElement("div",{className:"hide-on-desktop button-box button-box--sticky-bottom"},react.createElement(Button.z,{label:t("loanListRenewMultipleButtonText"),buttonType:"none",disabled:!1,collapsible:!1,size:"small",variant:"filled",onClick:()=>{openRenewLoansModal()}}))))},list_ToggleListViewButtons=ToggleListViewButtons;try{ToggleListViewButtons.displayName="ToggleListViewButtons",ToggleListViewButtons.__docgenInfo={description:"",displayName:"ToggleListViewButtons",props:{setView:{defaultValue:null,description:"",name:"setView",required:!0,type:{name:"(view: ListView) => void"}},view:{defaultValue:null,description:"",name:"view",required:!0,type:{name:"enum",value:[{value:'"list"'},{value:'"stack"'}]}},disableRenewLoansButton:{defaultValue:null,description:"",name:"disableRenewLoansButton",required:!0,type:{name:"boolean"}},pageSize:{defaultValue:null,description:"",name:"pageSize",required:!0,type:{name:"number"}},loans:{defaultValue:null,description:"",name:"loans",required:!0,type:{name:"LoanType[]"}},openRenewLoansModal:{defaultValue:null,description:"",name:"openRenewLoansModal",required:!0,type:{name:"() => void"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/loan-list/list/ToggleListViewButtons.tsx#ToggleListViewButtons"]={docgenInfo:ToggleListViewButtons.__docgenInfo,name:"ToggleListViewButtons",path:"src/apps/loan-list/list/ToggleListViewButtons.tsx#ToggleListViewButtons"})}catch(__react_docgen_typescript_loader_error){}const ListHeader=({header,amount,children})=>react.createElement("div",{className:"dpl-list-buttons"},react.createElement("h2",{className:"dpl-list-buttons__header"},header,react.createElement("div",{className:"dpl-list-buttons__power"},amount)),react.createElement("div",{className:"dpl-list-buttons__buttons"},children)),list_ListHeader=ListHeader;try{ListHeader.displayName="ListHeader",ListHeader.__docgenInfo={description:"",displayName:"ListHeader",props:{header:{defaultValue:null,description:"",name:"header",required:!0,type:{name:"string"}},amount:{defaultValue:null,description:"",name:"amount",required:!0,type:{name:"number"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/loan-list/list/ListHeader.tsx#ListHeader"]={docgenInfo:ListHeader.__docgenInfo,name:"ListHeader",path:"src/apps/loan-list/list/ListHeader.tsx#ListHeader"})}catch(__react_docgen_typescript_loader_error){}var material_details=__webpack_require__("./src/apps/loan-list/modal/material-details.tsx"),material_details_modal=__webpack_require__("./src/apps/loan-list/modal/material-details-modal.tsx"),modal_helpers=__webpack_require__("./src/core/utils/helpers/modal-helpers.ts"),LoansGroupModal=__webpack_require__("./src/components/GroupModal/LoansGroupModal.tsx"),SimpleModalHeader=__webpack_require__("./src/components/GroupModal/SimpleModalHeader.tsx"),StatusCircleModalHeader=__webpack_require__("./src/components/GroupModal/StatusCircleModalHeader.tsx"),AcceptFeesModal=__webpack_require__("./src/components/accept-fees-modal/AcceptFeesModal.tsx"),useLoans=__webpack_require__("./src/core/utils/useLoans.tsx");const loan_list=({pageSize})=>{const{modalIds}=(0,es.v9)((s=>s.modal)),{open}=(0,modal.f)(),{loanDetails,allLoansId,dueDateModal,acceptModal}=(0,modal_helpers.GM)(),t=(0,utils_text.X)(),[view,setView]=(0,react.useState)("list"),[dueDate,setDueDate]=(0,react.useState)(null),[accepted,setAccepted]=(0,react.useState)(!1),[modalLoan,setModalLoan]=(0,react.useState)(null),{fbs:{loans:loansPhysical,stackedMaterialsDueDates:stackedMaterialsDueDatesFbs},publizon:{loans:loansDigital}}=(0,useLoans.Z)(),openAcceptModal=(0,react.useCallback)((()=>{open(`${acceptModal}`)}),[acceptModal,open]),openLoanDetailsModal=(0,react.useCallback)((loan=>{setModalLoan(loan),open((0,material_details_modal.ae)(loan))}),[open]),openDueDateModal=(0,react.useCallback)((dueDateInput=>{setDueDate(dueDateInput),open((0,modal_helpers.V$)(dueDateModal,[dueDateInput]))}),[dueDateModal,open]),openRenewLoansModal=(0,react.useCallback)((()=>{setDueDate(null),open(allLoansId)}),[allLoansId,open]);(0,react.useEffect)((()=>{const modalUrlParam=(0,url.wo)("modal"),loanDetailsString=loanDetails;if(modalUrlParam&&modalUrlParam.includes(loanDetails)){const loanIdFromModalId=(0,modal_helpers.FV)(modalUrlParam,loanDetailsString);if(loanIdFromModalId&&loansPhysical){const loan=[...(0,helpers.TE)(loansPhysical,"loanId",loanIdFromModalId),...(0,helpers.TE)(loansDigital,"identifier",loanIdFromModalId)].filter(loan_type.P).at(0);loan&&setModalLoan(loan)}}if(modalUrlParam&&(0,modal_helpers.hl)(modalUrlParam)){const dateFromQueryParam=(0,modal_helpers.OY)(modalUrlParam);setDueDate(dateFromQueryParam)}}),[loansPhysical,loansDigital,loanDetails,openDueDateModal]);const listContainsLoans=Array.isArray(loansPhysical)&&loansPhysical.length>0||Array.isArray(loansDigital)&&loansDigital.length>0;return react.createElement(react.Fragment,null,react.createElement("div",{className:`loan-list-page ${(0,general.Do)(modalIds)}`},react.createElement("h1",{className:"text-header-h1 my-32"},t("loanListTitleText")),listContainsLoans&&react.createElement(react.Fragment,null,loansPhysical&&react.createElement(list_list,{pageSize,emptyListLabel:t("loanListPhysicalLoansEmptyListText"),loans:loansPhysical,dueDates:stackedMaterialsDueDatesFbs,view,openLoanDetailsModal,openDueDateModal},react.createElement(list_ListHeader,{header:t("loanListPhysicalLoansTitleText"),amount:loansPhysical.length},react.createElement(list_ToggleListViewButtons,{disableRenewLoansButton:0===(0,general.R3)(loansPhysical),view,setView,loans:loansPhysical,pageSize,openRenewLoansModal}))),loansDigital&&react.createElement(list_list,{pageSize,emptyListLabel:t("loanListDigitalLoansEmptyListText"),loans:loansDigital,view:"list",openLoanDetailsModal,openDueDateModal},react.createElement(list_ListHeader,{header:t("loanListDigitalLoansTitleText"),amount:loansDigital.length}))),loansPhysical&&loansDigital&&(0,helpers.Re)(loansPhysical)&&(0,helpers.Re)(loansDigital)&&react.createElement(empty_list.Z,{classNames:"mt-24",emptyListText:t("loanListDigitalPhysicalLoansEmptyListText")})),modalLoan&&react.createElement(material_details_modal.ZP,{modalId:(0,material_details_modal.ae)(modalLoan)},react.createElement(material_details.Z,{item:modalLoan,loan:modalLoan,modalId:(0,material_details_modal.ae)(modalLoan)})),loansPhysical&&react.createElement(LoansGroupModal.Z,{accepted,resetAccepted:()=>{setAccepted(!1)},pageSize,openDetailsModal:openLoanDetailsModal,dueDate,openAcceptModal,loansModal:dueDate?(0,helpers.Kp)(dueDate,loansPhysical):loansPhysical},dueDate&&react.createElement(StatusCircleModalHeader.Z,{header:t("groupModalDueDateHeaderText",{placeholders:{"@date":(0,date.p6)(dueDate)}}),dueDate,subHeader:t("groupModalReturnLibraryText"),statusCircleComponent:react.createElement(status_circle.Z,{loanDate:dayjs_min_default()().subtract(1,"month").format("YYYY-MM-DD"),dueDate})}),!dueDate&&react.createElement(SimpleModalHeader.Z,{header:t("groupModalHeaderText")})),react.createElement(AcceptFeesModal.Z,{accept:()=>setAccepted(!0)}))};try{loanlist.displayName="loanlist",loanlist.__docgenInfo={description:"",displayName:"loanlist",props:{pageSize:{defaultValue:null,description:"",name:"pageSize",required:!0,type:{name:"number"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/loan-list/list/loan-list.tsx#loanlist"]={docgenInfo:loanlist.__docgenInfo,name:"loanlist",path:"src/apps/loan-list/list/loan-list.tsx#loanlist"})}catch(__react_docgen_typescript_loader_error){}var withIsPatronBlockedHoc=__webpack_require__("./src/core/utils/withIsPatronBlockedHoc.tsx");const loan_list_entry=(0,__webpack_require__("./src/core/utils/config.tsx").Rh)((0,utils_url.XL)((0,utils_text.z)((0,withIsPatronBlockedHoc.Z)((({pageSizeDesktop,pageSizeMobile})=>{const pageSize=(0,general.Rh)({desktop:pageSizeDesktop,mobile:pageSizeMobile},"pageSizeLoanList");return react.createElement(loan_list,{pageSize})})))));try{loanlistentry.displayName="loanlistentry",loanlistentry.__docgenInfo={description:"",displayName:"loanlistentry",props:{blockedPatronDTitleText:{defaultValue:null,description:"",name:"blockedPatronDTitleText",required:!0,type:{name:"string"}},blockedPatronDBodyText:{defaultValue:null,description:"",name:"blockedPatronDBodyText",required:!0,type:{name:"string"}},blockedPatronSTitleText:{defaultValue:null,description:"",name:"blockedPatronSTitleText",required:!0,type:{name:"string"}},blockedPatronSBodyText:{defaultValue:null,description:"",name:"blockedPatronSBodyText",required:!0,type:{name:"string"}},blockedPatronFTitleText:{defaultValue:null,description:"",name:"blockedPatronFTitleText",required:!0,type:{name:"string"}},blockedPatronFBodyText:{defaultValue:null,description:"",name:"blockedPatronFBodyText",required:!0,type:{name:"string"}},blockedPatronETitleText:{defaultValue:null,description:"",name:"blockedPatronETitleText",required:!0,type:{name:"string"}},blockedPatronEBodyText:{defaultValue:null,description:"",name:"blockedPatronEBodyText",required:!0,type:{name:"string"}},blockedPatronWTitleText:{defaultValue:null,description:"",name:"blockedPatronWTitleText",required:!0,type:{name:"string"}},blockedPatronWBodyText:{defaultValue:null,description:"",name:"blockedPatronWBodyText",required:!0,type:{name:"string"}},blockedPatronOTitleText:{defaultValue:null,description:"",name:"blockedPatronOTitleText",required:!0,type:{name:"string"}},blockedPatronOBodyText:{defaultValue:null,description:"",name:"blockedPatronOBodyText",required:!0,type:{name:"string"}},blockedPatronUTitleText:{defaultValue:null,description:"",name:"blockedPatronUTitleText",required:!0,type:{name:"string"}},blockedPatronUBodyText:{defaultValue:null,description:"",name:"blockedPatronUBodyText",required:!0,type:{name:"string"}},blockedPatronELinkText:{defaultValue:null,description:"",name:"blockedPatronELinkText",required:!0,type:{name:"string"}},blockedPatronELinkUrl:{defaultValue:null,description:"",name:"blockedPatronELinkUrl",required:!0,type:{name:"string"}},blockedPatronCloseModalAriaLabelText:{defaultValue:null,description:"",name:"blockedPatronCloseModalAriaLabelText",required:!0,type:{name:"string"}},blockedPatronModalAriaDescriptionText:{defaultValue:null,description:"",name:"blockedPatronModalAriaDescriptionText",required:!0,type:{name:"string"}},BlockedPatronEntryTextProps:{defaultValue:null,description:"",name:"BlockedPatronEntryTextProps",required:!0,type:{name:"string"}},redirectOnBlocked:{defaultValue:null,description:"",name:"redirectOnBlocked",required:!0,type:{name:"string"}},groupModalGoToMaterialAriaLabelText:{defaultValue:null,description:"",name:"groupModalGoToMaterialAriaLabelText",required:!0,type:{name:"string"}},loanListAriaLabelListButtonText:{defaultValue:null,description:"",name:"loanListAriaLabelListButtonText",required:!0,type:{name:"string"}},loanListAriaLabelStackButtonText:{defaultValue:null,description:"",name:"loanListAriaLabelStackButtonText",required:!0,type:{name:"string"}},loanListDigitalLoansEmptyListText:{defaultValue:null,description:"",name:"loanListDigitalLoansEmptyListText",required:!0,type:{name:"string"}},loanListDigitalLoansTitleText:{defaultValue:null,description:"",name:"loanListDigitalLoansTitleText",required:!0,type:{name:"string"}},loanListDigitalPhysicalLoansEmptyListText:{defaultValue:null,description:"",name:"loanListDigitalPhysicalLoansEmptyListText",required:!0,type:{name:"string"}},loanListDueDateModalAriaLabelText:{defaultValue:null,description:"",name:"loanListDueDateModalAriaLabelText",required:!0,type:{name:"string"}},loanListDueDateModalAriaDescribeMobileText:{defaultValue:null,description:"",name:"loanListDueDateModalAriaDescribeMobileText",required:!0,type:{name:"string"}},loanListLateFeeDesktopText:{defaultValue:null,description:"",name:"loanListLateFeeDesktopText",required:!0,type:{name:"string"}},loanListLateFeeMobileText:{defaultValue:null,description:"",name:"loanListLateFeeMobileText",required:!0,type:{name:"string"}},loanListMaterialDaysText:{defaultValue:null,description:"",name:"loanListMaterialDaysText",required:!0,type:{name:"string"}},loanListAdditionalMaterialsText:{defaultValue:null,description:"",name:"loanListAdditionalMaterialsText",required:!0,type:{name:"string"}},loanListPhysicalLoansEmptyListText:{defaultValue:null,description:"",name:"loanListPhysicalLoansEmptyListText",required:!0,type:{name:"string"}},loanListPhysicalLoansTitleText:{defaultValue:null,description:"",name:"loanListPhysicalLoansTitleText",required:!0,type:{name:"string"}},loanListRenewMultipleButtonExplanationText:{defaultValue:null,description:"",name:"loanListRenewMultipleButtonExplanationText",required:!0,type:{name:"string"}},loanListRenewMultipleButtonText:{defaultValue:null,description:"",name:"loanListRenewMultipleButtonText",required:!0,type:{name:"string"}},loanListStatusBadgeDangerText:{defaultValue:null,description:"",name:"loanListStatusBadgeDangerText",required:!0,type:{name:"string"}},loanListStatusBadgeWarningText:{defaultValue:null,description:"",name:"loanListStatusBadgeWarningText",required:!0,type:{name:"string"}},loanListTitleText:{defaultValue:null,description:"",name:"loanListTitleText",required:!0,type:{name:"string"}},loanListToBeDeliveredDigitalMaterialText:{defaultValue:null,description:"",name:"loanListToBeDeliveredDigitalMaterialText",required:!0,type:{name:"string"}},loanListToBeDeliveredText:{defaultValue:null,description:"",name:"loanListToBeDeliveredText",required:!0,type:{name:"string"}},etAlText:{defaultValue:null,description:"",name:"etAlText",required:!0,type:{name:"string"}},materialAndAuthorText:{defaultValue:null,description:"",name:"materialAndAuthorText",required:!0,type:{name:"string"}},materialByAuthorText:{defaultValue:null,description:"",name:"materialByAuthorText",required:!0,type:{name:"string"}},publizonAudioBookText:{defaultValue:null,description:"",name:"publizonAudioBookText",required:!0,type:{name:"string"}},publizonEbookText:{defaultValue:null,description:"",name:"publizonEbookText",required:!0,type:{name:"string"}},publizonPodcastText:{defaultValue:null,description:"",name:"publizonPodcastText",required:!0,type:{name:"string"}},resultPagerStatusText:{defaultValue:null,description:"",name:"resultPagerStatusText",required:!0,type:{name:"string"}},loanListMaterialLateFeeText:{defaultValue:null,description:"",name:"loanListMaterialLateFeeText",required:!0,type:{name:"string"}},loanListMaterialDayText:{defaultValue:null,description:"",name:"loanListMaterialDayText",required:!0,type:{name:"string"}},loanListStatusCircleAriaLabelText:{defaultValue:null,description:"",name:"loanListStatusCircleAriaLabelText",required:!0,type:{name:"string"}},expirationWarningDaysBeforeConfig:{defaultValue:null,description:"",name:"expirationWarningDaysBeforeConfig",required:!0,type:{name:"string"}},pageSizeMobile:{defaultValue:null,description:"",name:"pageSizeMobile",required:!0,type:{name:"number"}},pageSizeDesktop:{defaultValue:null,description:"",name:"pageSizeDesktop",required:!0,type:{name:"number"}},groupModalDueDateLinkToPageWithFeesText:{defaultValue:null,description:"",name:"groupModalDueDateLinkToPageWithFeesText",required:!0,type:{name:"string"}},showMoreText:{defaultValue:null,description:"",name:"showMoreText",required:!0,type:{name:"string"}},groupModalDueDateMaterialText:{defaultValue:null,description:"",name:"groupModalDueDateMaterialText",required:!0,type:{name:"string"}},groupModalGoToMaterialText:{defaultValue:null,description:"",name:"groupModalGoToMaterialText",required:!0,type:{name:"string"}},groupModalDueDateHeaderText:{defaultValue:null,description:"",name:"groupModalDueDateHeaderText",required:!0,type:{name:"string"}},groupModalReturnLibraryText:{defaultValue:null,description:"",name:"groupModalReturnLibraryText",required:!0,type:{name:"string"}},groupModalCheckboxText:{defaultValue:null,description:"",name:"groupModalCheckboxText",required:!0,type:{name:"string"}},groupModalHiddenLabelCheckboxOnMaterialText:{defaultValue:null,description:"",name:"groupModalHiddenLabelCheckboxOnMaterialText",required:!0,type:{name:"string"}},groupModalButtonText:{defaultValue:null,description:"",name:"groupModalButtonText",required:!0,type:{name:"string"}},groupModalDueDateWarningLoanOverdueText:{defaultValue:null,description:"",name:"groupModalDueDateWarningLoanOverdueText",required:!0,type:{name:"string"}},groupModalLoansAriaDescriptionText:{defaultValue:null,description:"",name:"groupModalLoansAriaDescriptionText",required:!0,type:{name:"string"}},groupModalLoansCloseModalAriaLabelText:{defaultValue:null,description:"",name:"groupModalLoansCloseModalAriaLabelText",required:!0,type:{name:"string"}},groupModalRenewLoanDeniedInterLibraryLoanText:{defaultValue:null,description:"",name:"groupModalRenewLoanDeniedInterLibraryLoanText",required:!0,type:{name:"string"}},groupModalRenewLoanDeniedMaxRenewalsReachedText:{defaultValue:null,description:"",name:"groupModalRenewLoanDeniedMaxRenewalsReachedText",required:!0,type:{name:"string"}},groupModalRenewLoanDeniedReservedText:{defaultValue:null,description:"",name:"groupModalRenewLoanDeniedReservedText",required:!0,type:{name:"string"}},renewGroupModalLoansButtonText:{defaultValue:null,description:"",name:"renewGroupModalLoansButtonText",required:!0,type:{name:"string"}},renewGroupModalLoansErrorStatusText:{defaultValue:null,description:"",name:"renewGroupModalLoansErrorStatusText",required:!0,type:{name:"string"}},renewGroupModalLoansErrorTitleText:{defaultValue:null,description:"",name:"renewGroupModalLoansErrorTitleText",required:!0,type:{name:"string"}},renewGroupModalLoansNoRenewalsPossibleErrorStatusText:{defaultValue:null,description:"",name:"renewGroupModalLoansNoRenewalsPossibleErrorStatusText",required:!0,type:{name:"string"}},renewGroupModalLoansNoRenewalsPossibleErrorTitleText:{defaultValue:null,description:"",name:"renewGroupModalLoansNoRenewalsPossibleErrorTitleText",required:!0,type:{name:"string"}},renewGroupModalLoansSuccessStatusText:{defaultValue:null,description:"",name:"renewGroupModalLoansSuccessStatusText",required:!0,type:{name:"string"}},renewGroupModalLoansSuccessTitleText:{defaultValue:null,description:"",name:"renewGroupModalLoansSuccessTitleText",required:!0,type:{name:"string"}},renewMaterialLoanButtonText:{defaultValue:null,description:"",name:"renewMaterialLoanButtonText",required:!0,type:{name:"string"}},renewMaterialLoanErrorStatusText:{defaultValue:null,description:"",name:"renewMaterialLoanErrorStatusText",required:!0,type:{name:"string"}},renewMaterialLoanErrorTitleText:{defaultValue:null,description:"",name:"renewMaterialLoanErrorTitleText",required:!0,type:{name:"string"}},renewMaterialLoanNoRenewalsPossibleErrorStatusText:{defaultValue:null,description:"",name:"renewMaterialLoanNoRenewalsPossibleErrorStatusText",required:!0,type:{name:"string"}},renewMaterialLoanNoRenewalsPossibleErrorTitleText:{defaultValue:null,description:"",name:"renewMaterialLoanNoRenewalsPossibleErrorTitleText",required:!0,type:{name:"string"}},renewMaterialLoanSuccessStatusText:{defaultValue:null,description:"",name:"renewMaterialLoanSuccessStatusText",required:!0,type:{name:"string"}},renewMaterialLoanSuccessTitleText:{defaultValue:null,description:"",name:"renewMaterialLoanSuccessTitleText",required:!0,type:{name:"string"}},renewProcessingText:{defaultValue:null,description:"",name:"renewProcessingText",required:!0,type:{name:"string"}},materialDetailsWarningLoanOverdueText:{defaultValue:null,description:"",name:"materialDetailsWarningLoanOverdueText",required:!0,type:{name:"string"}},materialDetailsPhysicalDueDateLabelText:{defaultValue:null,description:"",name:"materialDetailsPhysicalDueDateLabelText",required:!0,type:{name:"string"}},materialDetailsLoanDateLabelText:{defaultValue:null,description:"",name:"materialDetailsLoanDateLabelText",required:!0,type:{name:"string"}},materialDetailsMaterialNumberLabelText:{defaultValue:null,description:"",name:"materialDetailsMaterialNumberLabelText",required:!0,type:{name:"string"}},materialDetailsCloseModalAriaLabelText:{defaultValue:null,description:"",name:"materialDetailsCloseModalAriaLabelText",required:!0,type:{name:"string"}},materialDetailsLinkToPageWithFeesText:{defaultValue:null,description:"",name:"materialDetailsLinkToPageWithFeesText",required:!0,type:{name:"string"}},materialDetailsOverdueText:{defaultValue:null,description:"",name:"materialDetailsOverdueText",required:!0,type:{name:"string"}},feesPageUrl:{defaultValue:null,description:"",name:"feesPageUrl",required:!0,type:{name:"string"}},ereolenMyPageUrl:{defaultValue:null,description:"",name:"ereolenMyPageUrl",required:!0,type:{name:"string"}},materialDetailsModalAriaDescriptionText:{defaultValue:null,description:"",name:"materialDetailsModalAriaDescriptionText",required:!0,type:{name:"string"}},materialDetailsGoToEreolenText:{defaultValue:null,description:"",name:"materialDetailsGoToEreolenText",required:!0,type:{name:"string"}},materialDetailsDigitalDueDateLabelText:{defaultValue:null,description:"",name:"materialDetailsDigitalDueDateLabelText",required:!0,type:{name:"string"}},materialDetailsRenewLoanButtonText:{defaultValue:null,description:"",name:"materialDetailsRenewLoanButtonText",required:!0,type:{name:"string"}},acceptModalHeaderText:{defaultValue:null,description:"",name:"acceptModalHeaderText",required:!0,type:{name:"string"}},acceptModalAreYouSureText:{defaultValue:null,description:"",name:"acceptModalAreYouSureText",required:!0,type:{name:"string"}},acceptModalBodyText:{defaultValue:null,description:"",name:"acceptModalBodyText",required:!0,type:{name:"string"}},acceptModalCancelButtonText:{defaultValue:null,description:"",name:"acceptModalCancelButtonText",required:!0,type:{name:"string"}},acceptModalAcceptButtonText:{defaultValue:null,description:"",name:"acceptModalAcceptButtonText",required:!0,type:{name:"string"}},acceptModalAriaDescriptionText:{defaultValue:null,description:"",name:"acceptModalAriaDescriptionText",required:!0,type:{name:"string"}},acceptModalAriaLabelText:{defaultValue:null,description:"",name:"acceptModalAriaLabelText",required:!0,type:{name:"string"}},materialUrl:{defaultValue:null,description:"",name:"materialUrl",required:!0,type:{name:"string"}},searchUrl:{defaultValue:null,description:"",name:"searchUrl",required:!0,type:{name:"string"}},advancedSearchUrl:{defaultValue:null,description:"",name:"advancedSearchUrl",required:!0,type:{name:"string"}},fbsBaseUrl:{defaultValue:null,description:"",name:"fbsBaseUrl",required:!0,type:{name:"string"}},loanListEreolenUrl:{defaultValue:null,description:"",name:"loanListEreolenUrl",required:!0,type:{name:"string"}},publizonBaseUrl:{defaultValue:null,description:"",name:"publizonBaseUrl",required:!0,type:{name:"string"}},dplCmsBaseUrl:{defaultValue:null,description:"",name:"dplCmsBaseUrl",required:!0,type:{name:"string"}},coverBaseUrl:{defaultValue:null,description:"",name:"coverBaseUrl",required:!0,type:{name:"string"}},materialBaseUrl:{defaultValue:null,description:"",name:"materialBaseUrl",required:!0,type:{name:"string"}},fbiBaseUrl:{defaultValue:null,description:"",name:"fbiBaseUrl",required:!0,type:{name:"string"}},authUrl:{defaultValue:null,description:"",name:"authUrl",required:!0,type:{name:"string"}},ereolenHomepageUrl:{defaultValue:null,description:"",name:"ereolenHomepageUrl",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/loan-list/list/loan-list.entry.tsx#loanlistentry"]={docgenInfo:loanlistentry.__docgenInfo,name:"loanlistentry",path:"src/apps/loan-list/list/loan-list.entry.tsx#loanlistentry"})}catch(__react_docgen_typescript_loader_error){}var groupModalArgs=__webpack_require__("./src/core/storybook/groupModalArgs.ts"),loanGroupModalArgs=__webpack_require__("./src/core/storybook/loanGroupModalArgs.ts"),acceptFeesModalArgs=__webpack_require__("./src/core/storybook/acceptFeesModalArgs.ts"),materialDetailsModalArgs=__webpack_require__("./src/core/storybook/materialDetailsModalArgs.ts"),renewalArgs=__webpack_require__("./src/core/storybook/renewalArgs.ts");const loan_list_dev={title:"Apps / Loan list",component:loan_list_entry,argTypes:{...serviceUrlArgs.Z,...groupModalArgs.Z,...loanGroupModalArgs.Z,...renewalArgs.Z,...acceptFeesModalArgs.Z,...materialDetailsModalArgs.Z,...blockedArgs.Z,pageSizeDesktop:{defaultValue:10,control:{type:"number"}},pageSizeMobile:{defaultValue:5,control:{type:"number"}},expirationWarningDaysBeforeConfig:{defaultValue:"6",control:{type:"text"}},loanListAriaLabelListButtonText:{control:{type:"text"},defaultValue:"This button shows all loans in the list"},loanListAriaLabelStackButtonText:{control:{type:"text"},defaultValue:"This button filters the list, so only one the materials that have the same due date is shown"},loanListDigitalLoansEmptyListText:{control:{type:"text"},defaultValue:"You have no digital loans at the moment"},loanListDigitalLoansTitleText:{control:{type:"text"},defaultValue:"Digital loans"},loanListDigitalPhysicalLoansEmptyListText:{control:{type:"text"},defaultValue:"You have 0 loans at the moment"},loanListDueDateModalAriaLabelText:{control:{type:"text"},defaultValue:"This button opens a modal that covers the entire page and contains loans with the same due date as the loan currently in focus"},loanListMaterialLateFeeText:{control:{type:"text"},defaultValue:"You will be charged a fee, when the item is returned"},loanListMaterialDaysText:{control:{type:"text"},defaultValue:"days"},loanListMaterialDayText:{control:{type:"text"},defaultValue:"day"},loanListAdditionalMaterialsText:{control:{type:"text"},defaultValue:'{"type":"plural","text":["+ 1 other material","+ @count other materials"]}'},loanListPhysicalLoansEmptyListText:{control:{type:"text"},defaultValue:"You have no physical loans at the moment"},loanListPhysicalLoansTitleText:{control:{type:"text"},defaultValue:"Physical loans"},loanListRenewMultipleButtonExplanationText:{control:{type:"text"},defaultValue:"This button opens a modal that covers the entire page and contains loans with different due dates, if some of the loans in the modal are renewable you can renew them"},loanListRenewMultipleButtonText:{control:{type:"text"},defaultValue:"Renew several"},loanListStatusBadgeDangerText:{control:{type:"text"},defaultValue:"Expired"},loanListStatusBadgeWarningText:{control:{type:"text"},defaultValue:"Expiring soon"},loanListStatusCircleAriaLabelText:{control:{type:"text"},defaultValue:'{"type":"plural","text":["This material is due in one day","This material is due in @count days"]}'},loanListTitleText:{control:{type:"text"},defaultValue:"Your loans"},loanListToBeDeliveredDigitalMaterialText:{control:{type:"text"},defaultValue:"Due date @date"},loanListToBeDeliveredText:{control:{type:"text"},defaultValue:"Due date @date"},etAlText:{control:{type:"text"},defaultValue:"et al."},materialByAuthorText:{control:{type:"text"},defaultValue:"By"},materialAndAuthorText:{control:{type:"text"},defaultValue:"and"},publizonAudioBookText:{control:{type:"text"},defaultValue:"Audiobook"},publizonEbookText:{control:{type:"text"},defaultValue:"E-book"},publizonPodcastText:{control:{type:"text"},defaultValue:"Podcast"},groupModalHeaderText:{control:{type:"text"},defaultValue:"Renew several"},resultPagerStatusText:{defaultValue:"Showing @itemsShown out of @hitcount loans",control:{type:"text"}},groupModalGoToMaterialAriaLabelText:{defaultValue:"Go to @label material details",control:{type:"text"}}},decorators:[esm.j]},Template=props=>react.createElement(loan_list_entry,props),loan_list_dev_LoanListEntry=Template.bind({});loan_list_dev_LoanListEntry.args={};const{dueDateModal,loanDetails,allLoansId}=(0,modal_helpers.GM)(),LoanListDetailsModal=Template.bind({});LoanListDetailsModal.parameters={query:{modal:`${loanDetails}9562505082`}};const LoanListDueDateModal=Template.bind({});LoanListDueDateModal.parameters={query:{modal:`${dueDateModal}2022-12-15`}};const LoanListRenewLoansModal=Template.bind({});LoanListRenewLoansModal.parameters={query:{modal:allLoansId}}},"./src/apps/loan-list/materials/selectable-material/selectable-material.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>selectable_material});var react=__webpack_require__("./node_modules/react/index.js"),clsx=__webpack_require__("./node_modules/clsx/dist/clsx.mjs"),utils_text=__webpack_require__("./src/core/utils/text.tsx"),material_fetch_hoc=__webpack_require__("./src/apps/loan-list/materials/utils/material-fetch-hoc.tsx"),digital_material_fetch_hoc=__webpack_require__("./src/apps/loan-list/materials/utils/digital-material-fetch-hoc.tsx"),Checkbox=__webpack_require__("./src/components/checkbox/Checkbox.tsx"),authorYear=__webpack_require__("./src/components/author-year/authorYear.tsx"),reservation_info=__webpack_require__("./src/apps/reservation-list/reservation-material/reservation-info.tsx"),ArrowButton=__webpack_require__("./src/components/Buttons/ArrowButton.tsx"),helpers=__webpack_require__("./src/apps/loan-list/utils/helpers.ts");function listId(listItem){var _listItem$reservation;if(null!=listItem&&listItem.reservationIds&&listItem.reservationIds.length>0)return null==listItem||null===(_listItem$reservation=listItem.reservationIds)||void 0===_listItem$reservation?void 0:_listItem$reservation.join("-");if(listItem.loanId)return String(listItem.loanId);if(listItem.identifier)return listItem.identifier;if(listItem.faust)return String(listItem.faust);throw new Error("Unable to determine id for list item")}const selectable_material=(0,digital_material_fetch_hoc.Z)((0,material_fetch_hoc.Z)((({material,disabled,onMaterialChecked,selected,openDetailsModal,item,statusMessageComponentMobile,statusMessageComponentDesktop,statusBadgeComponent,focused,displayedMaterial})=>{const t=(0,utils_text.X)();if(!item)return null;const{authorsShort="",materialType,year="",title="",lang}=material||{},handleOnClick=()=>{openDetailsModal&&openDetailsModal(item)},handleOnKeyUp=e=>{!openDetailsModal||"Enter"!==e.key&&"Space"!==e.key||openDetailsModal(item)};return react.createElement("li",{className:"arrow arrow__hover--right-small"},react.createElement("div",{className:(0,clsx.Z)("list-materials",{"list-materials--disabled":disabled})},onMaterialChecked&&react.createElement("div",{className:"list-materials__checkbox mr-16"},!disabled&&title&&react.createElement(Checkbox.Z,{onChecked:()=>onMaterialChecked(item),id:listId(item),selected,disabled,focused,label:t("groupModalHiddenLabelCheckboxOnMaterialText",{placeholders:{"@label":title}}),hideLabel:!0}),disabled&&react.createElement(Checkbox.Z,{id:listId(item),disabled})),react.createElement("div",{className:"list-materials__content cursor-pointer",onClick:handleOnClick,onKeyUp:handleOnKeyUp,tabIndex:0},react.createElement("div",{className:"list-materials__content-status"},react.createElement("div",{className:"status-label status-label--outline "},materialType)),react.createElement("p",{className:"list-materials__content__header mt-8",lang:lang||""},title),react.createElement("p",{className:"text-small-caption"},react.createElement(authorYear.Z,{author:authorsShort,year}))),react.createElement("div",{className:"list-materials__status pl-4 cursor-pointer",role:"button",onClick:handleOnClick,onKeyUp:handleOnKeyUp,tabIndex:0},statusMessageComponentDesktop,react.createElement("div",null,statusBadgeComponent,statusMessageComponentMobile,displayedMaterial&&react.createElement(reservation_info.Z,{reservationInfo:displayedMaterial,showArrow:!1,showStatusCircleIcon:!1,reservationStatusClassNameOverride:"",isDigital:(0,helpers.u8)(displayedMaterial)}),openDetailsModal&&react.createElement("button",{type:"button",autoFocus:disabled&&focused,className:"list-reservation__note",onClick:()=>openDetailsModal(item),"aria-label":title?t("groupModalGoToMaterialAriaLabelText",{placeholders:{"@label":title}}):""},t("groupModalGoToMaterialText")))),openDetailsModal&&react.createElement("div",{className:"list-materials__arrow",role:"button",onClick:handleOnClick,onKeyUp:handleOnKeyUp,tabIndex:0},react.createElement(ArrowButton.Z,{arrowLabelledBy:listId(item),cursorPointer:!0,clickEventHandler:()=>openDetailsModal(item)}))))})));try{selectablematerial.displayName="selectablematerial",selectablematerial.__docgenInfo={description:"",displayName:"selectablematerial",props:{identifier:{defaultValue:null,description:"",name:"identifier",required:!1,type:{name:"string | null | undefined"}},disabled:{defaultValue:null,description:"",name:"disabled",required:!1,type:{name:"boolean | undefined"}},item:{defaultValue:null,description:"",name:"item",required:!1,type:{name:"Nullable>"}},onMaterialChecked:{defaultValue:null,description:"",name:"onMaterialChecked",required:!1,type:{name:"((listItem: Nullable>) => void) | undefined"}},openDetailsModal:{defaultValue:null,description:"",name:"openDetailsModal",required:!1,type:{name:"((item: Nullable>) => void) | undefined"}},selected:{defaultValue:null,description:"",name:"selected",required:!1,type:{name:"boolean | undefined"}},statusMessageComponentMobile:{defaultValue:null,description:"",name:"statusMessageComponentMobile",required:!0,type:{name:"ReactNode"}},statusMessageComponentDesktop:{defaultValue:null,description:"",name:"statusMessageComponentDesktop",required:!0,type:{name:"ReactNode"}},statusBadgeComponent:{defaultValue:null,description:"",name:"statusBadgeComponent",required:!0,type:{name:"ReactNode"}},focused:{defaultValue:null,description:"",name:"focused",required:!0,type:{name:"boolean"}},displayedMaterial:{defaultValue:null,description:"",name:"displayedMaterial",required:!1,type:{name:"Nullable> | undefined"}},digitalMaterial:{defaultValue:null,description:"",name:"digitalMaterial",required:!1,type:{name:"Product | null | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/loan-list/materials/selectable-material/selectable-material.tsx#selectablematerial"]={docgenInfo:selectablematerial.__docgenInfo,name:"selectablematerial",path:"src/apps/loan-list/materials/selectable-material/selectable-material.tsx#selectablematerial"})}catch(__react_docgen_typescript_loader_error){}},"./src/apps/loan-list/materials/stackable-material/material-info.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_components_author_year_authorYear__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/components/author-year/authorYear.tsx"),_components_cover_cover__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/components/cover/cover.tsx");const __WEBPACK_DEFAULT_EXPORT__=({material,isbnForCover,periodical,openDetailsModal,focused,arrowLabelledBy,children})=>{const{authorsShort,materialType,year,title,description,pid,series,lang}=material||{},coverId=pid||isbnForCover;return react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"list-reservation__material"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",null,react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_cover_cover__WEBPACK_IMPORTED_MODULE_2__.Y,{id:coverId,idType:pid?"pid":"isbn",size:"small",animate:!1,description:description||""})),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"list-reservation__information"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",null,react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"status-label status-label--outline"},materialType)),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"list-reservation__about"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("button",{onClick:()=>openDetailsModal(),type:"button",autoFocus:focused,lang:lang||"",className:"list-reservation__header color-secondary-gray"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("span",{id:arrowLabelledBy,className:"list-reservation__header__text"},title)),react__WEBPACK_IMPORTED_MODULE_0__.createElement("p",{"data-cy":"reservation-about-author",className:"text-small-caption color-secondary-gray"},react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_author_year_authorYear__WEBPACK_IMPORTED_MODULE_1__.Z,{author:authorsShort||"",year:year||""})),periodical&&react__WEBPACK_IMPORTED_MODULE_0__.createElement("p",{"data-cy":"reservation-about-periodical",className:"text-small-caption color-secondary-gray"},periodical),series&&react__WEBPACK_IMPORTED_MODULE_0__.createElement("p",{"data-cy":"reservation-about-series",className:"text-small-caption color-secondary-gray"},series)),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",null,children)))};try{materialinfo.displayName="materialinfo",materialinfo.__docgenInfo={description:"",displayName:"materialinfo",props:{material:{defaultValue:null,description:"",name:"material",required:!0,type:{name:"Nullable>"}},isbnForCover:{defaultValue:null,description:"",name:"isbnForCover",required:!0,type:{name:"string"}},periodical:{defaultValue:null,description:"",name:"periodical",required:!1,type:{name:"string | null | undefined"}},openDetailsModal:{defaultValue:null,description:"",name:"openDetailsModal",required:!0,type:{name:"() => void"}},focused:{defaultValue:null,description:"",name:"focused",required:!0,type:{name:"boolean"}},arrowLabelledBy:{defaultValue:null,description:"",name:"arrowLabelledBy",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/loan-list/materials/stackable-material/material-info.tsx#materialinfo"]={docgenInfo:materialinfo.__docgenInfo,name:"materialinfo",path:"src/apps/loan-list/materials/stackable-material/material-info.tsx#materialinfo"})}catch(__react_docgen_typescript_loader_error){}},"./src/apps/loan-list/materials/utils/digital-material-fetch-hoc.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_core_publizon_publizon__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/core/publizon/publizon.ts"),_core_utils_helpers_list_mapper__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/core/utils/helpers/list-mapper.ts");function _extends(){return _extends=Object.assign?Object.assign.bind():function(target){for(var i=1;i({item,...props})=>{if(item.faust)return react__WEBPACK_IMPORTED_MODULE_0__.createElement(Component,_extends({},props,{item}));if(item.identifier){const[digitalMaterial,setDigitalMaterial]=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(),{data:productsData,isSuccess:isSuccessDigital}=(0,_core_publizon_publizon__WEBPACK_IMPORTED_MODULE_1__.tq)(item.identifier);return(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)((()=>{productsData&&isSuccessDigital&&productsData.product&&setDigitalMaterial((0,_core_utils_helpers_list_mapper__WEBPACK_IMPORTED_MODULE_2__.U9)(productsData.product))}),[productsData,isSuccessDigital]),digitalMaterial?react__WEBPACK_IMPORTED_MODULE_0__.createElement(Component,_extends({},props,{item,material:digitalMaterial})):null}return null};try{digitalmaterialfetchhoc.displayName="digitalmaterialfetchhoc",digitalmaterialfetchhoc.__docgenInfo={description:"",displayName:"digitalmaterialfetchhoc",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/loan-list/materials/utils/digital-material-fetch-hoc.tsx#digitalmaterialfetchhoc"]={docgenInfo:digitalmaterialfetchhoc.__docgenInfo,name:"digitalmaterialfetchhoc",path:"src/apps/loan-list/materials/utils/digital-material-fetch-hoc.tsx#digitalmaterialfetchhoc"})}catch(__react_docgen_typescript_loader_error){}},"./src/apps/loan-list/materials/utils/material-fetch-hoc.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_core_dbc_gateway_generated_graphql__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/core/dbc-gateway/generated/graphql.tsx"),_core_utils_helpers_list_mapper__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/core/utils/helpers/list-mapper.ts");function _extends(){return _extends=Object.assign?Object.assign.bind():function(target){for(var i=1;i({item,...props})=>{if(null!=item&&item.identifier)return react__WEBPACK_IMPORTED_MODULE_0__.createElement(Component,_extends({},props,{item}));if(null!=item&&item.faust){const[material,setMaterial]=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)();let manifestation=null;if(item.reservationIds&&item.reservationIds.length>1){const{isSuccess,data}=(0,_core_dbc_gateway_generated_graphql__WEBPACK_IMPORTED_MODULE_1__.Ch)({faust:item.faust});isSuccess&&null!=data&&data.manifestation&&(manifestation=data.manifestation.ownerWork.manifestations.bestRepresentation)}else{const{isSuccess,data}=(0,_core_dbc_gateway_generated_graphql__WEBPACK_IMPORTED_MODULE_1__.BN)({faust:item.faust});isSuccess&&null!=data&&data.manifestation&&(manifestation=data.manifestation)}return(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)((()=>{manifestation&&setMaterial((0,_core_utils_helpers_list_mapper__WEBPACK_IMPORTED_MODULE_2__.L6)(manifestation))}),[manifestation]),null===manifestation?null:material?react__WEBPACK_IMPORTED_MODULE_0__.createElement(Component,_extends({},props,{item,material})):FallbackComponent?react__WEBPACK_IMPORTED_MODULE_0__.createElement(FallbackComponent,null):null}return null}},"./src/apps/loan-list/materials/utils/status-badge.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_core_utils_helpers_general__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/core/utils/helpers/general.ts"),_core_utils_useLoanThresholds__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/core/utils/useLoanThresholds.tsx");const __WEBPACK_DEFAULT_EXPORT__=({badgeDate,warningText,showBadgeWithDueDate=!1,dangerText,infoText,neutralText})=>{const threshold=(0,_core_utils_useLoanThresholds__WEBPACK_IMPORTED_MODULE_2__.Z)(),daysBetweenTodayAndDue=badgeDate?(0,_core_utils_helpers_general__WEBPACK_IMPORTED_MODULE_1__.q7)(badgeDate):0;return daysBetweenTodayAndDue{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_core_utils_helpers_general__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/core/utils/helpers/general.ts");const __WEBPACK_DEFAULT_EXPORT__=({color,percent,children})=>{const{default:defaultColor}=(0,_core_utils_helpers_general__WEBPACK_IMPORTED_MODULE_1__.EC)(),usedColor=color||defaultColor;return react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"counter",style:{background:`radial-gradient( closest-side, var(--parent-bg-color) calc(100% - 3px), transparent calc(100% - 2px), transparent 0 100% ), conic-gradient(${usedColor} ${percent}%, #DBDBDB 0)`}},children)};try{statuscircleicon.displayName="statuscircleicon",statuscircleicon.__docgenInfo={description:"",displayName:"statuscircleicon",props:{color:{defaultValue:null,description:"",name:"color",required:!1,type:{name:"string | undefined"}},percent:{defaultValue:null,description:"",name:"percent",required:!0,type:{name:"number"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/loan-list/materials/utils/status-circle-icon.tsx#statuscircleicon"]={docgenInfo:statuscircleicon.__docgenInfo,name:"statuscircleicon",path:"src/apps/loan-list/materials/utils/status-circle-icon.tsx#statuscircleicon"})}catch(__react_docgen_typescript_loader_error){}},"./src/apps/loan-list/materials/utils/status-circle.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_check_svg__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/basic/icon-check.svg"),_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_check_svg__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_check_svg__WEBPACK_IMPORTED_MODULE_1__),_status_circle_icon__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/apps/loan-list/materials/utils/status-circle-icon.tsx"),_core_utils_helpers_general__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/core/utils/helpers/general.ts"),_core_utils_text__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/core/utils/text.tsx"),_core_utils_useLoanThresholds__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./src/core/utils/useLoanThresholds.tsx");const __WEBPACK_DEFAULT_EXPORT__=({loanDate,dueDate})=>{const t=(0,_core_utils_text__WEBPACK_IMPORTED_MODULE_4__.X)(),colors=(0,_core_utils_helpers_general__WEBPACK_IMPORTED_MODULE_3__.EC)(),threshold=(0,_core_utils_useLoanThresholds__WEBPACK_IMPORTED_MODULE_5__.Z)();let color=colors.default,percent=100,daysBetweenTodayAndDue=null,daysBetweenLoanAndDue=null;return dueDate?(daysBetweenTodayAndDue=(0,_core_utils_helpers_general__WEBPACK_IMPORTED_MODULE_3__.q7)(dueDate),daysBetweenLoanAndDue=(0,_core_utils_helpers_general__WEBPACK_IMPORTED_MODULE_3__.Sz)(dueDate,loanDate),percent=100-daysBetweenTodayAndDue/daysBetweenLoanAndDue*100,percent<0&&(percent=100),daysBetweenTodayAndDue0?daysBetweenTodayAndDue:0," "),react__WEBPACK_IMPORTED_MODULE_0__.createElement("span",{className:"counter__label color-secondary-gray"},t(1===daysBetweenTodayAndDue?"loanListMaterialDayText":"loanListMaterialDaysText"))),null===daysBetweenTodayAndDue&&null===daysBetweenTodayAndDue&&react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment,null,react__WEBPACK_IMPORTED_MODULE_0__.createElement("img",{className:"counter__icon",src:_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_check_svg__WEBPACK_IMPORTED_MODULE_1___default(),alt:""}),react__WEBPACK_IMPORTED_MODULE_0__.createElement("span",{className:"counter__label"},t("readyForLoanCounterLabelText"))))};try{statuscircle.displayName="statuscircle",statuscircle.__docgenInfo={description:"",displayName:"statuscircle",props:{dueDate:{defaultValue:null,description:"",name:"dueDate",required:!1,type:{name:"string | null | undefined"}},loanDate:{defaultValue:null,description:"",name:"loanDate",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/loan-list/materials/utils/status-circle.tsx#statuscircle"]={docgenInfo:statuscircle.__docgenInfo,name:"statuscircle",path:"src/apps/loan-list/materials/utils/status-circle.tsx#statuscircle"})}catch(__react_docgen_typescript_loader_error){}},"./src/apps/loan-list/materials/utils/warning-bar.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_warning_svg__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/basic/icon-warning.svg"),_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_warning_svg__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_warning_svg__WEBPACK_IMPORTED_MODULE_1__),_components_atoms_links_Link__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/components/atoms/links/Link.tsx"),_components_Buttons_LinkButton__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/components/Buttons/LinkButton.tsx");const __WEBPACK_DEFAULT_EXPORT__=({linkText,overdueText,rightText,rightButtonText,rightButtonAriaLabelText,leftLink,rightLink})=>{const labelId=(0,react__WEBPACK_IMPORTED_MODULE_0__.useId)();return react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"warning-bar bg-global-secondary","data-cy":"warning-bar"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"warning-bar__left"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("img",{className:"warning-bar__icon",src:_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_warning_svg__WEBPACK_IMPORTED_MODULE_1___default(),alt:""}),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",null,react__WEBPACK_IMPORTED_MODULE_0__.createElement("p",{className:"text-body-medium-regular color-primary-black","data-cy":"warning-bar-text"},overdueText,leftLink&&react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_atoms_links_Link__WEBPACK_IMPORTED_MODULE_2__.Z,{href:leftLink,className:"link-tag color-secondary-gray ml-8"},linkText)))),rightText&&react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"warning-bar__right"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("p",{className:"text-body-medium-medium warning-bar__owes","data-cy":"warning-bar-right-text"},rightText),react__WEBPACK_IMPORTED_MODULE_0__.createElement("span",{className:"hide-visually",id:labelId},rightButtonAriaLabelText),rightLink&&react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_Buttons_LinkButton__WEBPACK_IMPORTED_MODULE_3__.Z,{dataCy:"warning-bar-right-link",url:rightLink,size:"small",variant:"filled",ariaLabelledBy:labelId},rightButtonText)))};try{warningbar.displayName="warningbar",warningbar.__docgenInfo={description:"",displayName:"warningbar",props:{linkText:{defaultValue:null,description:"",name:"linkText",required:!1,type:{name:"string | undefined"}},overdueText:{defaultValue:null,description:"",name:"overdueText",required:!1,type:{name:"string | undefined"}},rightButtonText:{defaultValue:null,description:"",name:"rightButtonText",required:!1,type:{name:"string | undefined"}},rightButtonAriaLabelText:{defaultValue:null,description:"",name:"rightButtonAriaLabelText",required:!1,type:{name:"string | undefined"}},rightText:{defaultValue:null,description:"",name:"rightText",required:!1,type:{name:"string | undefined"}},leftLink:{defaultValue:null,description:"",name:"leftLink",required:!1,type:{name:"URL | undefined"}},rightLink:{defaultValue:null,description:"",name:"rightLink",required:!1,type:{name:"URL | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/loan-list/materials/utils/warning-bar.tsx#warningbar"]={docgenInfo:warningbar.__docgenInfo,name:"warningbar",path:"src/apps/loan-list/materials/utils/warning-bar.tsx#warningbar"})}catch(__react_docgen_typescript_loader_error){}},"./src/apps/loan-list/modal/material-details-modal.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Wu:()=>reservationDetailsModalId,ZP:()=>__WEBPACK_DEFAULT_EXPORT__,ae:()=>loanDetailsModalId});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_core_utils_modal__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/core/utils/modal.tsx"),_core_utils_text__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/core/utils/text.tsx"),_core_utils_types_loan_type__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/core/utils/types/loan-type.ts"),_core_utils_helpers_modal_helpers__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/core/utils/helpers/modal-helpers.ts");function reservationDetailsModalId(reservation){return`${String((0,_core_utils_helpers_modal_helpers__WEBPACK_IMPORTED_MODULE_3__.GM)().reservationDetails)}${String(reservation.identifier||reservation.faust)}`}function loanDetailsModalId(loan){return`${String((0,_core_utils_helpers_modal_helpers__WEBPACK_IMPORTED_MODULE_3__.GM)().loanDetails)}${(0,_core_utils_types_loan_type__WEBPACK_IMPORTED_MODULE_4__.e)(loan)}`}const __WEBPACK_DEFAULT_EXPORT__=({modalId,children})=>{const t=(0,_core_utils_text__WEBPACK_IMPORTED_MODULE_2__.X)();return modalId?react__WEBPACK_IMPORTED_MODULE_0__.createElement(_core_utils_modal__WEBPACK_IMPORTED_MODULE_1__.Z,{modalId,classNames:"modal-details",closeModalAriaLabelText:t("materialDetailsCloseModalAriaLabelText"),screenReaderModalDescriptionText:t("materialDetailsModalAriaDescriptionText")},children):null};try{reservationDetailsModalId.displayName="reservationDetailsModalId",reservationDetailsModalId.__docgenInfo={description:"",displayName:"reservationDetailsModalId",props:{dateOfReservation:{defaultValue:null,description:"",name:"dateOfReservation",required:!1,type:{name:"string | null | undefined"}},expiryDate:{defaultValue:null,description:"",name:"expiryDate",required:!1,type:{name:"string | null | undefined"}},pickupDeadline:{defaultValue:null,description:"",name:"pickupDeadline",required:!1,type:{name:"string | null | undefined"}},numberInQueue:{defaultValue:null,description:"",name:"numberInQueue",required:!1,type:{name:"number | null | undefined"}},state:{defaultValue:null,description:"",name:"state",required:!1,type:{name:"string | null | undefined"}},expectedRedeemDateUtc:{defaultValue:null,description:"",name:"expectedRedeemDateUtc",required:!1,type:{name:"string | null | undefined"}},pickupNumber:{defaultValue:null,description:'The reservation number. This is, contrary to the name, a string containing, as an example, "Reserveringshylde 111"',name:"pickupNumber",required:!1,type:{name:"string | null | undefined"}},pickupBranch:{defaultValue:null,description:"",name:"pickupBranch",required:!1,type:{name:"string | null | undefined"}},title:{defaultValue:null,description:"",name:"title",required:!1,type:{name:"string | null | undefined"}},periodical:{defaultValue:null,description:"",name:"periodical",required:!1,type:{name:"string | null | undefined"}},faust:{defaultValue:null,description:"",name:"faust",required:!1,type:{name:"`${number}` | null | undefined"}},identifier:{defaultValue:null,description:"",name:"identifier",required:!1,type:{name:"string | null | undefined"}},reservationIds:{defaultValue:null,description:"",name:"reservationIds",required:!1,type:{name:"number[] | null | undefined"}},loanId:{defaultValue:null,description:"",name:"loanId",required:!1,type:{name:"number | null | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/loan-list/modal/material-details-modal.tsx#reservationDetailsModalId"]={docgenInfo:reservationDetailsModalId.__docgenInfo,name:"reservationDetailsModalId",path:"src/apps/loan-list/modal/material-details-modal.tsx#reservationDetailsModalId"})}catch(__react_docgen_typescript_loader_error){}try{loanDetailsModalId.displayName="loanDetailsModalId",loanDetailsModalId.__docgenInfo={description:"",displayName:"loanDetailsModalId",props:{dueDate:{defaultValue:null,description:"",name:"dueDate",required:!1,type:{name:"string | null | undefined"}},loanDate:{defaultValue:null,description:"",name:"loanDate",required:!1,type:{name:"string | null | undefined"}},periodical:{defaultValue:null,description:"",name:"periodical",required:!1,type:{name:"string | null | undefined"}},isRenewable:{defaultValue:null,description:"",name:"isRenewable",required:!0,type:{name:"boolean"}},materialItemNumber:{defaultValue:null,description:"",name:"materialItemNumber",required:!1,type:{name:"string | null | undefined"}},renewalStatusList:{defaultValue:null,description:"",name:"renewalStatusList",required:!0,type:{name:"string[]"}},loanType:{defaultValue:null,description:"",name:"loanType",required:!0,type:{name:"string | null"}},faust:{defaultValue:null,description:"",name:"faust",required:!1,type:{name:"`${number}` | null | undefined"}},identifier:{defaultValue:null,description:"",name:"identifier",required:!1,type:{name:"string | null | undefined"}},reservationIds:{defaultValue:null,description:"",name:"reservationIds",required:!1,type:{name:"number[] | null | undefined"}},loanId:{defaultValue:null,description:"",name:"loanId",required:!1,type:{name:"number | null | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/loan-list/modal/material-details-modal.tsx#loanDetailsModalId"]={docgenInfo:loanDetailsModalId.__docgenInfo,name:"loanDetailsModalId",path:"src/apps/loan-list/modal/material-details-modal.tsx#loanDetailsModalId"})}catch(__react_docgen_typescript_loader_error){}try{materialdetailsmodal.displayName="materialdetailsmodal",materialdetailsmodal.__docgenInfo={description:"",displayName:"materialdetailsmodal",props:{modalId:{defaultValue:null,description:"",name:"modalId",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/loan-list/modal/material-details-modal.tsx#materialdetailsmodal"]={docgenInfo:materialdetailsmodal.__docgenInfo,name:"materialdetailsmodal",path:"src/apps/loan-list/modal/material-details-modal.tsx#materialdetailsmodal"})}catch(__react_docgen_typescript_loader_error){}},"./src/apps/loan-list/modal/material-details.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>material_details});var react=__webpack_require__("./node_modules/react/index.js"),Reservations=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/Reservations.svg"),Reservations_default=__webpack_require__.n(Reservations),Loans=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/Loans.svg"),Loans_default=__webpack_require__.n(Loans),Ebook=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/Ebook.svg"),Ebook_default=__webpack_require__.n(Ebook),icon_btn_external_link=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/buttons/icon-btn-external-link.svg"),icon_btn_external_link_default=__webpack_require__.n(icon_btn_external_link),utils_text=__webpack_require__("./src/core/utils/text.tsx"),helpers=__webpack_require__("./src/apps/loan-list/utils/helpers.ts"),general=__webpack_require__("./src/core/utils/helpers/general.ts"),status_badge=__webpack_require__("./src/apps/loan-list/materials/utils/status-badge.tsx"),warning_bar=__webpack_require__("./src/apps/loan-list/materials/utils/warning-bar.tsx"),material_fetch_hoc=__webpack_require__("./src/apps/loan-list/materials/utils/material-fetch-hoc.tsx"),digital_material_fetch_hoc=__webpack_require__("./src/apps/loan-list/materials/utils/digital-material-fetch-hoc.tsx"),list_details=__webpack_require__("./src/components/list-details/list-details.tsx"),modal_details_header=__webpack_require__("./src/components/modal-details-header/modal-details-header.tsx"),es=__webpack_require__("./node_modules/react-query/es/index.js"),fbs=__webpack_require__("./src/core/fbs/fbs.ts"),Button=__webpack_require__("./src/components/Buttons/Button.tsx"),renewal=__webpack_require__("./src/core/utils/helpers/renewal.ts");const renew_button=({loanId,renewable,classNames,hideOnMobile,setRenewingStatus,renewingStatus,setRenewingResponse})=>{const t=(0,utils_text.X)(),queryClient=(0,es.useQueryClient)(),{mutate}=(0,fbs.Gb)(),label=(0,renewal.CO)({isRenewable:renewable,renewingStatus,t}),renew=(0,react.useCallback)((renewId=>{setRenewingStatus("pending"),mutate({data:[renewId]},{onSuccess:result=>{result&&(queryClient.invalidateQueries((0,fbs._0)()),setRenewingResponse(result),setRenewingStatus("success"))},onError:()=>{setRenewingStatus("error")}})}),[mutate,queryClient,setRenewingResponse,setRenewingStatus]);return react.createElement("div",{className:`${hideOnMobile&&"modal-details__buttons--hide-on-mobile"} modal-details__buttons`},react.createElement(Button.z,{dataCy:"material-renew-button",size:"small",variant:"filled",disabled:!renewable||"pending"===renewingStatus,onClick:()=>renew(loanId),classNames,label,buttonType:"none",collapsible:!1}))};try{renewbutton.displayName="renewbutton",renewbutton.__docgenInfo={description:"",displayName:"renewbutton",props:{loanId:{defaultValue:null,description:"",name:"loanId",required:!0,type:{name:"number"}},renewable:{defaultValue:null,description:"",name:"renewable",required:!0,type:{name:"boolean"}},classNames:{defaultValue:null,description:"",name:"classNames",required:!1,type:{name:"string | undefined"}},hideOnMobile:{defaultValue:null,description:"",name:"hideOnMobile",required:!0,type:{name:"boolean"}},setRenewingStatus:{defaultValue:null,description:"",name:"setRenewingStatus",required:!0,type:{name:"(status: RequestStatus) => void"}},renewingStatus:{defaultValue:null,description:"",name:"renewingStatus",required:!0,type:{name:"enum",value:[{value:'"success"'},{value:'"idle"'},{value:'"pending"'},{value:'"error"'}]}},setRenewingResponse:{defaultValue:null,description:"",name:"setRenewingResponse",required:!0,type:{name:"(response: RenewedLoanV2[] | null) => void"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/loan-list/modal/renew-button.tsx#renewbutton"]={docgenInfo:renewbutton.__docgenInfo,name:"renewbutton",path:"src/apps/loan-list/modal/renew-button.tsx#renewbutton"})}catch(__react_docgen_typescript_loader_error){}var Link=__webpack_require__("./src/components/atoms/links/Link.tsx"),url=__webpack_require__("./src/core/utils/url.tsx"),RenewalModalMessage=__webpack_require__("./src/components/renewal/RenewalModalMessage.tsx"),date=__webpack_require__("./src/core/utils/helpers/date.ts");const material_details=(0,digital_material_fetch_hoc.Z)((0,material_fetch_hoc.Z)((({loan,material,modalId})=>{const[renewingStatus,setRenewingStatus]=(0,react.useState)("idle"),[renewingResponse,setRenewingResponse]=(0,react.useState)(null),t=(0,utils_text.X)(),u=(0,url.J_)(),ereolenMyPageUrl=u("ereolenMyPageUrl"),viewFeesAndCompensationRatesUrl=u("viewFeesAndCompensationRatesUrl");if(!loan)return null;const{dueDate,faust,loanId,identifier,isRenewable,materialItemNumber,loanDate,periodical}=loan,{authors,materialType,year,title,pid,description,series}=material||{};return react.createElement(react.Fragment,null,!["idle","pending"].includes(renewingStatus)&&react.createElement(RenewalModalMessage.Z,{messageType:"success"===renewingStatus?"success":"error",renewingResponse,modalId,setRenewingStatus,texts:{successTitleText:t("renewMaterialLoanSuccessTitleText"),successStatusText:t("renewMaterialLoanSuccessStatusText"),noRenewalsPossibleErrorTitleText:t("renewMaterialLoanNoRenewalsPossibleErrorTitleText"),noRenewalsPossibleErrorStatusText:t("renewMaterialLoanNoRenewalsPossibleErrorStatusText"),errorTitleText:t("renewMaterialLoanErrorTitleText"),errorStatusText:t("renewMaterialLoanErrorStatusText"),buttonText:t("renewMaterialLoanButtonText")}}),["idle","pending"].includes(renewingStatus)&&react.createElement("div",{className:"modal-details__container"},react.createElement(modal_details_header.Z,{year,authors,title,periodical,series,pid,description,materialType,isbnForCover:identifier||""},dueDate&&react.createElement(status_badge.Z,{showBadgeWithDueDate:!0,badgeDate:dueDate,dangerText:t("materialDetailsOverdueText")})),!(0,helpers.u8)(loan)&&!!faust&&!!loanId&&react.createElement(renew_button,{classNames:"modal-details__buttons modal-details__buttons--hide-on-mobile",loanId,renewable:isRenewable,hideOnMobile:!0,renewingStatus,setRenewingStatus,setRenewingResponse}),(0,helpers.u8)(loan)&&react.createElement("div",{className:"modal-details__buttons modal-details__buttons--hide-on-mobile"},react.createElement(Link.Z,{href:ereolenMyPageUrl,className:"btn-primary btn-filled btn-small arrow__hover--right-small"},t("materialDetailsGoToEreolenText"),react.createElement("img",{src:icon_btn_external_link_default(),className:"btn-icon invert",alt:""}))),dueDate&&(0,general.cf)(dueDate)&&react.createElement("div",{className:"modal-details__warning"},react.createElement(warning_bar.Z,{leftLink:viewFeesAndCompensationRatesUrl,linkText:t("materialDetailsLinkToPageWithFeesText"),overdueText:t("materialDetailsWarningLoanOverdueText")})),react.createElement("div",{className:"modal-details__list"},dueDate&&!(0,helpers.u8)(loan)&&react.createElement(list_details.Z,{icon:Loans_default(),labels:(0,date.p6)(dueDate),title:t("materialDetailsPhysicalDueDateLabelText")}),dueDate&&(0,helpers.u8)(loan)&&react.createElement(list_details.Z,{icon:Loans_default(),labels:(0,date.p6)(dueDate),title:t("materialDetailsDigitalDueDateLabelText")}),loanDate&&react.createElement(list_details.Z,{icon:Reservations_default(),labels:(0,date.p6)(loanDate),title:t("materialDetailsLoanDateLabelText")}),materialItemNumber&&react.createElement(list_details.Z,{icon:Ebook_default(),labels:materialItemNumber,title:t("materialDetailsMaterialNumberLabelText")})),!(0,helpers.u8)(loan)&&!!faust&&!!loanId&&react.createElement(renew_button,{classNames:"modal-details__buttons__full-width",loanId,renewable:isRenewable,hideOnMobile:!1,renewingStatus,setRenewingStatus,setRenewingResponse}),(0,helpers.u8)(loan)&&react.createElement("div",{className:"modal-details__buttons"},react.createElement(Link.Z,{href:ereolenMyPageUrl,className:"btn-primary btn-filled btn-small arrow__hover--right-small modal-details__buttons__full-width"},t("materialDetailsGoToEreolenText"),react.createElement("img",{src:icon_btn_external_link_default(),className:"btn-icon invert",alt:""})))))})));try{materialdetails.displayName="materialdetails",materialdetails.__docgenInfo={description:"",displayName:"materialdetails",props:{loan:{defaultValue:null,description:"",name:"loan",required:!0,type:{name:"LoanType | null"}},modalId:{defaultValue:null,description:"",name:"modalId",required:!0,type:{name:"string"}},digitalMaterial:{defaultValue:null,description:"",name:"digitalMaterial",required:!1,type:{name:"Product | null | undefined"}},item:{defaultValue:null,description:"",name:"item",required:!1,type:{name:"Nullable>"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/loan-list/modal/material-details.tsx#materialdetails"]={docgenInfo:materialdetails.__docgenInfo,name:"materialdetails",path:"src/apps/loan-list/modal/material-details.tsx#materialdetails"})}catch(__react_docgen_typescript_loader_error){}},"./src/apps/loan-list/utils/helpers.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Kp:()=>removeLoansWithDuplicateDueDate,Re:()=>loansAreEmpty,TE:()=>getFromListByKey,li:()=>getStatusText,t4:()=>getStackedItems,u8:()=>isDigital,ug:()=>materialsAreStacked});const removeLoansWithDuplicateDueDate=(date,list)=>list.filter((({dueDate})=>dueDate===date)),loansAreEmpty=list=>Array.isArray(list)&&0===list.length,materialsAreStacked=materialsInStack=>materialsInStack>0,getFromListByKey=(list,key,value)=>list.filter((loan=>String(loan[key])===value)),getStatusText=(status,t)=>{switch(status){case"deniedMaxRenewalsReached":return t("groupModalRenewLoanDeniedMaxRenewalsReachedText");case"deniedReserved":return t("groupModalRenewLoanDeniedReservedText");default:return""}},isDigital=loan=>Boolean(loan.identifier),getStackedItems=(view,list,itemsShown,dueDates)=>{let returnLoans=[];if("stack"===view&&dueDates){let dueDatesCopy=[...dueDates,null];dueDatesCopy=dueDatesCopy.slice(0,itemsShown),dueDatesCopy.forEach((uniqueDueDate=>{returnLoans=returnLoans.concat(list.filter((({dueDate})=>dueDate===uniqueDueDate)))}))}return returnLoans}},"./src/apps/material/helper.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Ft:()=>divideManifestationsByMaterialType,zw:()=>filterManifestationsByType,LJ:()=>getAllIdentifiers,lm:()=>getAvailability,jg:()=>getBestMaterialTypeForWork,UH:()=>getBlacklistedQueryArgs,af:()=>getDbcVerifiedSubjectsFirst,Uo:()=>getDetailsListData,qY:()=>getInfomediaIds,tb:()=>getManifestationAudience,An:()=>getManifestationAuthors,PI:()=>getManifestationContributors,jr:()=>getManifestationEdition,G2:()=>getManifestationGenreAndForm,QL:()=>getManifestationIsbn,hQ:()=>getManifestationLanguageIsoCode,Jl:()=>getManifestationLanguages,I_:()=>getManifestationMaterialTypes,Ey:()=>getManifestationNumberOfPages,sr:()=>getManifestationOriginalTitle,CU:()=>getManifestationPublisher,Oe:()=>getManifestationsOrderByTypeAndYear,qr:()=>getNumberedSeries,Vq:()=>getTotalHoldings,iT:()=>getTotalReservations,xI:()=>getUniqueMovies,WJ:()=>isAnyManifestationAvailableOnBranch,VC:()=>isParallelReservation,Aw:()=>reservationModalId,r0:()=>totalAvailableMaterials,rM:()=>totalBranchesHaveMaterial,Lt:()=>useGetHoldings});var head=__webpack_require__("./node_modules/lodash/head.js"),head_default=__webpack_require__.n(head),uniq=__webpack_require__("./node_modules/lodash/uniq.js"),uniq_default=__webpack_require__.n(uniq),uniqBy=__webpack_require__("./node_modules/lodash/uniqBy.js"),uniqBy_default=__webpack_require__.n(uniqBy),groupBy=__webpack_require__("./node_modules/lodash/groupBy.js"),groupBy_default=__webpack_require__.n(groupBy),compact=__webpack_require__("./node_modules/lodash/compact.js"),compact_default=__webpack_require__.n(compact),general=__webpack_require__("./src/core/utils/helpers/general.ts"),material_type=__webpack_require__("./src/core/utils/types/material-type.ts"),graphql=__webpack_require__("./src/core/dbc-gateway/generated/graphql.tsx"),helper=__webpack_require__("./src/components/material/material-buttons/helper.ts"),fbs=__webpack_require__("./src/core/fbs/fbs.ts");var modal_helpers=__webpack_require__("./src/core/utils/helpers/modal-helpers.ts");const getManifestationsOrderByTypeAndYear=manifestations=>{const orderedByYear=(0,general.T6)(manifestations),materialsMappedBytype=groupBy_default()(orderedByYear,(m=>{var _m$materialTypes$;return(null==m||null===(_m$materialTypes$=m.materialTypes[0])||void 0===_m$materialTypes$?void 0:_m$materialTypes$.specific)??"unknown"}));return Object.keys(materialsMappedBytype).sort().reduce(((acc,key)=>[...acc,...materialsMappedBytype[key]]),[])},filterManifestationsByType=(type,manifestations)=>manifestations.filter((item=>(0,general.cC)([item])===type)),getManifestationPlayingTime=manifestation=>{var _manifestation$physic,_manifestation$physic2;return(null===(_manifestation$physic=manifestation.physicalDescriptions)||void 0===_manifestation$physic||null===(_manifestation$physic2=_manifestation$physic[0])||void 0===_manifestation$physic2?void 0:_manifestation$physic2.playingTime)??""},getManifestationEdition=manifestation=>{var _manifestation$editio;return(null===(_manifestation$editio=manifestation.edition)||void 0===_manifestation$editio?void 0:_manifestation$editio.summary)??""},getManifestationGenreAndForm=manifestation=>manifestation.genreAndForm.join(" / ")??"",getManifestationPublisher=manifestation=>manifestation.publisher.join(" / ")??"",getManifestationMaterialTypes=manifestation=>{var _manifestation$materi;return(null===(_manifestation$materi=manifestation.materialTypes)||void 0===_manifestation$materi?void 0:_manifestation$materi[0].specific)??""},getManifestationNumberOfPages=manifestation=>{var _manifestation$physic3,_manifestation$physic4,_manifestation$physic5;return null!==(_manifestation$physic3=manifestation.physicalDescriptions)&&void 0!==_manifestation$physic3&&null!==(_manifestation$physic4=_manifestation$physic3[0])&&void 0!==_manifestation$physic4&&_manifestation$physic4.numberOfPages?String(null===(_manifestation$physic5=manifestation.physicalDescriptions)||void 0===_manifestation$physic5?void 0:_manifestation$physic5[0].numberOfPages):""},getManifestationAudience=manifestation=>{var _manifestation$audien;return(null===(_manifestation$audien=manifestation.audience)||void 0===_manifestation$audien?void 0:_manifestation$audien.generalAudience[0])??""},getManifestationIsbn=manifestation=>{var _manifestation$identi,_manifestation$identi2;return(null===(_manifestation$identi=manifestation.identifiers)||void 0===_manifestation$identi||null===(_manifestation$identi2=_manifestation$identi[0])||void 0===_manifestation$identi2?void 0:_manifestation$identi2.value)??""},getManifestationLanguages=manifestation=>{var _manifestation$langua,_manifestation$langua2;return(null===(_manifestation$langua=manifestation.languages)||void 0===_manifestation$langua||null===(_manifestation$langua2=_manifestation$langua.main)||void 0===_manifestation$langua2?void 0:_manifestation$langua2.map((language=>language.display)).join(", "))??""},getManifestationLanguageIsoCode=manifestations=>{var _head2;const mainLanguages=manifestations.map((({languages})=>languages)).flatMap((language=>null==language?void 0:language.main)),uniqueLanguagesWithIsoCode=uniqBy_default()(mainLanguages,"isoCode"),uniqIsoCode=1===uniqueLanguagesWithIsoCode.length&&(null===(_head2=head_default()(uniqueLanguagesWithIsoCode))||void 0===_head2?void 0:_head2.isoCode);if(uniqIsoCode)return uniqIsoCode},getManifestationOriginalTitle=manifestation=>{var _manifestation$titles,_manifestation$titles2;return(null===(_manifestation$titles=manifestation.titles)||void 0===_manifestation$titles||null===(_manifestation$titles2=_manifestation$titles.original)||void 0===_manifestation$titles2?void 0:_manifestation$titles2[0])??""},getManifestationContributors=manifestation=>manifestation.contributors.map((contributor=>contributor.display)).join(" / ")??"",getManifestationAuthors=manifestation=>(0,general.TG)(manifestation.creators).join(", ")??"",getDetailsListData=({manifestation,work,t})=>{const workFirstEditionYear=(work=>{var _work$workYear;return null!==(_work$workYear=work.workYear)&&void 0!==_work$workYear&&_work$workYear.year?String(work.workYear.year):""})(work),fallBackManifestation=((work,type)=>work.manifestations[type])(work,"bestRepresentation");return[{label:t("detailsListLanguageText"),value:getManifestationLanguages(manifestation??fallBackManifestation),type:"standard"},{label:t("detailsListPlayTimeText"),value:getManifestationPlayingTime(manifestation??fallBackManifestation),type:"standard"},{label:t("detailsListEditionText"),value:getManifestationEdition(manifestation??fallBackManifestation),type:"standard"},{label:t("detailsListGenreAndFormText"),value:getManifestationGenreAndForm(manifestation??fallBackManifestation),type:"standard"},{label:t("detailsListOriginalTitleText"),value:getManifestationOriginalTitle(manifestation??fallBackManifestation),type:"standard"},{label:t("detailsListPublisherText"),value:getManifestationPublisher(manifestation??fallBackManifestation),type:"standard"},{label:t("detailsListFirstEditionYearText"),value:workFirstEditionYear,type:"standard"},{label:t("detailsListTypeText"),value:getManifestationMaterialTypes(manifestation??fallBackManifestation),type:"standard"},{label:t("detailsListContributorsText"),value:getManifestationContributors(manifestation??fallBackManifestation),type:"link"},{label:t("detailsListScopeText"),value:getManifestationNumberOfPages(manifestation??fallBackManifestation),type:"standard"},{label:t("detailsListAudienceText"),value:getManifestationAudience(manifestation??fallBackManifestation),type:"standard"}]},getTotalHoldings=holdings=>holdings.reduce(((acc,curr)=>acc+curr.holdings.reduce(((accumulator,current)=>accumulator+current.materials.length),0)),0),getTotalReservations=holdings=>holdings.reduce(((acc,curr)=>acc+curr.reservations),0),totalAvailableMaterials=materials=>materials.reduce(((acc,curr)=>curr.available?acc+1:acc),0),isAnyManifestationAvailableOnBranch=libraryBranches=>libraryBranches.some((libraryBranch=>libraryBranch.holding.materials.some((material=>material.available)))),totalBranchesHaveMaterial=manifestationHoldings=>manifestationHoldings.filter((branchManifestationHoldings=>isAnyManifestationAvailableOnBranch(branchManifestationHoldings))).length,getInfomediaIds=manifestations=>{const infomediaIds=manifestations.map((manifestation=>manifestation.access.map((currentAccess=>"InfomediaService"===currentAccess.__typename?currentAccess.id:null)))).flat();return compact_default()(infomediaIds)},divideManifestationsByMaterialType=manifestations=>manifestations.reduce(((result,manifestation)=>{if(!manifestation.materialTypes.length||!manifestation.materialTypes[0].specific)return result;const type=manifestation.materialTypes[0].specific;return{...result,[type]:[...result[type]??[],manifestation]}}),{}),getAllIdentifiers=manifestations=>manifestations.map((manifestation=>manifestation.identifiers.map((identifier=>identifier.value)))).flat(),isABook=manifestations=>manifestations.some((manifestation=>manifestation.materialTypes.some((materialType=>materialType.specific.toLowerCase()===material_type.XK.book)))),getBestMaterialTypeForManifestation=manifestation=>isABook([manifestation])?material_type.XK.book:manifestation.materialTypes[0].specific,getBestMaterialTypeForWork=work=>{return work.manifestations.bestRepresentation?getBestMaterialTypeForManifestation(work.manifestations.bestRepresentation):work.manifestations.latest?getBestMaterialTypeForManifestation(work.manifestations.latest):work.manifestations.first?getBestMaterialTypeForManifestation(work.manifestations.first):isABook(work.manifestations.all)?material_type.XK.book:(manifestations=work.manifestations.all,manifestations.filter((manifestation=>manifestation.materialTypes.length>0)))[0].materialTypes[0].specific;var manifestations},reservationModalId=faustIds=>(0,modal_helpers.V$)("reservation-modal",faustIds.sort()),getNumberedSeries=series=>series.filter((seriesEntry=>{var _seriesEntry$numberIn;return null===(_seriesEntry$numberIn=seriesEntry.numberInSeries)||void 0===_seriesEntry$numberIn?void 0:_seriesEntry$numberIn.number})),getUniqueMovies=relations=>{const movies=relations.hasAdaptation.filter((item=>item.ownerWork.workTypes.includes(graphql.Lc.Movie)));return uniqBy_default()(movies,(item=>item.ownerWork.workId))},getDbcVerifiedSubjectsFirst=subjects=>uniq_default()([...subjects.dbcVerified.map((item=>item.display)),...subjects.all.map((item=>item.display))]),isParallelReservation=manifestations=>manifestations.length>1&&(0,helper.ie)(graphql.U5.Physical,manifestations)&&!(0,helper.g0)(manifestations),getBlacklistedQueryArgs=(faustIds,config,blacklist)=>{const blacklistBranches=config("availability"===blacklist?"blacklistedAvailabilityBranchesConfig":"blacklistedPickupBranchesConfig",{transformer:"stringToArray"});return{recordid:faustIds,...blacklistBranches?{exclude:blacklistBranches}:{}}},getAvailability=async({faustIds,config})=>(0,fbs.AG)(getBlacklistedQueryArgs(faustIds,config,"availability")),useGetHoldings=({faustIds,config,options})=>{const{data,isLoading,isError}=(0,fbs.T8)(getBlacklistedQueryArgs(faustIds,config,"pickup"),options);return{data,isLoading,isError}}},"./src/apps/material/material.dev.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Default:()=>Default,Digital:()=>Digital,Dinosaurierfedern:()=>Dinosaurierfedern,EBogBlaTitle:()=>EBogBlaTitle,EBogPrinsenHarry:()=>EBogPrinsenHarry,HarryPotter:()=>HarryPotter,Infomedia:()=>Infomedia,InstantLoan:()=>material_dev_InstantLoan,LangePeter:()=>LangePeter,Periodical:()=>Periodical,TurenGårTilRom:()=>TurenGårTilRom,Underverden:()=>Underverden,default:()=>material_dev,overbygningsMatriale:()=>overbygningsMatriale});var react=__webpack_require__("./node_modules/react/index.js"),serviceUrlArgs=__webpack_require__("./src/core/storybook/serviceUrlArgs.ts"),guarded_app=__webpack_require__("./src/components/guarded-app.tsx"),utils_config=__webpack_require__("./src/core/utils/config.tsx"),utils_text=__webpack_require__("./src/core/utils/text.tsx"),url=__webpack_require__("./src/core/utils/url.tsx"),Various=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/Various.svg"),Various_default=__webpack_require__.n(Various),Create=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/Create.svg"),Create_default=__webpack_require__.n(Create),Receipt=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/Receipt.svg"),Receipt_default=__webpack_require__.n(Receipt),useDeepCompareEffect=__webpack_require__("./node_modules/react-use/esm/useDeepCompareEffect.js"),graphql=__webpack_require__("./src/core/dbc-gateway/generated/graphql.tsx"),helper=__webpack_require__("./src/apps/material/helper.ts"),lazy_load=__webpack_require__("./src/core/utils/helpers/lazy-load.ts"),helpers_url=__webpack_require__("./src/core/utils/helpers/url.ts"),HorizontalTermLine=__webpack_require__("./src/components/horizontal-term-line/HorizontalTermLine.tsx"),general=__webpack_require__("./src/core/utils/helpers/general.ts");const MaterialDescription=({work})=>{const{itemRef,hasBeenVisible:showItem}=(0,lazy_load.L)(),t=(0,utils_text.X)(),u=(0,url.J_)(),searchUrl=u("searchUrl"),materialUrl=u("materialUrl"),{fictionNonfiction,series,subjects,seriesMembers,relations,dk5MainEntry}=work,isFiction=(0,general.bV)(work),seriesList=(0,helper.qr)(series),seriesMembersList=seriesMembers.map((item=>({url:(0,helpers_url.WO)(materialUrl,item.workId),term:item.titles.main[0]}))),subjectsList=(0,helper.af)(subjects).map((item=>({url:(0,helpers_url.Nt)(searchUrl,item),term:item}))),filmAdaptationsList=(0,helper.xI)(relations).map((item=>({url:(0,helpers_url.WO)(materialUrl,item.ownerWork.workId),term:item.ownerWork.titles.main[0]}))),fictionNonfictionList=fictionNonfiction?[{url:(0,helpers_url.Nt)(searchUrl,fictionNonfiction.display),term:fictionNonfiction.display}]:[];return react.createElement("section",{ref:itemRef,className:"material-description","data-cy":"material-description"},showItem&&react.createElement(react.Fragment,null,react.createElement("h2",{className:"text-header-h4 pb-24"},t("descriptionHeadlineText")),work.abstract&&react.createElement("p",{className:"text-body-large material-description__content"},work.abstract[0]),react.createElement("div",{className:"material-description__links mt-32"},!isFiction&&dk5MainEntry&&react.createElement(HorizontalTermLine.Z,{title:t("subjectNumberText"),linkList:[{url:(0,helpers_url.Nt)(searchUrl,dk5MainEntry.display),term:dk5MainEntry.display}]}),seriesList.map(((item,i)=>{var _item$numberInSeries;return react.createElement(HorizontalTermLine.Z,{title:`${t("numberDescriptionText")} ${null===(_item$numberInSeries=item.numberInSeries)||void 0===_item$numberInSeries?void 0:_item$numberInSeries.number}`,subTitle:t("inSeriesText"),linkList:[{url:(0,helpers_url.Nt)(searchUrl,item.title),term:item.title}],dataCy:`material-description-series-${i}`})})),react.createElement(HorizontalTermLine.Z,{title:t("inSameSeriesText"),linkList:seriesMembersList,dataCy:"material-description-series-members"}),react.createElement(HorizontalTermLine.Z,{title:t("identifierText"),linkList:subjectsList,dataCy:"material-description-identifier"}),react.createElement(HorizontalTermLine.Z,{title:t("fictionNonfictionText"),linkList:fictionNonfictionList,dataCy:"material-description-fiction-nonfiction"}),react.createElement(HorizontalTermLine.Z,{title:t("filmAdaptationsText"),linkList:filmAdaptationsList,dataCy:"material-description-film-adaptations"}))))},material_MaterialDescription=MaterialDescription;try{MaterialDescription.displayName="MaterialDescription",MaterialDescription.__docgenInfo={description:"",displayName:"MaterialDescription",props:{pid:{defaultValue:null,description:"",name:"pid",required:!0,type:{name:"`${number}-${string}:${number}`"}},work:{defaultValue:null,description:"",name:"work",required:!0,type:{name:"Work"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/MaterialDescription.tsx#MaterialDescription"]={docgenInfo:MaterialDescription.__docgenInfo,name:"MaterialDescription",path:"src/components/material/MaterialDescription.tsx#MaterialDescription"})}catch(__react_docgen_typescript_loader_error){}__webpack_require__("./node_modules/dayjs/dayjs.min.js"),__webpack_require__("./node_modules/dayjs/plugin/customParseFormat.js");var LinkNoStyle=__webpack_require__("./src/components/atoms/links/LinkNoStyle.tsx");const usDateStringToDateObj=date=>(dayjs.extend(customParseFormat),dayjs(date,"YYYY-MM-DD").toDate()),ReviewMetadata=({author,date,publication,url})=>{const metaDataText=(returnAuthor,returnHost,returnDate)=>{const authorText=returnAuthor||"",hostText=returnHost||"";return`\n ${authorText}${authorText&&hostText?" - ":""}${hostText}${returnDate&&`, ${returnDate}`}\n `};return url?react.createElement(LinkNoStyle.Z,{url,className:"link-tag text-small-caption mb-8"},metaDataText(author,publication,date)):react.createElement("div",{className:"review__meta mb-8"},metaDataText(author,publication,date))},material_ReviewMetadata=ReviewMetadata;try{usDateStringToDateObj.displayName="usDateStringToDateObj",usDateStringToDateObj.__docgenInfo={description:"",displayName:"usDateStringToDateObj",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/ReviewMetadata.tsx#usDateStringToDateObj"]={docgenInfo:usDateStringToDateObj.__docgenInfo,name:"usDateStringToDateObj",path:"src/components/material/ReviewMetadata.tsx#usDateStringToDateObj"})}catch(__react_docgen_typescript_loader_error){}try{ReviewMetadata.displayName="ReviewMetadata",ReviewMetadata.__docgenInfo={description:"",displayName:"ReviewMetadata",props:{author:{defaultValue:null,description:"",name:"author",required:!1,type:{name:"string | null | undefined"}},date:{defaultValue:null,description:"",name:"date",required:!1,type:{name:"string | null | undefined"}},publication:{defaultValue:null,description:"",name:"publication",required:!1,type:{name:"string | null | undefined"}},url:{defaultValue:null,description:"",name:"url",required:!1,type:{name:"URL | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/ReviewMetadata.tsx#ReviewMetadata"]={docgenInfo:ReviewMetadata.__docgenInfo,name:"ReviewMetadata",path:"src/components/material/ReviewMetadata.tsx#ReviewMetadata"})}catch(__react_docgen_typescript_loader_error){}var icon_heart_filled=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/basic/icon-heart-filled.svg"),icon_heart_filled_default=__webpack_require__.n(icon_heart_filled),icon_heart_grey=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/basic/icon-heart-grey.svg"),icon_heart_grey_default=__webpack_require__.n(icon_heart_grey);const ReviewHearts=({amountOfHearts})=>{const t=(0,utils_text.X)(),heartArray=amountOfHearts.split("/"),filledHeartsArray=Array.from({length:Number(heartArray[0])},((_,i)=>i+1)),emptyHeartsArray=Array.from({length:Number(heartArray[1])-Number(heartArray[0])},((_,i)=>i+1)),ariaLabel=t("ratingIsText",{placeholders:{"@heartCount":filledHeartsArray.length,"@numberOfHeartsPossible":heartArray[1]}});return react.createElement("div",{className:"mb-4",role:"figure","aria-label":ariaLabel},filledHeartsArray.map((()=>react.createElement("img",{src:icon_heart_filled_default(),className:"review__heart",alt:""}))),emptyHeartsArray.map((()=>react.createElement("img",{src:icon_heart_grey_default(),className:"review__heart",alt:""}))))},material_ReviewHearts=ReviewHearts;try{ReviewHearts.displayName="ReviewHearts",ReviewHearts.__docgenInfo={description:"",displayName:"ReviewHearts",props:{amountOfHearts:{defaultValue:null,description:"",name:"amountOfHearts",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/ReviewHearts.tsx#ReviewHearts"]={docgenInfo:ReviewHearts.__docgenInfo,name:"ReviewHearts",path:"src/components/material/ReviewHearts.tsx#ReviewHearts"})}catch(__react_docgen_typescript_loader_error){}var Link=__webpack_require__("./src/components/atoms/links/Link.tsx");const ReviewExternal=({review:{workYear,dateFirstEdition,creators,review,access,edition,hostPublication},dataCy="review-external"})=>{const date=(0,general.He)(dateFirstEdition,workYear,edition),authors=(0,general.Qe)(creators),publication=(0,general.lT)(hostPublication),accessUrls=access.filter((accessItem=>"AccessUrl"===accessItem.__typename));return react.createElement("li",{className:"review text-small-caption","data-cy":dataCy},(authors||date||publication)&&react.createElement(material_ReviewMetadata,{author:authors,date,publication}),(null==review?void 0:review.rating)&&react.createElement(material_ReviewHearts,{amountOfHearts:review.rating}),accessUrls&&accessUrls.map((({url,origin},index)=>react.createElement(react.Fragment,null,react.createElement("span",null,index>0?", ":""),react.createElement(Link.Z,{href:new URL(url),className:"link-tag text-small-caption mb-8"},origin)))))},material_ReviewExternal=ReviewExternal;try{ReviewExternal.displayName="ReviewExternal",ReviewExternal.__docgenInfo={description:"",displayName:"ReviewExternal",props:{review:{defaultValue:null,description:"",name:"review",required:!0,type:{name:"ReviewManifestation"}},dataCy:{defaultValue:{value:"review-external"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/ReviewExternal.tsx#ReviewExternal"]={docgenInfo:ReviewExternal.__docgenInfo,name:"ReviewExternal",path:"src/components/material/ReviewExternal.tsx#ReviewExternal"})}catch(__react_docgen_typescript_loader_error){}const useScrollToLocation=dependency=>{const[scrolledAlready,setScrolledAlready]=(0,react.useState)(!1),urlAnchor=window.location.hash;(0,react.useEffect)((()=>{if(urlAnchor&&!scrolledAlready){const anchorId=urlAnchor.replace("#",""),element=document.getElementById(anchorId);element&&(element.scrollIntoView({behavior:"smooth"}),setScrolledAlready(!0))}}),[urlAnchor,dependency,scrolledAlready])};try{useScrollToLocation.displayName="useScrollToLocation",useScrollToLocation.__docgenInfo={description:"",displayName:"useScrollToLocation",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/utils/UseScrollToLocation.tsx#useScrollToLocation"]={docgenInfo:useScrollToLocation.__docgenInfo,name:"useScrollToLocation",path:"src/core/utils/UseScrollToLocation.tsx#useScrollToLocation"})}catch(__react_docgen_typescript_loader_error){}var Button=__webpack_require__("./src/components/Buttons/Button.tsx");const ReviewInfomedia=({review:{workYear,dateFirstEdition,access,creators,review,edition,hostPublication},dataCy="review-infomedia"})=>{var _infomedia$article,_infomedia$article2,_infomedia$article3;const t=(0,utils_text.X)(),authUrl=(0,url.J_)()("authUrl"),date=(0,general.He)(dateFirstEdition,workYear,edition),authors=(0,general.Qe)(creators),publication=(0,general.lT)(hostPublication),infomediaId=access.filter((accessItem=>"InfomediaService"===accessItem.__typename))[0].id,{data,error}=(0,graphql.Dv)({id:infomediaId});if(useScrollToLocation(data),error)return null;if(!data)return null;const{infomedia}=data;if(infomedia.error)return react.createElement("li",{className:"review text-small-caption","data-cy":dataCy},(authors||date||publication)&&react.createElement(material_ReviewMetadata,{author:authors,date,publication}),(null==review?void 0:review.rating)&&react.createElement(material_ReviewHearts,{amountOfHearts:review.rating}),react.createElement("div",{className:"review__headline mb-8"},"BORROWER_NOT_LOGGED_IN"===infomedia.error?react.createElement(Button.z,{label:t("loginToSeeReviewText"),buttonType:"none",disabled:!1,collapsible:!1,size:"xsmall",variant:"outline",onClick:()=>{(reviewId=>{const returnUrl=(0,helpers_url.uW)({disclosure:"disclosure-reviews"});returnUrl.hash=reviewId,(0,helpers_url.hN)({authUrl,returnUrl})})(infomediaId)}}):t("cantViewReviewText")));const accessUrls=access.filter((accessItem=>"AccessUrl"===accessItem.__typename));return react.createElement("li",{className:"review text-small-caption",id:infomediaId},(authors||date||publication)&&react.createElement(material_ReviewMetadata,{author:authors,date,publication}),(null==review?void 0:review.rating)&&react.createElement(material_ReviewHearts,{amountOfHearts:review.rating}),(null===(_infomedia$article=infomedia.article)||void 0===_infomedia$article?void 0:_infomedia$article.headLine)&&react.createElement("h3",{className:"review__headline mb-8"},infomedia.article.headLine),(null===(_infomedia$article2=infomedia.article)||void 0===_infomedia$article2?void 0:_infomedia$article2.text)&&react.createElement("p",{className:"review__body mb-8",dangerouslySetInnerHTML:{__html:null===(_infomedia$article3=infomedia.article)||void 0===_infomedia$article3?void 0:_infomedia$article3.text}}),access.some((a=>"AccessUrl"===a.__typename))&&(0,helpers_url.pM)(accessUrls[0].url)&&react.createElement(material_ReviewMetadata,{author:authors,date,url:new URL(accessUrls[0].url)}))},material_ReviewInfomedia=ReviewInfomedia;try{ReviewInfomedia.displayName="ReviewInfomedia",ReviewInfomedia.__docgenInfo={description:"",displayName:"ReviewInfomedia",props:{review:{defaultValue:null,description:"",name:"review",required:!0,type:{name:"ReviewManifestation"}},dataCy:{defaultValue:{value:"review-infomedia"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/ReviewInfomedia.tsx#ReviewInfomedia"]={docgenInfo:ReviewInfomedia.__docgenInfo,name:"ReviewInfomedia",path:"src/components/material/ReviewInfomedia.tsx#ReviewInfomedia"})}catch(__react_docgen_typescript_loader_error){}const ReviewLibrarian=({review:{workYear,dateFirstEdition,creators,review,edition,hostPublication},dataCy="review-librarian"})=>{const date=(0,general.He)(dateFirstEdition,workYear,edition),authors=(0,general.Qe)(creators),publication=(0,general.lT)(hostPublication);return react.createElement("li",{className:"review text-small-caption","data-cy":dataCy},(authors||date||publication)&&react.createElement(material_ReviewMetadata,{author:authors,date,publication}),(null==review?void 0:review.reviewByLibrarians)&&review.reviewByLibrarians.map((librarianReview=>react.createElement(react.Fragment,null,(null==librarianReview?void 0:librarianReview.heading)&&react.createElement("h3",{className:"review__headline mb-8"},librarianReview.heading),(null==librarianReview?void 0:librarianReview.content)&&react.createElement("div",{className:"review__body mb-8"},librarianReview.content)))))},material_ReviewLibrarian=ReviewLibrarian;try{ReviewLibrarian.displayName="ReviewLibrarian",ReviewLibrarian.__docgenInfo={description:"",displayName:"ReviewLibrarian",props:{review:{defaultValue:null,description:"",name:"review",required:!0,type:{name:"ReviewManifestation"}},dataCy:{defaultValue:{value:"review-librarian"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/ReviewLibrarian.tsx#ReviewLibrarian"]={docgenInfo:ReviewLibrarian.__docgenInfo,name:"ReviewLibrarian",path:"src/components/material/ReviewLibrarian.tsx#ReviewLibrarian"})}catch(__react_docgen_typescript_loader_error){}const ReviewSkeleton=()=>react.createElement("div",{className:"ssc my-48 mx-32"},react.createElement("div",{className:"ssc-head-line w-40 my-8"}),react.createElement("div",{className:"ssc-line my-8"}),react.createElement("div",{className:"ssc-line my-8"})),material_ReviewSkeleton=ReviewSkeleton;try{ReviewSkeleton.displayName="ReviewSkeleton",ReviewSkeleton.__docgenInfo={description:"",displayName:"ReviewSkeleton",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/ReviewSkeleton.tsx#ReviewSkeleton"]={docgenInfo:ReviewSkeleton.__docgenInfo,name:"ReviewSkeleton",path:"src/components/material/ReviewSkeleton.tsx#ReviewSkeleton"})}catch(__react_docgen_typescript_loader_error){}const MaterialReviews=({pids,dataCy="material-reviews"})=>{const{data,isLoading}=(0,graphql.f8)({pid:pids});if(isLoading)return react.createElement(material_ReviewSkeleton,null);if(!data)return null;const{manifestations:reviews}=data;return react.createElement("ul",{className:"reviews","data-cy":dataCy},reviews.map((review=>review?((reviewType,review)=>{switch(reviewType){case null:default:return null;case"infomedia":return react.createElement(material_ReviewInfomedia,{review,dataCy:`${dataCy}-infomedia`});case"external":return react.createElement(material_ReviewExternal,{review,dataCy:`${dataCy}-external`});case"librarian":return react.createElement(material_ReviewLibrarian,{review,dataCy:`${dataCy}-librarian`})}})((review=>null!=review&&review.access.some((access=>"InfomediaService"===access.__typename))?"infomedia":null!=review&&review.access.some((access=>"AccessUrl"===access.__typename))?"external":null!=review&&review.access.some((access=>"InterLibraryLoan"===access.__typename))?"librarian":null)(review),review):null)))};try{MaterialReviews.displayName="MaterialReviews",MaterialReviews.__docgenInfo={description:"",displayName:"MaterialReviews",props:{pids:{defaultValue:null,description:"",name:"pids",required:!0,type:{name:"`${number}-${string}:${number}`[]"}},dataCy:{defaultValue:{value:"material-reviews"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/MaterialReviews.tsx#MaterialReviews"]={docgenInfo:MaterialReviews.__docgenInfo,name:"MaterialReviews",path:"src/components/material/MaterialReviews.tsx#MaterialReviews"})}catch(__react_docgen_typescript_loader_error){}var ExpandMore=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/ExpandMore.svg"),ExpandMore_default=__webpack_require__.n(ExpandMore),availability_label=__webpack_require__("./src/components/availability-label/availability-label.tsx"),cover=__webpack_require__("./src/components/cover/cover.tsx");const description_list=({data,classNames,id})=>react.createElement("dl",{id,className:`list-description ${classNames??""}`},data.map((item=>{const{label,value}=item;return react.createElement("div",null,react.createElement("dt",null,label),react.createElement("dd",null,value))})));try{descriptionlist.displayName="descriptionlist",descriptionlist.__docgenInfo={description:"",displayName:"descriptionlist",props:{classNames:{defaultValue:null,description:"",name:"classNames",required:!1,type:{name:"string | undefined"}},data:{defaultValue:null,description:"",name:"data",required:!0,type:{name:"{ label: string; value: ReactNode; }[]"}},id:{defaultValue:null,description:"",name:"id",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/description-list/description-list.tsx#descriptionlist"]={docgenInfo:descriptionlist.__docgenInfo,name:"descriptionlist",path:"src/components/description-list/description-list.tsx#descriptionlist"})}catch(__react_docgen_typescript_loader_error){}const MaterialDetailsList=({data,className,id})=>{const listData=data.filter((item=>item.value)).map((item=>{const{label,value,type}=item;return{label,value:"link"===type?react.createElement("span",{className:"link-tag pr-4"},value):react.createElement("span",null,value)}}));return react.createElement(description_list,{id,data:listData,classNames:className})},material_MaterialDetailsList=MaterialDetailsList;try{MaterialDetailsList.displayName="MaterialDetailsList",MaterialDetailsList.__docgenInfo={description:"",displayName:"MaterialDetailsList",props:{className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string | undefined"}},data:{defaultValue:null,description:"",name:"data",required:!0,type:{name:"ListData"}},id:{defaultValue:null,description:"",name:"id",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/MaterialDetailsList.tsx#MaterialDetailsList"]={docgenInfo:MaterialDetailsList.__docgenInfo,name:"MaterialDetailsList",path:"src/components/material/MaterialDetailsList.tsx#MaterialDetailsList"})}catch(__react_docgen_typescript_loader_error){}var material_buttons_helper=__webpack_require__("./src/components/material/material-buttons/helper.ts"),InvalidUrlError=__webpack_require__("./src/core/errors/InvalidUrlError.ts"),statistics=__webpack_require__("./src/core/statistics/statistics.ts"),useStatistics=__webpack_require__("./src/core/statistics/useStatistics.ts"),modal=__webpack_require__("./src/core/utils/modal.tsx");const createDigitalModalId=id=>`digital-modal-${id}`;var MaterialButtonLoading=__webpack_require__("./src/components/material/material-buttons/generic/MaterialButtonLoading.tsx");const MaterialButtonDisabled=({label,reason,size,dataCy="material-header-buttons-cant-reserve"})=>react.createElement(react.Fragment,null,react.createElement(Button.z,{label,buttonType:"none",variant:"filled",disabled:!0,collapsible:!1,size:size||"large",dataCy}),reason&&react.createElement("p",{className:"text-small-caption mt-16",role:"alert"},reason)),generic_MaterialButtonDisabled=MaterialButtonDisabled;try{MaterialButtonDisabled.displayName="MaterialButtonDisabled",MaterialButtonDisabled.__docgenInfo={description:"",displayName:"MaterialButtonDisabled",props:{label:{defaultValue:null,description:"",name:"label",required:!0,type:{name:"string"}},reason:{defaultValue:null,description:"",name:"reason",required:!1,type:{name:"string | undefined"}},size:{defaultValue:null,description:"",name:"size",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"xsmall"'},{value:'"small"'},{value:'"medium"'},{value:'"large"'},{value:'"xlarge"'}]}},dataCy:{defaultValue:{value:"material-header-buttons-cant-reserve"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/material-buttons/generic/MaterialButtonDisabled.tsx#MaterialButtonDisabled"]={docgenInfo:MaterialButtonDisabled.__docgenInfo,name:"MaterialButtonDisabled",path:"src/components/material/material-buttons/generic/MaterialButtonDisabled.tsx#MaterialButtonDisabled"})}catch(__react_docgen_typescript_loader_error){}var user=__webpack_require__("./src/core/utils/helpers/user.ts");const MaterialButtonOnlineDigitalArticle=({pid,size,dataCy="material-button-online-digital-article"})=>{const t=(0,utils_text.X)(),authUrl=(0,url.J_)()("authUrl"),[isUserResident,setIsUserResident]=(0,react.useState)(null),{isLoading,data:userData}=(0,user.dp)(),{openGuarded}=(0,modal.f)();(0,useDeepCompareEffect.Z)((()=>{userData&&userData.patron&&setIsUserResident((0,user.aE)(null==userData?void 0:userData.patron))}),[userData]);return isLoading?react.createElement(MaterialButtonLoading.Z,null):!1===isUserResident?react.createElement(generic_MaterialButtonDisabled,{label:t("cantViewText"),reason:t("notLivingInMunicipalityText"),size}):react.createElement(Button.z,{label:t("orderDigitalCopyButtonText"),buttonType:"none",variant:"filled",disabled:!1,collapsible:!1,size:size||"large",onClick:()=>{openGuarded({authUrl,modalId:createDigitalModalId(pid)})},dataCy})},online_MaterialButtonOnlineDigitalArticle=MaterialButtonOnlineDigitalArticle;try{MaterialButtonOnlineDigitalArticle.displayName="MaterialButtonOnlineDigitalArticle",MaterialButtonOnlineDigitalArticle.__docgenInfo={description:"",displayName:"MaterialButtonOnlineDigitalArticle",props:{pid:{defaultValue:null,description:"",name:"pid",required:!0,type:{name:"`${number}-${string}:${number}`"}},size:{defaultValue:null,description:"",name:"size",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"xsmall"'},{value:'"small"'},{value:'"medium"'},{value:'"large"'},{value:'"xlarge"'}]}},dataCy:{defaultValue:{value:"material-button-online-digital-article"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/material-buttons/online/MaterialButtonOnlineDigitalArticle.tsx#MaterialButtonOnlineDigitalArticle"]={docgenInfo:MaterialButtonOnlineDigitalArticle.__docgenInfo,name:"MaterialButtonOnlineDigitalArticle",path:"src/components/material/material-buttons/online/MaterialButtonOnlineDigitalArticle.tsx#MaterialButtonOnlineDigitalArticle"})}catch(__react_docgen_typescript_loader_error){}var dpl_cms=__webpack_require__("./src/core/dpl-cms/dpl-cms.ts"),material_type=__webpack_require__("./src/core/utils/types/material-type.ts"),LinkButton=__webpack_require__("./src/components/Buttons/LinkButton.tsx");const MaterialButtonOnlineExternal=({externalUrl="",origin,size,trackOnlineView,manifestations,dataCy="material-button-online-external",ariaLabelledBy})=>{const[translatedUrl,setTranslatedUrl]=(0,react.useState)(new URL(externalUrl)),[urlWasTranslated,setUrlWasTranslated]=(0,react.useState)(null),t=(0,utils_text.X)(),{data,error}=(0,dpl_cms.Yh)({url:externalUrl},{enabled:null===urlWasTranslated&&externalUrl.length>0});(0,react.useEffect)((()=>{var _data$data;urlWasTranslated||!error&&null!=data&&null!==(_data$data=data.data)&&void 0!==_data$data&&_data$data.url&&(setTranslatedUrl(new URL(data.data.url)),setUrlWasTranslated(!0))}),[data,error,translatedUrl,urlWasTranslated]);return react.createElement(LinkButton.Z,{url:translatedUrl,buttonType:"external-link",variant:"filled",size:size||"large",iconClassNames:"invert",trackClick:trackOnlineView,dataCy,ariaLabelledBy},((sourceName,materialTypes)=>{const onlineMaterialType=((sourceName,materialTypes)=>sourceName.toLowerCase().includes("ereol")?"ebook":sourceName.toLowerCase().includes("filmstriben")?"emovie":materialTypes.find((element=>element.toLowerCase().includes(material_type.XK.audioBookGeneric)))?"audiobook":"unknown")(sourceName,materialTypes);switch(onlineMaterialType){case"ebook":return t("goToText",{placeholders:{"@source":"ereolen"}});case"emovie":return t("goToText",{placeholders:{"@source":"filmstriben"}});case"audiobook":return t("listenOnlineText");default:return t("seeOnlineText")}})(origin,(0,general.A3)(manifestations)))},online_MaterialButtonOnlineExternal=MaterialButtonOnlineExternal;try{MaterialButtonOnlineExternal.displayName="MaterialButtonOnlineExternal",MaterialButtonOnlineExternal.__docgenInfo={description:"",displayName:"MaterialButtonOnlineExternal",props:{externalUrl:{defaultValue:{value:""},description:"",name:"externalUrl",required:!1,type:{name:"string"}},origin:{defaultValue:null,description:"",name:"origin",required:!0,type:{name:"string"}},size:{defaultValue:null,description:"",name:"size",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"xsmall"'},{value:'"small"'},{value:'"medium"'},{value:'"large"'},{value:'"xlarge"'}]}},trackOnlineView:{defaultValue:null,description:"",name:"trackOnlineView",required:!0,type:{name:"() => Promise"}},manifestations:{defaultValue:null,description:"",name:"manifestations",required:!0,type:{name:"Manifestation[]"}},dataCy:{defaultValue:{value:"material-button-online-external"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}},ariaLabelledBy:{defaultValue:null,description:"",name:"ariaLabelledBy",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/material-buttons/online/MaterialButtonOnlineExternal.tsx#MaterialButtonOnlineExternal"]={docgenInfo:MaterialButtonOnlineExternal.__docgenInfo,name:"MaterialButtonOnlineExternal",path:"src/components/material/material-buttons/online/MaterialButtonOnlineExternal.tsx#MaterialButtonOnlineExternal"})}catch(__react_docgen_typescript_loader_error){}var infomedia_logo=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/logo/infomedia-logo.svg"),infomedia_logo_default=__webpack_require__.n(infomedia_logo);const InfomediaModalBody=({headline,text})=>react.createElement("article",{className:"infomedia-article"},react.createElement("img",{className:"infomedia-logo",src:infomedia_logo_default(),alt:""}),react.createElement("h2",null,headline),react.createElement("div",{dangerouslySetInnerHTML:{__html:text}})),infomedia_InfomediaModalBody=InfomediaModalBody;try{InfomediaModalBody.displayName="InfomediaModalBody",InfomediaModalBody.__docgenInfo={description:"",displayName:"InfomediaModalBody",props:{headline:{defaultValue:null,description:"",name:"headline",required:!0,type:{name:"string"}},text:{defaultValue:null,description:"",name:"text",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/infomedia/InfomediaModalBody.tsx#InfomediaModalBody"]={docgenInfo:InfomediaModalBody.__docgenInfo,name:"InfomediaModalBody",path:"src/components/material/infomedia/InfomediaModalBody.tsx#InfomediaModalBody"})}catch(__react_docgen_typescript_loader_error){}const InfomediaSkeleton=()=>react.createElement("div",{className:"scc-wrapper"},react.createElement("div",{className:"ssc-square mb-32"}),react.createElement("div",{className:"ssc-head-line mbs"}),react.createElement("div",{className:"ssc-head-line mbs"}),react.createElement("div",{className:"ssc-head-line"})),infomedia_InfomediaSkeleton=InfomediaSkeleton;try{InfomediaSkeleton.displayName="InfomediaSkeleton",InfomediaSkeleton.__docgenInfo={description:"",displayName:"InfomediaSkeleton",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/infomedia/InfomediaSkeleton.tsx#InfomediaSkeleton"]={docgenInfo:InfomediaSkeleton.__docgenInfo,name:"InfomediaSkeleton",path:"src/components/material/infomedia/InfomediaSkeleton.tsx#InfomediaSkeleton"})}catch(__react_docgen_typescript_loader_error){}const infomediaModalId=pid=>`infomedia-modal-${pid}`,InfomediaModal=({selectedManifestations,infoMediaId})=>{const t=(0,utils_text.X)(),[shouldFetchData,setShouldFetchData]=(0,react.useState)(!1),[infomediaData,setInfomediaData]=(0,react.useState)(null),{data:patronData,isLoading:isLoadingPatron}=(0,user.dp)();(0,react.useEffect)((()=>{var _patronData$patron;void 0!==(null==patronData||null===(_patronData$patron=patronData.patron)||void 0===_patronData$patron?void 0:_patronData$patron.resident)&&setShouldFetchData(patronData.patron.resident)}),[patronData]);const{data,error,isLoading:isLoadingInfomedia}=(0,graphql.Dv)({id:infoMediaId},{enabled:shouldFetchData,onSuccess:response=>{var _response$infomedia,_response$infomedia$a,_response$infomedia2,_response$infomedia2$;const infomedia={headline:null==response||null===(_response$infomedia=response.infomedia)||void 0===_response$infomedia||null===(_response$infomedia$a=_response$infomedia.article)||void 0===_response$infomedia$a?void 0:_response$infomedia$a.headLine,text:null==response||null===(_response$infomedia2=response.infomedia)||void 0===_response$infomedia2||null===(_response$infomedia2$=_response$infomedia2.article)||void 0===_response$infomedia2$?void 0:_response$infomedia2$.text};setInfomediaData(infomedia)}});return!data||error?null:react.createElement(modal.Z,{modalId:infomediaModalId(selectedManifestations[0].pid),screenReaderModalDescriptionText:t("infomediaModalScreenReaderModalDescriptionText"),closeModalAriaLabelText:t("infomediaModalCloseModalAriaLabelText"),dataCy:"infomedia-modal"},isLoadingPatron||isLoadingInfomedia&&react.createElement(infomedia_InfomediaSkeleton,null),(null==infomediaData?void 0:infomediaData.headline)&&(null==infomediaData?void 0:infomediaData.text)&&react.createElement(infomedia_InfomediaModalBody,{headline:infomediaData.headline,text:infomediaData.text}))},infomedia_InfomediaModal=InfomediaModal;try{infomediaModalId.displayName="infomediaModalId",infomediaModalId.__docgenInfo={description:"",displayName:"infomediaModalId",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/infomedia/InfomediaModal.tsx#infomediaModalId"]={docgenInfo:infomediaModalId.__docgenInfo,name:"infomediaModalId",path:"src/components/material/infomedia/InfomediaModal.tsx#infomediaModalId"})}catch(__react_docgen_typescript_loader_error){}try{InfomediaModal.displayName="InfomediaModal",InfomediaModal.__docgenInfo={description:"",displayName:"InfomediaModal",props:{selectedManifestations:{defaultValue:null,description:"",name:"selectedManifestations",required:!0,type:{name:"Manifestation[]"}},infoMediaId:{defaultValue:null,description:"",name:"infoMediaId",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/infomedia/InfomediaModal.tsx#InfomediaModal"]={docgenInfo:InfomediaModal.__docgenInfo,name:"InfomediaModal",path:"src/components/material/infomedia/InfomediaModal.tsx#InfomediaModal"})}catch(__react_docgen_typescript_loader_error){}const MaterialButtonOnlineInfomediaArticle=({size,manifestations,trackOnlineView,dataCy="material-button-online-infomedia-article"})=>{const t=(0,utils_text.X)(),authUrl=(0,url.J_)()("authUrl"),{isLoading,data:userData}=(0,user.dp)(),{openGuarded}=(0,modal.f)(),isUserResident=userData&&null!=userData&&userData.patron?(0,user.aE)(userData.patron):null;if(manifestations.length<1)return null;return isLoading?react.createElement(MaterialButtonLoading.Z,null):!1===isUserResident?react.createElement(generic_MaterialButtonDisabled,{size,label:t("cantViewText"),reason:t("notLivingInMunicipalityText")}):react.createElement(Button.z,{label:t("readArticleText"),buttonType:"none",variant:"filled",disabled:!1,collapsible:!1,size:size||"large",onClick:()=>{openGuarded({authUrl,modalId:infomediaModalId(manifestations[0].pid),trackOnlineView})},dataCy})},online_MaterialButtonOnlineInfomediaArticle=MaterialButtonOnlineInfomediaArticle;try{MaterialButtonOnlineInfomediaArticle.displayName="MaterialButtonOnlineInfomediaArticle",MaterialButtonOnlineInfomediaArticle.__docgenInfo={description:"",displayName:"MaterialButtonOnlineInfomediaArticle",props:{size:{defaultValue:null,description:"",name:"size",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"xsmall"'},{value:'"small"'},{value:'"medium"'},{value:'"large"'},{value:'"xlarge"'}]}},manifestations:{defaultValue:null,description:"",name:"manifestations",required:!0,type:{name:"Manifestation[]"}},trackOnlineView:{defaultValue:null,description:"",name:"trackOnlineView",required:!0,type:{name:"() => Promise"}},dataCy:{defaultValue:{value:"material-button-online-infomedia-article"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/material-buttons/online/MaterialButtonOnlineInfomediaArticle.tsx#MaterialButtonOnlineInfomediaArticle"]={docgenInfo:MaterialButtonOnlineInfomediaArticle.__docgenInfo,name:"MaterialButtonOnlineInfomediaArticle",path:"src/components/material/material-buttons/online/MaterialButtonOnlineInfomediaArticle.tsx#MaterialButtonOnlineInfomediaArticle"})}catch(__react_docgen_typescript_loader_error){}const MaterialButtonsOnline=({manifestations,size,workId,dataCy="material-buttons-online",ariaLabelledBy})=>{const{track}=(0,useStatistics.T)(),trackOnlineView=()=>track("click",{id:statistics.h.onlineReservation.id,name:statistics.h.onlineReservation.name,trackedData:workId}),accessElement=manifestations[0].access[0];if((0,material_buttons_helper.M0)("Ereol",manifestations)||(0,material_buttons_helper.M0)("AccessUrl",manifestations)){const{origin,url:externalUrl}=accessElement;if(!(0,helpers_url.pM)(externalUrl))throw new InvalidUrlError.Z(`The external url is not valid. ( ${externalUrl} )`);return react.createElement(online_MaterialButtonOnlineExternal,{externalUrl,origin,size,trackOnlineView,manifestations,dataCy:`${dataCy}-external`,ariaLabelledBy})}return(0,material_buttons_helper.M0)("DigitalArticleService",manifestations)&&(0,material_buttons_helper.zn)(material_type.XK.article,manifestations)?react.createElement(online_MaterialButtonOnlineDigitalArticle,{pid:manifestations[0].pid,size,dataCy:`${dataCy}-digital-article`}):(0,material_buttons_helper.M0)("InfomediaService",manifestations)?react.createElement(online_MaterialButtonOnlineInfomediaArticle,{size,manifestations,trackOnlineView,dataCy:`${dataCy}-infomedia-article`}):null},online_MaterialButtonsOnline=MaterialButtonsOnline;try{MaterialButtonsOnline.displayName="MaterialButtonsOnline",MaterialButtonsOnline.__docgenInfo={description:"",displayName:"MaterialButtonsOnline",props:{manifestations:{defaultValue:null,description:"",name:"manifestations",required:!0,type:{name:"Manifestation[]"}},size:{defaultValue:null,description:"",name:"size",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"xsmall"'},{value:'"small"'},{value:'"medium"'},{value:'"large"'},{value:'"xlarge"'}]}},workId:{defaultValue:null,description:"",name:"workId",required:!0,type:{name:"`work-of:${number}-${string}:${number}`"}},dataCy:{defaultValue:{value:"material-buttons-online"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}},ariaLabelledBy:{defaultValue:null,description:"",name:"ariaLabelledBy",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/material-buttons/online/MaterialButtonsOnline.tsx#MaterialButtonsOnline"]={docgenInfo:MaterialButtonsOnline.__docgenInfo,name:"MaterialButtonsOnline",path:"src/components/material/material-buttons/online/MaterialButtonsOnline.tsx#MaterialButtonsOnline"})}catch(__react_docgen_typescript_loader_error){}var MaterialButtonsFindOnShelf=__webpack_require__("./src/components/material/material-buttons/physical/MaterialButtonsFindOnShelf.tsx");const UseReservableManifestations=({manifestations,type})=>{const config=(0,utils_config.ZR)(),faustIds=(0,general.vH)(manifestations),[reservableManifestations,setReservableManifestations]=(0,react.useState)(null),[unReservableManifestations,setUnReservableManifestations]=(0,react.useState)(null);return(0,react.useEffect)((()=>{if(!manifestations.length||reservableManifestations||unReservableManifestations)return;(async m=>{const data=await(0,helper.lm)({faustIds,config});if(!data)return{reservable:[],unReservable:[]};const filterableManifestations=type?(0,helper.zw)(type,m):m;return{reservable:filterableManifestations.filter((manifestation=>data.some((item=>item.reservable&&item.recordId===(0,general.rp)(manifestation.pid))))),unReservable:filterableManifestations.filter((manifestation=>data.some((item=>!item.reservable&&item.recordId===(0,general.rp)(manifestation.pid)))))}})(manifestations).then((({reservable,unReservable})=>{setReservableManifestations(reservable),setUnReservableManifestations(unReservable)}))}),[manifestations,faustIds,type,reservableManifestations,unReservableManifestations,config]),{reservableManifestations,unReservableManifestations}},utils_UseReservableManifestations=UseReservableManifestations;try{UseReservableManifestations.displayName="UseReservableManifestations",UseReservableManifestations.__docgenInfo={description:"",displayName:"UseReservableManifestations",props:{manifestations:{defaultValue:null,description:"",name:"manifestations",required:!0,type:{name:"Manifestation[]"}},type:{defaultValue:null,description:"",name:"type",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/utils/UseReservableManifestations.tsx#UseReservableManifestations"]={docgenInfo:UseReservableManifestations.__docgenInfo,name:"UseReservableManifestations",path:"src/core/utils/UseReservableManifestations.tsx#UseReservableManifestations"})}catch(__react_docgen_typescript_loader_error){}const MaterialButtonUserBlocked=({size,dataCy="material-button"})=>{const t=(0,utils_text.X)();return react.createElement(Button.z,{label:t("blockedButtonText"),buttonType:"none",variant:"filled",disabled:!0,collapsible:!1,size:size||"large",dataCy:`${dataCy}-user-blocked`})},generic_MaterialButtonUserBlocked=MaterialButtonUserBlocked;try{MaterialButtonUserBlocked.displayName="MaterialButtonUserBlocked",MaterialButtonUserBlocked.__docgenInfo={description:"",displayName:"MaterialButtonUserBlocked",props:{size:{defaultValue:null,description:"",name:"size",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"xsmall"'},{value:'"small"'},{value:'"medium"'},{value:'"large"'},{value:'"xlarge"'}]}},dataCy:{defaultValue:{value:"material-button"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/material-buttons/generic/MaterialButtonUserBlocked.tsx#MaterialButtonUserBlocked"]={docgenInfo:MaterialButtonUserBlocked.__docgenInfo,name:"MaterialButtonUserBlocked",path:"src/components/material/material-buttons/generic/MaterialButtonUserBlocked.tsx#MaterialButtonUserBlocked"})}catch(__react_docgen_typescript_loader_error){}const MaterialButtonPhysical=({manifestationMaterialType,faustIds,size,dataCy="material-button-physical"})=>{const t=(0,utils_text.X)(),authUrl=(0,url.J_)()("authUrl"),{openGuarded}=(0,modal.f)();return react.createElement(Button.z,{dataCy,label:"small"===size?t("reserveText"):`${t("reserveText")} ${manifestationMaterialType}`,buttonType:"none",variant:"filled",disabled:!1,collapsible:!1,size:size||"large",onClick:()=>{openGuarded({authUrl,modalId:(0,helper.Aw)(faustIds)})}})},physical_MaterialButtonPhysical=MaterialButtonPhysical;try{MaterialButtonPhysical.displayName="MaterialButtonPhysical",MaterialButtonPhysical.__docgenInfo={description:"",displayName:"MaterialButtonPhysical",props:{manifestationMaterialType:{defaultValue:null,description:"",name:"manifestationMaterialType",required:!0,type:{name:"string"}},size:{defaultValue:null,description:"",name:"size",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"xsmall"'},{value:'"small"'},{value:'"medium"'},{value:'"large"'},{value:'"xlarge"'}]}},faustIds:{defaultValue:null,description:"",name:"faustIds",required:!0,type:{name:"`${number}`[]"}},dataCy:{defaultValue:{value:"material-button-physical"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/material-buttons/physical/MaterialButtonPhysical.tsx#MaterialButtonPhysical"]={docgenInfo:MaterialButtonPhysical.__docgenInfo,name:"MaterialButtonPhysical",path:"src/components/material/material-buttons/physical/MaterialButtonPhysical.tsx#MaterialButtonPhysical"})}catch(__react_docgen_typescript_loader_error){}const MaterialButtonReservableFromAnotherLibrary=({manifestationMaterialType,faustIds,size,dataCy="material-button-reservable-on-another-library"})=>{const t=(0,utils_text.X)(),authUrl=(0,url.J_)()("authUrl"),{openGuarded}=(0,modal.f)();return react.createElement(Button.z,{dataCy,label:"small"===size?t("reservableFromAnotherLibraryText"):`${t("reservableFromAnotherLibraryText")} ${manifestationMaterialType}`,buttonType:"none",variant:"filled",disabled:!1,collapsible:!1,size:size||"large",onClick:()=>{openGuarded({authUrl,modalId:(0,helper.Aw)(faustIds)})}})},physical_MaterialButtonReservableFromAnotherLibrary=MaterialButtonReservableFromAnotherLibrary;try{MaterialButtonReservableFromAnotherLibrary.displayName="MaterialButtonReservableFromAnotherLibrary",MaterialButtonReservableFromAnotherLibrary.__docgenInfo={description:"",displayName:"MaterialButtonReservableFromAnotherLibrary",props:{manifestationMaterialType:{defaultValue:null,description:"",name:"manifestationMaterialType",required:!0,type:{name:"string"}},size:{defaultValue:null,description:"",name:"size",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"xsmall"'},{value:'"small"'},{value:'"medium"'},{value:'"large"'},{value:'"xlarge"'}]}},faustIds:{defaultValue:null,description:"",name:"faustIds",required:!0,type:{name:"`${number}`[]"}},dataCy:{defaultValue:{value:"material-button-reservable-on-another-library"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/material-buttons/physical/MaterialButtonReservableFromAnotherLibrary.tsx#MaterialButtonReservableFromAnotherLibrary"]={docgenInfo:MaterialButtonReservableFromAnotherLibrary.__docgenInfo,name:"MaterialButtonReservableFromAnotherLibrary",path:"src/components/material/material-buttons/physical/MaterialButtonReservableFromAnotherLibrary.tsx#MaterialButtonReservableFromAnotherLibrary"})}catch(__react_docgen_typescript_loader_error){}const MaterialButtonsPhysical=({manifestations,size,dataCy="material-buttons-physical"})=>{const isReservableFromAnotherLibrary=(0,general.xB)(manifestations),t=(0,utils_text.X)(),faustIds=(0,general.vH)(manifestations),{reservableManifestations}=utils_UseReservableManifestations({manifestations}),{data:userData,isLoading}=(0,user.dp)(),isUserBlocked=!(null==userData||!userData.patron||!(0,user.IT)(null==userData?void 0:userData.patron));return isLoading?react.createElement(MaterialButtonLoading.Z,null):!reservableManifestations||reservableManifestations.length<1?react.createElement(generic_MaterialButtonDisabled,{size,label:t("cantReserveText")}):isUserBlocked?react.createElement(generic_MaterialButtonUserBlocked,{size,dataCy}):isReservableFromAnotherLibrary.length>0?react.createElement(physical_MaterialButtonReservableFromAnotherLibrary,{size,manifestationMaterialType:(0,general.cC)(manifestations),faustIds}):userData&&isUserBlocked?null:react.createElement(physical_MaterialButtonPhysical,{dataCy,manifestationMaterialType:(0,general.cC)(manifestations),faustIds,size})},physical_MaterialButtonsPhysical=MaterialButtonsPhysical;try{MaterialButtonsPhysical.displayName="MaterialButtonsPhysical",MaterialButtonsPhysical.__docgenInfo={description:"",displayName:"MaterialButtonsPhysical",props:{manifestations:{defaultValue:null,description:"",name:"manifestations",required:!0,type:{name:"Manifestation[]"}},size:{defaultValue:null,description:"",name:"size",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"xsmall"'},{value:'"small"'},{value:'"medium"'},{value:'"large"'},{value:'"xlarge"'}]}},dataCy:{defaultValue:{value:"material-buttons-physical"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/material-buttons/physical/MaterialButtonsPhysical.tsx#MaterialButtonsPhysical"]={docgenInfo:MaterialButtonsPhysical.__docgenInfo,name:"MaterialButtonsPhysical",path:"src/components/material/material-buttons/physical/MaterialButtonsPhysical.tsx#MaterialButtonsPhysical"})}catch(__react_docgen_typescript_loader_error){}const MaterialButtons=({manifestations,size,workId,dataCy="material-buttons",materialTitleId})=>{const faustIds=(0,general.vH)(manifestations);return react.createElement(react.Fragment,null,(0,material_buttons_helper.ie)(graphql.U5.Physical,manifestations)&&!(0,material_buttons_helper.g0)(manifestations)&&react.createElement(react.Fragment,null,react.createElement(physical_MaterialButtonsPhysical,{manifestations,size,dataCy:`${dataCy}-physical`}),react.createElement(MaterialButtonsFindOnShelf.Z,{size,faustIds,dataCy:`${dataCy}-find-on-shelf`})),((0,material_buttons_helper.ie)(graphql.U5.Online,manifestations)||(0,material_buttons_helper.M0)("DigitalArticleService",manifestations))&&react.createElement(online_MaterialButtonsOnline,{manifestations,size,workId,dataCy:`${dataCy}-online`,ariaLabelledBy:materialTitleId}))},material_buttons_MaterialButtons=MaterialButtons;try{MaterialButtons.displayName="MaterialButtons",MaterialButtons.__docgenInfo={description:"",displayName:"MaterialButtons",props:{manifestations:{defaultValue:null,description:"",name:"manifestations",required:!0,type:{name:"Manifestation[]"}},size:{defaultValue:null,description:"",name:"size",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"xsmall"'},{value:'"small"'},{value:'"medium"'},{value:'"large"'},{value:'"xlarge"'}]}},workId:{defaultValue:null,description:"",name:"workId",required:!0,type:{name:"`work-of:${number}-${string}:${number}`"}},dataCy:{defaultValue:{value:"material-buttons"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}},materialTitleId:{defaultValue:null,description:"",name:"materialTitleId",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/material-buttons/MaterialButtons.tsx#MaterialButtons"]={docgenInfo:MaterialButtons.__docgenInfo,name:"MaterialButtons",path:"src/components/material/material-buttons/MaterialButtons.tsx#MaterialButtons"})}catch(__react_docgen_typescript_loader_error){}const MaterialMainfestationItem=({manifestation:{materialTypes,pid,titles,creators,identifiers,edition},manifestation,workId})=>{var _materialTypes$,_edition$publicationY;const mainfestationTitleId=(0,react.useId)(),t=(0,utils_text.X)(),[isOpen,setIsOpen]=(0,react.useState)(!1),faustId=(0,general.rp)(pid),author=(0,general.b7)((0,general.TG)(creators),t),languageIsoCode=(0,helper.hQ)([manifestation]),detailsListData=[{label:t("detailsListTypeText"),value:(0,helper.I_)(manifestation),type:"standard"},{label:t("detailsListLanguageText"),value:(0,helper.Jl)(manifestation),type:"standard"},{label:t("detailsListGenreAndFormText"),value:(0,helper.G2)(manifestation),type:"standard"},{label:t("detailsListContributorsText"),value:(0,helper.PI)(manifestation),type:"link"},{label:t("detailsListOriginalTitleText"),value:(0,helper.sr)(manifestation),type:"standard"},{label:t("detailsListIsbnText"),value:(0,helper.QL)(manifestation),type:"standard"},{label:t("detailsListEditionText"),value:(0,helper.jr)(manifestation),type:"standard"},{label:t("detailsListScopeText"),value:(0,helper.Ey)(manifestation),type:"standard"},{label:t("detailsListPublisherText"),value:(0,helper.CU)(manifestation),type:"standard"},{label:t("detailsListAudienceText"),value:(0,helper.tb)(manifestation),type:"standard"},{label:t("detailsListAuthorsText"),value:(0,helper.An)(manifestation),type:"standard"}],accessTypesCodes=manifestation.accessTypes.map((item=>item.code)),access=manifestation.access.map((acc=>acc.__typename)),detailsId=`material-details-${pid}`;return react.createElement("div",{className:"material-manifestation-item"},react.createElement("div",{className:"material-manifestation-item__availability"},react.createElement(availability_label.K,{manifestText:null===(_materialTypes$=materialTypes[0])||void 0===_materialTypes$?void 0:_materialTypes$.specific,faustIds:[faustId],isbns:identifiers.map((identifier=>identifier.value)),accessTypes:accessTypesCodes,access})),react.createElement("div",{className:"material-manifestation-item__cover"},react.createElement(cover.Y,{id:pid,size:"small",animate:!1})),react.createElement("div",{className:"material-manifestation-item__text"},react.createElement("h3",{lang:languageIsoCode,id:mainfestationTitleId,className:"material-manifestation-item__title text-header-h4"},null==titles?void 0:titles.main[0]),react.createElement("p",{className:"text-small-caption"},t("materialHeaderAuthorByText")," ",author,(null==edition||null===(_edition$publicationY=edition.publicationYear)||void 0===_edition$publicationY?void 0:_edition$publicationY.display)&&` (${edition.publicationYear.display})`),react.createElement("div",{className:"material-manifestation-item__details "+(isOpen?"expanded":""),onClick:()=>{setIsOpen(!isOpen)},onKeyPress:()=>{setIsOpen(!isOpen)},role:"button",tabIndex:0,"aria-controls":detailsId,"aria-expanded":isOpen},react.createElement("p",{className:"link-tag text-small-caption"},t("detailsOfTheMaterialText")),react.createElement("img",{src:ExpandMore_default(),alt:""})),isOpen&&react.createElement(material_MaterialDetailsList,{id:detailsId,className:"mt-24",data:detailsListData})),react.createElement("div",{className:"material-manifestation-item__buttons"},react.createElement(material_buttons_MaterialButtons,{manifestations:[manifestation],size:"small",workId,materialTitleId:mainfestationTitleId})))},material_MaterialMainfestationItem=MaterialMainfestationItem;try{MaterialMainfestationItem.displayName="MaterialMainfestationItem",MaterialMainfestationItem.__docgenInfo={description:"",displayName:"MaterialMainfestationItem",props:{manifestation:{defaultValue:null,description:"",name:"manifestation",required:!0,type:{name:"Manifestation"}},workId:{defaultValue:null,description:"",name:"workId",required:!0,type:{name:"`work-of:${number}-${string}:${number}`"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/MaterialMainfestationItem.tsx#MaterialMainfestationItem"]={docgenInfo:MaterialMainfestationItem.__docgenInfo,name:"MaterialMainfestationItem",path:"src/components/material/MaterialMainfestationItem.tsx#MaterialMainfestationItem"})}catch(__react_docgen_typescript_loader_error){}var DisclosureControllable=__webpack_require__("./src/components/Disclosures/DisclosureControllable.tsx"),TextInput=__webpack_require__("./src/components/atoms/input/TextInput.tsx"),ReservationForm=__webpack_require__("./src/components/reservation/forms/ReservationForm.tsx");const DigitalModalBody=({userEmail,handleSubmit,isLoading})=>{const t=(0,utils_text.X)(),[email,setEmail]=(0,react.useState)(userEmail);return react.createElement(ReservationForm.Z,{cyData:"order-digital",title:t("orderDigitalCopyTitleText"),description:[t("orderDigitalCopyDescriptionText")],onSubmit:()=>{handleSubmit(email)},buttonLabel:t(isLoading?"orderDigitalCopyButtonLoadingText":"orderDigitalCopyButtonText"),disabledButton:isLoading},react.createElement(TextInput.Z,{type:"email",label:t("orderDigitalCopyEmailLabelText"),id:"email-order-digital-copy",value:email,onChange:setEmail}))},digital_modal_DigitalModalBody=DigitalModalBody;try{DigitalModalBody.displayName="DigitalModalBody",DigitalModalBody.__docgenInfo={description:"",displayName:"DigitalModalBody",props:{userEmail:{defaultValue:null,description:"",name:"userEmail",required:!0,type:{name:"string"}},handleSubmit:{defaultValue:null,description:"",name:"handleSubmit",required:!0,type:{name:"(email: string) => void"}},isLoading:{defaultValue:null,description:"",name:"isLoading",required:!0,type:{name:"boolean"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/digital-modal/DigitalModalBody.tsx#DigitalModalBody"]={docgenInfo:DigitalModalBody.__docgenInfo,name:"DigitalModalBody",path:"src/components/material/digital-modal/DigitalModalBody.tsx#DigitalModalBody"})}catch(__react_docgen_typescript_loader_error){}const DigitalModalFeedback=({modalId,feedbackMessage})=>{const t=(0,utils_text.X)(),{close}=(0,modal.f)();return react.createElement(ReservationForm.Z,{cyData:"order-digital-feedback",title:t("orderDigitalCopyFeedbackTitleText"),description:[feedbackMessage??""],onSubmit:()=>close(modalId),buttonLabel:t("orderDigitalCopyFeedbackButtonText")})},digital_modal_DigitalModalFeedback=DigitalModalFeedback;try{DigitalModalFeedback.displayName="DigitalModalFeedback",DigitalModalFeedback.__docgenInfo={description:"",displayName:"DigitalModalFeedback",props:{modalId:{defaultValue:null,description:"",name:"modalId",required:!0,type:{name:"string"}},feedbackMessage:{defaultValue:null,description:"",name:"feedbackMessage",required:!0,type:{name:"string | null"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/digital-modal/DigitalModalFeedback.tsx#DigitalModalFeedback"]={docgenInfo:DigitalModalFeedback.__docgenInfo,name:"DigitalModalFeedback",path:"src/components/material/digital-modal/DigitalModalFeedback.tsx#DigitalModalFeedback"})}catch(__react_docgen_typescript_loader_error){}const DigitalModal=({pid,workId})=>{const modalId=createDigitalModalId(pid),t=(0,utils_text.X)(),[userEmail,setUserEmail]=(0,react.useState)(null),{track}=(0,useStatistics.T)(),{mutate:articleOrder,isLoading:articleOrderLoading,data:articleResponse}=(0,graphql.zj)(),responseMessage=((articleResponse,t)=>articleResponse?Object.values(graphql.rU).reduce(((acc,current)=>{return{...acc,[current]:t(`orderDigitalCopyFeedback${string=current,string.toLowerCase().split("_").map((word=>word.charAt(0).toUpperCase()+word.slice(1))).join("")}Text`)};var string}),{})[articleResponse.elba.placeCopyRequest.status]:null)(articleResponse,t),{data:patronData}=(0,user.dp)();return(0,react.useEffect)((()=>{var _patronData$patron;patronData&&(null!==(_patronData$patron=patronData.patron)&&void 0!==_patronData$patron&&_patronData$patron.emailAddress?setUserEmail(patronData.patron.emailAddress):setUserEmail(""))}),[patronData]),(0,user.TF)()?null:react.createElement(modal.Z,{modalId,screenReaderModalDescriptionText:t("orderDigitalCopyModalScreenReaderModalDescriptionText"),closeModalAriaLabelText:t("orderDigitalCopyModalCloseModalAriaLabelText")},responseMessage?react.createElement(digital_modal_DigitalModalFeedback,{modalId,feedbackMessage:responseMessage}):null!==userEmail&&react.createElement(digital_modal_DigitalModalBody,{userEmail,handleSubmit:email=>{articleOrder({input:{pid,userMail:email}},{onSuccess:()=>{track("click",{id:statistics.h.reservation.id,name:statistics.h.reservation.name,trackedData:workId})}})},isLoading:articleOrderLoading}))},digital_modal_DigitalModal=DigitalModal;try{DigitalModal.displayName="DigitalModal",DigitalModal.__docgenInfo={description:"",displayName:"DigitalModal",props:{pid:{defaultValue:null,description:"",name:"pid",required:!0,type:{name:"`${number}-${string}:${number}`"}},workId:{defaultValue:null,description:"",name:"workId",required:!0,type:{name:"`work-of:${number}-${string}:${number}`"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/digital-modal/DigitalModal.tsx#DigitalModal"]={docgenInfo:DigitalModal.__docgenInfo,name:"DigitalModal",path:"src/components/material/digital-modal/DigitalModal.tsx#DigitalModal"})}catch(__react_docgen_typescript_loader_error){}var es=__webpack_require__("./node_modules/react-redux/es/index.js"),guardedRequests_slice=__webpack_require__("./src/core/guardedRequests.slice.ts"),availability_labels=__webpack_require__("./src/components/availability-label/availability-labels.tsx"),button_favourite=__webpack_require__("./src/components/button-favourite/button-favourite.tsx"),head=__webpack_require__("./node_modules/lodash/head.js"),head_default=__webpack_require__.n(head),publizon=__webpack_require__("./src/core/publizon/publizon.ts");const MaterialAvailabilityTextParagraph=({children})=>react.createElement("p",{className:"mt-16 text-small-caption"},children),generic_MaterialAvailabilityTextParagraph=MaterialAvailabilityTextParagraph;try{MaterialAvailabilityTextParagraph.displayName="MaterialAvailabilityTextParagraph",MaterialAvailabilityTextParagraph.__docgenInfo={description:"",displayName:"MaterialAvailabilityTextParagraph",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/MaterialAvailabilityText/generic/MaterialAvailabilityTextParagraph.tsx#MaterialAvailabilityTextParagraph"]={docgenInfo:MaterialAvailabilityTextParagraph.__docgenInfo,name:"MaterialAvailabilityTextParagraph",path:"src/components/material/MaterialAvailabilityText/generic/MaterialAvailabilityTextParagraph.tsx#MaterialAvailabilityTextParagraph"})}catch(__react_docgen_typescript_loader_error){}const MaterialAvailabilityTextOnline=({isbns,materialType})=>{var _loansData$userData,_loansData$userData2,_productsData$product;const t=(0,utils_text.X)(),{data:productsData}=(0,publizon.tq)(isbns[0]),{data:libraryProfileData}=(0,publizon.ul)(),{data:loansData}=(0,publizon.T8)();if(!libraryProfileData||!loansData||!productsData)return null;const totalEbookLoans=null==loansData||null===(_loansData$userData=loansData.userData)||void 0===_loansData$userData?void 0:_loansData$userData.totalEbookLoans,totalAudioLoans=null==loansData||null===(_loansData$userData2=loansData.userData)||void 0===_loansData$userData2?void 0:_loansData$userData2.totalAudioLoans,{maxConcurrentEbookLoansPerBorrower,maxConcurrentAudioLoansPerBorrower}=libraryProfileData,availabilityTextMap={[material_type.XK.ebook]:{text:"onlineLimitMonthEbookInfoText",count:totalEbookLoans,limit:maxConcurrentEbookLoansPerBorrower},[material_type.XK.audioBook]:{text:"onlineLimitMonthAudiobookInfoText",count:totalAudioLoans,limit:maxConcurrentAudioLoansPerBorrower},materialIsIncluded:{text:"materialIsIncludedText"}},availabilityText=(({type,map,t})=>{if(!map||!map[type])return null;const{text,count,limit}=map[type];return void 0===count&&void 0===limit&&text?t(text):void 0!==count&&void 0!==limit&&void 0!==text?t(text,{placeholders:{"@count":count,"@limit":limit}}):null})({type:null!==(_productsData$product=productsData.product)&&void 0!==_productsData$product&&_productsData$product.costFree?"materialIsIncluded":materialType,map:availabilityTextMap,t});return react.createElement(generic_MaterialAvailabilityTextParagraph,null,availabilityText)},online_MaterialAvailabilityTextOnline=MaterialAvailabilityTextOnline;try{MaterialAvailabilityTextOnline.displayName="MaterialAvailabilityTextOnline",MaterialAvailabilityTextOnline.__docgenInfo={description:"",displayName:"MaterialAvailabilityTextOnline",props:{isbns:{defaultValue:null,description:"",name:"isbns",required:!0,type:{name:"string[]"}},materialType:{defaultValue:null,description:"",name:"materialType",required:!0,type:{name:"enum",value:[{value:'"bog"'},{value:'"e-bog"'},{value:'"film"'},{value:'"lydbog (online)"'},{value:'"lydbog"'},{value:'"node"'},{value:'"playstation 5"'},{value:'"tegneserie"'},{value:'"artikel"'},{value:'"spil"'},{value:'"cd"'},{value:'"tidsskrift"'}]}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/MaterialAvailabilityText/online/MaterialAvailabilityTextOnline.tsx#MaterialAvailabilityTextOnline"]={docgenInfo:MaterialAvailabilityTextOnline.__docgenInfo,name:"MaterialAvailabilityTextOnline",path:"src/components/material/MaterialAvailabilityText/online/MaterialAvailabilityTextOnline.tsx#MaterialAvailabilityTextOnline"})}catch(__react_docgen_typescript_loader_error){}const StockAndReservationInfo=({stockCount,reservationCount,numberInQueue})=>{const t=(0,utils_text.X)(),materialsInStockInfoText=t("materialsInStockInfoText",{count:stockCount,placeholders:{"@count":stockCount}}),materialReservationInfoText=t("materialReservationInfoText",{count:reservationCount,placeholders:{"@count":reservationCount}}),numberInQueueText=!!numberInQueue&&t("numberInQueueText",{placeholders:{"@number":numberInQueue}});return react.createElement(react.Fragment,null,numberInQueueText&&`${numberInQueueText} `,materialsInStockInfoText&&`${materialsInStockInfoText} `,materialReservationInfoText&&materialReservationInfoText)},material_StockAndReservationInfo=StockAndReservationInfo;try{StockAndReservationInfo.displayName="StockAndReservationInfo",StockAndReservationInfo.__docgenInfo={description:"",displayName:"StockAndReservationInfo",props:{stockCount:{defaultValue:null,description:"",name:"stockCount",required:!0,type:{name:"number"}},reservationCount:{defaultValue:null,description:"",name:"reservationCount",required:!0,type:{name:"number"}},numberInQueue:{defaultValue:null,description:"",name:"numberInQueue",required:!1,type:{name:"number | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/StockAndReservationInfo.tsx#StockAndReservationInfo"]={docgenInfo:StockAndReservationInfo.__docgenInfo,name:"StockAndReservationInfo",path:"src/components/material/StockAndReservationInfo.tsx#StockAndReservationInfo"})}catch(__react_docgen_typescript_loader_error){}const MaterialAvailabilityTextPhysical=({pids})=>{const config=(0,utils_config.ZR)(),faustIds=(0,general.TH)(pids),{data,isLoading,isError}=(0,helper.Lt)({faustIds,config});if(isLoading||isError||!data)return null;const holdings=(0,helper.Vq)(data),reservations=(0,helper.iT)(data);return react.createElement(generic_MaterialAvailabilityTextParagraph,null,react.createElement(material_StockAndReservationInfo,{stockCount:holdings,reservationCount:reservations}))},physical_MaterialAvailabilityTextPhysical=MaterialAvailabilityTextPhysical;try{MaterialAvailabilityTextPhysical.displayName="MaterialAvailabilityTextPhysical",MaterialAvailabilityTextPhysical.__docgenInfo={description:"",displayName:"MaterialAvailabilityTextPhysical",props:{pids:{defaultValue:null,description:"",name:"pids",required:!0,type:{name:"`${number}-${string}:${number}`[]"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/MaterialAvailabilityText/physical/MaterialAvailabilityTextPhysical.tsx#MaterialAvailabilityTextPhysical"]={docgenInfo:MaterialAvailabilityTextPhysical.__docgenInfo,name:"MaterialAvailabilityTextPhysical",path:"src/components/material/MaterialAvailabilityText/physical/MaterialAvailabilityTextPhysical.tsx#MaterialAvailabilityTextPhysical"})}catch(__react_docgen_typescript_loader_error){}const MaterialAvailabilityText=({manifestations})=>{const materialType=head_default()((0,general.A3)(manifestations)),isbns=(0,helper.LJ)(manifestations);if((0,material_buttons_helper.ie)(graphql.U5.Physical,manifestations)){const pids=(0,general.k7)(manifestations);return react.createElement(physical_MaterialAvailabilityTextPhysical,{pids})}return(0,material_buttons_helper.ie)(graphql.U5.Online,manifestations)&&isbns.length>0&&materialType?react.createElement(online_MaterialAvailabilityTextOnline,{isbns,materialType}):null},MaterialAvailabilityText_MaterialAvailabilityText=MaterialAvailabilityText;try{MaterialAvailabilityText.displayName="MaterialAvailabilityText",MaterialAvailabilityText.__docgenInfo={description:"",displayName:"MaterialAvailabilityText",props:{manifestations:{defaultValue:null,description:"",name:"manifestations",required:!0,type:{name:"Manifestation[]"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/MaterialAvailabilityText/MaterialAvailabilityText.tsx#MaterialAvailabilityText"]={docgenInfo:MaterialAvailabilityText.__docgenInfo,name:"MaterialAvailabilityText",path:"src/components/material/MaterialAvailabilityText/MaterialAvailabilityText.tsx#MaterialAvailabilityText"})}catch(__react_docgen_typescript_loader_error){}const MaterialHeaderText=({title,author,languageIsoCode,materialTitleId})=>{const t=(0,utils_text.X)(),searchUrl=(0,url.J_)()("searchUrl");return react.createElement(react.Fragment,null,react.createElement("h1",{id:materialTitleId,lang:languageIsoCode,className:"text-header-h1 mb-16"},title),author&&react.createElement("p",{"data-cy":"material-header-author-text",className:"text-body-large"},react.createElement("span",null,t("materialHeaderAuthorByText")," "),react.createElement(LinkNoStyle.Z,{url:(0,helpers_url.Nt)(searchUrl,author),className:"arrow__link"},author)))},material_MaterialHeaderText=MaterialHeaderText;try{MaterialHeaderText.displayName="MaterialHeaderText",MaterialHeaderText.__docgenInfo={description:"",displayName:"MaterialHeaderText",props:{title:{defaultValue:null,description:"",name:"title",required:!0,type:{name:"string"}},author:{defaultValue:null,description:"",name:"author",required:!0,type:{name:"string"}},languageIsoCode:{defaultValue:null,description:"",name:"languageIsoCode",required:!1,type:{name:"string | undefined"}},materialTitleId:{defaultValue:null,description:"",name:"materialTitleId",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/MaterialHeaderText.tsx#MaterialHeaderText"]={docgenInfo:MaterialHeaderText.__docgenInfo,name:"MaterialHeaderText",path:"src/components/material/MaterialHeaderText.tsx#MaterialHeaderText"})}catch(__react_docgen_typescript_loader_error){}var isEmpty=__webpack_require__("./node_modules/lodash/isEmpty.js"),isEmpty_default=__webpack_require__.n(isEmpty),periodical_helper=__webpack_require__("./src/components/material/periodical/helper.ts");const MaterialPeriodicalSelect=({groupList,selectedPeriodical,selectPeriodicalHandler})=>{const t=(0,utils_text.X)(),lastYear=Object.keys(groupList).sort().pop()||"",[year,setYear]=(0,react.useState)(lastYear),periodicalEditions=(0,periodical_helper.ik)(groupList);(0,react.useEffect)((()=>{if(selectedPeriodical)return;const firstEdition=(0,periodical_helper.P5)(year,periodicalEditions),firstFullPeriodicalEdition=groupList[year].find((edition=>edition.volumeNumber===firstEdition));firstFullPeriodicalEdition&&selectPeriodicalHandler(firstFullPeriodicalEdition)}),[selectPeriodicalHandler,selectedPeriodical,year,periodicalEditions,groupList]);return react.createElement("div",{className:"text-small-caption material-periodical"},react.createElement("div",{className:"material-periodical-select"},react.createElement("label",{htmlFor:"year"},t("periodicalSelectYearText")),react.createElement("div",{className:"material-periodical-select__border-container"},react.createElement("select",{id:"year",defaultValue:year,onChange:event=>{(0,periodical_helper.sW)(event.target.value,setYear,selectPeriodicalHandler,periodicalEditions,groupList)}},Object.keys(periodicalEditions).sort().map((item=>react.createElement("option",{key:item,value:item},item)))))),year&&react.createElement("div",{className:"material-periodical-select"},react.createElement("label",{htmlFor:"editions"},t("periodicalSelectEditionText")),react.createElement("div",{className:"material-periodical-select__border-container"},react.createElement("select",{id:"editions",value:null==selectedPeriodical?void 0:selectedPeriodical.volumeNumber,onChange:event=>{(0,periodical_helper.ul)(groupList,year,event.target.value,selectPeriodicalHandler)}},periodicalEditions[year].map((item=>react.createElement("option",{key:item,value:item},item)))))))},periodical_MaterialPeriodicalSelect=MaterialPeriodicalSelect;try{MaterialPeriodicalSelect.displayName="MaterialPeriodicalSelect",MaterialPeriodicalSelect.__docgenInfo={description:"",displayName:"MaterialPeriodicalSelect",props:{groupList:{defaultValue:null,description:"",name:"groupList",required:!0,type:{name:"GroupList"}},selectedPeriodical:{defaultValue:null,description:"",name:"selectedPeriodical",required:!0,type:{name:"PeriodicalEdition | null"}},selectPeriodicalHandler:{defaultValue:null,description:"",name:"selectPeriodicalHandler",required:!0,type:{name:"(selectedPeriodical: PeriodicalEdition) => void"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/periodical/MaterialPeriodicalSelect.tsx#MaterialPeriodicalSelect"]={docgenInfo:MaterialPeriodicalSelect.__docgenInfo,name:"MaterialPeriodicalSelect",path:"src/components/material/periodical/MaterialPeriodicalSelect.tsx#MaterialPeriodicalSelect"})}catch(__react_docgen_typescript_loader_error){}const MaterialPeriodical=({faustId,selectedPeriodical,selectPeriodicalHandler})=>{const config=(0,utils_config.ZR)(),{data,isLoading,isError}=(0,helper.Lt)({faustIds:[faustId],config});if(isLoading||isError||!data)return null;const materialsPeriodical=data[0].holdings.map((holding=>holding.materials.flat().map((material=>({...material.periodical,itemNumber:material.itemNumber}))))).flat(),groupByVolumeYear=(0,general.CU)(materialsPeriodical,"volumeYear");return groupByVolumeYear&&selectPeriodicalHandler&&!isEmpty_default()(groupByVolumeYear)?react.createElement(periodical_MaterialPeriodicalSelect,{groupList:groupByVolumeYear,selectedPeriodical,selectPeriodicalHandler}):null},periodical_MaterialPeriodical=MaterialPeriodical;try{MaterialPeriodical.displayName="MaterialPeriodical",MaterialPeriodical.__docgenInfo={description:"",displayName:"MaterialPeriodical",props:{faustId:{defaultValue:null,description:"",name:"faustId",required:!0,type:{name:"`${number}`"}},selectedPeriodical:{defaultValue:null,description:"",name:"selectedPeriodical",required:!0,type:{name:"PeriodicalEdition | null"}},selectPeriodicalHandler:{defaultValue:null,description:"",name:"selectPeriodicalHandler",required:!0,type:{name:"(selectedPeriodical: PeriodicalEdition) => void"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/periodical/MaterialPeriodical.tsx#MaterialPeriodical"]={docgenInfo:MaterialPeriodical.__docgenInfo,name:"MaterialPeriodical",path:"src/components/material/periodical/MaterialPeriodical.tsx#MaterialPeriodical"})}catch(__react_docgen_typescript_loader_error){}const MaterialHeader=({work:{titles:{full:fullTitle},creators,manifestations:{all:manifestations},mainLanguages,workId:wid},selectedManifestations,setSelectedManifestations,selectedPeriodical,selectPeriodicalHandler,children})=>{const materialTitleId=(0,react.useId)(),{itemRef,hasBeenVisible:showItem}=(0,lazy_load.L)(),t=(0,utils_text.X)(),dispatch=(0,es.I0)(),author=(0,general.b7)((0,general.TG)(creators),t),isPeriodical=(0,material_buttons_helper.zn)(material_type.XK.magazine,selectedManifestations),containsDanish=mainLanguages.some((language=>null==language?void 0:language.isoCode.toLowerCase().includes("dan"))),allLanguages=mainLanguages.map((language=>language.display)).join(", "),title=containsDanish?fullTitle:`${fullTitle} (${allLanguages})`,pid=(0,general.qQ)(manifestations),{track}=(0,useStatistics.T)(),manifestationMaterialTypes=(0,general.A3)(selectedManifestations),languageIsoCode=(0,helper.hQ)(selectedManifestations);return(0,useDeepCompareEffect.Z)((()=>{track("click",{id:statistics.h.materialType.id,name:statistics.h.materialType.name,trackedData:manifestationMaterialTypes.join(", ")}),track("click",{id:statistics.h.materialSource.id,name:statistics.h.materialSource.name,trackedData:selectedManifestations.map((manifestation=>manifestation.source.join(", "))).join(", ")})}),[manifestationMaterialTypes]),react.createElement("header",{className:"material-header"},react.createElement("div",{className:"material-header__cover"},react.createElement(cover.Y,{id:pid,size:"xlarge",animate:!0,shadow:!0})),react.createElement("div",{"data-cy":"material-header-content",className:"material-header__content"},react.createElement(button_favourite.Z,{title:String(title),id:wid,addToListRequest:id=>{dispatch((0,guardedRequests_slice.Bs)({type:"addFavorite",args:{id},app:"material"}))}}),react.createElement(material_MaterialHeaderText,{title:String(title),author,languageIsoCode,materialTitleId}),react.createElement("div",{ref:itemRef,className:"material-header__availability-label"},showItem&&react.createElement(availability_labels.U,{cursorPointer:!0,workId:wid,manifestations,selectedManifestations,setSelectedManifestations})),showItem&&react.createElement(react.Fragment,null,isPeriodical&&react.createElement(periodical_MaterialPeriodical,{faustId:(0,general.rp)(pid),selectedPeriodical,selectPeriodicalHandler}),selectedManifestations&&react.createElement(react.Fragment,null,react.createElement("div",{className:"material-header__button"},react.createElement(material_buttons_MaterialButtons,{manifestations:selectedManifestations,workId:wid,dataCy:"material-header-buttons",materialTitleId})),!(0,user.TF)()&&react.createElement(MaterialAvailabilityText_MaterialAvailabilityText,{manifestations:selectedManifestations})),children)))},material_MaterialHeader=MaterialHeader;try{MaterialHeader.displayName="MaterialHeader",MaterialHeader.__docgenInfo={description:"",displayName:"MaterialHeader",props:{wid:{defaultValue:null,description:"",name:"wid",required:!0,type:{name:"`work-of:${number}-${string}:${number}`"}},work:{defaultValue:null,description:"",name:"work",required:!0,type:{name:"Work"}},selectedManifestations:{defaultValue:null,description:"",name:"selectedManifestations",required:!0,type:{name:"Manifestation[]"}},setSelectedManifestations:{defaultValue:null,description:"",name:"setSelectedManifestations",required:!0,type:{name:"(manifestations: Manifestation[]) => void"}},selectedPeriodical:{defaultValue:null,description:"",name:"selectedPeriodical",required:!0,type:{name:"PeriodicalEdition | null"}},selectPeriodicalHandler:{defaultValue:null,description:"",name:"selectPeriodicalHandler",required:!0,type:{name:"(selectedPeriodical: PeriodicalEdition) => void"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/MaterialHeader.tsx#MaterialHeader"]={docgenInfo:MaterialHeader.__docgenInfo,name:"MaterialHeader",path:"src/components/material/MaterialHeader.tsx#MaterialHeader"})}catch(__react_docgen_typescript_loader_error){}const MaterialSkeleton=()=>react.createElement("section",{className:"material-page ssc"},react.createElement("header",{className:"material-header"},react.createElement("div",{className:"material-header__cover"},react.createElement("div",{className:"ssc-square cover cover--size-xlarge cover--aspect-xlarge"})),react.createElement("div",{className:"material-header__content"},react.createElement("div",null,react.createElement("div",{className:"scc-wrapper"},react.createElement("div",{className:"ssc-square mb-32"}),react.createElement("div",{className:"ssc-head-line mbs"}),react.createElement("div",{className:"ssc-head-line mbs"}),react.createElement("div",{className:"ssc-head-line mb-48"}),react.createElement("div",{className:"ssc-line w-30"}," ")),react.createElement("div",{className:"scc-wrapper pt-48"},react.createElement("div",{className:"ssc-head-line w-80 mbs"}),react.createElement("div",{className:"ssc-head-line w-80 mbs"}),react.createElement("div",{className:"ssc-line"}))))),react.createElement("section",{className:"material-description"},react.createElement("div",{className:"ssc-head-line w-20 mb"}),react.createElement("div",{className:"ssc-line w-60 mbs"}),react.createElement("div",{className:"ssc-line w-60 mbs"}),react.createElement("div",{className:"ssc-line w-60 mbs"}),react.createElement("div",{className:"ssc-line w-60 mb"}),react.createElement("div",{className:"scc-wrapper pt-16"},react.createElement("div",{className:"ssc-head-line w-10 mt mb"}),react.createElement("div",{className:"ssc-line w-70 mbs"}),react.createElement("div",{className:"ssc-line w-70 mbs"}),react.createElement("div",{className:"ssc-line w-70 mbs"})))),material_MaterialSkeleton=MaterialSkeleton;try{MaterialSkeleton.displayName="MaterialSkeleton",MaterialSkeleton.__docgenInfo={description:"",displayName:"MaterialSkeleton",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/MaterialSkeleton.tsx#MaterialSkeleton"]={docgenInfo:MaterialSkeleton.__docgenInfo,name:"MaterialSkeleton",path:"src/components/material/MaterialSkeleton.tsx#MaterialSkeleton"})}catch(__react_docgen_typescript_loader_error){}var DisclosureSummary=__webpack_require__("./src/components/Disclosures/DisclosureSummary.tsx"),disclosure=__webpack_require__("./src/components/Disclosures/disclosure.tsx");const MaterialDisclosure=({title,icon,children,dataCy})=>react.createElement(disclosure.Z,{dataCy,summary:react.createElement(DisclosureSummary.Z,{title,mainIconPath:icon})},children),material_MaterialDisclosure=MaterialDisclosure;try{MaterialDisclosure.displayName="MaterialDisclosure",MaterialDisclosure.__docgenInfo={description:"",displayName:"MaterialDisclosure",props:{dataCy:{defaultValue:null,description:"",name:"dataCy",required:!0,type:{name:"string"}},title:{defaultValue:null,description:"",name:"title",required:!0,type:{name:"string"}},icon:{defaultValue:null,description:"",name:"icon",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/material/MaterialDisclosure.tsx#MaterialDisclosure"]={docgenInfo:MaterialDisclosure.__docgenInfo,name:"MaterialDisclosure",path:"src/apps/material/MaterialDisclosure.tsx#MaterialDisclosure"})}catch(__react_docgen_typescript_loader_error){}var react_query_es=__webpack_require__("./node_modules/react-query/es/index.js"),ReservationFormListItem=__webpack_require__("./src/components/reservation/ReservationFormListItem.tsx"),Location=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/Location.svg"),Location_default=__webpack_require__.n(Location),Subtitles=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/Subtitles.svg"),Subtitles_default=__webpack_require__.n(Subtitles),Message=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/Message.svg"),Message_default=__webpack_require__.n(Message),LoanHistory=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/LoanHistory.svg"),LoanHistory_default=__webpack_require__.n(LoanHistory),isEqual=__webpack_require__("./node_modules/lodash/isEqual.js"),isEqual_default=__webpack_require__.n(isEqual),fbs=__webpack_require__("./src/core/fbs/fbs.ts"),reservation_helper=__webpack_require__("./src/components/reservation/helper.ts"),forms_helper=__webpack_require__("./src/components/reservation/forms/helper.ts");const ModalReservationFormText=({type,defaultText,header,inputField,patron})=>{const{close}=(0,modal.f)(),queryClient=(0,react_query_es.useQueryClient)(),t=(0,utils_text.X)(),[text,setText]=(0,react.useState)((0,general._M)(defaultText)),{mutate}=(0,fbs.tX)(),{modalId,screenReaderModalDescriptionText,closeModalAriaLabelText}=((type,t)=>({modalId:(0,forms_helper._3)(type),screenReaderModalDescriptionText:t((0,reservation_helper.o9)(type,"screenReaderModalDescriptionText")),closeModalAriaLabelText:t((0,reservation_helper.o9)(type,"closeModalAriaLabelText"))}))(type,t);return react.createElement(modal.Z,{modalId,screenReaderModalDescriptionText,closeModalAriaLabelText},react.createElement(ReservationForm.Z,{title:header.title,description:header.description,onSubmit:()=>{(0,forms_helper.E4)({type,changedText:text,savedText:defaultText,patron,mutate}).then((response=>{response&&queryClient.setQueryData((0,fbs.Tk)(),response)})).catch((e=>{throw setText((0,general._M)(defaultText)),e})).finally((()=>{close((0,forms_helper._3)(type))}))}},react.createElement(TextInput.Z,{description:inputField.description,id:type,label:inputField.label,type:"text",onChange:input=>{setText(input)},value:text})))},forms_ModalReservationFormText=(0,react.memo)(ModalReservationFormText,isEqual_default());try{ModalReservationFormText.displayName="ModalReservationFormText",ModalReservationFormText.__docgenInfo={description:"",displayName:"ModalReservationFormText",props:{type:{defaultValue:null,description:"",name:"type",required:!0,type:{name:"enum",value:[{value:'"email"'},{value:'"sms"'},{value:'"pickup"'},{value:'"interestPeriod"'}]}},defaultText:{defaultValue:null,description:"",name:"defaultText",required:!1,type:{name:"string | undefined"}},header:{defaultValue:null,description:"",name:"header",required:!0,type:{name:"{ title: string; description: string[]; }"}},inputField:{defaultValue:null,description:"",name:"inputField",required:!0,type:{name:"{ description: string; label: string; }"}},patron:{defaultValue:null,description:"",name:"patron",required:!0,type:{name:"PatronV5"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/reservation/forms/ModalReservationFormText.tsx#ModalReservationFormText"]={docgenInfo:ModalReservationFormText.__docgenInfo,name:"ModalReservationFormText",path:"src/components/reservation/forms/ModalReservationFormText.tsx#ModalReservationFormText"})}catch(__react_docgen_typescript_loader_error){}const EmailModal=({patron,patron:{emailAddress}})=>{const t=(0,utils_text.X)();return react.createElement(forms_ModalReservationFormText,{type:"email",defaultText:emailAddress,header:{title:t("modalReservationFormEmailHeaderTitleText"),description:[t("modalReservationFormEmailHeaderDescriptionText")]},inputField:{label:t("modalReservationFormEmailInputFieldLabelText"),description:t("modalReservationFormEmailInputFieldDescriptionText")},patron})},forms_EmailModal=EmailModal;try{EmailModal.displayName="EmailModal",EmailModal.__docgenInfo={description:"",displayName:"EmailModal",props:{patron:{defaultValue:null,description:"",name:"patron",required:!0,type:{name:"PatronV5"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/reservation/forms/EmailModal.tsx#EmailModal"]={docgenInfo:EmailModal.__docgenInfo,name:"EmailModal",path:"src/components/reservation/forms/EmailModal.tsx#EmailModal"})}catch(__react_docgen_typescript_loader_error){}const SmsModal=({patron,patron:{phoneNumber}})=>{const t=(0,utils_text.X)();return react.createElement(forms_ModalReservationFormText,{type:"sms",defaultText:phoneNumber,header:{title:t("modalReservationFormSmsHeaderTitleText"),description:[t("modalReservationFormSmsHeaderDescriptionText")]},inputField:{label:t("modalReservationFormSmsInputFieldLabelText"),description:t("modalReservationFormSmsInputFieldDescriptionText")},patron})},forms_SmsModal=SmsModal;try{SmsModal.displayName="SmsModal",SmsModal.__docgenInfo={description:"",displayName:"SmsModal",props:{patron:{defaultValue:null,description:"",name:"patron",required:!0,type:{name:"PatronV5"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/reservation/forms/SmsModal.tsx#SmsModal"]={docgenInfo:SmsModal.__docgenInfo,name:"SmsModal",path:"src/components/reservation/forms/SmsModal.tsx#SmsModal"})}catch(__react_docgen_typescript_loader_error){}var PickupModal=__webpack_require__("./src/components/reservation/forms/PickupModal.tsx"),NoInterestAfterModal=__webpack_require__("./src/components/reservation/forms/NoInterestAfterModal.tsx");const UserListItems=({patron,patron:{defaultInterestPeriod,preferredPickupBranch,phoneNumber,emailAddress},branches,selectedBranch,selectBranchHandler,selectedInterest,setSelectedInterest,whitelistBranches})=>{const t=(0,utils_text.X)(),config=(0,utils_config.ZR)(),interestPeriods=config("interestPeriodsConfig",{transformer:"jsonParse"}),{open}=(0,modal.f)(),openModal=type=>()=>{open((0,forms_helper._3)(type))},interestPeriod=selectedInterest?(0,reservation_helper.OR)(selectedInterest,interestPeriods,t):(0,reservation_helper.OR)(Number(interestPeriods.defaultInterestPeriod.value),interestPeriods,t),pickupBranch=selectedBranch?(0,reservation_helper.Sp)(selectedBranch,branches):(0,reservation_helper.Sp)(preferredPickupBranch,branches);return react.createElement(react.Fragment,null,defaultInterestPeriod&&react.createElement(react.Fragment,null,react.createElement(ReservationFormListItem.Z,{icon:LoanHistory_default(),title:t("reservationDetailsNoInterestAfterTitleText"),text:interestPeriod,changeHandler:openModal("interestPeriod"),buttonAriaLabel:t("changeInterestPeriodText")}),react.createElement(NoInterestAfterModal.Z,{selectedInterest:selectedInterest??defaultInterestPeriod,setSelectedInterest})),preferredPickupBranch&&whitelistBranches&&react.createElement(react.Fragment,null,react.createElement(ReservationFormListItem.Z,{icon:Location_default(),title:t("reservationDetailsPickUpAtTitleText"),text:pickupBranch,changeHandler:openModal("pickup"),buttonAriaLabel:t("changePickupLocationText")}),react.createElement(PickupModal.Z,{branches:whitelistBranches,defaultBranch:selectedBranch??preferredPickupBranch,selectBranchHandler})),react.createElement(react.Fragment,null,(0,reservation_helper.f2)(config("smsNotificationsForReservationsEnabledConfig"))&&react.createElement(react.Fragment,null,react.createElement(ReservationFormListItem.Z,{icon:Subtitles_default(),title:t("receiveSmsWhenMaterialReadyText"),text:(0,general._M)(phoneNumber),changeHandler:openModal("sms"),buttonAriaLabel:t("changeSmsNumberText")}),react.createElement(forms_SmsModal,{patron})),react.createElement(ReservationFormListItem.Z,{icon:Message_default(),title:t("receiveEmailWhenMaterialReadyText"),text:(0,general._M)(emailAddress),changeHandler:openModal("email"),buttonAriaLabel:t("changeEmailText")}),react.createElement(forms_EmailModal,{patron})))},reservation_UserListItems=UserListItems;try{UserListItems.displayName="UserListItems",UserListItems.__docgenInfo={description:"",displayName:"UserListItems",props:{patron:{defaultValue:null,description:"",name:"patron",required:!0,type:{name:"PatronV5"}},branches:{defaultValue:null,description:"",name:"branches",required:!0,type:{name:"AgencyBranch[]"}},selectedBranch:{defaultValue:null,description:"",name:"selectedBranch",required:!0,type:{name:"string | null"}},selectBranchHandler:{defaultValue:null,description:"",name:"selectBranchHandler",required:!0,type:{name:"(value: string) => void"}},selectedInterest:{defaultValue:null,description:"",name:"selectedInterest",required:!0,type:{name:"number | null"}},setSelectedInterest:{defaultValue:null,description:"",name:"setSelectedInterest",required:!0,type:{name:"(value: number) => void"}},whitelistBranches:{defaultValue:null,description:"",name:"whitelistBranches",required:!0,type:{name:"AgencyBranch[]"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/reservation/UserListItems.tsx#UserListItems"]={docgenInfo:UserListItems.__docgenInfo,name:"UserListItems",path:"src/components/reservation/UserListItems.tsx#UserListItems"})}catch(__react_docgen_typescript_loader_error){}var focus_trap_react=__webpack_require__("./node_modules/focus-trap-react/dist/focus-trap-react.js"),focus_trap_react_default=__webpack_require__.n(focus_trap_react),modal_slice=__webpack_require__("./src/core/modal.slice.ts");const ReservationSucces=({modalId,title,preferredPickupBranch,numberInQueue,reservationCount,holdings})=>{const dispatch=(0,es.I0)(),t=(0,utils_text.X)();return react.createElement(focus_trap_react_default(),{focusTrapOptions:{allowOutsideClick:!0}},react.createElement("section",{className:"reservation-modal reservation-modal--confirm"},react.createElement("h2",{"data-cy":"reservation-success-title-text",className:"text-header-h3 pb-48"},t("reservationSuccesTitleText")),react.createElement("p",{"data-cy":"reservation-success-is-reserved-for-you-text",className:"text-body-medium-regular pb-24"},title," ",t("reservationSuccesIsReservedForYouText")),react.createElement("p",{"data-cy":"number-in-queue-text",className:"text-body-medium-regular pb-24"},react.createElement(material_StockAndReservationInfo,{stockCount:holdings,reservationCount,numberInQueue})),react.createElement("p",{"data-cy":"reservation-success-preferred-pickup-branch-text",className:"text-body-medium-regular pb-48"},t("reservationSuccessPreferredPickupBranchText",{placeholders:{"@branch":preferredPickupBranch}}),"."),react.createElement(Button.z,{dataCy:"reservation-success-close-button",classNames:"reservation-modal__confirm-button",label:t("okButtonText"),buttonType:"none",disabled:!1,collapsible:!1,size:"small",variant:"filled",onClick:()=>{dispatch((0,modal_slice.Mr)({modalId}))}})))},reservation_ReservationSucces=ReservationSucces;try{ReservationSucces.displayName="ReservationSucces",ReservationSucces.__docgenInfo={description:"",displayName:"ReservationSucces",props:{title:{defaultValue:null,description:"",name:"title",required:!0,type:{name:"string"}},preferredPickupBranch:{defaultValue:null,description:"",name:"preferredPickupBranch",required:!0,type:{name:"string"}},modalId:{defaultValue:null,description:"",name:"modalId",required:!0,type:{name:"string"}},numberInQueue:{defaultValue:null,description:"",name:"numberInQueue",required:!1,type:{name:"number | undefined"}},reservationCount:{defaultValue:null,description:"",name:"reservationCount",required:!0,type:{name:"number"}},holdings:{defaultValue:null,description:"",name:"holdings",required:!0,type:{name:"number"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/reservation/ReservationSucces.tsx#ReservationSucces"]={docgenInfo:ReservationSucces.__docgenInfo,name:"ReservationSucces",path:"src/components/reservation/ReservationSucces.tsx#ReservationSucces"})}catch(__react_docgen_typescript_loader_error){}const ReservationError=({reservationResults,setReservationResponse})=>{const t=(0,utils_text.X)(),reservationErrorInfo=reservationResults.some((({result})=>"already_reserved"===result))?{title:t("alreadyReservedText"),description:"",buttonText:t("closeText")}:{title:t("reservationErrorsTitleText"),description:t("reservationErrorsDescriptionText"),buttonText:t("tryAginButtonText")};return react.createElement(focus_trap_react_default(),{focusTrapOptions:{allowOutsideClick:!0}},react.createElement("section",{className:"reservation-modal reservation-modal--confirm"},react.createElement("h2",{className:"text-header-h3 pb-48"},reservationErrorInfo.title),reservationErrorInfo.description&&react.createElement("p",{className:"text-body-medium-regular pb-48"},reservationErrorInfo.description),react.createElement(Button.z,{classNames:"reservation-modal__confirm-button",label:reservationErrorInfo.buttonText,buttonType:"none",disabled:!1,collapsible:!1,size:"small",variant:"filled",onClick:()=>setReservationResponse(null)})))},reservation_ReservationError=ReservationError;try{ReservationError.displayName="ReservationError",ReservationError.__docgenInfo={description:"",displayName:"ReservationError",props:{reservationResults:{defaultValue:null,description:"",name:"reservationResults",required:!0,type:{name:"ReservationResultV2[]"}},setReservationResponse:{defaultValue:null,description:"",name:"setReservationResponse",required:!0,type:{name:"(reservationResponse: ReservationResponseV2 | null) => void"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/reservation/ReservationError.tsx#ReservationError"]={docgenInfo:ReservationError.__docgenInfo,name:"ReservationError",path:"src/components/reservation/ReservationError.tsx#ReservationError"})}catch(__react_docgen_typescript_loader_error){}var useGetAvailability=__webpack_require__("./src/core/utils/useGetAvailability.ts");const reservation_useAlternativeAvailableManifestation=(work,currentManifestationPids)=>{const config=(0,utils_config.ZR)(),[isOtherManifestationPreferred,setIsOtherManifestationPreferred]=(0,react.useState)(!1),[otherManifestationPreferred,setOtherManifestationPreferred]=(0,react.useState)(null),faustIds=(0,general.vH)(work.manifestations.all),{data:availabilityData}=(0,useGetAvailability.Z)({faustIds,config});return(0,useDeepCompareEffect.Z)((()=>{if(availabilityData){const leastReservedData=availabilityData.filter((manifestation=>manifestation.reservable)).sort(((a,b)=>a.reservations-b.reservations)).shift();if(!leastReservedData)return;const leastReservedManifestation=work.manifestations.all.find((manifestation=>(0,general.rp)(manifestation.pid)===leastReservedData.recordId));if(!leastReservedManifestation)return;currentManifestationPids.includes(leastReservedManifestation.pid)||(setIsOtherManifestationPreferred(!0),setOtherManifestationPreferred({...leastReservedManifestation,...leastReservedData}))}}),[availabilityData,currentManifestationPids,work]),{isOtherManifestationPreferred,otherManifestationPreferred}};var PromoBar=__webpack_require__("./src/components/promo-bar/PromoBar.tsx");const InstantLoanSummary=({pid,className})=>{const t=(0,utils_text.X)();return react.createElement("div",{className},react.createElement("div",{className:"pagefold-triangle--small"}),react.createElement(cover.Y,{id:pid,size:"small",animate:!0}),react.createElement("div",null,react.createElement("h2",{className:"text-header-h4 mt-22 mb-4"},t("instantLoanTitleText")),react.createElement("p",{className:"text-small-caption"},t("instantLoanSubTitleText")),react.createElement("div",{className:"instant-loan-underline mt-35"},react.createElement("p",{className:"link-tag text-small-caption"},t("instantLoanUnderlineDescriptionText")),react.createElement("img",{className:"instant-loan-arrow",src:ExpandMore_default(),alt:""}))))},instant_loan_InstantLoanSummary=InstantLoanSummary;try{InstantLoanSummary.displayName="InstantLoanSummary",InstantLoanSummary.__docgenInfo={description:"",displayName:"InstantLoanSummary",props:{pid:{defaultValue:null,description:"",name:"pid",required:!0,type:{name:"`${number}-${string}:${number}`"}},className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/instant-loan/InstantLoanSummary.tsx#InstantLoanSummary"]={docgenInfo:InstantLoanSummary.__docgenInfo,name:"InstantLoanSummary",path:"src/components/instant-loan/InstantLoanSummary.tsx#InstantLoanSummary"})}catch(__react_docgen_typescript_loader_error){}var availability_label_inside=__webpack_require__("./src/components/availability-label/availability-label-inside.tsx"),availability_label_helper=__webpack_require__("./src/components/availability-label/helper.ts");const availability_label_visual=({manifestText,selected,cursorPointer,isAvailable,quantity,availabilityText})=>{const t=(0,utils_text.X)(),getAvailabilityText=availabilityText||t(isAvailable?"availabilityAvailableText":"availabilityUnavailableText");return react.createElement("div",{className:(0,availability_label_helper.QR)({selected,cursorPointer})},react.createElement(availability_label_inside.Z,{selected,isAvailable,manifestText,availabilityText:getAvailabilityText,quantity,isLoading:!1}))};try{availabilitylabelvisual.displayName="availabilitylabelvisual",availabilitylabelvisual.__docgenInfo={description:"",displayName:"availabilitylabelvisual",props:{manifestText:{defaultValue:null,description:"",name:"manifestText",required:!0,type:{name:"string"}},selected:{defaultValue:null,description:"",name:"selected",required:!1,type:{name:"boolean | undefined"}},quantity:{defaultValue:null,description:"",name:"quantity",required:!1,type:{name:"number | undefined"}},cursorPointer:{defaultValue:null,description:"",name:"cursorPointer",required:!1,type:{name:"boolean | undefined"}},isAvailable:{defaultValue:null,description:"",name:"isAvailable",required:!1,type:{name:"boolean | undefined"}},availabilityText:{defaultValue:null,description:"",name:"availabilityText",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/availability-label/availability-label-visual.tsx#availabilitylabelvisual"]={docgenInfo:availabilitylabelvisual.__docgenInfo,name:"availabilitylabelvisual",path:"src/components/availability-label/availability-label-visual.tsx#availabilitylabelvisual"})}catch(__react_docgen_typescript_loader_error){}const InstantLoanBranch=({branch:{branch:{title},materials},materialType})=>react.createElement("div",{className:"instant-loan-branch px-24","data-cy":"instant-loan-branch"},react.createElement("p",{className:"text-header-h5"},title),react.createElement(availability_label_visual,{manifestText:materialType,isAvailable:!0,quantity:materials.length})),instant_loan_InstantLoanBranch=InstantLoanBranch;try{InstantLoanBranch.displayName="InstantLoanBranch",InstantLoanBranch.__docgenInfo={description:"",displayName:"InstantLoanBranch",props:{branch:{defaultValue:null,description:"",name:"branch",required:!0,type:{name:"HoldingsV3"}},materialType:{defaultValue:null,description:"",name:"materialType",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/instant-loan/InstantLoanBranch.tsx#InstantLoanBranch"]={docgenInfo:InstantLoanBranch.__docgenInfo,name:"InstantLoanBranch",path:"src/components/instant-loan/InstantLoanBranch.tsx#InstantLoanBranch"})}catch(__react_docgen_typescript_loader_error){}const InstantLoan=({manifestation,instantLoanBranchHoldings})=>{const{pid,materialTypes}=manifestation,materialType=materialTypes[0].specific;return react.createElement(DisclosureControllable.Z,{id:"instant-loan",className:"pagefold-parent--small disclosure--full-width",summary:react.createElement(instant_loan_InstantLoanSummary,{pid,className:"instant-loan-summary cursor-pointer p-24"}),cyData:"instant-loan"},react.createElement("ul",{className:"instant-loan-branches","data-cy":"instant-loan-branches"},instantLoanBranchHoldings.map((branch=>react.createElement("li",{key:branch.branch.branchId},react.createElement(instant_loan_InstantLoanBranch,{branch,materialType}))))))},instant_loan_InstantLoan=InstantLoan;try{InstantLoan.displayName="InstantLoan",InstantLoan.__docgenInfo={description:"",displayName:"InstantLoan",props:{manifestation:{defaultValue:null,description:"",name:"manifestation",required:!0,type:{name:"Manifestation"}},instantLoanBranchHoldings:{defaultValue:null,description:"",name:"instantLoanBranchHoldings",required:!0,type:{name:"HoldingsV3[]"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/instant-loan/InstantLoan.tsx#InstantLoan"]={docgenInfo:InstantLoan.__docgenInfo,name:"InstantLoan",path:"src/components/instant-loan/InstantLoan.tsx#InstantLoan"})}catch(__react_docgen_typescript_loader_error){}var utils_branches=__webpack_require__("./src/core/utils/branches.tsx"),ModalMessage=__webpack_require__("./src/components/message/modal-message/ModalMessage.tsx"),configuration=__webpack_require__("./src/core/configuration/index.ts");const ReservationModalBody=({selectedManifestations,selectedPeriodical,work})=>{var _reservationResponse$,_manifestation$editio,_openOrderResponse$su,_openOrderResponse$su2;const t=(0,utils_text.X)(),config=(0,utils_config.ZR)(),{defaultInterestDaysForOpenOrder}=(0,configuration.bc)("reservation",configuration.ZP),{matchStrings:instantLoanMatchStrings,threshold:instantLoanThreshold,enabled:instantLoanEnabled}=config("instantLoanConfig",{transformer:"jsonParse"}),branches=config("branchesConfig",{transformer:"jsonParse"}),blacklistBranches=config("blacklistedInstantLoanBranchesConfig",{transformer:"stringToArray"}),whitelistBranches=(0,utils_branches.rM)(branches,blacklistBranches),mainManifestationType=(0,general.cC)(selectedManifestations),{reservableManifestations}=utils_UseReservableManifestations({manifestations:selectedManifestations,type:mainManifestationType}),queryClient=(0,react_query_es.useQueryClient)(),[reservationResponse,setReservationResponse]=(0,react.useState)(null),[openOrderResponse,setOpenOrderResponse]=(0,react.useState)(null),[selectedBranch,setSelectedBranch]=(0,react.useState)(null),[selectedInterest,setSelectedInterest]=(0,react.useState)(null),allPids=(0,general.k7)(selectedManifestations),faustIds=(0,general.TH)(allPids),{mutate:mutateAddReservations}=(0,fbs.kd)(),{mutate:mutateOpenOrder}=(0,graphql.c6)(),userResponse=(0,user.dp)(),holdingsResponse=(0,helper.Lt)({faustIds,config}),{track}=(0,useStatistics.T)(),{otherManifestationPreferred}=reservation_useAlternativeAvailableManifestation(work,allPids);if(!userResponse.data||!holdingsResponse.data)return null;const manifestationsToReserve=(0,reservation_helper._w)(reservableManifestations??[],!!selectedPeriodical),{data:userData}=userResponse,{data:holdingsData}=holdingsResponse,holdings=(0,helper.Vq)(holdingsData),reservations=(0,helper.iT)(holdingsData),{patron}=userData,authorLine=(0,reservation_helper.qT)(selectedManifestations[0],t),expiryDate=selectedInterest?(0,reservation_helper.M1)(selectedInterest):null,pidsFromAnotherLibrary=(0,general.xB)(manifestationsToReserve),reservationSuccess=(null==reservationResponse?void 0:reservationResponse.success)||!1,reservationResults=null==reservationResponse?void 0:reservationResponse.reservationResults,reservationDetails=null==reservationResponse||null===(_reservationResponse$=reservationResponse.reservationResults[0])||void 0===_reservationResponse$?void 0:_reservationResponse$.reservationDetails,manifestation=(null==manifestationsToReserve?void 0:manifestationsToReserve[0])||selectedManifestations[0],editionText=(0,general.bV)(work)&&1!==(null==manifestationsToReserve?void 0:manifestationsToReserve.length)?t("firstAvailableEditionText"):null===(_manifestation$editio=manifestation.edition)||void 0===_manifestation$editio?void 0:_manifestation$editio.summary,instantLoanBranchHoldings=(0,reservation_helper.ZW)(holdingsData[0].holdings,whitelistBranches,instantLoanMatchStrings??[]),instantLoanBranchHoldingsAboveThreshold=(0,reservation_helper.Cg)(instantLoanBranchHoldings,instantLoanThreshold);return react.createElement(react.Fragment,null,!reservationResults&&!openOrderResponse&&react.createElement("section",{className:"reservation-modal"},react.createElement("header",{className:"reservation-modal-header"},react.createElement(cover.Y,{id:manifestation.pid,size:"medium",animate:!0}),react.createElement("div",{className:"reservation-modal-description"},react.createElement("div",{className:"reservation-modal-tag"},(0,general.A3)(selectedManifestations)[0]),react.createElement("h2",{className:"text-header-h2 mt-22 mb-8"},manifestation.titles.main,selectedPeriodical&&` ${selectedPeriodical.displayText}`),authorLine&&react.createElement("p",{className:"text-body-medium-regular"},authorLine))),react.createElement("div",null,react.createElement("div",{className:"reservation-modal-submit"},react.createElement(generic_MaterialAvailabilityTextParagraph,null,react.createElement(material_StockAndReservationInfo,{stockCount:holdings,reservationCount:reservations})),react.createElement(Button.z,{dataCy:"reservation-modal-submit-button",label:t("approveReservationText"),buttonType:"none",variant:"filled",disabled:!1,collapsible:!1,size:"small",onClick:()=>{if(manifestationsToReserve&&!(manifestationsToReserve.length<1))if(pidsFromAnotherLibrary.length>0&&patron){const{patronId,name,emailAddress,preferredPickupBranch}=patron;mutateOpenOrder({input:{pids:[...pidsFromAnotherLibrary],pickUpBranch:selectedBranch?(0,reservation_helper.l2)(selectedBranch):(0,reservation_helper.l2)(preferredPickupBranch),expires:(null==selectedInterest?void 0:selectedInterest.toString())||defaultInterestDaysForOpenOrder.toString(),userParameters:{userId:patronId.toString(),userName:name,userMail:emailAddress}}},{onSuccess:res=>{setOpenOrderResponse(res)}})}else mutateAddReservations({data:(0,reservation_helper.fK)({manifestations:manifestationsToReserve,selectedBranch,expiryDate,periodical:selectedPeriodical})},{onSuccess:res=>{track("click",{id:statistics.h.reservation.id,name:statistics.h.reservation.name,trackedData:work.workId}),setReservationResponse(res),queryClient.invalidateQueries((0,fbs.OL)())}})}})),react.createElement("div",{className:"reservation-modal-list"},react.createElement(ReservationFormListItem.Z,{icon:Various_default(),title:t("editionText"),text:(null==selectedPeriodical?void 0:selectedPeriodical.displayText)||editionText||""}),!(0,general.bV)(work)&&otherManifestationPreferred&&react.createElement(PromoBar.Z,{classNames:"px-35",sticky:!0,type:"info",text:t("materialIsAvailableInAnotherEditionText",{placeholders:{"@title":otherManifestationPreferred.titles.main[0],"@authorAndYear":(0,reservation_helper.qT)(otherManifestationPreferred,t)??"","@reservations":otherManifestationPreferred.reservations}})}),patron&&react.createElement(reservation_UserListItems,{whitelistBranches,patron,branches,selectedBranch,selectBranchHandler:setSelectedBranch,selectedInterest,setSelectedInterest}),instantLoanEnabled&&instantLoanBranchHoldingsAboveThreshold.length>0&&react.createElement(instant_loan_InstantLoan,{manifestation,instantLoanBranchHoldings:instantLoanBranchHoldingsAboveThreshold})))),(null==openOrderResponse||null===(_openOrderResponse$su=openOrderResponse.submitOrder)||void 0===_openOrderResponse$su?void 0:_openOrderResponse$su.status)&&react.createElement(ModalMessage.Z,{title:t("openOrderResponseTitleText"),subTitle:`${manifestation.titles.main[0]} ${t("openOrderResponseIsReservedForYouText")}`,ctaButton:{text:t("okButtonText"),modalId:(0,helper.Aw)(faustIds),dataCy:"reservation-success-close-button"}},openOrderResponse.submitOrder.status&&react.createElement("p",{"data-cy":"open-oprder-response-status-text",className:"text-body-medium-regular pt-24"},(0,reservation_helper.tr)(null===(_openOrderResponse$su2=openOrderResponse.submitOrder)||void 0===_openOrderResponse$su2?void 0:_openOrderResponse$su2.status,t))),reservationSuccess&&reservationDetails&&react.createElement(reservation_ReservationSucces,{modalId:(0,helper.Aw)(faustIds),title:manifestation.titles.main[0],preferredPickupBranch:(0,reservation_helper.Sp)(reservationDetails.pickupBranch,branches),holdings,reservationCount:reservations,numberInQueue:reservationDetails.numberInQueue}),!reservationSuccess&&reservationResults&&react.createElement(reservation_ReservationError,{reservationResults,setReservationResponse}))};try{ReservationModalBody.displayName="ReservationModalBody",ReservationModalBody.__docgenInfo={description:"",displayName:"ReservationModalBody",props:{selectedManifestations:{defaultValue:null,description:"",name:"selectedManifestations",required:!0,type:{name:"Manifestation[]"}},selectedPeriodical:{defaultValue:null,description:"",name:"selectedPeriodical",required:!0,type:{name:"PeriodicalEdition | null"}},work:{defaultValue:null,description:"",name:"work",required:!0,type:{name:"Work"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/reservation/ReservationModalBody.tsx#ReservationModalBody"]={docgenInfo:ReservationModalBody.__docgenInfo,name:"ReservationModalBody",path:"src/components/reservation/ReservationModalBody.tsx#ReservationModalBody"})}catch(__react_docgen_typescript_loader_error){}const ReservationModal=({selectedManifestations,selectedPeriodical=null,work,dataCy})=>{const t=(0,utils_text.X)(),faustIds=(0,general.vH)(selectedManifestations);return react.createElement(modal.Z,{modalId:(0,helper.Aw)(faustIds),screenReaderModalDescriptionText:t("reservationModalScreenReaderModalDescriptionText"),closeModalAriaLabelText:t("reservationModalCloseModalAriaLabelText"),dataCy:dataCy||"reservation-modal"},react.createElement(ReservationModalBody,{selectedManifestations,selectedPeriodical,work}))},reservation_ReservationModal=ReservationModal;try{ReservationModal.displayName="ReservationModal",ReservationModal.__docgenInfo={description:"",displayName:"ReservationModal",props:{selectedManifestations:{defaultValue:null,description:"",name:"selectedManifestations",required:!0,type:{name:"Manifestation[]"}},selectedPeriodical:{defaultValue:{value:"null"},description:"",name:"selectedPeriodical",required:!1,type:{name:"PeriodicalEdition | null | undefined"}},work:{defaultValue:null,description:"",name:"work",required:!0,type:{name:"Work"}},dataCy:{defaultValue:null,description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/reservation/ReservationModal.tsx#ReservationModal"]={docgenInfo:ReservationModal.__docgenInfo,name:"ReservationModal",path:"src/components/reservation/ReservationModal.tsx#ReservationModal"})}catch(__react_docgen_typescript_loader_error){}var FindOnShelfModal=__webpack_require__("./src/components/find-on-shelf/FindOnShelfModal.tsx");const ReservationFindOnShelfModals=({patron,manifestations,selectedPeriodical,setSelectedPeriodical,work})=>{const isUserBlocked=!(!patron||!(0,user.IT)(patron)),titles=manifestations.length>1?work.titles.full:manifestations[0].titles.main,authors=manifestations.length>1?work.creators:manifestations[0].creators;return react.createElement(react.Fragment,null,!(0,user.TF)()&&!isUserBlocked&&react.createElement(reservation_ReservationModal,{selectedManifestations:manifestations,selectedPeriodical,work,dataCy:manifestations.length>1?"reservation-modal-parallel":void 0}),react.createElement(FindOnShelfModal.Z,{manifestations,workTitles:titles,authors,selectedPeriodical,setSelectedPeriodical}))},material_ReservationFindOnShelfModals=ReservationFindOnShelfModals;try{ReservationFindOnShelfModals.displayName="ReservationFindOnShelfModals",ReservationFindOnShelfModals.__docgenInfo={description:"",displayName:"ReservationFindOnShelfModals",props:{patron:{defaultValue:null,description:"",name:"patron",required:!0,type:{name:"PatronV5 | undefined"}},manifestations:{defaultValue:null,description:"",name:"manifestations",required:!0,type:{name:"Manifestation[]"}},selectedPeriodical:{defaultValue:null,description:"",name:"selectedPeriodical",required:!0,type:{name:"PeriodicalEdition | null"}},setSelectedPeriodical:{defaultValue:null,description:"",name:"setSelectedPeriodical",required:!0,type:{name:"Dispatch>"}},work:{defaultValue:null,description:"",name:"work",required:!0,type:{name:"Work"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/material/ReservationFindOnShelfModals.tsx#ReservationFindOnShelfModals"]={docgenInfo:ReservationFindOnShelfModals.__docgenInfo,name:"ReservationFindOnShelfModals",path:"src/apps/material/ReservationFindOnShelfModals.tsx#ReservationFindOnShelfModals"})}catch(__react_docgen_typescript_loader_error){}const material_material=({wid})=>{const t=(0,utils_text.X)(),[selectedManifestations,setSelectedManifestations]=(0,react.useState)(null),[selectedPeriodical,setSelectedPeriodical]=(0,react.useState)(null),{data,isLoading}=(0,graphql.og)({wid}),{data:userData}=(0,user.dp)(),[isUserBlocked,setIsUserBlocked]=(0,react.useState)(null),{track}=(0,useStatistics.T)();if((0,react.useEffect)((()=>{setIsUserBlocked(!(null==userData||!userData.patron||!(0,user.IT)(userData.patron)))}),[userData]),(0,useDeepCompareEffect.Z)((()=>{var _data$work,_data$work2,_data$work3,_data$work4,_data$work4$manifesta,_data$work5;null!=data&&null!==(_data$work=data.work)&&void 0!==_data$work&&_data$work.genreAndForm&&track("click",{id:statistics.h.materialGenre.id,name:statistics.h.materialGenre.name,trackedData:data.work.genreAndForm.join(", ")}),null!=data&&null!==(_data$work2=data.work)&&void 0!==_data$work2&&_data$work2.mainLanguages&&track("click",{id:statistics.h.materialLanguage.id,name:statistics.h.materialLanguage.name,trackedData:data.work.mainLanguages.map((language=>language.display)).join(", ")}),null!=data&&null!==(_data$work3=data.work)&&void 0!==_data$work3&&_data$work3.dk5MainEntry&&track("click",{id:statistics.h.materialTopicNumber.id,name:statistics.h.materialTopicNumber.name,trackedData:data.work.dk5MainEntry.display}),null!=data&&null!==(_data$work4=data.work)&&void 0!==_data$work4&&null!==(_data$work4$manifesta=_data$work4.manifestations.latest.audience)&&void 0!==_data$work4$manifesta&&_data$work4$manifesta.generalAudience&&track("click",{id:statistics.h.materialTopicNumber.id,name:statistics.h.materialTopicNumber.name,trackedData:data.work.manifestations.latest.audience.generalAudience.join(", ")}),null!=data&&null!==(_data$work5=data.work)&&void 0!==_data$work5&&_data$work5.fictionNonfiction&&track("click",{id:statistics.h.materialFictionNonFiction.id,name:statistics.h.materialFictionNonFiction.name,trackedData:data.work.fictionNonfiction.display})}),[data]),(0,react.useEffect)((()=>{if(null==data||!data.work)return;const{work}=data,type=(0,helpers_url.wo)("type"),manifestationsByMaterialType=(0,helper.Ft)(work.manifestations.all);if(!type){const bestMaterialType=(0,helper.jg)(work);return setSelectedManifestations(manifestationsByMaterialType[bestMaterialType]),void(0,helpers_url.ul)({type:bestMaterialType})}setSelectedManifestations(manifestationsByMaterialType[type])}),[data]),isLoading||null==data||!data.work||!selectedManifestations)return react.createElement(material_MaterialSkeleton,null);const{work,work:{manifestations:{all:manifestations},relations:{hasReview}}}=data,pid=(0,general.qQ)(manifestations),detailsListData=(0,helper.Uo)({manifestation:selectedManifestations[0],work,t}),infomediaIds=(0,helper.qY)(selectedManifestations),shouldOpenReviewDisclosure=!!(0,helpers_url.wo)("disclosure");return react.createElement("section",{className:"material-page"},react.createElement(material_MaterialHeader,{wid,work,selectedManifestations,setSelectedManifestations,selectedPeriodical,selectPeriodicalHandler:setSelectedPeriodical},manifestations.map((manifestation=>react.createElement(material_ReservationFindOnShelfModals,{patron:null==userData?void 0:userData.patron,manifestations:[manifestation],selectedPeriodical,work,setSelectedPeriodical}))),infomediaIds.length>0&&!(0,user.TF)()&&!isUserBlocked&&react.createElement(infomedia_InfomediaModal,{selectedManifestations,infoMediaId:infomediaIds[0]}),(0,material_buttons_helper.M0)("DigitalArticleService",selectedManifestations)&&!(0,user.TF)()&&!isUserBlocked&&react.createElement(digital_modal_DigitalModal,{pid:selectedManifestations[0].pid,workId:wid}),(0,helper.VC)(selectedManifestations)&&react.createElement(material_ReservationFindOnShelfModals,{patron:null==userData?void 0:userData.patron,manifestations:selectedManifestations,selectedPeriodical,work,setSelectedPeriodical})),react.createElement(material_MaterialDescription,{pid,work}),react.createElement(material_MaterialDisclosure,{title:`${t("editionsText")} (${manifestations.length})`,icon:Various_default(),dataCy:"material-editions-disclosure"},react.createElement(react.Fragment,null,(0,helper.Oe)(manifestations).map((manifestation=>react.createElement(material_MaterialMainfestationItem,{key:manifestation.pid,manifestation,workId:wid}))))),react.createElement(material_MaterialDisclosure,{dataCy:"material-details-disclosure",title:t("detailsText"),icon:Receipt_default()},react.createElement(material_MaterialDetailsList,{id:`material-details-${wid}`,className:"pl-80 pb-48",data:detailsListData})),hasReview&&hasReview.length>0&&react.createElement(DisclosureControllable.Z,{id:"reviews",showContent:shouldOpenReviewDisclosure,cyData:"material-reviews-disclosure",summary:react.createElement(DisclosureSummary.Z,{title:t("reviewsText"),mainIconPath:Create_default()})},react.createElement(MaterialReviews,{pids:hasReview.map((review=>review.pid))})))};try{material.displayName="material",material.__docgenInfo={description:"",displayName:"material",props:{wid:{defaultValue:null,description:"",name:"wid",required:!0,type:{name:"`work-of:${number}-${string}:${number}`"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/material/material.tsx#material"]={docgenInfo:material.__docgenInfo,name:"material",path:"src/apps/material/material.tsx#material"})}catch(__react_docgen_typescript_loader_error){}const material_entry=(0,utils_config.Rh)((0,url.XL)((0,utils_text.z)((({wid})=>react.createElement(guarded_app.Z,{app:"material"},react.createElement(material_material,{wid}))))));try{materialentry.displayName="materialentry",materialentry.__docgenInfo={description:"",displayName:"materialentry",props:{wid:{defaultValue:null,description:"",name:"wid",required:!0,type:{name:"`work-of:${number}-${string}:${number}`"}},materialUrl:{defaultValue:null,description:"",name:"materialUrl",required:!0,type:{name:"string"}},searchUrl:{defaultValue:null,description:"",name:"searchUrl",required:!0,type:{name:"string"}},advancedSearchUrl:{defaultValue:null,description:"",name:"advancedSearchUrl",required:!0,type:{name:"string"}},fbsBaseUrl:{defaultValue:null,description:"",name:"fbsBaseUrl",required:!0,type:{name:"string"}},loanListEreolenUrl:{defaultValue:null,description:"",name:"loanListEreolenUrl",required:!0,type:{name:"string"}},feesPageUrl:{defaultValue:null,description:"",name:"feesPageUrl",required:!0,type:{name:"string"}},publizonBaseUrl:{defaultValue:null,description:"",name:"publizonBaseUrl",required:!0,type:{name:"string"}},dplCmsBaseUrl:{defaultValue:null,description:"",name:"dplCmsBaseUrl",required:!0,type:{name:"string"}},coverBaseUrl:{defaultValue:null,description:"",name:"coverBaseUrl",required:!0,type:{name:"string"}},materialBaseUrl:{defaultValue:null,description:"",name:"materialBaseUrl",required:!0,type:{name:"string"}},fbiBaseUrl:{defaultValue:null,description:"",name:"fbiBaseUrl",required:!0,type:{name:"string"}},authUrl:{defaultValue:null,description:"",name:"authUrl",required:!0,type:{name:"string"}},ereolenHomepageUrl:{defaultValue:null,description:"",name:"ereolenHomepageUrl",required:!0,type:{name:"string"}},addToFavoritesAriaLabelText:{defaultValue:null,description:"",name:"addToFavoritesAriaLabelText",required:!0,type:{name:"string"}},alertErrorCloseText:{defaultValue:null,description:"",name:"alertErrorCloseText",required:!0,type:{name:"string"}},alertErrorMessageText:{defaultValue:null,description:"",name:"alertErrorMessageText",required:!0,type:{name:"string"}},alreadyReservedText:{defaultValue:null,description:"",name:"alreadyReservedText",required:!0,type:{name:"string"}},approveReservationText:{defaultValue:null,description:"",name:"approveReservationText",required:!0,type:{name:"string"}},availabilityAvailableText:{defaultValue:null,description:"",name:"availabilityAvailableText",required:!0,type:{name:"string"}},availabilityUnavailableText:{defaultValue:null,description:"",name:"availabilityUnavailableText",required:!0,type:{name:"string"}},blockedButtonText:{defaultValue:null,description:"",name:"blockedButtonText",required:!0,type:{name:"string"}},cantReserveText:{defaultValue:null,description:"",name:"cantReserveText",required:!0,type:{name:"string"}},cantViewReviewText:{defaultValue:null,description:"",name:"cantViewReviewText",required:!0,type:{name:"string"}},cantViewText:{defaultValue:null,description:"",name:"cantViewText",required:!0,type:{name:"string"}},changeEmailText:{defaultValue:null,description:"",name:"changeEmailText",required:!0,type:{name:"string"}},changeInterestPeriodText:{defaultValue:null,description:"",name:"changeInterestPeriodText",required:!0,type:{name:"string"}},changePickupLocationText:{defaultValue:null,description:"",name:"changePickupLocationText",required:!0,type:{name:"string"}},changeSmsNumberText:{defaultValue:null,description:"",name:"changeSmsNumberText",required:!0,type:{name:"string"}},chooseOneText:{defaultValue:null,description:"",name:"chooseOneText",required:!0,type:{name:"string"}},closeModalAriaLabelEmailText:{defaultValue:null,description:"",name:"closeModalAriaLabelEmailText",required:!0,type:{name:"string"}},closeModalAriaLabelInterestPeriodText:{defaultValue:null,description:"",name:"closeModalAriaLabelInterestPeriodText",required:!0,type:{name:"string"}},closeModalAriaLabelPickupText:{defaultValue:null,description:"",name:"closeModalAriaLabelPickupText",required:!0,type:{name:"string"}},closeModalAriaLabelSmsText:{defaultValue:null,description:"",name:"closeModalAriaLabelSmsText",required:!0,type:{name:"string"}},closeText:{defaultValue:null,description:"",name:"closeText",required:!0,type:{name:"string"}},daysText:{defaultValue:null,description:"",name:"daysText",required:!0,type:{name:"string"}},descriptionHeadlineText:{defaultValue:null,description:"",name:"descriptionHeadlineText",required:!0,type:{name:"string"}},detailsListAudienceText:{defaultValue:null,description:"",name:"detailsListAudienceText",required:!0,type:{name:"string"}},detailsListAuthorsText:{defaultValue:null,description:"",name:"detailsListAuthorsText",required:!0,type:{name:"string"}},detailsListContributorsText:{defaultValue:null,description:"",name:"detailsListContributorsText",required:!0,type:{name:"string"}},detailsListEditionText:{defaultValue:null,description:"",name:"detailsListEditionText",required:!0,type:{name:"string"}},detailsListFirstEditionYearText:{defaultValue:null,description:"",name:"detailsListFirstEditionYearText",required:!0,type:{name:"string"}},detailsListFirstEditionYearUnknownText:{defaultValue:null,description:"",name:"detailsListFirstEditionYearUnknownText",required:!0,type:{name:"string"}},detailsListGenreAndFormText:{defaultValue:null,description:"",name:"detailsListGenreAndFormText",required:!0,type:{name:"string"}},detailsListIsbnText:{defaultValue:null,description:"",name:"detailsListIsbnText",required:!0,type:{name:"string"}},detailsListLanguageText:{defaultValue:null,description:"",name:"detailsListLanguageText",required:!0,type:{name:"string"}},detailsListOriginalTitleText:{defaultValue:null,description:"",name:"detailsListOriginalTitleText",required:!0,type:{name:"string"}},detailsListPlayTimeText:{defaultValue:null,description:"",name:"detailsListPlayTimeText",required:!0,type:{name:"string"}},detailsListPublisherText:{defaultValue:null,description:"",name:"detailsListPublisherText",required:!0,type:{name:"string"}},detailsListScopeText:{defaultValue:null,description:"",name:"detailsListScopeText",required:!0,type:{name:"string"}},detailsListTypeText:{defaultValue:null,description:"",name:"detailsListTypeText",required:!0,type:{name:"string"}},detailsOfTheMaterialText:{defaultValue:null,description:"",name:"detailsOfTheMaterialText",required:!0,type:{name:"string"}},detailsText:{defaultValue:null,description:"",name:"detailsText",required:!0,type:{name:"string"}},editionsText:{defaultValue:null,description:"",name:"editionsText",required:!0,type:{name:"string"}},editionText:{defaultValue:null,description:"",name:"editionText",required:!0,type:{name:"string"}},etAlText:{defaultValue:null,description:"",name:"etAlText",required:!0,type:{name:"string"}},expandMoreText:{defaultValue:null,description:"",name:"expandMoreText",required:!0,type:{name:"string"}},fictionNonfictionText:{defaultValue:null,description:"",name:"fictionNonfictionText",required:!0,type:{name:"string"}},filmAdaptationsText:{defaultValue:null,description:"",name:"filmAdaptationsText",required:!0,type:{name:"string"}},findOnBookshelfText:{defaultValue:null,description:"",name:"findOnBookshelfText",required:!0,type:{name:"string"}},findOnShelfExpandButtonExplanationText:{defaultValue:null,description:"",name:"findOnShelfExpandButtonExplanationText",required:!0,type:{name:"string"}},findOnShelfModalCloseModalAriaLabelText:{defaultValue:null,description:"",name:"findOnShelfModalCloseModalAriaLabelText",required:!0,type:{name:"string"}},findOnShelfModalListFindOnShelfText:{defaultValue:null,description:"",name:"findOnShelfModalListFindOnShelfText",required:!0,type:{name:"string"}},findOnShelfModalListItemCountText:{defaultValue:null,description:"",name:"findOnShelfModalListItemCountText",required:!0,type:{name:"string"}},findOnShelfModalListMaterialText:{defaultValue:null,description:"",name:"findOnShelfModalListMaterialText",required:!0,type:{name:"string"}},findOnShelfModalNoLocationSpecifiedText:{defaultValue:null,description:"",name:"findOnShelfModalNoLocationSpecifiedText",required:!0,type:{name:"string"}},findOnShelfModalPeriodicalEditionDropdownText:{defaultValue:null,description:"",name:"findOnShelfModalPeriodicalEditionDropdownText",required:!0,type:{name:"string"}},findOnShelfModalPeriodicalYearDropdownText:{defaultValue:null,description:"",name:"findOnShelfModalPeriodicalYearDropdownText",required:!0,type:{name:"string"}},findOnShelfModalScreenReaderModalDescriptionText:{defaultValue:null,description:"",name:"findOnShelfModalScreenReaderModalDescriptionText",required:!0,type:{name:"string"}},findOnShelfTableDescriptionText:{defaultValue:null,description:"",name:"findOnShelfTableDescriptionText",required:!0,type:{name:"string"}},firstAvailableEditionText:{defaultValue:null,description:"",name:"firstAvailableEditionText",required:!0,type:{name:"string"}},getOnlineText:{defaultValue:null,description:"",name:"getOnlineText",required:!0,type:{name:"string"}},goToText:{defaultValue:null,description:"",name:"goToText",required:!0,type:{name:"string"}},reservationDetailsNoInterestAfterTitleText:{defaultValue:null,description:"",name:"reservationDetailsNoInterestAfterTitleText",required:!0,type:{name:"string"}},identifierText:{defaultValue:null,description:"",name:"identifierText",required:!0,type:{name:"string"}},infomediaModalCloseModalAriaLabelText:{defaultValue:null,description:"",name:"infomediaModalCloseModalAriaLabelText",required:!0,type:{name:"string"}},infomediaModalScreenReaderModalDescriptionText:{defaultValue:null,description:"",name:"infomediaModalScreenReaderModalDescriptionText",required:!0,type:{name:"string"}},inSameSeriesText:{defaultValue:null,description:"",name:"inSameSeriesText",required:!0,type:{name:"string"}},inSeriesText:{defaultValue:null,description:"",name:"inSeriesText",required:!0,type:{name:"string"}},instantLoanSubTitleText:{defaultValue:null,description:"",name:"instantLoanSubTitleText",required:!0,type:{name:"string"}},instantLoanTitleText:{defaultValue:null,description:"",name:"instantLoanTitleText",required:!0,type:{name:"string"}},instantLoanUnderlineDescriptionText:{defaultValue:null,description:"",name:"instantLoanUnderlineDescriptionText",required:!0,type:{name:"string"}},interestPeriodsConfig:{defaultValue:null,description:"",name:"interestPeriodsConfig",required:!0,type:{name:"string"}},librariesHaveTheMaterialText:{defaultValue:null,description:"",name:"librariesHaveTheMaterialText",required:!0,type:{name:"string"}},listenOnlineText:{defaultValue:null,description:"",name:"listenOnlineText",required:!0,type:{name:"string"}},loadingText:{defaultValue:null,description:"",name:"loadingText",required:!0,type:{name:"string"}},loginToSeeReviewText:{defaultValue:null,description:"",name:"loginToSeeReviewText",required:!0,type:{name:"string"}},materialHeaderAllEditionsText:{defaultValue:null,description:"",name:"materialHeaderAllEditionsText",required:!0,type:{name:"string"}},materialHeaderAuthorByText:{defaultValue:null,description:"",name:"materialHeaderAuthorByText",required:!0,type:{name:"string"}},materialIsAvailableInAnotherEditionText:{defaultValue:null,description:"",name:"materialIsAvailableInAnotherEditionText",required:!0,type:{name:"string"}},materialIsIncludedText:{defaultValue:null,description:"",name:"materialIsIncludedText",required:!0,type:{name:"string"}},materialIsLoanedOutText:{defaultValue:null,description:"",name:"materialIsLoanedOutText",required:!0,type:{name:"string"}},materialReservationInfoText:{defaultValue:null,description:"",name:"materialReservationInfoText",required:!0,type:{name:"string"}},materialsInStockInfoText:{defaultValue:null,description:"",name:"materialsInStockInfoText",required:!0,type:{name:"string"}},missingDataText:{defaultValue:null,description:"",name:"missingDataText",required:!0,type:{name:"string"}},modalReservationFormEmailHeaderDescriptionText:{defaultValue:null,description:"",name:"modalReservationFormEmailHeaderDescriptionText",required:!0,type:{name:"string"}},modalReservationFormEmailHeaderTitleText:{defaultValue:null,description:"",name:"modalReservationFormEmailHeaderTitleText",required:!0,type:{name:"string"}},modalReservationFormEmailInputFieldDescriptionText:{defaultValue:null,description:"",name:"modalReservationFormEmailInputFieldDescriptionText",required:!0,type:{name:"string"}},modalReservationFormEmailInputFieldLabelText:{defaultValue:null,description:"",name:"modalReservationFormEmailInputFieldLabelText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterHeaderDescriptionText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterHeaderDescriptionText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterHeaderTitleText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterHeaderTitleText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterLabelText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterLabelText",required:!0,type:{name:"string"}},modalReservationFormPickupHeaderDescriptionText:{defaultValue:null,description:"",name:"modalReservationFormPickupHeaderDescriptionText",required:!0,type:{name:"string"}},modalReservationFormPickupHeaderTitleText:{defaultValue:null,description:"",name:"modalReservationFormPickupHeaderTitleText",required:!0,type:{name:"string"}},modalReservationFormPickupLabelText:{defaultValue:null,description:"",name:"modalReservationFormPickupLabelText",required:!0,type:{name:"string"}},modalReservationFormSmsHeaderDescriptionText:{defaultValue:null,description:"",name:"modalReservationFormSmsHeaderDescriptionText",required:!0,type:{name:"string"}},modalReservationFormSmsHeaderTitleText:{defaultValue:null,description:"",name:"modalReservationFormSmsHeaderTitleText",required:!0,type:{name:"string"}},modalReservationFormSmsInputFieldDescriptionText:{defaultValue:null,description:"",name:"modalReservationFormSmsInputFieldDescriptionText",required:!0,type:{name:"string"}},modalReservationFormSmsInputFieldLabelText:{defaultValue:null,description:"",name:"modalReservationFormSmsInputFieldLabelText",required:!0,type:{name:"string"}},notLivingInMunicipalityText:{defaultValue:null,description:"",name:"notLivingInMunicipalityText",required:!0,type:{name:"string"}},numberDescriptionText:{defaultValue:null,description:"",name:"numberDescriptionText",required:!0,type:{name:"string"}},numberInQueueText:{defaultValue:null,description:"",name:"numberInQueueText",required:!0,type:{name:"string"}},okButtonText:{defaultValue:null,description:"",name:"okButtonText",required:!0,type:{name:"string"}},onlineLimitMonthAudiobookInfoText:{defaultValue:null,description:"",name:"onlineLimitMonthAudiobookInfoText",required:!0,type:{name:"string"}},onlineLimitMonthEbookInfoText:{defaultValue:null,description:"",name:"onlineLimitMonthEbookInfoText",required:!0,type:{name:"string"}},openOrderAuthenticationErrorText:{defaultValue:null,description:"",name:"openOrderAuthenticationErrorText",required:!0,type:{name:"string"}},openOrderInvalidOrderText:{defaultValue:null,description:"",name:"openOrderInvalidOrderText",required:!0,type:{name:"string"}},openOrderNoServicerequesterText:{defaultValue:null,description:"",name:"openOrderNoServicerequesterText",required:!0,type:{name:"string"}},openOrderNotOwnedIllLocText:{defaultValue:null,description:"",name:"openOrderNotOwnedIllLocText",required:!0,type:{name:"string"}},openOrderNotOwnedNoIllLocText:{defaultValue:null,description:"",name:"openOrderNotOwnedNoIllLocText",required:!0,type:{name:"string"}},openOrderNotOwnedWrongIllMediumtypeText:{defaultValue:null,description:"",name:"openOrderNotOwnedWrongIllMediumtypeText",required:!0,type:{name:"string"}},openOrderOrsErrorText:{defaultValue:null,description:"",name:"openOrderOrsErrorText",required:!0,type:{name:"string"}},openOrderOwnedOwnCatalogueText:{defaultValue:null,description:"",name:"openOrderOwnedOwnCatalogueText",required:!0,type:{name:"string"}},openOrderOwnedWrongMediumtypeText:{defaultValue:null,description:"",name:"openOrderOwnedWrongMediumtypeText",required:!0,type:{name:"string"}},openOrderResponseIsReservedForYouText:{defaultValue:null,description:"",name:"openOrderResponseIsReservedForYouText",required:!0,type:{name:"string"}},openOrderResponseTitleText:{defaultValue:null,description:"",name:"openOrderResponseTitleText",required:!0,type:{name:"string"}},openOrderServiceUnavailableText:{defaultValue:null,description:"",name:"openOrderServiceUnavailableText",required:!0,type:{name:"string"}},openOrderStatusOwnedAcceptedText:{defaultValue:null,description:"",name:"openOrderStatusOwnedAcceptedText",required:!0,type:{name:"string"}},openOrderUnknownErrorText:{defaultValue:null,description:"",name:"openOrderUnknownErrorText",required:!0,type:{name:"string"}},openOrderUnknownPickupagencyText:{defaultValue:null,description:"",name:"openOrderUnknownPickupagencyText",required:!0,type:{name:"string"}},openOrderUnknownUserText:{defaultValue:null,description:"",name:"openOrderUnknownUserText",required:!0,type:{name:"string"}},openOrderUserBlockedByAgencyText:{defaultValue:null,description:"",name:"openOrderUserBlockedByAgencyText",required:!0,type:{name:"string"}},openOrderUserNoLongerExistOnAgencyText:{defaultValue:null,description:"",name:"openOrderUserNoLongerExistOnAgencyText",required:!0,type:{name:"string"}},openOrderUserNotVerifiedText:{defaultValue:null,description:"",name:"openOrderUserNotVerifiedText",required:!0,type:{name:"string"}},orderDigitalCopyButtonLoadingText:{defaultValue:null,description:"",name:"orderDigitalCopyButtonLoadingText",required:!0,type:{name:"string"}},orderDigitalCopyButtonText:{defaultValue:null,description:"",name:"orderDigitalCopyButtonText",required:!0,type:{name:"string"}},orderDigitalCopyDescriptionText:{defaultValue:null,description:"",name:"orderDigitalCopyDescriptionText",required:!0,type:{name:"string"}},orderDigitalCopyEmailLabelText:{defaultValue:null,description:"",name:"orderDigitalCopyEmailLabelText",required:!0,type:{name:"string"}},orderDigitalCopyFeedbackButtonText:{defaultValue:null,description:"",name:"orderDigitalCopyFeedbackButtonText",required:!0,type:{name:"string"}},orderDigitalCopyFeedbackErrorAgencyNotSubscribedText:{defaultValue:null,description:"",name:"orderDigitalCopyFeedbackErrorAgencyNotSubscribedText",required:!0,type:{name:"string"}},orderDigitalCopyFeedbackErrorInvalidPickupBranchText:{defaultValue:null,description:"",name:"orderDigitalCopyFeedbackErrorInvalidPickupBranchText",required:!0,type:{name:"string"}},orderDigitalCopyFeedbackErrorMissingClientConfigurationText:{defaultValue:null,description:"",name:"orderDigitalCopyFeedbackErrorMissingClientConfigurationText",required:!0,type:{name:"string"}},orderDigitalCopyFeedbackErrorPidNotReservableText:{defaultValue:null,description:"",name:"orderDigitalCopyFeedbackErrorPidNotReservableText",required:!0,type:{name:"string"}},orderDigitalCopyFeedbackErrorUnauthenticatedUserText:{defaultValue:null,description:"",name:"orderDigitalCopyFeedbackErrorUnauthenticatedUserText",required:!0,type:{name:"string"}},orderDigitalCopyFeedbackOkText:{defaultValue:null,description:"",name:"orderDigitalCopyFeedbackOkText",required:!0,type:{name:"string"}},orderDigitalCopyFeedbackTitleText:{defaultValue:null,description:"",name:"orderDigitalCopyFeedbackTitleText",required:!0,type:{name:"string"}},orderDigitalCopyModalCloseModalAriaLabelText:{defaultValue:null,description:"",name:"orderDigitalCopyModalCloseModalAriaLabelText",required:!0,type:{name:"string"}},orderDigitalCopyModalScreenReaderModalDescriptionText:{defaultValue:null,description:"",name:"orderDigitalCopyModalScreenReaderModalDescriptionText",required:!0,type:{name:"string"}},orderDigitalCopyTitleText:{defaultValue:null,description:"",name:"orderDigitalCopyTitleText",required:!0,type:{name:"string"}},outOfText:{defaultValue:null,description:"",name:"outOfText",required:!0,type:{name:"string"}},periodicalSelectEditionText:{defaultValue:null,description:"",name:"periodicalSelectEditionText",required:!0,type:{name:"string"}},periodicalSelectYearText:{defaultValue:null,description:"",name:"periodicalSelectYearText",required:!0,type:{name:"string"}},reservationDetailsPickUpAtTitleText:{defaultValue:null,description:"",name:"reservationDetailsPickUpAtTitleText",required:!0,type:{name:"string"}},queueText:{defaultValue:null,description:"",name:"queueText",required:!0,type:{name:"string"}},ratingIsText:{defaultValue:null,description:"",name:"ratingIsText",required:!0,type:{name:"string"}},readArticleText:{defaultValue:null,description:"",name:"readArticleText",required:!0,type:{name:"string"}},receiveEmailWhenMaterialReadyText:{defaultValue:null,description:"",name:"receiveEmailWhenMaterialReadyText",required:!0,type:{name:"string"}},receiveSmsWhenMaterialReadyText:{defaultValue:null,description:"",name:"receiveSmsWhenMaterialReadyText",required:!0,type:{name:"string"}},removeFromFavoritesAriaLabelText:{defaultValue:null,description:"",name:"removeFromFavoritesAriaLabelText",required:!0,type:{name:"string"}},reservableFromAnotherLibraryText:{defaultValue:null,description:"",name:"reservableFromAnotherLibraryText",required:!0,type:{name:"string"}},reservationErrorsDescriptionText:{defaultValue:null,description:"",name:"reservationErrorsDescriptionText",required:!0,type:{name:"string"}},reservationErrorsTitleText:{defaultValue:null,description:"",name:"reservationErrorsTitleText",required:!0,type:{name:"string"}},reservationModalCloseModalAriaLabelText:{defaultValue:null,description:"",name:"reservationModalCloseModalAriaLabelText",required:!0,type:{name:"string"}},reservationModalScreenReaderModalDescriptionText:{defaultValue:null,description:"",name:"reservationModalScreenReaderModalDescriptionText",required:!0,type:{name:"string"}},reservationSuccesIsReservedForYouText:{defaultValue:null,description:"",name:"reservationSuccesIsReservedForYouText",required:!0,type:{name:"string"}},reservationSuccessPreferredPickupBranchText:{defaultValue:null,description:"",name:"reservationSuccessPreferredPickupBranchText",required:!0,type:{name:"string"}},reservationSuccesTitleText:{defaultValue:null,description:"",name:"reservationSuccesTitleText",required:!0,type:{name:"string"}},reserveBookText:{defaultValue:null,description:"",name:"reserveBookText",required:!0,type:{name:"string"}},reserveText:{defaultValue:null,description:"",name:"reserveText",required:!0,type:{name:"string"}},reviewsText:{defaultValue:null,description:"",name:"reviewsText",required:!0,type:{name:"string"}},saveButtonText:{defaultValue:null,description:"",name:"saveButtonText",required:!0,type:{name:"string"}},screenReaderModalDescriptionEmailText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionEmailText",required:!0,type:{name:"string"}},screenReaderModalDescriptionInterestPeriodText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionInterestPeriodText",required:!0,type:{name:"string"}},screenReaderModalDescriptionPickupText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionPickupText",required:!0,type:{name:"string"}},screenReaderModalDescriptionSmsText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionSmsText",required:!0,type:{name:"string"}},seeOnlineText:{defaultValue:null,description:"",name:"seeOnlineText",required:!0,type:{name:"string"}},shiftText:{defaultValue:null,description:"",name:"shiftText",required:!0,type:{name:"string"}},subjectNumberText:{defaultValue:null,description:"",name:"subjectNumberText",required:!0,type:{name:"string"}},tryAginButtonText:{defaultValue:null,description:"",name:"tryAginButtonText",required:!0,type:{name:"string"}},blacklistedAvailabilityBranchesConfig:{defaultValue:null,description:"",name:"blacklistedAvailabilityBranchesConfig",required:!1,type:{name:"string | undefined"}},blacklistedInstantLoanBranchesConfig:{defaultValue:null,description:"",name:"blacklistedInstantLoanBranchesConfig",required:!0,type:{name:"string"}},blacklistedPickupBranchesConfig:{defaultValue:null,description:"",name:"blacklistedPickupBranchesConfig",required:!1,type:{name:"string | undefined"}},branchesConfig:{defaultValue:null,description:"",name:"branchesConfig",required:!0,type:{name:"string"}},instantLoanConfig:{defaultValue:null,description:"",name:"instantLoanConfig",required:!0,type:{name:"string"}},smsNotificationsForReservationsEnabledConfig:{defaultValue:null,description:"",name:"smsNotificationsForReservationsEnabledConfig",required:!0,type:{name:"boolean"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/material/material.entry.tsx#materialentry"]={docgenInfo:materialentry.__docgenInfo,name:"materialentry",path:"src/apps/material/material.entry.tsx#materialentry"})}catch(__react_docgen_typescript_loader_error){}const material_dev={title:"Apps / Material",component:material_entry,argTypes:{...serviceUrlArgs.Z,searchUrl:{name:"Path to the search result page",defaultValue:"/search",control:{type:"text"}},materialUrl:{name:"Path to the material page",defaultValue:"/work/:workid",control:{type:"text"}},wid:{name:"Work ID",defaultValue:"work-of:870970-basis:52557240",control:{type:"text"}},smsNotificationsForReservationsEnabledConfig:{name:"SMS notifications for reservations is enabled",defaultValue:"1",control:{type:"text"}},blacklistedPickupBranchesConfig:{name:"Blacklisted Pickup branches",defaultValue:"FBS-751032,FBS-751031,FBS-751009,FBS-751027,FBS-751024,DK-775164",control:{type:"text"}},blacklistedAvailabilityBranchesConfig:{name:"Blacklisted Availability branches",defaultValue:"FBS-751032,FBS-751031,FBS-751009,FBS-751027,FBS-751024,DK-775164",control:{type:"text"}},blacklistedInstantLoanBranchesConfig:{name:"Blacklisted Instant Loan branches",defaultValue:"FBS-751032,FBS-751031,FBS-751009,FBS-751027,FBS-751024,DK-775164",control:{type:"text"}},branchesConfig:{name:"Branches",defaultValue:'[\n {\n "branchId":"DK-775120",\n "title":"Højbjerg"\n },\n {\n "branchId":"DK-775122",\n "title":"Beder-Malling"\n },\n {\n "branchId":"DK-775144",\n "title":"Gellerup"\n },\n {\n "branchId":"DK-775167",\n "title":"Lystrup"\n },\n {\n "branchId":"DK-775146",\n "title":"Harlev"\n },\n {\n "branchId":"DK-775168",\n "title":"Skødstrup"\n },\n {\n "branchId":"FBS-751010",\n "title":"Arresten"\n },\n {\n "branchId":"DK-775147",\n "title":"Hasle"\n },\n {\n "branchId":"FBS-751032",\n "title":"Må ikke benyttes"\n },\n {\n "branchId":"FBS-751031",\n "title":"Fjernlager 1"\n },\n {\n "branchId":"DK-775126",\n "title":"Solbjerg"\n },\n {\n "branchId":"FBS-751030",\n "title":"ITK"\n },\n {\n "branchId":"DK-775149",\n "title":"Sabro"\n },\n {\n "branchId":"DK-775127",\n "title":"Tranbjerg"\n },\n {\n "branchId":"DK-775160",\n "title":"Risskov"\n },\n {\n "branchId":"DK-775162",\n "title":"Hjortshøj"\n },\n {\n "branchId":"DK-775140",\n "title":"Åby"\n },\n {\n "branchId":"FBS-751009",\n "title":"Fjernlager 2"\n },\n {\n "branchId":"FBS-751029",\n "title":"Stadsarkivet"\n },\n {\n "branchId":"FBS-751027",\n "title":"Intern"\n },\n {\n "branchId":"FBS-751026",\n "title":"Fælles undervejs"\n },\n {\n "branchId":"FBS-751025",\n "title":"Fællessekretariatet"\n },\n {\n "branchId":"DK-775133",\n "title":"Bavnehøj"\n },\n {\n "branchId":"FBS-751024",\n "title":"Fjernlånte materialer"\n },\n {\n "branchId":"DK-775100",\n "title":"Hovedbiblioteket"\n },\n {\n "branchId":"DK-775170",\n "title":"Trige"\n },\n {\n "branchId":"DK-775150",\n "title":"Tilst"\n },\n {\n "branchId":"DK-775130",\n "title":"Viby"\n },\n {\n "branchId":"DK-775164",\n "title":"Egå"\n }\n]',control:{type:"text"}},availabilityAvailableText:{name:"Availability: available text",defaultValue:"Available",control:{type:"text"}},availabilityUnavailableText:{name:"Availability: unavailable text",defaultValue:"Unavailable",control:{type:"text"}},materialHeaderAllEditionsText:{name:"Text for the fiction edition text",defaultValue:"All editions",control:{type:"text"}},materialHeaderAuthorByText:{name:"By (author)",defaultValue:"By",control:{type:"text"}},periodicalSelectYearText:{name:"Year",defaultValue:"Year",control:{type:"text"}},periodicalSelectEditionText:{name:"Edition/Week",defaultValue:"Edition",control:{type:"text"}},reserveBookText:{name:"Reserve",defaultValue:"Reserve book",control:{type:"text"}},reserveText:{name:"Reserve",defaultValue:"Reserve",control:{type:"text"}},reservableFromAnotherLibraryText:{name:"Reservable on another library",defaultValue:"Reservable on another library",control:{type:"text"}},findOnBookshelfText:{name:"Find on bookshelf",defaultValue:"Find on shelf",control:{type:"text"}},descriptionHeadlineText:{name:"Description headline",defaultValue:"Description",control:{type:"text"}},identifierText:{name:"Identifier/topic text",defaultValue:"Tags",control:{type:"text"}},inSameSeriesText:{name:"In same series as",defaultValue:"In the same series",control:{type:"text"}},numberDescriptionText:{name:"Number",defaultValue:"Nr.",control:{type:"text"}},subjectNumberText:{name:"Subject number (Emnetal)",defaultValue:"Emnetal",control:{type:"text"}},inSeriesText:{name:"In series",defaultValue:"in series",control:{type:"text"}},loginToSeeReviewText:{name:"Login to see Review",defaultValue:"Login to see the review.",control:{type:"text"}},cantViewReviewText:{name:"Cannot view Review",defaultValue:"Cannot view the review.",control:{type:"text"}},ratingIsText:{name:"Rating is",defaultValue:"Rating of this item is @heartCount out of @numberOfHeartsPossible hearts",control:{type:"text"}},outOfText:{name:"X 'out of' Y",defaultValue:"out of",control:{type:"text"}},detailsOfTheMaterialText:{name:"Details of the material",defaultValue:"Details about the material",control:{type:"text"}},editionsText:{name:"Editions",defaultValue:"Editions",control:{type:"text"}},fictionNonfictionText:{name:"Fiction Nonfiction",defaultValue:"Fictional",control:{type:"text"}},detailsText:{name:"Details",defaultValue:"Details",control:{type:"text"}},reviewsText:{name:"Reviews",defaultValue:"Reviews",control:{type:"text"}},detailsListTypeText:{name:"Type",defaultValue:"Type",control:{type:"text"}},detailsListLanguageText:{name:"Language",defaultValue:"Language",control:{type:"text"}},detailsListContributorsText:{name:"Contributors",defaultValue:"Contributors",control:{type:"text"}},detailsListOriginalTitleText:{name:"Original title",defaultValue:"Original title",control:{type:"text"}},detailsListIsbnText:{name:"ISBN",defaultValue:"ISBN",control:{type:"text"}},detailsListScopeText:{name:"Scope",defaultValue:"Scope",control:{type:"text"}},detailsListPublisherText:{name:"Publisher",defaultValue:"Publisher",control:{type:"text"}},detailsListAudienceText:{name:"Audience",defaultValue:"Audience",control:{type:"text"}},detailsListGenreAndFormText:{name:"Genre and form",defaultValue:"Genre",control:{type:"text"}},detailsListFirstEditionYearText:{name:"First edition year",defaultValue:"first edition year",control:{type:"text"}},detailsListPlayTimeText:{name:"Play time",defaultValue:"Play time",control:{type:"text"}},detailsListEditionText:{name:"Edition",defaultValue:"Edition",control:{type:"text"}},detailsListAuthorsText:{name:"Authors",defaultValue:"Authors",control:{type:"text"}},editionText:{name:"Edition",defaultValue:"Edition",control:{type:"text"}},readArticleText:{name:"Read article",defaultValue:"Read article",control:{type:"text"}},loadingText:{name:"Loading",defaultValue:"Loading",control:{type:"text"}},getOnlineText:{name:"Get online",defaultValue:"Get online",control:{type:"text"}},seeOnlineText:{name:"See online",defaultValue:"See online",control:{type:"text"}},listenOnlineText:{name:"Listen online",defaultValue:"Listen online",control:{type:"text"}},cantReserveText:{name:"Can't be reserved",defaultValue:"Can't be reserved",control:{type:"text"}},notLivingInMunicipalityText:{name:"Not living in municipality",defaultValue:"You don't live in the municipality where this library is located.",control:{type:"text"}},blockedButtonText:{name:"Blocked button text",defaultValue:"User blocked",control:{type:"text"}},cantViewText:{name:"Can't be viewed",defaultValue:"Can't be viewed",control:{type:"text"}},goToText:{name:"Go to",defaultValue:"Go to @source",control:{type:"text"}},materialIsLoanedOutText:{name:"Material is loaned out",defaultValue:"Material is loaned out",control:{type:"text"}},findOnShelfExpandButtonExplanationText:{name:"Find on shelf expand button explanation text",defaultValue:"This button opens a modal",control:{type:"text"}},materialIsIncludedText:{name:"Material is included",defaultValue:"This material doesn't count towards your loan quota",control:{type:"text"}},materialsInStockInfoText:{name:"Materials in stock info text",defaultValue:'{"type":"plural","text":["We have 1 copy of the material in stock. ","We have @count copies of the material in stock."]}',control:{type:"text"}},materialReservationInfoText:{name:"Material Reservation info text",defaultValue:'{"type":"plural","text":["1 copy has been reserved.","@count copies have been reserved."]}',control:{type:"text"}},onlineLimitMonthEbookInfoText:{name:"Online limit info text",defaultValue:"You have borrowed @count out of @limit possible e-books this month",control:{type:"text"}},onlineLimitMonthAudiobookInfoText:{name:"Online limit info text",defaultValue:"You have borrowed @count out of @limit possible audio-books this month",control:{type:"text"}},approveReservationText:{name:"Approve reservation",defaultValue:"Approve reservation",control:{type:"text"}},shiftText:{name:"Change",defaultValue:"Change",control:{type:"text"}},reservationDetailsPickUpAtTitleText:{name:"Pick up at",defaultValue:"Pick up at",control:{type:"text"}},receiveSmsWhenMaterialReadyText:{name:"You will receive an SMS when the material is ready",defaultValue:"You will receive an SMS when the material is ready",control:{type:"text"}},receiveEmailWhenMaterialReadyText:{name:"Receive mail when the material is ready",defaultValue:"You will receive an email when the material is ready",control:{type:"text"}},reservationDetailsNoInterestAfterTitleText:{name:"Have no interest after",defaultValue:"Have no interest after",control:{type:"text"}},daysText:{name:"Days",defaultValue:"Days",control:{type:"text"}},reservationSuccesTitleText:{name:"Reservation Success title",defaultValue:"Material is available and reserved for you!",control:{type:"text"}},reservationSuccesIsReservedForYouText:{name:"Reservation Success Title",defaultValue:"is reserved for you",control:{type:"text"}},reservationSuccessPreferredPickupBranchText:{name:"Reservation Preferred pickup branch",defaultValue:"Material is available and you will get a message when it is ready for pickup - pickup at @branch",control:{type:"text"}},reservationErrorsTitleText:{name:"Reservation Error title",defaultValue:"Failed to reserve the material",control:{type:"text"}},reservationErrorsDescriptionText:{name:"Reservation Error description",defaultValue:"We're sorry. Unfortunately, there has been an error. Try again, please.",control:{type:"text"}},tryAginButtonText:{name:"Try again button text",defaultValue:"Try again",control:{type:"text"}},okButtonText:{name:"Ok button text",defaultValue:"Ok",control:{type:"text"}},missingDataText:{name:"Missing data text",defaultValue:"Missing data",control:{type:"text"}},reservationModalScreenReaderModalDescriptionText:{name:"Reservation modal screen reader description",defaultValue:"Modal for reservation",control:{type:"text"}},reservationModalCloseModalAriaLabelText:{name:"Close Reservation modal",defaultValue:"Close reservation modal",control:{type:"text"}},librariesHaveTheMaterialText:{name:"Libraries have the material",defaultValue:"libraries have material",control:{type:"text"}},findOnShelfModalScreenReaderModalDescriptionText:{name:"Reservation modal screen reader description",defaultValue:"Modal for reservation",control:{type:"text"}},findOnShelfModalCloseModalAriaLabelText:{name:"Close findOnShelf modal",defaultValue:"Close reservation modal",control:{type:"text"}},findOnShelfTableDescriptionText:{name:"Find on shelf table description",defaultValue:"Find @work on shelf in the @branch branch",control:{type:"text"}},findOnShelfModalListMaterialText:{name:"Material",defaultValue:"Material",control:{type:"text"}},findOnShelfModalListFindOnShelfText:{name:"Find it on shelf",defaultValue:"Find it on shelf",control:{type:"text"}},findOnShelfModalListItemCountText:{name:"Home",defaultValue:"home",control:{type:"text"}},findOnShelfModalNoLocationSpecifiedText:{name:"No location for find on shelf specified",defaultValue:"-",control:{type:"text"}},findOnShelfModalPeriodicalYearDropdownText:{name:"Find on shelf modal periodical dropdown - choose year",defaultValue:"Choose periodical year",control:{type:"text"}},findOnShelfModalPeriodicalEditionDropdownText:{name:"Find on shelf modal periodical dropdown - choose edition/volume",defaultValue:"Choose periodical edition",control:{type:"text"}},numberInQueueText:{name:"Number in queue text",defaultValue:"You are number @number in the queue.",control:{type:"text"}},alreadyReservedText:{name:"Already reserved text",defaultValue:"You already reserved this material",control:{type:"text"}},closeText:{name:"Close text",defaultValue:"Close",control:{type:"text"}},modalReservationFormEmailHeaderTitleText:{name:"Modal reservation form email header title",defaultValue:"Change email",control:{type:"text"}},modalReservationFormEmailHeaderDescriptionText:{name:"Modal reservation form email header description",defaultValue:"If you wish to receive notification emails you can add or change your email address here.",control:{type:"text"}},modalReservationFormEmailInputFieldLabelText:{name:"Modal reservation form email input field label",defaultValue:"Email",control:{type:"text"}},modalReservationFormEmailInputFieldDescriptionText:{name:"Modal reservation form email input field description",defaultValue:"Add email",control:{type:"text"}},modalReservationFormSmsHeaderTitleText:{name:"Modal reservation form sms header title",defaultValue:"Change phone number",control:{type:"text"}},modalReservationFormSmsHeaderDescriptionText:{name:"Modal reservation form sms header description",defaultValue:"If you wish to receive notification sms you can add or change your phone number here.",control:{type:"text"}},modalReservationFormSmsInputFieldLabelText:{name:"Modal reservation form sms input field label",defaultValue:"Phone number",control:{type:"text"}},modalReservationFormSmsInputFieldDescriptionText:{name:"Modal reservation form sms input field description",defaultValue:"Phone number",control:{type:"text"}},etAlText:{name:"Et al. Text",defaultValue:"et al.",control:{type:"text"}},modalReservationFormPickupHeaderTitleText:{name:"Modal reservation form pickup header title",defaultValue:"Change pick-up location",control:{type:"text"}},modalReservationFormPickupHeaderDescriptionText:{name:"Modal reservation form pickup header description",defaultValue:"If you wish to change the pick-up location for your reservation, you can do it here.",control:{type:"text"}},modalReservationFormPickupLabelText:{name:"Modal reservation form pickup branch input label",defaultValue:"Change pickup location for your reservation.",control:{type:"text"}},chooseOneText:{name:"Choose one text",defaultValue:"Choose one",control:{type:"text"}},modalReservationFormNoInterestAfterHeaderTitleText:{name:"Modal reservation form no interest after header title",defaultValue:"Change date of interest",control:{type:"text"}},modalReservationFormNoInterestAfterHeaderDescriptionText:{name:"Modal reservation form no interest after header description",defaultValue:"If you wish to change the amount of time after which you're no longer interested in the material, you can do it here.",control:{type:"text"}},modalReservationFormNoInterestAfterLabelText:{name:"Modal reservation form no interest after input label",defaultValue:"Change the amount of time after which you're no longer interested in this material.",control:{type:"text"}},infomediaModalScreenReaderModalDescriptionText:{name:"Infomedia modal screen reader description",defaultValue:"Modal for infomedia",control:{type:"text"}},infomediaModalCloseModalAriaLabelText:{name:"Close infomedia modal",defaultValue:"Close infomedia modal",control:{type:"text"}},saveButtonText:{name:"Save button text",defaultValue:"Save",control:{type:"text"}},orderDigitalCopyModalScreenReaderModalDescriptionText:{name:"Order digital copy modal screen reader description",defaultValue:"Modal for Order digital copy",control:{type:"text"}},orderDigitalCopyModalCloseModalAriaLabelText:{name:"Close order digital copy modal",defaultValue:"Close Order digital copy modal",control:{type:"text"}},orderDigitalCopyTitleText:{name:"Order digital copy title text",defaultValue:"Order digital copy",control:{type:"text"}},orderDigitalCopyDescriptionText:{name:"Order digital copy description text",defaultValue:"You can order a digital copy of this material. The digital copy will be sent to your email address.",control:{type:"text"}},orderDigitalCopyButtonText:{name:"Order digital copy button text",defaultValue:"Order digital copy",control:{type:"text"}},orderDigitalCopyButtonLoadingText:{name:"Order digital copy button loading text",defaultValue:"Ordering digital copy",control:{type:"text"}},orderDigitalCopyFeedbackTitleText:{name:"Order digital copy feedback title",defaultValue:"Digital copy receipt",control:{type:"text"}},orderDigitalCopyFeedbackErrorAgencyNotSubscribedText:{name:"Order digital copy agency not subscribed",defaultValue:"The agency is not subscribed to the service. You can order the digital copy by contacting the agency.",control:{type:"text"}},orderDigitalCopyFeedbackErrorInvalidPickupBranchText:{name:"Order digital copy invalid pickup branch",defaultValue:"The pickup branch is not valid. You can order the digital copy by contacting the agency.",control:{type:"text"}},orderDigitalCopyFeedbackErrorMissingClientConfigurationText:{name:"Order digital copy missing client configuration",defaultValue:"The client configuration is missing. You can order the digital copy by contacting the agency.",control:{type:"text"}},orderDigitalCopyFeedbackErrorPidNotReservableText:{name:"Order digital copy pid not reservable",defaultValue:"The material is not reservable. You can order the digital copy by contacting the agency.",control:{type:"text"}},orderDigitalCopyFeedbackErrorUnauthenticatedUserText:{name:"Order digital copy unauthenticated user",defaultValue:"You are not logged in. You can order the digital copy by contacting the agency.",control:{type:"text"}},orderDigitalCopyFeedbackOkText:{name:"Order digital copy success description text",defaultValue:"The digital copy has been ordered. You will receive an email when the digital copy is ready.",control:{type:"text"}},orderDigitalCopyFeedbackButtonText:{name:"Order digital copy success button text",defaultValue:"Close",control:{type:"text"}},orderDigitalCopyEmailLabelText:{name:"Order digital copy error email text",defaultValue:"Email",control:{type:"text"}},authUrl:{name:"Url where user can authenticate",defaultValue:"",control:{type:"text"}},materialIsAvailableInAnotherEditionText:{name:"Skip queue material is available in another edition",defaultValue:"Skip the queue - The material is available in another edition - @title @authorAndYear - reservations: @reservations",control:{type:"text"}},detailsListFirstEditionYearUnknownText:{name:"Unknown",defaultValue:"Unknown",control:{type:"text"}},addToFavoritesAriaLabelText:{control:{type:"text"},defaultValue:"Add @title to favorites list"},removeFromFavoritesAriaLabelText:{control:{type:"text"},defaultValue:"Remove @title from favorites list"},firstAvailableEditionText:{name:"First available edition",defaultValue:"First available edition",control:{type:"text"}},filmAdaptationsText:{name:"Film adaptations text",defaultValue:"Film adaptations",control:{type:"text"}},alertErrorCloseText:{name:"Alert error close text",defaultValue:"close",control:{type:"text"}},alertErrorMessageText:{name:"Alert error message text",defaultValue:"An error occurred",control:{type:"text"}},expandMoreText:{name:"Expand more text",defaultValue:"Expand more",control:{type:"text"}},changeInterestPeriodText:{name:"Change interest period text",defaultValue:"Change interest period",control:{type:"text"}},changePickupLocationText:{name:"Change pickup location text",defaultValue:"Change pickup location",control:{type:"text"}},changeSmsNumberText:{name:"Change sms number text",defaultValue:"Change sms number",control:{type:"text"}},changeEmailText:{name:"Change email text",defaultValue:"Change email",control:{type:"text"}},screenReaderModalDescriptionInterestPeriodText:{name:"Screen reader modal description for interest period",defaultValue:"Change interest period modal",control:{type:"text"}},closeModalAriaLabelInterestPeriodText:{name:"Close modal aria-label interest period ",defaultValue:"Close interest period modal",control:{type:"text"}},screenReaderModalDescriptionPickupText:{name:"Screen reader modal description for pickup",defaultValue:"Change pickup location modal",control:{type:"text"}},closeModalAriaLabelPickupText:{name:"Close modal aria-label pickup",defaultValue:"Close pickup location modal",control:{type:"text"}},screenReaderModalDescriptionSmsText:{name:"Screen reader modal description for sms",defaultValue:"Change mobile number modal",control:{type:"text"}},closeModalAriaLabelSmsText:{name:"Close modal aria-label sms",defaultValue:"Close change mobile number modal",control:{type:"text"}},screenReaderModalDescriptionEmailText:{name:"Screen reader modal description for email",defaultValue:"Change email modal",control:{type:"text"}},closeModalAriaLabelEmailText:{name:"Close modal aria-label email",defaultValue:"Close change email modal",control:{type:"text"}},instantLoanTitleText:{name:"Instant loan title",control:{type:"text"},defaultValue:"Hent bogen nu"},instantLoanSubTitleText:{name:"Instant loan subtitle",control:{type:"text"},defaultValue:"Spring køen over og hent bogen nu på"},instantLoanUnderlineDescriptionText:{name:"Instant loan underline description",control:{type:"text"},defaultValue:"Bogen er tilgængelig på disse biblioteker nær dig"},instantLoanConfig:{name:"Instant loan config",control:{type:"text"},defaultValue:'{\n "threshold": "1",\n "matchStrings": ["31 dages lånetid til alm lånere"],\n "enabled": "true" }'},interestPeriodsConfig:{defaultValue:'{ "interestPeriods":[ { "value":14, "label":"14 days" }, { "value":30, "label":"1 month" }, { "value":60, "label":"2 months" }, { "value":90, "label":"3 months" }, { "value":180, "label":"6 months" }, { "value":365, "label":"1 year" } ], "defaultInterestPeriod":{ "value":"14", "label":"14 days" } }',control:{type:"text"}},openOrderResponseTitleText:{name:"Reservation Success title",defaultValue:"Order from another library:",control:{type:"text"}},openOrderResponseIsReservedForYouText:{name:"Reservation Success Title",defaultValue:"is ordered to your library",control:{type:"text"}},openOrderAuthenticationErrorText:{name:"Open order authentication error text",defaultValue:"Authentication error occurred",control:{type:"text"}},openOrderUserBlockedByAgencyText:{name:"Open order user blocked by agency text",defaultValue:"You are blocked by the agency",control:{type:"text"}},openOrderUserNotVerifiedText:{name:"Open order user not verified text",defaultValue:"User could not be verified",control:{type:"text"}},openOrderUserNoLongerExistOnAgencyText:{name:"Open order user no longer exists on agency text",defaultValue:"User no longer exists at the specified agency",control:{type:"text"}},openOrderInvalidOrderText:{name:"Open order invalid order text",defaultValue:"Your order is invalid",control:{type:"text"}},openOrderNotOwnedIllLocText:{name:"Open order item localized for ILL text",defaultValue:"Item not available at pickup agency but localized for ILL",control:{type:"text"}},openOrderNotOwnedNoIllLocText:{name:"Open order item not localized for ILL text",defaultValue:"Item not available and not localized for ILL",control:{type:"text"}},openOrderNotOwnedWrongIllMediumtypeText:{name:"Open order wrong ILL medium type text",defaultValue:"Item not available, ILL of this medium type not accepted",control:{type:"text"}},openOrderNoServicerequesterText:{name:"Open order no service requester text",defaultValue:"Service requester is obligatory",control:{type:"text"}},openOrderOrsErrorText:{name:"Open order ORS error text",defaultValue:"Error occurred while sending order to ORS",control:{type:"text"}},openOrderStatusOwnedAcceptedText:{name:"Open order status owned accepted text",defaultValue:"Your order is accepted",control:{type:"text"}},openOrderOwnedOwnCatalogueText:{name:"Open order available in own catalogue text",defaultValue:"Item available, order through the library's catalogue",control:{type:"text"}},openOrderOwnedWrongMediumtypeText:{name:"Open order wrong medium type for available item text",defaultValue:"Item available but medium type not accepted",control:{type:"text"}},openOrderServiceUnavailableText:{name:"Open order service unavailable text",defaultValue:"Service is currently unavailable",control:{type:"text"}},openOrderUnknownErrorText:{name:"Open order unknown error text",defaultValue:"An unknown error occurred",control:{type:"text"}},openOrderUnknownPickupagencyText:{name:"Open order unknown pickup agency text",defaultValue:"Specified pickup agency not found",control:{type:"text"}},openOrderUnknownUserText:{name:"Open order unknown user text",defaultValue:"User not found",control:{type:"text"}}}},Template=args=>react.createElement(material_entry,args),Default=Template.bind({});Default.args={};const Periodical=Template.bind({});Periodical.args={wid:"work-of:870970-basis:06373674"};const Infomedia=Template.bind({});Infomedia.args={wid:"work-of:870971-avis:35731733"};const HarryPotter=Template.bind({});HarryPotter.args={wid:"work-of:870970-basis:22629344"};const TurenGårTilRom=Template.bind({});TurenGårTilRom.args={wid:"work-of:870970-basis:61991484"};const Digital=Template.bind({});Digital.args={wid:"work-of:870971-tsart:34310815"};const EBogPrinsenHarry=Template.bind({});EBogPrinsenHarry.args={wid:"work-of:870970-basis:54129807"};const EBogBlaTitle=Template.bind({});EBogBlaTitle.args={wid:"work-of:870970-basis:52880831"};const LangePeter=Template.bind({});LangePeter.args={wid:"work-of:870970-basis:01196669"};const material_dev_InstantLoan=Template.bind({});material_dev_InstantLoan.args={wid:"work-of:870970-basis:134015012"};const Dinosaurierfedern=Template.bind({});Dinosaurierfedern.args={wid:"work-of:870970-basis:44805421"};const Underverden=Template.bind({});Underverden.args={wid:"work-of:870970-basis:52886619"};const overbygningsMatriale=Template.bind({});overbygningsMatriale.args={wid:"work-of:870970-basis:135721719"}},"./src/apps/menu/menu.dev.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{UserMenu:()=>UserMenu,default:()=>menu_dev});var react=__webpack_require__("./node_modules/react/index.js"),serviceUrlArgs=__webpack_require__("./src/core/storybook/serviceUrlArgs.ts"),icon_profile=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/basic/icon-profile.svg"),icon_profile_default=__webpack_require__.n(icon_profile),url=__webpack_require__("./src/core/utils/url.tsx"),utils_text=__webpack_require__("./src/core/utils/text.tsx"),Link=__webpack_require__("./src/components/atoms/links/Link.tsx"),modal=__webpack_require__("./src/core/utils/modal.tsx"),modal_helpers=__webpack_require__("./src/core/utils/helpers/modal-helpers.ts");const menu_not_logged_in=()=>{const t=(0,utils_text.X)(),u=(0,url.J_)(),menuLoginUrl=u("menuLoginUrl"),menuSignUpUrl=u("menuSignUpUrl"),{userMenuAnonymous:userMenuAnonymousModalId}=(0,modal_helpers.GM)();return react.createElement(modal.Z,{classNames:"modal-right modal--no-padding",modalId:userMenuAnonymousModalId,closeModalAriaLabelText:t("menuNotAuthenticatedCloseButtonText"),screenReaderModalDescriptionText:t("menuNotAuthenticatedModalDescriptionText"),isSlider:!0},react.createElement("div",{className:"modal-login modal-login--anonymous"},react.createElement(Link.Z,{href:menuLoginUrl,className:"btn-primary btn-filled btn-large arrow__hover--right-small"},t("menuLoginText")),react.createElement(Link.Z,{href:menuSignUpUrl,className:"mt-32 link-tag color-secondary-gray modal-login__btn-create-profile"},t("menuSignUpText"))))};try{menunotloggedin.displayName="menunotloggedin",menunotloggedin.__docgenInfo={description:"",displayName:"menunotloggedin",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/menu/menu-not-logged-in/menu-not-logged-in.tsx#menunotloggedin"]={docgenInfo:menunotloggedin.__docgenInfo,name:"menunotloggedin",path:"src/apps/menu/menu-not-logged-in/menu-not-logged-in.tsx#menunotloggedin"})}catch(__react_docgen_typescript_loader_error){}var user=__webpack_require__("./src/core/utils/helpers/user.ts");const MenuNavigationItem=({loansCount,reservationCount,feeCount,menuNavigationItem})=>{const dataMap={1:loansCount,2:reservationCount,4:feeCount},{link,name,dataId}=menuNavigationItem;return react.createElement("li",{className:"link-filters mb-16"},react.createElement("div",{className:"link-filters__tag-wrapper"},react.createElement("a",{href:link,className:"link-tag link-tag link-filters__tag","aria-label":`${name} ${dataMap[dataId]||""}`},name),0!==dataMap[dataId]&&react.createElement("span",{className:"link-filters__counter","aria-hidden":"true"},dataMap[dataId])))},menu_navigation_list_MenuNavigationItem=MenuNavigationItem;try{MenuNavigationItem.displayName="MenuNavigationItem",MenuNavigationItem.__docgenInfo={description:"",displayName:"MenuNavigationItem",props:{loansCount:{defaultValue:null,description:"",name:"loansCount",required:!0,type:{name:"number"}},reservationCount:{defaultValue:null,description:"",name:"reservationCount",required:!0,type:{name:"number"}},feeCount:{defaultValue:null,description:"",name:"feeCount",required:!0,type:{name:"number"}},menuNavigationItem:{defaultValue:null,description:"",name:"menuNavigationItem",required:!0,type:{name:"MenuNavigationDataType"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/menu/menu-navigation-list/MenuNavigationItem.tsx#MenuNavigationItem"]={docgenInfo:MenuNavigationItem.__docgenInfo,name:"MenuNavigationItem",path:"src/apps/menu/menu-navigation-list/MenuNavigationItem.tsx#MenuNavigationItem"})}catch(__react_docgen_typescript_loader_error){}var fbs=__webpack_require__("./src/core/fbs/fbs.ts"),utils_config=__webpack_require__("./src/core/utils/config.tsx"),dashboard_notification_list=__webpack_require__("./src/apps/dashboard/dashboard-notification-list/dashboard-notification-list.tsx"),useReservations=__webpack_require__("./src/core/utils/useReservations.tsx"),useLoans=__webpack_require__("./src/core/utils/useLoans.tsx");const MenuLoggedInContent=({pageSize})=>{var _userData$patron;const t=(0,utils_text.X)(),u=(0,url.J_)(),userProfileUrl=u("userProfileUrl"),logoutUrl=u("logoutUrl"),config=(0,utils_config.ZR)(),{all:{reservations}}=(0,useReservations.Z)(),{all:{loans,overdue:loansOverdue,soonOverdue:loansSoonOverdue}}=(0,useLoans.Z)(),{data:patronData}=(0,user.dp)(),{data:fbsFees}=(0,fbs.CI)(),menuNavigationData=config("menuNavigationDataConfig",{transformer:"jsonParse"}),[userData,setUserData]=(0,react.useState)(),[feeCount,setFeeCount]=(0,react.useState)(0);(0,react.useEffect)((()=>{setUserData(patronData)}),[patronData]),(0,react.useEffect)((()=>{fbsFees&&setFeeCount(fbsFees.length)}),[fbsFees]);const showNotifications=0!==loansOverdue.length||0!==loansSoonOverdue.length||0!==reservations.length;return react.createElement("div",{className:"modal-login modal-login--authenticated"},react.createElement("div",{className:"modal-login__container"},react.createElement("div",{className:"modal-header"},react.createElement("div",{className:"modal-header__avatar"},react.createElement("div",{className:"avatar bg-global-secondary"},react.createElement("img",{src:icon_profile_default(),alt:""}))),react.createElement("div",{className:"modal-header__name text-header-h4","data-cy":"menu-patron-name"},null==userData||null===(_userData$patron=userData.patron)||void 0===_userData$patron?void 0:_userData$patron.name),react.createElement(Link.Z,{href:userProfileUrl,className:"link-tag modal-header__link color-secondary-gray"},t("menuUserProfileUrlText"))),showNotifications&&react.createElement("div",{className:"modal-profile__container"},react.createElement(dashboard_notification_list.Z,{pageSize,columns:!1})),react.createElement("nav",{className:"modal-profile__container","aria-label":t("menuProfileLinksAriaLabelText")},react.createElement("ul",{className:"modal-profile__links"},menuNavigationData.map((menuNavigationItem=>react.createElement(menu_navigation_list_MenuNavigationItem,{menuNavigationItem,loansCount:loans.length,reservationCount:reservations.length,feeCount}))))),react.createElement("div",{className:"modal-profile__btn-logout mx-32"},react.createElement(Link.Z,{className:"btn-primary btn-filled btn-large arrow__hover--right-small",href:logoutUrl},t("menuLogOutText")))))},menu_logged_in_MenuLoggedInContent=MenuLoggedInContent;try{MenuLoggedInContent.displayName="MenuLoggedInContent",MenuLoggedInContent.__docgenInfo={description:"",displayName:"MenuLoggedInContent",props:{pageSize:{defaultValue:null,description:"",name:"pageSize",required:!0,type:{name:"number"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/menu/menu-logged-in/MenuLoggedInContent.tsx#MenuLoggedInContent"]={docgenInfo:MenuLoggedInContent.__docgenInfo,name:"MenuLoggedInContent",path:"src/apps/menu/menu-logged-in/MenuLoggedInContent.tsx#MenuLoggedInContent"})}catch(__react_docgen_typescript_loader_error){}const menu_logged_in=({pageSize})=>{const{userMenuAuthenticated:userMenuAuthenticatedModalId}=(0,modal_helpers.GM)(),t=(0,utils_text.X)();return react.createElement(modal.Z,{modalId:userMenuAuthenticatedModalId,classNames:"modal-right modal--no-padding",closeModalAriaLabelText:t("menuAuthenticatedCloseButtonText"),screenReaderModalDescriptionText:t("menuAuthenticatedModalDescriptionText"),isSlider:!0},react.createElement(menu_logged_in_MenuLoggedInContent,{pageSize}))};try{menuloggedin.displayName="menuloggedin",menuloggedin.__docgenInfo={description:"",displayName:"menuloggedin",props:{pageSize:{defaultValue:null,description:"",name:"pageSize",required:!0,type:{name:"number"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/menu/menu-logged-in/menu-logged-in.tsx#menuloggedin"]={docgenInfo:menuloggedin.__docgenInfo,name:"menuloggedin",path:"src/apps/menu/menu-logged-in/menu-logged-in.tsx#menuloggedin"})}catch(__react_docgen_typescript_loader_error){}var TextLineSkeleton=__webpack_require__("./src/components/skeletons/TextLineSkeleton.tsx");const menu_menu=({pageSize})=>{var _userData$patron;const{open}=(0,modal.f)(),t=(0,utils_text.X)(),{userMenuAuthenticated:userMenuAuthenticatedModalId,userMenuAnonymous:userMenuAnonymousModalId}=(0,modal_helpers.GM)(),{isLoading,data:userData}=(0,user.dp)(),openMenu=()=>{(0,user.TF)()?open(userMenuAnonymousModalId):open(userMenuAuthenticatedModalId)};return react.createElement(react.Fragment,null,react.createElement("button",{className:"header__menu-profile header__button btn-ui",type:"button","aria-label":t("menuUserIconAriaLabelText"),onClick:()=>openMenu(),onKeyDown:e=>"Enter"===e.key&&openMenu(),tabIndex:0},react.createElement("img",{src:icon_profile_default(),alt:""}),isLoading&&react.createElement("span",{className:"text-small-caption"},react.createElement(TextLineSkeleton.Z,{width:50})),(null==userData||null===(_userData$patron=userData.patron)||void 0===_userData$patron?void 0:_userData$patron.name)&&react.createElement("span",{className:"text-small-caption"},userData.patron.name)),react.createElement(menu_logged_in,{pageSize}),react.createElement(menu_not_logged_in,null))};try{menu.displayName="menu",menu.__docgenInfo={description:"",displayName:"menu",props:{pageSize:{defaultValue:null,description:"",name:"pageSize",required:!0,type:{name:"number"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/menu/menu.tsx#menu"]={docgenInfo:menu.__docgenInfo,name:"menu",path:"src/apps/menu/menu.tsx#menu"})}catch(__react_docgen_typescript_loader_error){}var general=__webpack_require__("./src/core/utils/helpers/general.ts");const menu_entry=(0,url.XL)((0,utils_config.Rh)((0,utils_text.z)((({pageSizeDesktop,pageSizeMobile})=>{const pageSize=(0,general.Rh)({desktop:pageSizeDesktop,mobile:pageSizeMobile},"pageSizeLoanList");return react.createElement(menu_menu,{pageSize})}))));try{menuentry.displayName="menuentry",menuentry.__docgenInfo={description:"",displayName:"menuentry",props:{menuUserProfileUrlText:{defaultValue:null,description:"",name:"menuUserProfileUrlText",required:!0,type:{name:"string"}},userProfileUrl:{defaultValue:null,description:"",name:"userProfileUrl",required:!0,type:{name:"string"}},menuNavigationDataConfig:{defaultValue:null,description:"",name:"menuNavigationDataConfig",required:!0,type:{name:"string"}},menuNotificationLoansExpiredText:{defaultValue:null,description:"",name:"menuNotificationLoansExpiredText",required:!0,type:{name:"string"}},menuNotificationLoansExpiredUrl:{defaultValue:null,description:"",name:"menuNotificationLoansExpiredUrl",required:!0,type:{name:"string"}},reservationDetailsOthersInQueueText:{defaultValue:null,description:"",name:"reservationDetailsOthersInQueueText",required:!0,type:{name:"string"}},readyForLoanText:{defaultValue:null,description:"",name:"readyForLoanText",required:!0,type:{name:"string"}},menuNotificationLoansExpiringSoonText:{defaultValue:null,description:"",name:"menuNotificationLoansExpiringSoonText",required:!0,type:{name:"string"}},menuNotificationLoansExpiringSoonUrl:{defaultValue:null,description:"",name:"menuNotificationLoansExpiringSoonUrl",required:!0,type:{name:"string"}},menuNotificationReadyForPickupText:{defaultValue:null,description:"",name:"menuNotificationReadyForPickupText",required:!0,type:{name:"string"}},menuNotificationReadyForPickupUrl:{defaultValue:null,description:"",name:"menuNotificationReadyForPickupUrl",required:!0,type:{name:"string"}},menuLogOutText:{defaultValue:null,description:"",name:"menuLogOutText",required:!0,type:{name:"string"}},loansSoonOverdueText:{defaultValue:null,description:"",name:"loansSoonOverdueText",required:!0,type:{name:"string"}},loansOverdueText:{defaultValue:null,description:"",name:"loansOverdueText",required:!0,type:{name:"string"}},logoutUrl:{defaultValue:null,description:"",name:"logoutUrl",required:!0,type:{name:"string"}},expirationWarningDaysBeforeConfig:{defaultValue:null,description:"",name:"expirationWarningDaysBeforeConfig",required:!0,type:{name:"string"}},feeListDaysText:{defaultValue:null,description:"",name:"feeListDaysText",required:!0,type:{name:"string"}},menuLoginText:{defaultValue:null,description:"",name:"menuLoginText",required:!0,type:{name:"string"}},menuLoginUrl:{defaultValue:null,description:"",name:"menuLoginUrl",required:!0,type:{name:"string"}},menuSignUpText:{defaultValue:null,description:"",name:"menuSignUpText",required:!0,type:{name:"string"}},reservationsReadyText:{defaultValue:null,description:"",name:"reservationsReadyText",required:!0,type:{name:"string"}},menuSignUpUrl:{defaultValue:null,description:"",name:"menuSignUpUrl",required:!0,type:{name:"string"}},menuProfileLinksAriaLabelText:{defaultValue:null,description:"",name:"menuProfileLinksAriaLabelText",required:!0,type:{name:"string"}},menuUserIconAriaLabelText:{defaultValue:null,description:"",name:"menuUserIconAriaLabelText",required:!0,type:{name:"string"}},menuNotAuthenticatedCloseButtonText:{defaultValue:null,description:"",name:"menuNotAuthenticatedCloseButtonText",required:!0,type:{name:"string"}},menuAuthenticatedCloseButtonText:{defaultValue:null,description:"",name:"menuAuthenticatedCloseButtonText",required:!0,type:{name:"string"}},menuAuthenticatedModalDescriptionText:{defaultValue:null,description:"",name:"menuAuthenticatedModalDescriptionText",required:!0,type:{name:"string"}},menuNotAuthenticatedModalDescriptionText:{defaultValue:null,description:"",name:"menuNotAuthenticatedModalDescriptionText",required:!0,type:{name:"string"}},physicalLoansUrl:{defaultValue:null,description:"",name:"physicalLoansUrl",required:!0,type:{name:"string"}},reservationsUrl:{defaultValue:null,description:"",name:"reservationsUrl",required:!0,type:{name:"string"}},materialUrl:{defaultValue:null,description:"",name:"materialUrl",required:!0,type:{name:"string"}},searchUrl:{defaultValue:null,description:"",name:"searchUrl",required:!0,type:{name:"string"}},advancedSearchUrl:{defaultValue:null,description:"",name:"advancedSearchUrl",required:!0,type:{name:"string"}},fbsBaseUrl:{defaultValue:null,description:"",name:"fbsBaseUrl",required:!0,type:{name:"string"}},loanListEreolenUrl:{defaultValue:null,description:"",name:"loanListEreolenUrl",required:!0,type:{name:"string"}},feesPageUrl:{defaultValue:null,description:"",name:"feesPageUrl",required:!0,type:{name:"string"}},publizonBaseUrl:{defaultValue:null,description:"",name:"publizonBaseUrl",required:!0,type:{name:"string"}},dplCmsBaseUrl:{defaultValue:null,description:"",name:"dplCmsBaseUrl",required:!0,type:{name:"string"}},coverBaseUrl:{defaultValue:null,description:"",name:"coverBaseUrl",required:!0,type:{name:"string"}},materialBaseUrl:{defaultValue:null,description:"",name:"materialBaseUrl",required:!0,type:{name:"string"}},fbiBaseUrl:{defaultValue:null,description:"",name:"fbiBaseUrl",required:!0,type:{name:"string"}},authUrl:{defaultValue:null,description:"",name:"authUrl",required:!0,type:{name:"string"}},ereolenHomepageUrl:{defaultValue:null,description:"",name:"ereolenHomepageUrl",required:!0,type:{name:"string"}},pageSizeMobile:{defaultValue:null,description:"",name:"pageSizeMobile",required:!0,type:{name:"number"}},pageSizeDesktop:{defaultValue:null,description:"",name:"pageSizeDesktop",required:!0,type:{name:"number"}},groupModalDueDateLinkToPageWithFeesText:{defaultValue:null,description:"",name:"groupModalDueDateLinkToPageWithFeesText",required:!0,type:{name:"string"}},showMoreText:{defaultValue:null,description:"",name:"showMoreText",required:!0,type:{name:"string"}},groupModalDueDateMaterialText:{defaultValue:null,description:"",name:"groupModalDueDateMaterialText",required:!0,type:{name:"string"}},groupModalGoToMaterialText:{defaultValue:null,description:"",name:"groupModalGoToMaterialText",required:!0,type:{name:"string"}},groupModalDueDateHeaderText:{defaultValue:null,description:"",name:"groupModalDueDateHeaderText",required:!0,type:{name:"string"}},groupModalReturnLibraryText:{defaultValue:null,description:"",name:"groupModalReturnLibraryText",required:!0,type:{name:"string"}},groupModalCheckboxText:{defaultValue:null,description:"",name:"groupModalCheckboxText",required:!0,type:{name:"string"}},groupModalHiddenLabelCheckboxOnMaterialText:{defaultValue:null,description:"",name:"groupModalHiddenLabelCheckboxOnMaterialText",required:!0,type:{name:"string"}},resultPagerStatusText:{defaultValue:null,description:"",name:"resultPagerStatusText",required:!0,type:{name:"string"}},groupModalButtonText:{defaultValue:null,description:"",name:"groupModalButtonText",required:!0,type:{name:"string"}},groupModalDueDateWarningLoanOverdueText:{defaultValue:null,description:"",name:"groupModalDueDateWarningLoanOverdueText",required:!0,type:{name:"string"}},groupModalLoansAriaDescriptionText:{defaultValue:null,description:"",name:"groupModalLoansAriaDescriptionText",required:!0,type:{name:"string"}},groupModalLoansCloseModalAriaLabelText:{defaultValue:null,description:"",name:"groupModalLoansCloseModalAriaLabelText",required:!0,type:{name:"string"}},groupModalRenewLoanDeniedInterLibraryLoanText:{defaultValue:null,description:"",name:"groupModalRenewLoanDeniedInterLibraryLoanText",required:!0,type:{name:"string"}},groupModalRenewLoanDeniedMaxRenewalsReachedText:{defaultValue:null,description:"",name:"groupModalRenewLoanDeniedMaxRenewalsReachedText",required:!0,type:{name:"string"}},groupModalRenewLoanDeniedReservedText:{defaultValue:null,description:"",name:"groupModalRenewLoanDeniedReservedText",required:!0,type:{name:"string"}},renewGroupModalLoansButtonText:{defaultValue:null,description:"",name:"renewGroupModalLoansButtonText",required:!0,type:{name:"string"}},renewGroupModalLoansErrorStatusText:{defaultValue:null,description:"",name:"renewGroupModalLoansErrorStatusText",required:!0,type:{name:"string"}},renewGroupModalLoansErrorTitleText:{defaultValue:null,description:"",name:"renewGroupModalLoansErrorTitleText",required:!0,type:{name:"string"}},renewGroupModalLoansNoRenewalsPossibleErrorStatusText:{defaultValue:null,description:"",name:"renewGroupModalLoansNoRenewalsPossibleErrorStatusText",required:!0,type:{name:"string"}},renewGroupModalLoansNoRenewalsPossibleErrorTitleText:{defaultValue:null,description:"",name:"renewGroupModalLoansNoRenewalsPossibleErrorTitleText",required:!0,type:{name:"string"}},renewGroupModalLoansSuccessStatusText:{defaultValue:null,description:"",name:"renewGroupModalLoansSuccessStatusText",required:!0,type:{name:"string"}},renewGroupModalLoansSuccessTitleText:{defaultValue:null,description:"",name:"renewGroupModalLoansSuccessTitleText",required:!0,type:{name:"string"}},renewMaterialLoanButtonText:{defaultValue:null,description:"",name:"renewMaterialLoanButtonText",required:!0,type:{name:"string"}},renewMaterialLoanErrorStatusText:{defaultValue:null,description:"",name:"renewMaterialLoanErrorStatusText",required:!0,type:{name:"string"}},renewMaterialLoanErrorTitleText:{defaultValue:null,description:"",name:"renewMaterialLoanErrorTitleText",required:!0,type:{name:"string"}},renewMaterialLoanNoRenewalsPossibleErrorStatusText:{defaultValue:null,description:"",name:"renewMaterialLoanNoRenewalsPossibleErrorStatusText",required:!0,type:{name:"string"}},renewMaterialLoanNoRenewalsPossibleErrorTitleText:{defaultValue:null,description:"",name:"renewMaterialLoanNoRenewalsPossibleErrorTitleText",required:!0,type:{name:"string"}},renewMaterialLoanSuccessStatusText:{defaultValue:null,description:"",name:"renewMaterialLoanSuccessStatusText",required:!0,type:{name:"string"}},renewMaterialLoanSuccessTitleText:{defaultValue:null,description:"",name:"renewMaterialLoanSuccessTitleText",required:!0,type:{name:"string"}},renewProcessingText:{defaultValue:null,description:"",name:"renewProcessingText",required:!0,type:{name:"string"}},deleteReservationModalHeaderText:{defaultValue:null,description:"",name:"deleteReservationModalHeaderText",required:!0,type:{name:"string"}},deleteReservationModalDeleteQuestionText:{defaultValue:null,description:"",name:"deleteReservationModalDeleteQuestionText",required:!0,type:{name:"string"}},deleteReservationModalNotRegrettableText:{defaultValue:null,description:"",name:"deleteReservationModalNotRegrettableText",required:!0,type:{name:"string"}},deleteReservationModalDeleteButtonText:{defaultValue:null,description:"",name:"deleteReservationModalDeleteButtonText",required:!0,type:{name:"string"}},deleteReservationModalCloseModalText:{defaultValue:null,description:"",name:"deleteReservationModalCloseModalText",required:!0,type:{name:"string"}},deleteReservationModalAriaDescriptionText:{defaultValue:null,description:"",name:"deleteReservationModalAriaDescriptionText",required:!0,type:{name:"string"}},groupModalReservationsCloseModalAriaLabelText:{defaultValue:null,description:"",name:"groupModalReservationsCloseModalAriaLabelText",required:!0,type:{name:"string"}},groupModalReservationsLoansAriaDescriptionText:{defaultValue:null,description:"",name:"groupModalReservationsLoansAriaDescriptionText",required:!0,type:{name:"string"}},readyForLoanCounterLabelText:{defaultValue:null,description:"",name:"readyForLoanCounterLabelText",required:!0,type:{name:"string"}},removeAllReservationsText:{defaultValue:null,description:"",name:"removeAllReservationsText",required:!0,type:{name:"string"}},pickUpLatestText:{defaultValue:null,description:"",name:"pickUpLatestText",required:!0,type:{name:"string"}},reservationsReadyForPickupText:{defaultValue:null,description:"",name:"reservationsReadyForPickupText",required:!0,type:{name:"string"}},physicalReservationsHeaderText:{defaultValue:null,description:"",name:"physicalReservationsHeaderText",required:!0,type:{name:"string"}},digitalReservationsHeaderText:{defaultValue:null,description:"",name:"digitalReservationsHeaderText",required:!0,type:{name:"string"}},materialDetailsWarningLoanOverdueText:{defaultValue:null,description:"",name:"materialDetailsWarningLoanOverdueText",required:!0,type:{name:"string"}},materialDetailsPhysicalDueDateLabelText:{defaultValue:null,description:"",name:"materialDetailsPhysicalDueDateLabelText",required:!0,type:{name:"string"}},materialDetailsLoanDateLabelText:{defaultValue:null,description:"",name:"materialDetailsLoanDateLabelText",required:!0,type:{name:"string"}},materialDetailsMaterialNumberLabelText:{defaultValue:null,description:"",name:"materialDetailsMaterialNumberLabelText",required:!0,type:{name:"string"}},materialDetailsCloseModalAriaLabelText:{defaultValue:null,description:"",name:"materialDetailsCloseModalAriaLabelText",required:!0,type:{name:"string"}},materialDetailsLinkToPageWithFeesText:{defaultValue:null,description:"",name:"materialDetailsLinkToPageWithFeesText",required:!0,type:{name:"string"}},materialDetailsOverdueText:{defaultValue:null,description:"",name:"materialDetailsOverdueText",required:!0,type:{name:"string"}},ereolenMyPageUrl:{defaultValue:null,description:"",name:"ereolenMyPageUrl",required:!0,type:{name:"string"}},materialDetailsModalAriaDescriptionText:{defaultValue:null,description:"",name:"materialDetailsModalAriaDescriptionText",required:!0,type:{name:"string"}},materialDetailsGoToEreolenText:{defaultValue:null,description:"",name:"materialDetailsGoToEreolenText",required:!0,type:{name:"string"}},materialDetailsDigitalDueDateLabelText:{defaultValue:null,description:"",name:"materialDetailsDigitalDueDateLabelText",required:!0,type:{name:"string"}},materialDetailsRenewLoanButtonText:{defaultValue:null,description:"",name:"materialDetailsRenewLoanButtonText",required:!0,type:{name:"string"}},reservationDetailsRemoveDigitalReservationText:{defaultValue:null,description:"",name:"reservationDetailsRemoveDigitalReservationText",required:!0,type:{name:"string"}},reservationDetailsDateOfReservationTitleText:{defaultValue:null,description:"",name:"reservationDetailsDateOfReservationTitleText",required:!0,type:{name:"string"}},reservationDetailsNumberInQueueLabelText:{defaultValue:null,description:"",name:"reservationDetailsNumberInQueueLabelText",required:!0,type:{name:"string"}},reservationDetailsNoInterestAfterTitleText:{defaultValue:null,description:"",name:"reservationDetailsNoInterestAfterTitleText",required:!0,type:{name:"string"}},reservationDetailsChangeText:{defaultValue:null,description:"",name:"reservationDetailsChangeText",required:!0,type:{name:"string"}},reservationDetailsPickUpAtTitleText:{defaultValue:null,description:"",name:"reservationDetailsPickUpAtTitleText",required:!0,type:{name:"string"}},reservationDetailsButtonRemoveText:{defaultValue:null,description:"",name:"reservationDetailsButtonRemoveText",required:!0,type:{name:"string"}},reservationDetailsStatusTitleText:{defaultValue:null,description:"",name:"reservationDetailsStatusTitleText",required:!0,type:{name:"string"}},reservationDetailsBorrowBeforeText:{defaultValue:null,description:"",name:"reservationDetailsBorrowBeforeText",required:!0,type:{name:"string"}},reservationDetailsDigitalReservationGoToEreolenText:{defaultValue:null,description:"",name:"reservationDetailsDigitalReservationGoToEreolenText",required:!0,type:{name:"string"}},reservationDetailsReadyForLoanText:{defaultValue:null,description:"",name:"reservationDetailsReadyForLoanText",required:!0,type:{name:"string"}},reservationDetailsPickupDeadlineTitleText:{defaultValue:null,description:"",name:"reservationDetailsPickupDeadlineTitleText",required:!0,type:{name:"string"}},interestPeriodsConfig:{defaultValue:null,description:"",name:"interestPeriodsConfig",required:!0,type:{name:"string"}},reservationDetailsConfig:{defaultValue:null,description:"",name:"reservationDetailsConfig",required:!0,type:{name:"string"}},branchesConfig:{defaultValue:null,description:"",name:"branchesConfig",required:!0,type:{name:"string"}},blacklistedPickupBranchesConfig:{defaultValue:null,description:"",name:"blacklistedPickupBranchesConfig",required:!0,type:{name:"string"}},shiftText:{defaultValue:null,description:"",name:"shiftText",required:!0,type:{name:"string"}},modalReservationFormPickupHeaderTitleText:{defaultValue:null,description:"",name:"modalReservationFormPickupHeaderTitleText",required:!0,type:{name:"string"}},modalReservationFormPickupHeaderDescriptionText:{defaultValue:null,description:"",name:"modalReservationFormPickupHeaderDescriptionText",required:!0,type:{name:"string"}},saveButtonText:{defaultValue:null,description:"",name:"saveButtonText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterHeaderTitleText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterHeaderTitleText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterHeaderDescriptionText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterHeaderDescriptionText",required:!0,type:{name:"string"}},chooseOneText:{defaultValue:null,description:"",name:"chooseOneText",required:!0,type:{name:"string"}},loadingText:{defaultValue:null,description:"",name:"loadingText",required:!0,type:{name:"string"}},reservationSuccessTitleText:{defaultValue:null,description:"",name:"reservationSuccessTitleText",required:!0,type:{name:"string"}},reservationSuccessSubTitleText:{defaultValue:null,description:"",name:"reservationSuccessSubTitleText",required:!0,type:{name:"string"}},reservationerrorTitleText:{defaultValue:null,description:"",name:"reservationerrorTitleText",required:!0,type:{name:"string"}},reservationerrorSubTitleText:{defaultValue:null,description:"",name:"reservationerrorSubTitleText",required:!0,type:{name:"string"}},reservationStatusButtonText:{defaultValue:null,description:"",name:"reservationStatusButtonText",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/menu/menu.entry.tsx#menuentry"]={docgenInfo:menuentry.__docgenInfo,name:"menuentry",path:"src/apps/menu/menu.entry.tsx#menuentry"})}catch(__react_docgen_typescript_loader_error){}var groupModalArgs=__webpack_require__("./src/core/storybook/groupModalArgs.ts"),loanGroupModalArgs=__webpack_require__("./src/core/storybook/loanGroupModalArgs.ts"),renewalArgs=__webpack_require__("./src/core/storybook/renewalArgs.ts"),reservationGroupModalArgs=__webpack_require__("./src/core/storybook/reservationGroupModalArgs.ts"),reservationMaterialDetailsArgs=__webpack_require__("./src/core/storybook/reservationMaterialDetailsArgs.ts"),materialDetailsModalArgs=__webpack_require__("./src/core/storybook/materialDetailsModalArgs.ts"),deleteReservationModalArgs=__webpack_require__("./src/core/storybook/deleteReservationModalArgs.ts"),story_header_dev_inc=__webpack_require__("./src/components/search-bar/story-header.dev.inc.tsx");const menu_dev={title:"Apps / Header",component:menu_entry,argTypes:{...serviceUrlArgs.Z,...groupModalArgs.Z,...loanGroupModalArgs.Z,...renewalArgs.Z,...reservationMaterialDetailsArgs.Z,...reservationGroupModalArgs.Z,...deleteReservationModalArgs.Z,...materialDetailsModalArgs.Z,materialAndAuthorText:{control:{type:"text"},defaultValue:"and"},materialByAuthorText:{defaultValue:"By",control:{type:"text"}},menuUserProfileUrlText:{defaultValue:"My Account",control:{type:"text"}},userProfileUrl:{defaultValue:"/YourProfile",control:{type:"text"}},menuNavigationDataConfig:{defaultValue:'[{"name": "Loans","link": "","dataId": "1"},{"name": "Reservations","link": "","dataId": "2"},{"name": "My list","link": "","dataId": "3"},{"name": "Fees & Replacement costs","link": "","dataId": "4"},{"name": "My account","link": "","dataId": "5"}]',control:{type:"text"}},menuNotificationLoansExpiredText:{defaultValue:"loans expired",control:{type:"text"}},menuUserIconAriaLabelText:{defaultValue:"Open user menu",control:{type:"text"}},menuNotificationLoansExpiredUrl:{defaultValue:"/LoansExpired",control:{type:"text"}},menuNotificationLoansExpiringSoonText:{defaultValue:"loans expiring soon",control:{type:"text"}},menuNotificationLoansExpiringSoonUrl:{defaultValue:"/LoansExpiringSoon",control:{type:"text"}},menuNotificationReadyForPickupText:{defaultValue:"reservations ready for pickup",control:{type:"text"}},menuNotAuthenticatedCloseButtonText:{defaultValue:"Close user menu",control:{type:"text"}},menuAuthenticatedCloseButtonText:{defaultValue:"Close user menu",control:{type:"text"}},menuAuthenticatedModalDescriptionText:{defaultValue:"The user modal",control:{type:"text"}},menuNotAuthenticatedModalDescriptionText:{defaultValue:"The user modal, log in or create a user",control:{type:"text"}},menuNotificationReadyForPickupUrl:{defaultValue:"/ReservationsReadyForPickup",control:{type:"text"}},menuLogOutText:{defaultValue:"Log out",control:{type:"text"}},reservationsReadyText:{defaultValue:"Ready for you",control:{type:"text"}},readyForLoanText:{defaultValue:"Ready for pickup",control:{type:"text"}},reservationDetailsOthersInQueueText:{defaultValue:"Others are queueing for this material",control:{type:"text"}},loansSoonOverdueText:{defaultValue:"To be returned soon",control:{type:"text"}},statusBadgeWarningText:{control:{type:"text"},defaultValue:"Expires soon"},loansOverdueText:{defaultValue:"Returned too late",control:{type:"text"}},menuProfileLinksAriaLabelText:{defaultValue:"Profile links",control:{type:"text"}},logoutUrl:{defaultValue:"/Logout",control:{type:"text"}},physicalLoansUrl:{defaultValue:"/user/me/loans",control:{type:"text"}},reservationsUrl:{defaultValue:"/user/me/reservations",control:{type:"text"}},menuLoginText:{defaultValue:"Log in",control:{type:"text"}},menuLoginUrl:{defaultValue:"/Login",control:{type:"text"}},menuSignUpText:{defaultValue:"Sign up",control:{type:"text"}},menuSignUpUrl:{defaultValue:"/Signup",control:{type:"text"}},ereolenHomepageUrl:{defaultValue:"https://ereolen.dk/",control:{type:"text"}},expirationWarningDaysBeforeConfig:{defaultValue:"6",control:{type:"text"}}}},UserMenu=args=>{const menuEntryProps=args,menu=react.createElement(menu_entry,menuEntryProps);return react.createElement(story_header_dev_inc.Z,{userProfile:menu})}},"./src/apps/patron-page/PatronPage.dev.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{PatronPageEntry:()=>PatronPage_dev_PatronPageEntry,default:()=>PatronPage_dev});var react=__webpack_require__("./node_modules/react/index.js"),config=__webpack_require__("./src/core/utils/config.tsx"),utils_text=__webpack_require__("./src/core/utils/text.tsx"),url=__webpack_require__("./src/core/utils/url.tsx"),set=__webpack_require__("./node_modules/lodash/set.js"),set_default=__webpack_require__.n(set),es=__webpack_require__("./node_modules/react-query/es/index.js"),fbs=__webpack_require__("./src/core/fbs/fbs.ts"),Link=__webpack_require__("./src/components/atoms/links/Link.tsx");const BasicDetailsSection=({patron})=>{const t=(0,utils_text.X)(),{address:{coName,street,postalCode,city,country}={coName:"",street:"",postalCode:"",city:"",country:""},name}=patron||{};return react.createElement("section",null,react.createElement("h2",{className:"text-header-h4 mt-32 mb-16"},t("patronPageBasicDetailsHeaderText")),react.createElement("div",{className:"dpl-patron-info"},react.createElement("h3",{className:"dpl-patron-info__label text-header-h4"},t("patronPageBasicDetailsNameLabelText")),react.createElement("div",{className:"dpl-patron-info__text"},name),react.createElement("h3",{className:"dpl-patron-info__label text-header-h4"},t("patronPageBasicDetailsAddressLabelText")),react.createElement("div",{className:"dpl-patron-info__text"},react.createElement("div",null,coName),react.createElement("div",null,street),react.createElement("div",null,postalCode),react.createElement("div",null,city),react.createElement("div",null,country))))},sections_BasicDetailsSection=BasicDetailsSection;try{BasicDetailsSection.displayName="BasicDetailsSection",BasicDetailsSection.__docgenInfo={description:"",displayName:"BasicDetailsSection",props:{patron:{defaultValue:null,description:"",name:"patron",required:!0,type:{name:"PatronV5"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/patron-page/sections/BasicDetailsSection.tsx#BasicDetailsSection"]={docgenInfo:BasicDetailsSection.__docgenInfo,name:"BasicDetailsSection",path:"src/apps/patron-page/sections/BasicDetailsSection.tsx#BasicDetailsSection"})}catch(__react_docgen_typescript_loader_error){}var ContactInfoSection=__webpack_require__("./src/components/contact-info-section/ContactInfoSection.tsx"),Checkbox=__webpack_require__("./src/components/checkbox/Checkbox.tsx"),BranchesDropdown=__webpack_require__("./src/apps/patron-page/util/BranchesDropdown.tsx"),modal=__webpack_require__("./src/core/utils/modal.tsx"),modal_helpers=__webpack_require__("./src/core/utils/helpers/modal-helpers.ts");const ReservationDetailsSection=({patron,changePatron})=>{const t=(0,utils_text.X)(),{open}=(0,modal.f)(),{pauseReservation}=(0,modal_helpers.GM)();return react.createElement("section",{"data-cy":"pickup-reservations-section"},react.createElement("h2",{className:"text-header-h4 mt-32 mb-16"},t("patronPageChangePickupHeaderText")),react.createElement("p",{className:"text-body-small-regular mb-8"},t("patronPageChangePickupBodyText")),react.createElement(BranchesDropdown.Z,{classNames:"dropdow dropdown__desktop",selected:(null==patron?void 0:patron.preferredPickupBranch)||"",onChange:newPreferredPickupBranch=>changePatron(newPreferredPickupBranch,"preferredPickupBranch")}),react.createElement("h3",{className:"text-body-small-regular mt-32 mb-16"},t("patronPagePauseReservationsHeaderText")),react.createElement("p",{className:"text-body-small-regular mb-8"},t("patronPagePauseReservationsBodyText")),react.createElement(Checkbox.Z,{className:"my-16",id:"show-reservation-pause-section",onChecked:()=>{open(pauseReservation)},ariaLabel:t("patronPageOpenPauseReservationsSectionAriaText"),selected:!1,label:t("patronPageOpenPauseReservationsSectionText")}))},sections_ReservationDetailsSection=ReservationDetailsSection;try{ReservationDetailsSection.displayName="ReservationDetailsSection",ReservationDetailsSection.__docgenInfo={description:"",displayName:"ReservationDetailsSection",props:{patron:{defaultValue:null,description:"",name:"patron",required:!0,type:{name:"PatronV5"}},changePatron:{defaultValue:null,description:"",name:"changePatron",required:!0,type:{name:"ChangePatronProps"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/patron-page/sections/ReservationDetailsSection.tsx#ReservationDetailsSection"]={docgenInfo:ReservationDetailsSection.__docgenInfo,name:"ReservationDetailsSection",path:"src/apps/patron-page/sections/ReservationDetailsSection.tsx#ReservationDetailsSection"})}catch(__react_docgen_typescript_loader_error){}var PincodeSection=__webpack_require__("./src/apps/patron-page/sections/PincodeSection.tsx"),publizon=__webpack_require__("./src/core/publizon/publizon.ts");const StatusSection=()=>{const t=(0,utils_text.X)(),alwaysAvailableEreolenUrl=(0,url.J_)()("alwaysAvailableEreolenUrl"),{data:libraryProfileFetched}=(0,publizon.ul)(),{isSuccess,data}=(0,publizon.T8)(),[libraryProfile,setLibraryProfile]=(0,react.useState)(null),[patronData,setPatronData]=(0,react.useState)(null);(0,react.useEffect)((()=>{isSuccess&&data&&data.userData&&setPatronData(data.userData)}),[isSuccess,data]),(0,react.useEffect)((()=>{libraryProfileFetched&&setLibraryProfile(libraryProfileFetched)}),[libraryProfileFetched]);const{maxConcurrentAudioLoansPerBorrower,maxConcurrentEbookLoansPerBorrower,maxConcurrentAudioReservationsPerBorrower,maxConcurrentEbookReservationsPerBorrower}=libraryProfile||{};let patronEbookLoans=0;null!=patronData&&patronData.ebookLoansRemaining&&(patronEbookLoans=Math.abs(null==patronData?void 0:patronData.ebookLoansRemaining)||0);let patronAudioBookLoans=0;null!=patronData&&patronData.audiobookLoansRemaining&&(patronAudioBookLoans=Math.abs(null==patronData?void 0:patronData.audiobookLoansRemaining)||0);let eBookLoanPerent=100;maxConcurrentEbookLoansPerBorrower&&(eBookLoanPerent=patronEbookLoans/maxConcurrentEbookLoansPerBorrower*100);let audioBookLoanPercent=100;return maxConcurrentAudioLoansPerBorrower&&(audioBookLoanPercent=patronAudioBookLoans/maxConcurrentAudioLoansPerBorrower*100),react.createElement("section",{className:"dpl-status-loans"},libraryProfile&&react.createElement(react.Fragment,null,react.createElement("h2",{className:"text-header-h4 mt-32 mb-16"},t("patronPageStatusSectionHeaderText")),react.createElement("div",{className:"text-body-small-regular mb-8"},t("patronPageStatusSectionBodyText")," ",react.createElement(Link.Z,{href:alwaysAvailableEreolenUrl},t("patronPageStatusSectionLinkText"))),maxConcurrentEbookReservationsPerBorrower&&maxConcurrentAudioReservationsPerBorrower&&react.createElement("div",{className:"text-body-small-regular mt-8 mb-8"},t("patronPageStatusSectionReservationsText",{placeholders:{"@countEbooks":maxConcurrentEbookReservationsPerBorrower,"@countAudiobooks":maxConcurrentAudioReservationsPerBorrower}})),react.createElement("div",{className:"dpl-status-loans__column"},react.createElement("div",{className:"dpl-status mt-32"},react.createElement("h3",{className:"text-small-caption"},t("patronPageStatusSectionLoanHeaderText")),react.createElement("div",{className:"dpl-progress-bar text-small-caption color-secondary-gray"},react.createElement("div",{className:"dpl-progress-bar__header"},react.createElement("label",{className:"text-label text-body-medium-medium",htmlFor:"patron-page-status-section-out-of-text"},t("patronPageStatusSectionLoansEbooksText")),maxConcurrentEbookLoansPerBorrower&&react.createElement("div",{className:"text-label",id:"patron-page-status-section-out-of-text"},t("patronPageStatusSectionOutOfText",{placeholders:{"@this":patronEbookLoans,"@that":maxConcurrentEbookLoansPerBorrower}}))),react.createElement("div",{className:"dpl-progress-bar__progress-bar bg-global-secondary"},maxConcurrentEbookLoansPerBorrower&&react.createElement("div",{className:"bg-identity-primary",role:"figure","aria-label":t("patronPageStatusSectionOutOfAriaLabelEbooksText",{placeholders:{"@this":patronEbookLoans,"@that":maxConcurrentEbookLoansPerBorrower}}),style:{width:`${eBookLoanPerent}%`}}))),react.createElement("div",{className:"dpl-progress-bar text-small-caption color-secondary-gray"},react.createElement("div",{className:"dpl-progress-bar__header"},react.createElement("label",{className:"text-label",htmlFor:"max-concurrent-audio-loans-per-borrower"},t("patronPageStatusSectionLoansAudioBooksText")),maxConcurrentAudioLoansPerBorrower&&react.createElement("div",{className:"text-label",id:"max-concurrent-audio-loans-per-borrower"},t("patronPageStatusSectionOutOfText",{placeholders:{"@this":patronAudioBookLoans,"@that":maxConcurrentAudioLoansPerBorrower}}))),react.createElement("div",{className:"dpl-progress-bar__progress-bar bg-global-secondary"},maxConcurrentEbookLoansPerBorrower&&react.createElement("div",{role:"figure","aria-label":t("patronPageStatusSectionOutOfAriaLabelAudioBooksText",{placeholders:{"@this":patronEbookLoans,"@that":maxConcurrentEbookLoansPerBorrower}}),className:"bg-identity-primary",style:{width:`${audioBookLoanPercent}%`}})))))))},sections_StatusSection=StatusSection;try{StatusSection.displayName="StatusSection",StatusSection.__docgenInfo={description:"",displayName:"StatusSection",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/patron-page/sections/StatusSection.tsx#StatusSection"]={docgenInfo:StatusSection.__docgenInfo,name:"StatusSection",path:"src/apps/patron-page/sections/StatusSection.tsx#StatusSection"})}catch(__react_docgen_typescript_loader_error){}var pause_reservation=__webpack_require__("./src/apps/reservation-list/modal/pause-reservation/pause-reservation.tsx"),PromoBar=__webpack_require__("./src/components/promo-bar/PromoBar.tsx");const NotificationComponent=({notificationMessage})=>react.createElement(PromoBar.Z,{text:notificationMessage,type:"info"}),notification_NotificationComponent=NotificationComponent;try{NotificationComponent.displayName="NotificationComponent",NotificationComponent.__docgenInfo={description:"",displayName:"NotificationComponent",props:{notificationMessage:{defaultValue:null,description:"",name:"notificationMessage",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/notification/NotificationComponent.tsx#NotificationComponent"]={docgenInfo:NotificationComponent.__docgenInfo,name:"NotificationComponent",path:"src/components/notification/NotificationComponent.tsx#NotificationComponent"})}catch(__react_docgen_typescript_loader_error){}const useNotificationMessage=({timeout=5e3,scrollToTop=!0}={})=>{const[notificationMessage,setNotificationMessage]=(0,react.useState)(null);return[()=>notificationMessage?react.createElement(notification_NotificationComponent,{notificationMessage}):null,text=>{setNotificationMessage(text),scrollToTop&&window.scrollTo(0,0),timeout&&setTimeout((()=>{setNotificationMessage(null)}),timeout)}]};try{useNotificationMessage.displayName="useNotificationMessage",useNotificationMessage.__docgenInfo={description:"",displayName:"useNotificationMessage",props:{timeout:{defaultValue:{value:"5000"},description:"",name:"timeout",required:!1,type:{name:"number | undefined"}},scrollToTop:{defaultValue:{value:"true"},description:"",name:"scrollToTop",required:!1,type:{name:"boolean | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/utils/useNotificationMessage.tsx#useNotificationMessage"]={docgenInfo:useNotificationMessage.__docgenInfo,name:"useNotificationMessage",path:"src/core/utils/useNotificationMessage.tsx#useNotificationMessage"})}catch(__react_docgen_typescript_loader_error){}var user=__webpack_require__("./src/core/utils/helpers/user.ts");const PatronPage=()=>{const queryClient=(0,es.useQueryClient)(),t=(0,utils_text.X)(),deletePatronUrl=(0,url.J_)()("deletePatronUrl"),{mutate}=(0,fbs.tX)(),{pauseReservation}=(0,modal_helpers.GM)(),{data:patronData}=(0,user.dp)(),[patron,setPatron]=(0,react.useState)(null),[pin,setPin]=(0,react.useState)(null),[disableSubmitButton,setDisableSubmitButton]=(0,react.useState)(!1),[successPinMessage,setSuccessPinMessage]=(0,react.useState)(null),[NotificationComponent,handleNotificationMessage]=useNotificationMessage();(0,react.useEffect)((()=>{patronData&&patronData.patron&&setPatron(patronData.patron)}),[patronData]);const changePatron=(newValue,key)=>{const copyUser=JSON.parse(JSON.stringify(patron));set_default()(copyUser,key,newValue),setPatron(copyUser)},handleSubmit=e=>{e.preventDefault(),(()=>{if(patron){setDisableSubmitButton(!0);const data={patron:{emailAddress:patron.emailAddress,receivePostalMail:patron.receivePostalMail,phoneNumber:patron.phoneNumber,onHold:patron.onHold,preferredPickupBranch:patron.preferredPickupBranch,receiveEmail:patron.receiveEmail,receiveSms:patron.receiveSms}};pin&&(data.pincodeChange={pincode:pin,libraryCardNumber:patron.patronId.toString()}),mutate({data},{onSuccess:()=>{queryClient.invalidateQueries((0,fbs.Tk)()),pin&&setSuccessPinMessage(t("patronPinSavedSuccessText")),setDisableSubmitButton(!1),handleNotificationMessage(t("patronPageHandleResponseInformationText"))},onError:()=>{setDisableSubmitButton(!1)}})}})()};return react.createElement(react.Fragment,null,react.createElement("form",{className:"dpl-patron-page",onSubmit:e=>handleSubmit(e)},react.createElement("h1",{className:"text-header-h1 my-32"},t("patronPageHeaderText")),react.createElement(NotificationComponent,null),patron&&react.createElement(sections_BasicDetailsSection,{patron}),react.createElement("div",{className:"patron-page-info"},patron&&react.createElement(ContactInfoSection.Z,{changePatron,patron,inLine:!1,showCheckboxes:!0}),react.createElement(sections_StatusSection,null),patron&&react.createElement(sections_ReservationDetailsSection,{changePatron,patron}),patron&&react.createElement(PincodeSection.Z,{changePincode:setPin,required:!1}),successPinMessage&&react.createElement("p",{className:"text-body-small-regular mb-8 mt-8",role:"alert"},successPinMessage),react.createElement("button",{"data-cy":"save-user-patron",className:"mt-48 btn-primary btn-filled btn-small arrow__hover--right-small ",type:"submit",disabled:disableSubmitButton},t(disableSubmitButton?"patronPageLoadingText":"patronPageSaveButtonText")),react.createElement("div",{className:"text-body-small-regular mt-32"},t("patronPageDeleteProfileText")," ",react.createElement(Link.Z,{id:"delete-patron-link",href:deletePatronUrl,className:"link-tag"},t("patronPageDeleteProfileLinkText"))))),patron&&react.createElement(pause_reservation.Z,{user:patron,id:pauseReservation}))},patron_page_PatronPage=PatronPage;try{PatronPage.displayName="PatronPage",PatronPage.__docgenInfo={description:"",displayName:"PatronPage",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/patron-page/PatronPage.tsx#PatronPage"]={docgenInfo:PatronPage.__docgenInfo,name:"PatronPage",path:"src/apps/patron-page/PatronPage.tsx#PatronPage"})}catch(__react_docgen_typescript_loader_error){}var withIsPatronBlockedHoc=__webpack_require__("./src/core/utils/withIsPatronBlockedHoc.tsx");const PatronPage_entry=(0,config.Rh)((0,url.XL)((0,utils_text.z)((0,withIsPatronBlockedHoc.Z)((()=>react.createElement(patron_page_PatronPage,null))))));try{PatronPageentry.displayName="PatronPageentry",PatronPageentry.__docgenInfo={description:"",displayName:"PatronPageentry",props:{blacklistedPickupBranchesConfig:{defaultValue:null,description:"",name:"blacklistedPickupBranchesConfig",required:!0,type:{name:"string"}},branchesConfig:{defaultValue:null,description:"",name:"branchesConfig",required:!0,type:{name:"string"}},pincodeLengthMinConfig:{defaultValue:null,description:"",name:"pincodeLengthMinConfig",required:!0,type:{name:"string"}},pincodeLengthMaxConfig:{defaultValue:null,description:"",name:"pincodeLengthMaxConfig",required:!0,type:{name:"string"}},pauseReservationStartDateConfig:{defaultValue:null,description:"",name:"pauseReservationStartDateConfig",required:!0,type:{name:"string"}},textNotificationsEnabledConfig:{defaultValue:null,description:"",name:"textNotificationsEnabledConfig",required:!0,type:{name:"string"}},minAgeConfig:{defaultValue:null,description:"",name:"minAgeConfig",required:!0,type:{name:"string"}},blockedPatronDTitleText:{defaultValue:null,description:"",name:"blockedPatronDTitleText",required:!0,type:{name:"string"}},blockedPatronDBodyText:{defaultValue:null,description:"",name:"blockedPatronDBodyText",required:!0,type:{name:"string"}},blockedPatronSTitleText:{defaultValue:null,description:"",name:"blockedPatronSTitleText",required:!0,type:{name:"string"}},blockedPatronSBodyText:{defaultValue:null,description:"",name:"blockedPatronSBodyText",required:!0,type:{name:"string"}},blockedPatronFTitleText:{defaultValue:null,description:"",name:"blockedPatronFTitleText",required:!0,type:{name:"string"}},blockedPatronFBodyText:{defaultValue:null,description:"",name:"blockedPatronFBodyText",required:!0,type:{name:"string"}},blockedPatronETitleText:{defaultValue:null,description:"",name:"blockedPatronETitleText",required:!0,type:{name:"string"}},blockedPatronEBodyText:{defaultValue:null,description:"",name:"blockedPatronEBodyText",required:!0,type:{name:"string"}},blockedPatronWTitleText:{defaultValue:null,description:"",name:"blockedPatronWTitleText",required:!0,type:{name:"string"}},blockedPatronWBodyText:{defaultValue:null,description:"",name:"blockedPatronWBodyText",required:!0,type:{name:"string"}},blockedPatronOTitleText:{defaultValue:null,description:"",name:"blockedPatronOTitleText",required:!0,type:{name:"string"}},blockedPatronOBodyText:{defaultValue:null,description:"",name:"blockedPatronOBodyText",required:!0,type:{name:"string"}},blockedPatronUTitleText:{defaultValue:null,description:"",name:"blockedPatronUTitleText",required:!0,type:{name:"string"}},blockedPatronUBodyText:{defaultValue:null,description:"",name:"blockedPatronUBodyText",required:!0,type:{name:"string"}},blockedPatronELinkText:{defaultValue:null,description:"",name:"blockedPatronELinkText",required:!0,type:{name:"string"}},blockedPatronELinkUrl:{defaultValue:null,description:"",name:"blockedPatronELinkUrl",required:!0,type:{name:"string"}},blockedPatronCloseModalAriaLabelText:{defaultValue:null,description:"",name:"blockedPatronCloseModalAriaLabelText",required:!0,type:{name:"string"}},blockedPatronModalAriaDescriptionText:{defaultValue:null,description:"",name:"blockedPatronModalAriaDescriptionText",required:!0,type:{name:"string"}},BlockedPatronEntryTextProps:{defaultValue:null,description:"",name:"BlockedPatronEntryTextProps",required:!0,type:{name:"string"}},redirectOnBlocked:{defaultValue:null,description:"",name:"redirectOnBlocked",required:!0,type:{name:"string"}},patronPageHeaderText:{defaultValue:null,description:"",name:"patronPageHeaderText",required:!0,type:{name:"string"}},pauseReservationModalHeaderText:{defaultValue:null,description:"",name:"pauseReservationModalHeaderText",required:!0,type:{name:"string"}},pauseReservationModalBodyText:{defaultValue:null,description:"",name:"pauseReservationModalBodyText",required:!0,type:{name:"string"}},pauseReservationModalCloseModalText:{defaultValue:null,description:"",name:"pauseReservationModalCloseModalText",required:!0,type:{name:"string"}},patronPinSavedSuccessText:{defaultValue:null,description:"",name:"patronPinSavedSuccessText",required:!0,type:{name:"string"}},dateInputsStartDateLabelText:{defaultValue:null,description:"",name:"dateInputsStartDateLabelText",required:!0,type:{name:"string"}},dateInputsEndDateLabelText:{defaultValue:null,description:"",name:"dateInputsEndDateLabelText",required:!0,type:{name:"string"}},pauseReservationModalBelowInputsTextText:{defaultValue:null,description:"",name:"pauseReservationModalBelowInputsTextText",required:!0,type:{name:"string"}},pauseReservationModalLinkText:{defaultValue:null,description:"",name:"pauseReservationModalLinkText",required:!0,type:{name:"string"}},pauseReservationModalSaveButtonLabelText:{defaultValue:null,description:"",name:"pauseReservationModalSaveButtonLabelText",required:!0,type:{name:"string"}},pauseReservationModalCancelButtonLabelText:{defaultValue:null,description:"",name:"pauseReservationModalCancelButtonLabelText",required:!0,type:{name:"string"}},patronPageBasicDetailsHeaderText:{defaultValue:null,description:"",name:"patronPageBasicDetailsHeaderText",required:!0,type:{name:"string"}},patronPageBasicDetailsNameLabelText:{defaultValue:null,description:"",name:"patronPageBasicDetailsNameLabelText",required:!0,type:{name:"string"}},patronPageBasicDetailsAddressLabelText:{defaultValue:null,description:"",name:"patronPageBasicDetailsAddressLabelText",required:!0,type:{name:"string"}},patronContactInfoHeaderText:{defaultValue:null,description:"",name:"patronContactInfoHeaderText",required:!0,type:{name:"string"}},patronContactInfoBodyText:{defaultValue:null,description:"",name:"patronContactInfoBodyText",required:!0,type:{name:"string"}},patronContactPhoneLabelText:{defaultValue:null,description:"",name:"patronContactPhoneLabelText",required:!0,type:{name:"string"}},patronContactPhoneCheckboxText:{defaultValue:null,description:"",name:"patronContactPhoneCheckboxText",required:!0,type:{name:"string"}},patronContactEmailLabelText:{defaultValue:null,description:"",name:"patronContactEmailLabelText",required:!0,type:{name:"string"}},patronContactEmailCheckboxText:{defaultValue:null,description:"",name:"patronContactEmailCheckboxText",required:!0,type:{name:"string"}},patronPageStatusSectionHeaderText:{defaultValue:null,description:"",name:"patronPageStatusSectionHeaderText",required:!0,type:{name:"string"}},patronPageStatusSectionBodyText:{defaultValue:null,description:"",name:"patronPageStatusSectionBodyText",required:!0,type:{name:"string"}},patronPageStatusSectionLinkText:{defaultValue:null,description:"",name:"patronPageStatusSectionLinkText",required:!0,type:{name:"string"}},patronPageStatusSectionLoanHeaderText:{defaultValue:null,description:"",name:"patronPageStatusSectionLoanHeaderText",required:!0,type:{name:"string"}},patronPageStatusSectionLoansEbooksText:{defaultValue:null,description:"",name:"patronPageStatusSectionLoansEbooksText",required:!0,type:{name:"string"}},patronPageStatusSectionLoansAudioBooksText:{defaultValue:null,description:"",name:"patronPageStatusSectionLoansAudioBooksText",required:!0,type:{name:"string"}},patronPageChangePickupHeaderText:{defaultValue:null,description:"",name:"patronPageChangePickupHeaderText",required:!0,type:{name:"string"}},patronPageChangePickupBodyText:{defaultValue:null,description:"",name:"patronPageChangePickupBodyText",required:!0,type:{name:"string"}},pickupBranchesDropdownLabelText:{defaultValue:null,description:"",name:"pickupBranchesDropdownLabelText",required:!0,type:{name:"string"}},pickupBranchesDropdownNothingSelectedText:{defaultValue:null,description:"",name:"pickupBranchesDropdownNothingSelectedText",required:!0,type:{name:"string"}},patronPagePauseReservationsHeaderText:{defaultValue:null,description:"",name:"patronPagePauseReservationsHeaderText",required:!0,type:{name:"string"}},patronPagePauseReservationsBodyText:{defaultValue:null,description:"",name:"patronPagePauseReservationsBodyText",required:!0,type:{name:"string"}},patronPageOpenPauseReservationsSectionText:{defaultValue:null,description:"",name:"patronPageOpenPauseReservationsSectionText",required:!0,type:{name:"string"}},patronPageOpenPauseReservationsSectionAriaText:{defaultValue:null,description:"",name:"patronPageOpenPauseReservationsSectionAriaText",required:!0,type:{name:"string"}},patronPageChangePincodeHeaderText:{defaultValue:null,description:"",name:"patronPageChangePincodeHeaderText",required:!0,type:{name:"string"}},patronPageChangePincodeBodyText:{defaultValue:null,description:"",name:"patronPageChangePincodeBodyText",required:!0,type:{name:"string"}},patronPagePincodeLabelText:{defaultValue:null,description:"",name:"patronPagePincodeLabelText",required:!0,type:{name:"string"}},patronPageConfirmPincodeLabelText:{defaultValue:null,description:"",name:"patronPageConfirmPincodeLabelText",required:!0,type:{name:"string"}},patronPagePincodeTooShortValidationText:{defaultValue:null,description:"",name:"patronPagePincodeTooShortValidationText",required:!0,type:{name:"string"}},patronPagePincodesNotTheSameText:{defaultValue:null,description:"",name:"patronPagePincodesNotTheSameText",required:!0,type:{name:"string"}},patronPageSaveButtonText:{defaultValue:null,description:"",name:"patronPageSaveButtonText",required:!0,type:{name:"string"}},patronPageDeleteProfileText:{defaultValue:null,description:"",name:"patronPageDeleteProfileText",required:!0,type:{name:"string"}},patronPageDeleteProfileLinkText:{defaultValue:null,description:"",name:"patronPageDeleteProfileLinkText",required:!0,type:{name:"string"}},patronPageStatusSectionReservationsText:{defaultValue:null,description:"",name:"patronPageStatusSectionReservationsText",required:!0,type:{name:"string"}},patronPageStatusSectionOutOfText:{defaultValue:null,description:"",name:"patronPageStatusSectionOutOfText",required:!0,type:{name:"string"}},patronPageStatusSectionOutOfAriaLabelAudioBooksText:{defaultValue:null,description:"",name:"patronPageStatusSectionOutOfAriaLabelAudioBooksText",required:!0,type:{name:"string"}},patronPageStatusSectionOutOfAriaLabelEbooksText:{defaultValue:null,description:"",name:"patronPageStatusSectionOutOfAriaLabelEbooksText",required:!0,type:{name:"string"}},patronPagePhoneInputMessageText:{defaultValue:null,description:"",name:"patronPagePhoneInputMessageText",required:!0,type:{name:"string"}},patronPageHandleResponseInformationText:{defaultValue:null,description:"",name:"patronPageHandleResponseInformationText",required:!0,type:{name:"string"}},patronPageLoadingText:{defaultValue:null,description:"",name:"patronPageLoadingText",required:!0,type:{name:"string"}},deletePatronUrl:{defaultValue:null,description:"",name:"deletePatronUrl",required:!0,type:{name:"string"}},pauseReservationInfoUrl:{defaultValue:null,description:"",name:"pauseReservationInfoUrl",required:!0,type:{name:"string"}},alwaysLoanableEreolenUrl:{defaultValue:null,description:"",name:"alwaysLoanableEreolenUrl",required:!0,type:{name:"string"}},materialUrl:{defaultValue:null,description:"",name:"materialUrl",required:!0,type:{name:"string"}},searchUrl:{defaultValue:null,description:"",name:"searchUrl",required:!0,type:{name:"string"}},advancedSearchUrl:{defaultValue:null,description:"",name:"advancedSearchUrl",required:!0,type:{name:"string"}},fbsBaseUrl:{defaultValue:null,description:"",name:"fbsBaseUrl",required:!0,type:{name:"string"}},loanListEreolenUrl:{defaultValue:null,description:"",name:"loanListEreolenUrl",required:!0,type:{name:"string"}},feesPageUrl:{defaultValue:null,description:"",name:"feesPageUrl",required:!0,type:{name:"string"}},publizonBaseUrl:{defaultValue:null,description:"",name:"publizonBaseUrl",required:!0,type:{name:"string"}},dplCmsBaseUrl:{defaultValue:null,description:"",name:"dplCmsBaseUrl",required:!0,type:{name:"string"}},coverBaseUrl:{defaultValue:null,description:"",name:"coverBaseUrl",required:!0,type:{name:"string"}},materialBaseUrl:{defaultValue:null,description:"",name:"materialBaseUrl",required:!0,type:{name:"string"}},fbiBaseUrl:{defaultValue:null,description:"",name:"fbiBaseUrl",required:!0,type:{name:"string"}},authUrl:{defaultValue:null,description:"",name:"authUrl",required:!0,type:{name:"string"}},ereolenHomepageUrl:{defaultValue:null,description:"",name:"ereolenHomepageUrl",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/patron-page/PatronPage.entry.tsx#PatronPageentry"]={docgenInfo:PatronPageentry.__docgenInfo,name:"PatronPageentry",path:"src/apps/patron-page/PatronPage.entry.tsx#PatronPageentry"})}catch(__react_docgen_typescript_loader_error){}var serviceUrlArgs=__webpack_require__("./src/core/storybook/serviceUrlArgs.ts"),pincodeArgs=__webpack_require__("./src/core/storybook/pincodeArgs.ts"),blockedArgs=__webpack_require__("./src/core/storybook/blockedArgs.ts");const PatronPage_dev={title:"Apps / Patron page",component:PatronPage_entry,argTypes:{...serviceUrlArgs.Z,...pincodeArgs.Z,...blockedArgs.Z,pauseReservationStartDateConfig:{defaultValue:"2022-06-30",control:{type:"text"}},blacklistedPickupBranchesConfig:{defaultValue:"FBS-751032,FBS-751031,FBS-751009,FBS-751027,FBS-751024",control:{type:"text"}},branchesConfig:{defaultValue:'[\n {\n "branchId":"DK-775120",\n "title":"Højbjerg"\n },\n {\n "branchId":"DK-775122",\n "title":"Beder-Malling"\n },\n {\n "branchId":"DK-775144",\n "title":"Gellerup"\n },\n {\n "branchId":"DK-775167",\n "title":"Lystrup"\n },\n {\n "branchId":"DK-775146",\n "title":"Harlev"\n },\n {\n "branchId":"DK-775168",\n "title":"Skødstrup"\n },\n {\n "branchId":"FBS-751010",\n "title":"Arresten"\n },\n {\n "branchId":"DK-775147",\n "title":"Hasle"\n },\n {\n "branchId":"FBS-751032",\n "title":"Må ikke benyttes"\n },\n {\n "branchId":"FBS-751031",\n "title":"Fjernlager 1"\n },\n {\n "branchId":"DK-775126",\n "title":"Solbjerg"\n },\n {\n "branchId":"FBS-751030",\n "title":"ITK"\n },\n {\n "branchId":"DK-775149",\n "title":"Sabro"\n },\n {\n "branchId":"DK-775127",\n "title":"Tranbjerg"\n },\n {\n "branchId":"DK-775160",\n "title":"Risskov"\n },\n {\n "branchId":"DK-775162",\n "title":"Hjortshøj"\n },\n {\n "branchId":"DK-775140",\n "title":"Åby"\n },\n {\n "branchId":"FBS-751009",\n "title":"Fjernlager 2"\n },\n {\n "branchId":"FBS-751029",\n "title":"Stadsarkivet"\n },\n {\n "branchId":"FBS-751027",\n "title":"Intern"\n },\n {\n "branchId":"FBS-751026",\n "title":"Fælles undervejs"\n },\n {\n "branchId":"FBS-751025",\n "title":"Fællessekretariatet"\n },\n {\n "branchId":"DK-775133",\n "title":"Bavnehøj"\n },\n {\n "branchId":"FBS-751024",\n "title":"Fjernlånte materialer"\n },\n {\n "branchId":"DK-775100",\n "title":"Hovedbiblioteket"\n },\n {\n "branchId":"DK-775170",\n "title":"Trige"\n },\n {\n "branchId":"DK-775150",\n "title":"Tilst"\n },\n {\n "branchId":"DK-775130",\n "title":"Viby"\n },\n {\n "branchId":"DK-775164",\n "title":"Egå"\n }\n]',control:{type:"text"}},deletePatronUrl:{defaultValue:"https://images.unsplash.com/photo-1560888126-5c13ad3f9345?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=2371&q=80",control:{type:"text"}},pauseReservationInfoUrl:{defaultValue:"https://images.unsplash.com/photo-1560888126-5c13ad3f9345?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=2371&q=80",control:{type:"text"}},textNotificationsEnabledConfig:{defaultValue:"1",control:{type:"text"}},alwaysAvailableEreolenUrl:{defaultValue:"https://images.unsplash.com/photo-1560888126-5c13ad3f9345?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=2371&q=80",control:{type:"text"}},ereolenHomepageUrl:{defaultValue:"https://ereolen.dk/",control:{type:"text"}},patronPageHeaderText:{defaultValue:"Patron profile page",control:{type:"text"}},pauseReservationModalHeaderText:{defaultValue:"Pause reservations on physical items",control:{type:"text"}},pauseReservationModalBodyText:{defaultValue:"Pause your reservations early, since reservations that are already being processed, will not be paused.",control:{type:"text"}},pauseReservationModalCloseModalText:{defaultValue:"Close pause reservations modal",control:{type:"text"}},dateInputsStartDateLabelText:{defaultValue:"Start date",control:{type:"text"}},dateInputsEndDateLabelText:{defaultValue:"End date",control:{type:"text"}},pauseReservationModalBelowInputsTextText:{defaultValue:"",control:{type:"text"}},pauseReservationModalLinkText:{defaultValue:"Read more about pausing reservertions and what that means here",control:{type:"text"}},pauseReservationModalSaveButtonLabelText:{defaultValue:"Save",control:{type:"text"}},pauseReservationModalCancelButtonLabelText:{defaultValue:"Cancel pause",control:{type:"text"}},patronPageBasicDetailsHeaderText:{defaultValue:"Basic details",control:{type:"text"}},patronPageBasicDetailsNameLabelText:{defaultValue:"Name",control:{type:"text"}},patronPageBasicDetailsAddressLabelText:{defaultValue:"Address",control:{type:"text"}},patronContactInfoHeaderText:{defaultValue:"Contact information",control:{type:"text"}},patronContactInfoBodyText:{defaultValue:"",control:{type:"text"}},patronContactPhoneLabelText:{defaultValue:"Phone number",control:{type:"text"}},patronContactPhoneCheckboxText:{defaultValue:"Receive text messages about your loans, reservations, and so forth. This may cost money.",control:{type:"text"}},patronContactEmailLabelText:{defaultValue:"E-mail",control:{type:"text"}},patronContactEmailCheckboxText:{defaultValue:"Receive emails about your loans, reservations, and so forth",control:{type:"text"}},patronPageStatusSectionHeaderText:{defaultValue:"Digital loans (eReolen)",control:{type:"text"}},patronPageStatusSectionBodyText:{defaultValue:"There is a number of materials without limitation to amounts of loans per month.",control:{type:"text"}},patronPageStatusSectionLinkText:{defaultValue:"Click here, to see titles always eligible to be loaned",control:{type:"text"}},patronPageStatusSectionLoanHeaderText:{defaultValue:"Loans per month",control:{type:"text"}},patronPageStatusSectionLoansEbooksText:{defaultValue:"E-books",control:{type:"text"}},patronPageStatusSectionLoansAudioBooksText:{defaultValue:"Audiobooks",control:{type:"text"}},patronPageChangePickupHeaderText:{defaultValue:"Reservations",control:{type:"text"}},patronPageChangePickupBodyText:{defaultValue:"",control:{type:"text"}},pickupBranchesDropdownLabelText:{defaultValue:"Choose pickup branch",control:{type:"text"}},pickupBranchesDropdownNothingSelectedText:{defaultValue:"Nothing selected",control:{type:"text"}},patronPagePauseReservationsHeaderText:{defaultValue:"Pause physical reservations",control:{type:"text"}},patronPagePauseReservationsBodyText:{defaultValue:"",control:{type:"text"}},patronPageOpenPauseReservationsSectionText:{defaultValue:"Pause your reservations",control:{type:"text"}},patronPageOpenPauseReservationsSectionAriaText:{defaultValue:"This checkbox opens a modal where you can put your current reservations on a pause, when the time period picked has ended, the reservations will be resumed",control:{type:"text"}},patronPageChangePincodeHeaderText:{defaultValue:"Pincode",control:{type:"text"}},patronPageChangePincodeBodyText:{defaultValue:"Change current pin by entering a new pin and saving",control:{type:"text"}},patronPinSavedSuccessText:{defaultValue:"Pincode was saved",control:{type:"text"}},patronPagePincodeLabelText:{defaultValue:"New pin",control:{type:"text"}},patronPageConfirmPincodeLabelText:{defaultValue:"Confirm new pin",control:{type:"text"}},patronPagePincodeTooShortValidationText:{defaultValue:"The pincode should be minimum @pincodeLengthMin and maximum @pincodeLengthMax characters long",control:{type:"text"}},patronPagePincodesNotTheSameText:{defaultValue:"The pincodes are not the same",control:{type:"text"}},patronPageSaveButtonText:{defaultValue:"Save",control:{type:"text"}},patronPageDeleteProfileText:{defaultValue:"Do you wish to delete your library profile?",control:{type:"text"}},patronPageDeleteProfileLinkText:{defaultValue:"Delete your profile",control:{type:"text"}},patronPageStatusSectionReservationsText:{defaultValue:"You can reserve @countEbooks ebooks and @countAudiobooks audiobooks",control:{type:"text"}},patronPageStatusSectionOutOfText:{defaultValue:"@this out of @that",control:{type:"text"}},patronPageStatusSectionOutOfAriaLabelAudioBooksText:{defaultValue:"You used @this audiobooks out of you quota of @that audiobooks",control:{type:"text"}},patronPageStatusSectionOutOfAriaLabelEbooksText:{defaultValue:"You used @this ebooks out of you quota of @that ebooks",control:{type:"text"}},patronPagePhoneInputMessageText:{name:"Phone input validation message",defaultValue:"The phone number must be 6 to 15 characters in length and should be comprised solely of numbers or begin with a +",control:{type:"text"}},patronPageHandleResponseInformationText:{defaultValue:"Your changes are saved.",control:{type:"text"}},patronPageLoadingText:{name:"Loading",defaultValue:"Loading..",control:{type:"text"}}}},PatronPage_dev_PatronPageEntry=(props=>react.createElement(PatronPage_entry,props)).bind({});PatronPage_dev_PatronPageEntry.args={}},"./src/apps/patron-page/sections/PincodeSection.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_components_atoms_input_TextInput__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/components/atoms/input/TextInput.tsx"),_core_utils_config__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/core/utils/config.tsx"),_core_utils_text__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/core/utils/text.tsx");const PincodeSection=({changePincode,required})=>{const t=(0,_core_utils_text__WEBPACK_IMPORTED_MODULE_3__.X)(),config=(0,_core_utils_config__WEBPACK_IMPORTED_MODULE_2__.ZR)(),pincodeLengthMin=parseInt(config("pincodeLengthMinConfig"),10),pincodeLengthMax=parseInt(config("pincodeLengthMaxConfig"),10),[pincodeValidation,setPincodeValidation]=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(),[pincode,setPincode]=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(""),[confirmPincode,setConfirmPincode]=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)("");return(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)((()=>{if(changePincode(null),setPincodeValidation(""),pincode&&confirmPincode){if(pincode.length>pincodeLengthMax||pincode.lengthsetPincode(newPin),value:pincode,label:t("patronPagePincodeLabelText"),validation:pincodeValidation}),react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_atoms_input_TextInput__WEBPACK_IMPORTED_MODULE_1__.Z,{className:"patron__input patron__input--desktop",id:"pincode-confirm-input",pattern:"[0-9]*",required,inputmode:"numeric",type:"password",onChange:newPin=>setConfirmPincode(newPin),value:confirmPincode,label:t("patronPageConfirmPincodeLabelText")})))},__WEBPACK_DEFAULT_EXPORT__=PincodeSection;try{PincodeSection.displayName="PincodeSection",PincodeSection.__docgenInfo={description:"",displayName:"PincodeSection",props:{changePincode:{defaultValue:null,description:"",name:"changePincode",required:!0,type:{name:"(newPin: string | null) => void"}},required:{defaultValue:null,description:"",name:"required",required:!0,type:{name:"boolean"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/patron-page/sections/PincodeSection.tsx#PincodeSection"]={docgenInfo:PincodeSection.__docgenInfo,name:"PincodeSection",path:"src/apps/patron-page/sections/PincodeSection.tsx#PincodeSection"})}catch(__react_docgen_typescript_loader_error){}},"./src/apps/patron-page/util/BranchesDropdown.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_danskernesdigitalebibliotek_dpl_design_system_build_icons_collection_ExpandMore_svg__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/ExpandMore.svg"),_danskernesdigitalebibliotek_dpl_design_system_build_icons_collection_ExpandMore_svg__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(_danskernesdigitalebibliotek_dpl_design_system_build_icons_collection_ExpandMore_svg__WEBPACK_IMPORTED_MODULE_1__),_core_utils_branches__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/core/utils/branches.tsx"),_core_utils_text__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/core/utils/text.tsx");const BranchesDropdown=({selected,onChange,classNames})=>{const t=(0,_core_utils_text__WEBPACK_IMPORTED_MODULE_3__.X)(),branches=(0,_core_utils_branches__WEBPACK_IMPORTED_MODULE_2__.mc)("blacklistedPickupBranchesConfig");return react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment,null,react__WEBPACK_IMPORTED_MODULE_0__.createElement("label",{htmlFor:"branches-dropdown",className:"text-body-medium-medium mt-32 mb-8"},t("pickupBranchesDropdownLabelText")),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:`dropdown mb-32 mt-4 ${classNames||""}`},branches&&react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment,null,react__WEBPACK_IMPORTED_MODULE_0__.createElement("select",{required:!0,id:"branches-dropdown",onChange:({target})=>onChange(target.value),className:"dropdown__select"},""===selected&&react__WEBPACK_IMPORTED_MODULE_0__.createElement("option",{value:"",className:"dropdown__option",selected:""===selected,disabled:!0},t("pickupBranchesDropdownNothingSelectedText")),branches.map((({branchId,title})=>react__WEBPACK_IMPORTED_MODULE_0__.createElement("option",{value:branchId,selected:selected===branchId,className:"dropdown__option"},title)))),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"dropdown__arrows"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("img",{className:"dropdown__arrow",src:_danskernesdigitalebibliotek_dpl_design_system_build_icons_collection_ExpandMore_svg__WEBPACK_IMPORTED_MODULE_1___default(),alt:""})))))},__WEBPACK_DEFAULT_EXPORT__=BranchesDropdown;try{BranchesDropdown.displayName="BranchesDropdown",BranchesDropdown.__docgenInfo={description:"",displayName:"BranchesDropdown",props:{selected:{defaultValue:null,description:"",name:"selected",required:!0,type:{name:"string"}},classNames:{defaultValue:null,description:"",name:"classNames",required:!1,type:{name:"string | undefined"}},onChange:{defaultValue:null,description:"",name:"onChange",required:!0,type:{name:"(value: string) => void"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/patron-page/util/BranchesDropdown.tsx#BranchesDropdown"]={docgenInfo:BranchesDropdown.__docgenInfo,name:"BranchesDropdown",path:"src/apps/patron-page/util/BranchesDropdown.tsx#BranchesDropdown"})}catch(__react_docgen_typescript_loader_error){}},"./src/apps/recommender/Recommender.dev.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{RecommenderEntry:()=>Recommender_dev_RecommenderEntry,default:()=>Recommender_dev});var react=__webpack_require__("./node_modules/react/index.js"),serviceUrlArgs=__webpack_require__("./src/core/storybook/serviceUrlArgs.ts"),general=__webpack_require__("./src/core/utils/helpers/general.ts"),graphql=__webpack_require__("./src/core/dbc-gateway/generated/graphql.tsx"),utils_config=__webpack_require__("./src/core/utils/config.tsx"),utils_text=__webpack_require__("./src/core/utils/text.tsx"),SimpleMaterial=__webpack_require__("./src/components/simple-material/SimpleMaterial.tsx");const InspirationRecommender=()=>{const t=(0,utils_text.X)(),defaultSearchFromConfig=(0,utils_config.ZR)()("emptyRecommenderSearchConfig"),{inspiration:inspirationLimit}=(0,general.US)(),[recommendedMaterials,setRecommendedMaterials]=(0,react.useState)(null),{data}=(0,graphql.OX)({limit:inspirationLimit,q:{all:defaultSearchFromConfig},offset:0});return(0,react.useEffect)((()=>{data&&setRecommendedMaterials(data)}),[data]),null===recommendedMaterials?null:react.createElement(react.Fragment,null,react.createElement("h2",{className:"recommender__title text-header-h1"},t("recommenderTitleInspirationText")),react.createElement("ul",{className:"recommender__grid"},recommendedMaterials&&recommendedMaterials.search.works.map((work=>react.createElement(SimpleMaterial.Z,{app:"inspiration-recommender",work})))))},recommender_InspirationRecommender=InspirationRecommender;try{InspirationRecommender.displayName="InspirationRecommender",InspirationRecommender.__docgenInfo={description:"",displayName:"InspirationRecommender",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/recommender/InspirationRecommender.tsx#InspirationRecommender"]={docgenInfo:InspirationRecommender.__docgenInfo,name:"InspirationRecommender",path:"src/apps/recommender/InspirationRecommender.tsx#InspirationRecommender"})}catch(__react_docgen_typescript_loader_error){}var material_fetch_hoc=__webpack_require__("./src/apps/loan-list/materials/utils/material-fetch-hoc.tsx");const RecommendList=({material,loanOrReservationFaust,titleKey})=>{const t=(0,utils_text.X)(),{recommender:recommenderLimit}=(0,general.US)(),{data}=(0,graphql.GN)({faust:loanOrReservationFaust,limit:recommenderLimit}),[recommendedMaterials,setRecommendedMaterials]=(0,react.useState)(null);return(0,react.useEffect)((()=>{data&&setRecommendedMaterials(data)}),[data]),react.createElement(react.Fragment,null,material&&material.title&&react.createElement("h2",{className:"recommender__title text-header-h1"},t(titleKey,{placeholders:{"@title":material.title}})),react.createElement("ul",{className:"recommender__triple-grid"},recommendedMaterials&&recommendedMaterials.recommend.result.map((({work})=>react.createElement(SimpleMaterial.Z,{work,app:"recommender"})))))},recommender_RecommendList=(0,__webpack_require__("./src/apps/loan-list/materials/utils/digital-material-fetch-hoc.tsx").Z)((0,material_fetch_hoc.Z)(RecommendList));try{RecommendList.displayName="RecommendList",RecommendList.__docgenInfo={description:"",displayName:"RecommendList",props:{loanOrReservationFaust:{defaultValue:null,description:"",name:"loanOrReservationFaust",required:!0,type:{name:"`${number}`"}},titleKey:{defaultValue:null,description:"",name:"titleKey",required:!0,type:{name:"enum",value:[{value:'"recommenderTitleLoansText"'},{value:'"recommenderTitleReservationsText"'}]}},digitalMaterial:{defaultValue:null,description:"",name:"digitalMaterial",required:!1,type:{name:"Product | null | undefined"}},item:{defaultValue:null,description:"",name:"item",required:!1,type:{name:"Nullable>"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/recommender/RecommendList.tsx#RecommendList"]={docgenInfo:RecommendList.__docgenInfo,name:"RecommendList",path:"src/apps/recommender/RecommendList.tsx#RecommendList"})}catch(__react_docgen_typescript_loader_error){}var useReservations=__webpack_require__("./src/core/utils/useReservations.tsx"),useLoans=__webpack_require__("./src/core/utils/useLoans.tsx");const Recommender=()=>{const[loanForRecommender,setLoanForRecommender]=(0,react.useState)(null),[reservationForRecommender,setReservationForRecommender]=(0,react.useState)(null),{fbs:{loans:physicalLoans,isLoading:fbsLoansLoading}}=(0,useLoans.Z)(),{fbs:{reservations:physicalReservations,isLoading:fbsReservationsLoading}}=(0,useReservations.Z)();(0,react.useEffect)((()=>{if(null!==physicalLoans){const newestLoan=(0,general.sC)(physicalLoans).reverse();newestLoan.length>0&&setLoanForRecommender(newestLoan[0])}if(null!==physicalReservations){const newestReservation=(0,general.oO)(physicalReservations).reverse();newestReservation.length>0&&setReservationForRecommender(newestReservation[0])}}),[physicalLoans,physicalReservations,setLoanForRecommender]);const stillLoading=fbsReservationsLoading||fbsLoansLoading;return react.createElement("div",{className:"recommender recommender--padding-desktop recommender--triple-desktop"},loanForRecommender&&loanForRecommender.faust&&react.createElement(recommender_RecommendList,{titleKey:"recommenderTitleLoansText",item:loanForRecommender,loanOrReservationFaust:loanForRecommender.faust}),!loanForRecommender&&reservationForRecommender&&reservationForRecommender.faust&&react.createElement(recommender_RecommendList,{titleKey:"recommenderTitleReservationsText",item:reservationForRecommender,loanOrReservationFaust:reservationForRecommender.faust}),!loanForRecommender&&!reservationForRecommender&&!stillLoading&&react.createElement(recommender_InspirationRecommender,null))},recommender_Recommender=Recommender;try{Recommender.displayName="Recommender",Recommender.__docgenInfo={description:"",displayName:"Recommender",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/recommender/Recommender.tsx#Recommender"]={docgenInfo:Recommender.__docgenInfo,name:"Recommender",path:"src/apps/recommender/Recommender.tsx#Recommender"})}catch(__react_docgen_typescript_loader_error){}var url=__webpack_require__("./src/core/utils/url.tsx"),guarded_app=__webpack_require__("./src/components/guarded-app.tsx");const Recommender_entry=(0,url.XL)((0,utils_config.Rh)((0,utils_text.z)((()=>react.createElement(guarded_app.Z,{app:"recommender"},react.createElement(recommender_Recommender,null))))));try{Recommenderentry.displayName="Recommenderentry",Recommenderentry.__docgenInfo={description:"",displayName:"Recommenderentry",props:{q:{defaultValue:null,description:"",name:"q",required:!1,type:{name:"string | undefined"}},pageSizeDesktop:{defaultValue:null,description:"",name:"pageSizeDesktop",required:!1,type:{name:"number | undefined"}},pageSizeMobile:{defaultValue:null,description:"",name:"pageSizeMobile",required:!1,type:{name:"number | undefined"}},materialUrl:{defaultValue:null,description:"",name:"materialUrl",required:!0,type:{name:"string"}},searchUrl:{defaultValue:null,description:"",name:"searchUrl",required:!0,type:{name:"string"}},advancedSearchUrl:{defaultValue:null,description:"",name:"advancedSearchUrl",required:!0,type:{name:"string"}},fbsBaseUrl:{defaultValue:null,description:"",name:"fbsBaseUrl",required:!0,type:{name:"string"}},loanListEreolenUrl:{defaultValue:null,description:"",name:"loanListEreolenUrl",required:!0,type:{name:"string"}},feesPageUrl:{defaultValue:null,description:"",name:"feesPageUrl",required:!0,type:{name:"string"}},publizonBaseUrl:{defaultValue:null,description:"",name:"publizonBaseUrl",required:!0,type:{name:"string"}},dplCmsBaseUrl:{defaultValue:null,description:"",name:"dplCmsBaseUrl",required:!0,type:{name:"string"}},coverBaseUrl:{defaultValue:null,description:"",name:"coverBaseUrl",required:!0,type:{name:"string"}},materialBaseUrl:{defaultValue:null,description:"",name:"materialBaseUrl",required:!0,type:{name:"string"}},fbiBaseUrl:{defaultValue:null,description:"",name:"fbiBaseUrl",required:!0,type:{name:"string"}},authUrl:{defaultValue:null,description:"",name:"authUrl",required:!0,type:{name:"string"}},ereolenHomepageUrl:{defaultValue:null,description:"",name:"ereolenHomepageUrl",required:!0,type:{name:"string"}},emptyRecommenderSearchConfig:{defaultValue:null,description:"",name:"emptyRecommenderSearchConfig",required:!0,type:{name:"string"}},recommenderTitleLoansText:{defaultValue:null,description:"",name:"recommenderTitleLoansText",required:!0,type:{name:"string"}},recommenderTitleReservationsText:{defaultValue:null,description:"",name:"recommenderTitleReservationsText",required:!0,type:{name:"string"}},materialByAuthorText:{defaultValue:null,description:"",name:"materialByAuthorText",required:!0,type:{name:"string"}},materialAndAuthorText:{defaultValue:null,description:"",name:"materialAndAuthorText",required:!0,type:{name:"string"}},etAlText:{defaultValue:null,description:"",name:"etAlText",required:!0,type:{name:"string"}},recommenderTitleInspirationText:{defaultValue:null,description:"",name:"recommenderTitleInspirationText",required:!0,type:{name:"string"}},addToFavoritesAriaLabelText:{defaultValue:null,description:"",name:"addToFavoritesAriaLabelText",required:!0,type:{name:"string"}},removeFromFavoritesAriaLabelText:{defaultValue:null,description:"",name:"removeFromFavoritesAriaLabelText",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/recommender/Recommender.entry.tsx#Recommenderentry"]={docgenInfo:Recommenderentry.__docgenInfo,name:"Recommenderentry",path:"src/apps/recommender/Recommender.entry.tsx#Recommenderentry"})}catch(__react_docgen_typescript_loader_error){}const Recommender_dev={title:"Apps / Recommender",component:Recommender_entry,argTypes:{...serviceUrlArgs.Z,emptyRecommenderSearchConfig:{defaultValue:"Mimbo jimbo",control:{type:"text"}},recommenderTitleLoansText:{control:{type:"text"},defaultValue:"Because you have borrowed @title you may also like"},recommenderTitleReservationsText:{control:{type:"text"},defaultValue:"Because you have reserved @title you may also like"},materialByAuthorText:{control:{type:"text"},defaultValue:"By"},materialAndAuthorText:{control:{type:"text"},defaultValue:"and"},etAlText:{control:{type:"text"},defaultValue:"et al."},recommenderTitleInspirationText:{control:{type:"text"},defaultValue:"For your inspiration"},addToFavoritesAriaLabelText:{control:{type:"text"},defaultValue:"Add @title to favorites list"},removeFromFavoritesAriaLabelText:{control:{type:"text"},defaultValue:"Remove @title from favorites list"},materialUrl:{defaultValue:"/work/:workid",control:{type:"text"}}}},Recommender_dev_RecommenderEntry=(props=>react.createElement(Recommender_entry,props)).bind({});Recommender_dev_RecommenderEntry.args={}},"./src/apps/reservation-list/list/reservation-list.dev.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{ReservationListDigitalDetailsModal:()=>ReservationListDigitalDetailsModal,ReservationListEntry:()=>reservation_list_dev_ReservationListEntry,ReservationListPauseModal:()=>ReservationListPauseModal,ReservationListPhysicalDetailsModal:()=>ReservationListPhysicalDetailsModal,default:()=>reservation_list_dev});var react=__webpack_require__("./node_modules/react/index.js"),esm=__webpack_require__("./node_modules/@storybook/addon-queryparams/dist/esm/index.js"),es=(__webpack_require__("./node_modules/core-js/modules/esnext.string.at.js"),__webpack_require__("./node_modules/react-redux/es/index.js")),useDeepCompareEffect=__webpack_require__("./node_modules/react-use/esm/useDeepCompareEffect.js"),utils_text=__webpack_require__("./src/core/utils/text.tsx"),reservation_type=__webpack_require__("./src/core/utils/types/reservation-type.ts"),general=__webpack_require__("./src/core/utils/helpers/general.ts"),Reservations=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/Reservations.svg"),Reservations_default=__webpack_require__.n(Reservations),modal=__webpack_require__("./src/core/utils/modal.tsx"),date=__webpack_require__("./src/core/utils/helpers/date.ts"),modal_helpers=__webpack_require__("./src/core/utils/helpers/modal-helpers.ts");const reservation_pause_toggler=({user})=>{const t=(0,utils_text.X)(),{open}=(0,modal.f)(),{pauseReservation}=(0,modal_helpers.GM)(),[onHoldDates,setOnHoldDates]=(0,react.useState)();return(0,react.useEffect)((()=>{user&&user.onHold&&user.onHold.from&&user.onHold.to?setOnHoldDates(`${(0,date.p6)(user.onHold.from)} - ${(0,date.p6)(user.onHold.to)}`):user&&null===user.onHold&&setOnHoldDates("")}),[user]),react.createElement("div",{className:"dpl-pause-reservation-component m-32"},react.createElement("div",{className:"dpl-pause-reservation-component__pagefold"}),react.createElement("div",{className:"dpl-pause-reservation-component__flex"},react.createElement("div",{className:"dpl-pause-reservation-component__flex__reservation-icon"},react.createElement("img",{src:Reservations_default(),alt:""})),react.createElement("div",{className:"dpl-pause-reservation-component__flex__text"},t(onHoldDates?"reservationListPauseReservationOnHoldText":"reservationListPauseReservationText")),onHoldDates&&react.createElement("span",{"aria-label":t("reservationListOnHoldAriaText"),className:"dpl-pause-reservation-component__flex__badge"},onHoldDates),react.createElement("div",{className:"dpl-pause-reservation-component__flex__button"},react.createElement("button",{"aria-label":t("reservationListPauseReservationAriaModalText"),type:"button",onClick:()=>{open(pauseReservation)},className:"btn-primary btn-filled btn-small"},t("reservationListPauseReservationButtonText")))))};try{reservationpausetoggler.displayName="reservationpausetoggler",reservationpausetoggler.__docgenInfo={description:"",displayName:"reservationpausetoggler",props:{user:{defaultValue:null,description:"",name:"user",required:!0,type:{name:"PatronV5"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/reservation-list/list/reservation-pause-toggler.tsx#reservationpausetoggler"]={docgenInfo:reservationpausetoggler.__docgenInfo,name:"reservationpausetoggler",path:"src/apps/reservation-list/list/reservation-pause-toggler.tsx#reservationpausetoggler"})}catch(__react_docgen_typescript_loader_error){}var empty_list=__webpack_require__("./src/components/empty-list/empty-list.tsx");const EmptyReservations=()=>{const t=(0,utils_text.X)();return react.createElement("div",{className:"list-reservation-container m-32"},react.createElement(empty_list.Z,{classNames:"mt-24",emptyListText:t("reservationListAllEmptyText")}))},list_EmptyReservations=EmptyReservations;try{EmptyReservations.displayName="EmptyReservations",EmptyReservations.__docgenInfo={description:"",displayName:"EmptyReservations",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/reservation-list/list/EmptyReservations.tsx#EmptyReservations"]={docgenInfo:EmptyReservations.__docgenInfo,name:"EmptyReservations",path:"src/apps/reservation-list/list/EmptyReservations.tsx#EmptyReservations"})}catch(__react_docgen_typescript_loader_error){}var pause_reservation=__webpack_require__("./src/apps/reservation-list/modal/pause-reservation/pause-reservation.tsx"),delete_reservation_modal=__webpack_require__("./src/apps/reservation-list/modal/delete-reservation/delete-reservation-modal.tsx"),use_pager=__webpack_require__("./src/components/result-pager/use-pager.tsx"),material_fetch_hoc=__webpack_require__("./src/apps/loan-list/materials/utils/material-fetch-hoc.tsx"),digital_material_fetch_hoc=__webpack_require__("./src/apps/loan-list/materials/utils/digital-material-fetch-hoc.tsx"),material_info=__webpack_require__("./src/apps/loan-list/materials/stackable-material/material-info.tsx"),reservation_info=__webpack_require__("./src/apps/reservation-list/reservation-material/reservation-info.tsx"),card_list_item_skeleton=__webpack_require__("./src/components/card-item-list/card-list-item/card-list-item-skeleton.tsx");const reservation_material=(0,digital_material_fetch_hoc.Z)((0,material_fetch_hoc.Z)((({material,reservation,focused,openReservationDetailsModal,identifier})=>{const openDetailsModal=()=>{openReservationDetailsModal(reservation)},isDigital=!!identifier;return react.createElement("li",null,react.createElement("div",{className:"list-reservation my-32 cursor-pointer",role:"button",onClick:()=>openDetailsModal(),onKeyUp:e=>{"Enter"!==e.key&&"Space"!==e.key||openDetailsModal()},tabIndex:0},material&&react.createElement(material_info.Z,{arrowLabelledBy:`${reservation.identifier||reservation.faust}-title`,focused,openDetailsModal,periodical:reservation.periodical,material,isbnForCover:reservation.identifier||""}),react.createElement(reservation_info.Z,{reservationInfo:reservation,openReservationDetailsModal,isDigital})))}),(()=>react.createElement("li",null,react.createElement("div",{className:"my-32"},react.createElement(card_list_item_skeleton.Z,null))))));try{reservationmaterial.displayName="reservationmaterial",reservationmaterial.__docgenInfo={description:"",displayName:"reservationmaterial",props:{reservation:{defaultValue:null,description:"",name:"reservation",required:!0,type:{name:"Nullable>"}},focused:{defaultValue:null,description:"",name:"focused",required:!0,type:{name:"boolean"}},openReservationDetailsModal:{defaultValue:null,description:"",name:"openReservationDetailsModal",required:!0,type:{name:"(reservation: Nullable>) => void"}},identifier:{defaultValue:null,description:"",name:"identifier",required:!1,type:{name:"string | null | undefined"}},digitalMaterial:{defaultValue:null,description:"",name:"digitalMaterial",required:!1,type:{name:"Product | null | undefined"}},item:{defaultValue:null,description:"",name:"item",required:!1,type:{name:"Nullable>"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/reservation-list/reservation-material/reservation-material.tsx#reservationmaterial"]={docgenInfo:reservationmaterial.__docgenInfo,name:"reservationmaterial",path:"src/apps/reservation-list/reservation-material/reservation-material.tsx#reservationmaterial"})}catch(__react_docgen_typescript_loader_error){}const list_list=({reservations,header,pageSize,emptyListDataCy,emptyListLabel,openReservationDetailsModal})=>{const[dataReady,setDataReady]=(0,react.useState)(!1),[displayedReservations,setDisplayedReservations]=(0,react.useState)([]),{itemsShown,PagerComponent,firstInNewPage}=(0,use_pager.Z)({hitcount:reservations.length,pageSize});return(0,useDeepCompareEffect.Z)((()=>{reservations&&(setDisplayedReservations((0,general.qZ)(reservations,itemsShown)),setDataReady(!0))}),[itemsShown,reservations]),dataReady?react.createElement("div",null,displayedReservations.length>0?react.createElement(react.Fragment,null,react.createElement("div",{className:"dpl-list-buttons m-32"},react.createElement("h2",{"data-cy":"reservation-list-header",className:"dpl-list-buttons__header"},react.createElement(react.Fragment,null,header,react.createElement("div",{className:"dpl-list-buttons__power"},reservations.length)))),react.createElement("div",{"data-cy":"list-reservation-container"},react.createElement("ul",{className:"list-reservation-container"},displayedReservations.map(((reservation,i)=>react.createElement(reservation_material,{focused:firstInNewPage===i,openReservationDetailsModal,key:(0,reservation_type._p)(reservation),item:reservation,reservation})))),react.createElement(PagerComponent,null))):react.createElement("div",null,react.createElement("div",{className:"dpl-list-buttons m-32"},react.createElement("h2",{className:"dpl-list-buttons__header"},react.createElement(react.Fragment,null,header,react.createElement("div",{className:"dpl-list-buttons__power"},"0")))),react.createElement("div",{className:"list-reservation-container"},react.createElement(empty_list.Z,{classNames:"mt-24",dataCy:emptyListDataCy,emptyListText:emptyListLabel})))):react.createElement("div",null)};try{list.displayName="list",list.__docgenInfo={description:"",displayName:"list",props:{reservations:{defaultValue:null,description:"",name:"reservations",required:!0,type:{name:"Nullable>[]"}},header:{defaultValue:null,description:"",name:"header",required:!0,type:{name:"string"}},emptyListDataCy:{defaultValue:null,description:"",name:"emptyListDataCy",required:!0,type:{name:"string"}},emptyListLabel:{defaultValue:null,description:"",name:"emptyListLabel",required:!0,type:{name:"string"}},pageSize:{defaultValue:null,description:"",name:"pageSize",required:!0,type:{name:"number"}},openReservationDetailsModal:{defaultValue:null,description:"",name:"openReservationDetailsModal",required:!0,type:{name:"(reservation: Nullable>) => void"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/reservation-list/list/list.tsx#list"]={docgenInfo:list.__docgenInfo,name:"list",path:"src/apps/reservation-list/list/list.tsx#list"})}catch(__react_docgen_typescript_loader_error){}var helpers=__webpack_require__("./src/apps/reservation-list/utils/helpers.ts"),useReservations=__webpack_require__("./src/core/utils/useReservations.tsx");const DisplayedReservations=({pageSize,openReservationDetailsModal})=>{const t=(0,utils_text.X)(),{all:{readyToLoan:readyToLoanReservations},fbs:{queued:reservedReservationsFBS},publizon:{queued:reservedReservationsPublizon}}=(0,useReservations.Z)();return react.createElement(react.Fragment,null,react.createElement(list_list,{openReservationDetailsModal,pageSize,header:t("reservationListReadyForPickupTitleText"),reservations:(0,helpers.TM)(readyToLoanReservations),emptyListDataCy:"reservation-list-ready-for-pickup-empty-list",emptyListLabel:t("reservationListReadyForPickupEmptyText")}),react.createElement(list_list,{openReservationDetailsModal,pageSize,header:t("reservationListPhysicalReservationsHeaderText"),reservations:(0,helpers.cf)(reservedReservationsFBS),emptyListDataCy:"reservation-list-physical-reservations-empty-list",emptyListLabel:t("reservationListPhysicalReservationsEmptyText")}),react.createElement(list_list,{openReservationDetailsModal,pageSize,header:t("reservationListDigitalReservationsHeaderText"),emptyListDataCy:"reservation-list-digital-reservations-empty-list",reservations:(0,helpers.TM)(reservedReservationsPublizon),emptyListLabel:t("reservationListDigitalReservationsEmptyText")}))},list_DisplayedReservations=DisplayedReservations;try{DisplayedReservations.displayName="DisplayedReservations",DisplayedReservations.__docgenInfo={description:"",displayName:"DisplayedReservations",props:{pageSize:{defaultValue:null,description:"",name:"pageSize",required:!0,type:{name:"number"}},openReservationDetailsModal:{defaultValue:null,description:"",name:"openReservationDetailsModal",required:!0,type:{name:"(reservation: Nullable>) => void"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/reservation-list/list/DisplayedReservations.tsx#DisplayedReservations"]={docgenInfo:DisplayedReservations.__docgenInfo,name:"DisplayedReservations",path:"src/apps/reservation-list/list/DisplayedReservations.tsx#DisplayedReservations"})}catch(__react_docgen_typescript_loader_error){}var material_details_modal=__webpack_require__("./src/apps/loan-list/modal/material-details-modal.tsx"),reservation_details=__webpack_require__("./src/apps/reservation-list/modal/reservation-details/reservation-details.tsx"),url=__webpack_require__("./src/core/utils/helpers/url.ts"),user=__webpack_require__("./src/core/utils/helpers/user.ts");const reservation_list=({pageSize})=>{const t=(0,utils_text.X)(),{modalIds}=(0,es.v9)((s=>s.modal)),{open}=(0,modal.f)(),{pauseReservation,deleteReservation,reservationDetails}=(0,modal_helpers.GM)(),[reservationWithDetails,setReservationWithDetails]=(0,react.useState)(null),[reservationToDelete,setReservationToDelete]=(0,react.useState)(null),{data:userData}=(0,user.dp)(),{all:{reservations:allReservations,isLoading}}=(0,useReservations.Z)(),allListsEmpty=0===allReservations.length&&isLoading;return(0,useDeepCompareEffect.Z)((()=>{const modalUrlParam=(0,url.wo)("modal"),resDetails=reservationDetails;if(modalUrlParam&&modalUrlParam.includes(resDetails)){const queryReservationId=(0,modal_helpers.FV)(modalUrlParam,resDetails);if(queryReservationId&&allReservations){const reservationFromQuery=allReservations.filter((reservation=>(0,reservation_type._p)(reservation)===queryReservationId)).at(0);reservationFromQuery&&setReservationWithDetails(reservationFromQuery)}}const deleteRes=deleteReservation;if(modalUrlParam&&modalUrlParam.includes(deleteRes)){const queryReservationId=(0,modal_helpers.FV)(modalUrlParam,deleteRes);if(queryReservationId&&allReservations){const reservationFromQuery=allReservations.filter((reservation=>(0,reservation_type._p)(reservation)===queryReservationId)).at(0);reservationFromQuery&&setReservationWithDetails(reservationFromQuery)}}}),[allReservations,reservationDetails,deleteReservation]),react.createElement(react.Fragment,null,react.createElement("div",{className:`reservation-list-page ${(0,general.Do)(modalIds)}`},react.createElement("h1",{className:"text-header-h1 m-32"},t("reservationListHeaderText")),(null==userData?void 0:userData.patron)&&react.createElement(reservation_pause_toggler,{user:userData.patron}),allListsEmpty&&react.createElement(list_EmptyReservations,null),!allListsEmpty&&react.createElement(list_DisplayedReservations,{openReservationDetailsModal:reservationForModal=>{setReservationWithDetails(reservationForModal),open((0,material_details_modal.Wu)(reservationForModal))},pageSize})),(null==userData?void 0:userData.patron)&&react.createElement(pause_reservation.Z,{user:null==userData?void 0:userData.patron,id:pauseReservation}),reservationToDelete&&react.createElement(delete_reservation_modal.Z,{modalId:(0,delete_reservation_modal._)(reservationToDelete),reservations:[reservationToDelete]}),reservationWithDetails&&react.createElement(material_details_modal.ZP,{modalId:(0,material_details_modal.Wu)(reservationWithDetails)},react.createElement(reservation_details.Z,{openReservationDeleteModal:reservationForModal=>{setReservationToDelete(reservationForModal),open((0,delete_reservation_modal._)(reservationForModal))},item:reservationWithDetails,reservation:reservationWithDetails})))};try{reservationlist.displayName="reservationlist",reservationlist.__docgenInfo={description:"",displayName:"reservationlist",props:{pageSize:{defaultValue:null,description:"",name:"pageSize",required:!0,type:{name:"number"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/reservation-list/list/reservation-list.tsx#reservationlist"]={docgenInfo:reservationlist.__docgenInfo,name:"reservationlist",path:"src/apps/reservation-list/list/reservation-list.tsx#reservationlist"})}catch(__react_docgen_typescript_loader_error){}var utils_url=__webpack_require__("./src/core/utils/url.tsx"),config=__webpack_require__("./src/core/utils/config.tsx"),withIsPatronBlockedHoc=__webpack_require__("./src/core/utils/withIsPatronBlockedHoc.tsx");const reservation_list_entry=(0,config.Rh)((0,utils_url.XL)((0,utils_text.z)((0,withIsPatronBlockedHoc.Z)((({pageSizeDesktop,pageSizeMobile})=>{const pageSize=(0,general.Rh)({desktop:pageSizeDesktop,mobile:pageSizeMobile},"pageSizeReservationList");return react.createElement(reservation_list,{pageSize})})))));try{reservationlistentry.displayName="reservationlistentry",reservationlistentry.__docgenInfo={description:"",displayName:"reservationlistentry",props:{pageSizeDesktop:{defaultValue:null,description:"",name:"pageSizeDesktop",required:!1,type:{name:"number | undefined"}},pageSizeMobile:{defaultValue:null,description:"",name:"pageSizeMobile",required:!1,type:{name:"number | undefined"}},reservationListHeaderText:{defaultValue:null,description:"",name:"reservationListHeaderText",required:!0,type:{name:"string"}},physicalLoansTitleText:{defaultValue:null,description:"",name:"physicalLoansTitleText",required:!0,type:{name:"string"}},reservationListReadyText:{defaultValue:null,description:"",name:"reservationListReadyText",required:!0,type:{name:"string"}},materialByAuthorText:{defaultValue:null,description:"",name:"materialByAuthorText",required:!0,type:{name:"string"}},materialAndAuthorText:{defaultValue:null,description:"",name:"materialAndAuthorText",required:!0,type:{name:"string"}},reservationDetailsExpiresText:{defaultValue:null,description:"",name:"reservationDetailsExpiresText",required:!0,type:{name:"string"}},etAlText:{defaultValue:null,description:"",name:"etAlText",required:!0,type:{name:"string"}},reservationListNumberInQueueText:{defaultValue:null,description:"",name:"reservationListNumberInQueueText",required:!0,type:{name:"string"}},reservationListFirstInQueueText:{defaultValue:null,description:"",name:"reservationListFirstInQueueText",required:!0,type:{name:"string"}},reservationListDigitalPickupText:{defaultValue:null,description:"",name:"reservationListDigitalPickupText",required:!0,type:{name:"string"}},expiresSoonText:{defaultValue:null,description:"",name:"expiresSoonText",required:!0,type:{name:"string"}},reservationListInQueueText:{defaultValue:null,description:"",name:"reservationListInQueueText",required:!0,type:{name:"string"}},reservationPickUpLatestText:{defaultValue:null,description:"",name:"reservationPickUpLatestText",required:!0,type:{name:"string"}},publizonEbookText:{defaultValue:null,description:"",name:"publizonEbookText",required:!0,type:{name:"string"}},publizonAudioBookText:{defaultValue:null,description:"",name:"publizonAudioBookText",required:!0,type:{name:"string"}},publizonPodcastText:{defaultValue:null,description:"",name:"publizonPodcastText",required:!0,type:{name:"string"}},reservationListLoanBeforeText:{defaultValue:null,description:"",name:"reservationListLoanBeforeText",required:!0,type:{name:"string"}},reservationListDaysText:{defaultValue:null,description:"",name:"reservationListDaysText",required:!0,type:{name:"string"}},reservationListDayText:{defaultValue:null,description:"",name:"reservationListDayText",required:!0,type:{name:"string"}},reservationListAvailableInText:{defaultValue:null,description:"",name:"reservationListAvailableInText",required:!0,type:{name:"string"}},reservationDetailsExpiresTitleText:{defaultValue:null,description:"",name:"reservationDetailsExpiresTitleText",required:!0,type:{name:"string"}},reservationDetailsOthersInQueueText:{defaultValue:null,description:"",name:"reservationDetailsOthersInQueueText",required:!0,type:{name:"string"}},reservationListPauseReservationButtonText:{defaultValue:null,description:"",name:"reservationListPauseReservationButtonText",required:!0,type:{name:"string"}},reservationListPauseReservationText:{defaultValue:null,description:"",name:"reservationListPauseReservationText",required:!0,type:{name:"string"}},reservationListPauseReservationOnHoldText:{defaultValue:null,description:"",name:"reservationListPauseReservationOnHoldText",required:!0,type:{name:"string"}},reservationListOnHoldAriaText:{defaultValue:null,description:"",name:"reservationListOnHoldAriaText",required:!0,type:{name:"string"}},reservationListPauseReservationAriaModalText:{defaultValue:null,description:"",name:"reservationListPauseReservationAriaModalText",required:!0,type:{name:"string"}},pauseReservationModalAriaDescriptionText:{defaultValue:null,description:"",name:"pauseReservationModalAriaDescriptionText",required:!0,type:{name:"string"}},pauseReservationModalHeaderText:{defaultValue:null,description:"",name:"pauseReservationModalHeaderText",required:!0,type:{name:"string"}},pauseReservationModalBodyText:{defaultValue:null,description:"",name:"pauseReservationModalBodyText",required:!0,type:{name:"string"}},pauseReservationModalCloseModalText:{defaultValue:null,description:"",name:"pauseReservationModalCloseModalText",required:!0,type:{name:"string"}},dateInputsStartDateLabelText:{defaultValue:null,description:"",name:"dateInputsStartDateLabelText",required:!0,type:{name:"string"}},dateInputsEndDateLabelText:{defaultValue:null,description:"",name:"dateInputsEndDateLabelText",required:!0,type:{name:"string"}},pauseReservationModalBelowInputsTextText:{defaultValue:null,description:"",name:"pauseReservationModalBelowInputsTextText",required:!0,type:{name:"string"}},pauseReservationModalLinkText:{defaultValue:null,description:"",name:"pauseReservationModalLinkText",required:!0,type:{name:"string"}},pauseReservationModalSaveButtonLabelText:{defaultValue:null,description:"",name:"pauseReservationModalSaveButtonLabelText",required:!0,type:{name:"string"}},pauseReservationModalCancelButtonLabelText:{defaultValue:null,description:"",name:"pauseReservationModalCancelButtonLabelText",required:!0,type:{name:"string"}},reservationListReadyForPickupTitleText:{defaultValue:null,description:"",name:"reservationListReadyForPickupTitleText",required:!0,type:{name:"string"}},reservationListReadyForPickupEmptyText:{defaultValue:null,description:"",name:"reservationListReadyForPickupEmptyText",required:!0,type:{name:"string"}},reservationListPhysicalReservationsEmptyText:{defaultValue:null,description:"",name:"reservationListPhysicalReservationsEmptyText",required:!0,type:{name:"string"}},reservationListPhysicalReservationsHeaderText:{defaultValue:null,description:"",name:"reservationListPhysicalReservationsHeaderText",required:!0,type:{name:"string"}},reservationListDigitalReservationsEmptyText:{defaultValue:null,description:"",name:"reservationListDigitalReservationsEmptyText",required:!0,type:{name:"string"}},reservationListDigitalReservationsHeaderText:{defaultValue:null,description:"",name:"reservationListDigitalReservationsHeaderText",required:!0,type:{name:"string"}},reservationListAllEmptyText:{defaultValue:null,description:"",name:"reservationListAllEmptyText",required:!0,type:{name:"string"}},blockedPatronDTitleText:{defaultValue:null,description:"",name:"blockedPatronDTitleText",required:!0,type:{name:"string"}},blockedPatronDBodyText:{defaultValue:null,description:"",name:"blockedPatronDBodyText",required:!0,type:{name:"string"}},blockedPatronSTitleText:{defaultValue:null,description:"",name:"blockedPatronSTitleText",required:!0,type:{name:"string"}},blockedPatronSBodyText:{defaultValue:null,description:"",name:"blockedPatronSBodyText",required:!0,type:{name:"string"}},blockedPatronFTitleText:{defaultValue:null,description:"",name:"blockedPatronFTitleText",required:!0,type:{name:"string"}},blockedPatronFBodyText:{defaultValue:null,description:"",name:"blockedPatronFBodyText",required:!0,type:{name:"string"}},blockedPatronETitleText:{defaultValue:null,description:"",name:"blockedPatronETitleText",required:!0,type:{name:"string"}},blockedPatronEBodyText:{defaultValue:null,description:"",name:"blockedPatronEBodyText",required:!0,type:{name:"string"}},blockedPatronWTitleText:{defaultValue:null,description:"",name:"blockedPatronWTitleText",required:!0,type:{name:"string"}},blockedPatronWBodyText:{defaultValue:null,description:"",name:"blockedPatronWBodyText",required:!0,type:{name:"string"}},blockedPatronOTitleText:{defaultValue:null,description:"",name:"blockedPatronOTitleText",required:!0,type:{name:"string"}},blockedPatronOBodyText:{defaultValue:null,description:"",name:"blockedPatronOBodyText",required:!0,type:{name:"string"}},blockedPatronUTitleText:{defaultValue:null,description:"",name:"blockedPatronUTitleText",required:!0,type:{name:"string"}},blockedPatronUBodyText:{defaultValue:null,description:"",name:"blockedPatronUBodyText",required:!0,type:{name:"string"}},blockedPatronELinkText:{defaultValue:null,description:"",name:"blockedPatronELinkText",required:!0,type:{name:"string"}},blockedPatronELinkUrl:{defaultValue:null,description:"",name:"blockedPatronELinkUrl",required:!0,type:{name:"string"}},blockedPatronCloseModalAriaLabelText:{defaultValue:null,description:"",name:"blockedPatronCloseModalAriaLabelText",required:!0,type:{name:"string"}},blockedPatronModalAriaDescriptionText:{defaultValue:null,description:"",name:"blockedPatronModalAriaDescriptionText",required:!0,type:{name:"string"}},BlockedPatronEntryTextProps:{defaultValue:null,description:"",name:"BlockedPatronEntryTextProps",required:!0,type:{name:"string"}},redirectOnBlocked:{defaultValue:null,description:"",name:"redirectOnBlocked",required:!0,type:{name:"string"}},expirationWarningDaysBeforeConfig:{defaultValue:null,description:"",name:"expirationWarningDaysBeforeConfig",required:!0,type:{name:"string"}},pauseReservationStartDateConfig:{defaultValue:null,description:"",name:"pauseReservationStartDateConfig",required:!0,type:{name:"string"}},blacklistedPickupBranchesConfig:{defaultValue:null,description:"",name:"blacklistedPickupBranchesConfig",required:!0,type:{name:"string"}},branchesConfig:{defaultValue:null,description:"",name:"branchesConfig",required:!0,type:{name:"string"}},ereolenMyPageUrl:{defaultValue:null,description:"",name:"ereolenMyPageUrl",required:!0,type:{name:"string"}},pauseReservationInfoUrl:{defaultValue:null,description:"",name:"pauseReservationInfoUrl",required:!0,type:{name:"string"}},deleteReservationModalHeaderText:{defaultValue:null,description:"",name:"deleteReservationModalHeaderText",required:!0,type:{name:"string"}},deleteReservationModalDeleteQuestionText:{defaultValue:null,description:"",name:"deleteReservationModalDeleteQuestionText",required:!0,type:{name:"string"}},deleteReservationModalNotRegrettableText:{defaultValue:null,description:"",name:"deleteReservationModalNotRegrettableText",required:!0,type:{name:"string"}},deleteReservationModalDeleteButtonText:{defaultValue:null,description:"",name:"deleteReservationModalDeleteButtonText",required:!0,type:{name:"string"}},deleteReservationModalCloseModalText:{defaultValue:null,description:"",name:"deleteReservationModalCloseModalText",required:!0,type:{name:"string"}},deleteReservationModalAriaDescriptionText:{defaultValue:null,description:"",name:"deleteReservationModalAriaDescriptionText",required:!0,type:{name:"string"}},reservationDetailsRemoveDigitalReservationText:{defaultValue:null,description:"",name:"reservationDetailsRemoveDigitalReservationText",required:!0,type:{name:"string"}},reservationDetailsDateOfReservationTitleText:{defaultValue:null,description:"",name:"reservationDetailsDateOfReservationTitleText",required:!0,type:{name:"string"}},reservationDetailsNumberInQueueLabelText:{defaultValue:null,description:"",name:"reservationDetailsNumberInQueueLabelText",required:!0,type:{name:"string"}},reservationDetailsNoInterestAfterTitleText:{defaultValue:null,description:"",name:"reservationDetailsNoInterestAfterTitleText",required:!0,type:{name:"string"}},reservationDetailsChangeText:{defaultValue:null,description:"",name:"reservationDetailsChangeText",required:!0,type:{name:"string"}},reservationDetailsPickUpAtTitleText:{defaultValue:null,description:"",name:"reservationDetailsPickUpAtTitleText",required:!0,type:{name:"string"}},reservationDetailsButtonRemoveText:{defaultValue:null,description:"",name:"reservationDetailsButtonRemoveText",required:!0,type:{name:"string"}},reservationDetailsStatusTitleText:{defaultValue:null,description:"",name:"reservationDetailsStatusTitleText",required:!0,type:{name:"string"}},reservationDetailsBorrowBeforeText:{defaultValue:null,description:"",name:"reservationDetailsBorrowBeforeText",required:!0,type:{name:"string"}},reservationDetailsDigitalReservationGoToEreolenText:{defaultValue:null,description:"",name:"reservationDetailsDigitalReservationGoToEreolenText",required:!0,type:{name:"string"}},reservationDetailsReadyForLoanText:{defaultValue:null,description:"",name:"reservationDetailsReadyForLoanText",required:!0,type:{name:"string"}},reservationDetailsPickupDeadlineTitleText:{defaultValue:null,description:"",name:"reservationDetailsPickupDeadlineTitleText",required:!0,type:{name:"string"}},interestPeriodsConfig:{defaultValue:null,description:"",name:"interestPeriodsConfig",required:!0,type:{name:"string"}},reservationDetailsConfig:{defaultValue:null,description:"",name:"reservationDetailsConfig",required:!0,type:{name:"string"}},shiftText:{defaultValue:null,description:"",name:"shiftText",required:!0,type:{name:"string"}},modalReservationFormPickupHeaderTitleText:{defaultValue:null,description:"",name:"modalReservationFormPickupHeaderTitleText",required:!0,type:{name:"string"}},modalReservationFormPickupHeaderDescriptionText:{defaultValue:null,description:"",name:"modalReservationFormPickupHeaderDescriptionText",required:!0,type:{name:"string"}},saveButtonText:{defaultValue:null,description:"",name:"saveButtonText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterHeaderTitleText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterHeaderTitleText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterHeaderDescriptionText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterHeaderDescriptionText",required:!0,type:{name:"string"}},chooseOneText:{defaultValue:null,description:"",name:"chooseOneText",required:!0,type:{name:"string"}},loadingText:{defaultValue:null,description:"",name:"loadingText",required:!0,type:{name:"string"}},reservationSuccessTitleText:{defaultValue:null,description:"",name:"reservationSuccessTitleText",required:!0,type:{name:"string"}},reservationSuccessSubTitleText:{defaultValue:null,description:"",name:"reservationSuccessSubTitleText",required:!0,type:{name:"string"}},reservationerrorTitleText:{defaultValue:null,description:"",name:"reservationerrorTitleText",required:!0,type:{name:"string"}},reservationerrorSubTitleText:{defaultValue:null,description:"",name:"reservationerrorSubTitleText",required:!0,type:{name:"string"}},reservationStatusButtonText:{defaultValue:null,description:"",name:"reservationStatusButtonText",required:!0,type:{name:"string"}},materialUrl:{defaultValue:null,description:"",name:"materialUrl",required:!0,type:{name:"string"}},searchUrl:{defaultValue:null,description:"",name:"searchUrl",required:!0,type:{name:"string"}},advancedSearchUrl:{defaultValue:null,description:"",name:"advancedSearchUrl",required:!0,type:{name:"string"}},fbsBaseUrl:{defaultValue:null,description:"",name:"fbsBaseUrl",required:!0,type:{name:"string"}},loanListEreolenUrl:{defaultValue:null,description:"",name:"loanListEreolenUrl",required:!0,type:{name:"string"}},feesPageUrl:{defaultValue:null,description:"",name:"feesPageUrl",required:!0,type:{name:"string"}},publizonBaseUrl:{defaultValue:null,description:"",name:"publizonBaseUrl",required:!0,type:{name:"string"}},dplCmsBaseUrl:{defaultValue:null,description:"",name:"dplCmsBaseUrl",required:!0,type:{name:"string"}},coverBaseUrl:{defaultValue:null,description:"",name:"coverBaseUrl",required:!0,type:{name:"string"}},materialBaseUrl:{defaultValue:null,description:"",name:"materialBaseUrl",required:!0,type:{name:"string"}},fbiBaseUrl:{defaultValue:null,description:"",name:"fbiBaseUrl",required:!0,type:{name:"string"}},authUrl:{defaultValue:null,description:"",name:"authUrl",required:!0,type:{name:"string"}},ereolenHomepageUrl:{defaultValue:null,description:"",name:"ereolenHomepageUrl",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/reservation-list/list/reservation-list.entry.tsx#reservationlistentry"]={docgenInfo:reservationlistentry.__docgenInfo,name:"reservationlistentry",path:"src/apps/reservation-list/list/reservation-list.entry.tsx#reservationlistentry"})}catch(__react_docgen_typescript_loader_error){}var serviceUrlArgs=__webpack_require__("./src/core/storybook/serviceUrlArgs.ts"),blockedArgs=__webpack_require__("./src/core/storybook/blockedArgs.ts"),reservationMaterialDetailsArgs=__webpack_require__("./src/core/storybook/reservationMaterialDetailsArgs.ts"),deleteReservationModalArgs=__webpack_require__("./src/core/storybook/deleteReservationModalArgs.ts"),reservationListArgs=__webpack_require__("./src/core/storybook/reservationListArgs.ts");const reservation_list_dev={title:"Apps / Reservation list",component:reservation_list_entry,argTypes:{...serviceUrlArgs.Z,...deleteReservationModalArgs.Z,...reservationMaterialDetailsArgs.Z,...blockedArgs.Z,...reservationListArgs.Z,blacklistedSearchBranchesConfig:{name:"Blacklisted branches",defaultValue:"FBS-751032,FBS-751031,FBS-751009,FBS-751027,FBS-751024",control:{type:"text"}},expirationWarningDaysBeforeConfig:{defaultValue:"6",control:{type:"text"}},pauseReservationStartDateConfig:{defaultValue:"2022-06-30",control:{type:"text"}},blacklistedPickupBranchesConfig:{name:"Blacklisted branches",defaultValue:"FBS-751032,FBS-751031,FBS-751009,FBS-751027,FBS-751024",control:{type:"text"}},branchesConfig:{name:"Branches",defaultValue:'[\n {\n "branchId":"DK-775120",\n "title":"Højbjerg"\n },\n {\n "branchId":"DK-775122",\n "title":"Beder-Malling"\n },\n {\n "branchId":"DK-775144",\n "title":"Gellerup"\n },\n {\n "branchId":"DK-775167",\n "title":"Lystrup"\n },\n {\n "branchId":"DK-775146",\n "title":"Harlev"\n },\n {\n "branchId":"DK-775168",\n "title":"Skødstrup"\n },\n {\n "branchId":"FBS-751010",\n "title":"Arresten"\n },\n {\n "branchId":"DK-775147",\n "title":"Hasle"\n },\n {\n "branchId":"FBS-751032",\n "title":"Må ikke benyttes"\n },\n {\n "branchId":"FBS-751031",\n "title":"Fjernlager 1"\n },\n {\n "branchId":"DK-775126",\n "title":"Solbjerg"\n },\n {\n "branchId":"FBS-751030",\n "title":"ITK"\n },\n {\n "branchId":"DK-775149",\n "title":"Sabro"\n },\n {\n "branchId":"DK-775127",\n "title":"Tranbjerg"\n },\n {\n "branchId":"DK-775160",\n "title":"Risskov"\n },\n {\n "branchId":"DK-775162",\n "title":"Hjortshøj"\n },\n {\n "branchId":"DK-775140",\n "title":"Åby"\n },\n {\n "branchId":"FBS-751009",\n "title":"Fjernlager 2"\n },\n {\n "branchId":"FBS-751029",\n "title":"Stadsarkivet"\n },\n {\n "branchId":"FBS-751027",\n "title":"Intern"\n },\n {\n "branchId":"FBS-751026",\n "title":"Fælles undervejs"\n },\n {\n "branchId":"FBS-751025",\n "title":"Fællessekretariatet"\n },\n {\n "branchId":"DK-775133",\n "title":"Bavnehøj"\n },\n {\n "branchId":"FBS-751024",\n "title":"Fjernlånte materialer"\n },\n {\n "branchId":"DK-775100",\n "title":"Hovedbiblioteket"\n },\n {\n "branchId":"DK-775170",\n "title":"Trige"\n },\n {\n "branchId":"DK-775150",\n "title":"Tilst"\n },\n {\n "branchId":"DK-775130",\n "title":"Viby"\n },\n {\n "branchId":"DK-775164",\n "title":"Egå"\n }\n]',control:{type:"text"}},pageSizeDesktop:{defaultValue:20,control:{type:"number"}},pageSizeMobile:{defaultValue:10,control:{type:"number"}},ereolenMyPageUrl:{defaultValue:"https://ereolen.dk/user/me/",control:{type:"text"}},pauseReservationInfoUrl:{defaultValue:"https://images.unsplash.com/photo-1571043733612-d5444ff7d4ae?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1335&q=80",control:{type:"text"}},ereolenHomepageUrl:{defaultValue:"https://ereolen.dk/",control:{type:"text"}},reservationListHeaderText:{defaultValue:"Your reservations",control:{type:"text"}},reservationListPhysicalReservationsHeaderText:{defaultValue:"Physical reservations",control:{type:"text"}},reservationListDigitalReservationsHeaderText:{defaultValue:"Digital reservations",control:{type:"text"}},reservationListReadyForPickupTitleText:{defaultValue:"Ready for pickup",control:{type:"text"}},reservationListReadyForPickupEmptyText:{defaultValue:"At the moment you have 0 reservations ready for pickup",control:{type:"text"}},reservationListPhysicalReservationsEmptyText:{defaultValue:"At the moment you have 0 physical reservations",control:{type:"text"}},reservationListAllEmptyText:{defaultValue:"At the moment you have 0 reservations",control:{type:"text"}},reservationListDigitalReservationsEmptyText:{defaultValue:"At the moment you have 0 reservations on digital items",control:{type:"text"}},reservationListReadyText:{defaultValue:"Ready",control:{type:"text"}},materialByAuthorText:{defaultValue:"By",control:{type:"text"}},materialAndAuthorText:{defaultValue:"and",control:{type:"text"}},etAlText:{defaultValue:"et al.",control:{type:"text"}},reservationListNumberInQueueText:{defaultValue:"There are @count people in the queue before you",control:{type:"text"}},reservationListFirstInQueueText:{defaultValue:"You are at the front of the queue",control:{type:"text"}},reservationListDigitalPickupText:{defaultValue:"Online access",control:{type:"text"}},reservationListInQueueText:{defaultValue:"queued",control:{type:"text"}},reservationPickUpLatestText:{defaultValue:"Pick up before @date",control:{type:"text"}},publizonEbookText:{defaultValue:"E-book",control:{type:"text"}},publizonAudioBookText:{defaultValue:"Audiobook",control:{type:"text"}},publizonPodcastText:{defaultValue:"Podcast",control:{type:"text"}},reservationListLoanBeforeText:{defaultValue:"Borrow before @date",control:{type:"text"}},reservationListAvailableInText:{defaultValue:"Available in @count days",control:{type:"text"}},reservationListDaysText:{defaultValue:"days",control:{type:"text"}},reservationListDayText:{defaultValue:"day",control:{type:"text"}},reservationDetailsOthersInQueueText:{defaultValue:"Others are queueing for this material",control:{type:"text"}},reservationDetailsExpiresTitleText:{defaultValue:"Pickup deadline",control:{type:"text"}},reservationDetailsDigitalMaterialExpiresTitleText:{defaultValue:"Borrow before",control:{type:"text"}},reservationDetailsExpiresText:{defaultValue:"Your reservation expires @date!",control:{type:"text"}},reservationDetailsSaveText:{defaultValue:"Save",control:{type:"text"}},reservationDetailsCancelText:{defaultValue:"Cancel",control:{type:"text"}},reservationListPauseReservationText:{defaultValue:"Pause your reservations",control:{type:"text"}},reservationListPauseReservationOnHoldText:{defaultValue:"Your reservations are paused",control:{type:"text"}},reservationListOnHoldAriaText:{defaultValue:"Reservations have been paused in the following time span: ",control:{type:"text"}},reservationListPauseReservationAriaModalText:{defaultValue:"Opens a modal that covers the entire page where it is possible to pause physical reservations",control:{type:"text"}},reservationListPauseReservationButtonText:{defaultValue:"Settings",control:{type:"text"}},pauseReservationModalAriaDescriptionText:{defaultValue:"This modal makes it possible to pause your physical reservations",control:{type:"text"}},pauseReservationModalHeaderText:{defaultValue:"Pause reservations on physical items",control:{type:"text"}},pauseReservationModalBodyText:{defaultValue:"Pause your reservations early, since reservations that are already being processed, will not be paused.",control:{type:"text"}},pauseReservationModalCloseModalText:{defaultValue:"Close pause reservations modal",control:{type:"text"}},dateInputsStartDateLabelText:{defaultValue:"Start date",control:{type:"text"}},dateInputsEndDateLabelText:{defaultValue:"End date",control:{type:"text"}},pauseReservationModalBelowInputsTextText:{defaultValue:"",control:{type:"text"}},pauseReservationModalLinkText:{defaultValue:"Read more about pausing reservertions and what that means here",control:{type:"text"}},pauseReservationModalSaveButtonLabelText:{defaultValue:"Save",control:{type:"text"}},pauseReservationModalCancelButtonLabelText:{defaultValue:"Cancel pause",control:{type:"text"}},showMoreText:{name:"Show more Text",defaultValue:"show more",control:{type:"text"}},resultPagerStatusText:{name:"Result pager status text",defaultValue:"Showing @itemsShown out of @hitcount results",control:{type:"text"}}},decorators:[esm.j]},Template=props=>react.createElement(reservation_list_entry,props),reservation_list_dev_ReservationListEntry=Template.bind({});reservation_list_dev_ReservationListEntry.args={};const{reservationDetails}=(0,modal_helpers.GM)(),ReservationListDigitalDetailsModal=Template.bind({});ReservationListDigitalDetailsModal.parameters={query:{modal:`${reservationDetails}9788702319361`}};const ReservationListPhysicalDetailsModal=Template.bind({});ReservationListPhysicalDetailsModal.parameters={query:{modal:`${reservationDetails}4698559133`}};const{pauseReservation}=(0,modal_helpers.GM)(),ReservationListPauseModal=Template.bind({});ReservationListPauseModal.parameters={query:{modal:pauseReservation}}},"./src/apps/reservation-list/modal/delete-reservation/delete-reservation-modal.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>delete_reservation_modal,_:()=>deleteReservationModalId});var react=__webpack_require__("./node_modules/react/index.js"),es=__webpack_require__("./node_modules/react-query/es/index.js"),modal=__webpack_require__("./src/core/utils/modal.tsx"),utils_text=__webpack_require__("./src/core/utils/text.tsx"),reservation_type=__webpack_require__("./src/core/utils/types/reservation-type.ts");const requestsAndReservations=({reservations,operations})=>{const{physical:reservationsPhysical,digital:reservationsDigital}=(reservations=>reservations.length?{physical:reservations.filter(reservation_type.xF).map((({reservationIds})=>reservationIds)).flat(),digital:reservations.filter(reservation_type.Rq).map((({identifier})=>identifier))}:{physical:[],digital:[]})(reservations),requests=[];return reservationsPhysical.length&&requests.push({params:{params:{reservationid:reservationsPhysical}},operation:operations.physical}),reservationsDigital.length&&reservationsDigital.forEach((id=>{requests.push({params:{identifier:String(id)},operation:operations.digital})})),{requests,reservationsPhysical,reservationsDigital}};var Button=__webpack_require__("./src/components/Buttons/Button.tsx");const delete_reservation_content=({deleteReservation,reservationsCount,deletionStatus})=>{const t=(0,utils_text.X)(),deleteReservationCallback=(0,react.useCallback)((()=>{deleteReservation()}),[deleteReservation]),buttonLabel=(({reservationsCount,deletionStatus,t})=>"pending"===deletionStatus?t("deleteReservationModalDeleteProcessingText"):t("deleteReservationModalDeleteButtonText",{count:reservationsCount}))({t,reservationsCount,deletionStatus});return react.createElement(react.Fragment,null,react.createElement("h2",{className:"text-header-h3"},t("deleteReservationModalHeaderText",{count:reservationsCount})),react.createElement("div",{className:"mt-48 color-secondary-gray"},react.createElement("p",{className:"text-body-medium-regular"},t("deleteReservationModalDeleteQuestionText",{count:reservationsCount})),react.createElement("p",{className:"text-body-medium-regular"},t("deleteReservationModalNotRegrettableText"))),react.createElement("div",{className:"modal-pause__button mt-48"},react.createElement(Button.z,{dataCy:"delete-reservation-button",label:buttonLabel,buttonType:"none",variant:"filled",disabled:"pending"===deletionStatus,collapsible:!1,onClick:deleteReservationCallback,size:"small"})))};try{deletereservationcontent.displayName="deletereservationcontent",deletereservationcontent.__docgenInfo={description:"",displayName:"deletereservationcontent",props:{deleteReservation:{defaultValue:null,description:"",name:"deleteReservation",required:!0,type:{name:"() => void"}},reservationsCount:{defaultValue:null,description:"",name:"reservationsCount",required:!0,type:{name:"number"}},deletionStatus:{defaultValue:null,description:"",name:"deletionStatus",required:!0,type:{name:"enum",value:[{value:'"success"'},{value:'"idle"'},{value:'"pending"'},{value:'"error"'}]}},material:{defaultValue:null,description:"",name:"material",required:!1,type:{name:"Nullable> | null | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/reservation-list/modal/delete-reservation/delete-reservation-content.tsx#deletereservationcontent"]={docgenInfo:deletereservationcontent.__docgenInfo,name:"deletereservationcontent",path:"src/apps/reservation-list/modal/delete-reservation/delete-reservation-content.tsx#deletereservationcontent"})}catch(__react_docgen_typescript_loader_error){}var fbs=__webpack_require__("./src/core/fbs/fbs.ts"),publizon=__webpack_require__("./src/core/publizon/publizon.ts"),useRequestsWithStatus=__webpack_require__("./src/core/utils/useRequestsWithStatus.tsx"),ModalMessage=__webpack_require__("./src/components/message/modal-message/ModalMessage.tsx"),modal_helpers=__webpack_require__("./src/core/utils/helpers/modal-helpers.ts");function deleteReservationModalId(reservation){return`${String((0,modal_helpers.GM)().reservationDelete)}${(0,reservation_type._p)(reservation)}`}const delete_reservation_modal=({modalId,reservations})=>{const t=(0,utils_text.X)(),queryClient=(0,es.useQueryClient)(),{mutate:deletePhysicalReservation}=(0,fbs.a4)(),{mutate:deleteDigitalReservation}=(0,publizon.t7)(),[deletedReservations,setDeletedReservations]=(0,react.useState)(null),{requests,reservationsPhysical,reservationsDigital}=(0,react.useMemo)((()=>requestsAndReservations({operations:{digital:deleteDigitalReservation,physical:deletePhysicalReservation},reservations})),[deleteDigitalReservation,deletePhysicalReservation,reservations]),{handler:removeReservationsHandler,requestStatus,setRequestStatus}=(0,useRequestsWithStatus.HU)({requests,onSuccess:()=>{setDeletedReservations(reservations.length),queryClient.invalidateQueries((0,publizon.bh)()),queryClient.invalidateQueries((0,fbs.Jp)())}});if(!reservations)return null;const ctaButtonParams={text:t("deleteReservationModalButtonText"),closeAllModals:!0,callback:()=>{setRequestStatus("idle"),setDeletedReservations(null)}};return react.createElement(modal.Z,{modalId,classNames:"modal-cta modal-padding",closeModalAriaLabelText:t("deleteReservationModalCloseModalText"),screenReaderModalDescriptionText:t("deleteReservationModalAriaDescriptionText"),eventCallbacks:{close:()=>{setRequestStatus("idle"),setDeletedReservations(null)}}},["idle","pending"].includes(requestStatus)&&react.createElement(delete_reservation_content,{deleteReservation:()=>{(reservationsPhysical.length||reservationsDigital.length)&&removeReservationsHandler()},reservationsCount:reservations.length,deletionStatus:requestStatus}),"success"===requestStatus&&react.createElement(ModalMessage.Z,{title:t("deleteReservationModalSuccessTitleText"),subTitle:t("deleteReservationModalSuccessStatusText",{count:deletedReservations??0}),ctaButton:ctaButtonParams}),"error"===requestStatus&&react.createElement(ModalMessage.Z,{title:t("deleteReservationModalErrorsTitleText"),subTitle:t("deleteReservationModalErrorsStatusText"),ctaButton:ctaButtonParams}))};try{deleteReservationModalId.displayName="deleteReservationModalId",deleteReservationModalId.__docgenInfo={description:"",displayName:"deleteReservationModalId",props:{dateOfReservation:{defaultValue:null,description:"",name:"dateOfReservation",required:!1,type:{name:"string | null | undefined"}},expiryDate:{defaultValue:null,description:"",name:"expiryDate",required:!1,type:{name:"string | null | undefined"}},pickupDeadline:{defaultValue:null,description:"",name:"pickupDeadline",required:!1,type:{name:"string | null | undefined"}},numberInQueue:{defaultValue:null,description:"",name:"numberInQueue",required:!1,type:{name:"number | null | undefined"}},state:{defaultValue:null,description:"",name:"state",required:!1,type:{name:"string | null | undefined"}},expectedRedeemDateUtc:{defaultValue:null,description:"",name:"expectedRedeemDateUtc",required:!1,type:{name:"string | null | undefined"}},pickupNumber:{defaultValue:null,description:'The reservation number. This is, contrary to the name, a string containing, as an example, "Reserveringshylde 111"',name:"pickupNumber",required:!1,type:{name:"string | null | undefined"}},pickupBranch:{defaultValue:null,description:"",name:"pickupBranch",required:!1,type:{name:"string | null | undefined"}},title:{defaultValue:null,description:"",name:"title",required:!1,type:{name:"string | null | undefined"}},periodical:{defaultValue:null,description:"",name:"periodical",required:!1,type:{name:"string | null | undefined"}},faust:{defaultValue:null,description:"",name:"faust",required:!1,type:{name:"`${number}` | null | undefined"}},identifier:{defaultValue:null,description:"",name:"identifier",required:!1,type:{name:"string | null | undefined"}},reservationIds:{defaultValue:null,description:"",name:"reservationIds",required:!1,type:{name:"number[] | null | undefined"}},loanId:{defaultValue:null,description:"",name:"loanId",required:!1,type:{name:"number | null | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/reservation-list/modal/delete-reservation/delete-reservation-modal.tsx#deleteReservationModalId"]={docgenInfo:deleteReservationModalId.__docgenInfo,name:"deleteReservationModalId",path:"src/apps/reservation-list/modal/delete-reservation/delete-reservation-modal.tsx#deleteReservationModalId"})}catch(__react_docgen_typescript_loader_error){}try{deletereservationmodal.displayName="deletereservationmodal",deletereservationmodal.__docgenInfo={description:"",displayName:"deletereservationmodal",props:{modalId:{defaultValue:null,description:"",name:"modalId",required:!0,type:{name:"string"}},reservations:{defaultValue:null,description:"",name:"reservations",required:!0,type:{name:"Nullable>[]"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/reservation-list/modal/delete-reservation/delete-reservation-modal.tsx#deletereservationmodal"]={docgenInfo:deletereservationmodal.__docgenInfo,name:"deletereservationmodal",path:"src/apps/reservation-list/modal/delete-reservation/delete-reservation-modal.tsx#deletereservationmodal"})}catch(__react_docgen_typescript_loader_error){}},"./src/apps/reservation-list/modal/pause-reservation/pause-reservation.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>pause_reservation});var react=__webpack_require__("./node_modules/react/index.js"),dayjs_min=__webpack_require__("./node_modules/dayjs/dayjs.min.js"),dayjs_min_default=__webpack_require__.n(dayjs_min),es=__webpack_require__("./node_modules/react-query/es/index.js"),Link=__webpack_require__("./src/components/atoms/links/Link.tsx"),modal=__webpack_require__("./src/core/utils/modal.tsx"),utils_text=__webpack_require__("./src/core/utils/text.tsx"),fbs=__webpack_require__("./src/core/fbs/fbs.ts"),date=__webpack_require__("./src/core/utils/helpers/date.ts");const date_input=({label,id,value,onChange,minDateInput,required})=>{const minDate=value||minDateInput||(new Date).toISOString().split("T")[0];return react.createElement("div",{className:"datepicker"},react.createElement("label",{htmlFor:id,className:"text-body-medium-regular"},label),react.createElement("input",{required,"data-cy":id,type:"date",onChange:({target})=>onChange(target.value),name:id,value,id,className:"datepicker-input",min:minDate}))};try{dateinput.displayName="dateinput",dateinput.__docgenInfo={description:"",displayName:"dateinput",props:{label:{defaultValue:null,description:"",name:"label",required:!0,type:{name:"string"}},minDateInput:{defaultValue:null,description:"",name:"minDateInput",required:!1,type:{name:"string | undefined"}},id:{defaultValue:null,description:"",name:"id",required:!0,type:{name:"string"}},value:{defaultValue:null,description:"",name:"value",required:!0,type:{name:"string"}},required:{defaultValue:null,description:"",name:"required",required:!0,type:{name:"boolean"}},onChange:{defaultValue:null,description:"",name:"onChange",required:!0,type:{name:"(date: string) => void"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/date-inputs/date-input.tsx#dateinput"]={docgenInfo:dateinput.__docgenInfo,name:"dateinput",path:"src/components/date-inputs/date-input.tsx#dateinput"})}catch(__react_docgen_typescript_loader_error){}const date_inputs=({setStartDate,setEndDate,startDate,endDate})=>{const t=(0,utils_text.X)();return react.createElement("div",{className:"datepickers"},react.createElement(date_input,{value:startDate,required:!0,id:"start-date",onChange:setStartDate,label:t("dateInputsStartDateLabelText")}),react.createElement(date_input,{onChange:setEndDate,required:!0,minDateInput:((0,date.pj)(startDate)?null:startDate)||"",value:endDate,id:"end-date",label:t("dateInputsEndDateLabelText")}))};try{dateinputs.displayName="dateinputs",dateinputs.__docgenInfo={description:"",displayName:"dateinputs",props:{setStartDate:{defaultValue:null,description:"",name:"setStartDate",required:!0,type:{name:"(date: string) => void"}},setEndDate:{defaultValue:null,description:"",name:"setEndDate",required:!0,type:{name:"(date: string) => void"}},startDate:{defaultValue:null,description:"",name:"startDate",required:!0,type:{name:"string"}},endDate:{defaultValue:null,description:"",name:"endDate",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/date-inputs/date-inputs.tsx#dateinputs"]={docgenInfo:dateinputs.__docgenInfo,name:"dateinputs",path:"src/components/date-inputs/date-inputs.tsx#dateinputs"})}catch(__react_docgen_typescript_loader_error){}var url=__webpack_require__("./src/core/utils/url.tsx"),modal_helpers=__webpack_require__("./src/core/utils/helpers/modal-helpers.ts");const pause_reservation=({id,user})=>{var _user$onHold,_user$onHold2,_user$onHold5,_user$onHold6;const t=(0,utils_text.X)(),pauseReservationInfoUrl=(0,url.J_)()("pauseReservationInfoUrl"),queryClient=(0,es.useQueryClient)(),{mutate}=(0,fbs.tX)(),{close}=(0,modal.f)(),{pauseReservation}=(0,modal_helpers.GM)(),saveFormId=(0,react.useId)(),currentDate=dayjs_min_default()().format("YYYY-MM-DD"),[startDate,setStartDate]=(0,react.useState)(currentDate),[endDate,setEndDate]=(0,react.useState)(""),pauseActive=(null==user||null===(_user$onHold=user.onHold)||void 0===_user$onHold?void 0:_user$onHold.from)&&(null==user||null===(_user$onHold2=user.onHold)||void 0===_user$onHold2?void 0:_user$onHold2.to),save=(0,react.useCallback)(((localStartDate,localEndDate)=>{if(!user)return;const saveData={preferredPickupBranch:user.preferredPickupBranch,receiveEmail:user.receiveEmail,receivePostalMail:user.receivePostalMail,receiveSms:user.receiveSms};saveData.onHold={from:""===localStartDate?void 0:localStartDate,to:""===localEndDate?void 0:localEndDate},mutate({data:{patron:saveData}},{onSuccess:()=>{queryClient.invalidateQueries((0,fbs.Tk)()),close(pauseReservation)},onError:()=>{}})}),[close,mutate,pauseReservation,queryClient,user]),resetPauseDates=(0,react.useCallback)((()=>{setStartDate(currentDate),setEndDate(""),save()}),[currentDate,save]);return(0,react.useEffect)((()=>{var _user$onHold3,_user$onHold4;null!=user&&null!==(_user$onHold3=user.onHold)&&void 0!==_user$onHold3&&_user$onHold3.from&&setStartDate(user.onHold.from),null!=user&&null!==(_user$onHold4=user.onHold)&&void 0!==_user$onHold4&&_user$onHold4.to&&setEndDate(user.onHold.to)}),[null==user||null===(_user$onHold5=user.onHold)||void 0===_user$onHold5?void 0:_user$onHold5.from,null==user||null===(_user$onHold6=user.onHold)||void 0===_user$onHold6?void 0:_user$onHold6.to]),react.createElement(modal.Z,{modalId:id,classNames:"modal-cta",closeModalAriaLabelText:t("pauseReservationModalCloseModalText"),screenReaderModalDescriptionText:t("pauseReservationModalAriaDescriptionText")},react.createElement("div",{className:"modal-pause__container"},react.createElement("h2",{className:"text-header-h3"},t("pauseReservationModalHeaderText")),react.createElement("div",{className:"mt-48 color-secondary-gray"},react.createElement("p",{className:"text-body-medium-regular mb-32"},t("pauseReservationModalBodyText"))),react.createElement("form",{id:saveFormId,onSubmit:e=>{e.preventDefault(),save(startDate,endDate)}},react.createElement(date_inputs,{setStartDate,setEndDate,startDate,endDate})),react.createElement("div",{className:"modal-pause__text-link mt-24 color-secondary-gray"},react.createElement("p",{className:"text-body-small-regular"},t("pauseReservationModalBelowInputsTextText"),react.createElement(Link.Z,{id:"pause-reservation-info-link",href:pauseReservationInfoUrl,className:"link-tag"},t("pauseReservationModalLinkText")))),react.createElement("div",{className:"modal-pause__button mt-48"},react.createElement("button",{type:"submit",form:saveFormId,className:"btn-primary btn-filled btn-small"},t("pauseReservationModalSaveButtonLabelText")),pauseActive&&react.createElement("button",{type:"button",onClick:resetPauseDates,className:"btn-primary btn-small mt-16"},t("pauseReservationModalCancelButtonLabelText")))))};try{pausereservation.displayName="pausereservation",pausereservation.__docgenInfo={description:"",displayName:"pausereservation",props:{id:{defaultValue:null,description:"",name:"id",required:!0,type:{name:"string"}},user:{defaultValue:null,description:"",name:"user",required:!0,type:{name:"PatronV5"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/reservation-list/modal/pause-reservation/pause-reservation.tsx#pausereservation"]={docgenInfo:pausereservation.__docgenInfo,name:"pausereservation",path:"src/apps/reservation-list/modal/pause-reservation/pause-reservation.tsx#pausereservation"})}catch(__react_docgen_typescript_loader_error){}},"./src/apps/reservation-list/modal/reservation-details/reservation-details.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>reservation_details});var react=__webpack_require__("./node_modules/react/index.js"),reservation_type=__webpack_require__("./src/core/utils/types/reservation-type.ts"),material_fetch_hoc=__webpack_require__("./src/apps/loan-list/materials/utils/material-fetch-hoc.tsx"),modal_details_header=__webpack_require__("./src/components/modal-details-header/modal-details-header.tsx"),Reservations=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/Reservations.svg"),Reservations_default=__webpack_require__.n(Reservations),Loans=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/Loans.svg"),Loans_default=__webpack_require__.n(Loans),utils_text=__webpack_require__("./src/core/utils/text.tsx"),list_details=__webpack_require__("./src/components/list-details/list-details.tsx"),date=__webpack_require__("./src/core/utils/helpers/date.ts");const digital_list_details=({reservation})=>{const t=(0,utils_text.X)(),{expiryDate,dateOfReservation,pickupDeadline,state}=reservation;return react.createElement(react.Fragment,null,expiryDate&&"readyForPickup"===state&&react.createElement(list_details.Z,{icon:Reservations_default(),title:t("reservationDetailsStatusTitleText"),labels:t("reservationDetailsExpiresText",{placeholders:{"@date":(0,date.o0)(expiryDate)}})}),pickupDeadline&&"reserved"===state&&react.createElement(list_details.Z,{icon:Reservations_default(),title:t("reservationDetailsStatusTitleText"),labels:t("reservationDetailsBorrowBeforeText",{placeholders:{"@date":(0,date.o0)(pickupDeadline)}})}),dateOfReservation&&react.createElement(list_details.Z,{icon:Loans_default(),labels:(0,date.o0)(dateOfReservation),title:t("reservationDetailsDateOfReservationTitleText")}))};try{digitallistdetails.displayName="digitallistdetails",digitallistdetails.__docgenInfo={description:"",displayName:"digitallistdetails",props:{reservation:{defaultValue:null,description:"",name:"reservation",required:!0,type:{name:"Nullable>"}},material:{defaultValue:null,description:"",name:"material",required:!1,type:{name:"Nullable> | null | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/reservation-list/modal/reservation-details/digital-list-details.tsx#digitallistdetails"]={docgenInfo:digitallistdetails.__docgenInfo,name:"digitallistdetails",path:"src/apps/reservation-list/modal/reservation-details/digital-list-details.tsx#digitallistdetails"})}catch(__react_docgen_typescript_loader_error){}var Button=__webpack_require__("./src/components/Buttons/Button.tsx");const reservation_details_buttons=({numberInQueue,openReservationDeleteModal,classNames,buttonClassNames,reservation})=>{const t=(0,utils_text.X)();return react.createElement("div",{className:`modal-details__buttons ${classNames}`},numberInQueue&&numberInQueue>0&&react.createElement("div",{className:"my-8 mr-16 text-body-medium-regular"},t("reservationDetailsOthersInQueueText")),react.createElement(Button.z,{label:t("reservationDetailsButtonRemoveText"),onClick:()=>openReservationDeleteModal(reservation),classNames:buttonClassNames,buttonType:"none",disabled:!1,collapsible:!1,size:"small",variant:"filled"}))};try{reservationdetailsbuttons.displayName="reservationdetailsbuttons",reservationdetailsbuttons.__docgenInfo={description:"",displayName:"reservationdetailsbuttons",props:{reservation:{defaultValue:null,description:"",name:"reservation",required:!0,type:{name:"Nullable>"}},numberInQueue:{defaultValue:null,description:"",name:"numberInQueue",required:!1,type:{name:"number | null | undefined"}},classNames:{defaultValue:null,description:"",name:"classNames",required:!1,type:{name:"string | undefined"}},buttonClassNames:{defaultValue:null,description:"",name:"buttonClassNames",required:!1,type:{name:"string | undefined"}},openReservationDeleteModal:{defaultValue:null,description:"",name:"openReservationDeleteModal",required:!0,type:{name:"(deleteReservation: Nullable>) => void"}},material:{defaultValue:null,description:"",name:"material",required:!1,type:{name:"Nullable> | null | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/reservation-list/modal/reservation-details/reservation-details-buttons.tsx#reservationdetailsbuttons"]={docgenInfo:reservationdetailsbuttons.__docgenInfo,name:"reservationdetailsbuttons",path:"src/apps/reservation-list/modal/reservation-details/reservation-details-buttons.tsx#reservationdetailsbuttons"})}catch(__react_docgen_typescript_loader_error){}var icon_btn_external_link=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/buttons/icon-btn-external-link.svg"),icon_btn_external_link_default=__webpack_require__.n(icon_btn_external_link),LinkButton=__webpack_require__("./src/components/Buttons/LinkButton.tsx");const reservation_details_redirect=({reservation,openReservationDeleteModal,className,linkClassNames,externalLink})=>{const t=(0,utils_text.X)();return react.createElement("div",{className:`modal-details__buttons ${className}`},react.createElement("button",{type:"button",onClick:()=>openReservationDeleteModal(reservation),className:`link-tag cursor-pointer ${linkClassNames}`},t("reservationDetailsRemoveDigitalReservationText")),react.createElement(LinkButton.Z,{dataCy:"go-to-ereolen-button",size:"small",url:externalLink,variant:"filled",id:"go-to-ereolen-button"},t("reservationDetailsDigitalReservationGoToEreolenText"),react.createElement("img",{src:icon_btn_external_link_default(),className:"btn-icon invert",alt:""})))};try{reservationdetailsredirect.displayName="reservationdetailsredirect",reservationdetailsredirect.__docgenInfo={description:"",displayName:"reservationdetailsredirect",props:{reservation:{defaultValue:null,description:"",name:"reservation",required:!0,type:{name:"Nullable>"}},openReservationDeleteModal:{defaultValue:null,description:"",name:"openReservationDeleteModal",required:!0,type:{name:"(deleteReservation: Nullable>) => void"}},className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string | undefined"}},linkClassNames:{defaultValue:null,description:"",name:"linkClassNames",required:!1,type:{name:"string | undefined"}},externalLink:{defaultValue:null,description:"",name:"externalLink",required:!0,type:{name:"URL"}},material:{defaultValue:null,description:"",name:"material",required:!1,type:{name:"Nullable> | null | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/reservation-list/modal/reservation-details/reservation-details-redirect.tsx#reservationdetailsredirect"]={docgenInfo:reservationdetailsredirect.__docgenInfo,name:"reservationdetailsredirect",path:"src/apps/reservation-list/modal/reservation-details/reservation-details-redirect.tsx#reservationdetailsredirect"})}catch(__react_docgen_typescript_loader_error){}var digital_material_fetch_hoc=__webpack_require__("./src/apps/loan-list/materials/utils/digital-material-fetch-hoc.tsx"),Ebook=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/Ebook.svg"),Ebook_default=__webpack_require__.n(Ebook),Location=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/Location.svg"),Location_default=__webpack_require__.n(Location),LoanHistory=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/LoanHistory.svg"),LoanHistory_default=__webpack_require__.n(LoanHistory),es=__webpack_require__("./node_modules/react-query/es/index.js"),fbs=__webpack_require__("./src/core/fbs/fbs.ts"),helper=__webpack_require__("./src/components/reservation/helper.ts"),utils_config=__webpack_require__("./src/core/utils/config.tsx"),PickupModal=__webpack_require__("./src/components/reservation/forms/PickupModal.tsx"),modal=__webpack_require__("./src/core/utils/modal.tsx"),forms_helper=__webpack_require__("./src/components/reservation/forms/helper.ts"),utils_branches=__webpack_require__("./src/core/utils/branches.tsx"),ReservationFormListItem=__webpack_require__("./src/components/reservation/ReservationFormListItem.tsx"),NoInterestAfterModal=__webpack_require__("./src/components/reservation/forms/NoInterestAfterModal.tsx"),helpers=__webpack_require__("./src/apps/reservation-list/utils/helpers.ts");const physical_list_details=({reservation,reservation:{numberInQueue,pickupBranch,expiryDate,pickupDeadline,dateOfReservation,pickupNumber,reservationIds}})=>{const config=(0,utils_config.ZR)(),t=(0,utils_text.X)(),{open}=(0,modal.f)(),queryClient=(0,es.useQueryClient)(),{mutate}=(0,fbs.OE)(),[selectedInterest,setSelectedInterest]=(0,react.useState)(null),[selectedBranch,setSelectedBranch]=(0,react.useState)(pickupBranch),[reservationStatus,setReservationStatus]=(0,react.useState)("idle"),openModal=type=>()=>{open((0,forms_helper._3)(type))},branches=config("branchesConfig",{transformer:"jsonParse"}),blacklistBranches=config("blacklistedPickupBranchesConfig",{transformer:"stringToArray"}),whitelistBranches=(0,utils_branches.rM)(branches,blacklistBranches),isReadyForPickup=(0,helpers.S1)([reservation]).length>0,saveChanges=()=>{if(setReservationStatus("pending"),!reservationIds||0===reservationIds.length||!selectedBranch)return console.error("Missing reservationId or selectedBranch"),void setReservationStatus("error");let selectedExpiryDate=expiryDate||"";selectedInterest&&(selectedExpiryDate=(0,helper.M1)(selectedInterest));const reservationsChanges=reservationIds.map((reservationId=>({expiryDate:selectedExpiryDate,pickupBranch:selectedBranch,reservationId})));mutate({data:{reservations:reservationsChanges}},{onSuccess:()=>{setReservationStatus("success"),queryClient.invalidateQueries((0,fbs.Jp)())},onError:()=>{setReservationStatus("error")}})};return react.createElement(react.Fragment,null,numberInQueue&&react.createElement(list_details.Z,{icon:Ebook_default(),title:t("reservationDetailsStatusTitleText"),labels:[t("reservationDetailsNumberInQueueLabelText",{placeholders:{"@count":numberInQueue}})]}),pickupBranch&&react.createElement(react.Fragment,null,react.createElement(ReservationFormListItem.Z,{icon:Location_default(),title:t("reservationDetailsPickUpAtTitleText"),text:(0,helper.Sp)(selectedBranch??pickupBranch,whitelistBranches),changeHandler:openModal("pickup"),buttonAriaLabel:t("changePickupLocationText"),subText:pickupNumber??"",isPossibleToChangeReservationDetails:!isReadyForPickup}),!isReadyForPickup&&react.createElement(PickupModal.Z,{branches:whitelistBranches,defaultBranch:pickupBranch,selectBranchHandler:setSelectedBranch,saveCallback:saveChanges,reservationStatus,setReservationStatus})),expiryDate&&react.createElement(react.Fragment,null,react.createElement(ReservationFormListItem.Z,{icon:LoanHistory_default(),title:t("reservationDetailsNoInterestAfterTitleText"),text:selectedInterest?(0,date.p6)((0,helper.M1)(selectedInterest)):(0,date.p6)(expiryDate),changeHandler:openModal("interestPeriod"),buttonAriaLabel:t("changeInterestPeriodText"),isPossibleToChangeReservationDetails:!isReadyForPickup}),!isReadyForPickup&&react.createElement(NoInterestAfterModal.Z,{selectedInterest:selectedInterest??90,setSelectedInterest,saveCallback:saveChanges,reservationStatus,setReservationStatus})),pickupDeadline&&react.createElement(list_details.Z,{icon:Reservations_default(),title:t("reservationDetailsPickupDeadlineTitleText"),labels:[(0,date.p6)(pickupDeadline)]}),dateOfReservation&&react.createElement(list_details.Z,{icon:Loans_default(),title:t("reservationDetailsDateOfReservationTitleText"),labels:[(0,date.p6)(dateOfReservation)]}))};try{physicallistdetails.displayName="physicallistdetails",physicallistdetails.__docgenInfo={description:"",displayName:"physicallistdetails",props:{reservation:{defaultValue:null,description:"",name:"reservation",required:!0,type:{name:"Nullable>"}},material:{defaultValue:null,description:"",name:"material",required:!1,type:{name:"Nullable> | null | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/reservation-list/modal/reservation-details/physical-list-details.tsx#physicallistdetails"]={docgenInfo:physicallistdetails.__docgenInfo,name:"physicallistdetails",path:"src/apps/reservation-list/modal/reservation-details/physical-list-details.tsx#physicallistdetails"})}catch(__react_docgen_typescript_loader_error){}var MaterialButtonLoading=__webpack_require__("./src/components/material/material-buttons/generic/MaterialButtonLoading.tsx"),graphql=__webpack_require__("./src/core/dbc-gateway/generated/graphql.tsx");var url=__webpack_require__("./src/core/utils/url.tsx");const reservation_details=(0,digital_material_fetch_hoc.Z)((0,material_fetch_hoc.Z)((({reservation,material,openReservationDeleteModal})=>{const t=(0,utils_text.X)(),ereolenHomepageUrl=(0,url.J_)()("ereolenHomepageUrl"),config=(0,utils_config.ZR)(),[externalUrl,setExternalUrl]=(0,react.useState)(null),{state,identifier,numberInQueue}=reservation,{authors,pid,year,title,description,materialType}=material||{},{allowRemoveReadyReservations}=config("reservationDetailsConfig",{transformer:"jsonParse"}),allowUserRemoveReadyReservations="readyForPickup"===state&&allowRemoveReadyReservations||"readyForPickup"!==state,{data:complexSearchData,isLoading:isLoadingComplexSearch}=(0,graphql.af)({cql:`term.isbn=${identifier}`,offset:0,limit:1,filters:{}},{enabled:!!identifier});return(0,react.useEffect)((()=>{if(!complexSearchData||0===complexSearchData.complexSearch.hitcount)return;const matchingManifestations=((manifestations,identifier)=>manifestations.filter((manifestation=>manifestation.identifiers.find((id=>id.value.replace(/\D/g,"")===identifier.replace(/\D/g,""))))))(complexSearchData.complexSearch.works[0].manifestations.all,identifier||"");setExternalUrl(new URL((manifestations=>{const manifestationWithEreolAccess=manifestations.find((manifestation=>manifestation.access.find((access=>"Ereol"===access.__typename)))),ereolAccess=null==manifestationWithEreolAccess?void 0:manifestationWithEreolAccess.access.find((access=>"Ereol"===access.__typename));return null==ereolAccess?void 0:ereolAccess.url})(matchingManifestations)||ereolenHomepageUrl))}),[complexSearchData,identifier,ereolenHomepageUrl]),react.createElement("div",{className:"modal-details__container"},material&&react.createElement(react.Fragment,null,react.createElement(modal_details_header.Z,{isbnForCover:identifier||"",authors,year,title,pid,description,materialType,series:material.series},"readyForPickup"===state&&react.createElement("div",{className:"status-label status-label--info"},t("reservationDetailsReadyForLoanText"))),(0,reservation_type.xF)(reservation)&&allowUserRemoveReadyReservations&&react.createElement(reservation_details_buttons,{classNames:"modal-details__buttons--hide-on-mobile",openReservationDeleteModal,reservation,numberInQueue}),(0,reservation_type.Rq)(reservation)&&isLoadingComplexSearch&&react.createElement("div",{className:"modal-details__buttons modal-details__buttons--hide-on-mobile"},react.createElement(MaterialButtonLoading.Z,{classNames:"modal-details__buttons--hide-on-mobile"})),(0,reservation_type.Rq)(reservation)&&!isLoadingComplexSearch&&externalUrl&&react.createElement(reservation_details_redirect,{openReservationDeleteModal,reservation,className:"modal-details__buttons--hide-on-mobile",linkClassNames:"mx-16",externalLink:externalUrl}),react.createElement("div",{className:"modal-details__list"},(0,reservation_type.Rq)(reservation)&&react.createElement(digital_list_details,{reservation}),(0,reservation_type.xF)(reservation)&&react.createElement(physical_list_details,{reservation})),(0,reservation_type.xF)(reservation)&&allowUserRemoveReadyReservations&&react.createElement(reservation_details_buttons,{buttonClassNames:"modal-details__buttons__full-width",openReservationDeleteModal,numberInQueue,reservation}),(0,reservation_type.Rq)(reservation)&&!isLoadingComplexSearch&&externalUrl&&react.createElement(reservation_details_redirect,{openReservationDeleteModal,linkClassNames:"my-16",reservation,externalLink:externalUrl})))})));try{reservationdetails.displayName="reservationdetails",reservationdetails.__docgenInfo={description:"",displayName:"reservationdetails",props:{reservation:{defaultValue:null,description:"",name:"reservation",required:!0,type:{name:"Nullable>"}},openReservationDeleteModal:{defaultValue:null,description:"",name:"openReservationDeleteModal",required:!0,type:{name:"(deleteReservation: Nullable>) => void"}},digitalMaterial:{defaultValue:null,description:"",name:"digitalMaterial",required:!1,type:{name:"Product | null | undefined"}},item:{defaultValue:null,description:"",name:"item",required:!1,type:{name:"Nullable>"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/reservation-list/modal/reservation-details/reservation-details.tsx#reservationdetails"]={docgenInfo:reservationdetails.__docgenInfo,name:"reservationdetails",path:"src/apps/reservation-list/modal/reservation-details/reservation-details.tsx#reservationdetails"})}catch(__react_docgen_typescript_loader_error){}},"./src/apps/reservation-list/reservation-material/reservation-info.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>reservation_info});var react=__webpack_require__("./node_modules/react/index.js"),icon_check=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/basic/icon-check.svg"),icon_check_default=__webpack_require__.n(icon_check),useDeepCompareEffect=__webpack_require__("./node_modules/react-use/esm/useDeepCompareEffect.js"),utils_text=__webpack_require__("./src/core/utils/text.tsx"),general=__webpack_require__("./src/core/utils/helpers/general.ts"),helper=__webpack_require__("./src/components/reservation/helper.ts"),ArrowButton=__webpack_require__("./src/components/Buttons/ArrowButton.tsx"),status_circle_icon=__webpack_require__("./src/apps/loan-list/materials/utils/status-circle-icon.tsx");const InfoLabel=({dataCy="info-label",children})=>react.createElement("div",{"data-cy":dataCy,className:"status-label status-label--info"},children),labels_InfoLabel=InfoLabel;try{InfoLabel.displayName="InfoLabel",InfoLabel.__docgenInfo={description:"",displayName:"InfoLabel",props:{dataCy:{defaultValue:{value:"info-label"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/atoms/labels/InfoLabel.tsx#InfoLabel"]={docgenInfo:InfoLabel.__docgenInfo,name:"InfoLabel",path:"src/components/atoms/labels/InfoLabel.tsx#InfoLabel"})}catch(__react_docgen_typescript_loader_error){}const reservation_status=({reservationInfo,openReservationDetailsModal,color,percent,empty=!1,info,label,children,showArrow=!0,className})=>react.createElement("div",{className:className??"list-reservation__status"},react.createElement("div",{className:"list-reservation__counter color-secondary-gray"},!empty&&react.createElement(status_circle_icon.Z,{color,percent},children)),react.createElement("div",null,react.createElement("div",{className:"list-reservation__deadline"},info&&react.createElement(labels_InfoLabel,null,info),"string"==typeof label&&react.createElement("p",{className:"text-small-caption"},label),"string"!=typeof label&&label.map((localLabel=>react.createElement("p",{className:"text-small-caption"},localLabel))))),showArrow&&react.createElement(ArrowButton.Z,{arrowLabelledBy:`${(null==reservationInfo?void 0:reservationInfo.identifier)||(null==reservationInfo?void 0:reservationInfo.faust)}-title`,cursorPointer:!0,clickEventHandler:()=>{openReservationDetailsModal&&reservationInfo&&openReservationDetailsModal(reservationInfo)}}));try{reservationstatus.displayName="reservationstatus",reservationstatus.__docgenInfo={description:"",displayName:"reservationstatus",props:{reservationInfo:{defaultValue:null,description:"",name:"reservationInfo",required:!1,type:{name:"Nullable> | undefined"}},openReservationDetailsModal:{defaultValue:null,description:"",name:"openReservationDetailsModal",required:!1,type:{name:"((reservation: Nullable>) => void) | undefined"}},color:{defaultValue:null,description:"",name:"color",required:!1,type:{name:"string | undefined"}},empty:{defaultValue:{value:"false"},description:"",name:"empty",required:!1,type:{name:"boolean | undefined"}},percent:{defaultValue:null,description:"",name:"percent",required:!0,type:{name:"number"}},info:{defaultValue:null,description:"",name:"info",required:!1,type:{name:"string | undefined"}},label:{defaultValue:null,description:"",name:"label",required:!0,type:{name:"string | string[]"}},showArrow:{defaultValue:{value:"true"},description:"",name:"showArrow",required:!1,type:{name:"boolean | undefined"}},className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/reservation-list/reservation-material/reservation-status.tsx#reservationstatus"]={docgenInfo:reservationstatus.__docgenInfo,name:"reservationstatus",path:"src/apps/reservation-list/reservation-material/reservation-status.tsx#reservationstatus"})}catch(__react_docgen_typescript_loader_error){}var utils_branches=__webpack_require__("./src/core/utils/branches.tsx"),helpers=__webpack_require__("./src/apps/reservation-list/utils/helpers.ts");const reservation_info=({reservationInfo,openReservationDetailsModal,showStatusCircleIcon=!0,showArrow=!0,reservationStatusClassNameOverride,isDigital})=>{const t=(0,utils_text.X)(),{state,expiryDate,pickupBranch,numberInQueue,pickupDeadline,pickupNumber}=reservationInfo,[pickupLibrary,setPickupLibrary]=(0,react.useState)(""),{success}=(0,general.EC)(),branches=(0,utils_branches.mc)("blacklistedPickupBranchesConfig");(0,useDeepCompareEffect.Z)((()=>{branches&&pickupBranch&&setPickupLibrary((0,helper.Sp)(pickupBranch,branches))}),[branches,pickupBranch]);const getInfo=()=>{if(!(isDigital&&expiryDate||pickupDeadline))return"";const date=(isDigital?expiryDate:pickupDeadline)??null;return date?(0,helpers.lo)({pickupBranch,date,t,isDigital}):""};if("readyForPickup"===state)return react.createElement(reservation_status,{color:success,percent:100,info:getInfo(),label:isDigital?[t("reservationListDigitalPickupText")]:[pickupLibrary,pickupNumber||""],reservationInfo,openReservationDetailsModal,empty:!showStatusCircleIcon,showArrow,className:reservationStatusClassNameOverride},react.createElement("div",{className:"counter__value color-secondary-gray"},react.createElement("img",{src:icon_check_default(),alt:""}),react.createElement("span",{className:"counter__label color-secondary-gray"},t("reservationListReadyText"))));if("reserved"===state&&pickupBranch&&numberInQueue&&expiryDate){const numberInLineLabel=1===numberInQueue?t("reservationListFirstInQueueText"):t("reservationListNumberInQueueText",{placeholders:{"@count":numberInQueue-1}});return react.createElement(reservation_status,{percent:1/numberInQueue*100,label:numberInLineLabel,reservationInfo,openReservationDetailsModal,empty:!showStatusCircleIcon,showArrow,className:reservationStatusClassNameOverride},react.createElement("span",{className:"counter__value color-secondary-gray"},numberInQueue),react.createElement("span",{className:"counter__label color-secondary-gray"},t("reservationListInQueueText")))}if("reserved"===state&&!pickupBranch&&pickupDeadline){const daysBetweenTodayAndPickup=(0,general.q7)(pickupDeadline);return react.createElement(reservation_status,{percent:(0,general.q7)(pickupDeadline)/100,label:t("reservationListAvailableInText",{placeholders:{"@count":(0,general.q7)(pickupDeadline)}}),reservationInfo,openReservationDetailsModal,empty:!showStatusCircleIcon,showArrow,className:reservationStatusClassNameOverride},react.createElement("span",{className:"counter__value color-secondary-gray"},(0,general.q7)(pickupDeadline)>0?daysBetweenTodayAndPickup:0," "),react.createElement("span",{className:"counter__label color-secondary-gray"},t(1===daysBetweenTodayAndPickup?"reservationListDayText":"reservationListDaysText")))}return react.createElement(reservation_status,{reservationInfo,openReservationDetailsModal,percent:0,label:"",empty:!0,className:reservationStatusClassNameOverride})};try{reservationinfo.displayName="reservationinfo",reservationinfo.__docgenInfo={description:"",displayName:"reservationinfo",props:{reservationInfo:{defaultValue:null,description:"",name:"reservationInfo",required:!0,type:{name:"Nullable>"}},openReservationDetailsModal:{defaultValue:null,description:"",name:"openReservationDetailsModal",required:!1,type:{name:"((reservation: Nullable>) => void) | undefined"}},showStatusCircleIcon:{defaultValue:{value:"true"},description:"",name:"showStatusCircleIcon",required:!1,type:{name:"boolean | undefined"}},showArrow:{defaultValue:{value:"true"},description:"",name:"showArrow",required:!1,type:{name:"boolean | undefined"}},reservationStatusClassNameOverride:{defaultValue:null,description:"",name:"reservationStatusClassNameOverride",required:!1,type:{name:"string | undefined"}},isDigital:{defaultValue:null,description:"",name:"isDigital",required:!0,type:{name:"boolean"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/reservation-list/reservation-material/reservation-info.tsx#reservationinfo"]={docgenInfo:reservationinfo.__docgenInfo,name:"reservationinfo",path:"src/apps/reservation-list/reservation-material/reservation-info.tsx#reservationinfo"})}catch(__react_docgen_typescript_loader_error){}},"./src/apps/reservation-list/utils/helpers.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{S1:()=>getReadyForPickup,TM:()=>sortByOldestPickupDeadline,cf:()=>sortByNumberInQueue,lo:()=>getReservationStatusInfoLabel});var _core_utils_helpers_date__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/core/utils/helpers/date.ts");const sortByOldestPickupDeadline=list=>list.sort(((objA,objB)=>new Date(objA.pickupDeadline||new Date).getTime()-new Date(objB.pickupDeadline||new Date).getTime())),sortByNumberInQueue=reservations=>[...reservations].sort(((a,b)=>(a.numberInQueue||0)-(b.numberInQueue||0))),getReadyForPickup=list=>list.filter((({state})=>"readyForPickup"===state)),infoLabelTextType_pickUpLatest="reservationPickUpLatestText",infoLabelTextType_loanBefore="reservationListLoanBeforeText",getReservationStatusInfoLabel=({pickupBranch,date,isDigital,t})=>t(pickupBranch?infoLabelTextType_pickUpLatest:infoLabelTextType_loanBefore,{placeholders:{"@date":(0,_core_utils_helpers_date__WEBPACK_IMPORTED_MODULE_0__.Tj)({date,isDigital})}})},"./src/apps/search-header/search-header.dev.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Search:()=>Search,default:()=>search_header_dev});var react=__webpack_require__("./node_modules/react/index.js"),story_header_dev_inc=__webpack_require__("./src/components/search-bar/story-header.dev.inc.tsx"),serviceUrlArgs=__webpack_require__("./src/core/storybook/serviceUrlArgs.ts"),utils_text=__webpack_require__("./src/core/utils/text.tsx"),url=__webpack_require__("./src/core/utils/url.tsx"),downshift_esm=__webpack_require__("./node_modules/downshift/dist/downshift.esm.js"),useClickAway=__webpack_require__("./node_modules/react-use/esm/useClickAway.js"),graphql=__webpack_require__("./src/core/dbc-gateway/generated/graphql.tsx"),search_bar=__webpack_require__("./src/components/search-bar/search-bar.tsx"),clsx=__webpack_require__("./node_modules/clsx/dist/clsx.mjs");function _extends(){return _extends=Object.assign?Object.assign.bind():function(target){for(var i=1;i{const t=(0,utils_text.X)();return react.createElement(react.Fragment,null,categoryData.map(((item,incorrectIndex)=>{var _item$work;const index=incorrectIndex+textAndMaterialDataLength;return react.createElement("li",_extends({className:(0,clsx.Z)("autosuggest__text-item text-body-medium-regular px-24",{"autosuggest__text-item--highlight":highlightedIndex===index}),key:item.term+((null===(_item$work=item.work)||void 0===_item$work?void 0:_item$work.workId)||"")},getItemProps({item,index}),{"data-cy":dataCy}),react.createElement("p",{className:"autosuggest__text text-body-medium-regular"},`${item.term} ${t("inText")}`),react.createElement("div",{className:"boxed-text text-tags noselect ml-8"},autosuggestCategoryList[incorrectIndex].render))})))};try{autosuggestcategory.displayName="autosuggestcategory",autosuggestcategory.__docgenInfo={description:"",displayName:"autosuggestcategory",props:{categoryData:{defaultValue:null,description:"",name:"categoryData",required:!0,type:{name:'{ __typename?: "Suggestion" | undefined; type: SuggestionType; term: string; work?: { __typename?: "Work" | undefined; workId: string; titles: { __typename?: "WorkTitles" | undefined; main: string[]; }; creators: ({ ...; } | { ...; })[]; manifestations: { ...; }; } | null | undefined; }[]'}},getItemProps:{defaultValue:null,description:"",name:"getItemProps",required:!0,type:{name:'(options: UseComboboxGetItemPropsOptions<{ __typename?: "Suggestion" | undefined; type: SuggestionType; term: string; work?: { __typename?: "Work" | undefined; workId: string; titles: { __typename?: "WorkTitles" | undefined; main: string[]; }; creators: ({ ...; } | { ...; })[]; manifestations: { ...; }; } | null | u...'}},highlightedIndex:{defaultValue:null,description:"",name:"highlightedIndex",required:!0,type:{name:"number"}},textAndMaterialDataLength:{defaultValue:null,description:"",name:"textAndMaterialDataLength",required:!0,type:{name:"number"}},autosuggestCategoryList:{defaultValue:null,description:"",name:"autosuggestCategoryList",required:!0,type:{name:"AutosuggestCategoryList[]"}},dataCy:{defaultValue:{value:"autosuggest-category-item"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/autosuggest-category/autosuggest-category.tsx#autosuggestcategory"]={docgenInfo:autosuggestcategory.__docgenInfo,name:"autosuggestcategory",path:"src/components/autosuggest-category/autosuggest-category.tsx#autosuggestcategory"})}catch(__react_docgen_typescript_loader_error){}var cover=__webpack_require__("./src/components/cover/cover.tsx"),general=__webpack_require__("./src/core/utils/helpers/general.ts"),helper=__webpack_require__("./src/apps/material/helper.ts");function autosuggest_material_extends(){return autosuggest_material_extends=Object.assign?Object.assign.bind():function(target){for(var i=1;i{const t=(0,utils_text.X)();return react.createElement(react.Fragment,null,materialData.map(((item,incorrectIndex)=>{var _item$work,_item$work2,_item$work3;const index=incorrectIndex+textDataLength,{work}=item;if(!work)return null;const{creators}=work,authors=(0,general.TG)(creators),manifestationLanguageIsoCode=(null===(_item$work=item.work)||void 0===_item$work?void 0:_item$work.manifestations.bestRepresentation)&&(0,helper.hQ)([item.work.manifestations.bestRepresentation]);return react.createElement("li",autosuggest_material_extends({className:(0,clsx.Z)("autosuggest__material-item",{"autosuggest__material-item--two":2===materialData.length,"autosuggest__material-item--one":1===materialData.length,"autosuggest__material-item--highlight":highlightedIndex===index}),key:null===(_item$work2=item.work)||void 0===_item$work2?void 0:_item$work2.workId},getItemProps({item,index}),{"data-cy":dataCy}),react.createElement("div",{className:"autosuggest__material-card"},item.work&&react.createElement(cover.Y,{animate:!0,size:"xsmall",id:item.work.manifestations.bestRepresentation.pid,shadow:!0}),react.createElement("div",{className:"autosuggest__info"},react.createElement("div",{lang:manifestationLanguageIsoCode,className:"text-body-medium-medium autosuggest__title"},null===(_item$work3=item.work)||void 0===_item$work3?void 0:_item$work3.titles.main[0]),react.createElement("div",{className:"text-body-small-regular autosuggest__author"},(0,general.b7)(authors,t)))))})))};try{autosuggestmaterial.displayName="autosuggestmaterial",autosuggestmaterial.__docgenInfo={description:"",displayName:"autosuggestmaterial",props:{materialData:{defaultValue:null,description:"",name:"materialData",required:!0,type:{name:'[] | { __typename?: "Suggestion" | undefined; type: SuggestionType; term: string; work?: { __typename?: "Work" | undefined; workId: string; titles: { __typename?: "WorkTitles" | undefined; main: string[]; }; creators: ({ ...; } | { ...; })[]; manifestations: { ...; }; } | null | undefined; }[]'}},getItemProps:{defaultValue:null,description:"",name:"getItemProps",required:!0,type:{name:'(options: UseComboboxGetItemPropsOptions<{ __typename?: "Suggestion" | undefined; type: SuggestionType; term: string; work?: { __typename?: "Work" | undefined; workId: string; titles: { __typename?: "WorkTitles" | undefined; main: string[]; }; creators: ({ ...; } | { ...; })[]; manifestations: { ...; }; } | null | u...'}},highlightedIndex:{defaultValue:null,description:"",name:"highlightedIndex",required:!0,type:{name:"number"}},textDataLength:{defaultValue:null,description:"",name:"textDataLength",required:!0,type:{name:"number"}},dataCy:{defaultValue:{value:"autosuggest-material-item"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/autosuggest-material/autosuggest-material.tsx#autosuggestmaterial"]={docgenInfo:autosuggestmaterial.__docgenInfo,name:"autosuggestmaterial",path:"src/components/autosuggest-material/autosuggest-material.tsx#autosuggestmaterial"})}catch(__react_docgen_typescript_loader_error){}function autosuggest_text_item_extends(){return autosuggest_text_item_extends=Object.assign?Object.assign.bind():function(target){for(var i=1;i{var _item$work,_item$work2;const isoLang=(null===(_item$work=item.work)||void 0===_item$work?void 0:_item$work.manifestations.bestRepresentation)&&(0,helper.hQ)([item.work.manifestations.bestRepresentation]),t=(0,utils_text.X)();return react.createElement(react.Fragment,null,react.createElement("li",autosuggest_text_item_extends({className:classes.textSuggestion,key:generateItemId(item)},getItemProps({item,index}),{"data-cy":dataCy,lang:isoLang}),react.createElement("p",{className:"autosuggest__text text-body-medium-regular"},item.type===graphql.sW.Creator?`${item.term} (${t("stringSuggestionAuthorText")})`:null,item.type===graphql.sW.Subject?`${item.term} (${t("stringSuggestionTopicText")})`:null,item.type===graphql.sW.Composit?`${null===(_item$work2=item.work)||void 0===_item$work2?void 0:_item$work2.titles.main} (${t("stringSuggestionWorkText")})`:null,item.type===graphql.sW.Title?`${item.term} (${t("stringSuggestionWorkText")})`:null)))};try{autosuggesttextitem.displayName="autosuggesttextitem",autosuggesttextitem.__docgenInfo={description:"",displayName:"autosuggesttextitem",props:{classes:{defaultValue:null,description:"",name:"classes",required:!0,type:{name:"{ textSuggestion: string; }"}},item:{defaultValue:null,description:"",name:"item",required:!0,type:{name:'{ __typename?: "Suggestion" | undefined; type: SuggestionType; term: string; work?: { __typename?: "Work" | undefined; workId: string; titles: { __typename?: "WorkTitles" | undefined; main: string[]; }; creators: ({ ...; } | { ...; })[]; manifestations: { ...; }; } | null | undefined; }'}},index:{defaultValue:null,description:"",name:"index",required:!0,type:{name:"number"}},generateItemId:{defaultValue:null,description:"",name:"generateItemId",required:!0,type:{name:'(objectItem: { __typename?: "Suggestion" | undefined; type: SuggestionType; term: string; work?: { __typename?: "Work" | undefined; workId: string; titles: { __typename?: "WorkTitles" | undefined; main: string[]; }; creators: ({ ...; } | { ...; })[]; manifestations: { ...; }; } | null | undefined; }) => string'}},getItemProps:{defaultValue:null,description:"",name:"getItemProps",required:!0,type:{name:'(options: UseComboboxGetItemPropsOptions<{ __typename?: "Suggestion" | undefined; type: SuggestionType; term: string; work?: { __typename?: "Work" | undefined; workId: string; titles: { __typename?: "WorkTitles" | undefined; main: string[]; }; creators: ({ ...; } | { ...; })[]; manifestations: { ...; }; } | null | u...'}},dataCy:{defaultValue:{value:"autosuggest-text-item"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/autosuggest-text/autosuggest-text-item.tsx#autosuggesttextitem"]={docgenInfo:autosuggesttextitem.__docgenInfo,name:"autosuggesttextitem",path:"src/components/autosuggest-text/autosuggest-text-item.tsx#autosuggesttextitem"})}catch(__react_docgen_typescript_loader_error){}function itemToString(objectItem){var _objectItem$work;return objectItem.type===graphql.sW.Composit?(null===(_objectItem$work=objectItem.work)||void 0===_objectItem$work?void 0:_objectItem$work.titles.main[0])||"incomplete data":objectItem.term}function generateItemId(objectItem){return`${objectItem.__typename}-${itemToString(objectItem)}-${Math.random().toString(36)}`.replace(/\s+/g,"-")}const AutosuggestText=({textData,highlightedIndex,getItemProps})=>react.createElement(react.Fragment,null,textData.map(((item,index)=>{const classes={textSuggestion:(0,clsx.Z)("autosuggest__text-item text-body-medium-regular px-24",{"autosuggest__text-item--highlight":highlightedIndex===index})};return react.createElement(autosuggest_text_item,{classes,item,index,generateItemId,getItemProps})})));try{itemToString.displayName="itemToString",itemToString.__docgenInfo={description:"",displayName:"itemToString",props:{__typename:{defaultValue:null,description:"",name:"__typename",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"Suggestion"'}]}},type:{defaultValue:null,description:"",name:"type",required:!0,type:{name:"enum",value:[{value:'"COMPOSIT"'},{value:'"CREATOR"'},{value:'"SUBJECT"'},{value:'"TITLE"'}]}},term:{defaultValue:null,description:"",name:"term",required:!0,type:{name:"string"}},work:{defaultValue:null,description:"",name:"work",required:!1,type:{name:'{ __typename?: "Work" | undefined; workId: string; titles: { __typename?: "WorkTitles" | undefined; main: string[]; }; creators: ({ __typename?: "Corporation" | undefined; display: string; } | { ...; })[]; manifestations: { ...; }; } | null | undefined'}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/autosuggest-text/autosuggest-text.tsx#itemToString"]={docgenInfo:itemToString.__docgenInfo,name:"itemToString",path:"src/components/autosuggest-text/autosuggest-text.tsx#itemToString"})}catch(__react_docgen_typescript_loader_error){}try{generateItemId.displayName="generateItemId",generateItemId.__docgenInfo={description:"",displayName:"generateItemId",props:{__typename:{defaultValue:null,description:"",name:"__typename",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"Suggestion"'}]}},type:{defaultValue:null,description:"",name:"type",required:!0,type:{name:"enum",value:[{value:'"COMPOSIT"'},{value:'"CREATOR"'},{value:'"SUBJECT"'},{value:'"TITLE"'}]}},term:{defaultValue:null,description:"",name:"term",required:!0,type:{name:"string"}},work:{defaultValue:null,description:"",name:"work",required:!1,type:{name:'{ __typename?: "Work" | undefined; workId: string; titles: { __typename?: "WorkTitles" | undefined; main: string[]; }; creators: ({ __typename?: "Corporation" | undefined; display: string; } | { ...; })[]; manifestations: { ...; }; } | null | undefined'}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/autosuggest-text/autosuggest-text.tsx#generateItemId"]={docgenInfo:generateItemId.__docgenInfo,name:"generateItemId",path:"src/components/autosuggest-text/autosuggest-text.tsx#generateItemId"})}catch(__react_docgen_typescript_loader_error){}try{AutosuggestText.displayName="AutosuggestText",AutosuggestText.__docgenInfo={description:"",displayName:"AutosuggestText",props:{textData:{defaultValue:null,description:"",name:"textData",required:!0,type:{name:'{ __typename?: "Suggestion" | undefined; type: SuggestionType; term: string; work?: { __typename?: "Work" | undefined; workId: string; titles: { __typename?: "WorkTitles" | undefined; main: string[]; }; creators: ({ ...; } | { ...; })[]; manifestations: { ...; }; } | null | undefined; }[]'}},highlightedIndex:{defaultValue:null,description:"",name:"highlightedIndex",required:!0,type:{name:"number"}},getItemProps:{defaultValue:null,description:"",name:"getItemProps",required:!0,type:{name:'(options: UseComboboxGetItemPropsOptions<{ __typename?: "Suggestion" | undefined; type: SuggestionType; term: string; work?: { __typename?: "Work" | undefined; workId: string; titles: { __typename?: "WorkTitles" | undefined; main: string[]; }; creators: ({ ...; } | { ...; })[]; manifestations: { ...; }; } | null | u...'}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/autosuggest-text/autosuggest-text.tsx#AutosuggestText"]={docgenInfo:AutosuggestText.__docgenInfo,name:"AutosuggestText",path:"src/components/autosuggest-text/autosuggest-text.tsx#AutosuggestText"})}catch(__react_docgen_typescript_loader_error){}try{autosuggesttext.displayName="autosuggesttext",autosuggesttext.__docgenInfo={description:"",displayName:"autosuggesttext",props:{textData:{defaultValue:null,description:"",name:"textData",required:!0,type:{name:'{ __typename?: "Suggestion" | undefined; type: SuggestionType; term: string; work?: { __typename?: "Work" | undefined; workId: string; titles: { __typename?: "WorkTitles" | undefined; main: string[]; }; creators: ({ ...; } | { ...; })[]; manifestations: { ...; }; } | null | undefined; }[]'}},highlightedIndex:{defaultValue:null,description:"",name:"highlightedIndex",required:!0,type:{name:"number"}},getItemProps:{defaultValue:null,description:"",name:"getItemProps",required:!0,type:{name:'(options: UseComboboxGetItemPropsOptions<{ __typename?: "Suggestion" | undefined; type: SuggestionType; term: string; work?: { __typename?: "Work" | undefined; workId: string; titles: { __typename?: "WorkTitles" | undefined; main: string[]; }; creators: ({ ...; } | { ...; })[]; manifestations: { ...; }; } | null | u...'}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/autosuggest-text/autosuggest-text.tsx#autosuggesttext"]={docgenInfo:autosuggesttext.__docgenInfo,name:"autosuggesttext",path:"src/components/autosuggest-text/autosuggest-text.tsx#autosuggesttext"})}catch(__react_docgen_typescript_loader_error){}function autosuggest_extends(){return autosuggest_extends=Object.assign?Object.assign.bind():function(target){for(var i=1;i{const t=(0,utils_text.X)();return isLoading&&!textData?react.createElement("ul",{className:"autosuggest pb-16","data-cy":dataCy},react.createElement("li",{className:"ml-24"},t("loadingText"))):react.createElement(react.Fragment,null,react.createElement("ul",autosuggest_extends({className:"autosuggest pb-16"},getMenuProps(),{style:isOpen?{}:{display:"none"},"data-cy":dataCy}),react.createElement(AutosuggestText,{textData,highlightedIndex,getItemProps}),materialData.length>0&&react.createElement(autosuggest_material,{materialData,getItemProps,highlightedIndex,textDataLength:textData.length}),categoryData&&categoryData.length>0&&react.createElement(autosuggest_category,{categoryData,getItemProps,highlightedIndex,textAndMaterialDataLength:textData.length+materialData.length,autosuggestCategoryList})))};try{Autosuggest.displayName="Autosuggest",Autosuggest.__docgenInfo={description:"",displayName:"Autosuggest",props:{textData:{defaultValue:null,description:"",name:"textData",required:!0,type:{name:'{ __typename?: "Suggestion" | undefined; type: SuggestionType; term: string; work?: { __typename?: "Work" | undefined; workId: string; titles: { __typename?: "WorkTitles" | undefined; main: string[]; }; creators: ({ ...; } | { ...; })[]; manifestations: { ...; }; } | null | undefined; }[]'}},materialData:{defaultValue:null,description:"",name:"materialData",required:!0,type:{name:'{ __typename?: "Suggestion" | undefined; type: SuggestionType; term: string; work?: { __typename?: "Work" | undefined; workId: string; titles: { __typename?: "WorkTitles" | undefined; main: string[]; }; creators: ({ ...; } | { ...; })[]; manifestations: { ...; }; } | null | undefined; }[]'}},status:{defaultValue:null,description:"",name:"status",required:!0,type:{name:"string"}},getMenuProps:{defaultValue:null,description:"",name:"getMenuProps",required:!0,type:{name:"(options?: UseComboboxGetMenuPropsOptions | undefined, otherOptions?: GetPropsCommonOptions | undefined) => any"}},highlightedIndex:{defaultValue:null,description:"",name:"highlightedIndex",required:!0,type:{name:"number"}},getItemProps:{defaultValue:null,description:"",name:"getItemProps",required:!0,type:{name:'(options: UseComboboxGetItemPropsOptions<{ __typename?: "Suggestion" | undefined; type: SuggestionType; term: string; work?: { __typename?: "Work" | undefined; workId: string; titles: { __typename?: "WorkTitles" | undefined; main: string[]; }; creators: ({ ...; } | { ...; })[]; manifestations: { ...; }; } | null | u...'}},isOpen:{defaultValue:null,description:"",name:"isOpen",required:!0,type:{name:"boolean"}},categoryData:{defaultValue:null,description:"",name:"categoryData",required:!1,type:{name:'{ __typename?: "Suggestion" | undefined; type: SuggestionType; term: string; work?: { __typename?: "Work" | undefined; workId: string; titles: { __typename?: "WorkTitles" | undefined; main: string[]; }; creators: ({ ...; } | { ...; })[]; manifestations: { ...; }; } | null | undefined; }[] | undefined'}},autosuggestCategoryList:{defaultValue:null,description:"",name:"autosuggestCategoryList",required:!0,type:{name:"AutosuggestCategoryList[]"}},isLoading:{defaultValue:null,description:"",name:"isLoading",required:!0,type:{name:"boolean"}},dataCy:{defaultValue:{value:"autosuggest"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/autosuggest/autosuggest.tsx#Autosuggest"]={docgenInfo:Autosuggest.__docgenInfo,name:"Autosuggest",path:"src/components/autosuggest/autosuggest.tsx#Autosuggest"})}catch(__react_docgen_typescript_loader_error){}var helpers_url=__webpack_require__("./src/core/utils/helpers/url.ts"),material_type=__webpack_require__("./src/core/utils/types/material-type.ts");function findNonWorkSuggestion(originalData){return originalData.find((item=>item.type!==graphql.sW.Title&&item.type!==graphql.sW.Composit))}var useStatistics=__webpack_require__("./src/core/statistics/useStatistics.ts"),statistics=__webpack_require__("./src/core/statistics/statistics.ts");const HeaderDropdown=({redirectTo,setIsHeaderDropdownOpen,headerDropdownRef,advancedSearchUrl})=>{const t=(0,utils_text.X)();return react.createElement("div",{className:"header__menu-dropdown","data-cy":"search-header-dropdown"},react.createElement("ul",null,react.createElement("li",null,react.createElement("button",{ref:headerDropdownRef,type:"button",role:"menuitem",className:"header__menu-dropdown-item cursor-pointer",onClick:()=>redirectTo(advancedSearchUrl),onKeyUp:e=>"Enter"===e.key?redirectTo(advancedSearchUrl):"ArrowDown"===e.key||"ArrowUp"===e.key||"Escape"===e.key?setIsHeaderDropdownOpen(!1):null,onBlur:()=>setIsHeaderDropdownOpen(!1)},t("headerDropdownItemAdvancedSearchText")))))},header_dropdown_HeaderDropdown=HeaderDropdown;try{HeaderDropdown.displayName="HeaderDropdown",HeaderDropdown.__docgenInfo={description:"",displayName:"HeaderDropdown",props:{redirectTo:{defaultValue:null,description:"",name:"redirectTo",required:!0,type:{name:"(url: URL) => void"}},setIsHeaderDropdownOpen:{defaultValue:null,description:"",name:"setIsHeaderDropdownOpen",required:!0,type:{name:"Dispatch>"}},headerDropdownRef:{defaultValue:null,description:"",name:"headerDropdownRef",required:!0,type:{name:"RefObject"}},advancedSearchUrl:{defaultValue:null,description:"",name:"advancedSearchUrl",required:!0,type:{name:"URL"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/header-dropdown/HeaderDropdown.tsx#HeaderDropdown"]={docgenInfo:HeaderDropdown.__docgenInfo,name:"HeaderDropdown",path:"src/components/header-dropdown/HeaderDropdown.tsx#HeaderDropdown"})}catch(__react_docgen_typescript_loader_error){}const search_header=()=>{const t=(0,utils_text.X)(),u=(0,url.J_)(),searchUrl=u("searchUrl"),materialUrl=u("materialUrl"),advancedSearchUrl=u("advancedSearchUrl"),[q,setQ]=(0,react.useState)(""),[qWithoutQuery,setQWithoutQuery]=(0,react.useState)(q),[suggestItems,setSuggestItems]=(0,react.useState)([]),[currentlySelectedItem,setCurrentlySelectedItem]=(0,react.useState)(""),[isAutosuggestOpen,setIsAutosuggestOpen]=(0,react.useState)(!1),{data,isLoading,status}=(0,graphql.UC)({q},{enabled:q.length>=3}),[isHeaderDropdownOpen,setIsHeaderDropdownOpen]=(0,react.useState)(!1),autosuggestCategoryList=[{render:t("autosuggestBookCategoryText"),term:material_type.eS.book,facet:"materialTypes"},{render:t("autosuggestEbookCategoryText"),term:material_type.eS.ebook,facet:"materialTypes"},{render:t("autosuggestFilmCategoryText"),term:material_type.eS.movie,facet:"workTypes"},{render:t("autosuggestAudioBookCategoryText"),term:material_type.eS.audioBook,facet:"materialTypes"},{render:t("autosuggestMusicCategoryText"),term:material_type.eS.music,facet:"workTypes"},{render:t("autosuggestGameCategoryText"),term:material_type.eS.game,facet:"workTypes"},{render:t("autosuggestAnimatedSeriesCategoryText"),term:material_type.eS.animatedSeries,facet:"materialTypes"}],[highlightedIndexAfterClick,setHighlightedIndexAfterClick]=(0,react.useState)(null),{track}=(0,useStatistics.T)();(0,react.useEffect)((()=>{if(data){const arrayOfResults=data.suggest.result;setSuggestItems(arrayOfResults)}}),[data]);const originalData=suggestItems,textData=[],materialData=[],categoryData=[];let nonWorkSuggestion,orderedData=[];function determineSuggestionTerm(suggestion){var _suggestion$work;return suggestion.type===graphql.sW.Composit?(null===(_suggestion$work=suggestion.work)||void 0===_suggestion$work?void 0:_suggestion$work.titles.main[0])||"incomplete data":suggestion.term}originalData&&(nonWorkSuggestion=findNonWorkSuggestion(originalData),originalData.forEach((item=>{(item.type===graphql.sW.Composit||item.type===graphql.sW.Title)&&item.work&&materialData.length<3?materialData.push(item):textData.push(item)})),orderedData=textData.concat(materialData),nonWorkSuggestion&&(autosuggestCategoryList.forEach((()=>{categoryData.push(nonWorkSuggestion)})),orderedData=orderedData.concat(categoryData))),(0,react.useEffect)((()=>{setIsAutosuggestOpen(!!data)}),[data]);const{getMenuProps,highlightedIndex,getItemProps,getInputProps,getLabelProps}=(0,downshift_esm.Kb)({isOpen:isAutosuggestOpen,items:orderedData,inputValue:qWithoutQuery,defaultIsOpen:!1,onInputValueChange:function handleInputValueChange(changes){var _selectedItem$work;const{inputValue,selectedItem,type}=changes;if(void 0!==inputValue){if(type===downshift_esm.Kb.stateChangeTypes.InputChange)return setQ(inputValue),void setQWithoutQuery(inputValue);if(setQWithoutQuery(inputValue),selectedItem&&(type===downshift_esm.Kb.stateChangeTypes.ItemClick||type===downshift_esm.Kb.stateChangeTypes.InputKeyDownEnter))if(null!==(_selectedItem$work=selectedItem.work)&&void 0!==_selectedItem$work&&_selectedItem$work.workId&&function isDisplayedAsWorkSuggestion(selectedItem,currentMaterialData){const dataWithWorkId=currentMaterialData.filter((item=>{var _item$work;return(null===(_item$work=item.work)||void 0===_item$work?void 0:_item$work.workId)===(null==selectedItem?void 0:selectedItem.workId)}));return Boolean(dataWithWorkId.length)}(selectedItem.work,materialData))track("click",{id:statistics.h.autosuggestClick.id,name:statistics.h.autosuggestClick.name,trackedData:selectedItem.work.titles.main.join(", ")}).then((()=>{var _selectedItem$work2;(0,helpers_url.gB)((0,helpers_url.WO)(materialUrl,null===(_selectedItem$work2=selectedItem.work)||void 0===_selectedItem$work2?void 0:_selectedItem$work2.workId))}));else if(nonWorkSuggestion&&changes.selectedItem&&nonWorkSuggestion.term===changes.selectedItem.term&&highlightedIndexAfterClick&&highlightedIndexAfterClick>=textData.concat(materialData).length){const highlightedCategoryIndex=highlightedIndexAfterClick-(textData.length+materialData.length),selectedItemString=determineSuggestionTerm(changes.selectedItem);track("click",{id:statistics.h.autosuggestClick.id,name:statistics.h.autosuggestClick.name,trackedData:selectedItemString}).then((()=>{const{term,facet}=autosuggestCategoryList[highlightedCategoryIndex];(0,helpers_url.gB)((0,helpers_url.U2)({searchUrl,selectedItemString,filter:{[facet]:term}}))}))}else track("click",{id:statistics.h.autosuggestClick.id,name:statistics.h.autosuggestClick.name,trackedData:determineSuggestionTerm(selectedItem)}).then((()=>{(0,helpers_url.gB)((0,helpers_url.Nt)(searchUrl,determineSuggestionTerm(selectedItem)))}))}},onSelectedItemChange:function handleSelectedItemChange(changes){const{selectedItem}=changes;selectedItem&&setCurrentlySelectedItem(determineSuggestionTerm(selectedItem))},selectedItem:currentlySelectedItem,onHighlightedIndexChange:function handleHighlightedIndexChange(changes){const{type}=changes;let{highlightedIndex}=changes;if(type===downshift_esm.Kb.stateChangeTypes.MenuMouseLeave)return;if(type===downshift_esm.Kb.stateChangeTypes.ItemMouseMove)return void(void 0!==highlightedIndex&&highlightedIndex>-1&&setHighlightedIndexAfterClick(highlightedIndex));if(type!==downshift_esm.Kb.stateChangeTypes.InputKeyDownArrowDown&&type!==downshift_esm.Kb.stateChangeTypes.InputKeyDownArrowUp&&type!==downshift_esm.Kb.stateChangeTypes.InputKeyDownEnter||void 0!==highlightedIndex&&highlightedIndex>-1&&setHighlightedIndexAfterClick(highlightedIndex),highlightedIndex&&highlightedIndex<0)return void setIsAutosuggestOpen(!1);highlightedIndex||(highlightedIndex=0);const currentItemValue=determineSuggestionTerm(orderedData[highlightedIndex]);type!==downshift_esm.Kb.stateChangeTypes.InputKeyDownArrowDown&&type!==downshift_esm.Kb.stateChangeTypes.InputKeyDownArrowUp?setQ(currentItemValue):setQWithoutQuery(currentItemValue)}}),headerDropdownRef=react.useRef(null);(0,useClickAway.Z)(headerDropdownRef,(()=>{setTimeout((()=>{setIsHeaderDropdownOpen(!1)}),100)}));const[redirectUrl,setRedirectUrl]=(0,react.useState)((0,helpers_url.Nt)(searchUrl,q));return(0,react.useEffect)((()=>{'"'===q.trim().charAt(0)&&'"'===q.trim().charAt(q.length-1)&&'""'!==q.trim()&&'"'!==q.trim()?setRedirectUrl((0,helpers_url.Hg)(advancedSearchUrl,q)):setRedirectUrl((0,helpers_url.Nt)(searchUrl,q))}),[q,advancedSearchUrl,searchUrl]),react.createElement("div",{className:"header__menu-second"},react.createElement("div",{className:"header__menu-search"},react.createElement(search_bar.Z,{q,getInputProps,getLabelProps,qWithoutQuery,setQWithoutQuery,isHeaderDropdownOpen,setIsHeaderDropdownOpen,redirectUrl}),react.createElement(Autosuggest,{textData,materialData,categoryData,status,getMenuProps,highlightedIndex,getItemProps,isOpen:isAutosuggestOpen,autosuggestCategoryList,isLoading}),isHeaderDropdownOpen&&react.createElement(header_dropdown_HeaderDropdown,{redirectTo:helpers_url.gB,setIsHeaderDropdownOpen,headerDropdownRef,advancedSearchUrl})))};try{searchheader.displayName="searchheader",searchheader.__docgenInfo={description:"",displayName:"searchheader",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/search-header/search-header.tsx#searchheader"]={docgenInfo:searchheader.__docgenInfo,name:"searchheader",path:"src/apps/search-header/search-header.tsx#searchheader"})}catch(__react_docgen_typescript_loader_error){}const search_header_entry=(0,url.XL)((0,utils_text.z)((()=>react.createElement(search_header,null))));try{searchheaderentry.displayName="searchheaderentry",searchheaderentry.__docgenInfo={description:"",displayName:"searchheaderentry",props:{alertErrorCloseText:{defaultValue:null,description:"",name:"alertErrorCloseText",required:!0,type:{name:"string"}},alertErrorMessageText:{defaultValue:null,description:"",name:"alertErrorMessageText",required:!0,type:{name:"string"}},searchHeaderIconAltText:{defaultValue:null,description:"",name:"searchHeaderIconAltText",required:!1,type:{name:"string | undefined"}},searchHeaderInputLabelText:{defaultValue:null,description:"",name:"searchHeaderInputLabelText",required:!1,type:{name:"string | undefined"}},inputPlaceholderText:{defaultValue:null,description:"",name:"inputPlaceholderText",required:!1,type:{name:"string | undefined"}},stringSuggestionAuthorText:{defaultValue:null,description:"",name:"stringSuggestionAuthorText",required:!1,type:{name:"string | undefined"}},stringSuggestionWorkText:{defaultValue:null,description:"",name:"stringSuggestionWorkText",required:!1,type:{name:"string | undefined"}},stringSuggestionTopicText:{defaultValue:null,description:"",name:"stringSuggestionTopicText",required:!1,type:{name:"string | undefined"}},searchHeaderDropdownText:{defaultValue:null,description:"",name:"searchHeaderDropdownText",required:!0,type:{name:"string"}},etAlText:{defaultValue:null,description:"",name:"etAlText",required:!1,type:{name:"string | undefined"}},autosuggestBookCategoryText:{defaultValue:null,description:"",name:"autosuggestBookCategoryText",required:!0,type:{name:"string"}},autosuggestEbookCategoryText:{defaultValue:null,description:"",name:"autosuggestEbookCategoryText",required:!0,type:{name:"string"}},autosuggestFilmCategoryText:{defaultValue:null,description:"",name:"autosuggestFilmCategoryText",required:!0,type:{name:"string"}},autosuggestAudioBookCategoryText:{defaultValue:null,description:"",name:"autosuggestAudioBookCategoryText",required:!0,type:{name:"string"}},autosuggestMusicCategoryText:{defaultValue:null,description:"",name:"autosuggestMusicCategoryText",required:!0,type:{name:"string"}},autosuggestGameCategoryText:{defaultValue:null,description:"",name:"autosuggestGameCategoryText",required:!0,type:{name:"string"}},autosuggestAnimatedSeriesCategoryText:{defaultValue:null,description:"",name:"autosuggestAnimatedSeriesCategoryText",required:!0,type:{name:"string"}},inText:{defaultValue:null,description:"",name:"inText",required:!0,type:{name:"string"}},loadingText:{defaultValue:null,description:"",name:"loadingText",required:!0,type:{name:"string"}},searchNoValidCharactersErrorText:{defaultValue:null,description:"",name:"searchNoValidCharactersErrorText",required:!0,type:{name:"string"}},headerDropdownItemAdvancedSearchText:{defaultValue:null,description:"",name:"headerDropdownItemAdvancedSearchText",required:!0,type:{name:"string"}},materialUrl:{defaultValue:null,description:"",name:"materialUrl",required:!0,type:{name:"string"}},searchUrl:{defaultValue:null,description:"",name:"searchUrl",required:!0,type:{name:"string"}},advancedSearchUrl:{defaultValue:null,description:"",name:"advancedSearchUrl",required:!0,type:{name:"string"}},fbsBaseUrl:{defaultValue:null,description:"",name:"fbsBaseUrl",required:!0,type:{name:"string"}},loanListEreolenUrl:{defaultValue:null,description:"",name:"loanListEreolenUrl",required:!0,type:{name:"string"}},feesPageUrl:{defaultValue:null,description:"",name:"feesPageUrl",required:!0,type:{name:"string"}},publizonBaseUrl:{defaultValue:null,description:"",name:"publizonBaseUrl",required:!0,type:{name:"string"}},dplCmsBaseUrl:{defaultValue:null,description:"",name:"dplCmsBaseUrl",required:!0,type:{name:"string"}},coverBaseUrl:{defaultValue:null,description:"",name:"coverBaseUrl",required:!0,type:{name:"string"}},materialBaseUrl:{defaultValue:null,description:"",name:"materialBaseUrl",required:!0,type:{name:"string"}},fbiBaseUrl:{defaultValue:null,description:"",name:"fbiBaseUrl",required:!0,type:{name:"string"}},authUrl:{defaultValue:null,description:"",name:"authUrl",required:!0,type:{name:"string"}},ereolenHomepageUrl:{defaultValue:null,description:"",name:"ereolenHomepageUrl",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/search-header/search-header.entry.tsx#searchheaderentry"]={docgenInfo:searchheaderentry.__docgenInfo,name:"searchheaderentry",path:"src/apps/search-header/search-header.entry.tsx#searchheaderentry"})}catch(__react_docgen_typescript_loader_error){}const search_header_dev={title:"Apps / Header",component:search_header_entry,argTypes:{...serviceUrlArgs.Z,alertErrorCloseText:{name:"Alert error close text",defaultValue:"close",control:{type:"text"}},alertErrorMessageText:{name:"Alert error message text",defaultValue:"An error occurred",control:{type:"text"}},searchHeaderIconAltText:{name:"Alt text for search button image",defaultValue:"search icon",control:{type:"text"}},searchHeaderInputLabelText:{name:"Search header input label",defaultValue:"The main search field.",control:{type:"text"}},inputPlaceholderText:{name:"Input field placeholder",defaultValue:"Search among the library's materials",control:{type:"text"}},stringSuggestionAuthorText:{name:"String suggestion spec - author",defaultValue:"author",control:{type:"text"}},stringSuggestionWorkText:{name:"String suggestion spec - work",defaultValue:"material",control:{type:"text"}},stringSuggestionTopicText:{name:"String suggestion spec - topic",defaultValue:"topic",control:{type:"text"}},searchUrl:{name:"Base search url",defaultValue:"/search",control:{type:"text"}},advancedSearchUrl:{name:"Advanced search url",defaultValue:"/advanced-search",control:{type:"text"}},searchHeaderDropdownText:{name:"Search header advanced search icon label",defaultValue:"Dropdown with additional search functions",control:{type:"text"}},materialUrl:{name:"Base material page url",defaultValue:"/work/:workid",control:{type:"text"}},autosuggestBookCategoryText:{name:"Book category",defaultValue:"Books",control:{type:"text"}},autosuggestEbookCategoryText:{name:"Ebook category",defaultValue:"E-books",control:{type:"text"}},autosuggestFilmCategoryText:{name:"Movie category",defaultValue:"Movies",control:{type:"text"}},autosuggestAudioBookCategoryText:{name:"Audio book category",defaultValue:"Audio books",control:{type:"text"}},autosuggestMusicCategoryText:{name:"Music category",defaultValue:"Music",control:{type:"text"}},autosuggestGameCategoryText:{name:"Game category",defaultValue:"Games",control:{type:"text"}},autosuggestAnimatedSeriesCategoryText:{name:"Animated series category",defaultValue:"Animated series",control:{type:"text"}},inText:{name:"x 'in' y",defaultValue:"in",control:{type:"text"}},loadingText:{name:"Loading",defaultValue:"Loading",control:{type:"text"}},searchNoValidCharactersErrorText:{name:"Search non-whitespace character error",defaultValue:"Input must contain at least one non-whitespace character.",control:{type:"text"}},headerDropdownItemAdvancedSearchText:{name:"Advanced search menu text",defaultValue:"Advanced search",control:{type:"text"}}}},Search=args=>react.createElement(story_header_dev_inc.Z,{search:react.createElement(search_header_entry,args)})},"./src/apps/search-result/search-result-zero-hits.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_core_utils_text__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/core/utils/text.tsx");const __WEBPACK_DEFAULT_EXPORT__=({dataCy="search-result-zero-hits"})=>{const t=(0,_core_utils_text__WEBPACK_IMPORTED_MODULE_1__.X)();return react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"card-list-page","data-cy":dataCy},react__WEBPACK_IMPORTED_MODULE_0__.createElement("h1",{className:"text-header-h2 search-result-title my-112","data-cy":"search-result-zero-hits"},t("noSearchResultText")))};try{searchresultzerohits.displayName="searchresultzerohits",searchresultzerohits.__docgenInfo={description:"",displayName:"searchresultzerohits",props:{dataCy:{defaultValue:{value:"search-result-zero-hits"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/search-result/search-result-zero-hits.tsx#searchresultzerohits"]={docgenInfo:searchresultzerohits.__docgenInfo,name:"searchresultzerohits",path:"src/apps/search-result/search-result-zero-hits.tsx#searchresultzerohits"})}catch(__react_docgen_typescript_loader_error){}},"./src/apps/search-result/search-result.dev.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{SearchResult:()=>search_result_dev_SearchResult,default:()=>search_result_dev});var react=__webpack_require__("./node_modules/react/index.js"),serviceUrlArgs=__webpack_require__("./src/core/storybook/serviceUrlArgs.ts"),guarded_app=__webpack_require__("./src/components/guarded-app.tsx"),config=__webpack_require__("./src/core/utils/config.tsx"),general=__webpack_require__("./src/core/utils/helpers/general.ts"),utils_text=__webpack_require__("./src/core/utils/text.tsx"),url=__webpack_require__("./src/core/utils/url.tsx"),isEmpty=__webpack_require__("./node_modules/lodash/isEmpty.js"),isEmpty_default=__webpack_require__.n(isEmpty),useDeepCompareEffect=__webpack_require__("./node_modules/react-use/esm/useDeepCompareEffect.js"),clsx=__webpack_require__("./node_modules/clsx/dist/clsx.mjs");const SearchResultHeader=({hitcount,q})=>{const t=(0,utils_text.X)(),classes=(0,clsx.Z)(["text-header-h2","mb-16","search-result-title"]);return react.createElement("h1",{className:classes,"data-cy":"search-result-header"},`${t("showingResultsForText",{placeholders:{"@query":q}})} (${hitcount})`)},search_result_header_SearchResultHeader=(0,react.memo)(SearchResultHeader);try{SearchResultHeader.displayName="SearchResultHeader",SearchResultHeader.__docgenInfo={description:"",displayName:"SearchResultHeader",props:{hitcount:{defaultValue:null,description:"",name:"hitcount",required:!0,type:{name:"number"}},q:{defaultValue:null,description:"",name:"q",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/search-bar/search-result-header/SearchResultHeader.tsx#SearchResultHeader"]={docgenInfo:SearchResultHeader.__docgenInfo,name:"SearchResultHeader",path:"src/components/search-bar/search-result-header/SearchResultHeader.tsx#SearchResultHeader"})}catch(__react_docgen_typescript_loader_error){}var use_pager=__webpack_require__("./src/components/result-pager/use-pager.tsx"),SearchResultList=__webpack_require__("./src/components/card-item-list/SearchResultList.tsx"),graphql=__webpack_require__("./src/core/dbc-gateway/generated/graphql.tsx"),mapValues=__webpack_require__("./node_modules/lodash/mapValues.js"),mapValues_default=__webpack_require__.n(mapValues),branches=__webpack_require__("./src/core/utils/branches.tsx"),invalid_switch_case=__webpack_require__("./src/core/utils/helpers/invalid-switch-case.ts");const allFacetFields=[graphql.sl.MainLanguages,graphql.sl.AccessTypes,graphql.sl.ChildrenOrAdults,graphql.sl.Creators,graphql.sl.FictionNonfiction,graphql.sl.FictionalCharacters,graphql.sl.GenreAndForm,graphql.sl.MaterialTypesSpecific,graphql.sl.Subjects,graphql.sl.WorkTypes],createFilters=(facets,branchIdList)=>{return{...(filters=facets,Object.keys(filters).reduce(((acc,key)=>({...acc,[key]:Object.keys(filters[key])})),{})),...branchIdList?{branchId:branchIdList}:{}};var filters};function useGetFacets(query,filters){const cleanBranches=(0,branches.ZP)(),{data,isLoading}=(0,graphql.NF)({q:{all:query},facets:allFacetFields,facetLimit:10,filters:createFilters(filters,cleanBranches)},{keepPreviousData:!0,placeholderData:{search:{facets:(facets=allFacetFields,facets.map((facet=>({name:facet,values:[{key:"",term:""}]}))))}}});var facets;return{facets:(null==data?void 0:data.search.facets)||null,isLoading}}function getAllFilterPathsAsString(filterObject){const mappedFilterValues=mapValues_default()(filterObject,(filter=>Object.keys(filter))),filterNames=Object.keys(mappedFilterValues);let allFilterPathsAsString="";return filterNames.forEach((filterName=>{mappedFilterValues[filterName].forEach((filterValue=>{""!==allFilterPathsAsString&&(allFilterPathsAsString=allFilterPathsAsString.concat(";")),allFilterPathsAsString=allFilterPathsAsString.concat(`facet.${filterName}:${filterValue}`)}))})),allFilterPathsAsString}var useStatistics=__webpack_require__("./src/core/statistics/useStatistics.ts"),dpl_cms=__webpack_require__("./src/core/dpl-cms/dpl-cms.ts"),statistics=__webpack_require__("./src/core/statistics/statistics.ts"),LinkNoStyle=__webpack_require__("./src/components/atoms/links/LinkNoStyle.tsx");const CampaignBody=({campaignData})=>react.createElement("section",{className:"campaign mt-35","data-cy":"campaign-body"},campaignData.image&&campaignData.image.url&&react.createElement("img",{"data-cy":"campaign-image",className:"campaign__image "+(campaignData.text?"":"campaign__image--full-width"),src:campaignData.image.url,alt:campaignData.image.alt}),campaignData.text&&react.createElement("h4",{className:"campaign__title campaign__title--ellipsis"},campaignData.text)),campaign_CampaignBody=CampaignBody;try{CampaignBody.displayName="CampaignBody",CampaignBody.__docgenInfo={description:"",displayName:"CampaignBody",props:{campaignData:{defaultValue:null,description:"",name:"campaignData",required:!0,type:{name:"CampaignMatchPOST200Data"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/campaign/CampaignBody.tsx#CampaignBody"]={docgenInfo:CampaignBody.__docgenInfo,name:"CampaignBody",path:"src/components/campaign/CampaignBody.tsx#CampaignBody"})}catch(__react_docgen_typescript_loader_error){}const Campaign=({campaignData})=>{const{track}=(0,useStatistics.T)();if(!campaignData.title)return null;const trackClick=()=>track("click",{id:statistics.h.campaignClick.id,name:statistics.h.campaignClick.name,trackedData:campaignData.title});return campaignData.url?react.createElement(LinkNoStyle.Z,{url:new URL(campaignData.url),trackClick,className:"cursor-pointer"},react.createElement(campaign_CampaignBody,{campaignData})):react.createElement(campaign_CampaignBody,{campaignData})},campaign_Campaign=Campaign;try{Campaign.displayName="Campaign",Campaign.__docgenInfo={description:"",displayName:"Campaign",props:{campaignData:{defaultValue:null,description:"",name:"campaignData",required:!0,type:{name:"CampaignMatchPOST200Data"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/campaign/Campaign.tsx#Campaign"]={docgenInfo:Campaign.__docgenInfo,name:"Campaign",path:"src/components/campaign/Campaign.tsx#Campaign"})}catch(__react_docgen_typescript_loader_error){}var useFilterHandler=__webpack_require__("./src/apps/search-result/useFilterHandler.tsx"),modal=__webpack_require__("./src/core/utils/modal.tsx"),upperFirst=__webpack_require__("./node_modules/lodash/upperFirst.js"),upperFirst_default=__webpack_require__.n(upperFirst),Button=__webpack_require__("./src/components/Buttons/Button.tsx"),icon_cross=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/basic/icon-cross.svg"),icon_cross_default=__webpack_require__.n(icon_cross);const ButtonTag=({onClick,selected,children,size,removable=!1,dataCy})=>{const className=(0,clsx.Z)("tag",selected&&"tag--fill",size&&`tag--${size}`,"cursor-pointer");return react.createElement("button",{type:"button","aria-pressed":selected??void 0,className,onClick,"data-cy":dataCy},children,removable&&react.createElement("img",{className:"tag-icon",src:icon_cross_default(),alt:"close icon"}))},Buttons_ButtonTag=ButtonTag;try{ButtonTag.displayName="ButtonTag",ButtonTag.__docgenInfo={description:"",displayName:"ButtonTag",props:{onClick:{defaultValue:null,description:"",name:"onClick",required:!0,type:{name:"MouseEventHandler"}},size:{defaultValue:null,description:"",name:"size",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"small"'},{value:'"large"'}]}},selected:{defaultValue:null,description:"",name:"selected",required:!1,type:{name:"boolean | undefined"}},removable:{defaultValue:{value:"false"},description:"",name:"removable",required:!1,type:{name:"boolean | undefined"}},dataCy:{defaultValue:null,description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/Buttons/ButtonTag.tsx#ButtonTag"]={docgenInfo:ButtonTag.__docgenInfo,name:"ButtonTag",path:"src/components/Buttons/ButtonTag.tsx#ButtonTag"})}catch(__react_docgen_typescript_loader_error){}var DisclosureControllable=__webpack_require__("./src/components/Disclosures/DisclosureControllable.tsx"),DisclosureSummary=__webpack_require__("./src/components/Disclosures/DisclosureSummary.tsx");const FacetBrowserModalBody=({facets})=>{const{filters,addToFilter,removeFromFilter}=(0,useFilterHandler.Z)(),t=(0,utils_text.X)(),{close}=(0,modal.f)(),{track}=(0,useStatistics.T)();return(0,useDeepCompareEffect.Z)((()=>{isEmpty_default()(filters)||track("click",{id:statistics.h.searchFacets.id,name:statistics.h.searchFacets.name,trackedData:getAllFilterPathsAsString(filters)})}),[filters]),react.createElement("section",{className:"facet-browser"},react.createElement("header",{className:"facet-browser__header"},react.createElement("h2",{className:"text-header-h3"},t("filterListText"))),facets.map((facet=>{const{name,values}=facet;if(0===values.length)return null;const hasSelectedTerms=Boolean(filters[name]);return react.createElement(DisclosureControllable.Z,{key:name,cyData:`facet-browser-${name}`,id:name,showContent:hasSelectedTerms,className:"disclosure--full-width",summary:react.createElement(DisclosureSummary.Z,{title:t(`facet${upperFirst_default()(name)}Text`),className:"disclosure__headline--no-padding"})},react.createElement("div",{className:"facet-browser__facet-group"},values.map((termItem=>{const{term}=termItem,selected=Boolean(filters[name]&&filters[name][term]);if(!termItem.term)return null;return react.createElement(Buttons_ButtonTag,{key:term,onClick:e=>(e.stopPropagation(),selected?removeFromFilter({facet:name,term:termItem}):addToFilter({facet:name,term:termItem})),selected,dataCy:`facet-browser-${name}-${term}`},termItem.term," ",(null==termItem?void 0:termItem.score)&&`(${termItem.score})`)}))))})),react.createElement(Button.z,{classNames:"facet-browser__results-btn",label:t("showResultsText"),buttonType:"none",disabled:!1,collapsible:!1,size:"medium",variant:"filled",onClick:()=>{close("facet-browser-modal")}}))},facet_browser_FacetBrowserModalBody=FacetBrowserModalBody;try{FacetBrowserModalBody.displayName="FacetBrowserModalBody",FacetBrowserModalBody.__docgenInfo={description:"",displayName:"FacetBrowserModalBody",props:{facets:{defaultValue:null,description:"",name:"facets",required:!0,type:{name:"FacetResult[]"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/facet-browser/FacetBrowserModalBody.tsx#FacetBrowserModalBody"]={docgenInfo:FacetBrowserModalBody.__docgenInfo,name:"FacetBrowserModalBody",path:"src/components/facet-browser/FacetBrowserModalBody.tsx#FacetBrowserModalBody"})}catch(__react_docgen_typescript_loader_error){}const FacetBrowserModal=({q})=>{const t=(0,utils_text.X)(),{filters}=(0,useFilterHandler.Z)(),{facets,isLoading}=useGetFacets(q,filters);return react.createElement(modal.Z,{classNames:"modal-right modal--no-padding",modalId:"facet-browser-modal",screenReaderModalDescriptionText:t("facetBrowserModalScreenReaderModalDescriptionText"),closeModalAriaLabelText:t("facetBrowserModalCloseModalAriaLabelText"),isSlider:!0},isLoading||!facets?null:react.createElement(facet_browser_FacetBrowserModalBody,{facets}))},facet_browser_FacetBrowserModal=FacetBrowserModal;try{FacetBrowserModal.displayName="FacetBrowserModal",FacetBrowserModal.__docgenInfo={description:"",displayName:"FacetBrowserModal",props:{q:{defaultValue:null,description:"",name:"q",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/facet-browser/FacetBrowserModal.tsx#FacetBrowserModal"]={docgenInfo:FacetBrowserModal.__docgenInfo,name:"FacetBrowserModal",path:"src/components/facet-browser/FacetBrowserModal.tsx#FacetBrowserModal"})}catch(__react_docgen_typescript_loader_error){}const facet_line_FacetLineSelected=()=>{const{filters,removeFromFilter}=(0,useFilterHandler.Z)();return react.createElement("ul",{className:"facet-line-selected-terms"},Object.entries(filters).map((([facet,value])=>react.createElement(react.Fragment,null,Object.entries(value).map((([label,term])=>react.createElement("li",{className:"facet-line-selected-terms__item"},react.createElement(Buttons_ButtonTag,{selected:!0,removable:!0,onClick:()=>removeFromFilter({facet,term}),dataCy:`facet-line-selected-term-${label}`},label))))))))};var Dropdown=__webpack_require__("./src/components/Dropdown/Dropdown.tsx");const FacetLineFilters=({facets=[]})=>{const t=(0,utils_text.X)(),{open}=(0,modal.f)(),{filters,addToFilter}=(0,useFilterHandler.Z)(),facetMap=(facets=>facets.reduce(((acc,facet)=>{const newAcc={...acc};return facet.values.forEach((value=>{const combinedKey=`${facet.name}:${value.key}`;newAcc[combinedKey]=value})),newAcc}),{}))(facets),formatValuesToDropdown=(facet,values)=>values.map((value=>({label:value.term,value:value.key})));return react.createElement("ul",{className:"facet-line mt-48"},facets.map((({name,values})=>{if(values.length>1){const translatedName=(name=>{switch(name){case graphql.sl.AccessTypes:return"facetAccessTypesText";case graphql.sl.CanAlwaysBeLoaned:return"facetCanAlwaysBeLoanedText";case graphql.sl.ChildrenOrAdults:return"facetChildrenOrAdultsText";case graphql.sl.Creators:return"facetCreatorsText";case graphql.sl.Dk5:return"facetDk5Text";case graphql.sl.FictionNonfiction:return"facetFictionNonfictionText";case graphql.sl.FictionalCharacters:return"facetFictionalCharactersText";case graphql.sl.GenreAndForm:return"facetGenreAndFormText";case graphql.sl.MainLanguages:return"facetMainLanguagesText";case graphql.sl.MaterialTypesGeneral:return"facetMaterialTypesGeneralText";case graphql.sl.MaterialTypesSpecific:return"facetMaterialTypesSpecificText";case graphql.sl.Subjects:return"facetSubjectsText";case graphql.sl.WorkTypes:return"facetWorkTypesText";case graphql.sl.Year:return"facetYearText";default:return(0,invalid_switch_case.Z)(name)}})(name);return react.createElement("li",{className:"facet-line__item"},react.createElement(Dropdown.Z,{cyData:`facet-line-${name}-dropdown`,placeholder:{label:t(translatedName),value:""},options:formatValuesToDropdown(0,values),ariaLabel:t(translatedName),arrowIcon:"chevron",classNames:"dropdown--grey-borders",innerClassNames:{select:"dropdown__select--inline",arrowWrapper:"dropdown__arrows--inline "},handleOnChange:e=>((e,facet)=>{const term=((facetName,termName,facetMap)=>facetMap[`${facetName}:${termName}`])(facet,e.target.value,facetMap);term&&addToFilter({facet,term})})(e,name)}))}return react.createElement(react.Fragment,null,values.map((termObj=>{var _filters$name;const{term,score}=termObj;return null!=filters&&null!==(_filters$name=filters[name])&&void 0!==_filters$name&&_filters$name[term]?null:react.createElement("li",{className:"facet-line__item"},react.createElement(Buttons_ButtonTag,{key:term,onClick:()=>addToFilter({facet:name,term:termObj}),selected:!1,dataCy:`facet-line-term-${term}`},`${term} (${score})`))})))})),react.createElement("li",{className:"facet-line__item"},react.createElement(Buttons_ButtonTag,{onClick:()=>open("facet-browser-modal"),dataCy:"facet-line-open-browser"},t("addMoreFiltersText"))))},facet_line_FacetLineFilters=(0,react.memo)(FacetLineFilters);try{FacetLineFilters.displayName="FacetLineFilters",FacetLineFilters.__docgenInfo={description:"",displayName:"FacetLineFilters",props:{facets:{defaultValue:{value:"[]"},description:"",name:"facets",required:!1,type:{name:"FacetResult[]"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/facet-line/FacetLineFilters.tsx#FacetLineFilters"]={docgenInfo:FacetLineFilters.__docgenInfo,name:"FacetLineFilters",path:"src/components/facet-line/FacetLineFilters.tsx#FacetLineFilters"})}catch(__react_docgen_typescript_loader_error){}const FacetLineFiltersSkeleton=()=>react.createElement(react.Fragment,null,react.createElement("div",{className:"card-list-page__skeleton-facet-line--mobile"},react.createElement("div",{className:"ssc mt-48"},react.createElement("div",{className:"ssc-head-line mb"}),react.createElement("div",{className:"ssc-head-line mb"}),react.createElement("div",{className:"ssc-head-line mb"}))),react.createElement("div",{className:"card-list-page__skeleton-facet-line--desktop"},react.createElement("div",{className:"ssc mt-48"},react.createElement("div",{className:"ssc-head-line mb"})))),facet_line_FacetLineFiltersSkeleton=FacetLineFiltersSkeleton;try{FacetLineFiltersSkeleton.displayName="FacetLineFiltersSkeleton",FacetLineFiltersSkeleton.__docgenInfo={description:"",displayName:"FacetLineFiltersSkeleton",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/facet-line/FacetLineFiltersSkeleton.tsx#FacetLineFiltersSkeleton"]={docgenInfo:FacetLineFiltersSkeleton.__docgenInfo,name:"FacetLineFiltersSkeleton",path:"src/components/facet-line/FacetLineFiltersSkeleton.tsx#FacetLineFiltersSkeleton"})}catch(__react_docgen_typescript_loader_error){}const FacetLine=({q})=>{const{filters}=(0,useFilterHandler.Z)(),cleanBranches=(0,branches.ZP)(),{data,isLoading}=(0,graphql.Zu)({q:{all:q},facetsLimit:6,valuesLimit:5,filters:createFilters(filters,cleanBranches)});return react.createElement(react.Fragment,null,isLoading&&react.createElement(facet_line_FacetLineFiltersSkeleton,null),data&&react.createElement(facet_line_FacetLineFilters,{facets:data.search.intelligentFacets}),react.createElement(facet_line_FacetLineSelected,null))},facet_line_FacetLine=(0,react.memo)(FacetLine);try{FacetLine.displayName="FacetLine",FacetLine.__docgenInfo={description:"",displayName:"FacetLine",props:{q:{defaultValue:null,description:"",name:"q",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/facet-line/FacetLine.tsx#FacetLine"]={docgenInfo:FacetLine.__docgenInfo,name:"FacetLine",path:"src/components/facet-line/FacetLine.tsx#FacetLine"})}catch(__react_docgen_typescript_loader_error){}var helpers_url=__webpack_require__("./src/core/utils/helpers/url.ts"),card_list_item_skeleton=__webpack_require__("./src/components/card-item-list/card-list-item/card-list-item-skeleton.tsx");const search_result_skeleton=({q,dataCy="search-header-skeleton",hideFacetLine=!1})=>{const t=(0,utils_text.X)();return react.createElement("div",{className:"card-list-page","data-cy":dataCy},react.createElement("h1",{className:"text-header-h2 mb-16 search-result-title text-loading"},!hideFacetLine&&t("showingResultsForText",{placeholders:{"@query":q}}),hideFacetLine&&t("showingResultsForWithoutQueryText")),!hideFacetLine&&react.createElement(facet_line_FacetLineFiltersSkeleton,null),react.createElement("ul",{className:"card-list-page__list my-32"},[...Array(5)].map((()=>react.createElement("li",null,react.createElement(card_list_item_skeleton.Z,null))))))};try{searchresultskeleton.displayName="searchresultskeleton",searchresultskeleton.__docgenInfo={description:"",displayName:"searchresultskeleton",props:{q:{defaultValue:null,description:"",name:"q",required:!0,type:{name:"string"}},dataCy:{defaultValue:{value:"search-header-skeleton"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}},hideFacetLine:{defaultValue:{value:"false"},description:"",name:"hideFacetLine",required:!1,type:{name:"boolean | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/search-result/search-result-skeleton.tsx#searchresultskeleton"]={docgenInfo:searchresultskeleton.__docgenInfo,name:"searchresultskeleton",path:"src/apps/search-result/search-result-skeleton.tsx#searchresultskeleton"})}catch(__react_docgen_typescript_loader_error){}var search_result_zero_hits=__webpack_require__("./src/apps/search-result/search-result-zero-hits.tsx");const search_result=({q,pageSize})=>{const{filters,clearFilter,addFilterFromUrlParamListener}=(0,useFilterHandler.Z)(),cleanBranches=(0,branches.ZP)(),[resultItems,setResultItems]=(0,react.useState)([]),[hitcount,setHitCount]=(0,react.useState)(0),[canWeTrackHitcount,setCanWeTrackHitcount]=(0,react.useState)(!1),{PagerComponent,page}=(0,use_pager.Z)({hitcount,pageSize}),{mutate}=(0,dpl_cms.by)(),[campaignData,setCampaignData]=(0,react.useState)(null),{facets:campaignFacets}=useGetFacets(q,filters);(0,useDeepCompareEffect.Z)((()=>{setResultItems([])}),[q,pageSize,filters]);const{track}=(0,useStatistics.T)();(0,react.useEffect)((()=>{track("click",{id:statistics.h.searchQuery.id,name:statistics.h.searchQuery.name,trackedData:q})}),[q]),(0,useDeepCompareEffect.Z)((()=>{campaignFacets&&mutate({data:campaignFacets},{onSuccess:campaign=>{setCampaignData(campaign)}})}),[campaignFacets,mutate]),(0,react.useEffect)((()=>{addFilterFromUrlParamListener(graphql.sl.MaterialTypesSpecific),addFilterFromUrlParamListener(graphql.sl.WorkTypes)}),[]);const{data,isLoading}=(0,graphql.OX)({q:{all:q},offset:page*pageSize,limit:pageSize,filters:createFilters(filters,cleanBranches)});return(0,react.useEffect)((()=>{if(!data)return;const{search:{works:resultWorks,hitcount:resultCount}}=data;setHitCount(resultCount),setResultItems(page>0?prev=>[...prev,...resultWorks]:resultWorks)}),[data,page]),(0,react.useEffect)((()=>{canWeTrackHitcount?track("click",{id:statistics.h.searchResultCount.id,name:statistics.h.searchResultCount.name,trackedData:hitcount?hitcount.toString():"0"}):setCanWeTrackHitcount(!0)}),[hitcount]),(0,react.useEffect)((()=>{var _campaignData$data;null!=campaignData&&null!==(_campaignData$data=campaignData.data)&&void 0!==_campaignData$data&&_campaignData$data.title&&track("click",{id:statistics.h.campaignShown.id,name:statistics.h.campaignShown.name,trackedData:campaignData.data.title})}),[campaignData]),(0,react.useEffect)((()=>{"usePersistedFilters"!==(0,helpers_url.wo)("filters")&&clearFilter()}),[clearFilter]),isLoading?react.createElement(search_result_skeleton,{q}):0===hitcount?react.createElement(search_result_zero_hits.Z,null):react.createElement("div",{className:"card-list-page"},react.createElement(search_result_header_SearchResultHeader,{hitcount,q}),react.createElement(facet_line_FacetLine,{q}),campaignData&&campaignData.data&&react.createElement(campaign_Campaign,{campaignData:campaignData.data}),react.createElement(SearchResultList.Z,{resultItems,page,pageSize}),react.createElement(PagerComponent,{isLoading}),!isEmpty_default()(resultItems)&&react.createElement(facet_browser_FacetBrowserModal,{q}))};try{searchresult.displayName="searchresult",searchresult.__docgenInfo={description:"",displayName:"searchresult",props:{q:{defaultValue:null,description:"",name:"q",required:!0,type:{name:"string"}},pageSize:{defaultValue:null,description:"",name:"pageSize",required:!0,type:{name:"number"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/search-result/search-result.tsx#searchresult"]={docgenInfo:searchresult.__docgenInfo,name:"searchresult",path:"src/apps/search-result/search-result.tsx#searchresult"})}catch(__react_docgen_typescript_loader_error){}const search_result_entry=(0,config.Rh)((0,url.XL)((0,utils_text.z)((({q,pageSizeDesktop,pageSizeMobile})=>{const{q:searchQuery}=(0,general.Qf)({q}),pageSize=(0,general.Rh)({desktop:pageSizeDesktop,mobile:pageSizeMobile});return react.createElement("div",null,searchQuery&&react.createElement(guarded_app.Z,{app:"search-result"},react.createElement(search_result,{q:searchQuery,pageSize})))}))));try{searchresultentry.displayName="searchresultentry",searchresultentry.__docgenInfo={description:"",displayName:"searchresultentry",props:{q:{defaultValue:null,description:"",name:"q",required:!1,type:{name:"string | undefined"}},pageSizeDesktop:{defaultValue:null,description:"",name:"pageSizeDesktop",required:!1,type:{name:"number | undefined"}},pageSizeMobile:{defaultValue:null,description:"",name:"pageSizeMobile",required:!1,type:{name:"number | undefined"}},materialUrl:{defaultValue:null,description:"",name:"materialUrl",required:!0,type:{name:"string"}},searchUrl:{defaultValue:null,description:"",name:"searchUrl",required:!0,type:{name:"string"}},advancedSearchUrl:{defaultValue:null,description:"",name:"advancedSearchUrl",required:!0,type:{name:"string"}},fbsBaseUrl:{defaultValue:null,description:"",name:"fbsBaseUrl",required:!0,type:{name:"string"}},loanListEreolenUrl:{defaultValue:null,description:"",name:"loanListEreolenUrl",required:!0,type:{name:"string"}},feesPageUrl:{defaultValue:null,description:"",name:"feesPageUrl",required:!0,type:{name:"string"}},publizonBaseUrl:{defaultValue:null,description:"",name:"publizonBaseUrl",required:!0,type:{name:"string"}},dplCmsBaseUrl:{defaultValue:null,description:"",name:"dplCmsBaseUrl",required:!0,type:{name:"string"}},coverBaseUrl:{defaultValue:null,description:"",name:"coverBaseUrl",required:!0,type:{name:"string"}},materialBaseUrl:{defaultValue:null,description:"",name:"materialBaseUrl",required:!0,type:{name:"string"}},fbiBaseUrl:{defaultValue:null,description:"",name:"fbiBaseUrl",required:!0,type:{name:"string"}},authUrl:{defaultValue:null,description:"",name:"authUrl",required:!0,type:{name:"string"}},ereolenHomepageUrl:{defaultValue:null,description:"",name:"ereolenHomepageUrl",required:!0,type:{name:"string"}},blacklistedAvailabilityBranchesConfig:{defaultValue:null,description:"",name:"blacklistedAvailabilityBranchesConfig",required:!0,type:{name:"string"}},blacklistedPickupBranchesConfig:{defaultValue:null,description:"",name:"blacklistedPickupBranchesConfig",required:!1,type:{name:"string | undefined"}},blacklistedSearchBranchesConfig:{defaultValue:null,description:"",name:"blacklistedSearchBranchesConfig",required:!1,type:{name:"string | undefined"}},branchesConfig:{defaultValue:null,description:"",name:"branchesConfig",required:!0,type:{name:"string"}},addMoreFiltersText:{defaultValue:null,description:"",name:"addMoreFiltersText",required:!0,type:{name:"string"}},addToFavoritesAriaLabelText:{defaultValue:null,description:"",name:"addToFavoritesAriaLabelText",required:!0,type:{name:"string"}},alertErrorCloseText:{defaultValue:null,description:"",name:"alertErrorCloseText",required:!0,type:{name:"string"}},alertErrorMessageText:{defaultValue:null,description:"",name:"alertErrorMessageText",required:!0,type:{name:"string"}},byAuthorText:{defaultValue:null,description:"",name:"byAuthorText",required:!0,type:{name:"string"}},etAlText:{defaultValue:null,description:"",name:"etAlText",required:!0,type:{name:"string"}},facetAccessTypesText:{defaultValue:null,description:"",name:"facetAccessTypesText",required:!0,type:{name:"string"}},facetBrowserModalCloseModalAriaLabelText:{defaultValue:null,description:"",name:"facetBrowserModalCloseModalAriaLabelText",required:!0,type:{name:"string"}},facetBrowserModalScreenReaderModalDescriptionText:{defaultValue:null,description:"",name:"facetBrowserModalScreenReaderModalDescriptionText",required:!0,type:{name:"string"}},facetCanAlwaysBeLoanedText:{defaultValue:null,description:"",name:"facetCanAlwaysBeLoanedText",required:!0,type:{name:"string"}},facetChildrenOrAdultsText:{defaultValue:null,description:"",name:"facetChildrenOrAdultsText",required:!0,type:{name:"string"}},facetCreatorsText:{defaultValue:null,description:"",name:"facetCreatorsText",required:!0,type:{name:"string"}},facetDk5Text:{defaultValue:null,description:"",name:"facetDk5Text",required:!0,type:{name:"string"}},facetFictionalCharactersText:{defaultValue:null,description:"",name:"facetFictionalCharactersText",required:!0,type:{name:"string"}},facetFictionNonfictionText:{defaultValue:null,description:"",name:"facetFictionNonfictionText",required:!0,type:{name:"string"}},facetGenreAndFormText:{defaultValue:null,description:"",name:"facetGenreAndFormText",required:!0,type:{name:"string"}},facetMainLanguagesText:{defaultValue:null,description:"",name:"facetMainLanguagesText",required:!0,type:{name:"string"}},facetMaterialTypesGeneralText:{defaultValue:null,description:"",name:"facetMaterialTypesGeneralText",required:!0,type:{name:"string"}},facetMaterialTypesSpecificText:{defaultValue:null,description:"",name:"facetMaterialTypesSpecificText",required:!0,type:{name:"string"}},facetSubjectsText:{defaultValue:null,description:"",name:"facetSubjectsText",required:!0,type:{name:"string"}},facetWorkTypesText:{defaultValue:null,description:"",name:"facetWorkTypesText",required:!0,type:{name:"string"}},facetYearText:{defaultValue:null,description:"",name:"facetYearText",required:!0,type:{name:"string"}},filterListText:{defaultValue:null,description:"",name:"filterListText",required:!0,type:{name:"string"}},inSeriesText:{defaultValue:null,description:"",name:"inSeriesText",required:!0,type:{name:"string"}},loadingText:{defaultValue:null,description:"",name:"loadingText",required:!0,type:{name:"string"}},numberDescriptionText:{defaultValue:null,description:"",name:"numberDescriptionText",required:!0,type:{name:"string"}},removeFromFavoritesAriaLabelText:{defaultValue:null,description:"",name:"removeFromFavoritesAriaLabelText",required:!0,type:{name:"string"}},resultPagerStatusText:{defaultValue:null,description:"",name:"resultPagerStatusText",required:!0,type:{name:"string"}},showingResultsForText:{defaultValue:null,description:"",name:"showingResultsForText",required:!0,type:{name:"string"}},noSearchResultText:{defaultValue:null,description:"",name:"noSearchResultText",required:!0,type:{name:"string"}},showMoreText:{defaultValue:null,description:"",name:"showMoreText",required:!0,type:{name:"string"}},showResultsText:{defaultValue:null,description:"",name:"showResultsText",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/search-result/search-result.entry.tsx#searchresultentry"]={docgenInfo:searchresultentry.__docgenInfo,name:"searchresultentry",path:"src/apps/search-result/search-result.entry.tsx#searchresultentry"})}catch(__react_docgen_typescript_loader_error){}const search_result_dev={title:"Apps / Search Result",component:search_result_entry,argTypes:{...serviceUrlArgs.Z,q:{name:"Search string",defaultValue:"harry",control:{type:"text"}},pageSizeDesktop:{name:"Number of search result items on desktop",defaultValue:50,control:{type:"number"}},pageSizeMobile:{name:"Number of search result items on mobile",defaultValue:20,control:{type:"number"}},authUrl:{name:"Url where user can authenticate",defaultValue:"",control:{type:"text"}},searchUrl:{name:"Path to the search result page",defaultValue:"/search",control:{type:"text"}},materialUrl:{name:"Path to the material page",defaultValue:"/work/:workid",control:{type:"text"}},etAlText:{name:"Et al. Text",defaultValue:"et al.",control:{type:"text"}},byAuthorText:{name:"By (author) Text",defaultValue:"By",control:{type:"text"}},showMoreText:{name:"Show more Text",defaultValue:"show more",control:{type:"text"}},resultPagerStatusText:{name:"Result pager status text",defaultValue:"Showing @itemsShown out of @hitcount results",control:{type:"text"}},numberDescriptionText:{name:"Number description",defaultValue:"Nr.",control:{type:"text"}},inSeriesText:{name:"In series",defaultValue:"in series",control:{type:"text"}},showingResultsForText:{name:"Showing results for",defaultValue:"Showing results for “@query”",control:{type:"text"}},noSearchResultText:{name:"0-hit search result",defaultValue:"Your search has 0 results",control:{type:"text"}},blacklistedPickupBranchesConfig:{name:"Blacklisted Pickup branches",defaultValue:"FBS-751032,FBS-751031,FBS-751009,FBS-751027,FBS-751024",control:{type:"text"}},blacklistedAvailabilityBranchesConfig:{name:"Blacklisted Availability branches",defaultValue:"FBS-751032,FBS-751031,FBS-751009,FBS-751027,FBS-751024",control:{type:"text"}},blacklistedSearchBranchesConfig:{name:"Blacklisted branches",defaultValue:"FBS-751032,FBS-751031,FBS-751009,FBS-751027,FBS-751024",control:{type:"text"}},branchesConfig:{name:"Branches",defaultValue:'[\n {\n "branchId":"DK-775120",\n "title":"Højbjerg"\n },\n {\n "branchId":"DK-775122",\n "title":"Beder-Malling"\n },\n {\n "branchId":"DK-775144",\n "title":"Gellerup"\n },\n {\n "branchId":"DK-775167",\n "title":"Lystrup"\n },\n {\n "branchId":"DK-775146",\n "title":"Harlev"\n },\n {\n "branchId":"DK-775168",\n "title":"Skødstrup"\n },\n {\n "branchId":"FBS-751010",\n "title":"Arresten"\n },\n {\n "branchId":"DK-775147",\n "title":"Hasle"\n },\n {\n "branchId":"FBS-751032",\n "title":"Må ikke benyttes"\n },\n {\n "branchId":"FBS-751031",\n "title":"Fjernlager 1"\n },\n {\n "branchId":"DK-775126",\n "title":"Solbjerg"\n },\n {\n "branchId":"FBS-751030",\n "title":"ITK"\n },\n {\n "branchId":"DK-775149",\n "title":"Sabro"\n },\n {\n "branchId":"DK-775127",\n "title":"Tranbjerg"\n },\n {\n "branchId":"DK-775160",\n "title":"Risskov"\n },\n {\n "branchId":"DK-775162",\n "title":"Hjortshøj"\n },\n {\n "branchId":"DK-775140",\n "title":"Åby"\n },\n {\n "branchId":"FBS-751009",\n "title":"Fjernlager 2"\n },\n {\n "branchId":"FBS-751029",\n "title":"Stadsarkivet"\n },\n {\n "branchId":"FBS-751027",\n "title":"Intern"\n },\n {\n "branchId":"FBS-751026",\n "title":"Fælles undervejs"\n },\n {\n "branchId":"FBS-751025",\n "title":"Fællessekretariatet"\n },\n {\n "branchId":"DK-775133",\n "title":"Bavnehøj"\n },\n {\n "branchId":"FBS-751024",\n "title":"Fjernlånte materialer"\n },\n {\n "branchId":"DK-775100",\n "title":"Hovedbiblioteket"\n },\n {\n "branchId":"DK-775170",\n "title":"Trige"\n },\n {\n "branchId":"DK-775150",\n "title":"Tilst"\n },\n {\n "branchId":"DK-775130",\n "title":"Viby"\n },\n {\n "branchId":"DK-775164",\n "title":"Egå"\n }\n]',control:{type:"text"}},facetBrowserModalScreenReaderModalDescriptionText:{name:"facet browser screen reader modal description text",defaultValue:"Modal for facet browser",control:{type:"text"}},facetBrowserModalCloseModalAriaLabelText:{name:"facet browser close modal aria label text",defaultValue:"Close facet browser modal",control:{type:"text"}},facetAccessTypesText:{name:"Access types text",defaultValue:"Access types",control:{type:"text"}},facetCanAlwaysBeLoanedText:{name:"Can always be loaned text",defaultValue:"Can always be loaned",control:{type:"text"}},facetChildrenOrAdultsText:{name:"Children or adults text",defaultValue:"Children or adults",control:{type:"text"}},facetCreatorsText:{name:"Creators text",defaultValue:"Creators",control:{type:"text"}},facetDk5Text:{name:"Dk5 text",defaultValue:"Dk5",control:{type:"text"}},facetFictionalCharactersText:{name:"Fictional characters text",defaultValue:"Fictional characters",control:{type:"text"}},facetFictionNonfictionText:{name:"Fiction or nonfiction text",defaultValue:"Fiction or nonfiction",control:{type:"text"}},facetGenreAndFormText:{name:"Genre and form text",defaultValue:"Genre and form",control:{type:"text"}},facetMainLanguagesText:{name:"Main languages text",defaultValue:"Main languages",control:{type:"text"}},facetMaterialTypesGeneralText:{name:"Material types general text",defaultValue:"Material types general",control:{type:"text"}},facetMaterialTypesSpecificText:{name:"Material types specific text",defaultValue:"Material types specific",control:{type:"text"}},facetSubjectsText:{name:"Subjects text",defaultValue:"Subjects",control:{type:"text"}},facetWorkTypesText:{name:"Work types text",defaultValue:"Work types",control:{type:"text"}},facetYearText:{name:"Year text",defaultValue:"Year",control:{type:"text"}},showResultsText:{name:"Show results text",defaultValue:"Show results",control:{type:"text"}},filterListText:{name:"Filter list text",defaultValue:"Filter list",control:{type:"text"}},addMoreFiltersText:{name:"Add more filters text",defaultValue:"+ more filters",control:{type:"text"}},addToFavoritesAriaLabelText:{control:{type:"text"},defaultValue:"Add @title to favorites list"},removeFromFavoritesAriaLabelText:{control:{type:"text"},defaultValue:"Remove @title from favorites list"},alertErrorCloseText:{name:"Alert error close text",defaultValue:"close",control:{type:"text"}},alertErrorMessageText:{name:"Alert error message text",defaultValue:"An error occurred",control:{type:"text"}},loadingText:{name:"Loading",defaultValue:"Loading",control:{type:"text"}}}},search_result_dev_SearchResult=args=>react.createElement(search_result_entry,args)},"./src/apps/search-result/useFilterHandler.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),react_redux__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/react-redux/es/index.js"),_core_filter_slice__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/core/filter.slice.ts"),_core_utils_helpers_url__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/core/utils/helpers/url.ts");const __WEBPACK_DEFAULT_EXPORT__=()=>{const dispatch=(0,react_redux__WEBPACK_IMPORTED_MODULE_1__.I0)(),filters=(0,react_redux__WEBPACK_IMPORTED_MODULE_1__.v9)((state=>state.filter)),clearFilter=(0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)((()=>{(0,_core_utils_helpers_url__WEBPACK_IMPORTED_MODULE_3__.oC)("filters"),dispatch((0,_core_filter_slice__WEBPACK_IMPORTED_MODULE_2__.ZH)())}),[dispatch]),addToFilter=(0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)((payload=>{"usePersistedFilters"!==(0,_core_utils_helpers_url__WEBPACK_IMPORTED_MODULE_3__.wo)("filters")&&(0,_core_utils_helpers_url__WEBPACK_IMPORTED_MODULE_3__.ul)({filters:"usePersistedFilters"}),dispatch((0,_core_filter_slice__WEBPACK_IMPORTED_MODULE_2__.IH)(payload))}),[dispatch]),removeFromFilter=(0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)((payload=>dispatch((0,_core_filter_slice__WEBPACK_IMPORTED_MODULE_2__.Od)(payload))),[dispatch]);return{filters,addToFilter,removeFromFilter,clearFilter,addFilterFromUrlParamListener:facet=>{const urlFilter=(0,_core_utils_helpers_url__WEBPACK_IMPORTED_MODULE_3__.wo)(facet);urlFilter&&addToFilter({facet,term:{key:"key",term:urlFilter}})}}}},"./src/apps/something-similar/SomethingSimilar.dev.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{SomethingSimilarEntry:()=>SomethingSimilar_dev_SomethingSimilarEntry,default:()=>SomethingSimilar_dev});var react=__webpack_require__("./node_modules/react/index.js"),esm=__webpack_require__("./node_modules/@storybook/addon-queryparams/dist/esm/index.js"),serviceUrlArgs=__webpack_require__("./src/core/storybook/serviceUrlArgs.ts"),graphql=__webpack_require__("./src/core/dbc-gateway/generated/graphql.tsx"),general=__webpack_require__("./src/core/utils/helpers/general.ts"),utils_text=__webpack_require__("./src/core/utils/text.tsx"),material_fetch_hoc=__webpack_require__("./src/apps/loan-list/materials/utils/material-fetch-hoc.tsx"),SimpleMaterial=__webpack_require__("./src/components/simple-material/SimpleMaterial.tsx"),url=__webpack_require__("./src/core/utils/helpers/url.ts");const SomethingSimilarList=({id,material})=>{const t=(0,utils_text.X)(),{somethingSimilarAuthor:somethingSimilarAuthorLimit,somethingSimilar:somethingSimilarLimit}=(0,general.US)(),[somethingSimilar,setSomethingSimilar]=(0,react.useState)(null),[authorMaterials,setAuthorMaterials]=(0,react.useState)(null),[recommendView,setRecommendView]=(0,react.useState)("similar"),{data:somethingSimilarData}=(0,graphql.GN)({faust:id,limit:somethingSimilarLimit}),setViewHandler=(0,react.useCallback)((inputView=>{(0,url.ul)({"recommender-view":inputView}),setRecommendView(inputView)}),[setRecommendView]),{data:byAuthorData}=(0,graphql.OX)({limit:somethingSimilarAuthorLimit,q:{all:null==material?void 0:material.firstAuthor},offset:0});return(0,react.useEffect)((()=>{somethingSimilarData&&setSomethingSimilar(somethingSimilarData.recommend.result.map((({work})=>work)))}),[somethingSimilarData]),(0,react.useEffect)((()=>{byAuthorData&&setAuthorMaterials(byAuthorData.search.works)}),[byAuthorData]),react.createElement(react.Fragment,null,react.createElement("h2",{className:"recommender__left-title text-header-h1"},t("somethingSimilarTitleText")),react.createElement("div",{className:"recommender__buttons"},react.createElement("button",{type:"button",onClick:()=>setRecommendView("similar"),className:"text-body-medium-regular color-primary-black cursor-pointer button-link--bright "+(recommendView?"button-link":"")},t("somethingSimilarSomethingSimilarAuthorText")),react.createElement("button",{onClick:()=>setViewHandler("author"),type:"button",className:"text-body-medium-regular color-primary-black cursor-pointer button-link--bright "+(recommendView?"":"button-link")},t("somethingSimilarByTheSameAuthorText"))),react.createElement("ul",{className:"recommender__grid"},recommendView&&somethingSimilar&&somethingSimilar.map((work=>react.createElement(SimpleMaterial.Z,{app:"something-similar",bright:!0,work}))),!recommendView&&authorMaterials&&authorMaterials.map((work=>react.createElement(SimpleMaterial.Z,{app:"something-similar",bright:!0,work})))))},something_similar_SomethingSimilarList=(0,material_fetch_hoc.Z)(SomethingSimilarList);try{SomethingSimilarList.displayName="SomethingSimilarList",SomethingSimilarList.__docgenInfo={description:"",displayName:"SomethingSimilarList",props:{id:{defaultValue:null,description:"",name:"id",required:!0,type:{name:"string"}},digitalMaterial:{defaultValue:null,description:"",name:"digitalMaterial",required:!1,type:{name:"Product | null | undefined"}},item:{defaultValue:null,description:"",name:"item",required:!1,type:{name:"Nullable> | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/something-similar/SomethingSimilarList.tsx#SomethingSimilarList"]={docgenInfo:SomethingSimilarList.__docgenInfo,name:"SomethingSimilarList",path:"src/apps/something-similar/SomethingSimilarList.tsx#SomethingSimilarList"})}catch(__react_docgen_typescript_loader_error){}const SomethingSimilar=({faust})=>react.createElement("div",{className:"recommender recommender--bright"},faust&&react.createElement(something_similar_SomethingSimilarList,{id:faust,item:{faust}})),something_similar_SomethingSimilar=SomethingSimilar;try{SomethingSimilar.displayName="SomethingSimilar",SomethingSimilar.__docgenInfo={description:"",displayName:"SomethingSimilar",props:{faust:{defaultValue:null,description:"",name:"faust",required:!0,type:{name:"`${number}`"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/something-similar/SomethingSimilar.tsx#SomethingSimilar"]={docgenInfo:SomethingSimilar.__docgenInfo,name:"SomethingSimilar",path:"src/apps/something-similar/SomethingSimilar.tsx#SomethingSimilar"})}catch(__react_docgen_typescript_loader_error){}var config=__webpack_require__("./src/core/utils/config.tsx");const SomethingSimilar_entry=(0,__webpack_require__("./src/core/utils/url.tsx").XL)((0,config.Rh)((0,utils_text.z)((({faust})=>react.createElement(something_similar_SomethingSimilar,{faust})))));try{SomethingSimilarentry.displayName="SomethingSimilarentry",SomethingSimilarentry.__docgenInfo={description:"",displayName:"SomethingSimilarentry",props:{fbsBaseUrl:{defaultValue:null,description:"",name:"fbsBaseUrl",required:!0,type:{name:"string"}},publizonBaseUrl:{defaultValue:null,description:"",name:"publizonBaseUrl",required:!0,type:{name:"string"}},dplCmsBaseUrl:{defaultValue:null,description:"",name:"dplCmsBaseUrl",required:!0,type:{name:"string"}},coverBaseUrl:{defaultValue:null,description:"",name:"coverBaseUrl",required:!0,type:{name:"string"}},materialBaseUrl:{defaultValue:null,description:"",name:"materialBaseUrl",required:!0,type:{name:"string"}},fbiBaseUrl:{defaultValue:null,description:"",name:"fbiBaseUrl",required:!0,type:{name:"string"}},materialUrl:{defaultValue:null,description:"",name:"materialUrl",required:!0,type:{name:"string"}},somethingSimilarTitleText:{defaultValue:null,description:"",name:"somethingSimilarTitleText",required:!0,type:{name:"string"}},materialByAuthorText:{defaultValue:null,description:"",name:"materialByAuthorText",required:!0,type:{name:"string"}},materialAndAuthorText:{defaultValue:null,description:"",name:"materialAndAuthorText",required:!0,type:{name:"string"}},etAlText:{defaultValue:null,description:"",name:"etAlText",required:!0,type:{name:"string"}},somethingSimilarByTheSameAuthorText:{defaultValue:null,description:"",name:"somethingSimilarByTheSameAuthorText",required:!0,type:{name:"string"}},somethingSimilarSomethingSimilarAuthorText:{defaultValue:null,description:"",name:"somethingSimilarSomethingSimilarAuthorText",required:!0,type:{name:"string"}},addToFavoritesAriaLabelText:{defaultValue:null,description:"",name:"addToFavoritesAriaLabelText",required:!0,type:{name:"string"}},removeFromFavoritesAriaLabelText:{defaultValue:null,description:"",name:"removeFromFavoritesAriaLabelText",required:!0,type:{name:"string"}},faust:{defaultValue:null,description:"",name:"faust",required:!0,type:{name:"`${number}`"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/something-similar/SomethingSimilar.entry.tsx#SomethingSimilarentry"]={docgenInfo:SomethingSimilarentry.__docgenInfo,name:"SomethingSimilarentry",path:"src/apps/something-similar/SomethingSimilar.entry.tsx#SomethingSimilarentry"})}catch(__react_docgen_typescript_loader_error){}const SomethingSimilar_dev={title:"Apps / Something similar",component:SomethingSimilar_entry,decorators:[esm.j],argTypes:{...serviceUrlArgs.Z,somethingSimilarTitleText:{control:{type:"text"},defaultValue:"Other materials"},materialUrl:{defaultValue:"/work/:workid",control:{type:"text"}},materialByAuthorText:{control:{type:"text"},defaultValue:"By"},materialAndAuthorText:{control:{type:"text"},defaultValue:"and"},etAlText:{control:{type:"text"},defaultValue:"et al."},somethingSimilarByTheSameAuthorText:{control:{type:"text"},defaultValue:"By the same author"},faust:{control:{type:"text"},defaultValue:"48953786"},somethingSimilarSomethingSimilarAuthorText:{control:{type:"text"},defaultValue:"Something similar"},addToFavoritesAriaLabelText:{control:{type:"text"},defaultValue:"Add @title to favorites list"},removeFromFavoritesAriaLabelText:{control:{type:"text"},defaultValue:"Remove @title from favorites list"}}},SomethingSimilar_dev_SomethingSimilarEntry=(props=>react.createElement(SomethingSimilar_entry,props)).bind({})},"./src/components/Buttons/ArrowButton.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_atoms_icons_arrow_arrow__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/components/atoms/icons/arrow/arrow.tsx");const ArrowButton=({cursorPointer=!1,clickEventHandler,arrowLabelledBy})=>{const pointer=cursorPointer&&{cursor:"pointer"}||{cursor:"inherit"};return react__WEBPACK_IMPORTED_MODULE_0__.createElement("button",{"aria-labelledby":arrowLabelledBy,style:pointer,type:"button",onClick:e=>{clickEventHandler&&(e.stopPropagation(),clickEventHandler())}},react__WEBPACK_IMPORTED_MODULE_0__.createElement(_atoms_icons_arrow_arrow__WEBPACK_IMPORTED_MODULE_1__.Z,null))},__WEBPACK_DEFAULT_EXPORT__=ArrowButton;try{ArrowButton.displayName="ArrowButton",ArrowButton.__docgenInfo={description:"",displayName:"ArrowButton",props:{cursorPointer:{defaultValue:{value:"false"},description:"",name:"cursorPointer",required:!1,type:{name:"boolean"}},clickEventHandler:{defaultValue:null,description:"",name:"clickEventHandler",required:!1,type:{name:"(() => void) | undefined"}},arrowLabelledBy:{defaultValue:null,description:"",name:"arrowLabelledBy",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/Buttons/ArrowButton.tsx#ArrowButton"]={docgenInfo:ArrowButton.__docgenInfo,name:"ArrowButton",path:"src/components/Buttons/ArrowButton.tsx#ArrowButton"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/Buttons/Button.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{z:()=>Button});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_ButtonIcon__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/components/Buttons/ButtonIcon.tsx");const Button=({label,buttonType,disabled,collapsible,size,variant,onClick,iconClassNames,id,classNames,dataCy})=>react__WEBPACK_IMPORTED_MODULE_0__.createElement("button",{"data-cy":dataCy||"button",type:"button",className:`btn-primary btn-${variant} btn-${size} ${disabled?"btn-outline":""} arrow__hover--right-small ${classNames??""}`,disabled,onClick,id},label,react__WEBPACK_IMPORTED_MODULE_0__.createElement(_ButtonIcon__WEBPACK_IMPORTED_MODULE_1__.E,{buttonType,iconClassNames,collapsible}));try{Button.displayName="Button",Button.__docgenInfo={description:"",displayName:"Button",props:{label:{defaultValue:null,description:"",name:"label",required:!0,type:{name:"string"}},buttonType:{defaultValue:null,description:"",name:"buttonType",required:!0,type:{name:"enum",value:[{value:'"search"'},{value:'"none"'},{value:'"default"'},{value:'"external-link"'}]}},disabled:{defaultValue:null,description:"",name:"disabled",required:!0,type:{name:"boolean"}},collapsible:{defaultValue:null,description:"",name:"collapsible",required:!0,type:{name:"boolean"}},size:{defaultValue:null,description:"",name:"size",required:!0,type:{name:"enum",value:[{value:'"xsmall"'},{value:'"small"'},{value:'"medium"'},{value:'"large"'},{value:'"xlarge"'}]}},variant:{defaultValue:null,description:"",name:"variant",required:!0,type:{name:"enum",value:[{value:'"outline"'},{value:'"filled"'}]}},onClick:{defaultValue:null,description:"",name:"onClick",required:!1,type:{name:"(() => void) | undefined"}},iconClassNames:{defaultValue:null,description:"",name:"iconClassNames",required:!1,type:{name:"string | undefined"}},id:{defaultValue:null,description:"",name:"id",required:!1,type:{name:"string | undefined"}},classNames:{defaultValue:null,description:"",name:"classNames",required:!1,type:{name:"string | undefined"}},dataCy:{defaultValue:null,description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/Buttons/Button.tsx#Button"]={docgenInfo:Button.__docgenInfo,name:"Button",path:"src/components/Buttons/Button.tsx#Button"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/Buttons/ButtonIcon.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{E:()=>ButtonIcon});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_danskernesdigitalebibliotek_dpl_design_system_build_icons_arrow_ui_icon_arrow_ui_small_right_svg__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/arrow-ui/icon-arrow-ui-small-right.svg"),_danskernesdigitalebibliotek_dpl_design_system_build_icons_arrow_ui_icon_arrow_ui_small_right_svg__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(_danskernesdigitalebibliotek_dpl_design_system_build_icons_arrow_ui_icon_arrow_ui_small_right_svg__WEBPACK_IMPORTED_MODULE_1__),_danskernesdigitalebibliotek_dpl_design_system_build_icons_buttons_icon_btn_external_link_svg__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/buttons/icon-btn-external-link.svg"),_danskernesdigitalebibliotek_dpl_design_system_build_icons_buttons_icon_btn_external_link_svg__WEBPACK_IMPORTED_MODULE_2___default=__webpack_require__.n(_danskernesdigitalebibliotek_dpl_design_system_build_icons_buttons_icon_btn_external_link_svg__WEBPACK_IMPORTED_MODULE_2__),clsx__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/clsx/dist/clsx.mjs");const ButtonIcon=({buttonType,collapsible,iconClassNames})=>{const iconClassName=`btn-icon ${(0,clsx__WEBPACK_IMPORTED_MODULE_3__.Z)({"btn-collapsible":collapsible},[iconClassNames])}`;return"default"===buttonType?react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"ml-16"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("img",{className:iconClassName,src:_danskernesdigitalebibliotek_dpl_design_system_build_icons_arrow_ui_icon_arrow_ui_small_right_svg__WEBPACK_IMPORTED_MODULE_1___default(),alt:""})):"external-link"===buttonType?react__WEBPACK_IMPORTED_MODULE_0__.createElement("img",{className:iconClassName,src:_danskernesdigitalebibliotek_dpl_design_system_build_icons_buttons_icon_btn_external_link_svg__WEBPACK_IMPORTED_MODULE_2___default(),alt:""}):null};try{ButtonIcon.displayName="ButtonIcon",ButtonIcon.__docgenInfo={description:"",displayName:"ButtonIcon",props:{buttonType:{defaultValue:null,description:"",name:"buttonType",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"search"'},{value:'"none"'},{value:'"default"'},{value:'"external-link"'}]}},collapsible:{defaultValue:null,description:"",name:"collapsible",required:!1,type:{name:"boolean | undefined"}},iconClassNames:{defaultValue:null,description:"",name:"iconClassNames",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/Buttons/ButtonIcon.tsx#ButtonIcon"]={docgenInfo:ButtonIcon.__docgenInfo,name:"ButtonIcon",path:"src/components/Buttons/ButtonIcon.tsx#ButtonIcon"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/Buttons/LinkButton.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var clsx__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/clsx/dist/clsx.mjs"),react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_atoms_links_Link__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/components/atoms/links/Link.tsx"),_ButtonIcon__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/components/Buttons/ButtonIcon.tsx");const LinkButton=({buttonType,children,classNames,dataCy="link-button",iconClassNames,isNewTab=!1,size="medium",trackClick,url,variant="filled",ariaLabelledBy,id})=>react__WEBPACK_IMPORTED_MODULE_0__.createElement(_atoms_links_Link__WEBPACK_IMPORTED_MODULE_1__.Z,{href:url,isNewTab,className:(0,clsx__WEBPACK_IMPORTED_MODULE_3__.Z)("btn-primary",`btn-${variant}`,`btn-${size}`,"arrow__hover--right-small","hide-linkstyle",classNames),trackClick,dataCy,ariaLabelledBy,id},children,react__WEBPACK_IMPORTED_MODULE_0__.createElement(_ButtonIcon__WEBPACK_IMPORTED_MODULE_2__.E,{buttonType,iconClassNames})),__WEBPACK_DEFAULT_EXPORT__=LinkButton;try{LinkButton.displayName="LinkButton",LinkButton.__docgenInfo={description:"",displayName:"LinkButton",props:{buttonType:{defaultValue:null,description:"",name:"buttonType",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"search"'},{value:'"none"'},{value:'"default"'},{value:'"external-link"'}]}},classNames:{defaultValue:null,description:"",name:"classNames",required:!1,type:{name:"string | undefined"}},dataCy:{defaultValue:{value:"link-button"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}},iconClassNames:{defaultValue:null,description:"",name:"iconClassNames",required:!1,type:{name:"string | undefined"}},isNewTab:{defaultValue:{value:"false"},description:"",name:"isNewTab",required:!1,type:{name:"boolean | undefined"}},size:{defaultValue:{value:"medium"},description:"",name:"size",required:!1,type:{name:"enum",value:[{value:'"xsmall"'},{value:'"small"'},{value:'"medium"'},{value:'"large"'},{value:'"xlarge"'}]}},trackClick:{defaultValue:null,description:"",name:"trackClick",required:!1,type:{name:"(() => Promise) | undefined"}},url:{defaultValue:null,description:"",name:"url",required:!0,type:{name:"URL"}},variant:{defaultValue:{value:"filled"},description:"",name:"variant",required:!1,type:{name:"enum",value:[{value:'"outline"'},{value:'"filled"'}]}},ariaLabelledBy:{defaultValue:null,description:"",name:"ariaLabelledBy",required:!1,type:{name:"string | undefined"}},id:{defaultValue:null,description:"",name:"id",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/Buttons/LinkButton.tsx#LinkButton"]={docgenInfo:LinkButton.__docgenInfo,name:"LinkButton",path:"src/components/Buttons/LinkButton.tsx#LinkButton"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/Disclosures/DisclosureControllable.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var clsx__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/clsx/dist/clsx.mjs"),react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js");const DisclosureControllable=({id,children,showContent=!1,cyData,className,summary})=>{const[isOpen,setIsOpen]=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(showContent),toggleOpen=(0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)((()=>{setIsOpen((prevIsOpen=>!prevIsOpen))}),[]),handleClick=(0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)((()=>{toggleOpen()}),[toggleOpen]),handleKeyDown=(0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)((e=>{"Enter"===e.key&&toggleOpen()}),[toggleOpen]),disclosureId=`disclosure-${id}`;return react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:(0,clsx__WEBPACK_IMPORTED_MODULE_1__.Z)("disclosure text-body-large",className)},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{"data-cy":cyData,onClick:handleClick,onKeyDown:handleKeyDown,role:"button",tabIndex:0,"aria-controls":disclosureId,"aria-expanded":isOpen},summary),isOpen&&react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{id:disclosureId},children))},__WEBPACK_DEFAULT_EXPORT__=DisclosureControllable;try{DisclosureControllable.displayName="DisclosureControllable",DisclosureControllable.__docgenInfo={description:"",displayName:"DisclosureControllable",props:{id:{defaultValue:null,description:"",name:"id",required:!0,type:{name:"string"}},showContent:{defaultValue:{value:"false"},description:"",name:"showContent",required:!1,type:{name:"boolean | undefined"}},onClick:{defaultValue:null,description:"",name:"onClick",required:!1,type:{name:"(() => void) | undefined"}},cyData:{defaultValue:null,description:"",name:"cyData",required:!1,type:{name:"string | undefined"}},className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string | undefined"}},summary:{defaultValue:null,description:"",name:"summary",required:!0,type:{name:"ReactNode"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/Disclosures/DisclosureControllable.tsx#DisclosureControllable"]={docgenInfo:DisclosureControllable.__docgenInfo,name:"DisclosureControllable",path:"src/components/Disclosures/DisclosureControllable.tsx#DisclosureControllable"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/Disclosures/DisclosureSummary.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>Disclosures_DisclosureSummary});var react=__webpack_require__("./node_modules/react/index.js"),ExpandMore=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/ExpandMore.svg"),ExpandMore_default=__webpack_require__.n(ExpandMore),clsx=__webpack_require__("./node_modules/clsx/dist/clsx.mjs");const Heading=({children,level,className})=>{const HeadingTag=level;return react.createElement(HeadingTag,{className},children)},Heading_Heading=Heading;try{Heading.displayName="Heading",Heading.__docgenInfo={description:"",displayName:"Heading",props:{level:{defaultValue:null,description:"",name:"level",required:!0,type:{name:"enum",value:[{value:'"h2"'},{value:'"h3"'},{value:'"h4"'},{value:'"h5"'}]}},className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/Heading/Heading.tsx#Heading"]={docgenInfo:Heading.__docgenInfo,name:"Heading",path:"src/components/Heading/Heading.tsx#Heading"})}catch(__react_docgen_typescript_loader_error){}const Pagefold=({text,state,dataCy="page-fold"})=>react.createElement("div",{"data-cy":dataCy,className:"pagefold-parent--xsmall availability-label--unselected text-label availability-label"},react.createElement("div",{className:`pagefold-triangle--xsmall pagefold-triangle--${state}`}),react.createElement("p",{className:"text-label-normal ml-24 mr-8"},text)),pagefold_Pagefold=Pagefold;try{Pagefold.displayName="Pagefold",Pagefold.__docgenInfo={description:"",displayName:"Pagefold",props:{text:{defaultValue:null,description:"",name:"text",required:!0,type:{name:"string"}},state:{defaultValue:null,description:"",name:"state",required:!0,type:{name:"enum",value:[{value:'"success"'},{value:'"alert"'}]}},dataCy:{defaultValue:{value:"page-fold"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/pagefold/Pagefold.tsx#Pagefold"]={docgenInfo:Pagefold.__docgenInfo,name:"Pagefold",path:"src/components/pagefold/Pagefold.tsx#Pagefold"})}catch(__react_docgen_typescript_loader_error){}var utils_text=__webpack_require__("./src/core/utils/text.tsx");const DisclosureSummary=({title,headingLevel="h3",mainIconPath,isAvailable,itemRef,className,dataCy="disclosure-summary"})=>{const t=(0,utils_text.X)();return react.createElement("summary",{ref:itemRef,className:(0,clsx.Z)("disclosure__headline text-body-large ",className),"data-cy":dataCy},mainIconPath&&react.createElement("div",{className:"disclosure__icon bg-identity-tint-120"},react.createElement("img",{className:"invert",src:mainIconPath,alt:""})),react.createElement(Heading_Heading,{level:headingLevel,className:"text-body-large disclosure__text"+(void 0!==isAvailable?"--shorter":"")},title),void 0!==isAvailable&&react.createElement(pagefold_Pagefold,{text:t(isAvailable?"availabilityAvailableText":"availabilityUnavailableText"),state:isAvailable?"success":"alert"}),react.createElement("img",{className:"disclosure__expand noselect",src:ExpandMore_default(),alt:""}))},Disclosures_DisclosureSummary=DisclosureSummary;try{DisclosureSummary.displayName="DisclosureSummary",DisclosureSummary.__docgenInfo={description:"",displayName:"DisclosureSummary",props:{title:{defaultValue:null,description:"",name:"title",required:!0,type:{name:"string"}},headingLevel:{defaultValue:{value:"h3"},description:"",name:"headingLevel",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"h2"'},{value:'"h3"'},{value:'"h4"'},{value:'"h5"'}]}},mainIconPath:{defaultValue:null,description:"",name:"mainIconPath",required:!1,type:{name:"string | undefined"}},isAvailable:{defaultValue:null,description:"",name:"isAvailable",required:!1,type:{name:"boolean | undefined"}},itemRef:{defaultValue:null,description:"",name:"itemRef",required:!1,type:{name:"MutableRefObject | undefined"}},className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string | undefined"}},dataCy:{defaultValue:{value:"disclosure-summary"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/Disclosures/DisclosureSummary.tsx#DisclosureSummary"]={docgenInfo:DisclosureSummary.__docgenInfo,name:"DisclosureSummary",path:"src/components/Disclosures/DisclosureSummary.tsx#DisclosureSummary"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/Disclosures/disclosure.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),clsx__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/clsx/dist/clsx.mjs"),_core_utils_helpers_lazy_load__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/core/utils/helpers/lazy-load.ts");const __WEBPACK_DEFAULT_EXPORT__=({children,open,dataCy="disclosure",className,summary})=>{const{itemRef,hasBeenVisible:showItem}=(0,_core_utils_helpers_lazy_load__WEBPACK_IMPORTED_MODULE_1__.L)(),summaryWithRef=react__WEBPACK_IMPORTED_MODULE_0__.cloneElement(summary,{itemRef});return react__WEBPACK_IMPORTED_MODULE_0__.createElement("details",{className:(0,clsx__WEBPACK_IMPORTED_MODULE_2__.Z)("disclosure text-body-large",className),open,"data-cy":dataCy},summaryWithRef,showItem&&children)};try{disclosure.displayName="disclosure",disclosure.__docgenInfo={description:"",displayName:"disclosure",props:{open:{defaultValue:null,description:"",name:"open",required:!1,type:{name:"boolean | undefined"}},dataCy:{defaultValue:{value:"disclosure"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}},className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string | undefined"}},summary:{defaultValue:null,description:"",name:"summary",required:!0,type:{name:"ReactElement>"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/Disclosures/disclosure.tsx#disclosure"]={docgenInfo:disclosure.__docgenInfo,name:"disclosure",path:"src/components/Disclosures/disclosure.tsx#disclosure"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/Dropdown/Dropdown.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>Dropdown_Dropdown});var clsx=__webpack_require__("./node_modules/clsx/dist/clsx.mjs"),react=__webpack_require__("./node_modules/react/index.js"),icon_triangle=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/basic/icon-triangle.svg"),icon_triangle_default=__webpack_require__.n(icon_triangle),ExpandMore=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/ExpandMore.svg"),ExpandMore_default=__webpack_require__.n(ExpandMore);const DropdownIcon=({arrowIcon})=>"triangles"===arrowIcon?react.createElement("span",null,react.createElement("img",{className:"dropdown__arrow",src:icon_triangle_default(),alt:""}),react.createElement("img",{className:"dropdown__arrow dropdown__arrow--bottom",src:icon_triangle_default(),alt:""})):"chevron"===arrowIcon?react.createElement("img",{className:"dropdown__arrow",src:ExpandMore_default(),alt:""}):null,Dropdown_DropdownIcon=DropdownIcon;try{DropdownIcon.displayName="DropdownIcon",DropdownIcon.__docgenInfo={description:"",displayName:"DropdownIcon",props:{arrowIcon:{defaultValue:null,description:"",name:"arrowIcon",required:!0,type:{name:"enum",value:[{value:'"triangles"'},{value:'"chevron"'}]}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/Dropdown/DropdownIcon.tsx#DropdownIcon"]={docgenInfo:DropdownIcon.__docgenInfo,name:"DropdownIcon",path:"src/components/Dropdown/DropdownIcon.tsx#DropdownIcon"})}catch(__react_docgen_typescript_loader_error){}const Dropdown=({arrowIcon,ariaLabel,options,classNames,innerClassNames,handleOnChange,placeholder,cyData,label,id,labelledBy,defaultValue})=>{const classes={root:(0,clsx.Z)("dropdown",classNames),select:(0,clsx.Z)("dropdown__select",null==innerClassNames?void 0:innerClassNames.select),option:(0,clsx.Z)("dropdown__option",null==innerClassNames?void 0:innerClassNames.option),arrowWrapper:(0,clsx.Z)("dropdown__arrows",null==innerClassNames?void 0:innerClassNames.arrowWrapper)},optionsList=placeholder?[placeholder,...options]:options;return react.createElement("div",{className:classes.root},label&&react.createElement("label",{htmlFor:id},label),react.createElement("div",{className:classes.root},react.createElement("select",{id,"data-cy":cyData,className:classes.select,"aria-labelledby":labelledBy,"aria-label":ariaLabel,onChange:e=>{handleOnChange&&e.target.value&&handleOnChange(e)}},optionsList.map((({label:optionsLabel,value,disabled})=>react.createElement("option",{key:optionsLabel,value,className:classes.option,disabled,selected:value===defaultValue},optionsLabel)))),react.createElement("div",{className:classes.arrowWrapper},react.createElement(Dropdown_DropdownIcon,{arrowIcon}))))},Dropdown_Dropdown=Dropdown;try{Dropdown.displayName="Dropdown",Dropdown.__docgenInfo={description:"",displayName:"Dropdown",props:{options:{defaultValue:null,description:"",name:"options",required:!0,type:{name:"Option[]"}},label:{defaultValue:null,description:"",name:"label",required:!1,type:{name:"string | undefined"}},id:{defaultValue:null,description:"",name:"id",required:!1,type:{name:"string | undefined"}},ariaLabel:{defaultValue:null,description:"",name:"ariaLabel",required:!0,type:{name:"string"}},labelledBy:{defaultValue:null,description:"",name:"labelledBy",required:!1,type:{name:"string | undefined"}},arrowIcon:{defaultValue:null,description:"",name:"arrowIcon",required:!0,type:{name:"enum",value:[{value:'"triangles"'},{value:'"chevron"'}]}},classNames:{defaultValue:null,description:"",name:"classNames",required:!1,type:{name:"string | undefined"}},innerClassNames:{defaultValue:null,description:"",name:"innerClassNames",required:!1,type:{name:"{ select?: string | undefined; option?: string | undefined; arrowWrapper?: string | undefined; } | undefined"}},handleOnChange:{defaultValue:null,description:"",name:"handleOnChange",required:!1,type:{name:"((e: ChangeEvent) => void) | undefined"}},placeholder:{defaultValue:null,description:"",name:"placeholder",required:!1,type:{name:"Option | undefined"}},cyData:{defaultValue:null,description:"",name:"cyData",required:!1,type:{name:"string | undefined"}},defaultValue:{defaultValue:null,description:"",name:"defaultValue",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/Dropdown/Dropdown.tsx#Dropdown"]={docgenInfo:Dropdown.__docgenInfo,name:"Dropdown",path:"src/components/Dropdown/Dropdown.tsx#Dropdown"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/GroupModal/GroupModalContent.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),react_use__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./node_modules/react-use/esm/useIntersection.js"),_checkbox_Checkbox__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/components/checkbox/Checkbox.tsx"),_core_utils_text__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/core/utils/text.tsx"),_core_utils_helpers_general__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/core/utils/helpers/general.ts");const GroupModalContent=({amountOfSelectableMaterials,selectableMaterials=[],selectedMaterials=[],selectMaterials,buttonComponent,children})=>{const t=(0,_core_utils_text__WEBPACK_IMPORTED_MODULE_2__.X)(),intersectionRef=(0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null),intersection=(0,react_use__WEBPACK_IMPORTED_MODULE_4__.Z)(intersectionRef,{threshold:0}),checkBoxComponent=void 0!==selectMaterials?react__WEBPACK_IMPORTED_MODULE_0__.createElement(_checkbox_Checkbox__WEBPACK_IMPORTED_MODULE_1__.Z,{selected:0!==amountOfSelectableMaterials&&selectedMaterials.length===amountOfSelectableMaterials,disabled:0===amountOfSelectableMaterials,id:"checkbox-select-all",onChecked:()=>{selectMaterials&&(selectedMaterials.length===amountOfSelectableMaterials?selectMaterials((0,_core_utils_helpers_general__WEBPACK_IMPORTED_MODULE_3__.JY)([])):selectMaterials(selectableMaterials))},label:t("groupModalCheckboxText")}):null;return react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment,null,react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"button-box",ref:intersectionRef},checkBoxComponent,buttonComponent),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"modal-loan__list"},children),!(null!=intersection&&intersection.isIntersecting)&&react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"button-box button-box--sticky-bottom"},checkBoxComponent,buttonComponent))},__WEBPACK_DEFAULT_EXPORT__=GroupModalContent;try{GroupModalContent.displayName="GroupModalContent",GroupModalContent.__docgenInfo={description:"",displayName:"GroupModalContent",props:{amountOfSelectableMaterials:{defaultValue:null,description:"",name:"amountOfSelectableMaterials",required:!0,type:{name:"number"}},selectableMaterials:{defaultValue:{value:"[]"},description:"",name:"selectableMaterials",required:!1,type:{name:"Nullable>[] | undefined"}},selectedMaterials:{defaultValue:{value:"[]"},description:"",name:"selectedMaterials",required:!1,type:{name:"Nullable>[] | undefined"}},buttonComponent:{defaultValue:null,description:"",name:"buttonComponent",required:!0,type:{name:"ReactNode"}},selectMaterials:{defaultValue:null,description:"",name:"selectMaterials",required:!1,type:{name:"((materialIds: Nullable>[]) => void) | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/GroupModal/GroupModalContent.tsx#GroupModalContent"]={docgenInfo:GroupModalContent.__docgenInfo,name:"GroupModalContent",path:"src/components/GroupModal/GroupModalContent.tsx#GroupModalContent"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/GroupModal/LoansGroupModal.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>GroupModal_LoansGroupModal});var react=__webpack_require__("./node_modules/react/index.js"),es=__webpack_require__("./node_modules/react-query/es/index.js"),modal=__webpack_require__("./src/core/utils/modal.tsx"),utils_text=__webpack_require__("./src/core/utils/text.tsx"),GroupModalContent=__webpack_require__("./src/components/GroupModal/GroupModalContent.tsx"),general=__webpack_require__("./src/core/utils/helpers/general.ts"),fbs=__webpack_require__("./src/core/fbs/fbs.ts"),selectable_material=__webpack_require__("./src/apps/loan-list/materials/selectable-material/selectable-material.tsx"),loan_type=__webpack_require__("./src/core/utils/types/loan-type.ts"),use_pager=__webpack_require__("./src/components/result-pager/use-pager.tsx"),helpers=__webpack_require__("./src/apps/loan-list/utils/helpers.ts");const StatusMessage=({className,loanType,renewalStatusList})=>{const t=(0,utils_text.X)();return react.createElement(react.Fragment,null,renewalStatusList&&renewalStatusList.map((text=>react.createElement("span",{className},(0,helpers.li)(text,t)))),"interLibraryLoan"===loanType&&react.createElement("span",{className},t("groupModalRenewLoanDeniedInterLibraryLoanText")))},selectable_material_StatusMessage=StatusMessage;try{StatusMessage.displayName="StatusMessage",StatusMessage.__docgenInfo={description:"",displayName:"StatusMessage",props:{className:{defaultValue:null,description:"",name:"className",required:!0,type:{name:"string"}},loanType:{defaultValue:null,description:"",name:"loanType",required:!0,type:{name:"string | null"}},renewalStatusList:{defaultValue:null,description:"",name:"renewalStatusList",required:!0,type:{name:"string[]"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/loan-list/materials/selectable-material/StatusMessage.tsx#StatusMessage"]={docgenInfo:StatusMessage.__docgenInfo,name:"StatusMessage",path:"src/apps/loan-list/materials/selectable-material/StatusMessage.tsx#StatusMessage"})}catch(__react_docgen_typescript_loader_error){}var status_badge=__webpack_require__("./src/apps/loan-list/materials/utils/status-badge.tsx"),date=__webpack_require__("./src/core/utils/helpers/date.ts");const GroupModalLoansList=({materials,selectedMaterials,openDetailsModal,selectMaterials,pageSize})=>{const t=(0,utils_text.X)(),[displayedMaterials,setDisplayedMaterials]=(0,react.useState)([]),{itemsShown,PagerComponent,firstInNewPage}=(0,use_pager.Z)({hitcount:materials.length,pageSize});(0,react.useEffect)((()=>{setDisplayedMaterials([...materials].splice(0,itemsShown))}),[itemsShown,materials]);const onMaterialChecked=item=>{const selectedMaterialsCopy=[...selectedMaterials],indexOfItemToRemove=selectedMaterials.indexOf(item);indexOfItemToRemove>-1?selectedMaterialsCopy.splice(indexOfItemToRemove,1):selectedMaterialsCopy.push(item),selectMaterials(selectedMaterialsCopy)};return react.createElement(react.Fragment,null,react.createElement("ul",{className:"modal-loan__list-materials"},displayedMaterials.map(((loanType,i)=>react.createElement(selectable_material.Z,{focused:firstInNewPage===i,statusBadgeComponent:react.createElement(status_badge.Z,{badgeDate:loanType.dueDate,neutralText:loanType.dueDate?t("groupModalDueDateMaterialText",{placeholders:{"@date":(0,date.p6)(loanType.dueDate)}}):""}),statusMessageComponentDesktop:react.createElement(selectable_material_StatusMessage,{className:"list-materials__status__note-desktop",loanType:loanType.loanType,renewalStatusList:loanType.renewalStatusList}),statusMessageComponentMobile:react.createElement(selectable_material_StatusMessage,{className:"list-materials__status__note-mobile",loanType:loanType.loanType,renewalStatusList:loanType.renewalStatusList}),item:loanType,openDetailsModal:item=>{(0,loan_type.P)(item)&&openDetailsModal(item)},key:loanType.faust,selected:selectedMaterials.includes(loanType),onMaterialChecked,disabled:!loanType.isRenewable})))),react.createElement(PagerComponent,{classNames:"result-pager--margin-bottom"}))},GroupModal_GroupModalLoansList=GroupModalLoansList;try{GroupModalLoansList.displayName="GroupModalLoansList",GroupModalLoansList.__docgenInfo={description:"",displayName:"GroupModalLoansList",props:{materials:{defaultValue:null,description:"",name:"materials",required:!0,type:{name:"LoanType[]"}},pageSize:{defaultValue:null,description:"",name:"pageSize",required:!0,type:{name:"number"}},selectedMaterials:{defaultValue:null,description:"",name:"selectedMaterials",required:!0,type:{name:"Nullable>[]"}},selectMaterials:{defaultValue:null,description:"",name:"selectMaterials",required:!0,type:{name:"(materialIds: Nullable>[]) => void"}},openDetailsModal:{defaultValue:null,description:"",name:"openDetailsModal",required:!0,type:{name:"(loan: LoanType) => void"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/GroupModal/GroupModalLoansList.tsx#GroupModalLoansList"]={docgenInfo:GroupModalLoansList.__docgenInfo,name:"GroupModalLoansList",path:"src/components/GroupModal/GroupModalLoansList.tsx#GroupModalLoansList"})}catch(__react_docgen_typescript_loader_error){}var Button=__webpack_require__("./src/components/Buttons/Button.tsx"),renewal=__webpack_require__("./src/core/utils/helpers/renewal.ts");const LoansGroupModalButton=({materialsToRenew,renewableMaterials,renewSelected,renewingStatus})=>{const t=(0,utils_text.X)(),materialsCount=materialsToRenew.length,label=(0,renewal.CO)({isRenewable:renewableMaterials>0,renewingStatus,t,defaultText:t("groupModalButtonText",{count:materialsCount,placeholders:{"@count":materialsCount}})});return react.createElement(Button.z,{dataCy:"loans-group-modal-button",label,buttonType:"none",id:"renew-several",variant:"filled",disabled:0===renewableMaterials||"pending"===renewingStatus,collapsible:!1,onClick:renewSelected,size:"small"})},GroupModal_LoansGroupModalButton=LoansGroupModalButton;try{LoansGroupModalButton.displayName="LoansGroupModalButton",LoansGroupModalButton.__docgenInfo={description:"",displayName:"LoansGroupModalButton",props:{materialsToRenew:{defaultValue:null,description:"",name:"materialsToRenew",required:!0,type:{name:"Nullable>[]"}},renewableMaterials:{defaultValue:null,description:"",name:"renewableMaterials",required:!0,type:{name:"number"}},renewSelected:{defaultValue:null,description:"",name:"renewSelected",required:!0,type:{name:"() => void"}},renewingStatus:{defaultValue:null,description:"",name:"renewingStatus",required:!0,type:{name:"enum",value:[{value:'"success"'},{value:'"idle"'},{value:'"pending"'},{value:'"error"'}]}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/GroupModal/LoansGroupModalButton.tsx#LoansGroupModalButton"]={docgenInfo:LoansGroupModalButton.__docgenInfo,name:"LoansGroupModalButton",path:"src/components/GroupModal/LoansGroupModalButton.tsx#LoansGroupModalButton"})}catch(__react_docgen_typescript_loader_error){}var RenewalModalMessage=__webpack_require__("./src/components/renewal/RenewalModalMessage.tsx"),useRequestsWithStatus=__webpack_require__("./src/core/utils/useRequestsWithStatus.tsx"),modal_helpers=__webpack_require__("./src/core/utils/helpers/modal-helpers.ts");const LoansGroupModal=({dueDate,loansModal,openDetailsModal,openAcceptModal,pageSize,accepted,resetAccepted,children})=>{const t=(0,utils_text.X)(),{mutate}=(0,fbs.Gb)(),[acceptedButtonPressed,setAcceptedButtonPressed]=(0,react.useState)(accepted),{dueDateModal,allLoansId}=(0,modal_helpers.GM)(),queryClient=(0,es.useQueryClient)(),modalIdUsed=dueDate?`${dueDateModal}-${dueDate}`:allLoansId,renewableMaterials=(0,general.R3)(loansModal),[materialsToRenew,setMaterialsToRenew]=(0,react.useState)([]),[renewingResponse,setRenewingResponse]=(0,react.useState)(null),{handler:renew,requestStatus:renewingStatus,setRequestStatus:setRenewingStatus}=(0,useRequestsWithStatus.cQ)({request:{params:{data:materialsToRenew.map((id=>Number(id)))},operation:mutate},onError:()=>{setRenewingResponse(null)},onSuccess:result=>{queryClient.invalidateQueries((0,fbs._0)()),result&&setRenewingResponse(result)}}),renewSelected=(0,react.useCallback)((()=>{const selectedLoansLoanDate=loansModal.filter((loan=>materialsToRenew.includes(loan))).map((({loanDate:localLoanDate})=>localLoanDate)).filter((item=>null!=item)),acceptModal=(0,general.GJ)(loansModal)&&(0,general.f4)(selectedLoansLoanDate);acceptModal?openAcceptModal():acceptModal||renew()}),[loansModal,materialsToRenew,openAcceptModal,renew]);(0,react.useEffect)((()=>{setMaterialsToRenew((0,general.JY)(loansModal))}),[loansModal]),(0,react.useEffect)((()=>{accepted&&(setAcceptedButtonPressed(accepted),resetAccepted())}),[accepted,resetAccepted]);const selectMaterials=materialIds=>{setMaterialsToRenew(materialIds)};(0,react.useEffect)((()=>{acceptedButtonPressed&&(renew(),setAcceptedButtonPressed(!1))}),[acceptedButtonPressed,renew]);const showSuccessMessage="success"===renewingStatus,countRenewed=(0,renewal.TJ)(renewingResponse);return react.createElement(modal.Z,{modalId:modalIdUsed,closeModalAriaLabelText:t("groupModalLoansCloseModalAriaLabelText"),screenReaderModalDescriptionText:t("groupModalLoansAriaDescriptionText"),eventCallbacks:{close:()=>setRenewingStatus("idle")},classNames:showSuccessMessage?"modal-cta modal-padding":""},["idle","pending"].includes(renewingStatus)&&react.createElement("div",{className:"modal-loan"},children,react.createElement(GroupModalContent.Z,{selectMaterials,selectedMaterials:materialsToRenew,amountOfSelectableMaterials:renewableMaterials,selectableMaterials:(0,general.JY)(loansModal),buttonComponent:react.createElement(GroupModal_LoansGroupModalButton,{materialsToRenew,renewableMaterials,renewSelected,renewingStatus})},react.createElement(GroupModal_GroupModalLoansList,{materials:loansModal,selectedMaterials:materialsToRenew,openDetailsModal,selectMaterials,pageSize}))),!["idle","pending"].includes(renewingStatus)&&react.createElement(RenewalModalMessage.Z,{messageType:"success"===renewingStatus?"success":"error",renewingResponse,modalId:modalIdUsed,setRenewingStatus,texts:{successTitleText:t("renewGroupModalLoansSuccessTitleText"),successStatusText:t("renewGroupModalLoansSuccessStatusText",{count:countRenewed}),noRenewalsPossibleErrorTitleText:t("renewGroupModalLoansNoRenewalsPossibleErrorTitleText"),noRenewalsPossibleErrorStatusText:t("renewGroupModalLoansNoRenewalsPossibleErrorStatusText"),errorTitleText:t("renewGroupModalLoansErrorTitleText"),errorStatusText:t("renewGroupModalLoansErrorStatusText"),buttonText:t("renewGroupModalLoansButtonText")}}))},GroupModal_LoansGroupModal=LoansGroupModal;try{LoansGroupModal.displayName="LoansGroupModal",LoansGroupModal.__docgenInfo={description:"",displayName:"LoansGroupModal",props:{dueDate:{defaultValue:null,description:"",name:"dueDate",required:!1,type:{name:"string | null | undefined"}},loansModal:{defaultValue:null,description:"",name:"loansModal",required:!0,type:{name:"LoanType[]"}},pageSize:{defaultValue:null,description:"",name:"pageSize",required:!0,type:{name:"number"}},accepted:{defaultValue:null,description:"",name:"accepted",required:!0,type:{name:"boolean"}},openDetailsModal:{defaultValue:null,description:"",name:"openDetailsModal",required:!0,type:{name:"(loan: LoanType) => void"}},openAcceptModal:{defaultValue:null,description:"",name:"openAcceptModal",required:!0,type:{name:"() => void"}},resetAccepted:{defaultValue:null,description:"",name:"resetAccepted",required:!0,type:{name:"() => void"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/GroupModal/LoansGroupModal.tsx#LoansGroupModal"]={docgenInfo:LoansGroupModal.__docgenInfo,name:"LoansGroupModal",path:"src/components/GroupModal/LoansGroupModal.tsx#LoansGroupModal"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/GroupModal/SimpleModalHeader.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js");const SimpleModalHeader=({header})=>react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"modal-loan__header"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",null,react__WEBPACK_IMPORTED_MODULE_0__.createElement("h2",{className:"modal-loan__title text-header-h2"},header))),__WEBPACK_DEFAULT_EXPORT__=SimpleModalHeader;try{SimpleModalHeader.displayName="SimpleModalHeader",SimpleModalHeader.__docgenInfo={description:"",displayName:"SimpleModalHeader",props:{header:{defaultValue:null,description:"",name:"header",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/GroupModal/SimpleModalHeader.tsx#SimpleModalHeader"]={docgenInfo:SimpleModalHeader.__docgenInfo,name:"SimpleModalHeader",path:"src/components/GroupModal/SimpleModalHeader.tsx#SimpleModalHeader"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/GroupModal/StatusCircleModalHeader.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_apps_loan_list_materials_utils_warning_bar__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/apps/loan-list/materials/utils/warning-bar.tsx"),_core_utils_helpers_general__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/core/utils/helpers/general.ts"),_core_utils_url__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/core/utils/url.tsx"),_core_utils_text__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/core/utils/text.tsx");const StatusCircleModalHeader=({dueDate,header,subHeader,statusCircleComponent})=>{const t=(0,_core_utils_text__WEBPACK_IMPORTED_MODULE_4__.X)(),feesPageUrl=(0,_core_utils_url__WEBPACK_IMPORTED_MODULE_3__.J_)()("feesPageUrl");return react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment,null,react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"modal-loan__header"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"mr-32"},statusCircleComponent),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",null,react__WEBPACK_IMPORTED_MODULE_0__.createElement("h2",{className:"modal-loan__title text-header-h2"},header),subHeader&&react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"text-body-large"},subHeader))),dueDate&&(0,_core_utils_helpers_general__WEBPACK_IMPORTED_MODULE_2__.cf)(dueDate)&&react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"modal-details__warning"},react__WEBPACK_IMPORTED_MODULE_0__.createElement(_apps_loan_list_materials_utils_warning_bar__WEBPACK_IMPORTED_MODULE_1__.Z,{leftLink:feesPageUrl,linkText:t("groupModalDueDateLinkToPageWithFeesText"),overdueText:t("groupModalDueDateWarningLoanOverdueText")})))},__WEBPACK_DEFAULT_EXPORT__=StatusCircleModalHeader;try{StatusCircleModalHeader.displayName="StatusCircleModalHeader",StatusCircleModalHeader.__docgenInfo={description:"",displayName:"StatusCircleModalHeader",props:{dueDate:{defaultValue:null,description:"",name:"dueDate",required:!1,type:{name:"string | null | undefined"}},header:{defaultValue:null,description:"",name:"header",required:!0,type:{name:"string"}},subHeader:{defaultValue:null,description:"",name:"subHeader",required:!1,type:{name:"string | undefined"}},statusCircleComponent:{defaultValue:null,description:"",name:"statusCircleComponent",required:!0,type:{name:"ReactNode"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/GroupModal/StatusCircleModalHeader.tsx#StatusCircleModalHeader"]={docgenInfo:StatusCircleModalHeader.__docgenInfo,name:"StatusCircleModalHeader",path:"src/components/GroupModal/StatusCircleModalHeader.tsx#StatusCircleModalHeader"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/accept-fees-modal/AcceptFeesModal.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_core_utils_modal__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/core/utils/modal.tsx"),_core_utils_text__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/core/utils/text.tsx"),_Buttons_Button__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/components/Buttons/Button.tsx"),_core_utils_helpers_modal_helpers__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/core/utils/helpers/modal-helpers.ts");const __WEBPACK_DEFAULT_EXPORT__=({accept})=>{const{acceptModal}=(0,_core_utils_helpers_modal_helpers__WEBPACK_IMPORTED_MODULE_4__.GM)(),t=(0,_core_utils_text__WEBPACK_IMPORTED_MODULE_2__.X)(),{close}=(0,_core_utils_modal__WEBPACK_IMPORTED_MODULE_1__.f)();return react__WEBPACK_IMPORTED_MODULE_0__.createElement(_core_utils_modal__WEBPACK_IMPORTED_MODULE_1__.Z,{modalId:acceptModal,closeModalAriaLabelText:t("acceptModalAriaLabelText"),screenReaderModalDescriptionText:t("acceptModalAriaDescriptionText")},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"modal-cta__container"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("h2",{className:"text-header-h2"},t("acceptModalHeaderText")),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"mt-48 color-secondary-gray"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("p",{className:"text-body-medium-regular"},t("acceptModalBodyText")),react__WEBPACK_IMPORTED_MODULE_0__.createElement("p",{className:"text-links mt-24"},t("acceptModalAreYouSureText"))),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"modal-cta__buttons mt-48"},react__WEBPACK_IMPORTED_MODULE_0__.createElement(_Buttons_Button__WEBPACK_IMPORTED_MODULE_3__.z,{label:t("acceptModalCancelButtonText"),buttonType:"none",disabled:!1,collapsible:!1,size:"large",variant:"filled",onClick:()=>close(acceptModal)}),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"modal-cta__link"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("button",{type:"button",onClick:()=>(close(acceptModal),void accept()),className:"link-tag color-secondary-gray ml-8"},t("acceptModalAcceptButtonText"))))))};try{AcceptFeesModal.displayName="AcceptFeesModal",AcceptFeesModal.__docgenInfo={description:"",displayName:"AcceptFeesModal",props:{accept:{defaultValue:null,description:"",name:"accept",required:!0,type:{name:"() => void"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/accept-fees-modal/AcceptFeesModal.tsx#AcceptFeesModal"]={docgenInfo:AcceptFeesModal.__docgenInfo,name:"AcceptFeesModal",path:"src/components/accept-fees-modal/AcceptFeesModal.tsx#AcceptFeesModal"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/alert/alert.dev.jsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Info:()=>Info,Success:()=>Success,Warning:()=>Warning,default:()=>alert_dev});var react=__webpack_require__("./node_modules/react/index.js"),prop_types=__webpack_require__("./node_modules/prop-types/index.js"),prop_types_default=__webpack_require__.n(prop_types),reach_alert_esm=__webpack_require__("./node_modules/@reach/alert/dist/reach-alert.esm.js");function Alert({className,message,type,variant}){return react.createElement(reach_alert_esm.Z,{className:`dpl-alert dpl-alert--${variant} ${className}`,type},message)}Alert.propTypes={className:prop_types_default().string,message:prop_types_default().string,type:prop_types_default().oneOf(["assertive","polite"]),variant:prop_types_default().oneOf(["info","success","warning","blank"])},Alert.defaultProps={className:"",message:"Hov, der opstod en fejl!",type:"polite",variant:"info"};const alert_alert=Alert,alert_dev={title:"Components/Alert"},Template=args=>react.createElement(alert_alert,args),Info=Template.bind({}),Warning=Template.bind({});Warning.args={variant:"warning",message:"Noget gik galt"};const Success=Template.bind({});Success.args={variant:"success",message:"Det lykkedes"}},"./src/components/atoms/icons/arrow/arrow.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js");const __WEBPACK_DEFAULT_EXPORT__=()=>react__WEBPACK_IMPORTED_MODULE_0__.createElement("svg",{width:"61",height:"9",viewBox:"0 0 61 9",fill:"none",xmlns:"http://www.w3.org/2000/svg"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("path",{className:"arrow__body",d:"M60 4.5H0",stroke:"black"}),react__WEBPACK_IMPORTED_MODULE_0__.createElement("path",{className:"arrow__head",d:"M60.3537 4.85355C60.5489 4.65829 60.5489 4.34171 60.3537 4.14645L57.1717 0.96447C56.9764 0.769208 56.6598 0.769208 56.4646 0.96447C56.2693 1.15973 56.2693 1.47631 56.4646 1.67157L59.293 4.5L56.4646 7.32843C56.2693 7.52369 56.2693 7.84027 56.4646 8.03553C56.6598 8.2308 56.9764 8.2308 57.1717 8.03553L60.3537 4.85355ZM60.0001 4H57.0001V5H60.0001V4Z",fill:"black"}))},"./src/components/atoms/input/TextInput.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js");const TextInput=({id,label,description,validation,type,onChange,value,className,pattern,inputmode,required,title,placeholder})=>react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:`${className||"dpl-input"}`},react__WEBPACK_IMPORTED_MODULE_0__.createElement("label",{htmlFor:id},required?`${label}*`:label),react__WEBPACK_IMPORTED_MODULE_0__.createElement("input",{required,"aria-describedby":description?`description-${id}`:"",id,"data-cy":id,type,pattern,inputMode:inputmode,onChange:e=>{onChange(e.target.value)},value,"aria-labelledby":validation?`validation-${id}`:"",title,placeholder}),description&&react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"dpl-input__description",id:`description-${id}`},description),validation&&react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{id:`validation-${id}`,className:"dpl-input__validation",role:"alert"},validation)),__WEBPACK_DEFAULT_EXPORT__=TextInput;try{TextInput.displayName="TextInput",TextInput.__docgenInfo={description:"",displayName:"TextInput",props:{label:{defaultValue:null,description:"",name:"label",required:!0,type:{name:"string"}},type:{defaultValue:null,description:"",name:"type",required:!0,type:{name:"enum",value:[{value:'"number"'},{value:'"text"'},{value:'"email"'},{value:'"password"'},{value:'"tel"'}]}},id:{defaultValue:null,description:"",name:"id",required:!0,type:{name:"string"}},required:{defaultValue:null,description:"",name:"required",required:!1,type:{name:"boolean | undefined"}},description:{defaultValue:null,description:"",name:"description",required:!1,type:{name:"string | undefined"}},validation:{defaultValue:null,description:"",name:"validation",required:!1,type:{name:"string | undefined"}},onChange:{defaultValue:null,description:"",name:"onChange",required:!0,type:{name:"(value: string) => void"}},value:{defaultValue:null,description:"",name:"value",required:!1,type:{name:"string | number | undefined"}},className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string | undefined"}},pattern:{defaultValue:null,description:"",name:"pattern",required:!1,type:{name:"string | undefined"}},inputmode:{defaultValue:null,description:"",name:"inputmode",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"numeric"'}]}},title:{defaultValue:null,description:"",name:"title",required:!1,type:{name:"string | undefined"}},placeholder:{defaultValue:null,description:"",name:"placeholder",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/atoms/input/TextInput.tsx#TextInput"]={docgenInfo:TextInput.__docgenInfo,name:"TextInput",path:"src/components/atoms/input/TextInput.tsx#TextInput"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/atoms/links/Link.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>links_Link});var react=__webpack_require__("./node_modules/react/index.js"),helpers_url=__webpack_require__("./src/core/utils/helpers/url.ts");const handleTracking=({e,trackClick,isNewTab,url})=>{e.preventDefault(),trackClick().then((()=>{isNewTab&&window.open(url.href,"_blank"),(0,helpers_url.gB)(url)}))},getLinkHandler=({type,trackClick,isNewTab,url,stopPropagation})=>e=>{if(stopPropagation&&e.stopPropagation(),!trackClick)return;const{key}=e;"keyup"!==type||"keyup"!==e.type||"Enter"!==key?"click"===type&&"click"===e.type&&handleTracking({e,isNewTab,trackClick,url}):handleTracking({e,isNewTab,trackClick,url})},Link=({href,children,isNewTab=!1,className,id,trackClick,dataCy,ariaLabelledBy,stopPropagation=!1})=>{const handleClick=getLinkHandler({type:"click",isNewTab,stopPropagation,url:href,trackClick}),handleKeyUp=getLinkHandler({type:"keyup",isNewTab,stopPropagation,url:href,trackClick});return react.createElement("a",{id,"data-cy":dataCy||id,href:href.toString(),target:isNewTab?"_blank":void 0,rel:"noreferrer",className,onClick:handleClick,onKeyUp:handleKeyUp,"aria-labelledby":ariaLabelledBy},children)},links_Link=Link;try{Link.displayName="Link",Link.__docgenInfo={description:"",displayName:"Link",props:{href:{defaultValue:null,description:"",name:"href",required:!0,type:{name:"URL"}},isNewTab:{defaultValue:{value:"false"},description:"",name:"isNewTab",required:!1,type:{name:"boolean | undefined"}},className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string | undefined"}},id:{defaultValue:null,description:"",name:"id",required:!1,type:{name:"string | undefined"}},trackClick:{defaultValue:null,description:"",name:"trackClick",required:!1,type:{name:"(() => Promise) | undefined"}},dataCy:{defaultValue:null,description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}},ariaLabelledBy:{defaultValue:null,description:"",name:"ariaLabelledBy",required:!1,type:{name:"string | undefined"}},stopPropagation:{defaultValue:{value:"false"},description:"",name:"stopPropagation",required:!1,type:{name:"boolean | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/atoms/links/Link.tsx#Link"]={docgenInfo:Link.__docgenInfo,name:"Link",path:"src/components/atoms/links/Link.tsx#Link"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/atoms/links/LinkNoStyle.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_Link__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/components/atoms/links/Link.tsx");const LinkNoStyle=({url,children,isNewTab=!1,className,trackClick,dataCy="link-no-style",ariaLabelledBy})=>react__WEBPACK_IMPORTED_MODULE_0__.createElement(_Link__WEBPACK_IMPORTED_MODULE_1__.Z,{href:url,isNewTab,className:`hide-linkstyle ${className||""}`,trackClick,dataCy,ariaLabelledBy},children),__WEBPACK_DEFAULT_EXPORT__=LinkNoStyle;try{LinkNoStyle.displayName="LinkNoStyle",LinkNoStyle.__docgenInfo={description:"",displayName:"LinkNoStyle",props:{url:{defaultValue:null,description:"",name:"url",required:!0,type:{name:"URL"}},isNewTab:{defaultValue:{value:"false"},description:"",name:"isNewTab",required:!1,type:{name:"boolean | undefined"}},className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string | undefined"}},trackClick:{defaultValue:null,description:"",name:"trackClick",required:!1,type:{name:"(() => Promise) | undefined"}},dataCy:{defaultValue:{value:"link-no-style"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}},ariaLabelledBy:{defaultValue:null,description:"",name:"ariaLabelledBy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/atoms/links/LinkNoStyle.tsx#LinkNoStyle"]={docgenInfo:LinkNoStyle.__docgenInfo,name:"LinkNoStyle",path:"src/components/atoms/links/LinkNoStyle.tsx#LinkNoStyle"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/author-year/authorYear.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js");const __WEBPACK_DEFAULT_EXPORT__=({author,year})=>react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment,null,author&&author,year&&react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment,null," (",year,")"));try{authorYear.displayName="authorYear",authorYear.__docgenInfo={description:"",displayName:"authorYear",props:{author:{defaultValue:null,description:"",name:"author",required:!0,type:{name:"string | null"}},year:{defaultValue:null,description:"",name:"year",required:!0,type:{name:"string | null"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/author-year/authorYear.tsx#authorYear"]={docgenInfo:authorYear.__docgenInfo,name:"authorYear",path:"src/components/author-year/authorYear.tsx#authorYear"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/availability-label/availability-label-inside.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var clsx__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/clsx/dist/clsx.mjs"),react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_danskernesdigitalebibliotek_dpl_design_system_build_icons_collection_Check_svg__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/Check.svg"),_danskernesdigitalebibliotek_dpl_design_system_build_icons_collection_Check_svg__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(_danskernesdigitalebibliotek_dpl_design_system_build_icons_collection_Check_svg__WEBPACK_IMPORTED_MODULE_1__),_skeletons_TextLineSkeleton__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/components/skeletons/TextLineSkeleton.tsx");const __WEBPACK_DEFAULT_EXPORT__=({selected,isLoading,isAvailable,manifestText,availabilityText,quantity})=>{const availableTriangleCss=isAvailable?"success":"alert",classes={triangle:(0,clsx__WEBPACK_IMPORTED_MODULE_3__.Z)({"pagefold-triangle--none":selected},{[`pagefold-triangle--xsmall pagefold-triangle--${availableTriangleCss}`]:!selected}),check:(0,clsx__WEBPACK_IMPORTED_MODULE_3__.Z)("availability-label__check",selected&&"selected")};return react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment,null,react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:classes.triangle}),react__WEBPACK_IMPORTED_MODULE_0__.createElement("img",{className:classes.check,src:_danskernesdigitalebibliotek_dpl_design_system_build_icons_collection_Check_svg__WEBPACK_IMPORTED_MODULE_1___default(),alt:""}),manifestText&&react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment,null,react__WEBPACK_IMPORTED_MODULE_0__.createElement("p",{className:"availability-label__text text-label-semibold ml-24","data-cy":"availability-label-type"},manifestText),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"availability-label__divider ml-4"})),react__WEBPACK_IMPORTED_MODULE_0__.createElement("p",{className:`availability-label__text text-label-normal ${manifestText?"ml-4":"ml-24"} mr-8`,"data-cy":"availability-label-status"},isLoading?react__WEBPACK_IMPORTED_MODULE_0__.createElement(_skeletons_TextLineSkeleton__WEBPACK_IMPORTED_MODULE_2__.Z,{width:40}):availabilityText),quantity&&react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment,null,react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"availability-label--divider ml-4"}),react__WEBPACK_IMPORTED_MODULE_0__.createElement("p",{className:"text-label-normal mx-8"},quantity," stk")))};try{availabilitylabelinside.displayName="availabilitylabelinside",availabilitylabelinside.__docgenInfo={description:"",displayName:"availabilitylabelinside",props:{selected:{defaultValue:null,description:"",name:"selected",required:!1,type:{name:"boolean | undefined"}},isLoading:{defaultValue:null,description:"",name:"isLoading",required:!0,type:{name:"boolean"}},isAvailable:{defaultValue:null,description:"",name:"isAvailable",required:!1,type:{name:"boolean | undefined"}},manifestText:{defaultValue:null,description:"",name:"manifestText",required:!0,type:{name:"string"}},availabilityText:{defaultValue:null,description:"",name:"availabilityText",required:!1,type:{name:"string | undefined"}},quantity:{defaultValue:null,description:"",name:"quantity",required:!1,type:{name:"number | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/availability-label/availability-label-inside.tsx#availabilitylabelinside"]={docgenInfo:availabilitylabelinside.__docgenInfo,name:"availabilitylabelinside",path:"src/components/availability-label/availability-label-inside.tsx#availabilitylabelinside"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/availability-label/availability-label.dev.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Available:()=>Available,EBogPrinsenHarry:()=>EBogPrinsenHarry,MoreThanOneID:()=>MoreThanOneID,Selected:()=>Selected,Unavailable:()=>Unavailable,default:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_core_dbc_gateway_generated_graphql__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/core/dbc-gateway/generated/graphql.tsx"),_core_storybook_serviceUrlArgs__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/core/storybook/serviceUrlArgs.ts"),_core_utils_config__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/core/utils/config.tsx"),_core_utils_helpers_url__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./src/core/utils/helpers/url.ts"),_core_utils_url__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/core/utils/url.tsx"),_availability_label__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./src/components/availability-label/availability-label.tsx");const __WEBPACK_DEFAULT_EXPORT__={title:"Components/Availability Label",component:_availability_label__WEBPACK_IMPORTED_MODULE_5__.K,argTypes:{..._core_storybook_serviceUrlArgs__WEBPACK_IMPORTED_MODULE_2__.Z,faustIds:{name:"Faust Ids",control:{type:"array"}},manifestText:{name:"Manifestation text",control:{type:"text"}},url:{name:"Link",control:{type:"text"}},selected:{name:"selected",control:{type:"boolean"}},blacklistedAvailabilityBranchesConfig:{name:"Blacklisted Availability branches",defaultValue:"FBS-751032,FBS-751031,FBS-751009,FBS-751027,FBS-751024",control:{type:"text"}},cursorPointer:{name:"Cursor pointer",control:{type:"boolean"}},dataCy:{name:"Cypress data attribute",control:{type:"text"}},isbns:{name:"ISBN",control:{type:"text"}},accessTypes:{name:"Access types",options:[...Object.values(_core_dbc_gateway_generated_graphql__WEBPACK_IMPORTED_MODULE_1__.U5)],control:{type:"check"}}},args:{manifestText:"Bog",availabilityText:"Hjemme",url:new URL("/",(0,_core_utils_helpers_url__WEBPACK_IMPORTED_MODULE_6__.vW)()),selected:!1}},Template=args=>{const ConfiguredAvailabilityLabel=(0,_core_utils_url__WEBPACK_IMPORTED_MODULE_4__.XL)((0,_core_utils_config__WEBPACK_IMPORTED_MODULE_3__.Rh)(_availability_label__WEBPACK_IMPORTED_MODULE_5__.K));return react__WEBPACK_IMPORTED_MODULE_0__.createElement(ConfiguredAvailabilityLabel,args)},Available=Template.bind({});Available.args={faustIds:["61435867"]};const MoreThanOneID=Template.bind({});MoreThanOneID.args={faustIds:["62523611","62150041","61435867"]};const Selected=Template.bind({});Selected.args={faustIds:["62523611"],manifestText:"lydbog (cd-mp3)",selected:!0};const Unavailable=Template.bind({});Unavailable.args={faustIds:["62523611"],manifestText:"ebog"};const EBogPrinsenHarry=Template.bind({});EBogPrinsenHarry.args={isbns:["9788763844123"],manifestText:"ebog",accessTypes:[_core_dbc_gateway_generated_graphql__WEBPACK_IMPORTED_MODULE_1__.U5.Online]}},"./src/components/availability-label/availability-label.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{K:()=>AvailabilityLabel});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),react_use__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./node_modules/react-use/esm/useDeepCompareEffect.js"),_core_utils_text__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/core/utils/text.tsx"),_atoms_links_LinkNoStyle__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/components/atoms/links/LinkNoStyle.tsx"),_core_statistics_useStatistics__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/core/statistics/useStatistics.ts"),_core_statistics_statistics__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/core/statistics/statistics.ts"),_helper__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./src/components/availability-label/helper.ts"),_availability_label_inside__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./src/components/availability-label/availability-label-inside.tsx");const AvailabilityLabel=({manifestText,accessTypes,access,selected=!1,url,faustIds,handleSelectManifestation,cursorPointer=!1,dataCy="availability-label",isbns})=>{const{track}=(0,_core_statistics_useStatistics__WEBPACK_IMPORTED_MODULE_3__.T)(),t=(0,_core_utils_text__WEBPACK_IMPORTED_MODULE_1__.X)(),{isLoading,isAvailable}=(0,_helper__WEBPACK_IMPORTED_MODULE_5__.ru)({accessTypes,access,faustIds,isbn:isbns?isbns[0]:null}),availabilityText=t(isAvailable?"availabilityAvailableText":"availabilityUnavailableText");(0,react_use__WEBPACK_IMPORTED_MODULE_7__.Z)((()=>{selected&&track("click",{id:_core_statistics_statistics__WEBPACK_IMPORTED_MODULE_4__.h.materialStatus.id,name:_core_statistics_statistics__WEBPACK_IMPORTED_MODULE_4__.h.materialStatus.name,trackedData:availabilityText})}),[faustIds,selected]);const availabilityLabel=react__WEBPACK_IMPORTED_MODULE_0__.createElement(_availability_label_inside__WEBPACK_IMPORTED_MODULE_6__.Z,{selected,isLoading:!!isLoading,isAvailable:!!isAvailable,manifestText,availabilityText}),parentClass=(0,_helper__WEBPACK_IMPORTED_MODULE_5__.QR)({selected,cursorPointer});return url&&!handleSelectManifestation?react__WEBPACK_IMPORTED_MODULE_0__.createElement(_atoms_links_LinkNoStyle__WEBPACK_IMPORTED_MODULE_2__.Z,{className:parentClass,url,"data-cy":dataCy},availabilityLabel):react__WEBPACK_IMPORTED_MODULE_0__.createElement("button",{className:parentClass,type:"button",onClick:handleSelectManifestation,"data-cy":dataCy,"aria-pressed":selected},availabilityLabel)};try{AvailabilityLabel.displayName="AvailabilityLabel",AvailabilityLabel.__docgenInfo={description:"",displayName:"AvailabilityLabel",props:{manifestText:{defaultValue:null,description:"",name:"manifestText",required:!0,type:{name:"string"}},accessTypes:{defaultValue:null,description:"",name:"accessTypes",required:!0,type:{name:"AccessTypeCode[]"}},access:{defaultValue:null,description:"",name:"access",required:!0,type:{name:'("AccessUrl" | "DigitalArticleService" | "Ereol" | "InfomediaService" | "InterLibraryLoan" | undefined)[]'}},selected:{defaultValue:{value:"false"},description:"",name:"selected",required:!1,type:{name:"boolean | undefined"}},url:{defaultValue:null,description:"",name:"url",required:!1,type:{name:"URL | undefined"}},faustIds:{defaultValue:null,description:"",name:"faustIds",required:!0,type:{name:"`${number}`[]"}},handleSelectManifestation:{defaultValue:null,description:"",name:"handleSelectManifestation",required:!1,type:{name:"(() => void | undefined) | undefined"}},cursorPointer:{defaultValue:{value:"false"},description:"",name:"cursorPointer",required:!1,type:{name:"boolean | undefined"}},dataCy:{defaultValue:{value:"availability-label"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}},isbns:{defaultValue:null,description:"",name:"isbns",required:!0,type:{name:"string[]"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/availability-label/availability-label.tsx#AvailabilityLabel"]={docgenInfo:AvailabilityLabel.__docgenInfo,name:"AvailabilityLabel",path:"src/components/availability-label/availability-label.tsx#AvailabilityLabel"})}catch(__react_docgen_typescript_loader_error){}try{availabilitylabel.displayName="availabilitylabel",availabilitylabel.__docgenInfo={description:"",displayName:"availabilitylabel",props:{manifestText:{defaultValue:null,description:"",name:"manifestText",required:!0,type:{name:"string"}},accessTypes:{defaultValue:null,description:"",name:"accessTypes",required:!0,type:{name:"AccessTypeCode[]"}},access:{defaultValue:null,description:"",name:"access",required:!0,type:{name:'("AccessUrl" | "DigitalArticleService" | "Ereol" | "InfomediaService" | "InterLibraryLoan" | undefined)[]'}},selected:{defaultValue:{value:"false"},description:"",name:"selected",required:!1,type:{name:"boolean | undefined"}},url:{defaultValue:null,description:"",name:"url",required:!1,type:{name:"URL | undefined"}},faustIds:{defaultValue:null,description:"",name:"faustIds",required:!0,type:{name:"`${number}`[]"}},handleSelectManifestation:{defaultValue:null,description:"",name:"handleSelectManifestation",required:!1,type:{name:"(() => void | undefined) | undefined"}},cursorPointer:{defaultValue:{value:"false"},description:"",name:"cursorPointer",required:!1,type:{name:"boolean | undefined"}},dataCy:{defaultValue:{value:"availability-label"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}},isbns:{defaultValue:null,description:"",name:"isbns",required:!0,type:{name:"string[]"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/availability-label/availability-label.tsx#availabilitylabel"]={docgenInfo:availabilitylabel.__docgenInfo,name:"availabilitylabel",path:"src/components/availability-label/availability-label.tsx#availabilitylabel"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/availability-label/availability-labels.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{U:()=>AvailabilityLabels});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_core_utils_helpers_general__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/core/utils/helpers/general.ts"),_core_utils_helpers_url__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./src/core/utils/helpers/url.ts"),_core_utils_url__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/core/utils/url.tsx"),_availability_label__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/components/availability-label/availability-label.tsx"),_apps_material_helper__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/apps/material/helper.ts");const AvailabilityLabels=({manifestations,workId,selectedManifestations,setSelectedManifestations,cursorPointer=!1})=>{const materialUrl=(0,_core_utils_url__WEBPACK_IMPORTED_MODULE_2__.J_)()("materialUrl"),allMaterialTypes=(0,_core_utils_helpers_general__WEBPACK_IMPORTED_MODULE_1__.A3)(manifestations),manifestationsByMaterialType=(0,_apps_material_helper__WEBPACK_IMPORTED_MODULE_4__.Ft)(manifestations);return react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment,null,allMaterialTypes.map((materialType=>{const manifestationsOfMaterialType=manifestationsByMaterialType[materialType],faustIds=(0,_core_utils_helpers_general__WEBPACK_IMPORTED_MODULE_1__.vH)(manifestationsOfMaterialType).sort(),identifiers=(0,_apps_material_helper__WEBPACK_IMPORTED_MODULE_4__.LJ)(manifestationsOfMaterialType),url=(0,_core_utils_helpers_url__WEBPACK_IMPORTED_MODULE_5__.WO)(materialUrl,workId,materialType),accessTypesCodes=manifestationsOfMaterialType.map((manifest=>manifest.accessTypes.map((accessType=>accessType.code)))).flat(),access=manifestationsOfMaterialType.map((manifest=>manifest.access.map((acc=>acc.__typename)))).flat();return react__WEBPACK_IMPORTED_MODULE_0__.createElement(_availability_label__WEBPACK_IMPORTED_MODULE_3__.K,{key:faustIds.join("-"),url,cursorPointer,faustIds,manifestText:materialType,accessTypes:accessTypesCodes,access,selected:selectedManifestations&&materialType===(0,_core_utils_helpers_general__WEBPACK_IMPORTED_MODULE_1__.A3)(selectedManifestations)[0],handleSelectManifestation:setSelectedManifestations?()=>{setSelectedManifestations(manifestationsOfMaterialType),(0,_core_utils_helpers_url__WEBPACK_IMPORTED_MODULE_5__.ul)({type:materialType})}:void 0,isbns:identifiers})})))};try{AvailabilityLabels.displayName="AvailabilityLabels",AvailabilityLabels.__docgenInfo={description:"",displayName:"AvailabilityLabels",props:{manifestations:{defaultValue:null,description:"",name:"manifestations",required:!0,type:{name:"Manifestation[]"}},workId:{defaultValue:null,description:"",name:"workId",required:!0,type:{name:"`work-of:${number}-${string}:${number}`"}},selectedManifestations:{defaultValue:null,description:"",name:"selectedManifestations",required:!1,type:{name:"Manifestation[] | undefined"}},setSelectedManifestations:{defaultValue:null,description:"",name:"setSelectedManifestations",required:!1,type:{name:"((manifestations: Manifestation[]) => void) | undefined"}},cursorPointer:{defaultValue:{value:"false"},description:"",name:"cursorPointer",required:!1,type:{name:"boolean | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/availability-label/availability-labels.tsx#AvailabilityLabels"]={docgenInfo:AvailabilityLabels.__docgenInfo,name:"AvailabilityLabels",path:"src/components/availability-label/availability-labels.tsx#AvailabilityLabels"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/availability-label/helper.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{QR:()=>getParentAvailabilityLabelClass,ru:()=>useAvailabilityData});var react=__webpack_require__("./node_modules/react/index.js"),clsx=__webpack_require__("./node_modules/clsx/dist/clsx.mjs"),publizon=__webpack_require__("./src/core/publizon/publizon.ts"),utils_config=__webpack_require__("./src/core/utils/config.tsx"),graphql=__webpack_require__("./src/core/dbc-gateway/generated/graphql.tsx"),useGetAvailability=__webpack_require__("./src/core/utils/useGetAvailability.ts");const publizonProductStatuses={0:{isAvailable:!0,meaning:"Unknown"},1:{isAvailable:!0,meaning:"Unknown"},2:{isAvailable:!0,meaning:"Unknown"},3:{isAvailable:!0,meaning:"Unknown"},4:{isAvailable:!0,meaning:"Reservable"},5:{isAvailable:!1,meaning:"Reservation queue on the material"},6:{isAvailable:!0,meaning:"Unknown"},7:{isAvailable:!0,meaning:"Unknown"}},useAvailabilityData=({accessTypes,access,faustIds,isbn})=>{const[isAvailable,setIsAvailable]=(0,react.useState)(null),config=(0,utils_config.ZR)(),isOnline=(null==accessTypes?void 0:accessTypes.includes(graphql.U5.Online))??!1,[isCostFree,setIsCostFree]=(0,react.useState)(null),[isLoading,setIsLoading]=(0,react.useState)(null);(0,react.useEffect)((()=>{isOnline&&setIsAvailable(!0)}),[isOnline]);const{isLoading:isLoadingIdentifier}=(0,publizon.tq)(isbn??"",{query:{enabled:isOnline&&null!==isbn,onSuccess:res=>{var _res$product;!1!==(null==res||null===(_res$product=res.product)||void 0===_res$product?void 0:_res$product.costFree)?setIsCostFree(!0):setIsCostFree(!1)}}}),{isLoading:isLoadingProductInfo}=(0,publizon.LW)(isbn||"",{enabled:isOnline&&!!isbn&&!1===isCostFree&&access.some((acc=>"Ereol"===acc)),onSuccess:res=>{res&&res.loanStatus?setIsAvailable(publizonProductStatuses[res.loanStatus].isAvailable):setIsAvailable(!1)}}),{isLoading:isLoadingAvailability}=(0,useGetAvailability.Z)({faustIds:faustIds??[],config,options:{query:{enabled:!isOnline&&null!==faustIds,onSuccess:data=>{null!=data&&data.some((item=>item.available))&&setIsAvailable(!0)}}}});return(0,react.useEffect)((()=>{setIsLoading((isLoadingAvailability||isLoadingIdentifier||isLoadingProductInfo)&&null===isAvailable)}),[isLoadingAvailability,isLoadingIdentifier,isLoadingProductInfo,isAvailable]),{isLoading,isAvailable}},getParentAvailabilityLabelClass=({selected,cursorPointer})=>(0,clsx.Z)({"pagefold-parent--none availability-label--selected":selected},{"pagefold-parent--xsmall availability-label--unselected":!selected},{"cursor-pointer":cursorPointer},"text-label","availability-label")},"./src/components/button-favourite/button-favourite.dev.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{default:()=>__WEBPACK_DEFAULT_EXPORT__,favourite:()=>favourite});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_button_favourite__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/components/button-favourite/button-favourite.tsx"),_core_utils_url__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/core/utils/url.tsx"),_core_storybook_serviceUrlArgs__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/core/storybook/serviceUrlArgs.ts");function _extends(){return _extends=Object.assign?Object.assign.bind():function(target){for(var i=1;ireact__WEBPACK_IMPORTED_MODULE_0__.createElement(WrappedButtonFavourite,_extends({},args,{addToListRequest:id=>{}}))).bind({});favourite.args={}},"./src/components/button-favourite/button-favourite.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>button_favourite});var react=__webpack_require__("./node_modules/react/index.js"),es=__webpack_require__("./node_modules/react-query/es/index.js");const IconFavourite=({fill,darkBackground})=>{let classes=fill?"icon-favourite icon-favourite--filled":"icon-favourite";return darkBackground&&(classes=fill?"icon-favourite--bright-filled":"icon-favourite--bright"),react.createElement("svg",{height:"24",width:"24",className:classes,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},react.createElement("path",{d:"M11.5 20L10.2675 18.921C5.89 15.1035 3 12.5858 3 9.49591C3 6.9782 5.057 5 7.675 5C9.154 5 10.5735 5.66213 11.5 6.70845C12.4265 5.66213 13.846 5 15.325 5C17.943 5 20 6.9782 20 9.49591C20 12.5858 17.11 15.1035 12.7325 18.9292L11.5 20Z",strokeWidth:"2"}))};try{IconFavourite.displayName="IconFavourite",IconFavourite.__docgenInfo={description:"",displayName:"IconFavourite",props:{fill:{defaultValue:null,description:"",name:"fill",required:!1,type:{name:"boolean | undefined"}},darkBackground:{defaultValue:null,description:"",name:"darkBackground",required:!1,type:{name:"boolean | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/icon-favourite/icon-favourite.tsx#IconFavourite"]={docgenInfo:IconFavourite.__docgenInfo,name:"IconFavourite",path:"src/components/icon-favourite/icon-favourite.tsx#IconFavourite"})}catch(__react_docgen_typescript_loader_error){}var material_list=__webpack_require__("./src/core/material-list-api/material-list.ts"),utils_text=__webpack_require__("./src/core/utils/text.tsx");const button_favourite=({id,addToListRequest,darkBackground,title})=>{const queryClient=(0,es.useQueryClient)(),[fillState,setFillState]=(0,react.useState)(!1),t=(0,utils_text.X)(),{mutate}=(0,material_list.Sc)();(0,react.useEffect)((()=>{mutate({listId:"default",itemId:id},{onSuccess:()=>{setFillState(!0)},onError:()=>{setFillState(!1)}})}),[id,mutate]);const handleClick=(0,react.useCallback)((e=>{fillState?((0,material_list.cl)("default",id),queryClient.invalidateQueries((0,material_list.R)("default")),setFillState(!1)):(addToListRequest(id),setFillState(!0)),e.stopPropagation()}),[addToListRequest,fillState,id,queryClient]);return react.createElement("button",{type:"button","aria-label":t(fillState?"removeFromFavoritesAriaLabelText":"addToFavoritesAriaLabelText",{placeholders:{"@title":title}}),onClick:handleClick,className:"button-favourite"},react.createElement(IconFavourite,{darkBackground,fill:fillState}))};try{buttonfavourite.displayName="buttonfavourite",buttonfavourite.__docgenInfo={description:"",displayName:"buttonfavourite",props:{id:{defaultValue:null,description:"",name:"id",required:!0,type:{name:"ButtonFavouriteId"}},darkBackground:{defaultValue:null,description:"",name:"darkBackground",required:!1,type:{name:"boolean | undefined"}},addToListRequest:{defaultValue:null,description:"",name:"addToListRequest",required:!0,type:{name:"(id: ButtonFavouriteId) => void"}},title:{defaultValue:null,description:"",name:"title",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/button-favourite/button-favourite.tsx#buttonfavourite"]={docgenInfo:buttonfavourite.__docgenInfo,name:"buttonfavourite",path:"src/components/button-favourite/button-favourite.tsx#buttonfavourite"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/card-item-list/MaterialListItem.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js");const MaterialListItem=(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(((props,ref)=>react__WEBPACK_IMPORTED_MODULE_0__.createElement("li",{ref,tabIndex:-1},props.children))),__WEBPACK_DEFAULT_EXPORT__=MaterialListItem;try{MaterialListItem.displayName="MaterialListItem",MaterialListItem.__docgenInfo={description:"",displayName:"MaterialListItem",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/card-item-list/MaterialListItem.tsx#MaterialListItem"]={docgenInfo:MaterialListItem.__docgenInfo,name:"MaterialListItem",path:"src/components/card-item-list/MaterialListItem.tsx#MaterialListItem"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/card-item-list/SearchResultList.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var lodash_isEmpty__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/lodash/isEmpty.js"),lodash_isEmpty__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(lodash_isEmpty__WEBPACK_IMPORTED_MODULE_0__),react__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/react/index.js"),_core_utils_helpers_general__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/core/utils/helpers/general.ts"),_card_list_item_card_list_item__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/components/card-item-list/card-list-item/card-list-item.tsx"),_card_list_item_card_list_item_skeleton__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/components/card-item-list/card-list-item/card-list-item-skeleton.tsx"),_MaterialListItem__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./src/components/card-item-list/MaterialListItem.tsx");const SearchResultList=({resultItems,page,pageSize})=>{const worksAreLoaded=!lodash_isEmpty__WEBPACK_IMPORTED_MODULE_0___default()(resultItems),lastItemRef=react__WEBPACK_IMPORTED_MODULE_1__.useRef(null);return(0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)((()=>{page>0&&lastItemRef.current&&lastItemRef.current.focus()}),[page,resultItems]),react__WEBPACK_IMPORTED_MODULE_1__.createElement("ul",{className:"card-list-page__list my-32","data-cy":"search-result-list"},!worksAreLoaded&&[...Array(5)].map((()=>react__WEBPACK_IMPORTED_MODULE_1__.createElement("li",null,react__WEBPACK_IMPORTED_MODULE_1__.createElement(_card_list_item_card_list_item_skeleton__WEBPACK_IMPORTED_MODULE_4__.Z,null)))),worksAreLoaded&&resultItems.map(((item,i)=>{const isFirstNewItem=i===page*pageSize;return react__WEBPACK_IMPORTED_MODULE_1__.createElement(_MaterialListItem__WEBPACK_IMPORTED_MODULE_5__.Z,{key:item.workId,ref:isFirstNewItem?lastItemRef:null},react__WEBPACK_IMPORTED_MODULE_1__.createElement(_card_list_item_card_list_item__WEBPACK_IMPORTED_MODULE_3__.Z,{item,coverTint:(0,_core_utils_helpers_general__WEBPACK_IMPORTED_MODULE_2__.yz)(i),resultNumber:i+1}))})))},__WEBPACK_DEFAULT_EXPORT__=(0,react__WEBPACK_IMPORTED_MODULE_1__.memo)(SearchResultList);try{SearchResultList.displayName="SearchResultList",SearchResultList.__docgenInfo={description:"",displayName:"SearchResultList",props:{resultItems:{defaultValue:null,description:"",name:"resultItems",required:!0,type:{name:"Work[]"}},page:{defaultValue:null,description:"",name:"page",required:!0,type:{name:"number"}},pageSize:{defaultValue:null,description:"",name:"pageSize",required:!0,type:{name:"number"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/card-item-list/SearchResultList.tsx#SearchResultList"]={docgenInfo:SearchResultList.__docgenInfo,name:"SearchResultList",path:"src/components/card-item-list/SearchResultList.tsx#SearchResultList"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/card-item-list/card-list-item/card-list-item-skeleton.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js");const CardListItemSkeleton=()=>react__WEBPACK_IMPORTED_MODULE_0__.createElement("article",{className:"card-list-item ssc"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"ssc-square cover--size-small"}," "),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"ssc-wrapper"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"ssc-head-line w-60 mb"}),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"ssc-line w-60 mbs"}," "),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"ssc-line w-60 mbs"}," "))),__WEBPACK_DEFAULT_EXPORT__=(0,react__WEBPACK_IMPORTED_MODULE_0__.memo)(CardListItemSkeleton);try{cardlistitemskeleton.displayName="cardlistitemskeleton",cardlistitemskeleton.__docgenInfo={description:"",displayName:"cardlistitemskeleton",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/card-item-list/card-list-item/card-list-item-skeleton.tsx#cardlistitemskeleton"]={docgenInfo:cardlistitemskeleton.__docgenInfo,name:"cardlistitemskeleton",path:"src/components/card-item-list/card-list-item/card-list-item-skeleton.tsx#cardlistitemskeleton"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/card-item-list/card-list-item/card-list-item.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>card_list_item});var react=__webpack_require__("./node_modules/react/index.js"),es=__webpack_require__("./node_modules/react-redux/es/index.js"),utils_text=__webpack_require__("./src/core/utils/text.tsx"),arrow=__webpack_require__("./src/components/atoms/icons/arrow/arrow.tsx"),availability_labels=__webpack_require__("./src/components/availability-label/availability-labels.tsx"),button_favourite=__webpack_require__("./src/components/button-favourite/button-favourite.tsx"),Link=__webpack_require__("./src/components/atoms/links/Link.tsx"),general=__webpack_require__("./src/core/utils/helpers/general.ts"),cover=__webpack_require__("./src/components/cover/cover.tsx");const card_list_item_cover=({id,description,url,tint,linkAriaLabelledBy})=>react.createElement(cover.Y,{animate:!0,id,size:"small",description:String(description),url,tint,linkAriaLabelledBy});try{cardlistitemcover.displayName="cardlistitemcover",cardlistitemcover.__docgenInfo={description:"",displayName:"cardlistitemcover",props:{url:{defaultValue:null,description:"",name:"url",required:!1,type:{name:"URL | undefined"}},id:{defaultValue:null,description:"",name:"id",required:!0,type:{name:"string"}},description:{defaultValue:null,description:"",name:"description",required:!1,type:{name:"string | undefined"}},tint:{defaultValue:null,description:"",name:"tint",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"20"'},{value:'"40"'},{value:'"80"'},{value:'"100"'},{value:'"120"'}]}},idType:{defaultValue:null,description:"",name:"idType",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"faust"'},{value:'"isbn"'},{value:'"issn"'},{value:'"pid"'}]}},shadow:{defaultValue:null,description:"",name:"shadow",required:!1,type:{name:"boolean | undefined"}},linkAriaLabelledBy:{defaultValue:null,description:"",name:"linkAriaLabelledBy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/card-item-list/card-list-item/card-list-item-cover.tsx#cardlistitemcover"]={docgenInfo:cardlistitemcover.__docgenInfo,name:"cardlistitemcover",path:"src/components/card-item-list/card-list-item/card-list-item-cover.tsx#cardlistitemcover"})}catch(__react_docgen_typescript_loader_error){}var HorizontalTermLine=__webpack_require__("./src/components/horizontal-term-line/HorizontalTermLine.tsx"),url=__webpack_require__("./src/core/utils/url.tsx"),helpers_url=__webpack_require__("./src/core/utils/helpers/url.ts"),guardedRequests_slice=__webpack_require__("./src/core/guardedRequests.slice.ts"),useStatistics=__webpack_require__("./src/core/statistics/useStatistics.ts"),statistics=__webpack_require__("./src/core/statistics/statistics.ts"),lazy_load=__webpack_require__("./src/core/utils/helpers/lazy-load.ts"),helper=__webpack_require__("./src/apps/material/helper.ts"),useFilterHandler=__webpack_require__("./src/apps/search-result/useFilterHandler.tsx"),head=__webpack_require__("./node_modules/lodash/head.js"),head_default=__webpack_require__.n(head),graphql=__webpack_require__("./src/core/dbc-gateway/generated/graphql.tsx");const SubjectNumber=({shelfmark:{shelfmark},className=""})=>react.createElement("div",{className},shelfmark),subject_number_SubjectNumber=SubjectNumber;try{SubjectNumber.displayName="SubjectNumber",SubjectNumber.__docgenInfo={description:"",displayName:"SubjectNumber",props:{className:{defaultValue:{value:""},description:"",name:"className",required:!1,type:{name:"string | undefined"}},shelfmark:{defaultValue:null,description:"",name:"shelfmark",required:!0,type:{name:"Shelfmark"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/subject-number/SubjectNumber.tsx#SubjectNumber"]={docgenInfo:SubjectNumber.__docgenInfo,name:"SubjectNumber",path:"src/components/subject-number/SubjectNumber.tsx#SubjectNumber"})}catch(__react_docgen_typescript_loader_error){}const card_list_item=({item,item:{titles:{full:fullTitle},series,creators,manifestations:{all:manifestations,bestRepresentation},workId},coverTint,resultNumber,dataCy="card-list-item"})=>{var _firstItemInSeries$nu;const searchTitleId=(0,react.useId)(),t=(0,utils_text.X)(),u=(0,url.J_)(),searchUrl=u("searchUrl"),materialUrl=u("materialUrl"),{filters}=(0,useFilterHandler.Z)(),materialTypeFromFilters=((filters,manifestations)=>{const materialTypeFilter=head_default()(Object.keys(filters[graphql.sl.MaterialTypesSpecific]||{}).sort()),allMaterialTypes=(0,general.A3)(manifestations);return materialTypeFilter&&allMaterialTypes.includes(materialTypeFilter)?materialTypeFilter:void 0})(filters,manifestations),dispatch=(0,es.I0)(),author=(0,general.b7)((0,general.TG)(creators),t),manifestationPid=(0,general.qQ)(manifestations),firstItemInSeries=(0,helper.qr)(series).shift(),materialFullUrl=(0,helpers_url.WO)(materialUrl,workId,materialTypeFromFilters),languageIsoCode=(0,helper.hQ)(manifestations),{shelfmark}=bestRepresentation,{track}=(0,useStatistics.T)(),{itemRef,hasBeenVisible:showItem}=(0,lazy_load.L)(),handleClick=(0,react.useCallback)((()=>{track("click",{id:statistics.h.searchResultNumberClick.id,name:statistics.h.searchResultNumberClick.name,trackedData:resultNumber.toString()}).then((()=>{(0,helpers_url.gB)(materialFullUrl)}))}),[materialFullUrl]);return react.createElement("article",{ref:itemRef,"data-cy":dataCy,className:"card-list-item arrow arrow__hover--right-small",onClick:()=>{handleClick()},onKeyUp:e=>"Enter"===e.key&&handleClick},react.createElement("div",{className:"card-list-item__cover"},showItem&&react.createElement(card_list_item_cover,{id:manifestationPid,url:materialFullUrl,tint:coverTint,linkAriaLabelledBy:searchTitleId})),react.createElement("div",{className:"card-list-item__text"},react.createElement("div",{className:"card-list-item__meta"},showItem&&react.createElement(button_favourite.Z,{title:fullTitle[0],id:workId,addToListRequest:id=>{dispatch((0,guardedRequests_slice.Bs)({type:"addFavorite",args:{id},app:"search-result"}))}}),firstItemInSeries&&react.createElement(HorizontalTermLine.Z,{title:`${t("numberDescriptionText")} ${null===(_firstItemInSeries$nu=firstItemInSeries.numberInSeries)||void 0===_firstItemInSeries$nu?void 0:_firstItemInSeries$nu.number}`,subTitle:t("inSeriesText"),linkList:[{url:(0,helpers_url.Nt)(searchUrl,firstItemInSeries.title),term:firstItemInSeries.title}]})),!(0,general.bV)(bestRepresentation)&&shelfmark&&react.createElement(subject_number_SubjectNumber,{className:"text-tags color-secondary-gray mt-8",shelfmark}),react.createElement("h2",{className:"card-list-item__title text-header-h4 mb-4","data-cy":"card-list-item-title",lang:languageIsoCode,id:searchTitleId},react.createElement(Link.Z,{href:materialFullUrl,stopPropagation:!0},fullTitle)),author&&item&&react.createElement("p",{className:"text-small-caption","data-cy":"card-list-item-author"},`${t("byAuthorText")} ${author}`,(0,general.uY)(item)?` (${(0,general.uY)(item)})`:"")),react.createElement("div",{className:"card-list-item__availability","data-cy":"card-list-item-availability"},showItem&&react.createElement(availability_labels.U,{cursorPointer:!0,workId,manifestations})),react.createElement(arrow.Z,null))};try{cardlistitem.displayName="cardlistitem",cardlistitem.__docgenInfo={description:"",displayName:"cardlistitem",props:{item:{defaultValue:null,description:"",name:"item",required:!0,type:{name:"Work"}},coverTint:{defaultValue:null,description:"",name:"coverTint",required:!0,type:{name:"enum",value:[{value:"undefined"},{value:'"20"'},{value:'"40"'},{value:'"80"'},{value:'"100"'},{value:'"120"'}]}},resultNumber:{defaultValue:null,description:"",name:"resultNumber",required:!0,type:{name:"number"}},dataCy:{defaultValue:{value:"card-list-item"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/card-item-list/card-list-item/card-list-item.tsx#cardlistitem"]={docgenInfo:cardlistitem.__docgenInfo,name:"cardlistitem",path:"src/components/card-item-list/card-list-item/card-list-item.tsx#cardlistitem"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/checkbox/Checkbox.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>checkbox_Checkbox});var react=__webpack_require__("./node_modules/react/index.js");const icon_checkbox=()=>react.createElement("svg",{width:"20px",height:"20px"},react.createElement("polyline",{points:"1.5 6 4.5 9 10.5 1",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2"})),checkbox_Checkbox=({id,label,hideLabel,className,selected,onChecked,disabled,ariaLabel,focused,isVisualOnly,labelledBy})=>react.createElement("div",{className:`checkbox ${className||""}`},react.createElement("input",{autoFocus:focused,id,className:"checkbox__input",onChange:e=>{var checked;checked=e.target.checked,onChecked&&onChecked(checked)},checked:selected,type:"checkbox","aria-label":isVisualOnly&&labelledBy?void 0:ariaLabel,"aria-labelledby":isVisualOnly&&labelledBy?labelledBy:void 0,disabled}),react.createElement("label",{className:"checkbox__label",htmlFor:id,"data-cy":id},react.createElement("span",{className:"checkbox__icon","aria-labelledby":labelledBy},react.createElement(icon_checkbox,null)),label&&react.createElement("span",{id,"data-cy":"checkbox-text",className:"checkbox__text text-small-caption color-secondary-gray "+(hideLabel?"checkbox__text--hide-visually":"")},label)));try{Checkbox.displayName="Checkbox",Checkbox.__docgenInfo={description:"",displayName:"Checkbox",props:{id:{defaultValue:null,description:"",name:"id",required:!0,type:{name:"string"}},label:{defaultValue:null,description:"",name:"label",required:!1,type:{name:"ReactNode"}},hideLabel:{defaultValue:null,description:"",name:"hideLabel",required:!1,type:{name:"boolean | undefined"}},selected:{defaultValue:null,description:"",name:"selected",required:!1,type:{name:"boolean | undefined"}},disabled:{defaultValue:null,description:"",name:"disabled",required:!1,type:{name:"boolean | undefined"}},className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string | undefined"}},onChecked:{defaultValue:null,description:"",name:"onChecked",required:!1,type:{name:"((value: boolean) => void) | undefined"}},ariaLabel:{defaultValue:null,description:"",name:"ariaLabel",required:!1,type:{name:"string | undefined"}},focused:{defaultValue:null,description:"",name:"focused",required:!1,type:{name:"boolean | undefined"}},isVisualOnly:{defaultValue:null,description:"",name:"isVisualOnly",required:!1,type:{name:"boolean | undefined"}},labelledBy:{defaultValue:null,description:"",name:"labelledBy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/checkbox/Checkbox.tsx#Checkbox"]={docgenInfo:Checkbox.__docgenInfo,name:"Checkbox",path:"src/components/checkbox/Checkbox.tsx#Checkbox"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/contact-info-section/ContactInfoSection.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>contact_info_section_ContactInfoSection});var react=__webpack_require__("./node_modules/react/index.js"),clsx=__webpack_require__("./node_modules/clsx/dist/clsx.mjs"),utils_text=__webpack_require__("./src/core/utils/text.tsx"),utils_config=__webpack_require__("./src/core/utils/config.tsx");const ContactInfoInputs=({isInline,children,dataCy="contact-info-input",className})=>{if(!isInline)return react.createElement("div",{className,"data-cy":dataCy},children);const renderableChildren=react.Children.toArray(children);return react.createElement("div",{className:(0,clsx.Z)(className,{"contact-info-flex":isInline}),"data-cy":dataCy},renderableChildren.map(((child,i)=>{const childClassName=(0,clsx.Z)("patron__input--desktop",{"mr-16":i{const t=(0,utils_text.X)();return react.createElement(react.Fragment,null,react.createElement(TextInput.Z,{className,id:"phone-input",required:isRequired,type:"tel",pattern:"\\+?[0-9]{6,15}",title:t("patronPagePhoneInputMessageText"),onChange:newPhoneNumber=>changePatron(newPhoneNumber,"phoneNumber"),value:null==patron?void 0:patron.phoneNumber,label:t("patronContactPhoneLabelText"),placeholder:t("patronPagePhoneInputMessageText")}),showCheckboxes&&react.createElement(Checkbox.Z,{className:"mt-8 mb-16",onChecked:newReceiveSms=>changePatron(newReceiveSms,"receiveSms"),id:"phone-messages",selected:null==patron?void 0:patron.receiveSms,disabled:!1,label:t("patronContactPhoneCheckboxText")}))},contact_info_section_ContactInfoPhone=ContactInfoPhone;try{ContactInfoPhone.displayName="ContactInfoPhone",ContactInfoPhone.__docgenInfo={description:"",displayName:"ContactInfoPhone",props:{patron:{defaultValue:null,description:"",name:"patron",required:!0,type:{name:"PatronV5 | PatronSettingsV3 | null"}},changePatron:{defaultValue:null,description:"",name:"changePatron",required:!0,type:{name:"ChangePatronProps"}},showCheckboxes:{defaultValue:null,description:"",name:"showCheckboxes",required:!0,type:{name:"boolean"}},className:{defaultValue:{value:""},description:"",name:"className",required:!1,type:{name:"string | undefined"}},isRequired:{defaultValue:{value:"false"},description:"",name:"isRequired",required:!1,type:{name:"boolean | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/contact-info-section/ContactInfoPhone.tsx#ContactInfoPhone"]={docgenInfo:ContactInfoPhone.__docgenInfo,name:"ContactInfoPhone",path:"src/components/contact-info-section/ContactInfoPhone.tsx#ContactInfoPhone"})}catch(__react_docgen_typescript_loader_error){}const ContactInfoEmail=({className="",patron,changePatron,showCheckboxes,isRequired=!1})=>{const t=(0,utils_text.X)();return react.createElement(react.Fragment,null,react.createElement(TextInput.Z,{className,id:"email-address-input",type:"email",required:isRequired,onChange:newEmail=>changePatron(newEmail,"emailAddress"),value:null==patron?void 0:patron.emailAddress,label:t("patronContactEmailLabelText")}),showCheckboxes&&react.createElement(Checkbox.Z,{className:"mt-8 mb-16",onChecked:newReceiveEmail=>changePatron(newReceiveEmail,"receiveEmail"),id:"email-messages",selected:null==patron?void 0:patron.receiveEmail,disabled:!1,label:t("patronContactEmailCheckboxText")}))},contact_info_section_ContactInfoEmail=ContactInfoEmail;try{ContactInfoEmail.displayName="ContactInfoEmail",ContactInfoEmail.__docgenInfo={description:"",displayName:"ContactInfoEmail",props:{className:{defaultValue:{value:""},description:"",name:"className",required:!1,type:{name:"string | undefined"}},patron:{defaultValue:null,description:"",name:"patron",required:!0,type:{name:"PatronV5 | PatronSettingsV3 | null"}},changePatron:{defaultValue:null,description:"",name:"changePatron",required:!0,type:{name:"ChangePatronProps"}},showCheckboxes:{defaultValue:null,description:"",name:"showCheckboxes",required:!0,type:{name:"boolean"}},isRequired:{defaultValue:{value:"false"},description:"",name:"isRequired",required:!1,type:{name:"boolean | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/contact-info-section/ContactInfoEmail.tsx#ContactInfoEmail"]={docgenInfo:ContactInfoEmail.__docgenInfo,name:"ContactInfoEmail",path:"src/components/contact-info-section/ContactInfoEmail.tsx#ContactInfoEmail"})}catch(__react_docgen_typescript_loader_error){}const ContactInfoSection=({patron,inLine,changePatron,showCheckboxes,requiredFields=[]})=>{const t=(0,utils_text.X)(),inputsClass=(0,clsx.Z)("dpl-input",{input__desktop:inLine}),textNotificationsEnabledConfig="1"===(0,utils_config.ZR)()("textNotificationsEnabledConfig");return react.createElement("section",{"data-cy":"patron-page-contact-info"},react.createElement("h2",{className:"text-header-h4 mt-32 mb-16"},t("patronContactInfoHeaderText")),t("patronContactInfoBodyText")&&react.createElement("p",{className:"text-body-small-regular mb-32"},t("patronContactInfoBodyText")),react.createElement(contact_info_section_ContactInfoInputs,{isInline:inLine},react.createElement(contact_info_section_ContactInfoPhone,{className:inputsClass,changePatron,patron,isRequired:requiredFields.includes("phone"),showCheckboxes:showCheckboxes&&textNotificationsEnabledConfig}),react.createElement(contact_info_section_ContactInfoEmail,{className:(0,clsx.Z)(inputsClass,{"mt-32":!textNotificationsEnabledConfig&&!inLine}),changePatron,patron,isRequired:requiredFields.includes("email"),showCheckboxes})))},contact_info_section_ContactInfoSection=ContactInfoSection;try{ContactInfoSection.displayName="ContactInfoSection",ContactInfoSection.__docgenInfo={description:"",displayName:"ContactInfoSection",props:{patron:{defaultValue:null,description:"",name:"patron",required:!0,type:{name:"PatronV5 | PatronSettingsV3 | null"}},inLine:{defaultValue:null,description:"",name:"inLine",required:!0,type:{name:"boolean"}},changePatron:{defaultValue:null,description:"",name:"changePatron",required:!0,type:{name:"ChangePatronProps"}},showCheckboxes:{defaultValue:null,description:"",name:"showCheckboxes",required:!0,type:{name:"boolean"}},requiredFields:{defaultValue:{value:"[]"},description:"",name:"requiredFields",required:!1,type:{name:'("email" | "phone")[] | undefined'}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/contact-info-section/ContactInfoSection.tsx#ContactInfoSection"]={docgenInfo:ContactInfoSection.__docgenInfo,name:"ContactInfoSection",path:"src/components/contact-info-section/ContactInfoSection.tsx#ContactInfoSection"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/cover/cover.dev.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{default:()=>__WEBPACK_DEFAULT_EXPORT__,item:()=>item});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_cover__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/components/cover/cover.tsx"),_core_utils_helpers_url__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/core/utils/helpers/url.ts"),_core_utils_url__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/core/utils/url.tsx"),_core_storybook_serviceUrlArgs__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/core/storybook/serviceUrlArgs.ts");const __WEBPACK_DEFAULT_EXPORT__={title:"Components / Cover",component:_cover__WEBPACK_IMPORTED_MODULE_1__.Y,argTypes:{size:{name:"Image size",control:{type:"radio"}},tint:{name:"Background color tint",control:{type:"radio"}},animate:{name:"Use animation",control:{type:"boolean"}},id:{name:"PID",control:{type:"text"}},url:{name:"URL",control:{type:"string"}},description:{name:"Description",control:{type:"text"}}},args:{..._core_storybook_serviceUrlArgs__WEBPACK_IMPORTED_MODULE_3__.Z,id:"870970-basis:45234401",size:"small",animate:!0,tint:"120",url:new URL("/",(0,_core_utils_helpers_url__WEBPACK_IMPORTED_MODULE_4__.vW)()),description:"description"}},WrappedCover=(0,_core_utils_url__WEBPACK_IMPORTED_MODULE_2__.XL)(_cover__WEBPACK_IMPORTED_MODULE_1__.Y),item=(args=>react__WEBPACK_IMPORTED_MODULE_0__.createElement(WrappedCover,args)).bind({});item.args={}},"./src/components/cover/cover.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Y:()=>Cover});var react=__webpack_require__("./node_modules/react/index.js"),clsx=__webpack_require__("./node_modules/clsx/dist/clsx.mjs"),es=__webpack_require__("./node_modules/react-query/es/index.js"),FetchFailedError=__webpack_require__("./src/core/fetchers/FetchFailedError.ts"),helpers=__webpack_require__("./src/core/fetchers/helpers.ts"),token=__webpack_require__("./src/core/token.js"),extractServiceBaseUrls=__webpack_require__("./src/core/utils/reduxMiddleware/extractServiceBaseUrls.ts"),FetcherHttpError=__webpack_require__("./src/core/fetchers/FetcherHttpError.ts");function _defineProperty(obj,key,value){return(key=function _toPropertyKey(t){var i=function _toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==typeof i?i:String(i)}(key))in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}class CoverServiceHttpError extends FetcherHttpError.Z{constructor(...args){super(...args),_defineProperty(this,"name","CoverServiceHttpError")}}const fetcher=async({url,method,params,data})=>{const additionalHeaders="object"===(null==data?void 0:data.headers)?null==data?void 0:data.headers:{},libraryToken=(0,token.LP)(token.t8),headers={...libraryToken?{Authorization:`Bearer ${libraryToken}`}:{},...additionalHeaders},body=data?JSON.stringify(data):null,serviceUrl=(0,helpers._o)({baseUrl:(0,extractServiceBaseUrls.fG)(extractServiceBaseUrls.PS.cover),url,params});try{const response=await fetch(serviceUrl,{method,headers,body});if(!response.ok)throw new CoverServiceHttpError(response.status,response.statusText,serviceUrl);try{return await response.json()}catch(e){if(!(e instanceof SyntaxError))throw e}}catch(error){if(error instanceof CoverServiceHttpError)throw error;const message=error instanceof Error?error.message:"Unknown error";throw new FetchFailedError.Z(message,serviceUrl)}return null},useGetCoverCollection=(params,options)=>{const{query:queryOptions}=options??{},queryKey=(null==queryOptions?void 0:queryOptions.queryKey)??(params=>["/api/v2/covers",...params?[params]:[]])(params),query=(0,es.useQuery)(queryKey,(({signal})=>((params,signal)=>fetcher({url:"/api/v2/covers",method:"get",signal,params}))(params,signal)),queryOptions);return{queryKey,...query}};var LinkNoStyle=__webpack_require__("./src/components/atoms/links/LinkNoStyle.tsx");const cover_image=({src,altText,animate,setImageLoaded,shadow})=>react.createElement("img",{onLoad:setImageLoaded,className:(0,clsx.Z)("cover__img",{"cover__img--animate":animate},{"cover__img--shadow":shadow}),src,alt:altText||""});try{coverimage.displayName="coverimage",coverimage.__docgenInfo={description:"",displayName:"coverimage",props:{src:{defaultValue:null,description:"",name:"src",required:!0,type:{name:"string"}},altText:{defaultValue:null,description:"",name:"altText",required:!1,type:{name:"string | undefined"}},animate:{defaultValue:null,description:"",name:"animate",required:!0,type:{name:"boolean"}},setImageLoaded:{defaultValue:null,description:"",name:"setImageLoaded",required:!0,type:{name:"() => void"}},shadow:{defaultValue:null,description:"",name:"shadow",required:!1,type:{name:"boolean | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/cover/cover-image.tsx#coverimage"]={docgenInfo:coverimage.__docgenInfo,name:"coverimage",path:"src/components/cover/cover-image.tsx#coverimage"})}catch(__react_docgen_typescript_loader_error){}const Cover=({url,description,size,animate,tint,id,idType="pid",shadow,linkAriaLabelledBy})=>{var _data$,_data$$imageUrls,_data$$imageUrls2;const[imageLoaded,setImageLoaded]=(0,react.useState)(null),handleSetImageLoaded=(0,react.useCallback)((()=>{setImageLoaded(!0)}),[]);let dataSize=size;"xsmall"===dataSize?dataSize="small":"xlarge"===dataSize&&(dataSize="large");const{data}=useGetCoverCollection({type:idType,identifiers:[id],sizes:[dataSize]}),coverSrc=null==data||null===(_data$=data[0])||void 0===_data$||null===(_data$$imageUrls=_data$.imageUrls)||void 0===_data$$imageUrls||null===(_data$$imageUrls2=_data$$imageUrls[`${dataSize}`])||void 0===_data$$imageUrls2?void 0:_data$$imageUrls2.url,classes={wrapper:(0,clsx.Z)("cover",`cover--size-${size}`,`cover--aspect-${size}`,imageLoaded||{default:"bg-identity-tint-120",120:"bg-identity-tint-120",100:"bg-identity-tint-100",80:"bg-identity-tint-80",40:"bg-identity-tint-40",20:"bg-identity-tint-20"}[tint||"default"])};return url?react.createElement(LinkNoStyle.Z,{className:classes.wrapper,url,ariaLabelledBy:linkAriaLabelledBy},coverSrc&&react.createElement(cover_image,{setImageLoaded:handleSetImageLoaded,src:coverSrc,altText:description,animate,shadow})):react.createElement("div",{className:classes.wrapper},coverSrc&&react.createElement(cover_image,{setImageLoaded:handleSetImageLoaded,src:coverSrc,altText:description,animate,shadow}))};try{Cover.displayName="Cover",Cover.__docgenInfo={description:"",displayName:"Cover",props:{animate:{defaultValue:null,description:"",name:"animate",required:!0,type:{name:"boolean"}},size:{defaultValue:null,description:"",name:"size",required:!0,type:{name:"enum",value:[{value:'"xsmall"'},{value:'"small"'},{value:'"medium"'},{value:'"large"'},{value:'"xlarge"'},{value:'"original"'}]}},tint:{defaultValue:null,description:"",name:"tint",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"20"'},{value:'"40"'},{value:'"80"'},{value:'"100"'},{value:'"120"'}]}},id:{defaultValue:null,description:"",name:"id",required:!0,type:{name:"string"}},description:{defaultValue:null,description:"",name:"description",required:!1,type:{name:"string | undefined"}},url:{defaultValue:null,description:"",name:"url",required:!1,type:{name:"URL | undefined"}},idType:{defaultValue:{value:"pid"},description:"",name:"idType",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"faust"'},{value:'"isbn"'},{value:'"issn"'},{value:'"pid"'}]}},shadow:{defaultValue:null,description:"",name:"shadow",required:!1,type:{name:"boolean | undefined"}},linkAriaLabelledBy:{defaultValue:null,description:"",name:"linkAriaLabelledBy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/cover/cover.tsx#Cover"]={docgenInfo:Cover.__docgenInfo,name:"Cover",path:"src/components/cover/cover.tsx#Cover"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/empty-list/empty-list.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js");const __WEBPACK_DEFAULT_EXPORT__=({emptyListText,dataCy="empty-list",classNames=""})=>react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{"data-cy":dataCy,className:`dpl-list-empty ${classNames}`},emptyListText);try{emptylist.displayName="emptylist",emptylist.__docgenInfo={description:"",displayName:"emptylist",props:{emptyListText:{defaultValue:null,description:"",name:"emptyListText",required:!0,type:{name:"string"}},dataCy:{defaultValue:{value:"empty-list"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}},classNames:{defaultValue:{value:""},description:"",name:"classNames",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/empty-list/empty-list.tsx#emptylist"]={docgenInfo:emptylist.__docgenInfo,name:"emptylist",path:"src/components/empty-list/empty-list.tsx#emptylist"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/find-on-shelf/FindOnShelfModal.dev.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Default:()=>Default,Periodical:()=>Periodical,default:()=>FindOnShelfModal_dev});var react=__webpack_require__("./node_modules/react/index.js"),material_dev=__webpack_require__("./src/apps/material/material.dev.tsx"),serviceUrlArgs=__webpack_require__("./src/core/storybook/serviceUrlArgs.ts"),config=__webpack_require__("./src/core/utils/config.tsx"),general=__webpack_require__("./src/core/utils/helpers/general.ts"),utils_text=__webpack_require__("./src/core/utils/text.tsx"),url=__webpack_require__("./src/core/utils/url.tsx"),MaterialButtonsFindOnShelf=__webpack_require__("./src/components/material/material-buttons/physical/MaterialButtonsFindOnShelf.tsx"),FindOnShelfModal=__webpack_require__("./src/components/find-on-shelf/FindOnShelfModal.tsx");const FindOnShelfModal_dev={title:"Components / Find On Shelf Modal",component:FindOnShelfModal.Z,argTypes:{...serviceUrlArgs.Z,...material_dev.default.argTypes,manifestations:{name:"Manifestations",defaultValue:[{pid:"870970-basis:52557240",genreAndForm:["slægtsromaner"],source:["Bibliotekskatalog"],titles:{main:["De syv søstre"],original:["The seven sisters"]},fictionNonfiction:{display:"SKOENLITTERATUR",code:"FICTION"},materialTypes:[{specific:"bog"}],creators:[{display:"Lucinda Riley",__typename:"Person"}],publisher:[""],languages:{main:[{display:"dansk",isoCode:"dan"}]},identifiers:[{value:"9788763844116"}],contributors:[{display:"Ulla Lauridsen"}],edition:{summary:"1. udgave, 3. oplag (2018)",publicationYear:{display:"2016"}},audience:{generalAudience:[]},physicalDescriptions:[{numberOfPages:null}],accessTypes:[{code:"PHYSICAL"}],access:[{__typename:"InterLibraryLoan",loanIsPossible:!0}],shelfmark:null,catalogueCodes:{nationalBibliography:[],otherCatalogues:[]}},{pid:"870970-basis:52643414",genreAndForm:["slægtsromaner"],source:["Bibliotekskatalog"],titles:{main:["De syv søstre (mp3)"],original:["The seven sisters"]},fictionNonfiction:{display:"SKOENLITTERATUR",code:"FICTION"},materialTypes:[{specific:"lydbog (cd-mp3)"}],creators:[{display:"Lucinda Riley",__typename:"Person"}],publisher:[""],languages:{main:[{display:"dansk",isoCode:"dan"}]},identifiers:[{value:"9788763850636"}],contributors:[{display:"Maria Stokholm"},{display:"Ulla Lauridsen"}],edition:{summary:"1. lydbogsudgave",publicationYear:{display:"2016"}},audience:{generalAudience:[]},physicalDescriptions:[{numberOfPages:null}],accessTypes:[{code:"PHYSICAL"}],access:[{__typename:"InterLibraryLoan",loanIsPossible:!0}],shelfmark:{postfix:"Postfix, 24",shelfmark:"60.7"},catalogueCodes:{nationalBibliography:[],otherCatalogues:[]}}],control:{type:"object"}},workTitles:{name:"Work title(s)",defaultValue:["Title 1","Title 2"],control:{type:"object"}},authors:{name:"Author(s)",defaultValue:[{__typename:"Person",display:"author 1"},{__typename:"Person",display:"author 2"},{__typename:"Corporation",display:"author 3"}],control:{type:"object"}},selectedPeriodical:{name:"Selected periodical",defaultValue:null,control:{type:"null"}},setSelectedPeriodical:{name:"Set selected periodical function",defaultValue:null,control:{type:"null"}},blacklistedPickupBranchesConfig:{name:"Blacklisted Pickup branches",defaultValue:"FBS-751032,FBS-751031,FBS-751009,FBS-751027,FBS-751024",control:{type:"text"}}}},Template=args=>{const[storySelectedPeriodical,setStorySelectedPeriodical]=(0,react.useState)({volume:"",volumeYear:"2022",displayText:"2022, nr. 29",volumeNumber:"29",itemNumber:"5313131426"});args.selectedPeriodical=storySelectedPeriodical,args.setSelectedPeriodical=setStorySelectedPeriodical;const{manifestations:[{pid}]}=args,FindOnShelfModalWithConfigAndText=(0,url.XL)((0,config.Rh)((0,utils_text.z)(FindOnShelfModal.Z)));return react.createElement(react.Fragment,null,react.createElement(MaterialButtonsFindOnShelf.Z,{size:"small",faustIds:[(0,general.rp)(pid)]}),react.createElement(FindOnShelfModalWithConfigAndText,args))},Default=Template.bind({});Default.args={};const Periodical=Template.bind({});Periodical.args={manifestations:[{pid:"870970-basis:06373674",genreAndForm:[],source:["Bibliotekskatalog"],titles:{main:["Alt for damerne"],original:[]},fictionNonfiction:{display:"FAGLITTERATUR",code:"NONFICTION"},materialTypes:[{specific:"tidsskrift"}],creators:[],publisher:[""],languages:{main:[{display:"dansk",isoCode:"dan"}]},identifiers:[{value:"0002-6506"}],contributors:[],edition:{summary:"",publicationYear:{display:"1946"}},audience:{generalAudience:[]},physicalDescriptions:[],accessTypes:[{code:"PHYSICAL"}],access:[{__typename:"DigitalArticleService",issn:"00026506"},{__typename:"InterLibraryLoan",loanIsPossible:!0}],shelfmark:null,catalogueCodes:{nationalBibliography:[],otherCatalogues:[]}}]}},"./src/components/find-on-shelf/FindOnShelfModal.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>find_on_shelf_FindOnShelfModal,e:()=>FindOnShelfModal_findOnShelfModalId});var react=__webpack_require__("./node_modules/react/index.js"),general=__webpack_require__("./src/core/utils/helpers/general.ts"),modal=__webpack_require__("./src/core/utils/modal.tsx"),partition=__webpack_require__("./node_modules/lodash/partition.js"),partition_default=__webpack_require__.n(partition),helper=(__webpack_require__("./node_modules/core-js/modules/esnext.set.add-all.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.delete-all.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.difference.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.every.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.filter.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.find.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.intersection.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.is-disjoint-from.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.is-subset-of.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.is-superset-of.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.join.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.map.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.reduce.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.some.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.symmetric-difference.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.union.js"),__webpack_require__("./src/apps/material/helper.ts")),utils_text=__webpack_require__("./src/core/utils/text.tsx"),disclosure=__webpack_require__("./src/components/Disclosures/disclosure.tsx");const FindOnShelfManifestationListItem=({shelfmark,department,location,sublocation,title,publicationYear,numberAvailable})=>{const t=(0,utils_text.X)(),locationArray=[department,location,sublocation,shelfmark?`${shelfmark.shelfmark} ${shelfmark.postfix}`:void 0].filter((el=>el));return react.createElement("li",{className:"find-on-shelf__row text-body-medium-regular",role:"row"},react.createElement("span",{className:"find-on-shelf__material-text",role:"cell"},title,publicationYear&&` (${publicationYear})`),react.createElement("span",{role:"cell"},locationArray.length?locationArray.join(" · "):t("findOnShelfModalNoLocationSpecifiedText")),react.createElement("span",{className:"find-on-shelf__item-count-text",role:"cell"},numberAvailable))},find_on_shelf_FindOnShelfManifestationListItem=FindOnShelfManifestationListItem;try{FindOnShelfManifestationListItem.displayName="FindOnShelfManifestationListItem",FindOnShelfManifestationListItem.__docgenInfo={description:"",displayName:"FindOnShelfManifestationListItem",props:{shelfmark:{defaultValue:null,description:"",name:"shelfmark",required:!0,type:{name:'{ __typename?: "Shelfmark" | undefined; postfix?: string | null | undefined; shelfmark: string; } | null | undefined'}},department:{defaultValue:null,description:"",name:"department",required:!0,type:{name:"string | undefined"}},location:{defaultValue:null,description:"",name:"location",required:!0,type:{name:"string | undefined"}},sublocation:{defaultValue:null,description:"",name:"sublocation",required:!0,type:{name:"string | undefined"}},title:{defaultValue:null,description:"",name:"title",required:!0,type:{name:"string"}},publicationYear:{defaultValue:null,description:"",name:"publicationYear",required:!0,type:{name:"string | null"}},numberAvailable:{defaultValue:null,description:"",name:"numberAvailable",required:!0,type:{name:"number"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/find-on-shelf/FindOnShelfManifestationListItem.tsx#FindOnShelfManifestationListItem"]={docgenInfo:FindOnShelfManifestationListItem.__docgenInfo,name:"FindOnShelfManifestationListItem",path:"src/components/find-on-shelf/FindOnShelfManifestationListItem.tsx#FindOnShelfManifestationListItem"})}catch(__react_docgen_typescript_loader_error){}const FindOnShelfManifestationList=({libraryBranchHoldings})=>{const t=(0,utils_text.X)();return react.createElement("ul",{className:"find-on-shelf",role:"table","aria-label":t("findOnShelfTableDescriptionText",{placeholders:{"@work":libraryBranchHoldings[0].manifestation.titles.main[0],"@branch":libraryBranchHoldings[0].holding.branch.title}})},react.createElement("li",{className:"find-on-shelf__header-row text-small-caption",role:"row"},react.createElement("span",{className:"find-on-shelf__material-header",role:"columnheader"},t("findOnShelfModalListMaterialText")),react.createElement("span",{role:"columnheader"},t("findOnShelfModalListFindOnShelfText")),react.createElement("span",{className:"find-on-shelf__item-count-header capitalize-first",role:"columnheader"},t("findOnShelfModalListItemCountText"))),libraryBranchHoldings.map((branchHolding=>{var _branchHolding$holdin,_branchHolding$holdin2,_branchHolding$holdin3;return react.createElement(find_on_shelf_FindOnShelfManifestationListItem,{shelfmark:branchHolding.manifestation.shelfmark,department:null===(_branchHolding$holdin=branchHolding.holding.department)||void 0===_branchHolding$holdin?void 0:_branchHolding$holdin.title,location:null===(_branchHolding$holdin2=branchHolding.holding.location)||void 0===_branchHolding$holdin2?void 0:_branchHolding$holdin2.title,sublocation:null===(_branchHolding$holdin3=branchHolding.holding.sublocation)||void 0===_branchHolding$holdin3?void 0:_branchHolding$holdin3.title,title:branchHolding.manifestation.titles.main.join(", "),publicationYear:(0,general.S2)(branchHolding.manifestation),numberAvailable:(0,helper.r0)(branchHolding.holding.materials),key:branchHolding.holding.branch.branchId})})))},find_on_shelf_FindOnShelfManifestationList=FindOnShelfManifestationList;try{FindOnShelfManifestationList.displayName="FindOnShelfManifestationList",FindOnShelfManifestationList.__docgenInfo={description:"",displayName:"FindOnShelfManifestationList",props:{libraryBranchHoldings:{defaultValue:null,description:"",name:"libraryBranchHoldings",required:!0,type:{name:"ManifestationHoldings"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/find-on-shelf/FindOnShelfManifestationList.tsx#FindOnShelfManifestationList"]={docgenInfo:FindOnShelfManifestationList.__docgenInfo,name:"FindOnShelfManifestationList",path:"src/components/find-on-shelf/FindOnShelfManifestationList.tsx#FindOnShelfManifestationList"})}catch(__react_docgen_typescript_loader_error){}var Dropdown=__webpack_require__("./src/components/Dropdown/Dropdown.tsx"),periodical_helper=__webpack_require__("./src/components/material/periodical/helper.ts");const find_on_shelf_FindOnShelfPeriodicalDropdowns=({manifestationsHoldings,setSelectedPeriodical,selectedPeriodical})=>{const t=(0,utils_text.X)(),periodicalEditionsBase=(0,periodical_helper.wf)(manifestationsHoldings[0].holdings),groupedPeriodicalEditionsBase=(0,general.CU)(periodicalEditionsBase,"volumeYear"),periodicalEditions=(0,periodical_helper.ik)(groupedPeriodicalEditionsBase),sortedPeriodicalYears=Object.keys(periodicalEditions).sort(),[selectedYear,setSelectedYear]=(0,react.useState)(selectedPeriodical.volumeYear);return react.createElement("div",{className:"modal-find-on-shelf__periodical-dropdowns"},react.createElement(Dropdown.Z,{classNames:"dropdown--grey-borders",options:sortedPeriodicalYears.map((volumeYear=>({label:volumeYear,value:volumeYear}))),arrowIcon:"chevron",defaultValue:selectedYear,handleOnChange:event=>{(0,periodical_helper.sW)(event.target.value,setSelectedYear,setSelectedPeriodical,periodicalEditions,groupedPeriodicalEditionsBase)},ariaLabel:t("findOnShelfModalPeriodicalYearDropdownText")}),selectedYear&&react.createElement(Dropdown.Z,{classNames:"dropdown--grey-borders",options:periodicalEditions[selectedYear].map((periodicalEdition=>({label:periodicalEdition,value:periodicalEdition}))),arrowIcon:"chevron",defaultValue:selectedPeriodical.volumeNumber,handleOnChange:event=>{(0,periodical_helper.ul)(groupedPeriodicalEditionsBase,selectedYear,event.target.value,setSelectedPeriodical)},ariaLabel:t("findOnShelfModalPeriodicalEditionDropdownText")}))};try{FindOnShelfPeriodicalDropdowns.displayName="FindOnShelfPeriodicalDropdowns",FindOnShelfPeriodicalDropdowns.__docgenInfo={description:"",displayName:"FindOnShelfPeriodicalDropdowns",props:{manifestationsHoldings:{defaultValue:null,description:"",name:"manifestationsHoldings",required:!0,type:{name:"HoldingsForBibliographicalRecordV3[]"}},setSelectedPeriodical:{defaultValue:null,description:"",name:"setSelectedPeriodical",required:!0,type:{name:"(selectedPeriodical: PeriodicalEdition) => void"}},selectedPeriodical:{defaultValue:null,description:"",name:"selectedPeriodical",required:!0,type:{name:"PeriodicalEdition"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/find-on-shelf/FindOnShelfPeriodicalDropdowns.tsx#FindOnShelfPeriodicalDropdowns"]={docgenInfo:FindOnShelfPeriodicalDropdowns.__docgenInfo,name:"FindOnShelfPeriodicalDropdowns",path:"src/components/find-on-shelf/FindOnShelfPeriodicalDropdowns.tsx#FindOnShelfPeriodicalDropdowns"})}catch(__react_docgen_typescript_loader_error){}var utils_config=__webpack_require__("./src/core/utils/config.tsx"),DisclosureSummary=__webpack_require__("./src/components/Disclosures/DisclosureSummary.tsx"),modal_helpers=__webpack_require__("./src/core/utils/helpers/modal-helpers.ts");const findOnShelfModalId=faustIds=>constructModalId("find-on-shelf-modal",faustIds.sort()),FindOnShelfModalBody=({manifestations,workTitles,authors,selectedPeriodical,setSelectedPeriodical})=>{const config=(0,utils_config.ZR)(),t=(0,utils_text.X)(),faustIdArray=(0,general.vn)(manifestations).map((manifestationPid=>(0,general.rp)(manifestationPid))),{data,isLoading}=(0,helper.Lt)({faustIds:faustIdArray,config}),author=(0,general.b7)((0,general.TG)(authors),t),title=workTitles.join(", "),isPeriodical=manifestations.some((manifestation=>manifestation.materialTypes.some((materialType=>materialType.specific.includes("tidsskrift")))));if(!data||data.length<1)return null;const pairedManifestationsWithBranches=data.map(((holdingsPerManifestation,index)=>holdingsPerManifestation.holdings.map((holding=>({manifestation:manifestations[index],holding}))))).flat(),allBranches=data.map((item=>item.holdings.map((holding=>holding.branch.branchId)))).flat();let finalData=Array.from(new Set(allBranches)).map((branch=>pairedManifestationsWithBranches.filter((manifestationWithBranch=>manifestationWithBranch.holding.branch.branchId===branch))));function orderManifestationHoldingsAlphabetically(a,b){return a[0].holding.branch.title.localeCompare(b[0].holding.branch.title,"da-DK")}selectedPeriodical&&(finalData=finalData.map((branchManifestationHoldings=>branchManifestationHoldings.map((manifestationHoldings=>({...manifestationHoldings,holding:{...manifestationHoldings.holding,materials:manifestationHoldings.holding.materials.filter((material=>{var _material$periodical;return(null===(_material$periodical=material.periodical)||void 0===_material$periodical?void 0:_material$periodical.volumeNumber)===selectedPeriodical.volumeNumber&&material.periodical.volumeYear===selectedPeriodical.volumeYear}))}}))).filter((manifestationHoldings=>null!==manifestationHoldings)))));const[availableManifestationHoldings,unavailableManifestationHoldings]=partition_default()(finalData,helper.WJ),finalDataToShow=availableManifestationHoldings.sort(((a,b)=>orderManifestationHoldingsAlphabetically(a,b))).concat(unavailableManifestationHoldings.sort(((a,b)=>orderManifestationHoldingsAlphabetically(a,b)))).sort((manifestationHolding=>manifestationHolding[0].holding.branch.branchId.endsWith("00")?-1:1));return react.createElement(react.Fragment,null,react.createElement("h2",{className:"text-header-h2 modal-find-on-shelf__headline"},title,author&&` / ${author}`),isPeriodical&&selectedPeriodical&&react.createElement(find_on_shelf_FindOnShelfPeriodicalDropdowns,{manifestationsHoldings:data,setSelectedPeriodical,selectedPeriodical}),isLoading&&react.createElement("p",{className:"text-body-large ml-16 mt-96"},t("loadingText")),!isLoading&&react.createElement(react.Fragment,null,react.createElement("div",{className:"text-small-caption modal-find-on-shelf__caption"},`${(0,helper.rM)(finalDataToShow)} ${t("librariesHaveTheMaterialText")}`),finalDataToShow.map((libraryBranch=>react.createElement(disclosure.Z,{key:libraryBranch[0].holding.branch.branchId,open:1===finalData.length,className:"disclosure--full-width",dataCy:"find-on-shelf-modal-body-disclosure",summary:react.createElement(DisclosureSummary.Z,{title:libraryBranch[0].holding.branch.title,isAvailable:(0,helper.WJ)(libraryBranch)})},react.createElement(find_on_shelf_FindOnShelfManifestationList,{libraryBranchHoldings:libraryBranch}))))))},find_on_shelf_FindOnShelfModalBody=FindOnShelfModalBody;try{findOnShelfModalId.displayName="findOnShelfModalId",findOnShelfModalId.__docgenInfo={description:"",displayName:"findOnShelfModalId",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/find-on-shelf/FindOnShelfModalBody.tsx#findOnShelfModalId"]={docgenInfo:findOnShelfModalId.__docgenInfo,name:"findOnShelfModalId",path:"src/components/find-on-shelf/FindOnShelfModalBody.tsx#findOnShelfModalId"})}catch(__react_docgen_typescript_loader_error){}try{FindOnShelfModalBody.displayName="FindOnShelfModalBody",FindOnShelfModalBody.__docgenInfo={description:"",displayName:"FindOnShelfModalBody",props:{manifestations:{defaultValue:null,description:"",name:"manifestations",required:!0,type:{name:"Manifestation[]"}},workTitles:{defaultValue:null,description:"",name:"workTitles",required:!0,type:{name:"string[]"}},authors:{defaultValue:null,description:"",name:"authors",required:!0,type:{name:'({ __typename: "Corporation"; display: string; } | { __typename: "Person"; display: string; })[]'}},selectedPeriodical:{defaultValue:null,description:"",name:"selectedPeriodical",required:!0,type:{name:"PeriodicalEdition | null"}},setSelectedPeriodical:{defaultValue:null,description:"",name:"setSelectedPeriodical",required:!0,type:{name:"(selectedPeriodical: PeriodicalEdition) => void"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/find-on-shelf/FindOnShelfModalBody.tsx#FindOnShelfModalBody"]={docgenInfo:FindOnShelfModalBody.__docgenInfo,name:"FindOnShelfModalBody",path:"src/components/find-on-shelf/FindOnShelfModalBody.tsx#FindOnShelfModalBody"})}catch(__react_docgen_typescript_loader_error){}const FindOnShelfModal_findOnShelfModalId=faustIds=>(0,modal_helpers.V$)("find-on-shelf-modal",faustIds.sort()),FindOnShelfModal=({manifestations,workTitles,authors,selectedPeriodical,setSelectedPeriodical})=>{const t=(0,utils_text.X)(),faustIds=(0,general.vH)(manifestations),modalId=`${FindOnShelfModal_findOnShelfModalId(faustIds)}`;return react.createElement(modal.Z,{modalId,screenReaderModalDescriptionText:t("findOnShelfModalScreenReaderModalDescriptionText"),closeModalAriaLabelText:t("findOnShelfModalCloseModalAriaLabelText"),classNames:"modal-details modal-find-on-shelf"},react.createElement(find_on_shelf_FindOnShelfModalBody,{manifestations,workTitles,authors,selectedPeriodical,setSelectedPeriodical}))},find_on_shelf_FindOnShelfModal=FindOnShelfModal;try{FindOnShelfModal_findOnShelfModalId.displayName="findOnShelfModalId",FindOnShelfModal_findOnShelfModalId.__docgenInfo={description:"",displayName:"findOnShelfModalId",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/find-on-shelf/FindOnShelfModal.tsx#findOnShelfModalId"]={docgenInfo:FindOnShelfModal_findOnShelfModalId.__docgenInfo,name:"findOnShelfModalId",path:"src/components/find-on-shelf/FindOnShelfModal.tsx#findOnShelfModalId"})}catch(__react_docgen_typescript_loader_error){}try{FindOnShelfModal.displayName="FindOnShelfModal",FindOnShelfModal.__docgenInfo={description:"",displayName:"FindOnShelfModal",props:{manifestations:{defaultValue:null,description:"",name:"manifestations",required:!0,type:{name:"Manifestation[]"}},workTitles:{defaultValue:null,description:"",name:"workTitles",required:!0,type:{name:"string[]"}},authors:{defaultValue:null,description:"",name:"authors",required:!0,type:{name:'({ __typename: "Corporation"; display: string; } | { __typename: "Person"; display: string; })[]'}},selectedPeriodical:{defaultValue:null,description:"",name:"selectedPeriodical",required:!0,type:{name:"PeriodicalEdition | null"}},setSelectedPeriodical:{defaultValue:null,description:"",name:"setSelectedPeriodical",required:!0,type:{name:"(selectedPeriodical: PeriodicalEdition) => void"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/find-on-shelf/FindOnShelfModal.tsx#FindOnShelfModal"]={docgenInfo:FindOnShelfModal.__docgenInfo,name:"FindOnShelfModal",path:"src/components/find-on-shelf/FindOnShelfModal.tsx#FindOnShelfModal"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/guarded-app.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),react_redux__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/react-redux/es/index.js"),_core_guardedRequests_slice__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/core/guardedRequests.slice.ts"),_core_utils_helpers_date__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/core/utils/helpers/date.ts"),_core_utils_helpers_url__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./src/core/utils/helpers/url.ts"),_core_utils_helpers_user__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/core/utils/helpers/user.ts");const __WEBPACK_DEFAULT_EXPORT__=({app,children})=>{const dispatch=(0,react_redux__WEBPACK_IMPORTED_MODULE_1__.I0)(),{request:persistedRequest}=(0,react_redux__WEBPACK_IMPORTED_MODULE_1__.v9)((state=>state.guardedRequests)),isApplicationBlocked=persistedRequest&&!(0,_core_utils_helpers_user__WEBPACK_IMPORTED_MODULE_4__.TF)(),didAuthenticate=(0,_core_utils_helpers_url__WEBPACK_IMPORTED_MODULE_5__.wo)(_core_guardedRequests_slice__WEBPACK_IMPORTED_MODULE_2__.SF);return console.debug("PERSISTED REQUEST:",persistedRequest),(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)((()=>{persistedRequest&&(console.debug("HAS REQUEST EXPIRED?",(0,_core_guardedRequests_slice__WEBPACK_IMPORTED_MODULE_2__.qC)(persistedRequest)),console.debug("CURRENT TIMESTAMP",(0,_core_utils_helpers_date__WEBPACK_IMPORTED_MODULE_3__.ZP)()),console.debug("EXPIRE TIMESTAMP",persistedRequest.expire),(0,_core_guardedRequests_slice__WEBPACK_IMPORTED_MODULE_2__.qC)(persistedRequest)&&dispatch((0,_core_guardedRequests_slice__WEBPACK_IMPORTED_MODULE_2__.yQ)()))}),[dispatch,persistedRequest]),(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)((()=>{if(!isApplicationBlocked)return;const{app:persistedRequestApp}=persistedRequest;didAuthenticate&&app===persistedRequestApp&&(dispatch((0,_core_guardedRequests_slice__WEBPACK_IMPORTED_MODULE_2__.fG)(persistedRequest)),(0,_core_utils_helpers_url__WEBPACK_IMPORTED_MODULE_5__.oC)(_core_guardedRequests_slice__WEBPACK_IMPORTED_MODULE_2__.SF),dispatch((0,_core_guardedRequests_slice__WEBPACK_IMPORTED_MODULE_2__.yQ)()))}),[app,didAuthenticate,dispatch,isApplicationBlocked,persistedRequest]),isApplicationBlocked?react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",null):react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment,null,children)};try{guardedapp.displayName="guardedapp",guardedapp.__docgenInfo={description:"",displayName:"guardedapp",props:{app:{defaultValue:null,description:"",name:"app",required:!0,type:{name:"enum",value:[{value:'"material"'},{value:'"search-result"'},{value:'"advanced-search"'},{value:'"recommender"'},{value:'"something-similar"'},{value:'"favorites-list-mc"'},{value:'"inspiration-recommender"'}]}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/guarded-app.tsx#guardedapp"]={docgenInfo:guardedapp.__docgenInfo,name:"guardedapp",path:"src/components/guarded-app.tsx#guardedapp"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/hello/hello.dev.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{HelloAnimal:()=>HelloAnimal,HelloHuman:()=>HelloHuman,HelloWorld:()=>HelloWorld,default:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_hello__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/components/hello/hello.tsx");const WrappedHello=(0,__webpack_require__("./src/core/utils/text.tsx").z)(_hello__WEBPACK_IMPORTED_MODULE_1__.q),__WEBPACK_DEFAULT_EXPORT__={title:"Components/Hello",component:WrappedHello,argTypes:{whatText:{defaultValue:"world",control:{type:"text"}},shouldBeEmphasized:{defaultValue:!0}}},Template=props=>react__WEBPACK_IMPORTED_MODULE_0__.createElement(WrappedHello,props),HelloWorld=Template.bind({}),HelloHuman=Template.bind({});HelloWorld.args={whatText:"human"};const HelloAnimal=Template.bind({});HelloWorld.args={whatText:"animal"}},"./src/components/hello/hello.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{q:()=>Hello});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_core_utils_text__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/core/utils/text.tsx");const Hello=({shouldBeEmphasized})=>{const t=(0,_core_utils_text__WEBPACK_IMPORTED_MODULE_1__.X)();return react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment,null,"Hello"," ",shouldBeEmphasized?react__WEBPACK_IMPORTED_MODULE_0__.createElement("strong",null,t("whatText")):t("whatText"),"!")};try{Hello.displayName="Hello",Hello.__docgenInfo={description:"",displayName:"Hello",props:{shouldBeEmphasized:{defaultValue:null,description:"",name:"shouldBeEmphasized",required:!0,type:{name:"boolean"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/hello/hello.tsx#Hello"]={docgenInfo:Hello.__docgenInfo,name:"Hello",path:"src/components/hello/hello.tsx#Hello"})}catch(__react_docgen_typescript_loader_error){}try{hello.displayName="hello",hello.__docgenInfo={description:"",displayName:"hello",props:{shouldBeEmphasized:{defaultValue:null,description:"",name:"shouldBeEmphasized",required:!0,type:{name:"boolean"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/hello/hello.tsx#hello"]={docgenInfo:hello.__docgenInfo,name:"hello",path:"src/components/hello/hello.tsx#hello"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/horizontal-term-line/HorizontalTermLine.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>horizontal_term_line_HorizontalTermLine});var react=__webpack_require__("./node_modules/react/index.js"),Link=__webpack_require__("./src/components/atoms/links/Link.tsx"),clsx=__webpack_require__("./node_modules/clsx/dist/clsx.mjs"),ExpandMore=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/ExpandMore.svg"),ExpandMore_default=__webpack_require__.n(ExpandMore),utils_text=__webpack_require__("./src/core/utils/text.tsx");const ButtonExpand=({showMore,setShowMore})=>{const t=(0,utils_text.X)();return react.createElement("button",{className:"button-expand",type:"button",onClick:()=>setShowMore(!showMore),"aria-label":t("expandMoreText")},react.createElement("img",{className:(0,clsx.Z)("button-expand__image",{"button-expand__image--expanded":showMore}),src:ExpandMore_default(),alt:""}))},button_expand_ButtonExpand=ButtonExpand;try{ButtonExpand.displayName="ButtonExpand",ButtonExpand.__docgenInfo={description:"",displayName:"ButtonExpand",props:{showMore:{defaultValue:null,description:"",name:"showMore",required:!0,type:{name:"boolean"}},setShowMore:{defaultValue:null,description:"",name:"setShowMore",required:!0,type:{name:"(showMore: boolean) => void"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/button-expand/ButtonExpand.tsx#ButtonExpand"]={docgenInfo:ButtonExpand.__docgenInfo,name:"ButtonExpand",path:"src/components/button-expand/ButtonExpand.tsx#ButtonExpand"})}catch(__react_docgen_typescript_loader_error){}const HorizontalTermLine=({title,subTitle,linkList,dataCy="horizontal-term-line"})=>{const[showMore,setShowMore]=(0,react.useState)(!1),itemsToShow=showMore?linkList:linkList.slice(0,3),showMoreButton=linkList.length>3;return 0===linkList.length?null:react.createElement("div",{"data-cy":dataCy,className:"text-small-caption horizontal-term-line"},react.createElement("h3",{className:"text-label-bold"},title||""," ",subTitle&&react.createElement("span",{className:"text-small-caption"},` ${subTitle}`)),itemsToShow.map((item=>{const{term,url}=item;return react.createElement("span",{key:term},react.createElement(Link.Z,{href:url,className:"link-tag"},term))})),showMoreButton&&react.createElement(button_expand_ButtonExpand,{showMore,setShowMore}))},horizontal_term_line_HorizontalTermLine=HorizontalTermLine;try{HorizontalTermLine.displayName="HorizontalTermLine",HorizontalTermLine.__docgenInfo={description:"",displayName:"HorizontalTermLine",props:{title:{defaultValue:null,description:"",name:"title",required:!0,type:{name:"string"}},subTitle:{defaultValue:null,description:"",name:"subTitle",required:!1,type:{name:"string | undefined"}},linkList:{defaultValue:null,description:"",name:"linkList",required:!0,type:{name:"{ url: URL; term: string; }[]"}},dataCy:{defaultValue:{value:"horizontal-term-line"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/horizontal-term-line/HorizontalTermLine.tsx#HorizontalTermLine"]={docgenInfo:HorizontalTermLine.__docgenInfo,name:"HorizontalTermLine",path:"src/components/horizontal-term-line/HorizontalTermLine.tsx#HorizontalTermLine"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/list-details/list-details.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_core_utils_text__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/core/utils/text.tsx");const __WEBPACK_DEFAULT_EXPORT__=({icon,title,labels,showSelect,setShowSelect,idForLabelledBy,children})=>{const t=(0,_core_utils_text__WEBPACK_IMPORTED_MODULE_1__.X)();return react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"list-details","data-cy":"reservation-form-list-item"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"list-details__icon"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("img",{src:icon,alt:""})),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"list-details__container"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",null,react__WEBPACK_IMPORTED_MODULE_0__.createElement("h3",{className:"text-header-h5",id:idForLabelledBy},title),"string"==typeof labels&&react__WEBPACK_IMPORTED_MODULE_0__.createElement("p",{className:"text-small-caption"},labels),"string"!=typeof labels&&labels.map((label=>react__WEBPACK_IMPORTED_MODULE_0__.createElement("p",{key:label,className:"text-small-caption"},label)))),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"list-details__dropdown"},children)),null!==showSelect&&!showSelect&&setShowSelect&&react__WEBPACK_IMPORTED_MODULE_0__.createElement("button",{type:"button",className:"link-tag",onClick:()=>setShowSelect(!0)},t("reservationDetailsChangeText")))};try{listdetails.displayName="listdetails",listdetails.__docgenInfo={description:"",displayName:"listdetails",props:{icon:{defaultValue:null,description:"",name:"icon",required:!0,type:{name:"string"}},title:{defaultValue:null,description:"",name:"title",required:!0,type:{name:"string"}},labels:{defaultValue:null,description:"",name:"labels",required:!0,type:{name:"string | string[]"}},showSelect:{defaultValue:null,description:"",name:"showSelect",required:!1,type:{name:"boolean | undefined"}},setShowSelect:{defaultValue:null,description:"",name:"setShowSelect",required:!1,type:{name:"((show: boolean) => void) | undefined"}},idForLabelledBy:{defaultValue:null,description:"",name:"idForLabelledBy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/list-details/list-details.tsx#listdetails"]={docgenInfo:listdetails.__docgenInfo,name:"listdetails",path:"src/components/list-details/list-details.tsx#listdetails"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/material/material-buttons/generic/MaterialButtonLoading.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_core_utils_text__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/core/utils/text.tsx"),_Buttons_Button__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/components/Buttons/Button.tsx");const MaterialButtonLoading=({size,classNames})=>{const t=(0,_core_utils_text__WEBPACK_IMPORTED_MODULE_1__.X)();return react__WEBPACK_IMPORTED_MODULE_0__.createElement(_Buttons_Button__WEBPACK_IMPORTED_MODULE_2__.z,{label:t("loadingText"),buttonType:"none",variant:"filled",disabled:!0,collapsible:!1,size:size||"large",classNames:classNames||""})},__WEBPACK_DEFAULT_EXPORT__=MaterialButtonLoading;try{MaterialButtonLoading.displayName="MaterialButtonLoading",MaterialButtonLoading.__docgenInfo={description:"",displayName:"MaterialButtonLoading",props:{size:{defaultValue:null,description:"",name:"size",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"xsmall"'},{value:'"small"'},{value:'"medium"'},{value:'"large"'},{value:'"xlarge"'}]}},classNames:{defaultValue:null,description:"",name:"classNames",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/material-buttons/generic/MaterialButtonLoading.tsx#MaterialButtonLoading"]={docgenInfo:MaterialButtonLoading.__docgenInfo,name:"MaterialButtonLoading",path:"src/components/material/material-buttons/generic/MaterialButtonLoading.tsx#MaterialButtonLoading"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/material/material-buttons/helper.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{M0:()=>hasCorrectAccess,g0:()=>isArticle,ie:()=>hasCorrectAccessType,zn:()=>hasCorrectMaterialType});var _core_utils_types_material_type__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/core/utils/types/material-type.ts");const hasCorrectAccess=(desiredAccess,manifestations)=>manifestations.some((manifestation=>manifestation.access.some((({__typename})=>__typename.toLowerCase()===desiredAccess.toLowerCase())))),hasCorrectAccessType=(desiredAccessType,manifestations)=>manifestations.some((manifestation=>manifestation.accessTypes.some((type=>type.code===desiredAccessType)))),hasCorrectMaterialType=(desiredMaterialType,manifestations)=>manifestations.some((manifestation=>manifestation.materialTypes.some((type=>type.specific.toLowerCase()===desiredMaterialType.toLowerCase())))),isArticle=manifestations=>hasCorrectMaterialType(_core_utils_types_material_type__WEBPACK_IMPORTED_MODULE_0__.XK.article,manifestations)||hasCorrectMaterialType("avisartikel",manifestations)},"./src/components/material/material-buttons/physical/MaterialButtonsFindOnShelf.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_core_utils_modal__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/core/utils/modal.tsx"),_core_utils_text__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/core/utils/text.tsx"),_Buttons_Button__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/components/Buttons/Button.tsx"),_find_on_shelf_FindOnShelfModal__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/components/find-on-shelf/FindOnShelfModal.tsx");const MaterialButtonsFindOnShelf=({size,faustIds,dataCy="material-buttons-find-on-shelf"})=>{const t=(0,_core_utils_text__WEBPACK_IMPORTED_MODULE_2__.X)(),{open}=(0,_core_utils_modal__WEBPACK_IMPORTED_MODULE_1__.f)(),modalId=(0,_find_on_shelf_FindOnShelfModal__WEBPACK_IMPORTED_MODULE_4__.e)(faustIds),onClick=()=>{open(modalId)};return"small"!==size?react__WEBPACK_IMPORTED_MODULE_0__.createElement(_Buttons_Button__WEBPACK_IMPORTED_MODULE_3__.z,{label:t("findOnBookshelfText"),buttonType:"none",variant:"outline",disabled:!1,collapsible:!1,size:"large",onClick,dataCy}):react__WEBPACK_IMPORTED_MODULE_0__.createElement("button",{className:"link-tag text-small-caption material-manifestation-item__find capitalize-all btn-ui","aria-describedby":t("findOnShelfExpandButtonExplanationText"),onClick,onKeyUp:e=>{"Enter"===e.key&&onClick()},tabIndex:0,type:"button","data-cy":dataCy},t("findOnBookshelfText"))},__WEBPACK_DEFAULT_EXPORT__=MaterialButtonsFindOnShelf;try{MaterialButtonsFindOnShelf.displayName="MaterialButtonsFindOnShelf",MaterialButtonsFindOnShelf.__docgenInfo={description:"",displayName:"MaterialButtonsFindOnShelf",props:{size:{defaultValue:null,description:"",name:"size",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"xsmall"'},{value:'"small"'},{value:'"medium"'},{value:'"large"'},{value:'"xlarge"'}]}},faustIds:{defaultValue:null,description:"",name:"faustIds",required:!0,type:{name:"`${number}`[]"}},dataCy:{defaultValue:{value:"material-buttons-find-on-shelf"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/material-buttons/physical/MaterialButtonsFindOnShelf.tsx#MaterialButtonsFindOnShelf"]={docgenInfo:MaterialButtonsFindOnShelf.__docgenInfo,name:"MaterialButtonsFindOnShelf",path:"src/components/material/material-buttons/physical/MaterialButtonsFindOnShelf.tsx#MaterialButtonsFindOnShelf"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/material/periodical/helper.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{P5:()=>getLatestEditionFromYear,ik:()=>filterAndSortPeriodicalEditions,sW:()=>handleSelectYear,ul:()=>handleSelectEdition,wf:()=>makePeriodicalEditionsFromHoldings});var lodash_uniq__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/lodash/uniq.js"),lodash_uniq__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(lodash_uniq__WEBPACK_IMPORTED_MODULE_0__),lodash_mapValues__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/lodash/mapValues.js"),lodash_mapValues__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(lodash_mapValues__WEBPACK_IMPORTED_MODULE_1__);const getLatestEditionFromYear=(year,groupList)=>groupList[year][groupList[year].length-1];function makePeriodicalEditionsFromHoldings(holdings){return holdings.map((holding=>holding.materials.flat().map((material=>({...material.periodical,itemNumber:material.itemNumber}))))).flat()}function filterAndSortPeriodicalEditions(baseData){const yearVolumes=lodash_mapValues__WEBPACK_IMPORTED_MODULE_1___default()(baseData,(editions=>editions.map((edition=>edition.volumeNumber)))),yearVolumesSorted=lodash_mapValues__WEBPACK_IMPORTED_MODULE_1___default()(yearVolumes,(volumes=>volumes.filter((volume=>!!volume)).sort(((a,b)=>a.localeCompare(b,"da-DK",{numeric:!0})))));return lodash_mapValues__WEBPACK_IMPORTED_MODULE_1___default()(yearVolumesSorted,(volumes=>lodash_uniq__WEBPACK_IMPORTED_MODULE_0___default()(volumes)))}function handleSelectEdition(groupList,year,editionToMatch,selectPeriodicalHandler){const changedFullPeriodicalEdition=groupList[year].find((edition=>edition.volumeNumber===editionToMatch));changedFullPeriodicalEdition&&selectPeriodicalHandler(changedFullPeriodicalEdition)}function handleSelectYear(year,setYear,selectPeriodicalHandler,periodicalEditions,groupList){setYear(year);handleSelectEdition(groupList,year,getLatestEditionFromYear(year,periodicalEditions),selectPeriodicalHandler)}},"./src/components/message/modal-message/ModalMessage.dev.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{ModalMessageExample:()=>ModalMessageExample,default:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_core_utils_modal__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/core/utils/modal.tsx"),_ModalMessage__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/components/message/modal-message/ModalMessage.tsx");function _extends(){return _extends=Object.assign?Object.assign.bind():function(target){for(var i=1;i{const{open}=(0,_core_utils_modal__WEBPACK_IMPORTED_MODULE_1__.f)();return(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)((()=>{open("modal-message")}),[open]),react__WEBPACK_IMPORTED_MODULE_0__.createElement(_core_utils_modal__WEBPACK_IMPORTED_MODULE_1__.Z,{modalId:"modal-message",closeModalAriaLabelText:"close",screenReaderModalDescriptionText:"modal message story",classNames:"modal-cta modal-padding"},react__WEBPACK_IMPORTED_MODULE_0__.createElement(_ModalMessage__WEBPACK_IMPORTED_MODULE_2__.Z,_extends({},props,{ctaButton:{modalId:"modal-message",text:"Man"}}),react__WEBPACK_IMPORTED_MODULE_0__.createElement("p",null,"Hello, I am some extra info")))}).bind({})},"./src/components/message/modal-message/ModalMessage.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>modal_message_ModalMessage});var react=__webpack_require__("./node_modules/react/index.js"),focus_trap_react=__webpack_require__("./node_modules/focus-trap-react/dist/focus-trap-react.js"),focus_trap_react_default=__webpack_require__.n(focus_trap_react);try{withFocusTrap.displayName="withFocusTrap",withFocusTrap.__docgenInfo={description:"",displayName:"withFocusTrap",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/utils/withFocusTrap.tsx#withFocusTrap"]={docgenInfo:withFocusTrap.__docgenInfo,name:"withFocusTrap",path:"src/core/utils/withFocusTrap.tsx#withFocusTrap"})}catch(__react_docgen_typescript_loader_error){}const Message=({children,title,subTitle})=>react.createElement(react.Fragment,null,react.createElement("h2",{"data-cy":"message-title",className:"text-header-h2"},title),react.createElement("div",{className:"color-secondary-gray text-body-medium-regular mt-48"},react.createElement("p",{"data-cy":"message-subtitle"},subTitle)),children&&react.createElement("div",null,children)),modal_message_Message=Message;try{Message.displayName="Message",Message.__docgenInfo={description:"",displayName:"Message",props:{title:{defaultValue:null,description:"",name:"title",required:!0,type:{name:"string"}},subTitle:{defaultValue:null,description:"",name:"subTitle",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/message/modal-message/Message.tsx#Message"]={docgenInfo:Message.__docgenInfo,name:"Message",path:"src/components/message/modal-message/Message.tsx#Message"})}catch(__react_docgen_typescript_loader_error){}var Button=__webpack_require__("./src/components/Buttons/Button.tsx"),modal=__webpack_require__("./src/core/utils/modal.tsx");const ModalMessage=react.forwardRef((props=>{const{close,closeAll}=(0,modal.f)(),{ctaButton,...messageProps}=props;return react.createElement("div",{className:"modal-cta__container"},react.createElement(modal_message_Message,messageProps),react.createElement("div",{className:"modal-cta__buttons mt-48"},ctaButton&&react.createElement(Button.z,{dataCy:ctaButton.dataCy??"modal-cta-button",classNames:"modal-message__confirm-button",label:ctaButton.text,buttonType:"none",disabled:!1,collapsible:!1,size:"small",variant:"filled",onClick:()=>{ctaButton.callback&&ctaButton.callback(),ctaButton.modalId&&close(ctaButton.modalId),ctaButton.closeAllModals&&closeAll()}})))})),modal_message_ModalMessage=(Component=ModalMessage,({withFocusTrap,...props})=>react.createElement(focus_trap_react_default(),{focusTrapOptions:{allowOutsideClick:!0}},react.createElement(Component,props)));var Component;try{ModalMessage.displayName="ModalMessage",ModalMessage.__docgenInfo={description:"",displayName:"ModalMessage",props:{ctaButton:{defaultValue:null,description:"",name:"ctaButton",required:!1,type:{name:"({ text: string; callback?: (() => void) | undefined; dataCy?: string | undefined; } & (RequiredModalId | RequireCloseAllModals)) | undefined"}},title:{defaultValue:null,description:"",name:"title",required:!0,type:{name:"string"}},subTitle:{defaultValue:null,description:"",name:"subTitle",required:!0,type:{name:"string"}},withFocusTrap:{defaultValue:null,description:"",name:"withFocusTrap",required:!1,type:{name:"boolean | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/message/modal-message/ModalMessage.tsx#ModalMessage"]={docgenInfo:ModalMessage.__docgenInfo,name:"ModalMessage",path:"src/components/message/modal-message/ModalMessage.tsx#ModalMessage"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/modal-details-header/modal-details-header.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_cover_cover__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/components/cover/cover.tsx");const __WEBPACK_DEFAULT_EXPORT__=({authors,year,title,pid,description,materialType,isbnForCover,periodical,series,children})=>{const coverId=pid||isbnForCover;return react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"modal-details__header"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"modal-details__cover"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"material-container"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("span",{className:"material material--large bg-identity-tint-120 material__animate"},react__WEBPACK_IMPORTED_MODULE_0__.createElement(_cover_cover__WEBPACK_IMPORTED_MODULE_1__.Y,{id:coverId,idType:pid?"pid":"isbn",size:"large",animate:!1,description:description||""})))),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"modal-details__material"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"modal-details__tags"},materialType&&react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"status-label status-label--outline"},materialType),children),react__WEBPACK_IMPORTED_MODULE_0__.createElement("h2",{className:"modal-details__title text-header-h2"},title),react__WEBPACK_IMPORTED_MODULE_0__.createElement("p",{className:"text-body-medium-regular","data-cy":"modal-authors"},authors,year&&react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment,null," (",year,")")),periodical&&react__WEBPACK_IMPORTED_MODULE_0__.createElement("p",{className:"text-body-medium-regular"},periodical),series&&react__WEBPACK_IMPORTED_MODULE_0__.createElement("p",{"data-cy":"modal-series",className:"text-body-medium-regular"},series)))};try{modaldetailsheader.displayName="modaldetailsheader",modaldetailsheader.__docgenInfo={description:"",displayName:"modaldetailsheader",props:{authors:{defaultValue:null,description:"",name:"authors",required:!0,type:{name:"string | null | undefined"}},year:{defaultValue:null,description:"",name:"year",required:!0,type:{name:"string | null | undefined"}},title:{defaultValue:null,description:"",name:"title",required:!0,type:{name:"string | null | undefined"}},pid:{defaultValue:null,description:"",name:"pid",required:!1,type:{name:"`${number}-${string}:${number}` | null | undefined"}},description:{defaultValue:null,description:"",name:"description",required:!0,type:{name:"string | null | undefined"}},materialType:{defaultValue:null,description:"",name:"materialType",required:!0,type:{name:"string | null | undefined"}},isbnForCover:{defaultValue:null,description:"",name:"isbnForCover",required:!0,type:{name:"string"}},periodical:{defaultValue:null,description:"",name:"periodical",required:!1,type:{name:"string | null | undefined"}},series:{defaultValue:null,description:"",name:"series",required:!1,type:{name:"string | null | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/modal-details-header/modal-details-header.tsx#modaldetailsheader"]={docgenInfo:modaldetailsheader.__docgenInfo,name:"modaldetailsheader",path:"src/components/modal-details-header/modal-details-header.tsx#modaldetailsheader"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/multiselect/Multiselect.dev.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Default:()=>Default,MultipleSelected:()=>MultipleSelected,SingleSelected:()=>SingleSelected,default:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_Multiselect__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/components/multiselect/Multiselect.tsx");const options=[{item:"First item",value:"1"},{item:"2. item",value:"2"},{item:"III",value:"3"}],__WEBPACK_DEFAULT_EXPORT__={title:"Components / Multiselect",component:_Multiselect__WEBPACK_IMPORTED_MODULE_1__.Z,argTypes:{caption:{name:"Caption",control:{type:"text"}},updateExternalState:{table:{disable:!0}}},args:{caption:"Title",options}},Template=args=>react__WEBPACK_IMPORTED_MODULE_0__.createElement(_Multiselect__WEBPACK_IMPORTED_MODULE_1__.Z,args),Default=Template.bind({}),SingleSelected=Template.bind({});SingleSelected.args={defaultValue:options.slice(0,1)};const MultipleSelected=Template.bind({});MultipleSelected.args={defaultValue:options.slice(0,2)}},"./src/components/multiselect/Multiselect.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>multiselect_Multiselect});var react=__webpack_require__("./node_modules/react/index.js"),ExpandMore=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/ExpandMore.svg"),ExpandMore_default=__webpack_require__.n(ExpandMore),downshift_esm=__webpack_require__("./node_modules/downshift/dist/downshift.esm.js"),clsx=__webpack_require__("./node_modules/clsx/dist/clsx.mjs"),useClickAway=__webpack_require__("./node_modules/react-use/esm/useClickAway.js"),useDeepCompareEffect=__webpack_require__("./node_modules/react-use/esm/useDeepCompareEffect.js"),Checkbox=__webpack_require__("./src/components/checkbox/Checkbox.tsx");const multiselect_useMultiselectOptions=function useMultiselectOptions(options,allOption){return{allOptions:[allOption,...options]}};var utils_text=__webpack_require__("./src/core/utils/text.tsx");function _extends(){return _extends=Object.assign?Object.assign.bind():function(target){for(var i=1;i{const t=(0,utils_text.X)(),ref=(0,react.useRef)(null),[isDropdownOpen,setIsDropdownOpen]=(0,react.useState)(!1),updateState=(updateKey,value)=>{updateExternalState&&updateKey&&updateExternalState.externalUpdateFunction({key:updateKey,value})},{allOptions}=multiselect_useMultiselectOptions(options,{item:"multiselectAllOptionText",value:"all"}),initialSelectedOptions=defaultValue.length>0?defaultValue:allOptions.slice(0,1),{getDropdownProps,setSelectedItems,selectedItems}=(0,downshift_esm.M$)({initialSelectedItems:initialSelectedOptions});(0,useClickAway.Z)(ref,(()=>{setIsDropdownOpen(!1)})),(0,useDeepCompareEffect.Z)((()=>{setSelectedItems(initialSelectedOptions)}),[setSelectedItems,initialSelectedOptions]);const{getToggleButtonProps,getMenuProps,highlightedIndex,getItemProps}=((isDropdownOpen,allOptions,selectedItems,setSelectedItems,handleSelectedItems)=>(0,downshift_esm.L7)({isOpen:isDropdownOpen,selectedItem:null,items:allOptions,stateReducer:(state,actionAndChanges)=>{const{changes,type}=actionAndChanges;switch(type){case downshift_esm.L7.stateChangeTypes.MenuKeyDownEnter:case downshift_esm.L7.stateChangeTypes.MenuKeyDownSpaceButton:case downshift_esm.L7.stateChangeTypes.ItemClick:return{...changes,isOpen:!0}}return changes},onStateChange:({type,selectedItem:newSelectedItem})=>{switch(type){case downshift_esm.L7.stateChangeTypes.MenuKeyDownSpaceButton:case downshift_esm.L7.stateChangeTypes.ItemClick:case downshift_esm.L7.stateChangeTypes.MenuKeyDownEnter:if(newSelectedItem&&!selectedItems.find((item=>item.value===newSelectedItem.value)))return void setSelectedItems(handleSelectedItems(selectedItems,newSelectedItem,allOptions.length));if(newSelectedItem&&selectedItems.find((item=>item.value===newSelectedItem.value))){if(1===selectedItems.length)return;const newSelectedItems=selectedItems.filter((item=>item.value!==newSelectedItem.value));setSelectedItems(handleSelectedItems(newSelectedItems,null,allOptions.length))}}}}))(isDropdownOpen,allOptions,selectedItems,setSelectedItems,((allCurrentlySelected,newSelected,allPossibleOptions)=>newSelected?allCurrentlySelected.find((item=>"all"===item.value))&&"all"!==newSelected.value?((selectedItems,newSelected,updateState,updateExternalState,setSelectedItems)=>{const newValue=[...selectedItems.filter((item=>"all"!==item.value)),newSelected];return updateState(null==updateExternalState?void 0:updateExternalState.key,newValue),setSelectedItems(newValue),newValue})(allCurrentlySelected,newSelected,updateState,updateExternalState,setSelectedItems):"all"!==newSelected.value&&[...allCurrentlySelected,newSelected].length===allPossibleOptions-1?((updateState,updateExternalState,setSelectedItems)=>{const newValue=[{item:"multiselectAllOptionText",value:"all"}];return updateState(null==updateExternalState?void 0:updateExternalState.key,newValue),setSelectedItems(newValue),newValue})(updateState,updateExternalState,setSelectedItems):"all"===newSelected.value?(updateState(null==updateExternalState?void 0:updateExternalState.key,[newSelected]),setSelectedItems([newSelected]),[newSelected]):((selectedItems,newSelected,updateState,updateExternalState,setSelectedItems)=>(updateState(null==updateExternalState?void 0:updateExternalState.key,[...selectedItems,newSelected]),setSelectedItems([...selectedItems,newSelected]),[...selectedItems,newSelected]))(selectedItems,newSelected,updateState,updateExternalState,setSelectedItems):((newSelected,updateState,updateExternalState,setSelectedItems)=>(updateState(null==updateExternalState?void 0:updateExternalState.key,newSelected),setSelectedItems(newSelected),newSelected))(allCurrentlySelected,updateState,updateExternalState,setSelectedItems)));return react.createElement(react.Fragment,null,caption&&react.createElement("div",{className:"multiselect__caption"},caption),react.createElement("div",{className:"multiselect",ref,"data-cy":dataCy},react.createElement("button",_extends({type:"button",className:"multiselect focus-styling"},getToggleButtonProps(getDropdownProps({preventKeyAction:isDropdownOpen})),{onClick:()=>{setIsDropdownOpen(!isDropdownOpen)},onKeyUp:e=>{"Enter"===e.key&&setIsDropdownOpen(!isDropdownOpen)}}),react.createElement("div",{className:"multiselect__selected"},selectedItems.map(((singularitem,index)=>(index>0?", ":"")+t(singularitem.item)))),react.createElement("div",{className:"multiselect__opener"},react.createElement("img",{className:(0,clsx.Z)("multiselect__icon",{"dropdown__arrow--bottom":isDropdownOpen}),src:ExpandMore_default(),alt:""}))),react.createElement("ul",_extends({className:"multiselect__options"},getMenuProps(),{style:isDropdownOpen?{}:{display:"none"}}),allOptions.map(((item,index)=>{const downshiftProps={...getItemProps({item,index})};return react.createElement("li",_extends({className:(0,clsx.Z)("multiselect__option",{"multiselect__option--highlighted":highlightedIndex===index}),key:`${item.value}${item.item}`},getItemProps({item,index}),{role:"option","aria-selected":!!selectedItems.find((selected=>selected.value===item.value))}),react.createElement("span",{id:`multiselect-label-${downshiftProps.id}`},t(item.item)),react.createElement("div",{className:"checkbox multiselect__checkbox"},react.createElement(Checkbox.Z,{id:index.toString(),selected:!!selectedItems.find((selected=>selected.value===item.value)),isVisualOnly:!0,labelledBy:`multiselect-label-${downshiftProps.id}`})))})))))},multiselect_Multiselect=Multiselect;try{Multiselect.displayName="Multiselect",Multiselect.__docgenInfo={description:"",displayName:"Multiselect",props:{dataCy:{defaultValue:{value:"multiselect"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}},caption:{defaultValue:null,description:"",name:"caption",required:!1,type:{name:"string | undefined"}},options:{defaultValue:null,description:"",name:"options",required:!0,type:{name:"MultiselectOption[]"}},defaultValue:{defaultValue:{value:"[]"},description:"",name:"defaultValue",required:!1,type:{name:"MultiselectOption[] | undefined"}},updateExternalState:{defaultValue:null,description:"",name:"updateExternalState",required:!1,type:{name:"MultiselectExternalUpdate | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/multiselect/Multiselect.tsx#Multiselect"]={docgenInfo:Multiselect.__docgenInfo,name:"Multiselect",path:"src/components/multiselect/Multiselect.tsx#Multiselect"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/promo-bar/PromoBar.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>promo_bar_PromoBar});var react=__webpack_require__("./node_modules/react/index.js"),clsx=__webpack_require__("./node_modules/clsx/dist/clsx.mjs"),icon_info=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/basic/icon-info.svg"),icon_info_default=__webpack_require__.n(icon_info);const PromoBarIcon=({type})=>"info"===type?react.createElement("img",{src:icon_info_default(),alt:"",className:"ml-4"}):null;try{PromoBarIcon.displayName="PromoBarIcon",PromoBarIcon.__docgenInfo={description:"",displayName:"PromoBarIcon",props:{type:{defaultValue:null,description:"",name:"type",required:!0,type:{name:'"info"'}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/promo-bar/PromoBarIcon.tsx#PromoBarIcon"]={docgenInfo:PromoBarIcon.__docgenInfo,name:"PromoBarIcon",path:"src/components/promo-bar/PromoBarIcon.tsx#PromoBarIcon"})}catch(__react_docgen_typescript_loader_error){}const PromoBar=({text,classNames,type,sticky,theme})=>react.createElement("section",{className:(0,clsx.Z)("promo-bar",classNames,{"promo-bar--sticky":sticky,"promo-bar--dark":"dark"===theme})},type&&react.createElement(PromoBarIcon,{type}),react.createElement("p",{className:"text-small-caption"},text)),promo_bar_PromoBar=PromoBar;try{PromoBar.displayName="PromoBar",PromoBar.__docgenInfo={description:"",displayName:"PromoBar",props:{text:{defaultValue:null,description:"",name:"text",required:!0,type:{name:"string"}},classNames:{defaultValue:null,description:"",name:"classNames",required:!1,type:{name:"string | undefined"}},type:{defaultValue:null,description:"",name:"type",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"info"'}]}},sticky:{defaultValue:null,description:"",name:"sticky",required:!1,type:{name:"boolean | undefined"}},theme:{defaultValue:null,description:"",name:"theme",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"dark"'}]}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/promo-bar/PromoBar.tsx#PromoBar"]={docgenInfo:PromoBar.__docgenInfo,name:"PromoBar",path:"src/components/promo-bar/PromoBar.tsx#PromoBar"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/renewal/RenewalModalMessage.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_core_utils_helpers_renewal__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/core/utils/helpers/renewal.ts"),_message_modal_message_ModalMessage__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/components/message/modal-message/ModalMessage.tsx");const RenewalModalMessage=({messageType,renewingResponse,modalId,setRenewingStatus,texts:{successTitleText,successStatusText,noRenewalsPossibleErrorTitleText,noRenewalsPossibleErrorStatusText,errorTitleText,errorStatusText,buttonText}})=>{const succeededRenewalCount=renewingResponse?(0,_core_utils_helpers_renewal__WEBPACK_IMPORTED_MODULE_1__.r0)(renewingResponse).length:0,showSuccessMessage="success"===messageType&&succeededRenewalCount>0,showNoRenewalsPossibleErrorMessage="success"===messageType&&0===succeededRenewalCount,showErrorMessage="error"===messageType;return react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment,null,showSuccessMessage&&react__WEBPACK_IMPORTED_MODULE_0__.createElement(_message_modal_message_ModalMessage__WEBPACK_IMPORTED_MODULE_2__.Z,{title:successTitleText,subTitle:successStatusText,ctaButton:{text:buttonText,modalId,callback:()=>setRenewingStatus("idle")}}),showNoRenewalsPossibleErrorMessage&&react__WEBPACK_IMPORTED_MODULE_0__.createElement(_message_modal_message_ModalMessage__WEBPACK_IMPORTED_MODULE_2__.Z,{title:noRenewalsPossibleErrorTitleText,subTitle:noRenewalsPossibleErrorStatusText,ctaButton:{text:buttonText,modalId,callback:()=>setRenewingStatus("idle")}}),showErrorMessage&&react__WEBPACK_IMPORTED_MODULE_0__.createElement(_message_modal_message_ModalMessage__WEBPACK_IMPORTED_MODULE_2__.Z,{title:errorTitleText,subTitle:errorStatusText,ctaButton:{text:buttonText,modalId,callback:()=>setRenewingStatus("idle")}}))},__WEBPACK_DEFAULT_EXPORT__=RenewalModalMessage;try{RenewalModalMessage.displayName="RenewalModalMessage",RenewalModalMessage.__docgenInfo={description:"",displayName:"RenewalModalMessage",props:{messageType:{defaultValue:null,description:"",name:"messageType",required:!0,type:{name:"enum",value:[{value:'"success"'},{value:'"error"'}]}},renewingResponse:{defaultValue:null,description:"",name:"renewingResponse",required:!0,type:{name:"RenewedLoanV2[] | null"}},modalId:{defaultValue:null,description:"",name:"modalId",required:!0,type:{name:"string"}},setRenewingStatus:{defaultValue:null,description:"",name:"setRenewingStatus",required:!0,type:{name:"(status: RequestStatus) => void"}},texts:{defaultValue:null,description:"",name:"texts",required:!0,type:{name:"{ successTitleText: string; successStatusText: string; noRenewalsPossibleErrorTitleText: string; noRenewalsPossibleErrorStatusText: string; errorTitleText: string; errorStatusText: string; buttonText: string; }"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/renewal/RenewalModalMessage.tsx#RenewalModalMessage"]={docgenInfo:RenewalModalMessage.__docgenInfo,name:"RenewalModalMessage",path:"src/components/renewal/RenewalModalMessage.tsx#RenewalModalMessage"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/reservation/ReservationFormListItem.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_core_utils_text__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/core/utils/text.tsx");const ReservationFormListItem=({icon,title,text,subText,changeHandler,buttonAriaLabel,isPossibleToChangeReservationDetails=!0})=>{const t=(0,_core_utils_text__WEBPACK_IMPORTED_MODULE_1__.X)();return react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"reservation-modal-list-item","data-cy":"reservation-form-list-item"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("img",{src:icon,alt:""}),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{"data-cy":"reservation-modal-list-item-text",className:"reservation-modal-list-item-text"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("h3",{className:"text-header-h5"},title),react__WEBPACK_IMPORTED_MODULE_0__.createElement("p",{className:"text-small-caption"},(null==text?void 0:text.length)>0?text:t("missingDataText")),subText&&react__WEBPACK_IMPORTED_MODULE_0__.createElement("p",{className:"text-small-caption"},subText)),changeHandler&&isPossibleToChangeReservationDetails&&react__WEBPACK_IMPORTED_MODULE_0__.createElement("button",{onClick:changeHandler,type:"button",className:"link-tag text-small-caption cursor-pointer","aria-label":buttonAriaLabel},t("shiftText")))},__WEBPACK_DEFAULT_EXPORT__=ReservationFormListItem;try{ReservationFormListItem.displayName="ReservationFormListItem",ReservationFormListItem.__docgenInfo={description:"",displayName:"ReservationFormListItem",props:{icon:{defaultValue:null,description:"",name:"icon",required:!0,type:{name:"string"}},title:{defaultValue:null,description:"",name:"title",required:!0,type:{name:"string"}},text:{defaultValue:null,description:"",name:"text",required:!0,type:{name:"string"}},subText:{defaultValue:null,description:"",name:"subText",required:!1,type:{name:"string | undefined"}},changeHandler:{defaultValue:null,description:"",name:"changeHandler",required:!1,type:{name:"(() => void) | undefined"}},buttonAriaLabel:{defaultValue:null,description:"",name:"buttonAriaLabel",required:!1,type:{name:"string | undefined"}},isPossibleToChangeReservationDetails:{defaultValue:{value:"true"},description:"",name:"isPossibleToChangeReservationDetails",required:!1,type:{name:"boolean | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/reservation/ReservationFormListItem.tsx#ReservationFormListItem"]={docgenInfo:ReservationFormListItem.__docgenInfo,name:"ReservationFormListItem",path:"src/components/reservation/ReservationFormListItem.tsx#ReservationFormListItem"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/reservation/forms/ModalReservationFormSelect.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_Dropdown_Dropdown__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/components/Dropdown/Dropdown.tsx"),_core_utils_modal__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/core/utils/modal.tsx"),_core_utils_text__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/core/utils/text.tsx"),_helper__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/components/reservation/forms/helper.ts"),_ReservationForm__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./src/components/reservation/forms/ReservationForm.tsx"),_helper__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./src/components/reservation/helper.ts"),_message_modal_message_ModalMessage__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./src/components/message/modal-message/ModalMessage.tsx");const ModalReservationFormSelect=({type,header,items,defaultSelectedItem,selectHandler,ariaLabel,saveCallback,reservationStatus,setReservationStatus})=>{const{close}=(0,_core_utils_modal__WEBPACK_IMPORTED_MODULE_2__.f)(),t=(0,_core_utils_text__WEBPACK_IMPORTED_MODULE_3__.X)(),[selectedItem,setSelectedItem]=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(defaultSelectedItem),{modalId,screenReaderModalDescriptionText,closeModalAriaLabelText}=((type,t)=>({modalId:(0,_helper__WEBPACK_IMPORTED_MODULE_4__._3)(type),screenReaderModalDescriptionText:t((0,_helper__WEBPACK_IMPORTED_MODULE_6__.o9)(type,"screenReaderModalDescriptionText")),closeModalAriaLabelText:t((0,_helper__WEBPACK_IMPORTED_MODULE_6__.o9)(type,"closeModalAriaLabelText"))}))(type,t);return react__WEBPACK_IMPORTED_MODULE_0__.createElement(_core_utils_modal__WEBPACK_IMPORTED_MODULE_2__.Z,{modalId,screenReaderModalDescriptionText,closeModalAriaLabelText,eventCallbacks:{close:()=>{setReservationStatus&&setReservationStatus("idle")}}},"success"===reservationStatus&&react__WEBPACK_IMPORTED_MODULE_0__.createElement(_message_modal_message_ModalMessage__WEBPACK_IMPORTED_MODULE_7__.Z,{title:t("reservationSuccessTitleText"),subTitle:t("reservationSuccessSubTitleText"),ctaButton:{modalId:"pickup",text:t("reservationStatusButtonText"),callback:()=>setReservationStatus&&setReservationStatus("idle")}}),"error"===reservationStatus&&react__WEBPACK_IMPORTED_MODULE_0__.createElement(_message_modal_message_ModalMessage__WEBPACK_IMPORTED_MODULE_7__.Z,{title:t("reservationerrorTitleText"),subTitle:t("reservationerrorSubTitleText"),ctaButton:{modalId:"pickup",text:t("reservationStatusButtonText"),callback:()=>setReservationStatus&&setReservationStatus("idle")}}),(!reservationStatus||"idle"===reservationStatus||"pending"===reservationStatus)&&react__WEBPACK_IMPORTED_MODULE_0__.createElement(_ReservationForm__WEBPACK_IMPORTED_MODULE_5__.Z,{title:header.title,description:header.description,onSubmit:()=>{selectHandler(selectedItem),saveCallback?saveCallback():close((0,_helper__WEBPACK_IMPORTED_MODULE_4__._3)(type))},buttonLabel:"pending"===reservationStatus?t("loadingText"):void 0},react__WEBPACK_IMPORTED_MODULE_0__.createElement(_Dropdown_Dropdown__WEBPACK_IMPORTED_MODULE_1__.Z,{options:items.map((({label,value})=>({label,value}))),ariaLabel,arrowIcon:"chevron",handleOnChange:event=>{const{value}=event.target;setSelectedItem(value)},defaultValue:selectedItem,placeholder:{label:t("chooseOneText"),disabled:!0,value:""},cyData:"modal-reservation-form-select"})))},__WEBPACK_DEFAULT_EXPORT__=ModalReservationFormSelect;try{ModalReservationFormSelect.displayName="ModalReservationFormSelect",ModalReservationFormSelect.__docgenInfo={description:"",displayName:"ModalReservationFormSelect",props:{type:{defaultValue:null,description:"",name:"type",required:!0,type:{name:"enum",value:[{value:'"email"'},{value:'"sms"'},{value:'"pickup"'},{value:'"interestPeriod"'}]}},header:{defaultValue:null,description:"",name:"header",required:!0,type:{name:"{ title: string; description: string[]; }"}},items:{defaultValue:null,description:"",name:"items",required:!0,type:{name:"{ label: string; value: string; }[]"}},defaultSelectedItem:{defaultValue:null,description:"",name:"defaultSelectedItem",required:!0,type:{name:"string"}},selectHandler:{defaultValue:null,description:"",name:"selectHandler",required:!0,type:{name:"(value: string) => void"}},ariaLabel:{defaultValue:null,description:"",name:"ariaLabel",required:!0,type:{name:"string"}},saveCallback:{defaultValue:null,description:"",name:"saveCallback",required:!1,type:{name:"(() => void) | undefined"}},reservationStatus:{defaultValue:null,description:"",name:"reservationStatus",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"success"'},{value:'"idle"'},{value:'"pending"'},{value:'"error"'}]}},setReservationStatus:{defaultValue:null,description:"",name:"setReservationStatus",required:!1,type:{name:"((status: RequestStatus) => void) | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/reservation/forms/ModalReservationFormSelect.tsx#ModalReservationFormSelect"]={docgenInfo:ModalReservationFormSelect.__docgenInfo,name:"ModalReservationFormSelect",path:"src/components/reservation/forms/ModalReservationFormSelect.tsx#ModalReservationFormSelect"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/reservation/forms/NoInterestAfterModal.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_core_utils_text__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/core/utils/text.tsx"),_ModalReservationFormSelect__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/components/reservation/forms/ModalReservationFormSelect.tsx"),_core_utils_config__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/core/utils/config.tsx");const NoInterestAfterModal=({selectedInterest,setSelectedInterest,saveCallback,reservationStatus,setReservationStatus})=>{const t=(0,_core_utils_text__WEBPACK_IMPORTED_MODULE_1__.X)(),interstPeriods=(0,_core_utils_config__WEBPACK_IMPORTED_MODULE_3__.ZR)()("interestPeriodsConfig",{transformer:"jsonParse"});return react__WEBPACK_IMPORTED_MODULE_0__.createElement(_ModalReservationFormSelect__WEBPACK_IMPORTED_MODULE_2__.Z,{type:"interestPeriod",header:{title:t("modalReservationFormNoInterestAfterHeaderTitleText"),description:[t("modalReservationFormNoInterestAfterHeaderDescriptionText")]},items:interstPeriods.interestPeriods,defaultSelectedItem:String(selectedInterest),selectHandler:value=>setSelectedInterest(Number(value)),ariaLabel:t("modalReservationFormNoInterestAfterLabelText"),saveCallback,reservationStatus,setReservationStatus})},__WEBPACK_DEFAULT_EXPORT__=NoInterestAfterModal;try{NoInterestAfterModal.displayName="NoInterestAfterModal",NoInterestAfterModal.__docgenInfo={description:"",displayName:"NoInterestAfterModal",props:{selectedInterest:{defaultValue:null,description:"",name:"selectedInterest",required:!0,type:{name:"number"}},setSelectedInterest:{defaultValue:null,description:"",name:"setSelectedInterest",required:!0,type:{name:"(value: number) => void"}},saveCallback:{defaultValue:null,description:"",name:"saveCallback",required:!1,type:{name:"(() => void) | undefined"}},reservationStatus:{defaultValue:null,description:"",name:"reservationStatus",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"success"'},{value:'"idle"'},{value:'"pending"'},{value:'"error"'}]}},setReservationStatus:{defaultValue:null,description:"",name:"setReservationStatus",required:!1,type:{name:"((status: RequestStatus) => void) | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/reservation/forms/NoInterestAfterModal.tsx#NoInterestAfterModal"]={docgenInfo:NoInterestAfterModal.__docgenInfo,name:"NoInterestAfterModal",path:"src/components/reservation/forms/NoInterestAfterModal.tsx#NoInterestAfterModal"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/reservation/forms/PickupModal.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_core_utils_text__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/core/utils/text.tsx"),_ModalReservationFormSelect__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/components/reservation/forms/ModalReservationFormSelect.tsx");const PickupModal=({branches,defaultBranch,selectBranchHandler,saveCallback,reservationStatus,setReservationStatus})=>{const t=(0,_core_utils_text__WEBPACK_IMPORTED_MODULE_1__.X)(),formatBranches=branches.map((branch=>({value:branch.branchId,label:branch.title})));return react__WEBPACK_IMPORTED_MODULE_0__.createElement(_ModalReservationFormSelect__WEBPACK_IMPORTED_MODULE_2__.Z,{type:"pickup",header:{title:t("modalReservationFormPickupHeaderTitleText"),description:[t("modalReservationFormPickupHeaderDescriptionText")]},items:formatBranches,defaultSelectedItem:defaultBranch,selectHandler:selectBranchHandler,ariaLabel:t("modalReservationFormPickupLabelText"),saveCallback,reservationStatus,setReservationStatus})},__WEBPACK_DEFAULT_EXPORT__=PickupModal;try{PickupModal.displayName="PickupModal",PickupModal.__docgenInfo={description:"",displayName:"PickupModal",props:{branches:{defaultValue:null,description:"",name:"branches",required:!0,type:{name:"AgencyBranch[]"}},defaultBranch:{defaultValue:null,description:"",name:"defaultBranch",required:!0,type:{name:"string"}},selectBranchHandler:{defaultValue:null,description:"",name:"selectBranchHandler",required:!0,type:{name:"(value: string) => void"}},saveCallback:{defaultValue:null,description:"",name:"saveCallback",required:!1,type:{name:"(() => void) | undefined"}},reservationStatus:{defaultValue:null,description:"",name:"reservationStatus",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"success"'},{value:'"idle"'},{value:'"pending"'},{value:'"error"'}]}},setReservationStatus:{defaultValue:null,description:"",name:"setReservationStatus",required:!1,type:{name:"((status: RequestStatus) => void) | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/reservation/forms/PickupModal.tsx#PickupModal"]={docgenInfo:PickupModal.__docgenInfo,name:"PickupModal",path:"src/components/reservation/forms/PickupModal.tsx#PickupModal"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/reservation/forms/ReservationForm.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_core_utils_text__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/core/utils/text.tsx"),_Buttons_Button__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/components/Buttons/Button.tsx");const ReservationForm=({title,description,children,onSubmit,buttonLabel,disabledButton,cyData="reservation-form"})=>{const t=(0,_core_utils_text__WEBPACK_IMPORTED_MODULE_1__.X)();return react__WEBPACK_IMPORTED_MODULE_0__.createElement("section",{className:"reservation-modal reservation-form"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"reservation-form__content"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"reservation-form__header"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("h3",{className:"text-header-h3 mb-35","data-cy":`${cyData}-title`},title),description.map((paragraph=>react__WEBPACK_IMPORTED_MODULE_0__.createElement("p",{className:"text-body-large","data-cy":`${cyData}-description`},paragraph)))),react__WEBPACK_IMPORTED_MODULE_0__.createElement("form",null,children&&react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"reservation-form__body mt-35"},children),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"reservation-form__footer mt-48"},react__WEBPACK_IMPORTED_MODULE_0__.createElement(_Buttons_Button__WEBPACK_IMPORTED_MODULE_2__.z,{label:buttonLabel||t("saveButtonText"),buttonType:"none",disabled:disabledButton??!1,collapsible:!1,size:"xlarge",variant:"filled",onClick:onSubmit,dataCy:`${cyData}-button`})))))},__WEBPACK_DEFAULT_EXPORT__=ReservationForm;try{ReservationForm.displayName="ReservationForm",ReservationForm.__docgenInfo={description:"",displayName:"ReservationForm",props:{title:{defaultValue:null,description:"",name:"title",required:!0,type:{name:"string"}},description:{defaultValue:null,description:"",name:"description",required:!0,type:{name:"string[]"}},onSubmit:{defaultValue:null,description:"",name:"onSubmit",required:!0,type:{name:"() => void"}},buttonLabel:{defaultValue:null,description:"",name:"buttonLabel",required:!1,type:{name:"string | undefined"}},disabledButton:{defaultValue:null,description:"",name:"disabledButton",required:!1,type:{name:"boolean | undefined"}},cyData:{defaultValue:{value:"reservation-form"},description:"",name:"cyData",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/reservation/forms/ReservationForm.tsx#ReservationForm"]={docgenInfo:ReservationForm.__docgenInfo,name:"ReservationForm",path:"src/components/reservation/forms/ReservationForm.tsx#ReservationForm"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/reservation/forms/helper.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{E4:()=>saveText,_3:()=>modalReservationFormId});const modalReservationFormId=type=>`modal-reservation-form-${type}`,saveText=({type,changedText,savedText,patron,mutate})=>new Promise(((resolve,reject)=>{const textDiffers=changedText!==savedText,updatedPatronData=(({type,value,patron:{preferredPickupBranch,preferredLanguage,receiveSms,receivePostalMail,receiveEmail,emailAddress,phoneNumber}})=>{const defaultData={preferredPickupBranch,preferredLanguage,receiveSms,receivePostalMail,receiveEmail,emailAddress,phoneNumber};switch(type){case"email":return{...defaultData,emailAddress:value,receiveEmail:!0};case"sms":return{...defaultData,phoneNumber:value,receiveSms:!0};default:return null}})({type,value:changedText,patron});updatedPatronData?textDiffers?mutate({data:{patron:updatedPatronData}},{onSuccess:response=>{response?resolve(response):reject(new Error("We did not get a response from the server"))},onError:e=>{reject(e)}}):resolve(""):reject(new Error("Cannot construct updated patron data"))}))},"./src/components/reservation/helper.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Cg:()=>getInstantLoanBranchHoldingsAboveThreshold,M1:()=>getFutureDateString,OR:()=>getNoInterestAfter,Sp:()=>getPreferredBranch,ZW:()=>getInstantLoanBranchHoldings,_w:()=>getManifestationsToReserve,f2:()=>isConfigValueOne,fK:()=>constructReservationData,l2:()=>removePrefixFromBranchId,o9:()=>getReservationModalTypeTranslation,qT:()=>getAuthorLine,tr:()=>translateOpenOrderStatus});__webpack_require__("./node_modules/core-js/modules/esnext.map.delete-all.js"),__webpack_require__("./node_modules/core-js/modules/esnext.map.every.js"),__webpack_require__("./node_modules/core-js/modules/esnext.map.filter.js"),__webpack_require__("./node_modules/core-js/modules/esnext.map.find.js"),__webpack_require__("./node_modules/core-js/modules/esnext.map.find-key.js"),__webpack_require__("./node_modules/core-js/modules/esnext.map.includes.js"),__webpack_require__("./node_modules/core-js/modules/esnext.map.key-of.js"),__webpack_require__("./node_modules/core-js/modules/esnext.map.map-keys.js"),__webpack_require__("./node_modules/core-js/modules/esnext.map.map-values.js"),__webpack_require__("./node_modules/core-js/modules/esnext.map.merge.js"),__webpack_require__("./node_modules/core-js/modules/esnext.map.reduce.js"),__webpack_require__("./node_modules/core-js/modules/esnext.map.some.js"),__webpack_require__("./node_modules/core-js/modules/esnext.map.update.js");var dayjs__WEBPACK_IMPORTED_MODULE_13__=__webpack_require__("./node_modules/dayjs/dayjs.min.js"),dayjs__WEBPACK_IMPORTED_MODULE_13___default=__webpack_require__.n(dayjs__WEBPACK_IMPORTED_MODULE_13__),_core_utils_helpers_general__WEBPACK_IMPORTED_MODULE_14__=__webpack_require__("./src/core/utils/helpers/general.ts"),_core_utils_helpers_invalid_switch_case__WEBPACK_IMPORTED_MODULE_16__=__webpack_require__("./src/core/utils/helpers/invalid-switch-case.ts"),_core_dbc_gateway_generated_graphql__WEBPACK_IMPORTED_MODULE_15__=__webpack_require__("./src/core/dbc-gateway/generated/graphql.tsx");const isConfigValueOne=configValue=>"1"===configValue,getPreferredBranch=(id,array)=>{const locationItem=array.find((item=>item.branchId===id));return locationItem?locationItem.title:id},getNoInterestAfter=(days,interestPeriod,t)=>{const interestPeriodFound=interestPeriod.interestPeriods.find((({value})=>value===String(days)));return interestPeriodFound?interestPeriodFound.label:`${days} ${t("daysText")}`},getFutureDateString=num=>dayjs__WEBPACK_IMPORTED_MODULE_13___default()().add(num,"day").format("YYYY-MM-DD"),constructReservations=({manifestations,pickupBranch,expiryDate,periodical})=>manifestations.map((manifestation=>(({manifestation:{pid},pickupBranch,expiryDate,periodical})=>({recordId:(0,_core_utils_helpers_general__WEBPACK_IMPORTED_MODULE_14__.rp)(pid),...pickupBranch?{pickupBranch}:{},...expiryDate?{expiryDate}:{},...periodical?{periodical}:{}}))({manifestation,pickupBranch,expiryDate,periodical}))),constructReservationData=({manifestations,selectedBranch,expiryDate,periodical})=>({reservations:constructReservations({manifestations,...selectedBranch?{pickupBranch:selectedBranch}:{},...expiryDate?{expiryDate}:{},...periodical?{periodical:{volumeNumber:periodical.volumeNumber,volumeYear:periodical.volumeYear}}:{}}),...manifestations.length>1?{type:"parallel"}:{}}),getAuthorLine=(manifestation,t)=>{const{creators}=manifestation,publicationYear=(0,_core_utils_helpers_general__WEBPACK_IMPORTED_MODULE_14__.S2)(manifestation),author=(0,_core_utils_helpers_general__WEBPACK_IMPORTED_MODULE_14__.b7)((0,_core_utils_helpers_general__WEBPACK_IMPORTED_MODULE_14__.TG)(creators),t)||null;let year="";return publicationYear&&(year=publicationYear),(0,_core_utils_helpers_general__WEBPACK_IMPORTED_MODULE_14__.bV)(manifestation)&&(year=`(${t("materialHeaderAllEditionsText")})`),author?[t("materialHeaderAuthorByText"),author,year].join(" "):null},getManifestationsToReserve=(reservableManifestations,isPeriodical)=>isPeriodical?reservableManifestations:!reservableManifestations||reservableManifestations.length<1?[]:(0,_core_utils_helpers_general__WEBPACK_IMPORTED_MODULE_14__.bV)(reservableManifestations[0])?reservableManifestations:[(0,_core_utils_helpers_general__WEBPACK_IMPORTED_MODULE_14__.bs)(reservableManifestations)],getReservationModalTypeTranslation=(name,type)=>{const isCloseModal="closeModalAriaLabelText"===type;switch(name){case"sms":return isCloseModal?"closeModalAriaLabelSmsText":"screenReaderModalDescriptionSmsText";case"email":return isCloseModal?"closeModalAriaLabelEmailText":"screenReaderModalDescriptionEmailText";case"interestPeriod":return isCloseModal?"closeModalAriaLabelInterestPeriodText":"screenReaderModalDescriptionInterestPeriodText";case"pickup":return isCloseModal?"closeModalAriaLabelPickupText":"screenReaderModalDescriptionPickupText";default:return(0,_core_utils_helpers_invalid_switch_case__WEBPACK_IMPORTED_MODULE_16__.Z)(name)}},getInstantLoanBranchHoldings=(branchHoldings,whitelist,instantLoanStrings)=>{const whitelistBranchIds=whitelist.map((({branchId})=>branchId));return(branchHoldings=>{const processedBranches=new Map;return branchHoldings.forEach((({branch,materials})=>{const{branchId}=branch,storedBranch=processedBranches.get(branchId);storedBranch?processedBranches.set(branchId,{branch,materials:[...materials,...storedBranch.materials]}):processedBranches.set(branchId,{branch,materials})})),[...processedBranches.values()]})(branchHoldings.filter((({branch})=>whitelistBranchIds.includes(branch.branchId)))).map((({branch,materials})=>({branch,materials:materials.filter((({materialGroup,available})=>instantLoanStrings.some((instantLoanString=>{var _materialGroup$descri;return null===(_materialGroup$descri=materialGroup.description)||void 0===_materialGroup$descri?void 0:_materialGroup$descri.includes(instantLoanString)}))&&available))}))).filter((({materials})=>materials.length>0))},getInstantLoanBranchHoldingsAboveThreshold=(instantLoanBranchHoldings,instantLoanThresholdConfig)=>instantLoanBranchHoldings.filter((({materials})=>materials.length>=Number(instantLoanThresholdConfig??0))),removePrefixFromBranchId=branchId=>branchId.split("-")[1],translateOpenOrderStatus=(status,t)=>{const statusTextMap={[_core_dbc_gateway_generated_graphql__WEBPACK_IMPORTED_MODULE_15__.Bw.OwnedAccepted]:"openOrderStatusOwnedAcceptedText",[_core_dbc_gateway_generated_graphql__WEBPACK_IMPORTED_MODULE_15__.Bw.AuthenticationError]:"openOrderAuthenticationErrorText",[_core_dbc_gateway_generated_graphql__WEBPACK_IMPORTED_MODULE_15__.Bw.BorchkUserBlockedByAgency]:"openOrderUserBlockedByAgencyText",[_core_dbc_gateway_generated_graphql__WEBPACK_IMPORTED_MODULE_15__.Bw.BorchkUserNotVerified]:"openOrderUserNotVerifiedText",[_core_dbc_gateway_generated_graphql__WEBPACK_IMPORTED_MODULE_15__.Bw.BorchkUserNoLongerExistOnAgency]:"openOrderUserNoLongerExistOnAgencyText",[_core_dbc_gateway_generated_graphql__WEBPACK_IMPORTED_MODULE_15__.Bw.InvalidOrder]:"openOrderInvalidOrderText",[_core_dbc_gateway_generated_graphql__WEBPACK_IMPORTED_MODULE_15__.Bw.NotOwnedIllLoc]:"openOrderNotOwnedIllLocText",[_core_dbc_gateway_generated_graphql__WEBPACK_IMPORTED_MODULE_15__.Bw.NotOwnedNoIllLoc]:"openOrderNotOwnedNoIllLocText",[_core_dbc_gateway_generated_graphql__WEBPACK_IMPORTED_MODULE_15__.Bw.NotOwnedWrongIllMediumtype]:"openOrderNotOwnedWrongIllMediumtypeText",[_core_dbc_gateway_generated_graphql__WEBPACK_IMPORTED_MODULE_15__.Bw.NoServicerequester]:"openOrderNoServicerequesterText",[_core_dbc_gateway_generated_graphql__WEBPACK_IMPORTED_MODULE_15__.Bw.OrsError]:"openOrderOrsErrorText",[_core_dbc_gateway_generated_graphql__WEBPACK_IMPORTED_MODULE_15__.Bw.OwnedOwnCatalogue]:"openOrderOwnedOwnCatalogueText",[_core_dbc_gateway_generated_graphql__WEBPACK_IMPORTED_MODULE_15__.Bw.OwnedWrongMediumtype]:"openOrderOwnedWrongMediumtypeText",[_core_dbc_gateway_generated_graphql__WEBPACK_IMPORTED_MODULE_15__.Bw.ServiceUnavailable]:"openOrderServiceUnavailableText",[_core_dbc_gateway_generated_graphql__WEBPACK_IMPORTED_MODULE_15__.Bw.UnknownError]:"openOrderUnknownErrorText",[_core_dbc_gateway_generated_graphql__WEBPACK_IMPORTED_MODULE_15__.Bw.UnknownPickupagency]:"openOrderUnknownPickupagencyText",[_core_dbc_gateway_generated_graphql__WEBPACK_IMPORTED_MODULE_15__.Bw.UnknownUser]:"openOrderUnknownUserText"};return statusTextMap[status]?t(statusTextMap[status]):""}},"./src/components/result-pager/use-pager.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>use_pager});var react=__webpack_require__("./node_modules/react/index.js"),utils_text=__webpack_require__("./src/core/utils/text.tsx");function ResultPager({setPageHandler,itemsShown,hitcount,isLoading,classNames}){const t=(0,utils_text.X)();return react.createElement("div",{className:`result-pager ${classNames}`},react.createElement("p",{className:"text-small-caption result-pager__title"},t("resultPagerStatusText",{placeholders:{"@itemsShown":itemsShown,"@hitcount":hitcount}})),itemsShown!==hitcount&&react.createElement("button",{disabled:isLoading,type:"button",className:"btn-primary btn-outline btn-medium arrow__hover--right-small uppercase",onClick:setPageHandler},t(isLoading?"loadingText":"showMoreText")))}const result_pager=ResultPager;try{ResultPager.displayName="ResultPager",ResultPager.__docgenInfo={description:"",displayName:"ResultPager",props:{setPageHandler:{defaultValue:null,description:"",name:"setPageHandler",required:!0,type:{name:"() => void"}},itemsShown:{defaultValue:null,description:"",name:"itemsShown",required:!0,type:{name:"number"}},hitcount:{defaultValue:null,description:"",name:"hitcount",required:!0,type:{name:"number"}},classNames:{defaultValue:null,description:"",name:"classNames",required:!0,type:{name:"string"}},isLoading:{defaultValue:null,description:"",name:"isLoading",required:!1,type:{name:"boolean | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/result-pager/result-pager.tsx#ResultPager"]={docgenInfo:ResultPager.__docgenInfo,name:"ResultPager",path:"src/components/result-pager/result-pager.tsx#ResultPager"})}catch(__react_docgen_typescript_loader_error){}const use_pager=({hitcount,pageSize,overrideItemsShown})=>{const[itemsShown,setItemsShown]=(0,react.useState)(pageSize>=hitcount?hitcount:pageSize),[page,setPage]=(0,react.useState)(0),[firstInNewPage,setFirstInNewPage]=(0,react.useState)(null);(0,react.useEffect)((()=>{setItemsShown(pageSize>hitcount?hitcount:pageSize)}),[hitcount,pageSize]);const pagehandler=()=>{const currentPage=page+1,itemsOnPage=(currentPage+1)*pageSize,onLastPage=itemsOnPage>hitcount;setFirstInNewPage(itemsOnPage-pageSize),setItemsShown(onLastPage?hitcount:itemsOnPage),setPage(currentPage)};return{itemsShown,PagerComponent:({isLoading,classNames=""})=>hitcount?react.createElement(result_pager,{itemsShown:overrideItemsShown?overrideItemsShown():itemsShown,hitcount,classNames,setPageHandler:pagehandler,isLoading}):null,page,firstInNewPage}};try{usepager.displayName="usepager",usepager.__docgenInfo={description:"",displayName:"usepager",props:{hitcount:{defaultValue:null,description:"",name:"hitcount",required:!0,type:{name:"number"}},pageSize:{defaultValue:null,description:"",name:"pageSize",required:!0,type:{name:"number"}},overrideItemsShown:{defaultValue:null,description:"",name:"overrideItemsShown",required:!1,type:{name:"(() => number) | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/result-pager/use-pager.tsx#usepager"]={docgenInfo:usepager.__docgenInfo,name:"usepager",path:"src/components/result-pager/use-pager.tsx#usepager"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/search-bar/search-bar.dev.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Default:()=>Default,default:()=>search_bar_dev});var react=__webpack_require__("./node_modules/react/index.js"),search_bar=__webpack_require__("./src/components/search-bar/search-bar.tsx"),downshift_esm=__webpack_require__("./node_modules/downshift/dist/downshift.esm.js");function _extends(){return _extends=Object.assign?Object.assign.bind():function(target){for(var i=1;i{const[q,setQ]=(0,react.useState)(""),{getInputProps,getComboboxProps}=(0,downshift_esm.Kb)({items:["Item 1","Item 2"],inputValue:q,defaultIsOpen:!1,onInputValueChange:({inputValue})=>{setQ(inputValue)}});return react.createElement("div",{className:"header__menu-second"},react.createElement("form",_extends({action:"https://bibliotek.dk/search",className:"header__menu-search"},getComboboxProps()),react.createElement(search_bar.Z,_extends({},storybookArgs,{getInputProps}))))};try{searchbardevinc.displayName="searchbardevinc",searchbardevinc.__docgenInfo={description:"",displayName:"searchbardevinc",props:{storybookArgs:{defaultValue:null,description:"",name:"storybookArgs",required:!0,type:{name:"SearchBarProps"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/search-bar/search-bar.dev.inc.tsx#searchbardevinc"]={docgenInfo:searchbardevinc.__docgenInfo,name:"searchbardevinc",path:"src/components/search-bar/search-bar.dev.inc.tsx#searchbardevinc"})}catch(__react_docgen_typescript_loader_error){}const search_bar_dev={title:"Components / Search Bar",component:search_bar.Z,argTypes:{altText:{name:"Alt text for search button image",defaultValue:"søgeikon",control:{type:"text"}},inputPlaceholderText:{name:"Input field placeholder",defaultValue:"Søg blandt bibliotekets materialer",control:{type:"text"}}}},Default=args=>react.createElement(search_bar_dev_inc,{storybookArgs:args})},"./src/components/search-bar/search-bar.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_search_svg__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/basic/icon-search.svg"),_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_search_svg__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_search_svg__WEBPACK_IMPORTED_MODULE_1__),_danskernesdigitalebibliotek_dpl_design_system_build_icons_collection_ExpandMore_svg__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/ExpandMore.svg"),_danskernesdigitalebibliotek_dpl_design_system_build_icons_collection_ExpandMore_svg__WEBPACK_IMPORTED_MODULE_2___default=__webpack_require__.n(_danskernesdigitalebibliotek_dpl_design_system_build_icons_collection_ExpandMore_svg__WEBPACK_IMPORTED_MODULE_2__),_core_utils_text__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/core/utils/text.tsx"),_core_utils_helpers_url__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/core/utils/helpers/url.ts");function _extends(){return _extends=Object.assign?Object.assign.bind():function(target){for(var i=1;i{const t=(0,_core_utils_text__WEBPACK_IMPORTED_MODULE_3__.X)(),handleDropdownMenu=()=>{setIsHeaderDropdownOpen(!isHeaderDropdownOpen)};return react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment,null,react__WEBPACK_IMPORTED_MODULE_0__.createElement("label",_extends({className:"hide-visually"},getLabelProps()),t("searchHeaderInputLabelText")),react__WEBPACK_IMPORTED_MODULE_0__.createElement("input",_extends({required:!0,pattern:".*\\S+.*",title:t("searchNoValidCharactersErrorText"),name:"q",className:"header__menu-search-input text-body-medium-regular","data-cy":dataCy,type:"text",placeholder:t("inputPlaceholderText"),"aria-label":t("inputPlaceholderText"),onKeyUp:e=>{"Enter"===e.key&&qWithoutQuery===q&&q.length>0&&(0,_core_utils_helpers_url__WEBPACK_IMPORTED_MODULE_4__.gB)(redirectUrl)}},getInputProps({onChange:e=>{setQWithoutQuery(e.target.value)}}))),react__WEBPACK_IMPORTED_MODULE_0__.createElement("input",{type:"image",src:_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_search_svg__WEBPACK_IMPORTED_MODULE_1___default(),alt:t("searchHeaderIconAltText"),className:"header__menu-search-icon",onClick:()=>{qWithoutQuery===q&&q.length>0&&(0,_core_utils_helpers_url__WEBPACK_IMPORTED_MODULE_4__.gB)(redirectUrl)},onKeyUp:e=>{"Enter"===e.key&&qWithoutQuery===q&&q.length>0&&(0,_core_utils_helpers_url__WEBPACK_IMPORTED_MODULE_4__.gB)(redirectUrl)}}),react__WEBPACK_IMPORTED_MODULE_0__.createElement("input",{type:"image",src:_danskernesdigitalebibliotek_dpl_design_system_build_icons_collection_ExpandMore_svg__WEBPACK_IMPORTED_MODULE_2___default(),alt:t("searchHeaderDropdownText"),className:"header__menu-dropdown-icon",onClick:e=>{e.preventDefault(),e.stopPropagation(),handleDropdownMenu()},onKeyUp:e=>{"Enter"!==e.key&&"ArrowDown"!==e.key||(e.preventDefault(),e.stopPropagation(),handleDropdownMenu())},tabIndex:0,"aria-label":t("searchHeaderDropdownText"),"data-cy":"search-header-dropdown-icon"}))};try{searchbar.displayName="searchbar",searchbar.__docgenInfo={description:"",displayName:"searchbar",props:{q:{defaultValue:null,description:"",name:"q",required:!0,type:{name:"string"}},getInputProps:{defaultValue:null,description:"",name:"getInputProps",required:!0,type:{name:"(options?: UseComboboxGetInputPropsOptions | undefined, otherOptions?: GetPropsCommonOptions | undefined) => any"}},getLabelProps:{defaultValue:null,description:"",name:"getLabelProps",required:!0,type:{name:"(options?: UseComboboxGetLabelPropsOptions | undefined) => any"}},dataCy:{defaultValue:{value:"search-header-input"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}},qWithoutQuery:{defaultValue:null,description:"",name:"qWithoutQuery",required:!0,type:{name:"string"}},setQWithoutQuery:{defaultValue:null,description:"",name:"setQWithoutQuery",required:!0,type:{name:"(value: string) => void"}},isHeaderDropdownOpen:{defaultValue:null,description:"",name:"isHeaderDropdownOpen",required:!0,type:{name:"boolean"}},setIsHeaderDropdownOpen:{defaultValue:null,description:"",name:"setIsHeaderDropdownOpen",required:!0,type:{name:"(value: boolean | ((prevState: boolean) => boolean)) => void"}},redirectUrl:{defaultValue:null,description:"",name:"redirectUrl",required:!0,type:{name:"URL"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/search-bar/search-bar.tsx#searchbar"]={docgenInfo:searchbar.__docgenInfo,name:"searchbar",path:"src/components/search-bar/search-bar.tsx#searchbar"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/search-bar/story-header.dev.inc.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_menu_svg__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/basic/icon-menu.svg"),_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_menu_svg__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_menu_svg__WEBPACK_IMPORTED_MODULE_1__),_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_search_svg__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/basic/icon-search.svg"),_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_search_svg__WEBPACK_IMPORTED_MODULE_2___default=__webpack_require__.n(_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_search_svg__WEBPACK_IMPORTED_MODULE_2__),_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_profile_svg__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/basic/icon-profile.svg"),_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_profile_svg__WEBPACK_IMPORTED_MODULE_3___default=__webpack_require__.n(_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_profile_svg__WEBPACK_IMPORTED_MODULE_3__),_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_heart_svg__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/basic/icon-heart.svg"),_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_heart_svg__WEBPACK_IMPORTED_MODULE_4___default=__webpack_require__.n(_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_heart_svg__WEBPACK_IMPORTED_MODULE_4__),_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_watch_static_svg__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/basic/icon-watch-static.svg"),_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_watch_static_svg__WEBPACK_IMPORTED_MODULE_5___default=__webpack_require__.n(_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_watch_static_svg__WEBPACK_IMPORTED_MODULE_5__),_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_cross_medium_svg__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/basic/icon-cross-medium.svg"),_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_cross_medium_svg__WEBPACK_IMPORTED_MODULE_6___default=__webpack_require__.n(_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_cross_medium_svg__WEBPACK_IMPORTED_MODULE_6__),_danskernesdigitalebibliotek_dpl_design_system_build_icons_collection_ExpandMore_svg__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/ExpandMore.svg"),_danskernesdigitalebibliotek_dpl_design_system_build_icons_collection_ExpandMore_svg__WEBPACK_IMPORTED_MODULE_7___default=__webpack_require__.n(_danskernesdigitalebibliotek_dpl_design_system_build_icons_collection_ExpandMore_svg__WEBPACK_IMPORTED_MODULE_7__);const __WEBPACK_DEFAULT_EXPORT__=({search,userProfile})=>react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",null,react__WEBPACK_IMPORTED_MODULE_0__.createElement("header",{className:"header"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"header__logo-desktop"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("a",{className:"header__logo-desktop-link",href:"/"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",null,react__WEBPACK_IMPORTED_MODULE_0__.createElement("img",{className:"logo",src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKEAAAAgCAYAAAB6vRjLAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAABRSSURBVHgB7VwLeFTVtV5r73POTCYJIQmBJJPwEBABkwBBRIEU6LXWZ20Rbq312U9vvbZWW7X1ai3tbdVWW+3Vttx+1Yp6tYK12l61eG1BRQEhkISHIGgSMpOEVzJhksnMeex91z7DxMwY8uBpSv/vO9+cs85+77XXXo99BoKs5GDXpZW+BMcIa2HizUll09XIS66EE4gGVvozVW+Anfn11Hf1vGRhvF2TH03QAlhSGdTKWgM5c4vgOIPq3lrPzmxYCqeNhFMcmgTITDwgYBocI+yFmF4EWmZ3mgOODicWHtU/h35TX2gguASWKZP7HKX0NoJAOO7AmAnS2gQRBqc4TvkB6A5DeheALqf6W95q6CvtznEXeOAo4Ah+sS6cWQ/DGQE4xaHBP9EFK9t7NaIxrHXEZfdl170UUrRaGO3VtKxbUcrLpJTDAbGGaez/ZF3wa80Z534+v/3dvYH8z8wjuXahw7R3WFt4snSc2SjZs78rsl65oSPrLqbpdXbbwVZwnMuJvqVIVN+rZfuujUrDe5f86GFog9bGvFlzpC0uRUdWyc7OGcSln5cITcC0J/yzsp7FVavsRDt3jhvn8XyUdjNDXARSDkXGXhZDfI1MQpEwxdPFHetqYBDhn0zYDTIUug45Gx8BrvTE0EqYqxnYskIKUaHe0x4tadLHSMv5AiK8vn9kKATbiN4Wni5j1u0M5b+BxExUCdFZFwq0DJGM3+4gxEjVEZQ7jeg+VZZoa7tRAGRFhfkEPbbCvrZpkuHtpA6Y9GzEGwSng2NVBNe0nkNPN7kkKbHRM3WJBOdaeognE+JObOvopHdpVPd7RBpUTHhKbMeaxC+TIfBY90sAXttXvtM9LRdIlBXEU7uNNO9U/70LNGTcNd5o+qdkBbIykjJINICzq1HIkbpgD378AjXg/BEh5DiScF/prU4EeVDTtfP8f/i+BoYxH5F1gC2vaTbKS9T7QFpphbSdKyjlPmboFf6//ZfOvWkXU4OiMEhxSkhC2tZm0s/M7jSU/bA9mF6hBJPweB4c3rG+KnC/eTEI+VlguJ1+J9iRcCmlWtVVpqE97Y9uejrxfCvk58UbIGv9Zta9CB9vqYdtK+Af82Ob3oBFi9TjyoBnyu/Acm6VjllOz5tRMyaCaXokk48XRje+DfPmqXSvBLTSN0DAQhiE6JEJa0fP9Xrq9o+xPcZ8zrBIGpouO6MH0YGNVmb26jGhVSE4CryfOSM307LLEOVZYOi5gvYltM1G0Wm9s7fcWzW9stKCYwiSWs8hir92p6Hk5bS33tJrvpjlSjq9YPiBuubyAohaj9J4POQgjiXT4ozUwZPC2dNjQZq2F82+GdBtl9qakwrFdvVj61wn9wKwSNQr3A2MdSalEzICgxRJ40iToge0su9g4MD1gsEZzLKYq3WQMyEhN/RwS4hW51KaxCV+s3I7DASSFwd46a8hElUKdW68bLurbEZKVUGVWRfQyx6NWvJ/xkHNXjgGIGVs3Shn61PdaUE+mTwk7JZ+5WeC66a1hOZ+h8jTHoL9zm/gJEFwTvwv4R8JyTqhkHNAiIekgEm0JnvWF8kao+3hW2BbbzV4p9wgSXmHfoKG727Kf5NiwJ5TkGyUMIb0pl94GawI6uXT4CQCde5KL7u+6TY1NjrXvuFvqoxQ+7PhZMHQ45KS4ekJkjsHiBNgkCKV0frNUCQ189B0fhs02n7Q/zwwAN+anEJ60NuNWukcOFmwnXfVD3PENMG1O4bHNu6ihTeX9t3PE7mFLILdcIKBHeFXiOH2o+1c2WCUvbAbJt/TyA+8RAvjbBikOHrr2LbvCepTbobjA58j5LKgp/SkrHLNK/5OP3GrU9qPBbSSRlp4K2k1aaDxJfmxDR/BCYYfPthPAuAaWtDNaIsFjLH/FBLPJZVmHwxS9CL5MIQcnyFrrVJoWoy24EIk3xS5H85MTUn+qcV1vokvjo683wT9hGSskibyfx0hdhq0FmgjLnFscSNJmaStjgY3n5TzR+j2AhggkGE9VbRG4zRBZkr9yEnfZGtQitrD5bfQmKw2YypnBTHexZQrQzLYyhEfLzh36KNddjHTguQGXEMVJkVaJkB6BJCvoa1zcw+NW0/qSeb0tAwbyMQQBjaCo9I6QVJiu0B68m5BZTAWZ7Lm0qvSAdo3OPtDc+We1lIBTgZyUSkd9h2aiKsxM82CozIbTzwwwEo+oeVKZCssTX7rtFjNjiQ6OUoD+pTvohA/osfkOLDBf18Urbo+8fhnOO3WaSz94R7qFILhd41c+E3+npqO7i/qfOUFmuU8QpGFRalN4oZ3XkF0/ZtwHEFjsZOiD2NgSNaYROguCOU+P1RG5MKFfM9bbd4RzSsiSCsGThICGdMvR9NeSh6mlf5zhl6mIinbh03ITA953lUCQni9M0ZG1q+HQYRPbseIf8/yaV9NZcD4K5TFdvUDFAW4J/UdRRGuOJBz9hDoCxo+UGxV/zyVARVGRyqbtJzh1xMjrE6tWljmVXAcEeQlb1G0oZgWWlTYVlfbFAO6DVi+3Mnf83rHyWRABY/fswJssZd2pouCq1tWB3nZExkhzwrFgLRr7dybJbbCIEMyEyLakhl3DQlX7u8tkyfb/DWFt7YlZZXg7WyLVkCvtbGd/lj1Pb1NpJpoqXvupDBXkh+M9KB5e/PmZsBxAlnlc+hSesHDxQfXtMCnFHk73gmDV19AC/UDstjPllJcR7/n0JiuAZ1dNL2pctD5C5OYkPwjzVErVN1XpuH7trV3SueVVLqQsrS3fCRpVvRHkvgj69ZKzusguW2j7fCeXDhOoMjuxKgPi4rs6u/Dpxz+SOXGwmfvnkT66VyBcB16+OwP5uRUFMeqdsIgRLKzmrMPxotdsf5k9AwZshNC4SQaBzGm10ycVUE/YiGKUcmp3Ui3E7vaRguG543IhIb34XjAD5u3QzsMGuCiRRQ/gTfdS+0Zq2DQIokJSUb1K7TkZjQ000mhSRWo7wWOFXOgn5Bk0qKV3BzUvANyKTVAyQ3Ez584MEBu+GaStH8qMquXfZx24oWI/A4hxdKRsO1JWV6uB6usx8mMKvaLzfMPJ8GVwRJ8ccfvVboiucUN5Mply3jj1fc/RWG/AqLNhxOIepg0myO5bRBfGCk2/woGAf6xDzAwVO6kualk9wSULf61QSubRobW99ykjI+lRTQXkb3pukg6T0OQO+aRWO79qP/kyYgv7viMRBwJH7MppzpU3nwYoBnzkXfqKEPjNzJbvF8Y3fgMDBCMwyhyb8ylvld1d/V8mnFKHOUSgPcJDUvUZXMsR037gTrfx6S4mfybBSpNTMAyh1vTpbB+C0eLhQstEOYFVN5ZMEB4opYfIrH/cCzrcjhFcGoc5QKxd5S5ZUs30saAVqaOZZ21zwQlLZs8eTmFpC+o7fRdaIHG7vmb8uZMI1fItbRV+1DXtmKMLUm4bnrE8uWMDcubyWNmBpVVmSBXQ2l6to6LKAyojpUZqPH6iCl+Nx5q3CP+ewsqKmJtkUUYjZEgw4nBnHNuV/TCW87/BS5e7Mq15rSzZ5pWdCETIod0+HYSfa8UxSpXIBze4AuWX+yTtS03cVWpV1uW23jIB+o76xIRMz9HDvsM2gpauYHPFUSqunyMTbnnzBASKpgBb9l726eQ034SZqQvxSi2SJ9cCI5sgE6TgkmWOgVu0fvVfqvmaffwb/fxM86abIvYNeRGyhMoO4F7Xh9pVnZ9VHdCmVAzvEOhs5+JbduXQpFWuOWYHNxU34dgXaOhRqpAHxJ2NeEDLbNpO36QXEE/BMWI3SBa21bTsHpQBXBITyWr9Jp9ObNm5+1/J3yYKrhooZi6ZefT/c8VIZRVkt3RAS9Jxz2l7U6StB30crilQZ/ypeJo1Sor1HEhxkw3BCqFPB1C7e7B2F05Oeqkdyygld5lxyL3qe0L3e/GBKfr3wOsVB06+V7q5CvUQ0m2rKpfTm8+62j8/tyWqgYJi1mj/sdHZDT6TTxUlhSCOzG8JcjK7vaL6p/G+x2uUGPiMIqeAQylRasiXe+KaGsdmvxByhgj3cZwP5GjhFTKDUFeerm0q7+Q0KEDaeULhRl9FqXLazaTZDfY5k2U7tnWCfZ1Z27bZp7Q7VhYziX9SXcg7WzSw+T4JCLigWg0ekQBKS7xvCAr+Z66dmsl9/h2Ny+nQS+jAd3a3GlX9lkA4koyZj5nI1xEbibFoKXRtvb7YABo74CbibEqyL+6gyyjS5HxOcD5L2lyssk7+4D6boQk1Z9oLhe7VZK0pnqvVde4lhZru29qITHBD4lO0g/vlhxnU1nXS3Bt+tuC2tSZqXXuzZuUoWnsOcWAVOAz/pEFaoFBs/HKROnAN+h2jyqDc5xFbHQzucEk6Si3NI/43PCkgoT0okEqDIPzMn0Zb3TRJUlzxMcoeDGfJPflkuFOYspL9vjK3YhX69C5Q8k4e4D0Y06G5kPU57mosS9T/+upqq9k7/IsUOlO7HYsxPw9aVPOHdFZ9W5vyUzLvA4lDutOozh25dhw1T7lbBwwiHlosi5St0woKeNa3Q4ZIb+aDn0foLUN/WsqmqPum4ypdY5tb2UgZ8IAQAw/k8KdIHR2W3Fk02uKRhGmzZ2hyMW0TU3nu/T8fKhcF4QzOU3mYvL/NRQ7NUvdzItroDljeoUNtk5W71+K7ZrEAlgb1EonE3N/B9GZRM9rEvUxCh6YLdoT1Nnzadt/mWeLr+Ou12LxjjvnqVGh7fMpv1X9+0NZ1jXwEtWWC5z9zapvf06UZSI+cVp004/ch8Bm8iRMivcJcKN/Ts63Ex9hNelT0x2wl9qmeSE9Ph8JhSYzJkYLZO8VxTbd2SUdjSljaff5iUQ5mx6fO25M6GNaj1KWvDTP12XNqBjd9l6PBwcCetlVtrDv/gSrIf/bkYbMWLrvZRjiW+c+2ALF/tZSGsEF0rF/3Owt/Wt+tKa2t/yjOjY0J5i/3QzvS2NpIB3Zd4iyOyyRpsQb+oc1wSGXcs6BtWHqb5AkzViE3r83EF7PUDJYVBHzKE+X9CYGzI/fsBRHvlxEfcw59PBk9zAp83mHiTaLhBZeSWV9tiuLI1xPgAAnSRJ6pOzxE1iG4kD3rwBty9pNjK12bU+8HFtHdYwEYGzQmLKB6nLTkcT1qYkkF5yb7oiZ0OqIhFK5jFbGLKWDGLQJ2J32FYdxTxRp4eh7tIJ/yrxZSwva33ZPhzRlzJkkOg/eQT34KsgU/yViszdd/2/olxu9p7Z2rBwVXvfL7rSAd+p9aNp3OTbeSI93wQAhQR6BSAbQbZY0Kj3pcb2CoYcZuj+FukciiyQ524kBqexaKtw9JNxQdM6K4sCazkNlxNvOMZPpGk/KRWU5Dkahm0f3cJ6ew9FT+YJqy8CUNlMD1KcQbdBxFEwoHPkeBVrJQpS+jwuW4zWODU5MKJnlO3xuOYwU6QedSOtPg54p+6g3aU4k1LNkoXi2w+HbuS3rDsIxBDoyGLcOnGF9Jl60XI2rOy0+b1aaNE0aaGbCQMDRUiKCVA1vgrQK5/HxmjsHfTIi6bDWod8/FHZs+FqCHoTyYVHopLGOtqVk2ZJelFXR0dz+OBlAX2SN4ceI5uZDS8SXMxP3U1n3JzIEMmfkxsLt6WNh2zE5rEvhBvX5kGLWV4s7NixI0D+E07IAvFmJNh+xYTLqzkto9cnXU+mkcKbTyvP1rxRk0nJGSMc57NbGGD5abH7peTgK0JaQGcqanZ24PvSUnS5s55vqndDY5r7yB1/6yQ3qd8ukSQZZ7VfEC8VPxGn3TTy/4LBtQIgfgN3TesUGisao2zO08ByaoWn0soFlDUtiIlrguersYPNV6vwgTWi4Y8uhvszf7Skfq+6bM84dLrj1gofxDw2edW73/ILhG0N3r25FE2+jXGQR46IGXvZF911Hp3s+gJjxou3DZrl/1aKO0WGkc4uHa9uCvulT4VjAq9XTLhYiPXN+0Cg/Q5F2wrghBs9Y6rZZy7wp3tcjhOu30vQ7aFBq+06MAdoCVJxzIFuPzZl2b8t4i1wPi4/K908McE+4va0ucRm22EK0CRLYtkzvkKf7zC/EowF25gdD3+ebpXDud10aBvuZ+27xYltI6Vrt5s6mHbWHBrsHPAVqQhznWyOqzO0NWLLBkSYp/zKNoi3PjWpb7X47YhkZrcr1QYt5tr1tc529bHPtlmXLjBFWTiUy9g6t8tFoWzVBLF3tRMKbSb/6DLWn2pdlvNNTpYWwqV7omlpEaVTXz3dllA4vdGa8SpraVtIJZ2W2HKwNYsl6LWbVkBWbT0bEq4UzMvpcmP1BYZTqBlBG2FDpmOupz2t83FdDbVZ/HrAfdelGhEhpxLrERVpO40AqKY5t3EUx2C+qDh0uDa2EWsa0y/yzc/6FrL7vkvDrxzF03MINfl6+tfHHyo8ERwimYQQ530MhuRBdne7FNVIhWIDp/GGpa5cOPTT51A/TTatrrmbldkjjLYpGDuEnqSPFxBzkNmL1QtMX+SMb1ybqkRrcC8oXzXgHo7UT7wI7QJGZrk9Ai6yatdJjXEmivYpUldE0CeWUxgSd3d52unVvIt0oc+12bhh307tdlMZBEVe91DfLuse4nNqxFNUfN6GcRcybIxh7ydA9VybUFQ3i/eAa71JfRsY2riAn+28ZY740oX8DFrYKoeP5lP9VmvN0uqaDy6T4a91LrpqEsUFjFR8TI0kVYrpuxen6/uTx1ty6Qde7jsK1TbCvZRyXqL5Sf2aSFCqgNCttzTOrqDPupD8m/z6lnL+++uYbSb+6jFZSOapNWcpqYuy/aLlySXfLTJ1UFrr9VdKPyGfEzyKNr4AmxqH0tZTvTeTaawWxS18/Wul3rCFXriTdbbSG88YctcNcbtigQziXH2lZ6oQ7VDamQXlhlBb5UY0TlcWoLC+V1Xk8D+y6bV6zxguxmIXz5iWdTPl/+jv2xktbiOwAAAAASUVORK5CYII=",alt:"Logo of libary"})))),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"header__menu"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("nav",{className:"header__menu-first"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",null,react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"header__menu-navigation-mobile"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"pagefold-parent--small header__menu-navigation-button header__button",id:"header__menu--open"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"pagefold-triangle--small"}),react__WEBPACK_IMPORTED_MODULE_0__.createElement("img",{src:_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_menu_svg__WEBPACK_IMPORTED_MODULE_1___default(),alt:"List of bookmarks"})),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"header__menu-navigation-logo"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"logo-fallback"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("p",{className:"logo-fallback__text-name"},"Lyngby-Taarbæk"),react__WEBPACK_IMPORTED_MODULE_0__.createElement("p",{className:"logo-fallback__text-libraries"},"Bibliotekerne")))),react__WEBPACK_IMPORTED_MODULE_0__.createElement("ul",{className:"header__menu-navigation"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("li",{className:"header__menu-navigation-item"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("a",{href:"/",className:"header__menu-navigation-link text-body-medium-regular hide-linkstyle"},"Det sker")),react__WEBPACK_IMPORTED_MODULE_0__.createElement("li",{className:"header__menu-navigation-item"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("a",{href:"/",className:"header__menu-navigation-link text-body-medium-regular hide-linkstyle"},"Biblioteker & åbningstider")),react__WEBPACK_IMPORTED_MODULE_0__.createElement("li",{className:"header__menu-navigation-item"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("a",{href:"/",className:"header__menu-navigation-link text-body-medium-regular hide-linkstyle"},"Digitale tilbud")),react__WEBPACK_IMPORTED_MODULE_0__.createElement("li",{className:"header__menu-navigation-item"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("a",{href:"/",className:"header__menu-navigation-link text-body-medium-regular hide-linkstyle"},"Litteratur")),react__WEBPACK_IMPORTED_MODULE_0__.createElement("li",{className:"header__menu-navigation-item"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("a",{href:"/",className:"header__menu-navigation-link text-body-medium-regular hide-linkstyle"},"Børn & forældre")))),userProfile||react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"header__menu-profile header__button"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("img",{src:_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_profile_svg__WEBPACK_IMPORTED_MODULE_3___default(),alt:"Profile"})),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"header__menu-bookmarked header__button"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("a",{href:"/"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("img",{src:_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_heart_svg__WEBPACK_IMPORTED_MODULE_4___default(),alt:"List of bookmarks"})))),search||react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"header__menu-search"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("input",{name:"q",className:"header__menu-search-input text-body-medium-regular",type:"text",autoComplete:"off",placeholder:"Cannot search in this story"}),react__WEBPACK_IMPORTED_MODULE_0__.createElement("input",{type:"image",src:_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_search_svg__WEBPACK_IMPORTED_MODULE_2___default(),className:"header__menu-search-icon",alt:"search icon"}),react__WEBPACK_IMPORTED_MODULE_0__.createElement("img",{className:"header__menu-dropdown-icon",src:_danskernesdigitalebibliotek_dpl_design_system_build_icons_collection_ExpandMore_svg__WEBPACK_IMPORTED_MODULE_7___default(),alt:"expand dropdown icon"}))),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"header__clock"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"pagefold-parent--medium"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"pagefold-triangle--medium"})),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"header__clock-items"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("img",{src:_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_watch_static_svg__WEBPACK_IMPORTED_MODULE_5___default(),className:"mb-8",alt:"clock icon"}),react__WEBPACK_IMPORTED_MODULE_0__.createElement("span",{className:"text-small-caption"},"Fredag"),react__WEBPACK_IMPORTED_MODULE_0__.createElement("span",{className:"text-small-caption"},"28 Maj")))),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{id:"header__overlay"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"header__overlay-main"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("img",{id:"header__menu--close",src:_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_cross_medium_svg__WEBPACK_IMPORTED_MODULE_6___default(),alt:"close"}),react__WEBPACK_IMPORTED_MODULE_0__.createElement("ul",{className:"header__overlay-menu"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("li",{className:"header__overlay-menu-item"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("a",{href:"/",className:"header__overlay-menu-link text-body-large hide-linkstyle"},"Det sker")),react__WEBPACK_IMPORTED_MODULE_0__.createElement("li",{className:"header__overlay-menu-item"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("a",{href:"/",className:"header__overlay-menu-link text-body-large hide-linkstyle"},"Biblioteker & åbningstider")),react__WEBPACK_IMPORTED_MODULE_0__.createElement("li",{className:"header__overlay-menu-item"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("a",{href:"/",className:"header__overlay-menu-link text-body-large hide-linkstyle"},"Digitale tilbud")),react__WEBPACK_IMPORTED_MODULE_0__.createElement("li",{className:"header__overlay-menu-item"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("a",{href:"/",className:"header__overlay-menu-link text-body-large hide-linkstyle"},"Litteratur")),react__WEBPACK_IMPORTED_MODULE_0__.createElement("li",{className:"header__overlay-menu-item"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("a",{href:"/",className:"header__overlay-menu-link text-body-large hide-linkstyle"},"Børn & forældre")))),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"header__overlay-backdrop"})));try{storyheaderdevinc.displayName="storyheaderdevinc",storyheaderdevinc.__docgenInfo={description:"",displayName:"storyheaderdevinc",props:{search:{defaultValue:null,description:"",name:"search",required:!1,type:{name:"ReactNode"}},userProfile:{defaultValue:null,description:"",name:"userProfile",required:!1,type:{name:"ReactNode"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/search-bar/story-header.dev.inc.tsx#storyheaderdevinc"]={docgenInfo:storyheaderdevinc.__docgenInfo,name:"storyheaderdevinc",path:"src/components/search-bar/story-header.dev.inc.tsx#storyheaderdevinc"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/simple-material/SimpleMaterial.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),react_redux__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/react-redux/es/index.js"),_button_favourite_button_favourite__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/components/button-favourite/button-favourite.tsx"),_cover_cover__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/components/cover/cover.tsx"),_core_utils_helpers_general__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/core/utils/helpers/general.ts"),_core_guardedRequests_slice__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./src/core/guardedRequests.slice.ts"),_core_utils_helpers_url__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./src/core/utils/helpers/url.ts"),_atoms_links_Link__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./src/components/atoms/links/Link.tsx"),_core_utils_url__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./src/core/utils/url.tsx");const SimpleMaterial=({bright,work:{titles:{full:fullTitle},creators,workId,manifestations:{all:manifestations}},app})=>{const materialUrl=(0,_core_utils_url__WEBPACK_IMPORTED_MODULE_7__.J_)()("materialUrl"),dispatch=(0,react_redux__WEBPACK_IMPORTED_MODULE_1__.I0)(),materialFullUrl=(0,_core_utils_helpers_url__WEBPACK_IMPORTED_MODULE_8__.WO)(materialUrl,workId);let authors=null;const inputContributorsArray=null==creators?void 0:creators.map((({display})=>display));inputContributorsArray&&(authors=(0,_core_utils_helpers_general__WEBPACK_IMPORTED_MODULE_4__.RN)(!0,inputContributorsArray));const manifestationPid=(0,_core_utils_helpers_general__WEBPACK_IMPORTED_MODULE_4__.qQ)(manifestations),title=fullTitle[0];return react__WEBPACK_IMPORTED_MODULE_0__.createElement("li",{className:"simple-material "+(bright?" simple-material--bright":"")},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"simple-material__cover-container"},react__WEBPACK_IMPORTED_MODULE_0__.createElement(_cover_cover__WEBPACK_IMPORTED_MODULE_3__.Y,{animate:!0,size:"medium",id:manifestationPid})),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"simple-material__favourite"},react__WEBPACK_IMPORTED_MODULE_0__.createElement(_button_favourite_button_favourite__WEBPACK_IMPORTED_MODULE_2__.Z,{title,darkBackground:!bright,id:workId,addToListRequest:id=>{dispatch((0,_core_guardedRequests_slice__WEBPACK_IMPORTED_MODULE_5__.Bs)({type:"addFavorite",args:{id},app}))}})),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"simple-material__meta"},react__WEBPACK_IMPORTED_MODULE_0__.createElement(_atoms_links_Link__WEBPACK_IMPORTED_MODULE_6__.Z,{href:materialFullUrl,className:"simple-material__title"},title),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"simple-material__author"},authors)))},__WEBPACK_DEFAULT_EXPORT__=SimpleMaterial;try{SimpleMaterial.displayName="SimpleMaterial",SimpleMaterial.__docgenInfo={description:"",displayName:"SimpleMaterial",props:{work:{defaultValue:null,description:"",name:"work",required:!0,type:{name:"Work"}},bright:{defaultValue:null,description:"",name:"bright",required:!1,type:{name:"boolean | undefined"}},app:{defaultValue:null,description:"",name:"app",required:!0,type:{name:"enum",value:[{value:'"material"'},{value:'"search-result"'},{value:'"advanced-search"'},{value:'"recommender"'},{value:'"something-similar"'},{value:'"favorites-list-mc"'},{value:'"inspiration-recommender"'}]}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/simple-material/SimpleMaterial.tsx#SimpleMaterial"]={docgenInfo:SimpleMaterial.__docgenInfo,name:"SimpleMaterial",path:"src/components/simple-material/SimpleMaterial.tsx#SimpleMaterial"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/skeletons/TextLineSkeleton.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js");const TextLineSkeleton=({width=40})=>react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"ssc-line w-100",style:{width:`${width}px`}}),__WEBPACK_DEFAULT_EXPORT__=TextLineSkeleton;try{TextLineSkeleton.displayName="TextLineSkeleton",TextLineSkeleton.__docgenInfo={description:"",displayName:"TextLineSkeleton",props:{width:{defaultValue:{value:"40"},description:"",name:"width",required:!1,type:{name:"number | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/skeletons/TextLineSkeleton.tsx#TextLineSkeleton"]={docgenInfo:TextLineSkeleton.__docgenInfo,name:"TextLineSkeleton",path:"src/components/skeletons/TextLineSkeleton.tsx#TextLineSkeleton"})}catch(__react_docgen_typescript_loader_error){}},"./src/core/blockedModal.slice.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Og:()=>setHasBeenVisible,ZP:()=>__WEBPACK_DEFAULT_EXPORT__});const blockedModalSlice=(0,__webpack_require__("./node_modules/@reduxjs/toolkit/dist/redux-toolkit.esm.js").oM)({name:"blockedModal",initialState:{data:{hasBeenVisible:!1}},reducers:{setHasBeenVisible(state,action){state.data.hasBeenVisible||action.payload.hasBeenVisible&&(state.data={...state.data,...action.payload})}}}),{setHasBeenVisible}=blockedModalSlice.actions,__WEBPACK_DEFAULT_EXPORT__=blockedModalSlice.reducer},"./src/core/config.slice.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Mg:()=>addConfigEntries,ZP:()=>__WEBPACK_DEFAULT_EXPORT__});const configSlice=(0,__webpack_require__("./node_modules/@reduxjs/toolkit/dist/redux-toolkit.esm.js").oM)({name:"config",initialState:{data:{}},reducers:{addConfigEntries(state,action){state.data={...state.data,...action.payload.entries}}}}),{addConfigEntries}=configSlice.actions,__WEBPACK_DEFAULT_EXPORT__=configSlice.reducer},"./src/core/configuration/index.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{ZP:()=>configuration,bc:()=>getConf,G2:()=>getDeviceConf});var lib=__webpack_require__("./node_modules/react-device-detect/dist/lib.js");const page_size_namespaceObject=JSON.parse('{"mobile":{"pageSize":10},"desktop":{"pageSize":20}}'),page_size_loan_list_namespaceObject=JSON.parse('{"mobile":{"pageSize":10},"desktop":{"pageSize":25}}'),page_size_reservation_list_namespaceObject=JSON.parse('{"mobile":{"pageSize":10},"desktop":{"pageSize":25}}'),recommender_material_limits_namespaceObject=JSON.parse('{"recommender":4,"inspiration":4,"somethingSimilar":4,"somethingSimilarAuthor":4}'),cover_tints_namespaceObject=JSON.parse('{"coverTints":["100","40","80","120","20"]}'),colors_namespaceObject=JSON.parse('{"default":"#484848","danger":"#d5364a","warning":"#f7bf42","success":"#068802"}');var modal_ids=__webpack_require__("./src/core/configuration/modal-ids.json");const reservation_namespaceObject=JSON.parse('{"defaultInterestDaysForOpenOrder":90}'),getConf=(type,configuration,device)=>{const subConf=configuration[type];return device?subConf[device]:subConf},getDeviceConf=(type,configuration)=>{const device=lib.tq?"mobile":"desktop";return getConf(type,configuration,device)},configuration={pageSize:page_size_namespaceObject,coverTints:cover_tints_namespaceObject,pageSizeLoanList:page_size_loan_list_namespaceObject,pageSizeReservationList:page_size_reservation_list_namespaceObject,colors:colors_namespaceObject,recommenderMaterialLimits:recommender_material_limits_namespaceObject,modalIds:modal_ids,reservation:reservation_namespaceObject}},"./src/core/dbc-gateway/generated/graphql.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{U5:()=>AccessTypeCode,rU:()=>CopyRequestStatus,sl:()=>FacetField,Bw:()=>SubmitOrderStatus,sW:()=>SuggestionType,Lc:()=>WorkType,KZ:()=>useComplexSearchWithPaginationQuery,af:()=>useComplexSearchWithPaginationWorkAccessQuery,Dv:()=>useGetInfomediaQuery,Ch:()=>useGetManifestationViaBestRepresentationByFaustQuery,BN:()=>useGetManifestationViaMaterialByFaustQuery,og:()=>useGetMaterialQuery,f8:()=>useGetReviewManifestationsQuery,Qk:()=>useGetSmallWorkQuery,Zu:()=>useIntelligentFacetsQuery,c6:()=>useOpenOrderMutation,zj:()=>usePlaceCopyMutation,GN:()=>useRecommendFromFaustQuery,NF:()=>useSearchFacetQuery,OX:()=>useSearchWithPaginationQuery,UC:()=>useSuggestionsFromQueryStringQuery});var es=__webpack_require__("./node_modules/react-query/es/index.js"),FetchFailedCriticalError=__webpack_require__("./src/core/fetchers/FetchFailedCriticalError.ts"),core_token=__webpack_require__("./src/core/token.js"),extractServiceBaseUrls=__webpack_require__("./src/core/utils/reduxMiddleware/extractServiceBaseUrls.ts"),FetcherCriticalHttpError=__webpack_require__("./src/core/fetchers/FetcherCriticalHttpError.ts");function _defineProperty(obj,key,value){return(key=function _toPropertyKey(t){var i=function _toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==typeof i?i:String(i)}(key))in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}class DbcGateWayHttpError extends FetcherCriticalHttpError.Z{constructor(...args){super(...args),_defineProperty(this,"name","DbcGateWayHttpError")}}const fetcher=(query,variables)=>()=>{const token=(0,core_token.LP)(core_token.b4)||(0,core_token.LP)(core_token.t8),authHeaders=token?{Authorization:`Bearer ${token}`}:{};return fetch((0,extractServiceBaseUrls.fG)(extractServiceBaseUrls.PS.fbi),{method:"POST",headers:{"Content-Type":"application/json",...authHeaders},body:JSON.stringify({query,variables})}).then((async response=>{if(!response.ok)throw new DbcGateWayHttpError(response.status,response.statusText);const json=await response.json();if(json.errors){const{message}=json.errors[0];throw new Error(message)}return json.data})).catch((error=>{if(error instanceof DbcGateWayHttpError)throw error;const message=error instanceof Error?error.message:"Unknown error";throw new FetchFailedCriticalError.Z(message,query)}))};let AccessTypeCode=function(AccessTypeCode){return AccessTypeCode.NotSpecified="NOT_SPECIFIED",AccessTypeCode.Online="ONLINE",AccessTypeCode.Physical="PHYSICAL",AccessTypeCode.Unknown="UNKNOWN",AccessTypeCode}({}),CopyRequestStatus=function(CopyRequestStatus){return CopyRequestStatus.BorchkUserBlockedByAgency="BORCHK_USER_BLOCKED_BY_AGENCY",CopyRequestStatus.BorchkUserNotVerified="BORCHK_USER_NOT_VERIFIED",CopyRequestStatus.BorchkUserNoLongerExistOnAgency="BORCHK_USER_NO_LONGER_EXIST_ON_AGENCY",CopyRequestStatus.ErrorAgencyNotSubscribed="ERROR_AGENCY_NOT_SUBSCRIBED",CopyRequestStatus.ErrorInvalidPickupBranch="ERROR_INVALID_PICKUP_BRANCH",CopyRequestStatus.ErrorMissingClientConfiguration="ERROR_MISSING_CLIENT_CONFIGURATION",CopyRequestStatus.ErrorMunicipalityagencyidNotFound="ERROR_MUNICIPALITYAGENCYID_NOT_FOUND",CopyRequestStatus.ErrorPidNotReservable="ERROR_PID_NOT_RESERVABLE",CopyRequestStatus.ErrorUnauthenticatedUser="ERROR_UNAUTHENTICATED_USER",CopyRequestStatus.Ok="OK",CopyRequestStatus.UnknownUser="UNKNOWN_USER",CopyRequestStatus}({}),FacetField=function(FacetField){return FacetField.AccessTypes="accessTypes",FacetField.CanAlwaysBeLoaned="canAlwaysBeLoaned",FacetField.ChildrenOrAdults="childrenOrAdults",FacetField.Creators="creators",FacetField.Dk5="dk5",FacetField.FictionNonfiction="fictionNonfiction",FacetField.FictionalCharacters="fictionalCharacters",FacetField.GenreAndForm="genreAndForm",FacetField.MainLanguages="mainLanguages",FacetField.MaterialTypesGeneral="materialTypesGeneral",FacetField.MaterialTypesSpecific="materialTypesSpecific",FacetField.Subjects="subjects",FacetField.WorkTypes="workTypes",FacetField.Year="year",FacetField}({}),HoldingsStatus=function(HoldingsStatus){return HoldingsStatus.OnLoan="OnLoan",HoldingsStatus.OnShelf="OnShelf",HoldingsStatus}({}),SubjectType=function(SubjectType){return SubjectType.Corporation="CORPORATION",SubjectType.FictionalCharacter="FICTIONAL_CHARACTER",SubjectType.FilmNationality="FILM_NATIONALITY",SubjectType.Laesekompasset="LAESEKOMPASSET",SubjectType.LibraryOfCongressSubjectHeading="LIBRARY_OF_CONGRESS_SUBJECT_HEADING",SubjectType.Location="LOCATION",SubjectType.MedicalSubjectHeading="MEDICAL_SUBJECT_HEADING",SubjectType.MusicalInstrumentation="MUSICAL_INSTRUMENTATION",SubjectType.MusicCountryOfOrigin="MUSIC_COUNTRY_OF_ORIGIN",SubjectType.MusicTimePeriod="MUSIC_TIME_PERIOD",SubjectType.NationalAgriculturalLibrary="NATIONAL_AGRICULTURAL_LIBRARY",SubjectType.Person="PERSON",SubjectType.TimePeriod="TIME_PERIOD",SubjectType.Title="TITLE",SubjectType.Topic="TOPIC",SubjectType}({}),SubmitOrderStatus=function(SubmitOrderStatus){return SubmitOrderStatus.AuthenticationError="AUTHENTICATION_ERROR",SubmitOrderStatus.BorchkUserBlockedByAgency="BORCHK_USER_BLOCKED_BY_AGENCY",SubmitOrderStatus.BorchkUserNotVerified="BORCHK_USER_NOT_VERIFIED",SubmitOrderStatus.BorchkUserNoLongerExistOnAgency="BORCHK_USER_NO_LONGER_EXIST_ON_AGENCY",SubmitOrderStatus.InvalidOrder="INVALID_ORDER",SubmitOrderStatus.NotOwnedIllLoc="NOT_OWNED_ILL_LOC",SubmitOrderStatus.NotOwnedNoIllLoc="NOT_OWNED_NO_ILL_LOC",SubmitOrderStatus.NotOwnedWrongIllMediumtype="NOT_OWNED_WRONG_ILL_MEDIUMTYPE",SubmitOrderStatus.NoServicerequester="NO_SERVICEREQUESTER",SubmitOrderStatus.OrsError="ORS_ERROR",SubmitOrderStatus.OwnedAccepted="OWNED_ACCEPTED",SubmitOrderStatus.OwnedOwnCatalogue="OWNED_OWN_CATALOGUE",SubmitOrderStatus.OwnedWrongMediumtype="OWNED_WRONG_MEDIUMTYPE",SubmitOrderStatus.ServiceUnavailable="SERVICE_UNAVAILABLE",SubmitOrderStatus.UnknownError="UNKNOWN_ERROR",SubmitOrderStatus.UnknownPickupagency="UNKNOWN_PICKUPAGENCY",SubmitOrderStatus.UnknownUser="UNKNOWN_USER",SubmitOrderStatus}({}),SuggestionType=function(SuggestionType){return SuggestionType.Composit="COMPOSIT",SuggestionType.Creator="CREATOR",SuggestionType.Subject="SUBJECT",SuggestionType.Title="TITLE",SuggestionType}({}),WorkType=function(WorkType){return WorkType.Analysis="ANALYSIS",WorkType.Article="ARTICLE",WorkType.Bookdescription="BOOKDESCRIPTION",WorkType.Game="GAME",WorkType.Literature="LITERATURE",WorkType.Map="MAP",WorkType.Movie="MOVIE",WorkType.Music="MUSIC",WorkType.Other="OTHER",WorkType.Periodica="PERIODICA",WorkType.Portrait="PORTRAIT",WorkType.Review="REVIEW",WorkType.Sheetmusic="SHEETMUSIC",WorkType.Track="TRACK",WorkType}({});const WithLanguagesFragmentDoc="\n fragment WithLanguages on Manifestation {\n languages {\n main {\n display\n isoCode\n }\n }\n}\n ",ManifestationBasicDetailsFragmentDoc=`\n fragment ManifestationBasicDetails on Manifestation {\n ...WithLanguages\n pid\n titles {\n full\n }\n abstract\n materialTypes {\n specific\n }\n creators {\n display\n }\n edition {\n publicationYear {\n display\n }\n }\n series {\n title\n numberInSeries {\n number\n }\n }\n}\n ${WithLanguagesFragmentDoc}`,WorkSmallFragmentDoc=`\n fragment WorkSmall on Work {\n workId\n titles {\n full\n original\n }\n abstract\n creators {\n display\n __typename\n }\n series {\n ...SeriesSimple\n }\n seriesMembers {\n workId\n titles {\n main\n full\n original\n }\n }\n workYear {\n year\n }\n genreAndForm\n manifestations {\n ...ManifestationsSimple\n }\n}\n \n fragment SeriesSimple on Series {\n title\n isPopular\n numberInSeries {\n display\n number\n }\n readThisFirst\n readThisWhenever\n}\n \n${`\n fragment ManifestationsSimple on Manifestations {\n all {\n ...ManifestationsSimpleFields\n }\n latest {\n ...ManifestationsSimpleFields\n }\n bestRepresentation {\n ...ManifestationsSimpleFields\n }\n}\n ${`\n fragment ManifestationsSimpleFields on Manifestation {\n pid\n genreAndForm\n source\n ...WithLanguages\n titles {\n main\n original\n }\n fictionNonfiction {\n display\n code\n }\n materialTypes {\n specific\n }\n creators {\n display\n __typename\n }\n publisher\n identifiers {\n value\n }\n contributors {\n display\n }\n edition {\n summary\n publicationYear {\n display\n }\n }\n dateFirstEdition {\n display\n year\n }\n audience {\n generalAudience\n }\n physicalDescriptions {\n numberOfPages\n playingTime\n }\n materialTypes {\n specific\n }\n accessTypes {\n code\n }\n access {\n __typename\n ... on AccessUrl {\n origin\n url\n loginRequired\n }\n ... on InfomediaService {\n id\n }\n ... on InterLibraryLoan {\n loanIsPossible\n }\n ... on Ereol {\n origin\n url\n canAlwaysBeLoaned\n }\n ... on DigitalArticleService {\n issn\n }\n }\n shelfmark {\n postfix\n shelfmark\n }\n workYear {\n year\n }\n catalogueCodes {\n nationalBibliography\n otherCatalogues\n }\n}\n ${WithLanguagesFragmentDoc}`}`}`,GetSmallWorkDocument=`\n query getSmallWork($id: String!) {\n work(id: $id) {\n ...WorkSmall\n }\n}\n ${WorkSmallFragmentDoc}`,useGetSmallWorkQuery=(variables,options)=>(0,es.useQuery)(["getSmallWork",variables],fetcher(GetSmallWorkDocument,variables),options),GetManifestationViaMaterialByFaustDocument=`\n query getManifestationViaMaterialByFaust($faust: String!) {\n manifestation(faust: $faust) {\n ...ManifestationBasicDetails\n }\n}\n ${ManifestationBasicDetailsFragmentDoc}`,useGetManifestationViaMaterialByFaustQuery=(variables,options)=>(0,es.useQuery)(["getManifestationViaMaterialByFaust",variables],fetcher(GetManifestationViaMaterialByFaustDocument,variables),options),GetManifestationViaBestRepresentationByFaustDocument=`\n query getManifestationViaBestRepresentationByFaust($faust: String!) {\n manifestation(faust: $faust) {\n ownerWork {\n manifestations {\n bestRepresentation {\n ...ManifestationBasicDetails\n }\n }\n }\n }\n}\n ${ManifestationBasicDetailsFragmentDoc}`,useGetManifestationViaBestRepresentationByFaustQuery=(variables,options)=>(0,es.useQuery)(["getManifestationViaBestRepresentationByFaust",variables],fetcher(GetManifestationViaBestRepresentationByFaustDocument,variables),options),GetMaterialDocument=`\n query getMaterial($wid: String!) {\n work(id: $wid) {\n ...WorkMedium\n }\n}\n ${`\n fragment WorkMedium on Work {\n ...WorkSmall\n materialTypes {\n specific\n }\n mainLanguages {\n display\n isoCode\n }\n subjects {\n all {\n display\n }\n dbcVerified {\n display\n }\n }\n fictionNonfiction {\n display\n code\n }\n dk5MainEntry {\n display\n }\n relations {\n hasReview {\n pid\n }\n hasAdaptation {\n ownerWork {\n workId\n workTypes\n titles {\n main\n }\n }\n }\n }\n}\n ${WorkSmallFragmentDoc}`}`,useGetMaterialQuery=(variables,options)=>(0,es.useQuery)(["getMaterial",variables],fetcher(GetMaterialDocument,variables),options),useGetInfomediaQuery=(variables,options)=>(0,es.useQuery)(["getInfomedia",variables],fetcher("\n query getInfomedia($id: String!) {\n infomedia(id: $id) {\n error\n article {\n headLine\n text\n }\n }\n}\n ",variables),options),useGetReviewManifestationsQuery=(variables,options)=>(0,es.useQuery)(["getReviewManifestations",variables],fetcher("\n query getReviewManifestations($pid: [String!]!) {\n manifestations(pid: $pid) {\n ...ManifestationReviewFields\n }\n}\n \n fragment ManifestationReviewFields on Manifestation {\n pid\n creators {\n display\n }\n access {\n __typename\n ... on InfomediaService {\n id\n }\n ... on DigitalArticleService {\n issn\n }\n ... on AccessUrl {\n url\n origin\n }\n }\n edition {\n publicationYear {\n display\n }\n }\n hostPublication {\n title\n issue\n }\n creators {\n display\n }\n physicalDescriptions {\n summary\n }\n dateFirstEdition {\n display\n }\n workYear {\n display\n }\n review {\n rating\n reviewByLibrarians {\n content\n heading\n type\n manifestations {\n pid\n titles {\n main\n }\n }\n }\n }\n}\n ",variables),options),useOpenOrderMutation=options=>(0,es.useMutation)(["openOrder"],(variables=>fetcher("\n mutation openOrder($input: SubmitOrderInput!) {\n submitOrder(input: $input, dryRun: false) {\n status\n message\n orderId\n }\n}\n ",variables)()),options),RecommendFromFaustDocument=`\n query recommendFromFaust($faust: String!, $limit: Int!) {\n recommend(faust: $faust, limit: $limit) {\n result {\n work {\n ...WorkSmall\n }\n }\n }\n}\n ${WorkSmallFragmentDoc}`,useRecommendFromFaustQuery=(variables,options)=>(0,es.useQuery)(["recommendFromFaust",variables],fetcher(RecommendFromFaustDocument,variables),options),SearchWithPaginationDocument=`\n query searchWithPagination($q: SearchQuery!, $offset: Int!, $limit: PaginationLimit!, $filters: SearchFilters) {\n search(q: $q, filters: $filters) {\n hitcount\n works(offset: $offset, limit: $limit) {\n ...WorkSmall\n }\n }\n}\n ${WorkSmallFragmentDoc}`,useSearchWithPaginationQuery=(variables,options)=>(0,es.useQuery)(["searchWithPagination",variables],fetcher(SearchWithPaginationDocument,variables),options),useComplexSearchWithPaginationWorkAccessQuery=(variables,options)=>(0,es.useQuery)(["complexSearchWithPaginationWorkAccess",variables],fetcher("\n query complexSearchWithPaginationWorkAccess($cql: String!, $offset: Int!, $limit: PaginationLimit!, $filters: ComplexSearchFilters!) {\n complexSearch(cql: $cql, filters: $filters) {\n hitcount\n works(offset: $offset, limit: $limit) {\n ...WorkAccess\n }\n }\n}\n \n fragment WorkAccess on Work {\n workId\n manifestations {\n ...ManifestationsAccess\n }\n}\n \n fragment ManifestationsAccess on Manifestations {\n all {\n pid\n identifiers {\n type\n value\n }\n access {\n __typename\n ... on AccessUrl {\n origin\n url\n loginRequired\n }\n ... on InfomediaService {\n id\n }\n ... on InterLibraryLoan {\n loanIsPossible\n }\n ... on Ereol {\n origin\n url\n canAlwaysBeLoaned\n }\n ... on DigitalArticleService {\n issn\n }\n }\n }\n}\n ",variables),options),ComplexSearchWithPaginationDocument=`\n query complexSearchWithPagination($cql: String!, $offset: Int!, $limit: PaginationLimit!, $filters: ComplexSearchFilters!) {\n complexSearch(cql: $cql, filters: $filters) {\n hitcount\n works(offset: $offset, limit: $limit) {\n ...WorkSmall\n }\n }\n}\n ${WorkSmallFragmentDoc}`,useComplexSearchWithPaginationQuery=(variables,options)=>(0,es.useQuery)(["complexSearchWithPagination",variables],fetcher(ComplexSearchWithPaginationDocument,variables),options),SuggestionsFromQueryStringDocument=`\n query suggestionsFromQueryString($q: String!) {\n suggest(q: $q) {\n result {\n type\n term\n work {\n workId\n titles {\n main\n }\n creators {\n display\n }\n manifestations {\n bestRepresentation {\n pid\n ...WithLanguages\n }\n }\n }\n }\n }\n}\n ${WithLanguagesFragmentDoc}`,useSuggestionsFromQueryStringQuery=(variables,options)=>(0,es.useQuery)(["suggestionsFromQueryString",variables],fetcher(SuggestionsFromQueryStringDocument,variables),options),useSearchFacetQuery=(variables,options)=>(0,es.useQuery)(["searchFacet",variables],fetcher("\n query searchFacet($q: SearchQuery!, $facets: [FacetField!]!, $facetLimit: Int!, $filters: SearchFilters) {\n search(q: $q, filters: $filters) {\n facets(facets: $facets) {\n name\n values(limit: $facetLimit) {\n key\n term\n score\n }\n }\n }\n}\n ",variables),options),useIntelligentFacetsQuery=(variables,options)=>(0,es.useQuery)(["intelligentFacets",variables],fetcher("\n query intelligentFacets($q: SearchQuery!, $facetsLimit: Int!, $valuesLimit: Int!, $filters: SearchFilters!) {\n search(q: $q, filters: $filters) {\n intelligentFacets(limit: $facetsLimit) {\n name\n values(limit: $valuesLimit) {\n key\n term\n score\n }\n }\n }\n}\n ",variables),options),usePlaceCopyMutation=options=>(0,es.useMutation)(["placeCopy"],(variables=>fetcher("\n mutation placeCopy($input: CopyRequestInput!) {\n elba {\n placeCopyRequest(input: $input) {\n status\n }\n }\n}\n ",variables)()),options);try{FacetField.displayName="FacetField",FacetField.__docgenInfo={description:"The supported facet fields",displayName:"FacetField",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/dbc-gateway/generated/graphql.tsx#FacetField"]={docgenInfo:FacetField.__docgenInfo,name:"FacetField",path:"src/core/dbc-gateway/generated/graphql.tsx#FacetField"})}catch(__react_docgen_typescript_loader_error){}try{HoldingsStatus.OnLoan.displayName="HoldingsStatus.OnLoan",HoldingsStatus.OnLoan.__docgenInfo={description:"Holding is on loan",displayName:"HoldingsStatus.OnLoan",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/dbc-gateway/generated/graphql.tsx#HoldingsStatus.OnLoan"]={docgenInfo:HoldingsStatus.OnLoan.__docgenInfo,name:"HoldingsStatus.OnLoan",path:"src/core/dbc-gateway/generated/graphql.tsx#HoldingsStatus.OnLoan"})}catch(__react_docgen_typescript_loader_error){}try{HoldingsStatus.OnShelf.displayName="HoldingsStatus.OnShelf",HoldingsStatus.OnShelf.__docgenInfo={description:"Holding is physically available at the branch",displayName:"HoldingsStatus.OnShelf",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/dbc-gateway/generated/graphql.tsx#HoldingsStatus.OnShelf"]={docgenInfo:HoldingsStatus.OnShelf.__docgenInfo,name:"HoldingsStatus.OnShelf",path:"src/core/dbc-gateway/generated/graphql.tsx#HoldingsStatus.OnShelf"})}catch(__react_docgen_typescript_loader_error){}try{SubjectType.Person.displayName="SubjectType.Person",SubjectType.Person.__docgenInfo={description:"added for manifestation.parts.creators/person - they get a type from small-rye",displayName:"SubjectType.Person",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/dbc-gateway/generated/graphql.tsx#SubjectType.Person"]={docgenInfo:SubjectType.Person.__docgenInfo,name:"SubjectType.Person",path:"src/core/dbc-gateway/generated/graphql.tsx#SubjectType.Person"})}catch(__react_docgen_typescript_loader_error){}try{SubmitOrderStatus.AuthenticationError.displayName="SubmitOrderStatus.AuthenticationError",SubmitOrderStatus.AuthenticationError.__docgenInfo={description:"Authentication error",displayName:"SubmitOrderStatus.AuthenticationError",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.AuthenticationError"]={docgenInfo:SubmitOrderStatus.AuthenticationError.__docgenInfo,name:"SubmitOrderStatus.AuthenticationError",path:"src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.AuthenticationError"})}catch(__react_docgen_typescript_loader_error){}try{SubmitOrderStatus.BorchkUserBlockedByAgency.displayName="SubmitOrderStatus.BorchkUserBlockedByAgency",SubmitOrderStatus.BorchkUserBlockedByAgency.__docgenInfo={description:"Borchk: User is blocked by agency",displayName:"SubmitOrderStatus.BorchkUserBlockedByAgency",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.BorchkUserBlockedByAgency"]={docgenInfo:SubmitOrderStatus.BorchkUserBlockedByAgency.__docgenInfo,name:"SubmitOrderStatus.BorchkUserBlockedByAgency",path:"src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.BorchkUserBlockedByAgency"})}catch(__react_docgen_typescript_loader_error){}try{SubmitOrderStatus.BorchkUserNotVerified.displayName="SubmitOrderStatus.BorchkUserNotVerified",SubmitOrderStatus.BorchkUserNotVerified.__docgenInfo={description:"Borchk: User could not be verified",displayName:"SubmitOrderStatus.BorchkUserNotVerified",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.BorchkUserNotVerified"]={docgenInfo:SubmitOrderStatus.BorchkUserNotVerified.__docgenInfo,name:"SubmitOrderStatus.BorchkUserNotVerified",path:"src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.BorchkUserNotVerified"})}catch(__react_docgen_typescript_loader_error){}try{SubmitOrderStatus.BorchkUserNoLongerExistOnAgency.displayName="SubmitOrderStatus.BorchkUserNoLongerExistOnAgency",SubmitOrderStatus.BorchkUserNoLongerExistOnAgency.__docgenInfo={description:"Borchk: User is no longer loaner at the provided pickupbranch",displayName:"SubmitOrderStatus.BorchkUserNoLongerExistOnAgency",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.BorchkUserNoLongerExistOnAgency"]={docgenInfo:SubmitOrderStatus.BorchkUserNoLongerExistOnAgency.__docgenInfo,name:"SubmitOrderStatus.BorchkUserNoLongerExistOnAgency",path:"src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.BorchkUserNoLongerExistOnAgency"})}catch(__react_docgen_typescript_loader_error){}try{SubmitOrderStatus.InvalidOrder.displayName="SubmitOrderStatus.InvalidOrder",SubmitOrderStatus.InvalidOrder.__docgenInfo={description:"Order does not validate",displayName:"SubmitOrderStatus.InvalidOrder",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.InvalidOrder"]={docgenInfo:SubmitOrderStatus.InvalidOrder.__docgenInfo,name:"SubmitOrderStatus.InvalidOrder",path:"src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.InvalidOrder"})}catch(__react_docgen_typescript_loader_error){}try{SubmitOrderStatus.NotOwnedIllLoc.displayName="SubmitOrderStatus.NotOwnedIllLoc",SubmitOrderStatus.NotOwnedIllLoc.__docgenInfo={description:"Item not available at pickupAgency, item localised for ILL",displayName:"SubmitOrderStatus.NotOwnedIllLoc",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.NotOwnedIllLoc"]={docgenInfo:SubmitOrderStatus.NotOwnedIllLoc.__docgenInfo,name:"SubmitOrderStatus.NotOwnedIllLoc",path:"src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.NotOwnedIllLoc"})}catch(__react_docgen_typescript_loader_error){}try{SubmitOrderStatus.NotOwnedNoIllLoc.displayName="SubmitOrderStatus.NotOwnedNoIllLoc",SubmitOrderStatus.NotOwnedNoIllLoc.__docgenInfo={description:"Item not available at pickupAgency, item not localised for ILL",displayName:"SubmitOrderStatus.NotOwnedNoIllLoc",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.NotOwnedNoIllLoc"]={docgenInfo:SubmitOrderStatus.NotOwnedNoIllLoc.__docgenInfo,name:"SubmitOrderStatus.NotOwnedNoIllLoc",path:"src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.NotOwnedNoIllLoc"})}catch(__react_docgen_typescript_loader_error){}try{SubmitOrderStatus.NotOwnedWrongIllMediumtype.displayName="SubmitOrderStatus.NotOwnedWrongIllMediumtype",SubmitOrderStatus.NotOwnedWrongIllMediumtype.__docgenInfo={description:"Item not available at pickupAgency, ILL of mediumType not accepted",displayName:"SubmitOrderStatus.NotOwnedWrongIllMediumtype",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.NotOwnedWrongIllMediumtype"]={docgenInfo:SubmitOrderStatus.NotOwnedWrongIllMediumtype.__docgenInfo,name:"SubmitOrderStatus.NotOwnedWrongIllMediumtype",path:"src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.NotOwnedWrongIllMediumtype"})}catch(__react_docgen_typescript_loader_error){}try{SubmitOrderStatus.NoServicerequester.displayName="SubmitOrderStatus.NoServicerequester",SubmitOrderStatus.NoServicerequester.__docgenInfo={description:"ServiceRequester is obligatory",displayName:"SubmitOrderStatus.NoServicerequester",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.NoServicerequester"]={docgenInfo:SubmitOrderStatus.NoServicerequester.__docgenInfo,name:"SubmitOrderStatus.NoServicerequester",path:"src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.NoServicerequester"})}catch(__react_docgen_typescript_loader_error){}try{SubmitOrderStatus.OrsError.displayName="SubmitOrderStatus.OrsError",SubmitOrderStatus.OrsError.__docgenInfo={description:"Error sending order to ORS",displayName:"SubmitOrderStatus.OrsError",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.OrsError"]={docgenInfo:SubmitOrderStatus.OrsError.__docgenInfo,name:"SubmitOrderStatus.OrsError",path:"src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.OrsError"})}catch(__react_docgen_typescript_loader_error){}try{SubmitOrderStatus.OwnedAccepted.displayName="SubmitOrderStatus.OwnedAccepted",SubmitOrderStatus.OwnedAccepted.__docgenInfo={description:"Item available at pickupAgency, order accepted",displayName:"SubmitOrderStatus.OwnedAccepted",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.OwnedAccepted"]={docgenInfo:SubmitOrderStatus.OwnedAccepted.__docgenInfo,name:"SubmitOrderStatus.OwnedAccepted",path:"src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.OwnedAccepted"})}catch(__react_docgen_typescript_loader_error){}try{SubmitOrderStatus.OwnedOwnCatalogue.displayName="SubmitOrderStatus.OwnedOwnCatalogue",SubmitOrderStatus.OwnedOwnCatalogue.__docgenInfo={description:"Item available at pickupAgency, item may be ordered through the library's catalogue",displayName:"SubmitOrderStatus.OwnedOwnCatalogue",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.OwnedOwnCatalogue"]={docgenInfo:SubmitOrderStatus.OwnedOwnCatalogue.__docgenInfo,name:"SubmitOrderStatus.OwnedOwnCatalogue",path:"src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.OwnedOwnCatalogue"})}catch(__react_docgen_typescript_loader_error){}try{SubmitOrderStatus.OwnedWrongMediumtype.displayName="SubmitOrderStatus.OwnedWrongMediumtype",SubmitOrderStatus.OwnedWrongMediumtype.__docgenInfo={description:"Item available at pickupAgency, order of mediumType not accepted",displayName:"SubmitOrderStatus.OwnedWrongMediumtype",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.OwnedWrongMediumtype"]={docgenInfo:SubmitOrderStatus.OwnedWrongMediumtype.__docgenInfo,name:"SubmitOrderStatus.OwnedWrongMediumtype",path:"src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.OwnedWrongMediumtype"})}catch(__react_docgen_typescript_loader_error){}try{SubmitOrderStatus.ServiceUnavailable.displayName="SubmitOrderStatus.ServiceUnavailable",SubmitOrderStatus.ServiceUnavailable.__docgenInfo={description:"Service unavailable",displayName:"SubmitOrderStatus.ServiceUnavailable",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.ServiceUnavailable"]={docgenInfo:SubmitOrderStatus.ServiceUnavailable.__docgenInfo,name:"SubmitOrderStatus.ServiceUnavailable",path:"src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.ServiceUnavailable"})}catch(__react_docgen_typescript_loader_error){}try{SubmitOrderStatus.UnknownError.displayName="SubmitOrderStatus.UnknownError",SubmitOrderStatus.UnknownError.__docgenInfo={description:"Unknown error occured, status is unknown",displayName:"SubmitOrderStatus.UnknownError",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.UnknownError"]={docgenInfo:SubmitOrderStatus.UnknownError.__docgenInfo,name:"SubmitOrderStatus.UnknownError",path:"src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.UnknownError"})}catch(__react_docgen_typescript_loader_error){}try{SubmitOrderStatus.UnknownPickupagency.displayName="SubmitOrderStatus.UnknownPickupagency",SubmitOrderStatus.UnknownPickupagency.__docgenInfo={description:"PickupAgency not found",displayName:"SubmitOrderStatus.UnknownPickupagency",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.UnknownPickupagency"]={docgenInfo:SubmitOrderStatus.UnknownPickupagency.__docgenInfo,name:"SubmitOrderStatus.UnknownPickupagency",path:"src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.UnknownPickupagency"})}catch(__react_docgen_typescript_loader_error){}try{SubmitOrderStatus.UnknownUser.displayName="SubmitOrderStatus.UnknownUser",SubmitOrderStatus.UnknownUser.__docgenInfo={description:"User not found",displayName:"SubmitOrderStatus.UnknownUser",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.UnknownUser"]={docgenInfo:SubmitOrderStatus.UnknownUser.__docgenInfo,name:"SubmitOrderStatus.UnknownUser",path:"src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.UnknownUser"})}catch(__react_docgen_typescript_loader_error){}try{useOpenOrderMutation.displayName="useOpenOrderMutation",useOpenOrderMutation.__docgenInfo={description:"",displayName:"useOpenOrderMutation",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/dbc-gateway/generated/graphql.tsx#useOpenOrderMutation"]={docgenInfo:useOpenOrderMutation.__docgenInfo,name:"useOpenOrderMutation",path:"src/core/dbc-gateway/generated/graphql.tsx#useOpenOrderMutation"})}catch(__react_docgen_typescript_loader_error){}try{usePlaceCopyMutation.displayName="usePlaceCopyMutation",usePlaceCopyMutation.__docgenInfo={description:"",displayName:"usePlaceCopyMutation",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/dbc-gateway/generated/graphql.tsx#usePlaceCopyMutation"]={docgenInfo:usePlaceCopyMutation.__docgenInfo,name:"usePlaceCopyMutation",path:"src/core/dbc-gateway/generated/graphql.tsx#usePlaceCopyMutation"})}catch(__react_docgen_typescript_loader_error){}},"./src/core/dpl-cms/dpl-cms.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{by:()=>useCampaignMatchPOST,Yh:()=>useProxyUrlGET});var es=__webpack_require__("./node_modules/react-query/es/index.js"),FetchFailedError=__webpack_require__("./src/core/fetchers/FetchFailedError.ts"),helpers=__webpack_require__("./src/core/fetchers/helpers.ts"),core_token=__webpack_require__("./src/core/token.js"),extractServiceBaseUrls=__webpack_require__("./src/core/utils/reduxMiddleware/extractServiceBaseUrls.ts"),FetcherHttpError=__webpack_require__("./src/core/fetchers/FetcherHttpError.ts");function _defineProperty(obj,key,value){return(key=function _toPropertyKey(t){var i=function _toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==typeof i?i:String(i)}(key))in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}class DplCmsServiceHttpError extends FetcherHttpError.Z{constructor(...args){super(...args),_defineProperty(this,"name","DplCmsServiceHttpError")}}const fetcher=async({url,method,headers,params,data})=>{const token=(0,core_token.LP)(core_token.b4)??(0,core_token.LP)(core_token.t8),authHeaders=token?{Authorization:`Bearer ${token}`}:{},body=data?JSON.stringify(data):null,serviceUrl=(0,helpers._o)({baseUrl:(0,extractServiceBaseUrls.fG)(extractServiceBaseUrls.PS.dplCms),url,params});try{const response=await fetch(serviceUrl,{method,headers:{...headers,...authHeaders},body});if(!response.ok)throw new DplCmsServiceHttpError(response.status,response.statusText,serviceUrl);try{return await response.json()}catch(e){if(!(e instanceof SyntaxError))throw e}}catch(error){if(error instanceof DplCmsServiceHttpError)throw error;const message=error instanceof Error?error.message:"Unknown error";throw new FetchFailedError.Z(message,serviceUrl)}return null},useCampaignMatchPOST=options=>{const{mutation:mutationOptions}=options??{};return(0,es.useMutation)((props=>{const{data,params}=props??{};return((campaignMatchPOSTBodyItem,params)=>fetcher({url:"/dpl_campaign/match",method:"post",headers:{"Content-Type":"application/json"},data:campaignMatchPOSTBodyItem,params}))(data,params)}),mutationOptions)},useProxyUrlGET=(params,queryOptions)=>{const queryKey=(null==queryOptions?void 0:queryOptions.queryKey)??(params=>["/dpl-url-proxy",...params?[params]:[]])(params),query=(0,es.useQuery)(queryKey,(({signal})=>((params,signal)=>fetcher({url:"/dpl-url-proxy",method:"get",signal,params}))(params)),queryOptions);return{queryKey,...query}}},"./src/core/errors/InvalidUrlError.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";function _defineProperty(obj,key,value){return(key=function _toPropertyKey(t){var i=function _toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==typeof i?i:String(i)}(key))in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}__webpack_require__.d(__webpack_exports__,{Z:()=>InvalidUrlError});class InvalidUrlError extends Error{constructor(message,context){super(message),this.message=message,this.context=context,_defineProperty(this,"useErrorBoundary",!1),_defineProperty(this,"name","InvalidUrlError")}}},"./src/core/fbs/fbs.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{AG:()=>getAvailabilityV3,OL:()=>getGetHoldingsV3QueryKey,_0:()=>getGetLoansV2QueryKey,Tk:()=>getGetPatronInformationByPatronIdV2QueryKey,Jp:()=>getGetReservationsV2QueryKey,kd:()=>useAddReservationsV2,RI:()=>useCreateV4,a4:()=>useDeleteReservations,DP:()=>useGetAvailabilityV3,CI:()=>useGetFeesV2,T8:()=>useGetHoldingsV3,n1:()=>useGetLoansV2,wK:()=>useGetPatronInformationByPatronIdV2,U:()=>useGetReservationsV2,Gb:()=>useRenewLoansV2,OE:()=>useUpdateReservations,tX:()=>useUpdateV5});var es=__webpack_require__("./node_modules/react-query/es/index.js"),FetchFailedCriticalError=__webpack_require__("./src/core/fetchers/FetchFailedCriticalError.ts"),helpers=__webpack_require__("./src/core/fetchers/helpers.ts"),core_token=__webpack_require__("./src/core/token.js"),extractServiceBaseUrls=__webpack_require__("./src/core/utils/reduxMiddleware/extractServiceBaseUrls.ts"),FetcherCriticalHttpError=__webpack_require__("./src/core/fetchers/FetcherCriticalHttpError.ts");function _defineProperty(obj,key,value){return(key=function _toPropertyKey(t){var i=function _toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==typeof i?i:String(i)}(key))in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}class FbsServiceHttpError extends FetcherCriticalHttpError.Z{constructor(...args){super(...args),_defineProperty(this,"name","FbsServiceHttpError")}}const fetcher_fetcher=async({url,method,headers,params,data})=>{const token=(0,core_token.LP)(core_token.b4)??(0,core_token.LP)(core_token.t8),baseUrl=(0,extractServiceBaseUrls.fG)(extractServiceBaseUrls.PS.fbs),authHeaders=token?{Authorization:`Bearer ${token}`}:{},body=data?JSON.stringify(data):null,serviceUrl=(0,helpers._o)({baseUrl,url,params});try{const response=await fetch(serviceUrl,{method,headers:{...headers,...authHeaders},body});if(!response.ok)throw new FbsServiceHttpError(response.status,response.statusText,serviceUrl);try{return await response.json()}catch(e){if(!(e instanceof SyntaxError))throw e}}catch(error){if(error instanceof FbsServiceHttpError)throw error;const message=error instanceof Error?error.message:"Unknown error";throw new FetchFailedCriticalError.Z(message,serviceUrl)}return null},useDeleteReservations=options=>{const{mutation:mutationOptions}=options??{};return(0,es.useMutation)((props=>{const{params}=props??{};return(params=>fetcher_fetcher({url:"/external/v1/agencyid/patrons/patronid/reservations",method:"delete",params}))(params)}),mutationOptions)},useUpdateReservations=options=>{const{mutation:mutationOptions}=options??{};return(0,es.useMutation)((props=>{const{data}=props??{};return fetcher_fetcher({url:"/external/v1/agencyid/patrons/patronid/reservations",method:"put",headers:{"Content-Type":"application/json"},data})}),mutationOptions)},getGetReservationsV2QueryKey=()=>["/external/v1/agencyid/patrons/patronid/reservations/v2"],useGetReservationsV2=options=>{const{query:queryOptions}=options??{},queryKey=(null==queryOptions?void 0:queryOptions.queryKey)??getGetReservationsV2QueryKey();return{queryKey,...(0,es.useQuery)(queryKey,(({signal})=>(signal=>fetcher_fetcher({url:"/external/v1/agencyid/patrons/patronid/reservations/v2",method:"get",signal}))(signal)),queryOptions)}},useAddReservationsV2=options=>{const{mutation:mutationOptions}=options??{};return(0,es.useMutation)((props=>{const{data}=props??{};return fetcher_fetcher({url:"/external/v1/agencyid/patrons/patronid/reservations/v2",method:"post",headers:{"Content-Type":"application/json"},data})}),mutationOptions)},getAvailabilityV3=(params,signal)=>fetcher_fetcher({url:"/external/agencyid/catalog/availability/v3",method:"get",signal,params}),useGetAvailabilityV3=(params,options)=>{const{query:queryOptions}=options??{},queryKey=(null==queryOptions?void 0:queryOptions.queryKey)??(params=>["/external/agencyid/catalog/availability/v3",...params?[params]:[]])(params);return{queryKey,...(0,es.useQuery)(queryKey,(({signal})=>getAvailabilityV3(params,signal)),queryOptions)}},getGetHoldingsV3QueryKey=params=>["/external/agencyid/catalog/holdings/v3",...params?[params]:[]],useGetHoldingsV3=(params,options)=>{const{query:queryOptions}=options??{},queryKey=(null==queryOptions?void 0:queryOptions.queryKey)??getGetHoldingsV3QueryKey(params),query=(0,es.useQuery)(queryKey,(({signal})=>((params,signal)=>fetcher_fetcher({url:"/external/agencyid/catalog/holdings/v3",method:"get",signal,params}))(params,signal)),queryOptions);return{queryKey,...query}},useGetFeesV2=(params,options)=>{const{query:queryOptions}=options??{},queryKey=(null==queryOptions?void 0:queryOptions.queryKey)??(params=>["/external/agencyid/patron/patronid/fees/v2",...params?[params]:[]])(params),query=(0,es.useQuery)(queryKey,(({signal})=>((params,signal)=>fetcher_fetcher({url:"/external/agencyid/patron/patronid/fees/v2",method:"get",signal,params}))(params,signal)),queryOptions);return{queryKey,...query}},useCreateV4=options=>{const{mutation:mutationOptions}=options??{};return(0,es.useMutation)((props=>{const{data}=props??{};return fetcher_fetcher({url:"/external/agencyid/patrons/v4",method:"post",headers:{"Content-Type":"application/json"},data})}),mutationOptions)},useRenewLoansV2=options=>{const{mutation:mutationOptions}=options??{};return(0,es.useMutation)((props=>{const{data}=props??{};return fetcher_fetcher({url:"/external/agencyid/patrons/patronid/loans/renew/v2",method:"post",headers:{"Content-Type":"application/json"},data})}),mutationOptions)},getGetLoansV2QueryKey=()=>["/external/agencyid/patrons/patronid/loans/v2"],useGetLoansV2=options=>{const{query:queryOptions}=options??{},queryKey=(null==queryOptions?void 0:queryOptions.queryKey)??getGetLoansV2QueryKey();return{queryKey,...(0,es.useQuery)(queryKey,(({signal})=>(signal=>fetcher_fetcher({url:"/external/agencyid/patrons/patronid/loans/v2",method:"get",signal}))(signal)),queryOptions)}},getGetPatronInformationByPatronIdV2QueryKey=()=>["/external/agencyid/patrons/patronid/v2"],useGetPatronInformationByPatronIdV2=queryOptions=>{const queryKey=(null==queryOptions?void 0:queryOptions.queryKey)??getGetPatronInformationByPatronIdV2QueryKey();return{queryKey,...(0,es.useQuery)(queryKey,(({signal})=>(signal=>fetcher_fetcher({url:"/external/agencyid/patrons/patronid/v2",method:"get",signal}))()),queryOptions)}},useUpdateV5=options=>{const{mutation:mutationOptions}=options??{};return(0,es.useMutation)((props=>{const{data}=props??{};return fetcher_fetcher({url:"/external/agencyid/patrons/patronid/v5",method:"put",headers:{"Content-Type":"application/json"},data})}),mutationOptions)}},"./src/core/fetchers/FetchFailedCriticalError.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>FetchFailedCriticalError});var _FetcherError__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/core/fetchers/FetcherError.ts");function _defineProperty(obj,key,value){return(key=function _toPropertyKey(t){var i=function _toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==typeof i?i:String(i)}(key))in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}class FetchFailedCriticalError extends _FetcherError__WEBPACK_IMPORTED_MODULE_0__.Z{constructor(message,context){super(message),_defineProperty(this,"context",void 0),_defineProperty(this,"name","FetchFailedCriticalError"),_defineProperty(this,"useErrorBoundary",!0),this.context=context}}},"./src/core/fetchers/FetchFailedError.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>FetchFailedError});var _FetcherError__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/core/fetchers/FetcherError.ts");function _defineProperty(obj,key,value){return(key=function _toPropertyKey(t){var i=function _toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==typeof i?i:String(i)}(key))in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}class FetchFailedError extends _FetcherError__WEBPACK_IMPORTED_MODULE_0__.Z{constructor(message,context){super(message),_defineProperty(this,"context",void 0),_defineProperty(this,"name","FetchFailedError"),_defineProperty(this,"useErrorBoundary",!1),this.context=context}}},"./src/core/fetchers/FetcherCriticalHttpError.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>FetcherCriticalHttpError});var _utils_errors_HttpError__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/core/utils/errors/HttpError.ts");function _defineProperty(obj,key,value){return(key=function _toPropertyKey(t){var i=function _toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==typeof i?i:String(i)}(key))in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}class FetcherCriticalHttpError extends _utils_errors_HttpError__WEBPACK_IMPORTED_MODULE_0__.Z{constructor(status,message,context){super(status,message,context),this.status=status,this.message=message,this.context=context,_defineProperty(this,"useErrorBoundary",!0)}}},"./src/core/fetchers/FetcherError.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";function _defineProperty(obj,key,value){return(key=function _toPropertyKey(t){var i=function _toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==typeof i?i:String(i)}(key))in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}__webpack_require__.d(__webpack_exports__,{Z:()=>FetcherError});class FetcherError extends Error{constructor(message,context){super(message),this.message=message,this.context=context,_defineProperty(this,"name","FetcherError")}}},"./src/core/fetchers/FetcherHttpError.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>FetcherHttpError});var _utils_errors_HttpError__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/core/utils/errors/HttpError.ts");function _defineProperty(obj,key,value){return(key=function _toPropertyKey(t){var i=function _toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==typeof i?i:String(i)}(key))in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}class FetcherHttpError extends _utils_errors_HttpError__WEBPACK_IMPORTED_MODULE_0__.Z{constructor(status,message,context){super(status,message,context),this.status=status,this.message=message,this.context=context,_defineProperty(this,"useErrorBoundary",!1)}}},"./src/core/fetchers/helpers.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{_o:()=>getServiceUrlWithParams});const getServiceUrlWithParams=({baseUrl,url,params})=>{const urlParams=params?`?${(data=>{let params;return"string"==typeof data||void 0===data?params=new URLSearchParams(data):(params=new URLSearchParams,Object.entries(data).forEach((([key,value])=>{Array.isArray(value)?value.forEach((inner=>{params.append(key,inner.toString())})):params.append(key,value.toString())}))),params})(params)}`:"";return`${baseUrl}${url}${urlParams}`}},"./src/core/filter.slice.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{IH:()=>add,Od:()=>remove,ZH:()=>clear,ZP:()=>__WEBPACK_DEFAULT_EXPORT__});var _reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/@reduxjs/toolkit/dist/redux-toolkit.esm.js");const initialState={},filterState=(0,_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_0__.oM)({name:"filter",initialState,reducers:{add(state,action){const{facet,term}=action.payload;return{...state,[facet]:{...state[facet],[term.term]:term}}},remove(state,action){const{facet,term}=action.payload,selectedFacet={...state[facet]};if(delete selectedFacet[term.term],0===Object.keys(selectedFacet).length){const stateCopy={...state};return delete stateCopy[facet],stateCopy}return{...state,[facet]:selectedFacet}},clear:()=>initialState}}),{add,remove,clear}=filterState.actions,__WEBPACK_DEFAULT_EXPORT__=filterState.reducer},"./src/core/guardedRequests.slice.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Bs:()=>guardedRequest,SF:()=>AUTH_PARAM,ZP:()=>__WEBPACK_DEFAULT_EXPORT__,fG:()=>reRunRequest,qC:()=>hasRequestExpired,yQ:()=>removeRequest});var _reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./node_modules/@reduxjs/toolkit/dist/redux-toolkit.esm.js"),_material_list_api_material_list__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/core/material-list-api/material-list.ts"),_store__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/core/store.ts"),_utils_helpers_date__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/core/utils/helpers/date.ts"),_utils_helpers_url__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./src/core/utils/helpers/url.ts"),_utils_helpers_user__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/core/utils/helpers/user.ts");const AUTH_PARAM="didAuthenticate",requestCallbacks={addFavorite:({id})=>(0,_material_list_api_material_list__WEBPACK_IMPORTED_MODULE_0__.jX)("default",id)},hasRequestExpired=({expire})=>!expire||(0,_utils_helpers_date__WEBPACK_IMPORTED_MODULE_2__.ZP)()>expire,guardedRequests=(0,_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_4__.oM)({name:"guardedRequests",initialState:{request:null},reducers:{addRequest(state,action){const{payload:request}=action;null!=request&&request.expire||(request.expire=(0,_utils_helpers_date__WEBPACK_IMPORTED_MODULE_2__.ZP)()+60),state.request=request},removeRequest(state){state.request=null}}}),{addRequest,removeRequest}=guardedRequests.actions,getRequestCallback=type=>null==requestCallbacks?void 0:requestCallbacks[type],requestCallbackExists=type=>Boolean(getRequestCallback(type)),guardedRequest=(0,_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_4__.hg)("guardedRequests/performRequest",(async(requestItem,{dispatch,fulfillWithValue,getState})=>{const{type,args}=requestItem;if(!requestCallbackExists(type))return fulfillWithValue({status:"ignored",message:"Nothing to do"});(0,_utils_helpers_user__WEBPACK_IMPORTED_MODULE_3__.TF)()&&(dispatch(addRequest(requestItem)),_store__WEBPACK_IMPORTED_MODULE_1__.Dj.flush().then((()=>{const{authUrl}=(state=>{const{url:{data}}=state;return(0,_utils_helpers_url__WEBPACK_IMPORTED_MODULE_5__.W3)(data)})(getState());if(authUrl){const returnUrl=(0,_utils_helpers_url__WEBPACK_IMPORTED_MODULE_5__.uW)({[AUTH_PARAM]:"1"});(0,_utils_helpers_url__WEBPACK_IMPORTED_MODULE_5__.hN)({authUrl,returnUrl})}}))),console.debug("PERFORMING REQUEST CALLBACK");return getRequestCallback(type)(args)})),reRunRequest=(0,_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_4__.hg)("guardedRequests/reRunRequest",(async(requestItem,{fulfillWithValue})=>{const{type,args}=requestItem;if(requestCallbackExists(type)){const requestCallback=getRequestCallback(type);return console.debug("RERUNNING REQUEST"),requestCallback(args)}return fulfillWithValue({status:"success",message:""})})),__WEBPACK_DEFAULT_EXPORT__=guardedRequests.reducer},"./src/core/material-list-api/material-list.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{jX:()=>addItem,R:()=>getGetListQueryKey,cl:()=>removeItem,YV:()=>useGetList,Sc:()=>useHasItem});var es=__webpack_require__("./node_modules/react-query/es/index.js"),FetchFailedError=__webpack_require__("./src/core/fetchers/FetchFailedError.ts"),helpers=__webpack_require__("./src/core/fetchers/helpers.ts"),token=__webpack_require__("./src/core/token.js"),extractServiceBaseUrls=__webpack_require__("./src/core/utils/reduxMiddleware/extractServiceBaseUrls.ts"),FetcherHttpError=__webpack_require__("./src/core/fetchers/FetcherHttpError.ts");function _defineProperty(obj,key,value){return(key=function _toPropertyKey(t){var i=function _toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==typeof i?i:String(i)}(key))in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}class MaterialListServiceHttpError extends FetcherHttpError.Z{constructor(...args){super(...args),_defineProperty(this,"name","MaterialListServiceHttpError")}}const fetcher=async({url,method,params,data})=>{const additionalHeaders="object"===(null==data?void 0:data.headers)?null==data?void 0:data.headers:{},userToken=(0,token.LP)(token.b4),headers={...userToken?{Authorization:`Bearer ${userToken}`}:{},...additionalHeaders,"Accept-Version":"2"},body=data?JSON.stringify(data):null,serviceUrl=(0,helpers._o)({baseUrl:(0,extractServiceBaseUrls.fG)(extractServiceBaseUrls.PS.materialList),url,params});try{const response=await fetch(serviceUrl,{method,headers,body});if(!response.ok)throw new MaterialListServiceHttpError(response.status,response.statusText,serviceUrl);try{return await response.json()}catch(e){if(!(e instanceof SyntaxError))throw e}}catch(error){if(error instanceof MaterialListServiceHttpError)throw error;const message=error instanceof Error?error.message:"Unknown error";throw new FetchFailedError.Z(message,serviceUrl)}return null},getGetListQueryKey=(listId,params)=>[`/list/${listId}`,...params?[params]:[]],useGetList=(listId,params,options)=>{const{query:queryOptions}=options??{},queryKey=(null==queryOptions?void 0:queryOptions.queryKey)??getGetListQueryKey(listId,params),query=(0,es.useQuery)(queryKey,(({signal})=>((listId,params,signal)=>fetcher({url:`/list/${listId}`,method:"get",signal,params}))(listId,params,signal)),{enabled:!!listId,...queryOptions});return{queryKey,...query}},useHasItem=options=>{const{mutation:mutationOptions}=options??{};return(0,es.useMutation)((props=>{const{listId,itemId}=props??{};return((listId,itemId,signal)=>fetcher({url:`/list/${listId}/${itemId}`,method:"head",signal}))(listId,itemId)}),mutationOptions)},addItem=(listId,itemId)=>fetcher({url:`/list/${listId}/${itemId}`,method:"put"}),removeItem=(listId,itemId)=>fetcher({url:`/list/${listId}/${itemId}`,method:"delete"})},"./src/core/modal.slice.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Mr:()=>closeModal,ZP:()=>__WEBPACK_DEFAULT_EXPORT__,h7:()=>openModal,jQ:()=>closeLastModal,pT:()=>closeAllModals});var _reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/@reduxjs/toolkit/dist/redux-toolkit.esm.js"),_utils_helpers_url__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/core/utils/helpers/url.ts");const focusContainerArray=[],returnFocusElement=()=>{const element=focusContainerArray.pop();return element&&element.focus(),element},removeModalIdFromUrl=state=>{var _state$modalIds;let newModalParam="?";""!==(null===(_state$modalIds=state.modalIds)||void 0===_state$modalIds?void 0:_state$modalIds.toString())&&(newModalParam=`?modal=${state.modalIds.toString()}`),window.history.pushState("","",newModalParam)},modalSlice=(0,_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_0__.oM)({name:"modal",initialState:{modalIds:[]},reducers:{openModal(state,action){if(window.document&&(document.body.style.overflow="hidden"),action.payload.modalId&&!state.modalIds.includes(action.payload.modalId)){state.modalIds.push(action.payload.modalId);const alreadyOpenModals=new URLSearchParams(window.location.search).get("modal");alreadyOpenModals!==action.payload.modalId&&window.history.pushState("","",(0,_utils_helpers_url__WEBPACK_IMPORTED_MODULE_1__.oW)(new URL((0,_utils_helpers_url__WEBPACK_IMPORTED_MODULE_1__.vW)()),{modal:`${alreadyOpenModals??""}${action.payload.modalId}`}))}const{activeElement}=document;var elementToStore;activeElement&&"BODY"!==activeElement.tagName&&(elementToStore=activeElement)&&focusContainerArray.push(elementToStore)},closeModal(state,action){const modalId=state.modalIds.pop();state.modalIds.indexOf(action.payload.modalId)>-1&&state.modalIds.splice(state.modalIds.indexOf(action.payload.modalId),1),modalId&&(removeModalIdFromUrl(state),returnFocusElement()),0===state.modalIds.length&&(document.body.style.overflow="")},closeLastModal(state){document.body.style.overflow="";state.modalIds.pop()&&(removeModalIdFromUrl(state),returnFocusElement())},closeAllModals(state){document.body.style.overflow="",state.modalIds=[],removeModalIdFromUrl(state),returnFocusElement()}}}),{openModal,closeModal,closeLastModal,closeAllModals}=modalSlice.actions,__WEBPACK_DEFAULT_EXPORT__=modalSlice.reducer},"./src/core/publizon/publizon.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{bh:()=>getGetV1UserReservationsQueryKey,t7:()=>useDeleteV1UserReservationsIdentifier,ul:()=>useGetV1LibraryProfile,LW:()=>useGetV1LoanstatusIdentifier,tq:()=>useGetV1ProductsIdentifier,T8:()=>useGetV1UserLoans,ju:()=>useGetV1UserReservations});var es=__webpack_require__("./node_modules/react-query/es/index.js"),FetchFailedCriticalError=__webpack_require__("./src/core/fetchers/FetchFailedCriticalError.ts"),helpers=__webpack_require__("./src/core/fetchers/helpers.ts"),core_token=__webpack_require__("./src/core/token.js"),extractServiceBaseUrls=__webpack_require__("./src/core/utils/reduxMiddleware/extractServiceBaseUrls.ts"),FetcherHttpError=__webpack_require__("./src/core/fetchers/FetcherHttpError.ts");function _defineProperty(obj,key,value){return(key=function _toPropertyKey(t){var i=function _toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==typeof i?i:String(i)}(key))in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}class PublizonServiceHttpError extends FetcherHttpError.Z{constructor(...args){super(...args),_defineProperty(this,"name","PublizonServiceHttpError")}}const fetcher_fetcher=async({url,method,headers,params,data})=>{const token=(0,core_token.LP)(core_token.b4)??(0,core_token.LP)(core_token.t8),authHeaders=token?{Authorization:`Bearer ${token}`}:{},body=data?JSON.stringify(data):null,serviceUrl=(0,helpers._o)({baseUrl:(0,extractServiceBaseUrls.fG)(extractServiceBaseUrls.PS.publizon),url,params});try{const response=await fetch(serviceUrl,{method,headers:{...headers,...authHeaders},body});if(!response.ok)throw new PublizonServiceHttpError(response.status,response.statusText,serviceUrl);try{return await response.json()}catch(e){if(!(e instanceof SyntaxError))throw e}}catch(error){if(error instanceof PublizonServiceHttpError)throw error;const message=error instanceof Error?error.message:"Unknown error";throw new FetchFailedCriticalError.Z(message,serviceUrl)}return null},useGetV1LibraryProfile=options=>{const{query:queryOptions}=options??{},queryKey=(null==queryOptions?void 0:queryOptions.queryKey)??["/v1/library/profile"];return{queryKey,...(0,es.useQuery)(queryKey,(({signal})=>(signal=>fetcher_fetcher({url:"/v1/library/profile",method:"get",signal}))(signal)),queryOptions)}},useGetV1UserLoans=(params,options)=>{const{query:queryOptions}=options??{},queryKey=(null==queryOptions?void 0:queryOptions.queryKey)??(params=>["/v1/user/loans",...params?[params]:[]])(params),query=(0,es.useQuery)(queryKey,(({signal})=>((params,signal)=>fetcher_fetcher({url:"/v1/user/loans",method:"get",signal,params}))(params,signal)),queryOptions);return{queryKey,...query}},useGetV1LoanstatusIdentifier=(identifier,queryOptions)=>{const queryKey=(null==queryOptions?void 0:queryOptions.queryKey)??(identifier=>[`/v1/loanstatus/${identifier}`])(identifier);return{queryKey,...(0,es.useQuery)(queryKey,(({signal})=>((identifier,signal)=>fetcher_fetcher({url:`/v1/loanstatus/${identifier}`,method:"get",signal}))(identifier)),{enabled:!!identifier,...queryOptions})}},useGetV1ProductsIdentifier=(identifier,options)=>{const{query:queryOptions}=options??{},queryKey=(null==queryOptions?void 0:queryOptions.queryKey)??(identifier=>[`/v1/products/${identifier}`])(identifier);return{queryKey,...(0,es.useQuery)(queryKey,(({signal})=>((identifier,signal)=>fetcher_fetcher({url:`/v1/products/${identifier}`,method:"get",signal}))(identifier,signal)),{enabled:!!identifier,...queryOptions})}},getGetV1UserReservationsQueryKey=()=>["/v1/user/reservations"],useGetV1UserReservations=options=>{const{query:queryOptions}=options??{},queryKey=(null==queryOptions?void 0:queryOptions.queryKey)??getGetV1UserReservationsQueryKey();return{queryKey,...(0,es.useQuery)(queryKey,(({signal})=>(signal=>fetcher_fetcher({url:"/v1/user/reservations",method:"get",signal}))(signal)),queryOptions)}},useDeleteV1UserReservationsIdentifier=options=>{const{mutation:mutationOptions}=options??{};return(0,es.useMutation)((props=>{const{identifier}=props??{};return(identifier=>fetcher_fetcher({url:`/v1/user/reservations/${identifier}`,method:"delete"}))(identifier)}),mutationOptions)}},"./src/core/statistics/statistics.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{h:()=>statistics});const statistics={searchQuery:{id:10,name:"OSS"},searchResultCount:{id:11,name:"OSS Results"},searchFacets:{id:20,name:"Søgning Facet"},materialType:{id:24,name:"Materialetype"},materialGenre:{id:25,name:"Materiale Genre"},materialLanguage:{id:29,name:"Materiale Sprog"},materialSource:{id:30,name:"Materiale Kilde"},materialTargetAudience:{id:31,name:"Materiale Målgruppe"},materialTopicNumber:{id:32,name:"Materiale - DK5-nummer (Emnetal)"},materialFictionNonFiction:{id:33,name:"Materiale Fiktion/nonfiktion"},materialStatus:{id:38,name:"Materiale Status"},searchResultNumberClick:{id:42,name:"Søgning - Resultatnummer klik"},campaignClick:{id:48,name:"Kampagneklik"},reservation:{id:50,name:"Reserver"},onlineReservation:{id:51,name:"Se online"},autosuggestClick:{id:54,name:"Autosuggest - klik"},campaignShown:{id:62,name:"KampagnePlus Titel"}}},"./src/core/statistics/useStatistics.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";function useStatistics(){return window.wts||(window.wts={push(trackingProps){console.log(`Tracking: ${trackingProps[0]}, ${trackingProps[1]}, ${JSON.stringify(trackingProps[2])}`)}}),{track:(eventType,trackParameters)=>{const eventData={linkId:trackParameters.name,customClickParameter:{}};return eventData.customClickParameter[trackParameters.id]=trackParameters.trackedData,window.wts.push(["send",eventType,eventData]),new Promise((resolve=>{setTimeout((()=>{resolve("resolved")}),500)}))}}}__webpack_require__.d(__webpack_exports__,{T:()=>useStatistics})},"./src/core/store.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Dj:()=>persistor,h:()=>store,v9:()=>useSelector});var _reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__("./node_modules/@reduxjs/toolkit/dist/redux-toolkit.esm.js"),_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_13__=__webpack_require__("./node_modules/redux/es/redux.js"),react_redux__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react-redux/es/index.js"),redux_persist__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/redux-persist/es/index.js"),redux_persist_lib_storage_session__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/redux-persist/lib/storage/session.js"),_text_slice__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/core/text.slice.ts"),_user_slice__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/core/user.slice.js"),_modal_slice__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./src/core/modal.slice.ts"),_url_slice__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./src/core/url.slice.ts"),_filter_slice__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./src/core/filter.slice.ts"),_config_slice__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./src/core/config.slice.ts"),_blockedModal_slice__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__("./src/core/blockedModal.slice.ts"),_guardedRequests_slice__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__("./src/core/guardedRequests.slice.ts"),_utils_reduxMiddleware_extractServiceBaseUrls__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__("./src/core/utils/reduxMiddleware/extractServiceBaseUrls.ts");const persistConfig={key:"dpl-react",storage:redux_persist_lib_storage_session__WEBPACK_IMPORTED_MODULE_2__.Z,blacklist:["text","url","modal","config","blockedModal"]},store=(0,_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_12__.xC)({middleware:getDefaultMiddleware=>[...getDefaultMiddleware(),_utils_reduxMiddleware_extractServiceBaseUrls__WEBPACK_IMPORTED_MODULE_11__.ZP],reducer:(0,redux_persist__WEBPACK_IMPORTED_MODULE_1__.OJ)(persistConfig,(0,_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_13__.UY)({user:_user_slice__WEBPACK_IMPORTED_MODULE_4__.ZP,text:_text_slice__WEBPACK_IMPORTED_MODULE_3__.ZP,modal:_modal_slice__WEBPACK_IMPORTED_MODULE_5__.ZP,url:_url_slice__WEBPACK_IMPORTED_MODULE_6__.ZP,config:_config_slice__WEBPACK_IMPORTED_MODULE_8__.ZP,guardedRequests:_guardedRequests_slice__WEBPACK_IMPORTED_MODULE_10__.ZP,blockedModal:_blockedModal_slice__WEBPACK_IMPORTED_MODULE_9__.ZP,filter:_filter_slice__WEBPACK_IMPORTED_MODULE_7__.ZP})),devTools:!1}),persistor=(0,redux_persist__WEBPACK_IMPORTED_MODULE_1__.p5)(store),useSelector=react_redux__WEBPACK_IMPORTED_MODULE_0__.v9},"./src/core/storybook/acceptFeesModalArgs.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});const __WEBPACK_DEFAULT_EXPORT__={acceptModalHeaderText:{defaultValue:"Hov, dit gebyr forhøjes!",control:{type:"text"}},acceptModalBodyText:{defaultValue:"Fornyer du dine lån, forhøjes dit gebyr. Alle materialer ikke kan fornys og lånet splittes derfor op. Ved overskredne lån modtager du et gebyr pr. lån og derfor forhøjes dit samlede gebyr, hvis du vælger at gå videre med at fornye.",control:{type:"text"}},acceptModalAreYouSureText:{defaultValue:"Er du sikker på du vil fornye?",control:{type:"text"}},acceptModalAcceptButtonText:{defaultValue:"Ja, forny mulige",control:{type:"text"}},acceptModalCancelButtonText:{defaultValue:"Annuller fornyelse",control:{type:"text"}},acceptModalAriaDescriptionText:{defaultValue:"accept modal aria description text",control:{type:"text"}},acceptModalAriaLabelText:{defaultValue:"accept modal aria label text",control:{type:"text"}}}},"./src/core/storybook/blockedArgs.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});const __WEBPACK_DEFAULT_EXPORT__={blockedPatronDTitleText:{defaultValue:"D Title",control:{type:"text"}},blockedPatronDBodyText:{defaultValue:"Lorem ipsum",control:{type:"text"}},blockedPatronSTitleText:{defaultValue:"S Title",control:{type:"text"}},blockedPatronSBodyText:{defaultValue:"Lorem ipsum",control:{type:"text"}},blockedPatronFTitleText:{defaultValue:"F Title",control:{type:"text"}},blockedPatronFBodyText:{defaultValue:"Lorem ipsum",control:{type:"text"}},blockedPatronETitleText:{defaultValue:"You have exceeded your fee limit",control:{type:"text"}},blockedPatronEBodyText:{defaultValue:"You are therefore not able to borrow or reserve materials from the library",control:{type:"text"}},blockedPatronWTitleText:{defaultValue:"Your user is blocked",control:{type:"text"}},blockedPatronWBodyText:{defaultValue:"You therefore cannot reserve, borrow or renew loans. Please contact the library for further information",control:{type:"text"}},blockedPatronOTitleText:{defaultValue:"O title",control:{type:"text"}},blockedPatronOBodyText:{defaultValue:"Lorem ipsum",control:{type:"text"}},blockedPatronUTitleText:{defaultValue:"Your user is blocked",control:{type:"text"}},blockedPatronUBodyText:{defaultValue:"You therefore cannot reserve, borrow or renew loans. $Please contact the library for further information",control:{type:"text"}},blockedPatronELinkText:{defaultValue:"Pay your fees here",control:{type:"text"}},blockedPatronELinkUrl:{defaultValue:"https://unsplash.com/photos/r077pfFsdaU",control:{type:"text"}},blockedPatronCloseModalAriaLabelText:{control:{type:"text"},defaultValue:"Close blocked patron modal"},blockedPatronModalAriaDescriptionText:{control:{type:"text"},defaultValue:"This modal alerts you, that your patron has been blocked"},redirectOnBlockedUrl:{control:{type:"text"},defaultValue:"https://unsplash.com/photos/r077pfFsdaU"}}},"./src/core/storybook/deleteReservationModalArgs.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});const __WEBPACK_DEFAULT_EXPORT__={deleteReservationModalHeaderText:{defaultValue:'{"type":"plural","text":["Cancel reservation","Cancel reservations"]}',control:{type:"text"}},deleteReservationModalDeleteQuestionText:{defaultValue:'{"type":"plural","text":["Do you want to cancel your reservation?","Do you want to cancel your reservations?"]}',control:{type:"text"}},deleteReservationModalNotRegrettableText:{defaultValue:"You cannot regret this action",control:{type:"text"}},deleteReservationModalDeleteButtonText:{defaultValue:'{"type":"plural","text":["Cancel reservation","Cancel reservations"]}',control:{type:"text"}},deleteReservationModalCloseModalText:{defaultValue:"Close delete reservation modal",control:{type:"text"}},deleteReservationModalAriaDescriptionText:{defaultValue:"This button opens a modal that covers the entire page and contains the possibility to delete a selected reservation, or multiple selected reservations",control:{type:"text"}}}},"./src/core/storybook/groupModalArgs.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});const __WEBPACK_DEFAULT_EXPORT__={groupModalDueDateLinkToPageWithFeesText:{control:{type:"text"},defaultValue:"Read more about fees"},groupModalDueDateMaterialText:{control:{type:"text"},defaultValue:"To be returned @date"},groupModalGoToMaterialText:{defaultValue:"Go to material details",control:{type:"text"}},groupModalDueDateHeaderText:{control:{type:"text"},defaultValue:"Due date @date"},resultPagerStatusText:{defaultValue:"Showing @itemsShown out of @hitcount elements",control:{type:"text"}},groupModalReturnLibraryText:{defaultValue:"Can be returned to all branches of Samsøs libraries",control:{type:"text"}},groupModalCheckboxText:{control:{type:"text"},defaultValue:"Choose all"},groupModalHiddenLabelCheckboxOnMaterialText:{control:{type:"text"},defaultValue:"Select @label"},pageSizeDesktop:{defaultValue:10,control:{type:"number"}},pageSizeMobile:{defaultValue:5,control:{type:"number"}},showMoreText:{defaultValue:"show more",control:{type:"text"}}}},"./src/core/storybook/loanGroupModalArgs.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});const __WEBPACK_DEFAULT_EXPORT__={groupModalRenewLoanDeniedMaxRenewalsReachedText:{control:{type:"text"},defaultValue:"The item cannot be renewed further "},groupModalDueDateWarningLoanOverdueText:{control:{type:"text"},defaultValue:"The due date of return is exceeded, therefore you will be charged a fee, when the item is returned"},groupModalRenewLoanDeniedReservedText:{control:{type:"text"},defaultValue:"The item is reserved by another patron"},groupModalRenewLoanDeniedInterLibraryLoanText:{defaultValue:"The item has been lent to you by another library and renewal is therefore conditional of the acceptance by that library",control:{type:"text"}},groupModalLoansCloseModalAriaLabelText:{control:{type:"text"},defaultValue:"Close modal with grouped loans"},groupModalLoansAriaDescriptionText:{control:{type:"text"},defaultValue:"This modal makes it possible to renew materials"},groupModalButtonText:{control:{type:"text"},defaultValue:"Renewable (@count)"}}},"./src/core/storybook/materialDetailsModalArgs.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});const __WEBPACK_DEFAULT_EXPORT__={materialDetailsWarningLoanOverdueText:{control:{type:"text"},defaultValue:"The due date of return is exceeded, therefore you will be charged a fee, when the item is returned"},materialDetailsPhysicalDueDateLabelText:{control:{type:"text"},defaultValue:"Afleveres"},materialDetailsLoanDateLabelText:{control:{type:"text"},defaultValue:"Loan date"},materialDetailsMaterialNumberLabelText:{control:{type:"text"},defaultValue:"Material Item Number"},materialDetailsCloseModalAriaLabelText:{control:{type:"text"},defaultValue:"Close material details modal"},materialDetailsLinkToPageWithFeesText:{control:{type:"text"},defaultValue:"Read more about fees"},materialDetailsOverdueText:{control:{type:"text"},defaultValue:"Expired"},materialDetailsModalAriaDescriptionText:{control:{type:"text"},defaultValue:"This modal shows material details, and makes it possible to renew a material, of that material is renewable"},materialDetailsGoToEreolenText:{defaultValue:"Go to eReolen",control:{type:"text"}},materialDetailsDigitalDueDateLabelText:{control:{type:"text"},defaultValue:"Expires"},materialDetailsRenewLoanButtonText:{control:{type:"text"},defaultValue:"Renew your loan"},feesPageUrl:{defaultValue:"/user/me/fees",control:{type:"text"}},viewFeesAndCompensationRatesUrl:{defaultValue:"https://unsplash.com/photos/wd6YQy0PJt8",control:{type:"text"}},ereolenMyPageUrl:{defaultValue:"https://unsplash.com/photos/wd6YQy0PJt8",control:{type:"text"}}}},"./src/core/storybook/pincodeArgs.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});const __WEBPACK_DEFAULT_EXPORT__={pincodeLengthMinConfig:{defaultValue:"4",control:{type:"number"}},pincodeLengthMaxConfig:{defaultValue:"5",control:{type:"number"}}}},"./src/core/storybook/renewalArgs.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});const __WEBPACK_DEFAULT_EXPORT__={renewProcessingText:{control:{type:"text"},defaultValue:"Processing..."},renewButtonText:{control:{type:"text"},defaultValue:"Renew"},renewMaterialLoanSuccessTitleText:{control:{type:"text"},defaultValue:"You have renewed your loan"},renewMaterialLoanSuccessStatusText:{control:{type:"text"},defaultValue:"1 loan was renewed."},renewMaterialLoanNoRenewalsPossibleErrorTitleText:{control:{type:"text"},defaultValue:"The loan could not be renewed"},renewMaterialLoanNoRenewalsPossibleErrorStatusText:{control:{type:"text"},defaultValue:"For some reason, your loan could not be renewed."},renewMaterialLoanErrorTitleText:{control:{type:"text"},defaultValue:"Renewal of your loan failed"},renewMaterialLoanErrorStatusText:{control:{type:"text"},defaultValue:"Something went wrong renewing your loan. Please try again."},renewMaterialLoanButtonText:{control:{type:"text"},defaultValue:"Ok"},renewGroupModalLoansSuccessTitleText:{control:{type:"text"},defaultValue:"You have renewed your loans"},renewGroupModalLoansSuccessStatusText:{control:{type:"text"},defaultValue:'{"type":"plural","text":["1 loan has been renewed.","@count loans have been renewed."]}'},renewGroupModalLoansErrorTitleText:{control:{type:"text"},defaultValue:"Renewing your loans failed"},renewGroupModalLoansErrorStatusText:{control:{type:"text"},defaultValue:"Something went wrong renewing your loans. Please try again."},renewGroupModalLoansButtonText:{control:{type:"text"},defaultValue:"Ok"},renewGroupModalLoansNoRenewalsPossibleErrorTitleText:{control:{type:"text"},defaultValue:"No loans could be renewed"},renewGroupModalLoansNoRenewalsPossibleErrorStatusText:{control:{type:"text"},defaultValue:"For some reason, no one of your loans could be renewed."},renewCannotBeRenewedText:{control:{type:"text"},defaultValue:"Cannot be renewed"}}},"./src/core/storybook/reservationGroupModalArgs.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});const __WEBPACK_DEFAULT_EXPORT__={groupModalReservationsCloseModalAriaLabelText:{control:{type:"text"},defaultValue:"Close modal with grouped reservations"},groupModalReservationsLoansAriaDescriptionText:{control:{type:"text"},defaultValue:"This modal makes it possible to delete reservations"},readyForLoanCounterLabelText:{defaultValue:"Ready",control:{type:"text"}},removeAllReservationsText:{defaultValue:"Remove reservations (@amount)",control:{type:"text"}},pickUpLatestText:{defaultValue:"Pick up before @date",control:{type:"text"}},reservationsReadyForPickupText:{defaultValue:"Reservations ready for pickup",control:{type:"text"}},physicalReservationsHeaderText:{defaultValue:"Physical reservations",control:{type:"text"}},digitalReservationsHeaderText:{defaultValue:"Digital reservations",control:{type:"text"}}}},"./src/core/storybook/reservationListArgs.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});const __WEBPACK_DEFAULT_EXPORT__={blacklistedSearchBranchesConfig:{name:"Blacklisted branches",defaultValue:"FBS-751032,FBS-751031,FBS-751009,FBS-751027,FBS-751024",control:{type:"text"}},expirationWarningDaysBeforeConfig:{defaultValue:"6",control:{type:"text"}},pauseReservationStartDateConfig:{defaultValue:"2022-06-30",control:{type:"text"}},blacklistedPickupBranchesConfig:{name:"Blacklisted branches",defaultValue:"FBS-751032,FBS-751031,FBS-751009,FBS-751027,FBS-751024",control:{type:"text"}},branchesConfig:{name:"Branches",defaultValue:'[\n {\n "branchId":"DK-775120",\n "title":"Højbjerg"\n },\n {\n "branchId":"DK-775122",\n "title":"Beder-Malling"\n },\n {\n "branchId":"DK-775144",\n "title":"Gellerup"\n },\n {\n "branchId":"DK-775167",\n "title":"Lystrup"\n },\n {\n "branchId":"DK-775146",\n "title":"Harlev"\n },\n {\n "branchId":"DK-775168",\n "title":"Skødstrup"\n },\n {\n "branchId":"FBS-751010",\n "title":"Arresten"\n },\n {\n "branchId":"DK-775147",\n "title":"Hasle"\n },\n {\n "branchId":"FBS-751032",\n "title":"Må ikke benyttes"\n },\n {\n "branchId":"FBS-751031",\n "title":"Fjernlager 1"\n },\n {\n "branchId":"DK-775126",\n "title":"Solbjerg"\n },\n {\n "branchId":"FBS-751030",\n "title":"ITK"\n },\n {\n "branchId":"DK-775149",\n "title":"Sabro"\n },\n {\n "branchId":"DK-775127",\n "title":"Tranbjerg"\n },\n {\n "branchId":"DK-775160",\n "title":"Risskov"\n },\n {\n "branchId":"DK-775162",\n "title":"Hjortshøj"\n },\n {\n "branchId":"DK-775140",\n "title":"Åby"\n },\n {\n "branchId":"FBS-751009",\n "title":"Fjernlager 2"\n },\n {\n "branchId":"FBS-751029",\n "title":"Stadsarkivet"\n },\n {\n "branchId":"FBS-751027",\n "title":"Intern"\n },\n {\n "branchId":"FBS-751026",\n "title":"Fælles undervejs"\n },\n {\n "branchId":"FBS-751025",\n "title":"Fællessekretariatet"\n },\n {\n "branchId":"DK-775133",\n "title":"Bavnehøj"\n },\n {\n "branchId":"FBS-751024",\n "title":"Fjernlånte materialer"\n },\n {\n "branchId":"DK-775100",\n "title":"Hovedbiblioteket"\n },\n {\n "branchId":"DK-775170",\n "title":"Trige"\n },\n {\n "branchId":"DK-775150",\n "title":"Tilst"\n },\n {\n "branchId":"DK-775130",\n "title":"Viby"\n },\n {\n "branchId":"DK-775164",\n "title":"Egå"\n }\n]',control:{type:"text"}},pageSizeDesktop:{defaultValue:20,control:{type:"number"}},pageSizeMobile:{defaultValue:10,control:{type:"number"}},ereolenMyPageUrl:{defaultValue:"https://ereolen.dk/user/me/",control:{type:"text"}},pauseReservationInfoUrl:{defaultValue:"https://images.unsplash.com/photo-1571043733612-d5444ff7d4ae?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1335&q=80",control:{type:"text"}},reservationListHeaderText:{defaultValue:"Your reservations",control:{type:"text"}},reservationListPhysicalReservationsHeaderText:{defaultValue:"Physical reservations",control:{type:"text"}},reservationListDigitalReservationsHeaderText:{defaultValue:"Digital reservations",control:{type:"text"}},reservationListReadyForPickupTitleText:{defaultValue:"Ready for pickup",control:{type:"text"}},reservationListReadyForPickupEmptyText:{defaultValue:"At the moment you have 0 reservations ready for pickup",control:{type:"text"}},reservationListPhysicalReservationsEmptyText:{defaultValue:"At the moment you have 0 physical reservations",control:{type:"text"}},reservationListAllEmptyText:{defaultValue:"At the moment you have 0 reservations",control:{type:"text"}},reservationListDigitalReservationsEmptyText:{defaultValue:"At the moment you have 0 reservations on digital items",control:{type:"text"}},reservationListReadyText:{defaultValue:"Ready",control:{type:"text"}},materialByAuthorText:{defaultValue:"By",control:{type:"text"}},materialAndAuthorText:{defaultValue:"and",control:{type:"text"}},etAlText:{defaultValue:"et al.",control:{type:"text"}},reservationListNumberInQueueText:{defaultValue:"There are @count people in the queue before you",control:{type:"text"}},reservationListFirstInQueueText:{defaultValue:"You are at the front of the queue",control:{type:"text"}},reservationListInQueueText:{defaultValue:"queued",control:{type:"text"}},reservationPickUpLatestText:{defaultValue:"Pick up before @date",control:{type:"text"}},publizonEbookText:{defaultValue:"E-book",control:{type:"text"}},publizonAudioBookText:{defaultValue:"Audiobook",control:{type:"text"}},publizonPodcastText:{defaultValue:"Podcast",control:{type:"text"}},reservationListLoanBeforeText:{defaultValue:"Borrow before @date",control:{type:"text"}},reservationListAvailableInText:{defaultValue:"Available in @count days",control:{type:"text"}},reservationListDaysText:{defaultValue:"days",control:{type:"text"}},reservationListDayText:{defaultValue:"day",control:{type:"text"}},reservationDetailsOthersInQueueText:{defaultValue:"Others are queueing for this material",control:{type:"text"}},reservationDetailsExpiresTitleText:{defaultValue:"Pickup deadline",control:{type:"text"}},reservationDetailsDigitalMaterialExpiresTitleText:{defaultValue:"Borrow before",control:{type:"text"}},reservationDetailsExpiresText:{defaultValue:"Your reservation expires @date!",control:{type:"text"}},reservationDetailsSaveText:{defaultValue:"Save",control:{type:"text"}},reservationDetailsCancelText:{defaultValue:"Cancel",control:{type:"text"}},reservationListPauseReservationText:{defaultValue:"Pause your reservations",control:{type:"text"}},reservationListPauseReservationOnHoldText:{defaultValue:"Your reservations are paused",control:{type:"text"}},reservationListOnHoldAriaText:{defaultValue:"Reservations have been paused in the following time span: ",control:{type:"text"}},reservationListPauseReservationAriaModalText:{defaultValue:"Opens a modal that covers the entire page where it is possible to pause physical reservations",control:{type:"text"}},reservationListPauseReservationButtonText:{defaultValue:"Settings",control:{type:"text"}},pauseReservationModalAriaDescriptionText:{defaultValue:"This modal makes it possible to pause your physical reservations",control:{type:"text"}},pauseReservationModalHeaderText:{defaultValue:"Pause reservations on physical items",control:{type:"text"}},pauseReservationModalBodyText:{defaultValue:"Pause your reservations early, since reservations that are already being processed, will not be paused.",control:{type:"text"}},pauseReservationModalCloseModalText:{defaultValue:"Close pause reservations modal",control:{type:"text"}},dateInputsStartDateLabelText:{defaultValue:"Start date",control:{type:"text"}},dateInputsEndDateLabelText:{defaultValue:"End date",control:{type:"text"}},pauseReservationModalBelowInputsTextText:{defaultValue:"",control:{type:"text"}},pauseReservationModalLinkText:{defaultValue:"Read more about pausing reservertions and what that means here",control:{type:"text"}},pauseReservationModalSaveButtonLabelText:{defaultValue:"Save",control:{type:"text"}},pauseReservationModalCancelButtonLabelText:{defaultValue:"Cancel pause",control:{type:"text"}},listDetailsNothingSelectedLabelText:{defaultValue:"Pick",control:{type:"text"}},showMoreText:{name:"Show more Text",defaultValue:"show more",control:{type:"text"}},resultPagerStatusText:{name:"Result pager status text",defaultValue:"Showing @itemsShown out of @hitcount results",control:{type:"text"}},deleteReservationModalSuccessTitleText:{name:"Delete reservation modal success title text",defaultValue:"Reservations deleted",control:{type:"text"}},deleteReservationModalSuccessStatusText:{name:"Delete reservation modal success status text",defaultValue:'{"type":"plural","text":["One reservation was deleted","@count reservations were deleted"]}',control:{type:"text"}},deleteReservationModalErrorsTitleText:{name:"Delete reservation modal errors title text",defaultValue:"An error occurred",control:{type:"text"}},deleteReservationModalErrorsStatusText:{name:"Delete reservation modal errors status text",defaultValue:"One or more reservations could not be deleted, please try again.",control:{type:"text"}},deleteReservationModalButtonText:{name:"Delete reservation modal delete button text",defaultValue:"Ok",control:{type:"text"}},deleteReservationModalDeleteProcessingText:{name:"Delete reservation modal delete processing text",defaultValue:"Processing...",control:{type:"text"}}}},"./src/core/storybook/reservationMaterialDetailsArgs.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});const __WEBPACK_DEFAULT_EXPORT__={blacklistedPickupBranchesConfig:{name:"Blacklisted branches",defaultValue:"FBS-751032,FBS-751031,FBS-751009,FBS-751027,FBS-751024",control:{type:"text"}},branchesConfig:{name:"Branches",defaultValue:'[\n {\n "branchId":"DK-775120",\n "title":"Højbjerg"\n },\n {\n "branchId":"DK-775122",\n "title":"Beder-Malling"\n },\n {\n "branchId":"DK-775144",\n "title":"Gellerup"\n },\n {\n "branchId":"DK-775167",\n "title":"Lystrup"\n },\n {\n "branchId":"DK-775146",\n "title":"Harlev"\n },\n {\n "branchId":"DK-775168",\n "title":"Skødstrup"\n },\n {\n "branchId":"FBS-751010",\n "title":"Arresten"\n },\n {\n "branchId":"DK-775147",\n "title":"Hasle"\n },\n {\n "branchId":"FBS-751032",\n "title":"Må ikke benyttes"\n },\n {\n "branchId":"FBS-751031",\n "title":"Fjernlager 1"\n },\n {\n "branchId":"DK-775126",\n "title":"Solbjerg"\n },\n {\n "branchId":"FBS-751030",\n "title":"ITK"\n },\n {\n "branchId":"DK-775149",\n "title":"Sabro"\n },\n {\n "branchId":"DK-775127",\n "title":"Tranbjerg"\n },\n {\n "branchId":"DK-775160",\n "title":"Risskov"\n },\n {\n "branchId":"DK-775162",\n "title":"Hjortshøj"\n },\n {\n "branchId":"DK-775140",\n "title":"Åby"\n },\n {\n "branchId":"FBS-751009",\n "title":"Fjernlager 2"\n },\n {\n "branchId":"FBS-751029",\n "title":"Stadsarkivet"\n },\n {\n "branchId":"FBS-751027",\n "title":"Intern"\n },\n {\n "branchId":"FBS-751026",\n "title":"Fælles undervejs"\n },\n {\n "branchId":"FBS-751025",\n "title":"Fællessekretariatet"\n },\n {\n "branchId":"DK-775133",\n "title":"Bavnehøj"\n },\n {\n "branchId":"FBS-751024",\n "title":"Fjernlånte materialer"\n },\n {\n "branchId":"DK-775100",\n "title":"Hovedbiblioteket"\n },\n {\n "branchId":"DK-775170",\n "title":"Trige"\n },\n {\n "branchId":"DK-775150",\n "title":"Tilst"\n },\n {\n "branchId":"DK-775130",\n "title":"Viby"\n },\n {\n "branchId":"DK-775164",\n "title":"Egå"\n }\n]',control:{type:"text"}},reservationDetailsConfig:{defaultValue:'{"allowRemoveReadyReservations": true}',control:{type:"text"}},interestPeriodsConfig:{defaultValue:'{ "interestPeriods":[ { "value":14, "label":"14 days" }, { "value":30, "label":"1 month" }, { "value":60, "label":"2 months" }, { "value":90, "label":"3 months" }, { "value":180, "label":"6 months" }, { "value":365, "label":"1 year" } ], "defaultInterestPeriod":{ "value":"14", "label":"14 days" } }',control:{type:"text"}},reservationDetailsRemoveDigitalReservationText:{defaultValue:"Remove your reservation",control:{type:"text"}},reservationDetailsDateOfReservationTitleText:{defaultValue:"Date of reservation",control:{type:"text"}},reservationDetailsNoInterestAfterTitleText:{defaultValue:"Not interested after",control:{type:"text"}},reservationDetailsChangeText:{defaultValue:"Apply changes",control:{type:"text"}},reservationDetailsPickUpAtTitleText:{defaultValue:"Pickup branch",control:{type:"text"}},reservationDetailsButtonRemoveText:{defaultValue:"Remove your reservation",control:{type:"text"}},reservationDetailsStatusTitleText:{defaultValue:"Status",control:{type:"text"}},reservationDetailsBorrowBeforeText:{defaultValue:"Borrow before @date",control:{type:"text"}},reservationDetailsDigitalReservationGoToEreolenText:{defaultValue:"Go to eReolen",control:{type:"text"}},reservationDetailsReadyForLoanText:{defaultValue:"Ready for pickup",control:{type:"text"}},reservationDetailsPickupDeadlineTitleText:{defaultValue:"Pickup deadline",control:{type:"text"}},reservationDetailsNumberInQueueLabelText:{defaultValue:"@count queued",control:{type:"text"}},shiftText:{name:"Change",defaultValue:"Change",control:{type:"text"}},modalReservationFormPickupHeaderTitleText:{name:"Modal reservation form pickup header title",defaultValue:"Change pick-up location",control:{type:"text"}},modalReservationFormPickupHeaderDescriptionText:{name:"Modal reservation form pickup header description",defaultValue:"If you wish to change the pick-up location for your reservation, you can do it here.",control:{type:"text"}},modalReservationFormNoInterestAfterHeaderTitleText:{name:"Modal reservation form no interest after header title",defaultValue:"Change date of interest",control:{type:"text"}},modalReservationFormNoInterestAfterHeaderDescriptionText:{name:"Modal reservation form no interest after header description",defaultValue:"If you wish to change the amount of time after which you're no longer interested in the material, you can do it here.",control:{type:"text"}},saveButtonText:{name:"Save button text",defaultValue:"Save",control:{type:"text"}},chooseOneText:{name:"Choose one text",defaultValue:"Choose one",control:{type:"text"}},loadingText:{name:"Loading",defaultValue:"Loading...",control:{type:"text"}},reservationSuccessTitleText:{name:"Reservation success title",defaultValue:"Your reservation has been changed",control:{type:"text"}},reservationSuccessSubTitleText:{name:"Reservation success sub title",defaultValue:"Click the button below to close this window",control:{type:"text"}},reservationerrorTitleText:{name:"Reservation error title",defaultValue:"Something went wrong",control:{type:"text"}},reservationerrorSubTitleText:{name:"Reservation error sub title",defaultValue:"Click the button below to close this window and try again",control:{type:"text"}},reservationStatusButtonText:{name:"Reservation success button text",defaultValue:"Close",control:{type:"text"}}}},"./src/core/storybook/serviceUrlArgs.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var _utils_reduxMiddleware_extractServiceBaseUrls__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/core/utils/reduxMiddleware/extractServiceBaseUrls.ts"),process=__webpack_require__("./node_modules/process/browser.js");const __WEBPACK_DEFAULT_EXPORT__={[_utils_reduxMiddleware_extractServiceBaseUrls__WEBPACK_IMPORTED_MODULE_0__.PS.fbs]:{name:"Base url for the FBS API",defaultValue:process.env.FBS_BASEURL??"https://fbs-openplatform.dbc.dk",control:{type:"text"}},[_utils_reduxMiddleware_extractServiceBaseUrls__WEBPACK_IMPORTED_MODULE_0__.PS.publizon]:{name:"Base url for the Publizon API",defaultValue:process.env.PUBLIZON_BASEURL??"https://pubhub-openplatform.dbc.dk",control:{type:"text"}},[_utils_reduxMiddleware_extractServiceBaseUrls__WEBPACK_IMPORTED_MODULE_0__.PS.dplCms]:{name:"Base url for the DPL CMS API",defaultValue:"https://dpl-cms.docker",control:{type:"text"}},[_utils_reduxMiddleware_extractServiceBaseUrls__WEBPACK_IMPORTED_MODULE_0__.PS.cover]:{name:"Base url for the cover service",defaultValue:"https://cover.dandigbib.org",control:{type:"text"}},[_utils_reduxMiddleware_extractServiceBaseUrls__WEBPACK_IMPORTED_MODULE_0__.PS.materialList]:{name:"Base url for the material list service",defaultValue:"https://prod.materiallist.dandigbib.org",control:{type:"text"}},[_utils_reduxMiddleware_extractServiceBaseUrls__WEBPACK_IMPORTED_MODULE_0__.PS.fbi]:{name:"Base url for the FBI API",defaultValue:"https://fbi-api.dbc.dk/next/graphql",control:{type:"text"}}}},"./src/core/text.slice.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{N5:()=>addTextEntries,ZP:()=>__WEBPACK_DEFAULT_EXPORT__});const textSlice=(0,__webpack_require__("./node_modules/@reduxjs/toolkit/dist/redux-toolkit.esm.js").oM)({name:"text",initialState:{data:{}},reducers:{addTextEntries(state,action){state.data={...state.data,...action.payload.entries}}}}),{addTextEntries}=textSlice.actions,__WEBPACK_DEFAULT_EXPORT__=textSlice.reducer},"./src/core/token.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{LP:()=>getToken,b4:()=>TOKEN_USER_KEY,hA:()=>hasToken,o4:()=>setToken,t8:()=>TOKEN_LIBRARY_KEY});const tokens={},TOKEN_USER_KEY="user",TOKEN_LIBRARY_KEY="library";function setToken(type,value){tokens[type]=value}function hasToken(type){return Boolean(tokens[type])}function getToken(type){return tokens[type]}},"./src/core/url.slice.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{ZP:()=>__WEBPACK_DEFAULT_EXPORT__,dd:()=>addUrlEntries});const urlSlice=(0,__webpack_require__("./node_modules/@reduxjs/toolkit/dist/redux-toolkit.esm.js").oM)({name:"url",initialState:{data:{}},reducers:{addUrlEntries(state,action){state.data={...state.data,...action.payload.entries}}}}),{addUrlEntries}=urlSlice.actions,__WEBPACK_DEFAULT_EXPORT__=urlSlice.reducer},"./src/core/user.slice.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Ot:()=>setStatusAuthenticated,ZP:()=>__WEBPACK_DEFAULT_EXPORT__,ig:()=>setStatusUnauthenticated});var _reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/@reduxjs/toolkit/dist/redux-toolkit.esm.js");const attemptAuthentication=(0,_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_0__.hg)("user/attemptAuthentication",(()=>Promise.resolve())),userSlice=(0,_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_0__.oM)({name:"user",initialState:{status:"unauthenticated"},reducers:{updateStatus(state,action){"unauthenticated"!==state.status&&"attempting"!==state.status||(action.payload.hasToken?state.status="authenticated":action.payload.doFail&&"attempting"===state.status&&(state.status="failed"))},setStatusAuthenticated(state){state.status="authenticated"},setStatusUnauthenticated(state){state.status="unauthenticated"}},extraReducers:{[attemptAuthentication.pending]:state=>{state.status="attempting"}}}),{updateStatus,setStatusAuthenticated,setStatusUnauthenticated}=userSlice.actions,__WEBPACK_DEFAULT_EXPORT__=userSlice.reducer},"./src/core/utils/branches.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{ZP:()=>__WEBPACK_DEFAULT_EXPORT__,mc:()=>useGetBranches,rM:()=>excludeBlacklistedBranches});var _config__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/core/utils/config.tsx");const excludeBlacklistedBranches=(branches,blacklist)=>branches.filter((item=>!blacklist.includes(item.branchId))),cleanBranchesId=branches=>branches.map((branch=>{const matches=/-(\d*)/g.exec(branch.branchId);return matches?matches[1]:""})).filter((item=>item)),useGetBranches=key=>{const config=(0,_config__WEBPACK_IMPORTED_MODULE_0__.ZR)(),branches=config("branchesConfig",{transformer:"jsonParse"}),blacklistBranches=config(key,{transformer:"stringToArray"});return excludeBlacklistedBranches(branches,blacklistBranches)},__WEBPACK_DEFAULT_EXPORT__=()=>{const branches=useGetBranches("blacklistedSearchBranchesConfig");return cleanBranchesId(branches)};try{cleanBranchesId.displayName="cleanBranchesId",cleanBranchesId.__docgenInfo={description:"",displayName:"cleanBranchesId",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/utils/branches.tsx#cleanBranchesId"]={docgenInfo:cleanBranchesId.__docgenInfo,name:"cleanBranchesId",path:"src/core/utils/branches.tsx#cleanBranchesId"})}catch(__react_docgen_typescript_loader_error){}try{useGetBranches.displayName="useGetBranches",useGetBranches.__docgenInfo={description:"",displayName:"useGetBranches",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/utils/branches.tsx#useGetBranches"]={docgenInfo:useGetBranches.__docgenInfo,name:"useGetBranches",path:"src/core/utils/branches.tsx#useGetBranches"})}catch(__react_docgen_typescript_loader_error){}},"./src/core/utils/config.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Rh:()=>withConfig,ZR:()=>useConfig});var _store__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/core/store.ts"),_config_slice__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/core/config.slice.ts"),_withSuffix__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/core/utils/withSuffix.tsx");const useConfig=()=>{const{data}=(0,_store__WEBPACK_IMPORTED_MODULE_0__.v9)((state=>state.config));return(key,options)=>{if("string"!=typeof data[key])throw new Error(`Config entry "${key}" is not defined.`);return"jsonParse"===(null==options?void 0:options.transformer)?JSON.parse(data[key]):"stringToArray"===(null==options?void 0:options.transformer)?data[key].split(","):null==data?void 0:data[key]}},withConfig=Component=>(0,_withSuffix__WEBPACK_IMPORTED_MODULE_2__.Z)(Component,"Config",_config_slice__WEBPACK_IMPORTED_MODULE_1__.Mg);try{withConfig.displayName="withConfig",withConfig.__docgenInfo={description:"",displayName:"withConfig",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/utils/config.tsx#withConfig"]={docgenInfo:withConfig.__docgenInfo,name:"withConfig",path:"src/core/utils/config.tsx#withConfig"})}catch(__react_docgen_typescript_loader_error){}},"./src/core/utils/errors/HttpError.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";function _defineProperty(obj,key,value){return(key=function _toPropertyKey(t){var i=function _toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==typeof i?i:String(i)}(key))in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}__webpack_require__.d(__webpack_exports__,{Z:()=>HttpError});class HttpError extends Error{constructor(status,message,context){super(message),this.status=status,this.message=message,this.context=context,_defineProperty(this,"name","HttpError"),_defineProperty(this,"statusCode",void 0),this.statusCode=status}}},"./src/core/utils/helpers/date.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Tj:()=>formatDateDependingOnDigitalMaterial,ZP:()=>__WEBPACK_DEFAULT_EXPORT__,o0:()=>formatDateTime,p6:()=>formatDate,pj:()=>dateHasPassed});var dayjs__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/dayjs/dayjs.min.js"),dayjs__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(dayjs__WEBPACK_IMPORTED_MODULE_0__);const dateHasPassed=date=>dayjs__WEBPACK_IMPORTED_MODULE_0___default()().isAfter(date,"day"),formatDate=date=>dayjs__WEBPACK_IMPORTED_MODULE_0___default()(date).format("DD-MM-YYYY"),formatDateTime=date=>dayjs__WEBPACK_IMPORTED_MODULE_0___default()(date).format("DD-MM-YYYY HH:mm"),formatDateDependingOnDigitalMaterial=({date,isDigital})=>isDigital?formatDateTime(date):formatDate(date),__WEBPACK_DEFAULT_EXPORT__=()=>Math.floor(Date.now()/1e3)},"./src/core/utils/helpers/general.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A3:()=>getMaterialTypes,CU:()=>groupObjectArrayByProperty,Do:()=>getScrollClass,EC:()=>getColors,GJ:()=>loansOverdue,He:()=>getReviewRelease,IX:()=>patronAgeValid,JY:()=>getRenewableMaterials,Qe:()=>getAuthorNames,Qf:()=>getParams,R3:()=>getAmountOfRenewableLoans,RN:()=>getContributors,Rh:()=>pageSizeGlobal,S2:()=>getManifestationPublicationYear,Sz:()=>daysBetweenDates,T6:()=>orderManifestationsByYear,TG:()=>flattenCreators,TH:()=>convertPostIdsToFaustIds,US:()=>getRecommenderMaterialLimits,_M:()=>stringifyValue,b7:()=>creatorsToString,bV:()=>materialIsFiction,bs:()=>getLatestManifestation,cC:()=>getManifestationType,cf:()=>materialIsOverdue,e8:()=>tallyUpFees,f4:()=>sameLoanDate,k7:()=>getAllPids,lT:()=>getPublicationName,oO:()=>sortByReservationDate,q7:()=>daysBetweenTodayAndDate,qQ:()=>getManifestationPid,qZ:()=>getListItems,rp:()=>convertPostIdToFaustId,sC:()=>sortByLoanDate,uY:()=>getReleaseYearSearchResult,vH:()=>getAllFaustIds,vn:()=>getManifestationsPids,xB:()=>getReservablePidsFromAnotherLibrary,yz:()=>getCoverTint});var lodash_uniq__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/lodash/uniq.js"),lodash_uniq__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(lodash_uniq__WEBPACK_IMPORTED_MODULE_0__),dayjs__WEBPACK_IMPORTED_MODULE_18__=(__webpack_require__("./node_modules/core-js/modules/esnext.set.add-all.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.delete-all.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.difference.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.every.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.filter.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.find.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.intersection.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.is-disjoint-from.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.is-subset-of.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.is-superset-of.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.join.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.map.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.reduce.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.some.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.symmetric-difference.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.union.js"),__webpack_require__("./node_modules/react/index.js"),__webpack_require__("./node_modules/dayjs/dayjs.min.js")),dayjs__WEBPACK_IMPORTED_MODULE_18___default=__webpack_require__.n(dayjs__WEBPACK_IMPORTED_MODULE_18__),_configuration__WEBPACK_IMPORTED_MODULE_19__=__webpack_require__("./src/core/configuration/index.ts"),_url__WEBPACK_IMPORTED_MODULE_22__=__webpack_require__("./src/core/utils/helpers/url.ts"),_store__WEBPACK_IMPORTED_MODULE_20__=__webpack_require__("./src/core/store.ts");__webpack_require__("./src/core/utils/helpers/modal-helpers.ts");const getManifestationPublicationYear=manifestation=>{var _manifestation$editio,_manifestation$editio2;return(null===(_manifestation$editio=manifestation.edition)||void 0===_manifestation$editio||null===(_manifestation$editio2=_manifestation$editio.publicationYear)||void 0===_manifestation$editio2?void 0:_manifestation$editio2.display)||null},orderManifestationsByYear=(manifestations,order="desc")=>manifestations.sort(((a,b)=>{const currentDate=Number(getManifestationPublicationYear(a)),prevDate=Number(getManifestationPublicationYear(b));return"desc"===order?prevDate-currentDate:currentDate-prevDate})),flattenCreators=creators=>creators.map((creator=>creator.display)),creatorsToString=(creators,t)=>{if(creators.length>1){return`${creators.slice(0,2).join(", ")} ${t("etAlText")}`}return creators[0]},getLatestManifestation=manifestations=>orderManifestationsByYear(manifestations,"desc")[0],getManifestationPid=manifestations=>orderManifestationsByYear(manifestations)[0].pid,getCoverTint=index=>{const conf=(0,_configuration__WEBPACK_IMPORTED_MODULE_19__.bc)("coverTints",_configuration__WEBPACK_IMPORTED_MODULE_19__.ZP),{coverTints}=conf;if(coverTints){return coverTints[index%coverTints.length]}},getColors=()=>(0,_configuration__WEBPACK_IMPORTED_MODULE_19__.bc)("colors",_configuration__WEBPACK_IMPORTED_MODULE_19__.ZP),getRecommenderMaterialLimits=()=>(0,_configuration__WEBPACK_IMPORTED_MODULE_19__.bc)("recommenderMaterialLimits",_configuration__WEBPACK_IMPORTED_MODULE_19__.ZP),daysBetweenTodayAndDate=date=>{const inputDate=dayjs__WEBPACK_IMPORTED_MODULE_18___default()(new Date(date)),today=dayjs__WEBPACK_IMPORTED_MODULE_18___default()(new Date);return Math.ceil(inputDate.diff(today,"day",!0))},daysBetweenDates=(firstDate,secondDate)=>{const inputFirstDate=dayjs__WEBPACK_IMPORTED_MODULE_18___default()(new Date(firstDate)),inputSecondDate=dayjs__WEBPACK_IMPORTED_MODULE_18___default()(new Date(secondDate));return Math.ceil(inputFirstDate.diff(inputSecondDate,"day",!0))},convertPostIdToFaustId=postId=>{const matches=postId.match(/^[0-9]+-[a-z]+:([a-zA-Z0-9]+)$/);if(null!=matches&&matches[1])return null==matches?void 0:matches[1];throw new Error(`Unable to extract faust id from post id "${postId}"`)},convertPostIdsToFaustIds=postIds=>postIds.map((pid=>convertPostIdToFaustId(pid))),getParams=props=>Object.entries(props).reduce(((acc,[property,value])=>({...acc,[property]:String(value||(0,_url__WEBPACK_IMPORTED_MODULE_22__.wo)(property))})),{}),sortByLoanDate=list=>list.sort(((a,b)=>new Date(a.loanDate||new Date).getTime()-new Date(b.loanDate||new Date).getTime())),sortByReservationDate=list=>list.sort(((objA,objB)=>new Date(objA.dateOfReservation||new Date).getTime()-new Date(objB.dateOfReservation||new Date).getTime())),getRenewableMaterials=list=>list.filter((({isRenewable})=>isRenewable)),getAmountOfRenewableLoans=list=>getRenewableMaterials(list).length,groupObjectArrayByProperty=(array,property)=>array.reduce(((result,current)=>{const groupBy=current[property];if(!groupBy)return result;const key=String(groupBy);return key in result?{...result,[key]:[...result[key],current]}:{...result,[key]:[current]}}),{}),getManifestationsPids=manifestations=>manifestations.map((manifestation=>manifestation.pid)),stringifyValue=value=>value?String(value):"",materialIsFiction=({fictionNonfiction})=>"FICTION"===(null==fictionNonfiction?void 0:fictionNonfiction.code),getListItems=(list,itemsShown)=>[...list].splice(0,itemsShown),pageSizeGlobal=(pageSizes,configName)=>{let pageSize=0;return pageSize=null!=pageSizes&&pageSizes.desktop&&null!=pageSizes&&pageSizes.mobile?(({desktop,mobile})=>{const{pageSize}=(0,_configuration__WEBPACK_IMPORTED_MODULE_19__.G2)("pageSize",{pageSize:{mobile:{pageSize:mobile},desktop:{pageSize:desktop}}});return Number(pageSize)})(pageSizes):(pageSizeConf=>{const{pageSize}=(0,_configuration__WEBPACK_IMPORTED_MODULE_19__.G2)(pageSizeConf,_configuration__WEBPACK_IMPORTED_MODULE_19__.ZP);return Number(pageSize)})(configName||"pageSize"),pageSize},materialIsOverdue=date=>dayjs__WEBPACK_IMPORTED_MODULE_18___default()().isAfter(dayjs__WEBPACK_IMPORTED_MODULE_18___default()(date),"day"),loansOverdue=loans=>loans.every((loan=>materialIsOverdue(loan.dueDate))),sameLoanDate=loans=>loans.every(((loanDate,i,arr)=>loanDate===arr[0])),tallyUpFees=fees=>fees.reduce(((total,{amount})=>total+amount),0).toLocaleString("da-DA"),getMaterialTypes=(manifestations,onlyFirstType=!0)=>onlyFirstType?lodash_uniq__WEBPACK_IMPORTED_MODULE_0___default()(manifestations.map((manifest=>manifest.materialTypes.map(((type,i)=>0===i?type.specific:null)))).flat().filter((type=>null!==type))):lodash_uniq__WEBPACK_IMPORTED_MODULE_0___default()(manifestations.map((manifest=>manifest.materialTypes.map((type=>type.specific)))).flat()),getManifestationType=manifestations=>getMaterialTypes(manifestations)[0],getAllPids=manifestations=>manifestations.map((manifestation=>manifestation.pid)),getAllFaustIds=manifestations=>convertPostIdsToFaustIds(getAllPids(manifestations)),getScrollClass=modalIds=>modalIds.length>0?"scroll-lock-background":"";const patronAgeValid=(cpr,minAge)=>{const cprDate=function getDateFromCpr(cprInput){const dateSegments=cprInput.replace(/[^\d]/g,"").substring(0,6).match(/.{1,2}/g);if(dateSegments){const[day,month,year]=dateSegments;let prefix="";prefix=Number(year)<21?"20":"19";const yearWithPrefix=Number(`${prefix}${year}`);return new Date(Date.UTC(yearWithPrefix,Number(month)-1,Number(day),0,0,0,0))}return null}(cpr);if(null===cprDate)return!1;return dayjs__WEBPACK_IMPORTED_MODULE_18___default()().diff(dayjs__WEBPACK_IMPORTED_MODULE_18___default()(cprDate),"year")>minAge},getAuthorNames=(creators,by,and)=>{const names=creators.map((({display})=>display));let returnContentString="";return 0===names.length||(returnContentString=1===names.length?`${by?`${by} `:""}${names.join(", ")}`:`${by?`${by} `:""} ${names.slice(0,-1).join(", ")} ${and?`${and} `:""}${names.slice(-1)}`),returnContentString},getPublicationName=hostPublication=>hostPublication?hostPublication.title:"",getReviewRelease=(dateFirstEdition,workYear,edition)=>{var _edition$publicationY;return(null==dateFirstEdition?void 0:dateFirstEdition.display)||(null==workYear?void 0:workYear.display)||(null==edition||null===(_edition$publicationY=edition.publicationYear)||void 0===_edition$publicationY?void 0:_edition$publicationY.display)||null},getReleaseYearSearchResult=work=>{const{latest,bestRepresentation}=work.manifestations,manifestation=bestRepresentation||latest;var _work$workYear,_work$workYear2,_manifestation$workYe,_manifestation$dateFi,_manifestation$editio3,_manifestation$editio4;return materialIsFiction(work)?null===(_work$workYear=work.workYear)||void 0===_work$workYear?void 0:_work$workYear.year:materialIsFiction(manifestation)?(null===(_work$workYear2=work.workYear)||void 0===_work$workYear2?void 0:_work$workYear2.year)||(null===(_manifestation$workYe=manifestation.workYear)||void 0===_manifestation$workYe?void 0:_manifestation$workYe.year)||(null===(_manifestation$dateFi=manifestation.dateFirstEdition)||void 0===_manifestation$dateFi?void 0:_manifestation$dateFi.year)||(null===(_manifestation$editio3=manifestation.edition)||void 0===_manifestation$editio3||null===(_manifestation$editio4=_manifestation$editio3.publicationYear)||void 0===_manifestation$editio4?void 0:_manifestation$editio4.display):getManifestationPublicationYear(latest)||""},getContributors=(short,creators)=>{const{text:{data:texts}}=_store__WEBPACK_IMPORTED_MODULE_20__.h.getState();if(creators&&creators.length>0){if(2===creators.length)return`${texts.materialByAuthorText} ${creators.join(` ${texts.materialAndAuthorText} `)}`;if(creators.length>2)return short?((creators,byText,etAlText)=>`${byText} ${creators.slice(0,2).join(", ")} ${etAlText}`)(creators,texts.materialByAuthorText,texts.etAlText):((creators,byText,andText)=>`${byText} ${creators.slice(0,-1).join(", ")} ${andText} ${creators.slice(-1)}`)(creators,texts.materialByAuthorText,texts.materialAndAuthorText)}return creators[0]},getReservablePidsFromAnotherLibrary=manifestations=>manifestations.filter((({catalogueCodes})=>null==catalogueCodes?void 0:catalogueCodes.otherCatalogues.some((code=>code.startsWith("OVE"))))).map((({pid})=>pid))},"./src/core/utils/helpers/invalid-switch-case.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});const __WEBPACK_DEFAULT_EXPORT__=function invalidSwitchCase(x){return console.error(`Invalid case for ${x}`),x}},"./src/core/utils/helpers/lazy-load.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{L:()=>useItemHasBeenVisible});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),react_use__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/react-use/esm/useIntersection.js");const useItemHasBeenVisible=()=>{const itemRef=(0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null),intersection=(0,react_use__WEBPACK_IMPORTED_MODULE_1__.Z)(itemRef,{root:null,rootMargin:"0%",threshold:0}),isInViewPort=Boolean(null==intersection?void 0:intersection.isIntersecting),[hasBeenVisible,setHasBeenVisible]=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(!1);return(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)((()=>{hasBeenVisible||isInViewPort&&setHasBeenVisible(!0)}),[hasBeenVisible,isInViewPort]),{itemRef,hasBeenVisible:isInViewPort||hasBeenVisible}}},"./src/core/utils/helpers/list-mapper.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{F9:()=>mapFBSReservationGroupToReservationType,L6:()=>mapManifestationToBasicDetailsType,Rr:()=>mapPublizonLoanToLoanType,U9:()=>mapProductToBasicDetailsType,_P:()=>mapPublizonReservationToReservationType,u3:()=>mapFBSLoanToLoanType});var lodash_values__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/lodash/values.js"),lodash_values__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(lodash_values__WEBPACK_IMPORTED_MODULE_0__),lodash_keys__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/lodash/keys.js"),lodash_keys__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(lodash_keys__WEBPACK_IMPORTED_MODULE_1__),lodash_head__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/lodash/head.js"),lodash_head__WEBPACK_IMPORTED_MODULE_2___default=__webpack_require__.n(lodash_head__WEBPACK_IMPORTED_MODULE_2__),_store__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/core/store.ts"),_general__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/core/utils/helpers/general.ts");function getSeriesString(series){return series.map((({title,numberInSeries})=>{var _numberInSeries$numbe;return numberInSeries&&numberInSeries.number?`${title} ${null===(_numberInSeries$numbe=numberInSeries.number)||void 0===_numberInSeries$numbe?void 0:_numberInSeries$numbe[0]}`:title})).join(", ")}const mapPublizonLoanToLoanType=list=>list.map((({loanExpireDateUtc,orderDateUtc,libraryBook})=>({dueDate:loanExpireDateUtc,loanDate:orderDateUtc,isRenewable:!1,materialItemNumber:(null==libraryBook?void 0:libraryBook.identifier)||"",renewalStatusList:[],loanType:null,identifier:(null==libraryBook?void 0:libraryBook.identifier)||null,faust:null,loanId:null}))),mapFBSLoanToLoanType=list=>list.map((({loanDetails,isRenewable,renewalStatusList})=>{var _loanDetails$periodic;return{dueDate:loanDetails.dueDate,loanDate:loanDetails.loanDate,periodical:(null===(_loanDetails$periodic=loanDetails.periodical)||void 0===_loanDetails$periodic?void 0:_loanDetails$periodic.displayText)||"",renewalStatusList,isRenewable,materialItemNumber:loanDetails.materialItemNumber,loanType:loanDetails.loanType,identifier:null,faust:loanDetails.recordId||null,loanId:loanDetails.loanId}})),mapProductToBasicDetailsType=material=>{const{publicationDate,title,description,productType,contributors,externalProductId,languageCode}=material,{text:{data:texts}}=_store__WEBPACK_IMPORTED_MODULE_3__.h.getState(),digitalProductType={1:texts.publizonEbookText,2:texts.publizonAudioBookText,4:texts.publizonPodcastText},authors=(null==contributors?void 0:contributors.map((({firstName,lastName})=>`${firstName} ${lastName}`)))||[];return{title,lang:languageCode,periodical:null,year:publicationDate?(date=publicationDate,new Date(date).getFullYear()):"",description,materialType:productType?digitalProductType[productType]:"",externalProductId:null==externalProductId?void 0:externalProductId.id,authors:contributors?(0,_general__WEBPACK_IMPORTED_MODULE_4__.RN)(!1,authors):"",authorsShort:contributors?(0,_general__WEBPACK_IMPORTED_MODULE_4__.RN)(!0,authors):""};var date},mapManifestationToBasicDetailsType=material=>{var _languages$main,_languages$main$;const{edition,abstract,titles,pid,materialTypes,creators,series,languages}=material,isoCode=(null==languages||null===(_languages$main=languages.main)||void 0===_languages$main||null===(_languages$main$=_languages$main[0])||void 0===_languages$main$?void 0:_languages$main$.isoCode)??"",description=abstract?abstract[0]:"",{full:[fullText]}=titles||{full:[]},{publicationYear}=edition||{},{display:year}=publicationYear||{},inputContributorsArray=(null==creators?void 0:creators.map((({display})=>display)))||[],firstAuthor=creators&&creators.length?creators[0].display:"";return{lang:isoCode,authors:(0,_general__WEBPACK_IMPORTED_MODULE_4__.RN)(!1,inputContributorsArray),authorsShort:(0,_general__WEBPACK_IMPORTED_MODULE_4__.RN)(!0,inputContributorsArray),firstAuthor,pid,title:fullText,year,description,series:series&&series.length>0?getSeriesString(series):"",materialType:materialTypes?materialTypes[0].specific:void 0}},mapPublizonReservationToReservationType=list=>list.map((({identifier,createdDateUtc,status,expectedRedeemDateUtc,productTitle,expireDateUtc})=>({identifier,faust:null,dateOfReservation:createdDateUtc,expiryDate:expireDateUtc,state:status?{1:"reserved",2:"readyForPickup",3:"redeemed",4:"cancelled",5:"expired"}[status]:null,title:productTitle,pickupDeadline:expectedRedeemDateUtc}))),mapFBSReservationGroupToReservationType=list=>list.map((({dateOfReservation,expiryDate,numberInQueue,state,pickupBranch,pickupDeadline,pickupNumber,periodical,records})=>({periodical:(null==periodical?void 0:periodical.displayText)||"",faust:lodash_head__WEBPACK_IMPORTED_MODULE_2___default()(lodash_keys__WEBPACK_IMPORTED_MODULE_1___default()(records)),dateOfReservation,expiryDate,numberInQueue,state:"readyForPickup"===state?"readyForPickup":"reserved",pickupBranch,pickupDeadline,pickupNumber,reservationIds:lodash_values__WEBPACK_IMPORTED_MODULE_0___default()(records)})))},"./src/core/utils/helpers/modal-helpers.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{FV:()=>getDetailsModalId,GM:()=>getModalIds,OY:()=>dateFromDueDateModalQueryParam,V$:()=>constructModalId,hl:()=>containsDueDateModalQueryParam});var _configuration__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/core/configuration/index.ts");const constructModalId=(prefix,fragments)=>[prefix,...fragments].join("-"),getModalIds=()=>(0,_configuration__WEBPACK_IMPORTED_MODULE_0__.bc)("modalIds",_configuration__WEBPACK_IMPORTED_MODULE_0__.ZP),containsDueDateModalQueryParam=queryParam=>{const{dueDateModal}=getModalIds(),regex=new RegExp(`${dueDateModal}\\d{4}-\\d{2}-\\d{2}`,"g"),dateFound=queryParam.match(regex);return dateFound?dateFound[0]:null},dateFromDueDateModalQueryParam=queryParam=>{const dateFound=queryParam.match(/\d{4}-\d{2}-\d{2}/g);return dateFound?dateFound[0]:null},getDetailsModalId=(queryParam,prefix)=>{const regexIdentifier=new RegExp(`(?<=${prefix})((\\d{13})|((\\d{10}))||((\\d{9}))|(\\d{8}))`,"g"),modalId=queryParam.match(regexIdentifier);if(modalId){const[returnId]=modalId;return returnId}return""}},"./src/core/utils/helpers/renewal.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{r0:()=>filterRenewResponseData,CO:()=>getRenewButtonLabel,TJ:()=>succeededRenewalCount});let RenewStatus=function(RenewStatus){return RenewStatus.renewed="renewed",RenewStatus.deniedReserved="deniedReserved",RenewStatus.deniedMaxRenewalsReached="deniedMaxRenewalsReached",RenewStatus.deniedLoanerIsBlocked="deniedLoanerIsBlocked",RenewStatus.deniedMaterialIsNotLoanable="deniedMaterialIsNotLoanable",RenewStatus.deniedMaterialIsNotFound="deniedMaterialIsNotFound",RenewStatus.deniedLoanerNotFound="deniedLoanerNotFound",RenewStatus.deniedLoaningProfileNotFound="deniedLoaningProfileNotFound",RenewStatus.deniedOtherReason="deniedOtherReason",RenewStatus}({});const filterRenewResponseData=data=>data.filter((loan=>loan.renewalStatus[0]===RenewStatus.renewed)),succeededRenewalCount=renewingResponse=>filterRenewResponseData(renewingResponse||[]).length,getRenewButtonLabel=({isRenewable,renewingStatus,t,defaultText})=>isRenewable?"pending"===renewingStatus?t("renewProcessingText"):defaultText??t("renewButtonText"):t("renewCannotBeRenewedText")},"./src/core/utils/helpers/url.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Hg:()=>constructAdvancedSearchUrl,Nt:()=>constructSearchUrl,U2:()=>constructSearchUrlWithFilter,W3:()=>turnUrlStringsIntoObjects,WO:()=>constructMaterialUrl,gB:()=>redirectTo,hN:()=>redirectToLoginAndBack,oC:()=>removeQueryParametersFromUrl,oW:()=>appendQueryParametersToUrl,pM:()=>isUrlValid,uW:()=>currentLocationWithParametersUrl,ul:()=>setQueryParametersInUrl,vW:()=>getCurrentLocation,wo:()=>getUrlQueryParam});const getCurrentLocation=()=>String(window.location),appendQueryParametersToUrl=(url,parameters)=>{const processedUrl=new URL(url);return Object.keys(parameters).forEach((key=>{processedUrl.searchParams.set(key,encodeURI(parameters[key]))})),processedUrl},getUrlQueryParam=param=>{const queryParams=new URLSearchParams(window.location.search);return queryParams.get(param)?decodeURI(String(queryParams.get(param))):null},setQueryParametersInUrl=parameters=>{const processedUrl=new URL(getCurrentLocation());Object.keys(parameters).forEach((key=>{processedUrl.searchParams.set(key,parameters[key])})),window.history.replaceState(null,"",processedUrl)},removeQueryParametersFromUrl=parameter=>{const processedUrl=new URL(getCurrentLocation());var replacementUrl;processedUrl.searchParams.delete(parameter),replacementUrl=processedUrl,window.history.replaceState(null,"",replacementUrl)},redirectTo=url=>{window.location.assign(String(url))},processUrlPlaceholders=(url,placeholders)=>{let processedUrl=url;return placeholders.forEach((placeholder=>{const[name,replacement]=placeholder;processedUrl=((url,placeholderName,replacement)=>{const regex=new RegExp(`${placeholderName}`,"g");return url.match(regex)?url.replace(regex,replacement):url})(processedUrl,name,replacement)})),processedUrl},constructMaterialUrl=(url,workId,type)=>{const materialUrl=new URL(url);return materialUrl.pathname=processUrlPlaceholders(materialUrl.pathname,[[":workid",workId]]),type?appendQueryParametersToUrl(materialUrl,{type}):materialUrl},constructSearchUrl=(searchUrl,q)=>appendQueryParametersToUrl(searchUrl,{q}),constructAdvancedSearchUrl=(advancedSearchUrl,q)=>appendQueryParametersToUrl(advancedSearchUrl,{advancedSearchCql:q}),constructSearchUrlWithFilter=args=>{const{searchUrl,selectedItemString,filter}=args;return appendQueryParametersToUrl(searchUrl,{q:selectedItemString,...filter})},turnUrlStringsIntoObjects=urls=>Object.keys(urls).reduce(((acc,key)=>({...acc,[key]:new URL(urls[key],getCurrentLocation())})),{});function redirectToLoginAndBack({authUrl,returnUrl,trackingFunction}){const{pathname,search,hash}=returnUrl,redirectUrl=appendQueryParametersToUrl(authUrl,{"current-path":`${pathname}${search}${hash}`});trackingFunction&&trackingFunction().then((()=>redirectTo(redirectUrl))),redirectTo(redirectUrl)}const isUrlValid=text=>{try{const url=new URL(text);return"http:"===url.protocol||"https:"===url.protocol}catch(err){return!1}},currentLocationWithParametersUrl=params=>appendQueryParametersToUrl(new URL(getCurrentLocation()),params)},"./src/core/utils/helpers/user.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{IT:()=>isBlocked,TF:()=>isAnonymous,aE:()=>isResident,dp:()=>usePatronData});var lodash_isEmpty__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/lodash/isEmpty.js"),lodash_isEmpty__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(lodash_isEmpty__WEBPACK_IMPORTED_MODULE_0__),_token__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/core/token.js"),_fbs_fbs__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/core/fbs/fbs.ts");const isAnonymous=()=>!(0,_token__WEBPACK_IMPORTED_MODULE_1__.hA)("user"),isBlocked=patron=>!lodash_isEmpty__WEBPACK_IMPORTED_MODULE_0___default()(patron.blockStatus),isResident=patron=>patron.resident,usePatronData=()=>(0,_fbs_fbs__WEBPACK_IMPORTED_MODULE_2__.wK)({enabled:!isAnonymous()})},"./src/core/utils/modal.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>modal,f:()=>useModalButtonHandler});var react=__webpack_require__("./node_modules/react/index.js"),es=__webpack_require__("./node_modules/react-redux/es/index.js"),CloseLarge=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/CloseLarge.svg"),CloseLarge_default=__webpack_require__.n(CloseLarge),clsx=__webpack_require__("./node_modules/clsx/dist/clsx.mjs"),focus_trap_react=__webpack_require__("./node_modules/focus-trap-react/dist/focus-trap-react.js"),focus_trap_react_default=__webpack_require__.n(focus_trap_react),modal_slice=__webpack_require__("./src/core/modal.slice.ts"),user=__webpack_require__("./src/core/utils/helpers/user.ts"),url=__webpack_require__("./src/core/utils/helpers/url.ts"),process=__webpack_require__("./node_modules/process/browser.js");const isVitestEnvironment=void 0!==process&&process.env&&process.env.VITEST;function Modal({modalId,closeModalAriaLabelText,children,screenReaderModalDescriptionText,classNames,isSlider,dataCy="modal",eventCallbacks}){const dispatch=(0,es.I0)(),{modalIds}=(0,es.v9)((s=>s.modal));if((0,react.useEffect)((()=>{var _searchParams$get;null!==(_searchParams$get=new URLSearchParams(window.location.search).get("modal"))&&void 0!==_searchParams$get&&_searchParams$get.includes(modalId)&&dispatch((0,modal_slice.h7)({modalId}))}),[modalId,dispatch]),modalIds&&!modalIds.includes(modalId))return null;const close=()=>{null!=eventCallbacks&&eventCallbacks.close&&eventCallbacks.close(),dispatch((0,modal_slice.Mr)({modalId}))};return react.createElement(focus_trap_react_default(),{focusTrapOptions:{fallbackFocus:isVitestEnvironment?"body":void 0}},react.createElement("div",null,react.createElement("div",{className:"modal-backdrop",style:{zIndex:modalIds.indexOf(modalId)+20},onClick:()=>{close()}}),react.createElement("div",{className:(0,clsx.Z)("modal",{"modal-show":modalIds.includes(modalId)},classNames),role:"dialog","aria-labelledby":`modal-${modalId}-description`,"data-cy":dataCy,style:{zIndex:modalIds.indexOf(modalId)+21}},react.createElement("div",{className:"modal__screen-reader-description",id:`modal-${modalId}-description`},screenReaderModalDescriptionText),react.createElement("button",{type:"button",className:"btn-ui modal-btn-close "+(isSlider?"":"modal-btn-close--offset"),style:{zIndex:modalIds.indexOf(modalId)+20},"aria-label":closeModalAriaLabelText,onClick:()=>{close()},"data-cy":`modal-${modalId}-close-button`},react.createElement("img",{src:CloseLarge_default(),alt:"",style:{pointerEvents:"none"}})),children)))}const useModalButtonHandler=()=>{const dispatch=(0,es.I0)();return{open:modalId=>dispatch((0,modal_slice.h7)({modalId})),close:modalId=>dispatch((0,modal_slice.Mr)({modalId})),closeAll:()=>dispatch((0,modal_slice.pT)()),openGuarded:({authUrl,modalId,trackOnlineView})=>{if((0,user.TF)()){const returnUrl=(0,url.uW)({modal:modalId});(0,url.hN)({authUrl,returnUrl,trackingFunction:trackOnlineView})}else trackOnlineView&&trackOnlineView(),dispatch((0,modal_slice.h7)({modalId}))}}},modal=Modal;try{Modal.displayName="Modal",Modal.__docgenInfo={description:"",displayName:"Modal",props:{modalId:{defaultValue:null,description:"",name:"modalId",required:!0,type:{name:"string"}},closeModalAriaLabelText:{defaultValue:null,description:"",name:"closeModalAriaLabelText",required:!0,type:{name:"string"}},screenReaderModalDescriptionText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionText",required:!0,type:{name:"string"}},classNames:{defaultValue:null,description:"",name:"classNames",required:!1,type:{name:"string | undefined"}},dataCy:{defaultValue:{value:"modal"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}},isSlider:{defaultValue:null,description:"",name:"isSlider",required:!1,type:{name:"boolean | undefined"}},eventCallbacks:{defaultValue:null,description:"",name:"eventCallbacks",required:!1,type:{name:"{ close?: (() => void) | undefined; } | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/utils/modal.tsx#Modal"]={docgenInfo:Modal.__docgenInfo,name:"Modal",path:"src/core/utils/modal.tsx#Modal"})}catch(__react_docgen_typescript_loader_error){}},"./src/core/utils/reduxMiddleware/extractServiceBaseUrls.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{PS:()=>serviceUrlKeys,ZP:()=>__WEBPACK_DEFAULT_EXPORT__,fG:()=>getServiceBaseUrl});const serviceUrlKeys={fbs:"fbsBaseUrl",publizon:"publizonBaseUrl",dplCms:"dplCmsBaseUrl",cover:"coverBaseUrl",materialList:"materialListBaseUrl",fbi:"fbiBaseUrl"};let serviceBaseUrls={};const filterUrls=(urls,filterFunction)=>Object.keys(urls).filter(filterFunction).reduce(((obj,key)=>({...obj,[key]:urls[key]})),{}),getServiceBaseUrl=apiBaseUrlKey=>{if(!serviceBaseUrls[apiBaseUrlKey])throw new Error(`Service base url for ${apiBaseUrlKey} is not defined.`);return serviceBaseUrls[apiBaseUrlKey]},__WEBPACK_DEFAULT_EXPORT__=()=>next=>action=>{if("url/addUrlEntries"===String(action.type)){const{payload:{entries}}=action;serviceBaseUrls=filterUrls(entries,(key=>Object.values(serviceUrlKeys).includes(key)));const otherUrls=filterUrls(entries,(key=>!Object.values(serviceUrlKeys).includes(key)));return next({...action,payload:{entries:otherUrls}})}return next(action)}},"./src/core/utils/text.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{X:()=>useText,z:()=>withText});var _store__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/core/store.ts"),_text_slice__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/core/text.slice.ts"),_withSuffix__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/core/utils/withSuffix.tsx");class TextDefinitionError extends Error{constructor(message){super(message),this.name="TextDefinitionError"}}const useText=()=>{const{data}=(0,_store__WEBPACK_IMPORTED_MODULE_0__.v9)((state=>state.text));return(key,{placeholders,count}={count:0})=>{const textDefinition=(rawText=>{if(!rawText.match(/^\{.*\}$/))return{type:"simple",text:[rawText]};try{const textDefinition=JSON.parse(rawText);if("object"==typeof textDefinition&&2===Object.keys(textDefinition).length&&Object.keys(textDefinition).includes("type")&&Object.keys(textDefinition).includes("text")&&["simple","plural"].includes((null==textDefinition?void 0:textDefinition.type)??"")&&Array.isArray(null==textDefinition?void 0:textDefinition.text)){const type=null==textDefinition?void 0:textDefinition.type,text=(null==textDefinition?void 0:textDefinition.text)??[];if(["simple"].includes(type)&&1!==text.length)throw new TextDefinitionError("Simple text definitions must have exactly one text entry");if(["plural"].includes(type)&&2!==text.length)throw new TextDefinitionError("Plural text definitions must have exactly two text entries");return textDefinition}}catch(error){const message=error instanceof Error?error.message:"Unknown error";throw new TextDefinitionError(`Could not parse rawText text format: ${rawText}. Message: ${message}`)}return{type:"simple",text:["Unknown text entry"]}})((null==data?void 0:data[key])??key),textPlaceholders={...placeholders??{}};"plural"===textDefinition.type&&(textPlaceholders["@count"]=String(count));const processedTexts=textPlaceholders?((texts,placeholders)=>texts.map((text=>text.replace(/@\w+/g,(match=>0===placeholders[match]?"0":String(placeholders[match]||match))))))(textDefinition.text,textPlaceholders):textDefinition.text;return"plural"===textDefinition.type?0===count?processedTexts[1]:processedTexts[1%(count??1)]:processedTexts[0]}},withText=Component=>(0,_withSuffix__WEBPACK_IMPORTED_MODULE_2__.Z)(Component,"Text",_text_slice__WEBPACK_IMPORTED_MODULE_1__.N5);try{withText.displayName="withText",withText.__docgenInfo={description:"",displayName:"withText",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/utils/text.tsx#withText"]={docgenInfo:withText.__docgenInfo,name:"withText",path:"src/core/utils/text.tsx#withText"})}catch(__react_docgen_typescript_loader_error){}},"./src/core/utils/types/loan-type.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";function isLoanType(item){return!!item.loanId||!!item.identifier}function loanId(loan){return String(loan.loanId||loan.identifier)}__webpack_require__.d(__webpack_exports__,{P:()=>isLoanType,e:()=>loanId})},"./src/core/utils/types/material-type.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{XK:()=>ManifestationMaterialType,eS:()=>AutosuggestCategory});let ManifestationMaterialType=function(ManifestationMaterialType){return ManifestationMaterialType.book="bog",ManifestationMaterialType.ebook="e-bog",ManifestationMaterialType.movie="film",ManifestationMaterialType.audioBook="lydbog (online)",ManifestationMaterialType.audioBookGeneric="lydbog",ManifestationMaterialType.music="node",ManifestationMaterialType.game="playstation 5",ManifestationMaterialType.animatedSeries="tegneserie",ManifestationMaterialType.article="artikel",ManifestationMaterialType.earticle="artikel",ManifestationMaterialType.boardGame="spil",ManifestationMaterialType.cdRom="cd",ManifestationMaterialType.magazine="tidsskrift",ManifestationMaterialType}({}),AutosuggestCategory=function(AutosuggestCategory){return AutosuggestCategory.book="bog",AutosuggestCategory.ebook="e-bog",AutosuggestCategory.movie="Film",AutosuggestCategory.audioBook="lydbog (online)",AutosuggestCategory.music="Musik",AutosuggestCategory.game="Spil",AutosuggestCategory.animatedSeries="tegneserie",AutosuggestCategory}({})},"./src/core/utils/types/reservation-type.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Rq:()=>isDigitalReservation,_p:()=>reservationId,xF:()=>isPhysicalReservation});__webpack_require__("./node_modules/core-js/modules/esnext.string.at.js");function reservationId(reservation){return null!=reservation&&reservation.reservationIds&&reservation.reservationIds.length>0?String(reservation.reservationIds.at(0)):String(reservation.identifier)}function isPhysicalReservation(reservation){return!!reservation.faust&&!!reservation.reservationIds&&reservation.reservationIds.length>0}function isDigitalReservation(reservation){return!!reservation.identifier}},"./src/core/utils/url.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{J_:()=>useUrls,XL:()=>withUrls});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_store__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/core/store.ts"),_url_slice__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/core/url.slice.ts"),_helpers_url__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/core/utils/helpers/url.ts"),_withSuffix__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/core/utils/withSuffix.tsx");const useUrls=()=>{const{data}=(0,_store__WEBPACK_IMPORTED_MODULE_1__.v9)((state=>state.url)),urls=(0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)((()=>(0,_helpers_url__WEBPACK_IMPORTED_MODULE_4__.W3)(data)),[data]);return name=>{if(!urls[name])throw new Error(`The url ${name} is not defined`);return urls[name]}},withUrls=Component=>(0,_withSuffix__WEBPACK_IMPORTED_MODULE_3__.Z)(Component,"Url",_url_slice__WEBPACK_IMPORTED_MODULE_2__.dd);try{withUrls.displayName="withUrls",withUrls.__docgenInfo={description:"",displayName:"withUrls",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/utils/url.tsx#withUrls"]={docgenInfo:withUrls.__docgenInfo,name:"withUrls",path:"src/core/utils/url.tsx#withUrls"})}catch(__react_docgen_typescript_loader_error){}},"./src/core/utils/useGetAvailability.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var _fbs_fbs__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/core/fbs/fbs.ts"),_apps_material_helper__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/apps/material/helper.ts");const __WEBPACK_DEFAULT_EXPORT__=({faustIds,config,options})=>{const{data,isLoading,isError}=(0,_fbs_fbs__WEBPACK_IMPORTED_MODULE_0__.DP)((0,_apps_material_helper__WEBPACK_IMPORTED_MODULE_1__.UH)(faustIds,config,"availability"),options);return{data,isLoading,isError}}},"./src/core/utils/useLoanThresholds.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var _config__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/core/utils/config.tsx");const __WEBPACK_DEFAULT_EXPORT__=()=>{const config=(0,_config__WEBPACK_IMPORTED_MODULE_0__.ZR)();return{warning:Number(config("expirationWarningDaysBeforeConfig")),danger:0}}},"./src/core/utils/useLoans.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});__webpack_require__("./node_modules/core-js/modules/esnext.set.add-all.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.delete-all.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.difference.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.every.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.filter.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.find.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.intersection.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.is-disjoint-from.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.is-subset-of.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.is-superset-of.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.join.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.map.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.reduce.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.some.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.symmetric-difference.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.union.js");var _fbs_fbs__WEBPACK_IMPORTED_MODULE_16__=__webpack_require__("./src/core/fbs/fbs.ts"),_publizon_publizon__WEBPACK_IMPORTED_MODULE_17__=__webpack_require__("./src/core/publizon/publizon.ts"),_helpers_general__WEBPACK_IMPORTED_MODULE_18__=__webpack_require__("./src/core/utils/helpers/general.ts"),_helpers_list_mapper__WEBPACK_IMPORTED_MODULE_19__=__webpack_require__("./src/core/utils/helpers/list-mapper.ts"),_useLoanThresholds__WEBPACK_IMPORTED_MODULE_20__=__webpack_require__("./src/core/utils/useLoanThresholds.tsx");const filterLoansNotOverdue=(loans,warning)=>loans.filter((({dueDate})=>{const due=dueDate||"";return(0,_helpers_general__WEBPACK_IMPORTED_MODULE_18__.q7)(due)-warning>0})),filterLoansOverdue=loans=>loans.filter((({dueDate})=>(0,_helpers_general__WEBPACK_IMPORTED_MODULE_18__.cf)(dueDate))),filterLoansSoonOverdue=(loans,warning)=>loans.filter((({dueDate})=>{const due=dueDate||"",daysUntilExpiration=(0,_helpers_general__WEBPACK_IMPORTED_MODULE_18__.q7)(due);return daysUntilExpiration-warning<=0&&daysUntilExpiration-warning>=-warning})),sortByDueDate=list=>list.sort(((a,b)=>new Date(a.dueDate||new Date).getTime()-new Date(b.dueDate||new Date).getTime())),__WEBPACK_DEFAULT_EXPORT__=()=>{const{data:loansFbs,isLoading:isLoadingFbs,isError:isErrorFbs}=(0,_fbs_fbs__WEBPACK_IMPORTED_MODULE_16__.n1)(),{data:loansPublizon,isLoading:isLoadingPublizon,isError:isErrorPublizon}=(0,_publizon_publizon__WEBPACK_IMPORTED_MODULE_17__.T8)(),threshold=(0,_useLoanThresholds__WEBPACK_IMPORTED_MODULE_20__.Z)(),loansIsLoading=isLoadingFbs||isLoadingPublizon,loansIsError=isErrorFbs||isErrorPublizon,mappedLoansFbs=loansFbs?(0,_helpers_list_mapper__WEBPACK_IMPORTED_MODULE_19__.u3)(loansFbs):[],mappedLoansPublizon=null!=loansPublizon&&loansPublizon.loans?(0,_helpers_list_mapper__WEBPACK_IMPORTED_MODULE_19__.Rr)(loansPublizon.loans).filter((item=>item.dueDate)):[],loans=sortByDueDate([...mappedLoansFbs,...mappedLoansPublizon]),loansOverdueFBS=filterLoansOverdue(mappedLoansFbs),LoansOverduePublizon=filterLoansOverdue(mappedLoansPublizon),loansOverdue=sortByDueDate([...loansOverdueFBS,...LoansOverduePublizon]),loansSoonOverdueFBS=filterLoansSoonOverdue(mappedLoansFbs,threshold.warning),loansSoonOverduePublizon=filterLoansSoonOverdue(mappedLoansPublizon,threshold.warning),loansSoonOverdue=sortByDueDate([...loansSoonOverdueFBS,...loansSoonOverduePublizon]),loansFarFromOverdueFBS=filterLoansNotOverdue(mappedLoansFbs,threshold.warning),loansFarFromOverduePublizon=filterLoansNotOverdue(mappedLoansPublizon,threshold.warning),loansFarFromOverdue=sortByDueDate([...loansFarFromOverdueFBS,...loansFarFromOverduePublizon]),loansSortedByDateFbs=sortByDueDate(mappedLoansFbs),loansSortedByDatePublizon=sortByDueDate(mappedLoansPublizon);return{all:{loans,overdue:loansOverdue,soonOverdue:loansSoonOverdue,farFromOverdue:loansFarFromOverdue,isLoading:loansIsLoading,isError:loansIsError},fbs:{loans:loansSortedByDateFbs,overdue:loansOverdueFBS,soonOverdue:loansSoonOverdueFBS,farFromOverdue:loansFarFromOverdueFBS,stackedMaterialsDueDates:(list=>Array.from(new Set(list.filter((({dueDate})=>null!==dueDate)).map((({dueDate})=>dueDate)).sort())))(mappedLoansFbs),isLoading:isLoadingFbs,isError:isErrorFbs},publizon:{loans:loansSortedByDatePublizon,overdue:LoansOverduePublizon,soonOverdue:loansSoonOverduePublizon,farFromOverdue:loansFarFromOverduePublizon,isLoading:isLoadingPublizon,isError:isErrorPublizon}}}},"./src/core/utils/useRequestsWithStatus.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{HU:()=>useMultipleRequestsWithStatus,cQ:()=>useSingleRequestWithStatus});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js");const useMultipleRequestsWithStatus=({requests,onError,onSuccess})=>{const[requestStatus,setRequestStatus]=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)("idle");return{handler:(0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)((()=>{setRequestStatus("pending");const operations=[];requests.forEach((({params,operation})=>{if("function"!=typeof operation)throw new Error("Operation must be a function.");operations.push(new Promise(((resolve,reject)=>{operation(params,{onSuccess:result=>{resolve(result)},onError:error=>{reject(error)}})})))})),Promise.all(operations).then((allResults=>{setRequestStatus("success"),onSuccess&&onSuccess(allResults)})).catch((error=>{setRequestStatus("error"),onError&&onError(error)}))}),[requests,onSuccess,onError]),requestStatus,setRequestStatus}},useSingleRequestWithStatus=({request,onError,onSuccess})=>useMultipleRequestsWithStatus({requests:[request],onError:onError?errors=>onError(errors[0]):void 0,onSuccess:onSuccess?results=>{onSuccess(results[0])}:void 0});try{useMultipleRequestsWithStatus.displayName="useMultipleRequestsWithStatus",useMultipleRequestsWithStatus.__docgenInfo={description:"",displayName:"useMultipleRequestsWithStatus",props:{requests:{defaultValue:null,description:"",name:"requests",required:!0,type:{name:"{ params: TParams; operation: TRequest; }[]"}},onSuccess:{defaultValue:null,description:"",name:"onSuccess",required:!1,type:{name:"((results: TResponse[]) => void) | undefined"}},onError:{defaultValue:null,description:"",name:"onError",required:!1,type:{name:"((errors: unknown[]) => void) | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/utils/useRequestsWithStatus.tsx#useMultipleRequestsWithStatus"]={docgenInfo:useMultipleRequestsWithStatus.__docgenInfo,name:"useMultipleRequestsWithStatus",path:"src/core/utils/useRequestsWithStatus.tsx#useMultipleRequestsWithStatus"})}catch(__react_docgen_typescript_loader_error){}try{useSingleRequestWithStatus.displayName="useSingleRequestWithStatus",useSingleRequestWithStatus.__docgenInfo={description:"",displayName:"useSingleRequestWithStatus",props:{request:{defaultValue:null,description:"",name:"request",required:!0,type:{name:"{ params: TParams; operation: TRequest; }"}},onSuccess:{defaultValue:null,description:"",name:"onSuccess",required:!1,type:{name:"((results: TResponse) => void) | undefined"}},onError:{defaultValue:null,description:"",name:"onError",required:!1,type:{name:"((error: unknown) => void) | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/utils/useRequestsWithStatus.tsx#useSingleRequestWithStatus"]={docgenInfo:useSingleRequestWithStatus.__docgenInfo,name:"useSingleRequestWithStatus",path:"src/core/utils/useRequestsWithStatus.tsx#useSingleRequestWithStatus"})}catch(__react_docgen_typescript_loader_error){}},"./src/core/utils/useReservations.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>utils_useReservations});var publizon=__webpack_require__("./src/core/publizon/publizon.ts"),list_mapper=__webpack_require__("./src/core/utils/helpers/list-mapper.ts"),helpers=__webpack_require__("./src/apps/reservation-list/utils/helpers.ts");const api_strings_namespaceObject_c="reserved";var reduce=__webpack_require__("./node_modules/lodash/reduce.js"),reduce_default=__webpack_require__.n(reduce),min=__webpack_require__("./node_modules/lodash/min.js"),min_default=__webpack_require__.n(min),map=__webpack_require__("./node_modules/lodash/map.js"),map_default=__webpack_require__.n(map),groupBy=__webpack_require__("./node_modules/lodash/groupBy.js"),groupBy_default=__webpack_require__.n(groupBy),fbs=__webpack_require__("./src/core/fbs/fbs.ts");function groupReservations(data){const reservationGroups=groupBy_default()(data,(reservation=>reservation.transactionId));return map_default()(reservationGroups,(reservationGroup=>({...reservationGroup[0],numberInQueue:min_default()(map_default()(reservationGroup,"numberInQueue")),records:reduce_default()(reservationGroup,((result,reservation)=>({...result,[reservation.recordId]:reservation.reservationId})),{})})))}const utils_useGetReservationGroups=()=>{const result=(0,fbs.U)();return{...result,data:result.data?groupReservations(result.data):null}};const getQueuedReservations=list=>[...list].filter((({state})=>state===api_strings_namespaceObject_c)),utils_useReservations=()=>{const{data:reservationsFbs,isLoading:isLoadingFbs,isError:isErrorFbs}=utils_useGetReservationGroups(),{data:reservationsPublizon,isLoading:isLoadingPublizon,isError:isErrorPublizon}=(0,publizon.ju)(),reservationsIsLoading=isLoadingFbs||isLoadingPublizon,reservationsIsError=isErrorFbs||isErrorPublizon,mappedReservationsFbs=reservationsFbs?(0,list_mapper.F9)(reservationsFbs):[],mappedReservationsPublizon=null!=reservationsPublizon&&reservationsPublizon.reservations?(0,list_mapper._P)(reservationsPublizon.reservations):[],reservations=[...mappedReservationsFbs,...mappedReservationsPublizon],reservationsReadyToLoanFBS=(0,helpers.S1)(mappedReservationsFbs),reservationsReadyToLoanPublizon=(0,helpers.S1)(mappedReservationsPublizon),reservationsReadyToLoan=[...reservationsReadyToLoanFBS,...reservationsReadyToLoanPublizon],reservationsQueuedFBS=getQueuedReservations(mappedReservationsFbs),reservationsQueuedPublizon=getQueuedReservations(mappedReservationsPublizon);return{all:{reservations,readyToLoan:reservationsReadyToLoan,queued:[...reservationsQueuedFBS,...reservationsQueuedPublizon],isLoading:reservationsIsLoading,isError:reservationsIsError},fbs:{reservations:mappedReservationsFbs,readyToLoan:reservationsReadyToLoanFBS,queued:reservationsQueuedFBS,isLoading:isLoadingFbs,isError:isErrorFbs},publizon:{reservations:mappedReservationsPublizon,readyToLoan:reservationsReadyToLoanPublizon,queued:reservationsQueuedPublizon,isLoading:isLoadingPublizon,isError:isErrorPublizon}}}},"./src/core/utils/withIsPatronBlockedHoc.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>utils_withIsPatronBlockedHoc});var react=__webpack_require__("./node_modules/react/index.js"),es=__webpack_require__("./node_modules/react-redux/es/index.js"),modal=__webpack_require__("./src/core/utils/modal.tsx"),utils_text=__webpack_require__("./src/core/utils/text.tsx"),BlockedTypes=function(BlockedTypes){return BlockedTypes.extendedExclusion="F",BlockedTypes.deceased="D",BlockedTypes.fee="E",BlockedTypes.selfcreated="W",BlockedTypes.stolen="O",BlockedTypes.exclusion="U",BlockedTypes.automatonBlocked="S",BlockedTypes}(BlockedTypes||{});const types_BlockedTypes=BlockedTypes;var url=__webpack_require__("./src/core/utils/url.tsx"),Link=__webpack_require__("./src/components/atoms/links/Link.tsx"),modal_helpers=__webpack_require__("./src/core/utils/helpers/modal-helpers.ts");const BlockedModal=({blockedStatus})=>{const t=(0,utils_text.X)(),blockedPatronELinkUrl=(0,url.J_)()("blockedPatronELinkUrl"),{blockedModal}=(0,modal_helpers.GM)();return react.createElement(modal.Z,{modalId:blockedModal,classNames:"modal-loan",closeModalAriaLabelText:t("blockedPatronCloseModalAriaLabelText"),screenReaderModalDescriptionText:t("blockedPatronModalAriaDescriptionText")},react.createElement("div",{className:"modal-text__container"},react.createElement("h2",{className:"text-header-h3"},t(`blockedPatron${blockedStatus}TitleText`)),react.createElement("p",{className:"mt-48 mb-48 text-body-large"},t(`blockedPatron${blockedStatus}BodyText`)),blockedStatus===types_BlockedTypes.fee&&react.createElement(Link.Z,{href:blockedPatronELinkUrl},t("blockedPatronELinkText"))))},blocked_modal_BlockedModal=BlockedModal;try{BlockedModal.displayName="BlockedModal",BlockedModal.__docgenInfo={description:"",displayName:"BlockedModal",props:{blockedStatus:{defaultValue:null,description:"",name:"blockedStatus",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/blocked-patron/blocked-modal/BlockedModal.tsx#BlockedModal"]={docgenInfo:BlockedModal.__docgenInfo,name:"BlockedModal",path:"src/components/blocked-patron/blocked-modal/BlockedModal.tsx#BlockedModal"})}catch(__react_docgen_typescript_loader_error){}var blockedModal_slice=__webpack_require__("./src/core/blockedModal.slice.ts"),store=__webpack_require__("./src/core/store.ts"),helpers_url=__webpack_require__("./src/core/utils/helpers/url.ts"),user=__webpack_require__("./src/core/utils/helpers/user.ts");const withIsPatronBlockedHoc=Component=>({redirectOnBlocked,...props})=>{const dispatch=(0,es.I0)(),{open}=(0,modal.f)(),{blockedModal}=(0,modal_helpers.GM)(),[blockedFromViewingContentArray]=(0,react.useState)([types_BlockedTypes.deceased,types_BlockedTypes.automatonBlocked,types_BlockedTypes.extendedExclusion,types_BlockedTypes.stolen]),[blockedStatus,setBlockedStatus]=(0,react.useState)(),[blockedFromViewingContent,setBlockedFromViewingContent]=(0,react.useState)(null),{data:patronData}=(0,user.dp)(),{data:{hasBeenVisible}}=(0,store.v9)((state=>state.blockedModal));return(0,react.useEffect)((()=>{var _patronData$patron,_patronData$patron2,_patronData$patron2$b;patronData&&(null!=patronData&&null!==(_patronData$patron=patronData.patron)&&void 0!==_patronData$patron&&_patronData$patron.blockStatus&&(null==patronData||null===(_patronData$patron2=patronData.patron)||void 0===_patronData$patron2||null===(_patronData$patron2$b=_patronData$patron2.blockStatus)||void 0===_patronData$patron2$b?void 0:_patronData$patron2$b.length)>0?(setBlockedStatus(patronData.patron.blockStatus[0].blockedReason),hasBeenVisible||"string"!=typeof blockedModal||(open(blockedModal),dispatch((0,blockedModal_slice.Og)({hasBeenVisible:!0})))):setBlockedFromViewingContent(!1))}),[blockedModal,dispatch,hasBeenVisible,open,patronData]),(0,react.useEffect)((()=>{blockedStatus&&(blockedFromViewingContentArray.includes(blockedStatus)?(setBlockedFromViewingContent(!0),(0,helpers_url.gB)(new URL(redirectOnBlocked))):setBlockedFromViewingContent(!1))}),[blockedFromViewingContentArray,blockedStatus,redirectOnBlocked]),react.createElement(react.Fragment,null,react.createElement(blocked_modal_BlockedModal,{blockedStatus:blockedStatus||""}),!blockedFromViewingContent&&react.createElement(Component,props))},utils_withIsPatronBlockedHoc=withIsPatronBlockedHoc;try{withIsPatronBlockedHoc.displayName="withIsPatronBlockedHoc",withIsPatronBlockedHoc.__docgenInfo={description:"",displayName:"withIsPatronBlockedHoc",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/utils/withIsPatronBlockedHoc.tsx#withIsPatronBlockedHoc"]={docgenInfo:withIsPatronBlockedHoc.__docgenInfo,name:"withIsPatronBlockedHoc",path:"src/core/utils/withIsPatronBlockedHoc.tsx#withIsPatronBlockedHoc"})}catch(__react_docgen_typescript_loader_error){}},"./src/core/utils/withSuffix.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_store__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/core/store.ts");const __WEBPACK_DEFAULT_EXPORT__=(Component,suffix,reduxAction)=>props=>{const pattern=new RegExp(`.*${suffix}$`,"g"),suffixEntries=Object.fromEntries(Object.entries(props).filter((([prop])=>String(prop).match(pattern)))),nonSuffixEntries=Object.fromEntries(Object.entries(props).filter((([prop])=>!String(prop).match(pattern))));return Object.keys(suffixEntries).length&&_store__WEBPACK_IMPORTED_MODULE_1__.h.dispatch(reduxAction({entries:suffixEntries})),react__WEBPACK_IMPORTED_MODULE_0__.createElement(Component,nonSuffixEntries)}},"./storybook-init-framework-entry.js":(__unused_webpack_module,__unused_webpack___webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__("./node_modules/@storybook/react/dist/esm/client/index.js")},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js!./.storybook/dev-fonts.scss":(module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/css-loader/dist/runtime/sourceMaps.js"),_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__),_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js"),___CSS_LOADER_EXPORT___=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__)()(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default());___CSS_LOADER_EXPORT___.push([module.id,"body{font-family:system-ui,Segoe UI,Roboto,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol}","",{version:3,sources:["webpack://./.storybook/dev-fonts.scss%23sass","webpack://./.storybook/dev-fonts.scss"],names:[],mappings:"AAAA,KACE,iHCCF",sourcesContent:['body {\n font-family: system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif,\n "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";\n}\n','body {\n font-family: system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif,\n "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";\n}\n'],sourceRoot:""}]);const __WEBPACK_DEFAULT_EXPORT__=___CSS_LOADER_EXPORT___},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js!./src/components/components.scss":(module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/css-loader/dist/runtime/sourceMaps.js"),_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__),_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js"),___CSS_LOADER_EXPORT___=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__)()(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default());___CSS_LOADER_EXPORT___.push([module.id,".dpl-reset{clip:auto;animation:none 0s ease 0s 1 normal none running;backface-visibility:visible;background:#0000 none repeat 0 0/auto auto padding-box border-box scroll;border:none;border-collapse:initial;border-image:none;border-radius:0;border-spacing:0;bottom:auto;box-shadow:none;box-sizing:initial;caption-side:top;clear:none;color:#000;column-fill:balance;column-gap:normal;column-rule:medium none currentColor;column-span:1;columns:auto;content:normal;counter-increment:none;counter-reset:none;cursor:auto;direction:ltr;display:inline;empty-cells:show;float:none;font-family:inherit;font-size:inherit;font-stretch:inherit;font-style:inherit;font-variant:inherit;font-weight:inherit;hyphens:none;left:auto;letter-spacing:normal;line-height:inherit;list-style:disc none outside;margin:0;max-height:none;max-width:none;min-height:0;min-width:0;opacity:1;orphans:2;outline:medium none invert;overflow:visible;overflow-x:visible;overflow-y:visible;padding:0;page-break-after:auto;page-break-before:auto;page-break-inside:auto;perspective:none;perspective-origin:50% 50%;position:static;right:auto;tab-size:8;table-layout:auto;text-align:left;text-align-last:auto;text-decoration:none;text-indent:0;text-shadow:none;text-transform:none;top:auto;transform:none;transform-origin:initial;transform-style:flat;transition:none 0s ease 0s;unicode-bidi:normal;vertical-align:initial;visibility:visible;white-space:normal;widows:2;word-spacing:normal;z-index:auto}:root{--reach-dialog:1}[data-reach-dialog-overlay]{background:#00000054;bottom:0;left:0;overflow:auto;position:fixed;right:0;top:0}[data-reach-dialog-content]{background:#fff;margin:10vh auto;outline:none;padding:2rem;width:50vw}","",{version:3,sources:["webpack://./src/components/reset.scss","webpack://./src/components/components.scss","webpack://./node_modules/@reach/dialog/styles.css"],names:[],mappings:"AAGA,WAgBE,SAAA,CClBF,+CDGE,CAEA,2BAAA,CACA,wEAAA,CAEA,WAAA,CACA,uBAAA,CACA,iBAAA,CACA,eAAA,CACA,gBAAA,CACA,WAAA,CACA,eAAA,CACA,kBAAA,CACA,gBAAA,CACA,UAAA,CAEA,UAAA,CAGA,mBAAA,CACA,iBAAA,CACA,oCAAA,CACA,aAAA,CACA,YAAA,CACA,cAAA,CACA,sBAAA,CACA,kBAAA,CACA,WAAA,CACA,aAAA,CACA,cAAA,CACA,gBAAA,CACA,UAAA,CACA,mBAAA,CACA,iBAAA,CAIA,oBAAA,CAHA,kBAAA,CACA,oBAAA,CACA,mBAAA,CAKA,YAAA,CACA,SAAA,CACA,qBAAA,CALA,mBAAA,CAMA,4BAAA,CACA,QAAA,CACA,eAAA,CACA,cAAA,CACA,YAAA,CACA,WAAA,CACA,SAAA,CACA,SAAA,CACA,0BAAA,CACA,gBAAA,CACA,kBAAA,CACA,kBAAA,CACA,SAAA,CACA,qBAAA,CACA,sBAAA,CACA,sBAAA,CACA,gBAAA,CACA,0BAAA,CACA,eAAA,CACA,UAAA,CAEA,UAAA,CACA,iBAAA,CACA,eAAA,CACA,oBAAA,CACA,oBAAA,CACA,aAAA,CACA,gBAAA,CACA,mBAAA,CACA,QAAA,CACA,cAAA,CACA,wBAAA,CACA,oBAAA,CACA,0BAAA,CACA,mBAAA,CACA,sBAAA,CACA,kBAAA,CACA,kBAAA,CACA,QAAA,CACA,mBAAA,CACA,YCHF,CClFA,MACC,gBDuFD,CCpFA,4BACC,oBAAA,CAIA,QAAA,CACA,MAAA,CACA,aAAA,CALA,cAAA,CAEA,OAAA,CADA,KD2FD,CCpFA,4BAGC,eAAA,CADA,gBAAA,CAGA,YAAA,CADA,YAAA,CAHA,UD2FD",sourcesContent:["// This is not to be extended!\n// When using it use it as a class on a DOM element.\n\n.dpl-reset {\n animation: none 0s ease 0s 1 normal none running;\n -webkit-backface-visibility: visible;\n backface-visibility: visible;\n background: transparent none repeat 0 0 / auto auto padding-box border-box\n scroll;\n border: medium none currentColor;\n border-collapse: separate;\n border-image: none;\n border-radius: 0;\n border-spacing: 0;\n bottom: auto;\n box-shadow: none;\n box-sizing: content-box;\n caption-side: top;\n clear: none;\n clip: auto;\n color: #000;\n columns: auto;\n column-count: auto;\n column-fill: balance;\n column-gap: normal;\n column-rule: medium none currentColor;\n column-span: 1;\n column-width: auto;\n content: normal;\n counter-increment: none;\n counter-reset: none;\n cursor: auto;\n direction: ltr;\n display: inline;\n empty-cells: show;\n float: none;\n font-family: inherit;\n font-size: inherit;\n font-style: inherit;\n font-variant: inherit;\n font-weight: inherit;\n font-stretch: inherit;\n line-height: inherit;\n -webkit-hyphens: none;\n -ms-hyphens: none;\n hyphens: none;\n left: auto;\n letter-spacing: normal;\n list-style: disc outside none;\n margin: 0;\n max-height: none;\n max-width: none;\n min-height: 0;\n min-width: 0;\n opacity: 1;\n orphans: 2;\n outline: medium none invert;\n overflow: visible;\n overflow-x: visible;\n overflow-y: visible;\n padding: 0;\n page-break-after: auto;\n page-break-before: auto;\n page-break-inside: auto;\n perspective: none;\n perspective-origin: 50% 50%;\n position: static;\n right: auto;\n -moz-tab-size: 8;\n tab-size: 8;\n table-layout: auto;\n text-align: left;\n text-align-last: auto;\n text-decoration: none;\n text-indent: 0;\n text-shadow: none;\n text-transform: none;\n top: auto;\n transform: none;\n transform-origin: 50% 50% 0;\n transform-style: flat;\n transition: none 0s ease 0s;\n unicode-bidi: normal;\n vertical-align: baseline;\n visibility: visible;\n white-space: normal;\n widows: 2;\n word-spacing: normal;\n z-index: auto;\n}\n",'@import "reset";\n@import "../../node_modules/@reach/dialog/styles";\n// Component specific styling should be included here:\n',"/* This code is subject to LICENSE in root of this repository */\n\n/* Used to detect in JavaScript if apps have loaded styles or not. */\n:root {\n\t--reach-dialog: 1;\n}\n\n[data-reach-dialog-overlay] {\n\tbackground: hsla(0, 0%, 0%, 0.33);\n\tposition: fixed;\n\ttop: 0;\n\tright: 0;\n\tbottom: 0;\n\tleft: 0;\n\toverflow: auto;\n}\n\n[data-reach-dialog-content] {\n\twidth: 50vw;\n\tmargin: 10vh auto;\n\tbackground: white;\n\tpadding: 2rem;\n\toutline: none;\n}\n"],sourceRoot:""}]);const __WEBPACK_DEFAULT_EXPORT__=___CSS_LOADER_EXPORT___},"./src sync recursive ^\\.(?:(?:^%7C\\/%7C(?:(?:(?%21(?:^%7C\\/)\\.).)*?)\\/)(?%21\\.)(?=.)[^/]*?\\.dev\\.(jsx%7Ctsx))$":(module,__unused_webpack_exports,__webpack_require__)=>{var map={"./apps/adgangsplatformen/auth.dev.jsx":"./src/apps/adgangsplatformen/auth.dev.jsx","./apps/adgangsplatformen/library-token.dev.tsx":"./src/apps/adgangsplatformen/library-token.dev.tsx","./apps/adgangsplatformen/user-token.dev.tsx":"./src/apps/adgangsplatformen/user-token.dev.tsx","./apps/advanced-search/AdvancedSearch.dev.tsx":"./src/apps/advanced-search/AdvancedSearch.dev.tsx","./apps/create-patron-user-info/CreatePatron.dev.tsx":"./src/apps/create-patron-user-info/CreatePatron.dev.tsx","./apps/dashboard/dashboard.dev.tsx":"./src/apps/dashboard/dashboard.dev.tsx","./apps/demo-modal/demo-modal.dev.tsx":"./src/apps/demo-modal/demo-modal.dev.tsx","./apps/favorites-list-material-component/FavoritesListMaterialComponent.dev.tsx":"./src/apps/favorites-list-material-component/FavoritesListMaterialComponent.dev.tsx","./apps/favorites-list/FavoritesList.dev.tsx":"./src/apps/favorites-list/FavoritesList.dev.tsx","./apps/fee-list/FeeList.dev.tsx":"./src/apps/fee-list/FeeList.dev.tsx","./apps/hello-world/hello-world.dev.tsx":"./src/apps/hello-world/hello-world.dev.tsx","./apps/loan-list/list/loan-list.dev.tsx":"./src/apps/loan-list/list/loan-list.dev.tsx","./apps/material/material.dev.tsx":"./src/apps/material/material.dev.tsx","./apps/menu/menu.dev.tsx":"./src/apps/menu/menu.dev.tsx","./apps/patron-page/PatronPage.dev.tsx":"./src/apps/patron-page/PatronPage.dev.tsx","./apps/recommender/Recommender.dev.tsx":"./src/apps/recommender/Recommender.dev.tsx","./apps/reservation-list/list/reservation-list.dev.tsx":"./src/apps/reservation-list/list/reservation-list.dev.tsx","./apps/search-header/search-header.dev.tsx":"./src/apps/search-header/search-header.dev.tsx","./apps/search-result/search-result.dev.tsx":"./src/apps/search-result/search-result.dev.tsx","./apps/something-similar/SomethingSimilar.dev.tsx":"./src/apps/something-similar/SomethingSimilar.dev.tsx","./components/alert/alert.dev.jsx":"./src/components/alert/alert.dev.jsx","./components/availability-label/availability-label.dev.tsx":"./src/components/availability-label/availability-label.dev.tsx","./components/button-favourite/button-favourite.dev.tsx":"./src/components/button-favourite/button-favourite.dev.tsx","./components/cover/cover.dev.tsx":"./src/components/cover/cover.dev.tsx","./components/find-on-shelf/FindOnShelfModal.dev.tsx":"./src/components/find-on-shelf/FindOnShelfModal.dev.tsx","./components/hello/hello.dev.tsx":"./src/components/hello/hello.dev.tsx","./components/message/modal-message/ModalMessage.dev.tsx":"./src/components/message/modal-message/ModalMessage.dev.tsx","./components/multiselect/Multiselect.dev.tsx":"./src/components/multiselect/Multiselect.dev.tsx","./components/search-bar/search-bar.dev.tsx":"./src/components/search-bar/search-bar.dev.tsx"};function webpackContext(req){var id=webpackContextResolve(req);return __webpack_require__(id)}function webpackContextResolve(req){if(!__webpack_require__.o(map,req)){var e=new Error("Cannot find module '"+req+"'");throw e.code="MODULE_NOT_FOUND",e}return map[req]}webpackContext.keys=function webpackContextKeys(){return Object.keys(map)},webpackContext.resolve=webpackContextResolve,module.exports=webpackContext,webpackContext.id="./src sync recursive ^\\.(?:(?:^%7C\\/%7C(?:(?:(?%21(?:^%7C\\/)\\.).)*?)\\/)(?%21\\.)(?=.)[^/]*?\\.dev\\.(jsx%7Ctsx))$"},'data:image/svg+xml;utf8, ':module=>{"use strict";module.exports='data:image/svg+xml;utf8, '},"?eecd":()=>{},"?4f7e":()=>{},"?9140":()=>{},"?22b2":()=>{},"?ed3f":()=>{},"?1d7f":()=>{},"?2b08":()=>{},"./generated-stories-entry.cjs":(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";module=__webpack_require__.nmd(module),(0,__webpack_require__("./node_modules/@storybook/react/dist/esm/client/index.js").configure)([__webpack_require__("./src sync recursive ^\\.(?:(?:^%7C\\/%7C(?:(?:(?%21(?:^%7C\\/)\\.).)*?)\\/)(?%21\\.)(?=.)[^/]*?\\.dev\\.(jsx%7Ctsx))$")],module,!1)},"./src/core/configuration/date-format.json":module=>{"use strict";module.exports=JSON.parse('{"d4":"DD. MM. YYYY","N1":"D. MMMM YYYY","d0":"YYYY-MM-DD"}')},"./src/core/configuration/modal-ids.json":module=>{"use strict";module.exports=JSON.parse('{"allLoansId":"all-loans-id","pauseReservation":"pause-reservation","deleteReservation":"delete-reservation","deleteReservations":"delete-reservations","loanDetails":"loan-details-","acceptModal":"accept-fee","reservationDetails":"reservation-details-","dueDateModal":"due-date","feeDetails":"fee-details-","userMenuAuthenticated":"user-modal-authenticated","userMenuAnonymous":"user-modal-anonymous","blockedModal":"blocked-modal","reservationsReady":"reservations-ready","reservationsQueued":"reservations-queued"}')}},__webpack_require__=>{var __webpack_exec__=moduleId=>__webpack_require__(__webpack_require__.s=moduleId);__webpack_require__.O(0,[748],(()=>(__webpack_exec__("./node_modules/@storybook/core-client/dist/esm/globals/polyfills.js"),__webpack_exec__("./node_modules/@storybook/core-client/dist/esm/globals/globals.js"),__webpack_exec__("./storybook-init-framework-entry.js"),__webpack_exec__("./node_modules/@storybook/react/dist/esm/client/docs/config-generated-config-entry.js"),__webpack_exec__("./node_modules/@storybook/react/dist/esm/client/preview/config-generated-config-entry.js"),__webpack_exec__("./node_modules/@storybook/addon-docs/preview.js-generated-config-entry.js"),__webpack_exec__("./node_modules/@storybook/addon-actions/preview.js-generated-config-entry.js"),__webpack_exec__("./node_modules/@storybook/addon-backgrounds/preview.js-generated-config-entry.js"),__webpack_exec__("./node_modules/@storybook/addon-measure/preview.js-generated-config-entry.js"),__webpack_exec__("./node_modules/@storybook/addon-outline/preview.js-generated-config-entry.js"),__webpack_exec__("./node_modules/@storybook/addon-queryparams/dist/esm/preset/addDecorator.js-generated-config-entry.js"),__webpack_exec__("./.storybook/preview.js-generated-config-entry.js"),__webpack_exec__("./generated-stories-entry.cjs"))));__webpack_require__.O()}]); \ No newline at end of file +(globalThis.webpackChunk_danskernesdigitalebibliotek_dpl_react=globalThis.webpackChunk_danskernesdigitalebibliotek_dpl_react||[]).push([[179],{"./.storybook/preview.js-generated-config-entry.js":(__unused_webpack_module,__unused_webpack___webpack_exports__,__webpack_require__)=>{"use strict";var preview_namespaceObject={};__webpack_require__.r(preview_namespaceObject),__webpack_require__.d(preview_namespaceObject,{decorators:()=>decorators});var ClientApi=__webpack_require__("./node_modules/@storybook/client-api/dist/esm/ClientApi.js"),injectStylesIntoStyleTag=__webpack_require__("./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),injectStylesIntoStyleTag_default=__webpack_require__.n(injectStylesIntoStyleTag),styleDomAPI=__webpack_require__("./node_modules/style-loader/dist/runtime/styleDomAPI.js"),styleDomAPI_default=__webpack_require__.n(styleDomAPI),insertBySelector=__webpack_require__("./node_modules/style-loader/dist/runtime/insertBySelector.js"),insertBySelector_default=__webpack_require__.n(insertBySelector),setAttributesWithoutAttributes=__webpack_require__("./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js"),setAttributesWithoutAttributes_default=__webpack_require__.n(setAttributesWithoutAttributes),insertStyleElement=__webpack_require__("./node_modules/style-loader/dist/runtime/insertStyleElement.js"),insertStyleElement_default=__webpack_require__.n(insertStyleElement),styleTagTransform=__webpack_require__("./node_modules/style-loader/dist/runtime/styleTagTransform.js"),styleTagTransform_default=__webpack_require__.n(styleTagTransform),dev_fonts=__webpack_require__("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js!./.storybook/dev-fonts.scss"),options={};options.styleTagTransform=styleTagTransform_default(),options.setAttributes=setAttributesWithoutAttributes_default(),options.insert=insertBySelector_default().bind(null,"head"),options.domAPI=styleDomAPI_default(),options.insertStyleElement=insertStyleElement_default();injectStylesIntoStyleTag_default()(dev_fonts.Z,options);dev_fonts.Z&&dev_fonts.Z.locals&&dev_fonts.Z.locals;var components=__webpack_require__("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js!./src/components/components.scss"),components_options={};components_options.styleTagTransform=styleTagTransform_default(),components_options.setAttributes=setAttributesWithoutAttributes_default(),components_options.insert=insertBySelector_default().bind(null,"head"),components_options.domAPI=styleDomAPI_default(),components_options.insertStyleElement=insertStyleElement_default();injectStylesIntoStyleTag_default()(components.Z,components_options);components.Z&&components.Z.locals&&components.Z.locals;__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/css/base.css");var token=__webpack_require__("./src/core/token.js"),react=__webpack_require__("./node_modules/react/index.js"),react_dom=__webpack_require__("./node_modules/react-dom/index.js"),react_error_boundary_umd=__webpack_require__("./node_modules/react-error-boundary/dist/react-error-boundary.umd.js"),prop_types=__webpack_require__("./node_modules/prop-types/index.js"),prop_types_default=__webpack_require__.n(prop_types),es=__webpack_require__("./node_modules/react-redux/es/index.js"),integration_react=__webpack_require__("./node_modules/redux-persist/es/integration/react.js"),react_query_es=__webpack_require__("./node_modules/react-query/es/index.js"),store=__webpack_require__("./src/core/store.ts"),FetcherHttpError=__webpack_require__("./src/core/fetchers/FetcherHttpError.ts"),FetcherError=__webpack_require__("./src/core/fetchers/FetcherError.ts"),FetcherCriticalHttpError=__webpack_require__("./src/core/fetchers/FetcherCriticalHttpError.ts"),InvalidUrlError=__webpack_require__("./src/core/errors/InvalidUrlError.ts");const queryErrorHandler=error=>!(error instanceof FetcherHttpError.Z||error instanceof FetcherCriticalHttpError.Z||error instanceof FetcherError.Z||error instanceof InvalidUrlError.Z)||error.useErrorBoundary,queryClient=new react_query_es.QueryClient({defaultOptions:{queries:{staleTime:12e4,useErrorBoundary:queryErrorHandler},mutations:{useErrorBoundary:queryErrorHandler}}}),Store=({children})=>react.createElement(es.zt,{store:store.h},react.createElement(react_query_es.QueryClientProvider,{client:queryClient},react.createElement(integration_react.r,{persistor:store.Dj},children)));Store.propTypes={children:prop_types_default().node.isRequired};const components_store=Store;var reach_alert_esm=__webpack_require__("./node_modules/@reach/alert/dist/reach-alert.esm.js"),utils_text=__webpack_require__("./src/core/utils/text.tsx");const ErrorBoundaryAlert=({className,type,variant,resetErrorBoundary})=>{const t=(0,utils_text.X)();return react.createElement(reach_alert_esm.Z,{className:`dpl-alert dpl-alert--${variant} ${className}`,type},react.createElement(react.Fragment,null,t("alertErrorMessageText"),react.createElement("button",{type:"button","aria-label":t("closeErrorWindow"),onClick:resetErrorBoundary},"(",t("alertErrorCloseText"),")")))},error_boundary_alert_ErrorBoundaryAlert=ErrorBoundaryAlert;try{ErrorBoundaryAlert.displayName="ErrorBoundaryAlert",ErrorBoundaryAlert.__docgenInfo={description:"A simple alert that serves as the foundation of all alerts.",displayName:"ErrorBoundaryAlert",props:{className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string | undefined"}},type:{defaultValue:null,description:"",name:"type",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"assertive"'},{value:'"polite"'}]}},variant:{defaultValue:null,description:"",name:"variant",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"info"'},{value:'"success"'},{value:'"warning"'},{value:'"blank"'}]}},resetErrorBoundary:{defaultValue:null,description:"",name:"resetErrorBoundary",required:!0,type:{name:"() => void"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/error-boundary-alert/ErrorBoundaryAlert.tsx#ErrorBoundaryAlert"]={docgenInfo:ErrorBoundaryAlert.__docgenInfo,name:"ErrorBoundaryAlert",path:"src/components/error-boundary-alert/ErrorBoundaryAlert.tsx#ErrorBoundaryAlert"})}catch(__react_docgen_typescript_loader_error){}var modal_slice=__webpack_require__("./src/core/modal.slice.ts");function mount(context){if(!context)return;context.querySelectorAll("[data-dpl-app]").forEach((app=>setTimeout((()=>function mountApp(container){var _container$dataset,_window$dplReact,_window$dplReact$apps;const appName=null==container||null===(_container$dataset=container.dataset)||void 0===_container$dataset?void 0:_container$dataset.dplApp,app=null===(_window$dplReact=window.dplReact)||void 0===_window$dplReact||null===(_window$dplReact$apps=_window$dplReact.apps)||void 0===_window$dplReact$apps?void 0:_window$dplReact$apps[appName];app&&(0,react_dom.render)((0,react.createElement)(components_store,{},(0,react.createElement)((0,react_error_boundary_umd.withErrorBoundary)(app,{FallbackComponent:error_boundary_alert_ErrorBoundaryAlert,onError(error,info){console.error(error,info)}}),{...container.dataset})),container)}(app)),0)))}function unmount(context){if(!context)return;context.querySelectorAll("[data-dpl-app]").forEach((function unMountApp(container){container.innerHTML=""}))}function mount_reset(){return store.Dj.purge()}!function init(){document.addEventListener("keydown",(e=>{"Escape"===e.key&&store.h.dispatch((0,modal_slice.jQ)())}));const initial={apps:{},setToken:token.o4,mount,unmount,reset:mount_reset};window.dplReact={...window.dplReact||{},...initial}}();__webpack_require__("./src/core/user.slice.js");var process=__webpack_require__("./node_modules/process/browser.js");const getSessionStorage=type=>window.sessionStorage.getItem(type),userToken=process.env.STORYBOOK_USER_TOKEN??getSessionStorage(token.b4),libraryToken=process.env.STORYBOOK_LIBRARY_TOKEN??getSessionStorage(token.t8);userToken&&(0,token.o4)(token.b4,userToken),libraryToken&&(0,token.o4)(token.t8,libraryToken),!libraryToken&&userToken&&(0,token.o4)(token.t8,userToken);const App=({story})=>{return react.createElement(components_store,null,(app=story,(0,react_error_boundary_umd.withErrorBoundary)(app,{FallbackComponent:error_boundary_alert_ErrorBoundaryAlert,onError(error,info){console.error(error,info)}})));var app},decorators=[Story=>react.createElement(react.Fragment,null,react.createElement(App,{story:Story}))];function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter((function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable}))),keys.push.apply(keys,symbols)}return keys}function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}Object.keys(preview_namespaceObject).forEach((function(key){var value=preview_namespaceObject[key];switch(key){case"args":return(0,ClientApi.uc)(value);case"argTypes":return(0,ClientApi.v9)(value);case"decorators":return value.forEach((function(decorator){return(0,ClientApi.$9)(decorator,!1)}));case"loaders":return value.forEach((function(loader){return(0,ClientApi.HZ)(loader,!1)}));case"parameters":return(0,ClientApi.h1)(function _objectSpread(target){for(var i=1;i{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{SignIn:()=>SignIn,default:()=>auth_dev});var react=__webpack_require__("./node_modules/react/index.js"),es=__webpack_require__("./node_modules/react-redux/es/index.js"),unfetch_module=__webpack_require__("./node_modules/unfetch/dist/unfetch.module.js"),core_token=__webpack_require__("./src/core/token.js"),user_slice=__webpack_require__("./src/core/user.slice.js");const ORIGIN=window.location.origin,PATHNAME=window.location.pathname.replace("/iframe.html","/"),REDIRECT_URL=`${ORIGIN}${PATHNAME}?path=/story/sb-utilities-adgangsplatformen--sign-in`;const auth=function Auth(){const dispatch=(0,es.I0)(),status=(0,es.v9)((s=>s.user.status)),handleCleanUp=(0,react.useCallback)((()=>{window.sessionStorage.removeItem(core_token.b4),dispatch((0,user_slice.ig)())}),[dispatch]);return react.useEffect((()=>{const code=new URLSearchParams(window.location.search).get("code");code&&(0,unfetch_module.Z)("https://login.bib.dk/oauth/token",{method:"POST",headers:{},body:new URLSearchParams({grant_type:"authorization_code",code,client_id:"",client_secret:"secret",redirect_uri:REDIRECT_URL})}).then((res=>res.json())).then((res=>{if(null==res||!res.access_token)throw res;window.sessionStorage.setItem(core_token.b4,res.access_token),(0,core_token.o4)(core_token.b4,res.access_token),(0,core_token.o4)(core_token.t8,res.access_token),dispatch((0,user_slice.Ot)())})).catch((err=>{console.error(err),handleCleanUp()}))}),[dispatch,handleCleanUp]),react.createElement("div",{style:{width:"300px"}},react.createElement("h2",null,"Adgangsplatformen"),react.createElement("h5",null,"Status:","authenticated"===status?react.createElement("span",{style:{color:"green"}}," Signed in"):react.createElement("span",{style:{color:"red"}}," Signed out")),react.createElement("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gridColumnGap:10}},react.createElement("button",{type:"button",onClick:()=>{window.parent.location.href=`https://login.bib.dk/oauth/authorize?response_type=code&client_id=&redirect_uri=${REDIRECT_URL}`},style:{width:"100%"}},"Sign in"),react.createElement("button",{type:"button",onClick:()=>{handleCleanUp();const token=(0,core_token.LP)(core_token.b4);window.parent.location.href=`https://login.bib.dk/logout/?access_token=${token}`},style:{width:"100%"}},"Sign out")))},auth_dev={title:"SB Utilities / Adgangsplatformen"},SignIn=(args=>react.createElement(auth,args)).bind({})},"./src/apps/adgangsplatformen/library-token.dev.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{LibraryTokenApp:()=>LibraryTokenApp,default:()=>library_token_dev});var react=__webpack_require__("./node_modules/react/index.js"),es=__webpack_require__("./node_modules/react-query/es/index.js"),token=__webpack_require__("./src/core/token.js");const library_token=()=>{const[inputValue,setInputValue]=(0,react.useState)(""),[shouldShowSuccessMessage,setShowSuccessMessage]=(0,react.useState)(!1),queryClient=(0,es.useQueryClient)(),setInputValueHandler=(0,react.useCallback)((event=>{const{target:{value:token}}=event;setInputValue(token)}),[setInputValue]),setLibraryTokenHandler=(0,react.useCallback)((()=>{window.sessionStorage.setItem(token.t8,inputValue),(0,token.o4)(token.t8,inputValue),setShowSuccessMessage(!0),queryClient.clear()}),[queryClient,inputValue]);return react.createElement("div",{className:"p-8"},react.createElement("p",null,"Insert Library token:"),react.createElement("input",{className:"mt-8 mr-8",value:inputValue,onChange:setInputValueHandler,size:41}),react.createElement("button",{type:"submit",onClick:setLibraryTokenHandler},"Save"),react.createElement("p",{className:"text-small-caption mt-8"},"In order to test apps for anonymous users,",react.createElement("br",null),"you can insert a library token in this field."),shouldShowSuccessMessage&&react.createElement("p",{className:"text-small-caption mt-8"},"The token was saved"))};try{librarytoken.displayName="librarytoken",librarytoken.__docgenInfo={description:"This component is only to be used in Storybook context.\nLike the auth component it offers a way to set the needed context\nin order for the apps to be able to operate properly.\n\nThis component offers a way to set the current library token.",displayName:"librarytoken",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/adgangsplatformen/library-token.tsx#librarytoken"]={docgenInfo:librarytoken.__docgenInfo,name:"librarytoken",path:"src/apps/adgangsplatformen/library-token.tsx#librarytoken"})}catch(__react_docgen_typescript_loader_error){}const library_token_dev={title:"SB Utilities / Set Library Token",component:library_token},LibraryTokenApp=()=>react.createElement(library_token,null)},"./src/apps/adgangsplatformen/user-token.dev.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{UserTokenApp:()=>UserTokenApp,default:()=>user_token_dev});var react=__webpack_require__("./node_modules/react/index.js"),es=__webpack_require__("./node_modules/react-query/es/index.js"),token=__webpack_require__("./src/core/token.js");const user_token=()=>{const[inputValue,setInputValue]=(0,react.useState)(""),[shouldShowSuccessMessage,setShowSuccessMessage]=(0,react.useState)(!1),queryClient=(0,es.useQueryClient)(),setInputValueHandler=(0,react.useCallback)((event=>{const{target:{value:token}}=event;setInputValue(token)}),[setInputValue]),setUserTokenHandler=(0,react.useCallback)((()=>{window.sessionStorage.setItem(token.b4,inputValue),(0,token.o4)(token.b4,inputValue),setShowSuccessMessage(!0),queryClient.clear()}),[queryClient,inputValue]);return react.createElement("div",{className:"p-8"},react.createElement("p",null,"Insert User token:"),react.createElement("input",{className:"mt-8 mr-8",value:inputValue,onChange:setInputValueHandler,size:41}),react.createElement("button",{type:"submit",onClick:setUserTokenHandler},"Save"),react.createElement("p",{className:"text-small-caption mt-8"},"In order to test apps for logged in users,",react.createElement("br",null),"you can insert a user token in this field."),shouldShowSuccessMessage&&react.createElement("p",{className:"text-small-caption mt-8"},"The token was saved"))};try{usertoken.displayName="usertoken",usertoken.__docgenInfo={description:"This component is only to be used in Storybook context.\nLike the auth component it offers a way to set the needed context\nin order for the apps to be able to operate properly.\n\nThis component offers a way to set the current user token.",displayName:"usertoken",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/adgangsplatformen/user-token.tsx#usertoken"]={docgenInfo:usertoken.__docgenInfo,name:"usertoken",path:"src/apps/adgangsplatformen/user-token.tsx#usertoken"})}catch(__react_docgen_typescript_loader_error){}const user_token_dev={title:"SB Utilities / Set User Token",component:user_token},UserTokenApp=()=>react.createElement(user_token,null)},"./src/apps/advanced-search/AdvancedSearch.dev.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{AdvancedSearch:()=>AdvancedSearch_dev_AdvancedSearch,default:()=>AdvancedSearch_dev});var react=__webpack_require__("./node_modules/react/index.js"),serviceUrlArgs=__webpack_require__("./src/core/storybook/serviceUrlArgs.ts"),guarded_app=__webpack_require__("./src/components/guarded-app.tsx"),config=__webpack_require__("./src/core/utils/config.tsx"),general=__webpack_require__("./src/core/utils/helpers/general.ts"),utils_text=__webpack_require__("./src/core/utils/text.tsx"),url=__webpack_require__("./src/core/utils/url.tsx"),useEffectOnce=__webpack_require__("./node_modules/react-use/esm/useEffectOnce.js"),ExpandMore=(__webpack_require__("./node_modules/core-js/modules/esnext.string.at.js"),__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/ExpandMore.svg")),ExpandMore_default=__webpack_require__.n(ExpandMore),MinusButton=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/MinusButton.svg"),MinusButton_default=__webpack_require__.n(MinusButton),PlusButton=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/PlusButton.svg"),PlusButton_default=__webpack_require__.n(PlusButton),clsx=__webpack_require__("./node_modules/clsx/dist/clsx.mjs");const advancedSearchIndexes=["all","creator","subject","genre","language","date","mainCreator","mainTitle","source","dateFirstEdition","decimaldk5","type","audience","publisher","identifier","acSource"],advancedSearchIndexTranslations={all:"advancedSearchAllIndexesText",creator:"advancedSearchCreatorText",subject:"advancedSearchSubjectText",genre:"advancedSearchGenreText",language:"advancedSearchLanguageText",date:"advancedSearchDateText",mainCreator:"advancedSearchMainCreatorText",mainTitle:"advancedSearchMainTitleText",source:"advancedSearchSourceText",dateFirstEdition:"advancedSearchDateFirstEditionText",decimaldk5:"advancedSearchDecimalDk5Text",type:"advancedSearchTypeText",audience:"advancedSearchAudienceText",publisher:"advancedSearchPublisherText",identifier:"advancedSearchIdentifierText",acSource:"advancedSearchAcSourceText"},advancedSearchClauses=[{value:"AND",translation:"clauseAndText"},{value:"OR",translation:"clauseOrText"},{value:"NOT",translation:"clauseNotText"}],initialAdvancedSearchQuery={rows:[{term:"",searchIndex:"all",clause:advancedSearchClauses[0],id:0},{term:"",searchIndex:"all",clause:advancedSearchClauses[0],id:1}],filters:{materialTypes:[{item:"All",value:"all"}],fiction:[{item:"All",value:"all"}],accessibility:[{item:"All",value:"all"}]}},advancedSearchMaterialTypes=[{item:"advancedSearchFilterBookText",value:"bøger"},{item:"advancedSearchFilterEbookText",value:"e-bøger"},{item:"advancedSearchFilterAudioBookText",value:"lydbøger"},{item:"advancedSearchFilterArticleText",value:"artikler"},{item:"advancedSearchFilterMovieText",value:"film"},{item:"advancedSearchFilterMusicText",value:"musik"}],advancedSearchAccessibility=[{item:"advancedSearchFilterPhysicalText",value:"fysisk"},{item:"advancedSearchFilterOnlineText",value:"online"}],advancedSearchFiction=[{item:"advancedSearchFilterFictionText",value:"fiction"},{item:"advancedSearchFilterNonFictionText",value:"nonfiction"}],advancedSearchFilters={materialTypes:"generalmaterialtype",fiction:"fictionnonfiction",accessibility:"accesstype"},AdvancedSearchRow=({dataCy="advanced-search-row",data,rowIndex,setSearchObject})=>{const t=(0,utils_text.X)(),updateRowData=(rowAspect,update,updateData)=>{const newData={...data};newData.rows[rowIndex][rowAspect]=update,updateData(newData)};return react.createElement(react.Fragment,null,rowIndex>0&&react.createElement("div",{className:"advanced-search__clauses","data-cy":"clauses"},advancedSearchClauses.map((clause=>{return react.createElement("button",{key:`${rowIndex}-${clause.value}`,"data-cy":`clause-${clause.value}`,type:"button",className:(clickedClause=clause.value,currentClause=data.rows[rowIndex].clause.value,(0,clsx.Z)("advanced-search__clause focus-styling cursor-pointer capitalize-all",{"advanced-search__clause--grey":currentClause!==clickedClause})),onClick:()=>{updateRowData("clause",clause,setSearchObject)}},t(clause.translation));var clickedClause,currentClause}))),react.createElement("div",{className:"input-with-dropdown","data-cy":dataCy},react.createElement("input",{className:"input-with-dropdown__input focus-styling__input capitalize-first",type:"text",placeholder:t("advancedSearchInputPlaceholderText"),value:data.rows[rowIndex].term,onChange:e=>{updateRowData("term",e.target.value,setSearchObject)}}),react.createElement("div",{className:"dropdown dropdown--grey-borders input-with-dropdown__dropdown"},react.createElement("select",{className:"dropdown__select dropdown__select--inline focus-styling","aria-label":"input field dropdown",value:data.rows[rowIndex].searchIndex,onChange:e=>{updateRowData("searchIndex",e.target.value,setSearchObject)}},advancedSearchIndexes.map((index=>react.createElement("option",{key:index,className:"dropdown__option",value:index},t(advancedSearchIndexTranslations[index]))))),react.createElement("div",{className:"dropdown__arrows dropdown__arrows--inline"},react.createElement("img",{className:"dropdown__arrow",src:ExpandMore_default(),alt:""}))),data.rows.length>1&&react.createElement("button",{type:"button",onClick:()=>{((index,updateData)=>{const newData={...data};newData.rows.splice(index,1),updateData(newData)})(rowIndex,setSearchObject)}},react.createElement("img",{className:"input-with-dropdown__icon",src:MinusButton_default(),alt:""}))),rowIndex===data.rows.length-1&&react.createElement("button",{type:"button",className:"advanced-search__clauses cursor-pointer",onClick:()=>{(updateData=>{const newData={...data};newData.rows.push(structuredClone(initialAdvancedSearchQuery.rows.at(0))),newData.rows[newData.rows.length-1].id=newData.rows[newData.rows.length-2].id+1,updateData(newData)})(setSearchObject)},"data-cy":"advanced-search-add-row"},react.createElement("img",{className:"mr-8",src:PlusButton_default(),alt:""}),t("advancedSearchAddRowText")))},advanced_search_AdvancedSearchRow=AdvancedSearchRow;try{AdvancedSearchRow.displayName="AdvancedSearchRow",AdvancedSearchRow.__docgenInfo={description:"",displayName:"AdvancedSearchRow",props:{data:{defaultValue:null,description:"",name:"data",required:!0,type:{name:"AdvancedSearchQuery"}},dataCy:{defaultValue:{value:"advanced-search-row"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}},rowIndex:{defaultValue:null,description:"",name:"rowIndex",required:!0,type:{name:"number"}},setSearchObject:{defaultValue:null,description:"",name:"setSearchObject",required:!0,type:{name:"(searchObject: AdvancedSearchQuery) => void"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/advanced-search/AdvancedSearchRow.tsx#AdvancedSearchRow"]={docgenInfo:AdvancedSearchRow.__docgenInfo,name:"AdvancedSearchRow",path:"src/apps/advanced-search/AdvancedSearchRow.tsx#AdvancedSearchRow"})}catch(__react_docgen_typescript_loader_error){}var useCopyToClipboard=__webpack_require__("./node_modules/react-use/esm/useCopyToClipboard.js"),Check=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/Check.svg"),Check_default=__webpack_require__.n(Check);const PreviewSection=({dataCy="preview-section",translatedCql,reset,isMobile,setIsFormMode})=>{const t=(0,utils_text.X)(),[,copy]=(0,useCopyToClipboard.Z)(),[copiedToClipboard,setCopiedToClipboard]=(0,react.useState)(!1);return(0,react.useEffect)((()=>(copiedToClipboard&&setTimeout((()=>{setCopiedToClipboard(!1)}),2e3),()=>{})),[copiedToClipboard]),react.createElement("div",{"data-cy":dataCy,className:(0,clsx.Z)("pagefold-parent--large input-and-preview__preview",{"input-and-preview__preview--mobile":isMobile})},react.createElement("div",{className:"pagefold-triangle--large pagefold-inherit-parent"}),react.createElement("h3",{className:"text-body-medium-medium mb-24 capitalize-first"},t("advancedSearchPreviewHeadlineText")),react.createElement("p",{"data-cy":`${dataCy}-preview`,className:"text-body-medium-regular mb-32"},translatedCql||t("advancedSearchPreviewEmptyText")),react.createElement("section",null,react.createElement("button",{type:"button",className:"link-tag mr-16 cursor-pointer capitalize-first",onClick:()=>reset(),"data-cy":"advanced-search-reset"},t("advancedSearchResetText")),translatedCql&&react.createElement("button",{type:"button",className:(0,clsx.Z)("link-tag mr-16 capitalize-first",{"cursor-pointer":!copiedToClipboard}),onClick:()=>{copy(translatedCql),setCopiedToClipboard(!0)},onKeyUp:e=>{"Enter"===e.key&&(copy(translatedCql),setCopiedToClipboard(!0))}},copiedToClipboard&&react.createElement(react.Fragment,null,t("copiedToClipboardText"),react.createElement("img",{className:"inline-icon",src:Check_default(),alt:""})),!copiedToClipboard&&t("advancedSearchCopyStringText")),react.createElement("button",{type:"button",className:"link-tag link-tag cursor-pointer capitalize-first",onClick:()=>setIsFormMode(!1),onKeyUp:e=>"Enter"===e.key??setIsFormMode(!1),"data-cy":"advanced-search-edit-cql"},t("advancedSearchEditCqlText"))))},advanced_search_PreviewSection=PreviewSection;try{PreviewSection.displayName="PreviewSection",PreviewSection.__docgenInfo={description:"",displayName:"PreviewSection",props:{dataCy:{defaultValue:{value:"preview-section"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}},translatedCql:{defaultValue:null,description:"",name:"translatedCql",required:!0,type:{name:"string"}},reset:{defaultValue:null,description:"",name:"reset",required:!0,type:{name:"() => void"}},isMobile:{defaultValue:null,description:"",name:"isMobile",required:!1,type:{name:"boolean | undefined"}},setIsFormMode:{defaultValue:null,description:"",name:"setIsFormMode",required:!0,type:{name:"(newState: boolean) => void"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/advanced-search/PreviewSection.tsx#PreviewSection"]={docgenInfo:PreviewSection.__docgenInfo,name:"PreviewSection",path:"src/apps/advanced-search/PreviewSection.tsx#PreviewSection"})}catch(__react_docgen_typescript_loader_error){}var Multiselect=__webpack_require__("./src/components/multiselect/Multiselect.tsx");const CqlSearchHeader=({dataCy="cql-search-header",initialCql,setCql})=>{const t=(0,utils_text.X)();return(0,react.useEffect)((()=>{""!==initialCql.trim()&&setCql(initialCql)}),[initialCql,setCql]),react.createElement(react.Fragment,null,react.createElement("h1",{className:"text-header-h2 advanced-search__title capitalize-first","data-cy":dataCy},t("cqlSearchTitleText")),react.createElement("textarea",{className:"advanced-search__cql-input focus-styling__input",cols:100,rows:5,placeholder:"e.g. title=snemand*","data-cy":`${dataCy}-input`,onChange:e=>setCql(e.target.value),defaultValue:initialCql}))},advanced_search_CqlSearchHeader=CqlSearchHeader;try{CqlSearchHeader.displayName="CqlSearchHeader",CqlSearchHeader.__docgenInfo={description:"",displayName:"CqlSearchHeader",props:{dataCy:{defaultValue:{value:"cql-search-header"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}},initialCql:{defaultValue:null,description:"",name:"initialCql",required:!0,type:{name:"string"}},setCql:{defaultValue:null,description:"",name:"setCql",required:!0,type:{name:"(newState: string) => void"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/advanced-search/CqlSearchHeader.tsx#CqlSearchHeader"]={docgenInfo:CqlSearchHeader.__docgenInfo,name:"CqlSearchHeader",path:"src/apps/advanced-search/CqlSearchHeader.tsx#CqlSearchHeader"})}catch(__react_docgen_typescript_loader_error){}const translateFiltersToCql=filtersToTranslate=>Object.keys(filtersToTranslate).map((key=>filtersToTranslate[key])).reduce(((acc,curr,index)=>{return acc+(filterToTranslate=curr,cqlKey=Object.keys(filtersToTranslate)[index],filterToTranslate.reduce(((acc,curr)=>{let filterTranslation="";const relation=""===acc.trim()?" AND":" OR";return"all"===curr.value?`${acc}`:(filterTranslation=filterTranslation.concat(relation,` ${advancedSearchFilters[cqlKey]}=`,`'${curr.value}'`),acc+filterTranslation)}),""));var filterToTranslate,cqlKey}),""),translateSearchObjectToCql=searchObject=>searchObject.rows.reduce(((acc,curr)=>{let rowTranslation="";return""!==acc&&""!==curr.term.trim()&&(rowTranslation=rowTranslation.concat(" ",curr.clause.value)),"all"!==curr.searchIndex&&""!==curr.term.trim()&&(rowTranslation=rowTranslation.concat(" ",curr.searchIndex,"=")),""!==curr.term&&(rowTranslation=rowTranslation.concat((currentText=>{let space="";switch(currentText.trim()){case"":space="";break;default:if(currentText.trim().endsWith("=")){space="";break}space=" "}return space})(acc),"'",curr.term,"'")),acc+rowTranslation}),"")+translateFiltersToCql(searchObject.filters);try{translateSearchObjectToCql.displayName="translateSearchObjectToCql",translateSearchObjectToCql.__docgenInfo={description:"",displayName:"translateSearchObjectToCql",props:{rows:{defaultValue:null,description:"",name:"rows",required:!0,type:{name:"AdvancedSearchRowData[]"}},filters:{defaultValue:null,description:"",name:"filters",required:!0,type:{name:"AdvancedSearchFilterData"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/advanced-search/helpers.tsx#translateSearchObjectToCql"]={docgenInfo:translateSearchObjectToCql.__docgenInfo,name:"translateSearchObjectToCql",path:"src/apps/advanced-search/helpers.tsx#translateSearchObjectToCql"})}catch(__react_docgen_typescript_loader_error){}var Button=__webpack_require__("./src/components/Buttons/Button.tsx");const AdvancedSearchHeader=({dataCy="advanced-search-header",searchQuery,setSearchQuery,searchObject,setSearchObject})=>{const t=(0,utils_text.X)(),[isFormMode,setIsFormMode]=(0,react.useState)(!0),[internalSearchObject,setInternalSearchObject]=(0,react.useState)(searchObject||structuredClone(initialAdvancedSearchQuery)),[previewCql,setPreviewCql]=(0,react.useState)(searchQuery||""),[rawCql,setRawCql]=(0,react.useState)("");(0,react.useEffect)((()=>{null!==searchObject&&setInternalSearchObject(searchObject)}),[searchObject]),(0,react.useEffect)((()=>{const cql=translateSearchObjectToCql(internalSearchObject);setPreviewCql(cql)}),[internalSearchObject]);const updateFiltersData=filtersUpdate=>{if(null==internalSearchObject||!internalSearchObject.filters[filtersUpdate.key].length)return;const newSearchObject={...internalSearchObject};newSearchObject.filters={...newSearchObject.filters,[filtersUpdate.key]:filtersUpdate.value},setInternalSearchObject(newSearchObject)},reset=()=>{setSearchObject(structuredClone(initialAdvancedSearchQuery))},scrollToResults=()=>{const element=document.getElementById("advanced-search-result");element&&element.scrollIntoView({behavior:"smooth"})},[isSearchButtonDisabled,setIsSearchButtonDisabled]=(0,react.useState)(!0),translatedCql=previewCql||searchQuery||"";return(0,react.useEffect)((()=>{searchQuery&&!searchObject&&setIsFormMode(!1)}),[searchObject,searchQuery]),(0,react.useEffect)((()=>{var object,cql;setIsSearchButtonDisabled((object=internalSearchObject,cql=rawCql,!0===isFormMode?!(object&&object.rows.find((row=>""!==row.term))):""===cql.trim()))}),[internalSearchObject,rawCql,isFormMode]),react.createElement(react.Fragment,null,isFormMode&&react.createElement(react.Fragment,null,react.createElement("h1",{className:"text-header-h2 advanced-search__title capitalize-first"},t("advancedSearchTitleText")),react.createElement("div",{className:"input-and-preview"},react.createElement("div",{className:"input-and-preview__input"},internalSearchObject.rows.map(((row,index)=>react.createElement(advanced_search_AdvancedSearchRow,{key:row.id,data:internalSearchObject,rowIndex:index,setSearchObject:setInternalSearchObject,dataCy:`${dataCy}-row`})))),react.createElement(advanced_search_PreviewSection,{translatedCql,reset,setIsFormMode})),react.createElement("section",{className:"advanced-search__filters"},react.createElement("div",{className:"advanced-search__filter"},react.createElement(Multiselect.Z,{caption:t("advancedSearchFilterMaterialTypeText"),options:advancedSearchMaterialTypes,defaultValue:internalSearchObject.filters.materialTypes,updateExternalState:{key:"materialTypes",externalUpdateFunction:updateFiltersData},dataCy:"advanced-search-material-types"})),react.createElement("div",{className:"advanced-search__filter"},react.createElement(Multiselect.Z,{caption:t("advancedSearchFilterLiteratureFormText"),options:advancedSearchFiction,defaultValue:internalSearchObject.filters.fiction,updateExternalState:{key:"fiction",externalUpdateFunction:updateFiltersData},dataCy:"advanced-search-fiction"})),react.createElement("div",{className:"advanced-search__filter"},react.createElement(Multiselect.Z,{caption:t("advancedSearchFilterAccessText"),options:advancedSearchAccessibility,defaultValue:internalSearchObject.filters.accessibility,updateExternalState:{key:"accessibility",externalUpdateFunction:updateFiltersData},dataCy:"advanced-search-accessibility"}))),react.createElement(advanced_search_PreviewSection,{translatedCql,reset,isMobile:!0,setIsFormMode})),!isFormMode&&react.createElement(advanced_search_CqlSearchHeader,{initialCql:translatedCql,setCql:setRawCql}),react.createElement("section",{className:"advanced-search__footer"},!isFormMode&&react.createElement("button",{type:"button",className:"link-tag advanced-search__back-button cursor-pointer",onClick:()=>setIsFormMode(!0),onKeyUp:e=>"Enter"===e.key??setIsFormMode(!1)},t("toAdvancedSearchButtonText")),react.createElement(Button.z,{dataCy:"search-button",buttonType:"none",disabled:isSearchButtonDisabled,size:"xlarge",variant:"filled",classNames:"advanced-search__search-button",collapsible:!0,label:t("advancedSearchSearchButtonText"),onClick:()=>{if(""!==rawCql.trim()&&!isFormMode)return setSearchQuery(rawCql),void setTimeout((()=>{scrollToResults()}),500);setSearchObject(internalSearchObject),setTimeout((()=>{scrollToResults()}),500)}})))},advanced_search_AdvancedSearchHeader=AdvancedSearchHeader;try{AdvancedSearchHeader.displayName="AdvancedSearchHeader",AdvancedSearchHeader.__docgenInfo={description:"",displayName:"AdvancedSearchHeader",props:{dataCy:{defaultValue:{value:"advanced-search-header"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}},searchQuery:{defaultValue:null,description:"",name:"searchQuery",required:!0,type:{name:"string | null"}},setSearchQuery:{defaultValue:null,description:"",name:"setSearchQuery",required:!0,type:{name:"(searchQuery: string | null) => void"}},searchObject:{defaultValue:null,description:"",name:"searchObject",required:!0,type:{name:"AdvancedSearchQuery | null"}},setSearchObject:{defaultValue:null,description:"",name:"setSearchObject",required:!0,type:{name:"(searchObject: AdvancedSearchQuery | null) => void"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/advanced-search/AdvancedSearchHeader.tsx#AdvancedSearchHeader"]={docgenInfo:AdvancedSearchHeader.__docgenInfo,name:"AdvancedSearchHeader",path:"src/apps/advanced-search/AdvancedSearchHeader.tsx#AdvancedSearchHeader"})}catch(__react_docgen_typescript_loader_error){}var branches=__webpack_require__("./src/core/utils/branches.tsx"),graphql=__webpack_require__("./src/core/dbc-gateway/generated/graphql.tsx"),use_pager=__webpack_require__("./src/components/result-pager/use-pager.tsx"),SearchResultList=__webpack_require__("./src/components/card-item-list/SearchResultList.tsx"),search_result_zero_hits=__webpack_require__("./src/apps/search-result/search-result-zero-hits.tsx"),helpers_url=__webpack_require__("./src/core/utils/helpers/url.ts");const advanced_search_AdvancedSearchResults=({q,pageSize,showContentOnly})=>{const t=(0,utils_text.X)(),[copiedLinkToSearch,setCopiedLinkToSearch]=(0,react.useState)(!1),cleanBranches=(0,branches.ZP)(),[resultItems,setResultItems]=(0,react.useState)([]),[hitcount,setHitCount]=(0,react.useState)(0),{PagerComponent,page}=(0,use_pager.Z)({hitcount,pageSize}),[cql,setCql]=(0,react.useState)(q),[,copy]=(0,useCopyToClipboard.Z)();(0,react.useEffect)((()=>{setCql(q)}),[q]),(0,react.useEffect)((()=>{const searchParams=new URLSearchParams(window.location.search);searchParams.get("q")&&setCql((prev=>searchParams.get("q")||prev))}),[]),(0,react.useEffect)((()=>{setResultItems([])}),[q,pageSize]);const{data,isLoading}=(0,graphql.KZ)({cql,offset:page*pageSize,limit:pageSize,filters:{branchId:cleanBranches}});(0,react.useEffect)((()=>{if(!data)return;const{complexSearch:{works:resultWorks,hitcount:resultCount}}=data;setHitCount(resultCount),setResultItems(page>0?prev=>[...prev,...resultWorks]:resultWorks)}),[data,page]);const shouldShowSearchResults=isLoading||!isLoading&&hitcount>0,shouldShowResultHeadline=hitcount&&!isLoading;return(0,react.useEffect)((()=>{copiedLinkToSearch&&setTimeout((()=>{setCopiedLinkToSearch(!1)}),2e3)}),[copiedLinkToSearch]),react.createElement(react.Fragment,null,!showContentOnly&&react.createElement("div",{className:"advanced-search__divider"}),react.createElement("h2",{className:"text-header-h2 advanced-search__title capitalize-first",id:"advanced-search-result"},isLoading&&t("loadingResultsText"),shouldShowResultHeadline&&t("showingMaterialsText",{placeholders:{"@hitcount":hitcount}})),!showContentOnly&&react.createElement("button",{type:"button",className:(0,clsx.Z)("link-tag mb-16 capitalize-first",{"cursor-pointer":!copiedLinkToSearch}),onClick:()=>{copy((0,helpers_url.uW)({linked:"true"}).href),setCopiedLinkToSearch(!0)}},!copiedLinkToSearch&&t("advancedSearchLinkToThisSearchText"),copiedLinkToSearch&&react.createElement(react.Fragment,null,t("copiedLinkToThisSearchText"),react.createElement("img",{className:"inline-icon",src:Check_default(),alt:""})," ")),shouldShowSearchResults&&react.createElement(react.Fragment,null,react.createElement(SearchResultList.Z,{resultItems,page,pageSize}),react.createElement(PagerComponent,{isLoading})),!isLoading&&0===hitcount&&react.createElement(search_result_zero_hits.Z,null))};try{AdvancedSearchResults.displayName="AdvancedSearchResults",AdvancedSearchResults.__docgenInfo={description:"",displayName:"AdvancedSearchResults",props:{q:{defaultValue:null,description:"",name:"q",required:!0,type:{name:"string"}},pageSize:{defaultValue:null,description:"",name:"pageSize",required:!0,type:{name:"number"}},showContentOnly:{defaultValue:null,description:"",name:"showContentOnly",required:!0,type:{name:"boolean"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/advanced-search/AdvancedSearchResults.tsx#AdvancedSearchResults"]={docgenInfo:AdvancedSearchResults.__docgenInfo,name:"AdvancedSearchResults",path:"src/apps/advanced-search/AdvancedSearchResults.tsx#AdvancedSearchResults"})}catch(__react_docgen_typescript_loader_error){}const AdvancedSearch=({pageSize})=>{const[searchQuery,setSearchQuery]=(0,react.useState)(null),[searchObject,setSearchObject]=(0,react.useState)(null),[showResultOnly,setShowResultOnly]=(0,react.useState)(!1),[executedQuery,setExecutedQuery]=(0,react.useState)(null);return(0,useEffectOnce.Z)((()=>{const advancedSearchQuery=(0,helpers_url.wo)("advancedSearchQuery");if(advancedSearchQuery){const queryObject=JSON.parse(advancedSearchQuery);setSearchObject(queryObject)}const advancedSearchCql=(0,helpers_url.wo)("advancedSearchCql");advancedSearchCql&&setSearchQuery(advancedSearchCql),"true"===(0,helpers_url.wo)("linked")&&setShowResultOnly(!0)})),(0,react.useEffect)((()=>{if(!searchObject)return;const cql=translateSearchObjectToCql(searchObject);""!==cql.trim()&&((0,helpers_url.ul)({advancedSearchQuery:JSON.stringify(searchObject)}),(0,helpers_url.oC)("advancedSearchCql"),setExecutedQuery(cql))}),[searchObject]),(0,react.useEffect)((()=>{searchQuery&&((0,helpers_url.ul)({advancedSearchCql:searchQuery}),(0,helpers_url.oC)("advancedSearchQuery"),setExecutedQuery(searchQuery))}),[searchQuery]),react.createElement("div",{className:"advanced-search"},!showResultOnly&&react.createElement(advanced_search_AdvancedSearchHeader,{searchObject,setSearchObject,searchQuery,setSearchQuery}),executedQuery&&react.createElement(advanced_search_AdvancedSearchResults,{q:executedQuery,pageSize,showContentOnly:showResultOnly}))},advanced_search_AdvancedSearch=AdvancedSearch;try{AdvancedSearch.displayName="AdvancedSearch",AdvancedSearch.__docgenInfo={description:"",displayName:"AdvancedSearch",props:{pageSize:{defaultValue:null,description:"",name:"pageSize",required:!0,type:{name:"number"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/advanced-search/AdvancedSearch.tsx#AdvancedSearch"]={docgenInfo:AdvancedSearch.__docgenInfo,name:"AdvancedSearch",path:"src/apps/advanced-search/AdvancedSearch.tsx#AdvancedSearch"})}catch(__react_docgen_typescript_loader_error){}const AdvancedSearch_entry=(0,config.Rh)((0,url.XL)((0,utils_text.z)((({pageSizeDesktop,pageSizeMobile})=>{const pageSize=(0,general.Rh)({desktop:pageSizeDesktop,mobile:pageSizeMobile});return react.createElement("div",null,react.createElement(guarded_app.Z,{app:"advanced-search"},react.createElement(advanced_search_AdvancedSearch,{pageSize})))}))));try{AdvancedSearchentry.displayName="AdvancedSearchentry",AdvancedSearchentry.__docgenInfo={description:"",displayName:"AdvancedSearchentry",props:{pageSizeDesktop:{defaultValue:null,description:"",name:"pageSizeDesktop",required:!1,type:{name:"number | undefined"}},pageSizeMobile:{defaultValue:null,description:"",name:"pageSizeMobile",required:!1,type:{name:"number | undefined"}},materialUrl:{defaultValue:null,description:"",name:"materialUrl",required:!0,type:{name:"string"}},searchUrl:{defaultValue:null,description:"",name:"searchUrl",required:!0,type:{name:"string"}},advancedSearchUrl:{defaultValue:null,description:"",name:"advancedSearchUrl",required:!0,type:{name:"string"}},fbsBaseUrl:{defaultValue:null,description:"",name:"fbsBaseUrl",required:!0,type:{name:"string"}},loanListEreolenUrl:{defaultValue:null,description:"",name:"loanListEreolenUrl",required:!0,type:{name:"string"}},feesPageUrl:{defaultValue:null,description:"",name:"feesPageUrl",required:!0,type:{name:"string"}},publizonBaseUrl:{defaultValue:null,description:"",name:"publizonBaseUrl",required:!0,type:{name:"string"}},dplCmsBaseUrl:{defaultValue:null,description:"",name:"dplCmsBaseUrl",required:!0,type:{name:"string"}},coverBaseUrl:{defaultValue:null,description:"",name:"coverBaseUrl",required:!0,type:{name:"string"}},materialBaseUrl:{defaultValue:null,description:"",name:"materialBaseUrl",required:!0,type:{name:"string"}},fbiBaseUrl:{defaultValue:null,description:"",name:"fbiBaseUrl",required:!0,type:{name:"string"}},authUrl:{defaultValue:null,description:"",name:"authUrl",required:!0,type:{name:"string"}},ereolenHomepageUrl:{defaultValue:null,description:"",name:"ereolenHomepageUrl",required:!0,type:{name:"string"}},blacklistedAvailabilityBranchesConfig:{defaultValue:null,description:"",name:"blacklistedAvailabilityBranchesConfig",required:!0,type:{name:"string"}},blacklistedPickupBranchesConfig:{defaultValue:null,description:"",name:"blacklistedPickupBranchesConfig",required:!1,type:{name:"string | undefined"}},blacklistedSearchBranchesConfig:{defaultValue:null,description:"",name:"blacklistedSearchBranchesConfig",required:!1,type:{name:"string | undefined"}},branchesConfig:{defaultValue:null,description:"",name:"branchesConfig",required:!0,type:{name:"string"}},addToFavoritesAriaLabelText:{defaultValue:null,description:"",name:"addToFavoritesAriaLabelText",required:!0,type:{name:"string"}},alertErrorCloseText:{defaultValue:null,description:"",name:"alertErrorCloseText",required:!0,type:{name:"string"}},alertErrorMessageText:{defaultValue:null,description:"",name:"alertErrorMessageText",required:!0,type:{name:"string"}},byAuthorText:{defaultValue:null,description:"",name:"byAuthorText",required:!0,type:{name:"string"}},etAlText:{defaultValue:null,description:"",name:"etAlText",required:!0,type:{name:"string"}},inSeriesText:{defaultValue:null,description:"",name:"inSeriesText",required:!0,type:{name:"string"}},loadingText:{defaultValue:null,description:"",name:"loadingText",required:!0,type:{name:"string"}},numberDescriptionText:{defaultValue:null,description:"",name:"numberDescriptionText",required:!0,type:{name:"string"}},removeFromFavoritesAriaLabelText:{defaultValue:null,description:"",name:"removeFromFavoritesAriaLabelText",required:!0,type:{name:"string"}},resultPagerStatusText:{defaultValue:null,description:"",name:"resultPagerStatusText",required:!0,type:{name:"string"}},noSearchResultText:{defaultValue:null,description:"",name:"noSearchResultText",required:!0,type:{name:"string"}},showMoreText:{defaultValue:null,description:"",name:"showMoreText",required:!0,type:{name:"string"}},showingResultsForWithoutQueryText:{defaultValue:null,description:"",name:"showingResultsForWithoutQueryText",required:!0,type:{name:"string"}},advancedSearchLinkToThisSearchText:{defaultValue:null,description:"",name:"advancedSearchLinkToThisSearchText",required:!0,type:{name:"string"}},advancedSearchAllIndexesText:{defaultValue:null,description:"",name:"advancedSearchAllIndexesText",required:!0,type:{name:"string"}},advancedSearchCreatorText:{defaultValue:null,description:"",name:"advancedSearchCreatorText",required:!0,type:{name:"string"}},advancedSearchSubjectText:{defaultValue:null,description:"",name:"advancedSearchSubjectText",required:!0,type:{name:"string"}},advancedSearchGenreText:{defaultValue:null,description:"",name:"advancedSearchGenreText",required:!0,type:{name:"string"}},advancedSearchLanguageText:{defaultValue:null,description:"",name:"advancedSearchLanguageText",required:!0,type:{name:"string"}},advancedSearchDateText:{defaultValue:null,description:"",name:"advancedSearchDateText",required:!0,type:{name:"string"}},advancedSearchMainCreatorText:{defaultValue:null,description:"",name:"advancedSearchMainCreatorText",required:!0,type:{name:"string"}},advancedSearchMainTitleText:{defaultValue:null,description:"",name:"advancedSearchMainTitleText",required:!0,type:{name:"string"}},advancedSearchSourceText:{defaultValue:null,description:"",name:"advancedSearchSourceText",required:!0,type:{name:"string"}},advancedSearchDateFirstEditionText:{defaultValue:null,description:"",name:"advancedSearchDateFirstEditionText",required:!0,type:{name:"string"}},advancedSearchDecimalDk5Text:{defaultValue:null,description:"",name:"advancedSearchDecimalDk5Text",required:!0,type:{name:"string"}},advancedSearchTypeText:{defaultValue:null,description:"",name:"advancedSearchTypeText",required:!0,type:{name:"string"}},advancedSearchAudienceText:{defaultValue:null,description:"",name:"advancedSearchAudienceText",required:!0,type:{name:"string"}},advancedSearchPublisherText:{defaultValue:null,description:"",name:"advancedSearchPublisherText",required:!0,type:{name:"string"}},advancedSearchIdentifierText:{defaultValue:null,description:"",name:"advancedSearchIdentifierText",required:!0,type:{name:"string"}},advancedSearchAcSourceText:{defaultValue:null,description:"",name:"advancedSearchAcSourceText",required:!0,type:{name:"string"}},advancedSearchAddRowText:{defaultValue:null,description:"",name:"advancedSearchAddRowText",required:!0,type:{name:"string"}},advancedSearchTitleText:{defaultValue:null,description:"",name:"advancedSearchTitleText",required:!0,type:{name:"string"}},advancedSearchPreviewHeadlineText:{defaultValue:null,description:"",name:"advancedSearchPreviewHeadlineText",required:!0,type:{name:"string"}},advancedSearchPreviewEmptyText:{defaultValue:null,description:"",name:"advancedSearchPreviewEmptyText",required:!0,type:{name:"string"}},advancedSearchResetText:{defaultValue:null,description:"",name:"advancedSearchResetText",required:!0,type:{name:"string"}},advancedSearchCopyStringText:{defaultValue:null,description:"",name:"advancedSearchCopyStringText",required:!0,type:{name:"string"}},advancedSearchEditCqlText:{defaultValue:null,description:"",name:"advancedSearchEditCqlText",required:!0,type:{name:"string"}},advancedSearchSearchButtonText:{defaultValue:null,description:"",name:"advancedSearchSearchButtonText",required:!0,type:{name:"string"}},loadingResultsText:{defaultValue:null,description:"",name:"loadingResultsText",required:!0,type:{name:"string"}},toAdvancedSearchButtonText:{defaultValue:null,description:"",name:"toAdvancedSearchButtonText",required:!0,type:{name:"string"}},cqlSearchTitleText:{defaultValue:null,description:"",name:"cqlSearchTitleText",required:!0,type:{name:"string"}},copiedToClipboardText:{defaultValue:null,description:"",name:"copiedToClipboardText",required:!0,type:{name:"string"}},copiedLinkToThisSearchText:{defaultValue:null,description:"",name:"copiedLinkToThisSearchText",required:!0,type:{name:"string"}},clauseAndText:{defaultValue:null,description:"",name:"clauseAndText",required:!0,type:{name:"string"}},clauseOrText:{defaultValue:null,description:"",name:"clauseOrText",required:!0,type:{name:"string"}},clauseNotText:{defaultValue:null,description:"",name:"clauseNotText",required:!0,type:{name:"string"}},advancedSearchFilterMaterialTypeText:{defaultValue:null,description:"",name:"advancedSearchFilterMaterialTypeText",required:!0,type:{name:"string"}},advancedSearchFilterLiteratureFormText:{defaultValue:null,description:"",name:"advancedSearchFilterLiteratureFormText",required:!0,type:{name:"string"}},advancedSearchFilterAccessText:{defaultValue:null,description:"",name:"advancedSearchFilterAccessText",required:!0,type:{name:"string"}},advancedSearchFilterBookText:{defaultValue:null,description:"",name:"advancedSearchFilterBookText",required:!0,type:{name:"string"}},advancedSearchFilterEbookText:{defaultValue:null,description:"",name:"advancedSearchFilterEbookText",required:!0,type:{name:"string"}},advancedSearchFilterAudioBookText:{defaultValue:null,description:"",name:"advancedSearchFilterAudioBookText",required:!0,type:{name:"string"}},advancedSearchFilterArticleText:{defaultValue:null,description:"",name:"advancedSearchFilterArticleText",required:!0,type:{name:"string"}},advancedSearchFilterMovieText:{defaultValue:null,description:"",name:"advancedSearchFilterMovieText",required:!0,type:{name:"string"}},advancedSearchFilterMusicText:{defaultValue:null,description:"",name:"advancedSearchFilterMusicText",required:!0,type:{name:"string"}},advancedSearchFilterPhysicalText:{defaultValue:null,description:"",name:"advancedSearchFilterPhysicalText",required:!0,type:{name:"string"}},advancedSearchFilterOnlineText:{defaultValue:null,description:"",name:"advancedSearchFilterOnlineText",required:!0,type:{name:"string"}},advancedSearchFilterFictionText:{defaultValue:null,description:"",name:"advancedSearchFilterFictionText",required:!0,type:{name:"string"}},advancedSearchFilterNonFictionText:{defaultValue:null,description:"",name:"advancedSearchFilterNonFictionText",required:!0,type:{name:"string"}},multiselectAllOptionText:{defaultValue:null,description:"",name:"multiselectAllOptionText",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/advanced-search/AdvancedSearch.entry.tsx#AdvancedSearchentry"]={docgenInfo:AdvancedSearchentry.__docgenInfo,name:"AdvancedSearchentry",path:"src/apps/advanced-search/AdvancedSearch.entry.tsx#AdvancedSearchentry"})}catch(__react_docgen_typescript_loader_error){}const AdvancedSearch_dev={title:"Apps / Advanced Search",component:AdvancedSearch_entry,argTypes:{...serviceUrlArgs.Z,pageSizeDesktop:{name:"Number of search result items on desktop",defaultValue:50,control:{type:"number"}},pageSizeMobile:{name:"Number of search result items on mobile",defaultValue:20,control:{type:"number"}},materialUrl:{name:"Path to the material page",defaultValue:"/work/:workid",control:{type:"text"}},authUrl:{name:"Url where user can authenticate",defaultValue:"",control:{type:"text"}},searchUrl:{name:"Path to the search result page",defaultValue:"/search",control:{type:"text"}},etAlText:{name:"Et al. Text",defaultValue:"et al.",control:{type:"text"}},byAuthorText:{name:"By (author) Text",defaultValue:"By",control:{type:"text"}},showMoreText:{name:"Show more Text",defaultValue:"show more",control:{type:"text"}},resultPagerStatusText:{name:"Result pager status text",defaultValue:"Showing @itemsShown out of @hitcount results",control:{type:"text"}},numberDescriptionText:{name:"Number description",defaultValue:"Nr.",control:{type:"text"}},inSeriesText:{name:"In series",defaultValue:"in series",control:{type:"text"}},showingMaterialsText:{name:"Showing materials",defaultValue:"Showing materials (@hitcount)",control:{type:"text"}},noSearchResultText:{name:"0-hit search result",defaultValue:"Your search has 0 results",control:{type:"text"}},blacklistedPickupBranchesConfig:{name:"Blacklisted Pickup branches",defaultValue:"FBS-751032,FBS-751031,FBS-751009,FBS-751027,FBS-751024",control:{type:"text"}},blacklistedAvailabilityBranchesConfig:{name:"Blacklisted Availability branches",defaultValue:"FBS-751032,FBS-751031,FBS-751009,FBS-751027,FBS-751024",control:{type:"text"}},blacklistedSearchBranchesConfig:{name:"Blacklisted branches",defaultValue:"FBS-751032,FBS-751031,FBS-751009,FBS-751027,FBS-751024",control:{type:"text"}},branchesConfig:{name:"Branches",defaultValue:'[\n {\n "branchId":"DK-775120",\n "title":"Højbjerg"\n },\n {\n "branchId":"DK-775122",\n "title":"Beder-Malling"\n },\n {\n "branchId":"DK-775144",\n "title":"Gellerup"\n },\n {\n "branchId":"DK-775167",\n "title":"Lystrup"\n },\n {\n "branchId":"DK-775146",\n "title":"Harlev"\n },\n {\n "branchId":"DK-775168",\n "title":"Skødstrup"\n },\n {\n "branchId":"FBS-751010",\n "title":"Arresten"\n },\n {\n "branchId":"DK-775147",\n "title":"Hasle"\n },\n {\n "branchId":"FBS-751032",\n "title":"Må ikke benyttes"\n },\n {\n "branchId":"FBS-751031",\n "title":"Fjernlager 1"\n },\n {\n "branchId":"DK-775126",\n "title":"Solbjerg"\n },\n {\n "branchId":"FBS-751030",\n "title":"ITK"\n },\n {\n "branchId":"DK-775149",\n "title":"Sabro"\n },\n {\n "branchId":"DK-775127",\n "title":"Tranbjerg"\n },\n {\n "branchId":"DK-775160",\n "title":"Risskov"\n },\n {\n "branchId":"DK-775162",\n "title":"Hjortshøj"\n },\n {\n "branchId":"DK-775140",\n "title":"Åby"\n },\n {\n "branchId":"FBS-751009",\n "title":"Fjernlager 2"\n },\n {\n "branchId":"FBS-751029",\n "title":"Stadsarkivet"\n },\n {\n "branchId":"FBS-751027",\n "title":"Intern"\n },\n {\n "branchId":"FBS-751026",\n "title":"Fælles undervejs"\n },\n {\n "branchId":"FBS-751025",\n "title":"Fællessekretariatet"\n },\n {\n "branchId":"DK-775133",\n "title":"Bavnehøj"\n },\n {\n "branchId":"FBS-751024",\n "title":"Fjernlånte materialer"\n },\n {\n "branchId":"DK-775100",\n "title":"Hovedbiblioteket"\n },\n {\n "branchId":"DK-775170",\n "title":"Trige"\n },\n {\n "branchId":"DK-775150",\n "title":"Tilst"\n },\n {\n "branchId":"DK-775130",\n "title":"Viby"\n },\n {\n "branchId":"DK-775164",\n "title":"Egå"\n }\n]',control:{type:"text"}},addToFavoritesAriaLabelText:{control:{type:"text"},defaultValue:"Add @title to favorites list"},removeFromFavoritesAriaLabelText:{control:{type:"text"},defaultValue:"Remove @title from favorites list"},alertErrorCloseText:{name:"Alert error close text",defaultValue:"close",control:{type:"text"}},alertErrorMessageText:{name:"Alert error message text",defaultValue:"An error occurred",control:{type:"text"}},loadingText:{name:"Loading",defaultValue:"Loading",control:{type:"text"}},advancedSearchLinkToThisSearchText:{name:"Advanced search copy to clipboard button text",defaultValue:"Link to this search",control:{type:"text"}},advancedSearchAllIndexesText:{name:"Advanced search indexes - all",defaultValue:"All indexes",control:{type:"text"}},advancedSearchCreatorText:{name:"Advanced search indexes - creator",defaultValue:"Creator",control:{type:"text"}},advancedSearchSubjectText:{name:"Advanced search indexes - subject",defaultValue:"Subject",control:{type:"text"}},advancedSearchGenreText:{name:"Advanced search indexes - genre",defaultValue:"Genre",control:{type:"text"}},advancedSearchLanguageText:{name:"Advanced search indexes - language",defaultValue:"Language",control:{type:"text"}},advancedSearchDateText:{name:"Advanced search indexes - date",defaultValue:"Date",control:{type:"text"}},advancedSearchMainCreatorText:{name:"Advanced search indexes - main creator",defaultValue:"Main creator",control:{type:"text"}},advancedSearchMainTitleText:{name:"Advanced search indexes - main title",defaultValue:"Main title",control:{type:"text"}},advancedSearchSourceText:{name:"Advanced search indexes - source",defaultValue:"Source",control:{type:"text"}},advancedSearchDateFirstEditionText:{name:"Advanced search indexes - edition",defaultValue:"Edition",control:{type:"text"}},advancedSearchDecimalDk5Text:{name:"Advanced search indexes - DK5",defaultValue:"DK5",control:{type:"text"}},advancedSearchTypeText:{name:"Advanced search indexes - type",defaultValue:"Type",control:{type:"text"}},advancedSearchAudienceText:{name:"Advanced search indexes - audience",defaultValue:"Audience",control:{type:"text"}},advancedSearchPublisherText:{name:"Advanced search indexes - publisher",defaultValue:"Publisher",control:{type:"text"}},advancedSearchIdentifierText:{name:"Advanced search indexes - identifier",defaultValue:"Identifier",control:{type:"text"}},advancedSearchAcSourceText:{name:"Advanced search indexes - source",defaultValue:"Source",control:{type:"text"}},advancedSearchAddRowText:{name:"Add row",defaultValue:"Add row",control:{type:"text"}},advancedSearchInputPlaceholderText:{name:"Advanced search input placeholder",defaultValue:"Search term",control:{type:"text"}},advancedSearchTitleText:{name:"Advanced search page title",defaultValue:"Advanced search",control:{type:"text"}},advancedSearchPreviewHeadlineText:{name:"Advanced search CQL preview headline",defaultValue:"CQL search string",control:{type:"text"}},advancedSearchPreviewEmptyText:{name:"Advanced search empty preview",defaultValue:"-",control:{type:"text"}},advancedSearchResetText:{name:"Advanced search reset button text",defaultValue:"Reset",control:{type:"text"}},advancedSearchCopyStringText:{name:"Advanced search page copy string button text",defaultValue:"Copy CQL",control:{type:"text"}},advancedSearchEditCqlText:{name:"Advanced search page edit CQL button text",defaultValue:"Edit CQL",control:{type:"text"}},advancedSearchSearchButtonText:{name:"Advanced search search button text",defaultValue:"Search",control:{type:"text"}},loadingResultsText:{name:"Advanced search loading results text",defaultValue:"Loading results...",control:{type:"text"}},toAdvancedSearchButtonText:{name:"To advanced search button text",defaultValue:"Back to advanced search",control:{type:"text"}},cqlSearchTitleText:{name:"CQL search title text",defaultValue:"CQL search",control:{type:"text"}},copiedToClipboardText:{name:"Text that appears after copying to clipboard",defaultValue:"Copied",control:{type:"text"}},copiedLinkToThisSearchText:{name:"Text that appears after getting link to a search copied to clipboard",defaultValue:"Link copied to clipboard",control:{type:"text"}},clauseAndText:{name:"Advanced search clause - AND",defaultValue:"AND",control:{type:"text"}},clauseOrText:{name:"Advanced search clause - OR",defaultValue:"OR",control:{type:"text"}},clauseNotText:{name:"Advanced search clause - NOT",defaultValue:"NOT",control:{type:"text"}},advancedSearchFilterMaterialTypeText:{name:"Advanced search filter - material type",defaultValue:"Material Type",control:{type:"text"}},advancedSearchFilterLiteratureFormText:{name:"Advanced search filter - literature form",defaultValue:"Literature form",control:{type:"text"}},advancedSearchFilterAccessText:{name:"Advanced search filter - access",defaultValue:"Accessibility",control:{type:"text"}},advancedSearchFilterBookText:{name:"Advanced search filter - book",defaultValue:"Book",control:{type:"text"}},advancedSearchFilterEbookText:{name:"Advanced search filter - ebook",defaultValue:"Ebook",control:{type:"text"}},advancedSearchFilterAudioBookText:{name:"Advanced search filter - audio book",defaultValue:"Audio book",control:{type:"text"}},advancedSearchFilterArticleText:{name:"Advanced search filter - article",defaultValue:"Article",control:{type:"text"}},advancedSearchFilterMovieText:{name:"Advanced search filter - movie",defaultValue:"Movie",control:{type:"text"}},advancedSearchFilterMusicText:{name:"Advanced search filter - music",defaultValue:"Music",control:{type:"text"}},advancedSearchFilterPhysicalText:{name:"Advanced search filter - physical access",defaultValue:"Physical",control:{type:"text"}},advancedSearchFilterOnlineText:{name:"Advanced search filter - online access",defaultValue:"Online",control:{type:"text"}},advancedSearchFilterFictionText:{name:"Advanced search filter - fiction",defaultValue:"Fiction",control:{type:"text"}},advancedSearchFilterNonFictionText:{name:"Advanced search filter - non-fiction",defaultValue:"Non-fiction",control:{type:"text"}},multiselectAllOptionText:{name:"Multiselect - all option",defaultValue:"All",control:{type:"text"}}}},AdvancedSearch_dev_AdvancedSearch=args=>react.createElement(AdvancedSearch_entry,args)},"./src/apps/create-patron-user-info/CreatePatron.dev.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{CreatePatronEntry:()=>CreatePatron_dev_CreatePatronEntry,default:()=>CreatePatron_dev});var react=__webpack_require__("./node_modules/react/index.js"),utils_config=__webpack_require__("./src/core/utils/config.tsx"),utils_text=__webpack_require__("./src/core/utils/text.tsx"),utils_url=__webpack_require__("./src/core/utils/url.tsx"),set=__webpack_require__("./node_modules/lodash/set.js"),set_default=__webpack_require__.n(set),PincodeSection=__webpack_require__("./src/apps/patron-page/sections/PincodeSection.tsx"),BranchesDropdown=__webpack_require__("./src/apps/patron-page/util/BranchesDropdown.tsx"),ContactInfoSection=__webpack_require__("./src/components/contact-info-section/ContactInfoSection.tsx"),fbs=__webpack_require__("./src/core/fbs/fbs.ts"),general=__webpack_require__("./src/core/utils/helpers/general.ts"),url=__webpack_require__("./src/core/utils/helpers/url.ts");const UserInfo=({cpr})=>{const t=(0,utils_text.X)(),u=(0,utils_url.J_)(),logoutUrl=u("logoutUrl"),redirectOnUserCreatedUrl=u("redirectOnUserCreatedUrl"),config=(0,utils_config.ZR)(),formRef=(0,react.useRef)(null),[pin,setPin]=(0,react.useState)(null),minAge=parseInt(config("minAgeConfig"),10),[validCpr]=(0,react.useState)((0,general.IX)(cpr,minAge)),{mutate}=(0,fbs.RI)(),[patron,setPatron]=(0,react.useState)({preferredPickupBranch:"",receiveEmail:!0,receivePostalMail:!1,receiveSms:!1,phoneNumber:"",emailAddress:""}),changePatron=(newValue,key)=>{const copyUser=JSON.parse(JSON.stringify(patron));set_default()(copyUser,key,newValue),setPatron(copyUser)};return react.createElement(react.Fragment,null,validCpr&&react.createElement("form",{onSubmit:e=>(e=>{e.preventDefault();const{preferredPickupBranch,phoneNumber,emailAddress}=patron;pin&&preferredPickupBranch&&phoneNumber&&emailAddress&&mutate({data:{cprNumber:cpr,patron,pincode:pin}},{onSuccess:()=>{(0,url.gB)(redirectOnUserCreatedUrl)}})})(e),ref:formRef,className:"dpl-patron-page"},react.createElement("h1",{className:"text-header-h1 mb-48"},t("createPatronHeaderText")),react.createElement(ContactInfoSection.Z,{showCheckboxes:!1,inLine:!0,changePatron,patron,requiredFields:["email"]}),react.createElement(PincodeSection.Z,{required:!0,changePincode:setPin}),t("createPatronChangePickupHeaderText")&&react.createElement("h2",{className:"text-subtitle mt-32 mb-16"},t("createPatronChangePickupHeaderText")),t("createPatronChangePickupBodyText")&&react.createElement("p",{className:"text-body-small-regular my-32"},t("createPatronChangePickupBodyText")),react.createElement("div",{className:"mt-32"},react.createElement(BranchesDropdown.Z,{classNames:"dropdow dropdown__desktop",selected:(null==patron?void 0:patron.preferredPickupBranch)||"",onChange:newPreferredPickupBranch=>changePatron(newPreferredPickupBranch,"preferredPickupBranch")})),react.createElement("div",{className:"patron-buttons"},react.createElement("button",{type:"submit",className:"btn-primary btn-filled btn-small"},t("createPatronConfirmButtonText")),react.createElement("button",{type:"button",className:"link-tag mx-16",onClick:()=>{(0,url.gB)(logoutUrl)}},t("createPatronCancelButtonText")))),!validCpr&&react.createElement("div",{className:"dpl-patron-page"},react.createElement("h1",{className:"text-header-h1 mb-48"},t("createPatronInvalidSSNHeaderText")),react.createElement("p",null,t("createPatronInvalidSSNBodyText"))))},create_patron_user_info_UserInfo=UserInfo;try{UserInfo.displayName="UserInfo",UserInfo.__docgenInfo={description:"",displayName:"UserInfo",props:{cpr:{defaultValue:null,description:"",name:"cpr",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/create-patron-user-info/UserInfo.tsx#UserInfo"]={docgenInfo:UserInfo.__docgenInfo,name:"UserInfo",path:"src/apps/create-patron-user-info/UserInfo.tsx#UserInfo"})}catch(__react_docgen_typescript_loader_error){}var es=__webpack_require__("./node_modules/react-query/es/index.js"),FetchFailedCriticalError=__webpack_require__("./src/core/fetchers/FetchFailedCriticalError.ts"),token=__webpack_require__("./src/core/token.js"),FetcherCriticalHttpError=__webpack_require__("./src/core/fetchers/FetcherCriticalHttpError.ts");function _defineProperty(obj,key,value){return(key=function _toPropertyKey(t){var i=function _toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==typeof i?i:String(i)}(key))in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}class AdgangsPlatformenServiceHttpError extends FetcherCriticalHttpError.Z{constructor(...args){super(...args),_defineProperty(this,"name","AdgangsPlatformenServiceHttpError")}}const adgangsplatformen_useUserInfo=queryOptions=>{const userinfoUrl=(0,utils_url.J_)()("userinfoUrl"),url=String(userinfoUrl),queryKey=(null==queryOptions?void 0:queryOptions.queryKey)??(url=>{const userToken=(0,token.LP)(token.b4);if(!userToken)throw new Error("User token is missing");return`${url}:${userToken}`})(url),getUserInfo=(infoUrl,signal)=>(async({url,method,headers,data})=>{const userToken=(0,token.LP)(token.b4);if(!userToken)throw new Error("User token is missing");const authHeaders=userToken?{Authorization:`Bearer ${userToken}`}:{},body=data?JSON.stringify(data):null;try{const response=await fetch(url,{method,headers:{...headers,...authHeaders},body});if(!response.ok)throw new AdgangsPlatformenServiceHttpError(response.status,response.statusText,url);try{return await response.json()}catch(e){if(!(e instanceof SyntaxError))throw e}}catch(error){if(error instanceof AdgangsPlatformenServiceHttpError)throw error;const message=error instanceof Error?error.message:"Unknown error";throw new FetchFailedCriticalError.Z(message,url)}return null})({url:infoUrl,method:"get",signal});return{queryKey,...(0,es.useQuery)(queryKey,(()=>getUserInfo(url)),queryOptions)}},CreatePatron=()=>{const[cpr,setCpr]=(0,react.useState)(null),config=(0,utils_config.ZR)(),t=(0,utils_text.X)(),dashboardUrl=(0,utils_url.J_)()("dashboardUrl"),{id:agencyId}=config("agencyConfig",{transformer:"jsonParse"}),{data:userInfo,isLoading}=adgangsplatformen_useUserInfo();return(0,react.useEffect)((()=>{if(isLoading||!userInfo)return;const{attributes:{agencies,cpr:userCpr}}=userInfo;agencies.some((agency=>agency.agencyId===agencyId))&&(0,url.gB)(dashboardUrl),setCpr(String(userCpr))}),[agencyId,dashboardUrl,isLoading,userInfo]),isLoading?react.createElement("div",null,t("loadingText")):cpr?react.createElement(create_patron_user_info_UserInfo,{cpr}):null},create_patron_user_info_CreatePatron=CreatePatron;try{CreatePatron.displayName="CreatePatron",CreatePatron.__docgenInfo={description:"",displayName:"CreatePatron",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/create-patron-user-info/CreatePatron.tsx#CreatePatron"]={docgenInfo:CreatePatron.__docgenInfo,name:"CreatePatron",path:"src/apps/create-patron-user-info/CreatePatron.tsx#CreatePatron"})}catch(__react_docgen_typescript_loader_error){}const CreatePatron_entry=(0,utils_config.Rh)((0,utils_text.z)((0,utils_url.XL)((()=>((0,token.hA)("user")?(0,token.LP)("user"):null)?react.createElement(create_patron_user_info_CreatePatron,null):null))));try{CreatePatronentry.displayName="CreatePatronentry",CreatePatronentry.__docgenInfo={description:"",displayName:"CreatePatronentry",props:{agencyConfig:{defaultValue:null,description:"",name:"agencyConfig",required:!0,type:{name:"string"}},pincodeLengthMinConfig:{defaultValue:null,description:"",name:"pincodeLengthMinConfig",required:!0,type:{name:"string"}},pincodeLengthMaxConfig:{defaultValue:null,description:"",name:"pincodeLengthMaxConfig",required:!0,type:{name:"string"}},blacklistedPickupBranchesConfig:{defaultValue:null,description:"",name:"blacklistedPickupBranchesConfig",required:!0,type:{name:"string"}},branchesConfig:{defaultValue:null,description:"",name:"branchesConfig",required:!0,type:{name:"string"}},textNotificationsEnabledConfig:{defaultValue:null,description:"",name:"textNotificationsEnabledConfig",required:!0,type:{name:"string"}},loginUrl:{defaultValue:null,description:"",name:"loginUrl",required:!0,type:{name:"string"}},redirectOnUserCreatedUrl:{defaultValue:null,description:"",name:"redirectOnUserCreatedUrl",required:!0,type:{name:"string"}},fbsBaseUrl:{defaultValue:null,description:"",name:"fbsBaseUrl",required:!0,type:{name:"string"}},publizonBaseUrl:{defaultValue:null,description:"",name:"publizonBaseUrl",required:!0,type:{name:"string"}},dashboardUrl:{defaultValue:null,description:"",name:"dashboardUrl",required:!0,type:{name:"string"}},pickupBranchesDropdownLabelText:{defaultValue:null,description:"",name:"pickupBranchesDropdownLabelText",required:!0,type:{name:"string"}},createPatronCancelButtonText:{defaultValue:null,description:"",name:"createPatronCancelButtonText",required:!0,type:{name:"string"}},createPatronChangePickupBodyText:{defaultValue:null,description:"",name:"createPatronChangePickupBodyText",required:!0,type:{name:"string"}},createPatronChangePickupHeaderText:{defaultValue:null,description:"",name:"createPatronChangePickupHeaderText",required:!0,type:{name:"string"}},createPatronConfirmButtonText:{defaultValue:null,description:"",name:"createPatronConfirmButtonText",required:!0,type:{name:"string"}},createPatronHeaderText:{defaultValue:null,description:"",name:"createPatronHeaderText",required:!0,type:{name:"string"}},createPatronInvalidSSNBodyText:{defaultValue:null,description:"",name:"createPatronInvalidSSNBodyText",required:!0,type:{name:"string"}},createPatronInvalidSSNHeaderText:{defaultValue:null,description:"",name:"createPatronInvalidSSNHeaderText",required:!0,type:{name:"string"}},patronContactEmailCheckboxText:{defaultValue:null,description:"",name:"patronContactEmailCheckboxText",required:!0,type:{name:"string"}},patronContactEmailLabelText:{defaultValue:null,description:"",name:"patronContactEmailLabelText",required:!0,type:{name:"string"}},patronContactInfoBodyText:{defaultValue:null,description:"",name:"patronContactInfoBodyText",required:!0,type:{name:"string"}},patronContactInfoHeaderText:{defaultValue:null,description:"",name:"patronContactInfoHeaderText",required:!0,type:{name:"string"}},patronContactNameLabelText:{defaultValue:null,description:"",name:"patronContactNameLabelText",required:!0,type:{name:"string"}},patronContactPhoneCheckboxText:{defaultValue:null,description:"",name:"patronContactPhoneCheckboxText",required:!0,type:{name:"string"}},patronContactPhoneLabelText:{defaultValue:null,description:"",name:"patronContactPhoneLabelText",required:!0,type:{name:"string"}},patronPageChangePincodeBodyText:{defaultValue:null,description:"",name:"patronPageChangePincodeBodyText",required:!0,type:{name:"string"}},patronPageChangePincodeHeaderText:{defaultValue:null,description:"",name:"patronPageChangePincodeHeaderText",required:!0,type:{name:"string"}},patronPageConfirmPincodeLabelText:{defaultValue:null,description:"",name:"patronPageConfirmPincodeLabelText",required:!0,type:{name:"string"}},patronPagePincodeLabelText:{defaultValue:null,description:"",name:"patronPagePincodeLabelText",required:!0,type:{name:"string"}},patronPagePincodesNotTheSameText:{defaultValue:null,description:"",name:"patronPagePincodesNotTheSameText",required:!0,type:{name:"string"}},patronPagePincodeTooShortValidationText:{defaultValue:null,description:"",name:"patronPagePincodeTooShortValidationText",required:!0,type:{name:"string"}},phoneInputMessageText:{defaultValue:null,description:"",name:"phoneInputMessageText",required:!0,type:{name:"string"}},pickupBranchesDropdownNothingSelectedText:{defaultValue:null,description:"",name:"pickupBranchesDropdownNothingSelectedText",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/create-patron-user-info/CreatePatron.entry.tsx#CreatePatronentry"]={docgenInfo:CreatePatronentry.__docgenInfo,name:"CreatePatronentry",path:"src/apps/create-patron-user-info/CreatePatron.entry.tsx#CreatePatronentry"})}catch(__react_docgen_typescript_loader_error){}var serviceUrlArgs=__webpack_require__("./src/core/storybook/serviceUrlArgs.ts"),pincodeArgs=__webpack_require__("./src/core/storybook/pincodeArgs.ts");const CreatePatron_dev={title:"Apps / Create patron",component:CreatePatron_entry,argTypes:{...serviceUrlArgs.Z,...pincodeArgs.Z,blacklistedPickupBranchesConfig:{defaultValue:"FBS-751032,FBS-751031,FBS-751009,FBS-751027,FBS-751024",control:{type:"text"}},minAgeConfig:{defaultValue:"18",control:{type:"text"}},branchesConfig:{defaultValue:'[\n {\n "branchId":"DK-775120",\n "title":"Højbjerg"\n },\n {\n "branchId":"DK-775122",\n "title":"Beder-Malling"\n },\n {\n "branchId":"DK-775144",\n "title":"Gellerup"\n },\n {\n "branchId":"DK-775167",\n "title":"Lystrup"\n },\n {\n "branchId":"DK-775146",\n "title":"Harlev"\n },\n {\n "branchId":"DK-775168",\n "title":"Skødstrup"\n },\n {\n "branchId":"FBS-751010",\n "title":"Arresten"\n },\n {\n "branchId":"DK-775147",\n "title":"Hasle"\n },\n {\n "branchId":"FBS-751032",\n "title":"Må ikke benyttes"\n },\n {\n "branchId":"FBS-751031",\n "title":"Fjernlager 1"\n },\n {\n "branchId":"DK-775126",\n "title":"Solbjerg"\n },\n {\n "branchId":"FBS-751030",\n "title":"ITK"\n },\n {\n "branchId":"DK-775149",\n "title":"Sabro"\n },\n {\n "branchId":"DK-775127",\n "title":"Tranbjerg"\n },\n {\n "branchId":"DK-775160",\n "title":"Risskov"\n },\n {\n "branchId":"DK-775162",\n "title":"Hjortshøj"\n },\n {\n "branchId":"DK-775140",\n "title":"Åby"\n },\n {\n "branchId":"FBS-751009",\n "title":"Fjernlager 2"\n },\n {\n "branchId":"FBS-751029",\n "title":"Stadsarkivet"\n },\n {\n "branchId":"FBS-751027",\n "title":"Intern"\n },\n {\n "branchId":"FBS-751026",\n "title":"Fælles undervejs"\n },\n {\n "branchId":"FBS-751025",\n "title":"Fællessekretariatet"\n },\n {\n "branchId":"DK-775133",\n "title":"Bavnehøj"\n },\n {\n "branchId":"FBS-751024",\n "title":"Fjernlånte materialer"\n },\n {\n "branchId":"DK-775100",\n "title":"Hovedbiblioteket"\n },\n {\n "branchId":"DK-775170",\n "title":"Trige"\n },\n {\n "branchId":"DK-775150",\n "title":"Tilst"\n },\n {\n "branchId":"DK-775130",\n "title":"Viby"\n },\n {\n "branchId":"DK-775164",\n "title":"Egå"\n }\n]',control:{type:"text"}},userinfoUrl:{defaultValue:"https://login.bib.dk/userinfo",control:{type:"text"}},logOutUrl:{defaultValue:"/Logout",control:{type:"text"}},dashboardUrl:{defaultValue:"/user/me/dashboard",control:{type:"text"}},agencyConfig:{defaultValue:'{ "id": "999999" }',control:{type:"text"}},textNotificationsEnabledConfig:{defaultValue:"1",control:{type:"text"}},pickupBranchesDropdownLabelText:{defaultValue:"Choose pickup branch",control:{type:"text"}},patronPageChangePincodeHeaderText:{defaultValue:"Pincode",control:{type:"text"}},pickupBranchesDropdownNothingSelectedText:{defaultValue:"Nothing selected",control:{type:"text"}},patronPageChangePincodeBodyText:{defaultValue:"Change current pin by entering a new pin and saving",control:{type:"text"}},patronPagePincodeLabelText:{defaultValue:"New pin",control:{type:"text"}},patronPageConfirmPincodeLabelText:{defaultValue:"Confirm new pin",control:{type:"text"}},patronContactNameLabelText:{defaultValue:"Name",control:{type:"text"}},patronPagePincodeTooShortValidationText:{defaultValue:"The pincode should be minimum @pincodeLengthMin and maximum @pincodeLengthMax characters long",control:{type:"text"}},patronPagePincodesNotTheSameText:{defaultValue:"The pincodes are not the same",control:{type:"text"}},patronContactPhoneLabelText:{defaultValue:"Phone number",control:{type:"text"}},patronContactInfoBodyText:{defaultValue:"Please enter contact information below",control:{type:"text"}},patronContactInfoHeaderText:{defaultValue:"Contact information",control:{type:"text"}},patronContactPhoneCheckboxText:{defaultValue:"Receive text messages about your loans, reservations, and so forth",control:{type:"text"}},patronContactEmailLabelText:{defaultValue:"E-mail",control:{type:"text"}},patronContactEmailCheckboxText:{defaultValue:"Receive emails about your loans, reservations, and so forth",control:{type:"text"}},createPatronChangePickupHeaderText:{defaultValue:"",control:{type:"text"}},createPatronChangePickupBodyText:{defaultValue:"",control:{type:"text"}},createPatronHeaderText:{defaultValue:"Register as patron",control:{type:"text"}},createPatronInvalidSSNHeaderText:{defaultValue:"Invalid SSN",control:{type:"text"}},createPatronInvalidSSNBodyText:{defaultValue:"This SSN is invalid",control:{type:"text"}},redirectOnUserCreatedUrl:{defaultValue:"https://unsplash.com/photos/KRztl5I6xac",control:{type:"text"}},createPatronConfirmButtonText:{defaultValue:"Confirm",control:{type:"text"}},phoneInputMessageText:{name:"Phone input validation message",defaultValue:"The phone number must be 6 to 15 characters in length and should be comprised solely of numbers or begin with a +",control:{type:"text"}}}},CreatePatron_dev_CreatePatronEntry=(props=>react.createElement(CreatePatron_entry,props)).bind({});CreatePatron_dev_CreatePatronEntry.args={}},"./src/apps/dashboard/dashboard-notification-list/dashboard-notification-list.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>dashboard_notification_list});var react=__webpack_require__("./node_modules/react/index.js"),utils_text=__webpack_require__("./src/core/utils/text.tsx"),url=__webpack_require__("./src/core/utils/url.tsx"),dayjs_min=__webpack_require__("./node_modules/dayjs/dayjs.min.js"),dayjs_min_default=__webpack_require__.n(dayjs_min),date_format=__webpack_require__("./src/core/configuration/date-format.json");const yesterday=dayjs_min_default()().subtract(1,"day").format(date_format.d0),soon=dayjs_min_default()().add(7,"days").format(date_format.d0),longer=dayjs_min_default()().add(1,"year").format(date_format.d0);var Link=__webpack_require__("./src/components/atoms/links/Link.tsx"),empty_list=__webpack_require__("./src/components/empty-list/empty-list.tsx"),arrow=__webpack_require__("./src/components/atoms/icons/arrow/arrow.tsx"),status_badge=__webpack_require__("./src/apps/loan-list/materials/utils/status-badge.tsx");const dashboard_notification=({notificationNumber,notificationText,dataCy,notificationColor,notificationClickEvent,showNotificationDot,badge})=>0===notificationNumber?null:react.createElement("button",{type:"button","data-cy":dataCy,onClick:notificationClickEvent,className:"mb-16"},react.createElement("div",{className:"list-dashboard shadow-medium-hover arrow__hover--right-small"},react.createElement("div",{className:`color-secondary-gray number number--${notificationColor}`},notificationNumber),react.createElement("span",{className:"list-dashboard__title text-header-h4 color-secondary-gray"},notificationText),"danger"===notificationColor&&react.createElement(status_badge.Z,{dangerText:badge}),"warning"===notificationColor&&react.createElement(status_badge.Z,{warningText:badge}),"info"===notificationColor&&react.createElement(status_badge.Z,{infoText:badge}),showNotificationDot&&react.createElement("div",{className:"list-dashboard__dot"}),react.createElement("div",{className:"list-dashboard__arrow"},react.createElement(arrow.Z,null))));try{dashboardnotification.displayName="dashboardnotification",dashboardnotification.__docgenInfo={description:"",displayName:"dashboardnotification",props:{notificationNumber:{defaultValue:null,description:"",name:"notificationNumber",required:!0,type:{name:"number"}},showNotificationDot:{defaultValue:null,description:"",name:"showNotificationDot",required:!0,type:{name:"boolean"}},notificationText:{defaultValue:null,description:"",name:"notificationText",required:!0,type:{name:"string"}},dataCy:{defaultValue:null,description:"",name:"dataCy",required:!0,type:{name:"string"}},notificationColor:{defaultValue:null,description:"",name:"notificationColor",required:!0,type:{name:"string"}},badge:{defaultValue:null,description:"",name:"badge",required:!1,type:{name:"string | undefined"}},notificationClickEvent:{defaultValue:null,description:"",name:"notificationClickEvent",required:!0,type:{name:"() => void"}},notificationClickEventParam:{defaultValue:null,description:"",name:"notificationClickEventParam",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/dashboard/dashboard-notification/dashboard-notification.tsx#dashboardnotification"]={docgenInfo:dashboardnotification.__docgenInfo,name:"dashboardnotification",path:"src/apps/dashboard/dashboard-notification/dashboard-notification.tsx#dashboardnotification"})}catch(__react_docgen_typescript_loader_error){}const Notifications=({materials,showOnlyNotifications})=>{const displayedNotifications=showOnlyNotifications?materials.filter((({showNotificationDot})=>showNotificationDot)):materials;return react.createElement(react.Fragment,null,displayedNotifications.map((({listLength,header:headerNotification,color,notificationClickEvent,showNotificationDot,badge,dataCy})=>react.createElement(dashboard_notification,{notificationNumber:listLength,notificationText:headerNotification,showNotificationDot,badge,dataCy,key:headerNotification,notificationColor:color,notificationClickEvent}))))},dashboard_notification_list_Notifications=Notifications;try{Notifications.displayName="Notifications",Notifications.__docgenInfo={description:"",displayName:"Notifications",props:{materials:{defaultValue:null,description:"",name:"materials",required:!0,type:{name:"NotificationMaterialsList[]"}},showOnlyNotifications:{defaultValue:null,description:"",name:"showOnlyNotifications",required:!0,type:{name:"boolean"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/dashboard/dashboard-notification-list/Notifications.tsx#Notifications"]={docgenInfo:Notifications.__docgenInfo,name:"Notifications",path:"src/apps/dashboard/dashboard-notification-list/Notifications.tsx#Notifications"})}catch(__react_docgen_typescript_loader_error){}const NotificationColumn=({materials,materialsCount,headerUrl,emptyListText,header})=>react.createElement("div",{className:"status-userprofile__column my-32"},react.createElement("div",{className:"link-filters"},react.createElement("div",{className:"link-filters__tag-wrapper mb-16"},react.createElement("h2",{"data-cy":`dashboard-${header.toLowerCase()}-header`},react.createElement(Link.Z,{href:headerUrl,className:"link-tag link-tag link-filters__tag"},header),react.createElement("span",{className:"link-filters__counter"},materialsCount)))),0===materialsCount&&react.createElement(empty_list.Z,{emptyListText}),0!==materialsCount&&react.createElement(dashboard_notification_list_Notifications,{showOnlyNotifications:!1,materials})),dashboard_notification_list_NotificationColumn=NotificationColumn;try{NotificationColumn.displayName="NotificationColumn",NotificationColumn.__docgenInfo={description:"",displayName:"NotificationColumn",props:{materials:{defaultValue:null,description:"",name:"materials",required:!0,type:{name:"NotificationMaterialsList[]"}},materialsCount:{defaultValue:null,description:"",name:"materialsCount",required:!0,type:{name:"number"}},headerUrl:{defaultValue:null,description:"",name:"headerUrl",required:!0,type:{name:"URL"}},header:{defaultValue:null,description:"",name:"header",required:!0,type:{name:"string"}},emptyListText:{defaultValue:null,description:"",name:"emptyListText",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/dashboard/dashboard-notification-list/NotificationColumn.tsx#NotificationColumn"]={docgenInfo:NotificationColumn.__docgenInfo,name:"NotificationColumn",path:"src/apps/dashboard/dashboard-notification-list/NotificationColumn.tsx#NotificationColumn"})}catch(__react_docgen_typescript_loader_error){}var modal=__webpack_require__("./src/core/utils/modal.tsx"),LoansGroupModal=__webpack_require__("./src/components/GroupModal/LoansGroupModal.tsx"),material_details_modal=__webpack_require__("./src/apps/loan-list/modal/material-details-modal.tsx"),material_details=__webpack_require__("./src/apps/loan-list/modal/material-details.tsx"),SimpleModalHeader=__webpack_require__("./src/components/GroupModal/SimpleModalHeader.tsx"),GroupModalContent=__webpack_require__("./src/components/GroupModal/GroupModalContent.tsx"),Button=__webpack_require__("./src/components/Buttons/Button.tsx"),isEqual=__webpack_require__("./node_modules/lodash/isEqual.js"),isEqual_default=__webpack_require__.n(isEqual),selectable_material=__webpack_require__("./src/apps/loan-list/materials/selectable-material/selectable-material.tsx"),use_pager=__webpack_require__("./src/components/result-pager/use-pager.tsx"),reservation_type=__webpack_require__("./src/core/utils/types/reservation-type.ts");const GroupModalReservationsList=({materials,selectedMaterials,selectMaterials,pageSize,header,marginBottonPager,openDetailsModal})=>{const t=(0,utils_text.X)(),[displayedMaterials,setDisplayedMaterials]=(0,react.useState)([]),{itemsShown,PagerComponent,firstInNewPage}=(0,use_pager.Z)({hitcount:materials.length,pageSize});(0,react.useEffect)((()=>{setDisplayedMaterials([...materials].splice(0,itemsShown))}),[itemsShown,materials]);const onMaterialChecked=item=>{const selectedMaterialsCopy=[...selectedMaterials],indexOfItemToRemove=selectedMaterials.indexOf(item);indexOfItemToRemove>-1?selectedMaterialsCopy.splice(indexOfItemToRemove,1):selectedMaterialsCopy.push(item),selectMaterials(selectedMaterialsCopy)};return 0===displayedMaterials.length?null:react.createElement(react.Fragment,null,react.createElement("h3",{className:"text-body-medium-regular"},header),react.createElement("ul",{className:"modal-loan__list-materials"},displayedMaterials.map(((material,i)=>{const{expiryDate,faust,identifier,numberInQueue,reservationIds}=material,selected=null==selectedMaterials?void 0:selectedMaterials.some((selectedMaterial=>isEqual_default()(selectedMaterial,material)));return react.createElement(react.Fragment,null,(identifier||reservationIds||faust)&&react.createElement(selectable_material.Z,{item:material,displayedMaterial:material,focused:i===firstInNewPage,statusBadgeComponent:faust&&react.createElement(status_badge.Z,{badgeDate:expiryDate,neutralText:numberInQueue?t("dashboardNumberInLineText",{count:numberInQueue,placeholders:{"@count":numberInQueue}}):"",infoText:""}),openDetailsModal,key:(0,reservation_type._p)(material),selected,onMaterialChecked,disabled:!1,statusMessageComponentMobile:null,statusMessageComponentDesktop:null}),!identifier&&null)}))),react.createElement(PagerComponent,{classNames:marginBottonPager?"result-pager--margin-bottom":""}))},GroupModal_GroupModalReservationsList=GroupModalReservationsList;try{GroupModalReservationsList.displayName="GroupModalReservationsList",GroupModalReservationsList.__docgenInfo={description:"",displayName:"GroupModalReservationsList",props:{materials:{defaultValue:null,description:"",name:"materials",required:!0,type:{name:"Nullable>[]"}},pageSize:{defaultValue:null,description:"",name:"pageSize",required:!0,type:{name:"number"}},selectedMaterials:{defaultValue:null,description:"",name:"selectedMaterials",required:!0,type:{name:"Nullable>[]"}},header:{defaultValue:null,description:"",name:"header",required:!0,type:{name:"string"}},selectMaterials:{defaultValue:null,description:"",name:"selectMaterials",required:!0,type:{name:"(materialIds: Nullable>[]) => void"}},marginBottonPager:{defaultValue:null,description:"",name:"marginBottonPager",required:!0,type:{name:"boolean"}},openDetailsModal:{defaultValue:null,description:"",name:"openDetailsModal",required:!0,type:{name:"(reservation: Nullable>) => void"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/GroupModal/GroupModalReservationsList.tsx#GroupModalReservationsList"]={docgenInfo:GroupModalReservationsList.__docgenInfo,name:"GroupModalReservationsList",path:"src/components/GroupModal/GroupModalReservationsList.tsx#GroupModalReservationsList"})}catch(__react_docgen_typescript_loader_error){}var StatusCircleModalHeader=__webpack_require__("./src/components/GroupModal/StatusCircleModalHeader.tsx"),status_circle=__webpack_require__("./src/apps/loan-list/materials/utils/status-circle.tsx"),useReservations=__webpack_require__("./src/core/utils/useReservations.tsx"),modal_helpers=__webpack_require__("./src/core/utils/helpers/modal-helpers.ts");const modal_ReservationsGroupModal=({pageSize,modalId,setReservationsToDelete,openDetailsModal})=>{const{fbs,publizon}=(0,useReservations.Z)(),t=(0,utils_text.X)(),{reservationsReady,reservationsQueued}=(0,modal_helpers.GM)(),[materialsToDelete,setMaterialsToDelete]=(0,react.useState)([]);let physicalReservations=[],digitalReservations=[];modalId===reservationsReady&&(physicalReservations=fbs.readyToLoan,digitalReservations=publizon.readyToLoan),modalId===reservationsQueued&&(physicalReservations=fbs.queued,digitalReservations=publizon.queued),(0,react.useEffect)((()=>{setMaterialsToDelete([])}),[modalId]);const selectableReservations=[...physicalReservations,...digitalReservations],selectMaterials=materials=>{setMaterialsToDelete(materials)};return react.createElement(modal.Z,{modalId,closeModalAriaLabelText:t("groupModalReservationsCloseModalAriaLabelText"),screenReaderModalDescriptionText:t("groupModalReservationsLoansAriaDescriptionText")},react.createElement("div",{className:"modal-loan"},react.createElement("div",{className:"modal-loan__list"},modalId===reservationsQueued&&react.createElement(SimpleModalHeader.Z,{header:t("queuedReservationsText")}),modalId===reservationsReady&&react.createElement(StatusCircleModalHeader.Z,{header:t("reservationsReadyForPickupText"),statusCircleComponent:react.createElement(status_circle.Z,{loanDate:""})}),react.createElement(GroupModalContent.Z,{buttonComponent:react.createElement(Button.z,{label:t("removeAllReservationsText",{placeholders:{"@amount":materialsToDelete.length}}),buttonType:"none",disabled:!materialsToDelete.length,collapsible:!1,size:"small",variant:"filled",onClick:()=>(setReservationsToDelete(materialsToDelete),void setMaterialsToDelete([])),dataCy:"remove-reservations-button"}),amountOfSelectableMaterials:selectableReservations.length,selectableMaterials:selectableReservations,selectedMaterials:materialsToDelete,selectMaterials},react.createElement(GroupModal_GroupModalReservationsList,{openDetailsModal,header:t("physicalReservationsHeaderText"),materials:physicalReservations,pageSize,selectedMaterials:materialsToDelete,selectMaterials,marginBottonPager:0===digitalReservations.length}),react.createElement(GroupModal_GroupModalReservationsList,{marginBottonPager:!0,openDetailsModal,header:t("digitalReservationsHeaderText"),materials:digitalReservations,pageSize,selectedMaterials:materialsToDelete,selectMaterials})))))};try{ReservationsGroupModal.displayName="ReservationsGroupModal",ReservationsGroupModal.__docgenInfo={description:"",displayName:"ReservationsGroupModal",props:{pageSize:{defaultValue:null,description:"",name:"pageSize",required:!0,type:{name:"number"}},modalId:{defaultValue:null,description:"",name:"modalId",required:!0,type:{name:"string"}},setReservationsToDelete:{defaultValue:null,description:"",name:"setReservationsToDelete",required:!0,type:{name:"(reservations: Nullable>[]) => void"}},openDetailsModal:{defaultValue:null,description:"",name:"openDetailsModal",required:!0,type:{name:"(reservation: Nullable>) => void"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/dashboard/modal/ReservationsGroupModal.tsx#ReservationsGroupModal"]={docgenInfo:ReservationsGroupModal.__docgenInfo,name:"ReservationsGroupModal",path:"src/apps/dashboard/modal/ReservationsGroupModal.tsx#ReservationsGroupModal"})}catch(__react_docgen_typescript_loader_error){}var reservation_details=__webpack_require__("./src/apps/reservation-list/modal/reservation-details/reservation-details.tsx"),delete_reservation_modal=__webpack_require__("./src/apps/reservation-list/modal/delete-reservation/delete-reservation-modal.tsx"),AcceptFeesModal=__webpack_require__("./src/components/accept-fees-modal/AcceptFeesModal.tsx"),useLoans=__webpack_require__("./src/core/utils/useLoans.tsx");const dashboard_notification_list=({pageSize,columns})=>{const t=(0,utils_text.X)(),u=(0,url.J_)(),physicalLoansUrl=u("physicalLoansUrl"),reservationsUrl=u("reservationsUrl"),{all:{reservations,readyToLoan:reservationsReadyToLoan,queued:reservationsQueued}}=(0,useReservations.Z)(),{all:{loans,overdue:loansOverdue,soonOverdue:loansSoonOverdue,farFromOverdue:loansFarFromOverdue}}=(0,useLoans.Z)(),[accepted,setAccepted]=(0,react.useState)(!1),[reservationsForDeleting,setReservationsForDeleting]=(0,react.useState)([]),[loansToDisplay,setLoansToDisplay]=(0,react.useState)(null),[modalHeader,setModalHeader]=(0,react.useState)(""),{open}=(0,modal.f)(),{acceptModal,dueDateModal,deleteReservations}=(0,modal_helpers.GM)(),[dueDate,setDueDate]=(0,react.useState)(null),[modalLoan,setModalLoan]=(0,react.useState)(null),[reservationForModal,setReservationForModal]=(0,react.useState)(null),[reservationModalId,setReservationModalId]=(0,react.useState)(""),openModalHandler=(0,react.useCallback)((modalId=>{setReservationModalId(modalId),open(modalId)}),[open]),{reservationsReady:reservationsReadyID,reservationsQueued:reservationsQueueID}=(0,modal_helpers.GM)(),openLoanDetailsModal=(0,react.useCallback)((loan=>{setModalLoan(loan),open((0,material_details_modal.ae)(loan))}),[open]),openReservationDetailsModal=(0,react.useCallback)((reservation=>{setReservationForModal(reservation),open((0,material_details_modal.Wu)(reservation))}),[open]),openReservationDeleteModal=(0,react.useCallback)((()=>{reservationForModal&&open((0,delete_reservation_modal._)(reservationForModal))}),[open,reservationForModal]),openDueDateModal=(0,react.useCallback)((dueDateInput=>{switch(setDueDate(dueDateInput),dueDateInput){case yesterday:setLoansToDisplay(loansOverdue),setModalHeader(t("loansOverdueText"));break;case soon:setLoansToDisplay(loansSoonOverdue),setModalHeader(t("loansSoonOverdueText"));break;case longer:setLoansToDisplay(loansFarFromOverdue),setModalHeader(t("loansNotOverdueText"));break;default:throw new Error("Invalid due date input")}open((0,modal_helpers.V$)(dueDateModal,[dueDateInput]))}),[dueDateModal,open,loansFarFromOverdue,loansOverdue,loansSoonOverdue,t]),dashboardNotificationsLoan=[{listLength:loansOverdue.length,badge:t("materialDetailsOverdueText"),header:t("loansOverdueText"),color:"danger",dataCy:"physical-loans-overdue",showNotificationDot:!0,notificationClickEvent:()=>1===loansOverdue.length?openLoanDetailsModal(loansOverdue[0]):openDueDateModal(yesterday)},{listLength:loansSoonOverdue.length,badge:t("statusBadgeWarningText"),header:t("loansSoonOverdueText"),color:"warning",dataCy:"physical-loans-soon-overdue",showNotificationDot:!0,notificationClickEvent:()=>1===loansSoonOverdue.length?openLoanDetailsModal(loansSoonOverdue[0]):openDueDateModal(soon)},{listLength:loansFarFromOverdue.length,header:t("loansNotOverdueText"),dataCy:"loans-not-overdue",color:"neutral",showNotificationDot:!1,notificationClickEvent:()=>1===loansFarFromOverdue.length?openLoanDetailsModal(loansFarFromOverdue[0]):openDueDateModal(longer)}],openAcceptModal=(0,react.useCallback)((()=>{open(`${acceptModal}`)}),[acceptModal,open]),dashboardNotificationsReservations=[{listLength:reservationsReadyToLoan.length,header:t("reservationsReadyText"),badge:t("readyForLoanText"),dataCy:"reservations-ready",showNotificationDot:!0,color:"info",notificationClickEvent:()=>1===reservationsReadyToLoan.length?openReservationDetailsModal(reservationsReadyToLoan[0]):openModalHandler(reservationsReadyID)},{listLength:reservationsQueued.length,header:t("reservationsStillInQueueForText"),dataCy:"reservations-queued",color:"neutral",showNotificationDot:!1,notificationClickEvent:()=>1===reservationsQueued.length?openReservationDetailsModal(reservationsQueued[0]):openModalHandler(reservationsQueueID)}];return react.createElement(react.Fragment,null,react.createElement("div",{className:"status-userprofile"},columns&&react.createElement(react.Fragment,null,react.createElement(dashboard_notification_list_NotificationColumn,{materials:dashboardNotificationsLoan,materialsCount:loans.length,headerUrl:physicalLoansUrl,header:t("physicalLoansText"),emptyListText:t("noPhysicalLoansText")}),react.createElement(dashboard_notification_list_NotificationColumn,{materials:dashboardNotificationsReservations,materialsCount:reservations.length,headerUrl:reservationsUrl,header:t("reservationsText"),emptyListText:t("noReservationsText")}))),!columns&&react.createElement(dashboard_notification_list_Notifications,{showOnlyNotifications:!0,materials:[...dashboardNotificationsLoan,...dashboardNotificationsReservations]}),modalLoan&&react.createElement(material_details_modal.ZP,{modalId:(0,material_details_modal.ae)(modalLoan)},react.createElement(material_details.Z,{item:modalLoan,loan:modalLoan,modalId:(0,material_details_modal.ae)(modalLoan)})),dueDate&&loans&&loansToDisplay&&react.createElement(LoansGroupModal.Z,{accepted,resetAccepted:()=>{setAccepted(!1)},openAcceptModal,pageSize,openDetailsModal:openLoanDetailsModal,dueDate,loansModal:loansToDisplay},react.createElement(SimpleModalHeader.Z,{header:modalHeader})),reservations&&react.createElement(modal_ReservationsGroupModal,{openDetailsModal:openReservationDetailsModal,modalId:reservationModalId,setReservationsToDelete:resForDeleting=>{setReservationsForDeleting(resForDeleting),open(deleteReservations)},pageSize}),reservationForModal&&react.createElement(delete_reservation_modal.Z,{modalId:(0,delete_reservation_modal._)(reservationForModal),reservations:[reservationForModal]}),reservationsForDeleting&&react.createElement(delete_reservation_modal.Z,{modalId:`${deleteReservations}`,reservations:reservationsForDeleting}),reservationForModal&&react.createElement(material_details_modal.ZP,{modalId:(0,material_details_modal.Wu)(reservationForModal)},react.createElement(reservation_details.Z,{openReservationDeleteModal,item:reservationForModal,reservation:reservationForModal})),react.createElement(AcceptFeesModal.Z,{accept:()=>setAccepted(!0)}))};try{dashboardnotificationlist.displayName="dashboardnotificationlist",dashboardnotificationlist.__docgenInfo={description:"",displayName:"dashboardnotificationlist",props:{pageSize:{defaultValue:null,description:"",name:"pageSize",required:!0,type:{name:"number"}},columns:{defaultValue:null,description:"",name:"columns",required:!0,type:{name:"boolean"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/dashboard/dashboard-notification-list/dashboard-notification-list.tsx#dashboardnotificationlist"]={docgenInfo:dashboardnotificationlist.__docgenInfo,name:"dashboardnotificationlist",path:"src/apps/dashboard/dashboard-notification-list/dashboard-notification-list.tsx#dashboardnotificationlist"})}catch(__react_docgen_typescript_loader_error){}},"./src/apps/dashboard/dashboard.dev.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{DashboardEntry:()=>dashboard_dev_DashboardEntry,default:()=>dashboard_dev});var react=__webpack_require__("./node_modules/react/index.js"),serviceUrlArgs=__webpack_require__("./src/core/storybook/serviceUrlArgs.ts"),config=__webpack_require__("./src/core/utils/config.tsx"),general=__webpack_require__("./src/core/utils/helpers/general.ts"),utils_text=__webpack_require__("./src/core/utils/text.tsx"),url=__webpack_require__("./src/core/utils/url.tsx"),fbs=__webpack_require__("./src/core/fbs/fbs.ts"),Link=__webpack_require__("./src/components/atoms/links/Link.tsx"),warning_bar=__webpack_require__("./src/apps/loan-list/materials/utils/warning-bar.tsx");const dashboard_fees=()=>{const t=(0,utils_text.X)(),feesPageUrl=(0,url.J_)()("feesPageUrl"),{data:fbsFees}=(0,fbs.CI)(),[feeCount,setFeeCount]=(0,react.useState)(),[totalFeeAmount,setTotalFeeAmount]=(0,react.useState)("0");return(0,react.useEffect)((()=>{fbsFees&&(setFeeCount(fbsFees.length),setTotalFeeAmount((0,general.e8)(fbsFees)))}),[fbsFees,feeCount,totalFeeAmount]),react.createElement("div",{className:"fee-container"},fbsFees&&!!feeCount&&react.createElement("div",null,react.createElement("div",{className:"status-userprofile__column my-16"},react.createElement("div",{className:"link-filters"},react.createElement("div",{className:"link-filters__tag-wrapper"},react.createElement("h2",{"data-cy":"dashboard-fees-header"},react.createElement(Link.Z,{href:feesPageUrl,className:"link-tag link-tag link-filters__tag"},t("feesText")),react.createElement("span",{className:"link-filters__counter"},feeCount)))),react.createElement(warning_bar.Z,{rightText:t("totalAmountFeeText",{placeholders:{"@total":totalFeeAmount}}),overdueText:t("totalOwedText"),rightButtonText:t("dashboardSeeMoreFeesText"),rightButtonAriaLabelText:t("dashboardSeeMoreFeesAriaLabelText"),rightLink:feesPageUrl}))))};try{dashboardfees.displayName="dashboardfees",dashboardfees.__docgenInfo={description:"",displayName:"dashboardfees",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/dashboard/dashboard-fees/dashboard-fees.tsx#dashboardfees"]={docgenInfo:dashboardfees.__docgenInfo,name:"dashboardfees",path:"src/apps/dashboard/dashboard-fees/dashboard-fees.tsx#dashboardfees"})}catch(__react_docgen_typescript_loader_error){}var dashboard_notification_list=__webpack_require__("./src/apps/dashboard/dashboard-notification-list/dashboard-notification-list.tsx");const dashboard_dashboard=({pageSize})=>{const t=(0,utils_text.X)();return react.createElement("div",{className:"dashboard-page"},react.createElement("h1",{className:"text-header-h1 my-32","data-cy":"dashboard-header"},t("yourProfileText")),react.createElement(dashboard_fees,null),react.createElement(dashboard_notification_list.Z,{columns:!0,pageSize}))};try{dashboard.displayName="dashboard",dashboard.__docgenInfo={description:"",displayName:"dashboard",props:{pageSize:{defaultValue:null,description:"",name:"pageSize",required:!0,type:{name:"number"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/dashboard/dashboard.tsx#dashboard"]={docgenInfo:dashboard.__docgenInfo,name:"dashboard",path:"src/apps/dashboard/dashboard.tsx#dashboard"})}catch(__react_docgen_typescript_loader_error){}const dashboard_entry=(0,config.Rh)((0,url.XL)((0,utils_text.z)((({pageSizeDesktop,pageSizeMobile})=>{const pageSize=(0,general.Rh)({desktop:pageSizeDesktop,mobile:pageSizeMobile},"pageSizeLoanList");return react.createElement(dashboard_dashboard,{pageSize})}))));try{dashboardentry.displayName="dashboardentry",dashboardentry.__docgenInfo={description:"",displayName:"dashboardentry",props:{loansOverdueUrl:{defaultValue:null,description:"",name:"loansOverdueUrl",required:!0,type:{name:"string"}},physicalLoansUrl:{defaultValue:null,description:"",name:"physicalLoansUrl",required:!0,type:{name:"string"}},feesPageUrl:{defaultValue:null,description:"",name:"feesPageUrl",required:!0,type:{name:"string"}},reservationsUrl:{defaultValue:null,description:"",name:"reservationsUrl",required:!0,type:{name:"string"}},ereolenHomepageUrl:{defaultValue:null,description:"",name:"ereolenHomepageUrl",required:!0,type:{name:"string"}},blacklistedPickupBranchesConfig:{defaultValue:null,description:"",name:"blacklistedPickupBranchesConfig",required:!0,type:{name:"string"}},branchesConfig:{defaultValue:null,description:"",name:"branchesConfig",required:!0,type:{name:"string"}},expirationWarningDaysBeforeConfig:{defaultValue:null,description:"",name:"expirationWarningDaysBeforeConfig",required:!0,type:{name:"string"}},dashboardNumberInLineText:{defaultValue:null,description:"",name:"dashboardNumberInLineText",required:!0,type:{name:"string"}},deleteReservationModalButtonText:{defaultValue:null,description:"",name:"deleteReservationModalButtonText",required:!0,type:{name:"string"}},deleteReservationModalDeleteButtonText:{defaultValue:null,description:"",name:"deleteReservationModalDeleteButtonText",required:!0,type:{name:"string"}},deleteReservationModalDeleteProcessingText:{defaultValue:null,description:"",name:"deleteReservationModalDeleteProcessingText",required:!0,type:{name:"string"}},deleteReservationModalErrorsStatusText:{defaultValue:null,description:"",name:"deleteReservationModalErrorsStatusText",required:!0,type:{name:"string"}},deleteReservationModalErrorsTitleText:{defaultValue:null,description:"",name:"deleteReservationModalErrorsTitleText",required:!0,type:{name:"string"}},deleteReservationModalSuccessStatusText:{defaultValue:null,description:"",name:"deleteReservationModalSuccessStatusText",required:!0,type:{name:"string"}},deleteReservationModalSuccessTitleText:{defaultValue:null,description:"",name:"deleteReservationModalSuccessTitleText",required:!0,type:{name:"string"}},etAlText:{defaultValue:null,description:"",name:"etAlText",required:!0,type:{name:"string"}},feesText:{defaultValue:null,description:"",name:"feesText",required:!0,type:{name:"string"}},loanListMaterialDaysText:{defaultValue:null,description:"",name:"loanListMaterialDaysText",required:!0,type:{name:"string"}},loansNotOverdueText:{defaultValue:null,description:"",name:"loansNotOverdueText",required:!0,type:{name:"string"}},loansOverdueText:{defaultValue:null,description:"",name:"loansOverdueText",required:!0,type:{name:"string"}},loansSoonOverdueText:{defaultValue:null,description:"",name:"loansSoonOverdueText",required:!0,type:{name:"string"}},materialAndAuthorText:{defaultValue:null,description:"",name:"materialAndAuthorText",required:!0,type:{name:"string"}},materialByAuthorText:{defaultValue:null,description:"",name:"materialByAuthorText",required:!0,type:{name:"string"}},noPhysicalLoansText:{defaultValue:null,description:"",name:"noPhysicalLoansText",required:!0,type:{name:"string"}},noReservationsText:{defaultValue:null,description:"",name:"noReservationsText",required:!0,type:{name:"string"}},dashboardSeeMoreFeesText:{defaultValue:null,description:"",name:"dashboardSeeMoreFeesText",required:!0,type:{name:"string"}},dashboardSeeMoreFeesAriaLabelText:{defaultValue:null,description:"",name:"dashboardSeeMoreFeesAriaLabelText",required:!0,type:{name:"string"}},physicalLoansText:{defaultValue:null,description:"",name:"physicalLoansText",required:!0,type:{name:"string"}},publizonAudioBookText:{defaultValue:null,description:"",name:"publizonAudioBookText",required:!0,type:{name:"string"}},publizonEbookText:{defaultValue:null,description:"",name:"publizonEbookText",required:!0,type:{name:"string"}},publizonPodcastText:{defaultValue:null,description:"",name:"publizonPodcastText",required:!0,type:{name:"string"}},queuedReservationsText:{defaultValue:null,description:"",name:"queuedReservationsText",required:!0,type:{name:"string"}},readyForLoanText:{defaultValue:null,description:"",name:"readyForLoanText",required:!0,type:{name:"string"}},reservationDetailsOthersInQueueText:{defaultValue:null,description:"",name:"reservationDetailsOthersInQueueText",required:!0,type:{name:"string"}},reservationsReadyText:{defaultValue:null,description:"",name:"reservationsReadyText",required:!0,type:{name:"string"}},reservationsStillInQueueForText:{defaultValue:null,description:"",name:"reservationsStillInQueueForText",required:!0,type:{name:"string"}},reservationsText:{defaultValue:null,description:"",name:"reservationsText",required:!0,type:{name:"string"}},resultPagerStatusText:{defaultValue:null,description:"",name:"resultPagerStatusText",required:!0,type:{name:"string"}},statusBadgeWarningText:{defaultValue:null,description:"",name:"statusBadgeWarningText",required:!0,type:{name:"string"}},totalAmountFeeText:{defaultValue:null,description:"",name:"totalAmountFeeText",required:!0,type:{name:"string"}},totalOwedText:{defaultValue:null,description:"",name:"totalOwedText",required:!0,type:{name:"string"}},yourProfileText:{defaultValue:null,description:"",name:"yourProfileText",required:!0,type:{name:"string"}},pageSizeMobile:{defaultValue:null,description:"",name:"pageSizeMobile",required:!0,type:{name:"number"}},pageSizeDesktop:{defaultValue:null,description:"",name:"pageSizeDesktop",required:!0,type:{name:"number"}},groupModalDueDateLinkToPageWithFeesText:{defaultValue:null,description:"",name:"groupModalDueDateLinkToPageWithFeesText",required:!0,type:{name:"string"}},showMoreText:{defaultValue:null,description:"",name:"showMoreText",required:!0,type:{name:"string"}},groupModalDueDateMaterialText:{defaultValue:null,description:"",name:"groupModalDueDateMaterialText",required:!0,type:{name:"string"}},groupModalGoToMaterialText:{defaultValue:null,description:"",name:"groupModalGoToMaterialText",required:!0,type:{name:"string"}},groupModalDueDateHeaderText:{defaultValue:null,description:"",name:"groupModalDueDateHeaderText",required:!0,type:{name:"string"}},groupModalReturnLibraryText:{defaultValue:null,description:"",name:"groupModalReturnLibraryText",required:!0,type:{name:"string"}},groupModalCheckboxText:{defaultValue:null,description:"",name:"groupModalCheckboxText",required:!0,type:{name:"string"}},groupModalHiddenLabelCheckboxOnMaterialText:{defaultValue:null,description:"",name:"groupModalHiddenLabelCheckboxOnMaterialText",required:!0,type:{name:"string"}},groupModalButtonText:{defaultValue:null,description:"",name:"groupModalButtonText",required:!0,type:{name:"string"}},groupModalDueDateWarningLoanOverdueText:{defaultValue:null,description:"",name:"groupModalDueDateWarningLoanOverdueText",required:!0,type:{name:"string"}},groupModalLoansAriaDescriptionText:{defaultValue:null,description:"",name:"groupModalLoansAriaDescriptionText",required:!0,type:{name:"string"}},groupModalLoansCloseModalAriaLabelText:{defaultValue:null,description:"",name:"groupModalLoansCloseModalAriaLabelText",required:!0,type:{name:"string"}},groupModalRenewLoanDeniedInterLibraryLoanText:{defaultValue:null,description:"",name:"groupModalRenewLoanDeniedInterLibraryLoanText",required:!0,type:{name:"string"}},groupModalRenewLoanDeniedMaxRenewalsReachedText:{defaultValue:null,description:"",name:"groupModalRenewLoanDeniedMaxRenewalsReachedText",required:!0,type:{name:"string"}},groupModalRenewLoanDeniedReservedText:{defaultValue:null,description:"",name:"groupModalRenewLoanDeniedReservedText",required:!0,type:{name:"string"}},deleteReservationModalHeaderText:{defaultValue:null,description:"",name:"deleteReservationModalHeaderText",required:!0,type:{name:"string"}},deleteReservationModalDeleteQuestionText:{defaultValue:null,description:"",name:"deleteReservationModalDeleteQuestionText",required:!0,type:{name:"string"}},deleteReservationModalNotRegrettableText:{defaultValue:null,description:"",name:"deleteReservationModalNotRegrettableText",required:!0,type:{name:"string"}},deleteReservationModalCloseModalText:{defaultValue:null,description:"",name:"deleteReservationModalCloseModalText",required:!0,type:{name:"string"}},deleteReservationModalAriaDescriptionText:{defaultValue:null,description:"",name:"deleteReservationModalAriaDescriptionText",required:!0,type:{name:"string"}},acceptModalHeaderText:{defaultValue:null,description:"",name:"acceptModalHeaderText",required:!0,type:{name:"string"}},acceptModalAreYouSureText:{defaultValue:null,description:"",name:"acceptModalAreYouSureText",required:!0,type:{name:"string"}},acceptModalBodyText:{defaultValue:null,description:"",name:"acceptModalBodyText",required:!0,type:{name:"string"}},acceptModalCancelButtonText:{defaultValue:null,description:"",name:"acceptModalCancelButtonText",required:!0,type:{name:"string"}},acceptModalAcceptButtonText:{defaultValue:null,description:"",name:"acceptModalAcceptButtonText",required:!0,type:{name:"string"}},acceptModalAriaDescriptionText:{defaultValue:null,description:"",name:"acceptModalAriaDescriptionText",required:!0,type:{name:"string"}},acceptModalAriaLabelText:{defaultValue:null,description:"",name:"acceptModalAriaLabelText",required:!0,type:{name:"string"}},groupModalReservationsCloseModalAriaLabelText:{defaultValue:null,description:"",name:"groupModalReservationsCloseModalAriaLabelText",required:!0,type:{name:"string"}},groupModalReservationsLoansAriaDescriptionText:{defaultValue:null,description:"",name:"groupModalReservationsLoansAriaDescriptionText",required:!0,type:{name:"string"}},readyForLoanCounterLabelText:{defaultValue:null,description:"",name:"readyForLoanCounterLabelText",required:!0,type:{name:"string"}},removeAllReservationsText:{defaultValue:null,description:"",name:"removeAllReservationsText",required:!0,type:{name:"string"}},pickUpLatestText:{defaultValue:null,description:"",name:"pickUpLatestText",required:!0,type:{name:"string"}},reservationsReadyForPickupText:{defaultValue:null,description:"",name:"reservationsReadyForPickupText",required:!0,type:{name:"string"}},physicalReservationsHeaderText:{defaultValue:null,description:"",name:"physicalReservationsHeaderText",required:!0,type:{name:"string"}},digitalReservationsHeaderText:{defaultValue:null,description:"",name:"digitalReservationsHeaderText",required:!0,type:{name:"string"}},renewGroupModalLoansButtonText:{defaultValue:null,description:"",name:"renewGroupModalLoansButtonText",required:!0,type:{name:"string"}},renewGroupModalLoansErrorStatusText:{defaultValue:null,description:"",name:"renewGroupModalLoansErrorStatusText",required:!0,type:{name:"string"}},renewGroupModalLoansErrorTitleText:{defaultValue:null,description:"",name:"renewGroupModalLoansErrorTitleText",required:!0,type:{name:"string"}},renewGroupModalLoansNoRenewalsPossibleErrorStatusText:{defaultValue:null,description:"",name:"renewGroupModalLoansNoRenewalsPossibleErrorStatusText",required:!0,type:{name:"string"}},renewGroupModalLoansNoRenewalsPossibleErrorTitleText:{defaultValue:null,description:"",name:"renewGroupModalLoansNoRenewalsPossibleErrorTitleText",required:!0,type:{name:"string"}},renewGroupModalLoansSuccessStatusText:{defaultValue:null,description:"",name:"renewGroupModalLoansSuccessStatusText",required:!0,type:{name:"string"}},renewGroupModalLoansSuccessTitleText:{defaultValue:null,description:"",name:"renewGroupModalLoansSuccessTitleText",required:!0,type:{name:"string"}},renewMaterialLoanButtonText:{defaultValue:null,description:"",name:"renewMaterialLoanButtonText",required:!0,type:{name:"string"}},renewMaterialLoanErrorStatusText:{defaultValue:null,description:"",name:"renewMaterialLoanErrorStatusText",required:!0,type:{name:"string"}},renewMaterialLoanErrorTitleText:{defaultValue:null,description:"",name:"renewMaterialLoanErrorTitleText",required:!0,type:{name:"string"}},renewMaterialLoanNoRenewalsPossibleErrorStatusText:{defaultValue:null,description:"",name:"renewMaterialLoanNoRenewalsPossibleErrorStatusText",required:!0,type:{name:"string"}},renewMaterialLoanNoRenewalsPossibleErrorTitleText:{defaultValue:null,description:"",name:"renewMaterialLoanNoRenewalsPossibleErrorTitleText",required:!0,type:{name:"string"}},renewMaterialLoanSuccessStatusText:{defaultValue:null,description:"",name:"renewMaterialLoanSuccessStatusText",required:!0,type:{name:"string"}},renewMaterialLoanSuccessTitleText:{defaultValue:null,description:"",name:"renewMaterialLoanSuccessTitleText",required:!0,type:{name:"string"}},renewProcessingText:{defaultValue:null,description:"",name:"renewProcessingText",required:!0,type:{name:"string"}},reservationDetailsRemoveDigitalReservationText:{defaultValue:null,description:"",name:"reservationDetailsRemoveDigitalReservationText",required:!0,type:{name:"string"}},reservationDetailsDateOfReservationTitleText:{defaultValue:null,description:"",name:"reservationDetailsDateOfReservationTitleText",required:!0,type:{name:"string"}},reservationDetailsNumberInQueueLabelText:{defaultValue:null,description:"",name:"reservationDetailsNumberInQueueLabelText",required:!0,type:{name:"string"}},reservationDetailsNoInterestAfterTitleText:{defaultValue:null,description:"",name:"reservationDetailsNoInterestAfterTitleText",required:!0,type:{name:"string"}},reservationDetailsChangeText:{defaultValue:null,description:"",name:"reservationDetailsChangeText",required:!0,type:{name:"string"}},reservationDetailsPickUpAtTitleText:{defaultValue:null,description:"",name:"reservationDetailsPickUpAtTitleText",required:!0,type:{name:"string"}},reservationDetailsButtonRemoveText:{defaultValue:null,description:"",name:"reservationDetailsButtonRemoveText",required:!0,type:{name:"string"}},reservationDetailsStatusTitleText:{defaultValue:null,description:"",name:"reservationDetailsStatusTitleText",required:!0,type:{name:"string"}},reservationDetailsBorrowBeforeText:{defaultValue:null,description:"",name:"reservationDetailsBorrowBeforeText",required:!0,type:{name:"string"}},reservationDetailsDigitalReservationGoToEreolenText:{defaultValue:null,description:"",name:"reservationDetailsDigitalReservationGoToEreolenText",required:!0,type:{name:"string"}},reservationDetailsReadyForLoanText:{defaultValue:null,description:"",name:"reservationDetailsReadyForLoanText",required:!0,type:{name:"string"}},reservationDetailsPickupDeadlineTitleText:{defaultValue:null,description:"",name:"reservationDetailsPickupDeadlineTitleText",required:!0,type:{name:"string"}},interestPeriodsConfig:{defaultValue:null,description:"",name:"interestPeriodsConfig",required:!0,type:{name:"string"}},reservationDetailsConfig:{defaultValue:null,description:"",name:"reservationDetailsConfig",required:!0,type:{name:"string"}},shiftText:{defaultValue:null,description:"",name:"shiftText",required:!0,type:{name:"string"}},modalReservationFormPickupHeaderTitleText:{defaultValue:null,description:"",name:"modalReservationFormPickupHeaderTitleText",required:!0,type:{name:"string"}},modalReservationFormPickupHeaderDescriptionText:{defaultValue:null,description:"",name:"modalReservationFormPickupHeaderDescriptionText",required:!0,type:{name:"string"}},saveButtonText:{defaultValue:null,description:"",name:"saveButtonText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterHeaderTitleText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterHeaderTitleText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterHeaderDescriptionText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterHeaderDescriptionText",required:!0,type:{name:"string"}},chooseOneText:{defaultValue:null,description:"",name:"chooseOneText",required:!0,type:{name:"string"}},loadingText:{defaultValue:null,description:"",name:"loadingText",required:!0,type:{name:"string"}},reservationSuccessTitleText:{defaultValue:null,description:"",name:"reservationSuccessTitleText",required:!0,type:{name:"string"}},reservationSuccessSubTitleText:{defaultValue:null,description:"",name:"reservationSuccessSubTitleText",required:!0,type:{name:"string"}},reservationerrorTitleText:{defaultValue:null,description:"",name:"reservationerrorTitleText",required:!0,type:{name:"string"}},reservationerrorSubTitleText:{defaultValue:null,description:"",name:"reservationerrorSubTitleText",required:!0,type:{name:"string"}},reservationStatusButtonText:{defaultValue:null,description:"",name:"reservationStatusButtonText",required:!0,type:{name:"string"}},materialDetailsWarningLoanOverdueText:{defaultValue:null,description:"",name:"materialDetailsWarningLoanOverdueText",required:!0,type:{name:"string"}},materialDetailsPhysicalDueDateLabelText:{defaultValue:null,description:"",name:"materialDetailsPhysicalDueDateLabelText",required:!0,type:{name:"string"}},materialDetailsLoanDateLabelText:{defaultValue:null,description:"",name:"materialDetailsLoanDateLabelText",required:!0,type:{name:"string"}},materialDetailsMaterialNumberLabelText:{defaultValue:null,description:"",name:"materialDetailsMaterialNumberLabelText",required:!0,type:{name:"string"}},materialDetailsCloseModalAriaLabelText:{defaultValue:null,description:"",name:"materialDetailsCloseModalAriaLabelText",required:!0,type:{name:"string"}},materialDetailsLinkToPageWithFeesText:{defaultValue:null,description:"",name:"materialDetailsLinkToPageWithFeesText",required:!0,type:{name:"string"}},materialDetailsOverdueText:{defaultValue:null,description:"",name:"materialDetailsOverdueText",required:!0,type:{name:"string"}},ereolenMyPageUrl:{defaultValue:null,description:"",name:"ereolenMyPageUrl",required:!0,type:{name:"string"}},materialDetailsModalAriaDescriptionText:{defaultValue:null,description:"",name:"materialDetailsModalAriaDescriptionText",required:!0,type:{name:"string"}},materialDetailsGoToEreolenText:{defaultValue:null,description:"",name:"materialDetailsGoToEreolenText",required:!0,type:{name:"string"}},materialDetailsDigitalDueDateLabelText:{defaultValue:null,description:"",name:"materialDetailsDigitalDueDateLabelText",required:!0,type:{name:"string"}},materialDetailsRenewLoanButtonText:{defaultValue:null,description:"",name:"materialDetailsRenewLoanButtonText",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/dashboard/dashboard.entry.tsx#dashboardentry"]={docgenInfo:dashboardentry.__docgenInfo,name:"dashboardentry",path:"src/apps/dashboard/dashboard.entry.tsx#dashboardentry"})}catch(__react_docgen_typescript_loader_error){}var groupModalArgs=__webpack_require__("./src/core/storybook/groupModalArgs.ts"),loanGroupModalArgs=__webpack_require__("./src/core/storybook/loanGroupModalArgs.ts"),renewalArgs=__webpack_require__("./src/core/storybook/renewalArgs.ts"),reservationGroupModalArgs=__webpack_require__("./src/core/storybook/reservationGroupModalArgs.ts"),reservationMaterialDetailsArgs=__webpack_require__("./src/core/storybook/reservationMaterialDetailsArgs.ts"),materialDetailsModalArgs=__webpack_require__("./src/core/storybook/materialDetailsModalArgs.ts"),deleteReservationModalArgs=__webpack_require__("./src/core/storybook/deleteReservationModalArgs.ts"),acceptFeesModalArgs=__webpack_require__("./src/core/storybook/acceptFeesModalArgs.ts"),reservationListArgs=__webpack_require__("./src/core/storybook/reservationListArgs.ts");const dashboard_dev={title:"Apps / Dashboard",argTypes:{...serviceUrlArgs.Z,...groupModalArgs.Z,...loanGroupModalArgs.Z,...renewalArgs.Z,...reservationGroupModalArgs.Z,...reservationMaterialDetailsArgs.Z,...acceptFeesModalArgs.Z,...materialDetailsModalArgs.Z,...deleteReservationModalArgs.Z,...reservationListArgs.Z,physicalLoansUrl:{defaultValue:"/user/me/loans",control:{type:"text"}},reservationsUrl:{defaultValue:"/user/me/reservations",control:{type:"text"}},ereolenHomepageUrl:{defaultValue:"https://ereolen.dk/",control:{type:"text"}},yourProfileText:{defaultValue:"Your profile",control:{type:"text"}},feesText:{defaultValue:"Fees",control:{type:"text"}},totalOwedText:{defaultValue:"You owe in total",control:{type:"text"}},dashboardSeeMoreFeesText:{defaultValue:"See more",control:{type:"text"}},dashboardSeeMoreFeesAriaLabelText:{defaultValue:"See your fees and how to pay",control:{type:"text"}},totalAmountFeeText:{defaultValue:"@total,-",control:{type:"text"}},physicalLoansText:{defaultValue:"Loans",control:{type:"text"}},loansOverdueText:{defaultValue:"Returned too late",control:{type:"text"}},loansSoonOverdueText:{defaultValue:"To be returned soon",control:{type:"text"}},loansNotOverdueText:{defaultValue:"Longer return time",control:{type:"text"}},reservationsText:{defaultValue:"Reservations",control:{type:"text"}},queuedReservationsText:{defaultValue:"Queued reservations",control:{type:"text"}},reservationsReadyText:{defaultValue:"Ready for you",control:{type:"text"}},reservationsStillInQueueForText:{defaultValue:"Still in queue",control:{type:"text"}},noPhysicalLoansText:{defaultValue:"At the moment, you have 0 physical loans",control:{type:"text"}},noReservationsText:{defaultValue:"At the moment, you have 0 reservations",control:{type:"text"}},statusBadgeWarningText:{control:{type:"text"},defaultValue:"Expires soon"},readyForLoanText:{defaultValue:"Ready for pickup",control:{type:"text"}},publizonAudioBookText:{control:{type:"text"},defaultValue:"Audiobook"},publizonEbookText:{control:{type:"text"},defaultValue:"E-book"},publizonPodcastText:{control:{type:"text"},defaultValue:"Podcast"},dashboardNumberInLineText:{control:{type:"text"},defaultValue:"Number @count in line"},reservationDetailsOthersInQueueText:{defaultValue:"Others are queueing for this material",control:{type:"text"}},loanListMaterialDaysText:{control:{type:"text"},defaultValue:"days"},etAlText:{control:{type:"text"},defaultValue:"et al."},materialByAuthorText:{defaultValue:"By",control:{type:"text"}},materialAndAuthorText:{defaultValue:"and",control:{type:"text"}},reservationListLoanBeforeText:{defaultValue:"Borrow before @date",control:{type:"text"}},expirationWarningDaysBeforeConfig:{defaultValue:"6",control:{type:"text"}}},component:dashboard_entry},dashboard_dev_DashboardEntry=(props=>react.createElement(dashboard_entry,props)).bind({});dashboard_dev_DashboardEntry.args={}},"./src/apps/demo-modal/demo-modal.dev.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{App:()=>App,default:()=>demo_modal_dev});var react=__webpack_require__("./node_modules/react/index.js"),esm=__webpack_require__("./node_modules/@storybook/addon-queryparams/dist/esm/index.js"),utils_text=__webpack_require__("./src/core/utils/text.tsx"),modal=__webpack_require__("./src/core/utils/modal.tsx");const demo_modal=(0,utils_text.z)((()=>{const{open}=(0,modal.f)(),t=(0,utils_text.X)(),modalIdOne="demo-modal-one",modalIdTwo="demo-modal-two",onClick=modalId=>()=>{open(modalId)};return react.createElement(react.Fragment,null,react.createElement(modal.Z,{modalId:modalIdTwo,screenReaderModalDescriptionText:t("screenReaderModalDescriptionText"),closeModalAriaLabelText:t("ariaLabelModalTwoText")},react.createElement("h1",{id:`${modalIdTwo}-header`},modalIdTwo)),react.createElement(modal.Z,{modalId:modalIdOne,screenReaderModalDescriptionText:t("screenReaderModalDescriptionText"),closeModalAriaLabelText:t("ariaLabelModalOneText")},react.createElement("h1",{id:`${modalIdOne}-header`},modalIdOne),react.createElement("button",{type:"button",id:`${modalIdTwo}-button`,onClick:onClick(modalIdTwo)},"Show Modal 2")),react.createElement("button",{type:"button",id:`${modalIdOne}-button`,onClick:onClick(modalIdOne)},"Show Modal 1"))}));try{demomodal.displayName="demomodal",demomodal.__docgenInfo={description:"",displayName:"demomodal",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/demo-modal/demo-modal.tsx#demomodal"]={docgenInfo:demomodal.__docgenInfo,name:"demomodal",path:"src/apps/demo-modal/demo-modal.tsx#demomodal"})}catch(__react_docgen_typescript_loader_error){}const demo_modal_entry=(0,utils_text.z)((props=>react.createElement(demo_modal,null)));try{demomodalentry.displayName="demomodalentry",demomodalentry.__docgenInfo={description:"",displayName:"demomodalentry",props:{ariaLabelModalOneText:{defaultValue:null,description:"",name:"ariaLabelModalOneText",required:!0,type:{name:"string"}},ariaLabelModalTwoText:{defaultValue:null,description:"",name:"ariaLabelModalTwoText",required:!0,type:{name:"string"}},screenReaderModalDescriptionText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionText",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/demo-modal/demo-modal.entry.tsx#demomodalentry"]={docgenInfo:demomodalentry.__docgenInfo,name:"demomodalentry",path:"src/apps/demo-modal/demo-modal.entry.tsx#demomodalentry"})}catch(__react_docgen_typescript_loader_error){}const demo_modal_dev={title:"Apps / Demo modal",component:demo_modal_entry,decorators:[esm.j],parameters:{query:{modal:"demo-modal-one"}},argTypes:{ariaLabelModalOneText:{defaultValue:"Luk dialog et"},ariaLabelModalTwoText:{defaultValue:"Luk dialog to"},screenReaderModalDescriptionText:{defaultValue:"Denne modal dækker sidens indhold, og er en demo"}}},App=props=>react.createElement(demo_modal_entry,props)},"./src/apps/favorites-list-material-component/FavoritesListMaterialComponent.dev.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{FavoritesListMaterialComponentEntry:()=>FavoritesListMaterialComponentEntry,default:()=>FavoritesListMaterialComponent_dev});var react=__webpack_require__("./node_modules/react/index.js"),esm=__webpack_require__("./node_modules/@storybook/addon-queryparams/dist/esm/index.js"),serviceUrlArgs=__webpack_require__("./src/core/storybook/serviceUrlArgs.ts"),utils_text=__webpack_require__("./src/core/utils/text.tsx"),material_list=__webpack_require__("./src/core/material-list-api/material-list.ts"),graphql=__webpack_require__("./src/core/dbc-gateway/generated/graphql.tsx"),SimpleMaterial=__webpack_require__("./src/components/simple-material/SimpleMaterial.tsx");const SimpleMaterialAdapter=({pid,app,bright})=>{var _data$work;const{data}=(0,graphql.Qk)({id:pid});return react.createElement("div",null,data&&data.work&&react.createElement(SimpleMaterial.Z,{key:null===(_data$work=data.work)||void 0===_data$work?void 0:_data$work.workId,work:data.work,app,bright}))},simple_material_SimpleMaterialAdapter=SimpleMaterialAdapter;try{SimpleMaterialAdapter.displayName="SimpleMaterialAdapter",SimpleMaterialAdapter.__docgenInfo={description:"",displayName:"SimpleMaterialAdapter",props:{pid:{defaultValue:null,description:"",name:"pid",required:!0,type:{name:"`${number}-${string}:${number}`"}},app:{defaultValue:null,description:"",name:"app",required:!0,type:{name:"enum",value:[{value:'"material"'},{value:'"search-result"'},{value:'"advanced-search"'},{value:'"recommender"'},{value:'"something-similar"'},{value:'"favorites-list-mc"'},{value:'"inspiration-recommender"'}]}},bright:{defaultValue:null,description:"",name:"bright",required:!1,type:{name:"boolean | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/simple-material/SimpleMaterialAdapter.tsx#SimpleMaterialAdapter"]={docgenInfo:SimpleMaterialAdapter.__docgenInfo,name:"SimpleMaterialAdapter",path:"src/components/simple-material/SimpleMaterialAdapter.tsx#SimpleMaterialAdapter"})}catch(__react_docgen_typescript_loader_error){}var Link=__webpack_require__("./src/components/atoms/links/Link.tsx"),url=__webpack_require__("./src/core/utils/url.tsx");const FavoritesListMaterialComponent=()=>{const t=(0,utils_text.X)(),[materials,setMaterials]=(0,react.useState)([]),favoritesListMaterialComponentGoToListUrl=(0,url.J_)()("favoritesListMaterialComponentGoToListUrl"),{data}=(0,material_list.YV)("default"),{collections}=data||[];return(0,react.useEffect)((()=>{data&&data.collections&&setMaterials(collections.slice(0,4))}),[collections,data]),0===materials.length?null:react.createElement("div",{className:"recommender recommender--bright"},react.createElement("h2",{className:"recommender__left-title text-header-h1"},t("favoritesListMaterialComponentTitleText")),react.createElement("div",{className:"recommender__buttons"},react.createElement(Link.Z,{href:favoritesListMaterialComponentGoToListUrl,className:"button-link button-link--bright button-link--selected"},t("favoritesListMaterialComponentGoToListText"))),react.createElement("ul",{className:"recommender__grid"},materials.map((pid=>react.createElement(simple_material_SimpleMaterialAdapter,{app:"favorites-list-mc",bright:!0,pid})))))},favorites_list_material_component_FavoritesListMaterialComponent=FavoritesListMaterialComponent;try{FavoritesListMaterialComponent.displayName="FavoritesListMaterialComponent",FavoritesListMaterialComponent.__docgenInfo={description:"",displayName:"FavoritesListMaterialComponent",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/favorites-list-material-component/FavoritesListMaterialComponent.tsx#FavoritesListMaterialComponent"]={docgenInfo:FavoritesListMaterialComponent.__docgenInfo,name:"FavoritesListMaterialComponent",path:"src/apps/favorites-list-material-component/FavoritesListMaterialComponent.tsx#FavoritesListMaterialComponent"})}catch(__react_docgen_typescript_loader_error){}var config=__webpack_require__("./src/core/utils/config.tsx");const FavoritesListMaterialComponent_entry=(0,url.XL)((0,config.Rh)((0,utils_text.z)((()=>react.createElement(favorites_list_material_component_FavoritesListMaterialComponent,null)))));try{FavoritesListMaterialComponententry.displayName="FavoritesListMaterialComponententry",FavoritesListMaterialComponententry.__docgenInfo={description:"",displayName:"FavoritesListMaterialComponententry",props:{fbsBaseUrl:{defaultValue:null,description:"",name:"fbsBaseUrl",required:!0,type:{name:"string"}},publizonBaseUrl:{defaultValue:null,description:"",name:"publizonBaseUrl",required:!0,type:{name:"string"}},dplCmsBaseUrl:{defaultValue:null,description:"",name:"dplCmsBaseUrl",required:!0,type:{name:"string"}},coverBaseUrl:{defaultValue:null,description:"",name:"coverBaseUrl",required:!0,type:{name:"string"}},materialBaseUrl:{defaultValue:null,description:"",name:"materialBaseUrl",required:!0,type:{name:"string"}},fbiBaseUrl:{defaultValue:null,description:"",name:"fbiBaseUrl",required:!0,type:{name:"string"}},materialUrl:{defaultValue:null,description:"",name:"materialUrl",required:!0,type:{name:"string"}},favoritesListMaterialComponentTitleText:{defaultValue:null,description:"",name:"favoritesListMaterialComponentTitleText",required:!0,type:{name:"string"}},materialByAuthorText:{defaultValue:null,description:"",name:"materialByAuthorText",required:!0,type:{name:"string"}},materialAndAuthorText:{defaultValue:null,description:"",name:"materialAndAuthorText",required:!0,type:{name:"string"}},etAlText:{defaultValue:null,description:"",name:"etAlText",required:!0,type:{name:"string"}},favoritesListMaterialComponentGoToListText:{defaultValue:null,description:"",name:"favoritesListMaterialComponentGoToListText",required:!0,type:{name:"string"}},favoritesListMaterialComponentGoToListUrl:{defaultValue:null,description:"",name:"favoritesListMaterialComponentGoToListUrl",required:!0,type:{name:"string"}},addToFavoritesAriaLabelText:{defaultValue:null,description:"",name:"addToFavoritesAriaLabelText",required:!0,type:{name:"string"}},removeFromFavoritesAriaLabelText:{defaultValue:null,description:"",name:"removeFromFavoritesAriaLabelText",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/favorites-list-material-component/FavoritesListMaterialComponent.entry.tsx#FavoritesListMaterialComponententry"]={docgenInfo:FavoritesListMaterialComponententry.__docgenInfo,name:"FavoritesListMaterialComponententry",path:"src/apps/favorites-list-material-component/FavoritesListMaterialComponent.entry.tsx#FavoritesListMaterialComponententry"})}catch(__react_docgen_typescript_loader_error){}const FavoritesListMaterialComponent_dev={title:"Apps / Favorites list material component",component:FavoritesListMaterialComponent_entry,decorators:[esm.j],argTypes:{...serviceUrlArgs.Z,favoritesListMaterialComponentTitleText:{control:{type:"text"},defaultValue:"Your list"},materialUrl:{defaultValue:"/work/:workid",control:{type:"text"}},materialByAuthorText:{control:{type:"text"},defaultValue:"By"},materialAndAuthorText:{control:{type:"text"},defaultValue:"and"},etAlText:{control:{type:"text"},defaultValue:"et al."},favoritesListMaterialComponentGoToListText:{control:{type:"text"},defaultValue:"Go to My list"},favoritesListMaterialComponentGoToListUrl:{control:{type:"text"},defaultValue:"https://unsplash.com/photos/wd6YQy0PJt8"},addToFavoritesAriaLabelText:{control:{type:"text"},defaultValue:"Add @title to favorites list"},removeFromFavoritesAriaLabelText:{control:{type:"text"},defaultValue:"Remove @title from favorites list"}}},FavoritesListMaterialComponentEntry=(props=>react.createElement(FavoritesListMaterialComponent_entry,props)).bind({})},"./src/apps/favorites-list/FavoritesList.dev.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{FavoritesList:()=>FavoritesList_dev_FavoritesList,default:()=>FavoritesList_dev});var react=__webpack_require__("./node_modules/react/index.js"),esm=__webpack_require__("./node_modules/@storybook/addon-queryparams/dist/esm/index.js"),serviceUrlArgs=__webpack_require__("./src/core/storybook/serviceUrlArgs.ts"),config=__webpack_require__("./src/core/utils/config.tsx"),general=__webpack_require__("./src/core/utils/helpers/general.ts"),utils_text=__webpack_require__("./src/core/utils/text.tsx"),url=__webpack_require__("./src/core/utils/url.tsx"),empty_list=__webpack_require__("./src/components/empty-list/empty-list.tsx"),use_pager=__webpack_require__("./src/components/result-pager/use-pager.tsx"),material_list=__webpack_require__("./src/core/material-list-api/material-list.ts"),graphql=__webpack_require__("./src/core/dbc-gateway/generated/graphql.tsx"),card_list_item=__webpack_require__("./src/components/card-item-list/card-list-item/card-list-item.tsx");const card_list_item_adapter=({pid})=>{var _data$work;const{data}=(0,graphql.Qk)({id:pid});return react.createElement("div",null,data&&data.work&&react.createElement(card_list_item.Z,{key:null===(_data$work=data.work)||void 0===_data$work?void 0:_data$work.workId,item:data.work,coverTint:"100",resultNumber:0}))};try{cardlistitemadapter.displayName="cardlistitemadapter",cardlistitemadapter.__docgenInfo={description:"",displayName:"cardlistitemadapter",props:{pid:{defaultValue:null,description:"",name:"pid",required:!0,type:{name:"`${number}-${string}:${number}`"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/card-item-list/card-list-item/card-list-item-adapter.tsx#cardlistitemadapter"]={docgenInfo:cardlistitemadapter.__docgenInfo,name:"cardlistitemadapter",path:"src/components/card-item-list/card-list-item/card-list-item-adapter.tsx#cardlistitemadapter"})}catch(__react_docgen_typescript_loader_error){}var MaterialListItem=__webpack_require__("./src/components/card-item-list/MaterialListItem.tsx");const FavoritesList=({pageSize})=>{const t=(0,utils_text.X)(),{data}=(0,material_list.YV)("default"),[displayedMaterials,setDisplayedMaterials]=(0,react.useState)([]),[materials,setMaterials]=(0,react.useState)([]),{itemsShown,PagerComponent,page}=(0,use_pager.Z)({hitcount:materials.length,pageSize}),{collections}=data||[],lastItemRef=(0,react.useRef)(null);return(0,react.useEffect)((()=>{page>0&&lastItemRef.current&&lastItemRef.current.focus()}),[page,displayedMaterials]),(0,react.useEffect)((()=>setDisplayedMaterials([...materials].splice(0,itemsShown))),[itemsShown,materials]),(0,react.useEffect)((()=>{data&&data.collections&&setMaterials(collections)}),[collections,data]),react.createElement("div",{className:"card-list-page"},react.createElement("h1",{className:"text-header-h2 mb-16 search-result-title"},t("favoritesListHeaderText")),materials.length>0&&react.createElement("p",{className:"text-small-caption my-32"},t("favoritesListMaterialsText",{placeholders:{"@count":materials.length}})),displayedMaterials.length>0&&react.createElement("ul",{className:"card-list-page__list my-32"},displayedMaterials.map(((pid,i)=>{const isFirstNewItem=i===page*pageSize;return react.createElement(MaterialListItem.Z,{key:pid,ref:isFirstNewItem?lastItemRef:null},react.createElement(card_list_item_adapter,{key:pid,pid}))}))),0===displayedMaterials.length&&react.createElement(empty_list.Z,{classNames:"mt-24",emptyListText:t("favoritesListEmptyText")}),react.createElement(PagerComponent,null))},favorites_list_FavoritesList=FavoritesList;try{FavoritesList.displayName="FavoritesList",FavoritesList.__docgenInfo={description:"",displayName:"FavoritesList",props:{pageSize:{defaultValue:null,description:"",name:"pageSize",required:!0,type:{name:"number"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/favorites-list/FavoritesList.tsx#FavoritesList"]={docgenInfo:FavoritesList.__docgenInfo,name:"FavoritesList",path:"src/apps/favorites-list/FavoritesList.tsx#FavoritesList"})}catch(__react_docgen_typescript_loader_error){}const FavoritesList_entry=(0,config.Rh)((0,url.XL)((0,utils_text.z)((({pageSizeDesktop,pageSizeMobile})=>{const pageSize=(0,general.Rh)({desktop:pageSizeDesktop,mobile:pageSizeMobile});return react.createElement(favorites_list_FavoritesList,{pageSize})}))));try{FavoritesListentry.displayName="FavoritesListentry",FavoritesListentry.__docgenInfo={description:"",displayName:"FavoritesListentry",props:{pageSizeDesktop:{defaultValue:null,description:"",name:"pageSizeDesktop",required:!1,type:{name:"number | undefined"}},pageSizeMobile:{defaultValue:null,description:"",name:"pageSizeMobile",required:!1,type:{name:"number | undefined"}},blacklistedAvailabilityBranchesConfig:{defaultValue:null,description:"",name:"blacklistedAvailabilityBranchesConfig",required:!0,type:{name:"string"}},fbsBaseUrlConfig:{defaultValue:null,description:"",name:"fbsBaseUrlConfig",required:!0,type:{name:"string"}},availabilityAvailableText:{defaultValue:null,description:"",name:"availabilityAvailableText",required:!0,type:{name:"string"}},availabilityUnavailableText:{defaultValue:null,description:"",name:"availabilityUnavailableText",required:!0,type:{name:"string"}},favoritesListMaterialsText:{defaultValue:null,description:"",name:"favoritesListMaterialsText",required:!0,type:{name:"string"}},favoritesListHeaderText:{defaultValue:null,description:"",name:"favoritesListHeaderText",required:!0,type:{name:"string"}},byAuthorText:{defaultValue:null,description:"",name:"byAuthorText",required:!0,type:{name:"string"}},etAlText:{defaultValue:null,description:"",name:"etAlText",required:!0,type:{name:"string"}},showMoreText:{defaultValue:null,description:"",name:"showMoreText",required:!0,type:{name:"string"}},resultPagerStatusText:{defaultValue:null,description:"",name:"resultPagerStatusText",required:!0,type:{name:"string"}},favoritesListEmptyText:{defaultValue:null,description:"",name:"favoritesListEmptyText",required:!0,type:{name:"string"}},inSeriesText:{defaultValue:null,description:"",name:"inSeriesText",required:!0,type:{name:"string"}},numberDescriptionText:{defaultValue:null,description:"",name:"numberDescriptionText",required:!0,type:{name:"string"}},materialUrl:{defaultValue:null,description:"",name:"materialUrl",required:!0,type:{name:"string"}},searchUrl:{defaultValue:null,description:"",name:"searchUrl",required:!0,type:{name:"string"}},advancedSearchUrl:{defaultValue:null,description:"",name:"advancedSearchUrl",required:!0,type:{name:"string"}},fbsBaseUrl:{defaultValue:null,description:"",name:"fbsBaseUrl",required:!0,type:{name:"string"}},loanListEreolenUrl:{defaultValue:null,description:"",name:"loanListEreolenUrl",required:!0,type:{name:"string"}},feesPageUrl:{defaultValue:null,description:"",name:"feesPageUrl",required:!0,type:{name:"string"}},publizonBaseUrl:{defaultValue:null,description:"",name:"publizonBaseUrl",required:!0,type:{name:"string"}},dplCmsBaseUrl:{defaultValue:null,description:"",name:"dplCmsBaseUrl",required:!0,type:{name:"string"}},coverBaseUrl:{defaultValue:null,description:"",name:"coverBaseUrl",required:!0,type:{name:"string"}},materialBaseUrl:{defaultValue:null,description:"",name:"materialBaseUrl",required:!0,type:{name:"string"}},fbiBaseUrl:{defaultValue:null,description:"",name:"fbiBaseUrl",required:!0,type:{name:"string"}},authUrl:{defaultValue:null,description:"",name:"authUrl",required:!0,type:{name:"string"}},ereolenHomepageUrl:{defaultValue:null,description:"",name:"ereolenHomepageUrl",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/favorites-list/FavoritesList.entry.tsx#FavoritesListentry"]={docgenInfo:FavoritesListentry.__docgenInfo,name:"FavoritesListentry",path:"src/apps/favorites-list/FavoritesList.entry.tsx#FavoritesListentry"})}catch(__react_docgen_typescript_loader_error){}const FavoritesList_dev={title:"Apps / Favorite list",component:FavoritesList_entry,argTypes:{...serviceUrlArgs.Z,pageSizeDesktop:{name:"Number of favorite items on desktop",defaultValue:50,control:{type:"number"}},blacklistedAvailabilityBranchesConfig:{name:"Blacklisted Availability branches",defaultValue:"FBS-751032,FBS-751031,FBS-751009,FBS-751027,FBS-751024",control:{type:"text"}},searchUrl:{name:"Path to the search result page",defaultValue:"/search",control:{type:"text"}},pageSizeMobile:{name:"Number of favorite items on mobile",defaultValue:20,control:{type:"number"}},showMoreText:{name:"Show more Text",defaultValue:"show more",control:{type:"text"}},resultPagerStatusText:{name:"Result pager status text",defaultValue:"Showing @itemsShown out of @hitcount results",control:{type:"text"}},materialUrl:{name:"Path to the material page",defaultValue:"/work/:workid",control:{type:"text"}},availabilityAvailableText:{name:"Availability: available text",defaultValue:"Available",control:{type:"text"}},availabilityUnavailableText:{name:"Availability: unavailable text",defaultValue:"Unavailable",control:{type:"text"}},favoritesListMaterialsText:{defaultValue:"@count materials",control:{type:"text"}},favoritesListHeaderText:{defaultValue:"Favorites",control:{type:"text"}},byAuthorText:{defaultValue:"By",control:{type:"text"}},etAlText:{defaultValue:"...",control:{type:"text"}},favoritesListEmptyText:{defaultValue:"Your favorites list is empty",control:{type:"text"}},numberDescriptionText:{name:"Number description",defaultValue:"Nr.",control:{type:"text"}},inSeriesText:{name:"In series",defaultValue:"in series",control:{type:"text"}}},decorators:[esm.j]},FavoritesList_dev_FavoritesList=args=>react.createElement(FavoritesList_entry,args)},"./src/apps/fee-list/FeeList.dev.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{FeeListEntry:()=>FeeList_dev_FeeListEntry,FeeListFeeDetailsModal:()=>FeeListFeeDetailsModal,default:()=>FeeList_dev});var react=__webpack_require__("./node_modules/react/index.js"),esm=__webpack_require__("./node_modules/@storybook/addon-queryparams/dist/esm/index.js"),blockedArgs=__webpack_require__("./src/core/storybook/blockedArgs.ts"),serviceUrlArgs=__webpack_require__("./src/core/storybook/serviceUrlArgs.ts"),withIsPatronBlockedHoc=__webpack_require__("./src/core/utils/withIsPatronBlockedHoc.tsx"),utils_text=__webpack_require__("./src/core/utils/text.tsx"),url=__webpack_require__("./src/core/utils/url.tsx"),Link=__webpack_require__("./src/components/atoms/links/Link.tsx"),fbs=__webpack_require__("./src/core/fbs/fbs.ts"),modal=__webpack_require__("./src/core/utils/modal.tsx");const list_header=({header,amount,children,dataCy="list-header"})=>react.createElement("div",{className:"dpl-list-buttons"},react.createElement("h2",{"data-cy":dataCy,className:"dpl-list-buttons__header"},header,null!==amount&&react.createElement("div",{className:"dpl-list-buttons__power"},amount)),react.createElement("div",{className:"dpl-list-buttons__buttons"},children));try{listheader.displayName="listheader",listheader.__docgenInfo={description:"",displayName:"listheader",props:{header:{defaultValue:null,description:"",name:"header",required:!0,type:{name:"ReactNode"}},amount:{defaultValue:null,description:"",name:"amount",required:!0,type:{name:"number | null"}},dataCy:{defaultValue:{value:"list-header"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/list-header/list-header.tsx#listheader"]={docgenInfo:listheader.__docgenInfo,name:"listheader",path:"src/components/list-header/list-header.tsx#listheader"})}catch(__react_docgen_typescript_loader_error){}var clsx=__webpack_require__("./node_modules/clsx/dist/clsx.mjs"),authorYear=__webpack_require__("./src/components/author-year/authorYear.tsx"),cover=__webpack_require__("./src/components/cover/cover.tsx");const fee_info=({material,materialItemNumber,children})=>{const{authorsShort="",materialType="",year="",title="",description="",pid,series=""}=material;return react.createElement("div",{className:"list-reservation__material"},react.createElement("div",null,react.createElement(cover.Y,{id:pid,idType:"pid",size:"small",animate:!1,description:description||""})),react.createElement("div",{className:"list-reservation__information"},react.createElement("div",null,react.createElement("div",{className:"status-label status-label--outline"},materialType)),react.createElement("div",{className:"list-reservation__about"},react.createElement("h3",{className:"text-header-h4"},title),react.createElement("p",{className:"text-small-caption color-secondary-gray"},react.createElement(authorYear.Z,{author:authorsShort,year:year||""})),react.createElement("p",{className:"text-small-caption color-secondary-gray"},series)),react.createElement("div",null),react.createElement("p",{className:"text-small-caption color-secondary-gray"},materialItemNumber),children))};try{feeinfo.displayName="feeinfo",feeinfo.__docgenInfo={description:"",displayName:"feeinfo",props:{material:{defaultValue:null,description:"",name:"material",required:!0,type:{name:"Nullable>"}},materialItemNumber:{defaultValue:null,description:"",name:"materialItemNumber",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/fee-list/stackable-fees/fee-info.tsx#feeinfo"]={docgenInfo:feeinfo.__docgenInfo,name:"feeinfo",path:"src/apps/fee-list/stackable-fees/fee-info.tsx#feeinfo"})}catch(__react_docgen_typescript_loader_error){}var material_fetch_hoc=__webpack_require__("./src/apps/loan-list/materials/utils/material-fetch-hoc.tsx"),dayjs_min=__webpack_require__("./node_modules/dayjs/dayjs.min.js"),dayjs_min_default=__webpack_require__.n(dayjs_min),date_format=__webpack_require__("./src/core/configuration/date-format.json");const fee_status=({dueDate,reasonMessage})=>{const t=(0,utils_text.X)(),dueDateFormatted=dayjs_min_default()(dueDate).format(date_format.d4);return react.createElement("div",null,react.createElement("div",{className:"list-reservation__deadline"},react.createElement("div",{className:"status-label status-label--danger"},reasonMessage),react.createElement("p",{className:"text-small-caption"},t("feeCreatedText",{placeholders:{"@date":dueDateFormatted}}))))};try{feestatus.displayName="feestatus",feestatus.__docgenInfo={description:"",displayName:"feestatus",props:{dueDate:{defaultValue:null,description:"",name:"dueDate",required:!0,type:{name:"string"}},reasonMessage:{defaultValue:null,description:"",name:"reasonMessage",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/fee-list/stackable-fees/fee-status.tsx#feestatus"]={docgenInfo:feestatus.__docgenInfo,name:"feestatus",path:"src/apps/fee-list/stackable-fees/fee-status.tsx#feestatus"})}catch(__react_docgen_typescript_loader_error){}const stackable_fees=(0,material_fetch_hoc.Z)((({amountOfMaterialsWithDueDate,faust,material={},feeData,materialItemNumber,openDetailsModalClickEvent})=>{const t=(0,utils_text.X)(),{amount=0,creationDate="",reasonMessage=""}=feeData,stackSize=amountOfMaterialsWithDueDate-1,listReservationClass=(0,clsx.Z)(["list-reservation","my-32"],{"list-reservation--stacked":stackSize>1});return react.createElement("button",{type:"button",onClick:()=>openDetailsModalClickEvent(faust),className:listReservationClass},feeData&&react.createElement(fee_info,{materialItemNumber,material},stackSize>0&&react.createElement("p",{className:"text-small-caption color-secondary-gray","data-cy":"stack-size"},t("plusXOtherMaterialsText",{placeholders:{"@amount":stackSize}}))),react.createElement("div",{className:"list-reservation__status"},react.createElement(fee_status,{dueDate:creationDate,reasonMessage}),react.createElement("div",{className:"list-reservation__fee"},react.createElement("p",{className:"text-body-medium-regular"},t("itemFeeAmountText",{placeholders:{"@fee":amount}})))))}));try{stackablefees.displayName="stackablefees",stackablefees.__docgenInfo={description:"",displayName:"stackablefees",props:{amountOfMaterialsWithDueDate:{defaultValue:null,description:"",name:"amountOfMaterialsWithDueDate",required:!0,type:{name:"number"}},material:{defaultValue:{value:"{}"},description:"",name:"material",required:!1,type:{name:"Nullable> | undefined"}},faust:{defaultValue:null,description:"",name:"faust",required:!0,type:{name:"`${number}`"}},feeData:{defaultValue:null,description:"",name:"feeData",required:!0,type:{name:"FeeV2"}},materialItemNumber:{defaultValue:null,description:"",name:"materialItemNumber",required:!0,type:{name:"string"}},openDetailsModalClickEvent:{defaultValue:null,description:"",name:"openDetailsModalClickEvent",required:!0,type:{name:"(faustId: `${number}`) => void"}},digitalMaterial:{defaultValue:null,description:"",name:"digitalMaterial",required:!1,type:{name:"Product | null | undefined"}},item:{defaultValue:null,description:"",name:"item",required:!1,type:{name:"Nullable> | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/fee-list/stackable-fees/stackable-fees.tsx#stackablefees"]={docgenInfo:stackablefees.__docgenInfo,name:"stackablefees",path:"src/apps/fee-list/stackable-fees/stackable-fees.tsx#stackablefees"})}catch(__react_docgen_typescript_loader_error){}const fee_list_list=({openDetailsModalClickEvent,fees,listHeader,dataCy,totalText})=>react.createElement("div",null,fees&&react.createElement("div",{"data-cy":dataCy},react.createElement(list_header,{header:listHeader,amount:null}),fees.map((itemData=>react.createElement(stackable_fees,{amountOfMaterialsWithDueDate:itemData.materials.length,item:{faust:itemData.materials[0].recordId},faust:itemData.materials[0].recordId,materialItemNumber:itemData.materials[0].materialItemNumber,feeData:itemData,openDetailsModalClickEvent}))),react.createElement("div",{className:"fee-list-bottom"},react.createElement("div",{className:"fee-list-bottom__paymenttypes"}),react.createElement("div",{className:"fee-list-bottom__actions"},react.createElement("p",{className:"text-body-small-medium"},totalText)))));try{list.displayName="list",list.__docgenInfo={description:"",displayName:"list",props:{openDetailsModalClickEvent:{defaultValue:null,description:"",name:"openDetailsModalClickEvent",required:!0,type:{name:"(faustId: string) => void"}},fees:{defaultValue:null,description:"",name:"fees",required:!0,type:{name:"FeeV2[] | null"}},dataCy:{defaultValue:null,description:"",name:"dataCy",required:!0,type:{name:"string"}},listHeader:{defaultValue:null,description:"",name:"listHeader",required:!0,type:{name:"ReactNode"}},totalText:{defaultValue:null,description:"",name:"totalText",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/fee-list/list.tsx#list"]={docgenInfo:list.__docgenInfo,name:"list",path:"src/apps/fee-list/list.tsx#list"})}catch(__react_docgen_typescript_loader_error){}const fee_details_modal=({modalId,children})=>{const t=(0,utils_text.X)();return react.createElement(modal.Z,{modalId:modalId||"",classNames:"modal-details",closeModalAriaLabelText:t("FeeDetailsModalCloseModalAriaLabelText"),screenReaderModalDescriptionText:t("FeeDetailsModalDescriptionText")},children)};try{feedetailsmodal.displayName="feedetailsmodal",feedetailsmodal.__docgenInfo={description:"",displayName:"feedetailsmodal",props:{modalId:{defaultValue:null,description:"",name:"modalId",required:!0,type:{name:"string"}},material:{defaultValue:null,description:"",name:"material",required:!0,type:{name:"Nullable> | null | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/fee-list/modal/fee-details-modal.tsx#feedetailsmodal"]={docgenInfo:feedetailsmodal.__docgenInfo,name:"feedetailsmodal",path:"src/apps/fee-list/modal/fee-details-modal.tsx#feedetailsmodal"})}catch(__react_docgen_typescript_loader_error){}var icon_btn_external_link=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/buttons/icon-btn-external-link.svg"),icon_btn_external_link_default=__webpack_require__.n(icon_btn_external_link);const my_payment_overview_modal=()=>{const t=(0,utils_text.X)(),paymentOverviewUrl=(0,url.J_)()("paymentOverviewUrl"),{close}=(0,modal.f)();return react.createElement(modal.Z,{modalId:"intermediate-payment-modal",closeModalAriaLabelText:"test",screenReaderModalDescriptionText:"test",classNames:"modal-cta"},react.createElement("div",{className:"modal-cta__container"},react.createElement("h2",{className:"text-header-h2"},t("feePaymentModalHeaderText")),react.createElement("div",{className:"mt-48 color-secondary-gray"},react.createElement("p",{className:"text-body-medium-regular"},t("feePaymentModalBodyText")),react.createElement("p",{className:"text-body-medium-regular mt-24"},t("feePaymentModalNoticeText"))),react.createElement("div",{className:"modal-cta__buttons mt-48"},react.createElement(Link.Z,{className:"btn-primary btn-filled btn-large arrow__hover--right-small",href:paymentOverviewUrl,isNewTab:!0},t("feePaymentModalGotoText")," ",react.createElement("img",{src:icon_btn_external_link_default(),className:"btn-icon invert",alt:""})),react.createElement("div",{className:"modal-cta__link"},react.createElement("button",{className:"link-tag color-secondary-gray ml-8",type:"button",onClick:()=>{close("intermediate-payment-modal")}},t("feePaymentModalCancelText"))))))};try{mypaymentoverviewmodal.displayName="mypaymentoverviewmodal",mypaymentoverviewmodal.__docgenInfo={description:"",displayName:"mypaymentoverviewmodal",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/fee-list/modal/my-payment-overview-modal.tsx#mypaymentoverviewmodal"]={docgenInfo:mypaymentoverviewmodal.__docgenInfo,name:"mypaymentoverviewmodal",path:"src/apps/fee-list/modal/my-payment-overview-modal.tsx#mypaymentoverviewmodal"})}catch(__react_docgen_typescript_loader_error){}var general=__webpack_require__("./src/core/utils/helpers/general.ts"),status_circle_icon=__webpack_require__("./src/apps/loan-list/materials/utils/status-circle-icon.tsx");const fee_status_circle=({dueDate,feeCreationDate})=>{const t=(0,utils_text.X)(),colors=(0,general.EC)(),daysBetweenDueAndDelivered=dayjs_min_default()(dueDate).diff(feeCreationDate,"day");return react.createElement(status_circle_icon.Z,{percent:100,color:colors.danger},react.createElement("span",{className:"counter__value"},daysBetweenDueAndDelivered),react.createElement("span",{className:"counter__label"},t("feeListDaysText")))};try{feestatuscircle.displayName="feestatuscircle",feestatuscircle.__docgenInfo={description:"",displayName:"feestatuscircle",props:{dueDate:{defaultValue:null,description:"",name:"dueDate",required:!0,type:{name:"string"}},feeCreationDate:{defaultValue:null,description:"",name:"feeCreationDate",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/fee-list/utils/fee-status-circle.tsx#feestatuscircle"]={docgenInfo:feestatuscircle.__docgenInfo,name:"feestatuscircle",path:"src/apps/fee-list/utils/fee-status-circle.tsx#feestatuscircle"})}catch(__react_docgen_typescript_loader_error){}const getFeesInRelationToPaymentChangeDate=(feeObj,beforePaymentChangeDate)=>{const paymentMethodChangeDate=dayjs_min_default()("2020-10-27");return feeObj.filter((fee=>{const{dueDate}=fee;if(dueDate){const feeDate=dayjs_min_default()(dueDate);if(beforePaymentChangeDate){if(feeDatepaymentMethodChangeDate)return fee}return!1}))};var selectable_material=__webpack_require__("./src/apps/loan-list/materials/selectable-material/selectable-material.tsx"),status_badge=__webpack_require__("./src/apps/loan-list/materials/utils/status-badge.tsx");const stackable_fees_list=(0,material_fetch_hoc.Z)((({materials,creationDateFormatted})=>{const t=(0,utils_text.X)();return react.createElement("ul",{className:"modal-loan__list-materials"},materials.map((({recordId,materialItemNumber})=>react.createElement(selectable_material.Z,{focused:!1,disabled:!0,statusBadgeComponent:react.createElement(status_badge.Z,{dangerText:t("turnedInText",{placeholders:{"@date":creationDateFormatted}})}),item:{faust:recordId},key:recordId,statusMessageComponentMobile:react.createElement("div",{className:"list-materials__status__note-mobile"},materialItemNumber),statusMessageComponentDesktop:react.createElement("div",{className:"list-materials__status__note-desktop"},materialItemNumber)}))))}));try{stackablefeeslist.displayName="stackablefeeslist",stackablefeeslist.__docgenInfo={description:"",displayName:"stackablefeeslist",props:{creationDateFormatted:{defaultValue:null,description:"",name:"creationDateFormatted",required:!0,type:{name:"string"}},materials:{defaultValue:null,description:"",name:"materials",required:!0,type:{name:"FeeMaterialV2[]"}},digitalMaterial:{defaultValue:null,description:"",name:"digitalMaterial",required:!1,type:{name:"Product | null | undefined"}},item:{defaultValue:null,description:"",name:"item",required:!1,type:{name:"Nullable> | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/fee-list/stackable-fees/stackable-fees-list.tsx#stackablefeeslist"]={docgenInfo:stackablefeeslist.__docgenInfo,name:"stackablefeeslist",path:"src/apps/fee-list/stackable-fees/stackable-fees-list.tsx#stackablefeeslist"})}catch(__react_docgen_typescript_loader_error){}var Checkbox=__webpack_require__("./src/components/checkbox/Checkbox.tsx");const AcceptTermsCheckbox=({handleAcceptedTerms})=>{const t=(0,utils_text.X)(),termsOfTradeUrl=(0,url.J_)()("termsOfTradeUrl");return react.createElement(Checkbox.Z,{id:"checkbox_id__fee_details",onChecked:()=>handleAcceptedTerms(),label:react.createElement(react.Fragment,null,t("iAcceptText")," ",react.createElement(Link.Z,{href:termsOfTradeUrl},t("termsOfTradeText"),react.createElement("sup",null,"*")))})},stackable_fees_AcceptTermsCheckbox=AcceptTermsCheckbox;try{AcceptTermsCheckbox.displayName="AcceptTermsCheckbox",AcceptTermsCheckbox.__docgenInfo={description:"",displayName:"AcceptTermsCheckbox",props:{handleAcceptedTerms:{defaultValue:null,description:"",name:"handleAcceptedTerms",required:!0,type:{name:"() => void"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/fee-list/stackable-fees/AcceptTermsCheckbox.tsx#AcceptTermsCheckbox"]={docgenInfo:AcceptTermsCheckbox.__docgenInfo,name:"AcceptTermsCheckbox",path:"src/apps/fee-list/stackable-fees/AcceptTermsCheckbox.tsx#AcceptTermsCheckbox"})}catch(__react_docgen_typescript_loader_error){}var GroupModalContent=__webpack_require__("./src/components/GroupModal/GroupModalContent.tsx");const fee_details_content=({feeDetailsData})=>{const t=(0,utils_text.X)(),paymentOverviewUrl=(0,url.J_)()("paymentOverviewUrl"),[check,setCheck]=(0,react.useState)(!1),{amount=0,creationDate="",dueDate="",materials=[]}=feeDetailsData,prePaymentTypeChange=(date=dueDate,dayjs_min_default()(date){setCheck(!check)}}),react.createElement("div",null,react.createElement("p",null,t("amountText",{placeholders:{"@amount":amount}}))),!showPaymentButton&&react.createElement("button",{type:"button",className:"btn-primary btn-outline btn-small arrow__hover--right-small",disabled:!showPaymentButton},t("payText")),showPaymentButton&&react.createElement(Link.Z,{className:"btn-primary btn-filled btn-small arrow__hover--right-small disabled",href:paymentOverviewUrl},t("payText")))},react.createElement("div",null)),materials.map((({recordId})=>react.createElement(stackable_fees_list,{materials,key:recordId,item:{faust:`${recordId}`},creationDateFormatted}))))};try{feedetailscontent.displayName="feedetailscontent",feedetailscontent.__docgenInfo={description:"",displayName:"feedetailscontent",props:{feeDetailsData:{defaultValue:null,description:"",name:"feeDetailsData",required:!0,type:{name:"FeeV2"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/fee-list/stackable-fees/fee-details-content.tsx#feedetailscontent"]={docgenInfo:feedetailscontent.__docgenInfo,name:"feedetailscontent",path:"src/apps/fee-list/stackable-fees/fee-details-content.tsx#feedetailscontent"})}catch(__react_docgen_typescript_loader_error){}var modal_ids=__webpack_require__("./src/core/configuration/modal-ids.json"),empty_list=__webpack_require__("./src/components/empty-list/empty-list.tsx");const FeeList=()=>{const t=(0,utils_text.X)(),viewFeesAndCompensationRatesUrl=(0,url.J_)()("viewFeesAndCompensationRatesUrl"),[feeDetailsModalId,setFeeDetailsModalId]=(0,react.useState)(""),{open}=(0,modal.f)(),{data:fbsFees=[]}=(0,fbs.CI)(),[itemsPrePaymentChange,setItemsPrePaymentChange]=(0,react.useState)(null),[totalFeePrePaymentChange,setTotalFeePrePaymentChange]=(0,react.useState)(0),[itemsPostPaymentChange,setItemsPostPaymentChange]=(0,react.useState)(null),[totalFeePostPaymentChange,setTotalFeePostPaymentChange]=(0,react.useState)(0),[feeDetailsData,setFeeDetailsData]=(0,react.useState)(),openDetailsModalClickEvent=(0,react.useCallback)((faustId=>{faustId&&(fbsFees.length>0&&setFeeDetailsData(((feeObj,faustId)=>feeObj.filter((item=>item.materials[0].recordId===faustId)))(fbsFees,faustId)),setFeeDetailsModalId(modal_ids.feeDetails+faustId),open(modal_ids.feeDetails+faustId||""))}),[fbsFees,open]);return(0,react.useEffect)((()=>{if(fbsFees){getFeesInRelationToPaymentChangeDate(fbsFees,!0).length>0&&setItemsPrePaymentChange(getFeesInRelationToPaymentChangeDate(fbsFees,!0));getFeesInRelationToPaymentChangeDate(fbsFees,!0).length>0&&setItemsPostPaymentChange(getFeesInRelationToPaymentChangeDate(fbsFees,!1))}}),[fbsFees]),(0,react.useEffect)((()=>{if(totalFeePrePaymentChange>0)return;const totalFee=null==itemsPrePaymentChange?void 0:itemsPrePaymentChange.reduce(((accumulator,{amount})=>accumulator+amount),0);totalFee&&setTotalFeePrePaymentChange(totalFee)}),[itemsPrePaymentChange,totalFeePrePaymentChange]),(0,react.useEffect)((()=>{if(totalFeePostPaymentChange>0)return;const totalFee=null==itemsPostPaymentChange?void 0:itemsPostPaymentChange.reduce(((accumulator,{amount})=>accumulator+amount),0);totalFee&&setTotalFeePostPaymentChange(totalFee)}),[itemsPostPaymentChange,totalFeePostPaymentChange]),react.createElement(react.Fragment,null,react.createElement("div",{className:"fee-list-page"},react.createElement("h1",{"data-cy":"fee-list-headline",className:"text-header-h1 my-32"},t("feeListHeadlineText")),react.createElement("span",{"data-cy":"fee-list-body"},t("feeListBodyText")," ",react.createElement(Link.Z,{className:"link-tag",href:viewFeesAndCompensationRatesUrl},t("viewFeesAndCompensationRatesText"))),!itemsPrePaymentChange&&!itemsPostPaymentChange&&react.createElement(react.Fragment,null,react.createElement(list_header,{header:react.createElement(react.Fragment,null,t("unpaidFeesFirstHeadlineText")),amount:0}),react.createElement(empty_list.Z,{classNames:"mt-24",emptyListText:t("emptyFeeListText")})),react.createElement(fee_list_list,{dataCy:"fee-list-before",listHeader:t("unpaidFeesFirstHeadlineText"),openDetailsModalClickEvent,fees:itemsPrePaymentChange,totalText:t("totalText",{placeholders:{"@total":totalFeePrePaymentChange}})}),react.createElement(fee_list_list,{listHeader:t("unpaidFeesSecondHeadlineText"),dataCy:"fee-list-after",openDetailsModalClickEvent,fees:itemsPostPaymentChange,totalText:t("totalText",{placeholders:{"@total":totalFeePostPaymentChange}})})),react.createElement(fee_details_modal,{modalId:feeDetailsModalId,material:{}},feeDetailsData&&react.createElement(fee_details_content,{feeDetailsData:feeDetailsData[0]})),react.createElement(my_payment_overview_modal,null))},fee_list_FeeList=FeeList;try{FeeList.displayName="FeeList",FeeList.__docgenInfo={description:"",displayName:"FeeList",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/fee-list/FeeList.tsx#FeeList"]={docgenInfo:FeeList.__docgenInfo,name:"FeeList",path:"src/apps/fee-list/FeeList.tsx#FeeList"})}catch(__react_docgen_typescript_loader_error){}var config=__webpack_require__("./src/core/utils/config.tsx");const FeeList_entry=(0,url.XL)((0,utils_text.z)((0,withIsPatronBlockedHoc.Z)((0,config.Rh)((()=>react.createElement(fee_list_FeeList,null))))));try{FeeListentry.displayName="FeeListentry",FeeListentry.__docgenInfo={description:"",displayName:"FeeListentry",props:{totalFeeAmountText:{defaultValue:null,description:"",name:"totalFeeAmountText",required:!0,type:{name:"string"}},otherMaterialsText:{defaultValue:null,description:"",name:"otherMaterialsText",required:!0,type:{name:"string"}},materialByAuthorText:{defaultValue:null,description:"",name:"materialByAuthorText",required:!0,type:{name:"string"}},materialAndAuthorText:{defaultValue:null,description:"",name:"materialAndAuthorText",required:!0,type:{name:"string"}},feeListDaysText:{defaultValue:null,description:"",name:"feeListDaysText",required:!0,type:{name:"string"}},payText:{defaultValue:null,description:"",name:"payText",required:!0,type:{name:"string"}},totalText:{defaultValue:null,description:"",name:"totalText",required:!0,type:{name:"string"}},iAcceptText:{defaultValue:null,description:"",name:"iAcceptText",required:!0,type:{name:"string"}},termsOfTradeText:{defaultValue:null,description:"",name:"termsOfTradeText",required:!0,type:{name:"string"}},termsOfTradeUrl:{defaultValue:null,description:"",name:"termsOfTradeUrl",required:!0,type:{name:"string"}},feeListHeadlineText:{defaultValue:null,description:"",name:"feeListHeadlineText",required:!0,type:{name:"string"}},feeListBodyText:{defaultValue:null,description:"",name:"feeListBodyText",required:!0,type:{name:"string"}},viewFeesAndCompensationRatesText:{defaultValue:null,description:"",name:"viewFeesAndCompensationRatesText",required:!0,type:{name:"string"}},etAlText:{defaultValue:null,description:"",name:"etAlText",required:!0,type:{name:"string"}},viewFeesAndCompensationRatesUrl:{defaultValue:null,description:"",name:"viewFeesAndCompensationRatesUrl",required:!0,type:{name:"string"}},unpaidFeesFirstHeadlineText:{defaultValue:null,description:"",name:"unpaidFeesFirstHeadlineText",required:!0,type:{name:"string"}},unpaidFeesSecondHeadlineText:{defaultValue:null,description:"",name:"unpaidFeesSecondHeadlineText",required:!0,type:{name:"string"}},alreadyPaidText:{defaultValue:null,description:"",name:"alreadyPaidText",required:!0,type:{name:"string"}},feePaymentModalHeaderText:{defaultValue:null,description:"",name:"feePaymentModalHeaderText",required:!0,type:{name:"string"}},feePaymentModalBodyText:{defaultValue:null,description:"",name:"feePaymentModalBodyText",required:!0,type:{name:"string"}},feePaymentModalNoticeText:{defaultValue:null,description:"",name:"feePaymentModalNoticeText",required:!0,type:{name:"string"}},feePaymentModalGotoText:{defaultValue:null,description:"",name:"feePaymentModalGotoText",required:!0,type:{name:"string"}},feePaymentModalCancelText:{defaultValue:null,description:"",name:"feePaymentModalCancelText",required:!0,type:{name:"string"}},feeDetailsModalScreenReaderText:{defaultValue:null,description:"",name:"feeDetailsModalScreenReaderText",required:!0,type:{name:"string"}},emptyFeeListText:{defaultValue:null,description:"",name:"emptyFeeListText",required:!0,type:{name:"string"}},turnedInText:{defaultValue:null,description:"",name:"turnedInText",required:!0,type:{name:"string"}},plusXOtherMaterialsText:{defaultValue:null,description:"",name:"plusXOtherMaterialsText",required:!0,type:{name:"string"}},itemFeeAmountText:{defaultValue:null,description:"",name:"itemFeeAmountText",required:!0,type:{name:"string"}},feeCreatedText:{defaultValue:null,description:"",name:"feeCreatedText",required:!0,type:{name:"string"}},availablePaymentTypesUrl:{defaultValue:null,description:"",name:"availablePaymentTypesUrl",required:!0,type:{name:"string"}},paymentOverviewUrl:{defaultValue:null,description:"",name:"paymentOverviewUrl",required:!0,type:{name:"string"}},blockedPatronDTitleText:{defaultValue:null,description:"",name:"blockedPatronDTitleText",required:!0,type:{name:"string"}},blockedPatronDBodyText:{defaultValue:null,description:"",name:"blockedPatronDBodyText",required:!0,type:{name:"string"}},blockedPatronSTitleText:{defaultValue:null,description:"",name:"blockedPatronSTitleText",required:!0,type:{name:"string"}},blockedPatronSBodyText:{defaultValue:null,description:"",name:"blockedPatronSBodyText",required:!0,type:{name:"string"}},blockedPatronFTitleText:{defaultValue:null,description:"",name:"blockedPatronFTitleText",required:!0,type:{name:"string"}},blockedPatronFBodyText:{defaultValue:null,description:"",name:"blockedPatronFBodyText",required:!0,type:{name:"string"}},blockedPatronETitleText:{defaultValue:null,description:"",name:"blockedPatronETitleText",required:!0,type:{name:"string"}},blockedPatronEBodyText:{defaultValue:null,description:"",name:"blockedPatronEBodyText",required:!0,type:{name:"string"}},blockedPatronWTitleText:{defaultValue:null,description:"",name:"blockedPatronWTitleText",required:!0,type:{name:"string"}},blockedPatronWBodyText:{defaultValue:null,description:"",name:"blockedPatronWBodyText",required:!0,type:{name:"string"}},blockedPatronOTitleText:{defaultValue:null,description:"",name:"blockedPatronOTitleText",required:!0,type:{name:"string"}},blockedPatronOBodyText:{defaultValue:null,description:"",name:"blockedPatronOBodyText",required:!0,type:{name:"string"}},blockedPatronUTitleText:{defaultValue:null,description:"",name:"blockedPatronUTitleText",required:!0,type:{name:"string"}},blockedPatronUBodyText:{defaultValue:null,description:"",name:"blockedPatronUBodyText",required:!0,type:{name:"string"}},blockedPatronELinkText:{defaultValue:null,description:"",name:"blockedPatronELinkText",required:!0,type:{name:"string"}},blockedPatronELinkUrl:{defaultValue:null,description:"",name:"blockedPatronELinkUrl",required:!0,type:{name:"string"}},blockedPatronCloseModalAriaLabelText:{defaultValue:null,description:"",name:"blockedPatronCloseModalAriaLabelText",required:!0,type:{name:"string"}},blockedPatronModalAriaDescriptionText:{defaultValue:null,description:"",name:"blockedPatronModalAriaDescriptionText",required:!0,type:{name:"string"}},BlockedPatronEntryTextProps:{defaultValue:null,description:"",name:"BlockedPatronEntryTextProps",required:!0,type:{name:"string"}},redirectOnBlocked:{defaultValue:null,description:"",name:"redirectOnBlocked",required:!0,type:{name:"string"}},expirationWarningDaysBeforeConfig:{defaultValue:null,description:"",name:"expirationWarningDaysBeforeConfig",required:!0,type:{name:"string"}},materialUrl:{defaultValue:null,description:"",name:"materialUrl",required:!0,type:{name:"string"}},searchUrl:{defaultValue:null,description:"",name:"searchUrl",required:!0,type:{name:"string"}},advancedSearchUrl:{defaultValue:null,description:"",name:"advancedSearchUrl",required:!0,type:{name:"string"}},fbsBaseUrl:{defaultValue:null,description:"",name:"fbsBaseUrl",required:!0,type:{name:"string"}},loanListEreolenUrl:{defaultValue:null,description:"",name:"loanListEreolenUrl",required:!0,type:{name:"string"}},feesPageUrl:{defaultValue:null,description:"",name:"feesPageUrl",required:!0,type:{name:"string"}},publizonBaseUrl:{defaultValue:null,description:"",name:"publizonBaseUrl",required:!0,type:{name:"string"}},dplCmsBaseUrl:{defaultValue:null,description:"",name:"dplCmsBaseUrl",required:!0,type:{name:"string"}},coverBaseUrl:{defaultValue:null,description:"",name:"coverBaseUrl",required:!0,type:{name:"string"}},materialBaseUrl:{defaultValue:null,description:"",name:"materialBaseUrl",required:!0,type:{name:"string"}},fbiBaseUrl:{defaultValue:null,description:"",name:"fbiBaseUrl",required:!0,type:{name:"string"}},authUrl:{defaultValue:null,description:"",name:"authUrl",required:!0,type:{name:"string"}},ereolenHomepageUrl:{defaultValue:null,description:"",name:"ereolenHomepageUrl",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/fee-list/FeeList.entry.tsx#FeeListentry"]={docgenInfo:FeeListentry.__docgenInfo,name:"FeeListentry",path:"src/apps/fee-list/FeeList.entry.tsx#FeeListentry"})}catch(__react_docgen_typescript_loader_error){}var modal_helpers=__webpack_require__("./src/core/utils/helpers/modal-helpers.ts");const FeeList_dev={title:"Apps / Fee list",component:FeeList_entry,argTypes:{...serviceUrlArgs.Z,...blockedArgs.Z,feeListHeadlineText:{defaultValue:"Fees & Replacement costs",control:{type:"text"}},feeListBodyText:{defaultValue:"Overdue fees and replacement costs that were created before 27/10/2020 can still be paid on this page.",control:{type:"text"}},viewFeesAndCompensationRatesText:{defaultValue:"See our fees and replacement costs",control:{type:"text"}},etAlText:{control:{type:"text"},defaultValue:"et al."},viewFeesAndCompensationRatesUrl:{defaultValue:"https://unsplash.com/photos/NEJcmvLFcws",control:{type:"text"}},totalFeeAmountText:{defaultValue:"Fee",control:{type:"text"}},otherMaterialsText:{defaultValue:"Other materials",control:{type:"text"}},materialByAuthorText:{defaultValue:"By",control:{type:"text"}},materialAndAuthorText:{defaultValue:"and",control:{type:"text"}},feeListDaysText:{defaultValue:"Days",control:{type:"text"}},payText:{defaultValue:"Pay",control:{type:"text"}},totalText:{defaultValue:"Total @total,-",control:{type:"text"}},amountText:{defaultValue:"@amount,-",control:{type:"text"}},expirationWarningDaysBeforeConfig:{defaultValue:"6",control:{type:"text"}},iAcceptText:{defaultValue:"I accept the",control:{type:"text"}},termsOfTradeText:{defaultValue:"Terms of trade",control:{type:"text"}},termsOfTradeUrl:{defaultValue:"https://unsplash.com/photos/JDzoTGfoogA",control:{type:"text"}},unpaidFeesFirstHeadlineText:{defaultValue:"Unsettled debt 1",control:{type:"text"}},unpaidFeesSecondHeadlineText:{defaultValue:"Unsettled debt 2",control:{type:"text"}},alreadyPaidText:{defaultValue:"Please note that paid fees are not registered up until 72 hours after your payment after which your debt is updated and your user unblocked if it has been blocked.",control:{type:"text"}},feePaymentModalHeaderText:{defaultValue:"Unpaid fees post 27/10 2020",control:{type:"text"}},feePaymentModalBodyText:{defaultValue:"You will be redirected to Mit Betalingsoverblik.",control:{type:"text"}},feePaymentModalNoticeText:{defaultValue:"Paid fees can take up to 24 hours to registrer.",control:{type:"text"}},feePaymentModalGotoText:{defaultValue:"Go to Mit Betalingsoverblik",control:{type:"text"}},feePaymentModalCancelText:{defaultValue:"Cancel",control:{type:"text"}},feeDetailsModalScreenReaderText:{defaultValue:"A modal containing details about a fee",control:{type:"text"}},emptyFeeListText:{defaultValue:"You have 0 unpaid fees or replacement costs",control:{type:"text"}},FeeDetailsModalCloseModalAriaLabelText:{defaultValue:"Close fee details modal",control:{type:"text"}},FeeDetailsModalDescriptionText:{defaultValue:"Modal containing information about this element or group of elements fees",control:{type:"text"}},turnedInText:{control:{type:"text"},defaultValue:"Turned in @date"},plusXOtherMaterialsText:{control:{type:"text"},defaultValue:"+ @amount other materials"},itemFeeAmountText:{control:{type:"text"},defaultValue:"Fee @fee,-"},feeCreatedText:{control:{type:"text"},defaultValue:"Fees charged @date"},availablePaymentTypesUrl:{defaultValue:"https://unsplash.com/photos/JDzoTGfoogA",control:{type:"text"}},paymentOverviewUrl:{defaultValue:"https://unsplash.com/photos/yjI3ozta2Zk",control:{type:"text"}}},decorators:[esm.j]},Template=props=>react.createElement(FeeList_entry,props),FeeList_dev_FeeListEntry=Template.bind({});FeeList_dev_FeeListEntry.args={};const{feeDetails}=(0,modal_helpers.GM)(),FeeListFeeDetailsModal=Template.bind({});FeeListFeeDetailsModal.parameters={query:{modal:`${feeDetails}48724566`}}},"./src/apps/hello-world/hello-world.dev.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{App:()=>App,default:()=>hello_world_dev});var react=__webpack_require__("./node_modules/react/index.js"),utils_text=__webpack_require__("./src/core/utils/text.tsx"),hello=__webpack_require__("./src/components/hello/hello.tsx");const hello_world=()=>{const t=(0,utils_text.X)();return react.createElement("article",null,react.createElement("h2",null,t("titleText")),react.createElement("p",null,t("introductionText")),react.createElement("p",null,react.createElement(hello.q,{shouldBeEmphasized:!0})))};try{helloworld.displayName="helloworld",helloworld.__docgenInfo={description:"",displayName:"helloworld",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/hello-world/hello-world.tsx#helloworld"]={docgenInfo:helloworld.__docgenInfo,name:"helloworld",path:"src/apps/hello-world/hello-world.tsx#helloworld"})}catch(__react_docgen_typescript_loader_error){}const hello_world_entry=(0,utils_text.z)((()=>react.createElement(hello_world,null)));try{helloworldentry.displayName="helloworldentry",helloworldentry.__docgenInfo={description:"",displayName:"helloworldentry",props:{titleText:{defaultValue:null,description:"",name:"titleText",required:!0,type:{name:"string"}},introductionText:{defaultValue:null,description:"",name:"introductionText",required:!0,type:{name:"string"}},whatText:{defaultValue:null,description:"",name:"whatText",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/hello-world/hello-world.entry.tsx#helloworldentry"]={docgenInfo:helloworldentry.__docgenInfo,name:"helloworldentry",path:"src/apps/hello-world/hello-world.entry.tsx#helloworldentry"})}catch(__react_docgen_typescript_loader_error){}const hello_world_dev={title:"Apps / Hello World",component:hello_world_entry,argTypes:{titleText:{defaultValue:"Greetings",control:{type:"text"}},introductionText:{defaultValue:"We warmly welcome everybody by saying:",control:{type:"text"}},whatText:{defaultValue:"world",control:{type:"text"}}}},App=args=>react.createElement(hello_world_entry,args)},"./src/apps/loan-list/list/loan-list.dev.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{LoanListDetailsModal:()=>LoanListDetailsModal,LoanListDueDateModal:()=>LoanListDueDateModal,LoanListEntry:()=>loan_list_dev_LoanListEntry,LoanListRenewLoansModal:()=>LoanListRenewLoansModal,default:()=>loan_list_dev});var esm=__webpack_require__("./node_modules/@storybook/addon-queryparams/dist/esm/index.js"),react=__webpack_require__("./node_modules/react/index.js"),serviceUrlArgs=__webpack_require__("./src/core/storybook/serviceUrlArgs.ts"),blockedArgs=__webpack_require__("./src/core/storybook/blockedArgs.ts"),es=(__webpack_require__("./node_modules/core-js/modules/esnext.string.at.js"),__webpack_require__("./node_modules/react-redux/es/index.js")),dayjs_min=__webpack_require__("./node_modules/dayjs/dayjs.min.js"),dayjs_min_default=__webpack_require__.n(dayjs_min),general=__webpack_require__("./src/core/utils/helpers/general.ts"),url=__webpack_require__("./src/core/utils/helpers/url.ts"),utils_text=__webpack_require__("./src/core/utils/text.tsx"),modal=__webpack_require__("./src/core/utils/modal.tsx"),empty_list=__webpack_require__("./src/components/empty-list/empty-list.tsx"),helpers=__webpack_require__("./src/apps/loan-list/utils/helpers.ts"),clsx=__webpack_require__("./node_modules/clsx/dist/clsx.mjs"),Link=__webpack_require__("./src/components/atoms/links/Link.tsx"),utils_url=__webpack_require__("./src/core/utils/url.tsx");const material_overdue_link=({dueDate,showOn})=>{const t=(0,utils_text.X)(),viewFeesAndCompensationRatesUrl=(0,utils_url.J_)()("viewFeesAndCompensationRatesUrl");return!dueDate||dueDate&&!(0,general.cf)(dueDate)?null:react.createElement(Link.Z,{href:viewFeesAndCompensationRatesUrl,className:`list-reservation__note list-reservation__note--${showOn} color-signal-alert`},t("loanListMaterialLateFeeText"))};try{materialoverduelink.displayName="materialoverduelink",materialoverduelink.__docgenInfo={description:"",displayName:"materialoverduelink",props:{dueDate:{defaultValue:null,description:"",name:"dueDate",required:!0,type:{name:"string | null | undefined"}},showOn:{defaultValue:null,description:"",name:"showOn",required:!0,type:{name:"enum",value:[{value:'"mobile"'},{value:'"desktop"'}]}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/loan-list/materials/stackable-material/material-overdue-link.tsx#materialoverduelink"]={docgenInfo:materialoverduelink.__docgenInfo,name:"materialoverduelink",path:"src/apps/loan-list/materials/stackable-material/material-overdue-link.tsx#materialoverduelink"})}catch(__react_docgen_typescript_loader_error){}const additional_materials_button=({additionalMaterials,openDueDateModal,showOn})=>{const t=(0,utils_text.X)(),openDueDateModalCallBack=(0,react.useCallback)((e=>{e.stopPropagation(),openDueDateModal()}),[openDueDateModal]);return additionalMaterials<1?react.createElement("div",null):react.createElement("button",{type:"button",onClick:e=>openDueDateModalCallBack(e),"aria-describedby":"materials-modal-text",className:`list-reservation__note list-reservation__note--${showOn}`},t("loanListAdditionalMaterialsText",{count:additionalMaterials,placeholders:{"@count":additionalMaterials}}))};try{additionalmaterialsbutton.displayName="additionalmaterialsbutton",additionalmaterialsbutton.__docgenInfo={description:"",displayName:"additionalmaterialsbutton",props:{additionalMaterials:{defaultValue:null,description:"",name:"additionalMaterials",required:!0,type:{name:"number"}},openDueDateModal:{defaultValue:null,description:"",name:"openDueDateModal",required:!0,type:{name:"() => void"}},showOn:{defaultValue:null,description:"",name:"showOn",required:!0,type:{name:"enum",value:[{value:'"mobile"'},{value:'"desktop"'}]}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/loan-list/materials/stackable-material/additional-materials-button.tsx#additionalmaterialsbutton"]={docgenInfo:additionalmaterialsbutton.__docgenInfo,name:"additionalmaterialsbutton",path:"src/apps/loan-list/materials/stackable-material/additional-materials-button.tsx#additionalmaterialsbutton"})}catch(__react_docgen_typescript_loader_error){}var material_info=__webpack_require__("./src/apps/loan-list/materials/stackable-material/material-info.tsx"),material_fetch_hoc=__webpack_require__("./src/apps/loan-list/materials/utils/material-fetch-hoc.tsx"),digital_material_fetch_hoc=__webpack_require__("./src/apps/loan-list/materials/utils/digital-material-fetch-hoc.tsx"),status_circle=__webpack_require__("./src/apps/loan-list/materials/utils/status-circle.tsx"),status_badge=__webpack_require__("./src/apps/loan-list/materials/utils/status-badge.tsx"),ArrowButton=__webpack_require__("./src/components/Buttons/ArrowButton.tsx"),date=__webpack_require__("./src/core/utils/helpers/date.ts");const material_status=({loan,children,additionalMaterials,openDetailsModal,openDueDateModal,arrowLabelledBy})=>{const t=(0,utils_text.X)(),{dueDate,loanDate}=loan,isStacked=(0,helpers.ug)(additionalMaterials),notificationClickEventHandler=()=>{isStacked&&openDueDateModal&&dueDate&&openDueDateModal(dueDate),isStacked||openDetailsModal(loan)};return dueDate&&loanDate?react.createElement("div",{className:"list-reservation__status"},react.createElement("div",{className:"list-reservation__counter"},react.createElement(status_circle.Z,{loanDate,dueDate})),react.createElement("div",null,react.createElement("div",{className:"list-reservation__deadline"},dueDate&&react.createElement(status_badge.Z,{showBadgeWithDueDate:!0,badgeDate:dueDate,dangerText:t("loanListStatusBadgeDangerText"),warningText:t("loanListStatusBadgeWarningText")}),react.createElement("p",{className:"text-small-caption color-secondary-gray"},(0,helpers.u8)(loan)?t("loanListToBeDeliveredDigitalMaterialText",{placeholders:{"@date":(0,date.o0)(dueDate)}}):t("loanListToBeDeliveredText",{placeholders:{"@date":(0,date.p6)(dueDate)}})),children)),react.createElement(ArrowButton.Z,{arrowLabelledBy,cursorPointer:!0,clickEventHandler:notificationClickEventHandler})):react.createElement("div",{className:"list-reservation__status"},react.createElement("div",{className:"list-reservation__counter"}),react.createElement("div",{className:"list-reservation__deadline"}),react.createElement(ArrowButton.Z,{arrowLabelledBy,cursorPointer:!0,clickEventHandler:notificationClickEventHandler}))};try{materialstatus.displayName="materialstatus",materialstatus.__docgenInfo={description:"",displayName:"materialstatus",props:{loan:{defaultValue:null,description:"",name:"loan",required:!0,type:{name:"LoanType"}},additionalMaterials:{defaultValue:null,description:"",name:"additionalMaterials",required:!0,type:{name:"number"}},openDetailsModal:{defaultValue:null,description:"",name:"openDetailsModal",required:!0,type:{name:"(loan: LoanType) => void"}},openDueDateModal:{defaultValue:null,description:"",name:"openDueDateModal",required:!1,type:{name:"((dueDate: string) => void) | undefined"}},arrowLabelledBy:{defaultValue:null,description:"",name:"arrowLabelledBy",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/loan-list/materials/stackable-material/material-status.tsx#materialstatus"]={docgenInfo:materialstatus.__docgenInfo,name:"materialstatus",path:"src/apps/loan-list/materials/stackable-material/material-status.tsx#materialstatus"})}catch(__react_docgen_typescript_loader_error){}const stackable_material=(0,digital_material_fetch_hoc.Z)((0,material_fetch_hoc.Z)((({additionalMaterials,material,loan,openDueDateModal,openLoanDetailsModal,focused,loanId})=>{const{dueDate,identifier,periodical}=loan,handleOpenDueDateModal=()=>{openDueDateModal&&dueDate&&openDueDateModal(dueDate)};return react.createElement("div",{className:(0,clsx.Z)("list-reservation my-32 cursor-pointer",{"list-reservation--stacked":additionalMaterials>0}),role:"button",onClick:handleOpenDueDateModal,onKeyUp:e=>{"Enter"!==e.key&&"Space"!==e.key||handleOpenDueDateModal()},tabIndex:0},material&&react.createElement(material_info.Z,{arrowLabelledBy:`${loanId||identifier}-title`,openDetailsModal:()=>{openLoanDetailsModal(loan)},periodical,material,focused,isbnForCover:identifier||""},react.createElement(additional_materials_button,{showOn:"desktop",openDueDateModal:handleOpenDueDateModal,additionalMaterials}),react.createElement(material_overdue_link,{showOn:"desktop",dueDate})),react.createElement(material_status,{arrowLabelledBy:`${loanId||identifier}-title`,loan,openDetailsModal:openLoanDetailsModal,openDueDateModal:handleOpenDueDateModal,additionalMaterials},react.createElement(additional_materials_button,{showOn:"mobile",openDueDateModal:handleOpenDueDateModal,additionalMaterials}),react.createElement(material_overdue_link,{showOn:"mobile",dueDate})))})));try{stackablematerial.displayName="stackablematerial",stackablematerial.__docgenInfo={description:"",displayName:"stackablematerial",props:{loan:{defaultValue:null,description:"",name:"loan",required:!0,type:{name:"LoanType"}},additionalMaterials:{defaultValue:null,description:"",name:"additionalMaterials",required:!0,type:{name:"number"}},openLoanDetailsModal:{defaultValue:null,description:"",name:"openLoanDetailsModal",required:!0,type:{name:"(loan: LoanType) => void"}},openDueDateModal:{defaultValue:null,description:"",name:"openDueDateModal",required:!1,type:{name:"((dueDate: string) => void) | undefined"}},focused:{defaultValue:null,description:"",name:"focused",required:!0,type:{name:"boolean"}},loanId:{defaultValue:null,description:"",name:"loanId",required:!1,type:{name:"number | null | undefined"}},digitalMaterial:{defaultValue:null,description:"",name:"digitalMaterial",required:!1,type:{name:"Product | null | undefined"}},item:{defaultValue:null,description:"",name:"item",required:!1,type:{name:"Nullable>"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/loan-list/materials/stackable-material/stackable-material.tsx#stackablematerial"]={docgenInfo:stackablematerial.__docgenInfo,name:"stackablematerial",path:"src/apps/loan-list/materials/stackable-material/stackable-material.tsx#stackablematerial"})}catch(__react_docgen_typescript_loader_error){}var loan_type=__webpack_require__("./src/core/utils/types/loan-type.ts");const loan_list_items=({loans,view,dueDates,openDueDateModal,openLoanDetailsModal,indexOfFocus,dataCy="loan-list-items"})=>{const t=(0,utils_text.X)();return react.createElement("div",{"data-cy":dataCy,className:"list-reservation-container my-32"},react.createElement("div",{className:"list-reservation__hidden-explanation",id:"materials-modal-text"},t("loanListDueDateModalAriaLabelText")),"stack"===view&&dueDates&&dueDates.map(((uniqueDueDate,i)=>{const loansUniqueDueDate=(0,helpers.Kp)(uniqueDueDate,loans),loan=loansUniqueDueDate[0]||{};return react.createElement("div",null,loan&&react.createElement(stackable_material,{focused:i===indexOfFocus,openDueDateModal,openLoanDetailsModal,loan,item:loan,loanId:loan.loanId,key:loan.faust||loan.identifier,additionalMaterials:loansUniqueDueDate.length-1}))})),"list"===view&&loans.map(((loan,i)=>react.createElement(stackable_material,{focused:i===indexOfFocus,openLoanDetailsModal,item:loan,loanId:loan.loanId,key:(0,loan_type.e)(loan),loan,additionalMaterials:0}))))};try{loanlistitems.displayName="loanlistitems",loanlistitems.__docgenInfo={description:"",displayName:"loanlistitems",props:{loans:{defaultValue:null,description:"",name:"loans",required:!0,type:{name:"LoanType[]"}},view:{defaultValue:null,description:"",name:"view",required:!0,type:{name:"enum",value:[{value:'"list"'},{value:'"stack"'}]}},dueDates:{defaultValue:null,description:"",name:"dueDates",required:!1,type:{name:"string[] | undefined"}},openLoanDetailsModal:{defaultValue:null,description:"",name:"openLoanDetailsModal",required:!0,type:{name:"(loan: LoanType) => void"}},openDueDateModal:{defaultValue:null,description:"",name:"openDueDateModal",required:!0,type:{name:"(dueDate: string) => void"}},indexOfFocus:{defaultValue:null,description:"",name:"indexOfFocus",required:!0,type:{name:"number | null"}},dataCy:{defaultValue:{value:"loan-list-items"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/loan-list/list/loan-list-items.tsx#loanlistitems"]={docgenInfo:loanlistitems.__docgenInfo,name:"loanlistitems",path:"src/apps/loan-list/list/loan-list-items.tsx#loanlistitems"})}catch(__react_docgen_typescript_loader_error){}var use_pager=__webpack_require__("./src/components/result-pager/use-pager.tsx");const list_list=({loans,dueDates,view,emptyListLabel,pageSize,openLoanDetailsModal,openDueDateModal,children})=>{const[displayedLoans,setDisplayedLoans]=(0,react.useState)([]),{itemsShown,PagerComponent,firstInNewPage}=(0,use_pager.Z)({hitcount:loans.length,pageSize,overrideItemsShown:"list"===view?void 0:()=>displayedLoans.length});return(0,react.useEffect)((()=>{if("list"===view)setDisplayedLoans((0,general.qZ)(loans,itemsShown));else{const stackedLoans=(0,helpers.t4)(view,loans,itemsShown,dueDates);setDisplayedLoans([...stackedLoans])}}),[dueDates,loans,itemsShown,view]),react.createElement(react.Fragment,null,children,loans.length>0&&react.createElement(react.Fragment,null,react.createElement(loan_list_items,{indexOfFocus:firstInNewPage,openLoanDetailsModal,openDueDateModal,dueDates,loans:displayedLoans,view}),react.createElement(PagerComponent,null)),0===loans.length&&react.createElement(empty_list.Z,{classNames:"mt-24",emptyListText:emptyListLabel}))};try{list.displayName="list",list.__docgenInfo={description:"",displayName:"list",props:{loans:{defaultValue:null,description:"",name:"loans",required:!0,type:{name:"LoanType[]"}},dueDates:{defaultValue:null,description:"",name:"dueDates",required:!1,type:{name:"string[] | undefined"}},view:{defaultValue:null,description:"",name:"view",required:!0,type:{name:"enum",value:[{value:'"list"'},{value:'"stack"'}]}},emptyListLabel:{defaultValue:null,description:"",name:"emptyListLabel",required:!0,type:{name:"string"}},pageSize:{defaultValue:null,description:"",name:"pageSize",required:!0,type:{name:"number"}},openLoanDetailsModal:{defaultValue:null,description:"",name:"openLoanDetailsModal",required:!0,type:{name:"(loan: LoanType) => void"}},openDueDateModal:{defaultValue:null,description:"",name:"openDueDateModal",required:!0,type:{name:"(dueDate: string) => void"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/loan-list/list/list.tsx#list"]={docgenInfo:list.__docgenInfo,name:"list",path:"src/apps/loan-list/list/list.tsx#list"})}catch(__react_docgen_typescript_loader_error){}const icon_list=()=>react.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},react.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M21 17.25C21.4142 17.25 21.75 17.5858 21.75 18C21.75 18.3797 21.4678 18.6935 21.1018 18.7432L21 18.75H3C2.58579 18.75 2.25 18.4142 2.25 18C2.25 17.6203 2.53215 17.3065 2.89823 17.2568L3 17.25H21ZM21 11.25C21.4142 11.25 21.75 11.5858 21.75 12C21.75 12.3797 21.4678 12.6935 21.1018 12.7432L21 12.75H3C2.58579 12.75 2.25 12.4142 2.25 12C2.25 11.6203 2.53215 11.3065 2.89823 11.2568L3 11.25H21ZM21 5.25C21.4142 5.25 21.75 5.58579 21.75 6C21.75 6.3797 21.4678 6.69349 21.1018 6.74315L21 6.75H3C2.58579 6.75 2.25 6.41421 2.25 6C2.25 5.6203 2.53215 5.30651 2.89823 5.25685L3 5.25H21Z"})),icon_stack=()=>react.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},react.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.1291 2.78217C11.6687 2.47235 12.3323 2.47235 12.8719 2.78217L19.5721 6.62914C20.4103 7.11038 20.6996 8.17997 20.2184 9.01814C20.064 9.28701 19.841 9.51004 19.5721 9.66442L18.861 10.0718L19.5721 10.481C20.4103 10.9622 20.6996 12.0318 20.2184 12.87C20.0949 13.0851 19.9274 13.2708 19.7277 13.4156L19.5721 13.5163L18.861 13.9238L19.5721 14.3328C20.4103 14.8141 20.6996 15.8837 20.2184 16.7218C20.0949 16.9369 19.9274 17.1227 19.7277 17.2674L19.5721 17.3681L12.8719 21.2151C12.3772 21.4991 11.7785 21.5228 11.2665 21.2861L11.1291 21.2151L4.42892 17.3681C3.59075 16.8869 3.3014 15.8173 3.78264 14.9791C3.90614 14.764 4.07358 14.5783 4.27328 14.4335L4.42892 14.3328L5.13899 13.9238L4.42892 13.5163C3.59075 13.035 3.3014 11.9654 3.78264 11.1273C3.90614 10.9122 4.07358 10.7264 4.27328 10.5817L4.42892 10.481L5.13899 10.0718L4.42892 9.66442C3.63732 9.20991 3.33525 8.23061 3.70953 7.41711L3.78264 7.27541C3.93702 7.00654 4.16005 6.78351 4.42892 6.62914L11.1291 2.78217ZM17.354 14.7888L12.8719 17.3632C12.3772 17.6472 11.7785 17.6709 11.2665 17.4342L11.1291 17.3632L6.64599 14.7888L5.1758 15.6337C5.13739 15.6557 5.10553 15.6876 5.08348 15.726C5.02455 15.8286 5.0465 15.9556 5.12938 16.033L5.1758 16.0673L11.876 19.9143C11.9338 19.9475 12.0016 19.9557 12.0644 19.9392L12.125 19.9143L18.8252 16.0673C18.8636 16.0452 18.8955 16.0134 18.9175 15.975C18.9765 15.8723 18.9545 15.7454 18.8716 15.6679L18.8252 15.6337L17.354 14.7888ZM17.354 10.9368L12.8719 13.5114C12.3323 13.8212 11.6687 13.8212 11.1291 13.5114L6.64599 10.9368L5.1758 11.7818C5.13739 11.8039 5.10553 11.8357 5.08348 11.8741C5.02455 11.9768 5.0465 12.1037 5.12938 12.1812L5.1758 12.2154L11.876 16.0624C11.9338 16.0956 12.0016 16.1039 12.0644 16.0873L12.125 16.0624L18.8252 12.2154C18.8636 12.1934 18.8955 12.1615 18.9175 12.1231C18.9765 12.0205 18.9545 11.8936 18.8716 11.8161L18.8252 11.7818L17.354 10.9368ZM12.125 4.083C12.0479 4.03874 11.9531 4.03874 11.876 4.083L5.1758 7.92997C5.13739 7.95202 5.10553 7.98389 5.08348 8.0223C5.01473 8.14203 5.05607 8.29483 5.1758 8.36358L11.876 12.2106C11.9531 12.2548 12.0479 12.2548 12.125 12.2106L18.8252 8.36358C18.8636 8.34153 18.8955 8.30967 18.9175 8.27126C18.9863 8.15152 18.945 7.99872 18.8252 7.92997L12.125 4.083Z"}));var Button=__webpack_require__("./src/components/Buttons/Button.tsx");const ToggleListViewButtons=({setView,view,disableRenewLoansButton,openRenewLoansModal})=>{const t=(0,utils_text.X)(),setViewHandler=(0,react.useCallback)((inputView=>{(0,url.ul)({listview:inputView}),setView(inputView)}),[setView]);return react.createElement("div",{className:"dpl-list-buttons__buttons"},react.createElement("div",{id:"renew-multiple-modal",className:"dpl-list-buttons__screen-reader-description"},t("loanListRenewMultipleButtonExplanationText")),react.createElement("div",{className:"dpl-list-buttons__buttons__button"},react.createElement("button",{onClick:()=>setViewHandler("list"),"aria-pressed":"list"===view,className:"dpl-icon-button "+("list"===view?"dpl-icon-button--selected":""),id:"test-list",type:"button","aria-label":t("loanListAriaLabelListButtonText")},react.createElement(icon_list,null))),react.createElement("div",{className:"dpl-list-buttons__buttons__button"},react.createElement("button",{"aria-pressed":"stack"===view,className:"dpl-icon-button "+("stack"===view?"dpl-icon-button--selected":""),"data-cy":"stack",onClick:()=>setViewHandler("stack"),type:"button","aria-label":t("loanListAriaLabelStackButtonText")},react.createElement(icon_stack,null)),react.createElement("div",{className:"dpl-list-buttons__buttons__button dpl-list-buttons__buttons__button--hide-on-mobile"},react.createElement("button",{type:"button",onClick:()=>{openRenewLoansModal()},disabled:disableRenewLoansButton,className:"btn-primary btn-filled btn-small arrow__hover--right-small "+(disableRenewLoansButton?"btn-outline":""),id:"test-renew-button","aria-describedby":"renew-multiple-modal"},t("loanListRenewMultipleButtonText"))),react.createElement("div",{className:"hide-on-desktop button-box button-box--sticky-bottom"},react.createElement(Button.z,{label:t("loanListRenewMultipleButtonText"),buttonType:"none",disabled:!1,collapsible:!1,size:"small",variant:"filled",onClick:()=>{openRenewLoansModal()}}))))},list_ToggleListViewButtons=ToggleListViewButtons;try{ToggleListViewButtons.displayName="ToggleListViewButtons",ToggleListViewButtons.__docgenInfo={description:"",displayName:"ToggleListViewButtons",props:{setView:{defaultValue:null,description:"",name:"setView",required:!0,type:{name:"(view: ListView) => void"}},view:{defaultValue:null,description:"",name:"view",required:!0,type:{name:"enum",value:[{value:'"list"'},{value:'"stack"'}]}},disableRenewLoansButton:{defaultValue:null,description:"",name:"disableRenewLoansButton",required:!0,type:{name:"boolean"}},pageSize:{defaultValue:null,description:"",name:"pageSize",required:!0,type:{name:"number"}},loans:{defaultValue:null,description:"",name:"loans",required:!0,type:{name:"LoanType[]"}},openRenewLoansModal:{defaultValue:null,description:"",name:"openRenewLoansModal",required:!0,type:{name:"() => void"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/loan-list/list/ToggleListViewButtons.tsx#ToggleListViewButtons"]={docgenInfo:ToggleListViewButtons.__docgenInfo,name:"ToggleListViewButtons",path:"src/apps/loan-list/list/ToggleListViewButtons.tsx#ToggleListViewButtons"})}catch(__react_docgen_typescript_loader_error){}const ListHeader=({header,amount,children})=>react.createElement("div",{className:"dpl-list-buttons"},react.createElement("h2",{className:"dpl-list-buttons__header"},header,react.createElement("div",{className:"dpl-list-buttons__power"},amount)),react.createElement("div",{className:"dpl-list-buttons__buttons"},children)),list_ListHeader=ListHeader;try{ListHeader.displayName="ListHeader",ListHeader.__docgenInfo={description:"",displayName:"ListHeader",props:{header:{defaultValue:null,description:"",name:"header",required:!0,type:{name:"string"}},amount:{defaultValue:null,description:"",name:"amount",required:!0,type:{name:"number"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/loan-list/list/ListHeader.tsx#ListHeader"]={docgenInfo:ListHeader.__docgenInfo,name:"ListHeader",path:"src/apps/loan-list/list/ListHeader.tsx#ListHeader"})}catch(__react_docgen_typescript_loader_error){}var material_details=__webpack_require__("./src/apps/loan-list/modal/material-details.tsx"),material_details_modal=__webpack_require__("./src/apps/loan-list/modal/material-details-modal.tsx"),modal_helpers=__webpack_require__("./src/core/utils/helpers/modal-helpers.ts"),LoansGroupModal=__webpack_require__("./src/components/GroupModal/LoansGroupModal.tsx"),SimpleModalHeader=__webpack_require__("./src/components/GroupModal/SimpleModalHeader.tsx"),StatusCircleModalHeader=__webpack_require__("./src/components/GroupModal/StatusCircleModalHeader.tsx"),AcceptFeesModal=__webpack_require__("./src/components/accept-fees-modal/AcceptFeesModal.tsx"),useLoans=__webpack_require__("./src/core/utils/useLoans.tsx");const loan_list=({pageSize})=>{const{modalIds}=(0,es.v9)((s=>s.modal)),{open}=(0,modal.f)(),{loanDetails,allLoansId,dueDateModal,acceptModal}=(0,modal_helpers.GM)(),t=(0,utils_text.X)(),[view,setView]=(0,react.useState)("list"),[dueDate,setDueDate]=(0,react.useState)(null),[accepted,setAccepted]=(0,react.useState)(!1),[modalLoan,setModalLoan]=(0,react.useState)(null),{fbs:{loans:loansPhysical,stackedMaterialsDueDates:stackedMaterialsDueDatesFbs},publizon:{loans:loansDigital}}=(0,useLoans.Z)(),openAcceptModal=(0,react.useCallback)((()=>{open(`${acceptModal}`)}),[acceptModal,open]),openLoanDetailsModal=(0,react.useCallback)((loan=>{setModalLoan(loan),open((0,material_details_modal.ae)(loan))}),[open]),openDueDateModal=(0,react.useCallback)((dueDateInput=>{setDueDate(dueDateInput),open((0,modal_helpers.V$)(dueDateModal,[dueDateInput]))}),[dueDateModal,open]),openRenewLoansModal=(0,react.useCallback)((()=>{setDueDate(null),open(allLoansId)}),[allLoansId,open]);(0,react.useEffect)((()=>{const modalUrlParam=(0,url.wo)("modal"),loanDetailsString=loanDetails;if(modalUrlParam&&modalUrlParam.includes(loanDetails)){const loanIdFromModalId=(0,modal_helpers.FV)(modalUrlParam,loanDetailsString);if(loanIdFromModalId&&loansPhysical){const loan=[...(0,helpers.TE)(loansPhysical,"loanId",loanIdFromModalId),...(0,helpers.TE)(loansDigital,"identifier",loanIdFromModalId)].filter(loan_type.P).at(0);loan&&setModalLoan(loan)}}if(modalUrlParam&&(0,modal_helpers.hl)(modalUrlParam)){const dateFromQueryParam=(0,modal_helpers.OY)(modalUrlParam);setDueDate(dateFromQueryParam)}}),[loansPhysical,loansDigital,loanDetails,openDueDateModal]);const listContainsLoans=Array.isArray(loansPhysical)&&loansPhysical.length>0||Array.isArray(loansDigital)&&loansDigital.length>0;return react.createElement(react.Fragment,null,react.createElement("div",{className:`loan-list-page ${(0,general.Do)(modalIds)}`},react.createElement("h1",{className:"text-header-h1 my-32"},t("loanListTitleText")),listContainsLoans&&react.createElement(react.Fragment,null,loansPhysical&&react.createElement(list_list,{pageSize,emptyListLabel:t("loanListPhysicalLoansEmptyListText"),loans:loansPhysical,dueDates:stackedMaterialsDueDatesFbs,view,openLoanDetailsModal,openDueDateModal},react.createElement(list_ListHeader,{header:t("loanListPhysicalLoansTitleText"),amount:loansPhysical.length},react.createElement(list_ToggleListViewButtons,{disableRenewLoansButton:0===(0,general.R3)(loansPhysical),view,setView,loans:loansPhysical,pageSize,openRenewLoansModal}))),loansDigital&&react.createElement(list_list,{pageSize,emptyListLabel:t("loanListDigitalLoansEmptyListText"),loans:loansDigital,view:"list",openLoanDetailsModal,openDueDateModal},react.createElement(list_ListHeader,{header:t("loanListDigitalLoansTitleText"),amount:loansDigital.length}))),loansPhysical&&loansDigital&&(0,helpers.Re)(loansPhysical)&&(0,helpers.Re)(loansDigital)&&react.createElement(empty_list.Z,{classNames:"mt-24",emptyListText:t("loanListDigitalPhysicalLoansEmptyListText")})),modalLoan&&react.createElement(material_details_modal.ZP,{modalId:(0,material_details_modal.ae)(modalLoan)},react.createElement(material_details.Z,{item:modalLoan,loan:modalLoan,modalId:(0,material_details_modal.ae)(modalLoan)})),loansPhysical&&react.createElement(LoansGroupModal.Z,{accepted,resetAccepted:()=>{setAccepted(!1)},pageSize,openDetailsModal:openLoanDetailsModal,dueDate,openAcceptModal,loansModal:dueDate?(0,helpers.Kp)(dueDate,loansPhysical):loansPhysical},dueDate&&react.createElement(StatusCircleModalHeader.Z,{header:t("groupModalDueDateHeaderText",{placeholders:{"@date":(0,date.p6)(dueDate)}}),dueDate,subHeader:t("groupModalReturnLibraryText"),statusCircleComponent:react.createElement(status_circle.Z,{loanDate:dayjs_min_default()().subtract(1,"month").format("YYYY-MM-DD"),dueDate})}),!dueDate&&react.createElement(SimpleModalHeader.Z,{header:t("groupModalHeaderText")})),react.createElement(AcceptFeesModal.Z,{accept:()=>setAccepted(!0)}))};try{loanlist.displayName="loanlist",loanlist.__docgenInfo={description:"",displayName:"loanlist",props:{pageSize:{defaultValue:null,description:"",name:"pageSize",required:!0,type:{name:"number"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/loan-list/list/loan-list.tsx#loanlist"]={docgenInfo:loanlist.__docgenInfo,name:"loanlist",path:"src/apps/loan-list/list/loan-list.tsx#loanlist"})}catch(__react_docgen_typescript_loader_error){}var withIsPatronBlockedHoc=__webpack_require__("./src/core/utils/withIsPatronBlockedHoc.tsx");const loan_list_entry=(0,__webpack_require__("./src/core/utils/config.tsx").Rh)((0,utils_url.XL)((0,utils_text.z)((0,withIsPatronBlockedHoc.Z)((({pageSizeDesktop,pageSizeMobile})=>{const pageSize=(0,general.Rh)({desktop:pageSizeDesktop,mobile:pageSizeMobile},"pageSizeLoanList");return react.createElement(loan_list,{pageSize})})))));try{loanlistentry.displayName="loanlistentry",loanlistentry.__docgenInfo={description:"",displayName:"loanlistentry",props:{blockedPatronDTitleText:{defaultValue:null,description:"",name:"blockedPatronDTitleText",required:!0,type:{name:"string"}},blockedPatronDBodyText:{defaultValue:null,description:"",name:"blockedPatronDBodyText",required:!0,type:{name:"string"}},blockedPatronSTitleText:{defaultValue:null,description:"",name:"blockedPatronSTitleText",required:!0,type:{name:"string"}},blockedPatronSBodyText:{defaultValue:null,description:"",name:"blockedPatronSBodyText",required:!0,type:{name:"string"}},blockedPatronFTitleText:{defaultValue:null,description:"",name:"blockedPatronFTitleText",required:!0,type:{name:"string"}},blockedPatronFBodyText:{defaultValue:null,description:"",name:"blockedPatronFBodyText",required:!0,type:{name:"string"}},blockedPatronETitleText:{defaultValue:null,description:"",name:"blockedPatronETitleText",required:!0,type:{name:"string"}},blockedPatronEBodyText:{defaultValue:null,description:"",name:"blockedPatronEBodyText",required:!0,type:{name:"string"}},blockedPatronWTitleText:{defaultValue:null,description:"",name:"blockedPatronWTitleText",required:!0,type:{name:"string"}},blockedPatronWBodyText:{defaultValue:null,description:"",name:"blockedPatronWBodyText",required:!0,type:{name:"string"}},blockedPatronOTitleText:{defaultValue:null,description:"",name:"blockedPatronOTitleText",required:!0,type:{name:"string"}},blockedPatronOBodyText:{defaultValue:null,description:"",name:"blockedPatronOBodyText",required:!0,type:{name:"string"}},blockedPatronUTitleText:{defaultValue:null,description:"",name:"blockedPatronUTitleText",required:!0,type:{name:"string"}},blockedPatronUBodyText:{defaultValue:null,description:"",name:"blockedPatronUBodyText",required:!0,type:{name:"string"}},blockedPatronELinkText:{defaultValue:null,description:"",name:"blockedPatronELinkText",required:!0,type:{name:"string"}},blockedPatronELinkUrl:{defaultValue:null,description:"",name:"blockedPatronELinkUrl",required:!0,type:{name:"string"}},blockedPatronCloseModalAriaLabelText:{defaultValue:null,description:"",name:"blockedPatronCloseModalAriaLabelText",required:!0,type:{name:"string"}},blockedPatronModalAriaDescriptionText:{defaultValue:null,description:"",name:"blockedPatronModalAriaDescriptionText",required:!0,type:{name:"string"}},BlockedPatronEntryTextProps:{defaultValue:null,description:"",name:"BlockedPatronEntryTextProps",required:!0,type:{name:"string"}},redirectOnBlocked:{defaultValue:null,description:"",name:"redirectOnBlocked",required:!0,type:{name:"string"}},groupModalGoToMaterialAriaLabelText:{defaultValue:null,description:"",name:"groupModalGoToMaterialAriaLabelText",required:!0,type:{name:"string"}},loanListAriaLabelListButtonText:{defaultValue:null,description:"",name:"loanListAriaLabelListButtonText",required:!0,type:{name:"string"}},loanListAriaLabelStackButtonText:{defaultValue:null,description:"",name:"loanListAriaLabelStackButtonText",required:!0,type:{name:"string"}},loanListDigitalLoansEmptyListText:{defaultValue:null,description:"",name:"loanListDigitalLoansEmptyListText",required:!0,type:{name:"string"}},loanListDigitalLoansTitleText:{defaultValue:null,description:"",name:"loanListDigitalLoansTitleText",required:!0,type:{name:"string"}},loanListDigitalPhysicalLoansEmptyListText:{defaultValue:null,description:"",name:"loanListDigitalPhysicalLoansEmptyListText",required:!0,type:{name:"string"}},loanListDueDateModalAriaLabelText:{defaultValue:null,description:"",name:"loanListDueDateModalAriaLabelText",required:!0,type:{name:"string"}},loanListDueDateModalAriaDescribeMobileText:{defaultValue:null,description:"",name:"loanListDueDateModalAriaDescribeMobileText",required:!0,type:{name:"string"}},loanListLateFeeDesktopText:{defaultValue:null,description:"",name:"loanListLateFeeDesktopText",required:!0,type:{name:"string"}},loanListLateFeeMobileText:{defaultValue:null,description:"",name:"loanListLateFeeMobileText",required:!0,type:{name:"string"}},loanListMaterialDaysText:{defaultValue:null,description:"",name:"loanListMaterialDaysText",required:!0,type:{name:"string"}},loanListAdditionalMaterialsText:{defaultValue:null,description:"",name:"loanListAdditionalMaterialsText",required:!0,type:{name:"string"}},loanListPhysicalLoansEmptyListText:{defaultValue:null,description:"",name:"loanListPhysicalLoansEmptyListText",required:!0,type:{name:"string"}},loanListPhysicalLoansTitleText:{defaultValue:null,description:"",name:"loanListPhysicalLoansTitleText",required:!0,type:{name:"string"}},loanListRenewMultipleButtonExplanationText:{defaultValue:null,description:"",name:"loanListRenewMultipleButtonExplanationText",required:!0,type:{name:"string"}},loanListRenewMultipleButtonText:{defaultValue:null,description:"",name:"loanListRenewMultipleButtonText",required:!0,type:{name:"string"}},loanListStatusBadgeDangerText:{defaultValue:null,description:"",name:"loanListStatusBadgeDangerText",required:!0,type:{name:"string"}},loanListStatusBadgeWarningText:{defaultValue:null,description:"",name:"loanListStatusBadgeWarningText",required:!0,type:{name:"string"}},loanListTitleText:{defaultValue:null,description:"",name:"loanListTitleText",required:!0,type:{name:"string"}},loanListToBeDeliveredDigitalMaterialText:{defaultValue:null,description:"",name:"loanListToBeDeliveredDigitalMaterialText",required:!0,type:{name:"string"}},loanListToBeDeliveredText:{defaultValue:null,description:"",name:"loanListToBeDeliveredText",required:!0,type:{name:"string"}},etAlText:{defaultValue:null,description:"",name:"etAlText",required:!0,type:{name:"string"}},materialAndAuthorText:{defaultValue:null,description:"",name:"materialAndAuthorText",required:!0,type:{name:"string"}},materialByAuthorText:{defaultValue:null,description:"",name:"materialByAuthorText",required:!0,type:{name:"string"}},publizonAudioBookText:{defaultValue:null,description:"",name:"publizonAudioBookText",required:!0,type:{name:"string"}},publizonEbookText:{defaultValue:null,description:"",name:"publizonEbookText",required:!0,type:{name:"string"}},publizonPodcastText:{defaultValue:null,description:"",name:"publizonPodcastText",required:!0,type:{name:"string"}},resultPagerStatusText:{defaultValue:null,description:"",name:"resultPagerStatusText",required:!0,type:{name:"string"}},loanListMaterialLateFeeText:{defaultValue:null,description:"",name:"loanListMaterialLateFeeText",required:!0,type:{name:"string"}},loanListMaterialDayText:{defaultValue:null,description:"",name:"loanListMaterialDayText",required:!0,type:{name:"string"}},loanListStatusCircleAriaLabelText:{defaultValue:null,description:"",name:"loanListStatusCircleAriaLabelText",required:!0,type:{name:"string"}},expirationWarningDaysBeforeConfig:{defaultValue:null,description:"",name:"expirationWarningDaysBeforeConfig",required:!0,type:{name:"string"}},pageSizeMobile:{defaultValue:null,description:"",name:"pageSizeMobile",required:!0,type:{name:"number"}},pageSizeDesktop:{defaultValue:null,description:"",name:"pageSizeDesktop",required:!0,type:{name:"number"}},groupModalDueDateLinkToPageWithFeesText:{defaultValue:null,description:"",name:"groupModalDueDateLinkToPageWithFeesText",required:!0,type:{name:"string"}},showMoreText:{defaultValue:null,description:"",name:"showMoreText",required:!0,type:{name:"string"}},groupModalDueDateMaterialText:{defaultValue:null,description:"",name:"groupModalDueDateMaterialText",required:!0,type:{name:"string"}},groupModalGoToMaterialText:{defaultValue:null,description:"",name:"groupModalGoToMaterialText",required:!0,type:{name:"string"}},groupModalDueDateHeaderText:{defaultValue:null,description:"",name:"groupModalDueDateHeaderText",required:!0,type:{name:"string"}},groupModalReturnLibraryText:{defaultValue:null,description:"",name:"groupModalReturnLibraryText",required:!0,type:{name:"string"}},groupModalCheckboxText:{defaultValue:null,description:"",name:"groupModalCheckboxText",required:!0,type:{name:"string"}},groupModalHiddenLabelCheckboxOnMaterialText:{defaultValue:null,description:"",name:"groupModalHiddenLabelCheckboxOnMaterialText",required:!0,type:{name:"string"}},groupModalButtonText:{defaultValue:null,description:"",name:"groupModalButtonText",required:!0,type:{name:"string"}},groupModalDueDateWarningLoanOverdueText:{defaultValue:null,description:"",name:"groupModalDueDateWarningLoanOverdueText",required:!0,type:{name:"string"}},groupModalLoansAriaDescriptionText:{defaultValue:null,description:"",name:"groupModalLoansAriaDescriptionText",required:!0,type:{name:"string"}},groupModalLoansCloseModalAriaLabelText:{defaultValue:null,description:"",name:"groupModalLoansCloseModalAriaLabelText",required:!0,type:{name:"string"}},groupModalRenewLoanDeniedInterLibraryLoanText:{defaultValue:null,description:"",name:"groupModalRenewLoanDeniedInterLibraryLoanText",required:!0,type:{name:"string"}},groupModalRenewLoanDeniedMaxRenewalsReachedText:{defaultValue:null,description:"",name:"groupModalRenewLoanDeniedMaxRenewalsReachedText",required:!0,type:{name:"string"}},groupModalRenewLoanDeniedReservedText:{defaultValue:null,description:"",name:"groupModalRenewLoanDeniedReservedText",required:!0,type:{name:"string"}},renewGroupModalLoansButtonText:{defaultValue:null,description:"",name:"renewGroupModalLoansButtonText",required:!0,type:{name:"string"}},renewGroupModalLoansErrorStatusText:{defaultValue:null,description:"",name:"renewGroupModalLoansErrorStatusText",required:!0,type:{name:"string"}},renewGroupModalLoansErrorTitleText:{defaultValue:null,description:"",name:"renewGroupModalLoansErrorTitleText",required:!0,type:{name:"string"}},renewGroupModalLoansNoRenewalsPossibleErrorStatusText:{defaultValue:null,description:"",name:"renewGroupModalLoansNoRenewalsPossibleErrorStatusText",required:!0,type:{name:"string"}},renewGroupModalLoansNoRenewalsPossibleErrorTitleText:{defaultValue:null,description:"",name:"renewGroupModalLoansNoRenewalsPossibleErrorTitleText",required:!0,type:{name:"string"}},renewGroupModalLoansSuccessStatusText:{defaultValue:null,description:"",name:"renewGroupModalLoansSuccessStatusText",required:!0,type:{name:"string"}},renewGroupModalLoansSuccessTitleText:{defaultValue:null,description:"",name:"renewGroupModalLoansSuccessTitleText",required:!0,type:{name:"string"}},renewMaterialLoanButtonText:{defaultValue:null,description:"",name:"renewMaterialLoanButtonText",required:!0,type:{name:"string"}},renewMaterialLoanErrorStatusText:{defaultValue:null,description:"",name:"renewMaterialLoanErrorStatusText",required:!0,type:{name:"string"}},renewMaterialLoanErrorTitleText:{defaultValue:null,description:"",name:"renewMaterialLoanErrorTitleText",required:!0,type:{name:"string"}},renewMaterialLoanNoRenewalsPossibleErrorStatusText:{defaultValue:null,description:"",name:"renewMaterialLoanNoRenewalsPossibleErrorStatusText",required:!0,type:{name:"string"}},renewMaterialLoanNoRenewalsPossibleErrorTitleText:{defaultValue:null,description:"",name:"renewMaterialLoanNoRenewalsPossibleErrorTitleText",required:!0,type:{name:"string"}},renewMaterialLoanSuccessStatusText:{defaultValue:null,description:"",name:"renewMaterialLoanSuccessStatusText",required:!0,type:{name:"string"}},renewMaterialLoanSuccessTitleText:{defaultValue:null,description:"",name:"renewMaterialLoanSuccessTitleText",required:!0,type:{name:"string"}},renewProcessingText:{defaultValue:null,description:"",name:"renewProcessingText",required:!0,type:{name:"string"}},materialDetailsWarningLoanOverdueText:{defaultValue:null,description:"",name:"materialDetailsWarningLoanOverdueText",required:!0,type:{name:"string"}},materialDetailsPhysicalDueDateLabelText:{defaultValue:null,description:"",name:"materialDetailsPhysicalDueDateLabelText",required:!0,type:{name:"string"}},materialDetailsLoanDateLabelText:{defaultValue:null,description:"",name:"materialDetailsLoanDateLabelText",required:!0,type:{name:"string"}},materialDetailsMaterialNumberLabelText:{defaultValue:null,description:"",name:"materialDetailsMaterialNumberLabelText",required:!0,type:{name:"string"}},materialDetailsCloseModalAriaLabelText:{defaultValue:null,description:"",name:"materialDetailsCloseModalAriaLabelText",required:!0,type:{name:"string"}},materialDetailsLinkToPageWithFeesText:{defaultValue:null,description:"",name:"materialDetailsLinkToPageWithFeesText",required:!0,type:{name:"string"}},materialDetailsOverdueText:{defaultValue:null,description:"",name:"materialDetailsOverdueText",required:!0,type:{name:"string"}},feesPageUrl:{defaultValue:null,description:"",name:"feesPageUrl",required:!0,type:{name:"string"}},ereolenMyPageUrl:{defaultValue:null,description:"",name:"ereolenMyPageUrl",required:!0,type:{name:"string"}},materialDetailsModalAriaDescriptionText:{defaultValue:null,description:"",name:"materialDetailsModalAriaDescriptionText",required:!0,type:{name:"string"}},materialDetailsGoToEreolenText:{defaultValue:null,description:"",name:"materialDetailsGoToEreolenText",required:!0,type:{name:"string"}},materialDetailsDigitalDueDateLabelText:{defaultValue:null,description:"",name:"materialDetailsDigitalDueDateLabelText",required:!0,type:{name:"string"}},materialDetailsRenewLoanButtonText:{defaultValue:null,description:"",name:"materialDetailsRenewLoanButtonText",required:!0,type:{name:"string"}},acceptModalHeaderText:{defaultValue:null,description:"",name:"acceptModalHeaderText",required:!0,type:{name:"string"}},acceptModalAreYouSureText:{defaultValue:null,description:"",name:"acceptModalAreYouSureText",required:!0,type:{name:"string"}},acceptModalBodyText:{defaultValue:null,description:"",name:"acceptModalBodyText",required:!0,type:{name:"string"}},acceptModalCancelButtonText:{defaultValue:null,description:"",name:"acceptModalCancelButtonText",required:!0,type:{name:"string"}},acceptModalAcceptButtonText:{defaultValue:null,description:"",name:"acceptModalAcceptButtonText",required:!0,type:{name:"string"}},acceptModalAriaDescriptionText:{defaultValue:null,description:"",name:"acceptModalAriaDescriptionText",required:!0,type:{name:"string"}},acceptModalAriaLabelText:{defaultValue:null,description:"",name:"acceptModalAriaLabelText",required:!0,type:{name:"string"}},materialUrl:{defaultValue:null,description:"",name:"materialUrl",required:!0,type:{name:"string"}},searchUrl:{defaultValue:null,description:"",name:"searchUrl",required:!0,type:{name:"string"}},advancedSearchUrl:{defaultValue:null,description:"",name:"advancedSearchUrl",required:!0,type:{name:"string"}},fbsBaseUrl:{defaultValue:null,description:"",name:"fbsBaseUrl",required:!0,type:{name:"string"}},loanListEreolenUrl:{defaultValue:null,description:"",name:"loanListEreolenUrl",required:!0,type:{name:"string"}},publizonBaseUrl:{defaultValue:null,description:"",name:"publizonBaseUrl",required:!0,type:{name:"string"}},dplCmsBaseUrl:{defaultValue:null,description:"",name:"dplCmsBaseUrl",required:!0,type:{name:"string"}},coverBaseUrl:{defaultValue:null,description:"",name:"coverBaseUrl",required:!0,type:{name:"string"}},materialBaseUrl:{defaultValue:null,description:"",name:"materialBaseUrl",required:!0,type:{name:"string"}},fbiBaseUrl:{defaultValue:null,description:"",name:"fbiBaseUrl",required:!0,type:{name:"string"}},authUrl:{defaultValue:null,description:"",name:"authUrl",required:!0,type:{name:"string"}},ereolenHomepageUrl:{defaultValue:null,description:"",name:"ereolenHomepageUrl",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/loan-list/list/loan-list.entry.tsx#loanlistentry"]={docgenInfo:loanlistentry.__docgenInfo,name:"loanlistentry",path:"src/apps/loan-list/list/loan-list.entry.tsx#loanlistentry"})}catch(__react_docgen_typescript_loader_error){}var groupModalArgs=__webpack_require__("./src/core/storybook/groupModalArgs.ts"),loanGroupModalArgs=__webpack_require__("./src/core/storybook/loanGroupModalArgs.ts"),acceptFeesModalArgs=__webpack_require__("./src/core/storybook/acceptFeesModalArgs.ts"),materialDetailsModalArgs=__webpack_require__("./src/core/storybook/materialDetailsModalArgs.ts"),renewalArgs=__webpack_require__("./src/core/storybook/renewalArgs.ts");const loan_list_dev={title:"Apps / Loan list",component:loan_list_entry,argTypes:{...serviceUrlArgs.Z,...groupModalArgs.Z,...loanGroupModalArgs.Z,...renewalArgs.Z,...acceptFeesModalArgs.Z,...materialDetailsModalArgs.Z,...blockedArgs.Z,pageSizeDesktop:{defaultValue:10,control:{type:"number"}},pageSizeMobile:{defaultValue:5,control:{type:"number"}},expirationWarningDaysBeforeConfig:{defaultValue:"6",control:{type:"text"}},loanListAriaLabelListButtonText:{control:{type:"text"},defaultValue:"This button shows all loans in the list"},loanListAriaLabelStackButtonText:{control:{type:"text"},defaultValue:"This button filters the list, so only one the materials that have the same due date is shown"},loanListDigitalLoansEmptyListText:{control:{type:"text"},defaultValue:"You have no digital loans at the moment"},loanListDigitalLoansTitleText:{control:{type:"text"},defaultValue:"Digital loans"},loanListDigitalPhysicalLoansEmptyListText:{control:{type:"text"},defaultValue:"You have 0 loans at the moment"},loanListDueDateModalAriaLabelText:{control:{type:"text"},defaultValue:"This button opens a modal that covers the entire page and contains loans with the same due date as the loan currently in focus"},loanListMaterialLateFeeText:{control:{type:"text"},defaultValue:"You will be charged a fee, when the item is returned"},loanListMaterialDaysText:{control:{type:"text"},defaultValue:"days"},loanListMaterialDayText:{control:{type:"text"},defaultValue:"day"},loanListAdditionalMaterialsText:{control:{type:"text"},defaultValue:'{"type":"plural","text":["+ 1 other material","+ @count other materials"]}'},loanListPhysicalLoansEmptyListText:{control:{type:"text"},defaultValue:"You have no physical loans at the moment"},loanListPhysicalLoansTitleText:{control:{type:"text"},defaultValue:"Physical loans"},loanListRenewMultipleButtonExplanationText:{control:{type:"text"},defaultValue:"This button opens a modal that covers the entire page and contains loans with different due dates, if some of the loans in the modal are renewable you can renew them"},loanListRenewMultipleButtonText:{control:{type:"text"},defaultValue:"Renew several"},loanListStatusBadgeDangerText:{control:{type:"text"},defaultValue:"Expired"},loanListStatusBadgeWarningText:{control:{type:"text"},defaultValue:"Expiring soon"},loanListStatusCircleAriaLabelText:{control:{type:"text"},defaultValue:'{"type":"plural","text":["This material is due in one day","This material is due in @count days"]}'},loanListTitleText:{control:{type:"text"},defaultValue:"Your loans"},loanListToBeDeliveredDigitalMaterialText:{control:{type:"text"},defaultValue:"Due date @date"},loanListToBeDeliveredText:{control:{type:"text"},defaultValue:"Due date @date"},etAlText:{control:{type:"text"},defaultValue:"et al."},materialByAuthorText:{control:{type:"text"},defaultValue:"By"},materialAndAuthorText:{control:{type:"text"},defaultValue:"and"},publizonAudioBookText:{control:{type:"text"},defaultValue:"Audiobook"},publizonEbookText:{control:{type:"text"},defaultValue:"E-book"},publizonPodcastText:{control:{type:"text"},defaultValue:"Podcast"},groupModalHeaderText:{control:{type:"text"},defaultValue:"Renew several"},resultPagerStatusText:{defaultValue:"Showing @itemsShown out of @hitcount loans",control:{type:"text"}},groupModalGoToMaterialAriaLabelText:{defaultValue:"Go to @label material details",control:{type:"text"}}},decorators:[esm.j]},Template=props=>react.createElement(loan_list_entry,props),loan_list_dev_LoanListEntry=Template.bind({});loan_list_dev_LoanListEntry.args={};const{dueDateModal,loanDetails,allLoansId}=(0,modal_helpers.GM)(),LoanListDetailsModal=Template.bind({});LoanListDetailsModal.parameters={query:{modal:`${loanDetails}9562505082`}};const LoanListDueDateModal=Template.bind({});LoanListDueDateModal.parameters={query:{modal:`${dueDateModal}2022-12-15`}};const LoanListRenewLoansModal=Template.bind({});LoanListRenewLoansModal.parameters={query:{modal:allLoansId}}},"./src/apps/loan-list/materials/selectable-material/selectable-material.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>selectable_material});var react=__webpack_require__("./node_modules/react/index.js"),clsx=__webpack_require__("./node_modules/clsx/dist/clsx.mjs"),utils_text=__webpack_require__("./src/core/utils/text.tsx"),material_fetch_hoc=__webpack_require__("./src/apps/loan-list/materials/utils/material-fetch-hoc.tsx"),digital_material_fetch_hoc=__webpack_require__("./src/apps/loan-list/materials/utils/digital-material-fetch-hoc.tsx"),Checkbox=__webpack_require__("./src/components/checkbox/Checkbox.tsx"),authorYear=__webpack_require__("./src/components/author-year/authorYear.tsx"),reservation_info=__webpack_require__("./src/apps/reservation-list/reservation-material/reservation-info.tsx"),ArrowButton=__webpack_require__("./src/components/Buttons/ArrowButton.tsx"),helpers=__webpack_require__("./src/apps/loan-list/utils/helpers.ts");function listId(listItem){var _listItem$reservation;if(null!=listItem&&listItem.reservationIds&&listItem.reservationIds.length>0)return null==listItem||null===(_listItem$reservation=listItem.reservationIds)||void 0===_listItem$reservation?void 0:_listItem$reservation.join("-");if(listItem.loanId)return String(listItem.loanId);if(listItem.identifier)return listItem.identifier;if(listItem.faust)return String(listItem.faust);throw new Error("Unable to determine id for list item")}const selectable_material=(0,digital_material_fetch_hoc.Z)((0,material_fetch_hoc.Z)((({material,disabled,onMaterialChecked,selected,openDetailsModal,item,statusMessageComponentMobile,statusMessageComponentDesktop,statusBadgeComponent,focused,displayedMaterial})=>{const t=(0,utils_text.X)();if(!item)return null;const{authorsShort="",materialType,year="",title="",lang}=material||{},handleOnClick=()=>{openDetailsModal&&openDetailsModal(item)},handleOnKeyUp=e=>{!openDetailsModal||"Enter"!==e.key&&"Space"!==e.key||openDetailsModal(item)};return react.createElement("li",{className:"arrow arrow__hover--right-small"},react.createElement("div",{className:(0,clsx.Z)("list-materials",{"list-materials--disabled":disabled})},onMaterialChecked&&react.createElement("div",{className:"list-materials__checkbox mr-16"},!disabled&&title&&react.createElement(Checkbox.Z,{onChecked:()=>onMaterialChecked(item),id:listId(item),selected,disabled,focused,label:t("groupModalHiddenLabelCheckboxOnMaterialText",{placeholders:{"@label":title}}),hideLabel:!0}),disabled&&react.createElement(Checkbox.Z,{id:listId(item),disabled})),react.createElement("div",{className:"list-materials__content cursor-pointer",onClick:handleOnClick,onKeyUp:handleOnKeyUp,tabIndex:0},react.createElement("div",{className:"list-materials__content-status"},react.createElement("div",{className:"status-label status-label--outline "},materialType)),react.createElement("p",{className:"list-materials__content__header mt-8",lang:lang||""},title),react.createElement("p",{className:"text-small-caption"},react.createElement(authorYear.Z,{author:authorsShort,year}))),react.createElement("div",{className:"list-materials__status pl-4 cursor-pointer",role:"button",onClick:handleOnClick,onKeyUp:handleOnKeyUp,tabIndex:0},statusMessageComponentDesktop,react.createElement("div",null,statusBadgeComponent,statusMessageComponentMobile,displayedMaterial&&react.createElement(reservation_info.Z,{reservationInfo:displayedMaterial,showArrow:!1,showStatusCircleIcon:!1,reservationStatusClassNameOverride:"",isDigital:(0,helpers.u8)(displayedMaterial)}),openDetailsModal&&react.createElement("button",{type:"button",autoFocus:disabled&&focused,className:"list-reservation__note",onClick:()=>openDetailsModal(item),"aria-label":title?t("groupModalGoToMaterialAriaLabelText",{placeholders:{"@label":title}}):""},t("groupModalGoToMaterialText")))),openDetailsModal&&react.createElement("div",{className:"list-materials__arrow",role:"button",onClick:handleOnClick,onKeyUp:handleOnKeyUp,tabIndex:0},react.createElement(ArrowButton.Z,{arrowLabelledBy:listId(item),cursorPointer:!0,clickEventHandler:()=>openDetailsModal(item)}))))})));try{selectablematerial.displayName="selectablematerial",selectablematerial.__docgenInfo={description:"",displayName:"selectablematerial",props:{identifier:{defaultValue:null,description:"",name:"identifier",required:!1,type:{name:"string | null | undefined"}},disabled:{defaultValue:null,description:"",name:"disabled",required:!1,type:{name:"boolean | undefined"}},item:{defaultValue:null,description:"",name:"item",required:!1,type:{name:"Nullable>"}},onMaterialChecked:{defaultValue:null,description:"",name:"onMaterialChecked",required:!1,type:{name:"((listItem: Nullable>) => void) | undefined"}},openDetailsModal:{defaultValue:null,description:"",name:"openDetailsModal",required:!1,type:{name:"((item: Nullable>) => void) | undefined"}},selected:{defaultValue:null,description:"",name:"selected",required:!1,type:{name:"boolean | undefined"}},statusMessageComponentMobile:{defaultValue:null,description:"",name:"statusMessageComponentMobile",required:!0,type:{name:"ReactNode"}},statusMessageComponentDesktop:{defaultValue:null,description:"",name:"statusMessageComponentDesktop",required:!0,type:{name:"ReactNode"}},statusBadgeComponent:{defaultValue:null,description:"",name:"statusBadgeComponent",required:!0,type:{name:"ReactNode"}},focused:{defaultValue:null,description:"",name:"focused",required:!0,type:{name:"boolean"}},displayedMaterial:{defaultValue:null,description:"",name:"displayedMaterial",required:!1,type:{name:"Nullable> | undefined"}},digitalMaterial:{defaultValue:null,description:"",name:"digitalMaterial",required:!1,type:{name:"Product | null | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/loan-list/materials/selectable-material/selectable-material.tsx#selectablematerial"]={docgenInfo:selectablematerial.__docgenInfo,name:"selectablematerial",path:"src/apps/loan-list/materials/selectable-material/selectable-material.tsx#selectablematerial"})}catch(__react_docgen_typescript_loader_error){}},"./src/apps/loan-list/materials/stackable-material/material-info.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_components_author_year_authorYear__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/components/author-year/authorYear.tsx"),_components_cover_cover__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/components/cover/cover.tsx");const __WEBPACK_DEFAULT_EXPORT__=({material,isbnForCover,periodical,openDetailsModal,focused,arrowLabelledBy,children})=>{const{authorsShort,materialType,year,title,description,pid,series,lang}=material||{},coverId=pid||isbnForCover;return react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"list-reservation__material"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",null,react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_cover_cover__WEBPACK_IMPORTED_MODULE_2__.Y,{id:coverId,idType:pid?"pid":"isbn",size:"small",animate:!1,description:description||""})),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"list-reservation__information"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",null,react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"status-label status-label--outline"},materialType)),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"list-reservation__about"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("button",{onClick:()=>openDetailsModal(),type:"button",autoFocus:focused,lang:lang||"",className:"list-reservation__header color-secondary-gray"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("span",{id:arrowLabelledBy,className:"list-reservation__header__text"},title)),react__WEBPACK_IMPORTED_MODULE_0__.createElement("p",{"data-cy":"reservation-about-author",className:"text-small-caption color-secondary-gray"},react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_author_year_authorYear__WEBPACK_IMPORTED_MODULE_1__.Z,{author:authorsShort||"",year:year||""})),periodical&&react__WEBPACK_IMPORTED_MODULE_0__.createElement("p",{"data-cy":"reservation-about-periodical",className:"text-small-caption color-secondary-gray"},periodical),series&&react__WEBPACK_IMPORTED_MODULE_0__.createElement("p",{"data-cy":"reservation-about-series",className:"text-small-caption color-secondary-gray"},series)),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",null,children)))};try{materialinfo.displayName="materialinfo",materialinfo.__docgenInfo={description:"",displayName:"materialinfo",props:{material:{defaultValue:null,description:"",name:"material",required:!0,type:{name:"Nullable>"}},isbnForCover:{defaultValue:null,description:"",name:"isbnForCover",required:!0,type:{name:"string"}},periodical:{defaultValue:null,description:"",name:"periodical",required:!1,type:{name:"string | null | undefined"}},openDetailsModal:{defaultValue:null,description:"",name:"openDetailsModal",required:!0,type:{name:"() => void"}},focused:{defaultValue:null,description:"",name:"focused",required:!0,type:{name:"boolean"}},arrowLabelledBy:{defaultValue:null,description:"",name:"arrowLabelledBy",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/loan-list/materials/stackable-material/material-info.tsx#materialinfo"]={docgenInfo:materialinfo.__docgenInfo,name:"materialinfo",path:"src/apps/loan-list/materials/stackable-material/material-info.tsx#materialinfo"})}catch(__react_docgen_typescript_loader_error){}},"./src/apps/loan-list/materials/utils/digital-material-fetch-hoc.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_core_publizon_publizon__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/core/publizon/publizon.ts"),_core_utils_helpers_list_mapper__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/core/utils/helpers/list-mapper.ts");function _extends(){return _extends=Object.assign?Object.assign.bind():function(target){for(var i=1;i({item,...props})=>{if(item.faust)return react__WEBPACK_IMPORTED_MODULE_0__.createElement(Component,_extends({},props,{item}));if(item.identifier){const[digitalMaterial,setDigitalMaterial]=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(),{data:productsData,isSuccess:isSuccessDigital}=(0,_core_publizon_publizon__WEBPACK_IMPORTED_MODULE_1__.tq)(item.identifier);return(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)((()=>{productsData&&isSuccessDigital&&productsData.product&&setDigitalMaterial((0,_core_utils_helpers_list_mapper__WEBPACK_IMPORTED_MODULE_2__.U9)(productsData.product))}),[productsData,isSuccessDigital]),digitalMaterial?react__WEBPACK_IMPORTED_MODULE_0__.createElement(Component,_extends({},props,{item,material:digitalMaterial})):null}return null};try{digitalmaterialfetchhoc.displayName="digitalmaterialfetchhoc",digitalmaterialfetchhoc.__docgenInfo={description:"",displayName:"digitalmaterialfetchhoc",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/loan-list/materials/utils/digital-material-fetch-hoc.tsx#digitalmaterialfetchhoc"]={docgenInfo:digitalmaterialfetchhoc.__docgenInfo,name:"digitalmaterialfetchhoc",path:"src/apps/loan-list/materials/utils/digital-material-fetch-hoc.tsx#digitalmaterialfetchhoc"})}catch(__react_docgen_typescript_loader_error){}},"./src/apps/loan-list/materials/utils/material-fetch-hoc.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_core_dbc_gateway_generated_graphql__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/core/dbc-gateway/generated/graphql.tsx"),_core_utils_helpers_list_mapper__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/core/utils/helpers/list-mapper.ts");function _extends(){return _extends=Object.assign?Object.assign.bind():function(target){for(var i=1;i({item,...props})=>{if(null!=item&&item.identifier)return react__WEBPACK_IMPORTED_MODULE_0__.createElement(Component,_extends({},props,{item}));if(null!=item&&item.faust){const[material,setMaterial]=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)();let manifestation=null;if(item.reservationIds&&item.reservationIds.length>1){const{isSuccess,data}=(0,_core_dbc_gateway_generated_graphql__WEBPACK_IMPORTED_MODULE_1__.Ch)({faust:item.faust});isSuccess&&null!=data&&data.manifestation&&(manifestation=data.manifestation.ownerWork.manifestations.bestRepresentation)}else{const{isSuccess,data}=(0,_core_dbc_gateway_generated_graphql__WEBPACK_IMPORTED_MODULE_1__.BN)({faust:item.faust});isSuccess&&null!=data&&data.manifestation&&(manifestation=data.manifestation)}return(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)((()=>{manifestation&&setMaterial((0,_core_utils_helpers_list_mapper__WEBPACK_IMPORTED_MODULE_2__.L6)(manifestation))}),[manifestation]),null===manifestation?null:material?react__WEBPACK_IMPORTED_MODULE_0__.createElement(Component,_extends({},props,{item,material})):FallbackComponent?react__WEBPACK_IMPORTED_MODULE_0__.createElement(FallbackComponent,null):null}return null}},"./src/apps/loan-list/materials/utils/status-badge.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_core_utils_helpers_general__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/core/utils/helpers/general.ts"),_core_utils_useLoanThresholds__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/core/utils/useLoanThresholds.tsx");const __WEBPACK_DEFAULT_EXPORT__=({badgeDate,warningText,showBadgeWithDueDate=!1,dangerText,infoText,neutralText})=>{const threshold=(0,_core_utils_useLoanThresholds__WEBPACK_IMPORTED_MODULE_2__.Z)(),daysBetweenTodayAndDue=badgeDate?(0,_core_utils_helpers_general__WEBPACK_IMPORTED_MODULE_1__.q7)(badgeDate):0;return daysBetweenTodayAndDue{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_core_utils_helpers_general__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/core/utils/helpers/general.ts");const __WEBPACK_DEFAULT_EXPORT__=({color,percent,children})=>{const{default:defaultColor}=(0,_core_utils_helpers_general__WEBPACK_IMPORTED_MODULE_1__.EC)(),usedColor=color||defaultColor;return react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"counter",style:{background:`radial-gradient( closest-side, var(--parent-bg-color) calc(100% - 3px), transparent calc(100% - 2px), transparent 0 100% ), conic-gradient(${usedColor} ${percent}%, #DBDBDB 0)`}},children)};try{statuscircleicon.displayName="statuscircleicon",statuscircleicon.__docgenInfo={description:"",displayName:"statuscircleicon",props:{color:{defaultValue:null,description:"",name:"color",required:!1,type:{name:"string | undefined"}},percent:{defaultValue:null,description:"",name:"percent",required:!0,type:{name:"number"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/loan-list/materials/utils/status-circle-icon.tsx#statuscircleicon"]={docgenInfo:statuscircleicon.__docgenInfo,name:"statuscircleicon",path:"src/apps/loan-list/materials/utils/status-circle-icon.tsx#statuscircleicon"})}catch(__react_docgen_typescript_loader_error){}},"./src/apps/loan-list/materials/utils/status-circle.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_check_svg__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/basic/icon-check.svg"),_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_check_svg__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_check_svg__WEBPACK_IMPORTED_MODULE_1__),_status_circle_icon__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/apps/loan-list/materials/utils/status-circle-icon.tsx"),_core_utils_helpers_general__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/core/utils/helpers/general.ts"),_core_utils_text__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/core/utils/text.tsx"),_core_utils_useLoanThresholds__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./src/core/utils/useLoanThresholds.tsx");const __WEBPACK_DEFAULT_EXPORT__=({loanDate,dueDate})=>{const t=(0,_core_utils_text__WEBPACK_IMPORTED_MODULE_4__.X)(),colors=(0,_core_utils_helpers_general__WEBPACK_IMPORTED_MODULE_3__.EC)(),threshold=(0,_core_utils_useLoanThresholds__WEBPACK_IMPORTED_MODULE_5__.Z)();let color=colors.default,percent=100,daysBetweenTodayAndDue=null,daysBetweenLoanAndDue=null;return dueDate?(daysBetweenTodayAndDue=(0,_core_utils_helpers_general__WEBPACK_IMPORTED_MODULE_3__.q7)(dueDate),daysBetweenLoanAndDue=(0,_core_utils_helpers_general__WEBPACK_IMPORTED_MODULE_3__.Sz)(dueDate,loanDate),percent=100-daysBetweenTodayAndDue/daysBetweenLoanAndDue*100,percent<0&&(percent=100),daysBetweenTodayAndDue0?daysBetweenTodayAndDue:0," "),react__WEBPACK_IMPORTED_MODULE_0__.createElement("span",{className:"counter__label color-secondary-gray"},t(1===daysBetweenTodayAndDue?"loanListMaterialDayText":"loanListMaterialDaysText"))),null===daysBetweenTodayAndDue&&null===daysBetweenTodayAndDue&&react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment,null,react__WEBPACK_IMPORTED_MODULE_0__.createElement("img",{className:"counter__icon",src:_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_check_svg__WEBPACK_IMPORTED_MODULE_1___default(),alt:""}),react__WEBPACK_IMPORTED_MODULE_0__.createElement("span",{className:"counter__label"},t("readyForLoanCounterLabelText"))))};try{statuscircle.displayName="statuscircle",statuscircle.__docgenInfo={description:"",displayName:"statuscircle",props:{dueDate:{defaultValue:null,description:"",name:"dueDate",required:!1,type:{name:"string | null | undefined"}},loanDate:{defaultValue:null,description:"",name:"loanDate",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/loan-list/materials/utils/status-circle.tsx#statuscircle"]={docgenInfo:statuscircle.__docgenInfo,name:"statuscircle",path:"src/apps/loan-list/materials/utils/status-circle.tsx#statuscircle"})}catch(__react_docgen_typescript_loader_error){}},"./src/apps/loan-list/materials/utils/warning-bar.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_warning_svg__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/basic/icon-warning.svg"),_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_warning_svg__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_warning_svg__WEBPACK_IMPORTED_MODULE_1__),_components_atoms_links_Link__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/components/atoms/links/Link.tsx"),_components_Buttons_LinkButton__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/components/Buttons/LinkButton.tsx");const __WEBPACK_DEFAULT_EXPORT__=({linkText,overdueText,rightText,rightButtonText,rightButtonAriaLabelText,leftLink,rightLink})=>{const labelId=(0,react__WEBPACK_IMPORTED_MODULE_0__.useId)();return react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"warning-bar bg-global-secondary","data-cy":"warning-bar"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"warning-bar__left"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("img",{className:"warning-bar__icon",src:_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_warning_svg__WEBPACK_IMPORTED_MODULE_1___default(),alt:""}),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",null,react__WEBPACK_IMPORTED_MODULE_0__.createElement("p",{className:"text-body-medium-regular color-primary-black","data-cy":"warning-bar-text"},overdueText,leftLink&&react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_atoms_links_Link__WEBPACK_IMPORTED_MODULE_2__.Z,{href:leftLink,className:"link-tag color-secondary-gray ml-8"},linkText)))),rightText&&react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"warning-bar__right"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("p",{className:"text-body-medium-medium warning-bar__owes","data-cy":"warning-bar-right-text"},rightText),react__WEBPACK_IMPORTED_MODULE_0__.createElement("span",{className:"hide-visually",id:labelId},rightButtonAriaLabelText),rightLink&&react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_Buttons_LinkButton__WEBPACK_IMPORTED_MODULE_3__.Z,{dataCy:"warning-bar-right-link",url:rightLink,size:"small",variant:"filled",ariaLabelledBy:labelId},rightButtonText)))};try{warningbar.displayName="warningbar",warningbar.__docgenInfo={description:"",displayName:"warningbar",props:{linkText:{defaultValue:null,description:"",name:"linkText",required:!1,type:{name:"string | undefined"}},overdueText:{defaultValue:null,description:"",name:"overdueText",required:!1,type:{name:"string | undefined"}},rightButtonText:{defaultValue:null,description:"",name:"rightButtonText",required:!1,type:{name:"string | undefined"}},rightButtonAriaLabelText:{defaultValue:null,description:"",name:"rightButtonAriaLabelText",required:!1,type:{name:"string | undefined"}},rightText:{defaultValue:null,description:"",name:"rightText",required:!1,type:{name:"string | undefined"}},leftLink:{defaultValue:null,description:"",name:"leftLink",required:!1,type:{name:"URL | undefined"}},rightLink:{defaultValue:null,description:"",name:"rightLink",required:!1,type:{name:"URL | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/loan-list/materials/utils/warning-bar.tsx#warningbar"]={docgenInfo:warningbar.__docgenInfo,name:"warningbar",path:"src/apps/loan-list/materials/utils/warning-bar.tsx#warningbar"})}catch(__react_docgen_typescript_loader_error){}},"./src/apps/loan-list/modal/material-details-modal.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Wu:()=>reservationDetailsModalId,ZP:()=>__WEBPACK_DEFAULT_EXPORT__,ae:()=>loanDetailsModalId});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_core_utils_modal__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/core/utils/modal.tsx"),_core_utils_text__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/core/utils/text.tsx"),_core_utils_types_loan_type__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/core/utils/types/loan-type.ts"),_core_utils_helpers_modal_helpers__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/core/utils/helpers/modal-helpers.ts");function reservationDetailsModalId(reservation){return`${String((0,_core_utils_helpers_modal_helpers__WEBPACK_IMPORTED_MODULE_3__.GM)().reservationDetails)}${String(reservation.identifier||reservation.faust)}`}function loanDetailsModalId(loan){return`${String((0,_core_utils_helpers_modal_helpers__WEBPACK_IMPORTED_MODULE_3__.GM)().loanDetails)}${(0,_core_utils_types_loan_type__WEBPACK_IMPORTED_MODULE_4__.e)(loan)}`}const __WEBPACK_DEFAULT_EXPORT__=({modalId,children})=>{const t=(0,_core_utils_text__WEBPACK_IMPORTED_MODULE_2__.X)();return modalId?react__WEBPACK_IMPORTED_MODULE_0__.createElement(_core_utils_modal__WEBPACK_IMPORTED_MODULE_1__.Z,{modalId,classNames:"modal-details",closeModalAriaLabelText:t("materialDetailsCloseModalAriaLabelText"),screenReaderModalDescriptionText:t("materialDetailsModalAriaDescriptionText")},children):null};try{reservationDetailsModalId.displayName="reservationDetailsModalId",reservationDetailsModalId.__docgenInfo={description:"",displayName:"reservationDetailsModalId",props:{dateOfReservation:{defaultValue:null,description:"",name:"dateOfReservation",required:!1,type:{name:"string | null | undefined"}},expiryDate:{defaultValue:null,description:"",name:"expiryDate",required:!1,type:{name:"string | null | undefined"}},pickupDeadline:{defaultValue:null,description:"",name:"pickupDeadline",required:!1,type:{name:"string | null | undefined"}},numberInQueue:{defaultValue:null,description:"",name:"numberInQueue",required:!1,type:{name:"number | null | undefined"}},state:{defaultValue:null,description:"",name:"state",required:!1,type:{name:"string | null | undefined"}},expectedRedeemDateUtc:{defaultValue:null,description:"",name:"expectedRedeemDateUtc",required:!1,type:{name:"string | null | undefined"}},pickupNumber:{defaultValue:null,description:'The reservation number. This is, contrary to the name, a string containing, as an example, "Reserveringshylde 111"',name:"pickupNumber",required:!1,type:{name:"string | null | undefined"}},pickupBranch:{defaultValue:null,description:"",name:"pickupBranch",required:!1,type:{name:"string | null | undefined"}},title:{defaultValue:null,description:"",name:"title",required:!1,type:{name:"string | null | undefined"}},periodical:{defaultValue:null,description:"",name:"periodical",required:!1,type:{name:"string | null | undefined"}},faust:{defaultValue:null,description:"",name:"faust",required:!1,type:{name:"`${number}` | null | undefined"}},identifier:{defaultValue:null,description:"",name:"identifier",required:!1,type:{name:"string | null | undefined"}},reservationIds:{defaultValue:null,description:"",name:"reservationIds",required:!1,type:{name:"number[] | null | undefined"}},loanId:{defaultValue:null,description:"",name:"loanId",required:!1,type:{name:"number | null | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/loan-list/modal/material-details-modal.tsx#reservationDetailsModalId"]={docgenInfo:reservationDetailsModalId.__docgenInfo,name:"reservationDetailsModalId",path:"src/apps/loan-list/modal/material-details-modal.tsx#reservationDetailsModalId"})}catch(__react_docgen_typescript_loader_error){}try{loanDetailsModalId.displayName="loanDetailsModalId",loanDetailsModalId.__docgenInfo={description:"",displayName:"loanDetailsModalId",props:{dueDate:{defaultValue:null,description:"",name:"dueDate",required:!1,type:{name:"string | null | undefined"}},loanDate:{defaultValue:null,description:"",name:"loanDate",required:!1,type:{name:"string | null | undefined"}},periodical:{defaultValue:null,description:"",name:"periodical",required:!1,type:{name:"string | null | undefined"}},isRenewable:{defaultValue:null,description:"",name:"isRenewable",required:!0,type:{name:"boolean"}},materialItemNumber:{defaultValue:null,description:"",name:"materialItemNumber",required:!1,type:{name:"string | null | undefined"}},renewalStatusList:{defaultValue:null,description:"",name:"renewalStatusList",required:!0,type:{name:"string[]"}},loanType:{defaultValue:null,description:"",name:"loanType",required:!0,type:{name:"string | null"}},faust:{defaultValue:null,description:"",name:"faust",required:!1,type:{name:"`${number}` | null | undefined"}},identifier:{defaultValue:null,description:"",name:"identifier",required:!1,type:{name:"string | null | undefined"}},reservationIds:{defaultValue:null,description:"",name:"reservationIds",required:!1,type:{name:"number[] | null | undefined"}},loanId:{defaultValue:null,description:"",name:"loanId",required:!1,type:{name:"number | null | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/loan-list/modal/material-details-modal.tsx#loanDetailsModalId"]={docgenInfo:loanDetailsModalId.__docgenInfo,name:"loanDetailsModalId",path:"src/apps/loan-list/modal/material-details-modal.tsx#loanDetailsModalId"})}catch(__react_docgen_typescript_loader_error){}try{materialdetailsmodal.displayName="materialdetailsmodal",materialdetailsmodal.__docgenInfo={description:"",displayName:"materialdetailsmodal",props:{modalId:{defaultValue:null,description:"",name:"modalId",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/loan-list/modal/material-details-modal.tsx#materialdetailsmodal"]={docgenInfo:materialdetailsmodal.__docgenInfo,name:"materialdetailsmodal",path:"src/apps/loan-list/modal/material-details-modal.tsx#materialdetailsmodal"})}catch(__react_docgen_typescript_loader_error){}},"./src/apps/loan-list/modal/material-details.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>material_details});var react=__webpack_require__("./node_modules/react/index.js"),Reservations=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/Reservations.svg"),Reservations_default=__webpack_require__.n(Reservations),Loans=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/Loans.svg"),Loans_default=__webpack_require__.n(Loans),Ebook=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/Ebook.svg"),Ebook_default=__webpack_require__.n(Ebook),icon_btn_external_link=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/buttons/icon-btn-external-link.svg"),icon_btn_external_link_default=__webpack_require__.n(icon_btn_external_link),utils_text=__webpack_require__("./src/core/utils/text.tsx"),helpers=__webpack_require__("./src/apps/loan-list/utils/helpers.ts"),general=__webpack_require__("./src/core/utils/helpers/general.ts"),status_badge=__webpack_require__("./src/apps/loan-list/materials/utils/status-badge.tsx"),warning_bar=__webpack_require__("./src/apps/loan-list/materials/utils/warning-bar.tsx"),material_fetch_hoc=__webpack_require__("./src/apps/loan-list/materials/utils/material-fetch-hoc.tsx"),digital_material_fetch_hoc=__webpack_require__("./src/apps/loan-list/materials/utils/digital-material-fetch-hoc.tsx"),list_details=__webpack_require__("./src/components/list-details/list-details.tsx"),modal_details_header=__webpack_require__("./src/components/modal-details-header/modal-details-header.tsx"),es=__webpack_require__("./node_modules/react-query/es/index.js"),fbs=__webpack_require__("./src/core/fbs/fbs.ts"),Button=__webpack_require__("./src/components/Buttons/Button.tsx"),renewal=__webpack_require__("./src/core/utils/helpers/renewal.ts");const renew_button=({loanId,renewable,classNames,hideOnMobile,setRenewingStatus,renewingStatus,setRenewingResponse})=>{const t=(0,utils_text.X)(),queryClient=(0,es.useQueryClient)(),{mutate}=(0,fbs.Gb)(),label=(0,renewal.CO)({isRenewable:renewable,renewingStatus,t}),renew=(0,react.useCallback)((renewId=>{setRenewingStatus("pending"),mutate({data:[renewId]},{onSuccess:result=>{result&&(queryClient.invalidateQueries((0,fbs._0)()),setRenewingResponse(result),setRenewingStatus("success"))},onError:()=>{setRenewingStatus("error")}})}),[mutate,queryClient,setRenewingResponse,setRenewingStatus]);return react.createElement("div",{className:`${hideOnMobile&&"modal-details__buttons--hide-on-mobile"} modal-details__buttons`},react.createElement(Button.z,{dataCy:"material-renew-button",size:"small",variant:"filled",disabled:!renewable||"pending"===renewingStatus,onClick:()=>renew(loanId),classNames,label,buttonType:"none",collapsible:!1}))};try{renewbutton.displayName="renewbutton",renewbutton.__docgenInfo={description:"",displayName:"renewbutton",props:{loanId:{defaultValue:null,description:"",name:"loanId",required:!0,type:{name:"number"}},renewable:{defaultValue:null,description:"",name:"renewable",required:!0,type:{name:"boolean"}},classNames:{defaultValue:null,description:"",name:"classNames",required:!1,type:{name:"string | undefined"}},hideOnMobile:{defaultValue:null,description:"",name:"hideOnMobile",required:!0,type:{name:"boolean"}},setRenewingStatus:{defaultValue:null,description:"",name:"setRenewingStatus",required:!0,type:{name:"(status: RequestStatus) => void"}},renewingStatus:{defaultValue:null,description:"",name:"renewingStatus",required:!0,type:{name:"enum",value:[{value:'"success"'},{value:'"error"'},{value:'"idle"'},{value:'"pending"'}]}},setRenewingResponse:{defaultValue:null,description:"",name:"setRenewingResponse",required:!0,type:{name:"(response: RenewedLoanV2[] | null) => void"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/loan-list/modal/renew-button.tsx#renewbutton"]={docgenInfo:renewbutton.__docgenInfo,name:"renewbutton",path:"src/apps/loan-list/modal/renew-button.tsx#renewbutton"})}catch(__react_docgen_typescript_loader_error){}var Link=__webpack_require__("./src/components/atoms/links/Link.tsx"),url=__webpack_require__("./src/core/utils/url.tsx"),RenewalModalMessage=__webpack_require__("./src/components/renewal/RenewalModalMessage.tsx"),date=__webpack_require__("./src/core/utils/helpers/date.ts");const material_details=(0,digital_material_fetch_hoc.Z)((0,material_fetch_hoc.Z)((({loan,material,modalId})=>{const[renewingStatus,setRenewingStatus]=(0,react.useState)("idle"),[renewingResponse,setRenewingResponse]=(0,react.useState)(null),t=(0,utils_text.X)(),u=(0,url.J_)(),ereolenMyPageUrl=u("ereolenMyPageUrl"),viewFeesAndCompensationRatesUrl=u("viewFeesAndCompensationRatesUrl");if(!loan)return null;const{dueDate,faust,loanId,identifier,isRenewable,materialItemNumber,loanDate,periodical}=loan,{authors,materialType,year,title,pid,description,series}=material||{};return react.createElement(react.Fragment,null,!["idle","pending"].includes(renewingStatus)&&react.createElement(RenewalModalMessage.Z,{messageType:"success"===renewingStatus?"success":"error",renewingResponse,modalId,setRenewingStatus,texts:{successTitleText:t("renewMaterialLoanSuccessTitleText"),successStatusText:t("renewMaterialLoanSuccessStatusText"),noRenewalsPossibleErrorTitleText:t("renewMaterialLoanNoRenewalsPossibleErrorTitleText"),noRenewalsPossibleErrorStatusText:t("renewMaterialLoanNoRenewalsPossibleErrorStatusText"),errorTitleText:t("renewMaterialLoanErrorTitleText"),errorStatusText:t("renewMaterialLoanErrorStatusText"),buttonText:t("renewMaterialLoanButtonText")}}),["idle","pending"].includes(renewingStatus)&&react.createElement("div",{className:"modal-details__container"},react.createElement(modal_details_header.Z,{year,authors,title,periodical,series,pid,description,materialType,isbnForCover:identifier||""},dueDate&&react.createElement(status_badge.Z,{showBadgeWithDueDate:!0,badgeDate:dueDate,dangerText:t("materialDetailsOverdueText")})),!(0,helpers.u8)(loan)&&!!faust&&!!loanId&&react.createElement(renew_button,{classNames:"modal-details__buttons modal-details__buttons--hide-on-mobile",loanId,renewable:isRenewable,hideOnMobile:!0,renewingStatus,setRenewingStatus,setRenewingResponse}),(0,helpers.u8)(loan)&&react.createElement("div",{className:"modal-details__buttons modal-details__buttons--hide-on-mobile"},react.createElement(Link.Z,{href:ereolenMyPageUrl,className:"btn-primary btn-filled btn-small arrow__hover--right-small"},t("materialDetailsGoToEreolenText"),react.createElement("img",{src:icon_btn_external_link_default(),className:"btn-icon invert",alt:""}))),dueDate&&(0,general.cf)(dueDate)&&react.createElement("div",{className:"modal-details__warning"},react.createElement(warning_bar.Z,{leftLink:viewFeesAndCompensationRatesUrl,linkText:t("materialDetailsLinkToPageWithFeesText"),overdueText:t("materialDetailsWarningLoanOverdueText")})),react.createElement("div",{className:"modal-details__list"},dueDate&&!(0,helpers.u8)(loan)&&react.createElement(list_details.Z,{icon:Loans_default(),labels:(0,date.p6)(dueDate),title:t("materialDetailsPhysicalDueDateLabelText")}),dueDate&&(0,helpers.u8)(loan)&&react.createElement(list_details.Z,{icon:Loans_default(),labels:(0,date.p6)(dueDate),title:t("materialDetailsDigitalDueDateLabelText")}),loanDate&&react.createElement(list_details.Z,{icon:Reservations_default(),labels:(0,date.p6)(loanDate),title:t("materialDetailsLoanDateLabelText")}),materialItemNumber&&react.createElement(list_details.Z,{icon:Ebook_default(),labels:materialItemNumber,title:t("materialDetailsMaterialNumberLabelText")})),!(0,helpers.u8)(loan)&&!!faust&&!!loanId&&react.createElement(renew_button,{classNames:"modal-details__buttons__full-width",loanId,renewable:isRenewable,hideOnMobile:!1,renewingStatus,setRenewingStatus,setRenewingResponse}),(0,helpers.u8)(loan)&&react.createElement("div",{className:"modal-details__buttons"},react.createElement(Link.Z,{href:ereolenMyPageUrl,className:"btn-primary btn-filled btn-small arrow__hover--right-small modal-details__buttons__full-width"},t("materialDetailsGoToEreolenText"),react.createElement("img",{src:icon_btn_external_link_default(),className:"btn-icon invert",alt:""})))))})));try{materialdetails.displayName="materialdetails",materialdetails.__docgenInfo={description:"",displayName:"materialdetails",props:{loan:{defaultValue:null,description:"",name:"loan",required:!0,type:{name:"LoanType | null"}},modalId:{defaultValue:null,description:"",name:"modalId",required:!0,type:{name:"string"}},digitalMaterial:{defaultValue:null,description:"",name:"digitalMaterial",required:!1,type:{name:"Product | null | undefined"}},item:{defaultValue:null,description:"",name:"item",required:!1,type:{name:"Nullable>"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/loan-list/modal/material-details.tsx#materialdetails"]={docgenInfo:materialdetails.__docgenInfo,name:"materialdetails",path:"src/apps/loan-list/modal/material-details.tsx#materialdetails"})}catch(__react_docgen_typescript_loader_error){}},"./src/apps/loan-list/utils/helpers.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Kp:()=>removeLoansWithDuplicateDueDate,Re:()=>loansAreEmpty,TE:()=>getFromListByKey,li:()=>getStatusText,t4:()=>getStackedItems,u8:()=>isDigital,ug:()=>materialsAreStacked});const removeLoansWithDuplicateDueDate=(date,list)=>list.filter((({dueDate})=>dueDate===date)),loansAreEmpty=list=>Array.isArray(list)&&0===list.length,materialsAreStacked=materialsInStack=>materialsInStack>0,getFromListByKey=(list,key,value)=>list.filter((loan=>String(loan[key])===value)),getStatusText=(status,t)=>{switch(status){case"deniedMaxRenewalsReached":return t("groupModalRenewLoanDeniedMaxRenewalsReachedText");case"deniedReserved":return t("groupModalRenewLoanDeniedReservedText");default:return""}},isDigital=loan=>Boolean(loan.identifier),getStackedItems=(view,list,itemsShown,dueDates)=>{let returnLoans=[];if("stack"===view&&dueDates){let dueDatesCopy=[...dueDates,null];dueDatesCopy=dueDatesCopy.slice(0,itemsShown),dueDatesCopy.forEach((uniqueDueDate=>{returnLoans=returnLoans.concat(list.filter((({dueDate})=>dueDate===uniqueDueDate)))}))}return returnLoans}},"./src/apps/material/helper.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Ft:()=>divideManifestationsByMaterialType,zw:()=>filterManifestationsByType,LJ:()=>getAllIdentifiers,lm:()=>getAvailability,jg:()=>getBestMaterialTypeForWork,UH:()=>getBlacklistedQueryArgs,af:()=>getDbcVerifiedSubjectsFirst,Uo:()=>getDetailsListData,qY:()=>getInfomediaIds,tb:()=>getManifestationAudience,An:()=>getManifestationAuthors,PI:()=>getManifestationContributors,jr:()=>getManifestationEdition,G2:()=>getManifestationGenreAndForm,QL:()=>getManifestationIsbn,hQ:()=>getManifestationLanguageIsoCode,Jl:()=>getManifestationLanguages,I_:()=>getManifestationMaterialTypes,Ey:()=>getManifestationNumberOfPages,sr:()=>getManifestationOriginalTitle,CU:()=>getManifestationPublisher,Oe:()=>getManifestationsOrderByTypeAndYear,qr:()=>getNumberedSeries,Vq:()=>getTotalHoldings,iT:()=>getTotalReservations,xI:()=>getUniqueMovies,WJ:()=>isAnyManifestationAvailableOnBranch,VC:()=>isParallelReservation,Aw:()=>reservationModalId,r0:()=>totalAvailableMaterials,rM:()=>totalBranchesHaveMaterial,Lt:()=>useGetHoldings});var head=__webpack_require__("./node_modules/lodash/head.js"),head_default=__webpack_require__.n(head),uniq=__webpack_require__("./node_modules/lodash/uniq.js"),uniq_default=__webpack_require__.n(uniq),uniqBy=__webpack_require__("./node_modules/lodash/uniqBy.js"),uniqBy_default=__webpack_require__.n(uniqBy),groupBy=__webpack_require__("./node_modules/lodash/groupBy.js"),groupBy_default=__webpack_require__.n(groupBy),compact=__webpack_require__("./node_modules/lodash/compact.js"),compact_default=__webpack_require__.n(compact),general=__webpack_require__("./src/core/utils/helpers/general.ts"),material_type=__webpack_require__("./src/core/utils/types/material-type.ts"),graphql=__webpack_require__("./src/core/dbc-gateway/generated/graphql.tsx"),helper=__webpack_require__("./src/components/material/material-buttons/helper.ts"),fbs=__webpack_require__("./src/core/fbs/fbs.ts");var modal_helpers=__webpack_require__("./src/core/utils/helpers/modal-helpers.ts");const getManifestationsOrderByTypeAndYear=manifestations=>{const orderedByYear=(0,general.T6)(manifestations),materialsMappedBytype=groupBy_default()(orderedByYear,(m=>{var _m$materialTypes$;return(null==m||null===(_m$materialTypes$=m.materialTypes[0])||void 0===_m$materialTypes$?void 0:_m$materialTypes$.specific)??"unknown"}));return Object.keys(materialsMappedBytype).sort().reduce(((acc,key)=>[...acc,...materialsMappedBytype[key]]),[])},filterManifestationsByType=(type,manifestations)=>manifestations.filter((item=>(0,general.cC)([item])===type)),getManifestationPlayingTime=manifestation=>{var _manifestation$physic,_manifestation$physic2;return(null===(_manifestation$physic=manifestation.physicalDescriptions)||void 0===_manifestation$physic||null===(_manifestation$physic2=_manifestation$physic[0])||void 0===_manifestation$physic2?void 0:_manifestation$physic2.playingTime)??""},getManifestationEdition=manifestation=>{var _manifestation$editio;return(null===(_manifestation$editio=manifestation.edition)||void 0===_manifestation$editio?void 0:_manifestation$editio.summary)??""},getManifestationGenreAndForm=manifestation=>manifestation.genreAndForm.join(" / ")??"",getManifestationPublisher=manifestation=>manifestation.publisher.join(" / ")??"",getManifestationMaterialTypes=manifestation=>{var _manifestation$materi;return(null===(_manifestation$materi=manifestation.materialTypes)||void 0===_manifestation$materi?void 0:_manifestation$materi[0].specific)??""},getManifestationNumberOfPages=manifestation=>{var _manifestation$physic3,_manifestation$physic4,_manifestation$physic5;return null!==(_manifestation$physic3=manifestation.physicalDescriptions)&&void 0!==_manifestation$physic3&&null!==(_manifestation$physic4=_manifestation$physic3[0])&&void 0!==_manifestation$physic4&&_manifestation$physic4.numberOfPages?String(null===(_manifestation$physic5=manifestation.physicalDescriptions)||void 0===_manifestation$physic5?void 0:_manifestation$physic5[0].numberOfPages):""},getManifestationAudience=manifestation=>{var _manifestation$audien;return(null===(_manifestation$audien=manifestation.audience)||void 0===_manifestation$audien?void 0:_manifestation$audien.generalAudience[0])??""},getManifestationIsbn=manifestation=>{var _manifestation$identi,_manifestation$identi2;return(null===(_manifestation$identi=manifestation.identifiers)||void 0===_manifestation$identi||null===(_manifestation$identi2=_manifestation$identi[0])||void 0===_manifestation$identi2?void 0:_manifestation$identi2.value)??""},getManifestationLanguages=manifestation=>{var _manifestation$langua,_manifestation$langua2;return(null===(_manifestation$langua=manifestation.languages)||void 0===_manifestation$langua||null===(_manifestation$langua2=_manifestation$langua.main)||void 0===_manifestation$langua2?void 0:_manifestation$langua2.map((language=>language.display)).join(", "))??""},getManifestationLanguageIsoCode=manifestations=>{var _head2;const mainLanguages=manifestations.map((({languages})=>languages)).flatMap((language=>null==language?void 0:language.main)),uniqueLanguagesWithIsoCode=uniqBy_default()(mainLanguages,"isoCode"),uniqIsoCode=1===uniqueLanguagesWithIsoCode.length&&(null===(_head2=head_default()(uniqueLanguagesWithIsoCode))||void 0===_head2?void 0:_head2.isoCode);if(uniqIsoCode)return uniqIsoCode},getManifestationOriginalTitle=manifestation=>{var _manifestation$titles,_manifestation$titles2;return(null===(_manifestation$titles=manifestation.titles)||void 0===_manifestation$titles||null===(_manifestation$titles2=_manifestation$titles.original)||void 0===_manifestation$titles2?void 0:_manifestation$titles2[0])??""},getManifestationContributors=manifestation=>manifestation.contributors.map((contributor=>contributor.display)).join(" / ")??"",getManifestationAuthors=manifestation=>(0,general.TG)(manifestation.creators).join(", ")??"",getDetailsListData=({manifestation,work,t})=>{const workFirstEditionYear=(work=>{var _work$workYear;return null!==(_work$workYear=work.workYear)&&void 0!==_work$workYear&&_work$workYear.year?String(work.workYear.year):""})(work),fallBackManifestation=((work,type)=>work.manifestations[type])(work,"bestRepresentation");return[{label:t("detailsListLanguageText"),value:getManifestationLanguages(manifestation??fallBackManifestation),type:"standard"},{label:t("detailsListPlayTimeText"),value:getManifestationPlayingTime(manifestation??fallBackManifestation),type:"standard"},{label:t("detailsListEditionText"),value:getManifestationEdition(manifestation??fallBackManifestation),type:"standard"},{label:t("detailsListGenreAndFormText"),value:getManifestationGenreAndForm(manifestation??fallBackManifestation),type:"standard"},{label:t("detailsListOriginalTitleText"),value:getManifestationOriginalTitle(manifestation??fallBackManifestation),type:"standard"},{label:t("detailsListPublisherText"),value:getManifestationPublisher(manifestation??fallBackManifestation),type:"standard"},{label:t("detailsListFirstEditionYearText"),value:workFirstEditionYear,type:"standard"},{label:t("detailsListTypeText"),value:getManifestationMaterialTypes(manifestation??fallBackManifestation),type:"standard"},{label:t("detailsListContributorsText"),value:getManifestationContributors(manifestation??fallBackManifestation),type:"link"},{label:t("detailsListScopeText"),value:getManifestationNumberOfPages(manifestation??fallBackManifestation),type:"standard"},{label:t("detailsListAudienceText"),value:getManifestationAudience(manifestation??fallBackManifestation),type:"standard"}]},getTotalHoldings=holdings=>holdings.reduce(((acc,curr)=>acc+curr.holdings.reduce(((accumulator,current)=>accumulator+current.materials.length),0)),0),getTotalReservations=holdings=>holdings.reduce(((acc,curr)=>acc+curr.reservations),0),totalAvailableMaterials=materials=>materials.reduce(((acc,curr)=>curr.available?acc+1:acc),0),isAnyManifestationAvailableOnBranch=libraryBranches=>libraryBranches.some((libraryBranch=>libraryBranch.holding.materials.some((material=>material.available)))),totalBranchesHaveMaterial=manifestationHoldings=>manifestationHoldings.filter((branchManifestationHoldings=>isAnyManifestationAvailableOnBranch(branchManifestationHoldings))).length,getInfomediaIds=manifestations=>{const infomediaIds=manifestations.map((manifestation=>manifestation.access.map((currentAccess=>"InfomediaService"===currentAccess.__typename?currentAccess.id:null)))).flat();return compact_default()(infomediaIds)},divideManifestationsByMaterialType=manifestations=>manifestations.reduce(((result,manifestation)=>{if(!manifestation.materialTypes.length||!manifestation.materialTypes[0].specific)return result;const type=manifestation.materialTypes[0].specific;return{...result,[type]:[...result[type]??[],manifestation]}}),{}),getAllIdentifiers=manifestations=>manifestations.map((manifestation=>manifestation.identifiers.map((identifier=>identifier.value)))).flat(),isABook=manifestations=>manifestations.some((manifestation=>manifestation.materialTypes.some((materialType=>materialType.specific.toLowerCase()===material_type.XK.book)))),getBestMaterialTypeForManifestation=manifestation=>isABook([manifestation])?material_type.XK.book:manifestation.materialTypes[0].specific,getBestMaterialTypeForWork=work=>{return work.manifestations.bestRepresentation?getBestMaterialTypeForManifestation(work.manifestations.bestRepresentation):work.manifestations.latest?getBestMaterialTypeForManifestation(work.manifestations.latest):work.manifestations.first?getBestMaterialTypeForManifestation(work.manifestations.first):isABook(work.manifestations.all)?material_type.XK.book:(manifestations=work.manifestations.all,manifestations.filter((manifestation=>manifestation.materialTypes.length>0)))[0].materialTypes[0].specific;var manifestations},reservationModalId=faustIds=>(0,modal_helpers.V$)("reservation-modal",faustIds.sort()),getNumberedSeries=series=>series.filter((seriesEntry=>{var _seriesEntry$numberIn;return null===(_seriesEntry$numberIn=seriesEntry.numberInSeries)||void 0===_seriesEntry$numberIn?void 0:_seriesEntry$numberIn.number})),getUniqueMovies=relations=>{const movies=relations.hasAdaptation.filter((item=>item.ownerWork.workTypes.includes(graphql.Lc.Movie)));return uniqBy_default()(movies,(item=>item.ownerWork.workId))},getDbcVerifiedSubjectsFirst=subjects=>uniq_default()([...subjects.dbcVerified.map((item=>item.display)),...subjects.all.map((item=>item.display))]),isParallelReservation=manifestations=>manifestations.length>1&&(0,helper.ie)(graphql.U5.Physical,manifestations)&&!(0,helper.g0)(manifestations),getBlacklistedQueryArgs=(faustIds,config,blacklist)=>{const blacklistBranches=config("availability"===blacklist?"blacklistedAvailabilityBranchesConfig":"blacklistedPickupBranchesConfig",{transformer:"stringToArray"});return{recordid:faustIds,...blacklistBranches?{exclude:blacklistBranches}:{}}},getAvailability=async({faustIds,config})=>(0,fbs.AG)(getBlacklistedQueryArgs(faustIds,config,"availability")),useGetHoldings=({faustIds,config,options})=>{const{data,isLoading,isError}=(0,fbs.T8)(getBlacklistedQueryArgs(faustIds,config,"pickup"),options);return{data,isLoading,isError}}},"./src/apps/material/material.dev.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Default:()=>Default,Digital:()=>Digital,Dinosaurierfedern:()=>Dinosaurierfedern,EBogBlaTitle:()=>EBogBlaTitle,EBogPrinsenHarry:()=>EBogPrinsenHarry,HarryPotter:()=>HarryPotter,Infomedia:()=>Infomedia,InstantLoan:()=>material_dev_InstantLoan,LangePeter:()=>LangePeter,Periodical:()=>Periodical,TurenGårTilRom:()=>TurenGårTilRom,Underverden:()=>Underverden,default:()=>material_dev,overbygningsMatriale:()=>overbygningsMatriale});var react=__webpack_require__("./node_modules/react/index.js"),serviceUrlArgs=__webpack_require__("./src/core/storybook/serviceUrlArgs.ts"),guarded_app=__webpack_require__("./src/components/guarded-app.tsx"),utils_config=__webpack_require__("./src/core/utils/config.tsx"),utils_text=__webpack_require__("./src/core/utils/text.tsx"),url=__webpack_require__("./src/core/utils/url.tsx"),Various=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/Various.svg"),Various_default=__webpack_require__.n(Various),Create=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/Create.svg"),Create_default=__webpack_require__.n(Create),Receipt=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/Receipt.svg"),Receipt_default=__webpack_require__.n(Receipt),useDeepCompareEffect=__webpack_require__("./node_modules/react-use/esm/useDeepCompareEffect.js"),graphql=__webpack_require__("./src/core/dbc-gateway/generated/graphql.tsx"),helper=__webpack_require__("./src/apps/material/helper.ts"),lazy_load=__webpack_require__("./src/core/utils/helpers/lazy-load.ts"),helpers_url=__webpack_require__("./src/core/utils/helpers/url.ts"),HorizontalTermLine=__webpack_require__("./src/components/horizontal-term-line/HorizontalTermLine.tsx"),general=__webpack_require__("./src/core/utils/helpers/general.ts");const MaterialDescription=({work})=>{const{itemRef,hasBeenVisible:showItem}=(0,lazy_load.L)(),t=(0,utils_text.X)(),u=(0,url.J_)(),searchUrl=u("searchUrl"),materialUrl=u("materialUrl"),{fictionNonfiction,series,subjects,seriesMembers,relations,dk5MainEntry}=work,isFiction=(0,general.bV)(work),seriesList=(0,helper.qr)(series),seriesMembersList=seriesMembers.map((item=>({url:(0,helpers_url.WO)(materialUrl,item.workId),term:item.titles.main[0]}))),subjectsList=(0,helper.af)(subjects).map((item=>({url:(0,helpers_url.Nt)(searchUrl,item),term:item}))),filmAdaptationsList=(0,helper.xI)(relations).map((item=>({url:(0,helpers_url.WO)(materialUrl,item.ownerWork.workId),term:item.ownerWork.titles.main[0]}))),fictionNonfictionList=fictionNonfiction?[{url:(0,helpers_url.Nt)(searchUrl,fictionNonfiction.display),term:fictionNonfiction.display}]:[];return react.createElement("section",{ref:itemRef,className:"material-description","data-cy":"material-description"},showItem&&react.createElement(react.Fragment,null,react.createElement("h2",{className:"text-header-h4 pb-24"},t("descriptionHeadlineText")),work.abstract&&react.createElement("p",{className:"text-body-large material-description__content"},work.abstract[0]),react.createElement("div",{className:"material-description__links mt-32"},!isFiction&&dk5MainEntry&&react.createElement(HorizontalTermLine.Z,{title:t("subjectNumberText"),linkList:[{url:(0,helpers_url.Nt)(searchUrl,dk5MainEntry.display),term:dk5MainEntry.display}]}),seriesList.map(((item,i)=>{var _item$numberInSeries;return react.createElement(HorizontalTermLine.Z,{title:`${t("numberDescriptionText")} ${null===(_item$numberInSeries=item.numberInSeries)||void 0===_item$numberInSeries?void 0:_item$numberInSeries.number}`,subTitle:t("inSeriesText"),linkList:[{url:(0,helpers_url.Nt)(searchUrl,item.title),term:item.title}],dataCy:`material-description-series-${i}`})})),react.createElement(HorizontalTermLine.Z,{title:t("inSameSeriesText"),linkList:seriesMembersList,dataCy:"material-description-series-members"}),react.createElement(HorizontalTermLine.Z,{title:t("identifierText"),linkList:subjectsList,dataCy:"material-description-identifier"}),react.createElement(HorizontalTermLine.Z,{title:t("fictionNonfictionText"),linkList:fictionNonfictionList,dataCy:"material-description-fiction-nonfiction"}),react.createElement(HorizontalTermLine.Z,{title:t("filmAdaptationsText"),linkList:filmAdaptationsList,dataCy:"material-description-film-adaptations"}))))},material_MaterialDescription=MaterialDescription;try{MaterialDescription.displayName="MaterialDescription",MaterialDescription.__docgenInfo={description:"",displayName:"MaterialDescription",props:{pid:{defaultValue:null,description:"",name:"pid",required:!0,type:{name:"`${number}-${string}:${number}`"}},work:{defaultValue:null,description:"",name:"work",required:!0,type:{name:"Work"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/MaterialDescription.tsx#MaterialDescription"]={docgenInfo:MaterialDescription.__docgenInfo,name:"MaterialDescription",path:"src/components/material/MaterialDescription.tsx#MaterialDescription"})}catch(__react_docgen_typescript_loader_error){}__webpack_require__("./node_modules/dayjs/dayjs.min.js"),__webpack_require__("./node_modules/dayjs/plugin/customParseFormat.js");var LinkNoStyle=__webpack_require__("./src/components/atoms/links/LinkNoStyle.tsx");const usDateStringToDateObj=date=>(dayjs.extend(customParseFormat),dayjs(date,"YYYY-MM-DD").toDate()),ReviewMetadata=({author,date,publication,url})=>{const metaDataText=(returnAuthor,returnHost,returnDate)=>{const authorText=returnAuthor||"",hostText=returnHost||"";return`\n ${authorText}${authorText&&hostText?" - ":""}${hostText}${returnDate&&`, ${returnDate}`}\n `};return url?react.createElement(LinkNoStyle.Z,{url,className:"link-tag text-small-caption mb-8"},metaDataText(author,publication,date)):react.createElement("div",{className:"review__meta mb-8"},metaDataText(author,publication,date))},material_ReviewMetadata=ReviewMetadata;try{usDateStringToDateObj.displayName="usDateStringToDateObj",usDateStringToDateObj.__docgenInfo={description:"",displayName:"usDateStringToDateObj",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/ReviewMetadata.tsx#usDateStringToDateObj"]={docgenInfo:usDateStringToDateObj.__docgenInfo,name:"usDateStringToDateObj",path:"src/components/material/ReviewMetadata.tsx#usDateStringToDateObj"})}catch(__react_docgen_typescript_loader_error){}try{ReviewMetadata.displayName="ReviewMetadata",ReviewMetadata.__docgenInfo={description:"",displayName:"ReviewMetadata",props:{author:{defaultValue:null,description:"",name:"author",required:!1,type:{name:"string | null | undefined"}},date:{defaultValue:null,description:"",name:"date",required:!1,type:{name:"string | null | undefined"}},publication:{defaultValue:null,description:"",name:"publication",required:!1,type:{name:"string | null | undefined"}},url:{defaultValue:null,description:"",name:"url",required:!1,type:{name:"URL | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/ReviewMetadata.tsx#ReviewMetadata"]={docgenInfo:ReviewMetadata.__docgenInfo,name:"ReviewMetadata",path:"src/components/material/ReviewMetadata.tsx#ReviewMetadata"})}catch(__react_docgen_typescript_loader_error){}var icon_heart_filled=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/basic/icon-heart-filled.svg"),icon_heart_filled_default=__webpack_require__.n(icon_heart_filled),icon_heart_grey=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/basic/icon-heart-grey.svg"),icon_heart_grey_default=__webpack_require__.n(icon_heart_grey);const ReviewHearts=({amountOfHearts})=>{const t=(0,utils_text.X)(),heartArray=amountOfHearts.split("/"),filledHeartsArray=Array.from({length:Number(heartArray[0])},((_,i)=>i+1)),emptyHeartsArray=Array.from({length:Number(heartArray[1])-Number(heartArray[0])},((_,i)=>i+1)),ariaLabel=t("ratingIsText",{placeholders:{"@heartCount":filledHeartsArray.length,"@numberOfHeartsPossible":heartArray[1]}});return react.createElement("div",{className:"mb-4",role:"figure","aria-label":ariaLabel},filledHeartsArray.map((()=>react.createElement("img",{src:icon_heart_filled_default(),className:"review__heart",alt:""}))),emptyHeartsArray.map((()=>react.createElement("img",{src:icon_heart_grey_default(),className:"review__heart",alt:""}))))},material_ReviewHearts=ReviewHearts;try{ReviewHearts.displayName="ReviewHearts",ReviewHearts.__docgenInfo={description:"",displayName:"ReviewHearts",props:{amountOfHearts:{defaultValue:null,description:"",name:"amountOfHearts",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/ReviewHearts.tsx#ReviewHearts"]={docgenInfo:ReviewHearts.__docgenInfo,name:"ReviewHearts",path:"src/components/material/ReviewHearts.tsx#ReviewHearts"})}catch(__react_docgen_typescript_loader_error){}var Link=__webpack_require__("./src/components/atoms/links/Link.tsx");const ReviewExternal=({review:{workYear,dateFirstEdition,creators,review,access,edition,hostPublication},dataCy="review-external"})=>{const date=(0,general.He)(dateFirstEdition,workYear,edition),authors=(0,general.Qe)(creators),publication=(0,general.lT)(hostPublication),accessUrls=access.filter((accessItem=>"AccessUrl"===accessItem.__typename));return react.createElement("li",{className:"review text-small-caption","data-cy":dataCy},(authors||date||publication)&&react.createElement(material_ReviewMetadata,{author:authors,date,publication}),(null==review?void 0:review.rating)&&react.createElement(material_ReviewHearts,{amountOfHearts:review.rating}),accessUrls&&accessUrls.map((({url,origin},index)=>react.createElement(react.Fragment,null,react.createElement("span",null,index>0?", ":""),react.createElement(Link.Z,{href:new URL(url),className:"link-tag text-small-caption mb-8"},origin)))))},material_ReviewExternal=ReviewExternal;try{ReviewExternal.displayName="ReviewExternal",ReviewExternal.__docgenInfo={description:"",displayName:"ReviewExternal",props:{review:{defaultValue:null,description:"",name:"review",required:!0,type:{name:"ReviewManifestation"}},dataCy:{defaultValue:{value:"review-external"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/ReviewExternal.tsx#ReviewExternal"]={docgenInfo:ReviewExternal.__docgenInfo,name:"ReviewExternal",path:"src/components/material/ReviewExternal.tsx#ReviewExternal"})}catch(__react_docgen_typescript_loader_error){}const useScrollToLocation=dependency=>{const[scrolledAlready,setScrolledAlready]=(0,react.useState)(!1),urlAnchor=window.location.hash;(0,react.useEffect)((()=>{if(urlAnchor&&!scrolledAlready){const anchorId=urlAnchor.replace("#",""),element=document.getElementById(anchorId);element&&(element.scrollIntoView({behavior:"smooth"}),setScrolledAlready(!0))}}),[urlAnchor,dependency,scrolledAlready])};try{useScrollToLocation.displayName="useScrollToLocation",useScrollToLocation.__docgenInfo={description:"",displayName:"useScrollToLocation",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/utils/UseScrollToLocation.tsx#useScrollToLocation"]={docgenInfo:useScrollToLocation.__docgenInfo,name:"useScrollToLocation",path:"src/core/utils/UseScrollToLocation.tsx#useScrollToLocation"})}catch(__react_docgen_typescript_loader_error){}var Button=__webpack_require__("./src/components/Buttons/Button.tsx");const ReviewInfomedia=({review:{workYear,dateFirstEdition,access,creators,review,edition,hostPublication},dataCy="review-infomedia"})=>{var _infomedia$article,_infomedia$article2,_infomedia$article3;const t=(0,utils_text.X)(),authUrl=(0,url.J_)()("authUrl"),date=(0,general.He)(dateFirstEdition,workYear,edition),authors=(0,general.Qe)(creators),publication=(0,general.lT)(hostPublication),infomediaId=access.filter((accessItem=>"InfomediaService"===accessItem.__typename))[0].id,{data,error}=(0,graphql.Dv)({id:infomediaId});if(useScrollToLocation(data),error)return null;if(!data)return null;const{infomedia}=data;if(infomedia.error)return react.createElement("li",{className:"review text-small-caption","data-cy":dataCy},(authors||date||publication)&&react.createElement(material_ReviewMetadata,{author:authors,date,publication}),(null==review?void 0:review.rating)&&react.createElement(material_ReviewHearts,{amountOfHearts:review.rating}),react.createElement("div",{className:"review__headline mb-8"},"BORROWER_NOT_LOGGED_IN"===infomedia.error?react.createElement(Button.z,{label:t("loginToSeeReviewText"),buttonType:"none",disabled:!1,collapsible:!1,size:"xsmall",variant:"outline",onClick:()=>{(reviewId=>{const returnUrl=(0,helpers_url.uW)({disclosure:"disclosure-reviews"});returnUrl.hash=reviewId,(0,helpers_url.hN)({authUrl,returnUrl})})(infomediaId)}}):t("cantViewReviewText")));const accessUrls=access.filter((accessItem=>"AccessUrl"===accessItem.__typename));return react.createElement("li",{className:"review text-small-caption",id:infomediaId},(authors||date||publication)&&react.createElement(material_ReviewMetadata,{author:authors,date,publication}),(null==review?void 0:review.rating)&&react.createElement(material_ReviewHearts,{amountOfHearts:review.rating}),(null===(_infomedia$article=infomedia.article)||void 0===_infomedia$article?void 0:_infomedia$article.headLine)&&react.createElement("h3",{className:"review__headline mb-8"},infomedia.article.headLine),(null===(_infomedia$article2=infomedia.article)||void 0===_infomedia$article2?void 0:_infomedia$article2.text)&&react.createElement("p",{className:"review__body mb-8",dangerouslySetInnerHTML:{__html:null===(_infomedia$article3=infomedia.article)||void 0===_infomedia$article3?void 0:_infomedia$article3.text}}),access.some((a=>"AccessUrl"===a.__typename))&&(0,helpers_url.pM)(accessUrls[0].url)&&react.createElement(material_ReviewMetadata,{author:authors,date,url:new URL(accessUrls[0].url)}))},material_ReviewInfomedia=ReviewInfomedia;try{ReviewInfomedia.displayName="ReviewInfomedia",ReviewInfomedia.__docgenInfo={description:"",displayName:"ReviewInfomedia",props:{review:{defaultValue:null,description:"",name:"review",required:!0,type:{name:"ReviewManifestation"}},dataCy:{defaultValue:{value:"review-infomedia"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/ReviewInfomedia.tsx#ReviewInfomedia"]={docgenInfo:ReviewInfomedia.__docgenInfo,name:"ReviewInfomedia",path:"src/components/material/ReviewInfomedia.tsx#ReviewInfomedia"})}catch(__react_docgen_typescript_loader_error){}const ReviewLibrarian=({review:{workYear,dateFirstEdition,creators,review,edition,hostPublication},dataCy="review-librarian"})=>{const date=(0,general.He)(dateFirstEdition,workYear,edition),authors=(0,general.Qe)(creators),publication=(0,general.lT)(hostPublication);return react.createElement("li",{className:"review text-small-caption","data-cy":dataCy},(authors||date||publication)&&react.createElement(material_ReviewMetadata,{author:authors,date,publication}),(null==review?void 0:review.reviewByLibrarians)&&review.reviewByLibrarians.map((librarianReview=>react.createElement(react.Fragment,null,(null==librarianReview?void 0:librarianReview.heading)&&react.createElement("h3",{className:"review__headline mb-8"},librarianReview.heading),(null==librarianReview?void 0:librarianReview.content)&&react.createElement("div",{className:"review__body mb-8"},librarianReview.content)))))},material_ReviewLibrarian=ReviewLibrarian;try{ReviewLibrarian.displayName="ReviewLibrarian",ReviewLibrarian.__docgenInfo={description:"",displayName:"ReviewLibrarian",props:{review:{defaultValue:null,description:"",name:"review",required:!0,type:{name:"ReviewManifestation"}},dataCy:{defaultValue:{value:"review-librarian"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/ReviewLibrarian.tsx#ReviewLibrarian"]={docgenInfo:ReviewLibrarian.__docgenInfo,name:"ReviewLibrarian",path:"src/components/material/ReviewLibrarian.tsx#ReviewLibrarian"})}catch(__react_docgen_typescript_loader_error){}const ReviewSkeleton=()=>react.createElement("div",{className:"ssc my-48 mx-32"},react.createElement("div",{className:"ssc-head-line w-40 my-8"}),react.createElement("div",{className:"ssc-line my-8"}),react.createElement("div",{className:"ssc-line my-8"})),material_ReviewSkeleton=ReviewSkeleton;try{ReviewSkeleton.displayName="ReviewSkeleton",ReviewSkeleton.__docgenInfo={description:"",displayName:"ReviewSkeleton",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/ReviewSkeleton.tsx#ReviewSkeleton"]={docgenInfo:ReviewSkeleton.__docgenInfo,name:"ReviewSkeleton",path:"src/components/material/ReviewSkeleton.tsx#ReviewSkeleton"})}catch(__react_docgen_typescript_loader_error){}const MaterialReviews=({pids,dataCy="material-reviews"})=>{const{data,isLoading}=(0,graphql.f8)({pid:pids});if(isLoading)return react.createElement(material_ReviewSkeleton,null);if(!data)return null;const{manifestations:reviews}=data;return react.createElement("ul",{className:"reviews","data-cy":dataCy},reviews.map((review=>review?((reviewType,review)=>{switch(reviewType){case null:default:return null;case"infomedia":return react.createElement(material_ReviewInfomedia,{review,dataCy:`${dataCy}-infomedia`});case"external":return react.createElement(material_ReviewExternal,{review,dataCy:`${dataCy}-external`});case"librarian":return react.createElement(material_ReviewLibrarian,{review,dataCy:`${dataCy}-librarian`})}})((review=>null!=review&&review.access.some((access=>"InfomediaService"===access.__typename))?"infomedia":null!=review&&review.access.some((access=>"AccessUrl"===access.__typename))?"external":null!=review&&review.access.some((access=>"InterLibraryLoan"===access.__typename))?"librarian":null)(review),review):null)))};try{MaterialReviews.displayName="MaterialReviews",MaterialReviews.__docgenInfo={description:"",displayName:"MaterialReviews",props:{pids:{defaultValue:null,description:"",name:"pids",required:!0,type:{name:"`${number}-${string}:${number}`[]"}},dataCy:{defaultValue:{value:"material-reviews"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/MaterialReviews.tsx#MaterialReviews"]={docgenInfo:MaterialReviews.__docgenInfo,name:"MaterialReviews",path:"src/components/material/MaterialReviews.tsx#MaterialReviews"})}catch(__react_docgen_typescript_loader_error){}var ExpandMore=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/ExpandMore.svg"),ExpandMore_default=__webpack_require__.n(ExpandMore),availability_label=__webpack_require__("./src/components/availability-label/availability-label.tsx"),cover=__webpack_require__("./src/components/cover/cover.tsx");const description_list=({data,classNames,id})=>react.createElement("dl",{id,className:`list-description ${classNames??""}`},data.map((item=>{const{label,value}=item;return react.createElement("div",null,react.createElement("dt",null,label),react.createElement("dd",null,value))})));try{descriptionlist.displayName="descriptionlist",descriptionlist.__docgenInfo={description:"",displayName:"descriptionlist",props:{classNames:{defaultValue:null,description:"",name:"classNames",required:!1,type:{name:"string | undefined"}},data:{defaultValue:null,description:"",name:"data",required:!0,type:{name:"{ label: string; value: ReactNode; }[]"}},id:{defaultValue:null,description:"",name:"id",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/description-list/description-list.tsx#descriptionlist"]={docgenInfo:descriptionlist.__docgenInfo,name:"descriptionlist",path:"src/components/description-list/description-list.tsx#descriptionlist"})}catch(__react_docgen_typescript_loader_error){}const MaterialDetailsList=({data,className,id})=>{const listData=data.filter((item=>item.value)).map((item=>{const{label,value,type}=item;return{label,value:"link"===type?react.createElement("span",{className:"link-tag pr-4"},value):react.createElement("span",null,value)}}));return react.createElement(description_list,{id,data:listData,classNames:className})},material_MaterialDetailsList=MaterialDetailsList;try{MaterialDetailsList.displayName="MaterialDetailsList",MaterialDetailsList.__docgenInfo={description:"",displayName:"MaterialDetailsList",props:{className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string | undefined"}},data:{defaultValue:null,description:"",name:"data",required:!0,type:{name:"ListData"}},id:{defaultValue:null,description:"",name:"id",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/MaterialDetailsList.tsx#MaterialDetailsList"]={docgenInfo:MaterialDetailsList.__docgenInfo,name:"MaterialDetailsList",path:"src/components/material/MaterialDetailsList.tsx#MaterialDetailsList"})}catch(__react_docgen_typescript_loader_error){}var material_buttons_helper=__webpack_require__("./src/components/material/material-buttons/helper.ts"),InvalidUrlError=__webpack_require__("./src/core/errors/InvalidUrlError.ts"),statistics=__webpack_require__("./src/core/statistics/statistics.ts"),useStatistics=__webpack_require__("./src/core/statistics/useStatistics.ts"),modal=__webpack_require__("./src/core/utils/modal.tsx");const createDigitalModalId=id=>`digital-modal-${id}`;var MaterialButtonLoading=__webpack_require__("./src/components/material/material-buttons/generic/MaterialButtonLoading.tsx");const MaterialButtonDisabled=({label,reason,size,dataCy="material-header-buttons-cant-reserve"})=>react.createElement(react.Fragment,null,react.createElement(Button.z,{label,buttonType:"none",variant:"filled",disabled:!0,collapsible:!1,size:size||"large",dataCy}),reason&&react.createElement("p",{className:"text-small-caption mt-16",role:"alert"},reason)),generic_MaterialButtonDisabled=MaterialButtonDisabled;try{MaterialButtonDisabled.displayName="MaterialButtonDisabled",MaterialButtonDisabled.__docgenInfo={description:"",displayName:"MaterialButtonDisabled",props:{label:{defaultValue:null,description:"",name:"label",required:!0,type:{name:"string"}},reason:{defaultValue:null,description:"",name:"reason",required:!1,type:{name:"string | undefined"}},size:{defaultValue:null,description:"",name:"size",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"xsmall"'},{value:'"small"'},{value:'"medium"'},{value:'"large"'},{value:'"xlarge"'}]}},dataCy:{defaultValue:{value:"material-header-buttons-cant-reserve"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/material-buttons/generic/MaterialButtonDisabled.tsx#MaterialButtonDisabled"]={docgenInfo:MaterialButtonDisabled.__docgenInfo,name:"MaterialButtonDisabled",path:"src/components/material/material-buttons/generic/MaterialButtonDisabled.tsx#MaterialButtonDisabled"})}catch(__react_docgen_typescript_loader_error){}var user=__webpack_require__("./src/core/utils/helpers/user.ts");const MaterialButtonOnlineDigitalArticle=({pid,size,dataCy="material-button-online-digital-article"})=>{const t=(0,utils_text.X)(),authUrl=(0,url.J_)()("authUrl"),[isUserResident,setIsUserResident]=(0,react.useState)(null),{isLoading,data:userData}=(0,user.dp)(),{openGuarded}=(0,modal.f)();(0,useDeepCompareEffect.Z)((()=>{userData&&userData.patron&&setIsUserResident((0,user.aE)(null==userData?void 0:userData.patron))}),[userData]);return isLoading?react.createElement(MaterialButtonLoading.Z,null):!1===isUserResident?react.createElement(generic_MaterialButtonDisabled,{label:t("cantViewText"),reason:t("notLivingInMunicipalityText"),size}):react.createElement(Button.z,{label:t("orderDigitalCopyButtonText"),buttonType:"none",variant:"filled",disabled:!1,collapsible:!1,size:size||"large",onClick:()=>{openGuarded({authUrl,modalId:createDigitalModalId(pid)})},dataCy})},online_MaterialButtonOnlineDigitalArticle=MaterialButtonOnlineDigitalArticle;try{MaterialButtonOnlineDigitalArticle.displayName="MaterialButtonOnlineDigitalArticle",MaterialButtonOnlineDigitalArticle.__docgenInfo={description:"",displayName:"MaterialButtonOnlineDigitalArticle",props:{pid:{defaultValue:null,description:"",name:"pid",required:!0,type:{name:"`${number}-${string}:${number}`"}},size:{defaultValue:null,description:"",name:"size",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"xsmall"'},{value:'"small"'},{value:'"medium"'},{value:'"large"'},{value:'"xlarge"'}]}},dataCy:{defaultValue:{value:"material-button-online-digital-article"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/material-buttons/online/MaterialButtonOnlineDigitalArticle.tsx#MaterialButtonOnlineDigitalArticle"]={docgenInfo:MaterialButtonOnlineDigitalArticle.__docgenInfo,name:"MaterialButtonOnlineDigitalArticle",path:"src/components/material/material-buttons/online/MaterialButtonOnlineDigitalArticle.tsx#MaterialButtonOnlineDigitalArticle"})}catch(__react_docgen_typescript_loader_error){}var dpl_cms=__webpack_require__("./src/core/dpl-cms/dpl-cms.ts"),material_type=__webpack_require__("./src/core/utils/types/material-type.ts"),LinkButton=__webpack_require__("./src/components/Buttons/LinkButton.tsx");const MaterialButtonOnlineExternal=({externalUrl="",origin,size,trackOnlineView,manifestations,dataCy="material-button-online-external",ariaLabelledBy})=>{const[translatedUrl,setTranslatedUrl]=(0,react.useState)(new URL(externalUrl)),[urlWasTranslated,setUrlWasTranslated]=(0,react.useState)(null),t=(0,utils_text.X)(),{data,error}=(0,dpl_cms.Yh)({url:externalUrl},{enabled:null===urlWasTranslated&&externalUrl.length>0});(0,react.useEffect)((()=>{var _data$data;urlWasTranslated||!error&&null!=data&&null!==(_data$data=data.data)&&void 0!==_data$data&&_data$data.url&&(setTranslatedUrl(new URL(data.data.url)),setUrlWasTranslated(!0))}),[data,error,translatedUrl,urlWasTranslated]);return react.createElement(LinkButton.Z,{url:translatedUrl,buttonType:"external-link",variant:"filled",size:size||"large",iconClassNames:"invert",trackClick:trackOnlineView,dataCy,ariaLabelledBy},((sourceName,materialTypes)=>{const onlineMaterialType=((sourceName,materialTypes)=>sourceName.toLowerCase().includes("ereol")?"ebook":sourceName.toLowerCase().includes("filmstriben")?"emovie":materialTypes.find((element=>element.toLowerCase().includes(material_type.XK.audioBookGeneric)))?"audiobook":"unknown")(sourceName,materialTypes);switch(onlineMaterialType){case"ebook":return t("goToText",{placeholders:{"@source":"ereolen"}});case"emovie":return t("goToText",{placeholders:{"@source":"filmstriben"}});case"audiobook":return t("listenOnlineText");default:return t("seeOnlineText")}})(origin,(0,general.A3)(manifestations)))},online_MaterialButtonOnlineExternal=MaterialButtonOnlineExternal;try{MaterialButtonOnlineExternal.displayName="MaterialButtonOnlineExternal",MaterialButtonOnlineExternal.__docgenInfo={description:"",displayName:"MaterialButtonOnlineExternal",props:{externalUrl:{defaultValue:{value:""},description:"",name:"externalUrl",required:!1,type:{name:"string"}},origin:{defaultValue:null,description:"",name:"origin",required:!0,type:{name:"string"}},size:{defaultValue:null,description:"",name:"size",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"xsmall"'},{value:'"small"'},{value:'"medium"'},{value:'"large"'},{value:'"xlarge"'}]}},trackOnlineView:{defaultValue:null,description:"",name:"trackOnlineView",required:!0,type:{name:"() => Promise"}},manifestations:{defaultValue:null,description:"",name:"manifestations",required:!0,type:{name:"Manifestation[]"}},dataCy:{defaultValue:{value:"material-button-online-external"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}},ariaLabelledBy:{defaultValue:null,description:"",name:"ariaLabelledBy",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/material-buttons/online/MaterialButtonOnlineExternal.tsx#MaterialButtonOnlineExternal"]={docgenInfo:MaterialButtonOnlineExternal.__docgenInfo,name:"MaterialButtonOnlineExternal",path:"src/components/material/material-buttons/online/MaterialButtonOnlineExternal.tsx#MaterialButtonOnlineExternal"})}catch(__react_docgen_typescript_loader_error){}var infomedia_logo=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/logo/infomedia-logo.svg"),infomedia_logo_default=__webpack_require__.n(infomedia_logo);const InfomediaModalBody=({headline,text})=>react.createElement("article",{className:"infomedia-article"},react.createElement("img",{className:"infomedia-logo",src:infomedia_logo_default(),alt:""}),react.createElement("h2",null,headline),react.createElement("div",{dangerouslySetInnerHTML:{__html:text}})),infomedia_InfomediaModalBody=InfomediaModalBody;try{InfomediaModalBody.displayName="InfomediaModalBody",InfomediaModalBody.__docgenInfo={description:"",displayName:"InfomediaModalBody",props:{headline:{defaultValue:null,description:"",name:"headline",required:!0,type:{name:"string"}},text:{defaultValue:null,description:"",name:"text",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/infomedia/InfomediaModalBody.tsx#InfomediaModalBody"]={docgenInfo:InfomediaModalBody.__docgenInfo,name:"InfomediaModalBody",path:"src/components/material/infomedia/InfomediaModalBody.tsx#InfomediaModalBody"})}catch(__react_docgen_typescript_loader_error){}const InfomediaSkeleton=()=>react.createElement("div",{className:"scc-wrapper"},react.createElement("div",{className:"ssc-square mb-32"}),react.createElement("div",{className:"ssc-head-line mbs"}),react.createElement("div",{className:"ssc-head-line mbs"}),react.createElement("div",{className:"ssc-head-line"})),infomedia_InfomediaSkeleton=InfomediaSkeleton;try{InfomediaSkeleton.displayName="InfomediaSkeleton",InfomediaSkeleton.__docgenInfo={description:"",displayName:"InfomediaSkeleton",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/infomedia/InfomediaSkeleton.tsx#InfomediaSkeleton"]={docgenInfo:InfomediaSkeleton.__docgenInfo,name:"InfomediaSkeleton",path:"src/components/material/infomedia/InfomediaSkeleton.tsx#InfomediaSkeleton"})}catch(__react_docgen_typescript_loader_error){}const infomediaModalId=pid=>`infomedia-modal-${pid}`,InfomediaModal=({selectedManifestations,infoMediaId})=>{const t=(0,utils_text.X)(),[shouldFetchData,setShouldFetchData]=(0,react.useState)(!1),[infomediaData,setInfomediaData]=(0,react.useState)(null),{data:patronData,isLoading:isLoadingPatron}=(0,user.dp)();(0,react.useEffect)((()=>{var _patronData$patron;void 0!==(null==patronData||null===(_patronData$patron=patronData.patron)||void 0===_patronData$patron?void 0:_patronData$patron.resident)&&setShouldFetchData(patronData.patron.resident)}),[patronData]);const{data,error,isLoading:isLoadingInfomedia}=(0,graphql.Dv)({id:infoMediaId},{enabled:shouldFetchData,onSuccess:response=>{var _response$infomedia,_response$infomedia$a,_response$infomedia2,_response$infomedia2$;const infomedia={headline:null==response||null===(_response$infomedia=response.infomedia)||void 0===_response$infomedia||null===(_response$infomedia$a=_response$infomedia.article)||void 0===_response$infomedia$a?void 0:_response$infomedia$a.headLine,text:null==response||null===(_response$infomedia2=response.infomedia)||void 0===_response$infomedia2||null===(_response$infomedia2$=_response$infomedia2.article)||void 0===_response$infomedia2$?void 0:_response$infomedia2$.text};setInfomediaData(infomedia)}});return!data||error?null:react.createElement(modal.Z,{modalId:infomediaModalId(selectedManifestations[0].pid),screenReaderModalDescriptionText:t("infomediaModalScreenReaderModalDescriptionText"),closeModalAriaLabelText:t("infomediaModalCloseModalAriaLabelText"),dataCy:"infomedia-modal"},isLoadingPatron||isLoadingInfomedia&&react.createElement(infomedia_InfomediaSkeleton,null),(null==infomediaData?void 0:infomediaData.headline)&&(null==infomediaData?void 0:infomediaData.text)&&react.createElement(infomedia_InfomediaModalBody,{headline:infomediaData.headline,text:infomediaData.text}))},infomedia_InfomediaModal=InfomediaModal;try{infomediaModalId.displayName="infomediaModalId",infomediaModalId.__docgenInfo={description:"",displayName:"infomediaModalId",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/infomedia/InfomediaModal.tsx#infomediaModalId"]={docgenInfo:infomediaModalId.__docgenInfo,name:"infomediaModalId",path:"src/components/material/infomedia/InfomediaModal.tsx#infomediaModalId"})}catch(__react_docgen_typescript_loader_error){}try{InfomediaModal.displayName="InfomediaModal",InfomediaModal.__docgenInfo={description:"",displayName:"InfomediaModal",props:{selectedManifestations:{defaultValue:null,description:"",name:"selectedManifestations",required:!0,type:{name:"Manifestation[]"}},infoMediaId:{defaultValue:null,description:"",name:"infoMediaId",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/infomedia/InfomediaModal.tsx#InfomediaModal"]={docgenInfo:InfomediaModal.__docgenInfo,name:"InfomediaModal",path:"src/components/material/infomedia/InfomediaModal.tsx#InfomediaModal"})}catch(__react_docgen_typescript_loader_error){}const MaterialButtonOnlineInfomediaArticle=({size,manifestations,trackOnlineView,dataCy="material-button-online-infomedia-article"})=>{const t=(0,utils_text.X)(),authUrl=(0,url.J_)()("authUrl"),{isLoading,data:userData}=(0,user.dp)(),{openGuarded}=(0,modal.f)(),isUserResident=userData&&null!=userData&&userData.patron?(0,user.aE)(userData.patron):null;if(manifestations.length<1)return null;return isLoading?react.createElement(MaterialButtonLoading.Z,null):!1===isUserResident?react.createElement(generic_MaterialButtonDisabled,{size,label:t("cantViewText"),reason:t("notLivingInMunicipalityText")}):react.createElement(Button.z,{label:t("readArticleText"),buttonType:"none",variant:"filled",disabled:!1,collapsible:!1,size:size||"large",onClick:()=>{openGuarded({authUrl,modalId:infomediaModalId(manifestations[0].pid),trackOnlineView})},dataCy})},online_MaterialButtonOnlineInfomediaArticle=MaterialButtonOnlineInfomediaArticle;try{MaterialButtonOnlineInfomediaArticle.displayName="MaterialButtonOnlineInfomediaArticle",MaterialButtonOnlineInfomediaArticle.__docgenInfo={description:"",displayName:"MaterialButtonOnlineInfomediaArticle",props:{size:{defaultValue:null,description:"",name:"size",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"xsmall"'},{value:'"small"'},{value:'"medium"'},{value:'"large"'},{value:'"xlarge"'}]}},manifestations:{defaultValue:null,description:"",name:"manifestations",required:!0,type:{name:"Manifestation[]"}},trackOnlineView:{defaultValue:null,description:"",name:"trackOnlineView",required:!0,type:{name:"() => Promise"}},dataCy:{defaultValue:{value:"material-button-online-infomedia-article"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/material-buttons/online/MaterialButtonOnlineInfomediaArticle.tsx#MaterialButtonOnlineInfomediaArticle"]={docgenInfo:MaterialButtonOnlineInfomediaArticle.__docgenInfo,name:"MaterialButtonOnlineInfomediaArticle",path:"src/components/material/material-buttons/online/MaterialButtonOnlineInfomediaArticle.tsx#MaterialButtonOnlineInfomediaArticle"})}catch(__react_docgen_typescript_loader_error){}const MaterialButtonsOnline=({manifestations,size,workId,dataCy="material-buttons-online",ariaLabelledBy})=>{const{track}=(0,useStatistics.T)(),trackOnlineView=()=>track("click",{id:statistics.h.onlineReservation.id,name:statistics.h.onlineReservation.name,trackedData:workId}),accessElement=manifestations[0].access[0];if((0,material_buttons_helper.M0)("Ereol",manifestations)||(0,material_buttons_helper.M0)("AccessUrl",manifestations)){const{origin,url:externalUrl}=accessElement;if(!(0,helpers_url.pM)(externalUrl))throw new InvalidUrlError.Z(`The external url is not valid. ( ${externalUrl} )`);return react.createElement(online_MaterialButtonOnlineExternal,{externalUrl,origin,size,trackOnlineView,manifestations,dataCy:`${dataCy}-external`,ariaLabelledBy})}return(0,material_buttons_helper.M0)("DigitalArticleService",manifestations)&&(0,material_buttons_helper.zn)(material_type.XK.article,manifestations)?react.createElement(online_MaterialButtonOnlineDigitalArticle,{pid:manifestations[0].pid,size,dataCy:`${dataCy}-digital-article`}):(0,material_buttons_helper.M0)("InfomediaService",manifestations)?react.createElement(online_MaterialButtonOnlineInfomediaArticle,{size,manifestations,trackOnlineView,dataCy:`${dataCy}-infomedia-article`}):null},online_MaterialButtonsOnline=MaterialButtonsOnline;try{MaterialButtonsOnline.displayName="MaterialButtonsOnline",MaterialButtonsOnline.__docgenInfo={description:"",displayName:"MaterialButtonsOnline",props:{manifestations:{defaultValue:null,description:"",name:"manifestations",required:!0,type:{name:"Manifestation[]"}},size:{defaultValue:null,description:"",name:"size",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"xsmall"'},{value:'"small"'},{value:'"medium"'},{value:'"large"'},{value:'"xlarge"'}]}},workId:{defaultValue:null,description:"",name:"workId",required:!0,type:{name:"`work-of:${number}-${string}:${number}`"}},dataCy:{defaultValue:{value:"material-buttons-online"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}},ariaLabelledBy:{defaultValue:null,description:"",name:"ariaLabelledBy",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/material-buttons/online/MaterialButtonsOnline.tsx#MaterialButtonsOnline"]={docgenInfo:MaterialButtonsOnline.__docgenInfo,name:"MaterialButtonsOnline",path:"src/components/material/material-buttons/online/MaterialButtonsOnline.tsx#MaterialButtonsOnline"})}catch(__react_docgen_typescript_loader_error){}var MaterialButtonsFindOnShelf=__webpack_require__("./src/components/material/material-buttons/physical/MaterialButtonsFindOnShelf.tsx");const UseReservableManifestations=({manifestations,type})=>{const config=(0,utils_config.ZR)(),faustIds=(0,general.vH)(manifestations),[reservableManifestations,setReservableManifestations]=(0,react.useState)(null),[unReservableManifestations,setUnReservableManifestations]=(0,react.useState)(null);return(0,react.useEffect)((()=>{if(!manifestations.length||reservableManifestations||unReservableManifestations)return;(async m=>{const data=await(0,helper.lm)({faustIds,config});if(!data)return{reservable:[],unReservable:[]};const filterableManifestations=type?(0,helper.zw)(type,m):m;return{reservable:filterableManifestations.filter((manifestation=>data.some((item=>item.reservable&&item.recordId===(0,general.rp)(manifestation.pid))))),unReservable:filterableManifestations.filter((manifestation=>data.some((item=>!item.reservable&&item.recordId===(0,general.rp)(manifestation.pid)))))}})(manifestations).then((({reservable,unReservable})=>{setReservableManifestations(reservable),setUnReservableManifestations(unReservable)}))}),[manifestations,faustIds,type,reservableManifestations,unReservableManifestations,config]),{reservableManifestations,unReservableManifestations}},utils_UseReservableManifestations=UseReservableManifestations;try{UseReservableManifestations.displayName="UseReservableManifestations",UseReservableManifestations.__docgenInfo={description:"",displayName:"UseReservableManifestations",props:{manifestations:{defaultValue:null,description:"",name:"manifestations",required:!0,type:{name:"Manifestation[]"}},type:{defaultValue:null,description:"",name:"type",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/utils/UseReservableManifestations.tsx#UseReservableManifestations"]={docgenInfo:UseReservableManifestations.__docgenInfo,name:"UseReservableManifestations",path:"src/core/utils/UseReservableManifestations.tsx#UseReservableManifestations"})}catch(__react_docgen_typescript_loader_error){}const MaterialButtonUserBlocked=({size,dataCy="material-button"})=>{const t=(0,utils_text.X)();return react.createElement(Button.z,{label:t("blockedButtonText"),buttonType:"none",variant:"filled",disabled:!0,collapsible:!1,size:size||"large",dataCy:`${dataCy}-user-blocked`})},generic_MaterialButtonUserBlocked=MaterialButtonUserBlocked;try{MaterialButtonUserBlocked.displayName="MaterialButtonUserBlocked",MaterialButtonUserBlocked.__docgenInfo={description:"",displayName:"MaterialButtonUserBlocked",props:{size:{defaultValue:null,description:"",name:"size",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"xsmall"'},{value:'"small"'},{value:'"medium"'},{value:'"large"'},{value:'"xlarge"'}]}},dataCy:{defaultValue:{value:"material-button"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/material-buttons/generic/MaterialButtonUserBlocked.tsx#MaterialButtonUserBlocked"]={docgenInfo:MaterialButtonUserBlocked.__docgenInfo,name:"MaterialButtonUserBlocked",path:"src/components/material/material-buttons/generic/MaterialButtonUserBlocked.tsx#MaterialButtonUserBlocked"})}catch(__react_docgen_typescript_loader_error){}const MaterialButtonPhysical=({manifestationMaterialType,faustIds,size,dataCy="material-button-physical"})=>{const t=(0,utils_text.X)(),authUrl=(0,url.J_)()("authUrl"),{openGuarded}=(0,modal.f)();return react.createElement(Button.z,{dataCy,label:"small"===size?t("reserveText"):`${t("reserveText")} ${manifestationMaterialType}`,buttonType:"none",variant:"filled",disabled:!1,collapsible:!1,size:size||"large",onClick:()=>{openGuarded({authUrl,modalId:(0,helper.Aw)(faustIds)})}})},physical_MaterialButtonPhysical=MaterialButtonPhysical;try{MaterialButtonPhysical.displayName="MaterialButtonPhysical",MaterialButtonPhysical.__docgenInfo={description:"",displayName:"MaterialButtonPhysical",props:{manifestationMaterialType:{defaultValue:null,description:"",name:"manifestationMaterialType",required:!0,type:{name:"string"}},size:{defaultValue:null,description:"",name:"size",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"xsmall"'},{value:'"small"'},{value:'"medium"'},{value:'"large"'},{value:'"xlarge"'}]}},faustIds:{defaultValue:null,description:"",name:"faustIds",required:!0,type:{name:"`${number}`[]"}},dataCy:{defaultValue:{value:"material-button-physical"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/material-buttons/physical/MaterialButtonPhysical.tsx#MaterialButtonPhysical"]={docgenInfo:MaterialButtonPhysical.__docgenInfo,name:"MaterialButtonPhysical",path:"src/components/material/material-buttons/physical/MaterialButtonPhysical.tsx#MaterialButtonPhysical"})}catch(__react_docgen_typescript_loader_error){}const MaterialButtonReservableFromAnotherLibrary=({manifestationMaterialType,faustIds,size,dataCy="material-button-reservable-on-another-library"})=>{const t=(0,utils_text.X)(),authUrl=(0,url.J_)()("authUrl"),{openGuarded}=(0,modal.f)();return react.createElement(Button.z,{dataCy,label:"small"===size?t("reservableFromAnotherLibraryText"):`${t("reservableFromAnotherLibraryText")} ${manifestationMaterialType}`,buttonType:"none",variant:"filled",disabled:!1,collapsible:!1,size:size||"large",onClick:()=>{openGuarded({authUrl,modalId:(0,helper.Aw)(faustIds)})}})},physical_MaterialButtonReservableFromAnotherLibrary=MaterialButtonReservableFromAnotherLibrary;try{MaterialButtonReservableFromAnotherLibrary.displayName="MaterialButtonReservableFromAnotherLibrary",MaterialButtonReservableFromAnotherLibrary.__docgenInfo={description:"",displayName:"MaterialButtonReservableFromAnotherLibrary",props:{manifestationMaterialType:{defaultValue:null,description:"",name:"manifestationMaterialType",required:!0,type:{name:"string"}},size:{defaultValue:null,description:"",name:"size",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"xsmall"'},{value:'"small"'},{value:'"medium"'},{value:'"large"'},{value:'"xlarge"'}]}},faustIds:{defaultValue:null,description:"",name:"faustIds",required:!0,type:{name:"`${number}`[]"}},dataCy:{defaultValue:{value:"material-button-reservable-on-another-library"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/material-buttons/physical/MaterialButtonReservableFromAnotherLibrary.tsx#MaterialButtonReservableFromAnotherLibrary"]={docgenInfo:MaterialButtonReservableFromAnotherLibrary.__docgenInfo,name:"MaterialButtonReservableFromAnotherLibrary",path:"src/components/material/material-buttons/physical/MaterialButtonReservableFromAnotherLibrary.tsx#MaterialButtonReservableFromAnotherLibrary"})}catch(__react_docgen_typescript_loader_error){}const MaterialButtonsPhysical=({manifestations,size,dataCy="material-buttons-physical"})=>{const isReservableFromAnotherLibrary=(0,general.xB)(manifestations),t=(0,utils_text.X)(),faustIds=(0,general.vH)(manifestations),{reservableManifestations}=utils_UseReservableManifestations({manifestations}),{data:userData,isLoading}=(0,user.dp)(),isUserBlocked=!(null==userData||!userData.patron||!(0,user.IT)(null==userData?void 0:userData.patron));return isLoading?react.createElement(MaterialButtonLoading.Z,null):!reservableManifestations||reservableManifestations.length<1?react.createElement(generic_MaterialButtonDisabled,{size,label:t("cantReserveText")}):isUserBlocked?react.createElement(generic_MaterialButtonUserBlocked,{size,dataCy}):isReservableFromAnotherLibrary.length>0?react.createElement(physical_MaterialButtonReservableFromAnotherLibrary,{size,manifestationMaterialType:(0,general.cC)(manifestations),faustIds}):userData&&isUserBlocked?null:react.createElement(physical_MaterialButtonPhysical,{dataCy,manifestationMaterialType:(0,general.cC)(manifestations),faustIds,size})},physical_MaterialButtonsPhysical=MaterialButtonsPhysical;try{MaterialButtonsPhysical.displayName="MaterialButtonsPhysical",MaterialButtonsPhysical.__docgenInfo={description:"",displayName:"MaterialButtonsPhysical",props:{manifestations:{defaultValue:null,description:"",name:"manifestations",required:!0,type:{name:"Manifestation[]"}},size:{defaultValue:null,description:"",name:"size",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"xsmall"'},{value:'"small"'},{value:'"medium"'},{value:'"large"'},{value:'"xlarge"'}]}},dataCy:{defaultValue:{value:"material-buttons-physical"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/material-buttons/physical/MaterialButtonsPhysical.tsx#MaterialButtonsPhysical"]={docgenInfo:MaterialButtonsPhysical.__docgenInfo,name:"MaterialButtonsPhysical",path:"src/components/material/material-buttons/physical/MaterialButtonsPhysical.tsx#MaterialButtonsPhysical"})}catch(__react_docgen_typescript_loader_error){}const MaterialButtons=({manifestations,size,workId,dataCy="material-buttons",materialTitleId})=>{const faustIds=(0,general.vH)(manifestations);return react.createElement(react.Fragment,null,(0,material_buttons_helper.ie)(graphql.U5.Physical,manifestations)&&!(0,material_buttons_helper.g0)(manifestations)&&react.createElement(react.Fragment,null,react.createElement(physical_MaterialButtonsPhysical,{manifestations,size,dataCy:`${dataCy}-physical`}),react.createElement(MaterialButtonsFindOnShelf.Z,{size,faustIds,dataCy:`${dataCy}-find-on-shelf`})),((0,material_buttons_helper.ie)(graphql.U5.Online,manifestations)||(0,material_buttons_helper.M0)("DigitalArticleService",manifestations))&&react.createElement(online_MaterialButtonsOnline,{manifestations,size,workId,dataCy:`${dataCy}-online`,ariaLabelledBy:materialTitleId}))},material_buttons_MaterialButtons=MaterialButtons;try{MaterialButtons.displayName="MaterialButtons",MaterialButtons.__docgenInfo={description:"",displayName:"MaterialButtons",props:{manifestations:{defaultValue:null,description:"",name:"manifestations",required:!0,type:{name:"Manifestation[]"}},size:{defaultValue:null,description:"",name:"size",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"xsmall"'},{value:'"small"'},{value:'"medium"'},{value:'"large"'},{value:'"xlarge"'}]}},workId:{defaultValue:null,description:"",name:"workId",required:!0,type:{name:"`work-of:${number}-${string}:${number}`"}},dataCy:{defaultValue:{value:"material-buttons"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}},materialTitleId:{defaultValue:null,description:"",name:"materialTitleId",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/material-buttons/MaterialButtons.tsx#MaterialButtons"]={docgenInfo:MaterialButtons.__docgenInfo,name:"MaterialButtons",path:"src/components/material/material-buttons/MaterialButtons.tsx#MaterialButtons"})}catch(__react_docgen_typescript_loader_error){}const MaterialMainfestationItem=({manifestation:{materialTypes,pid,titles,creators,identifiers,edition},manifestation,workId})=>{var _materialTypes$,_edition$publicationY;const mainfestationTitleId=(0,react.useId)(),t=(0,utils_text.X)(),[isOpen,setIsOpen]=(0,react.useState)(!1),faustId=(0,general.rp)(pid),author=(0,general.b7)((0,general.TG)(creators),t),languageIsoCode=(0,helper.hQ)([manifestation]),detailsListData=[{label:t("detailsListTypeText"),value:(0,helper.I_)(manifestation),type:"standard"},{label:t("detailsListLanguageText"),value:(0,helper.Jl)(manifestation),type:"standard"},{label:t("detailsListGenreAndFormText"),value:(0,helper.G2)(manifestation),type:"standard"},{label:t("detailsListContributorsText"),value:(0,helper.PI)(manifestation),type:"link"},{label:t("detailsListOriginalTitleText"),value:(0,helper.sr)(manifestation),type:"standard"},{label:t("detailsListIsbnText"),value:(0,helper.QL)(manifestation),type:"standard"},{label:t("detailsListEditionText"),value:(0,helper.jr)(manifestation),type:"standard"},{label:t("detailsListScopeText"),value:(0,helper.Ey)(manifestation),type:"standard"},{label:t("detailsListPublisherText"),value:(0,helper.CU)(manifestation),type:"standard"},{label:t("detailsListAudienceText"),value:(0,helper.tb)(manifestation),type:"standard"},{label:t("detailsListAuthorsText"),value:(0,helper.An)(manifestation),type:"standard"}],accessTypesCodes=manifestation.accessTypes.map((item=>item.code)),access=manifestation.access.map((acc=>acc.__typename)),detailsId=`material-details-${pid}`;return react.createElement("div",{className:"material-manifestation-item"},react.createElement("div",{className:"material-manifestation-item__availability"},react.createElement(availability_label.K,{manifestText:null===(_materialTypes$=materialTypes[0])||void 0===_materialTypes$?void 0:_materialTypes$.specific,faustIds:[faustId],isbns:identifiers.map((identifier=>identifier.value)),accessTypes:accessTypesCodes,access})),react.createElement("div",{className:"material-manifestation-item__cover"},react.createElement(cover.Y,{id:pid,size:"small",animate:!1})),react.createElement("div",{className:"material-manifestation-item__text"},react.createElement("h3",{lang:languageIsoCode,id:mainfestationTitleId,className:"material-manifestation-item__title text-header-h4"},null==titles?void 0:titles.main[0]),react.createElement("p",{className:"text-small-caption"},t("materialHeaderAuthorByText")," ",author,(null==edition||null===(_edition$publicationY=edition.publicationYear)||void 0===_edition$publicationY?void 0:_edition$publicationY.display)&&` (${edition.publicationYear.display})`),react.createElement("div",{className:"material-manifestation-item__details "+(isOpen?"expanded":""),onClick:()=>{setIsOpen(!isOpen)},onKeyPress:()=>{setIsOpen(!isOpen)},role:"button",tabIndex:0,"aria-controls":detailsId,"aria-expanded":isOpen},react.createElement("p",{className:"link-tag text-small-caption"},t("detailsOfTheMaterialText")),react.createElement("img",{src:ExpandMore_default(),alt:""})),isOpen&&react.createElement(material_MaterialDetailsList,{id:detailsId,className:"mt-24",data:detailsListData})),react.createElement("div",{className:"material-manifestation-item__buttons"},react.createElement(material_buttons_MaterialButtons,{manifestations:[manifestation],size:"small",workId,materialTitleId:mainfestationTitleId})))},material_MaterialMainfestationItem=MaterialMainfestationItem;try{MaterialMainfestationItem.displayName="MaterialMainfestationItem",MaterialMainfestationItem.__docgenInfo={description:"",displayName:"MaterialMainfestationItem",props:{manifestation:{defaultValue:null,description:"",name:"manifestation",required:!0,type:{name:"Manifestation"}},workId:{defaultValue:null,description:"",name:"workId",required:!0,type:{name:"`work-of:${number}-${string}:${number}`"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/MaterialMainfestationItem.tsx#MaterialMainfestationItem"]={docgenInfo:MaterialMainfestationItem.__docgenInfo,name:"MaterialMainfestationItem",path:"src/components/material/MaterialMainfestationItem.tsx#MaterialMainfestationItem"})}catch(__react_docgen_typescript_loader_error){}var DisclosureControllable=__webpack_require__("./src/components/Disclosures/DisclosureControllable.tsx"),TextInput=__webpack_require__("./src/components/atoms/input/TextInput.tsx"),ReservationForm=__webpack_require__("./src/components/reservation/forms/ReservationForm.tsx");const DigitalModalBody=({userEmail,handleSubmit,isLoading})=>{const t=(0,utils_text.X)(),[email,setEmail]=(0,react.useState)(userEmail);return react.createElement(ReservationForm.Z,{cyData:"order-digital",title:t("orderDigitalCopyTitleText"),description:[t("orderDigitalCopyDescriptionText")],onSubmit:()=>{handleSubmit(email)},buttonLabel:t(isLoading?"orderDigitalCopyButtonLoadingText":"orderDigitalCopyButtonText"),disabledButton:isLoading},react.createElement(TextInput.Z,{type:"email",label:t("orderDigitalCopyEmailLabelText"),id:"email-order-digital-copy",value:email,onChange:setEmail}))},digital_modal_DigitalModalBody=DigitalModalBody;try{DigitalModalBody.displayName="DigitalModalBody",DigitalModalBody.__docgenInfo={description:"",displayName:"DigitalModalBody",props:{userEmail:{defaultValue:null,description:"",name:"userEmail",required:!0,type:{name:"string"}},handleSubmit:{defaultValue:null,description:"",name:"handleSubmit",required:!0,type:{name:"(email: string) => void"}},isLoading:{defaultValue:null,description:"",name:"isLoading",required:!0,type:{name:"boolean"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/digital-modal/DigitalModalBody.tsx#DigitalModalBody"]={docgenInfo:DigitalModalBody.__docgenInfo,name:"DigitalModalBody",path:"src/components/material/digital-modal/DigitalModalBody.tsx#DigitalModalBody"})}catch(__react_docgen_typescript_loader_error){}const DigitalModalFeedback=({modalId,feedbackMessage})=>{const t=(0,utils_text.X)(),{close}=(0,modal.f)();return react.createElement(ReservationForm.Z,{cyData:"order-digital-feedback",title:t("orderDigitalCopyFeedbackTitleText"),description:[feedbackMessage??""],onSubmit:()=>close(modalId),buttonLabel:t("orderDigitalCopyFeedbackButtonText")})},digital_modal_DigitalModalFeedback=DigitalModalFeedback;try{DigitalModalFeedback.displayName="DigitalModalFeedback",DigitalModalFeedback.__docgenInfo={description:"",displayName:"DigitalModalFeedback",props:{modalId:{defaultValue:null,description:"",name:"modalId",required:!0,type:{name:"string"}},feedbackMessage:{defaultValue:null,description:"",name:"feedbackMessage",required:!0,type:{name:"string | null"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/digital-modal/DigitalModalFeedback.tsx#DigitalModalFeedback"]={docgenInfo:DigitalModalFeedback.__docgenInfo,name:"DigitalModalFeedback",path:"src/components/material/digital-modal/DigitalModalFeedback.tsx#DigitalModalFeedback"})}catch(__react_docgen_typescript_loader_error){}const DigitalModal=({pid,workId})=>{const modalId=createDigitalModalId(pid),t=(0,utils_text.X)(),[userEmail,setUserEmail]=(0,react.useState)(null),{track}=(0,useStatistics.T)(),{mutate:articleOrder,isLoading:articleOrderLoading,data:articleResponse}=(0,graphql.zj)(),responseMessage=((articleResponse,t)=>articleResponse?Object.values(graphql.rU).reduce(((acc,current)=>{return{...acc,[current]:t(`orderDigitalCopyFeedback${string=current,string.toLowerCase().split("_").map((word=>word.charAt(0).toUpperCase()+word.slice(1))).join("")}Text`)};var string}),{})[articleResponse.elba.placeCopyRequest.status]:null)(articleResponse,t),{data:patronData}=(0,user.dp)();return(0,react.useEffect)((()=>{var _patronData$patron;patronData&&(null!==(_patronData$patron=patronData.patron)&&void 0!==_patronData$patron&&_patronData$patron.emailAddress?setUserEmail(patronData.patron.emailAddress):setUserEmail(""))}),[patronData]),(0,user.TF)()?null:react.createElement(modal.Z,{modalId,screenReaderModalDescriptionText:t("orderDigitalCopyModalScreenReaderModalDescriptionText"),closeModalAriaLabelText:t("orderDigitalCopyModalCloseModalAriaLabelText")},responseMessage?react.createElement(digital_modal_DigitalModalFeedback,{modalId,feedbackMessage:responseMessage}):null!==userEmail&&react.createElement(digital_modal_DigitalModalBody,{userEmail,handleSubmit:email=>{articleOrder({input:{pid,userMail:email}},{onSuccess:()=>{track("click",{id:statistics.h.reservation.id,name:statistics.h.reservation.name,trackedData:workId})}})},isLoading:articleOrderLoading}))},digital_modal_DigitalModal=DigitalModal;try{DigitalModal.displayName="DigitalModal",DigitalModal.__docgenInfo={description:"",displayName:"DigitalModal",props:{pid:{defaultValue:null,description:"",name:"pid",required:!0,type:{name:"`${number}-${string}:${number}`"}},workId:{defaultValue:null,description:"",name:"workId",required:!0,type:{name:"`work-of:${number}-${string}:${number}`"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/digital-modal/DigitalModal.tsx#DigitalModal"]={docgenInfo:DigitalModal.__docgenInfo,name:"DigitalModal",path:"src/components/material/digital-modal/DigitalModal.tsx#DigitalModal"})}catch(__react_docgen_typescript_loader_error){}var es=__webpack_require__("./node_modules/react-redux/es/index.js"),guardedRequests_slice=__webpack_require__("./src/core/guardedRequests.slice.ts"),availability_labels=__webpack_require__("./src/components/availability-label/availability-labels.tsx"),button_favourite=__webpack_require__("./src/components/button-favourite/button-favourite.tsx"),head=__webpack_require__("./node_modules/lodash/head.js"),head_default=__webpack_require__.n(head),publizon=__webpack_require__("./src/core/publizon/publizon.ts");const MaterialAvailabilityTextParagraph=({children})=>react.createElement("p",{className:"mt-16 text-small-caption"},children),generic_MaterialAvailabilityTextParagraph=MaterialAvailabilityTextParagraph;try{MaterialAvailabilityTextParagraph.displayName="MaterialAvailabilityTextParagraph",MaterialAvailabilityTextParagraph.__docgenInfo={description:"",displayName:"MaterialAvailabilityTextParagraph",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/MaterialAvailabilityText/generic/MaterialAvailabilityTextParagraph.tsx#MaterialAvailabilityTextParagraph"]={docgenInfo:MaterialAvailabilityTextParagraph.__docgenInfo,name:"MaterialAvailabilityTextParagraph",path:"src/components/material/MaterialAvailabilityText/generic/MaterialAvailabilityTextParagraph.tsx#MaterialAvailabilityTextParagraph"})}catch(__react_docgen_typescript_loader_error){}const MaterialAvailabilityTextOnline=({isbns,materialType})=>{var _loansData$userData,_loansData$userData2,_productsData$product;const t=(0,utils_text.X)(),{data:productsData}=(0,publizon.tq)(isbns[0]),{data:libraryProfileData}=(0,publizon.ul)(),{data:loansData}=(0,publizon.T8)();if(!libraryProfileData||!loansData||!productsData)return null;const totalEbookLoans=null==loansData||null===(_loansData$userData=loansData.userData)||void 0===_loansData$userData?void 0:_loansData$userData.totalEbookLoans,totalAudioLoans=null==loansData||null===(_loansData$userData2=loansData.userData)||void 0===_loansData$userData2?void 0:_loansData$userData2.totalAudioLoans,{maxConcurrentEbookLoansPerBorrower,maxConcurrentAudioLoansPerBorrower}=libraryProfileData,availabilityTextMap={[material_type.XK.ebook]:{text:"onlineLimitMonthEbookInfoText",count:totalEbookLoans,limit:maxConcurrentEbookLoansPerBorrower},[material_type.XK.audioBook]:{text:"onlineLimitMonthAudiobookInfoText",count:totalAudioLoans,limit:maxConcurrentAudioLoansPerBorrower},materialIsIncluded:{text:"materialIsIncludedText"}},availabilityText=(({type,map,t})=>{if(!map||!map[type])return null;const{text,count,limit}=map[type];return void 0===count&&void 0===limit&&text?t(text):void 0!==count&&void 0!==limit&&void 0!==text?t(text,{placeholders:{"@count":count,"@limit":limit}}):null})({type:null!==(_productsData$product=productsData.product)&&void 0!==_productsData$product&&_productsData$product.costFree?"materialIsIncluded":materialType,map:availabilityTextMap,t});return react.createElement(generic_MaterialAvailabilityTextParagraph,null,availabilityText)},online_MaterialAvailabilityTextOnline=MaterialAvailabilityTextOnline;try{MaterialAvailabilityTextOnline.displayName="MaterialAvailabilityTextOnline",MaterialAvailabilityTextOnline.__docgenInfo={description:"",displayName:"MaterialAvailabilityTextOnline",props:{isbns:{defaultValue:null,description:"",name:"isbns",required:!0,type:{name:"string[]"}},materialType:{defaultValue:null,description:"",name:"materialType",required:!0,type:{name:"enum",value:[{value:'"bog"'},{value:'"e-bog"'},{value:'"film"'},{value:'"lydbog (online)"'},{value:'"lydbog"'},{value:'"node"'},{value:'"playstation 5"'},{value:'"tegneserie"'},{value:'"artikel"'},{value:'"spil"'},{value:'"cd"'},{value:'"tidsskrift"'}]}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/MaterialAvailabilityText/online/MaterialAvailabilityTextOnline.tsx#MaterialAvailabilityTextOnline"]={docgenInfo:MaterialAvailabilityTextOnline.__docgenInfo,name:"MaterialAvailabilityTextOnline",path:"src/components/material/MaterialAvailabilityText/online/MaterialAvailabilityTextOnline.tsx#MaterialAvailabilityTextOnline"})}catch(__react_docgen_typescript_loader_error){}const StockAndReservationInfo=({stockCount,reservationCount,numberInQueue})=>{const t=(0,utils_text.X)(),materialsInStockInfoText=t("materialsInStockInfoText",{count:stockCount,placeholders:{"@count":stockCount}}),materialReservationInfoText=t("materialReservationInfoText",{count:reservationCount,placeholders:{"@count":reservationCount}}),numberInQueueText=!!numberInQueue&&t("numberInQueueText",{placeholders:{"@number":numberInQueue}});return react.createElement(react.Fragment,null,numberInQueueText&&`${numberInQueueText} `,materialsInStockInfoText&&`${materialsInStockInfoText} `,materialReservationInfoText&&materialReservationInfoText)},material_StockAndReservationInfo=StockAndReservationInfo;try{StockAndReservationInfo.displayName="StockAndReservationInfo",StockAndReservationInfo.__docgenInfo={description:"",displayName:"StockAndReservationInfo",props:{stockCount:{defaultValue:null,description:"",name:"stockCount",required:!0,type:{name:"number"}},reservationCount:{defaultValue:null,description:"",name:"reservationCount",required:!0,type:{name:"number"}},numberInQueue:{defaultValue:null,description:"",name:"numberInQueue",required:!1,type:{name:"number | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/StockAndReservationInfo.tsx#StockAndReservationInfo"]={docgenInfo:StockAndReservationInfo.__docgenInfo,name:"StockAndReservationInfo",path:"src/components/material/StockAndReservationInfo.tsx#StockAndReservationInfo"})}catch(__react_docgen_typescript_loader_error){}const MaterialAvailabilityTextPhysical=({pids})=>{const config=(0,utils_config.ZR)(),faustIds=(0,general.TH)(pids),{data,isLoading,isError}=(0,helper.Lt)({faustIds,config});if(isLoading||isError||!data)return null;const holdings=(0,helper.Vq)(data),reservations=(0,helper.iT)(data);return react.createElement(generic_MaterialAvailabilityTextParagraph,null,react.createElement(material_StockAndReservationInfo,{stockCount:holdings,reservationCount:reservations}))},physical_MaterialAvailabilityTextPhysical=MaterialAvailabilityTextPhysical;try{MaterialAvailabilityTextPhysical.displayName="MaterialAvailabilityTextPhysical",MaterialAvailabilityTextPhysical.__docgenInfo={description:"",displayName:"MaterialAvailabilityTextPhysical",props:{pids:{defaultValue:null,description:"",name:"pids",required:!0,type:{name:"`${number}-${string}:${number}`[]"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/MaterialAvailabilityText/physical/MaterialAvailabilityTextPhysical.tsx#MaterialAvailabilityTextPhysical"]={docgenInfo:MaterialAvailabilityTextPhysical.__docgenInfo,name:"MaterialAvailabilityTextPhysical",path:"src/components/material/MaterialAvailabilityText/physical/MaterialAvailabilityTextPhysical.tsx#MaterialAvailabilityTextPhysical"})}catch(__react_docgen_typescript_loader_error){}const MaterialAvailabilityText=({manifestations})=>{const materialType=head_default()((0,general.A3)(manifestations)),isbns=(0,helper.LJ)(manifestations);if((0,material_buttons_helper.ie)(graphql.U5.Physical,manifestations)){const pids=(0,general.k7)(manifestations);return react.createElement(physical_MaterialAvailabilityTextPhysical,{pids})}return(0,material_buttons_helper.ie)(graphql.U5.Online,manifestations)&&isbns.length>0&&materialType?react.createElement(online_MaterialAvailabilityTextOnline,{isbns,materialType}):null},MaterialAvailabilityText_MaterialAvailabilityText=MaterialAvailabilityText;try{MaterialAvailabilityText.displayName="MaterialAvailabilityText",MaterialAvailabilityText.__docgenInfo={description:"",displayName:"MaterialAvailabilityText",props:{manifestations:{defaultValue:null,description:"",name:"manifestations",required:!0,type:{name:"Manifestation[]"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/MaterialAvailabilityText/MaterialAvailabilityText.tsx#MaterialAvailabilityText"]={docgenInfo:MaterialAvailabilityText.__docgenInfo,name:"MaterialAvailabilityText",path:"src/components/material/MaterialAvailabilityText/MaterialAvailabilityText.tsx#MaterialAvailabilityText"})}catch(__react_docgen_typescript_loader_error){}const MaterialHeaderText=({title,author,languageIsoCode,materialTitleId})=>{const t=(0,utils_text.X)(),searchUrl=(0,url.J_)()("searchUrl");return react.createElement(react.Fragment,null,react.createElement("h1",{id:materialTitleId,lang:languageIsoCode,className:"text-header-h1 mb-16"},title),author&&react.createElement("p",{"data-cy":"material-header-author-text",className:"text-body-large"},react.createElement("span",null,t("materialHeaderAuthorByText")," "),react.createElement(LinkNoStyle.Z,{url:(0,helpers_url.Nt)(searchUrl,author),className:"arrow__link"},author)))},material_MaterialHeaderText=MaterialHeaderText;try{MaterialHeaderText.displayName="MaterialHeaderText",MaterialHeaderText.__docgenInfo={description:"",displayName:"MaterialHeaderText",props:{title:{defaultValue:null,description:"",name:"title",required:!0,type:{name:"string"}},author:{defaultValue:null,description:"",name:"author",required:!0,type:{name:"string"}},languageIsoCode:{defaultValue:null,description:"",name:"languageIsoCode",required:!1,type:{name:"string | undefined"}},materialTitleId:{defaultValue:null,description:"",name:"materialTitleId",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/MaterialHeaderText.tsx#MaterialHeaderText"]={docgenInfo:MaterialHeaderText.__docgenInfo,name:"MaterialHeaderText",path:"src/components/material/MaterialHeaderText.tsx#MaterialHeaderText"})}catch(__react_docgen_typescript_loader_error){}var isEmpty=__webpack_require__("./node_modules/lodash/isEmpty.js"),isEmpty_default=__webpack_require__.n(isEmpty),periodical_helper=__webpack_require__("./src/components/material/periodical/helper.ts");const MaterialPeriodicalSelect=({groupList,selectedPeriodical,selectPeriodicalHandler})=>{const t=(0,utils_text.X)(),lastYear=Object.keys(groupList).sort().pop()||"",[year,setYear]=(0,react.useState)(lastYear),periodicalEditions=(0,periodical_helper.ik)(groupList);(0,react.useEffect)((()=>{if(selectedPeriodical)return;const firstEdition=(0,periodical_helper.P5)(year,periodicalEditions),firstFullPeriodicalEdition=groupList[year].find((edition=>edition.volumeNumber===firstEdition));firstFullPeriodicalEdition&&selectPeriodicalHandler(firstFullPeriodicalEdition)}),[selectPeriodicalHandler,selectedPeriodical,year,periodicalEditions,groupList]);return react.createElement("div",{className:"text-small-caption material-periodical"},react.createElement("div",{className:"material-periodical-select"},react.createElement("label",{htmlFor:"year"},t("periodicalSelectYearText")),react.createElement("div",{className:"material-periodical-select__border-container"},react.createElement("select",{id:"year",defaultValue:year,onChange:event=>{(0,periodical_helper.sW)(event.target.value,setYear,selectPeriodicalHandler,periodicalEditions,groupList)}},Object.keys(periodicalEditions).sort().map((item=>react.createElement("option",{key:item,value:item},item)))))),year&&react.createElement("div",{className:"material-periodical-select"},react.createElement("label",{htmlFor:"editions"},t("periodicalSelectEditionText")),react.createElement("div",{className:"material-periodical-select__border-container"},react.createElement("select",{id:"editions",value:null==selectedPeriodical?void 0:selectedPeriodical.volumeNumber,onChange:event=>{(0,periodical_helper.ul)(groupList,year,event.target.value,selectPeriodicalHandler)}},periodicalEditions[year].map((item=>react.createElement("option",{key:item,value:item},item)))))))},periodical_MaterialPeriodicalSelect=MaterialPeriodicalSelect;try{MaterialPeriodicalSelect.displayName="MaterialPeriodicalSelect",MaterialPeriodicalSelect.__docgenInfo={description:"",displayName:"MaterialPeriodicalSelect",props:{groupList:{defaultValue:null,description:"",name:"groupList",required:!0,type:{name:"GroupList"}},selectedPeriodical:{defaultValue:null,description:"",name:"selectedPeriodical",required:!0,type:{name:"PeriodicalEdition | null"}},selectPeriodicalHandler:{defaultValue:null,description:"",name:"selectPeriodicalHandler",required:!0,type:{name:"(selectedPeriodical: PeriodicalEdition) => void"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/periodical/MaterialPeriodicalSelect.tsx#MaterialPeriodicalSelect"]={docgenInfo:MaterialPeriodicalSelect.__docgenInfo,name:"MaterialPeriodicalSelect",path:"src/components/material/periodical/MaterialPeriodicalSelect.tsx#MaterialPeriodicalSelect"})}catch(__react_docgen_typescript_loader_error){}const MaterialPeriodical=({faustId,selectedPeriodical,selectPeriodicalHandler})=>{const config=(0,utils_config.ZR)(),{data,isLoading,isError}=(0,helper.Lt)({faustIds:[faustId],config});if(isLoading||isError||!data)return null;const materialsPeriodical=data[0].holdings.map((holding=>holding.materials.flat().map((material=>({...material.periodical,itemNumber:material.itemNumber}))))).flat(),groupByVolumeYear=(0,general.CU)(materialsPeriodical,"volumeYear");return groupByVolumeYear&&selectPeriodicalHandler&&!isEmpty_default()(groupByVolumeYear)?react.createElement(periodical_MaterialPeriodicalSelect,{groupList:groupByVolumeYear,selectedPeriodical,selectPeriodicalHandler}):null},periodical_MaterialPeriodical=MaterialPeriodical;try{MaterialPeriodical.displayName="MaterialPeriodical",MaterialPeriodical.__docgenInfo={description:"",displayName:"MaterialPeriodical",props:{faustId:{defaultValue:null,description:"",name:"faustId",required:!0,type:{name:"`${number}`"}},selectedPeriodical:{defaultValue:null,description:"",name:"selectedPeriodical",required:!0,type:{name:"PeriodicalEdition | null"}},selectPeriodicalHandler:{defaultValue:null,description:"",name:"selectPeriodicalHandler",required:!0,type:{name:"(selectedPeriodical: PeriodicalEdition) => void"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/periodical/MaterialPeriodical.tsx#MaterialPeriodical"]={docgenInfo:MaterialPeriodical.__docgenInfo,name:"MaterialPeriodical",path:"src/components/material/periodical/MaterialPeriodical.tsx#MaterialPeriodical"})}catch(__react_docgen_typescript_loader_error){}const MaterialHeader=({work:{titles:{full:fullTitle},creators,manifestations:{all:manifestations},mainLanguages,workId:wid},selectedManifestations,setSelectedManifestations,selectedPeriodical,selectPeriodicalHandler,children})=>{const materialTitleId=(0,react.useId)(),{itemRef,hasBeenVisible:showItem}=(0,lazy_load.L)(),t=(0,utils_text.X)(),dispatch=(0,es.I0)(),author=(0,general.b7)((0,general.TG)(creators),t),isPeriodical=(0,material_buttons_helper.zn)(material_type.XK.magazine,selectedManifestations),containsDanish=mainLanguages.some((language=>null==language?void 0:language.isoCode.toLowerCase().includes("dan"))),allLanguages=mainLanguages.map((language=>language.display)).join(", "),title=containsDanish?fullTitle:`${fullTitle} (${allLanguages})`,pid=(0,general.qQ)(manifestations),{track}=(0,useStatistics.T)(),manifestationMaterialTypes=(0,general.A3)(selectedManifestations),languageIsoCode=(0,helper.hQ)(selectedManifestations);return(0,useDeepCompareEffect.Z)((()=>{track("click",{id:statistics.h.materialType.id,name:statistics.h.materialType.name,trackedData:manifestationMaterialTypes.join(", ")}),track("click",{id:statistics.h.materialSource.id,name:statistics.h.materialSource.name,trackedData:selectedManifestations.map((manifestation=>manifestation.source.join(", "))).join(", ")})}),[manifestationMaterialTypes]),react.createElement("header",{className:"material-header"},react.createElement("div",{className:"material-header__cover"},react.createElement(cover.Y,{id:pid,size:"xlarge",animate:!0,shadow:!0})),react.createElement("div",{"data-cy":"material-header-content",className:"material-header__content"},react.createElement(button_favourite.Z,{title:String(title),id:wid,addToListRequest:id=>{dispatch((0,guardedRequests_slice.Bs)({type:"addFavorite",args:{id},app:"material"}))}}),react.createElement(material_MaterialHeaderText,{title:String(title),author,languageIsoCode,materialTitleId}),react.createElement("div",{ref:itemRef,className:"material-header__availability-label"},showItem&&react.createElement(availability_labels.U,{cursorPointer:!0,workId:wid,manifestations,selectedManifestations,setSelectedManifestations})),showItem&&react.createElement(react.Fragment,null,isPeriodical&&react.createElement(periodical_MaterialPeriodical,{faustId:(0,general.rp)(pid),selectedPeriodical,selectPeriodicalHandler}),selectedManifestations&&react.createElement(react.Fragment,null,react.createElement("div",{className:"material-header__button"},react.createElement(material_buttons_MaterialButtons,{manifestations:selectedManifestations,workId:wid,dataCy:"material-header-buttons",materialTitleId})),!(0,user.TF)()&&react.createElement(MaterialAvailabilityText_MaterialAvailabilityText,{manifestations:selectedManifestations})),children)))},material_MaterialHeader=MaterialHeader;try{MaterialHeader.displayName="MaterialHeader",MaterialHeader.__docgenInfo={description:"",displayName:"MaterialHeader",props:{wid:{defaultValue:null,description:"",name:"wid",required:!0,type:{name:"`work-of:${number}-${string}:${number}`"}},work:{defaultValue:null,description:"",name:"work",required:!0,type:{name:"Work"}},selectedManifestations:{defaultValue:null,description:"",name:"selectedManifestations",required:!0,type:{name:"Manifestation[]"}},setSelectedManifestations:{defaultValue:null,description:"",name:"setSelectedManifestations",required:!0,type:{name:"(manifestations: Manifestation[]) => void"}},selectedPeriodical:{defaultValue:null,description:"",name:"selectedPeriodical",required:!0,type:{name:"PeriodicalEdition | null"}},selectPeriodicalHandler:{defaultValue:null,description:"",name:"selectPeriodicalHandler",required:!0,type:{name:"(selectedPeriodical: PeriodicalEdition) => void"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/MaterialHeader.tsx#MaterialHeader"]={docgenInfo:MaterialHeader.__docgenInfo,name:"MaterialHeader",path:"src/components/material/MaterialHeader.tsx#MaterialHeader"})}catch(__react_docgen_typescript_loader_error){}const MaterialSkeleton=()=>react.createElement("section",{className:"material-page ssc"},react.createElement("header",{className:"material-header"},react.createElement("div",{className:"material-header__cover"},react.createElement("div",{className:"ssc-square cover cover--size-xlarge cover--aspect-xlarge"})),react.createElement("div",{className:"material-header__content"},react.createElement("div",null,react.createElement("div",{className:"scc-wrapper"},react.createElement("div",{className:"ssc-square mb-32"}),react.createElement("div",{className:"ssc-head-line mbs"}),react.createElement("div",{className:"ssc-head-line mbs"}),react.createElement("div",{className:"ssc-head-line mb-48"}),react.createElement("div",{className:"ssc-line w-30"}," ")),react.createElement("div",{className:"scc-wrapper pt-48"},react.createElement("div",{className:"ssc-head-line w-80 mbs"}),react.createElement("div",{className:"ssc-head-line w-80 mbs"}),react.createElement("div",{className:"ssc-line"}))))),react.createElement("section",{className:"material-description"},react.createElement("div",{className:"ssc-head-line w-20 mb"}),react.createElement("div",{className:"ssc-line w-60 mbs"}),react.createElement("div",{className:"ssc-line w-60 mbs"}),react.createElement("div",{className:"ssc-line w-60 mbs"}),react.createElement("div",{className:"ssc-line w-60 mb"}),react.createElement("div",{className:"scc-wrapper pt-16"},react.createElement("div",{className:"ssc-head-line w-10 mt mb"}),react.createElement("div",{className:"ssc-line w-70 mbs"}),react.createElement("div",{className:"ssc-line w-70 mbs"}),react.createElement("div",{className:"ssc-line w-70 mbs"})))),material_MaterialSkeleton=MaterialSkeleton;try{MaterialSkeleton.displayName="MaterialSkeleton",MaterialSkeleton.__docgenInfo={description:"",displayName:"MaterialSkeleton",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/MaterialSkeleton.tsx#MaterialSkeleton"]={docgenInfo:MaterialSkeleton.__docgenInfo,name:"MaterialSkeleton",path:"src/components/material/MaterialSkeleton.tsx#MaterialSkeleton"})}catch(__react_docgen_typescript_loader_error){}var DisclosureSummary=__webpack_require__("./src/components/Disclosures/DisclosureSummary.tsx"),disclosure=__webpack_require__("./src/components/Disclosures/disclosure.tsx");const MaterialDisclosure=({title,icon,children,dataCy})=>react.createElement(disclosure.Z,{dataCy,summary:react.createElement(DisclosureSummary.Z,{title,mainIconPath:icon})},children),material_MaterialDisclosure=MaterialDisclosure;try{MaterialDisclosure.displayName="MaterialDisclosure",MaterialDisclosure.__docgenInfo={description:"",displayName:"MaterialDisclosure",props:{dataCy:{defaultValue:null,description:"",name:"dataCy",required:!0,type:{name:"string"}},title:{defaultValue:null,description:"",name:"title",required:!0,type:{name:"string"}},icon:{defaultValue:null,description:"",name:"icon",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/material/MaterialDisclosure.tsx#MaterialDisclosure"]={docgenInfo:MaterialDisclosure.__docgenInfo,name:"MaterialDisclosure",path:"src/apps/material/MaterialDisclosure.tsx#MaterialDisclosure"})}catch(__react_docgen_typescript_loader_error){}var react_query_es=__webpack_require__("./node_modules/react-query/es/index.js"),ReservationFormListItem=__webpack_require__("./src/components/reservation/ReservationFormListItem.tsx"),Location=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/Location.svg"),Location_default=__webpack_require__.n(Location),Subtitles=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/Subtitles.svg"),Subtitles_default=__webpack_require__.n(Subtitles),Message=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/Message.svg"),Message_default=__webpack_require__.n(Message),LoanHistory=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/LoanHistory.svg"),LoanHistory_default=__webpack_require__.n(LoanHistory),isEqual=__webpack_require__("./node_modules/lodash/isEqual.js"),isEqual_default=__webpack_require__.n(isEqual),fbs=__webpack_require__("./src/core/fbs/fbs.ts"),reservation_helper=__webpack_require__("./src/components/reservation/helper.ts"),forms_helper=__webpack_require__("./src/components/reservation/forms/helper.ts");const ModalReservationFormText=({type,defaultText,header,inputField,patron})=>{const{close}=(0,modal.f)(),queryClient=(0,react_query_es.useQueryClient)(),t=(0,utils_text.X)(),[text,setText]=(0,react.useState)((0,general._M)(defaultText)),{mutate}=(0,fbs.tX)(),{modalId,screenReaderModalDescriptionText,closeModalAriaLabelText}=((type,t)=>({modalId:(0,forms_helper._3)(type),screenReaderModalDescriptionText:t((0,reservation_helper.o9)(type,"screenReaderModalDescriptionText")),closeModalAriaLabelText:t((0,reservation_helper.o9)(type,"closeModalAriaLabelText"))}))(type,t);return react.createElement(modal.Z,{modalId,screenReaderModalDescriptionText,closeModalAriaLabelText},react.createElement(ReservationForm.Z,{title:header.title,description:header.description,onSubmit:()=>{(0,forms_helper.E4)({type,changedText:text,savedText:defaultText,patron,mutate}).then((response=>{response&&queryClient.setQueryData((0,fbs.Tk)(),response)})).catch((e=>{throw setText((0,general._M)(defaultText)),e})).finally((()=>{close((0,forms_helper._3)(type))}))}},react.createElement(TextInput.Z,{description:inputField.description,id:type,label:inputField.label,type:"text",onChange:input=>{setText(input)},value:text})))},forms_ModalReservationFormText=(0,react.memo)(ModalReservationFormText,isEqual_default());try{ModalReservationFormText.displayName="ModalReservationFormText",ModalReservationFormText.__docgenInfo={description:"",displayName:"ModalReservationFormText",props:{type:{defaultValue:null,description:"",name:"type",required:!0,type:{name:"enum",value:[{value:'"email"'},{value:'"sms"'},{value:'"pickup"'},{value:'"interestPeriod"'}]}},defaultText:{defaultValue:null,description:"",name:"defaultText",required:!1,type:{name:"string | undefined"}},header:{defaultValue:null,description:"",name:"header",required:!0,type:{name:"{ title: string; description: string[]; }"}},inputField:{defaultValue:null,description:"",name:"inputField",required:!0,type:{name:"{ description: string; label: string; }"}},patron:{defaultValue:null,description:"",name:"patron",required:!0,type:{name:"PatronV5"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/reservation/forms/ModalReservationFormText.tsx#ModalReservationFormText"]={docgenInfo:ModalReservationFormText.__docgenInfo,name:"ModalReservationFormText",path:"src/components/reservation/forms/ModalReservationFormText.tsx#ModalReservationFormText"})}catch(__react_docgen_typescript_loader_error){}const EmailModal=({patron,patron:{emailAddress}})=>{const t=(0,utils_text.X)();return react.createElement(forms_ModalReservationFormText,{type:"email",defaultText:emailAddress,header:{title:t("modalReservationFormEmailHeaderTitleText"),description:[t("modalReservationFormEmailHeaderDescriptionText")]},inputField:{label:t("modalReservationFormEmailInputFieldLabelText"),description:t("modalReservationFormEmailInputFieldDescriptionText")},patron})},forms_EmailModal=EmailModal;try{EmailModal.displayName="EmailModal",EmailModal.__docgenInfo={description:"",displayName:"EmailModal",props:{patron:{defaultValue:null,description:"",name:"patron",required:!0,type:{name:"PatronV5"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/reservation/forms/EmailModal.tsx#EmailModal"]={docgenInfo:EmailModal.__docgenInfo,name:"EmailModal",path:"src/components/reservation/forms/EmailModal.tsx#EmailModal"})}catch(__react_docgen_typescript_loader_error){}const SmsModal=({patron,patron:{phoneNumber}})=>{const t=(0,utils_text.X)();return react.createElement(forms_ModalReservationFormText,{type:"sms",defaultText:phoneNumber,header:{title:t("modalReservationFormSmsHeaderTitleText"),description:[t("modalReservationFormSmsHeaderDescriptionText")]},inputField:{label:t("modalReservationFormSmsInputFieldLabelText"),description:t("modalReservationFormSmsInputFieldDescriptionText")},patron})},forms_SmsModal=SmsModal;try{SmsModal.displayName="SmsModal",SmsModal.__docgenInfo={description:"",displayName:"SmsModal",props:{patron:{defaultValue:null,description:"",name:"patron",required:!0,type:{name:"PatronV5"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/reservation/forms/SmsModal.tsx#SmsModal"]={docgenInfo:SmsModal.__docgenInfo,name:"SmsModal",path:"src/components/reservation/forms/SmsModal.tsx#SmsModal"})}catch(__react_docgen_typescript_loader_error){}var PickupModal=__webpack_require__("./src/components/reservation/forms/PickupModal.tsx"),NoInterestAfterModal=__webpack_require__("./src/components/reservation/forms/NoInterestAfterModal.tsx");const UserListItems=({patron,patron:{defaultInterestPeriod,preferredPickupBranch,phoneNumber,emailAddress},branches,selectedBranch,selectBranchHandler,selectedInterest,setSelectedInterest,whitelistBranches})=>{const t=(0,utils_text.X)(),config=(0,utils_config.ZR)(),interestPeriods=config("interestPeriodsConfig",{transformer:"jsonParse"}),{open}=(0,modal.f)(),openModal=type=>()=>{open((0,forms_helper._3)(type))},interestPeriod=selectedInterest?(0,reservation_helper.OR)(selectedInterest,interestPeriods,t):(0,reservation_helper.OR)(Number(interestPeriods.defaultInterestPeriod.value),interestPeriods,t),pickupBranch=selectedBranch?(0,reservation_helper.Sp)(selectedBranch,branches):(0,reservation_helper.Sp)(preferredPickupBranch,branches);return react.createElement(react.Fragment,null,defaultInterestPeriod&&react.createElement(react.Fragment,null,react.createElement(ReservationFormListItem.Z,{icon:LoanHistory_default(),title:t("reservationDetailsNoInterestAfterTitleText"),text:interestPeriod,changeHandler:openModal("interestPeriod"),buttonAriaLabel:t("changeInterestPeriodText")}),react.createElement(NoInterestAfterModal.Z,{selectedInterest:selectedInterest??defaultInterestPeriod,setSelectedInterest})),preferredPickupBranch&&whitelistBranches&&react.createElement(react.Fragment,null,react.createElement(ReservationFormListItem.Z,{icon:Location_default(),title:t("reservationDetailsPickUpAtTitleText"),text:pickupBranch,changeHandler:openModal("pickup"),buttonAriaLabel:t("changePickupLocationText")}),react.createElement(PickupModal.Z,{branches:whitelistBranches,defaultBranch:selectedBranch??preferredPickupBranch,selectBranchHandler})),react.createElement(react.Fragment,null,(0,reservation_helper.f2)(config("smsNotificationsForReservationsEnabledConfig"))&&react.createElement(react.Fragment,null,react.createElement(ReservationFormListItem.Z,{icon:Subtitles_default(),title:t("receiveSmsWhenMaterialReadyText"),text:(0,general._M)(phoneNumber),changeHandler:openModal("sms"),buttonAriaLabel:t("changeSmsNumberText")}),react.createElement(forms_SmsModal,{patron})),react.createElement(ReservationFormListItem.Z,{icon:Message_default(),title:t("receiveEmailWhenMaterialReadyText"),text:(0,general._M)(emailAddress),changeHandler:openModal("email"),buttonAriaLabel:t("changeEmailText")}),react.createElement(forms_EmailModal,{patron})))},reservation_UserListItems=UserListItems;try{UserListItems.displayName="UserListItems",UserListItems.__docgenInfo={description:"",displayName:"UserListItems",props:{patron:{defaultValue:null,description:"",name:"patron",required:!0,type:{name:"PatronV5"}},branches:{defaultValue:null,description:"",name:"branches",required:!0,type:{name:"AgencyBranch[]"}},selectedBranch:{defaultValue:null,description:"",name:"selectedBranch",required:!0,type:{name:"string | null"}},selectBranchHandler:{defaultValue:null,description:"",name:"selectBranchHandler",required:!0,type:{name:"(value: string) => void"}},selectedInterest:{defaultValue:null,description:"",name:"selectedInterest",required:!0,type:{name:"number | null"}},setSelectedInterest:{defaultValue:null,description:"",name:"setSelectedInterest",required:!0,type:{name:"(value: number) => void"}},whitelistBranches:{defaultValue:null,description:"",name:"whitelistBranches",required:!0,type:{name:"AgencyBranch[]"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/reservation/UserListItems.tsx#UserListItems"]={docgenInfo:UserListItems.__docgenInfo,name:"UserListItems",path:"src/components/reservation/UserListItems.tsx#UserListItems"})}catch(__react_docgen_typescript_loader_error){}var focus_trap_react=__webpack_require__("./node_modules/focus-trap-react/dist/focus-trap-react.js"),focus_trap_react_default=__webpack_require__.n(focus_trap_react),modal_slice=__webpack_require__("./src/core/modal.slice.ts");const ReservationSucces=({modalId,title,preferredPickupBranch,numberInQueue,reservationCount,holdings})=>{const dispatch=(0,es.I0)(),t=(0,utils_text.X)();return react.createElement(focus_trap_react_default(),{focusTrapOptions:{allowOutsideClick:!0}},react.createElement("section",{className:"reservation-modal reservation-modal--confirm"},react.createElement("h2",{"data-cy":"reservation-success-title-text",className:"text-header-h3 pb-48"},t("reservationSuccesTitleText")),react.createElement("p",{"data-cy":"reservation-success-is-reserved-for-you-text",className:"text-body-medium-regular pb-24"},title," ",t("reservationSuccesIsReservedForYouText")),react.createElement("p",{"data-cy":"number-in-queue-text",className:"text-body-medium-regular pb-24"},react.createElement(material_StockAndReservationInfo,{stockCount:holdings,reservationCount,numberInQueue})),react.createElement("p",{"data-cy":"reservation-success-preferred-pickup-branch-text",className:"text-body-medium-regular pb-48"},t("reservationSuccessPreferredPickupBranchText",{placeholders:{"@branch":preferredPickupBranch}}),"."),react.createElement(Button.z,{dataCy:"reservation-success-close-button",classNames:"reservation-modal__confirm-button",label:t("okButtonText"),buttonType:"none",disabled:!1,collapsible:!1,size:"small",variant:"filled",onClick:()=>{dispatch((0,modal_slice.Mr)({modalId}))}})))},reservation_ReservationSucces=ReservationSucces;try{ReservationSucces.displayName="ReservationSucces",ReservationSucces.__docgenInfo={description:"",displayName:"ReservationSucces",props:{title:{defaultValue:null,description:"",name:"title",required:!0,type:{name:"string"}},preferredPickupBranch:{defaultValue:null,description:"",name:"preferredPickupBranch",required:!0,type:{name:"string"}},modalId:{defaultValue:null,description:"",name:"modalId",required:!0,type:{name:"string"}},numberInQueue:{defaultValue:null,description:"",name:"numberInQueue",required:!1,type:{name:"number | undefined"}},reservationCount:{defaultValue:null,description:"",name:"reservationCount",required:!0,type:{name:"number"}},holdings:{defaultValue:null,description:"",name:"holdings",required:!0,type:{name:"number"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/reservation/ReservationSucces.tsx#ReservationSucces"]={docgenInfo:ReservationSucces.__docgenInfo,name:"ReservationSucces",path:"src/components/reservation/ReservationSucces.tsx#ReservationSucces"})}catch(__react_docgen_typescript_loader_error){}const ReservationError=({reservationResults,setReservationResponse})=>{const t=(0,utils_text.X)(),reservationErrorInfo=reservationResults.some((({result})=>"already_reserved"===result))?{title:t("alreadyReservedText"),description:"",buttonText:t("closeText")}:{title:t("reservationErrorsTitleText"),description:t("reservationErrorsDescriptionText"),buttonText:t("tryAginButtonText")};return react.createElement(focus_trap_react_default(),{focusTrapOptions:{allowOutsideClick:!0}},react.createElement("section",{className:"reservation-modal reservation-modal--confirm"},react.createElement("h2",{className:"text-header-h3 pb-48"},reservationErrorInfo.title),reservationErrorInfo.description&&react.createElement("p",{className:"text-body-medium-regular pb-48"},reservationErrorInfo.description),react.createElement(Button.z,{classNames:"reservation-modal__confirm-button",label:reservationErrorInfo.buttonText,buttonType:"none",disabled:!1,collapsible:!1,size:"small",variant:"filled",onClick:()=>setReservationResponse(null)})))},reservation_ReservationError=ReservationError;try{ReservationError.displayName="ReservationError",ReservationError.__docgenInfo={description:"",displayName:"ReservationError",props:{reservationResults:{defaultValue:null,description:"",name:"reservationResults",required:!0,type:{name:"ReservationResultV2[]"}},setReservationResponse:{defaultValue:null,description:"",name:"setReservationResponse",required:!0,type:{name:"(reservationResponse: ReservationResponseV2 | null) => void"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/reservation/ReservationError.tsx#ReservationError"]={docgenInfo:ReservationError.__docgenInfo,name:"ReservationError",path:"src/components/reservation/ReservationError.tsx#ReservationError"})}catch(__react_docgen_typescript_loader_error){}var useGetAvailability=__webpack_require__("./src/core/utils/useGetAvailability.ts");const reservation_useAlternativeAvailableManifestation=(work,currentManifestationPids)=>{const config=(0,utils_config.ZR)(),[isOtherManifestationPreferred,setIsOtherManifestationPreferred]=(0,react.useState)(!1),[otherManifestationPreferred,setOtherManifestationPreferred]=(0,react.useState)(null),faustIds=(0,general.vH)(work.manifestations.all),{data:availabilityData}=(0,useGetAvailability.Z)({faustIds,config});return(0,useDeepCompareEffect.Z)((()=>{if(availabilityData){const leastReservedData=availabilityData.filter((manifestation=>manifestation.reservable)).sort(((a,b)=>a.reservations-b.reservations)).shift();if(!leastReservedData)return;const leastReservedManifestation=work.manifestations.all.find((manifestation=>(0,general.rp)(manifestation.pid)===leastReservedData.recordId));if(!leastReservedManifestation)return;currentManifestationPids.includes(leastReservedManifestation.pid)||(setIsOtherManifestationPreferred(!0),setOtherManifestationPreferred({...leastReservedManifestation,...leastReservedData}))}}),[availabilityData,currentManifestationPids,work]),{isOtherManifestationPreferred,otherManifestationPreferred}};var PromoBar=__webpack_require__("./src/components/promo-bar/PromoBar.tsx");const InstantLoanSummary=({pid,className})=>{const t=(0,utils_text.X)();return react.createElement("div",{className},react.createElement("div",{className:"pagefold-triangle--small"}),react.createElement(cover.Y,{id:pid,size:"small",animate:!0}),react.createElement("div",null,react.createElement("h2",{className:"text-header-h4 mt-22 mb-4"},t("instantLoanTitleText")),react.createElement("p",{className:"text-small-caption"},t("instantLoanSubTitleText")),react.createElement("div",{className:"instant-loan-underline mt-35"},react.createElement("p",{className:"link-tag text-small-caption"},t("instantLoanUnderlineDescriptionText")),react.createElement("img",{className:"instant-loan-arrow",src:ExpandMore_default(),alt:""}))))},instant_loan_InstantLoanSummary=InstantLoanSummary;try{InstantLoanSummary.displayName="InstantLoanSummary",InstantLoanSummary.__docgenInfo={description:"",displayName:"InstantLoanSummary",props:{pid:{defaultValue:null,description:"",name:"pid",required:!0,type:{name:"`${number}-${string}:${number}`"}},className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/instant-loan/InstantLoanSummary.tsx#InstantLoanSummary"]={docgenInfo:InstantLoanSummary.__docgenInfo,name:"InstantLoanSummary",path:"src/components/instant-loan/InstantLoanSummary.tsx#InstantLoanSummary"})}catch(__react_docgen_typescript_loader_error){}var availability_label_inside=__webpack_require__("./src/components/availability-label/availability-label-inside.tsx"),availability_label_helper=__webpack_require__("./src/components/availability-label/helper.ts");const availability_label_visual=({manifestText,selected,cursorPointer,isAvailable,quantity,availabilityText})=>{const t=(0,utils_text.X)(),getAvailabilityText=availabilityText||t(isAvailable?"availabilityAvailableText":"availabilityUnavailableText");return react.createElement("div",{className:(0,availability_label_helper.QR)({selected,cursorPointer})},react.createElement(availability_label_inside.Z,{selected,isAvailable,manifestText,availabilityText:getAvailabilityText,quantity,isLoading:!1}))};try{availabilitylabelvisual.displayName="availabilitylabelvisual",availabilitylabelvisual.__docgenInfo={description:"",displayName:"availabilitylabelvisual",props:{manifestText:{defaultValue:null,description:"",name:"manifestText",required:!0,type:{name:"string"}},selected:{defaultValue:null,description:"",name:"selected",required:!1,type:{name:"boolean | undefined"}},quantity:{defaultValue:null,description:"",name:"quantity",required:!1,type:{name:"number | undefined"}},cursorPointer:{defaultValue:null,description:"",name:"cursorPointer",required:!1,type:{name:"boolean | undefined"}},isAvailable:{defaultValue:null,description:"",name:"isAvailable",required:!1,type:{name:"boolean | undefined"}},availabilityText:{defaultValue:null,description:"",name:"availabilityText",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/availability-label/availability-label-visual.tsx#availabilitylabelvisual"]={docgenInfo:availabilitylabelvisual.__docgenInfo,name:"availabilitylabelvisual",path:"src/components/availability-label/availability-label-visual.tsx#availabilitylabelvisual"})}catch(__react_docgen_typescript_loader_error){}const InstantLoanBranch=({branch:{branch:{title},materials},materialType})=>react.createElement("div",{className:"instant-loan-branch px-24","data-cy":"instant-loan-branch"},react.createElement("p",{className:"text-header-h5"},title),react.createElement(availability_label_visual,{manifestText:materialType,isAvailable:!0,quantity:materials.length})),instant_loan_InstantLoanBranch=InstantLoanBranch;try{InstantLoanBranch.displayName="InstantLoanBranch",InstantLoanBranch.__docgenInfo={description:"",displayName:"InstantLoanBranch",props:{branch:{defaultValue:null,description:"",name:"branch",required:!0,type:{name:"HoldingsV3"}},materialType:{defaultValue:null,description:"",name:"materialType",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/instant-loan/InstantLoanBranch.tsx#InstantLoanBranch"]={docgenInfo:InstantLoanBranch.__docgenInfo,name:"InstantLoanBranch",path:"src/components/instant-loan/InstantLoanBranch.tsx#InstantLoanBranch"})}catch(__react_docgen_typescript_loader_error){}const InstantLoan=({manifestation,instantLoanBranchHoldings})=>{const{pid,materialTypes}=manifestation,materialType=materialTypes[0].specific;return react.createElement(DisclosureControllable.Z,{id:"instant-loan",className:"pagefold-parent--small disclosure--full-width",summary:react.createElement(instant_loan_InstantLoanSummary,{pid,className:"instant-loan-summary cursor-pointer p-24"}),cyData:"instant-loan"},react.createElement("ul",{className:"instant-loan-branches","data-cy":"instant-loan-branches"},instantLoanBranchHoldings.map((branch=>react.createElement("li",{key:branch.branch.branchId},react.createElement(instant_loan_InstantLoanBranch,{branch,materialType}))))))},instant_loan_InstantLoan=InstantLoan;try{InstantLoan.displayName="InstantLoan",InstantLoan.__docgenInfo={description:"",displayName:"InstantLoan",props:{manifestation:{defaultValue:null,description:"",name:"manifestation",required:!0,type:{name:"Manifestation"}},instantLoanBranchHoldings:{defaultValue:null,description:"",name:"instantLoanBranchHoldings",required:!0,type:{name:"HoldingsV3[]"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/instant-loan/InstantLoan.tsx#InstantLoan"]={docgenInfo:InstantLoan.__docgenInfo,name:"InstantLoan",path:"src/components/instant-loan/InstantLoan.tsx#InstantLoan"})}catch(__react_docgen_typescript_loader_error){}var utils_branches=__webpack_require__("./src/core/utils/branches.tsx"),ModalMessage=__webpack_require__("./src/components/message/modal-message/ModalMessage.tsx"),configuration=__webpack_require__("./src/core/configuration/index.ts");const ReservationModalBody=({selectedManifestations,selectedPeriodical,work})=>{var _reservationResponse$,_manifestation$editio,_openOrderResponse$su,_openOrderResponse$su2;const t=(0,utils_text.X)(),config=(0,utils_config.ZR)(),{defaultInterestDaysForOpenOrder}=(0,configuration.bc)("reservation",configuration.ZP),{matchStrings:instantLoanMatchStrings,threshold:instantLoanThreshold,enabled:instantLoanEnabled}=config("instantLoanConfig",{transformer:"jsonParse"}),branches=config("branchesConfig",{transformer:"jsonParse"}),blacklistBranches=config("blacklistedInstantLoanBranchesConfig",{transformer:"stringToArray"}),whitelistBranches=(0,utils_branches.rM)(branches,blacklistBranches),mainManifestationType=(0,general.cC)(selectedManifestations),{reservableManifestations}=utils_UseReservableManifestations({manifestations:selectedManifestations,type:mainManifestationType}),queryClient=(0,react_query_es.useQueryClient)(),[reservationResponse,setReservationResponse]=(0,react.useState)(null),[openOrderResponse,setOpenOrderResponse]=(0,react.useState)(null),[selectedBranch,setSelectedBranch]=(0,react.useState)(null),[selectedInterest,setSelectedInterest]=(0,react.useState)(null),allPids=(0,general.k7)(selectedManifestations),faustIds=(0,general.TH)(allPids),{mutate:mutateAddReservations}=(0,fbs.kd)(),{mutate:mutateOpenOrder}=(0,graphql.c6)(),userResponse=(0,user.dp)(),holdingsResponse=(0,helper.Lt)({faustIds,config}),{track}=(0,useStatistics.T)(),{otherManifestationPreferred}=reservation_useAlternativeAvailableManifestation(work,allPids);if(!userResponse.data||!holdingsResponse.data)return null;const manifestationsToReserve=(0,reservation_helper._w)(reservableManifestations??[],!!selectedPeriodical),{data:userData}=userResponse,{data:holdingsData}=holdingsResponse,holdings=(0,helper.Vq)(holdingsData),reservations=(0,helper.iT)(holdingsData),{patron}=userData,authorLine=(0,reservation_helper.qT)(selectedManifestations[0],t),expiryDate=selectedInterest?(0,reservation_helper.M1)(selectedInterest):null,pidsFromAnotherLibrary=(0,general.xB)(manifestationsToReserve),reservationSuccess=(null==reservationResponse?void 0:reservationResponse.success)||!1,reservationResults=null==reservationResponse?void 0:reservationResponse.reservationResults,reservationDetails=null==reservationResponse||null===(_reservationResponse$=reservationResponse.reservationResults[0])||void 0===_reservationResponse$?void 0:_reservationResponse$.reservationDetails,manifestation=(null==manifestationsToReserve?void 0:manifestationsToReserve[0])||selectedManifestations[0],editionText=(0,general.bV)(work)&&1!==(null==manifestationsToReserve?void 0:manifestationsToReserve.length)?t("firstAvailableEditionText"):null===(_manifestation$editio=manifestation.edition)||void 0===_manifestation$editio?void 0:_manifestation$editio.summary,instantLoanBranchHoldings=(0,reservation_helper.ZW)(holdingsData[0].holdings,whitelistBranches,instantLoanMatchStrings??[]),instantLoanBranchHoldingsAboveThreshold=(0,reservation_helper.Cg)(instantLoanBranchHoldings,instantLoanThreshold);return react.createElement(react.Fragment,null,!reservationResults&&!openOrderResponse&&react.createElement("section",{className:"reservation-modal"},react.createElement("header",{className:"reservation-modal-header"},react.createElement(cover.Y,{id:manifestation.pid,size:"medium",animate:!0}),react.createElement("div",{className:"reservation-modal-description"},react.createElement("div",{className:"reservation-modal-tag"},(0,general.A3)(selectedManifestations)[0]),react.createElement("h2",{className:"text-header-h2 mt-22 mb-8"},manifestation.titles.main,selectedPeriodical&&` ${selectedPeriodical.displayText}`),authorLine&&react.createElement("p",{className:"text-body-medium-regular"},authorLine))),react.createElement("div",null,react.createElement("div",{className:"reservation-modal-submit"},react.createElement(generic_MaterialAvailabilityTextParagraph,null,react.createElement(material_StockAndReservationInfo,{stockCount:holdings,reservationCount:reservations})),react.createElement(Button.z,{dataCy:"reservation-modal-submit-button",label:t("approveReservationText"),buttonType:"none",variant:"filled",disabled:!1,collapsible:!1,size:"small",onClick:()=>{if(manifestationsToReserve&&!(manifestationsToReserve.length<1))if(pidsFromAnotherLibrary.length>0&&patron){const{patronId,name,emailAddress,preferredPickupBranch}=patron;mutateOpenOrder({input:{pids:[...pidsFromAnotherLibrary],pickUpBranch:selectedBranch?(0,reservation_helper.l2)(selectedBranch):(0,reservation_helper.l2)(preferredPickupBranch),expires:(null==selectedInterest?void 0:selectedInterest.toString())||defaultInterestDaysForOpenOrder.toString(),userParameters:{userId:patronId.toString(),userName:name,userMail:emailAddress}}},{onSuccess:res=>{setOpenOrderResponse(res)}})}else mutateAddReservations({data:(0,reservation_helper.fK)({manifestations:manifestationsToReserve,selectedBranch,expiryDate,periodical:selectedPeriodical})},{onSuccess:res=>{track("click",{id:statistics.h.reservation.id,name:statistics.h.reservation.name,trackedData:work.workId}),setReservationResponse(res),queryClient.invalidateQueries((0,fbs.OL)())}})}})),react.createElement("div",{className:"reservation-modal-list"},react.createElement(ReservationFormListItem.Z,{icon:Various_default(),title:t("editionText"),text:(null==selectedPeriodical?void 0:selectedPeriodical.displayText)||editionText||""}),!(0,general.bV)(work)&&otherManifestationPreferred&&react.createElement(PromoBar.Z,{classNames:"px-35",sticky:!0,type:"info",text:t("materialIsAvailableInAnotherEditionText",{placeholders:{"@title":otherManifestationPreferred.titles.main[0],"@authorAndYear":(0,reservation_helper.qT)(otherManifestationPreferred,t)??"","@reservations":otherManifestationPreferred.reservations}})}),patron&&react.createElement(reservation_UserListItems,{whitelistBranches,patron,branches,selectedBranch,selectBranchHandler:setSelectedBranch,selectedInterest,setSelectedInterest}),instantLoanEnabled&&instantLoanBranchHoldingsAboveThreshold.length>0&&react.createElement(instant_loan_InstantLoan,{manifestation,instantLoanBranchHoldings:instantLoanBranchHoldingsAboveThreshold})))),(null==openOrderResponse||null===(_openOrderResponse$su=openOrderResponse.submitOrder)||void 0===_openOrderResponse$su?void 0:_openOrderResponse$su.status)&&react.createElement(ModalMessage.Z,{title:t("openOrderResponseTitleText"),subTitle:`${manifestation.titles.main[0]} ${t("openOrderResponseIsReservedForYouText")}`,ctaButton:{text:t("okButtonText"),modalId:(0,helper.Aw)(faustIds),dataCy:"reservation-success-close-button"}},openOrderResponse.submitOrder.status&&react.createElement("p",{"data-cy":"open-oprder-response-status-text",className:"text-body-medium-regular pt-24"},(0,reservation_helper.tr)(null===(_openOrderResponse$su2=openOrderResponse.submitOrder)||void 0===_openOrderResponse$su2?void 0:_openOrderResponse$su2.status,t))),reservationSuccess&&reservationDetails&&react.createElement(reservation_ReservationSucces,{modalId:(0,helper.Aw)(faustIds),title:manifestation.titles.main[0],preferredPickupBranch:(0,reservation_helper.Sp)(reservationDetails.pickupBranch,branches),holdings,reservationCount:reservations,numberInQueue:reservationDetails.numberInQueue}),!reservationSuccess&&reservationResults&&react.createElement(reservation_ReservationError,{reservationResults,setReservationResponse}))};try{ReservationModalBody.displayName="ReservationModalBody",ReservationModalBody.__docgenInfo={description:"",displayName:"ReservationModalBody",props:{selectedManifestations:{defaultValue:null,description:"",name:"selectedManifestations",required:!0,type:{name:"Manifestation[]"}},selectedPeriodical:{defaultValue:null,description:"",name:"selectedPeriodical",required:!0,type:{name:"PeriodicalEdition | null"}},work:{defaultValue:null,description:"",name:"work",required:!0,type:{name:"Work"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/reservation/ReservationModalBody.tsx#ReservationModalBody"]={docgenInfo:ReservationModalBody.__docgenInfo,name:"ReservationModalBody",path:"src/components/reservation/ReservationModalBody.tsx#ReservationModalBody"})}catch(__react_docgen_typescript_loader_error){}const ReservationModal=({selectedManifestations,selectedPeriodical=null,work,dataCy})=>{const t=(0,utils_text.X)(),faustIds=(0,general.vH)(selectedManifestations);return react.createElement(modal.Z,{modalId:(0,helper.Aw)(faustIds),screenReaderModalDescriptionText:t("reservationModalScreenReaderModalDescriptionText"),closeModalAriaLabelText:t("reservationModalCloseModalAriaLabelText"),dataCy:dataCy||"reservation-modal"},react.createElement(ReservationModalBody,{selectedManifestations,selectedPeriodical,work}))},reservation_ReservationModal=ReservationModal;try{ReservationModal.displayName="ReservationModal",ReservationModal.__docgenInfo={description:"",displayName:"ReservationModal",props:{selectedManifestations:{defaultValue:null,description:"",name:"selectedManifestations",required:!0,type:{name:"Manifestation[]"}},selectedPeriodical:{defaultValue:{value:"null"},description:"",name:"selectedPeriodical",required:!1,type:{name:"PeriodicalEdition | null | undefined"}},work:{defaultValue:null,description:"",name:"work",required:!0,type:{name:"Work"}},dataCy:{defaultValue:null,description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/reservation/ReservationModal.tsx#ReservationModal"]={docgenInfo:ReservationModal.__docgenInfo,name:"ReservationModal",path:"src/components/reservation/ReservationModal.tsx#ReservationModal"})}catch(__react_docgen_typescript_loader_error){}var FindOnShelfModal=__webpack_require__("./src/components/find-on-shelf/FindOnShelfModal.tsx");const ReservationFindOnShelfModals=({patron,manifestations,selectedPeriodical,setSelectedPeriodical,work})=>{const isUserBlocked=!(!patron||!(0,user.IT)(patron)),titles=manifestations.length>1?work.titles.full:manifestations[0].titles.main,authors=manifestations.length>1?work.creators:manifestations[0].creators;return react.createElement(react.Fragment,null,!(0,user.TF)()&&!isUserBlocked&&react.createElement(reservation_ReservationModal,{selectedManifestations:manifestations,selectedPeriodical,work,dataCy:manifestations.length>1?"reservation-modal-parallel":void 0}),react.createElement(FindOnShelfModal.Z,{manifestations,workTitles:titles,authors,selectedPeriodical,setSelectedPeriodical}))},material_ReservationFindOnShelfModals=ReservationFindOnShelfModals;try{ReservationFindOnShelfModals.displayName="ReservationFindOnShelfModals",ReservationFindOnShelfModals.__docgenInfo={description:"",displayName:"ReservationFindOnShelfModals",props:{patron:{defaultValue:null,description:"",name:"patron",required:!0,type:{name:"PatronV5 | undefined"}},manifestations:{defaultValue:null,description:"",name:"manifestations",required:!0,type:{name:"Manifestation[]"}},selectedPeriodical:{defaultValue:null,description:"",name:"selectedPeriodical",required:!0,type:{name:"PeriodicalEdition | null"}},setSelectedPeriodical:{defaultValue:null,description:"",name:"setSelectedPeriodical",required:!0,type:{name:"Dispatch>"}},work:{defaultValue:null,description:"",name:"work",required:!0,type:{name:"Work"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/material/ReservationFindOnShelfModals.tsx#ReservationFindOnShelfModals"]={docgenInfo:ReservationFindOnShelfModals.__docgenInfo,name:"ReservationFindOnShelfModals",path:"src/apps/material/ReservationFindOnShelfModals.tsx#ReservationFindOnShelfModals"})}catch(__react_docgen_typescript_loader_error){}const material_material=({wid})=>{const t=(0,utils_text.X)(),[selectedManifestations,setSelectedManifestations]=(0,react.useState)(null),[selectedPeriodical,setSelectedPeriodical]=(0,react.useState)(null),{data,isLoading}=(0,graphql.og)({wid}),{data:userData}=(0,user.dp)(),[isUserBlocked,setIsUserBlocked]=(0,react.useState)(null),{track}=(0,useStatistics.T)();if((0,react.useEffect)((()=>{setIsUserBlocked(!(null==userData||!userData.patron||!(0,user.IT)(userData.patron)))}),[userData]),(0,useDeepCompareEffect.Z)((()=>{var _data$work,_data$work2,_data$work3,_data$work4,_data$work4$manifesta,_data$work5;null!=data&&null!==(_data$work=data.work)&&void 0!==_data$work&&_data$work.genreAndForm&&track("click",{id:statistics.h.materialGenre.id,name:statistics.h.materialGenre.name,trackedData:data.work.genreAndForm.join(", ")}),null!=data&&null!==(_data$work2=data.work)&&void 0!==_data$work2&&_data$work2.mainLanguages&&track("click",{id:statistics.h.materialLanguage.id,name:statistics.h.materialLanguage.name,trackedData:data.work.mainLanguages.map((language=>language.display)).join(", ")}),null!=data&&null!==(_data$work3=data.work)&&void 0!==_data$work3&&_data$work3.dk5MainEntry&&track("click",{id:statistics.h.materialTopicNumber.id,name:statistics.h.materialTopicNumber.name,trackedData:data.work.dk5MainEntry.display}),null!=data&&null!==(_data$work4=data.work)&&void 0!==_data$work4&&null!==(_data$work4$manifesta=_data$work4.manifestations.latest.audience)&&void 0!==_data$work4$manifesta&&_data$work4$manifesta.generalAudience&&track("click",{id:statistics.h.materialTopicNumber.id,name:statistics.h.materialTopicNumber.name,trackedData:data.work.manifestations.latest.audience.generalAudience.join(", ")}),null!=data&&null!==(_data$work5=data.work)&&void 0!==_data$work5&&_data$work5.fictionNonfiction&&track("click",{id:statistics.h.materialFictionNonFiction.id,name:statistics.h.materialFictionNonFiction.name,trackedData:data.work.fictionNonfiction.display})}),[data]),(0,react.useEffect)((()=>{if(null==data||!data.work)return;const{work}=data,type=(0,helpers_url.wo)("type"),manifestationsByMaterialType=(0,helper.Ft)(work.manifestations.all);if(!type){const bestMaterialType=(0,helper.jg)(work);return setSelectedManifestations(manifestationsByMaterialType[bestMaterialType]),void(0,helpers_url.ul)({type:bestMaterialType})}setSelectedManifestations(manifestationsByMaterialType[type])}),[data]),isLoading||null==data||!data.work||!selectedManifestations)return react.createElement(material_MaterialSkeleton,null);const{work,work:{manifestations:{all:manifestations},relations:{hasReview}}}=data,pid=(0,general.qQ)(manifestations),detailsListData=(0,helper.Uo)({manifestation:selectedManifestations[0],work,t}),infomediaIds=(0,helper.qY)(selectedManifestations),shouldOpenReviewDisclosure=!!(0,helpers_url.wo)("disclosure");return react.createElement("section",{className:"material-page"},react.createElement(material_MaterialHeader,{wid,work,selectedManifestations,setSelectedManifestations,selectedPeriodical,selectPeriodicalHandler:setSelectedPeriodical},manifestations.map((manifestation=>react.createElement(material_ReservationFindOnShelfModals,{patron:null==userData?void 0:userData.patron,manifestations:[manifestation],selectedPeriodical,work,setSelectedPeriodical}))),infomediaIds.length>0&&!(0,user.TF)()&&!isUserBlocked&&react.createElement(infomedia_InfomediaModal,{selectedManifestations,infoMediaId:infomediaIds[0]}),(0,material_buttons_helper.M0)("DigitalArticleService",selectedManifestations)&&!(0,user.TF)()&&!isUserBlocked&&react.createElement(digital_modal_DigitalModal,{pid:selectedManifestations[0].pid,workId:wid}),(0,helper.VC)(selectedManifestations)&&react.createElement(material_ReservationFindOnShelfModals,{patron:null==userData?void 0:userData.patron,manifestations:selectedManifestations,selectedPeriodical,work,setSelectedPeriodical})),react.createElement(material_MaterialDescription,{pid,work}),react.createElement(material_MaterialDisclosure,{title:`${t("editionsText")} (${manifestations.length})`,icon:Various_default(),dataCy:"material-editions-disclosure"},react.createElement(react.Fragment,null,(0,helper.Oe)(manifestations).map((manifestation=>react.createElement(material_MaterialMainfestationItem,{key:manifestation.pid,manifestation,workId:wid}))))),react.createElement(material_MaterialDisclosure,{dataCy:"material-details-disclosure",title:t("detailsText"),icon:Receipt_default()},react.createElement(material_MaterialDetailsList,{id:`material-details-${wid}`,className:"pl-80 pb-48",data:detailsListData})),hasReview&&hasReview.length>0&&react.createElement(DisclosureControllable.Z,{id:"reviews",showContent:shouldOpenReviewDisclosure,cyData:"material-reviews-disclosure",summary:react.createElement(DisclosureSummary.Z,{title:t("reviewsText"),mainIconPath:Create_default()})},react.createElement(MaterialReviews,{pids:hasReview.map((review=>review.pid))})))};try{material.displayName="material",material.__docgenInfo={description:"",displayName:"material",props:{wid:{defaultValue:null,description:"",name:"wid",required:!0,type:{name:"`work-of:${number}-${string}:${number}`"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/material/material.tsx#material"]={docgenInfo:material.__docgenInfo,name:"material",path:"src/apps/material/material.tsx#material"})}catch(__react_docgen_typescript_loader_error){}const material_entry=(0,utils_config.Rh)((0,url.XL)((0,utils_text.z)((({wid})=>react.createElement(guarded_app.Z,{app:"material"},react.createElement(material_material,{wid}))))));try{materialentry.displayName="materialentry",materialentry.__docgenInfo={description:"",displayName:"materialentry",props:{wid:{defaultValue:null,description:"",name:"wid",required:!0,type:{name:"`work-of:${number}-${string}:${number}`"}},materialUrl:{defaultValue:null,description:"",name:"materialUrl",required:!0,type:{name:"string"}},searchUrl:{defaultValue:null,description:"",name:"searchUrl",required:!0,type:{name:"string"}},advancedSearchUrl:{defaultValue:null,description:"",name:"advancedSearchUrl",required:!0,type:{name:"string"}},fbsBaseUrl:{defaultValue:null,description:"",name:"fbsBaseUrl",required:!0,type:{name:"string"}},loanListEreolenUrl:{defaultValue:null,description:"",name:"loanListEreolenUrl",required:!0,type:{name:"string"}},feesPageUrl:{defaultValue:null,description:"",name:"feesPageUrl",required:!0,type:{name:"string"}},publizonBaseUrl:{defaultValue:null,description:"",name:"publizonBaseUrl",required:!0,type:{name:"string"}},dplCmsBaseUrl:{defaultValue:null,description:"",name:"dplCmsBaseUrl",required:!0,type:{name:"string"}},coverBaseUrl:{defaultValue:null,description:"",name:"coverBaseUrl",required:!0,type:{name:"string"}},materialBaseUrl:{defaultValue:null,description:"",name:"materialBaseUrl",required:!0,type:{name:"string"}},fbiBaseUrl:{defaultValue:null,description:"",name:"fbiBaseUrl",required:!0,type:{name:"string"}},authUrl:{defaultValue:null,description:"",name:"authUrl",required:!0,type:{name:"string"}},ereolenHomepageUrl:{defaultValue:null,description:"",name:"ereolenHomepageUrl",required:!0,type:{name:"string"}},addToFavoritesAriaLabelText:{defaultValue:null,description:"",name:"addToFavoritesAriaLabelText",required:!0,type:{name:"string"}},alertErrorCloseText:{defaultValue:null,description:"",name:"alertErrorCloseText",required:!0,type:{name:"string"}},alertErrorMessageText:{defaultValue:null,description:"",name:"alertErrorMessageText",required:!0,type:{name:"string"}},alreadyReservedText:{defaultValue:null,description:"",name:"alreadyReservedText",required:!0,type:{name:"string"}},approveReservationText:{defaultValue:null,description:"",name:"approveReservationText",required:!0,type:{name:"string"}},availabilityAvailableText:{defaultValue:null,description:"",name:"availabilityAvailableText",required:!0,type:{name:"string"}},availabilityUnavailableText:{defaultValue:null,description:"",name:"availabilityUnavailableText",required:!0,type:{name:"string"}},blockedButtonText:{defaultValue:null,description:"",name:"blockedButtonText",required:!0,type:{name:"string"}},cantReserveText:{defaultValue:null,description:"",name:"cantReserveText",required:!0,type:{name:"string"}},cantViewReviewText:{defaultValue:null,description:"",name:"cantViewReviewText",required:!0,type:{name:"string"}},cantViewText:{defaultValue:null,description:"",name:"cantViewText",required:!0,type:{name:"string"}},changeEmailText:{defaultValue:null,description:"",name:"changeEmailText",required:!0,type:{name:"string"}},changeInterestPeriodText:{defaultValue:null,description:"",name:"changeInterestPeriodText",required:!0,type:{name:"string"}},changePickupLocationText:{defaultValue:null,description:"",name:"changePickupLocationText",required:!0,type:{name:"string"}},changeSmsNumberText:{defaultValue:null,description:"",name:"changeSmsNumberText",required:!0,type:{name:"string"}},chooseOneText:{defaultValue:null,description:"",name:"chooseOneText",required:!0,type:{name:"string"}},closeModalAriaLabelEmailText:{defaultValue:null,description:"",name:"closeModalAriaLabelEmailText",required:!0,type:{name:"string"}},closeModalAriaLabelInterestPeriodText:{defaultValue:null,description:"",name:"closeModalAriaLabelInterestPeriodText",required:!0,type:{name:"string"}},closeModalAriaLabelPickupText:{defaultValue:null,description:"",name:"closeModalAriaLabelPickupText",required:!0,type:{name:"string"}},closeModalAriaLabelSmsText:{defaultValue:null,description:"",name:"closeModalAriaLabelSmsText",required:!0,type:{name:"string"}},closeText:{defaultValue:null,description:"",name:"closeText",required:!0,type:{name:"string"}},daysText:{defaultValue:null,description:"",name:"daysText",required:!0,type:{name:"string"}},descriptionHeadlineText:{defaultValue:null,description:"",name:"descriptionHeadlineText",required:!0,type:{name:"string"}},detailsListAudienceText:{defaultValue:null,description:"",name:"detailsListAudienceText",required:!0,type:{name:"string"}},detailsListAuthorsText:{defaultValue:null,description:"",name:"detailsListAuthorsText",required:!0,type:{name:"string"}},detailsListContributorsText:{defaultValue:null,description:"",name:"detailsListContributorsText",required:!0,type:{name:"string"}},detailsListEditionText:{defaultValue:null,description:"",name:"detailsListEditionText",required:!0,type:{name:"string"}},detailsListFirstEditionYearText:{defaultValue:null,description:"",name:"detailsListFirstEditionYearText",required:!0,type:{name:"string"}},detailsListFirstEditionYearUnknownText:{defaultValue:null,description:"",name:"detailsListFirstEditionYearUnknownText",required:!0,type:{name:"string"}},detailsListGenreAndFormText:{defaultValue:null,description:"",name:"detailsListGenreAndFormText",required:!0,type:{name:"string"}},detailsListIsbnText:{defaultValue:null,description:"",name:"detailsListIsbnText",required:!0,type:{name:"string"}},detailsListLanguageText:{defaultValue:null,description:"",name:"detailsListLanguageText",required:!0,type:{name:"string"}},detailsListOriginalTitleText:{defaultValue:null,description:"",name:"detailsListOriginalTitleText",required:!0,type:{name:"string"}},detailsListPlayTimeText:{defaultValue:null,description:"",name:"detailsListPlayTimeText",required:!0,type:{name:"string"}},detailsListPublisherText:{defaultValue:null,description:"",name:"detailsListPublisherText",required:!0,type:{name:"string"}},detailsListScopeText:{defaultValue:null,description:"",name:"detailsListScopeText",required:!0,type:{name:"string"}},detailsListTypeText:{defaultValue:null,description:"",name:"detailsListTypeText",required:!0,type:{name:"string"}},detailsOfTheMaterialText:{defaultValue:null,description:"",name:"detailsOfTheMaterialText",required:!0,type:{name:"string"}},detailsText:{defaultValue:null,description:"",name:"detailsText",required:!0,type:{name:"string"}},editionsText:{defaultValue:null,description:"",name:"editionsText",required:!0,type:{name:"string"}},editionText:{defaultValue:null,description:"",name:"editionText",required:!0,type:{name:"string"}},etAlText:{defaultValue:null,description:"",name:"etAlText",required:!0,type:{name:"string"}},expandMoreText:{defaultValue:null,description:"",name:"expandMoreText",required:!0,type:{name:"string"}},fictionNonfictionText:{defaultValue:null,description:"",name:"fictionNonfictionText",required:!0,type:{name:"string"}},filmAdaptationsText:{defaultValue:null,description:"",name:"filmAdaptationsText",required:!0,type:{name:"string"}},findOnBookshelfText:{defaultValue:null,description:"",name:"findOnBookshelfText",required:!0,type:{name:"string"}},findOnShelfExpandButtonExplanationText:{defaultValue:null,description:"",name:"findOnShelfExpandButtonExplanationText",required:!0,type:{name:"string"}},findOnShelfModalCloseModalAriaLabelText:{defaultValue:null,description:"",name:"findOnShelfModalCloseModalAriaLabelText",required:!0,type:{name:"string"}},findOnShelfModalListFindOnShelfText:{defaultValue:null,description:"",name:"findOnShelfModalListFindOnShelfText",required:!0,type:{name:"string"}},findOnShelfModalListItemCountText:{defaultValue:null,description:"",name:"findOnShelfModalListItemCountText",required:!0,type:{name:"string"}},findOnShelfModalListMaterialText:{defaultValue:null,description:"",name:"findOnShelfModalListMaterialText",required:!0,type:{name:"string"}},findOnShelfModalNoLocationSpecifiedText:{defaultValue:null,description:"",name:"findOnShelfModalNoLocationSpecifiedText",required:!0,type:{name:"string"}},findOnShelfModalPeriodicalEditionDropdownText:{defaultValue:null,description:"",name:"findOnShelfModalPeriodicalEditionDropdownText",required:!0,type:{name:"string"}},findOnShelfModalPeriodicalYearDropdownText:{defaultValue:null,description:"",name:"findOnShelfModalPeriodicalYearDropdownText",required:!0,type:{name:"string"}},findOnShelfModalScreenReaderModalDescriptionText:{defaultValue:null,description:"",name:"findOnShelfModalScreenReaderModalDescriptionText",required:!0,type:{name:"string"}},findOnShelfTableDescriptionText:{defaultValue:null,description:"",name:"findOnShelfTableDescriptionText",required:!0,type:{name:"string"}},firstAvailableEditionText:{defaultValue:null,description:"",name:"firstAvailableEditionText",required:!0,type:{name:"string"}},getOnlineText:{defaultValue:null,description:"",name:"getOnlineText",required:!0,type:{name:"string"}},goToText:{defaultValue:null,description:"",name:"goToText",required:!0,type:{name:"string"}},reservationDetailsNoInterestAfterTitleText:{defaultValue:null,description:"",name:"reservationDetailsNoInterestAfterTitleText",required:!0,type:{name:"string"}},identifierText:{defaultValue:null,description:"",name:"identifierText",required:!0,type:{name:"string"}},infomediaModalCloseModalAriaLabelText:{defaultValue:null,description:"",name:"infomediaModalCloseModalAriaLabelText",required:!0,type:{name:"string"}},infomediaModalScreenReaderModalDescriptionText:{defaultValue:null,description:"",name:"infomediaModalScreenReaderModalDescriptionText",required:!0,type:{name:"string"}},inSameSeriesText:{defaultValue:null,description:"",name:"inSameSeriesText",required:!0,type:{name:"string"}},inSeriesText:{defaultValue:null,description:"",name:"inSeriesText",required:!0,type:{name:"string"}},instantLoanSubTitleText:{defaultValue:null,description:"",name:"instantLoanSubTitleText",required:!0,type:{name:"string"}},instantLoanTitleText:{defaultValue:null,description:"",name:"instantLoanTitleText",required:!0,type:{name:"string"}},instantLoanUnderlineDescriptionText:{defaultValue:null,description:"",name:"instantLoanUnderlineDescriptionText",required:!0,type:{name:"string"}},interestPeriodsConfig:{defaultValue:null,description:"",name:"interestPeriodsConfig",required:!0,type:{name:"string"}},librariesHaveTheMaterialText:{defaultValue:null,description:"",name:"librariesHaveTheMaterialText",required:!0,type:{name:"string"}},listenOnlineText:{defaultValue:null,description:"",name:"listenOnlineText",required:!0,type:{name:"string"}},loadingText:{defaultValue:null,description:"",name:"loadingText",required:!0,type:{name:"string"}},loginToSeeReviewText:{defaultValue:null,description:"",name:"loginToSeeReviewText",required:!0,type:{name:"string"}},materialHeaderAllEditionsText:{defaultValue:null,description:"",name:"materialHeaderAllEditionsText",required:!0,type:{name:"string"}},materialHeaderAuthorByText:{defaultValue:null,description:"",name:"materialHeaderAuthorByText",required:!0,type:{name:"string"}},materialIsAvailableInAnotherEditionText:{defaultValue:null,description:"",name:"materialIsAvailableInAnotherEditionText",required:!0,type:{name:"string"}},materialIsIncludedText:{defaultValue:null,description:"",name:"materialIsIncludedText",required:!0,type:{name:"string"}},materialIsLoanedOutText:{defaultValue:null,description:"",name:"materialIsLoanedOutText",required:!0,type:{name:"string"}},materialReservationInfoText:{defaultValue:null,description:"",name:"materialReservationInfoText",required:!0,type:{name:"string"}},materialsInStockInfoText:{defaultValue:null,description:"",name:"materialsInStockInfoText",required:!0,type:{name:"string"}},missingDataText:{defaultValue:null,description:"",name:"missingDataText",required:!0,type:{name:"string"}},modalReservationFormEmailHeaderDescriptionText:{defaultValue:null,description:"",name:"modalReservationFormEmailHeaderDescriptionText",required:!0,type:{name:"string"}},modalReservationFormEmailHeaderTitleText:{defaultValue:null,description:"",name:"modalReservationFormEmailHeaderTitleText",required:!0,type:{name:"string"}},modalReservationFormEmailInputFieldDescriptionText:{defaultValue:null,description:"",name:"modalReservationFormEmailInputFieldDescriptionText",required:!0,type:{name:"string"}},modalReservationFormEmailInputFieldLabelText:{defaultValue:null,description:"",name:"modalReservationFormEmailInputFieldLabelText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterHeaderDescriptionText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterHeaderDescriptionText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterHeaderTitleText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterHeaderTitleText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterLabelText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterLabelText",required:!0,type:{name:"string"}},modalReservationFormPickupHeaderDescriptionText:{defaultValue:null,description:"",name:"modalReservationFormPickupHeaderDescriptionText",required:!0,type:{name:"string"}},modalReservationFormPickupHeaderTitleText:{defaultValue:null,description:"",name:"modalReservationFormPickupHeaderTitleText",required:!0,type:{name:"string"}},modalReservationFormPickupLabelText:{defaultValue:null,description:"",name:"modalReservationFormPickupLabelText",required:!0,type:{name:"string"}},modalReservationFormSmsHeaderDescriptionText:{defaultValue:null,description:"",name:"modalReservationFormSmsHeaderDescriptionText",required:!0,type:{name:"string"}},modalReservationFormSmsHeaderTitleText:{defaultValue:null,description:"",name:"modalReservationFormSmsHeaderTitleText",required:!0,type:{name:"string"}},modalReservationFormSmsInputFieldDescriptionText:{defaultValue:null,description:"",name:"modalReservationFormSmsInputFieldDescriptionText",required:!0,type:{name:"string"}},modalReservationFormSmsInputFieldLabelText:{defaultValue:null,description:"",name:"modalReservationFormSmsInputFieldLabelText",required:!0,type:{name:"string"}},notLivingInMunicipalityText:{defaultValue:null,description:"",name:"notLivingInMunicipalityText",required:!0,type:{name:"string"}},numberDescriptionText:{defaultValue:null,description:"",name:"numberDescriptionText",required:!0,type:{name:"string"}},numberInQueueText:{defaultValue:null,description:"",name:"numberInQueueText",required:!0,type:{name:"string"}},okButtonText:{defaultValue:null,description:"",name:"okButtonText",required:!0,type:{name:"string"}},onlineLimitMonthAudiobookInfoText:{defaultValue:null,description:"",name:"onlineLimitMonthAudiobookInfoText",required:!0,type:{name:"string"}},onlineLimitMonthEbookInfoText:{defaultValue:null,description:"",name:"onlineLimitMonthEbookInfoText",required:!0,type:{name:"string"}},openOrderAuthenticationErrorText:{defaultValue:null,description:"",name:"openOrderAuthenticationErrorText",required:!0,type:{name:"string"}},openOrderInvalidOrderText:{defaultValue:null,description:"",name:"openOrderInvalidOrderText",required:!0,type:{name:"string"}},openOrderNoServicerequesterText:{defaultValue:null,description:"",name:"openOrderNoServicerequesterText",required:!0,type:{name:"string"}},openOrderNotOwnedIllLocText:{defaultValue:null,description:"",name:"openOrderNotOwnedIllLocText",required:!0,type:{name:"string"}},openOrderNotOwnedNoIllLocText:{defaultValue:null,description:"",name:"openOrderNotOwnedNoIllLocText",required:!0,type:{name:"string"}},openOrderNotOwnedWrongIllMediumtypeText:{defaultValue:null,description:"",name:"openOrderNotOwnedWrongIllMediumtypeText",required:!0,type:{name:"string"}},openOrderOrsErrorText:{defaultValue:null,description:"",name:"openOrderOrsErrorText",required:!0,type:{name:"string"}},openOrderOwnedOwnCatalogueText:{defaultValue:null,description:"",name:"openOrderOwnedOwnCatalogueText",required:!0,type:{name:"string"}},openOrderOwnedWrongMediumtypeText:{defaultValue:null,description:"",name:"openOrderOwnedWrongMediumtypeText",required:!0,type:{name:"string"}},openOrderResponseIsReservedForYouText:{defaultValue:null,description:"",name:"openOrderResponseIsReservedForYouText",required:!0,type:{name:"string"}},openOrderResponseTitleText:{defaultValue:null,description:"",name:"openOrderResponseTitleText",required:!0,type:{name:"string"}},openOrderServiceUnavailableText:{defaultValue:null,description:"",name:"openOrderServiceUnavailableText",required:!0,type:{name:"string"}},openOrderStatusOwnedAcceptedText:{defaultValue:null,description:"",name:"openOrderStatusOwnedAcceptedText",required:!0,type:{name:"string"}},openOrderUnknownErrorText:{defaultValue:null,description:"",name:"openOrderUnknownErrorText",required:!0,type:{name:"string"}},openOrderUnknownPickupagencyText:{defaultValue:null,description:"",name:"openOrderUnknownPickupagencyText",required:!0,type:{name:"string"}},openOrderUnknownUserText:{defaultValue:null,description:"",name:"openOrderUnknownUserText",required:!0,type:{name:"string"}},openOrderUserBlockedByAgencyText:{defaultValue:null,description:"",name:"openOrderUserBlockedByAgencyText",required:!0,type:{name:"string"}},openOrderUserNoLongerExistOnAgencyText:{defaultValue:null,description:"",name:"openOrderUserNoLongerExistOnAgencyText",required:!0,type:{name:"string"}},openOrderUserNotVerifiedText:{defaultValue:null,description:"",name:"openOrderUserNotVerifiedText",required:!0,type:{name:"string"}},orderDigitalCopyButtonLoadingText:{defaultValue:null,description:"",name:"orderDigitalCopyButtonLoadingText",required:!0,type:{name:"string"}},orderDigitalCopyButtonText:{defaultValue:null,description:"",name:"orderDigitalCopyButtonText",required:!0,type:{name:"string"}},orderDigitalCopyDescriptionText:{defaultValue:null,description:"",name:"orderDigitalCopyDescriptionText",required:!0,type:{name:"string"}},orderDigitalCopyEmailLabelText:{defaultValue:null,description:"",name:"orderDigitalCopyEmailLabelText",required:!0,type:{name:"string"}},orderDigitalCopyFeedbackButtonText:{defaultValue:null,description:"",name:"orderDigitalCopyFeedbackButtonText",required:!0,type:{name:"string"}},orderDigitalCopyFeedbackErrorAgencyNotSubscribedText:{defaultValue:null,description:"",name:"orderDigitalCopyFeedbackErrorAgencyNotSubscribedText",required:!0,type:{name:"string"}},orderDigitalCopyFeedbackErrorInvalidPickupBranchText:{defaultValue:null,description:"",name:"orderDigitalCopyFeedbackErrorInvalidPickupBranchText",required:!0,type:{name:"string"}},orderDigitalCopyFeedbackErrorMissingClientConfigurationText:{defaultValue:null,description:"",name:"orderDigitalCopyFeedbackErrorMissingClientConfigurationText",required:!0,type:{name:"string"}},orderDigitalCopyFeedbackErrorPidNotReservableText:{defaultValue:null,description:"",name:"orderDigitalCopyFeedbackErrorPidNotReservableText",required:!0,type:{name:"string"}},orderDigitalCopyFeedbackErrorUnauthenticatedUserText:{defaultValue:null,description:"",name:"orderDigitalCopyFeedbackErrorUnauthenticatedUserText",required:!0,type:{name:"string"}},orderDigitalCopyFeedbackOkText:{defaultValue:null,description:"",name:"orderDigitalCopyFeedbackOkText",required:!0,type:{name:"string"}},orderDigitalCopyFeedbackTitleText:{defaultValue:null,description:"",name:"orderDigitalCopyFeedbackTitleText",required:!0,type:{name:"string"}},orderDigitalCopyModalCloseModalAriaLabelText:{defaultValue:null,description:"",name:"orderDigitalCopyModalCloseModalAriaLabelText",required:!0,type:{name:"string"}},orderDigitalCopyModalScreenReaderModalDescriptionText:{defaultValue:null,description:"",name:"orderDigitalCopyModalScreenReaderModalDescriptionText",required:!0,type:{name:"string"}},orderDigitalCopyTitleText:{defaultValue:null,description:"",name:"orderDigitalCopyTitleText",required:!0,type:{name:"string"}},outOfText:{defaultValue:null,description:"",name:"outOfText",required:!0,type:{name:"string"}},periodicalSelectEditionText:{defaultValue:null,description:"",name:"periodicalSelectEditionText",required:!0,type:{name:"string"}},periodicalSelectYearText:{defaultValue:null,description:"",name:"periodicalSelectYearText",required:!0,type:{name:"string"}},reservationDetailsPickUpAtTitleText:{defaultValue:null,description:"",name:"reservationDetailsPickUpAtTitleText",required:!0,type:{name:"string"}},queueText:{defaultValue:null,description:"",name:"queueText",required:!0,type:{name:"string"}},ratingIsText:{defaultValue:null,description:"",name:"ratingIsText",required:!0,type:{name:"string"}},readArticleText:{defaultValue:null,description:"",name:"readArticleText",required:!0,type:{name:"string"}},receiveEmailWhenMaterialReadyText:{defaultValue:null,description:"",name:"receiveEmailWhenMaterialReadyText",required:!0,type:{name:"string"}},receiveSmsWhenMaterialReadyText:{defaultValue:null,description:"",name:"receiveSmsWhenMaterialReadyText",required:!0,type:{name:"string"}},removeFromFavoritesAriaLabelText:{defaultValue:null,description:"",name:"removeFromFavoritesAriaLabelText",required:!0,type:{name:"string"}},reservableFromAnotherLibraryText:{defaultValue:null,description:"",name:"reservableFromAnotherLibraryText",required:!0,type:{name:"string"}},reservationErrorsDescriptionText:{defaultValue:null,description:"",name:"reservationErrorsDescriptionText",required:!0,type:{name:"string"}},reservationErrorsTitleText:{defaultValue:null,description:"",name:"reservationErrorsTitleText",required:!0,type:{name:"string"}},reservationModalCloseModalAriaLabelText:{defaultValue:null,description:"",name:"reservationModalCloseModalAriaLabelText",required:!0,type:{name:"string"}},reservationModalScreenReaderModalDescriptionText:{defaultValue:null,description:"",name:"reservationModalScreenReaderModalDescriptionText",required:!0,type:{name:"string"}},reservationSuccesIsReservedForYouText:{defaultValue:null,description:"",name:"reservationSuccesIsReservedForYouText",required:!0,type:{name:"string"}},reservationSuccessPreferredPickupBranchText:{defaultValue:null,description:"",name:"reservationSuccessPreferredPickupBranchText",required:!0,type:{name:"string"}},reservationSuccesTitleText:{defaultValue:null,description:"",name:"reservationSuccesTitleText",required:!0,type:{name:"string"}},reserveBookText:{defaultValue:null,description:"",name:"reserveBookText",required:!0,type:{name:"string"}},reserveText:{defaultValue:null,description:"",name:"reserveText",required:!0,type:{name:"string"}},reviewsText:{defaultValue:null,description:"",name:"reviewsText",required:!0,type:{name:"string"}},saveButtonText:{defaultValue:null,description:"",name:"saveButtonText",required:!0,type:{name:"string"}},screenReaderModalDescriptionEmailText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionEmailText",required:!0,type:{name:"string"}},screenReaderModalDescriptionInterestPeriodText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionInterestPeriodText",required:!0,type:{name:"string"}},screenReaderModalDescriptionPickupText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionPickupText",required:!0,type:{name:"string"}},screenReaderModalDescriptionSmsText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionSmsText",required:!0,type:{name:"string"}},seeOnlineText:{defaultValue:null,description:"",name:"seeOnlineText",required:!0,type:{name:"string"}},shiftText:{defaultValue:null,description:"",name:"shiftText",required:!0,type:{name:"string"}},subjectNumberText:{defaultValue:null,description:"",name:"subjectNumberText",required:!0,type:{name:"string"}},tryAginButtonText:{defaultValue:null,description:"",name:"tryAginButtonText",required:!0,type:{name:"string"}},blacklistedAvailabilityBranchesConfig:{defaultValue:null,description:"",name:"blacklistedAvailabilityBranchesConfig",required:!1,type:{name:"string | undefined"}},blacklistedInstantLoanBranchesConfig:{defaultValue:null,description:"",name:"blacklistedInstantLoanBranchesConfig",required:!0,type:{name:"string"}},blacklistedPickupBranchesConfig:{defaultValue:null,description:"",name:"blacklistedPickupBranchesConfig",required:!1,type:{name:"string | undefined"}},branchesConfig:{defaultValue:null,description:"",name:"branchesConfig",required:!0,type:{name:"string"}},instantLoanConfig:{defaultValue:null,description:"",name:"instantLoanConfig",required:!0,type:{name:"string"}},smsNotificationsForReservationsEnabledConfig:{defaultValue:null,description:"",name:"smsNotificationsForReservationsEnabledConfig",required:!0,type:{name:"boolean"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/material/material.entry.tsx#materialentry"]={docgenInfo:materialentry.__docgenInfo,name:"materialentry",path:"src/apps/material/material.entry.tsx#materialentry"})}catch(__react_docgen_typescript_loader_error){}const material_dev={title:"Apps / Material",component:material_entry,argTypes:{...serviceUrlArgs.Z,searchUrl:{name:"Path to the search result page",defaultValue:"/search",control:{type:"text"}},materialUrl:{name:"Path to the material page",defaultValue:"/work/:workid",control:{type:"text"}},wid:{name:"Work ID",defaultValue:"work-of:870970-basis:52557240",control:{type:"text"}},smsNotificationsForReservationsEnabledConfig:{name:"SMS notifications for reservations is enabled",defaultValue:"1",control:{type:"text"}},blacklistedPickupBranchesConfig:{name:"Blacklisted Pickup branches",defaultValue:"FBS-751032,FBS-751031,FBS-751009,FBS-751027,FBS-751024,DK-775164",control:{type:"text"}},blacklistedAvailabilityBranchesConfig:{name:"Blacklisted Availability branches",defaultValue:"FBS-751032,FBS-751031,FBS-751009,FBS-751027,FBS-751024,DK-775164",control:{type:"text"}},blacklistedInstantLoanBranchesConfig:{name:"Blacklisted Instant Loan branches",defaultValue:"FBS-751032,FBS-751031,FBS-751009,FBS-751027,FBS-751024,DK-775164",control:{type:"text"}},branchesConfig:{name:"Branches",defaultValue:'[\n {\n "branchId":"DK-775120",\n "title":"Højbjerg"\n },\n {\n "branchId":"DK-775122",\n "title":"Beder-Malling"\n },\n {\n "branchId":"DK-775144",\n "title":"Gellerup"\n },\n {\n "branchId":"DK-775167",\n "title":"Lystrup"\n },\n {\n "branchId":"DK-775146",\n "title":"Harlev"\n },\n {\n "branchId":"DK-775168",\n "title":"Skødstrup"\n },\n {\n "branchId":"FBS-751010",\n "title":"Arresten"\n },\n {\n "branchId":"DK-775147",\n "title":"Hasle"\n },\n {\n "branchId":"FBS-751032",\n "title":"Må ikke benyttes"\n },\n {\n "branchId":"FBS-751031",\n "title":"Fjernlager 1"\n },\n {\n "branchId":"DK-775126",\n "title":"Solbjerg"\n },\n {\n "branchId":"FBS-751030",\n "title":"ITK"\n },\n {\n "branchId":"DK-775149",\n "title":"Sabro"\n },\n {\n "branchId":"DK-775127",\n "title":"Tranbjerg"\n },\n {\n "branchId":"DK-775160",\n "title":"Risskov"\n },\n {\n "branchId":"DK-775162",\n "title":"Hjortshøj"\n },\n {\n "branchId":"DK-775140",\n "title":"Åby"\n },\n {\n "branchId":"FBS-751009",\n "title":"Fjernlager 2"\n },\n {\n "branchId":"FBS-751029",\n "title":"Stadsarkivet"\n },\n {\n "branchId":"FBS-751027",\n "title":"Intern"\n },\n {\n "branchId":"FBS-751026",\n "title":"Fælles undervejs"\n },\n {\n "branchId":"FBS-751025",\n "title":"Fællessekretariatet"\n },\n {\n "branchId":"DK-775133",\n "title":"Bavnehøj"\n },\n {\n "branchId":"FBS-751024",\n "title":"Fjernlånte materialer"\n },\n {\n "branchId":"DK-775100",\n "title":"Hovedbiblioteket"\n },\n {\n "branchId":"DK-775170",\n "title":"Trige"\n },\n {\n "branchId":"DK-775150",\n "title":"Tilst"\n },\n {\n "branchId":"DK-775130",\n "title":"Viby"\n },\n {\n "branchId":"DK-775164",\n "title":"Egå"\n }\n]',control:{type:"text"}},availabilityAvailableText:{name:"Availability: available text",defaultValue:"Available",control:{type:"text"}},availabilityUnavailableText:{name:"Availability: unavailable text",defaultValue:"Unavailable",control:{type:"text"}},materialHeaderAllEditionsText:{name:"Text for the fiction edition text",defaultValue:"All editions",control:{type:"text"}},materialHeaderAuthorByText:{name:"By (author)",defaultValue:"By",control:{type:"text"}},periodicalSelectYearText:{name:"Year",defaultValue:"Year",control:{type:"text"}},periodicalSelectEditionText:{name:"Edition/Week",defaultValue:"Edition",control:{type:"text"}},reserveBookText:{name:"Reserve",defaultValue:"Reserve book",control:{type:"text"}},reserveText:{name:"Reserve",defaultValue:"Reserve",control:{type:"text"}},reservableFromAnotherLibraryText:{name:"Reservable on another library",defaultValue:"Reservable on another library",control:{type:"text"}},findOnBookshelfText:{name:"Find on bookshelf",defaultValue:"Find on shelf",control:{type:"text"}},descriptionHeadlineText:{name:"Description headline",defaultValue:"Description",control:{type:"text"}},identifierText:{name:"Identifier/topic text",defaultValue:"Tags",control:{type:"text"}},inSameSeriesText:{name:"In same series as",defaultValue:"In the same series",control:{type:"text"}},numberDescriptionText:{name:"Number",defaultValue:"Nr.",control:{type:"text"}},subjectNumberText:{name:"Subject number (Emnetal)",defaultValue:"Emnetal",control:{type:"text"}},inSeriesText:{name:"In series",defaultValue:"in series",control:{type:"text"}},loginToSeeReviewText:{name:"Login to see Review",defaultValue:"Login to see the review.",control:{type:"text"}},cantViewReviewText:{name:"Cannot view Review",defaultValue:"Cannot view the review.",control:{type:"text"}},ratingIsText:{name:"Rating is",defaultValue:"Rating of this item is @heartCount out of @numberOfHeartsPossible hearts",control:{type:"text"}},outOfText:{name:"X 'out of' Y",defaultValue:"out of",control:{type:"text"}},detailsOfTheMaterialText:{name:"Details of the material",defaultValue:"Details about the material",control:{type:"text"}},editionsText:{name:"Editions",defaultValue:"Editions",control:{type:"text"}},fictionNonfictionText:{name:"Fiction Nonfiction",defaultValue:"Fictional",control:{type:"text"}},detailsText:{name:"Details",defaultValue:"Details",control:{type:"text"}},reviewsText:{name:"Reviews",defaultValue:"Reviews",control:{type:"text"}},detailsListTypeText:{name:"Type",defaultValue:"Type",control:{type:"text"}},detailsListLanguageText:{name:"Language",defaultValue:"Language",control:{type:"text"}},detailsListContributorsText:{name:"Contributors",defaultValue:"Contributors",control:{type:"text"}},detailsListOriginalTitleText:{name:"Original title",defaultValue:"Original title",control:{type:"text"}},detailsListIsbnText:{name:"ISBN",defaultValue:"ISBN",control:{type:"text"}},detailsListScopeText:{name:"Scope",defaultValue:"Scope",control:{type:"text"}},detailsListPublisherText:{name:"Publisher",defaultValue:"Publisher",control:{type:"text"}},detailsListAudienceText:{name:"Audience",defaultValue:"Audience",control:{type:"text"}},detailsListGenreAndFormText:{name:"Genre and form",defaultValue:"Genre",control:{type:"text"}},detailsListFirstEditionYearText:{name:"First edition year",defaultValue:"first edition year",control:{type:"text"}},detailsListPlayTimeText:{name:"Play time",defaultValue:"Play time",control:{type:"text"}},detailsListEditionText:{name:"Edition",defaultValue:"Edition",control:{type:"text"}},detailsListAuthorsText:{name:"Authors",defaultValue:"Authors",control:{type:"text"}},editionText:{name:"Edition",defaultValue:"Edition",control:{type:"text"}},readArticleText:{name:"Read article",defaultValue:"Read article",control:{type:"text"}},loadingText:{name:"Loading",defaultValue:"Loading",control:{type:"text"}},getOnlineText:{name:"Get online",defaultValue:"Get online",control:{type:"text"}},seeOnlineText:{name:"See online",defaultValue:"See online",control:{type:"text"}},listenOnlineText:{name:"Listen online",defaultValue:"Listen online",control:{type:"text"}},cantReserveText:{name:"Can't be reserved",defaultValue:"Can't be reserved",control:{type:"text"}},notLivingInMunicipalityText:{name:"Not living in municipality",defaultValue:"You don't live in the municipality where this library is located.",control:{type:"text"}},blockedButtonText:{name:"Blocked button text",defaultValue:"User blocked",control:{type:"text"}},cantViewText:{name:"Can't be viewed",defaultValue:"Can't be viewed",control:{type:"text"}},goToText:{name:"Go to",defaultValue:"Go to @source",control:{type:"text"}},materialIsLoanedOutText:{name:"Material is loaned out",defaultValue:"Material is loaned out",control:{type:"text"}},findOnShelfExpandButtonExplanationText:{name:"Find on shelf expand button explanation text",defaultValue:"This button opens a modal",control:{type:"text"}},materialIsIncludedText:{name:"Material is included",defaultValue:"This material doesn't count towards your loan quota",control:{type:"text"}},materialsInStockInfoText:{name:"Materials in stock info text",defaultValue:'{"type":"plural","text":["We have 1 copy of the material in stock. ","We have @count copies of the material in stock."]}',control:{type:"text"}},materialReservationInfoText:{name:"Material Reservation info text",defaultValue:'{"type":"plural","text":["1 copy has been reserved.","@count copies have been reserved."]}',control:{type:"text"}},onlineLimitMonthEbookInfoText:{name:"Online limit info text",defaultValue:"You have borrowed @count out of @limit possible e-books this month",control:{type:"text"}},onlineLimitMonthAudiobookInfoText:{name:"Online limit info text",defaultValue:"You have borrowed @count out of @limit possible audio-books this month",control:{type:"text"}},approveReservationText:{name:"Approve reservation",defaultValue:"Approve reservation",control:{type:"text"}},shiftText:{name:"Change",defaultValue:"Change",control:{type:"text"}},reservationDetailsPickUpAtTitleText:{name:"Pick up at",defaultValue:"Pick up at",control:{type:"text"}},receiveSmsWhenMaterialReadyText:{name:"You will receive an SMS when the material is ready",defaultValue:"You will receive an SMS when the material is ready",control:{type:"text"}},receiveEmailWhenMaterialReadyText:{name:"Receive mail when the material is ready",defaultValue:"You will receive an email when the material is ready",control:{type:"text"}},reservationDetailsNoInterestAfterTitleText:{name:"Have no interest after",defaultValue:"Have no interest after",control:{type:"text"}},daysText:{name:"Days",defaultValue:"Days",control:{type:"text"}},reservationSuccesTitleText:{name:"Reservation Success title",defaultValue:"Material is available and reserved for you!",control:{type:"text"}},reservationSuccesIsReservedForYouText:{name:"Reservation Success Title",defaultValue:"is reserved for you",control:{type:"text"}},reservationSuccessPreferredPickupBranchText:{name:"Reservation Preferred pickup branch",defaultValue:"Material is available and you will get a message when it is ready for pickup - pickup at @branch",control:{type:"text"}},reservationErrorsTitleText:{name:"Reservation Error title",defaultValue:"Failed to reserve the material",control:{type:"text"}},reservationErrorsDescriptionText:{name:"Reservation Error description",defaultValue:"We're sorry. Unfortunately, there has been an error. Try again, please.",control:{type:"text"}},tryAginButtonText:{name:"Try again button text",defaultValue:"Try again",control:{type:"text"}},okButtonText:{name:"Ok button text",defaultValue:"Ok",control:{type:"text"}},missingDataText:{name:"Missing data text",defaultValue:"Missing data",control:{type:"text"}},reservationModalScreenReaderModalDescriptionText:{name:"Reservation modal screen reader description",defaultValue:"Modal for reservation",control:{type:"text"}},reservationModalCloseModalAriaLabelText:{name:"Close Reservation modal",defaultValue:"Close reservation modal",control:{type:"text"}},librariesHaveTheMaterialText:{name:"Libraries have the material",defaultValue:"libraries have material",control:{type:"text"}},findOnShelfModalScreenReaderModalDescriptionText:{name:"Reservation modal screen reader description",defaultValue:"Modal for reservation",control:{type:"text"}},findOnShelfModalCloseModalAriaLabelText:{name:"Close findOnShelf modal",defaultValue:"Close reservation modal",control:{type:"text"}},findOnShelfTableDescriptionText:{name:"Find on shelf table description",defaultValue:"Find @work on shelf in the @branch branch",control:{type:"text"}},findOnShelfModalListMaterialText:{name:"Material",defaultValue:"Material",control:{type:"text"}},findOnShelfModalListFindOnShelfText:{name:"Find it on shelf",defaultValue:"Find it on shelf",control:{type:"text"}},findOnShelfModalListItemCountText:{name:"Home",defaultValue:"home",control:{type:"text"}},findOnShelfModalNoLocationSpecifiedText:{name:"No location for find on shelf specified",defaultValue:"-",control:{type:"text"}},findOnShelfModalPeriodicalYearDropdownText:{name:"Find on shelf modal periodical dropdown - choose year",defaultValue:"Choose periodical year",control:{type:"text"}},findOnShelfModalPeriodicalEditionDropdownText:{name:"Find on shelf modal periodical dropdown - choose edition/volume",defaultValue:"Choose periodical edition",control:{type:"text"}},numberInQueueText:{name:"Number in queue text",defaultValue:"You are number @number in the queue.",control:{type:"text"}},alreadyReservedText:{name:"Already reserved text",defaultValue:"You already reserved this material",control:{type:"text"}},closeText:{name:"Close text",defaultValue:"Close",control:{type:"text"}},modalReservationFormEmailHeaderTitleText:{name:"Modal reservation form email header title",defaultValue:"Change email",control:{type:"text"}},modalReservationFormEmailHeaderDescriptionText:{name:"Modal reservation form email header description",defaultValue:"If you wish to receive notification emails you can add or change your email address here.",control:{type:"text"}},modalReservationFormEmailInputFieldLabelText:{name:"Modal reservation form email input field label",defaultValue:"Email",control:{type:"text"}},modalReservationFormEmailInputFieldDescriptionText:{name:"Modal reservation form email input field description",defaultValue:"Add email",control:{type:"text"}},modalReservationFormSmsHeaderTitleText:{name:"Modal reservation form sms header title",defaultValue:"Change phone number",control:{type:"text"}},modalReservationFormSmsHeaderDescriptionText:{name:"Modal reservation form sms header description",defaultValue:"If you wish to receive notification sms you can add or change your phone number here.",control:{type:"text"}},modalReservationFormSmsInputFieldLabelText:{name:"Modal reservation form sms input field label",defaultValue:"Phone number",control:{type:"text"}},modalReservationFormSmsInputFieldDescriptionText:{name:"Modal reservation form sms input field description",defaultValue:"Phone number",control:{type:"text"}},etAlText:{name:"Et al. Text",defaultValue:"et al.",control:{type:"text"}},modalReservationFormPickupHeaderTitleText:{name:"Modal reservation form pickup header title",defaultValue:"Change pick-up location",control:{type:"text"}},modalReservationFormPickupHeaderDescriptionText:{name:"Modal reservation form pickup header description",defaultValue:"If you wish to change the pick-up location for your reservation, you can do it here.",control:{type:"text"}},modalReservationFormPickupLabelText:{name:"Modal reservation form pickup branch input label",defaultValue:"Change pickup location for your reservation.",control:{type:"text"}},chooseOneText:{name:"Choose one text",defaultValue:"Choose one",control:{type:"text"}},modalReservationFormNoInterestAfterHeaderTitleText:{name:"Modal reservation form no interest after header title",defaultValue:"Change date of interest",control:{type:"text"}},modalReservationFormNoInterestAfterHeaderDescriptionText:{name:"Modal reservation form no interest after header description",defaultValue:"If you wish to change the amount of time after which you're no longer interested in the material, you can do it here.",control:{type:"text"}},modalReservationFormNoInterestAfterLabelText:{name:"Modal reservation form no interest after input label",defaultValue:"Change the amount of time after which you're no longer interested in this material.",control:{type:"text"}},infomediaModalScreenReaderModalDescriptionText:{name:"Infomedia modal screen reader description",defaultValue:"Modal for infomedia",control:{type:"text"}},infomediaModalCloseModalAriaLabelText:{name:"Close infomedia modal",defaultValue:"Close infomedia modal",control:{type:"text"}},saveButtonText:{name:"Save button text",defaultValue:"Save",control:{type:"text"}},orderDigitalCopyModalScreenReaderModalDescriptionText:{name:"Order digital copy modal screen reader description",defaultValue:"Modal for Order digital copy",control:{type:"text"}},orderDigitalCopyModalCloseModalAriaLabelText:{name:"Close order digital copy modal",defaultValue:"Close Order digital copy modal",control:{type:"text"}},orderDigitalCopyTitleText:{name:"Order digital copy title text",defaultValue:"Order digital copy",control:{type:"text"}},orderDigitalCopyDescriptionText:{name:"Order digital copy description text",defaultValue:"You can order a digital copy of this material. The digital copy will be sent to your email address.",control:{type:"text"}},orderDigitalCopyButtonText:{name:"Order digital copy button text",defaultValue:"Order digital copy",control:{type:"text"}},orderDigitalCopyButtonLoadingText:{name:"Order digital copy button loading text",defaultValue:"Ordering digital copy",control:{type:"text"}},orderDigitalCopyFeedbackTitleText:{name:"Order digital copy feedback title",defaultValue:"Digital copy receipt",control:{type:"text"}},orderDigitalCopyFeedbackErrorAgencyNotSubscribedText:{name:"Order digital copy agency not subscribed",defaultValue:"The agency is not subscribed to the service. You can order the digital copy by contacting the agency.",control:{type:"text"}},orderDigitalCopyFeedbackErrorInvalidPickupBranchText:{name:"Order digital copy invalid pickup branch",defaultValue:"The pickup branch is not valid. You can order the digital copy by contacting the agency.",control:{type:"text"}},orderDigitalCopyFeedbackErrorMissingClientConfigurationText:{name:"Order digital copy missing client configuration",defaultValue:"The client configuration is missing. You can order the digital copy by contacting the agency.",control:{type:"text"}},orderDigitalCopyFeedbackErrorPidNotReservableText:{name:"Order digital copy pid not reservable",defaultValue:"The material is not reservable. You can order the digital copy by contacting the agency.",control:{type:"text"}},orderDigitalCopyFeedbackErrorUnauthenticatedUserText:{name:"Order digital copy unauthenticated user",defaultValue:"You are not logged in. You can order the digital copy by contacting the agency.",control:{type:"text"}},orderDigitalCopyFeedbackOkText:{name:"Order digital copy success description text",defaultValue:"The digital copy has been ordered. You will receive an email when the digital copy is ready.",control:{type:"text"}},orderDigitalCopyFeedbackButtonText:{name:"Order digital copy success button text",defaultValue:"Close",control:{type:"text"}},orderDigitalCopyEmailLabelText:{name:"Order digital copy error email text",defaultValue:"Email",control:{type:"text"}},authUrl:{name:"Url where user can authenticate",defaultValue:"",control:{type:"text"}},materialIsAvailableInAnotherEditionText:{name:"Skip queue material is available in another edition",defaultValue:"Skip the queue - The material is available in another edition - @title @authorAndYear - reservations: @reservations",control:{type:"text"}},detailsListFirstEditionYearUnknownText:{name:"Unknown",defaultValue:"Unknown",control:{type:"text"}},addToFavoritesAriaLabelText:{control:{type:"text"},defaultValue:"Add @title to favorites list"},removeFromFavoritesAriaLabelText:{control:{type:"text"},defaultValue:"Remove @title from favorites list"},firstAvailableEditionText:{name:"First available edition",defaultValue:"First available edition",control:{type:"text"}},filmAdaptationsText:{name:"Film adaptations text",defaultValue:"Film adaptations",control:{type:"text"}},alertErrorCloseText:{name:"Alert error close text",defaultValue:"close",control:{type:"text"}},alertErrorMessageText:{name:"Alert error message text",defaultValue:"An error occurred",control:{type:"text"}},expandMoreText:{name:"Expand more text",defaultValue:"Expand more",control:{type:"text"}},changeInterestPeriodText:{name:"Change interest period text",defaultValue:"Change interest period",control:{type:"text"}},changePickupLocationText:{name:"Change pickup location text",defaultValue:"Change pickup location",control:{type:"text"}},changeSmsNumberText:{name:"Change sms number text",defaultValue:"Change sms number",control:{type:"text"}},changeEmailText:{name:"Change email text",defaultValue:"Change email",control:{type:"text"}},screenReaderModalDescriptionInterestPeriodText:{name:"Screen reader modal description for interest period",defaultValue:"Change interest period modal",control:{type:"text"}},closeModalAriaLabelInterestPeriodText:{name:"Close modal aria-label interest period ",defaultValue:"Close interest period modal",control:{type:"text"}},screenReaderModalDescriptionPickupText:{name:"Screen reader modal description for pickup",defaultValue:"Change pickup location modal",control:{type:"text"}},closeModalAriaLabelPickupText:{name:"Close modal aria-label pickup",defaultValue:"Close pickup location modal",control:{type:"text"}},screenReaderModalDescriptionSmsText:{name:"Screen reader modal description for sms",defaultValue:"Change mobile number modal",control:{type:"text"}},closeModalAriaLabelSmsText:{name:"Close modal aria-label sms",defaultValue:"Close change mobile number modal",control:{type:"text"}},screenReaderModalDescriptionEmailText:{name:"Screen reader modal description for email",defaultValue:"Change email modal",control:{type:"text"}},closeModalAriaLabelEmailText:{name:"Close modal aria-label email",defaultValue:"Close change email modal",control:{type:"text"}},instantLoanTitleText:{name:"Instant loan title",control:{type:"text"},defaultValue:"Hent bogen nu"},instantLoanSubTitleText:{name:"Instant loan subtitle",control:{type:"text"},defaultValue:"Spring køen over og hent bogen nu på"},instantLoanUnderlineDescriptionText:{name:"Instant loan underline description",control:{type:"text"},defaultValue:"Bogen er tilgængelig på disse biblioteker nær dig"},instantLoanConfig:{name:"Instant loan config",control:{type:"text"},defaultValue:'{\n "threshold": "1",\n "matchStrings": ["31 dages lånetid til alm lånere"],\n "enabled": "true" }'},interestPeriodsConfig:{defaultValue:'{ "interestPeriods":[ { "value":14, "label":"14 days" }, { "value":30, "label":"1 month" }, { "value":60, "label":"2 months" }, { "value":90, "label":"3 months" }, { "value":180, "label":"6 months" }, { "value":365, "label":"1 year" } ], "defaultInterestPeriod":{ "value":"14", "label":"14 days" } }',control:{type:"text"}},openOrderResponseTitleText:{name:"Reservation Success title",defaultValue:"Order from another library:",control:{type:"text"}},openOrderResponseIsReservedForYouText:{name:"Reservation Success Title",defaultValue:"is ordered to your library",control:{type:"text"}},openOrderAuthenticationErrorText:{name:"Open order authentication error text",defaultValue:"Authentication error occurred",control:{type:"text"}},openOrderUserBlockedByAgencyText:{name:"Open order user blocked by agency text",defaultValue:"You are blocked by the agency",control:{type:"text"}},openOrderUserNotVerifiedText:{name:"Open order user not verified text",defaultValue:"User could not be verified",control:{type:"text"}},openOrderUserNoLongerExistOnAgencyText:{name:"Open order user no longer exists on agency text",defaultValue:"User no longer exists at the specified agency",control:{type:"text"}},openOrderInvalidOrderText:{name:"Open order invalid order text",defaultValue:"Your order is invalid",control:{type:"text"}},openOrderNotOwnedIllLocText:{name:"Open order item localized for ILL text",defaultValue:"Item not available at pickup agency but localized for ILL",control:{type:"text"}},openOrderNotOwnedNoIllLocText:{name:"Open order item not localized for ILL text",defaultValue:"Item not available and not localized for ILL",control:{type:"text"}},openOrderNotOwnedWrongIllMediumtypeText:{name:"Open order wrong ILL medium type text",defaultValue:"Item not available, ILL of this medium type not accepted",control:{type:"text"}},openOrderNoServicerequesterText:{name:"Open order no service requester text",defaultValue:"Service requester is obligatory",control:{type:"text"}},openOrderOrsErrorText:{name:"Open order ORS error text",defaultValue:"Error occurred while sending order to ORS",control:{type:"text"}},openOrderStatusOwnedAcceptedText:{name:"Open order status owned accepted text",defaultValue:"Your order is accepted",control:{type:"text"}},openOrderOwnedOwnCatalogueText:{name:"Open order available in own catalogue text",defaultValue:"Item available, order through the library's catalogue",control:{type:"text"}},openOrderOwnedWrongMediumtypeText:{name:"Open order wrong medium type for available item text",defaultValue:"Item available but medium type not accepted",control:{type:"text"}},openOrderServiceUnavailableText:{name:"Open order service unavailable text",defaultValue:"Service is currently unavailable",control:{type:"text"}},openOrderUnknownErrorText:{name:"Open order unknown error text",defaultValue:"An unknown error occurred",control:{type:"text"}},openOrderUnknownPickupagencyText:{name:"Open order unknown pickup agency text",defaultValue:"Specified pickup agency not found",control:{type:"text"}},openOrderUnknownUserText:{name:"Open order unknown user text",defaultValue:"User not found",control:{type:"text"}}}},Template=args=>react.createElement(material_entry,args),Default=Template.bind({});Default.args={};const Periodical=Template.bind({});Periodical.args={wid:"work-of:870970-basis:06373674"};const Infomedia=Template.bind({});Infomedia.args={wid:"work-of:870971-avis:35731733"};const HarryPotter=Template.bind({});HarryPotter.args={wid:"work-of:870970-basis:22629344"};const TurenGårTilRom=Template.bind({});TurenGårTilRom.args={wid:"work-of:870970-basis:61991484"};const Digital=Template.bind({});Digital.args={wid:"work-of:870971-tsart:34310815"};const EBogPrinsenHarry=Template.bind({});EBogPrinsenHarry.args={wid:"work-of:870970-basis:54129807"};const EBogBlaTitle=Template.bind({});EBogBlaTitle.args={wid:"work-of:870970-basis:52880831"};const LangePeter=Template.bind({});LangePeter.args={wid:"work-of:870970-basis:01196669"};const material_dev_InstantLoan=Template.bind({});material_dev_InstantLoan.args={wid:"work-of:870970-basis:134015012"};const Dinosaurierfedern=Template.bind({});Dinosaurierfedern.args={wid:"work-of:870970-basis:44805421"};const Underverden=Template.bind({});Underverden.args={wid:"work-of:870970-basis:52886619"};const overbygningsMatriale=Template.bind({});overbygningsMatriale.args={wid:"work-of:870970-basis:135721719"}},"./src/apps/menu/menu.dev.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{UserMenu:()=>UserMenu,default:()=>menu_dev});var react=__webpack_require__("./node_modules/react/index.js"),serviceUrlArgs=__webpack_require__("./src/core/storybook/serviceUrlArgs.ts"),icon_profile=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/basic/icon-profile.svg"),icon_profile_default=__webpack_require__.n(icon_profile),url=__webpack_require__("./src/core/utils/url.tsx"),utils_text=__webpack_require__("./src/core/utils/text.tsx"),Link=__webpack_require__("./src/components/atoms/links/Link.tsx"),modal=__webpack_require__("./src/core/utils/modal.tsx"),modal_helpers=__webpack_require__("./src/core/utils/helpers/modal-helpers.ts");const menu_not_logged_in=()=>{const t=(0,utils_text.X)(),u=(0,url.J_)(),menuLoginUrl=u("menuLoginUrl"),menuSignUpUrl=u("menuSignUpUrl"),{userMenuAnonymous:userMenuAnonymousModalId}=(0,modal_helpers.GM)();return react.createElement(modal.Z,{classNames:"modal-right modal--no-padding",modalId:userMenuAnonymousModalId,closeModalAriaLabelText:t("menuNotAuthenticatedCloseButtonText"),screenReaderModalDescriptionText:t("menuNotAuthenticatedModalDescriptionText"),isSlider:!0},react.createElement("div",{className:"modal-login modal-login--anonymous"},react.createElement(Link.Z,{href:menuLoginUrl,className:"btn-primary btn-filled btn-large arrow__hover--right-small"},t("menuLoginText")),react.createElement(Link.Z,{href:menuSignUpUrl,className:"mt-32 link-tag color-secondary-gray modal-login__btn-create-profile"},t("menuSignUpText"))))};try{menunotloggedin.displayName="menunotloggedin",menunotloggedin.__docgenInfo={description:"",displayName:"menunotloggedin",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/menu/menu-not-logged-in/menu-not-logged-in.tsx#menunotloggedin"]={docgenInfo:menunotloggedin.__docgenInfo,name:"menunotloggedin",path:"src/apps/menu/menu-not-logged-in/menu-not-logged-in.tsx#menunotloggedin"})}catch(__react_docgen_typescript_loader_error){}var user=__webpack_require__("./src/core/utils/helpers/user.ts");const MenuNavigationItem=({loansCount,reservationCount,feeCount,menuNavigationItem})=>{const dataMap={1:loansCount,2:reservationCount,4:feeCount},{link,name,dataId}=menuNavigationItem;return react.createElement("li",{className:"link-filters mb-16"},react.createElement("div",{className:"link-filters__tag-wrapper"},react.createElement("a",{href:link,className:"link-tag link-tag link-filters__tag","aria-label":`${name} ${dataMap[dataId]||""}`},name),0!==dataMap[dataId]&&react.createElement("span",{className:"link-filters__counter","aria-hidden":"true"},dataMap[dataId])))},menu_navigation_list_MenuNavigationItem=MenuNavigationItem;try{MenuNavigationItem.displayName="MenuNavigationItem",MenuNavigationItem.__docgenInfo={description:"",displayName:"MenuNavigationItem",props:{loansCount:{defaultValue:null,description:"",name:"loansCount",required:!0,type:{name:"number"}},reservationCount:{defaultValue:null,description:"",name:"reservationCount",required:!0,type:{name:"number"}},feeCount:{defaultValue:null,description:"",name:"feeCount",required:!0,type:{name:"number"}},menuNavigationItem:{defaultValue:null,description:"",name:"menuNavigationItem",required:!0,type:{name:"MenuNavigationDataType"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/menu/menu-navigation-list/MenuNavigationItem.tsx#MenuNavigationItem"]={docgenInfo:MenuNavigationItem.__docgenInfo,name:"MenuNavigationItem",path:"src/apps/menu/menu-navigation-list/MenuNavigationItem.tsx#MenuNavigationItem"})}catch(__react_docgen_typescript_loader_error){}var fbs=__webpack_require__("./src/core/fbs/fbs.ts"),utils_config=__webpack_require__("./src/core/utils/config.tsx"),dashboard_notification_list=__webpack_require__("./src/apps/dashboard/dashboard-notification-list/dashboard-notification-list.tsx"),useReservations=__webpack_require__("./src/core/utils/useReservations.tsx"),useLoans=__webpack_require__("./src/core/utils/useLoans.tsx");const MenuLoggedInContent=({pageSize})=>{var _userData$patron;const t=(0,utils_text.X)(),u=(0,url.J_)(),userProfileUrl=u("userProfileUrl"),logoutUrl=u("logoutUrl"),config=(0,utils_config.ZR)(),{all:{reservations}}=(0,useReservations.Z)(),{all:{loans,overdue:loansOverdue,soonOverdue:loansSoonOverdue}}=(0,useLoans.Z)(),{data:patronData}=(0,user.dp)(),{data:fbsFees}=(0,fbs.CI)(),menuNavigationData=config("menuNavigationDataConfig",{transformer:"jsonParse"}),[userData,setUserData]=(0,react.useState)(),[feeCount,setFeeCount]=(0,react.useState)(0);(0,react.useEffect)((()=>{setUserData(patronData)}),[patronData]),(0,react.useEffect)((()=>{fbsFees&&setFeeCount(fbsFees.length)}),[fbsFees]);const showNotifications=0!==loansOverdue.length||0!==loansSoonOverdue.length||0!==reservations.length;return react.createElement("div",{className:"modal-login modal-login--authenticated"},react.createElement("div",{className:"modal-login__container"},react.createElement("div",{className:"modal-header"},react.createElement("div",{className:"modal-header__avatar"},react.createElement("div",{className:"avatar bg-global-secondary"},react.createElement("img",{src:icon_profile_default(),alt:""}))),react.createElement("div",{className:"modal-header__name text-header-h4","data-cy":"menu-patron-name"},null==userData||null===(_userData$patron=userData.patron)||void 0===_userData$patron?void 0:_userData$patron.name),react.createElement(Link.Z,{href:userProfileUrl,className:"link-tag modal-header__link color-secondary-gray"},t("menuUserProfileUrlText"))),showNotifications&&react.createElement("div",{className:"modal-profile__container"},react.createElement(dashboard_notification_list.Z,{pageSize,columns:!1})),react.createElement("nav",{className:"modal-profile__container","aria-label":t("menuProfileLinksAriaLabelText")},react.createElement("ul",{className:"modal-profile__links"},menuNavigationData.map((menuNavigationItem=>react.createElement(menu_navigation_list_MenuNavigationItem,{menuNavigationItem,loansCount:loans.length,reservationCount:reservations.length,feeCount}))))),react.createElement("div",{className:"modal-profile__btn-logout mx-32"},react.createElement(Link.Z,{className:"btn-primary btn-filled btn-large arrow__hover--right-small",href:logoutUrl},t("menuLogOutText")))))},menu_logged_in_MenuLoggedInContent=MenuLoggedInContent;try{MenuLoggedInContent.displayName="MenuLoggedInContent",MenuLoggedInContent.__docgenInfo={description:"",displayName:"MenuLoggedInContent",props:{pageSize:{defaultValue:null,description:"",name:"pageSize",required:!0,type:{name:"number"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/menu/menu-logged-in/MenuLoggedInContent.tsx#MenuLoggedInContent"]={docgenInfo:MenuLoggedInContent.__docgenInfo,name:"MenuLoggedInContent",path:"src/apps/menu/menu-logged-in/MenuLoggedInContent.tsx#MenuLoggedInContent"})}catch(__react_docgen_typescript_loader_error){}const menu_logged_in=({pageSize})=>{const{userMenuAuthenticated:userMenuAuthenticatedModalId}=(0,modal_helpers.GM)(),t=(0,utils_text.X)();return react.createElement(modal.Z,{modalId:userMenuAuthenticatedModalId,classNames:"modal-right modal--no-padding",closeModalAriaLabelText:t("menuAuthenticatedCloseButtonText"),screenReaderModalDescriptionText:t("menuAuthenticatedModalDescriptionText"),isSlider:!0},react.createElement(menu_logged_in_MenuLoggedInContent,{pageSize}))};try{menuloggedin.displayName="menuloggedin",menuloggedin.__docgenInfo={description:"",displayName:"menuloggedin",props:{pageSize:{defaultValue:null,description:"",name:"pageSize",required:!0,type:{name:"number"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/menu/menu-logged-in/menu-logged-in.tsx#menuloggedin"]={docgenInfo:menuloggedin.__docgenInfo,name:"menuloggedin",path:"src/apps/menu/menu-logged-in/menu-logged-in.tsx#menuloggedin"})}catch(__react_docgen_typescript_loader_error){}var TextLineSkeleton=__webpack_require__("./src/components/skeletons/TextLineSkeleton.tsx");const menu_menu=({pageSize})=>{var _userData$patron;const{open}=(0,modal.f)(),t=(0,utils_text.X)(),{userMenuAuthenticated:userMenuAuthenticatedModalId,userMenuAnonymous:userMenuAnonymousModalId}=(0,modal_helpers.GM)(),{isLoading,data:userData}=(0,user.dp)(),openMenu=()=>{(0,user.TF)()?open(userMenuAnonymousModalId):open(userMenuAuthenticatedModalId)};return react.createElement(react.Fragment,null,react.createElement("button",{className:"header__menu-profile header__button btn-ui",type:"button","aria-label":t("menuUserIconAriaLabelText"),onClick:()=>openMenu(),onKeyDown:e=>"Enter"===e.key&&openMenu(),tabIndex:0},react.createElement("img",{src:icon_profile_default(),alt:""}),isLoading&&react.createElement("span",{className:"text-small-caption"},react.createElement(TextLineSkeleton.Z,{width:50})),(null==userData||null===(_userData$patron=userData.patron)||void 0===_userData$patron?void 0:_userData$patron.name)&&react.createElement("span",{className:"text-small-caption"},userData.patron.name)),react.createElement(menu_logged_in,{pageSize}),react.createElement(menu_not_logged_in,null))};try{menu.displayName="menu",menu.__docgenInfo={description:"",displayName:"menu",props:{pageSize:{defaultValue:null,description:"",name:"pageSize",required:!0,type:{name:"number"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/menu/menu.tsx#menu"]={docgenInfo:menu.__docgenInfo,name:"menu",path:"src/apps/menu/menu.tsx#menu"})}catch(__react_docgen_typescript_loader_error){}var general=__webpack_require__("./src/core/utils/helpers/general.ts");const menu_entry=(0,url.XL)((0,utils_config.Rh)((0,utils_text.z)((({pageSizeDesktop,pageSizeMobile})=>{const pageSize=(0,general.Rh)({desktop:pageSizeDesktop,mobile:pageSizeMobile},"pageSizeLoanList");return react.createElement(menu_menu,{pageSize})}))));try{menuentry.displayName="menuentry",menuentry.__docgenInfo={description:"",displayName:"menuentry",props:{menuUserProfileUrlText:{defaultValue:null,description:"",name:"menuUserProfileUrlText",required:!0,type:{name:"string"}},userProfileUrl:{defaultValue:null,description:"",name:"userProfileUrl",required:!0,type:{name:"string"}},menuNavigationDataConfig:{defaultValue:null,description:"",name:"menuNavigationDataConfig",required:!0,type:{name:"string"}},menuNotificationLoansExpiredText:{defaultValue:null,description:"",name:"menuNotificationLoansExpiredText",required:!0,type:{name:"string"}},menuNotificationLoansExpiredUrl:{defaultValue:null,description:"",name:"menuNotificationLoansExpiredUrl",required:!0,type:{name:"string"}},reservationDetailsOthersInQueueText:{defaultValue:null,description:"",name:"reservationDetailsOthersInQueueText",required:!0,type:{name:"string"}},readyForLoanText:{defaultValue:null,description:"",name:"readyForLoanText",required:!0,type:{name:"string"}},menuNotificationLoansExpiringSoonText:{defaultValue:null,description:"",name:"menuNotificationLoansExpiringSoonText",required:!0,type:{name:"string"}},menuNotificationLoansExpiringSoonUrl:{defaultValue:null,description:"",name:"menuNotificationLoansExpiringSoonUrl",required:!0,type:{name:"string"}},menuNotificationReadyForPickupText:{defaultValue:null,description:"",name:"menuNotificationReadyForPickupText",required:!0,type:{name:"string"}},menuNotificationReadyForPickupUrl:{defaultValue:null,description:"",name:"menuNotificationReadyForPickupUrl",required:!0,type:{name:"string"}},menuLogOutText:{defaultValue:null,description:"",name:"menuLogOutText",required:!0,type:{name:"string"}},loansSoonOverdueText:{defaultValue:null,description:"",name:"loansSoonOverdueText",required:!0,type:{name:"string"}},loansOverdueText:{defaultValue:null,description:"",name:"loansOverdueText",required:!0,type:{name:"string"}},logoutUrl:{defaultValue:null,description:"",name:"logoutUrl",required:!0,type:{name:"string"}},expirationWarningDaysBeforeConfig:{defaultValue:null,description:"",name:"expirationWarningDaysBeforeConfig",required:!0,type:{name:"string"}},feeListDaysText:{defaultValue:null,description:"",name:"feeListDaysText",required:!0,type:{name:"string"}},menuLoginText:{defaultValue:null,description:"",name:"menuLoginText",required:!0,type:{name:"string"}},menuLoginUrl:{defaultValue:null,description:"",name:"menuLoginUrl",required:!0,type:{name:"string"}},menuSignUpText:{defaultValue:null,description:"",name:"menuSignUpText",required:!0,type:{name:"string"}},reservationsReadyText:{defaultValue:null,description:"",name:"reservationsReadyText",required:!0,type:{name:"string"}},menuSignUpUrl:{defaultValue:null,description:"",name:"menuSignUpUrl",required:!0,type:{name:"string"}},menuProfileLinksAriaLabelText:{defaultValue:null,description:"",name:"menuProfileLinksAriaLabelText",required:!0,type:{name:"string"}},menuUserIconAriaLabelText:{defaultValue:null,description:"",name:"menuUserIconAriaLabelText",required:!0,type:{name:"string"}},menuNotAuthenticatedCloseButtonText:{defaultValue:null,description:"",name:"menuNotAuthenticatedCloseButtonText",required:!0,type:{name:"string"}},menuAuthenticatedCloseButtonText:{defaultValue:null,description:"",name:"menuAuthenticatedCloseButtonText",required:!0,type:{name:"string"}},menuAuthenticatedModalDescriptionText:{defaultValue:null,description:"",name:"menuAuthenticatedModalDescriptionText",required:!0,type:{name:"string"}},menuNotAuthenticatedModalDescriptionText:{defaultValue:null,description:"",name:"menuNotAuthenticatedModalDescriptionText",required:!0,type:{name:"string"}},physicalLoansUrl:{defaultValue:null,description:"",name:"physicalLoansUrl",required:!0,type:{name:"string"}},reservationsUrl:{defaultValue:null,description:"",name:"reservationsUrl",required:!0,type:{name:"string"}},materialUrl:{defaultValue:null,description:"",name:"materialUrl",required:!0,type:{name:"string"}},searchUrl:{defaultValue:null,description:"",name:"searchUrl",required:!0,type:{name:"string"}},advancedSearchUrl:{defaultValue:null,description:"",name:"advancedSearchUrl",required:!0,type:{name:"string"}},fbsBaseUrl:{defaultValue:null,description:"",name:"fbsBaseUrl",required:!0,type:{name:"string"}},loanListEreolenUrl:{defaultValue:null,description:"",name:"loanListEreolenUrl",required:!0,type:{name:"string"}},feesPageUrl:{defaultValue:null,description:"",name:"feesPageUrl",required:!0,type:{name:"string"}},publizonBaseUrl:{defaultValue:null,description:"",name:"publizonBaseUrl",required:!0,type:{name:"string"}},dplCmsBaseUrl:{defaultValue:null,description:"",name:"dplCmsBaseUrl",required:!0,type:{name:"string"}},coverBaseUrl:{defaultValue:null,description:"",name:"coverBaseUrl",required:!0,type:{name:"string"}},materialBaseUrl:{defaultValue:null,description:"",name:"materialBaseUrl",required:!0,type:{name:"string"}},fbiBaseUrl:{defaultValue:null,description:"",name:"fbiBaseUrl",required:!0,type:{name:"string"}},authUrl:{defaultValue:null,description:"",name:"authUrl",required:!0,type:{name:"string"}},ereolenHomepageUrl:{defaultValue:null,description:"",name:"ereolenHomepageUrl",required:!0,type:{name:"string"}},pageSizeMobile:{defaultValue:null,description:"",name:"pageSizeMobile",required:!0,type:{name:"number"}},pageSizeDesktop:{defaultValue:null,description:"",name:"pageSizeDesktop",required:!0,type:{name:"number"}},groupModalDueDateLinkToPageWithFeesText:{defaultValue:null,description:"",name:"groupModalDueDateLinkToPageWithFeesText",required:!0,type:{name:"string"}},showMoreText:{defaultValue:null,description:"",name:"showMoreText",required:!0,type:{name:"string"}},groupModalDueDateMaterialText:{defaultValue:null,description:"",name:"groupModalDueDateMaterialText",required:!0,type:{name:"string"}},groupModalGoToMaterialText:{defaultValue:null,description:"",name:"groupModalGoToMaterialText",required:!0,type:{name:"string"}},groupModalDueDateHeaderText:{defaultValue:null,description:"",name:"groupModalDueDateHeaderText",required:!0,type:{name:"string"}},groupModalReturnLibraryText:{defaultValue:null,description:"",name:"groupModalReturnLibraryText",required:!0,type:{name:"string"}},groupModalCheckboxText:{defaultValue:null,description:"",name:"groupModalCheckboxText",required:!0,type:{name:"string"}},groupModalHiddenLabelCheckboxOnMaterialText:{defaultValue:null,description:"",name:"groupModalHiddenLabelCheckboxOnMaterialText",required:!0,type:{name:"string"}},resultPagerStatusText:{defaultValue:null,description:"",name:"resultPagerStatusText",required:!0,type:{name:"string"}},groupModalButtonText:{defaultValue:null,description:"",name:"groupModalButtonText",required:!0,type:{name:"string"}},groupModalDueDateWarningLoanOverdueText:{defaultValue:null,description:"",name:"groupModalDueDateWarningLoanOverdueText",required:!0,type:{name:"string"}},groupModalLoansAriaDescriptionText:{defaultValue:null,description:"",name:"groupModalLoansAriaDescriptionText",required:!0,type:{name:"string"}},groupModalLoansCloseModalAriaLabelText:{defaultValue:null,description:"",name:"groupModalLoansCloseModalAriaLabelText",required:!0,type:{name:"string"}},groupModalRenewLoanDeniedInterLibraryLoanText:{defaultValue:null,description:"",name:"groupModalRenewLoanDeniedInterLibraryLoanText",required:!0,type:{name:"string"}},groupModalRenewLoanDeniedMaxRenewalsReachedText:{defaultValue:null,description:"",name:"groupModalRenewLoanDeniedMaxRenewalsReachedText",required:!0,type:{name:"string"}},groupModalRenewLoanDeniedReservedText:{defaultValue:null,description:"",name:"groupModalRenewLoanDeniedReservedText",required:!0,type:{name:"string"}},renewGroupModalLoansButtonText:{defaultValue:null,description:"",name:"renewGroupModalLoansButtonText",required:!0,type:{name:"string"}},renewGroupModalLoansErrorStatusText:{defaultValue:null,description:"",name:"renewGroupModalLoansErrorStatusText",required:!0,type:{name:"string"}},renewGroupModalLoansErrorTitleText:{defaultValue:null,description:"",name:"renewGroupModalLoansErrorTitleText",required:!0,type:{name:"string"}},renewGroupModalLoansNoRenewalsPossibleErrorStatusText:{defaultValue:null,description:"",name:"renewGroupModalLoansNoRenewalsPossibleErrorStatusText",required:!0,type:{name:"string"}},renewGroupModalLoansNoRenewalsPossibleErrorTitleText:{defaultValue:null,description:"",name:"renewGroupModalLoansNoRenewalsPossibleErrorTitleText",required:!0,type:{name:"string"}},renewGroupModalLoansSuccessStatusText:{defaultValue:null,description:"",name:"renewGroupModalLoansSuccessStatusText",required:!0,type:{name:"string"}},renewGroupModalLoansSuccessTitleText:{defaultValue:null,description:"",name:"renewGroupModalLoansSuccessTitleText",required:!0,type:{name:"string"}},renewMaterialLoanButtonText:{defaultValue:null,description:"",name:"renewMaterialLoanButtonText",required:!0,type:{name:"string"}},renewMaterialLoanErrorStatusText:{defaultValue:null,description:"",name:"renewMaterialLoanErrorStatusText",required:!0,type:{name:"string"}},renewMaterialLoanErrorTitleText:{defaultValue:null,description:"",name:"renewMaterialLoanErrorTitleText",required:!0,type:{name:"string"}},renewMaterialLoanNoRenewalsPossibleErrorStatusText:{defaultValue:null,description:"",name:"renewMaterialLoanNoRenewalsPossibleErrorStatusText",required:!0,type:{name:"string"}},renewMaterialLoanNoRenewalsPossibleErrorTitleText:{defaultValue:null,description:"",name:"renewMaterialLoanNoRenewalsPossibleErrorTitleText",required:!0,type:{name:"string"}},renewMaterialLoanSuccessStatusText:{defaultValue:null,description:"",name:"renewMaterialLoanSuccessStatusText",required:!0,type:{name:"string"}},renewMaterialLoanSuccessTitleText:{defaultValue:null,description:"",name:"renewMaterialLoanSuccessTitleText",required:!0,type:{name:"string"}},renewProcessingText:{defaultValue:null,description:"",name:"renewProcessingText",required:!0,type:{name:"string"}},deleteReservationModalHeaderText:{defaultValue:null,description:"",name:"deleteReservationModalHeaderText",required:!0,type:{name:"string"}},deleteReservationModalDeleteQuestionText:{defaultValue:null,description:"",name:"deleteReservationModalDeleteQuestionText",required:!0,type:{name:"string"}},deleteReservationModalNotRegrettableText:{defaultValue:null,description:"",name:"deleteReservationModalNotRegrettableText",required:!0,type:{name:"string"}},deleteReservationModalDeleteButtonText:{defaultValue:null,description:"",name:"deleteReservationModalDeleteButtonText",required:!0,type:{name:"string"}},deleteReservationModalCloseModalText:{defaultValue:null,description:"",name:"deleteReservationModalCloseModalText",required:!0,type:{name:"string"}},deleteReservationModalAriaDescriptionText:{defaultValue:null,description:"",name:"deleteReservationModalAriaDescriptionText",required:!0,type:{name:"string"}},groupModalReservationsCloseModalAriaLabelText:{defaultValue:null,description:"",name:"groupModalReservationsCloseModalAriaLabelText",required:!0,type:{name:"string"}},groupModalReservationsLoansAriaDescriptionText:{defaultValue:null,description:"",name:"groupModalReservationsLoansAriaDescriptionText",required:!0,type:{name:"string"}},readyForLoanCounterLabelText:{defaultValue:null,description:"",name:"readyForLoanCounterLabelText",required:!0,type:{name:"string"}},removeAllReservationsText:{defaultValue:null,description:"",name:"removeAllReservationsText",required:!0,type:{name:"string"}},pickUpLatestText:{defaultValue:null,description:"",name:"pickUpLatestText",required:!0,type:{name:"string"}},reservationsReadyForPickupText:{defaultValue:null,description:"",name:"reservationsReadyForPickupText",required:!0,type:{name:"string"}},physicalReservationsHeaderText:{defaultValue:null,description:"",name:"physicalReservationsHeaderText",required:!0,type:{name:"string"}},digitalReservationsHeaderText:{defaultValue:null,description:"",name:"digitalReservationsHeaderText",required:!0,type:{name:"string"}},materialDetailsWarningLoanOverdueText:{defaultValue:null,description:"",name:"materialDetailsWarningLoanOverdueText",required:!0,type:{name:"string"}},materialDetailsPhysicalDueDateLabelText:{defaultValue:null,description:"",name:"materialDetailsPhysicalDueDateLabelText",required:!0,type:{name:"string"}},materialDetailsLoanDateLabelText:{defaultValue:null,description:"",name:"materialDetailsLoanDateLabelText",required:!0,type:{name:"string"}},materialDetailsMaterialNumberLabelText:{defaultValue:null,description:"",name:"materialDetailsMaterialNumberLabelText",required:!0,type:{name:"string"}},materialDetailsCloseModalAriaLabelText:{defaultValue:null,description:"",name:"materialDetailsCloseModalAriaLabelText",required:!0,type:{name:"string"}},materialDetailsLinkToPageWithFeesText:{defaultValue:null,description:"",name:"materialDetailsLinkToPageWithFeesText",required:!0,type:{name:"string"}},materialDetailsOverdueText:{defaultValue:null,description:"",name:"materialDetailsOverdueText",required:!0,type:{name:"string"}},ereolenMyPageUrl:{defaultValue:null,description:"",name:"ereolenMyPageUrl",required:!0,type:{name:"string"}},materialDetailsModalAriaDescriptionText:{defaultValue:null,description:"",name:"materialDetailsModalAriaDescriptionText",required:!0,type:{name:"string"}},materialDetailsGoToEreolenText:{defaultValue:null,description:"",name:"materialDetailsGoToEreolenText",required:!0,type:{name:"string"}},materialDetailsDigitalDueDateLabelText:{defaultValue:null,description:"",name:"materialDetailsDigitalDueDateLabelText",required:!0,type:{name:"string"}},materialDetailsRenewLoanButtonText:{defaultValue:null,description:"",name:"materialDetailsRenewLoanButtonText",required:!0,type:{name:"string"}},reservationDetailsRemoveDigitalReservationText:{defaultValue:null,description:"",name:"reservationDetailsRemoveDigitalReservationText",required:!0,type:{name:"string"}},reservationDetailsDateOfReservationTitleText:{defaultValue:null,description:"",name:"reservationDetailsDateOfReservationTitleText",required:!0,type:{name:"string"}},reservationDetailsNumberInQueueLabelText:{defaultValue:null,description:"",name:"reservationDetailsNumberInQueueLabelText",required:!0,type:{name:"string"}},reservationDetailsNoInterestAfterTitleText:{defaultValue:null,description:"",name:"reservationDetailsNoInterestAfterTitleText",required:!0,type:{name:"string"}},reservationDetailsChangeText:{defaultValue:null,description:"",name:"reservationDetailsChangeText",required:!0,type:{name:"string"}},reservationDetailsPickUpAtTitleText:{defaultValue:null,description:"",name:"reservationDetailsPickUpAtTitleText",required:!0,type:{name:"string"}},reservationDetailsButtonRemoveText:{defaultValue:null,description:"",name:"reservationDetailsButtonRemoveText",required:!0,type:{name:"string"}},reservationDetailsStatusTitleText:{defaultValue:null,description:"",name:"reservationDetailsStatusTitleText",required:!0,type:{name:"string"}},reservationDetailsBorrowBeforeText:{defaultValue:null,description:"",name:"reservationDetailsBorrowBeforeText",required:!0,type:{name:"string"}},reservationDetailsDigitalReservationGoToEreolenText:{defaultValue:null,description:"",name:"reservationDetailsDigitalReservationGoToEreolenText",required:!0,type:{name:"string"}},reservationDetailsReadyForLoanText:{defaultValue:null,description:"",name:"reservationDetailsReadyForLoanText",required:!0,type:{name:"string"}},reservationDetailsPickupDeadlineTitleText:{defaultValue:null,description:"",name:"reservationDetailsPickupDeadlineTitleText",required:!0,type:{name:"string"}},interestPeriodsConfig:{defaultValue:null,description:"",name:"interestPeriodsConfig",required:!0,type:{name:"string"}},reservationDetailsConfig:{defaultValue:null,description:"",name:"reservationDetailsConfig",required:!0,type:{name:"string"}},branchesConfig:{defaultValue:null,description:"",name:"branchesConfig",required:!0,type:{name:"string"}},blacklistedPickupBranchesConfig:{defaultValue:null,description:"",name:"blacklistedPickupBranchesConfig",required:!0,type:{name:"string"}},shiftText:{defaultValue:null,description:"",name:"shiftText",required:!0,type:{name:"string"}},modalReservationFormPickupHeaderTitleText:{defaultValue:null,description:"",name:"modalReservationFormPickupHeaderTitleText",required:!0,type:{name:"string"}},modalReservationFormPickupHeaderDescriptionText:{defaultValue:null,description:"",name:"modalReservationFormPickupHeaderDescriptionText",required:!0,type:{name:"string"}},saveButtonText:{defaultValue:null,description:"",name:"saveButtonText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterHeaderTitleText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterHeaderTitleText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterHeaderDescriptionText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterHeaderDescriptionText",required:!0,type:{name:"string"}},chooseOneText:{defaultValue:null,description:"",name:"chooseOneText",required:!0,type:{name:"string"}},loadingText:{defaultValue:null,description:"",name:"loadingText",required:!0,type:{name:"string"}},reservationSuccessTitleText:{defaultValue:null,description:"",name:"reservationSuccessTitleText",required:!0,type:{name:"string"}},reservationSuccessSubTitleText:{defaultValue:null,description:"",name:"reservationSuccessSubTitleText",required:!0,type:{name:"string"}},reservationerrorTitleText:{defaultValue:null,description:"",name:"reservationerrorTitleText",required:!0,type:{name:"string"}},reservationerrorSubTitleText:{defaultValue:null,description:"",name:"reservationerrorSubTitleText",required:!0,type:{name:"string"}},reservationStatusButtonText:{defaultValue:null,description:"",name:"reservationStatusButtonText",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/menu/menu.entry.tsx#menuentry"]={docgenInfo:menuentry.__docgenInfo,name:"menuentry",path:"src/apps/menu/menu.entry.tsx#menuentry"})}catch(__react_docgen_typescript_loader_error){}var groupModalArgs=__webpack_require__("./src/core/storybook/groupModalArgs.ts"),loanGroupModalArgs=__webpack_require__("./src/core/storybook/loanGroupModalArgs.ts"),renewalArgs=__webpack_require__("./src/core/storybook/renewalArgs.ts"),reservationGroupModalArgs=__webpack_require__("./src/core/storybook/reservationGroupModalArgs.ts"),reservationMaterialDetailsArgs=__webpack_require__("./src/core/storybook/reservationMaterialDetailsArgs.ts"),materialDetailsModalArgs=__webpack_require__("./src/core/storybook/materialDetailsModalArgs.ts"),deleteReservationModalArgs=__webpack_require__("./src/core/storybook/deleteReservationModalArgs.ts"),story_header_dev_inc=__webpack_require__("./src/components/search-bar/story-header.dev.inc.tsx");const menu_dev={title:"Apps / Header",component:menu_entry,argTypes:{...serviceUrlArgs.Z,...groupModalArgs.Z,...loanGroupModalArgs.Z,...renewalArgs.Z,...reservationMaterialDetailsArgs.Z,...reservationGroupModalArgs.Z,...deleteReservationModalArgs.Z,...materialDetailsModalArgs.Z,materialAndAuthorText:{control:{type:"text"},defaultValue:"and"},materialByAuthorText:{defaultValue:"By",control:{type:"text"}},menuUserProfileUrlText:{defaultValue:"My Account",control:{type:"text"}},userProfileUrl:{defaultValue:"/YourProfile",control:{type:"text"}},menuNavigationDataConfig:{defaultValue:'[{"name": "Loans","link": "","dataId": "1"},{"name": "Reservations","link": "","dataId": "2"},{"name": "My list","link": "","dataId": "3"},{"name": "Fees & Replacement costs","link": "","dataId": "4"},{"name": "My account","link": "","dataId": "5"}]',control:{type:"text"}},menuNotificationLoansExpiredText:{defaultValue:"loans expired",control:{type:"text"}},menuUserIconAriaLabelText:{defaultValue:"Open user menu",control:{type:"text"}},menuNotificationLoansExpiredUrl:{defaultValue:"/LoansExpired",control:{type:"text"}},menuNotificationLoansExpiringSoonText:{defaultValue:"loans expiring soon",control:{type:"text"}},menuNotificationLoansExpiringSoonUrl:{defaultValue:"/LoansExpiringSoon",control:{type:"text"}},menuNotificationReadyForPickupText:{defaultValue:"reservations ready for pickup",control:{type:"text"}},menuNotAuthenticatedCloseButtonText:{defaultValue:"Close user menu",control:{type:"text"}},menuAuthenticatedCloseButtonText:{defaultValue:"Close user menu",control:{type:"text"}},menuAuthenticatedModalDescriptionText:{defaultValue:"The user modal",control:{type:"text"}},menuNotAuthenticatedModalDescriptionText:{defaultValue:"The user modal, log in or create a user",control:{type:"text"}},menuNotificationReadyForPickupUrl:{defaultValue:"/ReservationsReadyForPickup",control:{type:"text"}},menuLogOutText:{defaultValue:"Log out",control:{type:"text"}},reservationsReadyText:{defaultValue:"Ready for you",control:{type:"text"}},readyForLoanText:{defaultValue:"Ready for pickup",control:{type:"text"}},reservationDetailsOthersInQueueText:{defaultValue:"Others are queueing for this material",control:{type:"text"}},loansSoonOverdueText:{defaultValue:"To be returned soon",control:{type:"text"}},statusBadgeWarningText:{control:{type:"text"},defaultValue:"Expires soon"},loansOverdueText:{defaultValue:"Returned too late",control:{type:"text"}},menuProfileLinksAriaLabelText:{defaultValue:"Profile links",control:{type:"text"}},logoutUrl:{defaultValue:"/Logout",control:{type:"text"}},physicalLoansUrl:{defaultValue:"/user/me/loans",control:{type:"text"}},reservationsUrl:{defaultValue:"/user/me/reservations",control:{type:"text"}},menuLoginText:{defaultValue:"Log in",control:{type:"text"}},menuLoginUrl:{defaultValue:"/Login",control:{type:"text"}},menuSignUpText:{defaultValue:"Sign up",control:{type:"text"}},menuSignUpUrl:{defaultValue:"/Signup",control:{type:"text"}},ereolenHomepageUrl:{defaultValue:"https://ereolen.dk/",control:{type:"text"}},expirationWarningDaysBeforeConfig:{defaultValue:"6",control:{type:"text"}}}},UserMenu=args=>{const menuEntryProps=args,menu=react.createElement(menu_entry,menuEntryProps);return react.createElement(story_header_dev_inc.Z,{userProfile:menu})}},"./src/apps/patron-page/PatronPage.dev.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{PatronPageEntry:()=>PatronPage_dev_PatronPageEntry,default:()=>PatronPage_dev});var react=__webpack_require__("./node_modules/react/index.js"),config=__webpack_require__("./src/core/utils/config.tsx"),utils_text=__webpack_require__("./src/core/utils/text.tsx"),url=__webpack_require__("./src/core/utils/url.tsx"),set=__webpack_require__("./node_modules/lodash/set.js"),set_default=__webpack_require__.n(set),es=__webpack_require__("./node_modules/react-query/es/index.js"),fbs=__webpack_require__("./src/core/fbs/fbs.ts"),Link=__webpack_require__("./src/components/atoms/links/Link.tsx");const BasicDetailsSection=({patron})=>{const t=(0,utils_text.X)(),{address:{coName,street,postalCode,city,country}={coName:"",street:"",postalCode:"",city:"",country:""},name}=patron||{};return react.createElement("section",null,react.createElement("h2",{className:"text-header-h4 mt-32 mb-16"},t("patronPageBasicDetailsHeaderText")),react.createElement("div",{className:"dpl-patron-info"},react.createElement("h3",{className:"dpl-patron-info__label text-header-h4"},t("patronPageBasicDetailsNameLabelText")),react.createElement("div",{className:"dpl-patron-info__text"},name),react.createElement("h3",{className:"dpl-patron-info__label text-header-h4"},t("patronPageBasicDetailsAddressLabelText")),react.createElement("div",{className:"dpl-patron-info__text"},react.createElement("div",null,coName),react.createElement("div",null,street),react.createElement("div",null,postalCode),react.createElement("div",null,city),react.createElement("div",null,country))))},sections_BasicDetailsSection=BasicDetailsSection;try{BasicDetailsSection.displayName="BasicDetailsSection",BasicDetailsSection.__docgenInfo={description:"",displayName:"BasicDetailsSection",props:{patron:{defaultValue:null,description:"",name:"patron",required:!0,type:{name:"PatronV5"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/patron-page/sections/BasicDetailsSection.tsx#BasicDetailsSection"]={docgenInfo:BasicDetailsSection.__docgenInfo,name:"BasicDetailsSection",path:"src/apps/patron-page/sections/BasicDetailsSection.tsx#BasicDetailsSection"})}catch(__react_docgen_typescript_loader_error){}var ContactInfoSection=__webpack_require__("./src/components/contact-info-section/ContactInfoSection.tsx"),Checkbox=__webpack_require__("./src/components/checkbox/Checkbox.tsx"),BranchesDropdown=__webpack_require__("./src/apps/patron-page/util/BranchesDropdown.tsx"),modal=__webpack_require__("./src/core/utils/modal.tsx"),modal_helpers=__webpack_require__("./src/core/utils/helpers/modal-helpers.ts");const ReservationDetailsSection=({patron,changePatron})=>{const t=(0,utils_text.X)(),{open}=(0,modal.f)(),{pauseReservation}=(0,modal_helpers.GM)();return react.createElement("section",{"data-cy":"pickup-reservations-section"},react.createElement("h2",{className:"text-header-h4 mt-32 mb-16"},t("patronPageChangePickupHeaderText")),react.createElement("p",{className:"text-body-small-regular mb-8"},t("patronPageChangePickupBodyText")),react.createElement(BranchesDropdown.Z,{classNames:"dropdow dropdown__desktop",selected:(null==patron?void 0:patron.preferredPickupBranch)||"",onChange:newPreferredPickupBranch=>changePatron(newPreferredPickupBranch,"preferredPickupBranch")}),react.createElement("h3",{className:"text-body-small-regular mt-32 mb-16"},t("patronPagePauseReservationsHeaderText")),react.createElement("p",{className:"text-body-small-regular mb-8"},t("patronPagePauseReservationsBodyText")),react.createElement(Checkbox.Z,{className:"my-16",id:"show-reservation-pause-section",onChecked:()=>{open(pauseReservation)},ariaLabel:t("patronPageOpenPauseReservationsSectionAriaText"),selected:!1,label:t("patronPageOpenPauseReservationsSectionText")}))},sections_ReservationDetailsSection=ReservationDetailsSection;try{ReservationDetailsSection.displayName="ReservationDetailsSection",ReservationDetailsSection.__docgenInfo={description:"",displayName:"ReservationDetailsSection",props:{patron:{defaultValue:null,description:"",name:"patron",required:!0,type:{name:"PatronV5"}},changePatron:{defaultValue:null,description:"",name:"changePatron",required:!0,type:{name:"ChangePatronProps"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/patron-page/sections/ReservationDetailsSection.tsx#ReservationDetailsSection"]={docgenInfo:ReservationDetailsSection.__docgenInfo,name:"ReservationDetailsSection",path:"src/apps/patron-page/sections/ReservationDetailsSection.tsx#ReservationDetailsSection"})}catch(__react_docgen_typescript_loader_error){}var PincodeSection=__webpack_require__("./src/apps/patron-page/sections/PincodeSection.tsx"),publizon=__webpack_require__("./src/core/publizon/publizon.ts");const StatusSection=()=>{const t=(0,utils_text.X)(),alwaysAvailableEreolenUrl=(0,url.J_)()("alwaysAvailableEreolenUrl"),{data:libraryProfileFetched}=(0,publizon.ul)(),{isSuccess,data}=(0,publizon.T8)(),[libraryProfile,setLibraryProfile]=(0,react.useState)(null),[patronData,setPatronData]=(0,react.useState)(null);(0,react.useEffect)((()=>{isSuccess&&data&&data.userData&&setPatronData(data.userData)}),[isSuccess,data]),(0,react.useEffect)((()=>{libraryProfileFetched&&setLibraryProfile(libraryProfileFetched)}),[libraryProfileFetched]);const{maxConcurrentAudioLoansPerBorrower,maxConcurrentEbookLoansPerBorrower,maxConcurrentAudioReservationsPerBorrower,maxConcurrentEbookReservationsPerBorrower}=libraryProfile||{};let patronEbookLoans=0;null!=patronData&&patronData.ebookLoansRemaining&&(patronEbookLoans=Math.abs(null==patronData?void 0:patronData.ebookLoansRemaining)||0);let patronAudioBookLoans=0;null!=patronData&&patronData.audiobookLoansRemaining&&(patronAudioBookLoans=Math.abs(null==patronData?void 0:patronData.audiobookLoansRemaining)||0);let eBookLoanPerent=100;maxConcurrentEbookLoansPerBorrower&&(eBookLoanPerent=patronEbookLoans/maxConcurrentEbookLoansPerBorrower*100);let audioBookLoanPercent=100;return maxConcurrentAudioLoansPerBorrower&&(audioBookLoanPercent=patronAudioBookLoans/maxConcurrentAudioLoansPerBorrower*100),react.createElement("section",{className:"dpl-status-loans"},libraryProfile&&react.createElement(react.Fragment,null,react.createElement("h2",{className:"text-header-h4 mt-32 mb-16"},t("patronPageStatusSectionHeaderText")),react.createElement("div",{className:"text-body-small-regular mb-8"},t("patronPageStatusSectionBodyText")," ",react.createElement(Link.Z,{href:alwaysAvailableEreolenUrl},t("patronPageStatusSectionLinkText"))),maxConcurrentEbookReservationsPerBorrower&&maxConcurrentAudioReservationsPerBorrower&&react.createElement("div",{className:"text-body-small-regular mt-8 mb-8"},t("patronPageStatusSectionReservationsText",{placeholders:{"@countEbooks":maxConcurrentEbookReservationsPerBorrower,"@countAudiobooks":maxConcurrentAudioReservationsPerBorrower}})),react.createElement("div",{className:"dpl-status-loans__column"},react.createElement("div",{className:"dpl-status mt-32"},react.createElement("h3",{className:"text-small-caption"},t("patronPageStatusSectionLoanHeaderText")),react.createElement("div",{className:"dpl-progress-bar text-small-caption color-secondary-gray"},react.createElement("div",{className:"dpl-progress-bar__header"},react.createElement("label",{className:"text-label text-body-medium-medium",htmlFor:"patron-page-status-section-out-of-text"},t("patronPageStatusSectionLoansEbooksText")),maxConcurrentEbookLoansPerBorrower&&react.createElement("div",{className:"text-label",id:"patron-page-status-section-out-of-text"},t("patronPageStatusSectionOutOfText",{placeholders:{"@this":patronEbookLoans,"@that":maxConcurrentEbookLoansPerBorrower}}))),react.createElement("div",{className:"dpl-progress-bar__progress-bar bg-global-secondary"},maxConcurrentEbookLoansPerBorrower&&react.createElement("div",{className:"bg-identity-primary",role:"figure","aria-label":t("patronPageStatusSectionOutOfAriaLabelEbooksText",{placeholders:{"@this":patronEbookLoans,"@that":maxConcurrentEbookLoansPerBorrower}}),style:{width:`${eBookLoanPerent}%`}}))),react.createElement("div",{className:"dpl-progress-bar text-small-caption color-secondary-gray"},react.createElement("div",{className:"dpl-progress-bar__header"},react.createElement("label",{className:"text-label",htmlFor:"max-concurrent-audio-loans-per-borrower"},t("patronPageStatusSectionLoansAudioBooksText")),maxConcurrentAudioLoansPerBorrower&&react.createElement("div",{className:"text-label",id:"max-concurrent-audio-loans-per-borrower"},t("patronPageStatusSectionOutOfText",{placeholders:{"@this":patronAudioBookLoans,"@that":maxConcurrentAudioLoansPerBorrower}}))),react.createElement("div",{className:"dpl-progress-bar__progress-bar bg-global-secondary"},maxConcurrentEbookLoansPerBorrower&&react.createElement("div",{role:"figure","aria-label":t("patronPageStatusSectionOutOfAriaLabelAudioBooksText",{placeholders:{"@this":patronEbookLoans,"@that":maxConcurrentEbookLoansPerBorrower}}),className:"bg-identity-primary",style:{width:`${audioBookLoanPercent}%`}})))))))},sections_StatusSection=StatusSection;try{StatusSection.displayName="StatusSection",StatusSection.__docgenInfo={description:"",displayName:"StatusSection",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/patron-page/sections/StatusSection.tsx#StatusSection"]={docgenInfo:StatusSection.__docgenInfo,name:"StatusSection",path:"src/apps/patron-page/sections/StatusSection.tsx#StatusSection"})}catch(__react_docgen_typescript_loader_error){}var pause_reservation=__webpack_require__("./src/apps/reservation-list/modal/pause-reservation/pause-reservation.tsx"),PromoBar=__webpack_require__("./src/components/promo-bar/PromoBar.tsx");const NotificationComponent=({notificationMessage})=>react.createElement(PromoBar.Z,{text:notificationMessage,type:"info"}),notification_NotificationComponent=NotificationComponent;try{NotificationComponent.displayName="NotificationComponent",NotificationComponent.__docgenInfo={description:"",displayName:"NotificationComponent",props:{notificationMessage:{defaultValue:null,description:"",name:"notificationMessage",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/notification/NotificationComponent.tsx#NotificationComponent"]={docgenInfo:NotificationComponent.__docgenInfo,name:"NotificationComponent",path:"src/components/notification/NotificationComponent.tsx#NotificationComponent"})}catch(__react_docgen_typescript_loader_error){}const useNotificationMessage=({timeout=5e3,scrollToTop=!0}={})=>{const[notificationMessage,setNotificationMessage]=(0,react.useState)(null);return[()=>notificationMessage?react.createElement(notification_NotificationComponent,{notificationMessage}):null,text=>{setNotificationMessage(text),scrollToTop&&window.scrollTo(0,0),timeout&&setTimeout((()=>{setNotificationMessage(null)}),timeout)}]};try{useNotificationMessage.displayName="useNotificationMessage",useNotificationMessage.__docgenInfo={description:"",displayName:"useNotificationMessage",props:{timeout:{defaultValue:{value:"5000"},description:"",name:"timeout",required:!1,type:{name:"number | undefined"}},scrollToTop:{defaultValue:{value:"true"},description:"",name:"scrollToTop",required:!1,type:{name:"boolean | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/utils/useNotificationMessage.tsx#useNotificationMessage"]={docgenInfo:useNotificationMessage.__docgenInfo,name:"useNotificationMessage",path:"src/core/utils/useNotificationMessage.tsx#useNotificationMessage"})}catch(__react_docgen_typescript_loader_error){}var user=__webpack_require__("./src/core/utils/helpers/user.ts");const PatronPage=()=>{const queryClient=(0,es.useQueryClient)(),t=(0,utils_text.X)(),deletePatronUrl=(0,url.J_)()("deletePatronUrl"),{mutate}=(0,fbs.tX)(),{pauseReservation}=(0,modal_helpers.GM)(),{data:patronData}=(0,user.dp)(),[patron,setPatron]=(0,react.useState)(null),[pin,setPin]=(0,react.useState)(null),[disableSubmitButton,setDisableSubmitButton]=(0,react.useState)(!1),[successPinMessage,setSuccessPinMessage]=(0,react.useState)(null),[NotificationComponent,handleNotificationMessage]=useNotificationMessage();(0,react.useEffect)((()=>{patronData&&patronData.patron&&setPatron(patronData.patron)}),[patronData]);const changePatron=(newValue,key)=>{const copyUser=JSON.parse(JSON.stringify(patron));set_default()(copyUser,key,newValue),setPatron(copyUser)},handleSubmit=e=>{e.preventDefault(),(()=>{if(patron){setDisableSubmitButton(!0);const data={patron:{emailAddress:patron.emailAddress,receivePostalMail:patron.receivePostalMail,phoneNumber:patron.phoneNumber,onHold:patron.onHold,preferredPickupBranch:patron.preferredPickupBranch,receiveEmail:patron.receiveEmail,receiveSms:patron.receiveSms}};pin&&(data.pincodeChange={pincode:pin,libraryCardNumber:patron.patronId.toString()}),mutate({data},{onSuccess:()=>{queryClient.invalidateQueries((0,fbs.Tk)()),pin&&setSuccessPinMessage(t("patronPinSavedSuccessText")),setDisableSubmitButton(!1),handleNotificationMessage(t("patronPageHandleResponseInformationText"))},onError:()=>{setDisableSubmitButton(!1)}})}})()};return react.createElement(react.Fragment,null,react.createElement("form",{className:"dpl-patron-page",onSubmit:e=>handleSubmit(e)},react.createElement("h1",{className:"text-header-h1 my-32"},t("patronPageHeaderText")),react.createElement(NotificationComponent,null),patron&&react.createElement(sections_BasicDetailsSection,{patron}),react.createElement("div",{className:"patron-page-info"},patron&&react.createElement(ContactInfoSection.Z,{changePatron,patron,inLine:!1,showCheckboxes:!0}),react.createElement(sections_StatusSection,null),patron&&react.createElement(sections_ReservationDetailsSection,{changePatron,patron}),patron&&react.createElement(PincodeSection.Z,{changePincode:setPin,required:!1}),successPinMessage&&react.createElement("p",{className:"text-body-small-regular mb-8 mt-8",role:"alert"},successPinMessage),react.createElement("button",{"data-cy":"save-user-patron",className:"mt-48 btn-primary btn-filled btn-small arrow__hover--right-small ",type:"submit",disabled:disableSubmitButton},t(disableSubmitButton?"patronPageLoadingText":"patronPageSaveButtonText")),react.createElement("div",{className:"text-body-small-regular mt-32"},t("patronPageDeleteProfileText")," ",react.createElement(Link.Z,{id:"delete-patron-link",href:deletePatronUrl,className:"link-tag"},t("patronPageDeleteProfileLinkText"))))),patron&&react.createElement(pause_reservation.Z,{user:patron,id:pauseReservation}))},patron_page_PatronPage=PatronPage;try{PatronPage.displayName="PatronPage",PatronPage.__docgenInfo={description:"",displayName:"PatronPage",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/patron-page/PatronPage.tsx#PatronPage"]={docgenInfo:PatronPage.__docgenInfo,name:"PatronPage",path:"src/apps/patron-page/PatronPage.tsx#PatronPage"})}catch(__react_docgen_typescript_loader_error){}var withIsPatronBlockedHoc=__webpack_require__("./src/core/utils/withIsPatronBlockedHoc.tsx");const PatronPage_entry=(0,config.Rh)((0,url.XL)((0,utils_text.z)((0,withIsPatronBlockedHoc.Z)((()=>react.createElement(patron_page_PatronPage,null))))));try{PatronPageentry.displayName="PatronPageentry",PatronPageentry.__docgenInfo={description:"",displayName:"PatronPageentry",props:{blacklistedPickupBranchesConfig:{defaultValue:null,description:"",name:"blacklistedPickupBranchesConfig",required:!0,type:{name:"string"}},branchesConfig:{defaultValue:null,description:"",name:"branchesConfig",required:!0,type:{name:"string"}},pincodeLengthMinConfig:{defaultValue:null,description:"",name:"pincodeLengthMinConfig",required:!0,type:{name:"string"}},pincodeLengthMaxConfig:{defaultValue:null,description:"",name:"pincodeLengthMaxConfig",required:!0,type:{name:"string"}},pauseReservationStartDateConfig:{defaultValue:null,description:"",name:"pauseReservationStartDateConfig",required:!0,type:{name:"string"}},textNotificationsEnabledConfig:{defaultValue:null,description:"",name:"textNotificationsEnabledConfig",required:!0,type:{name:"string"}},minAgeConfig:{defaultValue:null,description:"",name:"minAgeConfig",required:!0,type:{name:"string"}},blockedPatronDTitleText:{defaultValue:null,description:"",name:"blockedPatronDTitleText",required:!0,type:{name:"string"}},blockedPatronDBodyText:{defaultValue:null,description:"",name:"blockedPatronDBodyText",required:!0,type:{name:"string"}},blockedPatronSTitleText:{defaultValue:null,description:"",name:"blockedPatronSTitleText",required:!0,type:{name:"string"}},blockedPatronSBodyText:{defaultValue:null,description:"",name:"blockedPatronSBodyText",required:!0,type:{name:"string"}},blockedPatronFTitleText:{defaultValue:null,description:"",name:"blockedPatronFTitleText",required:!0,type:{name:"string"}},blockedPatronFBodyText:{defaultValue:null,description:"",name:"blockedPatronFBodyText",required:!0,type:{name:"string"}},blockedPatronETitleText:{defaultValue:null,description:"",name:"blockedPatronETitleText",required:!0,type:{name:"string"}},blockedPatronEBodyText:{defaultValue:null,description:"",name:"blockedPatronEBodyText",required:!0,type:{name:"string"}},blockedPatronWTitleText:{defaultValue:null,description:"",name:"blockedPatronWTitleText",required:!0,type:{name:"string"}},blockedPatronWBodyText:{defaultValue:null,description:"",name:"blockedPatronWBodyText",required:!0,type:{name:"string"}},blockedPatronOTitleText:{defaultValue:null,description:"",name:"blockedPatronOTitleText",required:!0,type:{name:"string"}},blockedPatronOBodyText:{defaultValue:null,description:"",name:"blockedPatronOBodyText",required:!0,type:{name:"string"}},blockedPatronUTitleText:{defaultValue:null,description:"",name:"blockedPatronUTitleText",required:!0,type:{name:"string"}},blockedPatronUBodyText:{defaultValue:null,description:"",name:"blockedPatronUBodyText",required:!0,type:{name:"string"}},blockedPatronELinkText:{defaultValue:null,description:"",name:"blockedPatronELinkText",required:!0,type:{name:"string"}},blockedPatronELinkUrl:{defaultValue:null,description:"",name:"blockedPatronELinkUrl",required:!0,type:{name:"string"}},blockedPatronCloseModalAriaLabelText:{defaultValue:null,description:"",name:"blockedPatronCloseModalAriaLabelText",required:!0,type:{name:"string"}},blockedPatronModalAriaDescriptionText:{defaultValue:null,description:"",name:"blockedPatronModalAriaDescriptionText",required:!0,type:{name:"string"}},BlockedPatronEntryTextProps:{defaultValue:null,description:"",name:"BlockedPatronEntryTextProps",required:!0,type:{name:"string"}},redirectOnBlocked:{defaultValue:null,description:"",name:"redirectOnBlocked",required:!0,type:{name:"string"}},patronPageHeaderText:{defaultValue:null,description:"",name:"patronPageHeaderText",required:!0,type:{name:"string"}},pauseReservationModalHeaderText:{defaultValue:null,description:"",name:"pauseReservationModalHeaderText",required:!0,type:{name:"string"}},pauseReservationModalBodyText:{defaultValue:null,description:"",name:"pauseReservationModalBodyText",required:!0,type:{name:"string"}},pauseReservationModalCloseModalText:{defaultValue:null,description:"",name:"pauseReservationModalCloseModalText",required:!0,type:{name:"string"}},patronPinSavedSuccessText:{defaultValue:null,description:"",name:"patronPinSavedSuccessText",required:!0,type:{name:"string"}},dateInputsStartDateLabelText:{defaultValue:null,description:"",name:"dateInputsStartDateLabelText",required:!0,type:{name:"string"}},dateInputsEndDateLabelText:{defaultValue:null,description:"",name:"dateInputsEndDateLabelText",required:!0,type:{name:"string"}},pauseReservationModalBelowInputsTextText:{defaultValue:null,description:"",name:"pauseReservationModalBelowInputsTextText",required:!0,type:{name:"string"}},pauseReservationModalLinkText:{defaultValue:null,description:"",name:"pauseReservationModalLinkText",required:!0,type:{name:"string"}},pauseReservationModalSaveButtonLabelText:{defaultValue:null,description:"",name:"pauseReservationModalSaveButtonLabelText",required:!0,type:{name:"string"}},pauseReservationModalCancelButtonLabelText:{defaultValue:null,description:"",name:"pauseReservationModalCancelButtonLabelText",required:!0,type:{name:"string"}},patronPageBasicDetailsHeaderText:{defaultValue:null,description:"",name:"patronPageBasicDetailsHeaderText",required:!0,type:{name:"string"}},patronPageBasicDetailsNameLabelText:{defaultValue:null,description:"",name:"patronPageBasicDetailsNameLabelText",required:!0,type:{name:"string"}},patronPageBasicDetailsAddressLabelText:{defaultValue:null,description:"",name:"patronPageBasicDetailsAddressLabelText",required:!0,type:{name:"string"}},patronContactInfoHeaderText:{defaultValue:null,description:"",name:"patronContactInfoHeaderText",required:!0,type:{name:"string"}},patronContactInfoBodyText:{defaultValue:null,description:"",name:"patronContactInfoBodyText",required:!0,type:{name:"string"}},patronContactPhoneLabelText:{defaultValue:null,description:"",name:"patronContactPhoneLabelText",required:!0,type:{name:"string"}},patronContactPhoneCheckboxText:{defaultValue:null,description:"",name:"patronContactPhoneCheckboxText",required:!0,type:{name:"string"}},patronContactEmailLabelText:{defaultValue:null,description:"",name:"patronContactEmailLabelText",required:!0,type:{name:"string"}},patronContactEmailCheckboxText:{defaultValue:null,description:"",name:"patronContactEmailCheckboxText",required:!0,type:{name:"string"}},patronPageStatusSectionHeaderText:{defaultValue:null,description:"",name:"patronPageStatusSectionHeaderText",required:!0,type:{name:"string"}},patronPageStatusSectionBodyText:{defaultValue:null,description:"",name:"patronPageStatusSectionBodyText",required:!0,type:{name:"string"}},patronPageStatusSectionLinkText:{defaultValue:null,description:"",name:"patronPageStatusSectionLinkText",required:!0,type:{name:"string"}},patronPageStatusSectionLoanHeaderText:{defaultValue:null,description:"",name:"patronPageStatusSectionLoanHeaderText",required:!0,type:{name:"string"}},patronPageStatusSectionLoansEbooksText:{defaultValue:null,description:"",name:"patronPageStatusSectionLoansEbooksText",required:!0,type:{name:"string"}},patronPageStatusSectionLoansAudioBooksText:{defaultValue:null,description:"",name:"patronPageStatusSectionLoansAudioBooksText",required:!0,type:{name:"string"}},patronPageChangePickupHeaderText:{defaultValue:null,description:"",name:"patronPageChangePickupHeaderText",required:!0,type:{name:"string"}},patronPageChangePickupBodyText:{defaultValue:null,description:"",name:"patronPageChangePickupBodyText",required:!0,type:{name:"string"}},pickupBranchesDropdownLabelText:{defaultValue:null,description:"",name:"pickupBranchesDropdownLabelText",required:!0,type:{name:"string"}},pickupBranchesDropdownNothingSelectedText:{defaultValue:null,description:"",name:"pickupBranchesDropdownNothingSelectedText",required:!0,type:{name:"string"}},patronPagePauseReservationsHeaderText:{defaultValue:null,description:"",name:"patronPagePauseReservationsHeaderText",required:!0,type:{name:"string"}},patronPagePauseReservationsBodyText:{defaultValue:null,description:"",name:"patronPagePauseReservationsBodyText",required:!0,type:{name:"string"}},patronPageOpenPauseReservationsSectionText:{defaultValue:null,description:"",name:"patronPageOpenPauseReservationsSectionText",required:!0,type:{name:"string"}},patronPageOpenPauseReservationsSectionAriaText:{defaultValue:null,description:"",name:"patronPageOpenPauseReservationsSectionAriaText",required:!0,type:{name:"string"}},patronPageChangePincodeHeaderText:{defaultValue:null,description:"",name:"patronPageChangePincodeHeaderText",required:!0,type:{name:"string"}},patronPageChangePincodeBodyText:{defaultValue:null,description:"",name:"patronPageChangePincodeBodyText",required:!0,type:{name:"string"}},patronPagePincodeLabelText:{defaultValue:null,description:"",name:"patronPagePincodeLabelText",required:!0,type:{name:"string"}},patronPageConfirmPincodeLabelText:{defaultValue:null,description:"",name:"patronPageConfirmPincodeLabelText",required:!0,type:{name:"string"}},patronPagePincodeTooShortValidationText:{defaultValue:null,description:"",name:"patronPagePincodeTooShortValidationText",required:!0,type:{name:"string"}},patronPagePincodesNotTheSameText:{defaultValue:null,description:"",name:"patronPagePincodesNotTheSameText",required:!0,type:{name:"string"}},patronPageSaveButtonText:{defaultValue:null,description:"",name:"patronPageSaveButtonText",required:!0,type:{name:"string"}},patronPageDeleteProfileText:{defaultValue:null,description:"",name:"patronPageDeleteProfileText",required:!0,type:{name:"string"}},patronPageDeleteProfileLinkText:{defaultValue:null,description:"",name:"patronPageDeleteProfileLinkText",required:!0,type:{name:"string"}},patronPageStatusSectionReservationsText:{defaultValue:null,description:"",name:"patronPageStatusSectionReservationsText",required:!0,type:{name:"string"}},patronPageStatusSectionOutOfText:{defaultValue:null,description:"",name:"patronPageStatusSectionOutOfText",required:!0,type:{name:"string"}},patronPageStatusSectionOutOfAriaLabelAudioBooksText:{defaultValue:null,description:"",name:"patronPageStatusSectionOutOfAriaLabelAudioBooksText",required:!0,type:{name:"string"}},patronPageStatusSectionOutOfAriaLabelEbooksText:{defaultValue:null,description:"",name:"patronPageStatusSectionOutOfAriaLabelEbooksText",required:!0,type:{name:"string"}},patronPagePhoneInputMessageText:{defaultValue:null,description:"",name:"patronPagePhoneInputMessageText",required:!0,type:{name:"string"}},patronPageHandleResponseInformationText:{defaultValue:null,description:"",name:"patronPageHandleResponseInformationText",required:!0,type:{name:"string"}},patronPageLoadingText:{defaultValue:null,description:"",name:"patronPageLoadingText",required:!0,type:{name:"string"}},deletePatronUrl:{defaultValue:null,description:"",name:"deletePatronUrl",required:!0,type:{name:"string"}},pauseReservationInfoUrl:{defaultValue:null,description:"",name:"pauseReservationInfoUrl",required:!0,type:{name:"string"}},alwaysLoanableEreolenUrl:{defaultValue:null,description:"",name:"alwaysLoanableEreolenUrl",required:!0,type:{name:"string"}},materialUrl:{defaultValue:null,description:"",name:"materialUrl",required:!0,type:{name:"string"}},searchUrl:{defaultValue:null,description:"",name:"searchUrl",required:!0,type:{name:"string"}},advancedSearchUrl:{defaultValue:null,description:"",name:"advancedSearchUrl",required:!0,type:{name:"string"}},fbsBaseUrl:{defaultValue:null,description:"",name:"fbsBaseUrl",required:!0,type:{name:"string"}},loanListEreolenUrl:{defaultValue:null,description:"",name:"loanListEreolenUrl",required:!0,type:{name:"string"}},feesPageUrl:{defaultValue:null,description:"",name:"feesPageUrl",required:!0,type:{name:"string"}},publizonBaseUrl:{defaultValue:null,description:"",name:"publizonBaseUrl",required:!0,type:{name:"string"}},dplCmsBaseUrl:{defaultValue:null,description:"",name:"dplCmsBaseUrl",required:!0,type:{name:"string"}},coverBaseUrl:{defaultValue:null,description:"",name:"coverBaseUrl",required:!0,type:{name:"string"}},materialBaseUrl:{defaultValue:null,description:"",name:"materialBaseUrl",required:!0,type:{name:"string"}},fbiBaseUrl:{defaultValue:null,description:"",name:"fbiBaseUrl",required:!0,type:{name:"string"}},authUrl:{defaultValue:null,description:"",name:"authUrl",required:!0,type:{name:"string"}},ereolenHomepageUrl:{defaultValue:null,description:"",name:"ereolenHomepageUrl",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/patron-page/PatronPage.entry.tsx#PatronPageentry"]={docgenInfo:PatronPageentry.__docgenInfo,name:"PatronPageentry",path:"src/apps/patron-page/PatronPage.entry.tsx#PatronPageentry"})}catch(__react_docgen_typescript_loader_error){}var serviceUrlArgs=__webpack_require__("./src/core/storybook/serviceUrlArgs.ts"),pincodeArgs=__webpack_require__("./src/core/storybook/pincodeArgs.ts"),blockedArgs=__webpack_require__("./src/core/storybook/blockedArgs.ts");const PatronPage_dev={title:"Apps / Patron page",component:PatronPage_entry,argTypes:{...serviceUrlArgs.Z,...pincodeArgs.Z,...blockedArgs.Z,pauseReservationStartDateConfig:{defaultValue:"2022-06-30",control:{type:"text"}},blacklistedPickupBranchesConfig:{defaultValue:"FBS-751032,FBS-751031,FBS-751009,FBS-751027,FBS-751024",control:{type:"text"}},branchesConfig:{defaultValue:'[\n {\n "branchId":"DK-775120",\n "title":"Højbjerg"\n },\n {\n "branchId":"DK-775122",\n "title":"Beder-Malling"\n },\n {\n "branchId":"DK-775144",\n "title":"Gellerup"\n },\n {\n "branchId":"DK-775167",\n "title":"Lystrup"\n },\n {\n "branchId":"DK-775146",\n "title":"Harlev"\n },\n {\n "branchId":"DK-775168",\n "title":"Skødstrup"\n },\n {\n "branchId":"FBS-751010",\n "title":"Arresten"\n },\n {\n "branchId":"DK-775147",\n "title":"Hasle"\n },\n {\n "branchId":"FBS-751032",\n "title":"Må ikke benyttes"\n },\n {\n "branchId":"FBS-751031",\n "title":"Fjernlager 1"\n },\n {\n "branchId":"DK-775126",\n "title":"Solbjerg"\n },\n {\n "branchId":"FBS-751030",\n "title":"ITK"\n },\n {\n "branchId":"DK-775149",\n "title":"Sabro"\n },\n {\n "branchId":"DK-775127",\n "title":"Tranbjerg"\n },\n {\n "branchId":"DK-775160",\n "title":"Risskov"\n },\n {\n "branchId":"DK-775162",\n "title":"Hjortshøj"\n },\n {\n "branchId":"DK-775140",\n "title":"Åby"\n },\n {\n "branchId":"FBS-751009",\n "title":"Fjernlager 2"\n },\n {\n "branchId":"FBS-751029",\n "title":"Stadsarkivet"\n },\n {\n "branchId":"FBS-751027",\n "title":"Intern"\n },\n {\n "branchId":"FBS-751026",\n "title":"Fælles undervejs"\n },\n {\n "branchId":"FBS-751025",\n "title":"Fællessekretariatet"\n },\n {\n "branchId":"DK-775133",\n "title":"Bavnehøj"\n },\n {\n "branchId":"FBS-751024",\n "title":"Fjernlånte materialer"\n },\n {\n "branchId":"DK-775100",\n "title":"Hovedbiblioteket"\n },\n {\n "branchId":"DK-775170",\n "title":"Trige"\n },\n {\n "branchId":"DK-775150",\n "title":"Tilst"\n },\n {\n "branchId":"DK-775130",\n "title":"Viby"\n },\n {\n "branchId":"DK-775164",\n "title":"Egå"\n }\n]',control:{type:"text"}},deletePatronUrl:{defaultValue:"https://images.unsplash.com/photo-1560888126-5c13ad3f9345?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=2371&q=80",control:{type:"text"}},pauseReservationInfoUrl:{defaultValue:"https://images.unsplash.com/photo-1560888126-5c13ad3f9345?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=2371&q=80",control:{type:"text"}},textNotificationsEnabledConfig:{defaultValue:"1",control:{type:"text"}},alwaysAvailableEreolenUrl:{defaultValue:"https://images.unsplash.com/photo-1560888126-5c13ad3f9345?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=2371&q=80",control:{type:"text"}},ereolenHomepageUrl:{defaultValue:"https://ereolen.dk/",control:{type:"text"}},patronPageHeaderText:{defaultValue:"Patron profile page",control:{type:"text"}},pauseReservationModalHeaderText:{defaultValue:"Pause reservations on physical items",control:{type:"text"}},pauseReservationModalBodyText:{defaultValue:"Pause your reservations early, since reservations that are already being processed, will not be paused.",control:{type:"text"}},pauseReservationModalCloseModalText:{defaultValue:"Close pause reservations modal",control:{type:"text"}},dateInputsStartDateLabelText:{defaultValue:"Start date",control:{type:"text"}},dateInputsEndDateLabelText:{defaultValue:"End date",control:{type:"text"}},pauseReservationModalBelowInputsTextText:{defaultValue:"",control:{type:"text"}},pauseReservationModalLinkText:{defaultValue:"Read more about pausing reservertions and what that means here",control:{type:"text"}},pauseReservationModalSaveButtonLabelText:{defaultValue:"Save",control:{type:"text"}},pauseReservationModalCancelButtonLabelText:{defaultValue:"Cancel pause",control:{type:"text"}},patronPageBasicDetailsHeaderText:{defaultValue:"Basic details",control:{type:"text"}},patronPageBasicDetailsNameLabelText:{defaultValue:"Name",control:{type:"text"}},patronPageBasicDetailsAddressLabelText:{defaultValue:"Address",control:{type:"text"}},patronContactInfoHeaderText:{defaultValue:"Contact information",control:{type:"text"}},patronContactInfoBodyText:{defaultValue:"",control:{type:"text"}},patronContactPhoneLabelText:{defaultValue:"Phone number",control:{type:"text"}},patronContactPhoneCheckboxText:{defaultValue:"Receive text messages about your loans, reservations, and so forth. This may cost money.",control:{type:"text"}},patronContactEmailLabelText:{defaultValue:"E-mail",control:{type:"text"}},patronContactEmailCheckboxText:{defaultValue:"Receive emails about your loans, reservations, and so forth",control:{type:"text"}},patronPageStatusSectionHeaderText:{defaultValue:"Digital loans (eReolen)",control:{type:"text"}},patronPageStatusSectionBodyText:{defaultValue:"There is a number of materials without limitation to amounts of loans per month.",control:{type:"text"}},patronPageStatusSectionLinkText:{defaultValue:"Click here, to see titles always eligible to be loaned",control:{type:"text"}},patronPageStatusSectionLoanHeaderText:{defaultValue:"Loans per month",control:{type:"text"}},patronPageStatusSectionLoansEbooksText:{defaultValue:"E-books",control:{type:"text"}},patronPageStatusSectionLoansAudioBooksText:{defaultValue:"Audiobooks",control:{type:"text"}},patronPageChangePickupHeaderText:{defaultValue:"Reservations",control:{type:"text"}},patronPageChangePickupBodyText:{defaultValue:"",control:{type:"text"}},pickupBranchesDropdownLabelText:{defaultValue:"Choose pickup branch",control:{type:"text"}},pickupBranchesDropdownNothingSelectedText:{defaultValue:"Nothing selected",control:{type:"text"}},patronPagePauseReservationsHeaderText:{defaultValue:"Pause physical reservations",control:{type:"text"}},patronPagePauseReservationsBodyText:{defaultValue:"",control:{type:"text"}},patronPageOpenPauseReservationsSectionText:{defaultValue:"Pause your reservations",control:{type:"text"}},patronPageOpenPauseReservationsSectionAriaText:{defaultValue:"This checkbox opens a modal where you can put your current reservations on a pause, when the time period picked has ended, the reservations will be resumed",control:{type:"text"}},patronPageChangePincodeHeaderText:{defaultValue:"Pincode",control:{type:"text"}},patronPageChangePincodeBodyText:{defaultValue:"Change current pin by entering a new pin and saving",control:{type:"text"}},patronPinSavedSuccessText:{defaultValue:"Pincode was saved",control:{type:"text"}},patronPagePincodeLabelText:{defaultValue:"New pin",control:{type:"text"}},patronPageConfirmPincodeLabelText:{defaultValue:"Confirm new pin",control:{type:"text"}},patronPagePincodeTooShortValidationText:{defaultValue:"The pincode should be minimum @pincodeLengthMin and maximum @pincodeLengthMax characters long",control:{type:"text"}},patronPagePincodesNotTheSameText:{defaultValue:"The pincodes are not the same",control:{type:"text"}},patronPageSaveButtonText:{defaultValue:"Save",control:{type:"text"}},patronPageDeleteProfileText:{defaultValue:"Do you wish to delete your library profile?",control:{type:"text"}},patronPageDeleteProfileLinkText:{defaultValue:"Delete your profile",control:{type:"text"}},patronPageStatusSectionReservationsText:{defaultValue:"You can reserve @countEbooks ebooks and @countAudiobooks audiobooks",control:{type:"text"}},patronPageStatusSectionOutOfText:{defaultValue:"@this out of @that",control:{type:"text"}},patronPageStatusSectionOutOfAriaLabelAudioBooksText:{defaultValue:"You used @this audiobooks out of you quota of @that audiobooks",control:{type:"text"}},patronPageStatusSectionOutOfAriaLabelEbooksText:{defaultValue:"You used @this ebooks out of you quota of @that ebooks",control:{type:"text"}},patronPagePhoneInputMessageText:{name:"Phone input validation message",defaultValue:"The phone number must be 6 to 15 characters in length and should be comprised solely of numbers or begin with a +",control:{type:"text"}},patronPageHandleResponseInformationText:{defaultValue:"Your changes are saved.",control:{type:"text"}},patronPageLoadingText:{name:"Loading",defaultValue:"Loading..",control:{type:"text"}}}},PatronPage_dev_PatronPageEntry=(props=>react.createElement(PatronPage_entry,props)).bind({});PatronPage_dev_PatronPageEntry.args={}},"./src/apps/patron-page/sections/PincodeSection.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_components_atoms_input_TextInput__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/components/atoms/input/TextInput.tsx"),_core_utils_config__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/core/utils/config.tsx"),_core_utils_text__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/core/utils/text.tsx");const PincodeSection=({changePincode,required})=>{const t=(0,_core_utils_text__WEBPACK_IMPORTED_MODULE_3__.X)(),config=(0,_core_utils_config__WEBPACK_IMPORTED_MODULE_2__.ZR)(),pincodeLengthMin=parseInt(config("pincodeLengthMinConfig"),10),pincodeLengthMax=parseInt(config("pincodeLengthMaxConfig"),10),[pincodeValidation,setPincodeValidation]=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(),[pincode,setPincode]=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(""),[confirmPincode,setConfirmPincode]=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)("");return(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)((()=>{if(changePincode(null),setPincodeValidation(""),pincode&&confirmPincode){if(pincode.length>pincodeLengthMax||pincode.lengthsetPincode(newPin),value:pincode,label:t("patronPagePincodeLabelText"),validation:pincodeValidation}),react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_atoms_input_TextInput__WEBPACK_IMPORTED_MODULE_1__.Z,{className:"patron__input patron__input--desktop",id:"pincode-confirm-input",pattern:"[0-9]*",required,inputmode:"numeric",type:"password",onChange:newPin=>setConfirmPincode(newPin),value:confirmPincode,label:t("patronPageConfirmPincodeLabelText")})))},__WEBPACK_DEFAULT_EXPORT__=PincodeSection;try{PincodeSection.displayName="PincodeSection",PincodeSection.__docgenInfo={description:"",displayName:"PincodeSection",props:{changePincode:{defaultValue:null,description:"",name:"changePincode",required:!0,type:{name:"(newPin: string | null) => void"}},required:{defaultValue:null,description:"",name:"required",required:!0,type:{name:"boolean"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/patron-page/sections/PincodeSection.tsx#PincodeSection"]={docgenInfo:PincodeSection.__docgenInfo,name:"PincodeSection",path:"src/apps/patron-page/sections/PincodeSection.tsx#PincodeSection"})}catch(__react_docgen_typescript_loader_error){}},"./src/apps/patron-page/util/BranchesDropdown.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_danskernesdigitalebibliotek_dpl_design_system_build_icons_collection_ExpandMore_svg__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/ExpandMore.svg"),_danskernesdigitalebibliotek_dpl_design_system_build_icons_collection_ExpandMore_svg__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(_danskernesdigitalebibliotek_dpl_design_system_build_icons_collection_ExpandMore_svg__WEBPACK_IMPORTED_MODULE_1__),_core_utils_branches__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/core/utils/branches.tsx"),_core_utils_text__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/core/utils/text.tsx");const BranchesDropdown=({selected,onChange,classNames})=>{const t=(0,_core_utils_text__WEBPACK_IMPORTED_MODULE_3__.X)(),branches=(0,_core_utils_branches__WEBPACK_IMPORTED_MODULE_2__.mc)("blacklistedPickupBranchesConfig");return react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment,null,react__WEBPACK_IMPORTED_MODULE_0__.createElement("label",{htmlFor:"branches-dropdown",className:"text-body-medium-medium mt-32 mb-8"},t("pickupBranchesDropdownLabelText")),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:`dropdown mb-32 mt-4 ${classNames||""}`},branches&&react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment,null,react__WEBPACK_IMPORTED_MODULE_0__.createElement("select",{required:!0,id:"branches-dropdown",onChange:({target})=>onChange(target.value),className:"dropdown__select"},""===selected&&react__WEBPACK_IMPORTED_MODULE_0__.createElement("option",{value:"",className:"dropdown__option",selected:""===selected,disabled:!0},t("pickupBranchesDropdownNothingSelectedText")),branches.map((({branchId,title})=>react__WEBPACK_IMPORTED_MODULE_0__.createElement("option",{value:branchId,selected:selected===branchId,className:"dropdown__option"},title)))),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"dropdown__arrows"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("img",{className:"dropdown__arrow",src:_danskernesdigitalebibliotek_dpl_design_system_build_icons_collection_ExpandMore_svg__WEBPACK_IMPORTED_MODULE_1___default(),alt:""})))))},__WEBPACK_DEFAULT_EXPORT__=BranchesDropdown;try{BranchesDropdown.displayName="BranchesDropdown",BranchesDropdown.__docgenInfo={description:"",displayName:"BranchesDropdown",props:{selected:{defaultValue:null,description:"",name:"selected",required:!0,type:{name:"string"}},classNames:{defaultValue:null,description:"",name:"classNames",required:!1,type:{name:"string | undefined"}},onChange:{defaultValue:null,description:"",name:"onChange",required:!0,type:{name:"(value: string) => void"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/patron-page/util/BranchesDropdown.tsx#BranchesDropdown"]={docgenInfo:BranchesDropdown.__docgenInfo,name:"BranchesDropdown",path:"src/apps/patron-page/util/BranchesDropdown.tsx#BranchesDropdown"})}catch(__react_docgen_typescript_loader_error){}},"./src/apps/recommender/Recommender.dev.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{RecommenderEntry:()=>Recommender_dev_RecommenderEntry,default:()=>Recommender_dev});var react=__webpack_require__("./node_modules/react/index.js"),serviceUrlArgs=__webpack_require__("./src/core/storybook/serviceUrlArgs.ts"),general=__webpack_require__("./src/core/utils/helpers/general.ts"),graphql=__webpack_require__("./src/core/dbc-gateway/generated/graphql.tsx"),utils_config=__webpack_require__("./src/core/utils/config.tsx"),utils_text=__webpack_require__("./src/core/utils/text.tsx"),SimpleMaterial=__webpack_require__("./src/components/simple-material/SimpleMaterial.tsx");const InspirationRecommender=()=>{const t=(0,utils_text.X)(),defaultSearchFromConfig=(0,utils_config.ZR)()("emptyRecommenderSearchConfig"),{inspiration:inspirationLimit}=(0,general.US)(),[recommendedMaterials,setRecommendedMaterials]=(0,react.useState)(null),{data}=(0,graphql.OX)({limit:inspirationLimit,q:{all:defaultSearchFromConfig},offset:0});return(0,react.useEffect)((()=>{data&&setRecommendedMaterials(data)}),[data]),null===recommendedMaterials?null:react.createElement(react.Fragment,null,react.createElement("h2",{className:"recommender__title text-header-h1"},t("recommenderTitleInspirationText")),react.createElement("ul",{className:"recommender__grid"},recommendedMaterials&&recommendedMaterials.search.works.map((work=>react.createElement(SimpleMaterial.Z,{app:"inspiration-recommender",work})))))},recommender_InspirationRecommender=InspirationRecommender;try{InspirationRecommender.displayName="InspirationRecommender",InspirationRecommender.__docgenInfo={description:"",displayName:"InspirationRecommender",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/recommender/InspirationRecommender.tsx#InspirationRecommender"]={docgenInfo:InspirationRecommender.__docgenInfo,name:"InspirationRecommender",path:"src/apps/recommender/InspirationRecommender.tsx#InspirationRecommender"})}catch(__react_docgen_typescript_loader_error){}var material_fetch_hoc=__webpack_require__("./src/apps/loan-list/materials/utils/material-fetch-hoc.tsx");const RecommendList=({material,loanOrReservationFaust,titleKey})=>{const t=(0,utils_text.X)(),{recommender:recommenderLimit}=(0,general.US)(),{data}=(0,graphql.GN)({faust:loanOrReservationFaust,limit:recommenderLimit}),[recommendedMaterials,setRecommendedMaterials]=(0,react.useState)(null);return(0,react.useEffect)((()=>{data&&setRecommendedMaterials(data)}),[data]),react.createElement(react.Fragment,null,material&&material.title&&react.createElement("h2",{className:"recommender__title text-header-h1"},t(titleKey,{placeholders:{"@title":material.title}})),react.createElement("ul",{className:"recommender__triple-grid"},recommendedMaterials&&recommendedMaterials.recommend.result.map((({work})=>react.createElement(SimpleMaterial.Z,{work,app:"recommender"})))))},recommender_RecommendList=(0,__webpack_require__("./src/apps/loan-list/materials/utils/digital-material-fetch-hoc.tsx").Z)((0,material_fetch_hoc.Z)(RecommendList));try{RecommendList.displayName="RecommendList",RecommendList.__docgenInfo={description:"",displayName:"RecommendList",props:{loanOrReservationFaust:{defaultValue:null,description:"",name:"loanOrReservationFaust",required:!0,type:{name:"`${number}`"}},titleKey:{defaultValue:null,description:"",name:"titleKey",required:!0,type:{name:"enum",value:[{value:'"recommenderTitleLoansText"'},{value:'"recommenderTitleReservationsText"'}]}},digitalMaterial:{defaultValue:null,description:"",name:"digitalMaterial",required:!1,type:{name:"Product | null | undefined"}},item:{defaultValue:null,description:"",name:"item",required:!1,type:{name:"Nullable>"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/recommender/RecommendList.tsx#RecommendList"]={docgenInfo:RecommendList.__docgenInfo,name:"RecommendList",path:"src/apps/recommender/RecommendList.tsx#RecommendList"})}catch(__react_docgen_typescript_loader_error){}var useReservations=__webpack_require__("./src/core/utils/useReservations.tsx"),useLoans=__webpack_require__("./src/core/utils/useLoans.tsx");const Recommender=()=>{const[loanForRecommender,setLoanForRecommender]=(0,react.useState)(null),[reservationForRecommender,setReservationForRecommender]=(0,react.useState)(null),{fbs:{loans:physicalLoans,isLoading:fbsLoansLoading}}=(0,useLoans.Z)(),{fbs:{reservations:physicalReservations,isLoading:fbsReservationsLoading}}=(0,useReservations.Z)();(0,react.useEffect)((()=>{if(null!==physicalLoans){const newestLoan=(0,general.sC)(physicalLoans).reverse();newestLoan.length>0&&setLoanForRecommender(newestLoan[0])}if(null!==physicalReservations){const newestReservation=(0,general.oO)(physicalReservations).reverse();newestReservation.length>0&&setReservationForRecommender(newestReservation[0])}}),[physicalLoans,physicalReservations,setLoanForRecommender]);const stillLoading=fbsReservationsLoading||fbsLoansLoading;return react.createElement("div",{className:"recommender recommender--padding-desktop recommender--triple-desktop"},loanForRecommender&&loanForRecommender.faust&&react.createElement(recommender_RecommendList,{titleKey:"recommenderTitleLoansText",item:loanForRecommender,loanOrReservationFaust:loanForRecommender.faust}),!loanForRecommender&&reservationForRecommender&&reservationForRecommender.faust&&react.createElement(recommender_RecommendList,{titleKey:"recommenderTitleReservationsText",item:reservationForRecommender,loanOrReservationFaust:reservationForRecommender.faust}),!loanForRecommender&&!reservationForRecommender&&!stillLoading&&react.createElement(recommender_InspirationRecommender,null))},recommender_Recommender=Recommender;try{Recommender.displayName="Recommender",Recommender.__docgenInfo={description:"",displayName:"Recommender",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/recommender/Recommender.tsx#Recommender"]={docgenInfo:Recommender.__docgenInfo,name:"Recommender",path:"src/apps/recommender/Recommender.tsx#Recommender"})}catch(__react_docgen_typescript_loader_error){}var url=__webpack_require__("./src/core/utils/url.tsx"),guarded_app=__webpack_require__("./src/components/guarded-app.tsx");const Recommender_entry=(0,url.XL)((0,utils_config.Rh)((0,utils_text.z)((()=>react.createElement(guarded_app.Z,{app:"recommender"},react.createElement(recommender_Recommender,null))))));try{Recommenderentry.displayName="Recommenderentry",Recommenderentry.__docgenInfo={description:"",displayName:"Recommenderentry",props:{q:{defaultValue:null,description:"",name:"q",required:!1,type:{name:"string | undefined"}},pageSizeDesktop:{defaultValue:null,description:"",name:"pageSizeDesktop",required:!1,type:{name:"number | undefined"}},pageSizeMobile:{defaultValue:null,description:"",name:"pageSizeMobile",required:!1,type:{name:"number | undefined"}},materialUrl:{defaultValue:null,description:"",name:"materialUrl",required:!0,type:{name:"string"}},searchUrl:{defaultValue:null,description:"",name:"searchUrl",required:!0,type:{name:"string"}},advancedSearchUrl:{defaultValue:null,description:"",name:"advancedSearchUrl",required:!0,type:{name:"string"}},fbsBaseUrl:{defaultValue:null,description:"",name:"fbsBaseUrl",required:!0,type:{name:"string"}},loanListEreolenUrl:{defaultValue:null,description:"",name:"loanListEreolenUrl",required:!0,type:{name:"string"}},feesPageUrl:{defaultValue:null,description:"",name:"feesPageUrl",required:!0,type:{name:"string"}},publizonBaseUrl:{defaultValue:null,description:"",name:"publizonBaseUrl",required:!0,type:{name:"string"}},dplCmsBaseUrl:{defaultValue:null,description:"",name:"dplCmsBaseUrl",required:!0,type:{name:"string"}},coverBaseUrl:{defaultValue:null,description:"",name:"coverBaseUrl",required:!0,type:{name:"string"}},materialBaseUrl:{defaultValue:null,description:"",name:"materialBaseUrl",required:!0,type:{name:"string"}},fbiBaseUrl:{defaultValue:null,description:"",name:"fbiBaseUrl",required:!0,type:{name:"string"}},authUrl:{defaultValue:null,description:"",name:"authUrl",required:!0,type:{name:"string"}},ereolenHomepageUrl:{defaultValue:null,description:"",name:"ereolenHomepageUrl",required:!0,type:{name:"string"}},emptyRecommenderSearchConfig:{defaultValue:null,description:"",name:"emptyRecommenderSearchConfig",required:!0,type:{name:"string"}},recommenderTitleLoansText:{defaultValue:null,description:"",name:"recommenderTitleLoansText",required:!0,type:{name:"string"}},recommenderTitleReservationsText:{defaultValue:null,description:"",name:"recommenderTitleReservationsText",required:!0,type:{name:"string"}},materialByAuthorText:{defaultValue:null,description:"",name:"materialByAuthorText",required:!0,type:{name:"string"}},materialAndAuthorText:{defaultValue:null,description:"",name:"materialAndAuthorText",required:!0,type:{name:"string"}},etAlText:{defaultValue:null,description:"",name:"etAlText",required:!0,type:{name:"string"}},recommenderTitleInspirationText:{defaultValue:null,description:"",name:"recommenderTitleInspirationText",required:!0,type:{name:"string"}},addToFavoritesAriaLabelText:{defaultValue:null,description:"",name:"addToFavoritesAriaLabelText",required:!0,type:{name:"string"}},removeFromFavoritesAriaLabelText:{defaultValue:null,description:"",name:"removeFromFavoritesAriaLabelText",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/recommender/Recommender.entry.tsx#Recommenderentry"]={docgenInfo:Recommenderentry.__docgenInfo,name:"Recommenderentry",path:"src/apps/recommender/Recommender.entry.tsx#Recommenderentry"})}catch(__react_docgen_typescript_loader_error){}const Recommender_dev={title:"Apps / Recommender",component:Recommender_entry,argTypes:{...serviceUrlArgs.Z,emptyRecommenderSearchConfig:{defaultValue:"Mimbo jimbo",control:{type:"text"}},recommenderTitleLoansText:{control:{type:"text"},defaultValue:"Because you have borrowed @title you may also like"},recommenderTitleReservationsText:{control:{type:"text"},defaultValue:"Because you have reserved @title you may also like"},materialByAuthorText:{control:{type:"text"},defaultValue:"By"},materialAndAuthorText:{control:{type:"text"},defaultValue:"and"},etAlText:{control:{type:"text"},defaultValue:"et al."},recommenderTitleInspirationText:{control:{type:"text"},defaultValue:"For your inspiration"},addToFavoritesAriaLabelText:{control:{type:"text"},defaultValue:"Add @title to favorites list"},removeFromFavoritesAriaLabelText:{control:{type:"text"},defaultValue:"Remove @title from favorites list"},materialUrl:{defaultValue:"/work/:workid",control:{type:"text"}}}},Recommender_dev_RecommenderEntry=(props=>react.createElement(Recommender_entry,props)).bind({});Recommender_dev_RecommenderEntry.args={}},"./src/apps/reservation-list/list/reservation-list.dev.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{ReservationListDigitalDetailsModal:()=>ReservationListDigitalDetailsModal,ReservationListEntry:()=>reservation_list_dev_ReservationListEntry,ReservationListPauseModal:()=>ReservationListPauseModal,ReservationListPhysicalDetailsModal:()=>ReservationListPhysicalDetailsModal,default:()=>reservation_list_dev});var react=__webpack_require__("./node_modules/react/index.js"),esm=__webpack_require__("./node_modules/@storybook/addon-queryparams/dist/esm/index.js"),es=(__webpack_require__("./node_modules/core-js/modules/esnext.string.at.js"),__webpack_require__("./node_modules/react-redux/es/index.js")),useDeepCompareEffect=__webpack_require__("./node_modules/react-use/esm/useDeepCompareEffect.js"),utils_text=__webpack_require__("./src/core/utils/text.tsx"),reservation_type=__webpack_require__("./src/core/utils/types/reservation-type.ts"),general=__webpack_require__("./src/core/utils/helpers/general.ts"),Reservations=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/Reservations.svg"),Reservations_default=__webpack_require__.n(Reservations),modal=__webpack_require__("./src/core/utils/modal.tsx"),date=__webpack_require__("./src/core/utils/helpers/date.ts"),modal_helpers=__webpack_require__("./src/core/utils/helpers/modal-helpers.ts");const reservation_pause_toggler=({user})=>{const t=(0,utils_text.X)(),{open}=(0,modal.f)(),{pauseReservation}=(0,modal_helpers.GM)(),[onHoldDates,setOnHoldDates]=(0,react.useState)();return(0,react.useEffect)((()=>{user&&user.onHold&&user.onHold.from&&user.onHold.to?setOnHoldDates(`${(0,date.p6)(user.onHold.from)} - ${(0,date.p6)(user.onHold.to)}`):user&&null===user.onHold&&setOnHoldDates("")}),[user]),react.createElement("div",{className:"dpl-pause-reservation-component m-32"},react.createElement("div",{className:"dpl-pause-reservation-component__pagefold"}),react.createElement("div",{className:"dpl-pause-reservation-component__flex"},react.createElement("div",{className:"dpl-pause-reservation-component__flex__reservation-icon"},react.createElement("img",{src:Reservations_default(),alt:""})),react.createElement("div",{className:"dpl-pause-reservation-component__flex__text"},t(onHoldDates?"reservationListPauseReservationOnHoldText":"reservationListPauseReservationText")),onHoldDates&&react.createElement("span",{"aria-label":t("reservationListOnHoldAriaText"),className:"dpl-pause-reservation-component__flex__badge"},onHoldDates),react.createElement("div",{className:"dpl-pause-reservation-component__flex__button"},react.createElement("button",{"aria-label":t("reservationListPauseReservationAriaModalText"),type:"button",onClick:()=>{open(pauseReservation)},className:"btn-primary btn-filled btn-small"},t("reservationListPauseReservationButtonText")))))};try{reservationpausetoggler.displayName="reservationpausetoggler",reservationpausetoggler.__docgenInfo={description:"",displayName:"reservationpausetoggler",props:{user:{defaultValue:null,description:"",name:"user",required:!0,type:{name:"PatronV5"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/reservation-list/list/reservation-pause-toggler.tsx#reservationpausetoggler"]={docgenInfo:reservationpausetoggler.__docgenInfo,name:"reservationpausetoggler",path:"src/apps/reservation-list/list/reservation-pause-toggler.tsx#reservationpausetoggler"})}catch(__react_docgen_typescript_loader_error){}var empty_list=__webpack_require__("./src/components/empty-list/empty-list.tsx");const EmptyReservations=()=>{const t=(0,utils_text.X)();return react.createElement("div",{className:"list-reservation-container m-32"},react.createElement(empty_list.Z,{classNames:"mt-24",emptyListText:t("reservationListAllEmptyText")}))},list_EmptyReservations=EmptyReservations;try{EmptyReservations.displayName="EmptyReservations",EmptyReservations.__docgenInfo={description:"",displayName:"EmptyReservations",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/reservation-list/list/EmptyReservations.tsx#EmptyReservations"]={docgenInfo:EmptyReservations.__docgenInfo,name:"EmptyReservations",path:"src/apps/reservation-list/list/EmptyReservations.tsx#EmptyReservations"})}catch(__react_docgen_typescript_loader_error){}var pause_reservation=__webpack_require__("./src/apps/reservation-list/modal/pause-reservation/pause-reservation.tsx"),delete_reservation_modal=__webpack_require__("./src/apps/reservation-list/modal/delete-reservation/delete-reservation-modal.tsx"),use_pager=__webpack_require__("./src/components/result-pager/use-pager.tsx"),material_fetch_hoc=__webpack_require__("./src/apps/loan-list/materials/utils/material-fetch-hoc.tsx"),digital_material_fetch_hoc=__webpack_require__("./src/apps/loan-list/materials/utils/digital-material-fetch-hoc.tsx"),material_info=__webpack_require__("./src/apps/loan-list/materials/stackable-material/material-info.tsx"),reservation_info=__webpack_require__("./src/apps/reservation-list/reservation-material/reservation-info.tsx"),card_list_item_skeleton=__webpack_require__("./src/components/card-item-list/card-list-item/card-list-item-skeleton.tsx");const reservation_material=(0,digital_material_fetch_hoc.Z)((0,material_fetch_hoc.Z)((({material,reservation,focused,openReservationDetailsModal,identifier})=>{const openDetailsModal=()=>{openReservationDetailsModal(reservation)},isDigital=!!identifier;return react.createElement("li",null,react.createElement("div",{className:"list-reservation my-32 cursor-pointer",role:"button",onClick:()=>openDetailsModal(),onKeyUp:e=>{"Enter"!==e.key&&"Space"!==e.key||openDetailsModal()},tabIndex:0},material&&react.createElement(material_info.Z,{arrowLabelledBy:`${reservation.identifier||reservation.faust}-title`,focused,openDetailsModal,periodical:reservation.periodical,material,isbnForCover:reservation.identifier||""}),react.createElement(reservation_info.Z,{reservationInfo:reservation,openReservationDetailsModal,isDigital})))}),(()=>react.createElement("li",null,react.createElement("div",{className:"my-32"},react.createElement(card_list_item_skeleton.Z,null))))));try{reservationmaterial.displayName="reservationmaterial",reservationmaterial.__docgenInfo={description:"",displayName:"reservationmaterial",props:{reservation:{defaultValue:null,description:"",name:"reservation",required:!0,type:{name:"Nullable>"}},focused:{defaultValue:null,description:"",name:"focused",required:!0,type:{name:"boolean"}},openReservationDetailsModal:{defaultValue:null,description:"",name:"openReservationDetailsModal",required:!0,type:{name:"(reservation: Nullable>) => void"}},identifier:{defaultValue:null,description:"",name:"identifier",required:!1,type:{name:"string | null | undefined"}},digitalMaterial:{defaultValue:null,description:"",name:"digitalMaterial",required:!1,type:{name:"Product | null | undefined"}},item:{defaultValue:null,description:"",name:"item",required:!1,type:{name:"Nullable>"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/reservation-list/reservation-material/reservation-material.tsx#reservationmaterial"]={docgenInfo:reservationmaterial.__docgenInfo,name:"reservationmaterial",path:"src/apps/reservation-list/reservation-material/reservation-material.tsx#reservationmaterial"})}catch(__react_docgen_typescript_loader_error){}const list_list=({reservations,header,pageSize,emptyListDataCy,emptyListLabel,openReservationDetailsModal})=>{const[dataReady,setDataReady]=(0,react.useState)(!1),[displayedReservations,setDisplayedReservations]=(0,react.useState)([]),{itemsShown,PagerComponent,firstInNewPage}=(0,use_pager.Z)({hitcount:reservations.length,pageSize});return(0,useDeepCompareEffect.Z)((()=>{reservations&&(setDisplayedReservations((0,general.qZ)(reservations,itemsShown)),setDataReady(!0))}),[itemsShown,reservations]),dataReady?react.createElement("div",null,displayedReservations.length>0?react.createElement(react.Fragment,null,react.createElement("div",{className:"dpl-list-buttons m-32"},react.createElement("h2",{"data-cy":"reservation-list-header",className:"dpl-list-buttons__header"},react.createElement(react.Fragment,null,header,react.createElement("div",{className:"dpl-list-buttons__power"},reservations.length)))),react.createElement("div",{"data-cy":"list-reservation-container"},react.createElement("ul",{className:"list-reservation-container"},displayedReservations.map(((reservation,i)=>react.createElement(reservation_material,{focused:firstInNewPage===i,openReservationDetailsModal,key:(0,reservation_type._p)(reservation),item:reservation,reservation})))),react.createElement(PagerComponent,null))):react.createElement("div",null,react.createElement("div",{className:"dpl-list-buttons m-32"},react.createElement("h2",{className:"dpl-list-buttons__header"},react.createElement(react.Fragment,null,header,react.createElement("div",{className:"dpl-list-buttons__power"},"0")))),react.createElement("div",{className:"list-reservation-container"},react.createElement(empty_list.Z,{classNames:"mt-24",dataCy:emptyListDataCy,emptyListText:emptyListLabel})))):react.createElement("div",null)};try{list.displayName="list",list.__docgenInfo={description:"",displayName:"list",props:{reservations:{defaultValue:null,description:"",name:"reservations",required:!0,type:{name:"Nullable>[]"}},header:{defaultValue:null,description:"",name:"header",required:!0,type:{name:"string"}},emptyListDataCy:{defaultValue:null,description:"",name:"emptyListDataCy",required:!0,type:{name:"string"}},emptyListLabel:{defaultValue:null,description:"",name:"emptyListLabel",required:!0,type:{name:"string"}},pageSize:{defaultValue:null,description:"",name:"pageSize",required:!0,type:{name:"number"}},openReservationDetailsModal:{defaultValue:null,description:"",name:"openReservationDetailsModal",required:!0,type:{name:"(reservation: Nullable>) => void"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/reservation-list/list/list.tsx#list"]={docgenInfo:list.__docgenInfo,name:"list",path:"src/apps/reservation-list/list/list.tsx#list"})}catch(__react_docgen_typescript_loader_error){}var helpers=__webpack_require__("./src/apps/reservation-list/utils/helpers.ts"),useReservations=__webpack_require__("./src/core/utils/useReservations.tsx");const DisplayedReservations=({pageSize,openReservationDetailsModal})=>{const t=(0,utils_text.X)(),{all:{readyToLoan:readyToLoanReservations},fbs:{queued:reservedReservationsFBS},publizon:{queued:reservedReservationsPublizon}}=(0,useReservations.Z)();return react.createElement(react.Fragment,null,react.createElement(list_list,{openReservationDetailsModal,pageSize,header:t("reservationListReadyForPickupTitleText"),reservations:(0,helpers.TM)(readyToLoanReservations),emptyListDataCy:"reservation-list-ready-for-pickup-empty-list",emptyListLabel:t("reservationListReadyForPickupEmptyText")}),react.createElement(list_list,{openReservationDetailsModal,pageSize,header:t("reservationListPhysicalReservationsHeaderText"),reservations:(0,helpers.cf)(reservedReservationsFBS),emptyListDataCy:"reservation-list-physical-reservations-empty-list",emptyListLabel:t("reservationListPhysicalReservationsEmptyText")}),react.createElement(list_list,{openReservationDetailsModal,pageSize,header:t("reservationListDigitalReservationsHeaderText"),emptyListDataCy:"reservation-list-digital-reservations-empty-list",reservations:(0,helpers.TM)(reservedReservationsPublizon),emptyListLabel:t("reservationListDigitalReservationsEmptyText")}))},list_DisplayedReservations=DisplayedReservations;try{DisplayedReservations.displayName="DisplayedReservations",DisplayedReservations.__docgenInfo={description:"",displayName:"DisplayedReservations",props:{pageSize:{defaultValue:null,description:"",name:"pageSize",required:!0,type:{name:"number"}},openReservationDetailsModal:{defaultValue:null,description:"",name:"openReservationDetailsModal",required:!0,type:{name:"(reservation: Nullable>) => void"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/reservation-list/list/DisplayedReservations.tsx#DisplayedReservations"]={docgenInfo:DisplayedReservations.__docgenInfo,name:"DisplayedReservations",path:"src/apps/reservation-list/list/DisplayedReservations.tsx#DisplayedReservations"})}catch(__react_docgen_typescript_loader_error){}var material_details_modal=__webpack_require__("./src/apps/loan-list/modal/material-details-modal.tsx"),reservation_details=__webpack_require__("./src/apps/reservation-list/modal/reservation-details/reservation-details.tsx"),url=__webpack_require__("./src/core/utils/helpers/url.ts"),user=__webpack_require__("./src/core/utils/helpers/user.ts");const reservation_list=({pageSize})=>{const t=(0,utils_text.X)(),{modalIds}=(0,es.v9)((s=>s.modal)),{open}=(0,modal.f)(),{pauseReservation,deleteReservation,reservationDetails}=(0,modal_helpers.GM)(),[reservationWithDetails,setReservationWithDetails]=(0,react.useState)(null),[reservationToDelete,setReservationToDelete]=(0,react.useState)(null),{data:userData}=(0,user.dp)(),{all:{reservations:allReservations,isLoading}}=(0,useReservations.Z)(),allListsEmpty=0===allReservations.length&&isLoading;return(0,useDeepCompareEffect.Z)((()=>{const modalUrlParam=(0,url.wo)("modal"),resDetails=reservationDetails;if(modalUrlParam&&modalUrlParam.includes(resDetails)){const queryReservationId=(0,modal_helpers.FV)(modalUrlParam,resDetails);if(queryReservationId&&allReservations){const reservationFromQuery=allReservations.filter((reservation=>(0,reservation_type._p)(reservation)===queryReservationId)).at(0);reservationFromQuery&&setReservationWithDetails(reservationFromQuery)}}const deleteRes=deleteReservation;if(modalUrlParam&&modalUrlParam.includes(deleteRes)){const queryReservationId=(0,modal_helpers.FV)(modalUrlParam,deleteRes);if(queryReservationId&&allReservations){const reservationFromQuery=allReservations.filter((reservation=>(0,reservation_type._p)(reservation)===queryReservationId)).at(0);reservationFromQuery&&setReservationWithDetails(reservationFromQuery)}}}),[allReservations,reservationDetails,deleteReservation]),react.createElement(react.Fragment,null,react.createElement("div",{className:`reservation-list-page ${(0,general.Do)(modalIds)}`},react.createElement("h1",{className:"text-header-h1 m-32"},t("reservationListHeaderText")),(null==userData?void 0:userData.patron)&&react.createElement(reservation_pause_toggler,{user:userData.patron}),allListsEmpty&&react.createElement(list_EmptyReservations,null),!allListsEmpty&&react.createElement(list_DisplayedReservations,{openReservationDetailsModal:reservationForModal=>{setReservationWithDetails(reservationForModal),open((0,material_details_modal.Wu)(reservationForModal))},pageSize})),(null==userData?void 0:userData.patron)&&react.createElement(pause_reservation.Z,{user:null==userData?void 0:userData.patron,id:pauseReservation}),reservationToDelete&&react.createElement(delete_reservation_modal.Z,{modalId:(0,delete_reservation_modal._)(reservationToDelete),reservations:[reservationToDelete]}),reservationWithDetails&&react.createElement(material_details_modal.ZP,{modalId:(0,material_details_modal.Wu)(reservationWithDetails)},react.createElement(reservation_details.Z,{openReservationDeleteModal:reservationForModal=>{setReservationToDelete(reservationForModal),open((0,delete_reservation_modal._)(reservationForModal))},item:reservationWithDetails,reservation:reservationWithDetails})))};try{reservationlist.displayName="reservationlist",reservationlist.__docgenInfo={description:"",displayName:"reservationlist",props:{pageSize:{defaultValue:null,description:"",name:"pageSize",required:!0,type:{name:"number"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/reservation-list/list/reservation-list.tsx#reservationlist"]={docgenInfo:reservationlist.__docgenInfo,name:"reservationlist",path:"src/apps/reservation-list/list/reservation-list.tsx#reservationlist"})}catch(__react_docgen_typescript_loader_error){}var utils_url=__webpack_require__("./src/core/utils/url.tsx"),config=__webpack_require__("./src/core/utils/config.tsx"),withIsPatronBlockedHoc=__webpack_require__("./src/core/utils/withIsPatronBlockedHoc.tsx");const reservation_list_entry=(0,config.Rh)((0,utils_url.XL)((0,utils_text.z)((0,withIsPatronBlockedHoc.Z)((({pageSizeDesktop,pageSizeMobile})=>{const pageSize=(0,general.Rh)({desktop:pageSizeDesktop,mobile:pageSizeMobile},"pageSizeReservationList");return react.createElement(reservation_list,{pageSize})})))));try{reservationlistentry.displayName="reservationlistentry",reservationlistentry.__docgenInfo={description:"",displayName:"reservationlistentry",props:{pageSizeDesktop:{defaultValue:null,description:"",name:"pageSizeDesktop",required:!1,type:{name:"number | undefined"}},pageSizeMobile:{defaultValue:null,description:"",name:"pageSizeMobile",required:!1,type:{name:"number | undefined"}},reservationListHeaderText:{defaultValue:null,description:"",name:"reservationListHeaderText",required:!0,type:{name:"string"}},physicalLoansTitleText:{defaultValue:null,description:"",name:"physicalLoansTitleText",required:!0,type:{name:"string"}},reservationListReadyText:{defaultValue:null,description:"",name:"reservationListReadyText",required:!0,type:{name:"string"}},materialByAuthorText:{defaultValue:null,description:"",name:"materialByAuthorText",required:!0,type:{name:"string"}},materialAndAuthorText:{defaultValue:null,description:"",name:"materialAndAuthorText",required:!0,type:{name:"string"}},reservationDetailsExpiresText:{defaultValue:null,description:"",name:"reservationDetailsExpiresText",required:!0,type:{name:"string"}},etAlText:{defaultValue:null,description:"",name:"etAlText",required:!0,type:{name:"string"}},reservationListNumberInQueueText:{defaultValue:null,description:"",name:"reservationListNumberInQueueText",required:!0,type:{name:"string"}},reservationListFirstInQueueText:{defaultValue:null,description:"",name:"reservationListFirstInQueueText",required:!0,type:{name:"string"}},reservationListDigitalPickupText:{defaultValue:null,description:"",name:"reservationListDigitalPickupText",required:!0,type:{name:"string"}},expiresSoonText:{defaultValue:null,description:"",name:"expiresSoonText",required:!0,type:{name:"string"}},reservationListInQueueText:{defaultValue:null,description:"",name:"reservationListInQueueText",required:!0,type:{name:"string"}},reservationPickUpLatestText:{defaultValue:null,description:"",name:"reservationPickUpLatestText",required:!0,type:{name:"string"}},publizonEbookText:{defaultValue:null,description:"",name:"publizonEbookText",required:!0,type:{name:"string"}},publizonAudioBookText:{defaultValue:null,description:"",name:"publizonAudioBookText",required:!0,type:{name:"string"}},publizonPodcastText:{defaultValue:null,description:"",name:"publizonPodcastText",required:!0,type:{name:"string"}},reservationListLoanBeforeText:{defaultValue:null,description:"",name:"reservationListLoanBeforeText",required:!0,type:{name:"string"}},reservationListDaysText:{defaultValue:null,description:"",name:"reservationListDaysText",required:!0,type:{name:"string"}},reservationListDayText:{defaultValue:null,description:"",name:"reservationListDayText",required:!0,type:{name:"string"}},reservationListAvailableInText:{defaultValue:null,description:"",name:"reservationListAvailableInText",required:!0,type:{name:"string"}},reservationDetailsExpiresTitleText:{defaultValue:null,description:"",name:"reservationDetailsExpiresTitleText",required:!0,type:{name:"string"}},reservationDetailsOthersInQueueText:{defaultValue:null,description:"",name:"reservationDetailsOthersInQueueText",required:!0,type:{name:"string"}},reservationListPauseReservationButtonText:{defaultValue:null,description:"",name:"reservationListPauseReservationButtonText",required:!0,type:{name:"string"}},reservationListPauseReservationText:{defaultValue:null,description:"",name:"reservationListPauseReservationText",required:!0,type:{name:"string"}},reservationListPauseReservationOnHoldText:{defaultValue:null,description:"",name:"reservationListPauseReservationOnHoldText",required:!0,type:{name:"string"}},reservationListOnHoldAriaText:{defaultValue:null,description:"",name:"reservationListOnHoldAriaText",required:!0,type:{name:"string"}},reservationListPauseReservationAriaModalText:{defaultValue:null,description:"",name:"reservationListPauseReservationAriaModalText",required:!0,type:{name:"string"}},pauseReservationModalAriaDescriptionText:{defaultValue:null,description:"",name:"pauseReservationModalAriaDescriptionText",required:!0,type:{name:"string"}},pauseReservationModalHeaderText:{defaultValue:null,description:"",name:"pauseReservationModalHeaderText",required:!0,type:{name:"string"}},pauseReservationModalBodyText:{defaultValue:null,description:"",name:"pauseReservationModalBodyText",required:!0,type:{name:"string"}},pauseReservationModalCloseModalText:{defaultValue:null,description:"",name:"pauseReservationModalCloseModalText",required:!0,type:{name:"string"}},dateInputsStartDateLabelText:{defaultValue:null,description:"",name:"dateInputsStartDateLabelText",required:!0,type:{name:"string"}},dateInputsEndDateLabelText:{defaultValue:null,description:"",name:"dateInputsEndDateLabelText",required:!0,type:{name:"string"}},pauseReservationModalBelowInputsTextText:{defaultValue:null,description:"",name:"pauseReservationModalBelowInputsTextText",required:!0,type:{name:"string"}},pauseReservationModalLinkText:{defaultValue:null,description:"",name:"pauseReservationModalLinkText",required:!0,type:{name:"string"}},pauseReservationModalSaveButtonLabelText:{defaultValue:null,description:"",name:"pauseReservationModalSaveButtonLabelText",required:!0,type:{name:"string"}},pauseReservationModalCancelButtonLabelText:{defaultValue:null,description:"",name:"pauseReservationModalCancelButtonLabelText",required:!0,type:{name:"string"}},reservationListReadyForPickupTitleText:{defaultValue:null,description:"",name:"reservationListReadyForPickupTitleText",required:!0,type:{name:"string"}},reservationListReadyForPickupEmptyText:{defaultValue:null,description:"",name:"reservationListReadyForPickupEmptyText",required:!0,type:{name:"string"}},reservationListPhysicalReservationsEmptyText:{defaultValue:null,description:"",name:"reservationListPhysicalReservationsEmptyText",required:!0,type:{name:"string"}},reservationListPhysicalReservationsHeaderText:{defaultValue:null,description:"",name:"reservationListPhysicalReservationsHeaderText",required:!0,type:{name:"string"}},reservationListDigitalReservationsEmptyText:{defaultValue:null,description:"",name:"reservationListDigitalReservationsEmptyText",required:!0,type:{name:"string"}},reservationListDigitalReservationsHeaderText:{defaultValue:null,description:"",name:"reservationListDigitalReservationsHeaderText",required:!0,type:{name:"string"}},reservationListAllEmptyText:{defaultValue:null,description:"",name:"reservationListAllEmptyText",required:!0,type:{name:"string"}},blockedPatronDTitleText:{defaultValue:null,description:"",name:"blockedPatronDTitleText",required:!0,type:{name:"string"}},blockedPatronDBodyText:{defaultValue:null,description:"",name:"blockedPatronDBodyText",required:!0,type:{name:"string"}},blockedPatronSTitleText:{defaultValue:null,description:"",name:"blockedPatronSTitleText",required:!0,type:{name:"string"}},blockedPatronSBodyText:{defaultValue:null,description:"",name:"blockedPatronSBodyText",required:!0,type:{name:"string"}},blockedPatronFTitleText:{defaultValue:null,description:"",name:"blockedPatronFTitleText",required:!0,type:{name:"string"}},blockedPatronFBodyText:{defaultValue:null,description:"",name:"blockedPatronFBodyText",required:!0,type:{name:"string"}},blockedPatronETitleText:{defaultValue:null,description:"",name:"blockedPatronETitleText",required:!0,type:{name:"string"}},blockedPatronEBodyText:{defaultValue:null,description:"",name:"blockedPatronEBodyText",required:!0,type:{name:"string"}},blockedPatronWTitleText:{defaultValue:null,description:"",name:"blockedPatronWTitleText",required:!0,type:{name:"string"}},blockedPatronWBodyText:{defaultValue:null,description:"",name:"blockedPatronWBodyText",required:!0,type:{name:"string"}},blockedPatronOTitleText:{defaultValue:null,description:"",name:"blockedPatronOTitleText",required:!0,type:{name:"string"}},blockedPatronOBodyText:{defaultValue:null,description:"",name:"blockedPatronOBodyText",required:!0,type:{name:"string"}},blockedPatronUTitleText:{defaultValue:null,description:"",name:"blockedPatronUTitleText",required:!0,type:{name:"string"}},blockedPatronUBodyText:{defaultValue:null,description:"",name:"blockedPatronUBodyText",required:!0,type:{name:"string"}},blockedPatronELinkText:{defaultValue:null,description:"",name:"blockedPatronELinkText",required:!0,type:{name:"string"}},blockedPatronELinkUrl:{defaultValue:null,description:"",name:"blockedPatronELinkUrl",required:!0,type:{name:"string"}},blockedPatronCloseModalAriaLabelText:{defaultValue:null,description:"",name:"blockedPatronCloseModalAriaLabelText",required:!0,type:{name:"string"}},blockedPatronModalAriaDescriptionText:{defaultValue:null,description:"",name:"blockedPatronModalAriaDescriptionText",required:!0,type:{name:"string"}},BlockedPatronEntryTextProps:{defaultValue:null,description:"",name:"BlockedPatronEntryTextProps",required:!0,type:{name:"string"}},redirectOnBlocked:{defaultValue:null,description:"",name:"redirectOnBlocked",required:!0,type:{name:"string"}},expirationWarningDaysBeforeConfig:{defaultValue:null,description:"",name:"expirationWarningDaysBeforeConfig",required:!0,type:{name:"string"}},pauseReservationStartDateConfig:{defaultValue:null,description:"",name:"pauseReservationStartDateConfig",required:!0,type:{name:"string"}},blacklistedPickupBranchesConfig:{defaultValue:null,description:"",name:"blacklistedPickupBranchesConfig",required:!0,type:{name:"string"}},branchesConfig:{defaultValue:null,description:"",name:"branchesConfig",required:!0,type:{name:"string"}},ereolenMyPageUrl:{defaultValue:null,description:"",name:"ereolenMyPageUrl",required:!0,type:{name:"string"}},pauseReservationInfoUrl:{defaultValue:null,description:"",name:"pauseReservationInfoUrl",required:!0,type:{name:"string"}},deleteReservationModalHeaderText:{defaultValue:null,description:"",name:"deleteReservationModalHeaderText",required:!0,type:{name:"string"}},deleteReservationModalDeleteQuestionText:{defaultValue:null,description:"",name:"deleteReservationModalDeleteQuestionText",required:!0,type:{name:"string"}},deleteReservationModalNotRegrettableText:{defaultValue:null,description:"",name:"deleteReservationModalNotRegrettableText",required:!0,type:{name:"string"}},deleteReservationModalDeleteButtonText:{defaultValue:null,description:"",name:"deleteReservationModalDeleteButtonText",required:!0,type:{name:"string"}},deleteReservationModalCloseModalText:{defaultValue:null,description:"",name:"deleteReservationModalCloseModalText",required:!0,type:{name:"string"}},deleteReservationModalAriaDescriptionText:{defaultValue:null,description:"",name:"deleteReservationModalAriaDescriptionText",required:!0,type:{name:"string"}},reservationDetailsRemoveDigitalReservationText:{defaultValue:null,description:"",name:"reservationDetailsRemoveDigitalReservationText",required:!0,type:{name:"string"}},reservationDetailsDateOfReservationTitleText:{defaultValue:null,description:"",name:"reservationDetailsDateOfReservationTitleText",required:!0,type:{name:"string"}},reservationDetailsNumberInQueueLabelText:{defaultValue:null,description:"",name:"reservationDetailsNumberInQueueLabelText",required:!0,type:{name:"string"}},reservationDetailsNoInterestAfterTitleText:{defaultValue:null,description:"",name:"reservationDetailsNoInterestAfterTitleText",required:!0,type:{name:"string"}},reservationDetailsChangeText:{defaultValue:null,description:"",name:"reservationDetailsChangeText",required:!0,type:{name:"string"}},reservationDetailsPickUpAtTitleText:{defaultValue:null,description:"",name:"reservationDetailsPickUpAtTitleText",required:!0,type:{name:"string"}},reservationDetailsButtonRemoveText:{defaultValue:null,description:"",name:"reservationDetailsButtonRemoveText",required:!0,type:{name:"string"}},reservationDetailsStatusTitleText:{defaultValue:null,description:"",name:"reservationDetailsStatusTitleText",required:!0,type:{name:"string"}},reservationDetailsBorrowBeforeText:{defaultValue:null,description:"",name:"reservationDetailsBorrowBeforeText",required:!0,type:{name:"string"}},reservationDetailsDigitalReservationGoToEreolenText:{defaultValue:null,description:"",name:"reservationDetailsDigitalReservationGoToEreolenText",required:!0,type:{name:"string"}},reservationDetailsReadyForLoanText:{defaultValue:null,description:"",name:"reservationDetailsReadyForLoanText",required:!0,type:{name:"string"}},reservationDetailsPickupDeadlineTitleText:{defaultValue:null,description:"",name:"reservationDetailsPickupDeadlineTitleText",required:!0,type:{name:"string"}},interestPeriodsConfig:{defaultValue:null,description:"",name:"interestPeriodsConfig",required:!0,type:{name:"string"}},reservationDetailsConfig:{defaultValue:null,description:"",name:"reservationDetailsConfig",required:!0,type:{name:"string"}},shiftText:{defaultValue:null,description:"",name:"shiftText",required:!0,type:{name:"string"}},modalReservationFormPickupHeaderTitleText:{defaultValue:null,description:"",name:"modalReservationFormPickupHeaderTitleText",required:!0,type:{name:"string"}},modalReservationFormPickupHeaderDescriptionText:{defaultValue:null,description:"",name:"modalReservationFormPickupHeaderDescriptionText",required:!0,type:{name:"string"}},saveButtonText:{defaultValue:null,description:"",name:"saveButtonText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterHeaderTitleText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterHeaderTitleText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterHeaderDescriptionText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterHeaderDescriptionText",required:!0,type:{name:"string"}},chooseOneText:{defaultValue:null,description:"",name:"chooseOneText",required:!0,type:{name:"string"}},loadingText:{defaultValue:null,description:"",name:"loadingText",required:!0,type:{name:"string"}},reservationSuccessTitleText:{defaultValue:null,description:"",name:"reservationSuccessTitleText",required:!0,type:{name:"string"}},reservationSuccessSubTitleText:{defaultValue:null,description:"",name:"reservationSuccessSubTitleText",required:!0,type:{name:"string"}},reservationerrorTitleText:{defaultValue:null,description:"",name:"reservationerrorTitleText",required:!0,type:{name:"string"}},reservationerrorSubTitleText:{defaultValue:null,description:"",name:"reservationerrorSubTitleText",required:!0,type:{name:"string"}},reservationStatusButtonText:{defaultValue:null,description:"",name:"reservationStatusButtonText",required:!0,type:{name:"string"}},materialUrl:{defaultValue:null,description:"",name:"materialUrl",required:!0,type:{name:"string"}},searchUrl:{defaultValue:null,description:"",name:"searchUrl",required:!0,type:{name:"string"}},advancedSearchUrl:{defaultValue:null,description:"",name:"advancedSearchUrl",required:!0,type:{name:"string"}},fbsBaseUrl:{defaultValue:null,description:"",name:"fbsBaseUrl",required:!0,type:{name:"string"}},loanListEreolenUrl:{defaultValue:null,description:"",name:"loanListEreolenUrl",required:!0,type:{name:"string"}},feesPageUrl:{defaultValue:null,description:"",name:"feesPageUrl",required:!0,type:{name:"string"}},publizonBaseUrl:{defaultValue:null,description:"",name:"publizonBaseUrl",required:!0,type:{name:"string"}},dplCmsBaseUrl:{defaultValue:null,description:"",name:"dplCmsBaseUrl",required:!0,type:{name:"string"}},coverBaseUrl:{defaultValue:null,description:"",name:"coverBaseUrl",required:!0,type:{name:"string"}},materialBaseUrl:{defaultValue:null,description:"",name:"materialBaseUrl",required:!0,type:{name:"string"}},fbiBaseUrl:{defaultValue:null,description:"",name:"fbiBaseUrl",required:!0,type:{name:"string"}},authUrl:{defaultValue:null,description:"",name:"authUrl",required:!0,type:{name:"string"}},ereolenHomepageUrl:{defaultValue:null,description:"",name:"ereolenHomepageUrl",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/reservation-list/list/reservation-list.entry.tsx#reservationlistentry"]={docgenInfo:reservationlistentry.__docgenInfo,name:"reservationlistentry",path:"src/apps/reservation-list/list/reservation-list.entry.tsx#reservationlistentry"})}catch(__react_docgen_typescript_loader_error){}var serviceUrlArgs=__webpack_require__("./src/core/storybook/serviceUrlArgs.ts"),blockedArgs=__webpack_require__("./src/core/storybook/blockedArgs.ts"),reservationMaterialDetailsArgs=__webpack_require__("./src/core/storybook/reservationMaterialDetailsArgs.ts"),deleteReservationModalArgs=__webpack_require__("./src/core/storybook/deleteReservationModalArgs.ts"),reservationListArgs=__webpack_require__("./src/core/storybook/reservationListArgs.ts");const reservation_list_dev={title:"Apps / Reservation list",component:reservation_list_entry,argTypes:{...serviceUrlArgs.Z,...deleteReservationModalArgs.Z,...reservationMaterialDetailsArgs.Z,...blockedArgs.Z,...reservationListArgs.Z,blacklistedSearchBranchesConfig:{name:"Blacklisted branches",defaultValue:"FBS-751032,FBS-751031,FBS-751009,FBS-751027,FBS-751024",control:{type:"text"}},expirationWarningDaysBeforeConfig:{defaultValue:"6",control:{type:"text"}},pauseReservationStartDateConfig:{defaultValue:"2022-06-30",control:{type:"text"}},blacklistedPickupBranchesConfig:{name:"Blacklisted branches",defaultValue:"FBS-751032,FBS-751031,FBS-751009,FBS-751027,FBS-751024",control:{type:"text"}},branchesConfig:{name:"Branches",defaultValue:'[\n {\n "branchId":"DK-775120",\n "title":"Højbjerg"\n },\n {\n "branchId":"DK-775122",\n "title":"Beder-Malling"\n },\n {\n "branchId":"DK-775144",\n "title":"Gellerup"\n },\n {\n "branchId":"DK-775167",\n "title":"Lystrup"\n },\n {\n "branchId":"DK-775146",\n "title":"Harlev"\n },\n {\n "branchId":"DK-775168",\n "title":"Skødstrup"\n },\n {\n "branchId":"FBS-751010",\n "title":"Arresten"\n },\n {\n "branchId":"DK-775147",\n "title":"Hasle"\n },\n {\n "branchId":"FBS-751032",\n "title":"Må ikke benyttes"\n },\n {\n "branchId":"FBS-751031",\n "title":"Fjernlager 1"\n },\n {\n "branchId":"DK-775126",\n "title":"Solbjerg"\n },\n {\n "branchId":"FBS-751030",\n "title":"ITK"\n },\n {\n "branchId":"DK-775149",\n "title":"Sabro"\n },\n {\n "branchId":"DK-775127",\n "title":"Tranbjerg"\n },\n {\n "branchId":"DK-775160",\n "title":"Risskov"\n },\n {\n "branchId":"DK-775162",\n "title":"Hjortshøj"\n },\n {\n "branchId":"DK-775140",\n "title":"Åby"\n },\n {\n "branchId":"FBS-751009",\n "title":"Fjernlager 2"\n },\n {\n "branchId":"FBS-751029",\n "title":"Stadsarkivet"\n },\n {\n "branchId":"FBS-751027",\n "title":"Intern"\n },\n {\n "branchId":"FBS-751026",\n "title":"Fælles undervejs"\n },\n {\n "branchId":"FBS-751025",\n "title":"Fællessekretariatet"\n },\n {\n "branchId":"DK-775133",\n "title":"Bavnehøj"\n },\n {\n "branchId":"FBS-751024",\n "title":"Fjernlånte materialer"\n },\n {\n "branchId":"DK-775100",\n "title":"Hovedbiblioteket"\n },\n {\n "branchId":"DK-775170",\n "title":"Trige"\n },\n {\n "branchId":"DK-775150",\n "title":"Tilst"\n },\n {\n "branchId":"DK-775130",\n "title":"Viby"\n },\n {\n "branchId":"DK-775164",\n "title":"Egå"\n }\n]',control:{type:"text"}},pageSizeDesktop:{defaultValue:20,control:{type:"number"}},pageSizeMobile:{defaultValue:10,control:{type:"number"}},ereolenMyPageUrl:{defaultValue:"https://ereolen.dk/user/me/",control:{type:"text"}},pauseReservationInfoUrl:{defaultValue:"https://images.unsplash.com/photo-1571043733612-d5444ff7d4ae?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1335&q=80",control:{type:"text"}},ereolenHomepageUrl:{defaultValue:"https://ereolen.dk/",control:{type:"text"}},reservationListHeaderText:{defaultValue:"Your reservations",control:{type:"text"}},reservationListPhysicalReservationsHeaderText:{defaultValue:"Physical reservations",control:{type:"text"}},reservationListDigitalReservationsHeaderText:{defaultValue:"Digital reservations",control:{type:"text"}},reservationListReadyForPickupTitleText:{defaultValue:"Ready for pickup",control:{type:"text"}},reservationListReadyForPickupEmptyText:{defaultValue:"At the moment you have 0 reservations ready for pickup",control:{type:"text"}},reservationListPhysicalReservationsEmptyText:{defaultValue:"At the moment you have 0 physical reservations",control:{type:"text"}},reservationListAllEmptyText:{defaultValue:"At the moment you have 0 reservations",control:{type:"text"}},reservationListDigitalReservationsEmptyText:{defaultValue:"At the moment you have 0 reservations on digital items",control:{type:"text"}},reservationListReadyText:{defaultValue:"Ready",control:{type:"text"}},materialByAuthorText:{defaultValue:"By",control:{type:"text"}},materialAndAuthorText:{defaultValue:"and",control:{type:"text"}},etAlText:{defaultValue:"et al.",control:{type:"text"}},reservationListNumberInQueueText:{defaultValue:"There are @count people in the queue before you",control:{type:"text"}},reservationListFirstInQueueText:{defaultValue:"You are at the front of the queue",control:{type:"text"}},reservationListDigitalPickupText:{defaultValue:"Online access",control:{type:"text"}},reservationListInQueueText:{defaultValue:"queued",control:{type:"text"}},reservationPickUpLatestText:{defaultValue:"Pick up before @date",control:{type:"text"}},publizonEbookText:{defaultValue:"E-book",control:{type:"text"}},publizonAudioBookText:{defaultValue:"Audiobook",control:{type:"text"}},publizonPodcastText:{defaultValue:"Podcast",control:{type:"text"}},reservationListLoanBeforeText:{defaultValue:"Borrow before @date",control:{type:"text"}},reservationListAvailableInText:{defaultValue:"Available in @count days",control:{type:"text"}},reservationListDaysText:{defaultValue:"days",control:{type:"text"}},reservationListDayText:{defaultValue:"day",control:{type:"text"}},reservationDetailsOthersInQueueText:{defaultValue:"Others are queueing for this material",control:{type:"text"}},reservationDetailsExpiresTitleText:{defaultValue:"Pickup deadline",control:{type:"text"}},reservationDetailsDigitalMaterialExpiresTitleText:{defaultValue:"Borrow before",control:{type:"text"}},reservationDetailsExpiresText:{defaultValue:"Your reservation expires @date!",control:{type:"text"}},reservationDetailsSaveText:{defaultValue:"Save",control:{type:"text"}},reservationDetailsCancelText:{defaultValue:"Cancel",control:{type:"text"}},reservationListPauseReservationText:{defaultValue:"Pause your reservations",control:{type:"text"}},reservationListPauseReservationOnHoldText:{defaultValue:"Your reservations are paused",control:{type:"text"}},reservationListOnHoldAriaText:{defaultValue:"Reservations have been paused in the following time span: ",control:{type:"text"}},reservationListPauseReservationAriaModalText:{defaultValue:"Opens a modal that covers the entire page where it is possible to pause physical reservations",control:{type:"text"}},reservationListPauseReservationButtonText:{defaultValue:"Settings",control:{type:"text"}},pauseReservationModalAriaDescriptionText:{defaultValue:"This modal makes it possible to pause your physical reservations",control:{type:"text"}},pauseReservationModalHeaderText:{defaultValue:"Pause reservations on physical items",control:{type:"text"}},pauseReservationModalBodyText:{defaultValue:"Pause your reservations early, since reservations that are already being processed, will not be paused.",control:{type:"text"}},pauseReservationModalCloseModalText:{defaultValue:"Close pause reservations modal",control:{type:"text"}},dateInputsStartDateLabelText:{defaultValue:"Start date",control:{type:"text"}},dateInputsEndDateLabelText:{defaultValue:"End date",control:{type:"text"}},pauseReservationModalBelowInputsTextText:{defaultValue:"",control:{type:"text"}},pauseReservationModalLinkText:{defaultValue:"Read more about pausing reservertions and what that means here",control:{type:"text"}},pauseReservationModalSaveButtonLabelText:{defaultValue:"Save",control:{type:"text"}},pauseReservationModalCancelButtonLabelText:{defaultValue:"Cancel pause",control:{type:"text"}},showMoreText:{name:"Show more Text",defaultValue:"show more",control:{type:"text"}},resultPagerStatusText:{name:"Result pager status text",defaultValue:"Showing @itemsShown out of @hitcount results",control:{type:"text"}}},decorators:[esm.j]},Template=props=>react.createElement(reservation_list_entry,props),reservation_list_dev_ReservationListEntry=Template.bind({});reservation_list_dev_ReservationListEntry.args={};const{reservationDetails}=(0,modal_helpers.GM)(),ReservationListDigitalDetailsModal=Template.bind({});ReservationListDigitalDetailsModal.parameters={query:{modal:`${reservationDetails}9788702319361`}};const ReservationListPhysicalDetailsModal=Template.bind({});ReservationListPhysicalDetailsModal.parameters={query:{modal:`${reservationDetails}4698559133`}};const{pauseReservation}=(0,modal_helpers.GM)(),ReservationListPauseModal=Template.bind({});ReservationListPauseModal.parameters={query:{modal:pauseReservation}}},"./src/apps/reservation-list/modal/delete-reservation/delete-reservation-modal.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>delete_reservation_modal,_:()=>deleteReservationModalId});var react=__webpack_require__("./node_modules/react/index.js"),es=__webpack_require__("./node_modules/react-query/es/index.js"),modal=__webpack_require__("./src/core/utils/modal.tsx"),utils_text=__webpack_require__("./src/core/utils/text.tsx"),reservation_type=__webpack_require__("./src/core/utils/types/reservation-type.ts");const requestsAndReservations=({reservations,operations})=>{const{physical:reservationsPhysical,digital:reservationsDigital}=(reservations=>reservations.length?{physical:reservations.filter(reservation_type.xF).map((({reservationIds})=>reservationIds)).flat(),digital:reservations.filter(reservation_type.Rq).map((({identifier})=>identifier))}:{physical:[],digital:[]})(reservations),requests=[];return reservationsPhysical.length&&requests.push({params:{params:{reservationid:reservationsPhysical}},operation:operations.physical}),reservationsDigital.length&&reservationsDigital.forEach((id=>{requests.push({params:{identifier:String(id)},operation:operations.digital})})),{requests,reservationsPhysical,reservationsDigital}};var Button=__webpack_require__("./src/components/Buttons/Button.tsx");const delete_reservation_content=({deleteReservation,reservationsCount,deletionStatus})=>{const t=(0,utils_text.X)(),deleteReservationCallback=(0,react.useCallback)((()=>{deleteReservation()}),[deleteReservation]),buttonLabel=(({reservationsCount,deletionStatus,t})=>"pending"===deletionStatus?t("deleteReservationModalDeleteProcessingText"):t("deleteReservationModalDeleteButtonText",{count:reservationsCount}))({t,reservationsCount,deletionStatus});return react.createElement(react.Fragment,null,react.createElement("h2",{className:"text-header-h3"},t("deleteReservationModalHeaderText",{count:reservationsCount})),react.createElement("div",{className:"mt-48 color-secondary-gray"},react.createElement("p",{className:"text-body-medium-regular"},t("deleteReservationModalDeleteQuestionText",{count:reservationsCount})),react.createElement("p",{className:"text-body-medium-regular"},t("deleteReservationModalNotRegrettableText"))),react.createElement("div",{className:"modal-pause__button mt-48"},react.createElement(Button.z,{dataCy:"delete-reservation-button",label:buttonLabel,buttonType:"none",variant:"filled",disabled:"pending"===deletionStatus,collapsible:!1,onClick:deleteReservationCallback,size:"small"})))};try{deletereservationcontent.displayName="deletereservationcontent",deletereservationcontent.__docgenInfo={description:"",displayName:"deletereservationcontent",props:{deleteReservation:{defaultValue:null,description:"",name:"deleteReservation",required:!0,type:{name:"() => void"}},reservationsCount:{defaultValue:null,description:"",name:"reservationsCount",required:!0,type:{name:"number"}},deletionStatus:{defaultValue:null,description:"",name:"deletionStatus",required:!0,type:{name:"enum",value:[{value:'"success"'},{value:'"error"'},{value:'"idle"'},{value:'"pending"'}]}},material:{defaultValue:null,description:"",name:"material",required:!1,type:{name:"Nullable> | null | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/reservation-list/modal/delete-reservation/delete-reservation-content.tsx#deletereservationcontent"]={docgenInfo:deletereservationcontent.__docgenInfo,name:"deletereservationcontent",path:"src/apps/reservation-list/modal/delete-reservation/delete-reservation-content.tsx#deletereservationcontent"})}catch(__react_docgen_typescript_loader_error){}var fbs=__webpack_require__("./src/core/fbs/fbs.ts"),publizon=__webpack_require__("./src/core/publizon/publizon.ts"),useRequestsWithStatus=__webpack_require__("./src/core/utils/useRequestsWithStatus.tsx"),ModalMessage=__webpack_require__("./src/components/message/modal-message/ModalMessage.tsx"),modal_helpers=__webpack_require__("./src/core/utils/helpers/modal-helpers.ts");function deleteReservationModalId(reservation){return`${String((0,modal_helpers.GM)().reservationDelete)}${(0,reservation_type._p)(reservation)}`}const delete_reservation_modal=({modalId,reservations})=>{const t=(0,utils_text.X)(),queryClient=(0,es.useQueryClient)(),{mutate:deletePhysicalReservation}=(0,fbs.a4)(),{mutate:deleteDigitalReservation}=(0,publizon.t7)(),[deletedReservations,setDeletedReservations]=(0,react.useState)(null),{requests,reservationsPhysical,reservationsDigital}=(0,react.useMemo)((()=>requestsAndReservations({operations:{digital:deleteDigitalReservation,physical:deletePhysicalReservation},reservations})),[deleteDigitalReservation,deletePhysicalReservation,reservations]),{handler:removeReservationsHandler,requestStatus,setRequestStatus}=(0,useRequestsWithStatus.HU)({requests,onSuccess:()=>{setDeletedReservations(reservations.length),queryClient.invalidateQueries((0,publizon.bh)()),queryClient.invalidateQueries((0,fbs.Jp)())}});if(!reservations)return null;const ctaButtonParams={text:t("deleteReservationModalButtonText"),closeAllModals:!0,callback:()=>{setRequestStatus("idle"),setDeletedReservations(null)}};return react.createElement(modal.Z,{modalId,classNames:"modal-cta modal-padding",closeModalAriaLabelText:t("deleteReservationModalCloseModalText"),screenReaderModalDescriptionText:t("deleteReservationModalAriaDescriptionText"),eventCallbacks:{close:()=>{setRequestStatus("idle"),setDeletedReservations(null)}}},["idle","pending"].includes(requestStatus)&&react.createElement(delete_reservation_content,{deleteReservation:()=>{(reservationsPhysical.length||reservationsDigital.length)&&removeReservationsHandler()},reservationsCount:reservations.length,deletionStatus:requestStatus}),"success"===requestStatus&&react.createElement(ModalMessage.Z,{title:t("deleteReservationModalSuccessTitleText"),subTitle:t("deleteReservationModalSuccessStatusText",{count:deletedReservations??0}),ctaButton:ctaButtonParams}),"error"===requestStatus&&react.createElement(ModalMessage.Z,{title:t("deleteReservationModalErrorsTitleText"),subTitle:t("deleteReservationModalErrorsStatusText"),ctaButton:ctaButtonParams}))};try{deleteReservationModalId.displayName="deleteReservationModalId",deleteReservationModalId.__docgenInfo={description:"",displayName:"deleteReservationModalId",props:{dateOfReservation:{defaultValue:null,description:"",name:"dateOfReservation",required:!1,type:{name:"string | null | undefined"}},expiryDate:{defaultValue:null,description:"",name:"expiryDate",required:!1,type:{name:"string | null | undefined"}},pickupDeadline:{defaultValue:null,description:"",name:"pickupDeadline",required:!1,type:{name:"string | null | undefined"}},numberInQueue:{defaultValue:null,description:"",name:"numberInQueue",required:!1,type:{name:"number | null | undefined"}},state:{defaultValue:null,description:"",name:"state",required:!1,type:{name:"string | null | undefined"}},expectedRedeemDateUtc:{defaultValue:null,description:"",name:"expectedRedeemDateUtc",required:!1,type:{name:"string | null | undefined"}},pickupNumber:{defaultValue:null,description:'The reservation number. This is, contrary to the name, a string containing, as an example, "Reserveringshylde 111"',name:"pickupNumber",required:!1,type:{name:"string | null | undefined"}},pickupBranch:{defaultValue:null,description:"",name:"pickupBranch",required:!1,type:{name:"string | null | undefined"}},title:{defaultValue:null,description:"",name:"title",required:!1,type:{name:"string | null | undefined"}},periodical:{defaultValue:null,description:"",name:"periodical",required:!1,type:{name:"string | null | undefined"}},faust:{defaultValue:null,description:"",name:"faust",required:!1,type:{name:"`${number}` | null | undefined"}},identifier:{defaultValue:null,description:"",name:"identifier",required:!1,type:{name:"string | null | undefined"}},reservationIds:{defaultValue:null,description:"",name:"reservationIds",required:!1,type:{name:"number[] | null | undefined"}},loanId:{defaultValue:null,description:"",name:"loanId",required:!1,type:{name:"number | null | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/reservation-list/modal/delete-reservation/delete-reservation-modal.tsx#deleteReservationModalId"]={docgenInfo:deleteReservationModalId.__docgenInfo,name:"deleteReservationModalId",path:"src/apps/reservation-list/modal/delete-reservation/delete-reservation-modal.tsx#deleteReservationModalId"})}catch(__react_docgen_typescript_loader_error){}try{deletereservationmodal.displayName="deletereservationmodal",deletereservationmodal.__docgenInfo={description:"",displayName:"deletereservationmodal",props:{modalId:{defaultValue:null,description:"",name:"modalId",required:!0,type:{name:"string"}},reservations:{defaultValue:null,description:"",name:"reservations",required:!0,type:{name:"Nullable>[]"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/reservation-list/modal/delete-reservation/delete-reservation-modal.tsx#deletereservationmodal"]={docgenInfo:deletereservationmodal.__docgenInfo,name:"deletereservationmodal",path:"src/apps/reservation-list/modal/delete-reservation/delete-reservation-modal.tsx#deletereservationmodal"})}catch(__react_docgen_typescript_loader_error){}},"./src/apps/reservation-list/modal/pause-reservation/pause-reservation.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>pause_reservation});var react=__webpack_require__("./node_modules/react/index.js"),dayjs_min=__webpack_require__("./node_modules/dayjs/dayjs.min.js"),dayjs_min_default=__webpack_require__.n(dayjs_min),es=__webpack_require__("./node_modules/react-query/es/index.js"),Link=__webpack_require__("./src/components/atoms/links/Link.tsx"),modal=__webpack_require__("./src/core/utils/modal.tsx"),utils_text=__webpack_require__("./src/core/utils/text.tsx"),fbs=__webpack_require__("./src/core/fbs/fbs.ts"),date=__webpack_require__("./src/core/utils/helpers/date.ts");const date_input=({label,id,value,onChange,minDateInput,required})=>{const minDate=value||minDateInput||(new Date).toISOString().split("T")[0];return react.createElement("div",{className:"datepicker"},react.createElement("label",{htmlFor:id,className:"text-body-medium-regular"},label),react.createElement("input",{required,"data-cy":id,type:"date",onChange:({target})=>onChange(target.value),name:id,value,id,className:"datepicker-input",min:minDate}))};try{dateinput.displayName="dateinput",dateinput.__docgenInfo={description:"",displayName:"dateinput",props:{label:{defaultValue:null,description:"",name:"label",required:!0,type:{name:"string"}},minDateInput:{defaultValue:null,description:"",name:"minDateInput",required:!1,type:{name:"string | undefined"}},id:{defaultValue:null,description:"",name:"id",required:!0,type:{name:"string"}},value:{defaultValue:null,description:"",name:"value",required:!0,type:{name:"string"}},required:{defaultValue:null,description:"",name:"required",required:!0,type:{name:"boolean"}},onChange:{defaultValue:null,description:"",name:"onChange",required:!0,type:{name:"(date: string) => void"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/date-inputs/date-input.tsx#dateinput"]={docgenInfo:dateinput.__docgenInfo,name:"dateinput",path:"src/components/date-inputs/date-input.tsx#dateinput"})}catch(__react_docgen_typescript_loader_error){}const date_inputs=({setStartDate,setEndDate,startDate,endDate})=>{const t=(0,utils_text.X)();return react.createElement("div",{className:"datepickers"},react.createElement(date_input,{value:startDate,required:!0,id:"start-date",onChange:setStartDate,label:t("dateInputsStartDateLabelText")}),react.createElement(date_input,{onChange:setEndDate,required:!0,minDateInput:((0,date.pj)(startDate)?null:startDate)||"",value:endDate,id:"end-date",label:t("dateInputsEndDateLabelText")}))};try{dateinputs.displayName="dateinputs",dateinputs.__docgenInfo={description:"",displayName:"dateinputs",props:{setStartDate:{defaultValue:null,description:"",name:"setStartDate",required:!0,type:{name:"(date: string) => void"}},setEndDate:{defaultValue:null,description:"",name:"setEndDate",required:!0,type:{name:"(date: string) => void"}},startDate:{defaultValue:null,description:"",name:"startDate",required:!0,type:{name:"string"}},endDate:{defaultValue:null,description:"",name:"endDate",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/date-inputs/date-inputs.tsx#dateinputs"]={docgenInfo:dateinputs.__docgenInfo,name:"dateinputs",path:"src/components/date-inputs/date-inputs.tsx#dateinputs"})}catch(__react_docgen_typescript_loader_error){}var url=__webpack_require__("./src/core/utils/url.tsx"),modal_helpers=__webpack_require__("./src/core/utils/helpers/modal-helpers.ts");const pause_reservation=({id,user})=>{var _user$onHold,_user$onHold2,_user$onHold5,_user$onHold6;const t=(0,utils_text.X)(),pauseReservationInfoUrl=(0,url.J_)()("pauseReservationInfoUrl"),queryClient=(0,es.useQueryClient)(),{mutate}=(0,fbs.tX)(),{close}=(0,modal.f)(),{pauseReservation}=(0,modal_helpers.GM)(),saveFormId=(0,react.useId)(),currentDate=dayjs_min_default()().format("YYYY-MM-DD"),[startDate,setStartDate]=(0,react.useState)(currentDate),[endDate,setEndDate]=(0,react.useState)(""),pauseActive=(null==user||null===(_user$onHold=user.onHold)||void 0===_user$onHold?void 0:_user$onHold.from)&&(null==user||null===(_user$onHold2=user.onHold)||void 0===_user$onHold2?void 0:_user$onHold2.to),save=(0,react.useCallback)(((localStartDate,localEndDate)=>{if(!user)return;const saveData={preferredPickupBranch:user.preferredPickupBranch,receiveEmail:user.receiveEmail,receivePostalMail:user.receivePostalMail,receiveSms:user.receiveSms};saveData.onHold={from:""===localStartDate?void 0:localStartDate,to:""===localEndDate?void 0:localEndDate},mutate({data:{patron:saveData}},{onSuccess:()=>{queryClient.invalidateQueries((0,fbs.Tk)()),close(pauseReservation)},onError:()=>{}})}),[close,mutate,pauseReservation,queryClient,user]),resetPauseDates=(0,react.useCallback)((()=>{setStartDate(currentDate),setEndDate(""),save()}),[currentDate,save]);return(0,react.useEffect)((()=>{var _user$onHold3,_user$onHold4;null!=user&&null!==(_user$onHold3=user.onHold)&&void 0!==_user$onHold3&&_user$onHold3.from&&setStartDate(user.onHold.from),null!=user&&null!==(_user$onHold4=user.onHold)&&void 0!==_user$onHold4&&_user$onHold4.to&&setEndDate(user.onHold.to)}),[null==user||null===(_user$onHold5=user.onHold)||void 0===_user$onHold5?void 0:_user$onHold5.from,null==user||null===(_user$onHold6=user.onHold)||void 0===_user$onHold6?void 0:_user$onHold6.to]),react.createElement(modal.Z,{modalId:id,classNames:"modal-cta",closeModalAriaLabelText:t("pauseReservationModalCloseModalText"),screenReaderModalDescriptionText:t("pauseReservationModalAriaDescriptionText")},react.createElement("div",{className:"modal-pause__container"},react.createElement("h2",{className:"text-header-h3"},t("pauseReservationModalHeaderText")),react.createElement("div",{className:"mt-48 color-secondary-gray"},react.createElement("p",{className:"text-body-medium-regular mb-32"},t("pauseReservationModalBodyText"))),react.createElement("form",{id:saveFormId,onSubmit:e=>{e.preventDefault(),save(startDate,endDate)}},react.createElement(date_inputs,{setStartDate,setEndDate,startDate,endDate})),react.createElement("div",{className:"modal-pause__text-link mt-24 color-secondary-gray"},react.createElement("p",{className:"text-body-small-regular"},t("pauseReservationModalBelowInputsTextText"),react.createElement(Link.Z,{id:"pause-reservation-info-link",href:pauseReservationInfoUrl,className:"link-tag"},t("pauseReservationModalLinkText")))),react.createElement("div",{className:"modal-pause__button mt-48"},react.createElement("button",{type:"submit",form:saveFormId,className:"btn-primary btn-filled btn-small"},t("pauseReservationModalSaveButtonLabelText")),pauseActive&&react.createElement("button",{type:"button",onClick:resetPauseDates,className:"btn-primary btn-small mt-16"},t("pauseReservationModalCancelButtonLabelText")))))};try{pausereservation.displayName="pausereservation",pausereservation.__docgenInfo={description:"",displayName:"pausereservation",props:{id:{defaultValue:null,description:"",name:"id",required:!0,type:{name:"string"}},user:{defaultValue:null,description:"",name:"user",required:!0,type:{name:"PatronV5"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/reservation-list/modal/pause-reservation/pause-reservation.tsx#pausereservation"]={docgenInfo:pausereservation.__docgenInfo,name:"pausereservation",path:"src/apps/reservation-list/modal/pause-reservation/pause-reservation.tsx#pausereservation"})}catch(__react_docgen_typescript_loader_error){}},"./src/apps/reservation-list/modal/reservation-details/reservation-details.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>reservation_details});var react=__webpack_require__("./node_modules/react/index.js"),reservation_type=__webpack_require__("./src/core/utils/types/reservation-type.ts"),material_fetch_hoc=__webpack_require__("./src/apps/loan-list/materials/utils/material-fetch-hoc.tsx"),modal_details_header=__webpack_require__("./src/components/modal-details-header/modal-details-header.tsx"),Reservations=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/Reservations.svg"),Reservations_default=__webpack_require__.n(Reservations),Loans=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/Loans.svg"),Loans_default=__webpack_require__.n(Loans),utils_text=__webpack_require__("./src/core/utils/text.tsx"),list_details=__webpack_require__("./src/components/list-details/list-details.tsx"),date=__webpack_require__("./src/core/utils/helpers/date.ts");const digital_list_details=({reservation})=>{const t=(0,utils_text.X)(),{expiryDate,dateOfReservation,pickupDeadline,state}=reservation;return react.createElement(react.Fragment,null,expiryDate&&"readyForPickup"===state&&react.createElement(list_details.Z,{icon:Reservations_default(),title:t("reservationDetailsStatusTitleText"),labels:t("reservationDetailsExpiresText",{placeholders:{"@date":(0,date.o0)(expiryDate)}})}),pickupDeadline&&"reserved"===state&&react.createElement(list_details.Z,{icon:Reservations_default(),title:t("reservationDetailsStatusTitleText"),labels:t("reservationDetailsBorrowBeforeText",{placeholders:{"@date":(0,date.o0)(pickupDeadline)}})}),dateOfReservation&&react.createElement(list_details.Z,{icon:Loans_default(),labels:(0,date.o0)(dateOfReservation),title:t("reservationDetailsDateOfReservationTitleText")}))};try{digitallistdetails.displayName="digitallistdetails",digitallistdetails.__docgenInfo={description:"",displayName:"digitallistdetails",props:{reservation:{defaultValue:null,description:"",name:"reservation",required:!0,type:{name:"Nullable>"}},material:{defaultValue:null,description:"",name:"material",required:!1,type:{name:"Nullable> | null | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/reservation-list/modal/reservation-details/digital-list-details.tsx#digitallistdetails"]={docgenInfo:digitallistdetails.__docgenInfo,name:"digitallistdetails",path:"src/apps/reservation-list/modal/reservation-details/digital-list-details.tsx#digitallistdetails"})}catch(__react_docgen_typescript_loader_error){}var Button=__webpack_require__("./src/components/Buttons/Button.tsx");const reservation_details_buttons=({numberInQueue,openReservationDeleteModal,classNames,buttonClassNames,reservation})=>{const t=(0,utils_text.X)();return react.createElement("div",{className:`modal-details__buttons ${classNames}`},numberInQueue&&numberInQueue>0&&react.createElement("div",{className:"my-8 mr-16 text-body-medium-regular"},t("reservationDetailsOthersInQueueText")),react.createElement(Button.z,{label:t("reservationDetailsButtonRemoveText"),onClick:()=>openReservationDeleteModal(reservation),classNames:buttonClassNames,buttonType:"none",disabled:!1,collapsible:!1,size:"small",variant:"filled"}))};try{reservationdetailsbuttons.displayName="reservationdetailsbuttons",reservationdetailsbuttons.__docgenInfo={description:"",displayName:"reservationdetailsbuttons",props:{reservation:{defaultValue:null,description:"",name:"reservation",required:!0,type:{name:"Nullable>"}},numberInQueue:{defaultValue:null,description:"",name:"numberInQueue",required:!1,type:{name:"number | null | undefined"}},classNames:{defaultValue:null,description:"",name:"classNames",required:!1,type:{name:"string | undefined"}},buttonClassNames:{defaultValue:null,description:"",name:"buttonClassNames",required:!1,type:{name:"string | undefined"}},openReservationDeleteModal:{defaultValue:null,description:"",name:"openReservationDeleteModal",required:!0,type:{name:"(deleteReservation: Nullable>) => void"}},material:{defaultValue:null,description:"",name:"material",required:!1,type:{name:"Nullable> | null | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/reservation-list/modal/reservation-details/reservation-details-buttons.tsx#reservationdetailsbuttons"]={docgenInfo:reservationdetailsbuttons.__docgenInfo,name:"reservationdetailsbuttons",path:"src/apps/reservation-list/modal/reservation-details/reservation-details-buttons.tsx#reservationdetailsbuttons"})}catch(__react_docgen_typescript_loader_error){}var icon_btn_external_link=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/buttons/icon-btn-external-link.svg"),icon_btn_external_link_default=__webpack_require__.n(icon_btn_external_link),LinkButton=__webpack_require__("./src/components/Buttons/LinkButton.tsx");const reservation_details_redirect=({reservation,openReservationDeleteModal,className,linkClassNames,externalLink})=>{const t=(0,utils_text.X)();return react.createElement("div",{className:`modal-details__buttons ${className}`},react.createElement("button",{type:"button",onClick:()=>openReservationDeleteModal(reservation),className:`link-tag cursor-pointer ${linkClassNames}`},t("reservationDetailsRemoveDigitalReservationText")),react.createElement(LinkButton.Z,{dataCy:"go-to-ereolen-button",size:"small",url:externalLink,variant:"filled",id:"go-to-ereolen-button"},t("reservationDetailsDigitalReservationGoToEreolenText"),react.createElement("img",{src:icon_btn_external_link_default(),className:"btn-icon invert",alt:""})))};try{reservationdetailsredirect.displayName="reservationdetailsredirect",reservationdetailsredirect.__docgenInfo={description:"",displayName:"reservationdetailsredirect",props:{reservation:{defaultValue:null,description:"",name:"reservation",required:!0,type:{name:"Nullable>"}},openReservationDeleteModal:{defaultValue:null,description:"",name:"openReservationDeleteModal",required:!0,type:{name:"(deleteReservation: Nullable>) => void"}},className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string | undefined"}},linkClassNames:{defaultValue:null,description:"",name:"linkClassNames",required:!1,type:{name:"string | undefined"}},externalLink:{defaultValue:null,description:"",name:"externalLink",required:!0,type:{name:"URL"}},material:{defaultValue:null,description:"",name:"material",required:!1,type:{name:"Nullable> | null | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/reservation-list/modal/reservation-details/reservation-details-redirect.tsx#reservationdetailsredirect"]={docgenInfo:reservationdetailsredirect.__docgenInfo,name:"reservationdetailsredirect",path:"src/apps/reservation-list/modal/reservation-details/reservation-details-redirect.tsx#reservationdetailsredirect"})}catch(__react_docgen_typescript_loader_error){}var digital_material_fetch_hoc=__webpack_require__("./src/apps/loan-list/materials/utils/digital-material-fetch-hoc.tsx"),Ebook=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/Ebook.svg"),Ebook_default=__webpack_require__.n(Ebook),Location=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/Location.svg"),Location_default=__webpack_require__.n(Location),LoanHistory=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/LoanHistory.svg"),LoanHistory_default=__webpack_require__.n(LoanHistory),es=__webpack_require__("./node_modules/react-query/es/index.js"),fbs=__webpack_require__("./src/core/fbs/fbs.ts"),helper=__webpack_require__("./src/components/reservation/helper.ts"),utils_config=__webpack_require__("./src/core/utils/config.tsx"),PickupModal=__webpack_require__("./src/components/reservation/forms/PickupModal.tsx"),modal=__webpack_require__("./src/core/utils/modal.tsx"),forms_helper=__webpack_require__("./src/components/reservation/forms/helper.ts"),utils_branches=__webpack_require__("./src/core/utils/branches.tsx"),ReservationFormListItem=__webpack_require__("./src/components/reservation/ReservationFormListItem.tsx"),NoInterestAfterModal=__webpack_require__("./src/components/reservation/forms/NoInterestAfterModal.tsx"),helpers=__webpack_require__("./src/apps/reservation-list/utils/helpers.ts");const physical_list_details=({reservation,reservation:{numberInQueue,pickupBranch,expiryDate,pickupDeadline,dateOfReservation,pickupNumber,reservationIds}})=>{const config=(0,utils_config.ZR)(),t=(0,utils_text.X)(),{open}=(0,modal.f)(),queryClient=(0,es.useQueryClient)(),{mutate}=(0,fbs.OE)(),[selectedInterest,setSelectedInterest]=(0,react.useState)(null),[selectedBranch,setSelectedBranch]=(0,react.useState)(pickupBranch),[reservationStatus,setReservationStatus]=(0,react.useState)("idle"),openModal=type=>()=>{open((0,forms_helper._3)(type))},branches=config("branchesConfig",{transformer:"jsonParse"}),blacklistBranches=config("blacklistedPickupBranchesConfig",{transformer:"stringToArray"}),whitelistBranches=(0,utils_branches.rM)(branches,blacklistBranches),isReadyForPickup=(0,helpers.S1)([reservation]).length>0,saveChanges=()=>{if(setReservationStatus("pending"),!reservationIds||0===reservationIds.length||!selectedBranch)return console.error("Missing reservationId or selectedBranch"),void setReservationStatus("error");let selectedExpiryDate=expiryDate||"";selectedInterest&&(selectedExpiryDate=(0,helper.M1)(selectedInterest));const reservationsChanges=reservationIds.map((reservationId=>({expiryDate:selectedExpiryDate,pickupBranch:selectedBranch,reservationId})));mutate({data:{reservations:reservationsChanges}},{onSuccess:()=>{setReservationStatus("success"),queryClient.invalidateQueries((0,fbs.Jp)())},onError:()=>{setReservationStatus("error")}})};return react.createElement(react.Fragment,null,numberInQueue&&react.createElement(list_details.Z,{icon:Ebook_default(),title:t("reservationDetailsStatusTitleText"),labels:[t("reservationDetailsNumberInQueueLabelText",{placeholders:{"@count":numberInQueue}})]}),pickupBranch&&react.createElement(react.Fragment,null,react.createElement(ReservationFormListItem.Z,{icon:Location_default(),title:t("reservationDetailsPickUpAtTitleText"),text:(0,helper.Sp)(selectedBranch??pickupBranch,whitelistBranches),changeHandler:openModal("pickup"),buttonAriaLabel:t("changePickupLocationText"),subText:pickupNumber??"",isPossibleToChangeReservationDetails:!isReadyForPickup}),!isReadyForPickup&&react.createElement(PickupModal.Z,{branches:whitelistBranches,defaultBranch:pickupBranch,selectBranchHandler:setSelectedBranch,saveCallback:saveChanges,reservationStatus,setReservationStatus})),expiryDate&&react.createElement(react.Fragment,null,react.createElement(ReservationFormListItem.Z,{icon:LoanHistory_default(),title:t("reservationDetailsNoInterestAfterTitleText"),text:selectedInterest?(0,date.p6)((0,helper.M1)(selectedInterest)):(0,date.p6)(expiryDate),changeHandler:openModal("interestPeriod"),buttonAriaLabel:t("changeInterestPeriodText"),isPossibleToChangeReservationDetails:!isReadyForPickup}),!isReadyForPickup&&react.createElement(NoInterestAfterModal.Z,{selectedInterest:selectedInterest??90,setSelectedInterest,saveCallback:saveChanges,reservationStatus,setReservationStatus})),pickupDeadline&&react.createElement(list_details.Z,{icon:Reservations_default(),title:t("reservationDetailsPickupDeadlineTitleText"),labels:[(0,date.p6)(pickupDeadline)]}),dateOfReservation&&react.createElement(list_details.Z,{icon:Loans_default(),title:t("reservationDetailsDateOfReservationTitleText"),labels:[(0,date.p6)(dateOfReservation)]}))};try{physicallistdetails.displayName="physicallistdetails",physicallistdetails.__docgenInfo={description:"",displayName:"physicallistdetails",props:{reservation:{defaultValue:null,description:"",name:"reservation",required:!0,type:{name:"Nullable>"}},material:{defaultValue:null,description:"",name:"material",required:!1,type:{name:"Nullable> | null | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/reservation-list/modal/reservation-details/physical-list-details.tsx#physicallistdetails"]={docgenInfo:physicallistdetails.__docgenInfo,name:"physicallistdetails",path:"src/apps/reservation-list/modal/reservation-details/physical-list-details.tsx#physicallistdetails"})}catch(__react_docgen_typescript_loader_error){}var MaterialButtonLoading=__webpack_require__("./src/components/material/material-buttons/generic/MaterialButtonLoading.tsx"),graphql=__webpack_require__("./src/core/dbc-gateway/generated/graphql.tsx");var url=__webpack_require__("./src/core/utils/url.tsx");const reservation_details=(0,digital_material_fetch_hoc.Z)((0,material_fetch_hoc.Z)((({reservation,material,openReservationDeleteModal})=>{const t=(0,utils_text.X)(),ereolenHomepageUrl=(0,url.J_)()("ereolenHomepageUrl"),config=(0,utils_config.ZR)(),[externalUrl,setExternalUrl]=(0,react.useState)(null),{state,identifier,numberInQueue}=reservation,{authors,pid,year,title,description,materialType}=material||{},{allowRemoveReadyReservations}=config("reservationDetailsConfig",{transformer:"jsonParse"}),allowUserRemoveReadyReservations="readyForPickup"===state&&allowRemoveReadyReservations||"readyForPickup"!==state,{data:complexSearchData,isLoading:isLoadingComplexSearch}=(0,graphql.af)({cql:`term.isbn=${identifier}`,offset:0,limit:1,filters:{}},{enabled:!!identifier});return(0,react.useEffect)((()=>{if(!complexSearchData||0===complexSearchData.complexSearch.hitcount)return;const matchingManifestations=((manifestations,identifier)=>manifestations.filter((manifestation=>manifestation.identifiers.find((id=>id.value.replace(/\D/g,"")===identifier.replace(/\D/g,""))))))(complexSearchData.complexSearch.works[0].manifestations.all,identifier||"");setExternalUrl(new URL((manifestations=>{const manifestationWithEreolAccess=manifestations.find((manifestation=>manifestation.access.find((access=>"Ereol"===access.__typename)))),ereolAccess=null==manifestationWithEreolAccess?void 0:manifestationWithEreolAccess.access.find((access=>"Ereol"===access.__typename));return null==ereolAccess?void 0:ereolAccess.url})(matchingManifestations)||ereolenHomepageUrl))}),[complexSearchData,identifier,ereolenHomepageUrl]),react.createElement("div",{className:"modal-details__container"},material&&react.createElement(react.Fragment,null,react.createElement(modal_details_header.Z,{isbnForCover:identifier||"",authors,year,title,pid,description,materialType,series:material.series},"readyForPickup"===state&&react.createElement("div",{className:"status-label status-label--info"},t("reservationDetailsReadyForLoanText"))),(0,reservation_type.xF)(reservation)&&allowUserRemoveReadyReservations&&react.createElement(reservation_details_buttons,{classNames:"modal-details__buttons--hide-on-mobile",openReservationDeleteModal,reservation,numberInQueue}),(0,reservation_type.Rq)(reservation)&&isLoadingComplexSearch&&react.createElement("div",{className:"modal-details__buttons modal-details__buttons--hide-on-mobile"},react.createElement(MaterialButtonLoading.Z,{classNames:"modal-details__buttons--hide-on-mobile"})),(0,reservation_type.Rq)(reservation)&&!isLoadingComplexSearch&&externalUrl&&react.createElement(reservation_details_redirect,{openReservationDeleteModal,reservation,className:"modal-details__buttons--hide-on-mobile",linkClassNames:"mx-16",externalLink:externalUrl}),react.createElement("div",{className:"modal-details__list"},(0,reservation_type.Rq)(reservation)&&react.createElement(digital_list_details,{reservation}),(0,reservation_type.xF)(reservation)&&react.createElement(physical_list_details,{reservation})),(0,reservation_type.xF)(reservation)&&allowUserRemoveReadyReservations&&react.createElement(reservation_details_buttons,{buttonClassNames:"modal-details__buttons__full-width",openReservationDeleteModal,numberInQueue,reservation}),(0,reservation_type.Rq)(reservation)&&!isLoadingComplexSearch&&externalUrl&&react.createElement(reservation_details_redirect,{openReservationDeleteModal,linkClassNames:"my-16",reservation,externalLink:externalUrl})))})));try{reservationdetails.displayName="reservationdetails",reservationdetails.__docgenInfo={description:"",displayName:"reservationdetails",props:{reservation:{defaultValue:null,description:"",name:"reservation",required:!0,type:{name:"Nullable>"}},openReservationDeleteModal:{defaultValue:null,description:"",name:"openReservationDeleteModal",required:!0,type:{name:"(deleteReservation: Nullable>) => void"}},digitalMaterial:{defaultValue:null,description:"",name:"digitalMaterial",required:!1,type:{name:"Product | null | undefined"}},item:{defaultValue:null,description:"",name:"item",required:!1,type:{name:"Nullable>"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/reservation-list/modal/reservation-details/reservation-details.tsx#reservationdetails"]={docgenInfo:reservationdetails.__docgenInfo,name:"reservationdetails",path:"src/apps/reservation-list/modal/reservation-details/reservation-details.tsx#reservationdetails"})}catch(__react_docgen_typescript_loader_error){}},"./src/apps/reservation-list/reservation-material/reservation-info.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>reservation_info});var react=__webpack_require__("./node_modules/react/index.js"),icon_check=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/basic/icon-check.svg"),icon_check_default=__webpack_require__.n(icon_check),useDeepCompareEffect=__webpack_require__("./node_modules/react-use/esm/useDeepCompareEffect.js"),utils_text=__webpack_require__("./src/core/utils/text.tsx"),general=__webpack_require__("./src/core/utils/helpers/general.ts"),helper=__webpack_require__("./src/components/reservation/helper.ts"),ArrowButton=__webpack_require__("./src/components/Buttons/ArrowButton.tsx"),status_circle_icon=__webpack_require__("./src/apps/loan-list/materials/utils/status-circle-icon.tsx");const InfoLabel=({dataCy="info-label",children})=>react.createElement("div",{"data-cy":dataCy,className:"status-label status-label--info"},children),labels_InfoLabel=InfoLabel;try{InfoLabel.displayName="InfoLabel",InfoLabel.__docgenInfo={description:"",displayName:"InfoLabel",props:{dataCy:{defaultValue:{value:"info-label"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/atoms/labels/InfoLabel.tsx#InfoLabel"]={docgenInfo:InfoLabel.__docgenInfo,name:"InfoLabel",path:"src/components/atoms/labels/InfoLabel.tsx#InfoLabel"})}catch(__react_docgen_typescript_loader_error){}const reservation_status=({reservationInfo,openReservationDetailsModal,color,percent,empty=!1,info,label,children,showArrow=!0,className})=>react.createElement("div",{className:className??"list-reservation__status"},react.createElement("div",{className:"list-reservation__counter color-secondary-gray"},!empty&&react.createElement(status_circle_icon.Z,{color,percent},children)),react.createElement("div",null,react.createElement("div",{className:"list-reservation__deadline"},info&&react.createElement(labels_InfoLabel,null,info),"string"==typeof label&&react.createElement("p",{className:"text-small-caption"},label),"string"!=typeof label&&label.map((localLabel=>react.createElement("p",{className:"text-small-caption"},localLabel))))),showArrow&&react.createElement(ArrowButton.Z,{arrowLabelledBy:`${(null==reservationInfo?void 0:reservationInfo.identifier)||(null==reservationInfo?void 0:reservationInfo.faust)}-title`,cursorPointer:!0,clickEventHandler:()=>{openReservationDetailsModal&&reservationInfo&&openReservationDetailsModal(reservationInfo)}}));try{reservationstatus.displayName="reservationstatus",reservationstatus.__docgenInfo={description:"",displayName:"reservationstatus",props:{reservationInfo:{defaultValue:null,description:"",name:"reservationInfo",required:!1,type:{name:"Nullable> | undefined"}},openReservationDetailsModal:{defaultValue:null,description:"",name:"openReservationDetailsModal",required:!1,type:{name:"((reservation: Nullable>) => void) | undefined"}},color:{defaultValue:null,description:"",name:"color",required:!1,type:{name:"string | undefined"}},empty:{defaultValue:{value:"false"},description:"",name:"empty",required:!1,type:{name:"boolean | undefined"}},percent:{defaultValue:null,description:"",name:"percent",required:!0,type:{name:"number"}},info:{defaultValue:null,description:"",name:"info",required:!1,type:{name:"string | undefined"}},label:{defaultValue:null,description:"",name:"label",required:!0,type:{name:"string | string[]"}},showArrow:{defaultValue:{value:"true"},description:"",name:"showArrow",required:!1,type:{name:"boolean | undefined"}},className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/reservation-list/reservation-material/reservation-status.tsx#reservationstatus"]={docgenInfo:reservationstatus.__docgenInfo,name:"reservationstatus",path:"src/apps/reservation-list/reservation-material/reservation-status.tsx#reservationstatus"})}catch(__react_docgen_typescript_loader_error){}var utils_branches=__webpack_require__("./src/core/utils/branches.tsx"),helpers=__webpack_require__("./src/apps/reservation-list/utils/helpers.ts");const reservation_info=({reservationInfo,openReservationDetailsModal,showStatusCircleIcon=!0,showArrow=!0,reservationStatusClassNameOverride,isDigital})=>{const t=(0,utils_text.X)(),{state,expiryDate,pickupBranch,numberInQueue,pickupDeadline,pickupNumber}=reservationInfo,[pickupLibrary,setPickupLibrary]=(0,react.useState)(""),{success}=(0,general.EC)(),branches=(0,utils_branches.mc)("blacklistedPickupBranchesConfig");(0,useDeepCompareEffect.Z)((()=>{branches&&pickupBranch&&setPickupLibrary((0,helper.Sp)(pickupBranch,branches))}),[branches,pickupBranch]);const getInfo=()=>{if(!(isDigital&&expiryDate||pickupDeadline))return"";const date=(isDigital?expiryDate:pickupDeadline)??null;return date?(0,helpers.lo)({pickupBranch,date,t,isDigital}):""};if("readyForPickup"===state)return react.createElement(reservation_status,{color:success,percent:100,info:getInfo(),label:isDigital?[t("reservationListDigitalPickupText")]:[pickupLibrary,pickupNumber||""],reservationInfo,openReservationDetailsModal,empty:!showStatusCircleIcon,showArrow,className:reservationStatusClassNameOverride},react.createElement("div",{className:"counter__value color-secondary-gray"},react.createElement("img",{src:icon_check_default(),alt:""}),react.createElement("span",{className:"counter__label color-secondary-gray"},t("reservationListReadyText"))));if("reserved"===state&&pickupBranch&&numberInQueue&&expiryDate){const numberInLineLabel=1===numberInQueue?t("reservationListFirstInQueueText"):t("reservationListNumberInQueueText",{placeholders:{"@count":numberInQueue-1}});return react.createElement(reservation_status,{percent:1/numberInQueue*100,label:numberInLineLabel,reservationInfo,openReservationDetailsModal,empty:!showStatusCircleIcon,showArrow,className:reservationStatusClassNameOverride},react.createElement("span",{className:"counter__value color-secondary-gray"},numberInQueue),react.createElement("span",{className:"counter__label color-secondary-gray"},t("reservationListInQueueText")))}if("reserved"===state&&!pickupBranch&&pickupDeadline){const daysBetweenTodayAndPickup=(0,general.q7)(pickupDeadline);return react.createElement(reservation_status,{percent:(0,general.q7)(pickupDeadline)/100,label:t("reservationListAvailableInText",{placeholders:{"@count":(0,general.q7)(pickupDeadline)}}),reservationInfo,openReservationDetailsModal,empty:!showStatusCircleIcon,showArrow,className:reservationStatusClassNameOverride},react.createElement("span",{className:"counter__value color-secondary-gray"},(0,general.q7)(pickupDeadline)>0?daysBetweenTodayAndPickup:0," "),react.createElement("span",{className:"counter__label color-secondary-gray"},t(1===daysBetweenTodayAndPickup?"reservationListDayText":"reservationListDaysText")))}return react.createElement(reservation_status,{reservationInfo,openReservationDetailsModal,percent:0,label:"",empty:!0,className:reservationStatusClassNameOverride})};try{reservationinfo.displayName="reservationinfo",reservationinfo.__docgenInfo={description:"",displayName:"reservationinfo",props:{reservationInfo:{defaultValue:null,description:"",name:"reservationInfo",required:!0,type:{name:"Nullable>"}},openReservationDetailsModal:{defaultValue:null,description:"",name:"openReservationDetailsModal",required:!1,type:{name:"((reservation: Nullable>) => void) | undefined"}},showStatusCircleIcon:{defaultValue:{value:"true"},description:"",name:"showStatusCircleIcon",required:!1,type:{name:"boolean | undefined"}},showArrow:{defaultValue:{value:"true"},description:"",name:"showArrow",required:!1,type:{name:"boolean | undefined"}},reservationStatusClassNameOverride:{defaultValue:null,description:"",name:"reservationStatusClassNameOverride",required:!1,type:{name:"string | undefined"}},isDigital:{defaultValue:null,description:"",name:"isDigital",required:!0,type:{name:"boolean"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/reservation-list/reservation-material/reservation-info.tsx#reservationinfo"]={docgenInfo:reservationinfo.__docgenInfo,name:"reservationinfo",path:"src/apps/reservation-list/reservation-material/reservation-info.tsx#reservationinfo"})}catch(__react_docgen_typescript_loader_error){}},"./src/apps/reservation-list/utils/helpers.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{S1:()=>getReadyForPickup,TM:()=>sortByOldestPickupDeadline,cf:()=>sortByNumberInQueue,lo:()=>getReservationStatusInfoLabel});var _core_utils_helpers_date__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/core/utils/helpers/date.ts");const sortByOldestPickupDeadline=list=>list.sort(((objA,objB)=>new Date(objA.pickupDeadline||new Date).getTime()-new Date(objB.pickupDeadline||new Date).getTime())),sortByNumberInQueue=reservations=>[...reservations].sort(((a,b)=>(a.numberInQueue||0)-(b.numberInQueue||0))),getReadyForPickup=list=>list.filter((({state})=>"readyForPickup"===state)),infoLabelTextType_pickUpLatest="reservationPickUpLatestText",infoLabelTextType_loanBefore="reservationListLoanBeforeText",getReservationStatusInfoLabel=({pickupBranch,date,isDigital,t})=>t(pickupBranch?infoLabelTextType_pickUpLatest:infoLabelTextType_loanBefore,{placeholders:{"@date":(0,_core_utils_helpers_date__WEBPACK_IMPORTED_MODULE_0__.Tj)({date,isDigital})}})},"./src/apps/search-header/search-header.dev.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Search:()=>Search,default:()=>search_header_dev});var react=__webpack_require__("./node_modules/react/index.js"),story_header_dev_inc=__webpack_require__("./src/components/search-bar/story-header.dev.inc.tsx"),serviceUrlArgs=__webpack_require__("./src/core/storybook/serviceUrlArgs.ts"),utils_text=__webpack_require__("./src/core/utils/text.tsx"),url=__webpack_require__("./src/core/utils/url.tsx"),downshift_esm=__webpack_require__("./node_modules/downshift/dist/downshift.esm.js"),useClickAway=__webpack_require__("./node_modules/react-use/esm/useClickAway.js"),graphql=__webpack_require__("./src/core/dbc-gateway/generated/graphql.tsx"),search_bar=__webpack_require__("./src/components/search-bar/search-bar.tsx"),clsx=__webpack_require__("./node_modules/clsx/dist/clsx.mjs");function _extends(){return _extends=Object.assign?Object.assign.bind():function(target){for(var i=1;i{const t=(0,utils_text.X)();return react.createElement(react.Fragment,null,categoryData.map(((item,incorrectIndex)=>{var _item$work;const index=incorrectIndex+textAndMaterialDataLength;return react.createElement("li",_extends({className:(0,clsx.Z)("autosuggest__text-item text-body-medium-regular px-24",{"autosuggest__text-item--highlight":highlightedIndex===index}),key:item.term+((null===(_item$work=item.work)||void 0===_item$work?void 0:_item$work.workId)||"")},getItemProps({item,index}),{"data-cy":dataCy}),react.createElement("p",{className:"autosuggest__text text-body-medium-regular"},`${item.term} ${t("inText")}`),react.createElement("div",{className:"boxed-text text-tags noselect ml-8"},autosuggestCategoryList[incorrectIndex].render))})))};try{autosuggestcategory.displayName="autosuggestcategory",autosuggestcategory.__docgenInfo={description:"",displayName:"autosuggestcategory",props:{categoryData:{defaultValue:null,description:"",name:"categoryData",required:!0,type:{name:'{ __typename?: "Suggestion" | undefined; type: SuggestionType; term: string; work?: { __typename?: "Work" | undefined; workId: string; titles: { __typename?: "WorkTitles" | undefined; main: string[]; }; creators: ({ ...; } | { ...; })[]; manifestations: { ...; }; } | null | undefined; }[]'}},getItemProps:{defaultValue:null,description:"",name:"getItemProps",required:!0,type:{name:'(options: UseComboboxGetItemPropsOptions<{ __typename?: "Suggestion" | undefined; type: SuggestionType; term: string; work?: { __typename?: "Work" | undefined; workId: string; titles: { __typename?: "WorkTitles" | undefined; main: string[]; }; creators: ({ ...; } | { ...; })[]; manifestations: { ...; }; } | null | u...'}},highlightedIndex:{defaultValue:null,description:"",name:"highlightedIndex",required:!0,type:{name:"number"}},textAndMaterialDataLength:{defaultValue:null,description:"",name:"textAndMaterialDataLength",required:!0,type:{name:"number"}},autosuggestCategoryList:{defaultValue:null,description:"",name:"autosuggestCategoryList",required:!0,type:{name:"AutosuggestCategoryList[]"}},dataCy:{defaultValue:{value:"autosuggest-category-item"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/autosuggest-category/autosuggest-category.tsx#autosuggestcategory"]={docgenInfo:autosuggestcategory.__docgenInfo,name:"autosuggestcategory",path:"src/components/autosuggest-category/autosuggest-category.tsx#autosuggestcategory"})}catch(__react_docgen_typescript_loader_error){}var cover=__webpack_require__("./src/components/cover/cover.tsx"),general=__webpack_require__("./src/core/utils/helpers/general.ts"),helper=__webpack_require__("./src/apps/material/helper.ts");function autosuggest_material_extends(){return autosuggest_material_extends=Object.assign?Object.assign.bind():function(target){for(var i=1;i{const t=(0,utils_text.X)();return react.createElement(react.Fragment,null,materialData.map(((item,incorrectIndex)=>{var _item$work,_item$work2,_item$work3;const index=incorrectIndex+textDataLength,{work}=item;if(!work)return null;const{creators}=work,authors=(0,general.TG)(creators),manifestationLanguageIsoCode=(null===(_item$work=item.work)||void 0===_item$work?void 0:_item$work.manifestations.bestRepresentation)&&(0,helper.hQ)([item.work.manifestations.bestRepresentation]);return react.createElement("li",autosuggest_material_extends({className:(0,clsx.Z)("autosuggest__material-item",{"autosuggest__material-item--two":2===materialData.length,"autosuggest__material-item--one":1===materialData.length,"autosuggest__material-item--highlight":highlightedIndex===index}),key:null===(_item$work2=item.work)||void 0===_item$work2?void 0:_item$work2.workId},getItemProps({item,index}),{"data-cy":dataCy}),react.createElement("div",{className:"autosuggest__material-card"},item.work&&react.createElement(cover.Y,{animate:!0,size:"xsmall",id:item.work.manifestations.bestRepresentation.pid,shadow:!0}),react.createElement("div",{className:"autosuggest__info"},react.createElement("div",{lang:manifestationLanguageIsoCode,className:"text-body-medium-medium autosuggest__title"},null===(_item$work3=item.work)||void 0===_item$work3?void 0:_item$work3.titles.main[0]),react.createElement("div",{className:"text-body-small-regular autosuggest__author"},(0,general.b7)(authors,t)))))})))};try{autosuggestmaterial.displayName="autosuggestmaterial",autosuggestmaterial.__docgenInfo={description:"",displayName:"autosuggestmaterial",props:{materialData:{defaultValue:null,description:"",name:"materialData",required:!0,type:{name:'[] | { __typename?: "Suggestion" | undefined; type: SuggestionType; term: string; work?: { __typename?: "Work" | undefined; workId: string; titles: { __typename?: "WorkTitles" | undefined; main: string[]; }; creators: ({ ...; } | { ...; })[]; manifestations: { ...; }; } | null | undefined; }[]'}},getItemProps:{defaultValue:null,description:"",name:"getItemProps",required:!0,type:{name:'(options: UseComboboxGetItemPropsOptions<{ __typename?: "Suggestion" | undefined; type: SuggestionType; term: string; work?: { __typename?: "Work" | undefined; workId: string; titles: { __typename?: "WorkTitles" | undefined; main: string[]; }; creators: ({ ...; } | { ...; })[]; manifestations: { ...; }; } | null | u...'}},highlightedIndex:{defaultValue:null,description:"",name:"highlightedIndex",required:!0,type:{name:"number"}},textDataLength:{defaultValue:null,description:"",name:"textDataLength",required:!0,type:{name:"number"}},dataCy:{defaultValue:{value:"autosuggest-material-item"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/autosuggest-material/autosuggest-material.tsx#autosuggestmaterial"]={docgenInfo:autosuggestmaterial.__docgenInfo,name:"autosuggestmaterial",path:"src/components/autosuggest-material/autosuggest-material.tsx#autosuggestmaterial"})}catch(__react_docgen_typescript_loader_error){}function autosuggest_text_item_extends(){return autosuggest_text_item_extends=Object.assign?Object.assign.bind():function(target){for(var i=1;i{var _item$work,_item$work2;const isoLang=(null===(_item$work=item.work)||void 0===_item$work?void 0:_item$work.manifestations.bestRepresentation)&&(0,helper.hQ)([item.work.manifestations.bestRepresentation]),t=(0,utils_text.X)();return react.createElement(react.Fragment,null,react.createElement("li",autosuggest_text_item_extends({className:classes.textSuggestion,key:generateItemId(item)},getItemProps({item,index}),{"data-cy":dataCy,lang:isoLang}),react.createElement("p",{className:"autosuggest__text text-body-medium-regular"},item.type===graphql.sW.Creator?`${item.term} (${t("stringSuggestionAuthorText")})`:null,item.type===graphql.sW.Subject?`${item.term} (${t("stringSuggestionTopicText")})`:null,item.type===graphql.sW.Composit?`${null===(_item$work2=item.work)||void 0===_item$work2?void 0:_item$work2.titles.main} (${t("stringSuggestionWorkText")})`:null,item.type===graphql.sW.Title?`${item.term} (${t("stringSuggestionWorkText")})`:null)))};try{autosuggesttextitem.displayName="autosuggesttextitem",autosuggesttextitem.__docgenInfo={description:"",displayName:"autosuggesttextitem",props:{classes:{defaultValue:null,description:"",name:"classes",required:!0,type:{name:"{ textSuggestion: string; }"}},item:{defaultValue:null,description:"",name:"item",required:!0,type:{name:'{ __typename?: "Suggestion" | undefined; type: SuggestionType; term: string; work?: { __typename?: "Work" | undefined; workId: string; titles: { __typename?: "WorkTitles" | undefined; main: string[]; }; creators: ({ ...; } | { ...; })[]; manifestations: { ...; }; } | null | undefined; }'}},index:{defaultValue:null,description:"",name:"index",required:!0,type:{name:"number"}},generateItemId:{defaultValue:null,description:"",name:"generateItemId",required:!0,type:{name:'(objectItem: { __typename?: "Suggestion" | undefined; type: SuggestionType; term: string; work?: { __typename?: "Work" | undefined; workId: string; titles: { __typename?: "WorkTitles" | undefined; main: string[]; }; creators: ({ ...; } | { ...; })[]; manifestations: { ...; }; } | null | undefined; }) => string'}},getItemProps:{defaultValue:null,description:"",name:"getItemProps",required:!0,type:{name:'(options: UseComboboxGetItemPropsOptions<{ __typename?: "Suggestion" | undefined; type: SuggestionType; term: string; work?: { __typename?: "Work" | undefined; workId: string; titles: { __typename?: "WorkTitles" | undefined; main: string[]; }; creators: ({ ...; } | { ...; })[]; manifestations: { ...; }; } | null | u...'}},dataCy:{defaultValue:{value:"autosuggest-text-item"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/autosuggest-text/autosuggest-text-item.tsx#autosuggesttextitem"]={docgenInfo:autosuggesttextitem.__docgenInfo,name:"autosuggesttextitem",path:"src/components/autosuggest-text/autosuggest-text-item.tsx#autosuggesttextitem"})}catch(__react_docgen_typescript_loader_error){}function itemToString(objectItem){var _objectItem$work;return objectItem.type===graphql.sW.Composit?(null===(_objectItem$work=objectItem.work)||void 0===_objectItem$work?void 0:_objectItem$work.titles.main[0])||"incomplete data":objectItem.term}function generateItemId(objectItem){return`${objectItem.__typename}-${itemToString(objectItem)}-${Math.random().toString(36)}`.replace(/\s+/g,"-")}const AutosuggestText=({textData,highlightedIndex,getItemProps})=>react.createElement(react.Fragment,null,textData.map(((item,index)=>{const classes={textSuggestion:(0,clsx.Z)("autosuggest__text-item text-body-medium-regular px-24",{"autosuggest__text-item--highlight":highlightedIndex===index})};return react.createElement(autosuggest_text_item,{classes,item,index,generateItemId,getItemProps})})));try{itemToString.displayName="itemToString",itemToString.__docgenInfo={description:"",displayName:"itemToString",props:{__typename:{defaultValue:null,description:"",name:"__typename",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"Suggestion"'}]}},type:{defaultValue:null,description:"",name:"type",required:!0,type:{name:"enum",value:[{value:'"COMPOSIT"'},{value:'"CREATOR"'},{value:'"SUBJECT"'},{value:'"TITLE"'}]}},term:{defaultValue:null,description:"",name:"term",required:!0,type:{name:"string"}},work:{defaultValue:null,description:"",name:"work",required:!1,type:{name:'{ __typename?: "Work" | undefined; workId: string; titles: { __typename?: "WorkTitles" | undefined; main: string[]; }; creators: ({ __typename?: "Corporation" | undefined; display: string; } | { ...; })[]; manifestations: { ...; }; } | null | undefined'}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/autosuggest-text/autosuggest-text.tsx#itemToString"]={docgenInfo:itemToString.__docgenInfo,name:"itemToString",path:"src/components/autosuggest-text/autosuggest-text.tsx#itemToString"})}catch(__react_docgen_typescript_loader_error){}try{generateItemId.displayName="generateItemId",generateItemId.__docgenInfo={description:"",displayName:"generateItemId",props:{__typename:{defaultValue:null,description:"",name:"__typename",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"Suggestion"'}]}},type:{defaultValue:null,description:"",name:"type",required:!0,type:{name:"enum",value:[{value:'"COMPOSIT"'},{value:'"CREATOR"'},{value:'"SUBJECT"'},{value:'"TITLE"'}]}},term:{defaultValue:null,description:"",name:"term",required:!0,type:{name:"string"}},work:{defaultValue:null,description:"",name:"work",required:!1,type:{name:'{ __typename?: "Work" | undefined; workId: string; titles: { __typename?: "WorkTitles" | undefined; main: string[]; }; creators: ({ __typename?: "Corporation" | undefined; display: string; } | { ...; })[]; manifestations: { ...; }; } | null | undefined'}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/autosuggest-text/autosuggest-text.tsx#generateItemId"]={docgenInfo:generateItemId.__docgenInfo,name:"generateItemId",path:"src/components/autosuggest-text/autosuggest-text.tsx#generateItemId"})}catch(__react_docgen_typescript_loader_error){}try{AutosuggestText.displayName="AutosuggestText",AutosuggestText.__docgenInfo={description:"",displayName:"AutosuggestText",props:{textData:{defaultValue:null,description:"",name:"textData",required:!0,type:{name:'{ __typename?: "Suggestion" | undefined; type: SuggestionType; term: string; work?: { __typename?: "Work" | undefined; workId: string; titles: { __typename?: "WorkTitles" | undefined; main: string[]; }; creators: ({ ...; } | { ...; })[]; manifestations: { ...; }; } | null | undefined; }[]'}},highlightedIndex:{defaultValue:null,description:"",name:"highlightedIndex",required:!0,type:{name:"number"}},getItemProps:{defaultValue:null,description:"",name:"getItemProps",required:!0,type:{name:'(options: UseComboboxGetItemPropsOptions<{ __typename?: "Suggestion" | undefined; type: SuggestionType; term: string; work?: { __typename?: "Work" | undefined; workId: string; titles: { __typename?: "WorkTitles" | undefined; main: string[]; }; creators: ({ ...; } | { ...; })[]; manifestations: { ...; }; } | null | u...'}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/autosuggest-text/autosuggest-text.tsx#AutosuggestText"]={docgenInfo:AutosuggestText.__docgenInfo,name:"AutosuggestText",path:"src/components/autosuggest-text/autosuggest-text.tsx#AutosuggestText"})}catch(__react_docgen_typescript_loader_error){}try{autosuggesttext.displayName="autosuggesttext",autosuggesttext.__docgenInfo={description:"",displayName:"autosuggesttext",props:{textData:{defaultValue:null,description:"",name:"textData",required:!0,type:{name:'{ __typename?: "Suggestion" | undefined; type: SuggestionType; term: string; work?: { __typename?: "Work" | undefined; workId: string; titles: { __typename?: "WorkTitles" | undefined; main: string[]; }; creators: ({ ...; } | { ...; })[]; manifestations: { ...; }; } | null | undefined; }[]'}},highlightedIndex:{defaultValue:null,description:"",name:"highlightedIndex",required:!0,type:{name:"number"}},getItemProps:{defaultValue:null,description:"",name:"getItemProps",required:!0,type:{name:'(options: UseComboboxGetItemPropsOptions<{ __typename?: "Suggestion" | undefined; type: SuggestionType; term: string; work?: { __typename?: "Work" | undefined; workId: string; titles: { __typename?: "WorkTitles" | undefined; main: string[]; }; creators: ({ ...; } | { ...; })[]; manifestations: { ...; }; } | null | u...'}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/autosuggest-text/autosuggest-text.tsx#autosuggesttext"]={docgenInfo:autosuggesttext.__docgenInfo,name:"autosuggesttext",path:"src/components/autosuggest-text/autosuggest-text.tsx#autosuggesttext"})}catch(__react_docgen_typescript_loader_error){}function autosuggest_extends(){return autosuggest_extends=Object.assign?Object.assign.bind():function(target){for(var i=1;i{const t=(0,utils_text.X)();return isLoading&&!textData?react.createElement("ul",{className:"autosuggest pb-16","data-cy":dataCy},react.createElement("li",{className:"ml-24"},t("loadingText"))):react.createElement(react.Fragment,null,react.createElement("ul",autosuggest_extends({className:"autosuggest pb-16"},getMenuProps(),{style:isOpen?{}:{display:"none"},"data-cy":dataCy}),react.createElement(AutosuggestText,{textData,highlightedIndex,getItemProps}),materialData.length>0&&react.createElement(autosuggest_material,{materialData,getItemProps,highlightedIndex,textDataLength:textData.length}),categoryData&&categoryData.length>0&&react.createElement(autosuggest_category,{categoryData,getItemProps,highlightedIndex,textAndMaterialDataLength:textData.length+materialData.length,autosuggestCategoryList})))};try{Autosuggest.displayName="Autosuggest",Autosuggest.__docgenInfo={description:"",displayName:"Autosuggest",props:{textData:{defaultValue:null,description:"",name:"textData",required:!0,type:{name:'{ __typename?: "Suggestion" | undefined; type: SuggestionType; term: string; work?: { __typename?: "Work" | undefined; workId: string; titles: { __typename?: "WorkTitles" | undefined; main: string[]; }; creators: ({ ...; } | { ...; })[]; manifestations: { ...; }; } | null | undefined; }[]'}},materialData:{defaultValue:null,description:"",name:"materialData",required:!0,type:{name:'{ __typename?: "Suggestion" | undefined; type: SuggestionType; term: string; work?: { __typename?: "Work" | undefined; workId: string; titles: { __typename?: "WorkTitles" | undefined; main: string[]; }; creators: ({ ...; } | { ...; })[]; manifestations: { ...; }; } | null | undefined; }[]'}},status:{defaultValue:null,description:"",name:"status",required:!0,type:{name:"string"}},getMenuProps:{defaultValue:null,description:"",name:"getMenuProps",required:!0,type:{name:"(options?: UseComboboxGetMenuPropsOptions | undefined, otherOptions?: GetPropsCommonOptions | undefined) => any"}},highlightedIndex:{defaultValue:null,description:"",name:"highlightedIndex",required:!0,type:{name:"number"}},getItemProps:{defaultValue:null,description:"",name:"getItemProps",required:!0,type:{name:'(options: UseComboboxGetItemPropsOptions<{ __typename?: "Suggestion" | undefined; type: SuggestionType; term: string; work?: { __typename?: "Work" | undefined; workId: string; titles: { __typename?: "WorkTitles" | undefined; main: string[]; }; creators: ({ ...; } | { ...; })[]; manifestations: { ...; }; } | null | u...'}},isOpen:{defaultValue:null,description:"",name:"isOpen",required:!0,type:{name:"boolean"}},categoryData:{defaultValue:null,description:"",name:"categoryData",required:!1,type:{name:'{ __typename?: "Suggestion" | undefined; type: SuggestionType; term: string; work?: { __typename?: "Work" | undefined; workId: string; titles: { __typename?: "WorkTitles" | undefined; main: string[]; }; creators: ({ ...; } | { ...; })[]; manifestations: { ...; }; } | null | undefined; }[] | undefined'}},autosuggestCategoryList:{defaultValue:null,description:"",name:"autosuggestCategoryList",required:!0,type:{name:"AutosuggestCategoryList[]"}},isLoading:{defaultValue:null,description:"",name:"isLoading",required:!0,type:{name:"boolean"}},dataCy:{defaultValue:{value:"autosuggest"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/autosuggest/autosuggest.tsx#Autosuggest"]={docgenInfo:Autosuggest.__docgenInfo,name:"Autosuggest",path:"src/components/autosuggest/autosuggest.tsx#Autosuggest"})}catch(__react_docgen_typescript_loader_error){}var helpers_url=__webpack_require__("./src/core/utils/helpers/url.ts"),material_type=__webpack_require__("./src/core/utils/types/material-type.ts");function findNonWorkSuggestion(originalData){return originalData.find((item=>item.type!==graphql.sW.Title&&item.type!==graphql.sW.Composit))}var useStatistics=__webpack_require__("./src/core/statistics/useStatistics.ts"),statistics=__webpack_require__("./src/core/statistics/statistics.ts");const HeaderDropdown=({redirectTo,setIsHeaderDropdownOpen,headerDropdownRef,advancedSearchUrl})=>{const t=(0,utils_text.X)();return react.createElement("div",{className:"header__menu-dropdown","data-cy":"search-header-dropdown"},react.createElement("ul",null,react.createElement("li",null,react.createElement("button",{ref:headerDropdownRef,type:"button",role:"menuitem",className:"header__menu-dropdown-item cursor-pointer",onClick:()=>redirectTo(advancedSearchUrl),onKeyUp:e=>"Enter"===e.key?redirectTo(advancedSearchUrl):"ArrowDown"===e.key||"ArrowUp"===e.key||"Escape"===e.key?setIsHeaderDropdownOpen(!1):null,onBlur:()=>setIsHeaderDropdownOpen(!1)},t("headerDropdownItemAdvancedSearchText")))))},header_dropdown_HeaderDropdown=HeaderDropdown;try{HeaderDropdown.displayName="HeaderDropdown",HeaderDropdown.__docgenInfo={description:"",displayName:"HeaderDropdown",props:{redirectTo:{defaultValue:null,description:"",name:"redirectTo",required:!0,type:{name:"(url: URL) => void"}},setIsHeaderDropdownOpen:{defaultValue:null,description:"",name:"setIsHeaderDropdownOpen",required:!0,type:{name:"Dispatch>"}},headerDropdownRef:{defaultValue:null,description:"",name:"headerDropdownRef",required:!0,type:{name:"RefObject"}},advancedSearchUrl:{defaultValue:null,description:"",name:"advancedSearchUrl",required:!0,type:{name:"URL"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/header-dropdown/HeaderDropdown.tsx#HeaderDropdown"]={docgenInfo:HeaderDropdown.__docgenInfo,name:"HeaderDropdown",path:"src/components/header-dropdown/HeaderDropdown.tsx#HeaderDropdown"})}catch(__react_docgen_typescript_loader_error){}const search_header=()=>{const t=(0,utils_text.X)(),u=(0,url.J_)(),searchUrl=u("searchUrl"),materialUrl=u("materialUrl"),advancedSearchUrl=u("advancedSearchUrl"),[q,setQ]=(0,react.useState)(""),[qWithoutQuery,setQWithoutQuery]=(0,react.useState)(q),[suggestItems,setSuggestItems]=(0,react.useState)([]),[currentlySelectedItem,setCurrentlySelectedItem]=(0,react.useState)(""),[isAutosuggestOpen,setIsAutosuggestOpen]=(0,react.useState)(!1),{data,isLoading,status}=(0,graphql.UC)({q},{enabled:q.length>=3}),[isHeaderDropdownOpen,setIsHeaderDropdownOpen]=(0,react.useState)(!1),autosuggestCategoryList=[{render:t("autosuggestBookCategoryText"),term:material_type.eS.book,facet:"materialTypes"},{render:t("autosuggestEbookCategoryText"),term:material_type.eS.ebook,facet:"materialTypes"},{render:t("autosuggestFilmCategoryText"),term:material_type.eS.movie,facet:"workTypes"},{render:t("autosuggestAudioBookCategoryText"),term:material_type.eS.audioBook,facet:"materialTypes"},{render:t("autosuggestMusicCategoryText"),term:material_type.eS.music,facet:"workTypes"},{render:t("autosuggestGameCategoryText"),term:material_type.eS.game,facet:"workTypes"},{render:t("autosuggestAnimatedSeriesCategoryText"),term:material_type.eS.animatedSeries,facet:"materialTypes"}],[highlightedIndexAfterClick,setHighlightedIndexAfterClick]=(0,react.useState)(null),{track}=(0,useStatistics.T)();(0,react.useEffect)((()=>{if(data){const arrayOfResults=data.suggest.result;setSuggestItems(arrayOfResults)}}),[data]);const originalData=suggestItems,textData=[],materialData=[],categoryData=[];let nonWorkSuggestion,orderedData=[];function determineSuggestionTerm(suggestion){var _suggestion$work;return suggestion.type===graphql.sW.Composit?(null===(_suggestion$work=suggestion.work)||void 0===_suggestion$work?void 0:_suggestion$work.titles.main[0])||"incomplete data":suggestion.term}originalData&&(nonWorkSuggestion=findNonWorkSuggestion(originalData),originalData.forEach((item=>{(item.type===graphql.sW.Composit||item.type===graphql.sW.Title)&&item.work&&materialData.length<3?materialData.push(item):textData.push(item)})),orderedData=textData.concat(materialData),nonWorkSuggestion&&(autosuggestCategoryList.forEach((()=>{categoryData.push(nonWorkSuggestion)})),orderedData=orderedData.concat(categoryData))),(0,react.useEffect)((()=>{setIsAutosuggestOpen(!!data)}),[data]);const{getMenuProps,highlightedIndex,getItemProps,getInputProps,getLabelProps}=(0,downshift_esm.Kb)({isOpen:isAutosuggestOpen,items:orderedData,inputValue:qWithoutQuery,defaultIsOpen:!1,onInputValueChange:function handleInputValueChange(changes){var _selectedItem$work;const{inputValue,selectedItem,type}=changes;if(void 0!==inputValue){if(type===downshift_esm.Kb.stateChangeTypes.InputChange)return setQ(inputValue),void setQWithoutQuery(inputValue);if(setQWithoutQuery(inputValue),selectedItem&&(type===downshift_esm.Kb.stateChangeTypes.ItemClick||type===downshift_esm.Kb.stateChangeTypes.InputKeyDownEnter))if(null!==(_selectedItem$work=selectedItem.work)&&void 0!==_selectedItem$work&&_selectedItem$work.workId&&function isDisplayedAsWorkSuggestion(selectedItem,currentMaterialData){const dataWithWorkId=currentMaterialData.filter((item=>{var _item$work;return(null===(_item$work=item.work)||void 0===_item$work?void 0:_item$work.workId)===(null==selectedItem?void 0:selectedItem.workId)}));return Boolean(dataWithWorkId.length)}(selectedItem.work,materialData))track("click",{id:statistics.h.autosuggestClick.id,name:statistics.h.autosuggestClick.name,trackedData:selectedItem.work.titles.main.join(", ")}).then((()=>{var _selectedItem$work2;(0,helpers_url.gB)((0,helpers_url.WO)(materialUrl,null===(_selectedItem$work2=selectedItem.work)||void 0===_selectedItem$work2?void 0:_selectedItem$work2.workId))}));else if(nonWorkSuggestion&&changes.selectedItem&&nonWorkSuggestion.term===changes.selectedItem.term&&highlightedIndexAfterClick&&highlightedIndexAfterClick>=textData.concat(materialData).length){const highlightedCategoryIndex=highlightedIndexAfterClick-(textData.length+materialData.length),selectedItemString=determineSuggestionTerm(changes.selectedItem);track("click",{id:statistics.h.autosuggestClick.id,name:statistics.h.autosuggestClick.name,trackedData:selectedItemString}).then((()=>{const{term,facet}=autosuggestCategoryList[highlightedCategoryIndex];(0,helpers_url.gB)((0,helpers_url.U2)({searchUrl,selectedItemString,filter:{[facet]:term}}))}))}else track("click",{id:statistics.h.autosuggestClick.id,name:statistics.h.autosuggestClick.name,trackedData:determineSuggestionTerm(selectedItem)}).then((()=>{(0,helpers_url.gB)((0,helpers_url.Nt)(searchUrl,determineSuggestionTerm(selectedItem)))}))}},onSelectedItemChange:function handleSelectedItemChange(changes){const{selectedItem}=changes;selectedItem&&setCurrentlySelectedItem(determineSuggestionTerm(selectedItem))},selectedItem:currentlySelectedItem,onHighlightedIndexChange:function handleHighlightedIndexChange(changes){const{type}=changes;let{highlightedIndex}=changes;if(type===downshift_esm.Kb.stateChangeTypes.MenuMouseLeave)return;if(type===downshift_esm.Kb.stateChangeTypes.ItemMouseMove)return void(void 0!==highlightedIndex&&highlightedIndex>-1&&setHighlightedIndexAfterClick(highlightedIndex));if(type!==downshift_esm.Kb.stateChangeTypes.InputKeyDownArrowDown&&type!==downshift_esm.Kb.stateChangeTypes.InputKeyDownArrowUp&&type!==downshift_esm.Kb.stateChangeTypes.InputKeyDownEnter||void 0!==highlightedIndex&&highlightedIndex>-1&&setHighlightedIndexAfterClick(highlightedIndex),highlightedIndex&&highlightedIndex<0)return void setIsAutosuggestOpen(!1);highlightedIndex||(highlightedIndex=0);const currentItemValue=determineSuggestionTerm(orderedData[highlightedIndex]);type!==downshift_esm.Kb.stateChangeTypes.InputKeyDownArrowDown&&type!==downshift_esm.Kb.stateChangeTypes.InputKeyDownArrowUp?setQ(currentItemValue):setQWithoutQuery(currentItemValue)}}),headerDropdownRef=react.useRef(null);(0,useClickAway.Z)(headerDropdownRef,(()=>{setTimeout((()=>{setIsHeaderDropdownOpen(!1)}),100)}));const[redirectUrl,setRedirectUrl]=(0,react.useState)((0,helpers_url.Nt)(searchUrl,q));return(0,react.useEffect)((()=>{'"'===q.trim().charAt(0)&&'"'===q.trim().charAt(q.length-1)&&'""'!==q.trim()&&'"'!==q.trim()?setRedirectUrl((0,helpers_url.Hg)(advancedSearchUrl,q)):setRedirectUrl((0,helpers_url.Nt)(searchUrl,q))}),[q,advancedSearchUrl,searchUrl]),react.createElement("div",{className:"header__menu-second"},react.createElement("div",{className:"header__menu-search"},react.createElement(search_bar.Z,{q,getInputProps,getLabelProps,qWithoutQuery,setQWithoutQuery,isHeaderDropdownOpen,setIsHeaderDropdownOpen,redirectUrl}),react.createElement(Autosuggest,{textData,materialData,categoryData,status,getMenuProps,highlightedIndex,getItemProps,isOpen:isAutosuggestOpen,autosuggestCategoryList,isLoading}),isHeaderDropdownOpen&&react.createElement(header_dropdown_HeaderDropdown,{redirectTo:helpers_url.gB,setIsHeaderDropdownOpen,headerDropdownRef,advancedSearchUrl})))};try{searchheader.displayName="searchheader",searchheader.__docgenInfo={description:"",displayName:"searchheader",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/search-header/search-header.tsx#searchheader"]={docgenInfo:searchheader.__docgenInfo,name:"searchheader",path:"src/apps/search-header/search-header.tsx#searchheader"})}catch(__react_docgen_typescript_loader_error){}const search_header_entry=(0,url.XL)((0,utils_text.z)((()=>react.createElement(search_header,null))));try{searchheaderentry.displayName="searchheaderentry",searchheaderentry.__docgenInfo={description:"",displayName:"searchheaderentry",props:{alertErrorCloseText:{defaultValue:null,description:"",name:"alertErrorCloseText",required:!0,type:{name:"string"}},alertErrorMessageText:{defaultValue:null,description:"",name:"alertErrorMessageText",required:!0,type:{name:"string"}},searchHeaderIconAltText:{defaultValue:null,description:"",name:"searchHeaderIconAltText",required:!1,type:{name:"string | undefined"}},searchHeaderInputLabelText:{defaultValue:null,description:"",name:"searchHeaderInputLabelText",required:!1,type:{name:"string | undefined"}},inputPlaceholderText:{defaultValue:null,description:"",name:"inputPlaceholderText",required:!1,type:{name:"string | undefined"}},stringSuggestionAuthorText:{defaultValue:null,description:"",name:"stringSuggestionAuthorText",required:!1,type:{name:"string | undefined"}},stringSuggestionWorkText:{defaultValue:null,description:"",name:"stringSuggestionWorkText",required:!1,type:{name:"string | undefined"}},stringSuggestionTopicText:{defaultValue:null,description:"",name:"stringSuggestionTopicText",required:!1,type:{name:"string | undefined"}},searchHeaderDropdownText:{defaultValue:null,description:"",name:"searchHeaderDropdownText",required:!0,type:{name:"string"}},etAlText:{defaultValue:null,description:"",name:"etAlText",required:!1,type:{name:"string | undefined"}},autosuggestBookCategoryText:{defaultValue:null,description:"",name:"autosuggestBookCategoryText",required:!0,type:{name:"string"}},autosuggestEbookCategoryText:{defaultValue:null,description:"",name:"autosuggestEbookCategoryText",required:!0,type:{name:"string"}},autosuggestFilmCategoryText:{defaultValue:null,description:"",name:"autosuggestFilmCategoryText",required:!0,type:{name:"string"}},autosuggestAudioBookCategoryText:{defaultValue:null,description:"",name:"autosuggestAudioBookCategoryText",required:!0,type:{name:"string"}},autosuggestMusicCategoryText:{defaultValue:null,description:"",name:"autosuggestMusicCategoryText",required:!0,type:{name:"string"}},autosuggestGameCategoryText:{defaultValue:null,description:"",name:"autosuggestGameCategoryText",required:!0,type:{name:"string"}},autosuggestAnimatedSeriesCategoryText:{defaultValue:null,description:"",name:"autosuggestAnimatedSeriesCategoryText",required:!0,type:{name:"string"}},inText:{defaultValue:null,description:"",name:"inText",required:!0,type:{name:"string"}},loadingText:{defaultValue:null,description:"",name:"loadingText",required:!0,type:{name:"string"}},searchNoValidCharactersErrorText:{defaultValue:null,description:"",name:"searchNoValidCharactersErrorText",required:!0,type:{name:"string"}},headerDropdownItemAdvancedSearchText:{defaultValue:null,description:"",name:"headerDropdownItemAdvancedSearchText",required:!0,type:{name:"string"}},materialUrl:{defaultValue:null,description:"",name:"materialUrl",required:!0,type:{name:"string"}},searchUrl:{defaultValue:null,description:"",name:"searchUrl",required:!0,type:{name:"string"}},advancedSearchUrl:{defaultValue:null,description:"",name:"advancedSearchUrl",required:!0,type:{name:"string"}},fbsBaseUrl:{defaultValue:null,description:"",name:"fbsBaseUrl",required:!0,type:{name:"string"}},loanListEreolenUrl:{defaultValue:null,description:"",name:"loanListEreolenUrl",required:!0,type:{name:"string"}},feesPageUrl:{defaultValue:null,description:"",name:"feesPageUrl",required:!0,type:{name:"string"}},publizonBaseUrl:{defaultValue:null,description:"",name:"publizonBaseUrl",required:!0,type:{name:"string"}},dplCmsBaseUrl:{defaultValue:null,description:"",name:"dplCmsBaseUrl",required:!0,type:{name:"string"}},coverBaseUrl:{defaultValue:null,description:"",name:"coverBaseUrl",required:!0,type:{name:"string"}},materialBaseUrl:{defaultValue:null,description:"",name:"materialBaseUrl",required:!0,type:{name:"string"}},fbiBaseUrl:{defaultValue:null,description:"",name:"fbiBaseUrl",required:!0,type:{name:"string"}},authUrl:{defaultValue:null,description:"",name:"authUrl",required:!0,type:{name:"string"}},ereolenHomepageUrl:{defaultValue:null,description:"",name:"ereolenHomepageUrl",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/search-header/search-header.entry.tsx#searchheaderentry"]={docgenInfo:searchheaderentry.__docgenInfo,name:"searchheaderentry",path:"src/apps/search-header/search-header.entry.tsx#searchheaderentry"})}catch(__react_docgen_typescript_loader_error){}const search_header_dev={title:"Apps / Header",component:search_header_entry,argTypes:{...serviceUrlArgs.Z,alertErrorCloseText:{name:"Alert error close text",defaultValue:"close",control:{type:"text"}},alertErrorMessageText:{name:"Alert error message text",defaultValue:"An error occurred",control:{type:"text"}},searchHeaderIconAltText:{name:"Alt text for search button image",defaultValue:"search icon",control:{type:"text"}},searchHeaderInputLabelText:{name:"Search header input label",defaultValue:"The main search field.",control:{type:"text"}},inputPlaceholderText:{name:"Input field placeholder",defaultValue:"Search among the library's materials",control:{type:"text"}},stringSuggestionAuthorText:{name:"String suggestion spec - author",defaultValue:"author",control:{type:"text"}},stringSuggestionWorkText:{name:"String suggestion spec - work",defaultValue:"material",control:{type:"text"}},stringSuggestionTopicText:{name:"String suggestion spec - topic",defaultValue:"topic",control:{type:"text"}},searchUrl:{name:"Base search url",defaultValue:"/search",control:{type:"text"}},advancedSearchUrl:{name:"Advanced search url",defaultValue:"/advanced-search",control:{type:"text"}},searchHeaderDropdownText:{name:"Search header advanced search icon label",defaultValue:"Dropdown with additional search functions",control:{type:"text"}},materialUrl:{name:"Base material page url",defaultValue:"/work/:workid",control:{type:"text"}},autosuggestBookCategoryText:{name:"Book category",defaultValue:"Books",control:{type:"text"}},autosuggestEbookCategoryText:{name:"Ebook category",defaultValue:"E-books",control:{type:"text"}},autosuggestFilmCategoryText:{name:"Movie category",defaultValue:"Movies",control:{type:"text"}},autosuggestAudioBookCategoryText:{name:"Audio book category",defaultValue:"Audio books",control:{type:"text"}},autosuggestMusicCategoryText:{name:"Music category",defaultValue:"Music",control:{type:"text"}},autosuggestGameCategoryText:{name:"Game category",defaultValue:"Games",control:{type:"text"}},autosuggestAnimatedSeriesCategoryText:{name:"Animated series category",defaultValue:"Animated series",control:{type:"text"}},inText:{name:"x 'in' y",defaultValue:"in",control:{type:"text"}},loadingText:{name:"Loading",defaultValue:"Loading",control:{type:"text"}},searchNoValidCharactersErrorText:{name:"Search non-whitespace character error",defaultValue:"Input must contain at least one non-whitespace character.",control:{type:"text"}},headerDropdownItemAdvancedSearchText:{name:"Advanced search menu text",defaultValue:"Advanced search",control:{type:"text"}}}},Search=args=>react.createElement(story_header_dev_inc.Z,{search:react.createElement(search_header_entry,args)})},"./src/apps/search-result/search-result-zero-hits.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_core_utils_text__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/core/utils/text.tsx");const __WEBPACK_DEFAULT_EXPORT__=({dataCy="search-result-zero-hits"})=>{const t=(0,_core_utils_text__WEBPACK_IMPORTED_MODULE_1__.X)();return react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"card-list-page","data-cy":dataCy},react__WEBPACK_IMPORTED_MODULE_0__.createElement("h1",{className:"text-header-h2 search-result-title my-112","data-cy":"search-result-zero-hits"},t("noSearchResultText")))};try{searchresultzerohits.displayName="searchresultzerohits",searchresultzerohits.__docgenInfo={description:"",displayName:"searchresultzerohits",props:{dataCy:{defaultValue:{value:"search-result-zero-hits"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/search-result/search-result-zero-hits.tsx#searchresultzerohits"]={docgenInfo:searchresultzerohits.__docgenInfo,name:"searchresultzerohits",path:"src/apps/search-result/search-result-zero-hits.tsx#searchresultzerohits"})}catch(__react_docgen_typescript_loader_error){}},"./src/apps/search-result/search-result.dev.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{SearchResult:()=>search_result_dev_SearchResult,default:()=>search_result_dev});var react=__webpack_require__("./node_modules/react/index.js"),serviceUrlArgs=__webpack_require__("./src/core/storybook/serviceUrlArgs.ts"),guarded_app=__webpack_require__("./src/components/guarded-app.tsx"),config=__webpack_require__("./src/core/utils/config.tsx"),general=__webpack_require__("./src/core/utils/helpers/general.ts"),utils_text=__webpack_require__("./src/core/utils/text.tsx"),url=__webpack_require__("./src/core/utils/url.tsx"),isEmpty=__webpack_require__("./node_modules/lodash/isEmpty.js"),isEmpty_default=__webpack_require__.n(isEmpty),useDeepCompareEffect=__webpack_require__("./node_modules/react-use/esm/useDeepCompareEffect.js"),clsx=__webpack_require__("./node_modules/clsx/dist/clsx.mjs");const SearchResultHeader=({hitcount,q})=>{const t=(0,utils_text.X)(),classes=(0,clsx.Z)(["text-header-h2","mb-16","search-result-title"]);return react.createElement("h1",{className:classes,"data-cy":"search-result-header"},`${t("showingResultsForText",{placeholders:{"@query":q}})} (${hitcount})`)},search_result_header_SearchResultHeader=(0,react.memo)(SearchResultHeader);try{SearchResultHeader.displayName="SearchResultHeader",SearchResultHeader.__docgenInfo={description:"",displayName:"SearchResultHeader",props:{hitcount:{defaultValue:null,description:"",name:"hitcount",required:!0,type:{name:"number"}},q:{defaultValue:null,description:"",name:"q",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/search-bar/search-result-header/SearchResultHeader.tsx#SearchResultHeader"]={docgenInfo:SearchResultHeader.__docgenInfo,name:"SearchResultHeader",path:"src/components/search-bar/search-result-header/SearchResultHeader.tsx#SearchResultHeader"})}catch(__react_docgen_typescript_loader_error){}var use_pager=__webpack_require__("./src/components/result-pager/use-pager.tsx"),SearchResultList=__webpack_require__("./src/components/card-item-list/SearchResultList.tsx"),graphql=__webpack_require__("./src/core/dbc-gateway/generated/graphql.tsx"),mapValues=__webpack_require__("./node_modules/lodash/mapValues.js"),mapValues_default=__webpack_require__.n(mapValues),branches=__webpack_require__("./src/core/utils/branches.tsx"),invalid_switch_case=__webpack_require__("./src/core/utils/helpers/invalid-switch-case.ts");const allFacetFields=[graphql.sl.MainLanguages,graphql.sl.AccessTypes,graphql.sl.ChildrenOrAdults,graphql.sl.Creators,graphql.sl.FictionNonfiction,graphql.sl.FictionalCharacters,graphql.sl.GenreAndForm,graphql.sl.MaterialTypesSpecific,graphql.sl.Subjects,graphql.sl.WorkTypes],createFilters=(facets,branchIdList)=>{return{...(filters=facets,Object.keys(filters).reduce(((acc,key)=>({...acc,[key]:Object.keys(filters[key])})),{})),...branchIdList?{branchId:branchIdList}:{}};var filters};function useGetFacets(query,filters){const cleanBranches=(0,branches.ZP)(),{data,isLoading}=(0,graphql.NF)({q:{all:query},facets:allFacetFields,facetLimit:10,filters:createFilters(filters,cleanBranches)},{keepPreviousData:!0,placeholderData:{search:{facets:(facets=allFacetFields,facets.map((facet=>({name:facet,values:[{key:"",term:""}]}))))}}});var facets;return{facets:(null==data?void 0:data.search.facets)||null,isLoading}}function getAllFilterPathsAsString(filterObject){const mappedFilterValues=mapValues_default()(filterObject,(filter=>Object.keys(filter))),filterNames=Object.keys(mappedFilterValues);let allFilterPathsAsString="";return filterNames.forEach((filterName=>{mappedFilterValues[filterName].forEach((filterValue=>{""!==allFilterPathsAsString&&(allFilterPathsAsString=allFilterPathsAsString.concat(";")),allFilterPathsAsString=allFilterPathsAsString.concat(`facet.${filterName}:${filterValue}`)}))})),allFilterPathsAsString}var useStatistics=__webpack_require__("./src/core/statistics/useStatistics.ts"),dpl_cms=__webpack_require__("./src/core/dpl-cms/dpl-cms.ts"),statistics=__webpack_require__("./src/core/statistics/statistics.ts"),LinkNoStyle=__webpack_require__("./src/components/atoms/links/LinkNoStyle.tsx");const CampaignBody=({campaignData})=>react.createElement("section",{className:"campaign mt-35","data-cy":"campaign-body"},campaignData.image&&campaignData.image.url&&react.createElement("img",{"data-cy":"campaign-image",className:"campaign__image "+(campaignData.text?"":"campaign__image--full-width"),src:campaignData.image.url,alt:campaignData.image.alt}),campaignData.text&&react.createElement("h4",{className:"campaign__title campaign__title--ellipsis"},campaignData.text)),campaign_CampaignBody=CampaignBody;try{CampaignBody.displayName="CampaignBody",CampaignBody.__docgenInfo={description:"",displayName:"CampaignBody",props:{campaignData:{defaultValue:null,description:"",name:"campaignData",required:!0,type:{name:"CampaignMatchPOST200Data"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/campaign/CampaignBody.tsx#CampaignBody"]={docgenInfo:CampaignBody.__docgenInfo,name:"CampaignBody",path:"src/components/campaign/CampaignBody.tsx#CampaignBody"})}catch(__react_docgen_typescript_loader_error){}const Campaign=({campaignData})=>{const{track}=(0,useStatistics.T)();if(!campaignData.title)return null;const trackClick=()=>track("click",{id:statistics.h.campaignClick.id,name:statistics.h.campaignClick.name,trackedData:campaignData.title});return campaignData.url?react.createElement(LinkNoStyle.Z,{url:new URL(campaignData.url),trackClick,className:"cursor-pointer"},react.createElement(campaign_CampaignBody,{campaignData})):react.createElement(campaign_CampaignBody,{campaignData})},campaign_Campaign=Campaign;try{Campaign.displayName="Campaign",Campaign.__docgenInfo={description:"",displayName:"Campaign",props:{campaignData:{defaultValue:null,description:"",name:"campaignData",required:!0,type:{name:"CampaignMatchPOST200Data"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/campaign/Campaign.tsx#Campaign"]={docgenInfo:Campaign.__docgenInfo,name:"Campaign",path:"src/components/campaign/Campaign.tsx#Campaign"})}catch(__react_docgen_typescript_loader_error){}var useFilterHandler=__webpack_require__("./src/apps/search-result/useFilterHandler.tsx"),modal=__webpack_require__("./src/core/utils/modal.tsx"),upperFirst=__webpack_require__("./node_modules/lodash/upperFirst.js"),upperFirst_default=__webpack_require__.n(upperFirst),Button=__webpack_require__("./src/components/Buttons/Button.tsx"),icon_cross=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/basic/icon-cross.svg"),icon_cross_default=__webpack_require__.n(icon_cross);const ButtonTag=({onClick,selected,children,size,removable=!1,dataCy})=>{const className=(0,clsx.Z)("tag",selected&&"tag--fill",size&&`tag--${size}`,"cursor-pointer");return react.createElement("button",{type:"button","aria-pressed":selected??void 0,className,onClick,"data-cy":dataCy},children,removable&&react.createElement("img",{className:"tag-icon",src:icon_cross_default(),alt:"close icon"}))},Buttons_ButtonTag=ButtonTag;try{ButtonTag.displayName="ButtonTag",ButtonTag.__docgenInfo={description:"",displayName:"ButtonTag",props:{onClick:{defaultValue:null,description:"",name:"onClick",required:!0,type:{name:"MouseEventHandler"}},size:{defaultValue:null,description:"",name:"size",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"small"'},{value:'"large"'}]}},selected:{defaultValue:null,description:"",name:"selected",required:!1,type:{name:"boolean | undefined"}},removable:{defaultValue:{value:"false"},description:"",name:"removable",required:!1,type:{name:"boolean | undefined"}},dataCy:{defaultValue:null,description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/Buttons/ButtonTag.tsx#ButtonTag"]={docgenInfo:ButtonTag.__docgenInfo,name:"ButtonTag",path:"src/components/Buttons/ButtonTag.tsx#ButtonTag"})}catch(__react_docgen_typescript_loader_error){}var DisclosureControllable=__webpack_require__("./src/components/Disclosures/DisclosureControllable.tsx"),DisclosureSummary=__webpack_require__("./src/components/Disclosures/DisclosureSummary.tsx");const FacetBrowserModalBody=({facets})=>{const{filters,addToFilter,removeFromFilter}=(0,useFilterHandler.Z)(),t=(0,utils_text.X)(),{close}=(0,modal.f)(),{track}=(0,useStatistics.T)();return(0,useDeepCompareEffect.Z)((()=>{isEmpty_default()(filters)||track("click",{id:statistics.h.searchFacets.id,name:statistics.h.searchFacets.name,trackedData:getAllFilterPathsAsString(filters)})}),[filters]),react.createElement("section",{className:"facet-browser"},react.createElement("header",{className:"facet-browser__header"},react.createElement("h2",{className:"text-header-h3"},t("filterListText"))),facets.map((facet=>{const{name,values}=facet;if(0===values.length)return null;const hasSelectedTerms=Boolean(filters[name]);return react.createElement(DisclosureControllable.Z,{key:name,cyData:`facet-browser-${name}`,id:name,showContent:hasSelectedTerms,className:"disclosure--full-width",summary:react.createElement(DisclosureSummary.Z,{title:t(`facet${upperFirst_default()(name)}Text`),className:"disclosure__headline--no-padding"})},react.createElement("div",{className:"facet-browser__facet-group"},values.map((termItem=>{const{term}=termItem,selected=Boolean(filters[name]&&filters[name][term]);if(!termItem.term)return null;return react.createElement(Buttons_ButtonTag,{key:term,onClick:e=>(e.stopPropagation(),selected?removeFromFilter({facet:name,term:termItem}):addToFilter({facet:name,term:termItem})),selected,dataCy:`facet-browser-${name}-${term}`},termItem.term," ",(null==termItem?void 0:termItem.score)&&`(${termItem.score})`)}))))})),react.createElement(Button.z,{classNames:"facet-browser__results-btn",label:t("showResultsText"),buttonType:"none",disabled:!1,collapsible:!1,size:"medium",variant:"filled",onClick:()=>{close("facet-browser-modal")}}))},facet_browser_FacetBrowserModalBody=FacetBrowserModalBody;try{FacetBrowserModalBody.displayName="FacetBrowserModalBody",FacetBrowserModalBody.__docgenInfo={description:"",displayName:"FacetBrowserModalBody",props:{facets:{defaultValue:null,description:"",name:"facets",required:!0,type:{name:"FacetResult[]"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/facet-browser/FacetBrowserModalBody.tsx#FacetBrowserModalBody"]={docgenInfo:FacetBrowserModalBody.__docgenInfo,name:"FacetBrowserModalBody",path:"src/components/facet-browser/FacetBrowserModalBody.tsx#FacetBrowserModalBody"})}catch(__react_docgen_typescript_loader_error){}const FacetBrowserModal=({q})=>{const t=(0,utils_text.X)(),{filters}=(0,useFilterHandler.Z)(),{facets,isLoading}=useGetFacets(q,filters);return react.createElement(modal.Z,{classNames:"modal-right modal--no-padding",modalId:"facet-browser-modal",screenReaderModalDescriptionText:t("facetBrowserModalScreenReaderModalDescriptionText"),closeModalAriaLabelText:t("facetBrowserModalCloseModalAriaLabelText"),isSlider:!0},isLoading||!facets?null:react.createElement(facet_browser_FacetBrowserModalBody,{facets}))},facet_browser_FacetBrowserModal=FacetBrowserModal;try{FacetBrowserModal.displayName="FacetBrowserModal",FacetBrowserModal.__docgenInfo={description:"",displayName:"FacetBrowserModal",props:{q:{defaultValue:null,description:"",name:"q",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/facet-browser/FacetBrowserModal.tsx#FacetBrowserModal"]={docgenInfo:FacetBrowserModal.__docgenInfo,name:"FacetBrowserModal",path:"src/components/facet-browser/FacetBrowserModal.tsx#FacetBrowserModal"})}catch(__react_docgen_typescript_loader_error){}const facet_line_FacetLineSelected=()=>{const{filters,removeFromFilter}=(0,useFilterHandler.Z)();return react.createElement("ul",{className:"facet-line-selected-terms"},Object.entries(filters).map((([facet,value])=>react.createElement(react.Fragment,null,Object.entries(value).map((([label,term])=>react.createElement("li",{className:"facet-line-selected-terms__item"},react.createElement(Buttons_ButtonTag,{selected:!0,removable:!0,onClick:()=>removeFromFilter({facet,term}),dataCy:`facet-line-selected-term-${label}`},label))))))))};var Dropdown=__webpack_require__("./src/components/Dropdown/Dropdown.tsx");const FacetLineFilters=({facets=[]})=>{const t=(0,utils_text.X)(),{open}=(0,modal.f)(),{filters,addToFilter}=(0,useFilterHandler.Z)(),facetMap=(facets=>facets.reduce(((acc,facet)=>{const newAcc={...acc};return facet.values.forEach((value=>{const combinedKey=`${facet.name}:${value.key}`;newAcc[combinedKey]=value})),newAcc}),{}))(facets),formatValuesToDropdown=(facet,values)=>values.map((value=>({label:value.term,value:value.key})));return react.createElement("ul",{className:"facet-line mt-48"},facets.map((({name,values})=>{if(values.length>1){const translatedName=(name=>{switch(name){case graphql.sl.AccessTypes:return"facetAccessTypesText";case graphql.sl.CanAlwaysBeLoaned:return"facetCanAlwaysBeLoanedText";case graphql.sl.ChildrenOrAdults:return"facetChildrenOrAdultsText";case graphql.sl.Creators:return"facetCreatorsText";case graphql.sl.Dk5:return"facetDk5Text";case graphql.sl.FictionNonfiction:return"facetFictionNonfictionText";case graphql.sl.FictionalCharacters:return"facetFictionalCharactersText";case graphql.sl.GenreAndForm:return"facetGenreAndFormText";case graphql.sl.MainLanguages:return"facetMainLanguagesText";case graphql.sl.MaterialTypesGeneral:return"facetMaterialTypesGeneralText";case graphql.sl.MaterialTypesSpecific:return"facetMaterialTypesSpecificText";case graphql.sl.Subjects:return"facetSubjectsText";case graphql.sl.WorkTypes:return"facetWorkTypesText";case graphql.sl.Year:return"facetYearText";default:return(0,invalid_switch_case.Z)(name)}})(name);return react.createElement("li",{className:"facet-line__item"},react.createElement(Dropdown.Z,{cyData:`facet-line-${name}-dropdown`,placeholder:{label:t(translatedName),value:""},options:formatValuesToDropdown(0,values),ariaLabel:t(translatedName),arrowIcon:"chevron",classNames:"dropdown--grey-borders",innerClassNames:{select:"dropdown__select--inline",arrowWrapper:"dropdown__arrows--inline "},handleOnChange:e=>((e,facet)=>{const term=((facetName,termName,facetMap)=>facetMap[`${facetName}:${termName}`])(facet,e.target.value,facetMap);term&&addToFilter({facet,term})})(e,name)}))}return react.createElement(react.Fragment,null,values.map((termObj=>{var _filters$name;const{term,score}=termObj;return null!=filters&&null!==(_filters$name=filters[name])&&void 0!==_filters$name&&_filters$name[term]?null:react.createElement("li",{className:"facet-line__item"},react.createElement(Buttons_ButtonTag,{key:term,onClick:()=>addToFilter({facet:name,term:termObj}),selected:!1,dataCy:`facet-line-term-${term}`},`${term} (${score})`))})))})),react.createElement("li",{className:"facet-line__item"},react.createElement(Buttons_ButtonTag,{onClick:()=>open("facet-browser-modal"),dataCy:"facet-line-open-browser"},t("addMoreFiltersText"))))},facet_line_FacetLineFilters=(0,react.memo)(FacetLineFilters);try{FacetLineFilters.displayName="FacetLineFilters",FacetLineFilters.__docgenInfo={description:"",displayName:"FacetLineFilters",props:{facets:{defaultValue:{value:"[]"},description:"",name:"facets",required:!1,type:{name:"FacetResult[]"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/facet-line/FacetLineFilters.tsx#FacetLineFilters"]={docgenInfo:FacetLineFilters.__docgenInfo,name:"FacetLineFilters",path:"src/components/facet-line/FacetLineFilters.tsx#FacetLineFilters"})}catch(__react_docgen_typescript_loader_error){}const FacetLineFiltersSkeleton=()=>react.createElement(react.Fragment,null,react.createElement("div",{className:"card-list-page__skeleton-facet-line--mobile"},react.createElement("div",{className:"ssc mt-48"},react.createElement("div",{className:"ssc-head-line mb"}),react.createElement("div",{className:"ssc-head-line mb"}),react.createElement("div",{className:"ssc-head-line mb"}))),react.createElement("div",{className:"card-list-page__skeleton-facet-line--desktop"},react.createElement("div",{className:"ssc mt-48"},react.createElement("div",{className:"ssc-head-line mb"})))),facet_line_FacetLineFiltersSkeleton=FacetLineFiltersSkeleton;try{FacetLineFiltersSkeleton.displayName="FacetLineFiltersSkeleton",FacetLineFiltersSkeleton.__docgenInfo={description:"",displayName:"FacetLineFiltersSkeleton",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/facet-line/FacetLineFiltersSkeleton.tsx#FacetLineFiltersSkeleton"]={docgenInfo:FacetLineFiltersSkeleton.__docgenInfo,name:"FacetLineFiltersSkeleton",path:"src/components/facet-line/FacetLineFiltersSkeleton.tsx#FacetLineFiltersSkeleton"})}catch(__react_docgen_typescript_loader_error){}const FacetLine=({q})=>{const{filters}=(0,useFilterHandler.Z)(),cleanBranches=(0,branches.ZP)(),{data,isLoading}=(0,graphql.Zu)({q:{all:q},facetsLimit:6,valuesLimit:5,filters:createFilters(filters,cleanBranches)});return react.createElement(react.Fragment,null,isLoading&&react.createElement(facet_line_FacetLineFiltersSkeleton,null),data&&react.createElement(facet_line_FacetLineFilters,{facets:data.search.intelligentFacets}),react.createElement(facet_line_FacetLineSelected,null))},facet_line_FacetLine=(0,react.memo)(FacetLine);try{FacetLine.displayName="FacetLine",FacetLine.__docgenInfo={description:"",displayName:"FacetLine",props:{q:{defaultValue:null,description:"",name:"q",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/facet-line/FacetLine.tsx#FacetLine"]={docgenInfo:FacetLine.__docgenInfo,name:"FacetLine",path:"src/components/facet-line/FacetLine.tsx#FacetLine"})}catch(__react_docgen_typescript_loader_error){}var helpers_url=__webpack_require__("./src/core/utils/helpers/url.ts"),card_list_item_skeleton=__webpack_require__("./src/components/card-item-list/card-list-item/card-list-item-skeleton.tsx");const search_result_skeleton=({q,dataCy="search-header-skeleton",hideFacetLine=!1})=>{const t=(0,utils_text.X)();return react.createElement("div",{className:"card-list-page","data-cy":dataCy},react.createElement("h1",{className:"text-header-h2 mb-16 search-result-title text-loading"},!hideFacetLine&&t("showingResultsForText",{placeholders:{"@query":q}}),hideFacetLine&&t("showingResultsForWithoutQueryText")),!hideFacetLine&&react.createElement(facet_line_FacetLineFiltersSkeleton,null),react.createElement("ul",{className:"card-list-page__list my-32"},[...Array(5)].map((()=>react.createElement("li",null,react.createElement(card_list_item_skeleton.Z,null))))))};try{searchresultskeleton.displayName="searchresultskeleton",searchresultskeleton.__docgenInfo={description:"",displayName:"searchresultskeleton",props:{q:{defaultValue:null,description:"",name:"q",required:!0,type:{name:"string"}},dataCy:{defaultValue:{value:"search-header-skeleton"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}},hideFacetLine:{defaultValue:{value:"false"},description:"",name:"hideFacetLine",required:!1,type:{name:"boolean | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/search-result/search-result-skeleton.tsx#searchresultskeleton"]={docgenInfo:searchresultskeleton.__docgenInfo,name:"searchresultskeleton",path:"src/apps/search-result/search-result-skeleton.tsx#searchresultskeleton"})}catch(__react_docgen_typescript_loader_error){}var search_result_zero_hits=__webpack_require__("./src/apps/search-result/search-result-zero-hits.tsx");const search_result=({q,pageSize})=>{const{filters,clearFilter,addFilterFromUrlParamListener}=(0,useFilterHandler.Z)(),cleanBranches=(0,branches.ZP)(),[resultItems,setResultItems]=(0,react.useState)([]),[hitcount,setHitCount]=(0,react.useState)(0),[canWeTrackHitcount,setCanWeTrackHitcount]=(0,react.useState)(!1),{PagerComponent,page}=(0,use_pager.Z)({hitcount,pageSize}),{mutate}=(0,dpl_cms.by)(),[campaignData,setCampaignData]=(0,react.useState)(null),{facets:campaignFacets}=useGetFacets(q,filters);(0,useDeepCompareEffect.Z)((()=>{setResultItems([])}),[q,pageSize,filters]);const{track}=(0,useStatistics.T)();(0,react.useEffect)((()=>{track("click",{id:statistics.h.searchQuery.id,name:statistics.h.searchQuery.name,trackedData:q})}),[q]),(0,useDeepCompareEffect.Z)((()=>{campaignFacets&&mutate({data:campaignFacets},{onSuccess:campaign=>{setCampaignData(campaign)}})}),[campaignFacets,mutate]),(0,react.useEffect)((()=>{addFilterFromUrlParamListener(graphql.sl.MaterialTypesSpecific),addFilterFromUrlParamListener(graphql.sl.WorkTypes)}),[]);const{data,isLoading}=(0,graphql.OX)({q:{all:q},offset:page*pageSize,limit:pageSize,filters:createFilters(filters,cleanBranches)});return(0,react.useEffect)((()=>{if(!data)return;const{search:{works:resultWorks,hitcount:resultCount}}=data;setHitCount(resultCount),setResultItems(page>0?prev=>[...prev,...resultWorks]:resultWorks)}),[data,page]),(0,react.useEffect)((()=>{canWeTrackHitcount?track("click",{id:statistics.h.searchResultCount.id,name:statistics.h.searchResultCount.name,trackedData:hitcount?hitcount.toString():"0"}):setCanWeTrackHitcount(!0)}),[hitcount]),(0,react.useEffect)((()=>{var _campaignData$data;null!=campaignData&&null!==(_campaignData$data=campaignData.data)&&void 0!==_campaignData$data&&_campaignData$data.title&&track("click",{id:statistics.h.campaignShown.id,name:statistics.h.campaignShown.name,trackedData:campaignData.data.title})}),[campaignData]),(0,react.useEffect)((()=>{"usePersistedFilters"!==(0,helpers_url.wo)("filters")&&clearFilter()}),[clearFilter]),isLoading?react.createElement(search_result_skeleton,{q}):0===hitcount?react.createElement(search_result_zero_hits.Z,null):react.createElement("div",{className:"card-list-page"},react.createElement(search_result_header_SearchResultHeader,{hitcount,q}),react.createElement(facet_line_FacetLine,{q}),campaignData&&campaignData.data&&react.createElement(campaign_Campaign,{campaignData:campaignData.data}),react.createElement(SearchResultList.Z,{resultItems,page,pageSize}),react.createElement(PagerComponent,{isLoading}),!isEmpty_default()(resultItems)&&react.createElement(facet_browser_FacetBrowserModal,{q}))};try{searchresult.displayName="searchresult",searchresult.__docgenInfo={description:"",displayName:"searchresult",props:{q:{defaultValue:null,description:"",name:"q",required:!0,type:{name:"string"}},pageSize:{defaultValue:null,description:"",name:"pageSize",required:!0,type:{name:"number"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/search-result/search-result.tsx#searchresult"]={docgenInfo:searchresult.__docgenInfo,name:"searchresult",path:"src/apps/search-result/search-result.tsx#searchresult"})}catch(__react_docgen_typescript_loader_error){}const search_result_entry=(0,config.Rh)((0,url.XL)((0,utils_text.z)((({q,pageSizeDesktop,pageSizeMobile})=>{const{q:searchQuery}=(0,general.Qf)({q}),pageSize=(0,general.Rh)({desktop:pageSizeDesktop,mobile:pageSizeMobile});return react.createElement("div",null,searchQuery&&react.createElement(guarded_app.Z,{app:"search-result"},react.createElement(search_result,{q:searchQuery,pageSize})))}))));try{searchresultentry.displayName="searchresultentry",searchresultentry.__docgenInfo={description:"",displayName:"searchresultentry",props:{q:{defaultValue:null,description:"",name:"q",required:!1,type:{name:"string | undefined"}},pageSizeDesktop:{defaultValue:null,description:"",name:"pageSizeDesktop",required:!1,type:{name:"number | undefined"}},pageSizeMobile:{defaultValue:null,description:"",name:"pageSizeMobile",required:!1,type:{name:"number | undefined"}},materialUrl:{defaultValue:null,description:"",name:"materialUrl",required:!0,type:{name:"string"}},searchUrl:{defaultValue:null,description:"",name:"searchUrl",required:!0,type:{name:"string"}},advancedSearchUrl:{defaultValue:null,description:"",name:"advancedSearchUrl",required:!0,type:{name:"string"}},fbsBaseUrl:{defaultValue:null,description:"",name:"fbsBaseUrl",required:!0,type:{name:"string"}},loanListEreolenUrl:{defaultValue:null,description:"",name:"loanListEreolenUrl",required:!0,type:{name:"string"}},feesPageUrl:{defaultValue:null,description:"",name:"feesPageUrl",required:!0,type:{name:"string"}},publizonBaseUrl:{defaultValue:null,description:"",name:"publizonBaseUrl",required:!0,type:{name:"string"}},dplCmsBaseUrl:{defaultValue:null,description:"",name:"dplCmsBaseUrl",required:!0,type:{name:"string"}},coverBaseUrl:{defaultValue:null,description:"",name:"coverBaseUrl",required:!0,type:{name:"string"}},materialBaseUrl:{defaultValue:null,description:"",name:"materialBaseUrl",required:!0,type:{name:"string"}},fbiBaseUrl:{defaultValue:null,description:"",name:"fbiBaseUrl",required:!0,type:{name:"string"}},authUrl:{defaultValue:null,description:"",name:"authUrl",required:!0,type:{name:"string"}},ereolenHomepageUrl:{defaultValue:null,description:"",name:"ereolenHomepageUrl",required:!0,type:{name:"string"}},blacklistedAvailabilityBranchesConfig:{defaultValue:null,description:"",name:"blacklistedAvailabilityBranchesConfig",required:!0,type:{name:"string"}},blacklistedPickupBranchesConfig:{defaultValue:null,description:"",name:"blacklistedPickupBranchesConfig",required:!1,type:{name:"string | undefined"}},blacklistedSearchBranchesConfig:{defaultValue:null,description:"",name:"blacklistedSearchBranchesConfig",required:!1,type:{name:"string | undefined"}},branchesConfig:{defaultValue:null,description:"",name:"branchesConfig",required:!0,type:{name:"string"}},addMoreFiltersText:{defaultValue:null,description:"",name:"addMoreFiltersText",required:!0,type:{name:"string"}},addToFavoritesAriaLabelText:{defaultValue:null,description:"",name:"addToFavoritesAriaLabelText",required:!0,type:{name:"string"}},alertErrorCloseText:{defaultValue:null,description:"",name:"alertErrorCloseText",required:!0,type:{name:"string"}},alertErrorMessageText:{defaultValue:null,description:"",name:"alertErrorMessageText",required:!0,type:{name:"string"}},byAuthorText:{defaultValue:null,description:"",name:"byAuthorText",required:!0,type:{name:"string"}},etAlText:{defaultValue:null,description:"",name:"etAlText",required:!0,type:{name:"string"}},facetAccessTypesText:{defaultValue:null,description:"",name:"facetAccessTypesText",required:!0,type:{name:"string"}},facetBrowserModalCloseModalAriaLabelText:{defaultValue:null,description:"",name:"facetBrowserModalCloseModalAriaLabelText",required:!0,type:{name:"string"}},facetBrowserModalScreenReaderModalDescriptionText:{defaultValue:null,description:"",name:"facetBrowserModalScreenReaderModalDescriptionText",required:!0,type:{name:"string"}},facetCanAlwaysBeLoanedText:{defaultValue:null,description:"",name:"facetCanAlwaysBeLoanedText",required:!0,type:{name:"string"}},facetChildrenOrAdultsText:{defaultValue:null,description:"",name:"facetChildrenOrAdultsText",required:!0,type:{name:"string"}},facetCreatorsText:{defaultValue:null,description:"",name:"facetCreatorsText",required:!0,type:{name:"string"}},facetDk5Text:{defaultValue:null,description:"",name:"facetDk5Text",required:!0,type:{name:"string"}},facetFictionalCharactersText:{defaultValue:null,description:"",name:"facetFictionalCharactersText",required:!0,type:{name:"string"}},facetFictionNonfictionText:{defaultValue:null,description:"",name:"facetFictionNonfictionText",required:!0,type:{name:"string"}},facetGenreAndFormText:{defaultValue:null,description:"",name:"facetGenreAndFormText",required:!0,type:{name:"string"}},facetMainLanguagesText:{defaultValue:null,description:"",name:"facetMainLanguagesText",required:!0,type:{name:"string"}},facetMaterialTypesGeneralText:{defaultValue:null,description:"",name:"facetMaterialTypesGeneralText",required:!0,type:{name:"string"}},facetMaterialTypesSpecificText:{defaultValue:null,description:"",name:"facetMaterialTypesSpecificText",required:!0,type:{name:"string"}},facetSubjectsText:{defaultValue:null,description:"",name:"facetSubjectsText",required:!0,type:{name:"string"}},facetWorkTypesText:{defaultValue:null,description:"",name:"facetWorkTypesText",required:!0,type:{name:"string"}},facetYearText:{defaultValue:null,description:"",name:"facetYearText",required:!0,type:{name:"string"}},filterListText:{defaultValue:null,description:"",name:"filterListText",required:!0,type:{name:"string"}},inSeriesText:{defaultValue:null,description:"",name:"inSeriesText",required:!0,type:{name:"string"}},loadingText:{defaultValue:null,description:"",name:"loadingText",required:!0,type:{name:"string"}},numberDescriptionText:{defaultValue:null,description:"",name:"numberDescriptionText",required:!0,type:{name:"string"}},removeFromFavoritesAriaLabelText:{defaultValue:null,description:"",name:"removeFromFavoritesAriaLabelText",required:!0,type:{name:"string"}},resultPagerStatusText:{defaultValue:null,description:"",name:"resultPagerStatusText",required:!0,type:{name:"string"}},showingResultsForText:{defaultValue:null,description:"",name:"showingResultsForText",required:!0,type:{name:"string"}},noSearchResultText:{defaultValue:null,description:"",name:"noSearchResultText",required:!0,type:{name:"string"}},showMoreText:{defaultValue:null,description:"",name:"showMoreText",required:!0,type:{name:"string"}},showResultsText:{defaultValue:null,description:"",name:"showResultsText",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/search-result/search-result.entry.tsx#searchresultentry"]={docgenInfo:searchresultentry.__docgenInfo,name:"searchresultentry",path:"src/apps/search-result/search-result.entry.tsx#searchresultentry"})}catch(__react_docgen_typescript_loader_error){}const search_result_dev={title:"Apps / Search Result",component:search_result_entry,argTypes:{...serviceUrlArgs.Z,q:{name:"Search string",defaultValue:"harry",control:{type:"text"}},pageSizeDesktop:{name:"Number of search result items on desktop",defaultValue:50,control:{type:"number"}},pageSizeMobile:{name:"Number of search result items on mobile",defaultValue:20,control:{type:"number"}},authUrl:{name:"Url where user can authenticate",defaultValue:"",control:{type:"text"}},searchUrl:{name:"Path to the search result page",defaultValue:"/search",control:{type:"text"}},materialUrl:{name:"Path to the material page",defaultValue:"/work/:workid",control:{type:"text"}},etAlText:{name:"Et al. Text",defaultValue:"et al.",control:{type:"text"}},byAuthorText:{name:"By (author) Text",defaultValue:"By",control:{type:"text"}},showMoreText:{name:"Show more Text",defaultValue:"show more",control:{type:"text"}},resultPagerStatusText:{name:"Result pager status text",defaultValue:"Showing @itemsShown out of @hitcount results",control:{type:"text"}},numberDescriptionText:{name:"Number description",defaultValue:"Nr.",control:{type:"text"}},inSeriesText:{name:"In series",defaultValue:"in series",control:{type:"text"}},showingResultsForText:{name:"Showing results for",defaultValue:"Showing results for “@query”",control:{type:"text"}},noSearchResultText:{name:"0-hit search result",defaultValue:"Your search has 0 results",control:{type:"text"}},blacklistedPickupBranchesConfig:{name:"Blacklisted Pickup branches",defaultValue:"FBS-751032,FBS-751031,FBS-751009,FBS-751027,FBS-751024",control:{type:"text"}},blacklistedAvailabilityBranchesConfig:{name:"Blacklisted Availability branches",defaultValue:"FBS-751032,FBS-751031,FBS-751009,FBS-751027,FBS-751024",control:{type:"text"}},blacklistedSearchBranchesConfig:{name:"Blacklisted branches",defaultValue:"FBS-751032,FBS-751031,FBS-751009,FBS-751027,FBS-751024",control:{type:"text"}},branchesConfig:{name:"Branches",defaultValue:'[\n {\n "branchId":"DK-775120",\n "title":"Højbjerg"\n },\n {\n "branchId":"DK-775122",\n "title":"Beder-Malling"\n },\n {\n "branchId":"DK-775144",\n "title":"Gellerup"\n },\n {\n "branchId":"DK-775167",\n "title":"Lystrup"\n },\n {\n "branchId":"DK-775146",\n "title":"Harlev"\n },\n {\n "branchId":"DK-775168",\n "title":"Skødstrup"\n },\n {\n "branchId":"FBS-751010",\n "title":"Arresten"\n },\n {\n "branchId":"DK-775147",\n "title":"Hasle"\n },\n {\n "branchId":"FBS-751032",\n "title":"Må ikke benyttes"\n },\n {\n "branchId":"FBS-751031",\n "title":"Fjernlager 1"\n },\n {\n "branchId":"DK-775126",\n "title":"Solbjerg"\n },\n {\n "branchId":"FBS-751030",\n "title":"ITK"\n },\n {\n "branchId":"DK-775149",\n "title":"Sabro"\n },\n {\n "branchId":"DK-775127",\n "title":"Tranbjerg"\n },\n {\n "branchId":"DK-775160",\n "title":"Risskov"\n },\n {\n "branchId":"DK-775162",\n "title":"Hjortshøj"\n },\n {\n "branchId":"DK-775140",\n "title":"Åby"\n },\n {\n "branchId":"FBS-751009",\n "title":"Fjernlager 2"\n },\n {\n "branchId":"FBS-751029",\n "title":"Stadsarkivet"\n },\n {\n "branchId":"FBS-751027",\n "title":"Intern"\n },\n {\n "branchId":"FBS-751026",\n "title":"Fælles undervejs"\n },\n {\n "branchId":"FBS-751025",\n "title":"Fællessekretariatet"\n },\n {\n "branchId":"DK-775133",\n "title":"Bavnehøj"\n },\n {\n "branchId":"FBS-751024",\n "title":"Fjernlånte materialer"\n },\n {\n "branchId":"DK-775100",\n "title":"Hovedbiblioteket"\n },\n {\n "branchId":"DK-775170",\n "title":"Trige"\n },\n {\n "branchId":"DK-775150",\n "title":"Tilst"\n },\n {\n "branchId":"DK-775130",\n "title":"Viby"\n },\n {\n "branchId":"DK-775164",\n "title":"Egå"\n }\n]',control:{type:"text"}},facetBrowserModalScreenReaderModalDescriptionText:{name:"facet browser screen reader modal description text",defaultValue:"Modal for facet browser",control:{type:"text"}},facetBrowserModalCloseModalAriaLabelText:{name:"facet browser close modal aria label text",defaultValue:"Close facet browser modal",control:{type:"text"}},facetAccessTypesText:{name:"Access types text",defaultValue:"Access types",control:{type:"text"}},facetCanAlwaysBeLoanedText:{name:"Can always be loaned text",defaultValue:"Can always be loaned",control:{type:"text"}},facetChildrenOrAdultsText:{name:"Children or adults text",defaultValue:"Children or adults",control:{type:"text"}},facetCreatorsText:{name:"Creators text",defaultValue:"Creators",control:{type:"text"}},facetDk5Text:{name:"Dk5 text",defaultValue:"Dk5",control:{type:"text"}},facetFictionalCharactersText:{name:"Fictional characters text",defaultValue:"Fictional characters",control:{type:"text"}},facetFictionNonfictionText:{name:"Fiction or nonfiction text",defaultValue:"Fiction or nonfiction",control:{type:"text"}},facetGenreAndFormText:{name:"Genre and form text",defaultValue:"Genre and form",control:{type:"text"}},facetMainLanguagesText:{name:"Main languages text",defaultValue:"Main languages",control:{type:"text"}},facetMaterialTypesGeneralText:{name:"Material types general text",defaultValue:"Material types general",control:{type:"text"}},facetMaterialTypesSpecificText:{name:"Material types specific text",defaultValue:"Material types specific",control:{type:"text"}},facetSubjectsText:{name:"Subjects text",defaultValue:"Subjects",control:{type:"text"}},facetWorkTypesText:{name:"Work types text",defaultValue:"Work types",control:{type:"text"}},facetYearText:{name:"Year text",defaultValue:"Year",control:{type:"text"}},showResultsText:{name:"Show results text",defaultValue:"Show results",control:{type:"text"}},filterListText:{name:"Filter list text",defaultValue:"Filter list",control:{type:"text"}},addMoreFiltersText:{name:"Add more filters text",defaultValue:"+ more filters",control:{type:"text"}},addToFavoritesAriaLabelText:{control:{type:"text"},defaultValue:"Add @title to favorites list"},removeFromFavoritesAriaLabelText:{control:{type:"text"},defaultValue:"Remove @title from favorites list"},alertErrorCloseText:{name:"Alert error close text",defaultValue:"close",control:{type:"text"}},alertErrorMessageText:{name:"Alert error message text",defaultValue:"An error occurred",control:{type:"text"}},loadingText:{name:"Loading",defaultValue:"Loading",control:{type:"text"}}}},search_result_dev_SearchResult=args=>react.createElement(search_result_entry,args)},"./src/apps/search-result/useFilterHandler.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),react_redux__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/react-redux/es/index.js"),_core_filter_slice__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/core/filter.slice.ts"),_core_utils_helpers_url__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/core/utils/helpers/url.ts");const __WEBPACK_DEFAULT_EXPORT__=()=>{const dispatch=(0,react_redux__WEBPACK_IMPORTED_MODULE_1__.I0)(),filters=(0,react_redux__WEBPACK_IMPORTED_MODULE_1__.v9)((state=>state.filter)),clearFilter=(0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)((()=>{(0,_core_utils_helpers_url__WEBPACK_IMPORTED_MODULE_3__.oC)("filters"),dispatch((0,_core_filter_slice__WEBPACK_IMPORTED_MODULE_2__.ZH)())}),[dispatch]),addToFilter=(0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)((payload=>{"usePersistedFilters"!==(0,_core_utils_helpers_url__WEBPACK_IMPORTED_MODULE_3__.wo)("filters")&&(0,_core_utils_helpers_url__WEBPACK_IMPORTED_MODULE_3__.ul)({filters:"usePersistedFilters"}),dispatch((0,_core_filter_slice__WEBPACK_IMPORTED_MODULE_2__.IH)(payload))}),[dispatch]),removeFromFilter=(0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)((payload=>dispatch((0,_core_filter_slice__WEBPACK_IMPORTED_MODULE_2__.Od)(payload))),[dispatch]);return{filters,addToFilter,removeFromFilter,clearFilter,addFilterFromUrlParamListener:facet=>{const urlFilter=(0,_core_utils_helpers_url__WEBPACK_IMPORTED_MODULE_3__.wo)(facet);urlFilter&&addToFilter({facet,term:{key:"key",term:urlFilter}})}}}},"./src/apps/something-similar/SomethingSimilar.dev.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{SomethingSimilarEntry:()=>SomethingSimilar_dev_SomethingSimilarEntry,default:()=>SomethingSimilar_dev});var react=__webpack_require__("./node_modules/react/index.js"),esm=__webpack_require__("./node_modules/@storybook/addon-queryparams/dist/esm/index.js"),serviceUrlArgs=__webpack_require__("./src/core/storybook/serviceUrlArgs.ts"),graphql=__webpack_require__("./src/core/dbc-gateway/generated/graphql.tsx"),general=__webpack_require__("./src/core/utils/helpers/general.ts"),utils_text=__webpack_require__("./src/core/utils/text.tsx"),material_fetch_hoc=__webpack_require__("./src/apps/loan-list/materials/utils/material-fetch-hoc.tsx"),SimpleMaterial=__webpack_require__("./src/components/simple-material/SimpleMaterial.tsx"),url=__webpack_require__("./src/core/utils/helpers/url.ts");const SomethingSimilarList=({id,material})=>{const t=(0,utils_text.X)(),{somethingSimilarAuthor:somethingSimilarAuthorLimit,somethingSimilar:somethingSimilarLimit}=(0,general.US)(),[somethingSimilar,setSomethingSimilar]=(0,react.useState)(null),[authorMaterials,setAuthorMaterials]=(0,react.useState)(null),[recommendView,setRecommendView]=(0,react.useState)("similar"),{data:somethingSimilarData}=(0,graphql.GN)({faust:id,limit:somethingSimilarLimit}),setViewHandler=(0,react.useCallback)((inputView=>{(0,url.ul)({"recommender-view":inputView}),setRecommendView(inputView)}),[setRecommendView]),{data:byAuthorData}=(0,graphql.OX)({limit:somethingSimilarAuthorLimit,q:{all:null==material?void 0:material.firstAuthor},offset:0});return(0,react.useEffect)((()=>{somethingSimilarData&&setSomethingSimilar(somethingSimilarData.recommend.result.map((({work})=>work)))}),[somethingSimilarData]),(0,react.useEffect)((()=>{byAuthorData&&setAuthorMaterials(byAuthorData.search.works)}),[byAuthorData]),react.createElement(react.Fragment,null,react.createElement("h2",{className:"recommender__left-title text-header-h1"},t("somethingSimilarTitleText")),react.createElement("div",{className:"recommender__buttons"},react.createElement("button",{type:"button",onClick:()=>setRecommendView("similar"),className:"text-body-medium-regular color-primary-black cursor-pointer button-link--bright "+(recommendView?"button-link":"")},t("somethingSimilarSomethingSimilarAuthorText")),react.createElement("button",{onClick:()=>setViewHandler("author"),type:"button",className:"text-body-medium-regular color-primary-black cursor-pointer button-link--bright "+(recommendView?"":"button-link")},t("somethingSimilarByTheSameAuthorText"))),react.createElement("ul",{className:"recommender__grid"},recommendView&&somethingSimilar&&somethingSimilar.map((work=>react.createElement(SimpleMaterial.Z,{app:"something-similar",bright:!0,work}))),!recommendView&&authorMaterials&&authorMaterials.map((work=>react.createElement(SimpleMaterial.Z,{app:"something-similar",bright:!0,work})))))},something_similar_SomethingSimilarList=(0,material_fetch_hoc.Z)(SomethingSimilarList);try{SomethingSimilarList.displayName="SomethingSimilarList",SomethingSimilarList.__docgenInfo={description:"",displayName:"SomethingSimilarList",props:{id:{defaultValue:null,description:"",name:"id",required:!0,type:{name:"string"}},digitalMaterial:{defaultValue:null,description:"",name:"digitalMaterial",required:!1,type:{name:"Product | null | undefined"}},item:{defaultValue:null,description:"",name:"item",required:!1,type:{name:"Nullable> | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/something-similar/SomethingSimilarList.tsx#SomethingSimilarList"]={docgenInfo:SomethingSimilarList.__docgenInfo,name:"SomethingSimilarList",path:"src/apps/something-similar/SomethingSimilarList.tsx#SomethingSimilarList"})}catch(__react_docgen_typescript_loader_error){}const SomethingSimilar=({faust})=>react.createElement("div",{className:"recommender recommender--bright"},faust&&react.createElement(something_similar_SomethingSimilarList,{id:faust,item:{faust}})),something_similar_SomethingSimilar=SomethingSimilar;try{SomethingSimilar.displayName="SomethingSimilar",SomethingSimilar.__docgenInfo={description:"",displayName:"SomethingSimilar",props:{faust:{defaultValue:null,description:"",name:"faust",required:!0,type:{name:"`${number}`"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/something-similar/SomethingSimilar.tsx#SomethingSimilar"]={docgenInfo:SomethingSimilar.__docgenInfo,name:"SomethingSimilar",path:"src/apps/something-similar/SomethingSimilar.tsx#SomethingSimilar"})}catch(__react_docgen_typescript_loader_error){}var config=__webpack_require__("./src/core/utils/config.tsx");const SomethingSimilar_entry=(0,__webpack_require__("./src/core/utils/url.tsx").XL)((0,config.Rh)((0,utils_text.z)((({faust})=>react.createElement(something_similar_SomethingSimilar,{faust})))));try{SomethingSimilarentry.displayName="SomethingSimilarentry",SomethingSimilarentry.__docgenInfo={description:"",displayName:"SomethingSimilarentry",props:{fbsBaseUrl:{defaultValue:null,description:"",name:"fbsBaseUrl",required:!0,type:{name:"string"}},publizonBaseUrl:{defaultValue:null,description:"",name:"publizonBaseUrl",required:!0,type:{name:"string"}},dplCmsBaseUrl:{defaultValue:null,description:"",name:"dplCmsBaseUrl",required:!0,type:{name:"string"}},coverBaseUrl:{defaultValue:null,description:"",name:"coverBaseUrl",required:!0,type:{name:"string"}},materialBaseUrl:{defaultValue:null,description:"",name:"materialBaseUrl",required:!0,type:{name:"string"}},fbiBaseUrl:{defaultValue:null,description:"",name:"fbiBaseUrl",required:!0,type:{name:"string"}},materialUrl:{defaultValue:null,description:"",name:"materialUrl",required:!0,type:{name:"string"}},somethingSimilarTitleText:{defaultValue:null,description:"",name:"somethingSimilarTitleText",required:!0,type:{name:"string"}},materialByAuthorText:{defaultValue:null,description:"",name:"materialByAuthorText",required:!0,type:{name:"string"}},materialAndAuthorText:{defaultValue:null,description:"",name:"materialAndAuthorText",required:!0,type:{name:"string"}},etAlText:{defaultValue:null,description:"",name:"etAlText",required:!0,type:{name:"string"}},somethingSimilarByTheSameAuthorText:{defaultValue:null,description:"",name:"somethingSimilarByTheSameAuthorText",required:!0,type:{name:"string"}},somethingSimilarSomethingSimilarAuthorText:{defaultValue:null,description:"",name:"somethingSimilarSomethingSimilarAuthorText",required:!0,type:{name:"string"}},addToFavoritesAriaLabelText:{defaultValue:null,description:"",name:"addToFavoritesAriaLabelText",required:!0,type:{name:"string"}},removeFromFavoritesAriaLabelText:{defaultValue:null,description:"",name:"removeFromFavoritesAriaLabelText",required:!0,type:{name:"string"}},faust:{defaultValue:null,description:"",name:"faust",required:!0,type:{name:"`${number}`"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/something-similar/SomethingSimilar.entry.tsx#SomethingSimilarentry"]={docgenInfo:SomethingSimilarentry.__docgenInfo,name:"SomethingSimilarentry",path:"src/apps/something-similar/SomethingSimilar.entry.tsx#SomethingSimilarentry"})}catch(__react_docgen_typescript_loader_error){}const SomethingSimilar_dev={title:"Apps / Something similar",component:SomethingSimilar_entry,decorators:[esm.j],argTypes:{...serviceUrlArgs.Z,somethingSimilarTitleText:{control:{type:"text"},defaultValue:"Other materials"},materialUrl:{defaultValue:"/work/:workid",control:{type:"text"}},materialByAuthorText:{control:{type:"text"},defaultValue:"By"},materialAndAuthorText:{control:{type:"text"},defaultValue:"and"},etAlText:{control:{type:"text"},defaultValue:"et al."},somethingSimilarByTheSameAuthorText:{control:{type:"text"},defaultValue:"By the same author"},faust:{control:{type:"text"},defaultValue:"48953786"},somethingSimilarSomethingSimilarAuthorText:{control:{type:"text"},defaultValue:"Something similar"},addToFavoritesAriaLabelText:{control:{type:"text"},defaultValue:"Add @title to favorites list"},removeFromFavoritesAriaLabelText:{control:{type:"text"},defaultValue:"Remove @title from favorites list"}}},SomethingSimilar_dev_SomethingSimilarEntry=(props=>react.createElement(SomethingSimilar_entry,props)).bind({})},"./src/components/Buttons/ArrowButton.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_atoms_icons_arrow_arrow__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/components/atoms/icons/arrow/arrow.tsx");const ArrowButton=({cursorPointer=!1,clickEventHandler,arrowLabelledBy})=>{const pointer=cursorPointer&&{cursor:"pointer"}||{cursor:"inherit"};return react__WEBPACK_IMPORTED_MODULE_0__.createElement("button",{"aria-labelledby":arrowLabelledBy,style:pointer,type:"button",onClick:e=>{clickEventHandler&&(e.stopPropagation(),clickEventHandler())}},react__WEBPACK_IMPORTED_MODULE_0__.createElement(_atoms_icons_arrow_arrow__WEBPACK_IMPORTED_MODULE_1__.Z,null))},__WEBPACK_DEFAULT_EXPORT__=ArrowButton;try{ArrowButton.displayName="ArrowButton",ArrowButton.__docgenInfo={description:"",displayName:"ArrowButton",props:{cursorPointer:{defaultValue:{value:"false"},description:"",name:"cursorPointer",required:!1,type:{name:"boolean"}},clickEventHandler:{defaultValue:null,description:"",name:"clickEventHandler",required:!1,type:{name:"(() => void) | undefined"}},arrowLabelledBy:{defaultValue:null,description:"",name:"arrowLabelledBy",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/Buttons/ArrowButton.tsx#ArrowButton"]={docgenInfo:ArrowButton.__docgenInfo,name:"ArrowButton",path:"src/components/Buttons/ArrowButton.tsx#ArrowButton"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/Buttons/Button.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{z:()=>Button});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_ButtonIcon__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/components/Buttons/ButtonIcon.tsx");const Button=({label,buttonType,disabled,collapsible,size,variant,onClick,iconClassNames,id,classNames,dataCy})=>react__WEBPACK_IMPORTED_MODULE_0__.createElement("button",{"data-cy":dataCy||"button",type:"button",className:`btn-primary btn-${variant} btn-${size} ${disabled?"btn-outline":""} arrow__hover--right-small ${classNames??""}`,disabled,onClick,id},label,react__WEBPACK_IMPORTED_MODULE_0__.createElement(_ButtonIcon__WEBPACK_IMPORTED_MODULE_1__.E,{buttonType,iconClassNames,collapsible}));try{Button.displayName="Button",Button.__docgenInfo={description:"",displayName:"Button",props:{label:{defaultValue:null,description:"",name:"label",required:!0,type:{name:"string"}},buttonType:{defaultValue:null,description:"",name:"buttonType",required:!0,type:{name:"enum",value:[{value:'"search"'},{value:'"none"'},{value:'"default"'},{value:'"external-link"'}]}},disabled:{defaultValue:null,description:"",name:"disabled",required:!0,type:{name:"boolean"}},collapsible:{defaultValue:null,description:"",name:"collapsible",required:!0,type:{name:"boolean"}},size:{defaultValue:null,description:"",name:"size",required:!0,type:{name:"enum",value:[{value:'"xsmall"'},{value:'"small"'},{value:'"medium"'},{value:'"large"'},{value:'"xlarge"'}]}},variant:{defaultValue:null,description:"",name:"variant",required:!0,type:{name:"enum",value:[{value:'"outline"'},{value:'"filled"'}]}},onClick:{defaultValue:null,description:"",name:"onClick",required:!1,type:{name:"(() => void) | undefined"}},iconClassNames:{defaultValue:null,description:"",name:"iconClassNames",required:!1,type:{name:"string | undefined"}},id:{defaultValue:null,description:"",name:"id",required:!1,type:{name:"string | undefined"}},classNames:{defaultValue:null,description:"",name:"classNames",required:!1,type:{name:"string | undefined"}},dataCy:{defaultValue:null,description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/Buttons/Button.tsx#Button"]={docgenInfo:Button.__docgenInfo,name:"Button",path:"src/components/Buttons/Button.tsx#Button"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/Buttons/ButtonIcon.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{E:()=>ButtonIcon});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_danskernesdigitalebibliotek_dpl_design_system_build_icons_arrow_ui_icon_arrow_ui_small_right_svg__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/arrow-ui/icon-arrow-ui-small-right.svg"),_danskernesdigitalebibliotek_dpl_design_system_build_icons_arrow_ui_icon_arrow_ui_small_right_svg__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(_danskernesdigitalebibliotek_dpl_design_system_build_icons_arrow_ui_icon_arrow_ui_small_right_svg__WEBPACK_IMPORTED_MODULE_1__),_danskernesdigitalebibliotek_dpl_design_system_build_icons_buttons_icon_btn_external_link_svg__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/buttons/icon-btn-external-link.svg"),_danskernesdigitalebibliotek_dpl_design_system_build_icons_buttons_icon_btn_external_link_svg__WEBPACK_IMPORTED_MODULE_2___default=__webpack_require__.n(_danskernesdigitalebibliotek_dpl_design_system_build_icons_buttons_icon_btn_external_link_svg__WEBPACK_IMPORTED_MODULE_2__),clsx__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/clsx/dist/clsx.mjs");const ButtonIcon=({buttonType,collapsible,iconClassNames})=>{const iconClassName=`btn-icon ${(0,clsx__WEBPACK_IMPORTED_MODULE_3__.Z)({"btn-collapsible":collapsible},[iconClassNames])}`;return"default"===buttonType?react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"ml-16"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("img",{className:iconClassName,src:_danskernesdigitalebibliotek_dpl_design_system_build_icons_arrow_ui_icon_arrow_ui_small_right_svg__WEBPACK_IMPORTED_MODULE_1___default(),alt:""})):"external-link"===buttonType?react__WEBPACK_IMPORTED_MODULE_0__.createElement("img",{className:iconClassName,src:_danskernesdigitalebibliotek_dpl_design_system_build_icons_buttons_icon_btn_external_link_svg__WEBPACK_IMPORTED_MODULE_2___default(),alt:""}):null};try{ButtonIcon.displayName="ButtonIcon",ButtonIcon.__docgenInfo={description:"",displayName:"ButtonIcon",props:{buttonType:{defaultValue:null,description:"",name:"buttonType",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"search"'},{value:'"none"'},{value:'"default"'},{value:'"external-link"'}]}},collapsible:{defaultValue:null,description:"",name:"collapsible",required:!1,type:{name:"boolean | undefined"}},iconClassNames:{defaultValue:null,description:"",name:"iconClassNames",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/Buttons/ButtonIcon.tsx#ButtonIcon"]={docgenInfo:ButtonIcon.__docgenInfo,name:"ButtonIcon",path:"src/components/Buttons/ButtonIcon.tsx#ButtonIcon"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/Buttons/LinkButton.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var clsx__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/clsx/dist/clsx.mjs"),react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_atoms_links_Link__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/components/atoms/links/Link.tsx"),_ButtonIcon__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/components/Buttons/ButtonIcon.tsx");const LinkButton=({buttonType,children,classNames,dataCy="link-button",iconClassNames,isNewTab=!1,size="medium",trackClick,url,variant="filled",ariaLabelledBy,id})=>react__WEBPACK_IMPORTED_MODULE_0__.createElement(_atoms_links_Link__WEBPACK_IMPORTED_MODULE_1__.Z,{href:url,isNewTab,className:(0,clsx__WEBPACK_IMPORTED_MODULE_3__.Z)("btn-primary",`btn-${variant}`,`btn-${size}`,"arrow__hover--right-small","hide-linkstyle",classNames),trackClick,dataCy,ariaLabelledBy,id},children,react__WEBPACK_IMPORTED_MODULE_0__.createElement(_ButtonIcon__WEBPACK_IMPORTED_MODULE_2__.E,{buttonType,iconClassNames})),__WEBPACK_DEFAULT_EXPORT__=LinkButton;try{LinkButton.displayName="LinkButton",LinkButton.__docgenInfo={description:"",displayName:"LinkButton",props:{buttonType:{defaultValue:null,description:"",name:"buttonType",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"search"'},{value:'"none"'},{value:'"default"'},{value:'"external-link"'}]}},classNames:{defaultValue:null,description:"",name:"classNames",required:!1,type:{name:"string | undefined"}},dataCy:{defaultValue:{value:"link-button"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}},iconClassNames:{defaultValue:null,description:"",name:"iconClassNames",required:!1,type:{name:"string | undefined"}},isNewTab:{defaultValue:{value:"false"},description:"",name:"isNewTab",required:!1,type:{name:"boolean | undefined"}},size:{defaultValue:{value:"medium"},description:"",name:"size",required:!1,type:{name:"enum",value:[{value:'"xsmall"'},{value:'"small"'},{value:'"medium"'},{value:'"large"'},{value:'"xlarge"'}]}},trackClick:{defaultValue:null,description:"",name:"trackClick",required:!1,type:{name:"(() => Promise) | undefined"}},url:{defaultValue:null,description:"",name:"url",required:!0,type:{name:"URL"}},variant:{defaultValue:{value:"filled"},description:"",name:"variant",required:!1,type:{name:"enum",value:[{value:'"outline"'},{value:'"filled"'}]}},ariaLabelledBy:{defaultValue:null,description:"",name:"ariaLabelledBy",required:!1,type:{name:"string | undefined"}},id:{defaultValue:null,description:"",name:"id",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/Buttons/LinkButton.tsx#LinkButton"]={docgenInfo:LinkButton.__docgenInfo,name:"LinkButton",path:"src/components/Buttons/LinkButton.tsx#LinkButton"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/Disclosures/DisclosureControllable.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var clsx__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/clsx/dist/clsx.mjs"),react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js");const DisclosureControllable=({id,children,showContent=!1,cyData,className,summary})=>{const[isOpen,setIsOpen]=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(showContent),toggleOpen=(0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)((()=>{setIsOpen((prevIsOpen=>!prevIsOpen))}),[]),handleClick=(0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)((()=>{toggleOpen()}),[toggleOpen]),handleKeyDown=(0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)((e=>{"Enter"===e.key&&toggleOpen()}),[toggleOpen]),disclosureId=`disclosure-${id}`;return react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:(0,clsx__WEBPACK_IMPORTED_MODULE_1__.Z)("disclosure text-body-large",className)},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{"data-cy":cyData,onClick:handleClick,onKeyDown:handleKeyDown,role:"button",tabIndex:0,"aria-controls":disclosureId,"aria-expanded":isOpen},summary),isOpen&&react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{id:disclosureId},children))},__WEBPACK_DEFAULT_EXPORT__=DisclosureControllable;try{DisclosureControllable.displayName="DisclosureControllable",DisclosureControllable.__docgenInfo={description:"",displayName:"DisclosureControllable",props:{id:{defaultValue:null,description:"",name:"id",required:!0,type:{name:"string"}},showContent:{defaultValue:{value:"false"},description:"",name:"showContent",required:!1,type:{name:"boolean | undefined"}},onClick:{defaultValue:null,description:"",name:"onClick",required:!1,type:{name:"(() => void) | undefined"}},cyData:{defaultValue:null,description:"",name:"cyData",required:!1,type:{name:"string | undefined"}},className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string | undefined"}},summary:{defaultValue:null,description:"",name:"summary",required:!0,type:{name:"ReactNode"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/Disclosures/DisclosureControllable.tsx#DisclosureControllable"]={docgenInfo:DisclosureControllable.__docgenInfo,name:"DisclosureControllable",path:"src/components/Disclosures/DisclosureControllable.tsx#DisclosureControllable"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/Disclosures/DisclosureSummary.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>Disclosures_DisclosureSummary});var react=__webpack_require__("./node_modules/react/index.js"),ExpandMore=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/ExpandMore.svg"),ExpandMore_default=__webpack_require__.n(ExpandMore),clsx=__webpack_require__("./node_modules/clsx/dist/clsx.mjs");const Heading=({children,level,className})=>{const HeadingTag=level;return react.createElement(HeadingTag,{className},children)},Heading_Heading=Heading;try{Heading.displayName="Heading",Heading.__docgenInfo={description:"",displayName:"Heading",props:{level:{defaultValue:null,description:"",name:"level",required:!0,type:{name:"enum",value:[{value:'"h2"'},{value:'"h3"'},{value:'"h4"'},{value:'"h5"'}]}},className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/Heading/Heading.tsx#Heading"]={docgenInfo:Heading.__docgenInfo,name:"Heading",path:"src/components/Heading/Heading.tsx#Heading"})}catch(__react_docgen_typescript_loader_error){}const Pagefold=({text,state,dataCy="page-fold"})=>react.createElement("div",{"data-cy":dataCy,className:"pagefold-parent--xsmall availability-label--unselected text-label availability-label"},react.createElement("div",{className:`pagefold-triangle--xsmall pagefold-triangle--${state}`}),react.createElement("p",{className:"text-label-normal ml-24 mr-8"},text)),pagefold_Pagefold=Pagefold;try{Pagefold.displayName="Pagefold",Pagefold.__docgenInfo={description:"",displayName:"Pagefold",props:{text:{defaultValue:null,description:"",name:"text",required:!0,type:{name:"string"}},state:{defaultValue:null,description:"",name:"state",required:!0,type:{name:"enum",value:[{value:'"success"'},{value:'"alert"'}]}},dataCy:{defaultValue:{value:"page-fold"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/pagefold/Pagefold.tsx#Pagefold"]={docgenInfo:Pagefold.__docgenInfo,name:"Pagefold",path:"src/components/pagefold/Pagefold.tsx#Pagefold"})}catch(__react_docgen_typescript_loader_error){}var utils_text=__webpack_require__("./src/core/utils/text.tsx");const DisclosureSummary=({title,headingLevel="h3",mainIconPath,isAvailable,itemRef,className,dataCy="disclosure-summary"})=>{const t=(0,utils_text.X)();return react.createElement("summary",{ref:itemRef,className:(0,clsx.Z)("disclosure__headline text-body-large ",className),"data-cy":dataCy},mainIconPath&&react.createElement("div",{className:"disclosure__icon bg-identity-tint-120"},react.createElement("img",{className:"invert",src:mainIconPath,alt:""})),react.createElement(Heading_Heading,{level:headingLevel,className:"text-body-large disclosure__text"+(void 0!==isAvailable?"--shorter":"")},title),void 0!==isAvailable&&react.createElement(pagefold_Pagefold,{text:t(isAvailable?"availabilityAvailableText":"availabilityUnavailableText"),state:isAvailable?"success":"alert"}),react.createElement("img",{className:"disclosure__expand noselect",src:ExpandMore_default(),alt:""}))},Disclosures_DisclosureSummary=DisclosureSummary;try{DisclosureSummary.displayName="DisclosureSummary",DisclosureSummary.__docgenInfo={description:"",displayName:"DisclosureSummary",props:{title:{defaultValue:null,description:"",name:"title",required:!0,type:{name:"string"}},headingLevel:{defaultValue:{value:"h3"},description:"",name:"headingLevel",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"h2"'},{value:'"h3"'},{value:'"h4"'},{value:'"h5"'}]}},mainIconPath:{defaultValue:null,description:"",name:"mainIconPath",required:!1,type:{name:"string | undefined"}},isAvailable:{defaultValue:null,description:"",name:"isAvailable",required:!1,type:{name:"boolean | undefined"}},itemRef:{defaultValue:null,description:"",name:"itemRef",required:!1,type:{name:"MutableRefObject | undefined"}},className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string | undefined"}},dataCy:{defaultValue:{value:"disclosure-summary"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/Disclosures/DisclosureSummary.tsx#DisclosureSummary"]={docgenInfo:DisclosureSummary.__docgenInfo,name:"DisclosureSummary",path:"src/components/Disclosures/DisclosureSummary.tsx#DisclosureSummary"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/Disclosures/disclosure.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),clsx__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/clsx/dist/clsx.mjs"),_core_utils_helpers_lazy_load__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/core/utils/helpers/lazy-load.ts");const __WEBPACK_DEFAULT_EXPORT__=({children,open,dataCy="disclosure",className,summary})=>{const{itemRef,hasBeenVisible:showItem}=(0,_core_utils_helpers_lazy_load__WEBPACK_IMPORTED_MODULE_1__.L)(),summaryWithRef=react__WEBPACK_IMPORTED_MODULE_0__.cloneElement(summary,{itemRef});return react__WEBPACK_IMPORTED_MODULE_0__.createElement("details",{className:(0,clsx__WEBPACK_IMPORTED_MODULE_2__.Z)("disclosure text-body-large",className),open,"data-cy":dataCy},summaryWithRef,showItem&&children)};try{disclosure.displayName="disclosure",disclosure.__docgenInfo={description:"",displayName:"disclosure",props:{open:{defaultValue:null,description:"",name:"open",required:!1,type:{name:"boolean | undefined"}},dataCy:{defaultValue:{value:"disclosure"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}},className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string | undefined"}},summary:{defaultValue:null,description:"",name:"summary",required:!0,type:{name:"ReactElement>"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/Disclosures/disclosure.tsx#disclosure"]={docgenInfo:disclosure.__docgenInfo,name:"disclosure",path:"src/components/Disclosures/disclosure.tsx#disclosure"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/Dropdown/Dropdown.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>Dropdown_Dropdown});var clsx=__webpack_require__("./node_modules/clsx/dist/clsx.mjs"),react=__webpack_require__("./node_modules/react/index.js"),icon_triangle=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/basic/icon-triangle.svg"),icon_triangle_default=__webpack_require__.n(icon_triangle),ExpandMore=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/ExpandMore.svg"),ExpandMore_default=__webpack_require__.n(ExpandMore);const DropdownIcon=({arrowIcon})=>"triangles"===arrowIcon?react.createElement("span",null,react.createElement("img",{className:"dropdown__arrow",src:icon_triangle_default(),alt:""}),react.createElement("img",{className:"dropdown__arrow dropdown__arrow--bottom",src:icon_triangle_default(),alt:""})):"chevron"===arrowIcon?react.createElement("img",{className:"dropdown__arrow",src:ExpandMore_default(),alt:""}):null,Dropdown_DropdownIcon=DropdownIcon;try{DropdownIcon.displayName="DropdownIcon",DropdownIcon.__docgenInfo={description:"",displayName:"DropdownIcon",props:{arrowIcon:{defaultValue:null,description:"",name:"arrowIcon",required:!0,type:{name:"enum",value:[{value:'"triangles"'},{value:'"chevron"'}]}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/Dropdown/DropdownIcon.tsx#DropdownIcon"]={docgenInfo:DropdownIcon.__docgenInfo,name:"DropdownIcon",path:"src/components/Dropdown/DropdownIcon.tsx#DropdownIcon"})}catch(__react_docgen_typescript_loader_error){}const Dropdown=({arrowIcon,ariaLabel,options,classNames,innerClassNames,handleOnChange,placeholder,cyData,label,id,labelledBy,defaultValue})=>{const classes={root:(0,clsx.Z)("dropdown",classNames),select:(0,clsx.Z)("dropdown__select",null==innerClassNames?void 0:innerClassNames.select),option:(0,clsx.Z)("dropdown__option",null==innerClassNames?void 0:innerClassNames.option),arrowWrapper:(0,clsx.Z)("dropdown__arrows",null==innerClassNames?void 0:innerClassNames.arrowWrapper)},optionsList=placeholder?[placeholder,...options]:options;return react.createElement("div",{className:classes.root},label&&react.createElement("label",{htmlFor:id},label),react.createElement("div",{className:classes.root},react.createElement("select",{id,"data-cy":cyData,className:classes.select,"aria-labelledby":labelledBy,"aria-label":ariaLabel,onChange:e=>{handleOnChange&&e.target.value&&handleOnChange(e)}},optionsList.map((({label:optionsLabel,value,disabled})=>react.createElement("option",{key:optionsLabel,value,className:classes.option,disabled,selected:value===defaultValue},optionsLabel)))),react.createElement("div",{className:classes.arrowWrapper},react.createElement(Dropdown_DropdownIcon,{arrowIcon}))))},Dropdown_Dropdown=Dropdown;try{Dropdown.displayName="Dropdown",Dropdown.__docgenInfo={description:"",displayName:"Dropdown",props:{options:{defaultValue:null,description:"",name:"options",required:!0,type:{name:"Option[]"}},label:{defaultValue:null,description:"",name:"label",required:!1,type:{name:"string | undefined"}},id:{defaultValue:null,description:"",name:"id",required:!1,type:{name:"string | undefined"}},ariaLabel:{defaultValue:null,description:"",name:"ariaLabel",required:!0,type:{name:"string"}},labelledBy:{defaultValue:null,description:"",name:"labelledBy",required:!1,type:{name:"string | undefined"}},arrowIcon:{defaultValue:null,description:"",name:"arrowIcon",required:!0,type:{name:"enum",value:[{value:'"triangles"'},{value:'"chevron"'}]}},classNames:{defaultValue:null,description:"",name:"classNames",required:!1,type:{name:"string | undefined"}},innerClassNames:{defaultValue:null,description:"",name:"innerClassNames",required:!1,type:{name:"{ select?: string | undefined; option?: string | undefined; arrowWrapper?: string | undefined; } | undefined"}},handleOnChange:{defaultValue:null,description:"",name:"handleOnChange",required:!1,type:{name:"((e: ChangeEvent) => void) | undefined"}},placeholder:{defaultValue:null,description:"",name:"placeholder",required:!1,type:{name:"Option | undefined"}},cyData:{defaultValue:null,description:"",name:"cyData",required:!1,type:{name:"string | undefined"}},defaultValue:{defaultValue:null,description:"",name:"defaultValue",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/Dropdown/Dropdown.tsx#Dropdown"]={docgenInfo:Dropdown.__docgenInfo,name:"Dropdown",path:"src/components/Dropdown/Dropdown.tsx#Dropdown"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/GroupModal/GroupModalContent.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),react_use__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./node_modules/react-use/esm/useIntersection.js"),_checkbox_Checkbox__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/components/checkbox/Checkbox.tsx"),_core_utils_text__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/core/utils/text.tsx"),_core_utils_helpers_general__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/core/utils/helpers/general.ts");const GroupModalContent=({amountOfSelectableMaterials,selectableMaterials=[],selectedMaterials=[],selectMaterials,buttonComponent,children})=>{const t=(0,_core_utils_text__WEBPACK_IMPORTED_MODULE_2__.X)(),intersectionRef=(0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null),intersection=(0,react_use__WEBPACK_IMPORTED_MODULE_4__.Z)(intersectionRef,{threshold:0}),checkBoxComponent=void 0!==selectMaterials?react__WEBPACK_IMPORTED_MODULE_0__.createElement(_checkbox_Checkbox__WEBPACK_IMPORTED_MODULE_1__.Z,{selected:0!==amountOfSelectableMaterials&&selectedMaterials.length===amountOfSelectableMaterials,disabled:0===amountOfSelectableMaterials,id:"checkbox-select-all",onChecked:()=>{selectMaterials&&(selectedMaterials.length===amountOfSelectableMaterials?selectMaterials((0,_core_utils_helpers_general__WEBPACK_IMPORTED_MODULE_3__.JY)([])):selectMaterials(selectableMaterials))},label:t("groupModalCheckboxText")}):null;return react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment,null,react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"button-box",ref:intersectionRef},checkBoxComponent,buttonComponent),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"modal-loan__list"},children),!(null!=intersection&&intersection.isIntersecting)&&react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"button-box button-box--sticky-bottom"},checkBoxComponent,buttonComponent))},__WEBPACK_DEFAULT_EXPORT__=GroupModalContent;try{GroupModalContent.displayName="GroupModalContent",GroupModalContent.__docgenInfo={description:"",displayName:"GroupModalContent",props:{amountOfSelectableMaterials:{defaultValue:null,description:"",name:"amountOfSelectableMaterials",required:!0,type:{name:"number"}},selectableMaterials:{defaultValue:{value:"[]"},description:"",name:"selectableMaterials",required:!1,type:{name:"Nullable>[] | undefined"}},selectedMaterials:{defaultValue:{value:"[]"},description:"",name:"selectedMaterials",required:!1,type:{name:"Nullable>[] | undefined"}},buttonComponent:{defaultValue:null,description:"",name:"buttonComponent",required:!0,type:{name:"ReactNode"}},selectMaterials:{defaultValue:null,description:"",name:"selectMaterials",required:!1,type:{name:"((materialIds: Nullable>[]) => void) | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/GroupModal/GroupModalContent.tsx#GroupModalContent"]={docgenInfo:GroupModalContent.__docgenInfo,name:"GroupModalContent",path:"src/components/GroupModal/GroupModalContent.tsx#GroupModalContent"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/GroupModal/LoansGroupModal.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>GroupModal_LoansGroupModal});var react=__webpack_require__("./node_modules/react/index.js"),es=__webpack_require__("./node_modules/react-query/es/index.js"),modal=__webpack_require__("./src/core/utils/modal.tsx"),utils_text=__webpack_require__("./src/core/utils/text.tsx"),GroupModalContent=__webpack_require__("./src/components/GroupModal/GroupModalContent.tsx"),general=__webpack_require__("./src/core/utils/helpers/general.ts"),fbs=__webpack_require__("./src/core/fbs/fbs.ts"),selectable_material=__webpack_require__("./src/apps/loan-list/materials/selectable-material/selectable-material.tsx"),loan_type=__webpack_require__("./src/core/utils/types/loan-type.ts"),use_pager=__webpack_require__("./src/components/result-pager/use-pager.tsx"),helpers=__webpack_require__("./src/apps/loan-list/utils/helpers.ts");const StatusMessage=({className,loanType,renewalStatusList})=>{const t=(0,utils_text.X)();return react.createElement(react.Fragment,null,renewalStatusList&&renewalStatusList.map((text=>react.createElement("span",{className},(0,helpers.li)(text,t)))),"interLibraryLoan"===loanType&&react.createElement("span",{className},t("groupModalRenewLoanDeniedInterLibraryLoanText")))},selectable_material_StatusMessage=StatusMessage;try{StatusMessage.displayName="StatusMessage",StatusMessage.__docgenInfo={description:"",displayName:"StatusMessage",props:{className:{defaultValue:null,description:"",name:"className",required:!0,type:{name:"string"}},loanType:{defaultValue:null,description:"",name:"loanType",required:!0,type:{name:"string | null"}},renewalStatusList:{defaultValue:null,description:"",name:"renewalStatusList",required:!0,type:{name:"string[]"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/loan-list/materials/selectable-material/StatusMessage.tsx#StatusMessage"]={docgenInfo:StatusMessage.__docgenInfo,name:"StatusMessage",path:"src/apps/loan-list/materials/selectable-material/StatusMessage.tsx#StatusMessage"})}catch(__react_docgen_typescript_loader_error){}var status_badge=__webpack_require__("./src/apps/loan-list/materials/utils/status-badge.tsx"),date=__webpack_require__("./src/core/utils/helpers/date.ts");const GroupModalLoansList=({materials,selectedMaterials,openDetailsModal,selectMaterials,pageSize})=>{const t=(0,utils_text.X)(),[displayedMaterials,setDisplayedMaterials]=(0,react.useState)([]),{itemsShown,PagerComponent,firstInNewPage}=(0,use_pager.Z)({hitcount:materials.length,pageSize});(0,react.useEffect)((()=>{setDisplayedMaterials([...materials].splice(0,itemsShown))}),[itemsShown,materials]);const onMaterialChecked=item=>{const selectedMaterialsCopy=[...selectedMaterials],indexOfItemToRemove=selectedMaterials.indexOf(item);indexOfItemToRemove>-1?selectedMaterialsCopy.splice(indexOfItemToRemove,1):selectedMaterialsCopy.push(item),selectMaterials(selectedMaterialsCopy)};return react.createElement(react.Fragment,null,react.createElement("ul",{className:"modal-loan__list-materials"},displayedMaterials.map(((loanType,i)=>react.createElement(selectable_material.Z,{focused:firstInNewPage===i,statusBadgeComponent:react.createElement(status_badge.Z,{badgeDate:loanType.dueDate,neutralText:loanType.dueDate?t("groupModalDueDateMaterialText",{placeholders:{"@date":(0,date.p6)(loanType.dueDate)}}):""}),statusMessageComponentDesktop:react.createElement(selectable_material_StatusMessage,{className:"list-materials__status__note-desktop",loanType:loanType.loanType,renewalStatusList:loanType.renewalStatusList}),statusMessageComponentMobile:react.createElement(selectable_material_StatusMessage,{className:"list-materials__status__note-mobile",loanType:loanType.loanType,renewalStatusList:loanType.renewalStatusList}),item:loanType,openDetailsModal:item=>{(0,loan_type.P)(item)&&openDetailsModal(item)},key:loanType.faust,selected:selectedMaterials.includes(loanType),onMaterialChecked,disabled:!loanType.isRenewable})))),react.createElement(PagerComponent,{classNames:"result-pager--margin-bottom"}))},GroupModal_GroupModalLoansList=GroupModalLoansList;try{GroupModalLoansList.displayName="GroupModalLoansList",GroupModalLoansList.__docgenInfo={description:"",displayName:"GroupModalLoansList",props:{materials:{defaultValue:null,description:"",name:"materials",required:!0,type:{name:"LoanType[]"}},pageSize:{defaultValue:null,description:"",name:"pageSize",required:!0,type:{name:"number"}},selectedMaterials:{defaultValue:null,description:"",name:"selectedMaterials",required:!0,type:{name:"Nullable>[]"}},selectMaterials:{defaultValue:null,description:"",name:"selectMaterials",required:!0,type:{name:"(materialIds: Nullable>[]) => void"}},openDetailsModal:{defaultValue:null,description:"",name:"openDetailsModal",required:!0,type:{name:"(loan: LoanType) => void"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/GroupModal/GroupModalLoansList.tsx#GroupModalLoansList"]={docgenInfo:GroupModalLoansList.__docgenInfo,name:"GroupModalLoansList",path:"src/components/GroupModal/GroupModalLoansList.tsx#GroupModalLoansList"})}catch(__react_docgen_typescript_loader_error){}var Button=__webpack_require__("./src/components/Buttons/Button.tsx"),renewal=__webpack_require__("./src/core/utils/helpers/renewal.ts");const LoansGroupModalButton=({materialsToRenew,renewableMaterials,renewSelected,renewingStatus})=>{const t=(0,utils_text.X)(),materialsCount=materialsToRenew.length,label=(0,renewal.CO)({isRenewable:renewableMaterials>0,renewingStatus,t,defaultText:t("groupModalButtonText",{count:materialsCount,placeholders:{"@count":materialsCount}})});return react.createElement(Button.z,{dataCy:"loans-group-modal-button",label,buttonType:"none",id:"renew-several",variant:"filled",disabled:0===renewableMaterials||"pending"===renewingStatus,collapsible:!1,onClick:renewSelected,size:"small"})},GroupModal_LoansGroupModalButton=LoansGroupModalButton;try{LoansGroupModalButton.displayName="LoansGroupModalButton",LoansGroupModalButton.__docgenInfo={description:"",displayName:"LoansGroupModalButton",props:{materialsToRenew:{defaultValue:null,description:"",name:"materialsToRenew",required:!0,type:{name:"Nullable>[]"}},renewableMaterials:{defaultValue:null,description:"",name:"renewableMaterials",required:!0,type:{name:"number"}},renewSelected:{defaultValue:null,description:"",name:"renewSelected",required:!0,type:{name:"() => void"}},renewingStatus:{defaultValue:null,description:"",name:"renewingStatus",required:!0,type:{name:"enum",value:[{value:'"success"'},{value:'"error"'},{value:'"idle"'},{value:'"pending"'}]}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/GroupModal/LoansGroupModalButton.tsx#LoansGroupModalButton"]={docgenInfo:LoansGroupModalButton.__docgenInfo,name:"LoansGroupModalButton",path:"src/components/GroupModal/LoansGroupModalButton.tsx#LoansGroupModalButton"})}catch(__react_docgen_typescript_loader_error){}var RenewalModalMessage=__webpack_require__("./src/components/renewal/RenewalModalMessage.tsx"),useRequestsWithStatus=__webpack_require__("./src/core/utils/useRequestsWithStatus.tsx"),modal_helpers=__webpack_require__("./src/core/utils/helpers/modal-helpers.ts");const LoansGroupModal=({dueDate,loansModal,openDetailsModal,openAcceptModal,pageSize,accepted,resetAccepted,children})=>{const t=(0,utils_text.X)(),{mutate}=(0,fbs.Gb)(),[acceptedButtonPressed,setAcceptedButtonPressed]=(0,react.useState)(accepted),{dueDateModal,allLoansId}=(0,modal_helpers.GM)(),queryClient=(0,es.useQueryClient)(),modalIdUsed=dueDate?`${dueDateModal}-${dueDate}`:allLoansId,renewableMaterials=(0,general.R3)(loansModal),[materialsToRenew,setMaterialsToRenew]=(0,react.useState)([]),[renewingResponse,setRenewingResponse]=(0,react.useState)(null),{handler:renew,requestStatus:renewingStatus,setRequestStatus:setRenewingStatus}=(0,useRequestsWithStatus.cQ)({request:{params:{data:materialsToRenew.map((id=>Number(id)))},operation:mutate},onError:()=>{setRenewingResponse(null)},onSuccess:result=>{queryClient.invalidateQueries((0,fbs._0)()),result&&setRenewingResponse(result)}}),renewSelected=(0,react.useCallback)((()=>{const selectedLoansLoanDate=loansModal.filter((loan=>materialsToRenew.includes(loan))).map((({loanDate:localLoanDate})=>localLoanDate)).filter((item=>null!=item)),acceptModal=(0,general.GJ)(loansModal)&&(0,general.f4)(selectedLoansLoanDate);acceptModal?openAcceptModal():acceptModal||renew()}),[loansModal,materialsToRenew,openAcceptModal,renew]);(0,react.useEffect)((()=>{setMaterialsToRenew((0,general.JY)(loansModal))}),[loansModal]),(0,react.useEffect)((()=>{accepted&&(setAcceptedButtonPressed(accepted),resetAccepted())}),[accepted,resetAccepted]);const selectMaterials=materialIds=>{setMaterialsToRenew(materialIds)};(0,react.useEffect)((()=>{acceptedButtonPressed&&(renew(),setAcceptedButtonPressed(!1))}),[acceptedButtonPressed,renew]);const showSuccessMessage="success"===renewingStatus,countRenewed=(0,renewal.TJ)(renewingResponse);return react.createElement(modal.Z,{modalId:modalIdUsed,closeModalAriaLabelText:t("groupModalLoansCloseModalAriaLabelText"),screenReaderModalDescriptionText:t("groupModalLoansAriaDescriptionText"),eventCallbacks:{close:()=>setRenewingStatus("idle")},classNames:showSuccessMessage?"modal-cta modal-padding":""},["idle","pending"].includes(renewingStatus)&&react.createElement("div",{className:"modal-loan"},children,react.createElement(GroupModalContent.Z,{selectMaterials,selectedMaterials:materialsToRenew,amountOfSelectableMaterials:renewableMaterials,selectableMaterials:(0,general.JY)(loansModal),buttonComponent:react.createElement(GroupModal_LoansGroupModalButton,{materialsToRenew,renewableMaterials,renewSelected,renewingStatus})},react.createElement(GroupModal_GroupModalLoansList,{materials:loansModal,selectedMaterials:materialsToRenew,openDetailsModal,selectMaterials,pageSize}))),!["idle","pending"].includes(renewingStatus)&&react.createElement(RenewalModalMessage.Z,{messageType:"success"===renewingStatus?"success":"error",renewingResponse,modalId:modalIdUsed,setRenewingStatus,texts:{successTitleText:t("renewGroupModalLoansSuccessTitleText"),successStatusText:t("renewGroupModalLoansSuccessStatusText",{count:countRenewed}),noRenewalsPossibleErrorTitleText:t("renewGroupModalLoansNoRenewalsPossibleErrorTitleText"),noRenewalsPossibleErrorStatusText:t("renewGroupModalLoansNoRenewalsPossibleErrorStatusText"),errorTitleText:t("renewGroupModalLoansErrorTitleText"),errorStatusText:t("renewGroupModalLoansErrorStatusText"),buttonText:t("renewGroupModalLoansButtonText")}}))},GroupModal_LoansGroupModal=LoansGroupModal;try{LoansGroupModal.displayName="LoansGroupModal",LoansGroupModal.__docgenInfo={description:"",displayName:"LoansGroupModal",props:{dueDate:{defaultValue:null,description:"",name:"dueDate",required:!1,type:{name:"string | null | undefined"}},loansModal:{defaultValue:null,description:"",name:"loansModal",required:!0,type:{name:"LoanType[]"}},pageSize:{defaultValue:null,description:"",name:"pageSize",required:!0,type:{name:"number"}},accepted:{defaultValue:null,description:"",name:"accepted",required:!0,type:{name:"boolean"}},openDetailsModal:{defaultValue:null,description:"",name:"openDetailsModal",required:!0,type:{name:"(loan: LoanType) => void"}},openAcceptModal:{defaultValue:null,description:"",name:"openAcceptModal",required:!0,type:{name:"() => void"}},resetAccepted:{defaultValue:null,description:"",name:"resetAccepted",required:!0,type:{name:"() => void"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/GroupModal/LoansGroupModal.tsx#LoansGroupModal"]={docgenInfo:LoansGroupModal.__docgenInfo,name:"LoansGroupModal",path:"src/components/GroupModal/LoansGroupModal.tsx#LoansGroupModal"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/GroupModal/SimpleModalHeader.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js");const SimpleModalHeader=({header})=>react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"modal-loan__header"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",null,react__WEBPACK_IMPORTED_MODULE_0__.createElement("h2",{className:"modal-loan__title text-header-h2"},header))),__WEBPACK_DEFAULT_EXPORT__=SimpleModalHeader;try{SimpleModalHeader.displayName="SimpleModalHeader",SimpleModalHeader.__docgenInfo={description:"",displayName:"SimpleModalHeader",props:{header:{defaultValue:null,description:"",name:"header",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/GroupModal/SimpleModalHeader.tsx#SimpleModalHeader"]={docgenInfo:SimpleModalHeader.__docgenInfo,name:"SimpleModalHeader",path:"src/components/GroupModal/SimpleModalHeader.tsx#SimpleModalHeader"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/GroupModal/StatusCircleModalHeader.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_apps_loan_list_materials_utils_warning_bar__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/apps/loan-list/materials/utils/warning-bar.tsx"),_core_utils_helpers_general__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/core/utils/helpers/general.ts"),_core_utils_url__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/core/utils/url.tsx"),_core_utils_text__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/core/utils/text.tsx");const StatusCircleModalHeader=({dueDate,header,subHeader,statusCircleComponent})=>{const t=(0,_core_utils_text__WEBPACK_IMPORTED_MODULE_4__.X)(),feesPageUrl=(0,_core_utils_url__WEBPACK_IMPORTED_MODULE_3__.J_)()("feesPageUrl");return react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment,null,react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"modal-loan__header"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"mr-32"},statusCircleComponent),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",null,react__WEBPACK_IMPORTED_MODULE_0__.createElement("h2",{className:"modal-loan__title text-header-h2"},header),subHeader&&react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"text-body-large"},subHeader))),dueDate&&(0,_core_utils_helpers_general__WEBPACK_IMPORTED_MODULE_2__.cf)(dueDate)&&react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"modal-details__warning"},react__WEBPACK_IMPORTED_MODULE_0__.createElement(_apps_loan_list_materials_utils_warning_bar__WEBPACK_IMPORTED_MODULE_1__.Z,{leftLink:feesPageUrl,linkText:t("groupModalDueDateLinkToPageWithFeesText"),overdueText:t("groupModalDueDateWarningLoanOverdueText")})))},__WEBPACK_DEFAULT_EXPORT__=StatusCircleModalHeader;try{StatusCircleModalHeader.displayName="StatusCircleModalHeader",StatusCircleModalHeader.__docgenInfo={description:"",displayName:"StatusCircleModalHeader",props:{dueDate:{defaultValue:null,description:"",name:"dueDate",required:!1,type:{name:"string | null | undefined"}},header:{defaultValue:null,description:"",name:"header",required:!0,type:{name:"string"}},subHeader:{defaultValue:null,description:"",name:"subHeader",required:!1,type:{name:"string | undefined"}},statusCircleComponent:{defaultValue:null,description:"",name:"statusCircleComponent",required:!0,type:{name:"ReactNode"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/GroupModal/StatusCircleModalHeader.tsx#StatusCircleModalHeader"]={docgenInfo:StatusCircleModalHeader.__docgenInfo,name:"StatusCircleModalHeader",path:"src/components/GroupModal/StatusCircleModalHeader.tsx#StatusCircleModalHeader"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/accept-fees-modal/AcceptFeesModal.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_core_utils_modal__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/core/utils/modal.tsx"),_core_utils_text__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/core/utils/text.tsx"),_Buttons_Button__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/components/Buttons/Button.tsx"),_core_utils_helpers_modal_helpers__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/core/utils/helpers/modal-helpers.ts");const __WEBPACK_DEFAULT_EXPORT__=({accept})=>{const{acceptModal}=(0,_core_utils_helpers_modal_helpers__WEBPACK_IMPORTED_MODULE_4__.GM)(),t=(0,_core_utils_text__WEBPACK_IMPORTED_MODULE_2__.X)(),{close}=(0,_core_utils_modal__WEBPACK_IMPORTED_MODULE_1__.f)();return react__WEBPACK_IMPORTED_MODULE_0__.createElement(_core_utils_modal__WEBPACK_IMPORTED_MODULE_1__.Z,{modalId:acceptModal,closeModalAriaLabelText:t("acceptModalAriaLabelText"),screenReaderModalDescriptionText:t("acceptModalAriaDescriptionText")},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"modal-cta__container"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("h2",{className:"text-header-h2"},t("acceptModalHeaderText")),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"mt-48 color-secondary-gray"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("p",{className:"text-body-medium-regular"},t("acceptModalBodyText")),react__WEBPACK_IMPORTED_MODULE_0__.createElement("p",{className:"text-links mt-24"},t("acceptModalAreYouSureText"))),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"modal-cta__buttons mt-48"},react__WEBPACK_IMPORTED_MODULE_0__.createElement(_Buttons_Button__WEBPACK_IMPORTED_MODULE_3__.z,{label:t("acceptModalCancelButtonText"),buttonType:"none",disabled:!1,collapsible:!1,size:"large",variant:"filled",onClick:()=>close(acceptModal)}),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"modal-cta__link"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("button",{type:"button",onClick:()=>(close(acceptModal),void accept()),className:"link-tag color-secondary-gray ml-8"},t("acceptModalAcceptButtonText"))))))};try{AcceptFeesModal.displayName="AcceptFeesModal",AcceptFeesModal.__docgenInfo={description:"",displayName:"AcceptFeesModal",props:{accept:{defaultValue:null,description:"",name:"accept",required:!0,type:{name:"() => void"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/accept-fees-modal/AcceptFeesModal.tsx#AcceptFeesModal"]={docgenInfo:AcceptFeesModal.__docgenInfo,name:"AcceptFeesModal",path:"src/components/accept-fees-modal/AcceptFeesModal.tsx#AcceptFeesModal"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/alert/alert.dev.jsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Info:()=>Info,Success:()=>Success,Warning:()=>Warning,default:()=>alert_dev});var react=__webpack_require__("./node_modules/react/index.js"),prop_types=__webpack_require__("./node_modules/prop-types/index.js"),prop_types_default=__webpack_require__.n(prop_types),reach_alert_esm=__webpack_require__("./node_modules/@reach/alert/dist/reach-alert.esm.js");function Alert({className,message,type,variant}){return react.createElement(reach_alert_esm.Z,{className:`dpl-alert dpl-alert--${variant} ${className}`,type},message)}Alert.propTypes={className:prop_types_default().string,message:prop_types_default().string,type:prop_types_default().oneOf(["assertive","polite"]),variant:prop_types_default().oneOf(["info","success","warning","blank"])},Alert.defaultProps={className:"",message:"Hov, der opstod en fejl!",type:"polite",variant:"info"};const alert_alert=Alert,alert_dev={title:"Components/Alert"},Template=args=>react.createElement(alert_alert,args),Info=Template.bind({}),Warning=Template.bind({});Warning.args={variant:"warning",message:"Noget gik galt"};const Success=Template.bind({});Success.args={variant:"success",message:"Det lykkedes"}},"./src/components/atoms/icons/arrow/arrow.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js");const __WEBPACK_DEFAULT_EXPORT__=()=>react__WEBPACK_IMPORTED_MODULE_0__.createElement("svg",{width:"61",height:"9",viewBox:"0 0 61 9",fill:"none",xmlns:"http://www.w3.org/2000/svg"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("path",{className:"arrow__body",d:"M60 4.5H0",stroke:"black"}),react__WEBPACK_IMPORTED_MODULE_0__.createElement("path",{className:"arrow__head",d:"M60.3537 4.85355C60.5489 4.65829 60.5489 4.34171 60.3537 4.14645L57.1717 0.96447C56.9764 0.769208 56.6598 0.769208 56.4646 0.96447C56.2693 1.15973 56.2693 1.47631 56.4646 1.67157L59.293 4.5L56.4646 7.32843C56.2693 7.52369 56.2693 7.84027 56.4646 8.03553C56.6598 8.2308 56.9764 8.2308 57.1717 8.03553L60.3537 4.85355ZM60.0001 4H57.0001V5H60.0001V4Z",fill:"black"}))},"./src/components/atoms/input/TextInput.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js");const TextInput=({id,label,description,validation,type,onChange,value,className,pattern,inputmode,required,title,placeholder})=>react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:`${className||"dpl-input"}`},react__WEBPACK_IMPORTED_MODULE_0__.createElement("label",{htmlFor:id},required?`${label}*`:label),react__WEBPACK_IMPORTED_MODULE_0__.createElement("input",{required,"aria-describedby":description?`description-${id}`:"",id,"data-cy":id,type,pattern,inputMode:inputmode,onChange:e=>{onChange(e.target.value)},value,"aria-labelledby":validation?`validation-${id}`:"",title,placeholder}),description&&react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"dpl-input__description",id:`description-${id}`},description),validation&&react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{id:`validation-${id}`,className:"dpl-input__validation",role:"alert"},validation)),__WEBPACK_DEFAULT_EXPORT__=TextInput;try{TextInput.displayName="TextInput",TextInput.__docgenInfo={description:"",displayName:"TextInput",props:{label:{defaultValue:null,description:"",name:"label",required:!0,type:{name:"string"}},type:{defaultValue:null,description:"",name:"type",required:!0,type:{name:"enum",value:[{value:'"number"'},{value:'"text"'},{value:'"email"'},{value:'"password"'},{value:'"tel"'}]}},id:{defaultValue:null,description:"",name:"id",required:!0,type:{name:"string"}},required:{defaultValue:null,description:"",name:"required",required:!1,type:{name:"boolean | undefined"}},description:{defaultValue:null,description:"",name:"description",required:!1,type:{name:"string | undefined"}},validation:{defaultValue:null,description:"",name:"validation",required:!1,type:{name:"string | undefined"}},onChange:{defaultValue:null,description:"",name:"onChange",required:!0,type:{name:"(value: string) => void"}},value:{defaultValue:null,description:"",name:"value",required:!1,type:{name:"string | number | undefined"}},className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string | undefined"}},pattern:{defaultValue:null,description:"",name:"pattern",required:!1,type:{name:"string | undefined"}},inputmode:{defaultValue:null,description:"",name:"inputmode",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"numeric"'}]}},title:{defaultValue:null,description:"",name:"title",required:!1,type:{name:"string | undefined"}},placeholder:{defaultValue:null,description:"",name:"placeholder",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/atoms/input/TextInput.tsx#TextInput"]={docgenInfo:TextInput.__docgenInfo,name:"TextInput",path:"src/components/atoms/input/TextInput.tsx#TextInput"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/atoms/links/Link.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>links_Link});var react=__webpack_require__("./node_modules/react/index.js"),helpers_url=__webpack_require__("./src/core/utils/helpers/url.ts");const handleTracking=({e,trackClick,isNewTab,url})=>{e.preventDefault(),trackClick().then((()=>{isNewTab&&window.open(url.href,"_blank"),(0,helpers_url.gB)(url)}))},getLinkHandler=({type,trackClick,isNewTab,url,stopPropagation})=>e=>{if(stopPropagation&&e.stopPropagation(),!trackClick)return;const{key}=e;"keyup"!==type||"keyup"!==e.type||"Enter"!==key?"click"===type&&"click"===e.type&&handleTracking({e,isNewTab,trackClick,url}):handleTracking({e,isNewTab,trackClick,url})},Link=({href,children,isNewTab=!1,className,id,trackClick,dataCy,ariaLabelledBy,stopPropagation=!1})=>{const handleClick=getLinkHandler({type:"click",isNewTab,stopPropagation,url:href,trackClick}),handleKeyUp=getLinkHandler({type:"keyup",isNewTab,stopPropagation,url:href,trackClick});return react.createElement("a",{id,"data-cy":dataCy||id,href:href.toString(),target:isNewTab?"_blank":void 0,rel:"noreferrer",className,onClick:handleClick,onKeyUp:handleKeyUp,"aria-labelledby":ariaLabelledBy},children)},links_Link=Link;try{Link.displayName="Link",Link.__docgenInfo={description:"",displayName:"Link",props:{href:{defaultValue:null,description:"",name:"href",required:!0,type:{name:"URL"}},isNewTab:{defaultValue:{value:"false"},description:"",name:"isNewTab",required:!1,type:{name:"boolean | undefined"}},className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string | undefined"}},id:{defaultValue:null,description:"",name:"id",required:!1,type:{name:"string | undefined"}},trackClick:{defaultValue:null,description:"",name:"trackClick",required:!1,type:{name:"(() => Promise) | undefined"}},dataCy:{defaultValue:null,description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}},ariaLabelledBy:{defaultValue:null,description:"",name:"ariaLabelledBy",required:!1,type:{name:"string | undefined"}},stopPropagation:{defaultValue:{value:"false"},description:"",name:"stopPropagation",required:!1,type:{name:"boolean | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/atoms/links/Link.tsx#Link"]={docgenInfo:Link.__docgenInfo,name:"Link",path:"src/components/atoms/links/Link.tsx#Link"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/atoms/links/LinkNoStyle.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_Link__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/components/atoms/links/Link.tsx");const LinkNoStyle=({url,children,isNewTab=!1,className,trackClick,dataCy="link-no-style",ariaLabelledBy})=>react__WEBPACK_IMPORTED_MODULE_0__.createElement(_Link__WEBPACK_IMPORTED_MODULE_1__.Z,{href:url,isNewTab,className:`hide-linkstyle ${className||""}`,trackClick,dataCy,ariaLabelledBy},children),__WEBPACK_DEFAULT_EXPORT__=LinkNoStyle;try{LinkNoStyle.displayName="LinkNoStyle",LinkNoStyle.__docgenInfo={description:"",displayName:"LinkNoStyle",props:{url:{defaultValue:null,description:"",name:"url",required:!0,type:{name:"URL"}},isNewTab:{defaultValue:{value:"false"},description:"",name:"isNewTab",required:!1,type:{name:"boolean | undefined"}},className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string | undefined"}},trackClick:{defaultValue:null,description:"",name:"trackClick",required:!1,type:{name:"(() => Promise) | undefined"}},dataCy:{defaultValue:{value:"link-no-style"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}},ariaLabelledBy:{defaultValue:null,description:"",name:"ariaLabelledBy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/atoms/links/LinkNoStyle.tsx#LinkNoStyle"]={docgenInfo:LinkNoStyle.__docgenInfo,name:"LinkNoStyle",path:"src/components/atoms/links/LinkNoStyle.tsx#LinkNoStyle"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/author-year/authorYear.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js");const __WEBPACK_DEFAULT_EXPORT__=({author,year})=>react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment,null,author&&author,year&&react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment,null," (",year,")"));try{authorYear.displayName="authorYear",authorYear.__docgenInfo={description:"",displayName:"authorYear",props:{author:{defaultValue:null,description:"",name:"author",required:!0,type:{name:"string | null"}},year:{defaultValue:null,description:"",name:"year",required:!0,type:{name:"string | null"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/author-year/authorYear.tsx#authorYear"]={docgenInfo:authorYear.__docgenInfo,name:"authorYear",path:"src/components/author-year/authorYear.tsx#authorYear"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/availability-label/availability-label-inside.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var clsx__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/clsx/dist/clsx.mjs"),react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_danskernesdigitalebibliotek_dpl_design_system_build_icons_collection_Check_svg__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/Check.svg"),_danskernesdigitalebibliotek_dpl_design_system_build_icons_collection_Check_svg__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(_danskernesdigitalebibliotek_dpl_design_system_build_icons_collection_Check_svg__WEBPACK_IMPORTED_MODULE_1__),_skeletons_TextLineSkeleton__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/components/skeletons/TextLineSkeleton.tsx");const __WEBPACK_DEFAULT_EXPORT__=({selected,isLoading,isAvailable,manifestText,availabilityText,quantity})=>{const availableTriangleCss=isAvailable?"success":"alert",classes={triangle:(0,clsx__WEBPACK_IMPORTED_MODULE_3__.Z)({"pagefold-triangle--none":selected},{[`pagefold-triangle--xsmall pagefold-triangle--${availableTriangleCss}`]:!selected}),check:(0,clsx__WEBPACK_IMPORTED_MODULE_3__.Z)("availability-label__check",selected&&"selected")};return react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment,null,react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:classes.triangle}),react__WEBPACK_IMPORTED_MODULE_0__.createElement("img",{className:classes.check,src:_danskernesdigitalebibliotek_dpl_design_system_build_icons_collection_Check_svg__WEBPACK_IMPORTED_MODULE_1___default(),alt:""}),manifestText&&react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment,null,react__WEBPACK_IMPORTED_MODULE_0__.createElement("p",{className:"availability-label__text text-label-semibold ml-24","data-cy":"availability-label-type"},manifestText),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"availability-label__divider ml-4"})),react__WEBPACK_IMPORTED_MODULE_0__.createElement("p",{className:`availability-label__text text-label-normal ${manifestText?"ml-4":"ml-24"} mr-8`,"data-cy":"availability-label-status"},isLoading?react__WEBPACK_IMPORTED_MODULE_0__.createElement(_skeletons_TextLineSkeleton__WEBPACK_IMPORTED_MODULE_2__.Z,{width:40}):availabilityText),quantity&&react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment,null,react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"availability-label--divider ml-4"}),react__WEBPACK_IMPORTED_MODULE_0__.createElement("p",{className:"text-label-normal mx-8"},quantity," stk")))};try{availabilitylabelinside.displayName="availabilitylabelinside",availabilitylabelinside.__docgenInfo={description:"",displayName:"availabilitylabelinside",props:{selected:{defaultValue:null,description:"",name:"selected",required:!1,type:{name:"boolean | undefined"}},isLoading:{defaultValue:null,description:"",name:"isLoading",required:!0,type:{name:"boolean"}},isAvailable:{defaultValue:null,description:"",name:"isAvailable",required:!1,type:{name:"boolean | undefined"}},manifestText:{defaultValue:null,description:"",name:"manifestText",required:!0,type:{name:"string"}},availabilityText:{defaultValue:null,description:"",name:"availabilityText",required:!1,type:{name:"string | undefined"}},quantity:{defaultValue:null,description:"",name:"quantity",required:!1,type:{name:"number | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/availability-label/availability-label-inside.tsx#availabilitylabelinside"]={docgenInfo:availabilitylabelinside.__docgenInfo,name:"availabilitylabelinside",path:"src/components/availability-label/availability-label-inside.tsx#availabilitylabelinside"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/availability-label/availability-label.dev.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Available:()=>Available,EBogPrinsenHarry:()=>EBogPrinsenHarry,MoreThanOneID:()=>MoreThanOneID,Selected:()=>Selected,Unavailable:()=>Unavailable,default:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_core_dbc_gateway_generated_graphql__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/core/dbc-gateway/generated/graphql.tsx"),_core_storybook_serviceUrlArgs__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/core/storybook/serviceUrlArgs.ts"),_core_utils_config__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/core/utils/config.tsx"),_core_utils_helpers_url__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./src/core/utils/helpers/url.ts"),_core_utils_url__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/core/utils/url.tsx"),_availability_label__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./src/components/availability-label/availability-label.tsx");const __WEBPACK_DEFAULT_EXPORT__={title:"Components/Availability Label",component:_availability_label__WEBPACK_IMPORTED_MODULE_5__.K,argTypes:{..._core_storybook_serviceUrlArgs__WEBPACK_IMPORTED_MODULE_2__.Z,faustIds:{name:"Faust Ids",control:{type:"array"}},manifestText:{name:"Manifestation text",control:{type:"text"}},url:{name:"Link",control:{type:"text"}},selected:{name:"selected",control:{type:"boolean"}},blacklistedAvailabilityBranchesConfig:{name:"Blacklisted Availability branches",defaultValue:"FBS-751032,FBS-751031,FBS-751009,FBS-751027,FBS-751024",control:{type:"text"}},cursorPointer:{name:"Cursor pointer",control:{type:"boolean"}},dataCy:{name:"Cypress data attribute",control:{type:"text"}},isbns:{name:"ISBN",control:{type:"text"}},accessTypes:{name:"Access types",options:[...Object.values(_core_dbc_gateway_generated_graphql__WEBPACK_IMPORTED_MODULE_1__.U5)],control:{type:"check"}}},args:{manifestText:"Bog",availabilityText:"Hjemme",url:new URL("/",(0,_core_utils_helpers_url__WEBPACK_IMPORTED_MODULE_6__.vW)()),selected:!1}},Template=args=>{const ConfiguredAvailabilityLabel=(0,_core_utils_url__WEBPACK_IMPORTED_MODULE_4__.XL)((0,_core_utils_config__WEBPACK_IMPORTED_MODULE_3__.Rh)(_availability_label__WEBPACK_IMPORTED_MODULE_5__.K));return react__WEBPACK_IMPORTED_MODULE_0__.createElement(ConfiguredAvailabilityLabel,args)},Available=Template.bind({});Available.args={faustIds:["61435867"]};const MoreThanOneID=Template.bind({});MoreThanOneID.args={faustIds:["62523611","62150041","61435867"]};const Selected=Template.bind({});Selected.args={faustIds:["62523611"],manifestText:"lydbog (cd-mp3)",selected:!0};const Unavailable=Template.bind({});Unavailable.args={faustIds:["62523611"],manifestText:"ebog"};const EBogPrinsenHarry=Template.bind({});EBogPrinsenHarry.args={isbns:["9788763844123"],manifestText:"ebog",accessTypes:[_core_dbc_gateway_generated_graphql__WEBPACK_IMPORTED_MODULE_1__.U5.Online]}},"./src/components/availability-label/availability-label.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{K:()=>AvailabilityLabel});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),react_use__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./node_modules/react-use/esm/useDeepCompareEffect.js"),_core_utils_text__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/core/utils/text.tsx"),_atoms_links_LinkNoStyle__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/components/atoms/links/LinkNoStyle.tsx"),_core_statistics_useStatistics__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/core/statistics/useStatistics.ts"),_core_statistics_statistics__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/core/statistics/statistics.ts"),_helper__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./src/components/availability-label/helper.ts"),_availability_label_inside__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./src/components/availability-label/availability-label-inside.tsx");const AvailabilityLabel=({manifestText,accessTypes,access,selected=!1,url,faustIds,handleSelectManifestation,cursorPointer=!1,dataCy="availability-label",isbns})=>{const{track}=(0,_core_statistics_useStatistics__WEBPACK_IMPORTED_MODULE_3__.T)(),t=(0,_core_utils_text__WEBPACK_IMPORTED_MODULE_1__.X)(),{isLoading,isAvailable}=(0,_helper__WEBPACK_IMPORTED_MODULE_5__.ru)({accessTypes,access,faustIds,isbn:isbns?isbns[0]:null}),availabilityText=t(isAvailable?"availabilityAvailableText":"availabilityUnavailableText");(0,react_use__WEBPACK_IMPORTED_MODULE_7__.Z)((()=>{selected&&track("click",{id:_core_statistics_statistics__WEBPACK_IMPORTED_MODULE_4__.h.materialStatus.id,name:_core_statistics_statistics__WEBPACK_IMPORTED_MODULE_4__.h.materialStatus.name,trackedData:availabilityText})}),[faustIds,selected]);const availabilityLabel=react__WEBPACK_IMPORTED_MODULE_0__.createElement(_availability_label_inside__WEBPACK_IMPORTED_MODULE_6__.Z,{selected,isLoading:!!isLoading,isAvailable:!!isAvailable,manifestText,availabilityText}),parentClass=(0,_helper__WEBPACK_IMPORTED_MODULE_5__.QR)({selected,cursorPointer});return url&&!handleSelectManifestation?react__WEBPACK_IMPORTED_MODULE_0__.createElement(_atoms_links_LinkNoStyle__WEBPACK_IMPORTED_MODULE_2__.Z,{className:parentClass,url,"data-cy":dataCy},availabilityLabel):react__WEBPACK_IMPORTED_MODULE_0__.createElement("button",{className:parentClass,type:"button",onClick:handleSelectManifestation,"data-cy":dataCy,"aria-pressed":selected},availabilityLabel)};try{AvailabilityLabel.displayName="AvailabilityLabel",AvailabilityLabel.__docgenInfo={description:"",displayName:"AvailabilityLabel",props:{manifestText:{defaultValue:null,description:"",name:"manifestText",required:!0,type:{name:"string"}},accessTypes:{defaultValue:null,description:"",name:"accessTypes",required:!0,type:{name:"AccessTypeCode[]"}},access:{defaultValue:null,description:"",name:"access",required:!0,type:{name:'("AccessUrl" | "DigitalArticleService" | "Ereol" | "InfomediaService" | "InterLibraryLoan" | undefined)[]'}},selected:{defaultValue:{value:"false"},description:"",name:"selected",required:!1,type:{name:"boolean | undefined"}},url:{defaultValue:null,description:"",name:"url",required:!1,type:{name:"URL | undefined"}},faustIds:{defaultValue:null,description:"",name:"faustIds",required:!0,type:{name:"`${number}`[]"}},handleSelectManifestation:{defaultValue:null,description:"",name:"handleSelectManifestation",required:!1,type:{name:"(() => void | undefined) | undefined"}},cursorPointer:{defaultValue:{value:"false"},description:"",name:"cursorPointer",required:!1,type:{name:"boolean | undefined"}},dataCy:{defaultValue:{value:"availability-label"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}},isbns:{defaultValue:null,description:"",name:"isbns",required:!0,type:{name:"string[]"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/availability-label/availability-label.tsx#AvailabilityLabel"]={docgenInfo:AvailabilityLabel.__docgenInfo,name:"AvailabilityLabel",path:"src/components/availability-label/availability-label.tsx#AvailabilityLabel"})}catch(__react_docgen_typescript_loader_error){}try{availabilitylabel.displayName="availabilitylabel",availabilitylabel.__docgenInfo={description:"",displayName:"availabilitylabel",props:{manifestText:{defaultValue:null,description:"",name:"manifestText",required:!0,type:{name:"string"}},accessTypes:{defaultValue:null,description:"",name:"accessTypes",required:!0,type:{name:"AccessTypeCode[]"}},access:{defaultValue:null,description:"",name:"access",required:!0,type:{name:'("AccessUrl" | "DigitalArticleService" | "Ereol" | "InfomediaService" | "InterLibraryLoan" | undefined)[]'}},selected:{defaultValue:{value:"false"},description:"",name:"selected",required:!1,type:{name:"boolean | undefined"}},url:{defaultValue:null,description:"",name:"url",required:!1,type:{name:"URL | undefined"}},faustIds:{defaultValue:null,description:"",name:"faustIds",required:!0,type:{name:"`${number}`[]"}},handleSelectManifestation:{defaultValue:null,description:"",name:"handleSelectManifestation",required:!1,type:{name:"(() => void | undefined) | undefined"}},cursorPointer:{defaultValue:{value:"false"},description:"",name:"cursorPointer",required:!1,type:{name:"boolean | undefined"}},dataCy:{defaultValue:{value:"availability-label"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}},isbns:{defaultValue:null,description:"",name:"isbns",required:!0,type:{name:"string[]"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/availability-label/availability-label.tsx#availabilitylabel"]={docgenInfo:availabilitylabel.__docgenInfo,name:"availabilitylabel",path:"src/components/availability-label/availability-label.tsx#availabilitylabel"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/availability-label/availability-labels.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{U:()=>AvailabilityLabels});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_core_utils_helpers_general__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/core/utils/helpers/general.ts"),_core_utils_helpers_url__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./src/core/utils/helpers/url.ts"),_core_utils_url__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/core/utils/url.tsx"),_availability_label__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/components/availability-label/availability-label.tsx"),_apps_material_helper__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/apps/material/helper.ts");const AvailabilityLabels=({manifestations,workId,selectedManifestations,setSelectedManifestations,cursorPointer=!1})=>{const materialUrl=(0,_core_utils_url__WEBPACK_IMPORTED_MODULE_2__.J_)()("materialUrl"),allMaterialTypes=(0,_core_utils_helpers_general__WEBPACK_IMPORTED_MODULE_1__.A3)(manifestations),manifestationsByMaterialType=(0,_apps_material_helper__WEBPACK_IMPORTED_MODULE_4__.Ft)(manifestations);return react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment,null,allMaterialTypes.map((materialType=>{const manifestationsOfMaterialType=manifestationsByMaterialType[materialType],faustIds=(0,_core_utils_helpers_general__WEBPACK_IMPORTED_MODULE_1__.vH)(manifestationsOfMaterialType).sort(),identifiers=(0,_apps_material_helper__WEBPACK_IMPORTED_MODULE_4__.LJ)(manifestationsOfMaterialType),url=(0,_core_utils_helpers_url__WEBPACK_IMPORTED_MODULE_5__.WO)(materialUrl,workId,materialType),accessTypesCodes=manifestationsOfMaterialType.map((manifest=>manifest.accessTypes.map((accessType=>accessType.code)))).flat(),access=manifestationsOfMaterialType.map((manifest=>manifest.access.map((acc=>acc.__typename)))).flat();return react__WEBPACK_IMPORTED_MODULE_0__.createElement(_availability_label__WEBPACK_IMPORTED_MODULE_3__.K,{key:faustIds.join("-"),url,cursorPointer,faustIds,manifestText:materialType,accessTypes:accessTypesCodes,access,selected:selectedManifestations&&materialType===(0,_core_utils_helpers_general__WEBPACK_IMPORTED_MODULE_1__.A3)(selectedManifestations)[0],handleSelectManifestation:setSelectedManifestations?()=>{setSelectedManifestations(manifestationsOfMaterialType),(0,_core_utils_helpers_url__WEBPACK_IMPORTED_MODULE_5__.ul)({type:materialType})}:void 0,isbns:identifiers})})))};try{AvailabilityLabels.displayName="AvailabilityLabels",AvailabilityLabels.__docgenInfo={description:"",displayName:"AvailabilityLabels",props:{manifestations:{defaultValue:null,description:"",name:"manifestations",required:!0,type:{name:"Manifestation[]"}},workId:{defaultValue:null,description:"",name:"workId",required:!0,type:{name:"`work-of:${number}-${string}:${number}`"}},selectedManifestations:{defaultValue:null,description:"",name:"selectedManifestations",required:!1,type:{name:"Manifestation[] | undefined"}},setSelectedManifestations:{defaultValue:null,description:"",name:"setSelectedManifestations",required:!1,type:{name:"((manifestations: Manifestation[]) => void) | undefined"}},cursorPointer:{defaultValue:{value:"false"},description:"",name:"cursorPointer",required:!1,type:{name:"boolean | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/availability-label/availability-labels.tsx#AvailabilityLabels"]={docgenInfo:AvailabilityLabels.__docgenInfo,name:"AvailabilityLabels",path:"src/components/availability-label/availability-labels.tsx#AvailabilityLabels"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/availability-label/helper.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{QR:()=>getParentAvailabilityLabelClass,ru:()=>useAvailabilityData});var react=__webpack_require__("./node_modules/react/index.js"),clsx=__webpack_require__("./node_modules/clsx/dist/clsx.mjs"),publizon=__webpack_require__("./src/core/publizon/publizon.ts"),utils_config=__webpack_require__("./src/core/utils/config.tsx"),graphql=__webpack_require__("./src/core/dbc-gateway/generated/graphql.tsx"),useGetAvailability=__webpack_require__("./src/core/utils/useGetAvailability.ts");const publizonProductStatuses={0:{isAvailable:!0,meaning:"Unknown"},1:{isAvailable:!0,meaning:"Unknown"},2:{isAvailable:!0,meaning:"Unknown"},3:{isAvailable:!0,meaning:"Unknown"},4:{isAvailable:!0,meaning:"Reservable"},5:{isAvailable:!1,meaning:"Reservation queue on the material"},6:{isAvailable:!0,meaning:"Unknown"},7:{isAvailable:!0,meaning:"Unknown"}},useAvailabilityData=({accessTypes,access,faustIds,isbn})=>{const[isAvailable,setIsAvailable]=(0,react.useState)(null),config=(0,utils_config.ZR)(),isOnline=(null==accessTypes?void 0:accessTypes.includes(graphql.U5.Online))??!1,[isCostFree,setIsCostFree]=(0,react.useState)(null),[isLoading,setIsLoading]=(0,react.useState)(null);(0,react.useEffect)((()=>{isOnline&&setIsAvailable(!0)}),[isOnline]);const{isLoading:isLoadingIdentifier}=(0,publizon.tq)(isbn??"",{query:{enabled:isOnline&&null!==isbn,onSuccess:res=>{var _res$product;!1!==(null==res||null===(_res$product=res.product)||void 0===_res$product?void 0:_res$product.costFree)?setIsCostFree(!0):setIsCostFree(!1)}}}),{isLoading:isLoadingProductInfo}=(0,publizon.LW)(isbn||"",{enabled:isOnline&&!!isbn&&!1===isCostFree&&access.some((acc=>"Ereol"===acc)),onSuccess:res=>{res&&res.loanStatus?setIsAvailable(publizonProductStatuses[res.loanStatus].isAvailable):setIsAvailable(!1)}}),{isLoading:isLoadingAvailability}=(0,useGetAvailability.Z)({faustIds:faustIds??[],config,options:{query:{enabled:!isOnline&&null!==faustIds,onSuccess:data=>{null!=data&&data.some((item=>item.available))&&setIsAvailable(!0)}}}});return(0,react.useEffect)((()=>{setIsLoading((isLoadingAvailability||isLoadingIdentifier||isLoadingProductInfo)&&null===isAvailable)}),[isLoadingAvailability,isLoadingIdentifier,isLoadingProductInfo,isAvailable]),{isLoading,isAvailable}},getParentAvailabilityLabelClass=({selected,cursorPointer})=>(0,clsx.Z)({"pagefold-parent--none availability-label--selected":selected},{"pagefold-parent--xsmall availability-label--unselected":!selected},{"cursor-pointer":cursorPointer},"text-label","availability-label")},"./src/components/button-favourite/button-favourite.dev.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{default:()=>__WEBPACK_DEFAULT_EXPORT__,favourite:()=>favourite});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_button_favourite__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/components/button-favourite/button-favourite.tsx"),_core_utils_url__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/core/utils/url.tsx"),_core_storybook_serviceUrlArgs__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/core/storybook/serviceUrlArgs.ts");function _extends(){return _extends=Object.assign?Object.assign.bind():function(target){for(var i=1;ireact__WEBPACK_IMPORTED_MODULE_0__.createElement(WrappedButtonFavourite,_extends({},args,{addToListRequest:id=>{}}))).bind({});favourite.args={}},"./src/components/button-favourite/button-favourite.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>button_favourite});var react=__webpack_require__("./node_modules/react/index.js"),es=__webpack_require__("./node_modules/react-query/es/index.js");const IconFavourite=({fill,darkBackground})=>{let classes=fill?"icon-favourite icon-favourite--filled":"icon-favourite";return darkBackground&&(classes=fill?"icon-favourite--bright-filled":"icon-favourite--bright"),react.createElement("svg",{height:"24",width:"24",className:classes,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},react.createElement("path",{d:"M11.5 20L10.2675 18.921C5.89 15.1035 3 12.5858 3 9.49591C3 6.9782 5.057 5 7.675 5C9.154 5 10.5735 5.66213 11.5 6.70845C12.4265 5.66213 13.846 5 15.325 5C17.943 5 20 6.9782 20 9.49591C20 12.5858 17.11 15.1035 12.7325 18.9292L11.5 20Z",strokeWidth:"2"}))};try{IconFavourite.displayName="IconFavourite",IconFavourite.__docgenInfo={description:"",displayName:"IconFavourite",props:{fill:{defaultValue:null,description:"",name:"fill",required:!1,type:{name:"boolean | undefined"}},darkBackground:{defaultValue:null,description:"",name:"darkBackground",required:!1,type:{name:"boolean | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/icon-favourite/icon-favourite.tsx#IconFavourite"]={docgenInfo:IconFavourite.__docgenInfo,name:"IconFavourite",path:"src/components/icon-favourite/icon-favourite.tsx#IconFavourite"})}catch(__react_docgen_typescript_loader_error){}var material_list=__webpack_require__("./src/core/material-list-api/material-list.ts"),utils_text=__webpack_require__("./src/core/utils/text.tsx");const button_favourite=({id,addToListRequest,darkBackground,title})=>{const queryClient=(0,es.useQueryClient)(),[fillState,setFillState]=(0,react.useState)(!1),t=(0,utils_text.X)(),{mutate}=(0,material_list.Sc)();(0,react.useEffect)((()=>{mutate({listId:"default",itemId:id},{onSuccess:()=>{setFillState(!0)},onError:()=>{setFillState(!1)}})}),[id,mutate]);const handleClick=(0,react.useCallback)((e=>{fillState?((0,material_list.cl)("default",id),queryClient.invalidateQueries((0,material_list.R)("default")),setFillState(!1)):(addToListRequest(id),setFillState(!0)),e.stopPropagation()}),[addToListRequest,fillState,id,queryClient]);return react.createElement("button",{type:"button","aria-label":t(fillState?"removeFromFavoritesAriaLabelText":"addToFavoritesAriaLabelText",{placeholders:{"@title":title}}),onClick:handleClick,className:"button-favourite"},react.createElement(IconFavourite,{darkBackground,fill:fillState}))};try{buttonfavourite.displayName="buttonfavourite",buttonfavourite.__docgenInfo={description:"",displayName:"buttonfavourite",props:{id:{defaultValue:null,description:"",name:"id",required:!0,type:{name:"ButtonFavouriteId"}},darkBackground:{defaultValue:null,description:"",name:"darkBackground",required:!1,type:{name:"boolean | undefined"}},addToListRequest:{defaultValue:null,description:"",name:"addToListRequest",required:!0,type:{name:"(id: ButtonFavouriteId) => void"}},title:{defaultValue:null,description:"",name:"title",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/button-favourite/button-favourite.tsx#buttonfavourite"]={docgenInfo:buttonfavourite.__docgenInfo,name:"buttonfavourite",path:"src/components/button-favourite/button-favourite.tsx#buttonfavourite"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/card-item-list/MaterialListItem.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js");const MaterialListItem=(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(((props,ref)=>react__WEBPACK_IMPORTED_MODULE_0__.createElement("li",{ref,tabIndex:-1},props.children))),__WEBPACK_DEFAULT_EXPORT__=MaterialListItem;try{MaterialListItem.displayName="MaterialListItem",MaterialListItem.__docgenInfo={description:"",displayName:"MaterialListItem",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/card-item-list/MaterialListItem.tsx#MaterialListItem"]={docgenInfo:MaterialListItem.__docgenInfo,name:"MaterialListItem",path:"src/components/card-item-list/MaterialListItem.tsx#MaterialListItem"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/card-item-list/SearchResultList.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var lodash_isEmpty__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/lodash/isEmpty.js"),lodash_isEmpty__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(lodash_isEmpty__WEBPACK_IMPORTED_MODULE_0__),react__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/react/index.js"),_core_utils_helpers_general__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/core/utils/helpers/general.ts"),_card_list_item_card_list_item__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/components/card-item-list/card-list-item/card-list-item.tsx"),_card_list_item_card_list_item_skeleton__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/components/card-item-list/card-list-item/card-list-item-skeleton.tsx"),_MaterialListItem__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./src/components/card-item-list/MaterialListItem.tsx");const SearchResultList=({resultItems,page,pageSize})=>{const worksAreLoaded=!lodash_isEmpty__WEBPACK_IMPORTED_MODULE_0___default()(resultItems),lastItemRef=react__WEBPACK_IMPORTED_MODULE_1__.useRef(null);return(0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)((()=>{page>0&&lastItemRef.current&&lastItemRef.current.focus()}),[page,resultItems]),react__WEBPACK_IMPORTED_MODULE_1__.createElement("ul",{className:"card-list-page__list my-32","data-cy":"search-result-list"},!worksAreLoaded&&[...Array(5)].map((()=>react__WEBPACK_IMPORTED_MODULE_1__.createElement("li",null,react__WEBPACK_IMPORTED_MODULE_1__.createElement(_card_list_item_card_list_item_skeleton__WEBPACK_IMPORTED_MODULE_4__.Z,null)))),worksAreLoaded&&resultItems.map(((item,i)=>{const isFirstNewItem=i===page*pageSize;return react__WEBPACK_IMPORTED_MODULE_1__.createElement(_MaterialListItem__WEBPACK_IMPORTED_MODULE_5__.Z,{key:item.workId,ref:isFirstNewItem?lastItemRef:null},react__WEBPACK_IMPORTED_MODULE_1__.createElement(_card_list_item_card_list_item__WEBPACK_IMPORTED_MODULE_3__.Z,{item,coverTint:(0,_core_utils_helpers_general__WEBPACK_IMPORTED_MODULE_2__.yz)(i),resultNumber:i+1}))})))},__WEBPACK_DEFAULT_EXPORT__=(0,react__WEBPACK_IMPORTED_MODULE_1__.memo)(SearchResultList);try{SearchResultList.displayName="SearchResultList",SearchResultList.__docgenInfo={description:"",displayName:"SearchResultList",props:{resultItems:{defaultValue:null,description:"",name:"resultItems",required:!0,type:{name:"Work[]"}},page:{defaultValue:null,description:"",name:"page",required:!0,type:{name:"number"}},pageSize:{defaultValue:null,description:"",name:"pageSize",required:!0,type:{name:"number"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/card-item-list/SearchResultList.tsx#SearchResultList"]={docgenInfo:SearchResultList.__docgenInfo,name:"SearchResultList",path:"src/components/card-item-list/SearchResultList.tsx#SearchResultList"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/card-item-list/card-list-item/card-list-item-skeleton.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js");const CardListItemSkeleton=()=>react__WEBPACK_IMPORTED_MODULE_0__.createElement("article",{className:"card-list-item ssc"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"ssc-square cover--size-small"}," "),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"ssc-wrapper"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"ssc-head-line w-60 mb"}),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"ssc-line w-60 mbs"}," "),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"ssc-line w-60 mbs"}," "))),__WEBPACK_DEFAULT_EXPORT__=(0,react__WEBPACK_IMPORTED_MODULE_0__.memo)(CardListItemSkeleton);try{cardlistitemskeleton.displayName="cardlistitemskeleton",cardlistitemskeleton.__docgenInfo={description:"",displayName:"cardlistitemskeleton",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/card-item-list/card-list-item/card-list-item-skeleton.tsx#cardlistitemskeleton"]={docgenInfo:cardlistitemskeleton.__docgenInfo,name:"cardlistitemskeleton",path:"src/components/card-item-list/card-list-item/card-list-item-skeleton.tsx#cardlistitemskeleton"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/card-item-list/card-list-item/card-list-item.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>card_list_item});var react=__webpack_require__("./node_modules/react/index.js"),es=__webpack_require__("./node_modules/react-redux/es/index.js"),utils_text=__webpack_require__("./src/core/utils/text.tsx"),arrow=__webpack_require__("./src/components/atoms/icons/arrow/arrow.tsx"),availability_labels=__webpack_require__("./src/components/availability-label/availability-labels.tsx"),button_favourite=__webpack_require__("./src/components/button-favourite/button-favourite.tsx"),Link=__webpack_require__("./src/components/atoms/links/Link.tsx"),general=__webpack_require__("./src/core/utils/helpers/general.ts"),cover=__webpack_require__("./src/components/cover/cover.tsx");const card_list_item_cover=({id,description,url,tint,linkAriaLabelledBy})=>react.createElement(cover.Y,{animate:!0,id,size:"small",description:String(description),url,tint,linkAriaLabelledBy});try{cardlistitemcover.displayName="cardlistitemcover",cardlistitemcover.__docgenInfo={description:"",displayName:"cardlistitemcover",props:{url:{defaultValue:null,description:"",name:"url",required:!1,type:{name:"URL | undefined"}},id:{defaultValue:null,description:"",name:"id",required:!0,type:{name:"string"}},description:{defaultValue:null,description:"",name:"description",required:!1,type:{name:"string | undefined"}},tint:{defaultValue:null,description:"",name:"tint",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"20"'},{value:'"40"'},{value:'"80"'},{value:'"100"'},{value:'"120"'}]}},idType:{defaultValue:null,description:"",name:"idType",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"faust"'},{value:'"isbn"'},{value:'"issn"'},{value:'"pid"'}]}},shadow:{defaultValue:null,description:"",name:"shadow",required:!1,type:{name:"boolean | undefined"}},linkAriaLabelledBy:{defaultValue:null,description:"",name:"linkAriaLabelledBy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/card-item-list/card-list-item/card-list-item-cover.tsx#cardlistitemcover"]={docgenInfo:cardlistitemcover.__docgenInfo,name:"cardlistitemcover",path:"src/components/card-item-list/card-list-item/card-list-item-cover.tsx#cardlistitemcover"})}catch(__react_docgen_typescript_loader_error){}var HorizontalTermLine=__webpack_require__("./src/components/horizontal-term-line/HorizontalTermLine.tsx"),url=__webpack_require__("./src/core/utils/url.tsx"),helpers_url=__webpack_require__("./src/core/utils/helpers/url.ts"),guardedRequests_slice=__webpack_require__("./src/core/guardedRequests.slice.ts"),useStatistics=__webpack_require__("./src/core/statistics/useStatistics.ts"),statistics=__webpack_require__("./src/core/statistics/statistics.ts"),lazy_load=__webpack_require__("./src/core/utils/helpers/lazy-load.ts"),helper=__webpack_require__("./src/apps/material/helper.ts"),useFilterHandler=__webpack_require__("./src/apps/search-result/useFilterHandler.tsx"),head=__webpack_require__("./node_modules/lodash/head.js"),head_default=__webpack_require__.n(head),graphql=__webpack_require__("./src/core/dbc-gateway/generated/graphql.tsx");const SubjectNumber=({shelfmark:{shelfmark},className=""})=>react.createElement("div",{className},shelfmark),subject_number_SubjectNumber=SubjectNumber;try{SubjectNumber.displayName="SubjectNumber",SubjectNumber.__docgenInfo={description:"",displayName:"SubjectNumber",props:{className:{defaultValue:{value:""},description:"",name:"className",required:!1,type:{name:"string | undefined"}},shelfmark:{defaultValue:null,description:"",name:"shelfmark",required:!0,type:{name:"Shelfmark"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/subject-number/SubjectNumber.tsx#SubjectNumber"]={docgenInfo:SubjectNumber.__docgenInfo,name:"SubjectNumber",path:"src/components/subject-number/SubjectNumber.tsx#SubjectNumber"})}catch(__react_docgen_typescript_loader_error){}const card_list_item=({item,item:{titles:{full:fullTitle},series,creators,manifestations:{all:manifestations,bestRepresentation},workId},coverTint,resultNumber,dataCy="card-list-item"})=>{var _firstItemInSeries$nu;const searchTitleId=(0,react.useId)(),t=(0,utils_text.X)(),u=(0,url.J_)(),searchUrl=u("searchUrl"),materialUrl=u("materialUrl"),{filters}=(0,useFilterHandler.Z)(),materialTypeFromFilters=((filters,manifestations)=>{const materialTypeFilter=head_default()(Object.keys(filters[graphql.sl.MaterialTypesSpecific]||{}).sort()),allMaterialTypes=(0,general.A3)(manifestations);return materialTypeFilter&&allMaterialTypes.includes(materialTypeFilter)?materialTypeFilter:void 0})(filters,manifestations),dispatch=(0,es.I0)(),author=(0,general.b7)((0,general.TG)(creators),t),manifestationPid=(0,general.qQ)(manifestations),firstItemInSeries=(0,helper.qr)(series).shift(),materialFullUrl=(0,helpers_url.WO)(materialUrl,workId,materialTypeFromFilters),languageIsoCode=(0,helper.hQ)(manifestations),{shelfmark}=bestRepresentation,{track}=(0,useStatistics.T)(),{itemRef,hasBeenVisible:showItem}=(0,lazy_load.L)(),handleClick=(0,react.useCallback)((()=>{track("click",{id:statistics.h.searchResultNumberClick.id,name:statistics.h.searchResultNumberClick.name,trackedData:resultNumber.toString()}).then((()=>{(0,helpers_url.gB)(materialFullUrl)}))}),[materialFullUrl]);return react.createElement("article",{ref:itemRef,"data-cy":dataCy,className:"card-list-item arrow arrow__hover--right-small",onClick:()=>{handleClick()},onKeyUp:e=>"Enter"===e.key&&handleClick},react.createElement("div",{className:"card-list-item__cover"},showItem&&react.createElement(card_list_item_cover,{id:manifestationPid,url:materialFullUrl,tint:coverTint,linkAriaLabelledBy:searchTitleId})),react.createElement("div",{className:"card-list-item__text"},react.createElement("div",{className:"card-list-item__meta"},showItem&&react.createElement(button_favourite.Z,{title:fullTitle[0],id:workId,addToListRequest:id=>{dispatch((0,guardedRequests_slice.Bs)({type:"addFavorite",args:{id},app:"search-result"}))}}),firstItemInSeries&&react.createElement(HorizontalTermLine.Z,{title:`${t("numberDescriptionText")} ${null===(_firstItemInSeries$nu=firstItemInSeries.numberInSeries)||void 0===_firstItemInSeries$nu?void 0:_firstItemInSeries$nu.number}`,subTitle:t("inSeriesText"),linkList:[{url:(0,helpers_url.Nt)(searchUrl,firstItemInSeries.title),term:firstItemInSeries.title}]})),!(0,general.bV)(bestRepresentation)&&shelfmark&&react.createElement(subject_number_SubjectNumber,{className:"text-tags color-secondary-gray mt-8",shelfmark}),react.createElement("h2",{className:"card-list-item__title text-header-h4 mb-4","data-cy":"card-list-item-title",lang:languageIsoCode,id:searchTitleId},react.createElement(Link.Z,{href:materialFullUrl,stopPropagation:!0},fullTitle)),author&&item&&react.createElement("p",{className:"text-small-caption","data-cy":"card-list-item-author"},`${t("byAuthorText")} ${author}`,(0,general.uY)(item)?` (${(0,general.uY)(item)})`:"")),react.createElement("div",{className:"card-list-item__availability","data-cy":"card-list-item-availability"},showItem&&react.createElement(availability_labels.U,{cursorPointer:!0,workId,manifestations})),react.createElement(arrow.Z,null))};try{cardlistitem.displayName="cardlistitem",cardlistitem.__docgenInfo={description:"",displayName:"cardlistitem",props:{item:{defaultValue:null,description:"",name:"item",required:!0,type:{name:"Work"}},coverTint:{defaultValue:null,description:"",name:"coverTint",required:!0,type:{name:"enum",value:[{value:"undefined"},{value:'"20"'},{value:'"40"'},{value:'"80"'},{value:'"100"'},{value:'"120"'}]}},resultNumber:{defaultValue:null,description:"",name:"resultNumber",required:!0,type:{name:"number"}},dataCy:{defaultValue:{value:"card-list-item"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/card-item-list/card-list-item/card-list-item.tsx#cardlistitem"]={docgenInfo:cardlistitem.__docgenInfo,name:"cardlistitem",path:"src/components/card-item-list/card-list-item/card-list-item.tsx#cardlistitem"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/checkbox/Checkbox.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>checkbox_Checkbox});var react=__webpack_require__("./node_modules/react/index.js");const icon_checkbox=()=>react.createElement("svg",{width:"20px",height:"20px"},react.createElement("polyline",{points:"1.5 6 4.5 9 10.5 1",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2"})),checkbox_Checkbox=({id,label,hideLabel,className,selected,onChecked,disabled,ariaLabel,focused,isVisualOnly,labelledBy})=>react.createElement("div",{className:`checkbox ${className||""}`},react.createElement("input",{autoFocus:focused,id,className:"checkbox__input",onChange:e=>{var checked;checked=e.target.checked,onChecked&&onChecked(checked)},checked:selected,type:"checkbox","aria-label":isVisualOnly&&labelledBy?void 0:ariaLabel,"aria-labelledby":isVisualOnly&&labelledBy?labelledBy:void 0,disabled}),react.createElement("label",{className:"checkbox__label",htmlFor:id,"data-cy":id},react.createElement("span",{className:"checkbox__icon","aria-labelledby":labelledBy},react.createElement(icon_checkbox,null)),label&&react.createElement("span",{id,"data-cy":"checkbox-text",className:"checkbox__text text-small-caption color-secondary-gray "+(hideLabel?"checkbox__text--hide-visually":"")},label)));try{Checkbox.displayName="Checkbox",Checkbox.__docgenInfo={description:"",displayName:"Checkbox",props:{id:{defaultValue:null,description:"",name:"id",required:!0,type:{name:"string"}},label:{defaultValue:null,description:"",name:"label",required:!1,type:{name:"ReactNode"}},hideLabel:{defaultValue:null,description:"",name:"hideLabel",required:!1,type:{name:"boolean | undefined"}},selected:{defaultValue:null,description:"",name:"selected",required:!1,type:{name:"boolean | undefined"}},disabled:{defaultValue:null,description:"",name:"disabled",required:!1,type:{name:"boolean | undefined"}},className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string | undefined"}},onChecked:{defaultValue:null,description:"",name:"onChecked",required:!1,type:{name:"((value: boolean) => void) | undefined"}},ariaLabel:{defaultValue:null,description:"",name:"ariaLabel",required:!1,type:{name:"string | undefined"}},focused:{defaultValue:null,description:"",name:"focused",required:!1,type:{name:"boolean | undefined"}},isVisualOnly:{defaultValue:null,description:"",name:"isVisualOnly",required:!1,type:{name:"boolean | undefined"}},labelledBy:{defaultValue:null,description:"",name:"labelledBy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/checkbox/Checkbox.tsx#Checkbox"]={docgenInfo:Checkbox.__docgenInfo,name:"Checkbox",path:"src/components/checkbox/Checkbox.tsx#Checkbox"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/contact-info-section/ContactInfoSection.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>contact_info_section_ContactInfoSection});var react=__webpack_require__("./node_modules/react/index.js"),clsx=__webpack_require__("./node_modules/clsx/dist/clsx.mjs"),utils_text=__webpack_require__("./src/core/utils/text.tsx"),utils_config=__webpack_require__("./src/core/utils/config.tsx");const ContactInfoInputs=({isInline,children,dataCy="contact-info-input",className})=>{if(!isInline)return react.createElement("div",{className,"data-cy":dataCy},children);const renderableChildren=react.Children.toArray(children);return react.createElement("div",{className:(0,clsx.Z)(className,{"contact-info-flex":isInline}),"data-cy":dataCy},renderableChildren.map(((child,i)=>{const childClassName=(0,clsx.Z)("patron__input--desktop",{"mr-16":i{const t=(0,utils_text.X)();return react.createElement(react.Fragment,null,react.createElement(TextInput.Z,{className,id:"phone-input",required:isRequired,type:"tel",pattern:"\\+?[0-9]{6,15}",title:t("patronPagePhoneInputMessageText"),onChange:newPhoneNumber=>changePatron(newPhoneNumber,"phoneNumber"),value:null==patron?void 0:patron.phoneNumber,label:t("patronContactPhoneLabelText"),placeholder:t("patronPagePhoneInputMessageText")}),showCheckboxes&&react.createElement(Checkbox.Z,{className:"mt-8 mb-16",onChecked:newReceiveSms=>changePatron(newReceiveSms,"receiveSms"),id:"phone-messages",selected:null==patron?void 0:patron.receiveSms,disabled:!1,label:t("patronContactPhoneCheckboxText")}))},contact_info_section_ContactInfoPhone=ContactInfoPhone;try{ContactInfoPhone.displayName="ContactInfoPhone",ContactInfoPhone.__docgenInfo={description:"",displayName:"ContactInfoPhone",props:{patron:{defaultValue:null,description:"",name:"patron",required:!0,type:{name:"PatronV5 | PatronSettingsV3 | null"}},changePatron:{defaultValue:null,description:"",name:"changePatron",required:!0,type:{name:"ChangePatronProps"}},showCheckboxes:{defaultValue:null,description:"",name:"showCheckboxes",required:!0,type:{name:"boolean"}},className:{defaultValue:{value:""},description:"",name:"className",required:!1,type:{name:"string | undefined"}},isRequired:{defaultValue:{value:"false"},description:"",name:"isRequired",required:!1,type:{name:"boolean | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/contact-info-section/ContactInfoPhone.tsx#ContactInfoPhone"]={docgenInfo:ContactInfoPhone.__docgenInfo,name:"ContactInfoPhone",path:"src/components/contact-info-section/ContactInfoPhone.tsx#ContactInfoPhone"})}catch(__react_docgen_typescript_loader_error){}const ContactInfoEmail=({className="",patron,changePatron,showCheckboxes,isRequired=!1})=>{const t=(0,utils_text.X)();return react.createElement(react.Fragment,null,react.createElement(TextInput.Z,{className,id:"email-address-input",type:"email",required:isRequired,onChange:newEmail=>changePatron(newEmail,"emailAddress"),value:null==patron?void 0:patron.emailAddress,label:t("patronContactEmailLabelText")}),showCheckboxes&&react.createElement(Checkbox.Z,{className:"mt-8 mb-16",onChecked:newReceiveEmail=>changePatron(newReceiveEmail,"receiveEmail"),id:"email-messages",selected:null==patron?void 0:patron.receiveEmail,disabled:!1,label:t("patronContactEmailCheckboxText")}))},contact_info_section_ContactInfoEmail=ContactInfoEmail;try{ContactInfoEmail.displayName="ContactInfoEmail",ContactInfoEmail.__docgenInfo={description:"",displayName:"ContactInfoEmail",props:{className:{defaultValue:{value:""},description:"",name:"className",required:!1,type:{name:"string | undefined"}},patron:{defaultValue:null,description:"",name:"patron",required:!0,type:{name:"PatronV5 | PatronSettingsV3 | null"}},changePatron:{defaultValue:null,description:"",name:"changePatron",required:!0,type:{name:"ChangePatronProps"}},showCheckboxes:{defaultValue:null,description:"",name:"showCheckboxes",required:!0,type:{name:"boolean"}},isRequired:{defaultValue:{value:"false"},description:"",name:"isRequired",required:!1,type:{name:"boolean | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/contact-info-section/ContactInfoEmail.tsx#ContactInfoEmail"]={docgenInfo:ContactInfoEmail.__docgenInfo,name:"ContactInfoEmail",path:"src/components/contact-info-section/ContactInfoEmail.tsx#ContactInfoEmail"})}catch(__react_docgen_typescript_loader_error){}const ContactInfoSection=({patron,inLine,changePatron,showCheckboxes,requiredFields=[]})=>{const t=(0,utils_text.X)(),inputsClass=(0,clsx.Z)("dpl-input",{input__desktop:inLine}),textNotificationsEnabledConfig="1"===(0,utils_config.ZR)()("textNotificationsEnabledConfig");return react.createElement("section",{"data-cy":"patron-page-contact-info"},react.createElement("h2",{className:"text-header-h4 mt-32 mb-16"},t("patronContactInfoHeaderText")),t("patronContactInfoBodyText")&&react.createElement("p",{className:"text-body-small-regular mb-32"},t("patronContactInfoBodyText")),react.createElement(contact_info_section_ContactInfoInputs,{isInline:inLine},react.createElement(contact_info_section_ContactInfoPhone,{className:inputsClass,changePatron,patron,isRequired:requiredFields.includes("phone"),showCheckboxes:showCheckboxes&&textNotificationsEnabledConfig}),react.createElement(contact_info_section_ContactInfoEmail,{className:(0,clsx.Z)(inputsClass,{"mt-32":!textNotificationsEnabledConfig&&!inLine}),changePatron,patron,isRequired:requiredFields.includes("email"),showCheckboxes})))},contact_info_section_ContactInfoSection=ContactInfoSection;try{ContactInfoSection.displayName="ContactInfoSection",ContactInfoSection.__docgenInfo={description:"",displayName:"ContactInfoSection",props:{patron:{defaultValue:null,description:"",name:"patron",required:!0,type:{name:"PatronV5 | PatronSettingsV3 | null"}},inLine:{defaultValue:null,description:"",name:"inLine",required:!0,type:{name:"boolean"}},changePatron:{defaultValue:null,description:"",name:"changePatron",required:!0,type:{name:"ChangePatronProps"}},showCheckboxes:{defaultValue:null,description:"",name:"showCheckboxes",required:!0,type:{name:"boolean"}},requiredFields:{defaultValue:{value:"[]"},description:"",name:"requiredFields",required:!1,type:{name:'("email" | "phone")[] | undefined'}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/contact-info-section/ContactInfoSection.tsx#ContactInfoSection"]={docgenInfo:ContactInfoSection.__docgenInfo,name:"ContactInfoSection",path:"src/components/contact-info-section/ContactInfoSection.tsx#ContactInfoSection"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/cover/cover.dev.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{default:()=>__WEBPACK_DEFAULT_EXPORT__,item:()=>item});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_cover__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/components/cover/cover.tsx"),_core_utils_helpers_url__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/core/utils/helpers/url.ts"),_core_utils_url__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/core/utils/url.tsx"),_core_storybook_serviceUrlArgs__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/core/storybook/serviceUrlArgs.ts");const __WEBPACK_DEFAULT_EXPORT__={title:"Components / Cover",component:_cover__WEBPACK_IMPORTED_MODULE_1__.Y,argTypes:{size:{name:"Image size",control:{type:"radio"}},tint:{name:"Background color tint",control:{type:"radio"}},animate:{name:"Use animation",control:{type:"boolean"}},id:{name:"PID",control:{type:"text"}},url:{name:"URL",control:{type:"string"}},description:{name:"Description",control:{type:"text"}}},args:{..._core_storybook_serviceUrlArgs__WEBPACK_IMPORTED_MODULE_3__.Z,id:"870970-basis:45234401",size:"small",animate:!0,tint:"120",url:new URL("/",(0,_core_utils_helpers_url__WEBPACK_IMPORTED_MODULE_4__.vW)()),description:"description"}},WrappedCover=(0,_core_utils_url__WEBPACK_IMPORTED_MODULE_2__.XL)(_cover__WEBPACK_IMPORTED_MODULE_1__.Y),item=(args=>react__WEBPACK_IMPORTED_MODULE_0__.createElement(WrappedCover,args)).bind({});item.args={}},"./src/components/cover/cover.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Y:()=>Cover});var react=__webpack_require__("./node_modules/react/index.js"),clsx=__webpack_require__("./node_modules/clsx/dist/clsx.mjs"),es=__webpack_require__("./node_modules/react-query/es/index.js"),FetchFailedError=__webpack_require__("./src/core/fetchers/FetchFailedError.ts"),helpers=__webpack_require__("./src/core/fetchers/helpers.ts"),token=__webpack_require__("./src/core/token.js"),extractServiceBaseUrls=__webpack_require__("./src/core/utils/reduxMiddleware/extractServiceBaseUrls.ts"),FetcherHttpError=__webpack_require__("./src/core/fetchers/FetcherHttpError.ts");function _defineProperty(obj,key,value){return(key=function _toPropertyKey(t){var i=function _toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==typeof i?i:String(i)}(key))in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}class CoverServiceHttpError extends FetcherHttpError.Z{constructor(...args){super(...args),_defineProperty(this,"name","CoverServiceHttpError")}}const fetcher=async({url,method,params,data})=>{const additionalHeaders="object"===(null==data?void 0:data.headers)?null==data?void 0:data.headers:{},libraryToken=(0,token.LP)(token.t8),headers={...libraryToken?{Authorization:`Bearer ${libraryToken}`}:{},...additionalHeaders},body=data?JSON.stringify(data):null,serviceUrl=(0,helpers._o)({baseUrl:(0,extractServiceBaseUrls.fG)(extractServiceBaseUrls.PS.cover),url,params});try{const response=await fetch(serviceUrl,{method,headers,body});if(!response.ok)throw new CoverServiceHttpError(response.status,response.statusText,serviceUrl);try{return await response.json()}catch(e){if(!(e instanceof SyntaxError))throw e}}catch(error){if(error instanceof CoverServiceHttpError)throw error;const message=error instanceof Error?error.message:"Unknown error";throw new FetchFailedError.Z(message,serviceUrl)}return null},useGetCoverCollection=(params,options)=>{const{query:queryOptions}=options??{},queryKey=(null==queryOptions?void 0:queryOptions.queryKey)??(params=>["/api/v2/covers",...params?[params]:[]])(params),query=(0,es.useQuery)(queryKey,(({signal})=>((params,signal)=>fetcher({url:"/api/v2/covers",method:"get",signal,params}))(params,signal)),queryOptions);return{queryKey,...query}};var LinkNoStyle=__webpack_require__("./src/components/atoms/links/LinkNoStyle.tsx");const cover_image=({src,altText,animate,setImageLoaded,shadow})=>react.createElement("img",{onLoad:setImageLoaded,className:(0,clsx.Z)("cover__img",{"cover__img--animate":animate},{"cover__img--shadow":shadow}),src,alt:altText||""});try{coverimage.displayName="coverimage",coverimage.__docgenInfo={description:"",displayName:"coverimage",props:{src:{defaultValue:null,description:"",name:"src",required:!0,type:{name:"string"}},altText:{defaultValue:null,description:"",name:"altText",required:!1,type:{name:"string | undefined"}},animate:{defaultValue:null,description:"",name:"animate",required:!0,type:{name:"boolean"}},setImageLoaded:{defaultValue:null,description:"",name:"setImageLoaded",required:!0,type:{name:"() => void"}},shadow:{defaultValue:null,description:"",name:"shadow",required:!1,type:{name:"boolean | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/cover/cover-image.tsx#coverimage"]={docgenInfo:coverimage.__docgenInfo,name:"coverimage",path:"src/components/cover/cover-image.tsx#coverimage"})}catch(__react_docgen_typescript_loader_error){}const Cover=({url,description,size,animate,tint,id,idType="pid",shadow,linkAriaLabelledBy})=>{var _data$,_data$$imageUrls,_data$$imageUrls2;const[imageLoaded,setImageLoaded]=(0,react.useState)(null),handleSetImageLoaded=(0,react.useCallback)((()=>{setImageLoaded(!0)}),[]);let dataSize=size;"xsmall"===dataSize?dataSize="small":"xlarge"===dataSize&&(dataSize="large");const{data}=useGetCoverCollection({type:idType,identifiers:[id],sizes:[dataSize]}),coverSrc=null==data||null===(_data$=data[0])||void 0===_data$||null===(_data$$imageUrls=_data$.imageUrls)||void 0===_data$$imageUrls||null===(_data$$imageUrls2=_data$$imageUrls[`${dataSize}`])||void 0===_data$$imageUrls2?void 0:_data$$imageUrls2.url,classes={wrapper:(0,clsx.Z)("cover",`cover--size-${size}`,`cover--aspect-${size}`,imageLoaded||{default:"bg-identity-tint-120",120:"bg-identity-tint-120",100:"bg-identity-tint-100",80:"bg-identity-tint-80",40:"bg-identity-tint-40",20:"bg-identity-tint-20"}[tint||"default"])};return url?react.createElement(LinkNoStyle.Z,{className:classes.wrapper,url,ariaLabelledBy:linkAriaLabelledBy},coverSrc&&react.createElement(cover_image,{setImageLoaded:handleSetImageLoaded,src:coverSrc,altText:description,animate,shadow})):react.createElement("div",{className:classes.wrapper},coverSrc&&react.createElement(cover_image,{setImageLoaded:handleSetImageLoaded,src:coverSrc,altText:description,animate,shadow}))};try{Cover.displayName="Cover",Cover.__docgenInfo={description:"",displayName:"Cover",props:{animate:{defaultValue:null,description:"",name:"animate",required:!0,type:{name:"boolean"}},size:{defaultValue:null,description:"",name:"size",required:!0,type:{name:"enum",value:[{value:'"xsmall"'},{value:'"small"'},{value:'"medium"'},{value:'"large"'},{value:'"xlarge"'},{value:'"original"'}]}},tint:{defaultValue:null,description:"",name:"tint",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"20"'},{value:'"40"'},{value:'"80"'},{value:'"100"'},{value:'"120"'}]}},id:{defaultValue:null,description:"",name:"id",required:!0,type:{name:"string"}},description:{defaultValue:null,description:"",name:"description",required:!1,type:{name:"string | undefined"}},url:{defaultValue:null,description:"",name:"url",required:!1,type:{name:"URL | undefined"}},idType:{defaultValue:{value:"pid"},description:"",name:"idType",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"faust"'},{value:'"isbn"'},{value:'"issn"'},{value:'"pid"'}]}},shadow:{defaultValue:null,description:"",name:"shadow",required:!1,type:{name:"boolean | undefined"}},linkAriaLabelledBy:{defaultValue:null,description:"",name:"linkAriaLabelledBy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/cover/cover.tsx#Cover"]={docgenInfo:Cover.__docgenInfo,name:"Cover",path:"src/components/cover/cover.tsx#Cover"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/empty-list/empty-list.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js");const __WEBPACK_DEFAULT_EXPORT__=({emptyListText,dataCy="empty-list",classNames=""})=>react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{"data-cy":dataCy,className:`dpl-list-empty ${classNames}`},emptyListText);try{emptylist.displayName="emptylist",emptylist.__docgenInfo={description:"",displayName:"emptylist",props:{emptyListText:{defaultValue:null,description:"",name:"emptyListText",required:!0,type:{name:"string"}},dataCy:{defaultValue:{value:"empty-list"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}},classNames:{defaultValue:{value:""},description:"",name:"classNames",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/empty-list/empty-list.tsx#emptylist"]={docgenInfo:emptylist.__docgenInfo,name:"emptylist",path:"src/components/empty-list/empty-list.tsx#emptylist"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/find-on-shelf/FindOnShelfModal.dev.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Default:()=>Default,Periodical:()=>Periodical,default:()=>FindOnShelfModal_dev});var react=__webpack_require__("./node_modules/react/index.js"),material_dev=__webpack_require__("./src/apps/material/material.dev.tsx"),serviceUrlArgs=__webpack_require__("./src/core/storybook/serviceUrlArgs.ts"),config=__webpack_require__("./src/core/utils/config.tsx"),general=__webpack_require__("./src/core/utils/helpers/general.ts"),utils_text=__webpack_require__("./src/core/utils/text.tsx"),url=__webpack_require__("./src/core/utils/url.tsx"),MaterialButtonsFindOnShelf=__webpack_require__("./src/components/material/material-buttons/physical/MaterialButtonsFindOnShelf.tsx"),FindOnShelfModal=__webpack_require__("./src/components/find-on-shelf/FindOnShelfModal.tsx");const FindOnShelfModal_dev={title:"Components / Find On Shelf Modal",component:FindOnShelfModal.Z,argTypes:{...serviceUrlArgs.Z,...material_dev.default.argTypes,manifestations:{name:"Manifestations",defaultValue:[{pid:"870970-basis:52557240",genreAndForm:["slægtsromaner"],source:["Bibliotekskatalog"],titles:{main:["De syv søstre"],original:["The seven sisters"]},fictionNonfiction:{display:"SKOENLITTERATUR",code:"FICTION"},materialTypes:[{specific:"bog"}],creators:[{display:"Lucinda Riley",__typename:"Person"}],publisher:[""],languages:{main:[{display:"dansk",isoCode:"dan"}]},identifiers:[{value:"9788763844116"}],contributors:[{display:"Ulla Lauridsen"}],edition:{summary:"1. udgave, 3. oplag (2018)",publicationYear:{display:"2016"}},audience:{generalAudience:[]},physicalDescriptions:[{numberOfPages:null}],accessTypes:[{code:"PHYSICAL"}],access:[{__typename:"InterLibraryLoan",loanIsPossible:!0}],shelfmark:null,catalogueCodes:{nationalBibliography:[],otherCatalogues:[]}},{pid:"870970-basis:52643414",genreAndForm:["slægtsromaner"],source:["Bibliotekskatalog"],titles:{main:["De syv søstre (mp3)"],original:["The seven sisters"]},fictionNonfiction:{display:"SKOENLITTERATUR",code:"FICTION"},materialTypes:[{specific:"lydbog (cd-mp3)"}],creators:[{display:"Lucinda Riley",__typename:"Person"}],publisher:[""],languages:{main:[{display:"dansk",isoCode:"dan"}]},identifiers:[{value:"9788763850636"}],contributors:[{display:"Maria Stokholm"},{display:"Ulla Lauridsen"}],edition:{summary:"1. lydbogsudgave",publicationYear:{display:"2016"}},audience:{generalAudience:[]},physicalDescriptions:[{numberOfPages:null}],accessTypes:[{code:"PHYSICAL"}],access:[{__typename:"InterLibraryLoan",loanIsPossible:!0}],shelfmark:{postfix:"Postfix, 24",shelfmark:"60.7"},catalogueCodes:{nationalBibliography:[],otherCatalogues:[]}}],control:{type:"object"}},workTitles:{name:"Work title(s)",defaultValue:["Title 1","Title 2"],control:{type:"object"}},authors:{name:"Author(s)",defaultValue:[{__typename:"Person",display:"author 1"},{__typename:"Person",display:"author 2"},{__typename:"Corporation",display:"author 3"}],control:{type:"object"}},selectedPeriodical:{name:"Selected periodical",defaultValue:null,control:{type:"null"}},setSelectedPeriodical:{name:"Set selected periodical function",defaultValue:null,control:{type:"null"}},blacklistedPickupBranchesConfig:{name:"Blacklisted Pickup branches",defaultValue:"FBS-751032,FBS-751031,FBS-751009,FBS-751027,FBS-751024",control:{type:"text"}}}},Template=args=>{const[storySelectedPeriodical,setStorySelectedPeriodical]=(0,react.useState)({volume:"",volumeYear:"2022",displayText:"2022, nr. 29",volumeNumber:"29",itemNumber:"5313131426"});args.selectedPeriodical=storySelectedPeriodical,args.setSelectedPeriodical=setStorySelectedPeriodical;const{manifestations:[{pid}]}=args,FindOnShelfModalWithConfigAndText=(0,url.XL)((0,config.Rh)((0,utils_text.z)(FindOnShelfModal.Z)));return react.createElement(react.Fragment,null,react.createElement(MaterialButtonsFindOnShelf.Z,{size:"small",faustIds:[(0,general.rp)(pid)]}),react.createElement(FindOnShelfModalWithConfigAndText,args))},Default=Template.bind({});Default.args={};const Periodical=Template.bind({});Periodical.args={manifestations:[{pid:"870970-basis:06373674",genreAndForm:[],source:["Bibliotekskatalog"],titles:{main:["Alt for damerne"],original:[]},fictionNonfiction:{display:"FAGLITTERATUR",code:"NONFICTION"},materialTypes:[{specific:"tidsskrift"}],creators:[],publisher:[""],languages:{main:[{display:"dansk",isoCode:"dan"}]},identifiers:[{value:"0002-6506"}],contributors:[],edition:{summary:"",publicationYear:{display:"1946"}},audience:{generalAudience:[]},physicalDescriptions:[],accessTypes:[{code:"PHYSICAL"}],access:[{__typename:"DigitalArticleService",issn:"00026506"},{__typename:"InterLibraryLoan",loanIsPossible:!0}],shelfmark:null,catalogueCodes:{nationalBibliography:[],otherCatalogues:[]}}]}},"./src/components/find-on-shelf/FindOnShelfModal.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>find_on_shelf_FindOnShelfModal,e:()=>FindOnShelfModal_findOnShelfModalId});var react=__webpack_require__("./node_modules/react/index.js"),general=__webpack_require__("./src/core/utils/helpers/general.ts"),modal=__webpack_require__("./src/core/utils/modal.tsx"),partition=__webpack_require__("./node_modules/lodash/partition.js"),partition_default=__webpack_require__.n(partition),helper=(__webpack_require__("./node_modules/core-js/modules/esnext.set.add-all.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.delete-all.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.difference.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.every.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.filter.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.find.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.intersection.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.is-disjoint-from.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.is-subset-of.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.is-superset-of.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.join.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.map.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.reduce.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.some.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.symmetric-difference.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.union.js"),__webpack_require__("./src/apps/material/helper.ts")),utils_text=__webpack_require__("./src/core/utils/text.tsx"),disclosure=__webpack_require__("./src/components/Disclosures/disclosure.tsx");const FindOnShelfManifestationListItem=({shelfmark,department,location,sublocation,title,publicationYear,numberAvailable})=>{const t=(0,utils_text.X)(),locationArray=[department,location,sublocation,shelfmark?`${shelfmark.shelfmark} ${shelfmark.postfix}`:void 0].filter((el=>el));return react.createElement("li",{className:"find-on-shelf__row text-body-medium-regular",role:"row"},react.createElement("span",{className:"find-on-shelf__material-text",role:"cell"},title,publicationYear&&` (${publicationYear})`),react.createElement("span",{role:"cell"},locationArray.length?locationArray.join(" · "):t("findOnShelfModalNoLocationSpecifiedText")),react.createElement("span",{className:"find-on-shelf__item-count-text",role:"cell"},numberAvailable))},find_on_shelf_FindOnShelfManifestationListItem=FindOnShelfManifestationListItem;try{FindOnShelfManifestationListItem.displayName="FindOnShelfManifestationListItem",FindOnShelfManifestationListItem.__docgenInfo={description:"",displayName:"FindOnShelfManifestationListItem",props:{shelfmark:{defaultValue:null,description:"",name:"shelfmark",required:!0,type:{name:'{ __typename?: "Shelfmark" | undefined; postfix?: string | null | undefined; shelfmark: string; } | null | undefined'}},department:{defaultValue:null,description:"",name:"department",required:!0,type:{name:"string | undefined"}},location:{defaultValue:null,description:"",name:"location",required:!0,type:{name:"string | undefined"}},sublocation:{defaultValue:null,description:"",name:"sublocation",required:!0,type:{name:"string | undefined"}},title:{defaultValue:null,description:"",name:"title",required:!0,type:{name:"string"}},publicationYear:{defaultValue:null,description:"",name:"publicationYear",required:!0,type:{name:"string | null"}},numberAvailable:{defaultValue:null,description:"",name:"numberAvailable",required:!0,type:{name:"number"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/find-on-shelf/FindOnShelfManifestationListItem.tsx#FindOnShelfManifestationListItem"]={docgenInfo:FindOnShelfManifestationListItem.__docgenInfo,name:"FindOnShelfManifestationListItem",path:"src/components/find-on-shelf/FindOnShelfManifestationListItem.tsx#FindOnShelfManifestationListItem"})}catch(__react_docgen_typescript_loader_error){}const FindOnShelfManifestationList=({libraryBranchHoldings})=>{const t=(0,utils_text.X)();return react.createElement("ul",{className:"find-on-shelf",role:"table","aria-label":t("findOnShelfTableDescriptionText",{placeholders:{"@work":libraryBranchHoldings[0].manifestation.titles.main[0],"@branch":libraryBranchHoldings[0].holding.branch.title}})},react.createElement("li",{className:"find-on-shelf__header-row text-small-caption",role:"row"},react.createElement("span",{className:"find-on-shelf__material-header",role:"columnheader"},t("findOnShelfModalListMaterialText")),react.createElement("span",{role:"columnheader"},t("findOnShelfModalListFindOnShelfText")),react.createElement("span",{className:"find-on-shelf__item-count-header capitalize-first",role:"columnheader"},t("findOnShelfModalListItemCountText"))),libraryBranchHoldings.map((branchHolding=>{var _branchHolding$holdin,_branchHolding$holdin2,_branchHolding$holdin3;return react.createElement(find_on_shelf_FindOnShelfManifestationListItem,{shelfmark:branchHolding.manifestation.shelfmark,department:null===(_branchHolding$holdin=branchHolding.holding.department)||void 0===_branchHolding$holdin?void 0:_branchHolding$holdin.title,location:null===(_branchHolding$holdin2=branchHolding.holding.location)||void 0===_branchHolding$holdin2?void 0:_branchHolding$holdin2.title,sublocation:null===(_branchHolding$holdin3=branchHolding.holding.sublocation)||void 0===_branchHolding$holdin3?void 0:_branchHolding$holdin3.title,title:branchHolding.manifestation.titles.main.join(", "),publicationYear:(0,general.S2)(branchHolding.manifestation),numberAvailable:(0,helper.r0)(branchHolding.holding.materials),key:branchHolding.holding.branch.branchId})})))},find_on_shelf_FindOnShelfManifestationList=FindOnShelfManifestationList;try{FindOnShelfManifestationList.displayName="FindOnShelfManifestationList",FindOnShelfManifestationList.__docgenInfo={description:"",displayName:"FindOnShelfManifestationList",props:{libraryBranchHoldings:{defaultValue:null,description:"",name:"libraryBranchHoldings",required:!0,type:{name:"ManifestationHoldings"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/find-on-shelf/FindOnShelfManifestationList.tsx#FindOnShelfManifestationList"]={docgenInfo:FindOnShelfManifestationList.__docgenInfo,name:"FindOnShelfManifestationList",path:"src/components/find-on-shelf/FindOnShelfManifestationList.tsx#FindOnShelfManifestationList"})}catch(__react_docgen_typescript_loader_error){}var Dropdown=__webpack_require__("./src/components/Dropdown/Dropdown.tsx"),periodical_helper=__webpack_require__("./src/components/material/periodical/helper.ts");const find_on_shelf_FindOnShelfPeriodicalDropdowns=({manifestationsHoldings,setSelectedPeriodical,selectedPeriodical})=>{const t=(0,utils_text.X)(),periodicalEditionsBase=(0,periodical_helper.wf)(manifestationsHoldings[0].holdings),groupedPeriodicalEditionsBase=(0,general.CU)(periodicalEditionsBase,"volumeYear"),periodicalEditions=(0,periodical_helper.ik)(groupedPeriodicalEditionsBase),sortedPeriodicalYears=Object.keys(periodicalEditions).sort(),[selectedYear,setSelectedYear]=(0,react.useState)(selectedPeriodical.volumeYear);return react.createElement("div",{className:"modal-find-on-shelf__periodical-dropdowns"},react.createElement(Dropdown.Z,{classNames:"dropdown--grey-borders",options:sortedPeriodicalYears.map((volumeYear=>({label:volumeYear,value:volumeYear}))),arrowIcon:"chevron",defaultValue:selectedYear,handleOnChange:event=>{(0,periodical_helper.sW)(event.target.value,setSelectedYear,setSelectedPeriodical,periodicalEditions,groupedPeriodicalEditionsBase)},ariaLabel:t("findOnShelfModalPeriodicalYearDropdownText")}),selectedYear&&react.createElement(Dropdown.Z,{classNames:"dropdown--grey-borders",options:periodicalEditions[selectedYear].map((periodicalEdition=>({label:periodicalEdition,value:periodicalEdition}))),arrowIcon:"chevron",defaultValue:selectedPeriodical.volumeNumber,handleOnChange:event=>{(0,periodical_helper.ul)(groupedPeriodicalEditionsBase,selectedYear,event.target.value,setSelectedPeriodical)},ariaLabel:t("findOnShelfModalPeriodicalEditionDropdownText")}))};try{FindOnShelfPeriodicalDropdowns.displayName="FindOnShelfPeriodicalDropdowns",FindOnShelfPeriodicalDropdowns.__docgenInfo={description:"",displayName:"FindOnShelfPeriodicalDropdowns",props:{manifestationsHoldings:{defaultValue:null,description:"",name:"manifestationsHoldings",required:!0,type:{name:"HoldingsForBibliographicalRecordV3[]"}},setSelectedPeriodical:{defaultValue:null,description:"",name:"setSelectedPeriodical",required:!0,type:{name:"(selectedPeriodical: PeriodicalEdition) => void"}},selectedPeriodical:{defaultValue:null,description:"",name:"selectedPeriodical",required:!0,type:{name:"PeriodicalEdition"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/find-on-shelf/FindOnShelfPeriodicalDropdowns.tsx#FindOnShelfPeriodicalDropdowns"]={docgenInfo:FindOnShelfPeriodicalDropdowns.__docgenInfo,name:"FindOnShelfPeriodicalDropdowns",path:"src/components/find-on-shelf/FindOnShelfPeriodicalDropdowns.tsx#FindOnShelfPeriodicalDropdowns"})}catch(__react_docgen_typescript_loader_error){}var utils_config=__webpack_require__("./src/core/utils/config.tsx"),DisclosureSummary=__webpack_require__("./src/components/Disclosures/DisclosureSummary.tsx"),modal_helpers=__webpack_require__("./src/core/utils/helpers/modal-helpers.ts");const findOnShelfModalId=faustIds=>constructModalId("find-on-shelf-modal",faustIds.sort()),FindOnShelfModalBody=({manifestations,workTitles,authors,selectedPeriodical,setSelectedPeriodical})=>{const config=(0,utils_config.ZR)(),t=(0,utils_text.X)(),faustIdArray=(0,general.vn)(manifestations).map((manifestationPid=>(0,general.rp)(manifestationPid))),{data,isLoading}=(0,helper.Lt)({faustIds:faustIdArray,config}),author=(0,general.b7)((0,general.TG)(authors),t),title=workTitles.join(", "),isPeriodical=manifestations.some((manifestation=>manifestation.materialTypes.some((materialType=>materialType.specific.includes("tidsskrift")))));if(!data||data.length<1)return null;const pairedManifestationsWithBranches=data.map(((holdingsPerManifestation,index)=>holdingsPerManifestation.holdings.map((holding=>({manifestation:manifestations[index],holding}))))).flat(),allBranches=data.map((item=>item.holdings.map((holding=>holding.branch.branchId)))).flat();let finalData=Array.from(new Set(allBranches)).map((branch=>pairedManifestationsWithBranches.filter((manifestationWithBranch=>manifestationWithBranch.holding.branch.branchId===branch))));function orderManifestationHoldingsAlphabetically(a,b){return a[0].holding.branch.title.localeCompare(b[0].holding.branch.title,"da-DK")}selectedPeriodical&&(finalData=finalData.map((branchManifestationHoldings=>branchManifestationHoldings.map((manifestationHoldings=>({...manifestationHoldings,holding:{...manifestationHoldings.holding,materials:manifestationHoldings.holding.materials.filter((material=>{var _material$periodical;return(null===(_material$periodical=material.periodical)||void 0===_material$periodical?void 0:_material$periodical.volumeNumber)===selectedPeriodical.volumeNumber&&material.periodical.volumeYear===selectedPeriodical.volumeYear}))}}))).filter((manifestationHoldings=>null!==manifestationHoldings)))));const[availableManifestationHoldings,unavailableManifestationHoldings]=partition_default()(finalData,helper.WJ),finalDataToShow=availableManifestationHoldings.sort(((a,b)=>orderManifestationHoldingsAlphabetically(a,b))).concat(unavailableManifestationHoldings.sort(((a,b)=>orderManifestationHoldingsAlphabetically(a,b)))).sort((manifestationHolding=>manifestationHolding[0].holding.branch.branchId.endsWith("00")?-1:1));return react.createElement(react.Fragment,null,react.createElement("h2",{className:"text-header-h2 modal-find-on-shelf__headline"},title,author&&` / ${author}`),isPeriodical&&selectedPeriodical&&react.createElement(find_on_shelf_FindOnShelfPeriodicalDropdowns,{manifestationsHoldings:data,setSelectedPeriodical,selectedPeriodical}),isLoading&&react.createElement("p",{className:"text-body-large ml-16 mt-96"},t("loadingText")),!isLoading&&react.createElement(react.Fragment,null,react.createElement("div",{className:"text-small-caption modal-find-on-shelf__caption"},`${(0,helper.rM)(finalDataToShow)} ${t("librariesHaveTheMaterialText")}`),finalDataToShow.map((libraryBranch=>react.createElement(disclosure.Z,{key:libraryBranch[0].holding.branch.branchId,open:1===finalData.length,className:"disclosure--full-width",dataCy:"find-on-shelf-modal-body-disclosure",summary:react.createElement(DisclosureSummary.Z,{title:libraryBranch[0].holding.branch.title,isAvailable:(0,helper.WJ)(libraryBranch)})},react.createElement(find_on_shelf_FindOnShelfManifestationList,{libraryBranchHoldings:libraryBranch}))))))},find_on_shelf_FindOnShelfModalBody=FindOnShelfModalBody;try{findOnShelfModalId.displayName="findOnShelfModalId",findOnShelfModalId.__docgenInfo={description:"",displayName:"findOnShelfModalId",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/find-on-shelf/FindOnShelfModalBody.tsx#findOnShelfModalId"]={docgenInfo:findOnShelfModalId.__docgenInfo,name:"findOnShelfModalId",path:"src/components/find-on-shelf/FindOnShelfModalBody.tsx#findOnShelfModalId"})}catch(__react_docgen_typescript_loader_error){}try{FindOnShelfModalBody.displayName="FindOnShelfModalBody",FindOnShelfModalBody.__docgenInfo={description:"",displayName:"FindOnShelfModalBody",props:{manifestations:{defaultValue:null,description:"",name:"manifestations",required:!0,type:{name:"Manifestation[]"}},workTitles:{defaultValue:null,description:"",name:"workTitles",required:!0,type:{name:"string[]"}},authors:{defaultValue:null,description:"",name:"authors",required:!0,type:{name:'({ __typename: "Corporation"; display: string; } | { __typename: "Person"; display: string; })[]'}},selectedPeriodical:{defaultValue:null,description:"",name:"selectedPeriodical",required:!0,type:{name:"PeriodicalEdition | null"}},setSelectedPeriodical:{defaultValue:null,description:"",name:"setSelectedPeriodical",required:!0,type:{name:"(selectedPeriodical: PeriodicalEdition) => void"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/find-on-shelf/FindOnShelfModalBody.tsx#FindOnShelfModalBody"]={docgenInfo:FindOnShelfModalBody.__docgenInfo,name:"FindOnShelfModalBody",path:"src/components/find-on-shelf/FindOnShelfModalBody.tsx#FindOnShelfModalBody"})}catch(__react_docgen_typescript_loader_error){}const FindOnShelfModal_findOnShelfModalId=faustIds=>(0,modal_helpers.V$)("find-on-shelf-modal",faustIds.sort()),FindOnShelfModal=({manifestations,workTitles,authors,selectedPeriodical,setSelectedPeriodical})=>{const t=(0,utils_text.X)(),faustIds=(0,general.vH)(manifestations),modalId=`${FindOnShelfModal_findOnShelfModalId(faustIds)}`;return react.createElement(modal.Z,{modalId,screenReaderModalDescriptionText:t("findOnShelfModalScreenReaderModalDescriptionText"),closeModalAriaLabelText:t("findOnShelfModalCloseModalAriaLabelText"),classNames:"modal-details modal-find-on-shelf"},react.createElement(find_on_shelf_FindOnShelfModalBody,{manifestations,workTitles,authors,selectedPeriodical,setSelectedPeriodical}))},find_on_shelf_FindOnShelfModal=FindOnShelfModal;try{FindOnShelfModal_findOnShelfModalId.displayName="findOnShelfModalId",FindOnShelfModal_findOnShelfModalId.__docgenInfo={description:"",displayName:"findOnShelfModalId",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/find-on-shelf/FindOnShelfModal.tsx#findOnShelfModalId"]={docgenInfo:FindOnShelfModal_findOnShelfModalId.__docgenInfo,name:"findOnShelfModalId",path:"src/components/find-on-shelf/FindOnShelfModal.tsx#findOnShelfModalId"})}catch(__react_docgen_typescript_loader_error){}try{FindOnShelfModal.displayName="FindOnShelfModal",FindOnShelfModal.__docgenInfo={description:"",displayName:"FindOnShelfModal",props:{manifestations:{defaultValue:null,description:"",name:"manifestations",required:!0,type:{name:"Manifestation[]"}},workTitles:{defaultValue:null,description:"",name:"workTitles",required:!0,type:{name:"string[]"}},authors:{defaultValue:null,description:"",name:"authors",required:!0,type:{name:'({ __typename: "Corporation"; display: string; } | { __typename: "Person"; display: string; })[]'}},selectedPeriodical:{defaultValue:null,description:"",name:"selectedPeriodical",required:!0,type:{name:"PeriodicalEdition | null"}},setSelectedPeriodical:{defaultValue:null,description:"",name:"setSelectedPeriodical",required:!0,type:{name:"(selectedPeriodical: PeriodicalEdition) => void"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/find-on-shelf/FindOnShelfModal.tsx#FindOnShelfModal"]={docgenInfo:FindOnShelfModal.__docgenInfo,name:"FindOnShelfModal",path:"src/components/find-on-shelf/FindOnShelfModal.tsx#FindOnShelfModal"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/guarded-app.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),react_redux__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/react-redux/es/index.js"),_core_guardedRequests_slice__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/core/guardedRequests.slice.ts"),_core_utils_helpers_date__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/core/utils/helpers/date.ts"),_core_utils_helpers_url__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./src/core/utils/helpers/url.ts"),_core_utils_helpers_user__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/core/utils/helpers/user.ts");const __WEBPACK_DEFAULT_EXPORT__=({app,children})=>{const dispatch=(0,react_redux__WEBPACK_IMPORTED_MODULE_1__.I0)(),{request:persistedRequest}=(0,react_redux__WEBPACK_IMPORTED_MODULE_1__.v9)((state=>state.guardedRequests)),isApplicationBlocked=persistedRequest&&!(0,_core_utils_helpers_user__WEBPACK_IMPORTED_MODULE_4__.TF)(),didAuthenticate=(0,_core_utils_helpers_url__WEBPACK_IMPORTED_MODULE_5__.wo)(_core_guardedRequests_slice__WEBPACK_IMPORTED_MODULE_2__.SF);return console.debug("PERSISTED REQUEST:",persistedRequest),(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)((()=>{persistedRequest&&(console.debug("HAS REQUEST EXPIRED?",(0,_core_guardedRequests_slice__WEBPACK_IMPORTED_MODULE_2__.qC)(persistedRequest)),console.debug("CURRENT TIMESTAMP",(0,_core_utils_helpers_date__WEBPACK_IMPORTED_MODULE_3__.ZP)()),console.debug("EXPIRE TIMESTAMP",persistedRequest.expire),(0,_core_guardedRequests_slice__WEBPACK_IMPORTED_MODULE_2__.qC)(persistedRequest)&&dispatch((0,_core_guardedRequests_slice__WEBPACK_IMPORTED_MODULE_2__.yQ)()))}),[dispatch,persistedRequest]),(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)((()=>{if(!isApplicationBlocked)return;const{app:persistedRequestApp}=persistedRequest;didAuthenticate&&app===persistedRequestApp&&(dispatch((0,_core_guardedRequests_slice__WEBPACK_IMPORTED_MODULE_2__.fG)(persistedRequest)),(0,_core_utils_helpers_url__WEBPACK_IMPORTED_MODULE_5__.oC)(_core_guardedRequests_slice__WEBPACK_IMPORTED_MODULE_2__.SF),dispatch((0,_core_guardedRequests_slice__WEBPACK_IMPORTED_MODULE_2__.yQ)()))}),[app,didAuthenticate,dispatch,isApplicationBlocked,persistedRequest]),isApplicationBlocked?react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",null):react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment,null,children)};try{guardedapp.displayName="guardedapp",guardedapp.__docgenInfo={description:"",displayName:"guardedapp",props:{app:{defaultValue:null,description:"",name:"app",required:!0,type:{name:"enum",value:[{value:'"material"'},{value:'"search-result"'},{value:'"advanced-search"'},{value:'"recommender"'},{value:'"something-similar"'},{value:'"favorites-list-mc"'},{value:'"inspiration-recommender"'}]}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/guarded-app.tsx#guardedapp"]={docgenInfo:guardedapp.__docgenInfo,name:"guardedapp",path:"src/components/guarded-app.tsx#guardedapp"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/hello/hello.dev.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{HelloAnimal:()=>HelloAnimal,HelloHuman:()=>HelloHuman,HelloWorld:()=>HelloWorld,default:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_hello__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/components/hello/hello.tsx");const WrappedHello=(0,__webpack_require__("./src/core/utils/text.tsx").z)(_hello__WEBPACK_IMPORTED_MODULE_1__.q),__WEBPACK_DEFAULT_EXPORT__={title:"Components/Hello",component:WrappedHello,argTypes:{whatText:{defaultValue:"world",control:{type:"text"}},shouldBeEmphasized:{defaultValue:!0}}},Template=props=>react__WEBPACK_IMPORTED_MODULE_0__.createElement(WrappedHello,props),HelloWorld=Template.bind({}),HelloHuman=Template.bind({});HelloWorld.args={whatText:"human"};const HelloAnimal=Template.bind({});HelloWorld.args={whatText:"animal"}},"./src/components/hello/hello.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{q:()=>Hello});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_core_utils_text__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/core/utils/text.tsx");const Hello=({shouldBeEmphasized})=>{const t=(0,_core_utils_text__WEBPACK_IMPORTED_MODULE_1__.X)();return react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment,null,"Hello"," ",shouldBeEmphasized?react__WEBPACK_IMPORTED_MODULE_0__.createElement("strong",null,t("whatText")):t("whatText"),"!")};try{Hello.displayName="Hello",Hello.__docgenInfo={description:"",displayName:"Hello",props:{shouldBeEmphasized:{defaultValue:null,description:"",name:"shouldBeEmphasized",required:!0,type:{name:"boolean"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/hello/hello.tsx#Hello"]={docgenInfo:Hello.__docgenInfo,name:"Hello",path:"src/components/hello/hello.tsx#Hello"})}catch(__react_docgen_typescript_loader_error){}try{hello.displayName="hello",hello.__docgenInfo={description:"",displayName:"hello",props:{shouldBeEmphasized:{defaultValue:null,description:"",name:"shouldBeEmphasized",required:!0,type:{name:"boolean"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/hello/hello.tsx#hello"]={docgenInfo:hello.__docgenInfo,name:"hello",path:"src/components/hello/hello.tsx#hello"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/horizontal-term-line/HorizontalTermLine.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>horizontal_term_line_HorizontalTermLine});var react=__webpack_require__("./node_modules/react/index.js"),Link=__webpack_require__("./src/components/atoms/links/Link.tsx"),clsx=__webpack_require__("./node_modules/clsx/dist/clsx.mjs"),ExpandMore=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/ExpandMore.svg"),ExpandMore_default=__webpack_require__.n(ExpandMore),utils_text=__webpack_require__("./src/core/utils/text.tsx");const ButtonExpand=({showMore,setShowMore})=>{const t=(0,utils_text.X)();return react.createElement("button",{className:"button-expand",type:"button",onClick:()=>setShowMore(!showMore),"aria-label":t("expandMoreText")},react.createElement("img",{className:(0,clsx.Z)("button-expand__image",{"button-expand__image--expanded":showMore}),src:ExpandMore_default(),alt:""}))},button_expand_ButtonExpand=ButtonExpand;try{ButtonExpand.displayName="ButtonExpand",ButtonExpand.__docgenInfo={description:"",displayName:"ButtonExpand",props:{showMore:{defaultValue:null,description:"",name:"showMore",required:!0,type:{name:"boolean"}},setShowMore:{defaultValue:null,description:"",name:"setShowMore",required:!0,type:{name:"(showMore: boolean) => void"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/button-expand/ButtonExpand.tsx#ButtonExpand"]={docgenInfo:ButtonExpand.__docgenInfo,name:"ButtonExpand",path:"src/components/button-expand/ButtonExpand.tsx#ButtonExpand"})}catch(__react_docgen_typescript_loader_error){}const HorizontalTermLine=({title,subTitle,linkList,dataCy="horizontal-term-line"})=>{const[showMore,setShowMore]=(0,react.useState)(!1),itemsToShow=showMore?linkList:linkList.slice(0,3),showMoreButton=linkList.length>3;return 0===linkList.length?null:react.createElement("div",{"data-cy":dataCy,className:"text-small-caption horizontal-term-line"},react.createElement("h3",{className:"text-label-bold"},title||""," ",subTitle&&react.createElement("span",{className:"text-small-caption"},` ${subTitle}`)),itemsToShow.map((item=>{const{term,url}=item;return react.createElement("span",{key:term},react.createElement(Link.Z,{href:url,className:"link-tag"},term))})),showMoreButton&&react.createElement(button_expand_ButtonExpand,{showMore,setShowMore}))},horizontal_term_line_HorizontalTermLine=HorizontalTermLine;try{HorizontalTermLine.displayName="HorizontalTermLine",HorizontalTermLine.__docgenInfo={description:"",displayName:"HorizontalTermLine",props:{title:{defaultValue:null,description:"",name:"title",required:!0,type:{name:"string"}},subTitle:{defaultValue:null,description:"",name:"subTitle",required:!1,type:{name:"string | undefined"}},linkList:{defaultValue:null,description:"",name:"linkList",required:!0,type:{name:"{ url: URL; term: string; }[]"}},dataCy:{defaultValue:{value:"horizontal-term-line"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/horizontal-term-line/HorizontalTermLine.tsx#HorizontalTermLine"]={docgenInfo:HorizontalTermLine.__docgenInfo,name:"HorizontalTermLine",path:"src/components/horizontal-term-line/HorizontalTermLine.tsx#HorizontalTermLine"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/list-details/list-details.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_core_utils_text__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/core/utils/text.tsx");const __WEBPACK_DEFAULT_EXPORT__=({icon,title,labels,showSelect,setShowSelect,idForLabelledBy,children})=>{const t=(0,_core_utils_text__WEBPACK_IMPORTED_MODULE_1__.X)();return react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"list-details","data-cy":"reservation-form-list-item"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"list-details__icon"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("img",{src:icon,alt:""})),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"list-details__container"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",null,react__WEBPACK_IMPORTED_MODULE_0__.createElement("h3",{className:"text-header-h5",id:idForLabelledBy},title),"string"==typeof labels&&react__WEBPACK_IMPORTED_MODULE_0__.createElement("p",{className:"text-small-caption"},labels),"string"!=typeof labels&&labels.map((label=>react__WEBPACK_IMPORTED_MODULE_0__.createElement("p",{key:label,className:"text-small-caption"},label)))),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"list-details__dropdown"},children)),null!==showSelect&&!showSelect&&setShowSelect&&react__WEBPACK_IMPORTED_MODULE_0__.createElement("button",{type:"button",className:"link-tag",onClick:()=>setShowSelect(!0)},t("reservationDetailsChangeText")))};try{listdetails.displayName="listdetails",listdetails.__docgenInfo={description:"",displayName:"listdetails",props:{icon:{defaultValue:null,description:"",name:"icon",required:!0,type:{name:"string"}},title:{defaultValue:null,description:"",name:"title",required:!0,type:{name:"string"}},labels:{defaultValue:null,description:"",name:"labels",required:!0,type:{name:"string | string[]"}},showSelect:{defaultValue:null,description:"",name:"showSelect",required:!1,type:{name:"boolean | undefined"}},setShowSelect:{defaultValue:null,description:"",name:"setShowSelect",required:!1,type:{name:"((show: boolean) => void) | undefined"}},idForLabelledBy:{defaultValue:null,description:"",name:"idForLabelledBy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/list-details/list-details.tsx#listdetails"]={docgenInfo:listdetails.__docgenInfo,name:"listdetails",path:"src/components/list-details/list-details.tsx#listdetails"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/material/material-buttons/generic/MaterialButtonLoading.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_core_utils_text__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/core/utils/text.tsx"),_Buttons_Button__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/components/Buttons/Button.tsx");const MaterialButtonLoading=({size,classNames})=>{const t=(0,_core_utils_text__WEBPACK_IMPORTED_MODULE_1__.X)();return react__WEBPACK_IMPORTED_MODULE_0__.createElement(_Buttons_Button__WEBPACK_IMPORTED_MODULE_2__.z,{label:t("loadingText"),buttonType:"none",variant:"filled",disabled:!0,collapsible:!1,size:size||"large",classNames:classNames||""})},__WEBPACK_DEFAULT_EXPORT__=MaterialButtonLoading;try{MaterialButtonLoading.displayName="MaterialButtonLoading",MaterialButtonLoading.__docgenInfo={description:"",displayName:"MaterialButtonLoading",props:{size:{defaultValue:null,description:"",name:"size",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"xsmall"'},{value:'"small"'},{value:'"medium"'},{value:'"large"'},{value:'"xlarge"'}]}},classNames:{defaultValue:null,description:"",name:"classNames",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/material-buttons/generic/MaterialButtonLoading.tsx#MaterialButtonLoading"]={docgenInfo:MaterialButtonLoading.__docgenInfo,name:"MaterialButtonLoading",path:"src/components/material/material-buttons/generic/MaterialButtonLoading.tsx#MaterialButtonLoading"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/material/material-buttons/helper.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{M0:()=>hasCorrectAccess,g0:()=>isArticle,ie:()=>hasCorrectAccessType,zn:()=>hasCorrectMaterialType});var _core_utils_types_material_type__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/core/utils/types/material-type.ts");const hasCorrectAccess=(desiredAccess,manifestations)=>manifestations.some((manifestation=>manifestation.access.some((({__typename})=>__typename.toLowerCase()===desiredAccess.toLowerCase())))),hasCorrectAccessType=(desiredAccessType,manifestations)=>manifestations.some((manifestation=>manifestation.accessTypes.some((type=>type.code===desiredAccessType)))),hasCorrectMaterialType=(desiredMaterialType,manifestations)=>manifestations.some((manifestation=>manifestation.materialTypes.some((type=>type.specific.toLowerCase()===desiredMaterialType.toLowerCase())))),isArticle=manifestations=>hasCorrectMaterialType(_core_utils_types_material_type__WEBPACK_IMPORTED_MODULE_0__.XK.article,manifestations)||hasCorrectMaterialType("avisartikel",manifestations)},"./src/components/material/material-buttons/physical/MaterialButtonsFindOnShelf.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_core_utils_modal__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/core/utils/modal.tsx"),_core_utils_text__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/core/utils/text.tsx"),_Buttons_Button__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/components/Buttons/Button.tsx"),_find_on_shelf_FindOnShelfModal__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/components/find-on-shelf/FindOnShelfModal.tsx");const MaterialButtonsFindOnShelf=({size,faustIds,dataCy="material-buttons-find-on-shelf"})=>{const t=(0,_core_utils_text__WEBPACK_IMPORTED_MODULE_2__.X)(),{open}=(0,_core_utils_modal__WEBPACK_IMPORTED_MODULE_1__.f)(),modalId=(0,_find_on_shelf_FindOnShelfModal__WEBPACK_IMPORTED_MODULE_4__.e)(faustIds),onClick=()=>{open(modalId)};return"small"!==size?react__WEBPACK_IMPORTED_MODULE_0__.createElement(_Buttons_Button__WEBPACK_IMPORTED_MODULE_3__.z,{label:t("findOnBookshelfText"),buttonType:"none",variant:"outline",disabled:!1,collapsible:!1,size:"large",onClick,dataCy}):react__WEBPACK_IMPORTED_MODULE_0__.createElement("button",{className:"link-tag text-small-caption material-manifestation-item__find capitalize-all btn-ui","aria-describedby":t("findOnShelfExpandButtonExplanationText"),onClick,onKeyUp:e=>{"Enter"===e.key&&onClick()},tabIndex:0,type:"button","data-cy":dataCy},t("findOnBookshelfText"))},__WEBPACK_DEFAULT_EXPORT__=MaterialButtonsFindOnShelf;try{MaterialButtonsFindOnShelf.displayName="MaterialButtonsFindOnShelf",MaterialButtonsFindOnShelf.__docgenInfo={description:"",displayName:"MaterialButtonsFindOnShelf",props:{size:{defaultValue:null,description:"",name:"size",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"xsmall"'},{value:'"small"'},{value:'"medium"'},{value:'"large"'},{value:'"xlarge"'}]}},faustIds:{defaultValue:null,description:"",name:"faustIds",required:!0,type:{name:"`${number}`[]"}},dataCy:{defaultValue:{value:"material-buttons-find-on-shelf"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/material-buttons/physical/MaterialButtonsFindOnShelf.tsx#MaterialButtonsFindOnShelf"]={docgenInfo:MaterialButtonsFindOnShelf.__docgenInfo,name:"MaterialButtonsFindOnShelf",path:"src/components/material/material-buttons/physical/MaterialButtonsFindOnShelf.tsx#MaterialButtonsFindOnShelf"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/material/periodical/helper.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{P5:()=>getLatestEditionFromYear,ik:()=>filterAndSortPeriodicalEditions,sW:()=>handleSelectYear,ul:()=>handleSelectEdition,wf:()=>makePeriodicalEditionsFromHoldings});var lodash_uniq__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/lodash/uniq.js"),lodash_uniq__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(lodash_uniq__WEBPACK_IMPORTED_MODULE_0__),lodash_mapValues__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/lodash/mapValues.js"),lodash_mapValues__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(lodash_mapValues__WEBPACK_IMPORTED_MODULE_1__);const getLatestEditionFromYear=(year,groupList)=>groupList[year][groupList[year].length-1];function makePeriodicalEditionsFromHoldings(holdings){return holdings.map((holding=>holding.materials.flat().map((material=>({...material.periodical,itemNumber:material.itemNumber}))))).flat()}function filterAndSortPeriodicalEditions(baseData){const yearVolumes=lodash_mapValues__WEBPACK_IMPORTED_MODULE_1___default()(baseData,(editions=>editions.map((edition=>edition.volumeNumber)))),yearVolumesSorted=lodash_mapValues__WEBPACK_IMPORTED_MODULE_1___default()(yearVolumes,(volumes=>volumes.filter((volume=>!!volume)).sort(((a,b)=>a.localeCompare(b,"da-DK",{numeric:!0})))));return lodash_mapValues__WEBPACK_IMPORTED_MODULE_1___default()(yearVolumesSorted,(volumes=>lodash_uniq__WEBPACK_IMPORTED_MODULE_0___default()(volumes)))}function handleSelectEdition(groupList,year,editionToMatch,selectPeriodicalHandler){const changedFullPeriodicalEdition=groupList[year].find((edition=>edition.volumeNumber===editionToMatch));changedFullPeriodicalEdition&&selectPeriodicalHandler(changedFullPeriodicalEdition)}function handleSelectYear(year,setYear,selectPeriodicalHandler,periodicalEditions,groupList){setYear(year);handleSelectEdition(groupList,year,getLatestEditionFromYear(year,periodicalEditions),selectPeriodicalHandler)}},"./src/components/message/modal-message/ModalMessage.dev.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{ModalMessageExample:()=>ModalMessageExample,default:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_core_utils_modal__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/core/utils/modal.tsx"),_ModalMessage__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/components/message/modal-message/ModalMessage.tsx");function _extends(){return _extends=Object.assign?Object.assign.bind():function(target){for(var i=1;i{const{open}=(0,_core_utils_modal__WEBPACK_IMPORTED_MODULE_1__.f)();return(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)((()=>{open("modal-message")}),[open]),react__WEBPACK_IMPORTED_MODULE_0__.createElement(_core_utils_modal__WEBPACK_IMPORTED_MODULE_1__.Z,{modalId:"modal-message",closeModalAriaLabelText:"close",screenReaderModalDescriptionText:"modal message story",classNames:"modal-cta modal-padding"},react__WEBPACK_IMPORTED_MODULE_0__.createElement(_ModalMessage__WEBPACK_IMPORTED_MODULE_2__.Z,_extends({},props,{ctaButton:{modalId:"modal-message",text:"Man"}}),react__WEBPACK_IMPORTED_MODULE_0__.createElement("p",null,"Hello, I am some extra info")))}).bind({})},"./src/components/message/modal-message/ModalMessage.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>modal_message_ModalMessage});var react=__webpack_require__("./node_modules/react/index.js"),focus_trap_react=__webpack_require__("./node_modules/focus-trap-react/dist/focus-trap-react.js"),focus_trap_react_default=__webpack_require__.n(focus_trap_react);try{withFocusTrap.displayName="withFocusTrap",withFocusTrap.__docgenInfo={description:"",displayName:"withFocusTrap",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/utils/withFocusTrap.tsx#withFocusTrap"]={docgenInfo:withFocusTrap.__docgenInfo,name:"withFocusTrap",path:"src/core/utils/withFocusTrap.tsx#withFocusTrap"})}catch(__react_docgen_typescript_loader_error){}const Message=({children,title,subTitle})=>react.createElement(react.Fragment,null,react.createElement("h2",{"data-cy":"message-title",className:"text-header-h2"},title),react.createElement("div",{className:"color-secondary-gray text-body-medium-regular mt-48"},react.createElement("p",{"data-cy":"message-subtitle"},subTitle)),children&&react.createElement("div",null,children)),modal_message_Message=Message;try{Message.displayName="Message",Message.__docgenInfo={description:"",displayName:"Message",props:{title:{defaultValue:null,description:"",name:"title",required:!0,type:{name:"string"}},subTitle:{defaultValue:null,description:"",name:"subTitle",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/message/modal-message/Message.tsx#Message"]={docgenInfo:Message.__docgenInfo,name:"Message",path:"src/components/message/modal-message/Message.tsx#Message"})}catch(__react_docgen_typescript_loader_error){}var Button=__webpack_require__("./src/components/Buttons/Button.tsx"),modal=__webpack_require__("./src/core/utils/modal.tsx");const ModalMessage=react.forwardRef((props=>{const{close,closeAll}=(0,modal.f)(),{ctaButton,...messageProps}=props;return react.createElement("div",{className:"modal-cta__container"},react.createElement(modal_message_Message,messageProps),react.createElement("div",{className:"modal-cta__buttons mt-48"},ctaButton&&react.createElement(Button.z,{dataCy:ctaButton.dataCy??"modal-cta-button",classNames:"modal-message__confirm-button",label:ctaButton.text,buttonType:"none",disabled:!1,collapsible:!1,size:"small",variant:"filled",onClick:()=>{ctaButton.callback&&ctaButton.callback(),ctaButton.modalId&&close(ctaButton.modalId),ctaButton.closeAllModals&&closeAll()}})))})),modal_message_ModalMessage=(Component=ModalMessage,({withFocusTrap,...props})=>react.createElement(focus_trap_react_default(),{focusTrapOptions:{allowOutsideClick:!0}},react.createElement(Component,props)));var Component;try{ModalMessage.displayName="ModalMessage",ModalMessage.__docgenInfo={description:"",displayName:"ModalMessage",props:{ctaButton:{defaultValue:null,description:"",name:"ctaButton",required:!1,type:{name:"({ text: string; callback?: (() => void) | undefined; dataCy?: string | undefined; } & (RequiredModalId | RequireCloseAllModals)) | undefined"}},title:{defaultValue:null,description:"",name:"title",required:!0,type:{name:"string"}},subTitle:{defaultValue:null,description:"",name:"subTitle",required:!0,type:{name:"string"}},withFocusTrap:{defaultValue:null,description:"",name:"withFocusTrap",required:!1,type:{name:"boolean | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/message/modal-message/ModalMessage.tsx#ModalMessage"]={docgenInfo:ModalMessage.__docgenInfo,name:"ModalMessage",path:"src/components/message/modal-message/ModalMessage.tsx#ModalMessage"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/modal-details-header/modal-details-header.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_cover_cover__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/components/cover/cover.tsx");const __WEBPACK_DEFAULT_EXPORT__=({authors,year,title,pid,description,materialType,isbnForCover,periodical,series,children})=>{const coverId=pid||isbnForCover;return react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"modal-details__header"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"modal-details__cover"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"material-container"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("span",{className:"material material--large bg-identity-tint-120 material__animate"},react__WEBPACK_IMPORTED_MODULE_0__.createElement(_cover_cover__WEBPACK_IMPORTED_MODULE_1__.Y,{id:coverId,idType:pid?"pid":"isbn",size:"large",animate:!1,description:description||""})))),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"modal-details__material"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"modal-details__tags"},materialType&&react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"status-label status-label--outline"},materialType),children),react__WEBPACK_IMPORTED_MODULE_0__.createElement("h2",{className:"modal-details__title text-header-h2"},title),react__WEBPACK_IMPORTED_MODULE_0__.createElement("p",{className:"text-body-medium-regular","data-cy":"modal-authors"},authors,year&&react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment,null," (",year,")")),periodical&&react__WEBPACK_IMPORTED_MODULE_0__.createElement("p",{className:"text-body-medium-regular"},periodical),series&&react__WEBPACK_IMPORTED_MODULE_0__.createElement("p",{"data-cy":"modal-series",className:"text-body-medium-regular"},series)))};try{modaldetailsheader.displayName="modaldetailsheader",modaldetailsheader.__docgenInfo={description:"",displayName:"modaldetailsheader",props:{authors:{defaultValue:null,description:"",name:"authors",required:!0,type:{name:"string | null | undefined"}},year:{defaultValue:null,description:"",name:"year",required:!0,type:{name:"string | null | undefined"}},title:{defaultValue:null,description:"",name:"title",required:!0,type:{name:"string | null | undefined"}},pid:{defaultValue:null,description:"",name:"pid",required:!1,type:{name:"`${number}-${string}:${number}` | null | undefined"}},description:{defaultValue:null,description:"",name:"description",required:!0,type:{name:"string | null | undefined"}},materialType:{defaultValue:null,description:"",name:"materialType",required:!0,type:{name:"string | null | undefined"}},isbnForCover:{defaultValue:null,description:"",name:"isbnForCover",required:!0,type:{name:"string"}},periodical:{defaultValue:null,description:"",name:"periodical",required:!1,type:{name:"string | null | undefined"}},series:{defaultValue:null,description:"",name:"series",required:!1,type:{name:"string | null | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/modal-details-header/modal-details-header.tsx#modaldetailsheader"]={docgenInfo:modaldetailsheader.__docgenInfo,name:"modaldetailsheader",path:"src/components/modal-details-header/modal-details-header.tsx#modaldetailsheader"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/multiselect/Multiselect.dev.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Default:()=>Default,MultipleSelected:()=>MultipleSelected,SingleSelected:()=>SingleSelected,default:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_Multiselect__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/components/multiselect/Multiselect.tsx");const options=[{item:"First item",value:"1"},{item:"2. item",value:"2"},{item:"III",value:"3"}],__WEBPACK_DEFAULT_EXPORT__={title:"Components / Multiselect",component:_Multiselect__WEBPACK_IMPORTED_MODULE_1__.Z,argTypes:{caption:{name:"Caption",control:{type:"text"}},updateExternalState:{table:{disable:!0}}},args:{caption:"Title",options}},Template=args=>react__WEBPACK_IMPORTED_MODULE_0__.createElement(_Multiselect__WEBPACK_IMPORTED_MODULE_1__.Z,args),Default=Template.bind({}),SingleSelected=Template.bind({});SingleSelected.args={defaultValue:options.slice(0,1)};const MultipleSelected=Template.bind({});MultipleSelected.args={defaultValue:options.slice(0,2)}},"./src/components/multiselect/Multiselect.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>multiselect_Multiselect});var react=__webpack_require__("./node_modules/react/index.js"),ExpandMore=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/ExpandMore.svg"),ExpandMore_default=__webpack_require__.n(ExpandMore),downshift_esm=__webpack_require__("./node_modules/downshift/dist/downshift.esm.js"),clsx=__webpack_require__("./node_modules/clsx/dist/clsx.mjs"),useClickAway=__webpack_require__("./node_modules/react-use/esm/useClickAway.js"),useDeepCompareEffect=__webpack_require__("./node_modules/react-use/esm/useDeepCompareEffect.js"),Checkbox=__webpack_require__("./src/components/checkbox/Checkbox.tsx");const multiselect_useMultiselectOptions=function useMultiselectOptions(options,allOption){return{allOptions:[allOption,...options]}};var utils_text=__webpack_require__("./src/core/utils/text.tsx");function _extends(){return _extends=Object.assign?Object.assign.bind():function(target){for(var i=1;i{const t=(0,utils_text.X)(),ref=(0,react.useRef)(null),[isDropdownOpen,setIsDropdownOpen]=(0,react.useState)(!1),updateState=(updateKey,value)=>{updateExternalState&&updateKey&&updateExternalState.externalUpdateFunction({key:updateKey,value})},{allOptions}=multiselect_useMultiselectOptions(options,{item:"multiselectAllOptionText",value:"all"}),initialSelectedOptions=defaultValue.length>0?defaultValue:allOptions.slice(0,1),{getDropdownProps,setSelectedItems,selectedItems}=(0,downshift_esm.M$)({initialSelectedItems:initialSelectedOptions});(0,useClickAway.Z)(ref,(()=>{setIsDropdownOpen(!1)})),(0,useDeepCompareEffect.Z)((()=>{setSelectedItems(initialSelectedOptions)}),[setSelectedItems,initialSelectedOptions]);const{getToggleButtonProps,getMenuProps,highlightedIndex,getItemProps}=((isDropdownOpen,allOptions,selectedItems,setSelectedItems,handleSelectedItems)=>(0,downshift_esm.L7)({isOpen:isDropdownOpen,selectedItem:null,items:allOptions,stateReducer:(state,actionAndChanges)=>{const{changes,type}=actionAndChanges;switch(type){case downshift_esm.L7.stateChangeTypes.MenuKeyDownEnter:case downshift_esm.L7.stateChangeTypes.MenuKeyDownSpaceButton:case downshift_esm.L7.stateChangeTypes.ItemClick:return{...changes,isOpen:!0}}return changes},onStateChange:({type,selectedItem:newSelectedItem})=>{switch(type){case downshift_esm.L7.stateChangeTypes.MenuKeyDownSpaceButton:case downshift_esm.L7.stateChangeTypes.ItemClick:case downshift_esm.L7.stateChangeTypes.MenuKeyDownEnter:if(newSelectedItem&&!selectedItems.find((item=>item.value===newSelectedItem.value)))return void setSelectedItems(handleSelectedItems(selectedItems,newSelectedItem,allOptions.length));if(newSelectedItem&&selectedItems.find((item=>item.value===newSelectedItem.value))){if(1===selectedItems.length)return;const newSelectedItems=selectedItems.filter((item=>item.value!==newSelectedItem.value));setSelectedItems(handleSelectedItems(newSelectedItems,null,allOptions.length))}}}}))(isDropdownOpen,allOptions,selectedItems,setSelectedItems,((allCurrentlySelected,newSelected,allPossibleOptions)=>newSelected?allCurrentlySelected.find((item=>"all"===item.value))&&"all"!==newSelected.value?((selectedItems,newSelected,updateState,updateExternalState,setSelectedItems)=>{const newValue=[...selectedItems.filter((item=>"all"!==item.value)),newSelected];return updateState(null==updateExternalState?void 0:updateExternalState.key,newValue),setSelectedItems(newValue),newValue})(allCurrentlySelected,newSelected,updateState,updateExternalState,setSelectedItems):"all"!==newSelected.value&&[...allCurrentlySelected,newSelected].length===allPossibleOptions-1?((updateState,updateExternalState,setSelectedItems)=>{const newValue=[{item:"multiselectAllOptionText",value:"all"}];return updateState(null==updateExternalState?void 0:updateExternalState.key,newValue),setSelectedItems(newValue),newValue})(updateState,updateExternalState,setSelectedItems):"all"===newSelected.value?(updateState(null==updateExternalState?void 0:updateExternalState.key,[newSelected]),setSelectedItems([newSelected]),[newSelected]):((selectedItems,newSelected,updateState,updateExternalState,setSelectedItems)=>(updateState(null==updateExternalState?void 0:updateExternalState.key,[...selectedItems,newSelected]),setSelectedItems([...selectedItems,newSelected]),[...selectedItems,newSelected]))(selectedItems,newSelected,updateState,updateExternalState,setSelectedItems):((newSelected,updateState,updateExternalState,setSelectedItems)=>(updateState(null==updateExternalState?void 0:updateExternalState.key,newSelected),setSelectedItems(newSelected),newSelected))(allCurrentlySelected,updateState,updateExternalState,setSelectedItems)));return react.createElement(react.Fragment,null,caption&&react.createElement("div",{className:"multiselect__caption"},caption),react.createElement("div",{className:"multiselect",ref,"data-cy":dataCy},react.createElement("button",_extends({type:"button",className:"multiselect focus-styling"},getToggleButtonProps(getDropdownProps({preventKeyAction:isDropdownOpen})),{onClick:()=>{setIsDropdownOpen(!isDropdownOpen)},onKeyUp:e=>{"Enter"===e.key&&setIsDropdownOpen(!isDropdownOpen)}}),react.createElement("div",{className:"multiselect__selected"},selectedItems.map(((singularitem,index)=>(index>0?", ":"")+t(singularitem.item)))),react.createElement("div",{className:"multiselect__opener"},react.createElement("img",{className:(0,clsx.Z)("multiselect__icon",{"dropdown__arrow--bottom":isDropdownOpen}),src:ExpandMore_default(),alt:""}))),react.createElement("ul",_extends({className:"multiselect__options"},getMenuProps(),{style:isDropdownOpen?{}:{display:"none"}}),allOptions.map(((item,index)=>{const downshiftProps={...getItemProps({item,index})};return react.createElement("li",_extends({className:(0,clsx.Z)("multiselect__option",{"multiselect__option--highlighted":highlightedIndex===index}),key:`${item.value}${item.item}`},getItemProps({item,index}),{role:"option","aria-selected":!!selectedItems.find((selected=>selected.value===item.value))}),react.createElement("span",{id:`multiselect-label-${downshiftProps.id}`},t(item.item)),react.createElement("div",{className:"checkbox multiselect__checkbox"},react.createElement(Checkbox.Z,{id:index.toString(),selected:!!selectedItems.find((selected=>selected.value===item.value)),isVisualOnly:!0,labelledBy:`multiselect-label-${downshiftProps.id}`})))})))))},multiselect_Multiselect=Multiselect;try{Multiselect.displayName="Multiselect",Multiselect.__docgenInfo={description:"",displayName:"Multiselect",props:{dataCy:{defaultValue:{value:"multiselect"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}},caption:{defaultValue:null,description:"",name:"caption",required:!1,type:{name:"string | undefined"}},options:{defaultValue:null,description:"",name:"options",required:!0,type:{name:"MultiselectOption[]"}},defaultValue:{defaultValue:{value:"[]"},description:"",name:"defaultValue",required:!1,type:{name:"MultiselectOption[] | undefined"}},updateExternalState:{defaultValue:null,description:"",name:"updateExternalState",required:!1,type:{name:"MultiselectExternalUpdate | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/multiselect/Multiselect.tsx#Multiselect"]={docgenInfo:Multiselect.__docgenInfo,name:"Multiselect",path:"src/components/multiselect/Multiselect.tsx#Multiselect"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/promo-bar/PromoBar.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>promo_bar_PromoBar});var react=__webpack_require__("./node_modules/react/index.js"),clsx=__webpack_require__("./node_modules/clsx/dist/clsx.mjs"),icon_info=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/basic/icon-info.svg"),icon_info_default=__webpack_require__.n(icon_info);const PromoBarIcon=({type})=>"info"===type?react.createElement("img",{src:icon_info_default(),alt:"",className:"ml-4"}):null;try{PromoBarIcon.displayName="PromoBarIcon",PromoBarIcon.__docgenInfo={description:"",displayName:"PromoBarIcon",props:{type:{defaultValue:null,description:"",name:"type",required:!0,type:{name:'"info"'}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/promo-bar/PromoBarIcon.tsx#PromoBarIcon"]={docgenInfo:PromoBarIcon.__docgenInfo,name:"PromoBarIcon",path:"src/components/promo-bar/PromoBarIcon.tsx#PromoBarIcon"})}catch(__react_docgen_typescript_loader_error){}const PromoBar=({text,classNames,type,sticky,theme})=>react.createElement("section",{className:(0,clsx.Z)("promo-bar",classNames,{"promo-bar--sticky":sticky,"promo-bar--dark":"dark"===theme})},type&&react.createElement(PromoBarIcon,{type}),react.createElement("p",{className:"text-small-caption"},text)),promo_bar_PromoBar=PromoBar;try{PromoBar.displayName="PromoBar",PromoBar.__docgenInfo={description:"",displayName:"PromoBar",props:{text:{defaultValue:null,description:"",name:"text",required:!0,type:{name:"string"}},classNames:{defaultValue:null,description:"",name:"classNames",required:!1,type:{name:"string | undefined"}},type:{defaultValue:null,description:"",name:"type",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"info"'}]}},sticky:{defaultValue:null,description:"",name:"sticky",required:!1,type:{name:"boolean | undefined"}},theme:{defaultValue:null,description:"",name:"theme",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"dark"'}]}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/promo-bar/PromoBar.tsx#PromoBar"]={docgenInfo:PromoBar.__docgenInfo,name:"PromoBar",path:"src/components/promo-bar/PromoBar.tsx#PromoBar"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/renewal/RenewalModalMessage.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_core_utils_helpers_renewal__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/core/utils/helpers/renewal.ts"),_message_modal_message_ModalMessage__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/components/message/modal-message/ModalMessage.tsx");const RenewalModalMessage=({messageType,renewingResponse,modalId,setRenewingStatus,texts:{successTitleText,successStatusText,noRenewalsPossibleErrorTitleText,noRenewalsPossibleErrorStatusText,errorTitleText,errorStatusText,buttonText}})=>{const succeededRenewalCount=renewingResponse?(0,_core_utils_helpers_renewal__WEBPACK_IMPORTED_MODULE_1__.r0)(renewingResponse).length:0,showSuccessMessage="success"===messageType&&succeededRenewalCount>0,showNoRenewalsPossibleErrorMessage="success"===messageType&&0===succeededRenewalCount,showErrorMessage="error"===messageType;return react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment,null,showSuccessMessage&&react__WEBPACK_IMPORTED_MODULE_0__.createElement(_message_modal_message_ModalMessage__WEBPACK_IMPORTED_MODULE_2__.Z,{title:successTitleText,subTitle:successStatusText,ctaButton:{text:buttonText,modalId,callback:()=>setRenewingStatus("idle")}}),showNoRenewalsPossibleErrorMessage&&react__WEBPACK_IMPORTED_MODULE_0__.createElement(_message_modal_message_ModalMessage__WEBPACK_IMPORTED_MODULE_2__.Z,{title:noRenewalsPossibleErrorTitleText,subTitle:noRenewalsPossibleErrorStatusText,ctaButton:{text:buttonText,modalId,callback:()=>setRenewingStatus("idle")}}),showErrorMessage&&react__WEBPACK_IMPORTED_MODULE_0__.createElement(_message_modal_message_ModalMessage__WEBPACK_IMPORTED_MODULE_2__.Z,{title:errorTitleText,subTitle:errorStatusText,ctaButton:{text:buttonText,modalId,callback:()=>setRenewingStatus("idle")}}))},__WEBPACK_DEFAULT_EXPORT__=RenewalModalMessage;try{RenewalModalMessage.displayName="RenewalModalMessage",RenewalModalMessage.__docgenInfo={description:"",displayName:"RenewalModalMessage",props:{messageType:{defaultValue:null,description:"",name:"messageType",required:!0,type:{name:"enum",value:[{value:'"success"'},{value:'"error"'}]}},renewingResponse:{defaultValue:null,description:"",name:"renewingResponse",required:!0,type:{name:"RenewedLoanV2[] | null"}},modalId:{defaultValue:null,description:"",name:"modalId",required:!0,type:{name:"string"}},setRenewingStatus:{defaultValue:null,description:"",name:"setRenewingStatus",required:!0,type:{name:"(status: RequestStatus) => void"}},texts:{defaultValue:null,description:"",name:"texts",required:!0,type:{name:"{ successTitleText: string; successStatusText: string; noRenewalsPossibleErrorTitleText: string; noRenewalsPossibleErrorStatusText: string; errorTitleText: string; errorStatusText: string; buttonText: string; }"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/renewal/RenewalModalMessage.tsx#RenewalModalMessage"]={docgenInfo:RenewalModalMessage.__docgenInfo,name:"RenewalModalMessage",path:"src/components/renewal/RenewalModalMessage.tsx#RenewalModalMessage"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/reservation/ReservationFormListItem.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_core_utils_text__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/core/utils/text.tsx");const ReservationFormListItem=({icon,title,text,subText,changeHandler,buttonAriaLabel,isPossibleToChangeReservationDetails=!0})=>{const t=(0,_core_utils_text__WEBPACK_IMPORTED_MODULE_1__.X)();return react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"reservation-modal-list-item","data-cy":"reservation-form-list-item"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("img",{src:icon,alt:""}),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{"data-cy":"reservation-modal-list-item-text",className:"reservation-modal-list-item-text"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("h3",{className:"text-header-h5"},title),react__WEBPACK_IMPORTED_MODULE_0__.createElement("p",{className:"text-small-caption"},(null==text?void 0:text.length)>0?text:t("missingDataText")),subText&&react__WEBPACK_IMPORTED_MODULE_0__.createElement("p",{className:"text-small-caption"},subText)),changeHandler&&isPossibleToChangeReservationDetails&&react__WEBPACK_IMPORTED_MODULE_0__.createElement("button",{onClick:changeHandler,type:"button",className:"link-tag text-small-caption cursor-pointer","aria-label":buttonAriaLabel},t("shiftText")))},__WEBPACK_DEFAULT_EXPORT__=ReservationFormListItem;try{ReservationFormListItem.displayName="ReservationFormListItem",ReservationFormListItem.__docgenInfo={description:"",displayName:"ReservationFormListItem",props:{icon:{defaultValue:null,description:"",name:"icon",required:!0,type:{name:"string"}},title:{defaultValue:null,description:"",name:"title",required:!0,type:{name:"string"}},text:{defaultValue:null,description:"",name:"text",required:!0,type:{name:"string"}},subText:{defaultValue:null,description:"",name:"subText",required:!1,type:{name:"string | undefined"}},changeHandler:{defaultValue:null,description:"",name:"changeHandler",required:!1,type:{name:"(() => void) | undefined"}},buttonAriaLabel:{defaultValue:null,description:"",name:"buttonAriaLabel",required:!1,type:{name:"string | undefined"}},isPossibleToChangeReservationDetails:{defaultValue:{value:"true"},description:"",name:"isPossibleToChangeReservationDetails",required:!1,type:{name:"boolean | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/reservation/ReservationFormListItem.tsx#ReservationFormListItem"]={docgenInfo:ReservationFormListItem.__docgenInfo,name:"ReservationFormListItem",path:"src/components/reservation/ReservationFormListItem.tsx#ReservationFormListItem"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/reservation/forms/ModalReservationFormSelect.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_Dropdown_Dropdown__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/components/Dropdown/Dropdown.tsx"),_core_utils_modal__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/core/utils/modal.tsx"),_core_utils_text__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/core/utils/text.tsx"),_helper__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/components/reservation/forms/helper.ts"),_ReservationForm__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./src/components/reservation/forms/ReservationForm.tsx"),_helper__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./src/components/reservation/helper.ts"),_message_modal_message_ModalMessage__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./src/components/message/modal-message/ModalMessage.tsx");const ModalReservationFormSelect=({type,header,items,defaultSelectedItem,selectHandler,ariaLabel,saveCallback,reservationStatus,setReservationStatus})=>{const{close}=(0,_core_utils_modal__WEBPACK_IMPORTED_MODULE_2__.f)(),t=(0,_core_utils_text__WEBPACK_IMPORTED_MODULE_3__.X)(),[selectedItem,setSelectedItem]=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(defaultSelectedItem),{modalId,screenReaderModalDescriptionText,closeModalAriaLabelText}=((type,t)=>({modalId:(0,_helper__WEBPACK_IMPORTED_MODULE_4__._3)(type),screenReaderModalDescriptionText:t((0,_helper__WEBPACK_IMPORTED_MODULE_6__.o9)(type,"screenReaderModalDescriptionText")),closeModalAriaLabelText:t((0,_helper__WEBPACK_IMPORTED_MODULE_6__.o9)(type,"closeModalAriaLabelText"))}))(type,t);return react__WEBPACK_IMPORTED_MODULE_0__.createElement(_core_utils_modal__WEBPACK_IMPORTED_MODULE_2__.Z,{modalId,screenReaderModalDescriptionText,closeModalAriaLabelText,eventCallbacks:{close:()=>{setReservationStatus&&setReservationStatus("idle")}}},"success"===reservationStatus&&react__WEBPACK_IMPORTED_MODULE_0__.createElement(_message_modal_message_ModalMessage__WEBPACK_IMPORTED_MODULE_7__.Z,{title:t("reservationSuccessTitleText"),subTitle:t("reservationSuccessSubTitleText"),ctaButton:{modalId:"pickup",text:t("reservationStatusButtonText"),callback:()=>setReservationStatus&&setReservationStatus("idle")}}),"error"===reservationStatus&&react__WEBPACK_IMPORTED_MODULE_0__.createElement(_message_modal_message_ModalMessage__WEBPACK_IMPORTED_MODULE_7__.Z,{title:t("reservationerrorTitleText"),subTitle:t("reservationerrorSubTitleText"),ctaButton:{modalId:"pickup",text:t("reservationStatusButtonText"),callback:()=>setReservationStatus&&setReservationStatus("idle")}}),(!reservationStatus||"idle"===reservationStatus||"pending"===reservationStatus)&&react__WEBPACK_IMPORTED_MODULE_0__.createElement(_ReservationForm__WEBPACK_IMPORTED_MODULE_5__.Z,{title:header.title,description:header.description,onSubmit:()=>{selectHandler(selectedItem),saveCallback?saveCallback():close((0,_helper__WEBPACK_IMPORTED_MODULE_4__._3)(type))},buttonLabel:"pending"===reservationStatus?t("loadingText"):void 0},react__WEBPACK_IMPORTED_MODULE_0__.createElement(_Dropdown_Dropdown__WEBPACK_IMPORTED_MODULE_1__.Z,{options:items.map((({label,value})=>({label,value}))),ariaLabel,arrowIcon:"chevron",handleOnChange:event=>{const{value}=event.target;setSelectedItem(value)},defaultValue:selectedItem,placeholder:{label:t("chooseOneText"),disabled:!0,value:""},cyData:"modal-reservation-form-select"})))},__WEBPACK_DEFAULT_EXPORT__=ModalReservationFormSelect;try{ModalReservationFormSelect.displayName="ModalReservationFormSelect",ModalReservationFormSelect.__docgenInfo={description:"",displayName:"ModalReservationFormSelect",props:{type:{defaultValue:null,description:"",name:"type",required:!0,type:{name:"enum",value:[{value:'"email"'},{value:'"sms"'},{value:'"pickup"'},{value:'"interestPeriod"'}]}},header:{defaultValue:null,description:"",name:"header",required:!0,type:{name:"{ title: string; description: string[]; }"}},items:{defaultValue:null,description:"",name:"items",required:!0,type:{name:"{ label: string; value: string; }[]"}},defaultSelectedItem:{defaultValue:null,description:"",name:"defaultSelectedItem",required:!0,type:{name:"string"}},selectHandler:{defaultValue:null,description:"",name:"selectHandler",required:!0,type:{name:"(value: string) => void"}},ariaLabel:{defaultValue:null,description:"",name:"ariaLabel",required:!0,type:{name:"string"}},saveCallback:{defaultValue:null,description:"",name:"saveCallback",required:!1,type:{name:"(() => void) | undefined"}},reservationStatus:{defaultValue:null,description:"",name:"reservationStatus",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"success"'},{value:'"error"'},{value:'"idle"'},{value:'"pending"'}]}},setReservationStatus:{defaultValue:null,description:"",name:"setReservationStatus",required:!1,type:{name:"((status: RequestStatus) => void) | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/reservation/forms/ModalReservationFormSelect.tsx#ModalReservationFormSelect"]={docgenInfo:ModalReservationFormSelect.__docgenInfo,name:"ModalReservationFormSelect",path:"src/components/reservation/forms/ModalReservationFormSelect.tsx#ModalReservationFormSelect"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/reservation/forms/NoInterestAfterModal.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_core_utils_text__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/core/utils/text.tsx"),_ModalReservationFormSelect__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/components/reservation/forms/ModalReservationFormSelect.tsx"),_core_utils_config__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/core/utils/config.tsx");const NoInterestAfterModal=({selectedInterest,setSelectedInterest,saveCallback,reservationStatus,setReservationStatus})=>{const t=(0,_core_utils_text__WEBPACK_IMPORTED_MODULE_1__.X)(),interstPeriods=(0,_core_utils_config__WEBPACK_IMPORTED_MODULE_3__.ZR)()("interestPeriodsConfig",{transformer:"jsonParse"});return react__WEBPACK_IMPORTED_MODULE_0__.createElement(_ModalReservationFormSelect__WEBPACK_IMPORTED_MODULE_2__.Z,{type:"interestPeriod",header:{title:t("modalReservationFormNoInterestAfterHeaderTitleText"),description:[t("modalReservationFormNoInterestAfterHeaderDescriptionText")]},items:interstPeriods.interestPeriods,defaultSelectedItem:String(selectedInterest),selectHandler:value=>setSelectedInterest(Number(value)),ariaLabel:t("modalReservationFormNoInterestAfterLabelText"),saveCallback,reservationStatus,setReservationStatus})},__WEBPACK_DEFAULT_EXPORT__=NoInterestAfterModal;try{NoInterestAfterModal.displayName="NoInterestAfterModal",NoInterestAfterModal.__docgenInfo={description:"",displayName:"NoInterestAfterModal",props:{selectedInterest:{defaultValue:null,description:"",name:"selectedInterest",required:!0,type:{name:"number"}},setSelectedInterest:{defaultValue:null,description:"",name:"setSelectedInterest",required:!0,type:{name:"(value: number) => void"}},saveCallback:{defaultValue:null,description:"",name:"saveCallback",required:!1,type:{name:"(() => void) | undefined"}},reservationStatus:{defaultValue:null,description:"",name:"reservationStatus",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"success"'},{value:'"error"'},{value:'"idle"'},{value:'"pending"'}]}},setReservationStatus:{defaultValue:null,description:"",name:"setReservationStatus",required:!1,type:{name:"((status: RequestStatus) => void) | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/reservation/forms/NoInterestAfterModal.tsx#NoInterestAfterModal"]={docgenInfo:NoInterestAfterModal.__docgenInfo,name:"NoInterestAfterModal",path:"src/components/reservation/forms/NoInterestAfterModal.tsx#NoInterestAfterModal"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/reservation/forms/PickupModal.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_core_utils_text__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/core/utils/text.tsx"),_ModalReservationFormSelect__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/components/reservation/forms/ModalReservationFormSelect.tsx");const PickupModal=({branches,defaultBranch,selectBranchHandler,saveCallback,reservationStatus,setReservationStatus})=>{const t=(0,_core_utils_text__WEBPACK_IMPORTED_MODULE_1__.X)(),formatBranches=branches.map((branch=>({value:branch.branchId,label:branch.title})));return react__WEBPACK_IMPORTED_MODULE_0__.createElement(_ModalReservationFormSelect__WEBPACK_IMPORTED_MODULE_2__.Z,{type:"pickup",header:{title:t("modalReservationFormPickupHeaderTitleText"),description:[t("modalReservationFormPickupHeaderDescriptionText")]},items:formatBranches,defaultSelectedItem:defaultBranch,selectHandler:selectBranchHandler,ariaLabel:t("modalReservationFormPickupLabelText"),saveCallback,reservationStatus,setReservationStatus})},__WEBPACK_DEFAULT_EXPORT__=PickupModal;try{PickupModal.displayName="PickupModal",PickupModal.__docgenInfo={description:"",displayName:"PickupModal",props:{branches:{defaultValue:null,description:"",name:"branches",required:!0,type:{name:"AgencyBranch[]"}},defaultBranch:{defaultValue:null,description:"",name:"defaultBranch",required:!0,type:{name:"string"}},selectBranchHandler:{defaultValue:null,description:"",name:"selectBranchHandler",required:!0,type:{name:"(value: string) => void"}},saveCallback:{defaultValue:null,description:"",name:"saveCallback",required:!1,type:{name:"(() => void) | undefined"}},reservationStatus:{defaultValue:null,description:"",name:"reservationStatus",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"success"'},{value:'"error"'},{value:'"idle"'},{value:'"pending"'}]}},setReservationStatus:{defaultValue:null,description:"",name:"setReservationStatus",required:!1,type:{name:"((status: RequestStatus) => void) | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/reservation/forms/PickupModal.tsx#PickupModal"]={docgenInfo:PickupModal.__docgenInfo,name:"PickupModal",path:"src/components/reservation/forms/PickupModal.tsx#PickupModal"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/reservation/forms/ReservationForm.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_core_utils_text__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/core/utils/text.tsx"),_Buttons_Button__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/components/Buttons/Button.tsx");const ReservationForm=({title,description,children,onSubmit,buttonLabel,disabledButton,cyData="reservation-form"})=>{const t=(0,_core_utils_text__WEBPACK_IMPORTED_MODULE_1__.X)();return react__WEBPACK_IMPORTED_MODULE_0__.createElement("section",{className:"reservation-modal reservation-form"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"reservation-form__content"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"reservation-form__header"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("h3",{className:"text-header-h3 mb-35","data-cy":`${cyData}-title`},title),description.map((paragraph=>react__WEBPACK_IMPORTED_MODULE_0__.createElement("p",{className:"text-body-large","data-cy":`${cyData}-description`},paragraph)))),react__WEBPACK_IMPORTED_MODULE_0__.createElement("form",null,children&&react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"reservation-form__body mt-35"},children),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"reservation-form__footer mt-48"},react__WEBPACK_IMPORTED_MODULE_0__.createElement(_Buttons_Button__WEBPACK_IMPORTED_MODULE_2__.z,{label:buttonLabel||t("saveButtonText"),buttonType:"none",disabled:disabledButton??!1,collapsible:!1,size:"xlarge",variant:"filled",onClick:onSubmit,dataCy:`${cyData}-button`})))))},__WEBPACK_DEFAULT_EXPORT__=ReservationForm;try{ReservationForm.displayName="ReservationForm",ReservationForm.__docgenInfo={description:"",displayName:"ReservationForm",props:{title:{defaultValue:null,description:"",name:"title",required:!0,type:{name:"string"}},description:{defaultValue:null,description:"",name:"description",required:!0,type:{name:"string[]"}},onSubmit:{defaultValue:null,description:"",name:"onSubmit",required:!0,type:{name:"() => void"}},buttonLabel:{defaultValue:null,description:"",name:"buttonLabel",required:!1,type:{name:"string | undefined"}},disabledButton:{defaultValue:null,description:"",name:"disabledButton",required:!1,type:{name:"boolean | undefined"}},cyData:{defaultValue:{value:"reservation-form"},description:"",name:"cyData",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/reservation/forms/ReservationForm.tsx#ReservationForm"]={docgenInfo:ReservationForm.__docgenInfo,name:"ReservationForm",path:"src/components/reservation/forms/ReservationForm.tsx#ReservationForm"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/reservation/forms/helper.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{E4:()=>saveText,_3:()=>modalReservationFormId});const modalReservationFormId=type=>`modal-reservation-form-${type}`,saveText=({type,changedText,savedText,patron,mutate})=>new Promise(((resolve,reject)=>{const textDiffers=changedText!==savedText,updatedPatronData=(({type,value,patron:{preferredPickupBranch,preferredLanguage,receiveSms,receivePostalMail,receiveEmail,emailAddress,phoneNumber}})=>{const defaultData={preferredPickupBranch,preferredLanguage,receiveSms,receivePostalMail,receiveEmail,emailAddress,phoneNumber};switch(type){case"email":return{...defaultData,emailAddress:value,receiveEmail:!0};case"sms":return{...defaultData,phoneNumber:value,receiveSms:!0};default:return null}})({type,value:changedText,patron});updatedPatronData?textDiffers?mutate({data:{patron:updatedPatronData}},{onSuccess:response=>{response?resolve(response):reject(new Error("We did not get a response from the server"))},onError:e=>{reject(e)}}):resolve(""):reject(new Error("Cannot construct updated patron data"))}))},"./src/components/reservation/helper.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Cg:()=>getInstantLoanBranchHoldingsAboveThreshold,M1:()=>getFutureDateString,OR:()=>getNoInterestAfter,Sp:()=>getPreferredBranch,ZW:()=>getInstantLoanBranchHoldings,_w:()=>getManifestationsToReserve,f2:()=>isConfigValueOne,fK:()=>constructReservationData,l2:()=>removePrefixFromBranchId,o9:()=>getReservationModalTypeTranslation,qT:()=>getAuthorLine,tr:()=>translateOpenOrderStatus});__webpack_require__("./node_modules/core-js/modules/esnext.map.delete-all.js"),__webpack_require__("./node_modules/core-js/modules/esnext.map.every.js"),__webpack_require__("./node_modules/core-js/modules/esnext.map.filter.js"),__webpack_require__("./node_modules/core-js/modules/esnext.map.find.js"),__webpack_require__("./node_modules/core-js/modules/esnext.map.find-key.js"),__webpack_require__("./node_modules/core-js/modules/esnext.map.includes.js"),__webpack_require__("./node_modules/core-js/modules/esnext.map.key-of.js"),__webpack_require__("./node_modules/core-js/modules/esnext.map.map-keys.js"),__webpack_require__("./node_modules/core-js/modules/esnext.map.map-values.js"),__webpack_require__("./node_modules/core-js/modules/esnext.map.merge.js"),__webpack_require__("./node_modules/core-js/modules/esnext.map.reduce.js"),__webpack_require__("./node_modules/core-js/modules/esnext.map.some.js"),__webpack_require__("./node_modules/core-js/modules/esnext.map.update.js");var dayjs__WEBPACK_IMPORTED_MODULE_13__=__webpack_require__("./node_modules/dayjs/dayjs.min.js"),dayjs__WEBPACK_IMPORTED_MODULE_13___default=__webpack_require__.n(dayjs__WEBPACK_IMPORTED_MODULE_13__),_core_utils_helpers_general__WEBPACK_IMPORTED_MODULE_14__=__webpack_require__("./src/core/utils/helpers/general.ts"),_core_utils_helpers_invalid_switch_case__WEBPACK_IMPORTED_MODULE_16__=__webpack_require__("./src/core/utils/helpers/invalid-switch-case.ts"),_core_dbc_gateway_generated_graphql__WEBPACK_IMPORTED_MODULE_15__=__webpack_require__("./src/core/dbc-gateway/generated/graphql.tsx");const isConfigValueOne=configValue=>"1"===configValue,getPreferredBranch=(id,array)=>{const locationItem=array.find((item=>item.branchId===id));return locationItem?locationItem.title:id},getNoInterestAfter=(days,interestPeriod,t)=>{const interestPeriodFound=interestPeriod.interestPeriods.find((({value})=>value===String(days)));return interestPeriodFound?interestPeriodFound.label:`${days} ${t("daysText")}`},getFutureDateString=num=>dayjs__WEBPACK_IMPORTED_MODULE_13___default()().add(num,"day").format("YYYY-MM-DD"),constructReservations=({manifestations,pickupBranch,expiryDate,periodical})=>manifestations.map((manifestation=>(({manifestation:{pid},pickupBranch,expiryDate,periodical})=>({recordId:(0,_core_utils_helpers_general__WEBPACK_IMPORTED_MODULE_14__.rp)(pid),...pickupBranch?{pickupBranch}:{},...expiryDate?{expiryDate}:{},...periodical?{periodical}:{}}))({manifestation,pickupBranch,expiryDate,periodical}))),constructReservationData=({manifestations,selectedBranch,expiryDate,periodical})=>({reservations:constructReservations({manifestations,...selectedBranch?{pickupBranch:selectedBranch}:{},...expiryDate?{expiryDate}:{},...periodical?{periodical:{volumeNumber:periodical.volumeNumber,volumeYear:periodical.volumeYear}}:{}}),...manifestations.length>1?{type:"parallel"}:{}}),getAuthorLine=(manifestation,t)=>{const{creators}=manifestation,publicationYear=(0,_core_utils_helpers_general__WEBPACK_IMPORTED_MODULE_14__.S2)(manifestation),author=(0,_core_utils_helpers_general__WEBPACK_IMPORTED_MODULE_14__.b7)((0,_core_utils_helpers_general__WEBPACK_IMPORTED_MODULE_14__.TG)(creators),t)||null;let year="";return publicationYear&&(year=publicationYear),(0,_core_utils_helpers_general__WEBPACK_IMPORTED_MODULE_14__.bV)(manifestation)&&(year=`(${t("materialHeaderAllEditionsText")})`),author?[t("materialHeaderAuthorByText"),author,year].join(" "):null},getManifestationsToReserve=(reservableManifestations,isPeriodical)=>isPeriodical?reservableManifestations:!reservableManifestations||reservableManifestations.length<1?[]:(0,_core_utils_helpers_general__WEBPACK_IMPORTED_MODULE_14__.bV)(reservableManifestations[0])?reservableManifestations:[(0,_core_utils_helpers_general__WEBPACK_IMPORTED_MODULE_14__.bs)(reservableManifestations)],getReservationModalTypeTranslation=(name,type)=>{const isCloseModal="closeModalAriaLabelText"===type;switch(name){case"sms":return isCloseModal?"closeModalAriaLabelSmsText":"screenReaderModalDescriptionSmsText";case"email":return isCloseModal?"closeModalAriaLabelEmailText":"screenReaderModalDescriptionEmailText";case"interestPeriod":return isCloseModal?"closeModalAriaLabelInterestPeriodText":"screenReaderModalDescriptionInterestPeriodText";case"pickup":return isCloseModal?"closeModalAriaLabelPickupText":"screenReaderModalDescriptionPickupText";default:return(0,_core_utils_helpers_invalid_switch_case__WEBPACK_IMPORTED_MODULE_16__.Z)(name)}},getInstantLoanBranchHoldings=(branchHoldings,whitelist,instantLoanStrings)=>{const whitelistBranchIds=whitelist.map((({branchId})=>branchId));return(branchHoldings=>{const processedBranches=new Map;return branchHoldings.forEach((({branch,materials})=>{const{branchId}=branch,storedBranch=processedBranches.get(branchId);storedBranch?processedBranches.set(branchId,{branch,materials:[...materials,...storedBranch.materials]}):processedBranches.set(branchId,{branch,materials})})),[...processedBranches.values()]})(branchHoldings.filter((({branch})=>whitelistBranchIds.includes(branch.branchId)))).map((({branch,materials})=>({branch,materials:materials.filter((({materialGroup,available})=>instantLoanStrings.some((instantLoanString=>{var _materialGroup$descri;return null===(_materialGroup$descri=materialGroup.description)||void 0===_materialGroup$descri?void 0:_materialGroup$descri.includes(instantLoanString)}))&&available))}))).filter((({materials})=>materials.length>0))},getInstantLoanBranchHoldingsAboveThreshold=(instantLoanBranchHoldings,instantLoanThresholdConfig)=>instantLoanBranchHoldings.filter((({materials})=>materials.length>=Number(instantLoanThresholdConfig??0))),removePrefixFromBranchId=branchId=>branchId.split("-")[1],translateOpenOrderStatus=(status,t)=>{const statusTextMap={[_core_dbc_gateway_generated_graphql__WEBPACK_IMPORTED_MODULE_15__.Bw.OwnedAccepted]:"openOrderStatusOwnedAcceptedText",[_core_dbc_gateway_generated_graphql__WEBPACK_IMPORTED_MODULE_15__.Bw.AuthenticationError]:"openOrderAuthenticationErrorText",[_core_dbc_gateway_generated_graphql__WEBPACK_IMPORTED_MODULE_15__.Bw.BorchkUserBlockedByAgency]:"openOrderUserBlockedByAgencyText",[_core_dbc_gateway_generated_graphql__WEBPACK_IMPORTED_MODULE_15__.Bw.BorchkUserNotVerified]:"openOrderUserNotVerifiedText",[_core_dbc_gateway_generated_graphql__WEBPACK_IMPORTED_MODULE_15__.Bw.BorchkUserNoLongerExistOnAgency]:"openOrderUserNoLongerExistOnAgencyText",[_core_dbc_gateway_generated_graphql__WEBPACK_IMPORTED_MODULE_15__.Bw.InvalidOrder]:"openOrderInvalidOrderText",[_core_dbc_gateway_generated_graphql__WEBPACK_IMPORTED_MODULE_15__.Bw.NotOwnedIllLoc]:"openOrderNotOwnedIllLocText",[_core_dbc_gateway_generated_graphql__WEBPACK_IMPORTED_MODULE_15__.Bw.NotOwnedNoIllLoc]:"openOrderNotOwnedNoIllLocText",[_core_dbc_gateway_generated_graphql__WEBPACK_IMPORTED_MODULE_15__.Bw.NotOwnedWrongIllMediumtype]:"openOrderNotOwnedWrongIllMediumtypeText",[_core_dbc_gateway_generated_graphql__WEBPACK_IMPORTED_MODULE_15__.Bw.NoServicerequester]:"openOrderNoServicerequesterText",[_core_dbc_gateway_generated_graphql__WEBPACK_IMPORTED_MODULE_15__.Bw.OrsError]:"openOrderOrsErrorText",[_core_dbc_gateway_generated_graphql__WEBPACK_IMPORTED_MODULE_15__.Bw.OwnedOwnCatalogue]:"openOrderOwnedOwnCatalogueText",[_core_dbc_gateway_generated_graphql__WEBPACK_IMPORTED_MODULE_15__.Bw.OwnedWrongMediumtype]:"openOrderOwnedWrongMediumtypeText",[_core_dbc_gateway_generated_graphql__WEBPACK_IMPORTED_MODULE_15__.Bw.ServiceUnavailable]:"openOrderServiceUnavailableText",[_core_dbc_gateway_generated_graphql__WEBPACK_IMPORTED_MODULE_15__.Bw.UnknownError]:"openOrderUnknownErrorText",[_core_dbc_gateway_generated_graphql__WEBPACK_IMPORTED_MODULE_15__.Bw.UnknownPickupagency]:"openOrderUnknownPickupagencyText",[_core_dbc_gateway_generated_graphql__WEBPACK_IMPORTED_MODULE_15__.Bw.UnknownUser]:"openOrderUnknownUserText"};return statusTextMap[status]?t(statusTextMap[status]):""}},"./src/components/result-pager/use-pager.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>use_pager});var react=__webpack_require__("./node_modules/react/index.js"),utils_text=__webpack_require__("./src/core/utils/text.tsx");function ResultPager({setPageHandler,itemsShown,hitcount,isLoading,classNames}){const t=(0,utils_text.X)();return react.createElement("div",{className:`result-pager ${classNames}`},react.createElement("p",{className:"text-small-caption result-pager__title"},t("resultPagerStatusText",{placeholders:{"@itemsShown":itemsShown,"@hitcount":hitcount}})),itemsShown!==hitcount&&react.createElement("button",{disabled:isLoading,type:"button",className:"btn-primary btn-outline btn-medium arrow__hover--right-small uppercase",onClick:setPageHandler},t(isLoading?"loadingText":"showMoreText")))}const result_pager=ResultPager;try{ResultPager.displayName="ResultPager",ResultPager.__docgenInfo={description:"",displayName:"ResultPager",props:{setPageHandler:{defaultValue:null,description:"",name:"setPageHandler",required:!0,type:{name:"() => void"}},itemsShown:{defaultValue:null,description:"",name:"itemsShown",required:!0,type:{name:"number"}},hitcount:{defaultValue:null,description:"",name:"hitcount",required:!0,type:{name:"number"}},classNames:{defaultValue:null,description:"",name:"classNames",required:!0,type:{name:"string"}},isLoading:{defaultValue:null,description:"",name:"isLoading",required:!1,type:{name:"boolean | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/result-pager/result-pager.tsx#ResultPager"]={docgenInfo:ResultPager.__docgenInfo,name:"ResultPager",path:"src/components/result-pager/result-pager.tsx#ResultPager"})}catch(__react_docgen_typescript_loader_error){}const use_pager=({hitcount,pageSize,overrideItemsShown})=>{const[itemsShown,setItemsShown]=(0,react.useState)(pageSize>=hitcount?hitcount:pageSize),[page,setPage]=(0,react.useState)(0),[firstInNewPage,setFirstInNewPage]=(0,react.useState)(null);(0,react.useEffect)((()=>{setItemsShown(pageSize>hitcount?hitcount:pageSize)}),[hitcount,pageSize]);const pagehandler=()=>{const currentPage=page+1,itemsOnPage=(currentPage+1)*pageSize,onLastPage=itemsOnPage>hitcount;setFirstInNewPage(itemsOnPage-pageSize),setItemsShown(onLastPage?hitcount:itemsOnPage),setPage(currentPage)};return{itemsShown,PagerComponent:({isLoading,classNames=""})=>hitcount?react.createElement(result_pager,{itemsShown:overrideItemsShown?overrideItemsShown():itemsShown,hitcount,classNames,setPageHandler:pagehandler,isLoading}):null,page,firstInNewPage}};try{usepager.displayName="usepager",usepager.__docgenInfo={description:"",displayName:"usepager",props:{hitcount:{defaultValue:null,description:"",name:"hitcount",required:!0,type:{name:"number"}},pageSize:{defaultValue:null,description:"",name:"pageSize",required:!0,type:{name:"number"}},overrideItemsShown:{defaultValue:null,description:"",name:"overrideItemsShown",required:!1,type:{name:"(() => number) | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/result-pager/use-pager.tsx#usepager"]={docgenInfo:usepager.__docgenInfo,name:"usepager",path:"src/components/result-pager/use-pager.tsx#usepager"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/search-bar/search-bar.dev.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Default:()=>Default,default:()=>search_bar_dev});var react=__webpack_require__("./node_modules/react/index.js"),search_bar=__webpack_require__("./src/components/search-bar/search-bar.tsx"),downshift_esm=__webpack_require__("./node_modules/downshift/dist/downshift.esm.js");function _extends(){return _extends=Object.assign?Object.assign.bind():function(target){for(var i=1;i{const[q,setQ]=(0,react.useState)(""),{getInputProps,getComboboxProps}=(0,downshift_esm.Kb)({items:["Item 1","Item 2"],inputValue:q,defaultIsOpen:!1,onInputValueChange:({inputValue})=>{setQ(inputValue)}});return react.createElement("div",{className:"header__menu-second"},react.createElement("form",_extends({action:"https://bibliotek.dk/search",className:"header__menu-search"},getComboboxProps()),react.createElement(search_bar.Z,_extends({},storybookArgs,{getInputProps}))))};try{searchbardevinc.displayName="searchbardevinc",searchbardevinc.__docgenInfo={description:"",displayName:"searchbardevinc",props:{storybookArgs:{defaultValue:null,description:"",name:"storybookArgs",required:!0,type:{name:"SearchBarProps"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/search-bar/search-bar.dev.inc.tsx#searchbardevinc"]={docgenInfo:searchbardevinc.__docgenInfo,name:"searchbardevinc",path:"src/components/search-bar/search-bar.dev.inc.tsx#searchbardevinc"})}catch(__react_docgen_typescript_loader_error){}const search_bar_dev={title:"Components / Search Bar",component:search_bar.Z,argTypes:{altText:{name:"Alt text for search button image",defaultValue:"søgeikon",control:{type:"text"}},inputPlaceholderText:{name:"Input field placeholder",defaultValue:"Søg blandt bibliotekets materialer",control:{type:"text"}}}},Default=args=>react.createElement(search_bar_dev_inc,{storybookArgs:args})},"./src/components/search-bar/search-bar.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_search_svg__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/basic/icon-search.svg"),_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_search_svg__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_search_svg__WEBPACK_IMPORTED_MODULE_1__),_danskernesdigitalebibliotek_dpl_design_system_build_icons_collection_ExpandMore_svg__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/ExpandMore.svg"),_danskernesdigitalebibliotek_dpl_design_system_build_icons_collection_ExpandMore_svg__WEBPACK_IMPORTED_MODULE_2___default=__webpack_require__.n(_danskernesdigitalebibliotek_dpl_design_system_build_icons_collection_ExpandMore_svg__WEBPACK_IMPORTED_MODULE_2__),_core_utils_text__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/core/utils/text.tsx"),_core_utils_helpers_url__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/core/utils/helpers/url.ts");function _extends(){return _extends=Object.assign?Object.assign.bind():function(target){for(var i=1;i{const t=(0,_core_utils_text__WEBPACK_IMPORTED_MODULE_3__.X)(),handleDropdownMenu=()=>{setIsHeaderDropdownOpen(!isHeaderDropdownOpen)};return react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment,null,react__WEBPACK_IMPORTED_MODULE_0__.createElement("label",_extends({className:"hide-visually"},getLabelProps()),t("searchHeaderInputLabelText")),react__WEBPACK_IMPORTED_MODULE_0__.createElement("input",_extends({required:!0,pattern:".*\\S+.*",title:t("searchNoValidCharactersErrorText"),name:"q",className:"header__menu-search-input text-body-medium-regular","data-cy":dataCy,type:"text",placeholder:t("inputPlaceholderText"),"aria-label":t("inputPlaceholderText"),onKeyUp:e=>{"Enter"===e.key&&qWithoutQuery===q&&q.length>0&&(0,_core_utils_helpers_url__WEBPACK_IMPORTED_MODULE_4__.gB)(redirectUrl)}},getInputProps({onChange:e=>{setQWithoutQuery(e.target.value)}}))),react__WEBPACK_IMPORTED_MODULE_0__.createElement("input",{type:"image",src:_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_search_svg__WEBPACK_IMPORTED_MODULE_1___default(),alt:t("searchHeaderIconAltText"),className:"header__menu-search-icon",onClick:()=>{qWithoutQuery===q&&q.length>0&&(0,_core_utils_helpers_url__WEBPACK_IMPORTED_MODULE_4__.gB)(redirectUrl)},onKeyUp:e=>{"Enter"===e.key&&qWithoutQuery===q&&q.length>0&&(0,_core_utils_helpers_url__WEBPACK_IMPORTED_MODULE_4__.gB)(redirectUrl)}}),react__WEBPACK_IMPORTED_MODULE_0__.createElement("input",{type:"image",src:_danskernesdigitalebibliotek_dpl_design_system_build_icons_collection_ExpandMore_svg__WEBPACK_IMPORTED_MODULE_2___default(),alt:t("searchHeaderDropdownText"),className:"header__menu-dropdown-icon",onClick:e=>{e.preventDefault(),e.stopPropagation(),handleDropdownMenu()},onKeyUp:e=>{"Enter"!==e.key&&"ArrowDown"!==e.key||(e.preventDefault(),e.stopPropagation(),handleDropdownMenu())},tabIndex:0,"aria-label":t("searchHeaderDropdownText"),"data-cy":"search-header-dropdown-icon"}))};try{searchbar.displayName="searchbar",searchbar.__docgenInfo={description:"",displayName:"searchbar",props:{q:{defaultValue:null,description:"",name:"q",required:!0,type:{name:"string"}},getInputProps:{defaultValue:null,description:"",name:"getInputProps",required:!0,type:{name:"(options?: UseComboboxGetInputPropsOptions | undefined, otherOptions?: GetPropsCommonOptions | undefined) => any"}},getLabelProps:{defaultValue:null,description:"",name:"getLabelProps",required:!0,type:{name:"(options?: UseComboboxGetLabelPropsOptions | undefined) => any"}},dataCy:{defaultValue:{value:"search-header-input"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}},qWithoutQuery:{defaultValue:null,description:"",name:"qWithoutQuery",required:!0,type:{name:"string"}},setQWithoutQuery:{defaultValue:null,description:"",name:"setQWithoutQuery",required:!0,type:{name:"(value: string) => void"}},isHeaderDropdownOpen:{defaultValue:null,description:"",name:"isHeaderDropdownOpen",required:!0,type:{name:"boolean"}},setIsHeaderDropdownOpen:{defaultValue:null,description:"",name:"setIsHeaderDropdownOpen",required:!0,type:{name:"(value: boolean | ((prevState: boolean) => boolean)) => void"}},redirectUrl:{defaultValue:null,description:"",name:"redirectUrl",required:!0,type:{name:"URL"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/search-bar/search-bar.tsx#searchbar"]={docgenInfo:searchbar.__docgenInfo,name:"searchbar",path:"src/components/search-bar/search-bar.tsx#searchbar"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/search-bar/story-header.dev.inc.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_menu_svg__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/basic/icon-menu.svg"),_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_menu_svg__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_menu_svg__WEBPACK_IMPORTED_MODULE_1__),_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_search_svg__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/basic/icon-search.svg"),_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_search_svg__WEBPACK_IMPORTED_MODULE_2___default=__webpack_require__.n(_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_search_svg__WEBPACK_IMPORTED_MODULE_2__),_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_profile_svg__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/basic/icon-profile.svg"),_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_profile_svg__WEBPACK_IMPORTED_MODULE_3___default=__webpack_require__.n(_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_profile_svg__WEBPACK_IMPORTED_MODULE_3__),_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_heart_svg__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/basic/icon-heart.svg"),_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_heart_svg__WEBPACK_IMPORTED_MODULE_4___default=__webpack_require__.n(_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_heart_svg__WEBPACK_IMPORTED_MODULE_4__),_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_watch_static_svg__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/basic/icon-watch-static.svg"),_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_watch_static_svg__WEBPACK_IMPORTED_MODULE_5___default=__webpack_require__.n(_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_watch_static_svg__WEBPACK_IMPORTED_MODULE_5__),_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_cross_medium_svg__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/basic/icon-cross-medium.svg"),_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_cross_medium_svg__WEBPACK_IMPORTED_MODULE_6___default=__webpack_require__.n(_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_cross_medium_svg__WEBPACK_IMPORTED_MODULE_6__),_danskernesdigitalebibliotek_dpl_design_system_build_icons_collection_ExpandMore_svg__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/ExpandMore.svg"),_danskernesdigitalebibliotek_dpl_design_system_build_icons_collection_ExpandMore_svg__WEBPACK_IMPORTED_MODULE_7___default=__webpack_require__.n(_danskernesdigitalebibliotek_dpl_design_system_build_icons_collection_ExpandMore_svg__WEBPACK_IMPORTED_MODULE_7__);const __WEBPACK_DEFAULT_EXPORT__=({search,userProfile})=>react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",null,react__WEBPACK_IMPORTED_MODULE_0__.createElement("header",{className:"header"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"header__logo-desktop"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("a",{className:"header__logo-desktop-link",href:"/"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",null,react__WEBPACK_IMPORTED_MODULE_0__.createElement("img",{className:"logo",src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKEAAAAgCAYAAAB6vRjLAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAABRSSURBVHgB7VwLeFTVtV5r73POTCYJIQmBJJPwEBABkwBBRIEU6LXWZ20Rbq312U9vvbZWW7X1ai3tbdVWW+3Vttx+1Yp6tYK12l61eG1BRQEhkISHIGgSMpOEVzJhksnMeex91z7DxMwY8uBpSv/vO9+cs85+77XXXo99BoKs5GDXpZW+BMcIa2HizUll09XIS66EE4gGVvozVW+Anfn11Hf1vGRhvF2TH03QAlhSGdTKWgM5c4vgOIPq3lrPzmxYCqeNhFMcmgTITDwgYBocI+yFmF4EWmZ3mgOODicWHtU/h35TX2gguASWKZP7HKX0NoJAOO7AmAnS2gQRBqc4TvkB6A5DeheALqf6W95q6CvtznEXeOAo4Ah+sS6cWQ/DGQE4xaHBP9EFK9t7NaIxrHXEZfdl170UUrRaGO3VtKxbUcrLpJTDAbGGaez/ZF3wa80Z534+v/3dvYH8z8wjuXahw7R3WFt4snSc2SjZs78rsl65oSPrLqbpdXbbwVZwnMuJvqVIVN+rZfuujUrDe5f86GFog9bGvFlzpC0uRUdWyc7OGcSln5cITcC0J/yzsp7FVavsRDt3jhvn8XyUdjNDXARSDkXGXhZDfI1MQpEwxdPFHetqYBDhn0zYDTIUug45Gx8BrvTE0EqYqxnYskIKUaHe0x4tadLHSMv5AiK8vn9kKATbiN4Wni5j1u0M5b+BxExUCdFZFwq0DJGM3+4gxEjVEZQ7jeg+VZZoa7tRAGRFhfkEPbbCvrZpkuHtpA6Y9GzEGwSng2NVBNe0nkNPN7kkKbHRM3WJBOdaeognE+JObOvopHdpVPd7RBpUTHhKbMeaxC+TIfBY90sAXttXvtM9LRdIlBXEU7uNNO9U/70LNGTcNd5o+qdkBbIykjJINICzq1HIkbpgD378AjXg/BEh5DiScF/prU4EeVDTtfP8f/i+BoYxH5F1gC2vaTbKS9T7QFpphbSdKyjlPmboFf6//ZfOvWkXU4OiMEhxSkhC2tZm0s/M7jSU/bA9mF6hBJPweB4c3rG+KnC/eTEI+VlguJ1+J9iRcCmlWtVVpqE97Y9uejrxfCvk58UbIGv9Zta9CB9vqYdtK+Af82Ob3oBFi9TjyoBnyu/Acm6VjllOz5tRMyaCaXokk48XRje+DfPmqXSvBLTSN0DAQhiE6JEJa0fP9Xrq9o+xPcZ8zrBIGpouO6MH0YGNVmb26jGhVSE4CryfOSM307LLEOVZYOi5gvYltM1G0Wm9s7fcWzW9stKCYwiSWs8hir92p6Hk5bS33tJrvpjlSjq9YPiBuubyAohaj9J4POQgjiXT4ozUwZPC2dNjQZq2F82+GdBtl9qakwrFdvVj61wn9wKwSNQr3A2MdSalEzICgxRJ40iToge0su9g4MD1gsEZzLKYq3WQMyEhN/RwS4hW51KaxCV+s3I7DASSFwd46a8hElUKdW68bLurbEZKVUGVWRfQyx6NWvJ/xkHNXjgGIGVs3Shn61PdaUE+mTwk7JZ+5WeC66a1hOZ+h8jTHoL9zm/gJEFwTvwv4R8JyTqhkHNAiIekgEm0JnvWF8kao+3hW2BbbzV4p9wgSXmHfoKG727Kf5NiwJ5TkGyUMIb0pl94GawI6uXT4CQCde5KL7u+6TY1NjrXvuFvqoxQ+7PhZMHQ45KS4ekJkjsHiBNgkCKV0frNUCQ189B0fhs02n7Q/zwwAN+anEJ60NuNWukcOFmwnXfVD3PENMG1O4bHNu6ihTeX9t3PE7mFLILdcIKBHeFXiOH2o+1c2WCUvbAbJt/TyA+8RAvjbBikOHrr2LbvCepTbobjA58j5LKgp/SkrHLNK/5OP3GrU9qPBbSSRlp4K2k1aaDxJfmxDR/BCYYfPthPAuAaWtDNaIsFjLH/FBLPJZVmHwxS9CL5MIQcnyFrrVJoWoy24EIk3xS5H85MTUn+qcV1vokvjo683wT9hGSskibyfx0hdhq0FmgjLnFscSNJmaStjgY3n5TzR+j2AhggkGE9VbRG4zRBZkr9yEnfZGtQitrD5bfQmKw2YypnBTHexZQrQzLYyhEfLzh36KNddjHTguQGXEMVJkVaJkB6BJCvoa1zcw+NW0/qSeb0tAwbyMQQBjaCo9I6QVJiu0B68m5BZTAWZ7Lm0qvSAdo3OPtDc+We1lIBTgZyUSkd9h2aiKsxM82CozIbTzwwwEo+oeVKZCssTX7rtFjNjiQ6OUoD+pTvohA/osfkOLDBf18Urbo+8fhnOO3WaSz94R7qFILhd41c+E3+npqO7i/qfOUFmuU8QpGFRalN4oZ3XkF0/ZtwHEFjsZOiD2NgSNaYROguCOU+P1RG5MKFfM9bbd4RzSsiSCsGThICGdMvR9NeSh6mlf5zhl6mIinbh03ITA953lUCQni9M0ZG1q+HQYRPbseIf8/yaV9NZcD4K5TFdvUDFAW4J/UdRRGuOJBz9hDoCxo+UGxV/zyVARVGRyqbtJzh1xMjrE6tWljmVXAcEeQlb1G0oZgWWlTYVlfbFAO6DVi+3Mnf83rHyWRABY/fswJssZd2pouCq1tWB3nZExkhzwrFgLRr7dybJbbCIEMyEyLakhl3DQlX7u8tkyfb/DWFt7YlZZXg7WyLVkCvtbGd/lj1Pb1NpJpoqXvupDBXkh+M9KB5e/PmZsBxAlnlc+hSesHDxQfXtMCnFHk73gmDV19AC/UDstjPllJcR7/n0JiuAZ1dNL2pctD5C5OYkPwjzVErVN1XpuH7trV3SueVVLqQsrS3fCRpVvRHkvgj69ZKzusguW2j7fCeXDhOoMjuxKgPi4rs6u/Dpxz+SOXGwmfvnkT66VyBcB16+OwP5uRUFMeqdsIgRLKzmrMPxotdsf5k9AwZshNC4SQaBzGm10ycVUE/YiGKUcmp3Ui3E7vaRguG543IhIb34XjAD5u3QzsMGuCiRRQ/gTfdS+0Zq2DQIokJSUb1K7TkZjQ000mhSRWo7wWOFXOgn5Bk0qKV3BzUvANyKTVAyQ3Ez584MEBu+GaStH8qMquXfZx24oWI/A4hxdKRsO1JWV6uB6usx8mMKvaLzfMPJ8GVwRJ8ccfvVboiucUN5Mply3jj1fc/RWG/AqLNhxOIepg0myO5bRBfGCk2/woGAf6xDzAwVO6kualk9wSULf61QSubRobW99ykjI+lRTQXkb3pukg6T0OQO+aRWO79qP/kyYgv7viMRBwJH7MppzpU3nwYoBnzkXfqKEPjNzJbvF8Y3fgMDBCMwyhyb8ylvld1d/V8mnFKHOUSgPcJDUvUZXMsR037gTrfx6S4mfybBSpNTMAyh1vTpbB+C0eLhQstEOYFVN5ZMEB4opYfIrH/cCzrcjhFcGoc5QKxd5S5ZUs30saAVqaOZZ21zwQlLZs8eTmFpC+o7fRdaIHG7vmb8uZMI1fItbRV+1DXtmKMLUm4bnrE8uWMDcubyWNmBpVVmSBXQ2l6to6LKAyojpUZqPH6iCl+Nx5q3CP+ewsqKmJtkUUYjZEgw4nBnHNuV/TCW87/BS5e7Mq15rSzZ5pWdCETIod0+HYSfa8UxSpXIBze4AuWX+yTtS03cVWpV1uW23jIB+o76xIRMz9HDvsM2gpauYHPFUSqunyMTbnnzBASKpgBb9l726eQ034SZqQvxSi2SJ9cCI5sgE6TgkmWOgVu0fvVfqvmaffwb/fxM86abIvYNeRGyhMoO4F7Xh9pVnZ9VHdCmVAzvEOhs5+JbduXQpFWuOWYHNxU34dgXaOhRqpAHxJ2NeEDLbNpO36QXEE/BMWI3SBa21bTsHpQBXBITyWr9Jp9ObNm5+1/J3yYKrhooZi6ZefT/c8VIZRVkt3RAS9Jxz2l7U6StB30crilQZ/ypeJo1Sor1HEhxkw3BCqFPB1C7e7B2F05Oeqkdyygld5lxyL3qe0L3e/GBKfr3wOsVB06+V7q5CvUQ0m2rKpfTm8+62j8/tyWqgYJi1mj/sdHZDT6TTxUlhSCOzG8JcjK7vaL6p/G+x2uUGPiMIqeAQylRasiXe+KaGsdmvxByhgj3cZwP5GjhFTKDUFeerm0q7+Q0KEDaeULhRl9FqXLazaTZDfY5k2U7tnWCfZ1Z27bZp7Q7VhYziX9SXcg7WzSw+T4JCLigWg0ekQBKS7xvCAr+Z66dmsl9/h2Ny+nQS+jAd3a3GlX9lkA4koyZj5nI1xEbibFoKXRtvb7YABo74CbibEqyL+6gyyjS5HxOcD5L2lyssk7+4D6boQk1Z9oLhe7VZK0pnqvVde4lhZru29qITHBD4lO0g/vlhxnU1nXS3Bt+tuC2tSZqXXuzZuUoWnsOcWAVOAz/pEFaoFBs/HKROnAN+h2jyqDc5xFbHQzucEk6Si3NI/43PCkgoT0okEqDIPzMn0Zb3TRJUlzxMcoeDGfJPflkuFOYspL9vjK3YhX69C5Q8k4e4D0Y06G5kPU57mosS9T/+upqq9k7/IsUOlO7HYsxPw9aVPOHdFZ9W5vyUzLvA4lDutOozh25dhw1T7lbBwwiHlosi5St0woKeNa3Q4ZIb+aDn0foLUN/WsqmqPum4ypdY5tb2UgZ8IAQAw/k8KdIHR2W3Fk02uKRhGmzZ2hyMW0TU3nu/T8fKhcF4QzOU3mYvL/NRQ7NUvdzItroDljeoUNtk5W71+K7ZrEAlgb1EonE3N/B9GZRM9rEvUxCh6YLdoT1Nnzadt/mWeLr+Ou12LxjjvnqVGh7fMpv1X9+0NZ1jXwEtWWC5z9zapvf06UZSI+cVp004/ch8Bm8iRMivcJcKN/Ts63Ex9hNelT0x2wl9qmeSE9Ph8JhSYzJkYLZO8VxTbd2SUdjSljaff5iUQ5mx6fO25M6GNaj1KWvDTP12XNqBjd9l6PBwcCetlVtrDv/gSrIf/bkYbMWLrvZRjiW+c+2ALF/tZSGsEF0rF/3Owt/Wt+tKa2t/yjOjY0J5i/3QzvS2NpIB3Zd4iyOyyRpsQb+oc1wSGXcs6BtWHqb5AkzViE3r83EF7PUDJYVBHzKE+X9CYGzI/fsBRHvlxEfcw59PBk9zAp83mHiTaLhBZeSWV9tiuLI1xPgAAnSRJ6pOzxE1iG4kD3rwBty9pNjK12bU+8HFtHdYwEYGzQmLKB6nLTkcT1qYkkF5yb7oiZ0OqIhFK5jFbGLKWDGLQJ2J32FYdxTxRp4eh7tIJ/yrxZSwva33ZPhzRlzJkkOg/eQT34KsgU/yViszdd/2/olxu9p7Z2rBwVXvfL7rSAd+p9aNp3OTbeSI93wQAhQR6BSAbQbZY0Kj3pcb2CoYcZuj+FukciiyQ524kBqexaKtw9JNxQdM6K4sCazkNlxNvOMZPpGk/KRWU5Dkahm0f3cJ6ew9FT+YJqy8CUNlMD1KcQbdBxFEwoHPkeBVrJQpS+jwuW4zWODU5MKJnlO3xuOYwU6QedSOtPg54p+6g3aU4k1LNkoXi2w+HbuS3rDsIxBDoyGLcOnGF9Jl60XI2rOy0+b1aaNE0aaGbCQMDRUiKCVA1vgrQK5/HxmjsHfTIi6bDWod8/FHZs+FqCHoTyYVHopLGOtqVk2ZJelFXR0dz+OBlAX2SN4ceI5uZDS8SXMxP3U1n3JzIEMmfkxsLt6WNh2zE5rEvhBvX5kGLWV4s7NixI0D+E07IAvFmJNh+xYTLqzkto9cnXU+mkcKbTyvP1rxRk0nJGSMc57NbGGD5abH7peTgK0JaQGcqanZ24PvSUnS5s55vqndDY5r7yB1/6yQ3qd8ukSQZZ7VfEC8VPxGn3TTy/4LBtQIgfgN3TesUGisao2zO08ByaoWn0soFlDUtiIlrguersYPNV6vwgTWi4Y8uhvszf7Skfq+6bM84dLrj1gofxDw2edW73/ILhG0N3r25FE2+jXGQR46IGXvZF911Hp3s+gJjxou3DZrl/1aKO0WGkc4uHa9uCvulT4VjAq9XTLhYiPXN+0Cg/Q5F2wrghBs9Y6rZZy7wp3tcjhOu30vQ7aFBq+06MAdoCVJxzIFuPzZl2b8t4i1wPi4/K908McE+4va0ucRm22EK0CRLYtkzvkKf7zC/EowF25gdD3+ebpXDud10aBvuZ+27xYltI6Vrt5s6mHbWHBrsHPAVqQhznWyOqzO0NWLLBkSYp/zKNoi3PjWpb7X47YhkZrcr1QYt5tr1tc529bHPtlmXLjBFWTiUy9g6t8tFoWzVBLF3tRMKbSb/6DLWn2pdlvNNTpYWwqV7omlpEaVTXz3dllA4vdGa8SpraVtIJZ2W2HKwNYsl6LWbVkBWbT0bEq4UzMvpcmP1BYZTqBlBG2FDpmOupz2t83FdDbVZ/HrAfdelGhEhpxLrERVpO40AqKY5t3EUx2C+qDh0uDa2EWsa0y/yzc/6FrL7vkvDrxzF03MINfl6+tfHHyo8ERwimYQQ530MhuRBdne7FNVIhWIDp/GGpa5cOPTT51A/TTatrrmbldkjjLYpGDuEnqSPFxBzkNmL1QtMX+SMb1ybqkRrcC8oXzXgHo7UT7wI7QJGZrk9Ai6yatdJjXEmivYpUldE0CeWUxgSd3d52unVvIt0oc+12bhh307tdlMZBEVe91DfLuse4nNqxFNUfN6GcRcybIxh7ydA9VybUFQ3i/eAa71JfRsY2riAn+28ZY740oX8DFrYKoeP5lP9VmvN0uqaDy6T4a91LrpqEsUFjFR8TI0kVYrpuxen6/uTx1ty6Qde7jsK1TbCvZRyXqL5Sf2aSFCqgNCttzTOrqDPupD8m/z6lnL+++uYbSb+6jFZSOapNWcpqYuy/aLlySXfLTJ1UFrr9VdKPyGfEzyKNr4AmxqH0tZTvTeTaawWxS18/Wul3rCFXriTdbbSG88YctcNcbtigQziXH2lZ6oQ7VDamQXlhlBb5UY0TlcWoLC+V1Xk8D+y6bV6zxguxmIXz5iWdTPl/+jv2xktbiOwAAAAASUVORK5CYII=",alt:"Logo of libary"})))),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"header__menu"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("nav",{className:"header__menu-first"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",null,react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"header__menu-navigation-mobile"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"pagefold-parent--small header__menu-navigation-button header__button",id:"header__menu--open"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"pagefold-triangle--small"}),react__WEBPACK_IMPORTED_MODULE_0__.createElement("img",{src:_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_menu_svg__WEBPACK_IMPORTED_MODULE_1___default(),alt:"List of bookmarks"})),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"header__menu-navigation-logo"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"logo-fallback"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("p",{className:"logo-fallback__text-name"},"Lyngby-Taarbæk"),react__WEBPACK_IMPORTED_MODULE_0__.createElement("p",{className:"logo-fallback__text-libraries"},"Bibliotekerne")))),react__WEBPACK_IMPORTED_MODULE_0__.createElement("ul",{className:"header__menu-navigation"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("li",{className:"header__menu-navigation-item"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("a",{href:"/",className:"header__menu-navigation-link text-body-medium-regular hide-linkstyle"},"Det sker")),react__WEBPACK_IMPORTED_MODULE_0__.createElement("li",{className:"header__menu-navigation-item"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("a",{href:"/",className:"header__menu-navigation-link text-body-medium-regular hide-linkstyle"},"Biblioteker & åbningstider")),react__WEBPACK_IMPORTED_MODULE_0__.createElement("li",{className:"header__menu-navigation-item"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("a",{href:"/",className:"header__menu-navigation-link text-body-medium-regular hide-linkstyle"},"Digitale tilbud")),react__WEBPACK_IMPORTED_MODULE_0__.createElement("li",{className:"header__menu-navigation-item"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("a",{href:"/",className:"header__menu-navigation-link text-body-medium-regular hide-linkstyle"},"Litteratur")),react__WEBPACK_IMPORTED_MODULE_0__.createElement("li",{className:"header__menu-navigation-item"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("a",{href:"/",className:"header__menu-navigation-link text-body-medium-regular hide-linkstyle"},"Børn & forældre")))),userProfile||react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"header__menu-profile header__button"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("img",{src:_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_profile_svg__WEBPACK_IMPORTED_MODULE_3___default(),alt:"Profile"})),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"header__menu-bookmarked header__button"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("a",{href:"/"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("img",{src:_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_heart_svg__WEBPACK_IMPORTED_MODULE_4___default(),alt:"List of bookmarks"})))),search||react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"header__menu-search"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("input",{name:"q",className:"header__menu-search-input text-body-medium-regular",type:"text",autoComplete:"off",placeholder:"Cannot search in this story"}),react__WEBPACK_IMPORTED_MODULE_0__.createElement("input",{type:"image",src:_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_search_svg__WEBPACK_IMPORTED_MODULE_2___default(),className:"header__menu-search-icon",alt:"search icon"}),react__WEBPACK_IMPORTED_MODULE_0__.createElement("img",{className:"header__menu-dropdown-icon",src:_danskernesdigitalebibliotek_dpl_design_system_build_icons_collection_ExpandMore_svg__WEBPACK_IMPORTED_MODULE_7___default(),alt:"expand dropdown icon"}))),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"header__clock"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"pagefold-parent--medium"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"pagefold-triangle--medium"})),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"header__clock-items"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("img",{src:_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_watch_static_svg__WEBPACK_IMPORTED_MODULE_5___default(),className:"mb-8",alt:"clock icon"}),react__WEBPACK_IMPORTED_MODULE_0__.createElement("span",{className:"text-small-caption"},"Fredag"),react__WEBPACK_IMPORTED_MODULE_0__.createElement("span",{className:"text-small-caption"},"28 Maj")))),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{id:"header__overlay"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"header__overlay-main"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("img",{id:"header__menu--close",src:_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_cross_medium_svg__WEBPACK_IMPORTED_MODULE_6___default(),alt:"close"}),react__WEBPACK_IMPORTED_MODULE_0__.createElement("ul",{className:"header__overlay-menu"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("li",{className:"header__overlay-menu-item"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("a",{href:"/",className:"header__overlay-menu-link text-body-large hide-linkstyle"},"Det sker")),react__WEBPACK_IMPORTED_MODULE_0__.createElement("li",{className:"header__overlay-menu-item"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("a",{href:"/",className:"header__overlay-menu-link text-body-large hide-linkstyle"},"Biblioteker & åbningstider")),react__WEBPACK_IMPORTED_MODULE_0__.createElement("li",{className:"header__overlay-menu-item"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("a",{href:"/",className:"header__overlay-menu-link text-body-large hide-linkstyle"},"Digitale tilbud")),react__WEBPACK_IMPORTED_MODULE_0__.createElement("li",{className:"header__overlay-menu-item"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("a",{href:"/",className:"header__overlay-menu-link text-body-large hide-linkstyle"},"Litteratur")),react__WEBPACK_IMPORTED_MODULE_0__.createElement("li",{className:"header__overlay-menu-item"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("a",{href:"/",className:"header__overlay-menu-link text-body-large hide-linkstyle"},"Børn & forældre")))),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"header__overlay-backdrop"})));try{storyheaderdevinc.displayName="storyheaderdevinc",storyheaderdevinc.__docgenInfo={description:"",displayName:"storyheaderdevinc",props:{search:{defaultValue:null,description:"",name:"search",required:!1,type:{name:"ReactNode"}},userProfile:{defaultValue:null,description:"",name:"userProfile",required:!1,type:{name:"ReactNode"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/search-bar/story-header.dev.inc.tsx#storyheaderdevinc"]={docgenInfo:storyheaderdevinc.__docgenInfo,name:"storyheaderdevinc",path:"src/components/search-bar/story-header.dev.inc.tsx#storyheaderdevinc"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/simple-material/SimpleMaterial.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),react_redux__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/react-redux/es/index.js"),_button_favourite_button_favourite__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/components/button-favourite/button-favourite.tsx"),_cover_cover__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/components/cover/cover.tsx"),_core_utils_helpers_general__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/core/utils/helpers/general.ts"),_core_guardedRequests_slice__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./src/core/guardedRequests.slice.ts"),_core_utils_helpers_url__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./src/core/utils/helpers/url.ts"),_atoms_links_Link__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./src/components/atoms/links/Link.tsx"),_core_utils_url__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./src/core/utils/url.tsx");const SimpleMaterial=({bright,work:{titles:{full:fullTitle},creators,workId,manifestations:{all:manifestations}},app})=>{const materialUrl=(0,_core_utils_url__WEBPACK_IMPORTED_MODULE_7__.J_)()("materialUrl"),dispatch=(0,react_redux__WEBPACK_IMPORTED_MODULE_1__.I0)(),materialFullUrl=(0,_core_utils_helpers_url__WEBPACK_IMPORTED_MODULE_8__.WO)(materialUrl,workId);let authors=null;const inputContributorsArray=null==creators?void 0:creators.map((({display})=>display));inputContributorsArray&&(authors=(0,_core_utils_helpers_general__WEBPACK_IMPORTED_MODULE_4__.RN)(!0,inputContributorsArray));const manifestationPid=(0,_core_utils_helpers_general__WEBPACK_IMPORTED_MODULE_4__.qQ)(manifestations),title=fullTitle[0];return react__WEBPACK_IMPORTED_MODULE_0__.createElement("li",{className:"simple-material "+(bright?" simple-material--bright":"")},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"simple-material__cover-container"},react__WEBPACK_IMPORTED_MODULE_0__.createElement(_cover_cover__WEBPACK_IMPORTED_MODULE_3__.Y,{animate:!0,size:"medium",id:manifestationPid})),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"simple-material__favourite"},react__WEBPACK_IMPORTED_MODULE_0__.createElement(_button_favourite_button_favourite__WEBPACK_IMPORTED_MODULE_2__.Z,{title,darkBackground:!bright,id:workId,addToListRequest:id=>{dispatch((0,_core_guardedRequests_slice__WEBPACK_IMPORTED_MODULE_5__.Bs)({type:"addFavorite",args:{id},app}))}})),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"simple-material__meta"},react__WEBPACK_IMPORTED_MODULE_0__.createElement(_atoms_links_Link__WEBPACK_IMPORTED_MODULE_6__.Z,{href:materialFullUrl,className:"simple-material__title"},title),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"simple-material__author"},authors)))},__WEBPACK_DEFAULT_EXPORT__=SimpleMaterial;try{SimpleMaterial.displayName="SimpleMaterial",SimpleMaterial.__docgenInfo={description:"",displayName:"SimpleMaterial",props:{work:{defaultValue:null,description:"",name:"work",required:!0,type:{name:"Work"}},bright:{defaultValue:null,description:"",name:"bright",required:!1,type:{name:"boolean | undefined"}},app:{defaultValue:null,description:"",name:"app",required:!0,type:{name:"enum",value:[{value:'"material"'},{value:'"search-result"'},{value:'"advanced-search"'},{value:'"recommender"'},{value:'"something-similar"'},{value:'"favorites-list-mc"'},{value:'"inspiration-recommender"'}]}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/simple-material/SimpleMaterial.tsx#SimpleMaterial"]={docgenInfo:SimpleMaterial.__docgenInfo,name:"SimpleMaterial",path:"src/components/simple-material/SimpleMaterial.tsx#SimpleMaterial"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/skeletons/TextLineSkeleton.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js");const TextLineSkeleton=({width=40})=>react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"ssc-line w-100",style:{width:`${width}px`}}),__WEBPACK_DEFAULT_EXPORT__=TextLineSkeleton;try{TextLineSkeleton.displayName="TextLineSkeleton",TextLineSkeleton.__docgenInfo={description:"",displayName:"TextLineSkeleton",props:{width:{defaultValue:{value:"40"},description:"",name:"width",required:!1,type:{name:"number | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/skeletons/TextLineSkeleton.tsx#TextLineSkeleton"]={docgenInfo:TextLineSkeleton.__docgenInfo,name:"TextLineSkeleton",path:"src/components/skeletons/TextLineSkeleton.tsx#TextLineSkeleton"})}catch(__react_docgen_typescript_loader_error){}},"./src/core/blockedModal.slice.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Og:()=>setHasBeenVisible,ZP:()=>__WEBPACK_DEFAULT_EXPORT__});const blockedModalSlice=(0,__webpack_require__("./node_modules/@reduxjs/toolkit/dist/redux-toolkit.esm.js").oM)({name:"blockedModal",initialState:{data:{hasBeenVisible:!1}},reducers:{setHasBeenVisible(state,action){state.data.hasBeenVisible||action.payload.hasBeenVisible&&(state.data={...state.data,...action.payload})}}}),{setHasBeenVisible}=blockedModalSlice.actions,__WEBPACK_DEFAULT_EXPORT__=blockedModalSlice.reducer},"./src/core/config.slice.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Mg:()=>addConfigEntries,ZP:()=>__WEBPACK_DEFAULT_EXPORT__});const configSlice=(0,__webpack_require__("./node_modules/@reduxjs/toolkit/dist/redux-toolkit.esm.js").oM)({name:"config",initialState:{data:{}},reducers:{addConfigEntries(state,action){state.data={...state.data,...action.payload.entries}}}}),{addConfigEntries}=configSlice.actions,__WEBPACK_DEFAULT_EXPORT__=configSlice.reducer},"./src/core/configuration/index.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{ZP:()=>configuration,bc:()=>getConf,G2:()=>getDeviceConf});var lib=__webpack_require__("./node_modules/react-device-detect/dist/lib.js");const page_size_namespaceObject=JSON.parse('{"mobile":{"pageSize":10},"desktop":{"pageSize":20}}'),page_size_loan_list_namespaceObject=JSON.parse('{"mobile":{"pageSize":10},"desktop":{"pageSize":25}}'),page_size_reservation_list_namespaceObject=JSON.parse('{"mobile":{"pageSize":10},"desktop":{"pageSize":25}}'),recommender_material_limits_namespaceObject=JSON.parse('{"recommender":4,"inspiration":4,"somethingSimilar":4,"somethingSimilarAuthor":4}'),cover_tints_namespaceObject=JSON.parse('{"coverTints":["100","40","80","120","20"]}'),colors_namespaceObject=JSON.parse('{"default":"#484848","danger":"#d5364a","warning":"#f7bf42","success":"#068802"}');var modal_ids=__webpack_require__("./src/core/configuration/modal-ids.json");const reservation_namespaceObject=JSON.parse('{"defaultInterestDaysForOpenOrder":90}'),getConf=(type,configuration,device)=>{const subConf=configuration[type];return device?subConf[device]:subConf},getDeviceConf=(type,configuration)=>{const device=lib.tq?"mobile":"desktop";return getConf(type,configuration,device)},configuration={pageSize:page_size_namespaceObject,coverTints:cover_tints_namespaceObject,pageSizeLoanList:page_size_loan_list_namespaceObject,pageSizeReservationList:page_size_reservation_list_namespaceObject,colors:colors_namespaceObject,recommenderMaterialLimits:recommender_material_limits_namespaceObject,modalIds:modal_ids,reservation:reservation_namespaceObject}},"./src/core/dbc-gateway/generated/graphql.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{U5:()=>AccessTypeCode,rU:()=>CopyRequestStatus,sl:()=>FacetField,Bw:()=>SubmitOrderStatus,sW:()=>SuggestionType,Lc:()=>WorkType,KZ:()=>useComplexSearchWithPaginationQuery,af:()=>useComplexSearchWithPaginationWorkAccessQuery,Dv:()=>useGetInfomediaQuery,Ch:()=>useGetManifestationViaBestRepresentationByFaustQuery,BN:()=>useGetManifestationViaMaterialByFaustQuery,og:()=>useGetMaterialQuery,f8:()=>useGetReviewManifestationsQuery,Qk:()=>useGetSmallWorkQuery,Zu:()=>useIntelligentFacetsQuery,c6:()=>useOpenOrderMutation,zj:()=>usePlaceCopyMutation,GN:()=>useRecommendFromFaustQuery,NF:()=>useSearchFacetQuery,OX:()=>useSearchWithPaginationQuery,UC:()=>useSuggestionsFromQueryStringQuery});var es=__webpack_require__("./node_modules/react-query/es/index.js"),FetchFailedCriticalError=__webpack_require__("./src/core/fetchers/FetchFailedCriticalError.ts"),core_token=__webpack_require__("./src/core/token.js"),extractServiceBaseUrls=__webpack_require__("./src/core/utils/reduxMiddleware/extractServiceBaseUrls.ts"),FetcherCriticalHttpError=__webpack_require__("./src/core/fetchers/FetcherCriticalHttpError.ts");function _defineProperty(obj,key,value){return(key=function _toPropertyKey(t){var i=function _toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==typeof i?i:String(i)}(key))in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}class DbcGateWayHttpError extends FetcherCriticalHttpError.Z{constructor(...args){super(...args),_defineProperty(this,"name","DbcGateWayHttpError")}}const fetcher=(query,variables)=>()=>{const token=(0,core_token.LP)(core_token.b4)||(0,core_token.LP)(core_token.t8),authHeaders=token?{Authorization:`Bearer ${token}`}:{};return fetch((0,extractServiceBaseUrls.fG)(extractServiceBaseUrls.PS.fbi),{method:"POST",headers:{"Content-Type":"application/json",...authHeaders},body:JSON.stringify({query,variables})}).then((async response=>{if(!response.ok)throw new DbcGateWayHttpError(response.status,response.statusText);const json=await response.json();if(json.errors){const{message}=json.errors[0];throw new Error(message)}return json.data})).catch((error=>{if(error instanceof DbcGateWayHttpError)throw error;const message=error instanceof Error?error.message:"Unknown error";throw new FetchFailedCriticalError.Z(message,query)}))};let AccessTypeCode=function(AccessTypeCode){return AccessTypeCode.NotSpecified="NOT_SPECIFIED",AccessTypeCode.Online="ONLINE",AccessTypeCode.Physical="PHYSICAL",AccessTypeCode.Unknown="UNKNOWN",AccessTypeCode}({}),CopyRequestStatus=function(CopyRequestStatus){return CopyRequestStatus.BorchkUserBlockedByAgency="BORCHK_USER_BLOCKED_BY_AGENCY",CopyRequestStatus.BorchkUserNotVerified="BORCHK_USER_NOT_VERIFIED",CopyRequestStatus.BorchkUserNoLongerExistOnAgency="BORCHK_USER_NO_LONGER_EXIST_ON_AGENCY",CopyRequestStatus.ErrorAgencyNotSubscribed="ERROR_AGENCY_NOT_SUBSCRIBED",CopyRequestStatus.ErrorInvalidPickupBranch="ERROR_INVALID_PICKUP_BRANCH",CopyRequestStatus.ErrorMissingClientConfiguration="ERROR_MISSING_CLIENT_CONFIGURATION",CopyRequestStatus.ErrorMunicipalityagencyidNotFound="ERROR_MUNICIPALITYAGENCYID_NOT_FOUND",CopyRequestStatus.ErrorPidNotReservable="ERROR_PID_NOT_RESERVABLE",CopyRequestStatus.ErrorUnauthenticatedUser="ERROR_UNAUTHENTICATED_USER",CopyRequestStatus.Ok="OK",CopyRequestStatus.UnknownUser="UNKNOWN_USER",CopyRequestStatus}({}),FacetField=function(FacetField){return FacetField.AccessTypes="accessTypes",FacetField.CanAlwaysBeLoaned="canAlwaysBeLoaned",FacetField.ChildrenOrAdults="childrenOrAdults",FacetField.Creators="creators",FacetField.Dk5="dk5",FacetField.FictionNonfiction="fictionNonfiction",FacetField.FictionalCharacters="fictionalCharacters",FacetField.GenreAndForm="genreAndForm",FacetField.MainLanguages="mainLanguages",FacetField.MaterialTypesGeneral="materialTypesGeneral",FacetField.MaterialTypesSpecific="materialTypesSpecific",FacetField.Subjects="subjects",FacetField.WorkTypes="workTypes",FacetField.Year="year",FacetField}({}),HoldingsStatus=function(HoldingsStatus){return HoldingsStatus.OnLoan="OnLoan",HoldingsStatus.OnShelf="OnShelf",HoldingsStatus}({}),SubjectType=function(SubjectType){return SubjectType.Corporation="CORPORATION",SubjectType.FictionalCharacter="FICTIONAL_CHARACTER",SubjectType.FilmNationality="FILM_NATIONALITY",SubjectType.Laesekompasset="LAESEKOMPASSET",SubjectType.LibraryOfCongressSubjectHeading="LIBRARY_OF_CONGRESS_SUBJECT_HEADING",SubjectType.Location="LOCATION",SubjectType.MedicalSubjectHeading="MEDICAL_SUBJECT_HEADING",SubjectType.MusicalInstrumentation="MUSICAL_INSTRUMENTATION",SubjectType.MusicCountryOfOrigin="MUSIC_COUNTRY_OF_ORIGIN",SubjectType.MusicTimePeriod="MUSIC_TIME_PERIOD",SubjectType.NationalAgriculturalLibrary="NATIONAL_AGRICULTURAL_LIBRARY",SubjectType.Person="PERSON",SubjectType.TimePeriod="TIME_PERIOD",SubjectType.Title="TITLE",SubjectType.Topic="TOPIC",SubjectType}({}),SubmitOrderStatus=function(SubmitOrderStatus){return SubmitOrderStatus.AuthenticationError="AUTHENTICATION_ERROR",SubmitOrderStatus.BorchkUserBlockedByAgency="BORCHK_USER_BLOCKED_BY_AGENCY",SubmitOrderStatus.BorchkUserNotVerified="BORCHK_USER_NOT_VERIFIED",SubmitOrderStatus.BorchkUserNoLongerExistOnAgency="BORCHK_USER_NO_LONGER_EXIST_ON_AGENCY",SubmitOrderStatus.InvalidOrder="INVALID_ORDER",SubmitOrderStatus.NotOwnedIllLoc="NOT_OWNED_ILL_LOC",SubmitOrderStatus.NotOwnedNoIllLoc="NOT_OWNED_NO_ILL_LOC",SubmitOrderStatus.NotOwnedWrongIllMediumtype="NOT_OWNED_WRONG_ILL_MEDIUMTYPE",SubmitOrderStatus.NoServicerequester="NO_SERVICEREQUESTER",SubmitOrderStatus.OrsError="ORS_ERROR",SubmitOrderStatus.OwnedAccepted="OWNED_ACCEPTED",SubmitOrderStatus.OwnedOwnCatalogue="OWNED_OWN_CATALOGUE",SubmitOrderStatus.OwnedWrongMediumtype="OWNED_WRONG_MEDIUMTYPE",SubmitOrderStatus.ServiceUnavailable="SERVICE_UNAVAILABLE",SubmitOrderStatus.UnknownError="UNKNOWN_ERROR",SubmitOrderStatus.UnknownPickupagency="UNKNOWN_PICKUPAGENCY",SubmitOrderStatus.UnknownUser="UNKNOWN_USER",SubmitOrderStatus}({}),SuggestionType=function(SuggestionType){return SuggestionType.Composit="COMPOSIT",SuggestionType.Creator="CREATOR",SuggestionType.Subject="SUBJECT",SuggestionType.Title="TITLE",SuggestionType}({}),WorkType=function(WorkType){return WorkType.Analysis="ANALYSIS",WorkType.Article="ARTICLE",WorkType.Bookdescription="BOOKDESCRIPTION",WorkType.Game="GAME",WorkType.Literature="LITERATURE",WorkType.Map="MAP",WorkType.Movie="MOVIE",WorkType.Music="MUSIC",WorkType.Other="OTHER",WorkType.Periodica="PERIODICA",WorkType.Portrait="PORTRAIT",WorkType.Review="REVIEW",WorkType.Sheetmusic="SHEETMUSIC",WorkType.Track="TRACK",WorkType}({});const WithLanguagesFragmentDoc="\n fragment WithLanguages on Manifestation {\n languages {\n main {\n display\n isoCode\n }\n }\n}\n ",ManifestationBasicDetailsFragmentDoc=`\n fragment ManifestationBasicDetails on Manifestation {\n ...WithLanguages\n pid\n titles {\n full\n }\n abstract\n materialTypes {\n specific\n }\n creators {\n display\n }\n edition {\n publicationYear {\n display\n }\n }\n series {\n title\n numberInSeries {\n number\n }\n }\n}\n ${WithLanguagesFragmentDoc}`,WorkSmallFragmentDoc=`\n fragment WorkSmall on Work {\n workId\n titles {\n full\n original\n }\n abstract\n creators {\n display\n __typename\n }\n series {\n ...SeriesSimple\n }\n seriesMembers {\n workId\n titles {\n main\n full\n original\n }\n }\n workYear {\n year\n }\n genreAndForm\n manifestations {\n ...ManifestationsSimple\n }\n}\n \n fragment SeriesSimple on Series {\n title\n isPopular\n numberInSeries {\n display\n number\n }\n readThisFirst\n readThisWhenever\n}\n \n${`\n fragment ManifestationsSimple on Manifestations {\n all {\n ...ManifestationsSimpleFields\n }\n latest {\n ...ManifestationsSimpleFields\n }\n bestRepresentation {\n ...ManifestationsSimpleFields\n }\n}\n ${`\n fragment ManifestationsSimpleFields on Manifestation {\n pid\n genreAndForm\n source\n ...WithLanguages\n titles {\n main\n original\n }\n fictionNonfiction {\n display\n code\n }\n materialTypes {\n specific\n }\n creators {\n display\n __typename\n }\n publisher\n identifiers {\n value\n }\n contributors {\n display\n }\n edition {\n summary\n publicationYear {\n display\n }\n }\n dateFirstEdition {\n display\n year\n }\n audience {\n generalAudience\n }\n physicalDescriptions {\n numberOfPages\n playingTime\n }\n materialTypes {\n specific\n }\n accessTypes {\n code\n }\n access {\n __typename\n ... on AccessUrl {\n origin\n url\n loginRequired\n }\n ... on InfomediaService {\n id\n }\n ... on InterLibraryLoan {\n loanIsPossible\n }\n ... on Ereol {\n origin\n url\n canAlwaysBeLoaned\n }\n ... on DigitalArticleService {\n issn\n }\n }\n shelfmark {\n postfix\n shelfmark\n }\n workYear {\n year\n }\n catalogueCodes {\n nationalBibliography\n otherCatalogues\n }\n}\n ${WithLanguagesFragmentDoc}`}`}`,GetSmallWorkDocument=`\n query getSmallWork($id: String!) {\n work(id: $id) {\n ...WorkSmall\n }\n}\n ${WorkSmallFragmentDoc}`,useGetSmallWorkQuery=(variables,options)=>(0,es.useQuery)(["getSmallWork",variables],fetcher(GetSmallWorkDocument,variables),options),GetManifestationViaMaterialByFaustDocument=`\n query getManifestationViaMaterialByFaust($faust: String!) {\n manifestation(faust: $faust) {\n ...ManifestationBasicDetails\n }\n}\n ${ManifestationBasicDetailsFragmentDoc}`,useGetManifestationViaMaterialByFaustQuery=(variables,options)=>(0,es.useQuery)(["getManifestationViaMaterialByFaust",variables],fetcher(GetManifestationViaMaterialByFaustDocument,variables),options),GetManifestationViaBestRepresentationByFaustDocument=`\n query getManifestationViaBestRepresentationByFaust($faust: String!) {\n manifestation(faust: $faust) {\n ownerWork {\n manifestations {\n bestRepresentation {\n ...ManifestationBasicDetails\n }\n }\n }\n }\n}\n ${ManifestationBasicDetailsFragmentDoc}`,useGetManifestationViaBestRepresentationByFaustQuery=(variables,options)=>(0,es.useQuery)(["getManifestationViaBestRepresentationByFaust",variables],fetcher(GetManifestationViaBestRepresentationByFaustDocument,variables),options),GetMaterialDocument=`\n query getMaterial($wid: String!) {\n work(id: $wid) {\n ...WorkMedium\n }\n}\n ${`\n fragment WorkMedium on Work {\n ...WorkSmall\n materialTypes {\n specific\n }\n mainLanguages {\n display\n isoCode\n }\n subjects {\n all {\n display\n }\n dbcVerified {\n display\n }\n }\n fictionNonfiction {\n display\n code\n }\n dk5MainEntry {\n display\n }\n relations {\n hasReview {\n pid\n }\n hasAdaptation {\n ownerWork {\n workId\n workTypes\n titles {\n main\n }\n }\n }\n }\n}\n ${WorkSmallFragmentDoc}`}`,useGetMaterialQuery=(variables,options)=>(0,es.useQuery)(["getMaterial",variables],fetcher(GetMaterialDocument,variables),options),useGetInfomediaQuery=(variables,options)=>(0,es.useQuery)(["getInfomedia",variables],fetcher("\n query getInfomedia($id: String!) {\n infomedia(id: $id) {\n error\n article {\n headLine\n text\n }\n }\n}\n ",variables),options),useGetReviewManifestationsQuery=(variables,options)=>(0,es.useQuery)(["getReviewManifestations",variables],fetcher("\n query getReviewManifestations($pid: [String!]!) {\n manifestations(pid: $pid) {\n ...ManifestationReviewFields\n }\n}\n \n fragment ManifestationReviewFields on Manifestation {\n pid\n creators {\n display\n }\n access {\n __typename\n ... on InfomediaService {\n id\n }\n ... on DigitalArticleService {\n issn\n }\n ... on AccessUrl {\n url\n origin\n }\n }\n edition {\n publicationYear {\n display\n }\n }\n hostPublication {\n title\n issue\n }\n creators {\n display\n }\n physicalDescriptions {\n summary\n }\n dateFirstEdition {\n display\n }\n workYear {\n display\n }\n review {\n rating\n reviewByLibrarians {\n content\n heading\n type\n manifestations {\n pid\n titles {\n main\n }\n }\n }\n }\n}\n ",variables),options),useOpenOrderMutation=options=>(0,es.useMutation)(["openOrder"],(variables=>fetcher("\n mutation openOrder($input: SubmitOrderInput!) {\n submitOrder(input: $input, dryRun: false) {\n status\n message\n orderId\n }\n}\n ",variables)()),options),RecommendFromFaustDocument=`\n query recommendFromFaust($faust: String!, $limit: Int!) {\n recommend(faust: $faust, limit: $limit) {\n result {\n work {\n ...WorkSmall\n }\n }\n }\n}\n ${WorkSmallFragmentDoc}`,useRecommendFromFaustQuery=(variables,options)=>(0,es.useQuery)(["recommendFromFaust",variables],fetcher(RecommendFromFaustDocument,variables),options),SearchWithPaginationDocument=`\n query searchWithPagination($q: SearchQuery!, $offset: Int!, $limit: PaginationLimit!, $filters: SearchFilters) {\n search(q: $q, filters: $filters) {\n hitcount\n works(offset: $offset, limit: $limit) {\n ...WorkSmall\n }\n }\n}\n ${WorkSmallFragmentDoc}`,useSearchWithPaginationQuery=(variables,options)=>(0,es.useQuery)(["searchWithPagination",variables],fetcher(SearchWithPaginationDocument,variables),options),useComplexSearchWithPaginationWorkAccessQuery=(variables,options)=>(0,es.useQuery)(["complexSearchWithPaginationWorkAccess",variables],fetcher("\n query complexSearchWithPaginationWorkAccess($cql: String!, $offset: Int!, $limit: PaginationLimit!, $filters: ComplexSearchFilters!) {\n complexSearch(cql: $cql, filters: $filters) {\n hitcount\n works(offset: $offset, limit: $limit) {\n ...WorkAccess\n }\n }\n}\n \n fragment WorkAccess on Work {\n workId\n manifestations {\n ...ManifestationsAccess\n }\n}\n \n fragment ManifestationsAccess on Manifestations {\n all {\n pid\n identifiers {\n type\n value\n }\n access {\n __typename\n ... on AccessUrl {\n origin\n url\n loginRequired\n }\n ... on InfomediaService {\n id\n }\n ... on InterLibraryLoan {\n loanIsPossible\n }\n ... on Ereol {\n origin\n url\n canAlwaysBeLoaned\n }\n ... on DigitalArticleService {\n issn\n }\n }\n }\n}\n ",variables),options),ComplexSearchWithPaginationDocument=`\n query complexSearchWithPagination($cql: String!, $offset: Int!, $limit: PaginationLimit!, $filters: ComplexSearchFilters!) {\n complexSearch(cql: $cql, filters: $filters) {\n hitcount\n works(offset: $offset, limit: $limit) {\n ...WorkSmall\n }\n }\n}\n ${WorkSmallFragmentDoc}`,useComplexSearchWithPaginationQuery=(variables,options)=>(0,es.useQuery)(["complexSearchWithPagination",variables],fetcher(ComplexSearchWithPaginationDocument,variables),options),SuggestionsFromQueryStringDocument=`\n query suggestionsFromQueryString($q: String!) {\n suggest(q: $q) {\n result {\n type\n term\n work {\n workId\n titles {\n main\n }\n creators {\n display\n }\n manifestations {\n bestRepresentation {\n pid\n ...WithLanguages\n }\n }\n }\n }\n }\n}\n ${WithLanguagesFragmentDoc}`,useSuggestionsFromQueryStringQuery=(variables,options)=>(0,es.useQuery)(["suggestionsFromQueryString",variables],fetcher(SuggestionsFromQueryStringDocument,variables),options),useSearchFacetQuery=(variables,options)=>(0,es.useQuery)(["searchFacet",variables],fetcher("\n query searchFacet($q: SearchQuery!, $facets: [FacetField!]!, $facetLimit: Int!, $filters: SearchFilters) {\n search(q: $q, filters: $filters) {\n facets(facets: $facets) {\n name\n values(limit: $facetLimit) {\n key\n term\n score\n }\n }\n }\n}\n ",variables),options),useIntelligentFacetsQuery=(variables,options)=>(0,es.useQuery)(["intelligentFacets",variables],fetcher("\n query intelligentFacets($q: SearchQuery!, $facetsLimit: Int!, $valuesLimit: Int!, $filters: SearchFilters!) {\n search(q: $q, filters: $filters) {\n intelligentFacets(limit: $facetsLimit) {\n name\n values(limit: $valuesLimit) {\n key\n term\n score\n }\n }\n }\n}\n ",variables),options),usePlaceCopyMutation=options=>(0,es.useMutation)(["placeCopy"],(variables=>fetcher("\n mutation placeCopy($input: CopyRequestInput!) {\n elba {\n placeCopyRequest(input: $input) {\n status\n }\n }\n}\n ",variables)()),options);try{FacetField.displayName="FacetField",FacetField.__docgenInfo={description:"The supported facet fields",displayName:"FacetField",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/dbc-gateway/generated/graphql.tsx#FacetField"]={docgenInfo:FacetField.__docgenInfo,name:"FacetField",path:"src/core/dbc-gateway/generated/graphql.tsx#FacetField"})}catch(__react_docgen_typescript_loader_error){}try{HoldingsStatus.OnLoan.displayName="HoldingsStatus.OnLoan",HoldingsStatus.OnLoan.__docgenInfo={description:"Holding is on loan",displayName:"HoldingsStatus.OnLoan",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/dbc-gateway/generated/graphql.tsx#HoldingsStatus.OnLoan"]={docgenInfo:HoldingsStatus.OnLoan.__docgenInfo,name:"HoldingsStatus.OnLoan",path:"src/core/dbc-gateway/generated/graphql.tsx#HoldingsStatus.OnLoan"})}catch(__react_docgen_typescript_loader_error){}try{HoldingsStatus.OnShelf.displayName="HoldingsStatus.OnShelf",HoldingsStatus.OnShelf.__docgenInfo={description:"Holding is physically available at the branch",displayName:"HoldingsStatus.OnShelf",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/dbc-gateway/generated/graphql.tsx#HoldingsStatus.OnShelf"]={docgenInfo:HoldingsStatus.OnShelf.__docgenInfo,name:"HoldingsStatus.OnShelf",path:"src/core/dbc-gateway/generated/graphql.tsx#HoldingsStatus.OnShelf"})}catch(__react_docgen_typescript_loader_error){}try{SubjectType.Person.displayName="SubjectType.Person",SubjectType.Person.__docgenInfo={description:"added for manifestation.parts.creators/person - they get a type from small-rye",displayName:"SubjectType.Person",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/dbc-gateway/generated/graphql.tsx#SubjectType.Person"]={docgenInfo:SubjectType.Person.__docgenInfo,name:"SubjectType.Person",path:"src/core/dbc-gateway/generated/graphql.tsx#SubjectType.Person"})}catch(__react_docgen_typescript_loader_error){}try{SubmitOrderStatus.AuthenticationError.displayName="SubmitOrderStatus.AuthenticationError",SubmitOrderStatus.AuthenticationError.__docgenInfo={description:"Authentication error",displayName:"SubmitOrderStatus.AuthenticationError",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.AuthenticationError"]={docgenInfo:SubmitOrderStatus.AuthenticationError.__docgenInfo,name:"SubmitOrderStatus.AuthenticationError",path:"src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.AuthenticationError"})}catch(__react_docgen_typescript_loader_error){}try{SubmitOrderStatus.BorchkUserBlockedByAgency.displayName="SubmitOrderStatus.BorchkUserBlockedByAgency",SubmitOrderStatus.BorchkUserBlockedByAgency.__docgenInfo={description:"Borchk: User is blocked by agency",displayName:"SubmitOrderStatus.BorchkUserBlockedByAgency",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.BorchkUserBlockedByAgency"]={docgenInfo:SubmitOrderStatus.BorchkUserBlockedByAgency.__docgenInfo,name:"SubmitOrderStatus.BorchkUserBlockedByAgency",path:"src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.BorchkUserBlockedByAgency"})}catch(__react_docgen_typescript_loader_error){}try{SubmitOrderStatus.BorchkUserNotVerified.displayName="SubmitOrderStatus.BorchkUserNotVerified",SubmitOrderStatus.BorchkUserNotVerified.__docgenInfo={description:"Borchk: User could not be verified",displayName:"SubmitOrderStatus.BorchkUserNotVerified",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.BorchkUserNotVerified"]={docgenInfo:SubmitOrderStatus.BorchkUserNotVerified.__docgenInfo,name:"SubmitOrderStatus.BorchkUserNotVerified",path:"src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.BorchkUserNotVerified"})}catch(__react_docgen_typescript_loader_error){}try{SubmitOrderStatus.BorchkUserNoLongerExistOnAgency.displayName="SubmitOrderStatus.BorchkUserNoLongerExistOnAgency",SubmitOrderStatus.BorchkUserNoLongerExistOnAgency.__docgenInfo={description:"Borchk: User is no longer loaner at the provided pickupbranch",displayName:"SubmitOrderStatus.BorchkUserNoLongerExistOnAgency",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.BorchkUserNoLongerExistOnAgency"]={docgenInfo:SubmitOrderStatus.BorchkUserNoLongerExistOnAgency.__docgenInfo,name:"SubmitOrderStatus.BorchkUserNoLongerExistOnAgency",path:"src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.BorchkUserNoLongerExistOnAgency"})}catch(__react_docgen_typescript_loader_error){}try{SubmitOrderStatus.InvalidOrder.displayName="SubmitOrderStatus.InvalidOrder",SubmitOrderStatus.InvalidOrder.__docgenInfo={description:"Order does not validate",displayName:"SubmitOrderStatus.InvalidOrder",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.InvalidOrder"]={docgenInfo:SubmitOrderStatus.InvalidOrder.__docgenInfo,name:"SubmitOrderStatus.InvalidOrder",path:"src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.InvalidOrder"})}catch(__react_docgen_typescript_loader_error){}try{SubmitOrderStatus.NotOwnedIllLoc.displayName="SubmitOrderStatus.NotOwnedIllLoc",SubmitOrderStatus.NotOwnedIllLoc.__docgenInfo={description:"Item not available at pickupAgency, item localised for ILL",displayName:"SubmitOrderStatus.NotOwnedIllLoc",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.NotOwnedIllLoc"]={docgenInfo:SubmitOrderStatus.NotOwnedIllLoc.__docgenInfo,name:"SubmitOrderStatus.NotOwnedIllLoc",path:"src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.NotOwnedIllLoc"})}catch(__react_docgen_typescript_loader_error){}try{SubmitOrderStatus.NotOwnedNoIllLoc.displayName="SubmitOrderStatus.NotOwnedNoIllLoc",SubmitOrderStatus.NotOwnedNoIllLoc.__docgenInfo={description:"Item not available at pickupAgency, item not localised for ILL",displayName:"SubmitOrderStatus.NotOwnedNoIllLoc",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.NotOwnedNoIllLoc"]={docgenInfo:SubmitOrderStatus.NotOwnedNoIllLoc.__docgenInfo,name:"SubmitOrderStatus.NotOwnedNoIllLoc",path:"src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.NotOwnedNoIllLoc"})}catch(__react_docgen_typescript_loader_error){}try{SubmitOrderStatus.NotOwnedWrongIllMediumtype.displayName="SubmitOrderStatus.NotOwnedWrongIllMediumtype",SubmitOrderStatus.NotOwnedWrongIllMediumtype.__docgenInfo={description:"Item not available at pickupAgency, ILL of mediumType not accepted",displayName:"SubmitOrderStatus.NotOwnedWrongIllMediumtype",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.NotOwnedWrongIllMediumtype"]={docgenInfo:SubmitOrderStatus.NotOwnedWrongIllMediumtype.__docgenInfo,name:"SubmitOrderStatus.NotOwnedWrongIllMediumtype",path:"src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.NotOwnedWrongIllMediumtype"})}catch(__react_docgen_typescript_loader_error){}try{SubmitOrderStatus.NoServicerequester.displayName="SubmitOrderStatus.NoServicerequester",SubmitOrderStatus.NoServicerequester.__docgenInfo={description:"ServiceRequester is obligatory",displayName:"SubmitOrderStatus.NoServicerequester",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.NoServicerequester"]={docgenInfo:SubmitOrderStatus.NoServicerequester.__docgenInfo,name:"SubmitOrderStatus.NoServicerequester",path:"src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.NoServicerequester"})}catch(__react_docgen_typescript_loader_error){}try{SubmitOrderStatus.OrsError.displayName="SubmitOrderStatus.OrsError",SubmitOrderStatus.OrsError.__docgenInfo={description:"Error sending order to ORS",displayName:"SubmitOrderStatus.OrsError",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.OrsError"]={docgenInfo:SubmitOrderStatus.OrsError.__docgenInfo,name:"SubmitOrderStatus.OrsError",path:"src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.OrsError"})}catch(__react_docgen_typescript_loader_error){}try{SubmitOrderStatus.OwnedAccepted.displayName="SubmitOrderStatus.OwnedAccepted",SubmitOrderStatus.OwnedAccepted.__docgenInfo={description:"Item available at pickupAgency, order accepted",displayName:"SubmitOrderStatus.OwnedAccepted",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.OwnedAccepted"]={docgenInfo:SubmitOrderStatus.OwnedAccepted.__docgenInfo,name:"SubmitOrderStatus.OwnedAccepted",path:"src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.OwnedAccepted"})}catch(__react_docgen_typescript_loader_error){}try{SubmitOrderStatus.OwnedOwnCatalogue.displayName="SubmitOrderStatus.OwnedOwnCatalogue",SubmitOrderStatus.OwnedOwnCatalogue.__docgenInfo={description:"Item available at pickupAgency, item may be ordered through the library's catalogue",displayName:"SubmitOrderStatus.OwnedOwnCatalogue",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.OwnedOwnCatalogue"]={docgenInfo:SubmitOrderStatus.OwnedOwnCatalogue.__docgenInfo,name:"SubmitOrderStatus.OwnedOwnCatalogue",path:"src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.OwnedOwnCatalogue"})}catch(__react_docgen_typescript_loader_error){}try{SubmitOrderStatus.OwnedWrongMediumtype.displayName="SubmitOrderStatus.OwnedWrongMediumtype",SubmitOrderStatus.OwnedWrongMediumtype.__docgenInfo={description:"Item available at pickupAgency, order of mediumType not accepted",displayName:"SubmitOrderStatus.OwnedWrongMediumtype",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.OwnedWrongMediumtype"]={docgenInfo:SubmitOrderStatus.OwnedWrongMediumtype.__docgenInfo,name:"SubmitOrderStatus.OwnedWrongMediumtype",path:"src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.OwnedWrongMediumtype"})}catch(__react_docgen_typescript_loader_error){}try{SubmitOrderStatus.ServiceUnavailable.displayName="SubmitOrderStatus.ServiceUnavailable",SubmitOrderStatus.ServiceUnavailable.__docgenInfo={description:"Service unavailable",displayName:"SubmitOrderStatus.ServiceUnavailable",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.ServiceUnavailable"]={docgenInfo:SubmitOrderStatus.ServiceUnavailable.__docgenInfo,name:"SubmitOrderStatus.ServiceUnavailable",path:"src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.ServiceUnavailable"})}catch(__react_docgen_typescript_loader_error){}try{SubmitOrderStatus.UnknownError.displayName="SubmitOrderStatus.UnknownError",SubmitOrderStatus.UnknownError.__docgenInfo={description:"Unknown error occured, status is unknown",displayName:"SubmitOrderStatus.UnknownError",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.UnknownError"]={docgenInfo:SubmitOrderStatus.UnknownError.__docgenInfo,name:"SubmitOrderStatus.UnknownError",path:"src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.UnknownError"})}catch(__react_docgen_typescript_loader_error){}try{SubmitOrderStatus.UnknownPickupagency.displayName="SubmitOrderStatus.UnknownPickupagency",SubmitOrderStatus.UnknownPickupagency.__docgenInfo={description:"PickupAgency not found",displayName:"SubmitOrderStatus.UnknownPickupagency",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.UnknownPickupagency"]={docgenInfo:SubmitOrderStatus.UnknownPickupagency.__docgenInfo,name:"SubmitOrderStatus.UnknownPickupagency",path:"src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.UnknownPickupagency"})}catch(__react_docgen_typescript_loader_error){}try{SubmitOrderStatus.UnknownUser.displayName="SubmitOrderStatus.UnknownUser",SubmitOrderStatus.UnknownUser.__docgenInfo={description:"User not found",displayName:"SubmitOrderStatus.UnknownUser",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.UnknownUser"]={docgenInfo:SubmitOrderStatus.UnknownUser.__docgenInfo,name:"SubmitOrderStatus.UnknownUser",path:"src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.UnknownUser"})}catch(__react_docgen_typescript_loader_error){}try{useOpenOrderMutation.displayName="useOpenOrderMutation",useOpenOrderMutation.__docgenInfo={description:"",displayName:"useOpenOrderMutation",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/dbc-gateway/generated/graphql.tsx#useOpenOrderMutation"]={docgenInfo:useOpenOrderMutation.__docgenInfo,name:"useOpenOrderMutation",path:"src/core/dbc-gateway/generated/graphql.tsx#useOpenOrderMutation"})}catch(__react_docgen_typescript_loader_error){}try{usePlaceCopyMutation.displayName="usePlaceCopyMutation",usePlaceCopyMutation.__docgenInfo={description:"",displayName:"usePlaceCopyMutation",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/dbc-gateway/generated/graphql.tsx#usePlaceCopyMutation"]={docgenInfo:usePlaceCopyMutation.__docgenInfo,name:"usePlaceCopyMutation",path:"src/core/dbc-gateway/generated/graphql.tsx#usePlaceCopyMutation"})}catch(__react_docgen_typescript_loader_error){}},"./src/core/dpl-cms/dpl-cms.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{by:()=>useCampaignMatchPOST,Yh:()=>useProxyUrlGET});var es=__webpack_require__("./node_modules/react-query/es/index.js"),FetchFailedError=__webpack_require__("./src/core/fetchers/FetchFailedError.ts"),helpers=__webpack_require__("./src/core/fetchers/helpers.ts"),core_token=__webpack_require__("./src/core/token.js"),extractServiceBaseUrls=__webpack_require__("./src/core/utils/reduxMiddleware/extractServiceBaseUrls.ts"),FetcherHttpError=__webpack_require__("./src/core/fetchers/FetcherHttpError.ts");function _defineProperty(obj,key,value){return(key=function _toPropertyKey(t){var i=function _toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==typeof i?i:String(i)}(key))in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}class DplCmsServiceHttpError extends FetcherHttpError.Z{constructor(...args){super(...args),_defineProperty(this,"name","DplCmsServiceHttpError")}}const fetcher=async({url,method,headers,params,data})=>{const token=(0,core_token.LP)(core_token.b4)??(0,core_token.LP)(core_token.t8),authHeaders=token?{Authorization:`Bearer ${token}`}:{},body=data?JSON.stringify(data):null,serviceUrl=(0,helpers._o)({baseUrl:(0,extractServiceBaseUrls.fG)(extractServiceBaseUrls.PS.dplCms),url,params});try{const response=await fetch(serviceUrl,{method,headers:{...headers,...authHeaders},body});if(!response.ok)throw new DplCmsServiceHttpError(response.status,response.statusText,serviceUrl);try{return await response.json()}catch(e){if(!(e instanceof SyntaxError))throw e}}catch(error){if(error instanceof DplCmsServiceHttpError)throw error;const message=error instanceof Error?error.message:"Unknown error";throw new FetchFailedError.Z(message,serviceUrl)}return null},useCampaignMatchPOST=options=>{const{mutation:mutationOptions}=options??{};return(0,es.useMutation)((props=>{const{data,params}=props??{};return((campaignMatchPOSTBodyItem,params)=>fetcher({url:"/dpl_campaign/match",method:"post",headers:{"Content-Type":"application/json"},data:campaignMatchPOSTBodyItem,params}))(data,params)}),mutationOptions)},useProxyUrlGET=(params,queryOptions)=>{const queryKey=(null==queryOptions?void 0:queryOptions.queryKey)??(params=>["/dpl-url-proxy",...params?[params]:[]])(params),query=(0,es.useQuery)(queryKey,(({signal})=>((params,signal)=>fetcher({url:"/dpl-url-proxy",method:"get",signal,params}))(params)),queryOptions);return{queryKey,...query}}},"./src/core/errors/InvalidUrlError.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";function _defineProperty(obj,key,value){return(key=function _toPropertyKey(t){var i=function _toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==typeof i?i:String(i)}(key))in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}__webpack_require__.d(__webpack_exports__,{Z:()=>InvalidUrlError});class InvalidUrlError extends Error{constructor(message,context){super(message),this.message=message,this.context=context,_defineProperty(this,"useErrorBoundary",!1),_defineProperty(this,"name","InvalidUrlError")}}},"./src/core/fbs/fbs.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{AG:()=>getAvailabilityV3,OL:()=>getGetHoldingsV3QueryKey,_0:()=>getGetLoansV2QueryKey,Tk:()=>getGetPatronInformationByPatronIdV2QueryKey,Jp:()=>getGetReservationsV2QueryKey,kd:()=>useAddReservationsV2,RI:()=>useCreateV4,a4:()=>useDeleteReservations,DP:()=>useGetAvailabilityV3,CI:()=>useGetFeesV2,T8:()=>useGetHoldingsV3,n1:()=>useGetLoansV2,wK:()=>useGetPatronInformationByPatronIdV2,U:()=>useGetReservationsV2,Gb:()=>useRenewLoansV2,OE:()=>useUpdateReservations,tX:()=>useUpdateV5});var es=__webpack_require__("./node_modules/react-query/es/index.js"),FetchFailedCriticalError=__webpack_require__("./src/core/fetchers/FetchFailedCriticalError.ts"),helpers=__webpack_require__("./src/core/fetchers/helpers.ts"),core_token=__webpack_require__("./src/core/token.js"),extractServiceBaseUrls=__webpack_require__("./src/core/utils/reduxMiddleware/extractServiceBaseUrls.ts"),FetcherCriticalHttpError=__webpack_require__("./src/core/fetchers/FetcherCriticalHttpError.ts");function _defineProperty(obj,key,value){return(key=function _toPropertyKey(t){var i=function _toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==typeof i?i:String(i)}(key))in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}class FbsServiceHttpError extends FetcherCriticalHttpError.Z{constructor(...args){super(...args),_defineProperty(this,"name","FbsServiceHttpError")}}const fetcher_fetcher=async({url,method,headers,params,data})=>{const token=(0,core_token.LP)(core_token.b4)??(0,core_token.LP)(core_token.t8),baseUrl=(0,extractServiceBaseUrls.fG)(extractServiceBaseUrls.PS.fbs),authHeaders=token?{Authorization:`Bearer ${token}`}:{},body=data?JSON.stringify(data):null,serviceUrl=(0,helpers._o)({baseUrl,url,params});try{const response=await fetch(serviceUrl,{method,headers:{...headers,...authHeaders},body});if(!response.ok)throw new FbsServiceHttpError(response.status,response.statusText,serviceUrl);try{return await response.json()}catch(e){if(!(e instanceof SyntaxError))throw e}}catch(error){if(error instanceof FbsServiceHttpError)throw error;const message=error instanceof Error?error.message:"Unknown error";throw new FetchFailedCriticalError.Z(message,serviceUrl)}return null},useDeleteReservations=options=>{const{mutation:mutationOptions}=options??{};return(0,es.useMutation)((props=>{const{params}=props??{};return(params=>fetcher_fetcher({url:"/external/v1/agencyid/patrons/patronid/reservations",method:"delete",params}))(params)}),mutationOptions)},useUpdateReservations=options=>{const{mutation:mutationOptions}=options??{};return(0,es.useMutation)((props=>{const{data}=props??{};return fetcher_fetcher({url:"/external/v1/agencyid/patrons/patronid/reservations",method:"put",headers:{"Content-Type":"application/json"},data})}),mutationOptions)},getGetReservationsV2QueryKey=()=>["/external/v1/agencyid/patrons/patronid/reservations/v2"],useGetReservationsV2=options=>{const{query:queryOptions}=options??{},queryKey=(null==queryOptions?void 0:queryOptions.queryKey)??getGetReservationsV2QueryKey();return{queryKey,...(0,es.useQuery)(queryKey,(({signal})=>(signal=>fetcher_fetcher({url:"/external/v1/agencyid/patrons/patronid/reservations/v2",method:"get",signal}))(signal)),queryOptions)}},useAddReservationsV2=options=>{const{mutation:mutationOptions}=options??{};return(0,es.useMutation)((props=>{const{data}=props??{};return fetcher_fetcher({url:"/external/v1/agencyid/patrons/patronid/reservations/v2",method:"post",headers:{"Content-Type":"application/json"},data})}),mutationOptions)},getAvailabilityV3=(params,signal)=>fetcher_fetcher({url:"/external/agencyid/catalog/availability/v3",method:"get",signal,params}),useGetAvailabilityV3=(params,options)=>{const{query:queryOptions}=options??{},queryKey=(null==queryOptions?void 0:queryOptions.queryKey)??(params=>["/external/agencyid/catalog/availability/v3",...params?[params]:[]])(params);return{queryKey,...(0,es.useQuery)(queryKey,(({signal})=>getAvailabilityV3(params,signal)),queryOptions)}},getGetHoldingsV3QueryKey=params=>["/external/agencyid/catalog/holdings/v3",...params?[params]:[]],useGetHoldingsV3=(params,options)=>{const{query:queryOptions}=options??{},queryKey=(null==queryOptions?void 0:queryOptions.queryKey)??getGetHoldingsV3QueryKey(params),query=(0,es.useQuery)(queryKey,(({signal})=>((params,signal)=>fetcher_fetcher({url:"/external/agencyid/catalog/holdings/v3",method:"get",signal,params}))(params,signal)),queryOptions);return{queryKey,...query}},useGetFeesV2=(params,options)=>{const{query:queryOptions}=options??{},queryKey=(null==queryOptions?void 0:queryOptions.queryKey)??(params=>["/external/agencyid/patron/patronid/fees/v2",...params?[params]:[]])(params),query=(0,es.useQuery)(queryKey,(({signal})=>((params,signal)=>fetcher_fetcher({url:"/external/agencyid/patron/patronid/fees/v2",method:"get",signal,params}))(params,signal)),queryOptions);return{queryKey,...query}},useCreateV4=options=>{const{mutation:mutationOptions}=options??{};return(0,es.useMutation)((props=>{const{data}=props??{};return fetcher_fetcher({url:"/external/agencyid/patrons/v4",method:"post",headers:{"Content-Type":"application/json"},data})}),mutationOptions)},useRenewLoansV2=options=>{const{mutation:mutationOptions}=options??{};return(0,es.useMutation)((props=>{const{data}=props??{};return fetcher_fetcher({url:"/external/agencyid/patrons/patronid/loans/renew/v2",method:"post",headers:{"Content-Type":"application/json"},data})}),mutationOptions)},getGetLoansV2QueryKey=()=>["/external/agencyid/patrons/patronid/loans/v2"],useGetLoansV2=options=>{const{query:queryOptions}=options??{},queryKey=(null==queryOptions?void 0:queryOptions.queryKey)??getGetLoansV2QueryKey();return{queryKey,...(0,es.useQuery)(queryKey,(({signal})=>(signal=>fetcher_fetcher({url:"/external/agencyid/patrons/patronid/loans/v2",method:"get",signal}))(signal)),queryOptions)}},getGetPatronInformationByPatronIdV2QueryKey=()=>["/external/agencyid/patrons/patronid/v2"],useGetPatronInformationByPatronIdV2=queryOptions=>{const queryKey=(null==queryOptions?void 0:queryOptions.queryKey)??getGetPatronInformationByPatronIdV2QueryKey();return{queryKey,...(0,es.useQuery)(queryKey,(({signal})=>(signal=>fetcher_fetcher({url:"/external/agencyid/patrons/patronid/v2",method:"get",signal}))()),queryOptions)}},useUpdateV5=options=>{const{mutation:mutationOptions}=options??{};return(0,es.useMutation)((props=>{const{data}=props??{};return fetcher_fetcher({url:"/external/agencyid/patrons/patronid/v5",method:"put",headers:{"Content-Type":"application/json"},data})}),mutationOptions)}},"./src/core/fetchers/FetchFailedCriticalError.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>FetchFailedCriticalError});var _FetcherError__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/core/fetchers/FetcherError.ts");function _defineProperty(obj,key,value){return(key=function _toPropertyKey(t){var i=function _toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==typeof i?i:String(i)}(key))in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}class FetchFailedCriticalError extends _FetcherError__WEBPACK_IMPORTED_MODULE_0__.Z{constructor(message,context){super(message),_defineProperty(this,"context",void 0),_defineProperty(this,"name","FetchFailedCriticalError"),_defineProperty(this,"useErrorBoundary",!0),this.context=context}}},"./src/core/fetchers/FetchFailedError.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>FetchFailedError});var _FetcherError__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/core/fetchers/FetcherError.ts");function _defineProperty(obj,key,value){return(key=function _toPropertyKey(t){var i=function _toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==typeof i?i:String(i)}(key))in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}class FetchFailedError extends _FetcherError__WEBPACK_IMPORTED_MODULE_0__.Z{constructor(message,context){super(message),_defineProperty(this,"context",void 0),_defineProperty(this,"name","FetchFailedError"),_defineProperty(this,"useErrorBoundary",!1),this.context=context}}},"./src/core/fetchers/FetcherCriticalHttpError.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>FetcherCriticalHttpError});var _utils_errors_HttpError__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/core/utils/errors/HttpError.ts");function _defineProperty(obj,key,value){return(key=function _toPropertyKey(t){var i=function _toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==typeof i?i:String(i)}(key))in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}class FetcherCriticalHttpError extends _utils_errors_HttpError__WEBPACK_IMPORTED_MODULE_0__.Z{constructor(status,message,context){super(status,message,context),this.status=status,this.message=message,this.context=context,_defineProperty(this,"useErrorBoundary",!0)}}},"./src/core/fetchers/FetcherError.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";function _defineProperty(obj,key,value){return(key=function _toPropertyKey(t){var i=function _toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==typeof i?i:String(i)}(key))in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}__webpack_require__.d(__webpack_exports__,{Z:()=>FetcherError});class FetcherError extends Error{constructor(message,context){super(message),this.message=message,this.context=context,_defineProperty(this,"name","FetcherError")}}},"./src/core/fetchers/FetcherHttpError.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>FetcherHttpError});var _utils_errors_HttpError__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/core/utils/errors/HttpError.ts");function _defineProperty(obj,key,value){return(key=function _toPropertyKey(t){var i=function _toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==typeof i?i:String(i)}(key))in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}class FetcherHttpError extends _utils_errors_HttpError__WEBPACK_IMPORTED_MODULE_0__.Z{constructor(status,message,context){super(status,message,context),this.status=status,this.message=message,this.context=context,_defineProperty(this,"useErrorBoundary",!1)}}},"./src/core/fetchers/helpers.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{_o:()=>getServiceUrlWithParams});const getServiceUrlWithParams=({baseUrl,url,params})=>{const urlParams=params?`?${(data=>{let params;return"string"==typeof data||void 0===data?params=new URLSearchParams(data):(params=new URLSearchParams,Object.entries(data).forEach((([key,value])=>{Array.isArray(value)?value.forEach((inner=>{params.append(key,inner.toString())})):params.append(key,value.toString())}))),params})(params)}`:"";return`${baseUrl}${url}${urlParams}`}},"./src/core/filter.slice.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{IH:()=>add,Od:()=>remove,ZH:()=>clear,ZP:()=>__WEBPACK_DEFAULT_EXPORT__});var _reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/@reduxjs/toolkit/dist/redux-toolkit.esm.js");const initialState={},filterState=(0,_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_0__.oM)({name:"filter",initialState,reducers:{add(state,action){const{facet,term}=action.payload;return{...state,[facet]:{...state[facet],[term.term]:term}}},remove(state,action){const{facet,term}=action.payload,selectedFacet={...state[facet]};if(delete selectedFacet[term.term],0===Object.keys(selectedFacet).length){const stateCopy={...state};return delete stateCopy[facet],stateCopy}return{...state,[facet]:selectedFacet}},clear:()=>initialState}}),{add,remove,clear}=filterState.actions,__WEBPACK_DEFAULT_EXPORT__=filterState.reducer},"./src/core/guardedRequests.slice.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Bs:()=>guardedRequest,SF:()=>AUTH_PARAM,ZP:()=>__WEBPACK_DEFAULT_EXPORT__,fG:()=>reRunRequest,qC:()=>hasRequestExpired,yQ:()=>removeRequest});var _reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./node_modules/@reduxjs/toolkit/dist/redux-toolkit.esm.js"),_material_list_api_material_list__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/core/material-list-api/material-list.ts"),_store__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/core/store.ts"),_utils_helpers_date__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/core/utils/helpers/date.ts"),_utils_helpers_url__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./src/core/utils/helpers/url.ts"),_utils_helpers_user__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/core/utils/helpers/user.ts");const AUTH_PARAM="didAuthenticate",requestCallbacks={addFavorite:({id})=>(0,_material_list_api_material_list__WEBPACK_IMPORTED_MODULE_0__.jX)("default",id)},hasRequestExpired=({expire})=>!expire||(0,_utils_helpers_date__WEBPACK_IMPORTED_MODULE_2__.ZP)()>expire,guardedRequests=(0,_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_4__.oM)({name:"guardedRequests",initialState:{request:null},reducers:{addRequest(state,action){const{payload:request}=action;null!=request&&request.expire||(request.expire=(0,_utils_helpers_date__WEBPACK_IMPORTED_MODULE_2__.ZP)()+60),state.request=request},removeRequest(state){state.request=null}}}),{addRequest,removeRequest}=guardedRequests.actions,getRequestCallback=type=>null==requestCallbacks?void 0:requestCallbacks[type],requestCallbackExists=type=>Boolean(getRequestCallback(type)),guardedRequest=(0,_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_4__.hg)("guardedRequests/performRequest",(async(requestItem,{dispatch,fulfillWithValue,getState})=>{const{type,args}=requestItem;if(!requestCallbackExists(type))return fulfillWithValue({status:"ignored",message:"Nothing to do"});(0,_utils_helpers_user__WEBPACK_IMPORTED_MODULE_3__.TF)()&&(dispatch(addRequest(requestItem)),_store__WEBPACK_IMPORTED_MODULE_1__.Dj.flush().then((()=>{const{authUrl}=(state=>{const{url:{data}}=state;return(0,_utils_helpers_url__WEBPACK_IMPORTED_MODULE_5__.W3)(data)})(getState());if(authUrl){const returnUrl=(0,_utils_helpers_url__WEBPACK_IMPORTED_MODULE_5__.uW)({[AUTH_PARAM]:"1"});(0,_utils_helpers_url__WEBPACK_IMPORTED_MODULE_5__.hN)({authUrl,returnUrl})}}))),console.debug("PERFORMING REQUEST CALLBACK");return getRequestCallback(type)(args)})),reRunRequest=(0,_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_4__.hg)("guardedRequests/reRunRequest",(async(requestItem,{fulfillWithValue})=>{const{type,args}=requestItem;if(requestCallbackExists(type)){const requestCallback=getRequestCallback(type);return console.debug("RERUNNING REQUEST"),requestCallback(args)}return fulfillWithValue({status:"success",message:""})})),__WEBPACK_DEFAULT_EXPORT__=guardedRequests.reducer},"./src/core/material-list-api/material-list.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{jX:()=>addItem,R:()=>getGetListQueryKey,cl:()=>removeItem,YV:()=>useGetList,Sc:()=>useHasItem});var es=__webpack_require__("./node_modules/react-query/es/index.js"),FetchFailedError=__webpack_require__("./src/core/fetchers/FetchFailedError.ts"),helpers=__webpack_require__("./src/core/fetchers/helpers.ts"),token=__webpack_require__("./src/core/token.js"),extractServiceBaseUrls=__webpack_require__("./src/core/utils/reduxMiddleware/extractServiceBaseUrls.ts"),FetcherHttpError=__webpack_require__("./src/core/fetchers/FetcherHttpError.ts");function _defineProperty(obj,key,value){return(key=function _toPropertyKey(t){var i=function _toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==typeof i?i:String(i)}(key))in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}class MaterialListServiceHttpError extends FetcherHttpError.Z{constructor(...args){super(...args),_defineProperty(this,"name","MaterialListServiceHttpError")}}const fetcher=async({url,method,params,data})=>{const additionalHeaders="object"===(null==data?void 0:data.headers)?null==data?void 0:data.headers:{},userToken=(0,token.LP)(token.b4),headers={...userToken?{Authorization:`Bearer ${userToken}`}:{},...additionalHeaders,"Accept-Version":"2"},body=data?JSON.stringify(data):null,serviceUrl=(0,helpers._o)({baseUrl:(0,extractServiceBaseUrls.fG)(extractServiceBaseUrls.PS.materialList),url,params});try{const response=await fetch(serviceUrl,{method,headers,body});if(!response.ok)throw new MaterialListServiceHttpError(response.status,response.statusText,serviceUrl);try{return await response.json()}catch(e){if(!(e instanceof SyntaxError))throw e}}catch(error){if(error instanceof MaterialListServiceHttpError)throw error;const message=error instanceof Error?error.message:"Unknown error";throw new FetchFailedError.Z(message,serviceUrl)}return null},getGetListQueryKey=(listId,params)=>[`/list/${listId}`,...params?[params]:[]],useGetList=(listId,params,options)=>{const{query:queryOptions}=options??{},queryKey=(null==queryOptions?void 0:queryOptions.queryKey)??getGetListQueryKey(listId,params),query=(0,es.useQuery)(queryKey,(({signal})=>((listId,params,signal)=>fetcher({url:`/list/${listId}`,method:"get",signal,params}))(listId,params,signal)),{enabled:!!listId,...queryOptions});return{queryKey,...query}},useHasItem=options=>{const{mutation:mutationOptions}=options??{};return(0,es.useMutation)((props=>{const{listId,itemId}=props??{};return((listId,itemId,signal)=>fetcher({url:`/list/${listId}/${itemId}`,method:"head",signal}))(listId,itemId)}),mutationOptions)},addItem=(listId,itemId)=>fetcher({url:`/list/${listId}/${itemId}`,method:"put"}),removeItem=(listId,itemId)=>fetcher({url:`/list/${listId}/${itemId}`,method:"delete"})},"./src/core/modal.slice.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Mr:()=>closeModal,ZP:()=>__WEBPACK_DEFAULT_EXPORT__,h7:()=>openModal,jQ:()=>closeLastModal,pT:()=>closeAllModals});var _reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/@reduxjs/toolkit/dist/redux-toolkit.esm.js"),_utils_helpers_url__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/core/utils/helpers/url.ts");const focusContainerArray=[],returnFocusElement=()=>{const element=focusContainerArray.pop();return element&&element.focus(),element},removeModalIdFromUrl=state=>{var _state$modalIds;let newModalParam="?";""!==(null===(_state$modalIds=state.modalIds)||void 0===_state$modalIds?void 0:_state$modalIds.toString())&&(newModalParam=`?modal=${state.modalIds.toString()}`),window.history.pushState("","",newModalParam)},modalSlice=(0,_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_0__.oM)({name:"modal",initialState:{modalIds:[]},reducers:{openModal(state,action){if(window.document&&(document.body.style.overflow="hidden"),action.payload.modalId&&!state.modalIds.includes(action.payload.modalId)){state.modalIds.push(action.payload.modalId);const alreadyOpenModals=new URLSearchParams(window.location.search).get("modal");alreadyOpenModals!==action.payload.modalId&&window.history.pushState("","",(0,_utils_helpers_url__WEBPACK_IMPORTED_MODULE_1__.oW)(new URL((0,_utils_helpers_url__WEBPACK_IMPORTED_MODULE_1__.vW)()),{modal:`${alreadyOpenModals??""}${action.payload.modalId}`}))}const{activeElement}=document;var elementToStore;activeElement&&"BODY"!==activeElement.tagName&&(elementToStore=activeElement)&&focusContainerArray.push(elementToStore)},closeModal(state,action){const modalId=state.modalIds.pop();state.modalIds.indexOf(action.payload.modalId)>-1&&state.modalIds.splice(state.modalIds.indexOf(action.payload.modalId),1),modalId&&(removeModalIdFromUrl(state),returnFocusElement()),0===state.modalIds.length&&(document.body.style.overflow="")},closeLastModal(state){document.body.style.overflow="";state.modalIds.pop()&&(removeModalIdFromUrl(state),returnFocusElement())},closeAllModals(state){document.body.style.overflow="",state.modalIds=[],removeModalIdFromUrl(state),returnFocusElement()}}}),{openModal,closeModal,closeLastModal,closeAllModals}=modalSlice.actions,__WEBPACK_DEFAULT_EXPORT__=modalSlice.reducer},"./src/core/publizon/publizon.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{bh:()=>getGetV1UserReservationsQueryKey,t7:()=>useDeleteV1UserReservationsIdentifier,ul:()=>useGetV1LibraryProfile,LW:()=>useGetV1LoanstatusIdentifier,tq:()=>useGetV1ProductsIdentifier,T8:()=>useGetV1UserLoans,ju:()=>useGetV1UserReservations});var es=__webpack_require__("./node_modules/react-query/es/index.js"),FetchFailedCriticalError=__webpack_require__("./src/core/fetchers/FetchFailedCriticalError.ts"),helpers=__webpack_require__("./src/core/fetchers/helpers.ts"),core_token=__webpack_require__("./src/core/token.js"),extractServiceBaseUrls=__webpack_require__("./src/core/utils/reduxMiddleware/extractServiceBaseUrls.ts"),FetcherHttpError=__webpack_require__("./src/core/fetchers/FetcherHttpError.ts");function _defineProperty(obj,key,value){return(key=function _toPropertyKey(t){var i=function _toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==typeof i?i:String(i)}(key))in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}class PublizonServiceHttpError extends FetcherHttpError.Z{constructor(...args){super(...args),_defineProperty(this,"name","PublizonServiceHttpError")}}const fetcher_fetcher=async({url,method,headers,params,data})=>{const token=(0,core_token.LP)(core_token.b4)??(0,core_token.LP)(core_token.t8),authHeaders=token?{Authorization:`Bearer ${token}`}:{},body=data?JSON.stringify(data):null,serviceUrl=(0,helpers._o)({baseUrl:(0,extractServiceBaseUrls.fG)(extractServiceBaseUrls.PS.publizon),url,params});try{const response=await fetch(serviceUrl,{method,headers:{...headers,...authHeaders},body});if(!response.ok)throw new PublizonServiceHttpError(response.status,response.statusText,serviceUrl);try{return await response.json()}catch(e){if(!(e instanceof SyntaxError))throw e}}catch(error){if(error instanceof PublizonServiceHttpError)throw error;const message=error instanceof Error?error.message:"Unknown error";throw new FetchFailedCriticalError.Z(message,serviceUrl)}return null},useGetV1LibraryProfile=options=>{const{query:queryOptions}=options??{},queryKey=(null==queryOptions?void 0:queryOptions.queryKey)??["/v1/library/profile"];return{queryKey,...(0,es.useQuery)(queryKey,(({signal})=>(signal=>fetcher_fetcher({url:"/v1/library/profile",method:"get",signal}))(signal)),queryOptions)}},useGetV1UserLoans=(params,options)=>{const{query:queryOptions}=options??{},queryKey=(null==queryOptions?void 0:queryOptions.queryKey)??(params=>["/v1/user/loans",...params?[params]:[]])(params),query=(0,es.useQuery)(queryKey,(({signal})=>((params,signal)=>fetcher_fetcher({url:"/v1/user/loans",method:"get",signal,params}))(params,signal)),queryOptions);return{queryKey,...query}},useGetV1LoanstatusIdentifier=(identifier,queryOptions)=>{const queryKey=(null==queryOptions?void 0:queryOptions.queryKey)??(identifier=>[`/v1/loanstatus/${identifier}`])(identifier);return{queryKey,...(0,es.useQuery)(queryKey,(({signal})=>((identifier,signal)=>fetcher_fetcher({url:`/v1/loanstatus/${identifier}`,method:"get",signal}))(identifier)),{enabled:!!identifier,...queryOptions})}},useGetV1ProductsIdentifier=(identifier,options)=>{const{query:queryOptions}=options??{},queryKey=(null==queryOptions?void 0:queryOptions.queryKey)??(identifier=>[`/v1/products/${identifier}`])(identifier);return{queryKey,...(0,es.useQuery)(queryKey,(({signal})=>((identifier,signal)=>fetcher_fetcher({url:`/v1/products/${identifier}`,method:"get",signal}))(identifier,signal)),{enabled:!!identifier,...queryOptions})}},getGetV1UserReservationsQueryKey=()=>["/v1/user/reservations"],useGetV1UserReservations=options=>{const{query:queryOptions}=options??{},queryKey=(null==queryOptions?void 0:queryOptions.queryKey)??getGetV1UserReservationsQueryKey();return{queryKey,...(0,es.useQuery)(queryKey,(({signal})=>(signal=>fetcher_fetcher({url:"/v1/user/reservations",method:"get",signal}))(signal)),queryOptions)}},useDeleteV1UserReservationsIdentifier=options=>{const{mutation:mutationOptions}=options??{};return(0,es.useMutation)((props=>{const{identifier}=props??{};return(identifier=>fetcher_fetcher({url:`/v1/user/reservations/${identifier}`,method:"delete"}))(identifier)}),mutationOptions)}},"./src/core/statistics/statistics.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{h:()=>statistics});const statistics={searchQuery:{id:10,name:"OSS"},searchResultCount:{id:11,name:"OSS Results"},searchFacets:{id:20,name:"Søgning Facet"},materialType:{id:24,name:"Materialetype"},materialGenre:{id:25,name:"Materiale Genre"},materialLanguage:{id:29,name:"Materiale Sprog"},materialSource:{id:30,name:"Materiale Kilde"},materialTargetAudience:{id:31,name:"Materiale Målgruppe"},materialTopicNumber:{id:32,name:"Materiale - DK5-nummer (Emnetal)"},materialFictionNonFiction:{id:33,name:"Materiale Fiktion/nonfiktion"},materialStatus:{id:38,name:"Materiale Status"},searchResultNumberClick:{id:42,name:"Søgning - Resultatnummer klik"},campaignClick:{id:48,name:"Kampagneklik"},reservation:{id:50,name:"Reserver"},onlineReservation:{id:51,name:"Se online"},autosuggestClick:{id:54,name:"Autosuggest - klik"},campaignShown:{id:62,name:"KampagnePlus Titel"}}},"./src/core/statistics/useStatistics.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";function useStatistics(){return window.wts||(window.wts={push(trackingProps){console.log(`Tracking: ${trackingProps[0]}, ${trackingProps[1]}, ${JSON.stringify(trackingProps[2])}`)}}),{track:(eventType,trackParameters)=>{const eventData={linkId:trackParameters.name,customClickParameter:{}};return eventData.customClickParameter[trackParameters.id]=trackParameters.trackedData,window.wts.push(["send",eventType,eventData]),new Promise((resolve=>{setTimeout((()=>{resolve("resolved")}),500)}))}}}__webpack_require__.d(__webpack_exports__,{T:()=>useStatistics})},"./src/core/store.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Dj:()=>persistor,h:()=>store,v9:()=>useSelector});var _reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__("./node_modules/@reduxjs/toolkit/dist/redux-toolkit.esm.js"),_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_13__=__webpack_require__("./node_modules/redux/es/redux.js"),react_redux__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react-redux/es/index.js"),redux_persist__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/redux-persist/es/index.js"),redux_persist_lib_storage_session__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/redux-persist/lib/storage/session.js"),_text_slice__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/core/text.slice.ts"),_user_slice__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/core/user.slice.js"),_modal_slice__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./src/core/modal.slice.ts"),_url_slice__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./src/core/url.slice.ts"),_filter_slice__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./src/core/filter.slice.ts"),_config_slice__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./src/core/config.slice.ts"),_blockedModal_slice__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__("./src/core/blockedModal.slice.ts"),_guardedRequests_slice__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__("./src/core/guardedRequests.slice.ts"),_utils_reduxMiddleware_extractServiceBaseUrls__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__("./src/core/utils/reduxMiddleware/extractServiceBaseUrls.ts");const persistConfig={key:"dpl-react",storage:redux_persist_lib_storage_session__WEBPACK_IMPORTED_MODULE_2__.Z,blacklist:["text","url","modal","config","blockedModal"]},store=(0,_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_12__.xC)({middleware:getDefaultMiddleware=>[...getDefaultMiddleware(),_utils_reduxMiddleware_extractServiceBaseUrls__WEBPACK_IMPORTED_MODULE_11__.ZP],reducer:(0,redux_persist__WEBPACK_IMPORTED_MODULE_1__.OJ)(persistConfig,(0,_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_13__.UY)({user:_user_slice__WEBPACK_IMPORTED_MODULE_4__.ZP,text:_text_slice__WEBPACK_IMPORTED_MODULE_3__.ZP,modal:_modal_slice__WEBPACK_IMPORTED_MODULE_5__.ZP,url:_url_slice__WEBPACK_IMPORTED_MODULE_6__.ZP,config:_config_slice__WEBPACK_IMPORTED_MODULE_8__.ZP,guardedRequests:_guardedRequests_slice__WEBPACK_IMPORTED_MODULE_10__.ZP,blockedModal:_blockedModal_slice__WEBPACK_IMPORTED_MODULE_9__.ZP,filter:_filter_slice__WEBPACK_IMPORTED_MODULE_7__.ZP})),devTools:!1}),persistor=(0,redux_persist__WEBPACK_IMPORTED_MODULE_1__.p5)(store),useSelector=react_redux__WEBPACK_IMPORTED_MODULE_0__.v9},"./src/core/storybook/acceptFeesModalArgs.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});const __WEBPACK_DEFAULT_EXPORT__={acceptModalHeaderText:{defaultValue:"Hov, dit gebyr forhøjes!",control:{type:"text"}},acceptModalBodyText:{defaultValue:"Fornyer du dine lån, forhøjes dit gebyr. Alle materialer ikke kan fornys og lånet splittes derfor op. Ved overskredne lån modtager du et gebyr pr. lån og derfor forhøjes dit samlede gebyr, hvis du vælger at gå videre med at fornye.",control:{type:"text"}},acceptModalAreYouSureText:{defaultValue:"Er du sikker på du vil fornye?",control:{type:"text"}},acceptModalAcceptButtonText:{defaultValue:"Ja, forny mulige",control:{type:"text"}},acceptModalCancelButtonText:{defaultValue:"Annuller fornyelse",control:{type:"text"}},acceptModalAriaDescriptionText:{defaultValue:"accept modal aria description text",control:{type:"text"}},acceptModalAriaLabelText:{defaultValue:"accept modal aria label text",control:{type:"text"}}}},"./src/core/storybook/blockedArgs.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});const __WEBPACK_DEFAULT_EXPORT__={blockedPatronDTitleText:{defaultValue:"D Title",control:{type:"text"}},blockedPatronDBodyText:{defaultValue:"Lorem ipsum",control:{type:"text"}},blockedPatronSTitleText:{defaultValue:"S Title",control:{type:"text"}},blockedPatronSBodyText:{defaultValue:"Lorem ipsum",control:{type:"text"}},blockedPatronFTitleText:{defaultValue:"F Title",control:{type:"text"}},blockedPatronFBodyText:{defaultValue:"Lorem ipsum",control:{type:"text"}},blockedPatronETitleText:{defaultValue:"You have exceeded your fee limit",control:{type:"text"}},blockedPatronEBodyText:{defaultValue:"You are therefore not able to borrow or reserve materials from the library",control:{type:"text"}},blockedPatronWTitleText:{defaultValue:"Your user is blocked",control:{type:"text"}},blockedPatronWBodyText:{defaultValue:"You therefore cannot reserve, borrow or renew loans. Please contact the library for further information",control:{type:"text"}},blockedPatronOTitleText:{defaultValue:"O title",control:{type:"text"}},blockedPatronOBodyText:{defaultValue:"Lorem ipsum",control:{type:"text"}},blockedPatronUTitleText:{defaultValue:"Your user is blocked",control:{type:"text"}},blockedPatronUBodyText:{defaultValue:"You therefore cannot reserve, borrow or renew loans. $Please contact the library for further information",control:{type:"text"}},blockedPatronELinkText:{defaultValue:"Pay your fees here",control:{type:"text"}},blockedPatronELinkUrl:{defaultValue:"https://unsplash.com/photos/r077pfFsdaU",control:{type:"text"}},blockedPatronCloseModalAriaLabelText:{control:{type:"text"},defaultValue:"Close blocked patron modal"},blockedPatronModalAriaDescriptionText:{control:{type:"text"},defaultValue:"This modal alerts you, that your patron has been blocked"},redirectOnBlockedUrl:{control:{type:"text"},defaultValue:"https://unsplash.com/photos/r077pfFsdaU"}}},"./src/core/storybook/deleteReservationModalArgs.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});const __WEBPACK_DEFAULT_EXPORT__={deleteReservationModalHeaderText:{defaultValue:'{"type":"plural","text":["Cancel reservation","Cancel reservations"]}',control:{type:"text"}},deleteReservationModalDeleteQuestionText:{defaultValue:'{"type":"plural","text":["Do you want to cancel your reservation?","Do you want to cancel your reservations?"]}',control:{type:"text"}},deleteReservationModalNotRegrettableText:{defaultValue:"You cannot regret this action",control:{type:"text"}},deleteReservationModalDeleteButtonText:{defaultValue:'{"type":"plural","text":["Cancel reservation","Cancel reservations"]}',control:{type:"text"}},deleteReservationModalCloseModalText:{defaultValue:"Close delete reservation modal",control:{type:"text"}},deleteReservationModalAriaDescriptionText:{defaultValue:"This button opens a modal that covers the entire page and contains the possibility to delete a selected reservation, or multiple selected reservations",control:{type:"text"}}}},"./src/core/storybook/groupModalArgs.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});const __WEBPACK_DEFAULT_EXPORT__={groupModalDueDateLinkToPageWithFeesText:{control:{type:"text"},defaultValue:"Read more about fees"},groupModalDueDateMaterialText:{control:{type:"text"},defaultValue:"To be returned @date"},groupModalGoToMaterialText:{defaultValue:"Go to material details",control:{type:"text"}},groupModalDueDateHeaderText:{control:{type:"text"},defaultValue:"Due date @date"},resultPagerStatusText:{defaultValue:"Showing @itemsShown out of @hitcount elements",control:{type:"text"}},groupModalReturnLibraryText:{defaultValue:"Can be returned to all branches of Samsøs libraries",control:{type:"text"}},groupModalCheckboxText:{control:{type:"text"},defaultValue:"Choose all"},groupModalHiddenLabelCheckboxOnMaterialText:{control:{type:"text"},defaultValue:"Select @label"},pageSizeDesktop:{defaultValue:10,control:{type:"number"}},pageSizeMobile:{defaultValue:5,control:{type:"number"}},showMoreText:{defaultValue:"show more",control:{type:"text"}}}},"./src/core/storybook/loanGroupModalArgs.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});const __WEBPACK_DEFAULT_EXPORT__={groupModalRenewLoanDeniedMaxRenewalsReachedText:{control:{type:"text"},defaultValue:"The item cannot be renewed further "},groupModalDueDateWarningLoanOverdueText:{control:{type:"text"},defaultValue:"The due date of return is exceeded, therefore you will be charged a fee, when the item is returned"},groupModalRenewLoanDeniedReservedText:{control:{type:"text"},defaultValue:"The item is reserved by another patron"},groupModalRenewLoanDeniedInterLibraryLoanText:{defaultValue:"The item has been lent to you by another library and renewal is therefore conditional of the acceptance by that library",control:{type:"text"}},groupModalLoansCloseModalAriaLabelText:{control:{type:"text"},defaultValue:"Close modal with grouped loans"},groupModalLoansAriaDescriptionText:{control:{type:"text"},defaultValue:"This modal makes it possible to renew materials"},groupModalButtonText:{control:{type:"text"},defaultValue:"Renewable (@count)"}}},"./src/core/storybook/materialDetailsModalArgs.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});const __WEBPACK_DEFAULT_EXPORT__={materialDetailsWarningLoanOverdueText:{control:{type:"text"},defaultValue:"The due date of return is exceeded, therefore you will be charged a fee, when the item is returned"},materialDetailsPhysicalDueDateLabelText:{control:{type:"text"},defaultValue:"Afleveres"},materialDetailsLoanDateLabelText:{control:{type:"text"},defaultValue:"Loan date"},materialDetailsMaterialNumberLabelText:{control:{type:"text"},defaultValue:"Material Item Number"},materialDetailsCloseModalAriaLabelText:{control:{type:"text"},defaultValue:"Close material details modal"},materialDetailsLinkToPageWithFeesText:{control:{type:"text"},defaultValue:"Read more about fees"},materialDetailsOverdueText:{control:{type:"text"},defaultValue:"Expired"},materialDetailsModalAriaDescriptionText:{control:{type:"text"},defaultValue:"This modal shows material details, and makes it possible to renew a material, of that material is renewable"},materialDetailsGoToEreolenText:{defaultValue:"Go to eReolen",control:{type:"text"}},materialDetailsDigitalDueDateLabelText:{control:{type:"text"},defaultValue:"Expires"},materialDetailsRenewLoanButtonText:{control:{type:"text"},defaultValue:"Renew your loan"},feesPageUrl:{defaultValue:"/user/me/fees",control:{type:"text"}},viewFeesAndCompensationRatesUrl:{defaultValue:"https://unsplash.com/photos/wd6YQy0PJt8",control:{type:"text"}},ereolenMyPageUrl:{defaultValue:"https://unsplash.com/photos/wd6YQy0PJt8",control:{type:"text"}}}},"./src/core/storybook/pincodeArgs.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});const __WEBPACK_DEFAULT_EXPORT__={pincodeLengthMinConfig:{defaultValue:"4",control:{type:"number"}},pincodeLengthMaxConfig:{defaultValue:"5",control:{type:"number"}}}},"./src/core/storybook/renewalArgs.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});const __WEBPACK_DEFAULT_EXPORT__={renewProcessingText:{control:{type:"text"},defaultValue:"Processing..."},renewButtonText:{control:{type:"text"},defaultValue:"Renew"},renewMaterialLoanSuccessTitleText:{control:{type:"text"},defaultValue:"You have renewed your loan"},renewMaterialLoanSuccessStatusText:{control:{type:"text"},defaultValue:"1 loan was renewed."},renewMaterialLoanNoRenewalsPossibleErrorTitleText:{control:{type:"text"},defaultValue:"The loan could not be renewed"},renewMaterialLoanNoRenewalsPossibleErrorStatusText:{control:{type:"text"},defaultValue:"For some reason, your loan could not be renewed."},renewMaterialLoanErrorTitleText:{control:{type:"text"},defaultValue:"Renewal of your loan failed"},renewMaterialLoanErrorStatusText:{control:{type:"text"},defaultValue:"Something went wrong renewing your loan. Please try again."},renewMaterialLoanButtonText:{control:{type:"text"},defaultValue:"Ok"},renewGroupModalLoansSuccessTitleText:{control:{type:"text"},defaultValue:"You have renewed your loans"},renewGroupModalLoansSuccessStatusText:{control:{type:"text"},defaultValue:'{"type":"plural","text":["1 loan has been renewed.","@count loans have been renewed."]}'},renewGroupModalLoansErrorTitleText:{control:{type:"text"},defaultValue:"Renewing your loans failed"},renewGroupModalLoansErrorStatusText:{control:{type:"text"},defaultValue:"Something went wrong renewing your loans. Please try again."},renewGroupModalLoansButtonText:{control:{type:"text"},defaultValue:"Ok"},renewGroupModalLoansNoRenewalsPossibleErrorTitleText:{control:{type:"text"},defaultValue:"No loans could be renewed"},renewGroupModalLoansNoRenewalsPossibleErrorStatusText:{control:{type:"text"},defaultValue:"For some reason, no one of your loans could be renewed."},renewCannotBeRenewedText:{control:{type:"text"},defaultValue:"Cannot be renewed"}}},"./src/core/storybook/reservationGroupModalArgs.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});const __WEBPACK_DEFAULT_EXPORT__={groupModalReservationsCloseModalAriaLabelText:{control:{type:"text"},defaultValue:"Close modal with grouped reservations"},groupModalReservationsLoansAriaDescriptionText:{control:{type:"text"},defaultValue:"This modal makes it possible to delete reservations"},readyForLoanCounterLabelText:{defaultValue:"Ready",control:{type:"text"}},removeAllReservationsText:{defaultValue:"Remove reservations (@amount)",control:{type:"text"}},pickUpLatestText:{defaultValue:"Pick up before @date",control:{type:"text"}},reservationsReadyForPickupText:{defaultValue:"Reservations ready for pickup",control:{type:"text"}},physicalReservationsHeaderText:{defaultValue:"Physical reservations",control:{type:"text"}},digitalReservationsHeaderText:{defaultValue:"Digital reservations",control:{type:"text"}}}},"./src/core/storybook/reservationListArgs.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});const __WEBPACK_DEFAULT_EXPORT__={blacklistedSearchBranchesConfig:{name:"Blacklisted branches",defaultValue:"FBS-751032,FBS-751031,FBS-751009,FBS-751027,FBS-751024",control:{type:"text"}},expirationWarningDaysBeforeConfig:{defaultValue:"6",control:{type:"text"}},pauseReservationStartDateConfig:{defaultValue:"2022-06-30",control:{type:"text"}},blacklistedPickupBranchesConfig:{name:"Blacklisted branches",defaultValue:"FBS-751032,FBS-751031,FBS-751009,FBS-751027,FBS-751024",control:{type:"text"}},branchesConfig:{name:"Branches",defaultValue:'[\n {\n "branchId":"DK-775120",\n "title":"Højbjerg"\n },\n {\n "branchId":"DK-775122",\n "title":"Beder-Malling"\n },\n {\n "branchId":"DK-775144",\n "title":"Gellerup"\n },\n {\n "branchId":"DK-775167",\n "title":"Lystrup"\n },\n {\n "branchId":"DK-775146",\n "title":"Harlev"\n },\n {\n "branchId":"DK-775168",\n "title":"Skødstrup"\n },\n {\n "branchId":"FBS-751010",\n "title":"Arresten"\n },\n {\n "branchId":"DK-775147",\n "title":"Hasle"\n },\n {\n "branchId":"FBS-751032",\n "title":"Må ikke benyttes"\n },\n {\n "branchId":"FBS-751031",\n "title":"Fjernlager 1"\n },\n {\n "branchId":"DK-775126",\n "title":"Solbjerg"\n },\n {\n "branchId":"FBS-751030",\n "title":"ITK"\n },\n {\n "branchId":"DK-775149",\n "title":"Sabro"\n },\n {\n "branchId":"DK-775127",\n "title":"Tranbjerg"\n },\n {\n "branchId":"DK-775160",\n "title":"Risskov"\n },\n {\n "branchId":"DK-775162",\n "title":"Hjortshøj"\n },\n {\n "branchId":"DK-775140",\n "title":"Åby"\n },\n {\n "branchId":"FBS-751009",\n "title":"Fjernlager 2"\n },\n {\n "branchId":"FBS-751029",\n "title":"Stadsarkivet"\n },\n {\n "branchId":"FBS-751027",\n "title":"Intern"\n },\n {\n "branchId":"FBS-751026",\n "title":"Fælles undervejs"\n },\n {\n "branchId":"FBS-751025",\n "title":"Fællessekretariatet"\n },\n {\n "branchId":"DK-775133",\n "title":"Bavnehøj"\n },\n {\n "branchId":"FBS-751024",\n "title":"Fjernlånte materialer"\n },\n {\n "branchId":"DK-775100",\n "title":"Hovedbiblioteket"\n },\n {\n "branchId":"DK-775170",\n "title":"Trige"\n },\n {\n "branchId":"DK-775150",\n "title":"Tilst"\n },\n {\n "branchId":"DK-775130",\n "title":"Viby"\n },\n {\n "branchId":"DK-775164",\n "title":"Egå"\n }\n]',control:{type:"text"}},pageSizeDesktop:{defaultValue:20,control:{type:"number"}},pageSizeMobile:{defaultValue:10,control:{type:"number"}},ereolenMyPageUrl:{defaultValue:"https://ereolen.dk/user/me/",control:{type:"text"}},pauseReservationInfoUrl:{defaultValue:"https://images.unsplash.com/photo-1571043733612-d5444ff7d4ae?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1335&q=80",control:{type:"text"}},reservationListHeaderText:{defaultValue:"Your reservations",control:{type:"text"}},reservationListPhysicalReservationsHeaderText:{defaultValue:"Physical reservations",control:{type:"text"}},reservationListDigitalReservationsHeaderText:{defaultValue:"Digital reservations",control:{type:"text"}},reservationListReadyForPickupTitleText:{defaultValue:"Ready for pickup",control:{type:"text"}},reservationListReadyForPickupEmptyText:{defaultValue:"At the moment you have 0 reservations ready for pickup",control:{type:"text"}},reservationListPhysicalReservationsEmptyText:{defaultValue:"At the moment you have 0 physical reservations",control:{type:"text"}},reservationListAllEmptyText:{defaultValue:"At the moment you have 0 reservations",control:{type:"text"}},reservationListDigitalReservationsEmptyText:{defaultValue:"At the moment you have 0 reservations on digital items",control:{type:"text"}},reservationListReadyText:{defaultValue:"Ready",control:{type:"text"}},materialByAuthorText:{defaultValue:"By",control:{type:"text"}},materialAndAuthorText:{defaultValue:"and",control:{type:"text"}},etAlText:{defaultValue:"et al.",control:{type:"text"}},reservationListNumberInQueueText:{defaultValue:"There are @count people in the queue before you",control:{type:"text"}},reservationListFirstInQueueText:{defaultValue:"You are at the front of the queue",control:{type:"text"}},reservationListInQueueText:{defaultValue:"queued",control:{type:"text"}},reservationPickUpLatestText:{defaultValue:"Pick up before @date",control:{type:"text"}},publizonEbookText:{defaultValue:"E-book",control:{type:"text"}},publizonAudioBookText:{defaultValue:"Audiobook",control:{type:"text"}},publizonPodcastText:{defaultValue:"Podcast",control:{type:"text"}},reservationListLoanBeforeText:{defaultValue:"Borrow before @date",control:{type:"text"}},reservationListAvailableInText:{defaultValue:"Available in @count days",control:{type:"text"}},reservationListDaysText:{defaultValue:"days",control:{type:"text"}},reservationListDayText:{defaultValue:"day",control:{type:"text"}},reservationDetailsOthersInQueueText:{defaultValue:"Others are queueing for this material",control:{type:"text"}},reservationDetailsExpiresTitleText:{defaultValue:"Pickup deadline",control:{type:"text"}},reservationDetailsDigitalMaterialExpiresTitleText:{defaultValue:"Borrow before",control:{type:"text"}},reservationDetailsExpiresText:{defaultValue:"Your reservation expires @date!",control:{type:"text"}},reservationDetailsSaveText:{defaultValue:"Save",control:{type:"text"}},reservationDetailsCancelText:{defaultValue:"Cancel",control:{type:"text"}},reservationListPauseReservationText:{defaultValue:"Pause your reservations",control:{type:"text"}},reservationListPauseReservationOnHoldText:{defaultValue:"Your reservations are paused",control:{type:"text"}},reservationListOnHoldAriaText:{defaultValue:"Reservations have been paused in the following time span: ",control:{type:"text"}},reservationListPauseReservationAriaModalText:{defaultValue:"Opens a modal that covers the entire page where it is possible to pause physical reservations",control:{type:"text"}},reservationListPauseReservationButtonText:{defaultValue:"Settings",control:{type:"text"}},pauseReservationModalAriaDescriptionText:{defaultValue:"This modal makes it possible to pause your physical reservations",control:{type:"text"}},pauseReservationModalHeaderText:{defaultValue:"Pause reservations on physical items",control:{type:"text"}},pauseReservationModalBodyText:{defaultValue:"Pause your reservations early, since reservations that are already being processed, will not be paused.",control:{type:"text"}},pauseReservationModalCloseModalText:{defaultValue:"Close pause reservations modal",control:{type:"text"}},dateInputsStartDateLabelText:{defaultValue:"Start date",control:{type:"text"}},dateInputsEndDateLabelText:{defaultValue:"End date",control:{type:"text"}},pauseReservationModalBelowInputsTextText:{defaultValue:"",control:{type:"text"}},pauseReservationModalLinkText:{defaultValue:"Read more about pausing reservertions and what that means here",control:{type:"text"}},pauseReservationModalSaveButtonLabelText:{defaultValue:"Save",control:{type:"text"}},pauseReservationModalCancelButtonLabelText:{defaultValue:"Cancel pause",control:{type:"text"}},listDetailsNothingSelectedLabelText:{defaultValue:"Pick",control:{type:"text"}},showMoreText:{name:"Show more Text",defaultValue:"show more",control:{type:"text"}},resultPagerStatusText:{name:"Result pager status text",defaultValue:"Showing @itemsShown out of @hitcount results",control:{type:"text"}},deleteReservationModalSuccessTitleText:{name:"Delete reservation modal success title text",defaultValue:"Reservations deleted",control:{type:"text"}},deleteReservationModalSuccessStatusText:{name:"Delete reservation modal success status text",defaultValue:'{"type":"plural","text":["One reservation was deleted","@count reservations were deleted"]}',control:{type:"text"}},deleteReservationModalErrorsTitleText:{name:"Delete reservation modal errors title text",defaultValue:"An error occurred",control:{type:"text"}},deleteReservationModalErrorsStatusText:{name:"Delete reservation modal errors status text",defaultValue:"One or more reservations could not be deleted, please try again.",control:{type:"text"}},deleteReservationModalButtonText:{name:"Delete reservation modal delete button text",defaultValue:"Ok",control:{type:"text"}},deleteReservationModalDeleteProcessingText:{name:"Delete reservation modal delete processing text",defaultValue:"Processing...",control:{type:"text"}}}},"./src/core/storybook/reservationMaterialDetailsArgs.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});const __WEBPACK_DEFAULT_EXPORT__={blacklistedPickupBranchesConfig:{name:"Blacklisted branches",defaultValue:"FBS-751032,FBS-751031,FBS-751009,FBS-751027,FBS-751024",control:{type:"text"}},branchesConfig:{name:"Branches",defaultValue:'[\n {\n "branchId":"DK-775120",\n "title":"Højbjerg"\n },\n {\n "branchId":"DK-775122",\n "title":"Beder-Malling"\n },\n {\n "branchId":"DK-775144",\n "title":"Gellerup"\n },\n {\n "branchId":"DK-775167",\n "title":"Lystrup"\n },\n {\n "branchId":"DK-775146",\n "title":"Harlev"\n },\n {\n "branchId":"DK-775168",\n "title":"Skødstrup"\n },\n {\n "branchId":"FBS-751010",\n "title":"Arresten"\n },\n {\n "branchId":"DK-775147",\n "title":"Hasle"\n },\n {\n "branchId":"FBS-751032",\n "title":"Må ikke benyttes"\n },\n {\n "branchId":"FBS-751031",\n "title":"Fjernlager 1"\n },\n {\n "branchId":"DK-775126",\n "title":"Solbjerg"\n },\n {\n "branchId":"FBS-751030",\n "title":"ITK"\n },\n {\n "branchId":"DK-775149",\n "title":"Sabro"\n },\n {\n "branchId":"DK-775127",\n "title":"Tranbjerg"\n },\n {\n "branchId":"DK-775160",\n "title":"Risskov"\n },\n {\n "branchId":"DK-775162",\n "title":"Hjortshøj"\n },\n {\n "branchId":"DK-775140",\n "title":"Åby"\n },\n {\n "branchId":"FBS-751009",\n "title":"Fjernlager 2"\n },\n {\n "branchId":"FBS-751029",\n "title":"Stadsarkivet"\n },\n {\n "branchId":"FBS-751027",\n "title":"Intern"\n },\n {\n "branchId":"FBS-751026",\n "title":"Fælles undervejs"\n },\n {\n "branchId":"FBS-751025",\n "title":"Fællessekretariatet"\n },\n {\n "branchId":"DK-775133",\n "title":"Bavnehøj"\n },\n {\n "branchId":"FBS-751024",\n "title":"Fjernlånte materialer"\n },\n {\n "branchId":"DK-775100",\n "title":"Hovedbiblioteket"\n },\n {\n "branchId":"DK-775170",\n "title":"Trige"\n },\n {\n "branchId":"DK-775150",\n "title":"Tilst"\n },\n {\n "branchId":"DK-775130",\n "title":"Viby"\n },\n {\n "branchId":"DK-775164",\n "title":"Egå"\n }\n]',control:{type:"text"}},reservationDetailsConfig:{defaultValue:'{"allowRemoveReadyReservations": true}',control:{type:"text"}},interestPeriodsConfig:{defaultValue:'{ "interestPeriods":[ { "value":14, "label":"14 days" }, { "value":30, "label":"1 month" }, { "value":60, "label":"2 months" }, { "value":90, "label":"3 months" }, { "value":180, "label":"6 months" }, { "value":365, "label":"1 year" } ], "defaultInterestPeriod":{ "value":"14", "label":"14 days" } }',control:{type:"text"}},reservationDetailsRemoveDigitalReservationText:{defaultValue:"Remove your reservation",control:{type:"text"}},reservationDetailsDateOfReservationTitleText:{defaultValue:"Date of reservation",control:{type:"text"}},reservationDetailsNoInterestAfterTitleText:{defaultValue:"Not interested after",control:{type:"text"}},reservationDetailsChangeText:{defaultValue:"Apply changes",control:{type:"text"}},reservationDetailsPickUpAtTitleText:{defaultValue:"Pickup branch",control:{type:"text"}},reservationDetailsButtonRemoveText:{defaultValue:"Remove your reservation",control:{type:"text"}},reservationDetailsStatusTitleText:{defaultValue:"Status",control:{type:"text"}},reservationDetailsBorrowBeforeText:{defaultValue:"Borrow before @date",control:{type:"text"}},reservationDetailsDigitalReservationGoToEreolenText:{defaultValue:"Go to eReolen",control:{type:"text"}},reservationDetailsReadyForLoanText:{defaultValue:"Ready for pickup",control:{type:"text"}},reservationDetailsPickupDeadlineTitleText:{defaultValue:"Pickup deadline",control:{type:"text"}},reservationDetailsNumberInQueueLabelText:{defaultValue:"@count queued",control:{type:"text"}},shiftText:{name:"Change",defaultValue:"Change",control:{type:"text"}},modalReservationFormPickupHeaderTitleText:{name:"Modal reservation form pickup header title",defaultValue:"Change pick-up location",control:{type:"text"}},modalReservationFormPickupHeaderDescriptionText:{name:"Modal reservation form pickup header description",defaultValue:"If you wish to change the pick-up location for your reservation, you can do it here.",control:{type:"text"}},modalReservationFormNoInterestAfterHeaderTitleText:{name:"Modal reservation form no interest after header title",defaultValue:"Change date of interest",control:{type:"text"}},modalReservationFormNoInterestAfterHeaderDescriptionText:{name:"Modal reservation form no interest after header description",defaultValue:"If you wish to change the amount of time after which you're no longer interested in the material, you can do it here.",control:{type:"text"}},saveButtonText:{name:"Save button text",defaultValue:"Save",control:{type:"text"}},chooseOneText:{name:"Choose one text",defaultValue:"Choose one",control:{type:"text"}},loadingText:{name:"Loading",defaultValue:"Loading...",control:{type:"text"}},reservationSuccessTitleText:{name:"Reservation success title",defaultValue:"Your reservation has been changed",control:{type:"text"}},reservationSuccessSubTitleText:{name:"Reservation success sub title",defaultValue:"Click the button below to close this window",control:{type:"text"}},reservationerrorTitleText:{name:"Reservation error title",defaultValue:"Something went wrong",control:{type:"text"}},reservationerrorSubTitleText:{name:"Reservation error sub title",defaultValue:"Click the button below to close this window and try again",control:{type:"text"}},reservationStatusButtonText:{name:"Reservation success button text",defaultValue:"Close",control:{type:"text"}}}},"./src/core/storybook/serviceUrlArgs.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var _utils_reduxMiddleware_extractServiceBaseUrls__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/core/utils/reduxMiddleware/extractServiceBaseUrls.ts"),process=__webpack_require__("./node_modules/process/browser.js");const __WEBPACK_DEFAULT_EXPORT__={[_utils_reduxMiddleware_extractServiceBaseUrls__WEBPACK_IMPORTED_MODULE_0__.PS.fbs]:{name:"Base url for the FBS API",defaultValue:process.env.FBS_BASEURL??"https://fbs-openplatform.dbc.dk",control:{type:"text"}},[_utils_reduxMiddleware_extractServiceBaseUrls__WEBPACK_IMPORTED_MODULE_0__.PS.publizon]:{name:"Base url for the Publizon API",defaultValue:process.env.PUBLIZON_BASEURL??"https://pubhub-openplatform.dbc.dk",control:{type:"text"}},[_utils_reduxMiddleware_extractServiceBaseUrls__WEBPACK_IMPORTED_MODULE_0__.PS.dplCms]:{name:"Base url for the DPL CMS API",defaultValue:"https://dpl-cms.docker",control:{type:"text"}},[_utils_reduxMiddleware_extractServiceBaseUrls__WEBPACK_IMPORTED_MODULE_0__.PS.cover]:{name:"Base url for the cover service",defaultValue:"https://cover.dandigbib.org",control:{type:"text"}},[_utils_reduxMiddleware_extractServiceBaseUrls__WEBPACK_IMPORTED_MODULE_0__.PS.materialList]:{name:"Base url for the material list service",defaultValue:"https://prod.materiallist.dandigbib.org",control:{type:"text"}},[_utils_reduxMiddleware_extractServiceBaseUrls__WEBPACK_IMPORTED_MODULE_0__.PS.fbi]:{name:"Base url for the FBI API",defaultValue:"https://fbi-api.dbc.dk/next/graphql",control:{type:"text"}}}},"./src/core/text.slice.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{N5:()=>addTextEntries,ZP:()=>__WEBPACK_DEFAULT_EXPORT__});const textSlice=(0,__webpack_require__("./node_modules/@reduxjs/toolkit/dist/redux-toolkit.esm.js").oM)({name:"text",initialState:{data:{}},reducers:{addTextEntries(state,action){state.data={...state.data,...action.payload.entries}}}}),{addTextEntries}=textSlice.actions,__WEBPACK_DEFAULT_EXPORT__=textSlice.reducer},"./src/core/token.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{LP:()=>getToken,b4:()=>TOKEN_USER_KEY,hA:()=>hasToken,o4:()=>setToken,t8:()=>TOKEN_LIBRARY_KEY});const tokens={},TOKEN_USER_KEY="user",TOKEN_LIBRARY_KEY="library";function setToken(type,value){tokens[type]=value}function hasToken(type){return Boolean(tokens[type])}function getToken(type){return tokens[type]}},"./src/core/url.slice.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{ZP:()=>__WEBPACK_DEFAULT_EXPORT__,dd:()=>addUrlEntries});const urlSlice=(0,__webpack_require__("./node_modules/@reduxjs/toolkit/dist/redux-toolkit.esm.js").oM)({name:"url",initialState:{data:{}},reducers:{addUrlEntries(state,action){state.data={...state.data,...action.payload.entries}}}}),{addUrlEntries}=urlSlice.actions,__WEBPACK_DEFAULT_EXPORT__=urlSlice.reducer},"./src/core/user.slice.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Ot:()=>setStatusAuthenticated,ZP:()=>__WEBPACK_DEFAULT_EXPORT__,ig:()=>setStatusUnauthenticated});var _reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/@reduxjs/toolkit/dist/redux-toolkit.esm.js");const attemptAuthentication=(0,_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_0__.hg)("user/attemptAuthentication",(()=>Promise.resolve())),userSlice=(0,_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_0__.oM)({name:"user",initialState:{status:"unauthenticated"},reducers:{updateStatus(state,action){"unauthenticated"!==state.status&&"attempting"!==state.status||(action.payload.hasToken?state.status="authenticated":action.payload.doFail&&"attempting"===state.status&&(state.status="failed"))},setStatusAuthenticated(state){state.status="authenticated"},setStatusUnauthenticated(state){state.status="unauthenticated"}},extraReducers:{[attemptAuthentication.pending]:state=>{state.status="attempting"}}}),{updateStatus,setStatusAuthenticated,setStatusUnauthenticated}=userSlice.actions,__WEBPACK_DEFAULT_EXPORT__=userSlice.reducer},"./src/core/utils/branches.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{ZP:()=>__WEBPACK_DEFAULT_EXPORT__,mc:()=>useGetBranches,rM:()=>excludeBlacklistedBranches});var _config__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/core/utils/config.tsx");const excludeBlacklistedBranches=(branches,blacklist)=>branches.filter((item=>!blacklist.includes(item.branchId))),cleanBranchesId=branches=>branches.map((branch=>{const matches=/-(\d*)/g.exec(branch.branchId);return matches?matches[1]:""})).filter((item=>item)),useGetBranches=key=>{const config=(0,_config__WEBPACK_IMPORTED_MODULE_0__.ZR)(),branches=config("branchesConfig",{transformer:"jsonParse"}),blacklistBranches=config(key,{transformer:"stringToArray"});return excludeBlacklistedBranches(branches,blacklistBranches)},__WEBPACK_DEFAULT_EXPORT__=()=>{const branches=useGetBranches("blacklistedSearchBranchesConfig");return cleanBranchesId(branches)};try{cleanBranchesId.displayName="cleanBranchesId",cleanBranchesId.__docgenInfo={description:"",displayName:"cleanBranchesId",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/utils/branches.tsx#cleanBranchesId"]={docgenInfo:cleanBranchesId.__docgenInfo,name:"cleanBranchesId",path:"src/core/utils/branches.tsx#cleanBranchesId"})}catch(__react_docgen_typescript_loader_error){}try{useGetBranches.displayName="useGetBranches",useGetBranches.__docgenInfo={description:"",displayName:"useGetBranches",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/utils/branches.tsx#useGetBranches"]={docgenInfo:useGetBranches.__docgenInfo,name:"useGetBranches",path:"src/core/utils/branches.tsx#useGetBranches"})}catch(__react_docgen_typescript_loader_error){}},"./src/core/utils/config.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Rh:()=>withConfig,ZR:()=>useConfig});var _store__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/core/store.ts"),_config_slice__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/core/config.slice.ts"),_withSuffix__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/core/utils/withSuffix.tsx");const useConfig=()=>{const{data}=(0,_store__WEBPACK_IMPORTED_MODULE_0__.v9)((state=>state.config));return(key,options)=>{if("string"!=typeof data[key])throw new Error(`Config entry "${key}" is not defined.`);return"jsonParse"===(null==options?void 0:options.transformer)?JSON.parse(data[key]):"stringToArray"===(null==options?void 0:options.transformer)?data[key].split(","):null==data?void 0:data[key]}},withConfig=Component=>(0,_withSuffix__WEBPACK_IMPORTED_MODULE_2__.Z)(Component,"Config",_config_slice__WEBPACK_IMPORTED_MODULE_1__.Mg);try{withConfig.displayName="withConfig",withConfig.__docgenInfo={description:"",displayName:"withConfig",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/utils/config.tsx#withConfig"]={docgenInfo:withConfig.__docgenInfo,name:"withConfig",path:"src/core/utils/config.tsx#withConfig"})}catch(__react_docgen_typescript_loader_error){}},"./src/core/utils/errors/HttpError.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";function _defineProperty(obj,key,value){return(key=function _toPropertyKey(t){var i=function _toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==typeof i?i:String(i)}(key))in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}__webpack_require__.d(__webpack_exports__,{Z:()=>HttpError});class HttpError extends Error{constructor(status,message,context){super(message),this.status=status,this.message=message,this.context=context,_defineProperty(this,"name","HttpError"),_defineProperty(this,"statusCode",void 0),this.statusCode=status}}},"./src/core/utils/helpers/date.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Tj:()=>formatDateDependingOnDigitalMaterial,ZP:()=>__WEBPACK_DEFAULT_EXPORT__,o0:()=>formatDateTime,p6:()=>formatDate,pj:()=>dateHasPassed});var dayjs__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/dayjs/dayjs.min.js"),dayjs__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(dayjs__WEBPACK_IMPORTED_MODULE_0__);const dateHasPassed=date=>dayjs__WEBPACK_IMPORTED_MODULE_0___default()().isAfter(date,"day"),formatDate=date=>dayjs__WEBPACK_IMPORTED_MODULE_0___default()(date).format("DD-MM-YYYY"),formatDateTime=date=>dayjs__WEBPACK_IMPORTED_MODULE_0___default()(date).format("DD-MM-YYYY HH:mm"),formatDateDependingOnDigitalMaterial=({date,isDigital})=>isDigital?formatDateTime(date):formatDate(date),__WEBPACK_DEFAULT_EXPORT__=()=>Math.floor(Date.now()/1e3)},"./src/core/utils/helpers/general.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A3:()=>getMaterialTypes,CU:()=>groupObjectArrayByProperty,Do:()=>getScrollClass,EC:()=>getColors,GJ:()=>loansOverdue,He:()=>getReviewRelease,IX:()=>patronAgeValid,JY:()=>getRenewableMaterials,Qe:()=>getAuthorNames,Qf:()=>getParams,R3:()=>getAmountOfRenewableLoans,RN:()=>getContributors,Rh:()=>pageSizeGlobal,S2:()=>getManifestationPublicationYear,Sz:()=>daysBetweenDates,T6:()=>orderManifestationsByYear,TG:()=>flattenCreators,TH:()=>convertPostIdsToFaustIds,US:()=>getRecommenderMaterialLimits,_M:()=>stringifyValue,b7:()=>creatorsToString,bV:()=>materialIsFiction,bs:()=>getLatestManifestation,cC:()=>getManifestationType,cf:()=>materialIsOverdue,e8:()=>tallyUpFees,f4:()=>sameLoanDate,k7:()=>getAllPids,lT:()=>getPublicationName,oO:()=>sortByReservationDate,q7:()=>daysBetweenTodayAndDate,qQ:()=>getManifestationPid,qZ:()=>getListItems,rp:()=>convertPostIdToFaustId,sC:()=>sortByLoanDate,uY:()=>getReleaseYearSearchResult,vH:()=>getAllFaustIds,vn:()=>getManifestationsPids,xB:()=>getReservablePidsFromAnotherLibrary,yz:()=>getCoverTint});var lodash_uniq__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/lodash/uniq.js"),lodash_uniq__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(lodash_uniq__WEBPACK_IMPORTED_MODULE_0__),dayjs__WEBPACK_IMPORTED_MODULE_18__=(__webpack_require__("./node_modules/core-js/modules/esnext.set.add-all.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.delete-all.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.difference.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.every.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.filter.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.find.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.intersection.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.is-disjoint-from.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.is-subset-of.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.is-superset-of.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.join.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.map.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.reduce.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.some.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.symmetric-difference.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.union.js"),__webpack_require__("./node_modules/react/index.js"),__webpack_require__("./node_modules/dayjs/dayjs.min.js")),dayjs__WEBPACK_IMPORTED_MODULE_18___default=__webpack_require__.n(dayjs__WEBPACK_IMPORTED_MODULE_18__),_configuration__WEBPACK_IMPORTED_MODULE_19__=__webpack_require__("./src/core/configuration/index.ts"),_url__WEBPACK_IMPORTED_MODULE_22__=__webpack_require__("./src/core/utils/helpers/url.ts"),_store__WEBPACK_IMPORTED_MODULE_20__=__webpack_require__("./src/core/store.ts");__webpack_require__("./src/core/utils/helpers/modal-helpers.ts");const getManifestationPublicationYear=manifestation=>{var _manifestation$editio,_manifestation$editio2;return(null===(_manifestation$editio=manifestation.edition)||void 0===_manifestation$editio||null===(_manifestation$editio2=_manifestation$editio.publicationYear)||void 0===_manifestation$editio2?void 0:_manifestation$editio2.display)||null},orderManifestationsByYear=(manifestations,order="desc")=>manifestations.sort(((a,b)=>{const currentDate=Number(getManifestationPublicationYear(a)),prevDate=Number(getManifestationPublicationYear(b));return"desc"===order?prevDate-currentDate:currentDate-prevDate})),flattenCreators=creators=>creators.map((creator=>creator.display)),creatorsToString=(creators,t)=>{if(creators.length>1){return`${creators.slice(0,2).join(", ")} ${t("etAlText")}`}return creators[0]},getLatestManifestation=manifestations=>orderManifestationsByYear(manifestations,"desc")[0],getManifestationPid=manifestations=>orderManifestationsByYear(manifestations)[0].pid,getCoverTint=index=>{const conf=(0,_configuration__WEBPACK_IMPORTED_MODULE_19__.bc)("coverTints",_configuration__WEBPACK_IMPORTED_MODULE_19__.ZP),{coverTints}=conf;if(coverTints){return coverTints[index%coverTints.length]}},getColors=()=>(0,_configuration__WEBPACK_IMPORTED_MODULE_19__.bc)("colors",_configuration__WEBPACK_IMPORTED_MODULE_19__.ZP),getRecommenderMaterialLimits=()=>(0,_configuration__WEBPACK_IMPORTED_MODULE_19__.bc)("recommenderMaterialLimits",_configuration__WEBPACK_IMPORTED_MODULE_19__.ZP),daysBetweenTodayAndDate=date=>{const inputDate=dayjs__WEBPACK_IMPORTED_MODULE_18___default()(new Date(date)),today=dayjs__WEBPACK_IMPORTED_MODULE_18___default()(new Date);return Math.ceil(inputDate.diff(today,"day",!0))},daysBetweenDates=(firstDate,secondDate)=>{const inputFirstDate=dayjs__WEBPACK_IMPORTED_MODULE_18___default()(new Date(firstDate)),inputSecondDate=dayjs__WEBPACK_IMPORTED_MODULE_18___default()(new Date(secondDate));return Math.ceil(inputFirstDate.diff(inputSecondDate,"day",!0))},convertPostIdToFaustId=postId=>{const matches=postId.match(/^[0-9]+-[a-z]+:([a-zA-Z0-9]+)$/);if(null!=matches&&matches[1])return null==matches?void 0:matches[1];throw new Error(`Unable to extract faust id from post id "${postId}"`)},convertPostIdsToFaustIds=postIds=>postIds.map((pid=>convertPostIdToFaustId(pid))),getParams=props=>Object.entries(props).reduce(((acc,[property,value])=>({...acc,[property]:String(value||(0,_url__WEBPACK_IMPORTED_MODULE_22__.wo)(property))})),{}),sortByLoanDate=list=>list.sort(((a,b)=>new Date(a.loanDate||new Date).getTime()-new Date(b.loanDate||new Date).getTime())),sortByReservationDate=list=>list.sort(((objA,objB)=>new Date(objA.dateOfReservation||new Date).getTime()-new Date(objB.dateOfReservation||new Date).getTime())),getRenewableMaterials=list=>list.filter((({isRenewable})=>isRenewable)),getAmountOfRenewableLoans=list=>getRenewableMaterials(list).length,groupObjectArrayByProperty=(array,property)=>array.reduce(((result,current)=>{const groupBy=current[property];if(!groupBy)return result;const key=String(groupBy);return key in result?{...result,[key]:[...result[key],current]}:{...result,[key]:[current]}}),{}),getManifestationsPids=manifestations=>manifestations.map((manifestation=>manifestation.pid)),stringifyValue=value=>value?String(value):"",materialIsFiction=({fictionNonfiction})=>"FICTION"===(null==fictionNonfiction?void 0:fictionNonfiction.code),getListItems=(list,itemsShown)=>[...list].splice(0,itemsShown),pageSizeGlobal=(pageSizes,configName)=>{let pageSize=0;return pageSize=null!=pageSizes&&pageSizes.desktop&&null!=pageSizes&&pageSizes.mobile?(({desktop,mobile})=>{const{pageSize}=(0,_configuration__WEBPACK_IMPORTED_MODULE_19__.G2)("pageSize",{pageSize:{mobile:{pageSize:mobile},desktop:{pageSize:desktop}}});return Number(pageSize)})(pageSizes):(pageSizeConf=>{const{pageSize}=(0,_configuration__WEBPACK_IMPORTED_MODULE_19__.G2)(pageSizeConf,_configuration__WEBPACK_IMPORTED_MODULE_19__.ZP);return Number(pageSize)})(configName||"pageSize"),pageSize},materialIsOverdue=date=>dayjs__WEBPACK_IMPORTED_MODULE_18___default()().isAfter(dayjs__WEBPACK_IMPORTED_MODULE_18___default()(date),"day"),loansOverdue=loans=>loans.every((loan=>materialIsOverdue(loan.dueDate))),sameLoanDate=loans=>loans.every(((loanDate,i,arr)=>loanDate===arr[0])),tallyUpFees=fees=>fees.reduce(((total,{amount})=>total+amount),0).toLocaleString("da-DA"),getMaterialTypes=(manifestations,onlyFirstType=!0)=>onlyFirstType?lodash_uniq__WEBPACK_IMPORTED_MODULE_0___default()(manifestations.map((manifest=>manifest.materialTypes.map(((type,i)=>0===i?type.specific:null)))).flat().filter((type=>null!==type))):lodash_uniq__WEBPACK_IMPORTED_MODULE_0___default()(manifestations.map((manifest=>manifest.materialTypes.map((type=>type.specific)))).flat()),getManifestationType=manifestations=>getMaterialTypes(manifestations)[0],getAllPids=manifestations=>manifestations.map((manifestation=>manifestation.pid)),getAllFaustIds=manifestations=>convertPostIdsToFaustIds(getAllPids(manifestations)),getScrollClass=modalIds=>modalIds.length>0?"scroll-lock-background":"";const patronAgeValid=(cpr,minAge)=>{const cprDate=function getDateFromCpr(cprInput){const dateSegments=cprInput.replace(/[^\d]/g,"").substring(0,6).match(/.{1,2}/g);if(dateSegments){const[day,month,year]=dateSegments;let prefix="";prefix=Number(year)<21?"20":"19";const yearWithPrefix=Number(`${prefix}${year}`);return new Date(Date.UTC(yearWithPrefix,Number(month)-1,Number(day),0,0,0,0))}return null}(cpr);if(null===cprDate)return!1;return dayjs__WEBPACK_IMPORTED_MODULE_18___default()().diff(dayjs__WEBPACK_IMPORTED_MODULE_18___default()(cprDate),"year")>minAge},getAuthorNames=(creators,by,and)=>{const names=creators.map((({display})=>display));let returnContentString="";return 0===names.length||(returnContentString=1===names.length?`${by?`${by} `:""}${names.join(", ")}`:`${by?`${by} `:""} ${names.slice(0,-1).join(", ")} ${and?`${and} `:""}${names.slice(-1)}`),returnContentString},getPublicationName=hostPublication=>hostPublication?hostPublication.title:"",getReviewRelease=(dateFirstEdition,workYear,edition)=>{var _edition$publicationY;return(null==dateFirstEdition?void 0:dateFirstEdition.display)||(null==workYear?void 0:workYear.display)||(null==edition||null===(_edition$publicationY=edition.publicationYear)||void 0===_edition$publicationY?void 0:_edition$publicationY.display)||null},getReleaseYearSearchResult=work=>{const{latest,bestRepresentation}=work.manifestations,manifestation=bestRepresentation||latest;var _work$workYear,_work$workYear2,_manifestation$workYe,_manifestation$dateFi,_manifestation$editio3,_manifestation$editio4;return materialIsFiction(work)?null===(_work$workYear=work.workYear)||void 0===_work$workYear?void 0:_work$workYear.year:materialIsFiction(manifestation)?(null===(_work$workYear2=work.workYear)||void 0===_work$workYear2?void 0:_work$workYear2.year)||(null===(_manifestation$workYe=manifestation.workYear)||void 0===_manifestation$workYe?void 0:_manifestation$workYe.year)||(null===(_manifestation$dateFi=manifestation.dateFirstEdition)||void 0===_manifestation$dateFi?void 0:_manifestation$dateFi.year)||(null===(_manifestation$editio3=manifestation.edition)||void 0===_manifestation$editio3||null===(_manifestation$editio4=_manifestation$editio3.publicationYear)||void 0===_manifestation$editio4?void 0:_manifestation$editio4.display):getManifestationPublicationYear(latest)||""},getContributors=(short,creators)=>{const{text:{data:texts}}=_store__WEBPACK_IMPORTED_MODULE_20__.h.getState();if(creators&&creators.length>0){if(2===creators.length)return`${texts.materialByAuthorText} ${creators.join(` ${texts.materialAndAuthorText} `)}`;if(creators.length>2)return short?((creators,byText,etAlText)=>`${byText} ${creators.slice(0,2).join(", ")} ${etAlText}`)(creators,texts.materialByAuthorText,texts.etAlText):((creators,byText,andText)=>`${byText} ${creators.slice(0,-1).join(", ")} ${andText} ${creators.slice(-1)}`)(creators,texts.materialByAuthorText,texts.materialAndAuthorText)}return creators[0]},getReservablePidsFromAnotherLibrary=manifestations=>manifestations.filter((({catalogueCodes})=>null==catalogueCodes?void 0:catalogueCodes.otherCatalogues.some((code=>code.startsWith("OVE"))))).map((({pid})=>pid))},"./src/core/utils/helpers/invalid-switch-case.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});const __WEBPACK_DEFAULT_EXPORT__=function invalidSwitchCase(x){return console.error(`Invalid case for ${x}`),x}},"./src/core/utils/helpers/lazy-load.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{L:()=>useItemHasBeenVisible});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),react_use__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/react-use/esm/useIntersection.js");const useItemHasBeenVisible=()=>{const itemRef=(0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null),intersection=(0,react_use__WEBPACK_IMPORTED_MODULE_1__.Z)(itemRef,{root:null,rootMargin:"0%",threshold:0}),isInViewPort=Boolean(null==intersection?void 0:intersection.isIntersecting),[hasBeenVisible,setHasBeenVisible]=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(!1);return(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)((()=>{hasBeenVisible||isInViewPort&&setHasBeenVisible(!0)}),[hasBeenVisible,isInViewPort]),{itemRef,hasBeenVisible:isInViewPort||hasBeenVisible}}},"./src/core/utils/helpers/list-mapper.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{F9:()=>mapFBSReservationGroupToReservationType,L6:()=>mapManifestationToBasicDetailsType,Rr:()=>mapPublizonLoanToLoanType,U9:()=>mapProductToBasicDetailsType,_P:()=>mapPublizonReservationToReservationType,u3:()=>mapFBSLoanToLoanType});var lodash_values__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/lodash/values.js"),lodash_values__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(lodash_values__WEBPACK_IMPORTED_MODULE_0__),lodash_keys__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/lodash/keys.js"),lodash_keys__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(lodash_keys__WEBPACK_IMPORTED_MODULE_1__),lodash_head__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/lodash/head.js"),lodash_head__WEBPACK_IMPORTED_MODULE_2___default=__webpack_require__.n(lodash_head__WEBPACK_IMPORTED_MODULE_2__),_store__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/core/store.ts"),_general__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/core/utils/helpers/general.ts");function getSeriesString(series){return series.map((({title,numberInSeries})=>{var _numberInSeries$numbe;return numberInSeries&&numberInSeries.number?`${title} ${null===(_numberInSeries$numbe=numberInSeries.number)||void 0===_numberInSeries$numbe?void 0:_numberInSeries$numbe[0]}`:title})).join(", ")}const mapPublizonLoanToLoanType=list=>list.map((({loanExpireDateUtc,orderDateUtc,libraryBook})=>({dueDate:loanExpireDateUtc,loanDate:orderDateUtc,isRenewable:!1,materialItemNumber:(null==libraryBook?void 0:libraryBook.identifier)||"",renewalStatusList:[],loanType:null,identifier:(null==libraryBook?void 0:libraryBook.identifier)||null,faust:null,loanId:null}))),mapFBSLoanToLoanType=list=>list.map((({loanDetails,isRenewable,renewalStatusList})=>{var _loanDetails$periodic;return{dueDate:loanDetails.dueDate,loanDate:loanDetails.loanDate,periodical:(null===(_loanDetails$periodic=loanDetails.periodical)||void 0===_loanDetails$periodic?void 0:_loanDetails$periodic.displayText)||"",renewalStatusList,isRenewable,materialItemNumber:loanDetails.materialItemNumber,loanType:loanDetails.loanType,identifier:null,faust:loanDetails.recordId||null,loanId:loanDetails.loanId}})),mapProductToBasicDetailsType=material=>{const{publicationDate,title,description,productType,contributors,externalProductId,languageCode}=material,{text:{data:texts}}=_store__WEBPACK_IMPORTED_MODULE_3__.h.getState(),digitalProductType={1:texts.publizonEbookText,2:texts.publizonAudioBookText,4:texts.publizonPodcastText},authors=(null==contributors?void 0:contributors.map((({firstName,lastName})=>`${firstName} ${lastName}`)))||[];return{title,lang:languageCode,periodical:null,year:publicationDate?(date=publicationDate,new Date(date).getFullYear()):"",description,materialType:productType?digitalProductType[productType]:"",externalProductId:null==externalProductId?void 0:externalProductId.id,authors:contributors?(0,_general__WEBPACK_IMPORTED_MODULE_4__.RN)(!1,authors):"",authorsShort:contributors?(0,_general__WEBPACK_IMPORTED_MODULE_4__.RN)(!0,authors):""};var date},mapManifestationToBasicDetailsType=material=>{var _languages$main,_languages$main$;const{edition,abstract,titles,pid,materialTypes,creators,series,languages}=material,isoCode=(null==languages||null===(_languages$main=languages.main)||void 0===_languages$main||null===(_languages$main$=_languages$main[0])||void 0===_languages$main$?void 0:_languages$main$.isoCode)??"",description=abstract?abstract[0]:"",{full:[fullText]}=titles||{full:[]},{publicationYear}=edition||{},{display:year}=publicationYear||{},inputContributorsArray=(null==creators?void 0:creators.map((({display})=>display)))||[],firstAuthor=creators&&creators.length?creators[0].display:"";return{lang:isoCode,authors:(0,_general__WEBPACK_IMPORTED_MODULE_4__.RN)(!1,inputContributorsArray),authorsShort:(0,_general__WEBPACK_IMPORTED_MODULE_4__.RN)(!0,inputContributorsArray),firstAuthor,pid,title:fullText,year,description,series:series&&series.length>0?getSeriesString(series):"",materialType:materialTypes?materialTypes[0].specific:void 0}},mapPublizonReservationToReservationType=list=>list.map((({identifier,createdDateUtc,status,expectedRedeemDateUtc,productTitle,expireDateUtc})=>({identifier,faust:null,dateOfReservation:createdDateUtc,expiryDate:expireDateUtc,state:status?{1:"reserved",2:"readyForPickup",3:"redeemed",4:"cancelled",5:"expired"}[status]:null,title:productTitle,pickupDeadline:expectedRedeemDateUtc}))),mapFBSReservationGroupToReservationType=list=>list.map((({dateOfReservation,expiryDate,numberInQueue,state,pickupBranch,pickupDeadline,pickupNumber,periodical,records})=>({periodical:(null==periodical?void 0:periodical.displayText)||"",faust:lodash_head__WEBPACK_IMPORTED_MODULE_2___default()(lodash_keys__WEBPACK_IMPORTED_MODULE_1___default()(records)),dateOfReservation,expiryDate,numberInQueue,state:"readyForPickup"===state?"readyForPickup":"reserved",pickupBranch,pickupDeadline,pickupNumber,reservationIds:lodash_values__WEBPACK_IMPORTED_MODULE_0___default()(records)})))},"./src/core/utils/helpers/modal-helpers.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{FV:()=>getDetailsModalId,GM:()=>getModalIds,OY:()=>dateFromDueDateModalQueryParam,V$:()=>constructModalId,hl:()=>containsDueDateModalQueryParam});var _configuration__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/core/configuration/index.ts");const constructModalId=(prefix,fragments)=>[prefix,...fragments].join("-"),getModalIds=()=>(0,_configuration__WEBPACK_IMPORTED_MODULE_0__.bc)("modalIds",_configuration__WEBPACK_IMPORTED_MODULE_0__.ZP),containsDueDateModalQueryParam=queryParam=>{const{dueDateModal}=getModalIds(),regex=new RegExp(`${dueDateModal}\\d{4}-\\d{2}-\\d{2}`,"g"),dateFound=queryParam.match(regex);return dateFound?dateFound[0]:null},dateFromDueDateModalQueryParam=queryParam=>{const dateFound=queryParam.match(/\d{4}-\d{2}-\d{2}/g);return dateFound?dateFound[0]:null},getDetailsModalId=(queryParam,prefix)=>{const regexIdentifier=new RegExp(`(?<=${prefix})((\\d{13})|((\\d{10}))||((\\d{9}))|(\\d{8}))`,"g"),modalId=queryParam.match(regexIdentifier);if(modalId){const[returnId]=modalId;return returnId}return""}},"./src/core/utils/helpers/renewal.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{r0:()=>filterRenewResponseData,CO:()=>getRenewButtonLabel,TJ:()=>succeededRenewalCount});let RenewStatus=function(RenewStatus){return RenewStatus.renewed="renewed",RenewStatus.deniedReserved="deniedReserved",RenewStatus.deniedMaxRenewalsReached="deniedMaxRenewalsReached",RenewStatus.deniedLoanerIsBlocked="deniedLoanerIsBlocked",RenewStatus.deniedMaterialIsNotLoanable="deniedMaterialIsNotLoanable",RenewStatus.deniedMaterialIsNotFound="deniedMaterialIsNotFound",RenewStatus.deniedLoanerNotFound="deniedLoanerNotFound",RenewStatus.deniedLoaningProfileNotFound="deniedLoaningProfileNotFound",RenewStatus.deniedOtherReason="deniedOtherReason",RenewStatus}({});const filterRenewResponseData=data=>data.filter((loan=>loan.renewalStatus[0]===RenewStatus.renewed)),succeededRenewalCount=renewingResponse=>filterRenewResponseData(renewingResponse||[]).length,getRenewButtonLabel=({isRenewable,renewingStatus,t,defaultText})=>isRenewable?"pending"===renewingStatus?t("renewProcessingText"):defaultText??t("renewButtonText"):t("renewCannotBeRenewedText")},"./src/core/utils/helpers/url.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Hg:()=>constructAdvancedSearchUrl,Nt:()=>constructSearchUrl,U2:()=>constructSearchUrlWithFilter,W3:()=>turnUrlStringsIntoObjects,WO:()=>constructMaterialUrl,gB:()=>redirectTo,hN:()=>redirectToLoginAndBack,oC:()=>removeQueryParametersFromUrl,oW:()=>appendQueryParametersToUrl,pM:()=>isUrlValid,uW:()=>currentLocationWithParametersUrl,ul:()=>setQueryParametersInUrl,vW:()=>getCurrentLocation,wo:()=>getUrlQueryParam});const getCurrentLocation=()=>String(window.location),appendQueryParametersToUrl=(url,parameters)=>{const processedUrl=new URL(url);return Object.keys(parameters).forEach((key=>{processedUrl.searchParams.set(key,encodeURI(parameters[key]))})),processedUrl},getUrlQueryParam=param=>{const queryParams=new URLSearchParams(window.location.search);return queryParams.get(param)?decodeURI(String(queryParams.get(param))):null},setQueryParametersInUrl=parameters=>{const processedUrl=new URL(getCurrentLocation());Object.keys(parameters).forEach((key=>{processedUrl.searchParams.set(key,parameters[key])})),window.history.replaceState(null,"",processedUrl)},removeQueryParametersFromUrl=parameter=>{const processedUrl=new URL(getCurrentLocation());var replacementUrl;processedUrl.searchParams.delete(parameter),replacementUrl=processedUrl,window.history.replaceState(null,"",replacementUrl)},redirectTo=url=>{window.location.assign(String(url))},processUrlPlaceholders=(url,placeholders)=>{let processedUrl=url;return placeholders.forEach((placeholder=>{const[name,replacement]=placeholder;processedUrl=((url,placeholderName,replacement)=>{const regex=new RegExp(`${placeholderName}`,"g");return url.match(regex)?url.replace(regex,replacement):url})(processedUrl,name,replacement)})),processedUrl},constructMaterialUrl=(url,workId,type)=>{const materialUrl=new URL(url);return materialUrl.pathname=processUrlPlaceholders(materialUrl.pathname,[[":workid",workId]]),type?appendQueryParametersToUrl(materialUrl,{type}):materialUrl},constructSearchUrl=(searchUrl,q)=>appendQueryParametersToUrl(searchUrl,{q}),constructAdvancedSearchUrl=(advancedSearchUrl,q)=>appendQueryParametersToUrl(advancedSearchUrl,{advancedSearchCql:q}),constructSearchUrlWithFilter=args=>{const{searchUrl,selectedItemString,filter}=args;return appendQueryParametersToUrl(searchUrl,{q:selectedItemString,...filter})},turnUrlStringsIntoObjects=urls=>Object.keys(urls).reduce(((acc,key)=>({...acc,[key]:new URL(urls[key],getCurrentLocation())})),{});function redirectToLoginAndBack({authUrl,returnUrl,trackingFunction}){const{pathname,search,hash}=returnUrl,redirectUrl=appendQueryParametersToUrl(authUrl,{"current-path":`${pathname}${search}${hash}`});trackingFunction&&trackingFunction().then((()=>redirectTo(redirectUrl))),redirectTo(redirectUrl)}const isUrlValid=text=>{try{const url=new URL(text);return"http:"===url.protocol||"https:"===url.protocol}catch(err){return!1}},currentLocationWithParametersUrl=params=>appendQueryParametersToUrl(new URL(getCurrentLocation()),params)},"./src/core/utils/helpers/user.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{IT:()=>isBlocked,TF:()=>isAnonymous,aE:()=>isResident,dp:()=>usePatronData});var lodash_isEmpty__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/lodash/isEmpty.js"),lodash_isEmpty__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(lodash_isEmpty__WEBPACK_IMPORTED_MODULE_0__),_token__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/core/token.js"),_fbs_fbs__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/core/fbs/fbs.ts");const isAnonymous=()=>!(0,_token__WEBPACK_IMPORTED_MODULE_1__.hA)("user"),isBlocked=patron=>!lodash_isEmpty__WEBPACK_IMPORTED_MODULE_0___default()(patron.blockStatus),isResident=patron=>patron.resident,usePatronData=()=>(0,_fbs_fbs__WEBPACK_IMPORTED_MODULE_2__.wK)({enabled:!isAnonymous()})},"./src/core/utils/modal.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>modal,f:()=>useModalButtonHandler});var react=__webpack_require__("./node_modules/react/index.js"),es=__webpack_require__("./node_modules/react-redux/es/index.js"),CloseLarge=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/CloseLarge.svg"),CloseLarge_default=__webpack_require__.n(CloseLarge),clsx=__webpack_require__("./node_modules/clsx/dist/clsx.mjs"),focus_trap_react=__webpack_require__("./node_modules/focus-trap-react/dist/focus-trap-react.js"),focus_trap_react_default=__webpack_require__.n(focus_trap_react),modal_slice=__webpack_require__("./src/core/modal.slice.ts"),user=__webpack_require__("./src/core/utils/helpers/user.ts"),url=__webpack_require__("./src/core/utils/helpers/url.ts"),process=__webpack_require__("./node_modules/process/browser.js");const isVitestEnvironment=void 0!==process&&process.env&&process.env.VITEST;function Modal({modalId,closeModalAriaLabelText,children,screenReaderModalDescriptionText,classNames,isSlider,dataCy="modal",eventCallbacks}){const dispatch=(0,es.I0)(),{modalIds}=(0,es.v9)((s=>s.modal));if((0,react.useEffect)((()=>{var _searchParams$get;null!==(_searchParams$get=new URLSearchParams(window.location.search).get("modal"))&&void 0!==_searchParams$get&&_searchParams$get.includes(modalId)&&dispatch((0,modal_slice.h7)({modalId}))}),[modalId,dispatch]),modalIds&&!modalIds.includes(modalId))return null;const close=()=>{null!=eventCallbacks&&eventCallbacks.close&&eventCallbacks.close(),dispatch((0,modal_slice.Mr)({modalId}))};return react.createElement(focus_trap_react_default(),{focusTrapOptions:{fallbackFocus:isVitestEnvironment?"body":void 0}},react.createElement("div",null,react.createElement("div",{className:"modal-backdrop",style:{zIndex:modalIds.indexOf(modalId)+20},onClick:()=>{close()}}),react.createElement("div",{className:(0,clsx.Z)("modal",{"modal-show":modalIds.includes(modalId)},classNames),role:"dialog","aria-labelledby":`modal-${modalId}-description`,"data-cy":dataCy,style:{zIndex:modalIds.indexOf(modalId)+21}},react.createElement("div",{className:"modal__screen-reader-description",id:`modal-${modalId}-description`},screenReaderModalDescriptionText),react.createElement("button",{type:"button",className:"btn-ui modal-btn-close "+(isSlider?"":"modal-btn-close--offset"),style:{zIndex:modalIds.indexOf(modalId)+20},"aria-label":closeModalAriaLabelText,onClick:()=>{close()},"data-cy":`modal-${modalId}-close-button`},react.createElement("img",{src:CloseLarge_default(),alt:"",style:{pointerEvents:"none"}})),children)))}const useModalButtonHandler=()=>{const dispatch=(0,es.I0)();return{open:modalId=>dispatch((0,modal_slice.h7)({modalId})),close:modalId=>dispatch((0,modal_slice.Mr)({modalId})),closeAll:()=>dispatch((0,modal_slice.pT)()),openGuarded:({authUrl,modalId,trackOnlineView})=>{if((0,user.TF)()){const returnUrl=(0,url.uW)({modal:modalId});(0,url.hN)({authUrl,returnUrl,trackingFunction:trackOnlineView})}else trackOnlineView&&trackOnlineView(),dispatch((0,modal_slice.h7)({modalId}))}}},modal=Modal;try{Modal.displayName="Modal",Modal.__docgenInfo={description:"",displayName:"Modal",props:{modalId:{defaultValue:null,description:"",name:"modalId",required:!0,type:{name:"string"}},closeModalAriaLabelText:{defaultValue:null,description:"",name:"closeModalAriaLabelText",required:!0,type:{name:"string"}},screenReaderModalDescriptionText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionText",required:!0,type:{name:"string"}},classNames:{defaultValue:null,description:"",name:"classNames",required:!1,type:{name:"string | undefined"}},dataCy:{defaultValue:{value:"modal"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}},isSlider:{defaultValue:null,description:"",name:"isSlider",required:!1,type:{name:"boolean | undefined"}},eventCallbacks:{defaultValue:null,description:"",name:"eventCallbacks",required:!1,type:{name:"{ close?: (() => void) | undefined; } | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/utils/modal.tsx#Modal"]={docgenInfo:Modal.__docgenInfo,name:"Modal",path:"src/core/utils/modal.tsx#Modal"})}catch(__react_docgen_typescript_loader_error){}},"./src/core/utils/reduxMiddleware/extractServiceBaseUrls.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{PS:()=>serviceUrlKeys,ZP:()=>__WEBPACK_DEFAULT_EXPORT__,fG:()=>getServiceBaseUrl});const serviceUrlKeys={fbs:"fbsBaseUrl",publizon:"publizonBaseUrl",dplCms:"dplCmsBaseUrl",cover:"coverBaseUrl",materialList:"materialListBaseUrl",fbi:"fbiBaseUrl"};let serviceBaseUrls={};const filterUrls=(urls,filterFunction)=>Object.keys(urls).filter(filterFunction).reduce(((obj,key)=>({...obj,[key]:urls[key]})),{}),getServiceBaseUrl=apiBaseUrlKey=>{if(!serviceBaseUrls[apiBaseUrlKey])throw new Error(`Service base url for ${apiBaseUrlKey} is not defined.`);return serviceBaseUrls[apiBaseUrlKey]},__WEBPACK_DEFAULT_EXPORT__=()=>next=>action=>{if("url/addUrlEntries"===String(action.type)){const{payload:{entries}}=action;serviceBaseUrls=filterUrls(entries,(key=>Object.values(serviceUrlKeys).includes(key)));const otherUrls=filterUrls(entries,(key=>!Object.values(serviceUrlKeys).includes(key)));return next({...action,payload:{entries:otherUrls}})}return next(action)}},"./src/core/utils/text.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{X:()=>useText,z:()=>withText});var _store__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/core/store.ts"),_text_slice__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/core/text.slice.ts"),_withSuffix__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/core/utils/withSuffix.tsx");class TextDefinitionError extends Error{constructor(message){super(message),this.name="TextDefinitionError"}}const useText=()=>{const{data}=(0,_store__WEBPACK_IMPORTED_MODULE_0__.v9)((state=>state.text));return(key,{placeholders,count}={count:0})=>{const textDefinition=(rawText=>{if(!rawText.match(/^\{.*\}$/))return{type:"simple",text:[rawText]};try{const textDefinition=JSON.parse(rawText);if("object"==typeof textDefinition&&2===Object.keys(textDefinition).length&&Object.keys(textDefinition).includes("type")&&Object.keys(textDefinition).includes("text")&&["simple","plural"].includes((null==textDefinition?void 0:textDefinition.type)??"")&&Array.isArray(null==textDefinition?void 0:textDefinition.text)){const type=null==textDefinition?void 0:textDefinition.type,text=(null==textDefinition?void 0:textDefinition.text)??[];if(["simple"].includes(type)&&1!==text.length)throw new TextDefinitionError("Simple text definitions must have exactly one text entry");if(["plural"].includes(type)&&2!==text.length)throw new TextDefinitionError("Plural text definitions must have exactly two text entries");return textDefinition}}catch(error){const message=error instanceof Error?error.message:"Unknown error";throw new TextDefinitionError(`Could not parse rawText text format: ${rawText}. Message: ${message}`)}return{type:"simple",text:["Unknown text entry"]}})((null==data?void 0:data[key])??key),textPlaceholders={...placeholders??{}};"plural"===textDefinition.type&&(textPlaceholders["@count"]=String(count));const processedTexts=textPlaceholders?((texts,placeholders)=>texts.map((text=>text.replace(/@\w+/g,(match=>0===placeholders[match]?"0":String(placeholders[match]||match))))))(textDefinition.text,textPlaceholders):textDefinition.text;return"plural"===textDefinition.type?0===count?processedTexts[1]:processedTexts[1%(count??1)]:processedTexts[0]}},withText=Component=>(0,_withSuffix__WEBPACK_IMPORTED_MODULE_2__.Z)(Component,"Text",_text_slice__WEBPACK_IMPORTED_MODULE_1__.N5);try{withText.displayName="withText",withText.__docgenInfo={description:"",displayName:"withText",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/utils/text.tsx#withText"]={docgenInfo:withText.__docgenInfo,name:"withText",path:"src/core/utils/text.tsx#withText"})}catch(__react_docgen_typescript_loader_error){}},"./src/core/utils/types/loan-type.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";function isLoanType(item){return!!item.loanId||!!item.identifier}function loanId(loan){return String(loan.loanId||loan.identifier)}__webpack_require__.d(__webpack_exports__,{P:()=>isLoanType,e:()=>loanId})},"./src/core/utils/types/material-type.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{XK:()=>ManifestationMaterialType,eS:()=>AutosuggestCategory});let ManifestationMaterialType=function(ManifestationMaterialType){return ManifestationMaterialType.book="bog",ManifestationMaterialType.ebook="e-bog",ManifestationMaterialType.movie="film",ManifestationMaterialType.audioBook="lydbog (online)",ManifestationMaterialType.audioBookGeneric="lydbog",ManifestationMaterialType.music="node",ManifestationMaterialType.game="playstation 5",ManifestationMaterialType.animatedSeries="tegneserie",ManifestationMaterialType.article="artikel",ManifestationMaterialType.earticle="artikel",ManifestationMaterialType.boardGame="spil",ManifestationMaterialType.cdRom="cd",ManifestationMaterialType.magazine="tidsskrift",ManifestationMaterialType}({}),AutosuggestCategory=function(AutosuggestCategory){return AutosuggestCategory.book="bog",AutosuggestCategory.ebook="e-bog",AutosuggestCategory.movie="Film",AutosuggestCategory.audioBook="lydbog (online)",AutosuggestCategory.music="Musik",AutosuggestCategory.game="Spil",AutosuggestCategory.animatedSeries="tegneserie",AutosuggestCategory}({})},"./src/core/utils/types/reservation-type.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Rq:()=>isDigitalReservation,_p:()=>reservationId,xF:()=>isPhysicalReservation});__webpack_require__("./node_modules/core-js/modules/esnext.string.at.js");function reservationId(reservation){return null!=reservation&&reservation.reservationIds&&reservation.reservationIds.length>0?String(reservation.reservationIds.at(0)):String(reservation.identifier)}function isPhysicalReservation(reservation){return!!reservation.faust&&!!reservation.reservationIds&&reservation.reservationIds.length>0}function isDigitalReservation(reservation){return!!reservation.identifier}},"./src/core/utils/url.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{J_:()=>useUrls,XL:()=>withUrls});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_store__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/core/store.ts"),_url_slice__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/core/url.slice.ts"),_helpers_url__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/core/utils/helpers/url.ts"),_withSuffix__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/core/utils/withSuffix.tsx");const useUrls=()=>{const{data}=(0,_store__WEBPACK_IMPORTED_MODULE_1__.v9)((state=>state.url)),urls=(0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)((()=>(0,_helpers_url__WEBPACK_IMPORTED_MODULE_4__.W3)(data)),[data]);return name=>{if(!urls[name])throw new Error(`The url ${name} is not defined`);return urls[name]}},withUrls=Component=>(0,_withSuffix__WEBPACK_IMPORTED_MODULE_3__.Z)(Component,"Url",_url_slice__WEBPACK_IMPORTED_MODULE_2__.dd);try{withUrls.displayName="withUrls",withUrls.__docgenInfo={description:"",displayName:"withUrls",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/utils/url.tsx#withUrls"]={docgenInfo:withUrls.__docgenInfo,name:"withUrls",path:"src/core/utils/url.tsx#withUrls"})}catch(__react_docgen_typescript_loader_error){}},"./src/core/utils/useGetAvailability.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var _fbs_fbs__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/core/fbs/fbs.ts"),_apps_material_helper__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/apps/material/helper.ts");const __WEBPACK_DEFAULT_EXPORT__=({faustIds,config,options})=>{const{data,isLoading,isError}=(0,_fbs_fbs__WEBPACK_IMPORTED_MODULE_0__.DP)((0,_apps_material_helper__WEBPACK_IMPORTED_MODULE_1__.UH)(faustIds,config,"availability"),options);return{data,isLoading,isError}}},"./src/core/utils/useLoanThresholds.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var _config__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/core/utils/config.tsx");const __WEBPACK_DEFAULT_EXPORT__=()=>{const config=(0,_config__WEBPACK_IMPORTED_MODULE_0__.ZR)();return{warning:Number(config("expirationWarningDaysBeforeConfig")),danger:0}}},"./src/core/utils/useLoans.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});__webpack_require__("./node_modules/core-js/modules/esnext.set.add-all.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.delete-all.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.difference.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.every.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.filter.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.find.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.intersection.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.is-disjoint-from.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.is-subset-of.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.is-superset-of.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.join.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.map.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.reduce.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.some.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.symmetric-difference.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.union.js");var _fbs_fbs__WEBPACK_IMPORTED_MODULE_16__=__webpack_require__("./src/core/fbs/fbs.ts"),_publizon_publizon__WEBPACK_IMPORTED_MODULE_17__=__webpack_require__("./src/core/publizon/publizon.ts"),_helpers_general__WEBPACK_IMPORTED_MODULE_18__=__webpack_require__("./src/core/utils/helpers/general.ts"),_helpers_list_mapper__WEBPACK_IMPORTED_MODULE_19__=__webpack_require__("./src/core/utils/helpers/list-mapper.ts"),_useLoanThresholds__WEBPACK_IMPORTED_MODULE_20__=__webpack_require__("./src/core/utils/useLoanThresholds.tsx");const filterLoansNotOverdue=(loans,warning)=>loans.filter((({dueDate})=>{const due=dueDate||"";return(0,_helpers_general__WEBPACK_IMPORTED_MODULE_18__.q7)(due)-warning>0})),filterLoansOverdue=loans=>loans.filter((({dueDate})=>(0,_helpers_general__WEBPACK_IMPORTED_MODULE_18__.cf)(dueDate))),filterLoansSoonOverdue=(loans,warning)=>loans.filter((({dueDate})=>{const due=dueDate||"",daysUntilExpiration=(0,_helpers_general__WEBPACK_IMPORTED_MODULE_18__.q7)(due);return daysUntilExpiration-warning<=0&&daysUntilExpiration-warning>=-warning})),sortByDueDate=list=>list.sort(((a,b)=>new Date(a.dueDate||new Date).getTime()-new Date(b.dueDate||new Date).getTime())),__WEBPACK_DEFAULT_EXPORT__=()=>{const{data:loansFbs,isLoading:isLoadingFbs,isError:isErrorFbs}=(0,_fbs_fbs__WEBPACK_IMPORTED_MODULE_16__.n1)(),{data:loansPublizon,isLoading:isLoadingPublizon,isError:isErrorPublizon}=(0,_publizon_publizon__WEBPACK_IMPORTED_MODULE_17__.T8)(),threshold=(0,_useLoanThresholds__WEBPACK_IMPORTED_MODULE_20__.Z)(),loansIsLoading=isLoadingFbs||isLoadingPublizon,loansIsError=isErrorFbs||isErrorPublizon,mappedLoansFbs=loansFbs?(0,_helpers_list_mapper__WEBPACK_IMPORTED_MODULE_19__.u3)(loansFbs):[],mappedLoansPublizon=null!=loansPublizon&&loansPublizon.loans?(0,_helpers_list_mapper__WEBPACK_IMPORTED_MODULE_19__.Rr)(loansPublizon.loans).filter((item=>item.dueDate)):[],loans=sortByDueDate([...mappedLoansFbs,...mappedLoansPublizon]),loansOverdueFBS=filterLoansOverdue(mappedLoansFbs),LoansOverduePublizon=filterLoansOverdue(mappedLoansPublizon),loansOverdue=sortByDueDate([...loansOverdueFBS,...LoansOverduePublizon]),loansSoonOverdueFBS=filterLoansSoonOverdue(mappedLoansFbs,threshold.warning),loansSoonOverduePublizon=filterLoansSoonOverdue(mappedLoansPublizon,threshold.warning),loansSoonOverdue=sortByDueDate([...loansSoonOverdueFBS,...loansSoonOverduePublizon]),loansFarFromOverdueFBS=filterLoansNotOverdue(mappedLoansFbs,threshold.warning),loansFarFromOverduePublizon=filterLoansNotOverdue(mappedLoansPublizon,threshold.warning),loansFarFromOverdue=sortByDueDate([...loansFarFromOverdueFBS,...loansFarFromOverduePublizon]),loansSortedByDateFbs=sortByDueDate(mappedLoansFbs),loansSortedByDatePublizon=sortByDueDate(mappedLoansPublizon);return{all:{loans,overdue:loansOverdue,soonOverdue:loansSoonOverdue,farFromOverdue:loansFarFromOverdue,isLoading:loansIsLoading,isError:loansIsError},fbs:{loans:loansSortedByDateFbs,overdue:loansOverdueFBS,soonOverdue:loansSoonOverdueFBS,farFromOverdue:loansFarFromOverdueFBS,stackedMaterialsDueDates:(list=>Array.from(new Set(list.filter((({dueDate})=>null!==dueDate)).map((({dueDate})=>dueDate)).sort())))(mappedLoansFbs),isLoading:isLoadingFbs,isError:isErrorFbs},publizon:{loans:loansSortedByDatePublizon,overdue:LoansOverduePublizon,soonOverdue:loansSoonOverduePublizon,farFromOverdue:loansFarFromOverduePublizon,isLoading:isLoadingPublizon,isError:isErrorPublizon}}}},"./src/core/utils/useRequestsWithStatus.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{HU:()=>useMultipleRequestsWithStatus,cQ:()=>useSingleRequestWithStatus});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js");const useMultipleRequestsWithStatus=({requests,onError,onSuccess})=>{const[requestStatus,setRequestStatus]=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)("idle");return{handler:(0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)((()=>{setRequestStatus("pending");const operations=[];requests.forEach((({params,operation})=>{if("function"!=typeof operation)throw new Error("Operation must be a function.");operations.push(new Promise(((resolve,reject)=>{operation(params,{onSuccess:result=>{resolve(result)},onError:error=>{reject(error)}})})))})),Promise.all(operations).then((allResults=>{setRequestStatus("success"),onSuccess&&onSuccess(allResults)})).catch((error=>{setRequestStatus("error"),onError&&onError(error)}))}),[requests,onSuccess,onError]),requestStatus,setRequestStatus}},useSingleRequestWithStatus=({request,onError,onSuccess})=>useMultipleRequestsWithStatus({requests:[request],onError:onError?errors=>onError(errors[0]):void 0,onSuccess:onSuccess?results=>{onSuccess(results[0])}:void 0});try{useMultipleRequestsWithStatus.displayName="useMultipleRequestsWithStatus",useMultipleRequestsWithStatus.__docgenInfo={description:"",displayName:"useMultipleRequestsWithStatus",props:{requests:{defaultValue:null,description:"",name:"requests",required:!0,type:{name:"{ params: TParams; operation: TRequest; }[]"}},onSuccess:{defaultValue:null,description:"",name:"onSuccess",required:!1,type:{name:"((results: TResponse[]) => void) | undefined"}},onError:{defaultValue:null,description:"",name:"onError",required:!1,type:{name:"((errors: unknown[]) => void) | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/utils/useRequestsWithStatus.tsx#useMultipleRequestsWithStatus"]={docgenInfo:useMultipleRequestsWithStatus.__docgenInfo,name:"useMultipleRequestsWithStatus",path:"src/core/utils/useRequestsWithStatus.tsx#useMultipleRequestsWithStatus"})}catch(__react_docgen_typescript_loader_error){}try{useSingleRequestWithStatus.displayName="useSingleRequestWithStatus",useSingleRequestWithStatus.__docgenInfo={description:"",displayName:"useSingleRequestWithStatus",props:{request:{defaultValue:null,description:"",name:"request",required:!0,type:{name:"{ params: TParams; operation: TRequest; }"}},onSuccess:{defaultValue:null,description:"",name:"onSuccess",required:!1,type:{name:"((results: TResponse) => void) | undefined"}},onError:{defaultValue:null,description:"",name:"onError",required:!1,type:{name:"((error: unknown) => void) | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/utils/useRequestsWithStatus.tsx#useSingleRequestWithStatus"]={docgenInfo:useSingleRequestWithStatus.__docgenInfo,name:"useSingleRequestWithStatus",path:"src/core/utils/useRequestsWithStatus.tsx#useSingleRequestWithStatus"})}catch(__react_docgen_typescript_loader_error){}},"./src/core/utils/useReservations.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>utils_useReservations});var publizon=__webpack_require__("./src/core/publizon/publizon.ts"),list_mapper=__webpack_require__("./src/core/utils/helpers/list-mapper.ts"),helpers=__webpack_require__("./src/apps/reservation-list/utils/helpers.ts");const api_strings_namespaceObject_c="reserved";var reduce=__webpack_require__("./node_modules/lodash/reduce.js"),reduce_default=__webpack_require__.n(reduce),min=__webpack_require__("./node_modules/lodash/min.js"),min_default=__webpack_require__.n(min),map=__webpack_require__("./node_modules/lodash/map.js"),map_default=__webpack_require__.n(map),groupBy=__webpack_require__("./node_modules/lodash/groupBy.js"),groupBy_default=__webpack_require__.n(groupBy),fbs=__webpack_require__("./src/core/fbs/fbs.ts");function groupReservations(data){const reservationGroups=groupBy_default()(data,(reservation=>reservation.transactionId));return map_default()(reservationGroups,(reservationGroup=>({...reservationGroup[0],numberInQueue:min_default()(map_default()(reservationGroup,"numberInQueue")),records:reduce_default()(reservationGroup,((result,reservation)=>({...result,[reservation.recordId]:reservation.reservationId})),{})})))}const utils_useGetReservationGroups=()=>{const result=(0,fbs.U)();return{...result,data:result.data?groupReservations(result.data):null}};const getQueuedReservations=list=>[...list].filter((({state})=>state===api_strings_namespaceObject_c)),utils_useReservations=()=>{const{data:reservationsFbs,isLoading:isLoadingFbs,isError:isErrorFbs}=utils_useGetReservationGroups(),{data:reservationsPublizon,isLoading:isLoadingPublizon,isError:isErrorPublizon}=(0,publizon.ju)(),reservationsIsLoading=isLoadingFbs||isLoadingPublizon,reservationsIsError=isErrorFbs||isErrorPublizon,mappedReservationsFbs=reservationsFbs?(0,list_mapper.F9)(reservationsFbs):[],mappedReservationsPublizon=null!=reservationsPublizon&&reservationsPublizon.reservations?(0,list_mapper._P)(reservationsPublizon.reservations):[],reservations=[...mappedReservationsFbs,...mappedReservationsPublizon],reservationsReadyToLoanFBS=(0,helpers.S1)(mappedReservationsFbs),reservationsReadyToLoanPublizon=(0,helpers.S1)(mappedReservationsPublizon),reservationsReadyToLoan=[...reservationsReadyToLoanFBS,...reservationsReadyToLoanPublizon],reservationsQueuedFBS=getQueuedReservations(mappedReservationsFbs),reservationsQueuedPublizon=getQueuedReservations(mappedReservationsPublizon);return{all:{reservations,readyToLoan:reservationsReadyToLoan,queued:[...reservationsQueuedFBS,...reservationsQueuedPublizon],isLoading:reservationsIsLoading,isError:reservationsIsError},fbs:{reservations:mappedReservationsFbs,readyToLoan:reservationsReadyToLoanFBS,queued:reservationsQueuedFBS,isLoading:isLoadingFbs,isError:isErrorFbs},publizon:{reservations:mappedReservationsPublizon,readyToLoan:reservationsReadyToLoanPublizon,queued:reservationsQueuedPublizon,isLoading:isLoadingPublizon,isError:isErrorPublizon}}}},"./src/core/utils/withIsPatronBlockedHoc.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>utils_withIsPatronBlockedHoc});var react=__webpack_require__("./node_modules/react/index.js"),es=__webpack_require__("./node_modules/react-redux/es/index.js"),modal=__webpack_require__("./src/core/utils/modal.tsx"),utils_text=__webpack_require__("./src/core/utils/text.tsx"),BlockedTypes=function(BlockedTypes){return BlockedTypes.extendedExclusion="F",BlockedTypes.deceased="D",BlockedTypes.fee="E",BlockedTypes.selfcreated="W",BlockedTypes.stolen="O",BlockedTypes.exclusion="U",BlockedTypes.automatonBlocked="S",BlockedTypes}(BlockedTypes||{});const types_BlockedTypes=BlockedTypes;var url=__webpack_require__("./src/core/utils/url.tsx"),Link=__webpack_require__("./src/components/atoms/links/Link.tsx"),modal_helpers=__webpack_require__("./src/core/utils/helpers/modal-helpers.ts");const BlockedModal=({blockedStatus})=>{const t=(0,utils_text.X)(),blockedPatronELinkUrl=(0,url.J_)()("blockedPatronELinkUrl"),{blockedModal}=(0,modal_helpers.GM)();return react.createElement(modal.Z,{modalId:blockedModal,classNames:"modal-loan",closeModalAriaLabelText:t("blockedPatronCloseModalAriaLabelText"),screenReaderModalDescriptionText:t("blockedPatronModalAriaDescriptionText")},react.createElement("div",{className:"modal-text__container"},react.createElement("h2",{className:"text-header-h3"},t(`blockedPatron${blockedStatus}TitleText`)),react.createElement("p",{className:"mt-48 mb-48 text-body-large"},t(`blockedPatron${blockedStatus}BodyText`)),blockedStatus===types_BlockedTypes.fee&&react.createElement(Link.Z,{href:blockedPatronELinkUrl},t("blockedPatronELinkText"))))},blocked_modal_BlockedModal=BlockedModal;try{BlockedModal.displayName="BlockedModal",BlockedModal.__docgenInfo={description:"",displayName:"BlockedModal",props:{blockedStatus:{defaultValue:null,description:"",name:"blockedStatus",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/blocked-patron/blocked-modal/BlockedModal.tsx#BlockedModal"]={docgenInfo:BlockedModal.__docgenInfo,name:"BlockedModal",path:"src/components/blocked-patron/blocked-modal/BlockedModal.tsx#BlockedModal"})}catch(__react_docgen_typescript_loader_error){}var blockedModal_slice=__webpack_require__("./src/core/blockedModal.slice.ts"),store=__webpack_require__("./src/core/store.ts"),helpers_url=__webpack_require__("./src/core/utils/helpers/url.ts"),user=__webpack_require__("./src/core/utils/helpers/user.ts");const withIsPatronBlockedHoc=Component=>({redirectOnBlocked,...props})=>{const dispatch=(0,es.I0)(),{open}=(0,modal.f)(),{blockedModal}=(0,modal_helpers.GM)(),[blockedFromViewingContentArray]=(0,react.useState)([types_BlockedTypes.deceased,types_BlockedTypes.automatonBlocked,types_BlockedTypes.extendedExclusion,types_BlockedTypes.stolen]),[blockedStatus,setBlockedStatus]=(0,react.useState)(),[blockedFromViewingContent,setBlockedFromViewingContent]=(0,react.useState)(null),{data:patronData}=(0,user.dp)(),{data:{hasBeenVisible}}=(0,store.v9)((state=>state.blockedModal));return(0,react.useEffect)((()=>{var _patronData$patron,_patronData$patron2,_patronData$patron2$b;patronData&&(null!=patronData&&null!==(_patronData$patron=patronData.patron)&&void 0!==_patronData$patron&&_patronData$patron.blockStatus&&(null==patronData||null===(_patronData$patron2=patronData.patron)||void 0===_patronData$patron2||null===(_patronData$patron2$b=_patronData$patron2.blockStatus)||void 0===_patronData$patron2$b?void 0:_patronData$patron2$b.length)>0?(setBlockedStatus(patronData.patron.blockStatus[0].blockedReason),hasBeenVisible||"string"!=typeof blockedModal||(open(blockedModal),dispatch((0,blockedModal_slice.Og)({hasBeenVisible:!0})))):setBlockedFromViewingContent(!1))}),[blockedModal,dispatch,hasBeenVisible,open,patronData]),(0,react.useEffect)((()=>{blockedStatus&&(blockedFromViewingContentArray.includes(blockedStatus)?(setBlockedFromViewingContent(!0),(0,helpers_url.gB)(new URL(redirectOnBlocked))):setBlockedFromViewingContent(!1))}),[blockedFromViewingContentArray,blockedStatus,redirectOnBlocked]),react.createElement(react.Fragment,null,react.createElement(blocked_modal_BlockedModal,{blockedStatus:blockedStatus||""}),!blockedFromViewingContent&&react.createElement(Component,props))},utils_withIsPatronBlockedHoc=withIsPatronBlockedHoc;try{withIsPatronBlockedHoc.displayName="withIsPatronBlockedHoc",withIsPatronBlockedHoc.__docgenInfo={description:"",displayName:"withIsPatronBlockedHoc",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/utils/withIsPatronBlockedHoc.tsx#withIsPatronBlockedHoc"]={docgenInfo:withIsPatronBlockedHoc.__docgenInfo,name:"withIsPatronBlockedHoc",path:"src/core/utils/withIsPatronBlockedHoc.tsx#withIsPatronBlockedHoc"})}catch(__react_docgen_typescript_loader_error){}},"./src/core/utils/withSuffix.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_store__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/core/store.ts");const __WEBPACK_DEFAULT_EXPORT__=(Component,suffix,reduxAction)=>props=>{const pattern=new RegExp(`.*${suffix}$`,"g"),suffixEntries=Object.fromEntries(Object.entries(props).filter((([prop])=>String(prop).match(pattern)))),nonSuffixEntries=Object.fromEntries(Object.entries(props).filter((([prop])=>!String(prop).match(pattern))));return Object.keys(suffixEntries).length&&_store__WEBPACK_IMPORTED_MODULE_1__.h.dispatch(reduxAction({entries:suffixEntries})),react__WEBPACK_IMPORTED_MODULE_0__.createElement(Component,nonSuffixEntries)}},"./storybook-init-framework-entry.js":(__unused_webpack_module,__unused_webpack___webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__("./node_modules/@storybook/react/dist/esm/client/index.js")},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js!./.storybook/dev-fonts.scss":(module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/css-loader/dist/runtime/sourceMaps.js"),_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__),_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js"),___CSS_LOADER_EXPORT___=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__)()(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default());___CSS_LOADER_EXPORT___.push([module.id,"body{font-family:system-ui,Segoe UI,Roboto,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol}","",{version:3,sources:["webpack://./.storybook/dev-fonts.scss%23sass","webpack://./.storybook/dev-fonts.scss"],names:[],mappings:"AAAA,KACE,iHCCF",sourcesContent:['body {\n font-family: system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif,\n "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";\n}\n','body {\n font-family: system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif,\n "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";\n}\n'],sourceRoot:""}]);const __WEBPACK_DEFAULT_EXPORT__=___CSS_LOADER_EXPORT___},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js!./src/components/components.scss":(module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/css-loader/dist/runtime/sourceMaps.js"),_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__),_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js"),___CSS_LOADER_EXPORT___=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__)()(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default());___CSS_LOADER_EXPORT___.push([module.id,".dpl-reset{clip:auto;animation:none 0s ease 0s 1 normal none running;backface-visibility:visible;background:#0000 none repeat 0 0/auto auto padding-box border-box scroll;border:none;border-collapse:initial;border-image:none;border-radius:0;border-spacing:0;bottom:auto;box-shadow:none;box-sizing:initial;caption-side:top;clear:none;color:#000;column-fill:balance;column-gap:normal;column-rule:medium none currentColor;column-span:1;columns:auto;content:normal;counter-increment:none;counter-reset:none;cursor:auto;direction:ltr;display:inline;empty-cells:show;float:none;font-family:inherit;font-size:inherit;font-stretch:inherit;font-style:inherit;font-variant:inherit;font-weight:inherit;hyphens:none;left:auto;letter-spacing:normal;line-height:inherit;list-style:disc none outside;margin:0;max-height:none;max-width:none;min-height:0;min-width:0;opacity:1;orphans:2;outline:medium none invert;overflow:visible;overflow-x:visible;overflow-y:visible;padding:0;page-break-after:auto;page-break-before:auto;page-break-inside:auto;perspective:none;perspective-origin:50% 50%;position:static;right:auto;tab-size:8;table-layout:auto;text-align:left;text-align-last:auto;text-decoration:none;text-indent:0;text-shadow:none;text-transform:none;top:auto;transform:none;transform-origin:initial;transform-style:flat;transition:none 0s ease 0s;unicode-bidi:normal;vertical-align:initial;visibility:visible;white-space:normal;widows:2;word-spacing:normal;z-index:auto}:root{--reach-dialog:1}[data-reach-dialog-overlay]{background:#00000054;bottom:0;left:0;overflow:auto;position:fixed;right:0;top:0}[data-reach-dialog-content]{background:#fff;margin:10vh auto;outline:none;padding:2rem;width:50vw}","",{version:3,sources:["webpack://./src/components/reset.scss","webpack://./src/components/components.scss","webpack://./node_modules/@reach/dialog/styles.css"],names:[],mappings:"AAGA,WAgBE,SAAA,CClBF,+CDGE,CAEA,2BAAA,CACA,wEAAA,CAEA,WAAA,CACA,uBAAA,CACA,iBAAA,CACA,eAAA,CACA,gBAAA,CACA,WAAA,CACA,eAAA,CACA,kBAAA,CACA,gBAAA,CACA,UAAA,CAEA,UAAA,CAGA,mBAAA,CACA,iBAAA,CACA,oCAAA,CACA,aAAA,CACA,YAAA,CACA,cAAA,CACA,sBAAA,CACA,kBAAA,CACA,WAAA,CACA,aAAA,CACA,cAAA,CACA,gBAAA,CACA,UAAA,CACA,mBAAA,CACA,iBAAA,CAIA,oBAAA,CAHA,kBAAA,CACA,oBAAA,CACA,mBAAA,CAKA,YAAA,CACA,SAAA,CACA,qBAAA,CALA,mBAAA,CAMA,4BAAA,CACA,QAAA,CACA,eAAA,CACA,cAAA,CACA,YAAA,CACA,WAAA,CACA,SAAA,CACA,SAAA,CACA,0BAAA,CACA,gBAAA,CACA,kBAAA,CACA,kBAAA,CACA,SAAA,CACA,qBAAA,CACA,sBAAA,CACA,sBAAA,CACA,gBAAA,CACA,0BAAA,CACA,eAAA,CACA,UAAA,CAEA,UAAA,CACA,iBAAA,CACA,eAAA,CACA,oBAAA,CACA,oBAAA,CACA,aAAA,CACA,gBAAA,CACA,mBAAA,CACA,QAAA,CACA,cAAA,CACA,wBAAA,CACA,oBAAA,CACA,0BAAA,CACA,mBAAA,CACA,sBAAA,CACA,kBAAA,CACA,kBAAA,CACA,QAAA,CACA,mBAAA,CACA,YCHF,CClFA,MACC,gBDuFD,CCpFA,4BACC,oBAAA,CAIA,QAAA,CACA,MAAA,CACA,aAAA,CALA,cAAA,CAEA,OAAA,CADA,KD2FD,CCpFA,4BAGC,eAAA,CADA,gBAAA,CAGA,YAAA,CADA,YAAA,CAHA,UD2FD",sourcesContent:["// This is not to be extended!\n// When using it use it as a class on a DOM element.\n\n.dpl-reset {\n animation: none 0s ease 0s 1 normal none running;\n -webkit-backface-visibility: visible;\n backface-visibility: visible;\n background: transparent none repeat 0 0 / auto auto padding-box border-box\n scroll;\n border: medium none currentColor;\n border-collapse: separate;\n border-image: none;\n border-radius: 0;\n border-spacing: 0;\n bottom: auto;\n box-shadow: none;\n box-sizing: content-box;\n caption-side: top;\n clear: none;\n clip: auto;\n color: #000;\n columns: auto;\n column-count: auto;\n column-fill: balance;\n column-gap: normal;\n column-rule: medium none currentColor;\n column-span: 1;\n column-width: auto;\n content: normal;\n counter-increment: none;\n counter-reset: none;\n cursor: auto;\n direction: ltr;\n display: inline;\n empty-cells: show;\n float: none;\n font-family: inherit;\n font-size: inherit;\n font-style: inherit;\n font-variant: inherit;\n font-weight: inherit;\n font-stretch: inherit;\n line-height: inherit;\n -webkit-hyphens: none;\n -ms-hyphens: none;\n hyphens: none;\n left: auto;\n letter-spacing: normal;\n list-style: disc outside none;\n margin: 0;\n max-height: none;\n max-width: none;\n min-height: 0;\n min-width: 0;\n opacity: 1;\n orphans: 2;\n outline: medium none invert;\n overflow: visible;\n overflow-x: visible;\n overflow-y: visible;\n padding: 0;\n page-break-after: auto;\n page-break-before: auto;\n page-break-inside: auto;\n perspective: none;\n perspective-origin: 50% 50%;\n position: static;\n right: auto;\n -moz-tab-size: 8;\n tab-size: 8;\n table-layout: auto;\n text-align: left;\n text-align-last: auto;\n text-decoration: none;\n text-indent: 0;\n text-shadow: none;\n text-transform: none;\n top: auto;\n transform: none;\n transform-origin: 50% 50% 0;\n transform-style: flat;\n transition: none 0s ease 0s;\n unicode-bidi: normal;\n vertical-align: baseline;\n visibility: visible;\n white-space: normal;\n widows: 2;\n word-spacing: normal;\n z-index: auto;\n}\n",'@import "reset";\n@import "../../node_modules/@reach/dialog/styles";\n// Component specific styling should be included here:\n',"/* This code is subject to LICENSE in root of this repository */\n\n/* Used to detect in JavaScript if apps have loaded styles or not. */\n:root {\n\t--reach-dialog: 1;\n}\n\n[data-reach-dialog-overlay] {\n\tbackground: hsla(0, 0%, 0%, 0.33);\n\tposition: fixed;\n\ttop: 0;\n\tright: 0;\n\tbottom: 0;\n\tleft: 0;\n\toverflow: auto;\n}\n\n[data-reach-dialog-content] {\n\twidth: 50vw;\n\tmargin: 10vh auto;\n\tbackground: white;\n\tpadding: 2rem;\n\toutline: none;\n}\n"],sourceRoot:""}]);const __WEBPACK_DEFAULT_EXPORT__=___CSS_LOADER_EXPORT___},"./src sync recursive ^\\.(?:(?:^%7C\\/%7C(?:(?:(?%21(?:^%7C\\/)\\.).)*?)\\/)(?%21\\.)(?=.)[^/]*?\\.dev\\.(jsx%7Ctsx))$":(module,__unused_webpack_exports,__webpack_require__)=>{var map={"./apps/adgangsplatformen/auth.dev.jsx":"./src/apps/adgangsplatformen/auth.dev.jsx","./apps/adgangsplatformen/library-token.dev.tsx":"./src/apps/adgangsplatformen/library-token.dev.tsx","./apps/adgangsplatformen/user-token.dev.tsx":"./src/apps/adgangsplatformen/user-token.dev.tsx","./apps/advanced-search/AdvancedSearch.dev.tsx":"./src/apps/advanced-search/AdvancedSearch.dev.tsx","./apps/create-patron-user-info/CreatePatron.dev.tsx":"./src/apps/create-patron-user-info/CreatePatron.dev.tsx","./apps/dashboard/dashboard.dev.tsx":"./src/apps/dashboard/dashboard.dev.tsx","./apps/demo-modal/demo-modal.dev.tsx":"./src/apps/demo-modal/demo-modal.dev.tsx","./apps/favorites-list-material-component/FavoritesListMaterialComponent.dev.tsx":"./src/apps/favorites-list-material-component/FavoritesListMaterialComponent.dev.tsx","./apps/favorites-list/FavoritesList.dev.tsx":"./src/apps/favorites-list/FavoritesList.dev.tsx","./apps/fee-list/FeeList.dev.tsx":"./src/apps/fee-list/FeeList.dev.tsx","./apps/hello-world/hello-world.dev.tsx":"./src/apps/hello-world/hello-world.dev.tsx","./apps/loan-list/list/loan-list.dev.tsx":"./src/apps/loan-list/list/loan-list.dev.tsx","./apps/material/material.dev.tsx":"./src/apps/material/material.dev.tsx","./apps/menu/menu.dev.tsx":"./src/apps/menu/menu.dev.tsx","./apps/patron-page/PatronPage.dev.tsx":"./src/apps/patron-page/PatronPage.dev.tsx","./apps/recommender/Recommender.dev.tsx":"./src/apps/recommender/Recommender.dev.tsx","./apps/reservation-list/list/reservation-list.dev.tsx":"./src/apps/reservation-list/list/reservation-list.dev.tsx","./apps/search-header/search-header.dev.tsx":"./src/apps/search-header/search-header.dev.tsx","./apps/search-result/search-result.dev.tsx":"./src/apps/search-result/search-result.dev.tsx","./apps/something-similar/SomethingSimilar.dev.tsx":"./src/apps/something-similar/SomethingSimilar.dev.tsx","./components/alert/alert.dev.jsx":"./src/components/alert/alert.dev.jsx","./components/availability-label/availability-label.dev.tsx":"./src/components/availability-label/availability-label.dev.tsx","./components/button-favourite/button-favourite.dev.tsx":"./src/components/button-favourite/button-favourite.dev.tsx","./components/cover/cover.dev.tsx":"./src/components/cover/cover.dev.tsx","./components/find-on-shelf/FindOnShelfModal.dev.tsx":"./src/components/find-on-shelf/FindOnShelfModal.dev.tsx","./components/hello/hello.dev.tsx":"./src/components/hello/hello.dev.tsx","./components/message/modal-message/ModalMessage.dev.tsx":"./src/components/message/modal-message/ModalMessage.dev.tsx","./components/multiselect/Multiselect.dev.tsx":"./src/components/multiselect/Multiselect.dev.tsx","./components/search-bar/search-bar.dev.tsx":"./src/components/search-bar/search-bar.dev.tsx"};function webpackContext(req){var id=webpackContextResolve(req);return __webpack_require__(id)}function webpackContextResolve(req){if(!__webpack_require__.o(map,req)){var e=new Error("Cannot find module '"+req+"'");throw e.code="MODULE_NOT_FOUND",e}return map[req]}webpackContext.keys=function webpackContextKeys(){return Object.keys(map)},webpackContext.resolve=webpackContextResolve,module.exports=webpackContext,webpackContext.id="./src sync recursive ^\\.(?:(?:^%7C\\/%7C(?:(?:(?%21(?:^%7C\\/)\\.).)*?)\\/)(?%21\\.)(?=.)[^/]*?\\.dev\\.(jsx%7Ctsx))$"},'data:image/svg+xml;utf8, ':module=>{"use strict";module.exports='data:image/svg+xml;utf8, '},"?eecd":()=>{},"?4f7e":()=>{},"?9140":()=>{},"?22b2":()=>{},"?ed3f":()=>{},"?1d7f":()=>{},"?2b08":()=>{},"./generated-stories-entry.cjs":(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";module=__webpack_require__.nmd(module),(0,__webpack_require__("./node_modules/@storybook/react/dist/esm/client/index.js").configure)([__webpack_require__("./src sync recursive ^\\.(?:(?:^%7C\\/%7C(?:(?:(?%21(?:^%7C\\/)\\.).)*?)\\/)(?%21\\.)(?=.)[^/]*?\\.dev\\.(jsx%7Ctsx))$")],module,!1)},"./src/core/configuration/date-format.json":module=>{"use strict";module.exports=JSON.parse('{"d4":"DD. MM. YYYY","N1":"D. MMMM YYYY","d0":"YYYY-MM-DD"}')},"./src/core/configuration/modal-ids.json":module=>{"use strict";module.exports=JSON.parse('{"allLoansId":"all-loans-id","pauseReservation":"pause-reservation","deleteReservation":"delete-reservation","deleteReservations":"delete-reservations","loanDetails":"loan-details-","acceptModal":"accept-fee","reservationDetails":"reservation-details-","dueDateModal":"due-date","feeDetails":"fee-details-","userMenuAuthenticated":"user-modal-authenticated","userMenuAnonymous":"user-modal-anonymous","blockedModal":"blocked-modal","reservationsReady":"reservations-ready","reservationsQueued":"reservations-queued"}')}},__webpack_require__=>{var __webpack_exec__=moduleId=>__webpack_require__(__webpack_require__.s=moduleId);__webpack_require__.O(0,[748],(()=>(__webpack_exec__("./node_modules/@storybook/core-client/dist/esm/globals/polyfills.js"),__webpack_exec__("./node_modules/@storybook/core-client/dist/esm/globals/globals.js"),__webpack_exec__("./storybook-init-framework-entry.js"),__webpack_exec__("./node_modules/@storybook/react/dist/esm/client/docs/config-generated-config-entry.js"),__webpack_exec__("./node_modules/@storybook/react/dist/esm/client/preview/config-generated-config-entry.js"),__webpack_exec__("./node_modules/@storybook/addon-docs/preview.js-generated-config-entry.js"),__webpack_exec__("./node_modules/@storybook/addon-actions/preview.js-generated-config-entry.js"),__webpack_exec__("./node_modules/@storybook/addon-backgrounds/preview.js-generated-config-entry.js"),__webpack_exec__("./node_modules/@storybook/addon-measure/preview.js-generated-config-entry.js"),__webpack_exec__("./node_modules/@storybook/addon-outline/preview.js-generated-config-entry.js"),__webpack_exec__("./node_modules/@storybook/addon-queryparams/dist/esm/preset/addDecorator.js-generated-config-entry.js"),__webpack_exec__("./.storybook/preview.js-generated-config-entry.js"),__webpack_exec__("./generated-stories-entry.cjs"))));__webpack_require__.O()}]); \ No newline at end of file diff --git a/project.json b/project.json index 5fc87f8843..ddf55c6cd0 100644 --- a/project.json +++ b/project.json @@ -1 +1 @@ -{"generatedAt":1702968017068,"builder":{"name":"webpack5"},"hasCustomBabel":false,"hasCustomWebpack":false,"hasStaticDirs":false,"hasStorybookEslint":false,"refCount":0,"packageManager":{"type":"yarn","version":"1.22.21"},"typescriptOptions":{"check":true,"checkOptions":{},"reactDocgen":"react-docgen-typescript","reactDocgenTypescriptOptions":{"shouldExtractLiteralValuesFromEnum":true}},"storybookVersion":"^6.5.0-beta.7","language":"typescript","storybookPackages":{"@storybook/builder-webpack5":{"version":"6.5.0-beta.7"},"@storybook/manager-webpack5":{"version":"6.5.0-beta.7"},"@storybook/react":{"version":"6.5.0-beta.7"}},"framework":{"name":"react"},"addons":{"@storybook/addon-essentials":{"version":"6.5.10"},"@storybook/addon-queryparams":{"version":"6.2.9"},"@storybook/preset-typescript":{"version":"3.0.0"},"@storybook/addon-postcss":{"options":{"postcssLoaderOptions":{}},"version":"2.0.0"}}} +{"generatedAt":1702968042010,"builder":{"name":"webpack5"},"hasCustomBabel":false,"hasCustomWebpack":false,"hasStaticDirs":false,"hasStorybookEslint":false,"refCount":0,"packageManager":{"type":"yarn","version":"1.22.21"},"typescriptOptions":{"check":true,"checkOptions":{},"reactDocgen":"react-docgen-typescript","reactDocgenTypescriptOptions":{"shouldExtractLiteralValuesFromEnum":true}},"storybookVersion":"^6.5.0-beta.7","language":"typescript","storybookPackages":{"@storybook/builder-webpack5":{"version":"6.5.0-beta.7"},"@storybook/manager-webpack5":{"version":"6.5.0-beta.7"},"@storybook/react":{"version":"6.5.0-beta.7"}},"framework":{"name":"react"},"addons":{"@storybook/addon-essentials":{"version":"6.5.10"},"@storybook/addon-queryparams":{"version":"6.2.9"},"@storybook/preset-typescript":{"version":"3.0.0"},"@storybook/addon-postcss":{"options":{"postcssLoaderOptions":{}},"version":"2.0.0"}}}