@postnord/pn-marketweb-components 2.7.0 → 2.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/{FetchHelper-f6a2cff4.js → FetchHelper-e2a3b779.js} +24 -24
- package/cjs/{data-5de56280.js → data-86e43c6a.js} +3 -3
- package/cjs/pn-address-autofill.cjs.entry.js +1 -1
- package/cjs/pn-find-price-result.cjs.entry.js +1 -1
- package/cjs/pn-find-price.cjs.entry.js +1 -1
- package/cjs/pn-find-service-and-price.cjs.entry.js +1 -1
- package/cjs/pn-language-selector_9.cjs.entry.js +1 -1
- package/cjs/pn-marketweb-sitefooter.cjs.entry.js +1 -1
- package/cjs/pn-marketweb-siteheader.cjs.entry.js +1 -1
- package/cjs/pn-product-pricelist.cjs.entry.js +1 -1
- package/cjs/pn-proxio-findprice.cjs.entry.js +1 -1
- package/cjs/pn-proxio-pricegroup.cjs.entry.js +1 -1
- package/collection/components/cards/pn-quote-card/pn-quote-card.stories.js +2 -2
- package/collection/components/cards/pn-teaser-card/pn-teaser-card.stories.js +2 -2
- package/collection/components/cta/pn-parcel-tracker/pn-parcel-tracker.stories.js +3 -3
- package/collection/components/data-visualization/pn-stats-info/pn-stats-info.stories.js +6 -6
- package/collection/components/layout-components/pn-marketweb-sitefooter/pn-marketweb-sitefooter.stories.js +5 -5
- package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-search.css +1 -1
- package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader.stories.js +10 -10
- package/collection/components/navigation/pn-mainnav/pn-main-nav-mockdata.js +574 -574
- package/collection/components/widgets/pn-find-price/data.js +4 -4
- package/collection/components/widgets/pn-find-service-and-price/find-service-and-price.stories.js +1 -1
- package/collection/components/widgets/pn-find-service-and-price/pn-find-service-and-price.js +2 -2
- package/collection/components/widgets/pn-product-pricelist/data.js +1 -1
- package/collection/components/widgets/pn-product-pricelist/pn-product-pricelist.js +2 -2
- package/collection/components/widgets/pn-product-pricelist/pn-product-pricelist.stories.js +1 -1
- package/collection/components/widgets/pn-proxio-findprice/data.js +3 -3
- package/collection/globals/MarketWebContextService.js +24 -24
- package/components/FetchHelper.js +24 -24
- package/components/pn-find-price-result2.js +3 -3
- package/components/pn-find-service-and-price.js +1 -1
- package/components/pn-marketweb-siteheader-search2.js +1 -1
- package/components/pn-product-pricelist.js +1 -1
- package/esm/{FetchHelper-eb0357e9.js → FetchHelper-90e30133.js} +24 -24
- package/esm/{data-82a26ab4.js → data-b2909ec8.js} +3 -3
- package/esm/pn-address-autofill.entry.js +1 -1
- package/esm/pn-find-price-result.entry.js +1 -1
- package/esm/pn-find-price.entry.js +1 -1
- package/esm/pn-find-service-and-price.entry.js +1 -1
- package/esm/pn-language-selector_9.entry.js +1 -1
- package/esm/pn-marketweb-sitefooter.entry.js +1 -1
- package/esm/pn-marketweb-siteheader.entry.js +1 -1
- package/esm/pn-product-pricelist.entry.js +1 -1
- package/esm/pn-proxio-findprice.entry.js +1 -1
- package/esm/pn-proxio-pricegroup.entry.js +1 -1
- package/esm-es5/FetchHelper-90e30133.js +1 -0
- package/esm-es5/{data-82a26ab4.js → data-b2909ec8.js} +1 -1
- package/esm-es5/pn-address-autofill.entry.js +1 -1
- package/esm-es5/pn-find-price-result.entry.js +1 -1
- package/esm-es5/pn-find-price.entry.js +1 -1
- package/esm-es5/pn-find-service-and-price.entry.js +1 -1
- package/esm-es5/pn-language-selector_9.entry.js +1 -1
- package/esm-es5/pn-marketweb-sitefooter.entry.js +1 -1
- package/esm-es5/pn-marketweb-siteheader.entry.js +1 -1
- package/esm-es5/pn-product-pricelist.entry.js +1 -1
- package/esm-es5/pn-proxio-findprice.entry.js +1 -1
- package/esm-es5/pn-proxio-pricegroup.entry.js +1 -1
- package/package.json +1 -1
- package/pn-market-web-components/{p-72ed65c3.js → p-0fe7d566.js} +1 -1
- package/pn-market-web-components/{p-a84cf081.entry.js → p-2974d1e2.entry.js} +1 -1
- package/pn-market-web-components/{p-4dd222be.system.entry.js → p-2c448c7e.system.entry.js} +1 -1
- package/pn-market-web-components/{p-517692db.entry.js → p-2c790fc8.entry.js} +1 -1
- package/pn-market-web-components/{p-3b4c1957.system.entry.js → p-3f97df73.system.entry.js} +1 -1
- package/pn-market-web-components/p-4b710959.entry.js +1 -0
- package/pn-market-web-components/{p-25e531e2.entry.js → p-4bf57a22.entry.js} +1 -1
- package/pn-market-web-components/{p-fd1d6d1f.system.entry.js → p-517602ef.system.entry.js} +1 -1
- package/pn-market-web-components/{p-9fbb1a52.system.entry.js → p-54ffd368.system.entry.js} +1 -1
- package/pn-market-web-components/p-602484e1.system.js +1 -0
- package/pn-market-web-components/p-67f5cd23.entry.js +1 -0
- package/pn-market-web-components/{p-42630ad8.system.entry.js → p-7587b935.system.entry.js} +1 -1
- package/pn-market-web-components/{p-5d2ef297.system.entry.js → p-75e56082.system.entry.js} +1 -1
- package/pn-market-web-components/{p-5685ac83.entry.js → p-7961f8f3.entry.js} +1 -1
- package/pn-market-web-components/{p-f8ad020c.system.entry.js → p-90d2f560.system.entry.js} +1 -1
- package/pn-market-web-components/{p-04f5fdcd.system.entry.js → p-936eab9c.system.entry.js} +1 -1
- package/pn-market-web-components/{p-d04e241e.system.js → p-9ad4e291.system.js} +1 -1
- package/pn-market-web-components/{p-b75c4de5.entry.js → p-9c477df8.entry.js} +1 -1
- package/pn-market-web-components/{p-2c1a9293.entry.js → p-9f856003.entry.js} +1 -1
- package/pn-market-web-components/p-a28fce54.system.js +1 -1
- package/pn-market-web-components/p-dbfeae15.js +1 -0
- package/pn-market-web-components/{p-d5c43a05.system.entry.js → p-e505ebd8.system.entry.js} +1 -1
- package/pn-market-web-components/{p-1fdcbca3.system.entry.js → p-e9d7d7af.system.entry.js} +1 -1
- package/pn-market-web-components/{p-4f237552.entry.js → p-f91cee83.entry.js} +1 -1
- package/pn-market-web-components/{p-e261ccbf.entry.js → p-fedeefd9.entry.js} +1 -1
- package/pn-market-web-components/pn-market-web-components.esm.js +1 -1
- package/umd/pn-marketweb-init.js +1 -1
- package/umd/pn-marketweb-salesforce.js +2 -2
- package/esm-es5/FetchHelper-eb0357e9.js +0 -1
- package/pn-market-web-components/p-214cd6a4.entry.js +0 -1
- package/pn-market-web-components/p-6a71dc95.entry.js +0 -1
- package/pn-market-web-components/p-7f52f032.system.js +0 -1
- package/pn-market-web-components/p-aa2c8f12.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as e,N as t,w as n,p as a,H as o,b as r}from"./p-d0e65d70.js";export{s as setNonce}from"./p-d0e65d70.js";const i=e=>{const t=e.cloneNode;e.cloneNode=function(e){if("TEMPLATE"===this.nodeName)return t.call(this,e);const n=t.call(this,!1),a=this.childNodes;if(e)for(let t=0;t<a.length;t++)2!==a[t].nodeType&&n.appendChild(a[t].cloneNode(!0));return n}};(()=>{i(o.prototype);const r=Array.from(e.querySelectorAll("script")).find((e=>new RegExp(`/${t}(\\.esm)?\\.js($|\\?|#)`).test(e.src)||e.getAttribute("data-stencil-namespace")===t)),l={};return"onbeforeload"in r&&!history.scrollRestoration?{then(){}}:(l.resourcesUrl=new URL(".",new URL(r.getAttribute("data-resources-url")||r.src,n.location.href)).href,a(l))})().then((e=>r(JSON.parse('[["p-5685ac83",[[4,"pn-marketweb-siteheader",{"market":[1537],"language":[1537],"siteid":[1],"environment":[1537],"userToken":[1,"user-token"],"userFullname":[1,"user-fullname"],"userLoggedin":[516,"user-loggedin"],"endpoint":[1],"hideSiteSelector":[1540,"hide-site-selector"],"hideHomeMenuItem":[1540,"hide-home-menu-item"],"hideLanguageSelector":[1540,"hide-language-selector"],"hideSearch":[1540,"hide-search"],"hideLogin":[1540,"hide-login"],"showProfileSelection":[1540,"show-profile-selection"],"showUnifiedLogin":[4,"show-unified-login"],"siteDomainInUrls":[4,"site-domain-in-urls"],"AutocompleteEndpoint":[1,"autocomplete-endpoint"],"sessionForward":[4,"session-forward"],"cache":[4],"searchPlaceholder":[1,"search-placeholder"],"spaMode":[4,"spa-mode"],"checkUserLoggedInStateInterval":[2,"check-user-logged-in-state-interval"],"pageId":[1,"page-id"],"i18n":[32],"gotData":[32],"fetchingData":[32],"homePageLink":[32],"menuItems":[32],"siteDefinition":[32],"search":[32],"siteSelector":[32],"languageSelector":[32],"languageOptions":[32],"loginDialog":[32],"minimizeSearch":[32],"loggedIn":[32]},[[0,"setLanguage","onLanguageSelectorChange"],[0,"loginStateChange","onLoginStateChange"],[9,"resize","handleResize"]]]]],["p-2c1a9293",[[0,"pn-proxio-findprice",{"endpoint":[1025],"language":[1025],"market":[1025],"showMedium":[4,"show-medium"],"showInternational":[4,"show-international"],"maxAbroadKg":[2,"max-abroad-kg"],"weightListName":[1,"weight-list-name"],"cache":[4],"filteredItems":[32],"weight":[32],"weightvalue":[32],"countrycodevalue":[32],"sizecategory":[32],"data":[32]}]]],["p-a84cf081",[[0,"pn-find-price",{"source":[1],"language":[1025],"market":[1025],"filteredItems":[32],"weight":[32],"weightvalue":[32],"sourceData":[32],"sizecategory":[32]}]]],["p-6a71dc95",[[0,"pn-find-service-and-price",{"source":[1],"language":[1025],"market":[1025],"filteredItems":[32],"postagetype":[32],"weight":[32],"weightvalue":[32],"deliveryscope":[32],"sourceData":[32]}]]],["p-214cd6a4",[[4,"pn-product-pricelist",{"source":[1],"language":[1025],"market":[1025],"productid":[1],"filteredItems":[32],"sourceData":[32],"gotData":[32],"loading":[32],"postagetype":[32],"weight":[32],"weightvalue":[32]}]]],["p-e261ccbf",[[0,"pn-proxio-pricegroup",{"endpoint":[1025],"language":[1],"market":[1],"tariffid":[1],"cache":[4],"activeWeightIndex":[32],"data":[32],"i18n":[32]},[[0,"activeWeightIndex","setActiveWeightIndex"],[0,"language","setLanguage"]]]]],["p-ae453317",[[0,"pn-product-pricelist-result",{"item":[1040],"description":[16],"shownitems":[16],"showMeasurement":[4,"show-measurement"],"weightText":[32]}]]],["p-25e531e2",[[4,"pn-marketweb-sitefooter",{"market":[1537],"language":[1537],"environment":[1537],"endpoint":[1],"siteDomainInUrls":[4,"site-domain-in-urls"],"cache":[4],"theme":[513],"backgroundcolor":[513],"showSwan":[4,"show-swan"],"siteDefinition":[32],"footerContent":[32],"i18n":[32],"gotData":[32],"fetchingData":[32]}]]],["p-9cfde6aa",[[0,"pn-multi-row-connected-dropdown",{"dropdownData":[1,"dropdown-data"],"languageCode":[1,"language-code"],"label":[1],"firstDropdownLabel":[1,"first-dropdown-label"],"secondDropdownLabel":[1,"second-dropdown-label"],"dropdownPlaceholder":[1,"dropdown-placeholder"],"addRowText":[1,"add-row-text"],"inputFildLabel":[1,"input-fild-label"],"inputFildPlaceholder":[1,"input-fild-placeholder"],"dateButtonText":[1,"date-button-text"],"datePlaceholder":[1,"date-placeholder"],"dateDaysFromToday":[2,"date-days-from-today"],"allowMultipleRows":[4,"allow-multiple-rows"],"allowMultipleDates":[4,"allow-multiple-dates"],"startDateLabel":[1,"start-date-label"],"endDateLabel":[1,"end-date-label"],"multiDateHelperText":[1,"multi-date-helper-text"],"generateDatesButtonText":[1,"generate-dates-button-text"],"saveDateButtonText":[1,"save-date-button-text"],"noDatesText":[1,"no-dates-text"],"yearsToAddToEndDate":[2,"years-to-add-to-end-date"],"rowCount":[32],"rowData":[32],"formValues":[32]},[[0,"rowValueChange","predefinedValueChange"],[0,"deleteRowEvent","deleteRowEvent"]]]]],["p-ed9dd574",[[0,"pn-dropdown-with-multi-input-rows",{"dropdownData":[1,"dropdown-data"],"languageCode":[1,"language-code"],"firstDropdownLabel":[1,"first-dropdown-label"],"firstDropdownHelperText":[1,"first-dropdown-helper-text"],"secondDropdownLabel":[1,"second-dropdown-label"],"secondDropdownHelperText":[1,"second-dropdown-helper-text"],"secondDropdownMax":[2,"second-dropdown-max"],"deleteMultipleRowsWarningText":[1,"delete-multiple-rows-warning-text"],"confirmDeleteButtonText":[1,"confirm-delete-button-text"],"abortDeleteButtonText":[1,"abort-delete-button-text"],"fristInputLabel":[1,"frist-input-label"],"fristInputPlaceholder":[1,"frist-input-placeholder"],"firstInputMin":[2,"first-input-min"],"firstInputMax":[2,"first-input-max"],"firstInputWarning":[2,"first-input-warning"],"firstInputWarningText":[1,"first-input-warning-text"],"firstInputLowErrorText":[1,"first-input-low-error-text"],"firstInputHighErrorText":[1,"first-input-high-error-text"],"secondInputLabel":[1,"second-input-label"],"secondInputPlaceholder":[1,"second-input-placeholder"],"secondInputMin":[2,"second-input-min"],"secondInputMax":[2,"second-input-max"],"secondInputWarning":[2,"second-input-warning"],"secondInputWarningText":[1,"second-input-warning-text"],"secondInputLowErrorText":[1,"second-input-low-error-text"],"secondInputHighErrorText":[1,"second-input-high-error-text"],"dateLabel":[1,"date-label"],"datePlaceholder":[1,"date-placeholder"],"dateDaysFromToday":[2,"date-days-from-today"],"yearsToAddToEndDate":[2,"years-to-add-to-end-date"],"sumFieldLabel":[1,"sum-field-label"],"addRowText":[1,"add-row-text"],"elementHelperText":[1,"element-helper-text"],"dropdownDataRoot":[32],"secondDropdownArr":[32],"rowCount":[32],"rowData":[32],"formValues":[32],"firstValidDateString":[32],"lastValidDateString":[32],"rowSum":[32],"minRowCount":[32],"showDelteConfirm":[32]},[[0,"rowValueChange","predefinedValueChange"],[0,"firstInputChange","predefinedValueChange"],[0,"secondInputChange","predefinedValueChange"],[0,"deleteRowEvent","deleteRowEvent"]]]]],["p-0412e417",[[0,"pn-play-on-scroll",{"videoSrc":[1,"video-src"],"videoId":[32],"isManuallyPaused":[32],"isPaused":[32]}]]],["p-b75c4de5",[[0,"pn-address-autofill",{"market":[1537],"environment":[1537],"endpoint":[1],"cache":[4],"countryCode":[1,"country-code"],"postalCodeProps":[1,"postal-code-props"],"cityProps":[1,"city-props"],"streetAddressProps":[1,"street-address-props"],"streetNumberProps":[1,"street-number-props"],"streetAdressArr":[32],"streetNumberArr":[32],"city":[32],"postalCode":[32],"streetAddress":[32],"streetNumber":[32],"fullAddress":[32]}]]],["p-03cc4a3b",[[4,"pn-dropdown-choice-adds-row",{"dropdownData":[1,"dropdown-data"],"addRowDropdownName":[1,"add-row-dropdown-name"],"addRowDropdownPlaceholder":[1,"add-row-dropdown-placeholder"],"addRowDropdownLabel":[1,"add-row-dropdown-label"],"rowNameLabel":[1,"row-name-label"],"rowHasDropdown":[4,"row-has-dropdown"],"rowDropdownLabel":[1,"row-dropdown-label"],"rowDropdownPlaceholder":[1,"row-dropdown-placeholder"],"rowInputLabel":[1,"row-input-label"],"rowDeleteButtonText":[1,"row-delete-button-text"],"totalInputLimit":[2,"total-input-limit"],"inputLimitWarning":[1,"input-limit-warning"],"nextRowIndex":[32],"rowSelectDropdownArr":[32],"columnCount":[32],"showWarning":[32],"formValue":[32]}]]],["p-b8266eeb",[[0,"pn-multiple-input",{"label":[1],"placeholder":[1],"addRowButtonText":[1,"add-row-button-text"],"rowData":[32]}]]],["p-1998b5b1",[[0,"pn-parcel-tracker",{"formActionUrl":[1,"form-action-url"],"heading":[1],"buttonLabel":[1,"button-label"],"locale":[1],"placeholder":[1],"inputName":[1,"input-name"],"currentWidth":[32]},[[9,"resize","handleViewportSizeChange"]]]]],["p-335d95b7",[[0,"pn-pex-pricefinder",{"language":[1],"currency":[1],"apiUrl":[1,"api-url"],"i18n":[32],"fromzip":[32],"tozip":[32],"weight":[32],"when":[32],"response":[32]},[[0,"language","setLanguage"]]]]],["p-103c054e",[[0,"pn-share",{"link":[1],"language":[1537],"i18n":[32]}]]],["p-b407caff",[[4,"pn-stats-info",{"heading":[1],"dataArray":[1,"data-array"],"backgroundUrl":[1,"background-url"],"myParsedArray":[32]}]]],["p-cd8185a6",[[4,"pn-animated-tile",{"toggled":[32],"transitionClassName":[32],"animateIcon":[32]}]]],["p-8c7787eb",[[0,"pn-app-banner",{"appName":[1,"app-name"],"appDescription":[1,"app-description"],"ctaText":[1,"cta-text"],"appleStoreLink":[1,"apple-store-link"],"googleStoreLink":[1,"google-store-link"],"isClosed":[32],"storeLink":[32],"isLocalStorageAvailable":[32]}]]],["p-5e61eb13",[[4,"pn-bonus-progressbar",{"icon":[1],"heading":[1],"sumtext":[513],"theme":[513],"bonuspercentage":[1],"currency":[513],"value":[1538],"min":[1538],"max":[1538],"valuepercentage":[32],"progresspercentage":[32],"levelValues":[32],"currentLevelAdjustedValue":[32]}]]],["p-fba12f1d",[[0,"pn-bonus-progressbar-level",{"current":[516],"value":[1538],"bonuspercentage":[1537],"visualpercentage":[1538],"percentage":[32],"max":[32],"min":[32],"currency":[32]}]]],["p-15fd32d4",[[0,"pn-breakpoints",{"breakPointClass":[1,"break-point-class"],"currentWidth":[32]},[[9,"resize","handleViewportSizeChange"]]]]],["p-94e96fcf",[[0,"pn-chart",{"labels":[1],"dataSets":[1,"data-sets"],"dataChartType":[8,"data-chart-type"],"myChartCtxRef":[32]}]]],["p-c633a40e",[[4,"pn-charts-card",{"header":[1],"highlight":[1],"preamble":[1],"label":[1],"source":[1],"sourceUrl":[1,"source-url"],"ctaLinkText":[1,"cta-link-text"],"openInNewWindow":[4,"open-in-new-window"]}]]],["p-6d9f011f",[[4,"pn-cta-block",{"heading":[1],"bodyText":[1,"body-text"],"pnBackgroundColor":[1,"pn-background-color"],"isLarge":[4,"is-large"],"isCentered":[4,"is-centered"],"isSmall":[4,"is-small"],"contentTop":[4,"content-top"],"hasIllustrationSlot":[32],"hasButtonSlot":[32]}]]],["p-0a3aa74f",[[4,"pn-customernumber-selector",{"language":[1537],"open":[1540],"heading":[1],"description":[1],"i18n":[32]}]]],["p-eba15c54",[[4,"pn-customernumber-selector-option",{"heading":[1],"description":[1],"url":[1]}]]],["p-fc583d96",[[0,"pn-date-and-time",{"languageCode":[1,"language-code"],"dateAndTimeLabel":[1,"date-and-time-label"],"dateDaysFromToday":[2,"date-days-from-today"],"validTimeRangeMinutes":[2,"valid-time-range-minutes"],"errorMessage":[1,"error-message"],"dateHelperText":[1,"date-helper-text"],"timeHelperText":[1,"time-helper-text"],"disableWeekends":[4,"disable-weekends"],"datePlacehodler":[1,"date-placehodler"],"language":[32],"hourArr":[32],"minuteArr":[32],"formValue":[32],"invalidTimespan":[32],"selectedDate":[32],"selectedFromHour":[32],"selectedFromMin":[32],"selectedToHour":[32],"selectedToMin":[32],"firstValidDateString":[32],"lastValidDateString":[32]}]]],["p-63679401",[[0,"pn-line-shape"]]],["p-2ef39f23",[[4,"pn-link-list",{"heading":[1],"label":[1],"url":[1],"showMoreLabel":[1,"show-more-label"],"showMoreUrl":[1,"show-more-url"],"isDown":[32],"startX":[32],"scrollLeft":[32]},[[5,"mousedown","handleMouseDown"],[5,"mouseleave","handleMouseLeave"],[5,"mouseup","handleMouseUp"],[5,"mousemove","handleMouseMove"]]]]],["p-83d7a808",[[1,"pn-marketweb-search",{"disabled":[4],"placeholder":[1],"inputid":[1],"name":[1],"autocomplete":[1],"list":[1],"value":[1],"label":[1],"loading":[4],"button":[1],"light":[4],"suggestionObserver":[32],"hasClonedInput":[32],"listSuggestion":[32]},[[0,"input","inputHandler"]]]]],["p-42ea5bd1",[[4,"pn-multi-formfield",{"value":[1040],"formFieldClassName":[1,"form-field-class-name"],"formFieldOuterParentClassName":[1,"form-field-outer-parent-class-name"],"formRow":[32],"formValues":[32],"elementToCopy":[32],"fieldsPerRowCount":[32],"newRowStartIndex":[32],"originalLabelNames":[32]}]]],["p-26869f6d",[[4,"pn-product-tile"]]],["p-5840be2e",[[4,"pn-profile-modal",{"heading":[1],"continueCtaText":[1,"continue-cta-text"],"choosenCompanyText":[1,"choosen-company-text"],"toText":[1,"to-text"],"chooseCustomerNumberText":[1,"choose-customer-number-text"],"isLoading":[32]},[[0,"urlSelected","onUrlSelected"]]]]],["p-345648e8",[[4,"pn-profile-modal-customernumber",{"url":[513],"customernumber":[513],"selected":[516]}]]],["p-e2892448",[[4,"pn-profile-modal-profile",{"heading":[513],"description":[513],"url":[513],"selected":[1028],"showCustomerNumbers":[516,"show-customer-numbers"],"pleaseSelectText":[513,"please-select-text"],"visible":[1540],"identifier":[32]}]]],["p-6aaf35c7",[[4,"pn-profile-modal-type",{"typeid":[513],"name":[1025],"selected":[1028],"selectedprofile":[1025]}]]],["p-e62c4259",[[4,"pn-profile-selector",{"language":[1537],"returnUrl":[1,"return-url"],"heading":[1],"i18n":[32],"isLoading":[32],"numberOfProfiles":[32]}]]],["p-cd8ae615",[[0,"pn-profile-selector-option",{"heading":[1],"description":[1],"url":[1]}]]],["p-00d87476",[[4,"pn-quick-cta",{"heading":[1],"preamble":[1]}]]],["p-1e0fd641",[[4,"pn-quote-card",{"quote":[1],"name":[1],"occupation":[1]}]]],["p-865ee8f6",[[4,"pn-sidenav",{"language":[1],"navLabel":[1,"nav-label"],"i18n":[32]},[[0,"language","setLanguage"],[0,"openSubMenuLevelChange","onOpenSubMenuLevelChange"]]]]],["p-a53b3be1",[[4,"pn-sidenav-level",{"level":[32],"levelId":[32],"isOpen":[32],"parentName":[32],"parentHref":[32],"parentLinkId":[32],"alignment":[32]}]]],["p-fab635c7",[[4,"pn-sidenav-link",{"name":[1],"href":[1],"target":[1],"linkid":[1],"icon":[1],"current":[4],"levelId":[32],"open":[32],"hasChildren":[32]}]]],["p-2f4aa8c6",[[4,"pn-sidenav-togglebutton",{"label":[1],"i18n":[32]}]]],["p-9556936e",[[4,"pn-spotlight",{"heading":[1],"preamble":[1],"isDynamic":[4,"is-dynamic"],"addDynamic":[32]}]]],["p-7e6853a7",[[4,"pn-teaser-card",{"text":[1],"heading":[1],"label":[1],"dataCardColor":[513,"data-card-color"],"dataCardAlignment":[513,"data-card-alignment"],"hasCtaSlotContent":[32],"hasIllustrationSlot":[32]}]]],["p-2e6d5633",[[4,"pn-proxio-productcard"],[0,"pn-proxio-productcard-description",{"heading":[1],"highlight":[1],"description":[1],"list":[1040]}],[0,"pn-proxio-productcard-information",{"label":[1],"information":[16]}],[0,"pn-proxio-productcard-pricelink",{"price":[1],"vatText":[1,"vat-text"],"link":[1],"linktext":[1]}]]],["p-c3015b3f",[[0,"pn-proxio-findprice-result",{"item":[1040],"activeweight":[1026],"shownitems":[16],"Usp1":[1,"usp-1"],"Usp2":[1,"usp-2"],"Usp3":[1,"usp-3"],"description":[16],"showMeasurement":[4,"show-measurement"],"showInternational":[4,"show-international"],"selectedCountrycode":[1,"selected-countrycode"],"market":[1],"language":[1025],"weightText":[32],"linkId":[32],"shopLabel":[32],"shopUrl":[32],"shopId":[32],"i18n":[32]}]]],["p-666d2bfb",[[0,"pn-find-service-and-price-result",{"item":[1040],"shownitems":[16],"weightText":[32]}]]],["p-c6409b81",[[0,"pn-multi-row-connected-dropdown-row",{"dropdownData":[1,"dropdown-data"],"languageCode":[1,"language-code"],"label":[1],"firstDropdownLabel":[1,"first-dropdown-label"],"secondDropdownLabel":[1,"second-dropdown-label"],"dropdownPlaceholder":[1,"dropdown-placeholder"],"addRowText":[1,"add-row-text"],"inputFildLabel":[1,"input-fild-label"],"inputFildPlaceholder":[1,"input-fild-placeholder"],"dateButtonText":[1,"date-button-text"],"datePlaceholder":[1,"date-placeholder"],"dateDaysFromToday":[2,"date-days-from-today"],"allowMultipleDates":[4,"allow-multiple-dates"],"startDateLabel":[1,"start-date-label"],"endDateLabel":[1,"end-date-label"],"multiDateHelperText":[1,"multi-date-helper-text"],"generateDatesButtonText":[1,"generate-dates-button-text"],"saveDateButtonText":[1,"save-date-button-text"],"noDatesText":[1,"no-dates-text"],"index":[2],"predefinedValue":[1,"predefined-value"],"yearsToAddToEndDate":[2,"years-to-add-to-end-date"],"buttonsArray":[32],"firstDropdownArr":[32],"secondDropdownArr":[32],"firstDropdownClass":[32],"secondDropdownClass":[32],"firstValidDateString":[32],"lastValidDateString":[32],"firstDropdownPlaceholder":[32],"secondDropdownPlaceholder":[32],"starDateValue":[32],"endDateValue":[32],"generatedDatesArr":[32],"selectedButtonValue":[32],"inputFieldValue":[32],"dateValue":[32],"daysArr":[32]}]]],["p-6aab92c0",[[0,"pn-dropdown-with-multi-input-rows-row",{"languageCode":[1,"language-code"],"fristInputPlaceholder":[1,"frist-input-placeholder"],"firstInputMin":[2,"first-input-min"],"firstInputMax":[2,"first-input-max"],"firstInputWarning":[2,"first-input-warning"],"firstInputWarningText":[1,"first-input-warning-text"],"firstInputLowErrorText":[1,"first-input-low-error-text"],"firstInputHighErrorText":[1,"first-input-high-error-text"],"secondInputPlaceholder":[1,"second-input-placeholder"],"secondInputMin":[2,"second-input-min"],"secondInputMax":[2,"second-input-max"],"secondInputWarning":[2,"second-input-warning"],"secondInputWarningText":[1,"second-input-warning-text"],"secondInputLowErrorText":[1,"second-input-low-error-text"],"secondInputHighErrorText":[1,"second-input-high-error-text"],"dateLabel":[1,"date-label"],"datePlaceholder":[1,"date-placeholder"],"firstValidDate":[1,"first-valid-date"],"lastValidDate":[1,"last-valid-date"],"predefinedValue":[1,"predefined-value"],"rowIndex":[2,"row-index"],"minRowCount":[2,"min-row-count"],"showFirstInputWarning":[32],"showFirstInputLowError":[32],"showFirstInputHighError":[32],"showSecondInputWarning":[32],"showSecondInputLowError":[32],"showSecondInputHighError":[32],"firstInputValue":[32],"secondInputValue":[32],"dateValue":[32]}]]],["p-c1ec42a6",[[4,"pn-share-item",{"link":[1],"text":[1]}]]],["p-9d0074fb",[[0,"pn-stats-info-data",{"format":[1],"formatStyle":[1,"format-style"],"startValue":[2,"start-value"],"data":[2],"unit":[1],"preamble":[1],"duration":[2],"index":[2],"hasBeenShown":[32],"compId":[32]}]]],["p-4f237552",[[0,"pn-find-price-result",{"item":[1040],"shownitems":[16],"Usp1":[1,"usp-1"],"Usp2":[1,"usp-2"],"Usp3":[1,"usp-3"],"description":[16],"showMeasurement":[4,"show-measurement"],"weightText":[32],"linkId":[32],"shopLabel":[32],"shopUrl":[32],"shopId":[32]}]]],["p-b2fc3594",[[4,"pn-scroll",{"observerOptions":[16],"behaviourClasses":[1,"behaviour-classes"],"transitionDurationSeconds":[2,"transition-duration-seconds"],"shouldLoop":[4,"should-loop"],"intersectFunc":[16],"notIntersectFunc":[16],"compId":[32]}],[0,"pn-video-overlay",{"language":[1],"isPaused":[4,"is-paused"],"i18n":[32]}]]],["p-6125c132",[[1,"pn-filter-checkbox",{"value":[520],"name":[1],"checkboxid":[1],"disabled":[4],"checked":[4],"indeterminate":[1028]},[[0,"change","handlechange"]]]]],["p-64691d51",[[4,"pn-mainnav-link",{"name":[1],"href":[1],"target":[1],"linkid":[1],"levelId":[32],"open":[32],"hasChildren":[32]}]]],["p-4e73bb67",[[4,"pn-site-footer",{"url":[1],"linktitle":[1],"theme":[513]}],[4,"pn-site-footer-col",{"theme":[513]}],[0,"pn-swan",{"licenseNumber":[1,"license-number"],"language":[1537],"linkTo":[1,"link-to"],"i18n":[32]}]]],["p-81876fba",[[4,"pn-choice-button",{"value":[520],"name":[1],"choiceid":[1],"type":[1],"disabled":[4],"checked":[4],"indeterminate":[1028]},[[0,"change","handlechange"]]]]],["p-d6492b8a",[[0,"pn-product-tile-info",{"label":[1],"text":[1],"icon":[1]}],[0,"pn-product-tile-price",{"label":[1],"amount":[1],"currency":[1],"url":[1]}]]],["p-4572f290",[[0,"pn-marketweb-siteheader-login-linklist",{"heading":[1],"links":[16],"idNamespace":[1,"id-namespace"],"showUnifiedLogin":[4,"show-unified-login"]}]]],["p-eb42a545",[[4,"pn-titletag",{"icon":[1],"color":[1537]}]]],["p-3396f3c8",[[0,"pn-marketweb-siteheader-unified-login",{"loggedIn":[4,"logged-in"],"myPageLabel":[1,"my-page-label"],"myPageUrl":[1,"my-page-url"],"logInLabel":[1,"log-in-label"]}],[0,"pn-marketweb-siteheader-login-links",{"loginDialog":[1040],"idNamespace":[1,"id-namespace"],"loggedin":[516],"username":[1],"showUnifiedLogin":[4,"show-unified-login"]}],[0,"pn-marketweb-siteheader-login-profileselection",{"loginDialog":[1040],"endpoint":[1],"loggedin":[4],"idNamespace":[1,"id-namespace"],"heading":[1],"i18n":[16],"currentProfile":[1040],"profileoptions":[1040],"user":[32],"logoutLink":[32],"userName":[32],"userEmail":[32]}],[0,"pn-marketweb-siteheader-login-button",{"label":[1]}],[0,"pn-marketweb-siteheader-login-mypage-button",{"label":[1],"myPageUrl":[1,"my-page-url"]}]]],["p-517692db",[[0,"pn-marketweb-siteheader-login",{"endpoint":[1],"token":[1],"i18n":[16],"siteUrl":[1,"site-url"],"emitEvents":[4,"emit-events"],"loginDialog":[1040],"fullname":[1],"loggedin":[4],"showProfileSelection":[1028,"show-profile-selection"],"showUnifiedLogin":[4,"show-unified-login"],"checkUserLoggedInStateInterval":[2,"check-user-logged-in-state-interval"],"environment":[1],"loginLinks":[32],"toggleButtonText":[32],"username":[32]}],[4,"pn-mainnav-level",{"label":[1537],"level":[32],"levelId":[32],"isOpen":[32],"parentName":[32],"parentHref":[32],"parentLinkId":[32],"listCount":[32],"alignment":[32]}],[4,"pn-language-selector",{"value":[1537],"selectedLanguageName":[32],"options":[32],"i18n":[32]}],[0,"pn-language-selector-option",{"name":[1],"code":[1],"url":[1],"selected":[4],"currentLanguage":[1,"current-language"]}],[4,"pn-mainnav",{"market":[1],"language":[1],"navigationId":[1,"navigation-id"],"openMenu":[1028,"open-menu"],"navLabel":[1,"nav-label"]},[[0,"language","setLanguage"],[0,"market","setMarket"],[0,"menuLanguageChange","onLanguageChange"],[0,"setmenuopenstate","setMenuOpenState"],[0,"openMenuLevelChange","onOpenMenuLevelChange"]]],[4,"pn-mainnav-list",{"heading":[1],"linkCount":[32]}],[0,"pn-marketweb-siteheader-search",{"i18n":[8,"i-1-8n"],"showOnlyLink":[1028,"show-only-link"],"hideSearch":[1028,"hide-search"],"language":[1537],"siteid":[1],"search":[1040],"primary":[4],"icononly":[4],"autoCompleteOptions":[32]}],[4,"pn-site-selector",{"buttontext":[1537],"heading":[1537],"language":[1537],"i18n":[32]}],[0,"pn-site-selector-item",{"url":[1],"heading":[1],"description":[1],"newwindow":[4]}]]],["p-64048a03",[[0,"pn-marketweb-input",{"disabled":[4],"error":[1],"invalid":[4],"helpertext":[1],"label":[1],"placeholder":[1],"inputid":[1],"name":[1],"required":[4],"type":[1025],"autocomplete":[1],"valid":[4],"value":[1],"maxlength":[1],"min":[1],"max":[1],"step":[1],"pattern":[1],"showText":[32]}]]],["p-b6301b42",[[0,"pn-product-card-info",{"rulle":[1],"paket":[1],"label":[1],"text":[1]}],[0,"pn-product-card-price",{"label":[1],"amount":[1],"currency":[1],"note":[1],"url":[1],"service":[1],"linkid":[1]}],[4,"pn-product-card"]]]]'),e)));
|
|
1
|
+
import{d as e,N as t,w as n,p as a,H as o,b as r}from"./p-d0e65d70.js";export{s as setNonce}from"./p-d0e65d70.js";const i=e=>{const t=e.cloneNode;e.cloneNode=function(e){if("TEMPLATE"===this.nodeName)return t.call(this,e);const n=t.call(this,!1),a=this.childNodes;if(e)for(let t=0;t<a.length;t++)2!==a[t].nodeType&&n.appendChild(a[t].cloneNode(!0));return n}};(()=>{i(o.prototype);const r=Array.from(e.querySelectorAll("script")).find((e=>new RegExp(`/${t}(\\.esm)?\\.js($|\\?|#)`).test(e.src)||e.getAttribute("data-stencil-namespace")===t)),l={};return"onbeforeload"in r&&!history.scrollRestoration?{then(){}}:(l.resourcesUrl=new URL(".",new URL(r.getAttribute("data-resources-url")||r.src,n.location.href)).href,a(l))})().then((e=>r(JSON.parse('[["p-7961f8f3",[[4,"pn-marketweb-siteheader",{"market":[1537],"language":[1537],"siteid":[1],"environment":[1537],"userToken":[1,"user-token"],"userFullname":[1,"user-fullname"],"userLoggedin":[516,"user-loggedin"],"endpoint":[1],"hideSiteSelector":[1540,"hide-site-selector"],"hideHomeMenuItem":[1540,"hide-home-menu-item"],"hideLanguageSelector":[1540,"hide-language-selector"],"hideSearch":[1540,"hide-search"],"hideLogin":[1540,"hide-login"],"showProfileSelection":[1540,"show-profile-selection"],"showUnifiedLogin":[4,"show-unified-login"],"siteDomainInUrls":[4,"site-domain-in-urls"],"AutocompleteEndpoint":[1,"autocomplete-endpoint"],"sessionForward":[4,"session-forward"],"cache":[4],"searchPlaceholder":[1,"search-placeholder"],"spaMode":[4,"spa-mode"],"checkUserLoggedInStateInterval":[2,"check-user-logged-in-state-interval"],"pageId":[1,"page-id"],"i18n":[32],"gotData":[32],"fetchingData":[32],"homePageLink":[32],"menuItems":[32],"siteDefinition":[32],"search":[32],"siteSelector":[32],"languageSelector":[32],"languageOptions":[32],"loginDialog":[32],"minimizeSearch":[32],"loggedIn":[32]},[[0,"setLanguage","onLanguageSelectorChange"],[0,"loginStateChange","onLoginStateChange"],[9,"resize","handleResize"]]]]],["p-9f856003",[[0,"pn-proxio-findprice",{"endpoint":[1025],"language":[1025],"market":[1025],"showMedium":[4,"show-medium"],"showInternational":[4,"show-international"],"maxAbroadKg":[2,"max-abroad-kg"],"weightListName":[1,"weight-list-name"],"cache":[4],"filteredItems":[32],"weight":[32],"weightvalue":[32],"countrycodevalue":[32],"sizecategory":[32],"data":[32]}]]],["p-2974d1e2",[[0,"pn-find-price",{"source":[1],"language":[1025],"market":[1025],"filteredItems":[32],"weight":[32],"weightvalue":[32],"sourceData":[32],"sizecategory":[32]}]]],["p-67f5cd23",[[0,"pn-find-service-and-price",{"source":[1],"language":[1025],"market":[1025],"filteredItems":[32],"postagetype":[32],"weight":[32],"weightvalue":[32],"deliveryscope":[32],"sourceData":[32]}]]],["p-4b710959",[[4,"pn-product-pricelist",{"source":[1],"language":[1025],"market":[1025],"productid":[1],"filteredItems":[32],"sourceData":[32],"gotData":[32],"loading":[32],"postagetype":[32],"weight":[32],"weightvalue":[32]}]]],["p-fedeefd9",[[0,"pn-proxio-pricegroup",{"endpoint":[1025],"language":[1],"market":[1],"tariffid":[1],"cache":[4],"activeWeightIndex":[32],"data":[32],"i18n":[32]},[[0,"activeWeightIndex","setActiveWeightIndex"],[0,"language","setLanguage"]]]]],["p-ae453317",[[0,"pn-product-pricelist-result",{"item":[1040],"description":[16],"shownitems":[16],"showMeasurement":[4,"show-measurement"],"weightText":[32]}]]],["p-4bf57a22",[[4,"pn-marketweb-sitefooter",{"market":[1537],"language":[1537],"environment":[1537],"endpoint":[1],"siteDomainInUrls":[4,"site-domain-in-urls"],"cache":[4],"theme":[513],"backgroundcolor":[513],"showSwan":[4,"show-swan"],"siteDefinition":[32],"footerContent":[32],"i18n":[32],"gotData":[32],"fetchingData":[32]}]]],["p-9cfde6aa",[[0,"pn-multi-row-connected-dropdown",{"dropdownData":[1,"dropdown-data"],"languageCode":[1,"language-code"],"label":[1],"firstDropdownLabel":[1,"first-dropdown-label"],"secondDropdownLabel":[1,"second-dropdown-label"],"dropdownPlaceholder":[1,"dropdown-placeholder"],"addRowText":[1,"add-row-text"],"inputFildLabel":[1,"input-fild-label"],"inputFildPlaceholder":[1,"input-fild-placeholder"],"dateButtonText":[1,"date-button-text"],"datePlaceholder":[1,"date-placeholder"],"dateDaysFromToday":[2,"date-days-from-today"],"allowMultipleRows":[4,"allow-multiple-rows"],"allowMultipleDates":[4,"allow-multiple-dates"],"startDateLabel":[1,"start-date-label"],"endDateLabel":[1,"end-date-label"],"multiDateHelperText":[1,"multi-date-helper-text"],"generateDatesButtonText":[1,"generate-dates-button-text"],"saveDateButtonText":[1,"save-date-button-text"],"noDatesText":[1,"no-dates-text"],"yearsToAddToEndDate":[2,"years-to-add-to-end-date"],"rowCount":[32],"rowData":[32],"formValues":[32]},[[0,"rowValueChange","predefinedValueChange"],[0,"deleteRowEvent","deleteRowEvent"]]]]],["p-ed9dd574",[[0,"pn-dropdown-with-multi-input-rows",{"dropdownData":[1,"dropdown-data"],"languageCode":[1,"language-code"],"firstDropdownLabel":[1,"first-dropdown-label"],"firstDropdownHelperText":[1,"first-dropdown-helper-text"],"secondDropdownLabel":[1,"second-dropdown-label"],"secondDropdownHelperText":[1,"second-dropdown-helper-text"],"secondDropdownMax":[2,"second-dropdown-max"],"deleteMultipleRowsWarningText":[1,"delete-multiple-rows-warning-text"],"confirmDeleteButtonText":[1,"confirm-delete-button-text"],"abortDeleteButtonText":[1,"abort-delete-button-text"],"fristInputLabel":[1,"frist-input-label"],"fristInputPlaceholder":[1,"frist-input-placeholder"],"firstInputMin":[2,"first-input-min"],"firstInputMax":[2,"first-input-max"],"firstInputWarning":[2,"first-input-warning"],"firstInputWarningText":[1,"first-input-warning-text"],"firstInputLowErrorText":[1,"first-input-low-error-text"],"firstInputHighErrorText":[1,"first-input-high-error-text"],"secondInputLabel":[1,"second-input-label"],"secondInputPlaceholder":[1,"second-input-placeholder"],"secondInputMin":[2,"second-input-min"],"secondInputMax":[2,"second-input-max"],"secondInputWarning":[2,"second-input-warning"],"secondInputWarningText":[1,"second-input-warning-text"],"secondInputLowErrorText":[1,"second-input-low-error-text"],"secondInputHighErrorText":[1,"second-input-high-error-text"],"dateLabel":[1,"date-label"],"datePlaceholder":[1,"date-placeholder"],"dateDaysFromToday":[2,"date-days-from-today"],"yearsToAddToEndDate":[2,"years-to-add-to-end-date"],"sumFieldLabel":[1,"sum-field-label"],"addRowText":[1,"add-row-text"],"elementHelperText":[1,"element-helper-text"],"dropdownDataRoot":[32],"secondDropdownArr":[32],"rowCount":[32],"rowData":[32],"formValues":[32],"firstValidDateString":[32],"lastValidDateString":[32],"rowSum":[32],"minRowCount":[32],"showDelteConfirm":[32]},[[0,"rowValueChange","predefinedValueChange"],[0,"firstInputChange","predefinedValueChange"],[0,"secondInputChange","predefinedValueChange"],[0,"deleteRowEvent","deleteRowEvent"]]]]],["p-0412e417",[[0,"pn-play-on-scroll",{"videoSrc":[1,"video-src"],"videoId":[32],"isManuallyPaused":[32],"isPaused":[32]}]]],["p-9c477df8",[[0,"pn-address-autofill",{"market":[1537],"environment":[1537],"endpoint":[1],"cache":[4],"countryCode":[1,"country-code"],"postalCodeProps":[1,"postal-code-props"],"cityProps":[1,"city-props"],"streetAddressProps":[1,"street-address-props"],"streetNumberProps":[1,"street-number-props"],"streetAdressArr":[32],"streetNumberArr":[32],"city":[32],"postalCode":[32],"streetAddress":[32],"streetNumber":[32],"fullAddress":[32]}]]],["p-03cc4a3b",[[4,"pn-dropdown-choice-adds-row",{"dropdownData":[1,"dropdown-data"],"addRowDropdownName":[1,"add-row-dropdown-name"],"addRowDropdownPlaceholder":[1,"add-row-dropdown-placeholder"],"addRowDropdownLabel":[1,"add-row-dropdown-label"],"rowNameLabel":[1,"row-name-label"],"rowHasDropdown":[4,"row-has-dropdown"],"rowDropdownLabel":[1,"row-dropdown-label"],"rowDropdownPlaceholder":[1,"row-dropdown-placeholder"],"rowInputLabel":[1,"row-input-label"],"rowDeleteButtonText":[1,"row-delete-button-text"],"totalInputLimit":[2,"total-input-limit"],"inputLimitWarning":[1,"input-limit-warning"],"nextRowIndex":[32],"rowSelectDropdownArr":[32],"columnCount":[32],"showWarning":[32],"formValue":[32]}]]],["p-b8266eeb",[[0,"pn-multiple-input",{"label":[1],"placeholder":[1],"addRowButtonText":[1,"add-row-button-text"],"rowData":[32]}]]],["p-1998b5b1",[[0,"pn-parcel-tracker",{"formActionUrl":[1,"form-action-url"],"heading":[1],"buttonLabel":[1,"button-label"],"locale":[1],"placeholder":[1],"inputName":[1,"input-name"],"currentWidth":[32]},[[9,"resize","handleViewportSizeChange"]]]]],["p-335d95b7",[[0,"pn-pex-pricefinder",{"language":[1],"currency":[1],"apiUrl":[1,"api-url"],"i18n":[32],"fromzip":[32],"tozip":[32],"weight":[32],"when":[32],"response":[32]},[[0,"language","setLanguage"]]]]],["p-103c054e",[[0,"pn-share",{"link":[1],"language":[1537],"i18n":[32]}]]],["p-b407caff",[[4,"pn-stats-info",{"heading":[1],"dataArray":[1,"data-array"],"backgroundUrl":[1,"background-url"],"myParsedArray":[32]}]]],["p-cd8185a6",[[4,"pn-animated-tile",{"toggled":[32],"transitionClassName":[32],"animateIcon":[32]}]]],["p-8c7787eb",[[0,"pn-app-banner",{"appName":[1,"app-name"],"appDescription":[1,"app-description"],"ctaText":[1,"cta-text"],"appleStoreLink":[1,"apple-store-link"],"googleStoreLink":[1,"google-store-link"],"isClosed":[32],"storeLink":[32],"isLocalStorageAvailable":[32]}]]],["p-5e61eb13",[[4,"pn-bonus-progressbar",{"icon":[1],"heading":[1],"sumtext":[513],"theme":[513],"bonuspercentage":[1],"currency":[513],"value":[1538],"min":[1538],"max":[1538],"valuepercentage":[32],"progresspercentage":[32],"levelValues":[32],"currentLevelAdjustedValue":[32]}]]],["p-fba12f1d",[[0,"pn-bonus-progressbar-level",{"current":[516],"value":[1538],"bonuspercentage":[1537],"visualpercentage":[1538],"percentage":[32],"max":[32],"min":[32],"currency":[32]}]]],["p-15fd32d4",[[0,"pn-breakpoints",{"breakPointClass":[1,"break-point-class"],"currentWidth":[32]},[[9,"resize","handleViewportSizeChange"]]]]],["p-94e96fcf",[[0,"pn-chart",{"labels":[1],"dataSets":[1,"data-sets"],"dataChartType":[8,"data-chart-type"],"myChartCtxRef":[32]}]]],["p-c633a40e",[[4,"pn-charts-card",{"header":[1],"highlight":[1],"preamble":[1],"label":[1],"source":[1],"sourceUrl":[1,"source-url"],"ctaLinkText":[1,"cta-link-text"],"openInNewWindow":[4,"open-in-new-window"]}]]],["p-6d9f011f",[[4,"pn-cta-block",{"heading":[1],"bodyText":[1,"body-text"],"pnBackgroundColor":[1,"pn-background-color"],"isLarge":[4,"is-large"],"isCentered":[4,"is-centered"],"isSmall":[4,"is-small"],"contentTop":[4,"content-top"],"hasIllustrationSlot":[32],"hasButtonSlot":[32]}]]],["p-0a3aa74f",[[4,"pn-customernumber-selector",{"language":[1537],"open":[1540],"heading":[1],"description":[1],"i18n":[32]}]]],["p-eba15c54",[[4,"pn-customernumber-selector-option",{"heading":[1],"description":[1],"url":[1]}]]],["p-fc583d96",[[0,"pn-date-and-time",{"languageCode":[1,"language-code"],"dateAndTimeLabel":[1,"date-and-time-label"],"dateDaysFromToday":[2,"date-days-from-today"],"validTimeRangeMinutes":[2,"valid-time-range-minutes"],"errorMessage":[1,"error-message"],"dateHelperText":[1,"date-helper-text"],"timeHelperText":[1,"time-helper-text"],"disableWeekends":[4,"disable-weekends"],"datePlacehodler":[1,"date-placehodler"],"language":[32],"hourArr":[32],"minuteArr":[32],"formValue":[32],"invalidTimespan":[32],"selectedDate":[32],"selectedFromHour":[32],"selectedFromMin":[32],"selectedToHour":[32],"selectedToMin":[32],"firstValidDateString":[32],"lastValidDateString":[32]}]]],["p-63679401",[[0,"pn-line-shape"]]],["p-2ef39f23",[[4,"pn-link-list",{"heading":[1],"label":[1],"url":[1],"showMoreLabel":[1,"show-more-label"],"showMoreUrl":[1,"show-more-url"],"isDown":[32],"startX":[32],"scrollLeft":[32]},[[5,"mousedown","handleMouseDown"],[5,"mouseleave","handleMouseLeave"],[5,"mouseup","handleMouseUp"],[5,"mousemove","handleMouseMove"]]]]],["p-83d7a808",[[1,"pn-marketweb-search",{"disabled":[4],"placeholder":[1],"inputid":[1],"name":[1],"autocomplete":[1],"list":[1],"value":[1],"label":[1],"loading":[4],"button":[1],"light":[4],"suggestionObserver":[32],"hasClonedInput":[32],"listSuggestion":[32]},[[0,"input","inputHandler"]]]]],["p-42ea5bd1",[[4,"pn-multi-formfield",{"value":[1040],"formFieldClassName":[1,"form-field-class-name"],"formFieldOuterParentClassName":[1,"form-field-outer-parent-class-name"],"formRow":[32],"formValues":[32],"elementToCopy":[32],"fieldsPerRowCount":[32],"newRowStartIndex":[32],"originalLabelNames":[32]}]]],["p-26869f6d",[[4,"pn-product-tile"]]],["p-5840be2e",[[4,"pn-profile-modal",{"heading":[1],"continueCtaText":[1,"continue-cta-text"],"choosenCompanyText":[1,"choosen-company-text"],"toText":[1,"to-text"],"chooseCustomerNumberText":[1,"choose-customer-number-text"],"isLoading":[32]},[[0,"urlSelected","onUrlSelected"]]]]],["p-345648e8",[[4,"pn-profile-modal-customernumber",{"url":[513],"customernumber":[513],"selected":[516]}]]],["p-e2892448",[[4,"pn-profile-modal-profile",{"heading":[513],"description":[513],"url":[513],"selected":[1028],"showCustomerNumbers":[516,"show-customer-numbers"],"pleaseSelectText":[513,"please-select-text"],"visible":[1540],"identifier":[32]}]]],["p-6aaf35c7",[[4,"pn-profile-modal-type",{"typeid":[513],"name":[1025],"selected":[1028],"selectedprofile":[1025]}]]],["p-e62c4259",[[4,"pn-profile-selector",{"language":[1537],"returnUrl":[1,"return-url"],"heading":[1],"i18n":[32],"isLoading":[32],"numberOfProfiles":[32]}]]],["p-cd8ae615",[[0,"pn-profile-selector-option",{"heading":[1],"description":[1],"url":[1]}]]],["p-00d87476",[[4,"pn-quick-cta",{"heading":[1],"preamble":[1]}]]],["p-1e0fd641",[[4,"pn-quote-card",{"quote":[1],"name":[1],"occupation":[1]}]]],["p-865ee8f6",[[4,"pn-sidenav",{"language":[1],"navLabel":[1,"nav-label"],"i18n":[32]},[[0,"language","setLanguage"],[0,"openSubMenuLevelChange","onOpenSubMenuLevelChange"]]]]],["p-a53b3be1",[[4,"pn-sidenav-level",{"level":[32],"levelId":[32],"isOpen":[32],"parentName":[32],"parentHref":[32],"parentLinkId":[32],"alignment":[32]}]]],["p-fab635c7",[[4,"pn-sidenav-link",{"name":[1],"href":[1],"target":[1],"linkid":[1],"icon":[1],"current":[4],"levelId":[32],"open":[32],"hasChildren":[32]}]]],["p-2f4aa8c6",[[4,"pn-sidenav-togglebutton",{"label":[1],"i18n":[32]}]]],["p-9556936e",[[4,"pn-spotlight",{"heading":[1],"preamble":[1],"isDynamic":[4,"is-dynamic"],"addDynamic":[32]}]]],["p-7e6853a7",[[4,"pn-teaser-card",{"text":[1],"heading":[1],"label":[1],"dataCardColor":[513,"data-card-color"],"dataCardAlignment":[513,"data-card-alignment"],"hasCtaSlotContent":[32],"hasIllustrationSlot":[32]}]]],["p-2e6d5633",[[4,"pn-proxio-productcard"],[0,"pn-proxio-productcard-description",{"heading":[1],"highlight":[1],"description":[1],"list":[1040]}],[0,"pn-proxio-productcard-information",{"label":[1],"information":[16]}],[0,"pn-proxio-productcard-pricelink",{"price":[1],"vatText":[1,"vat-text"],"link":[1],"linktext":[1]}]]],["p-c3015b3f",[[0,"pn-proxio-findprice-result",{"item":[1040],"activeweight":[1026],"shownitems":[16],"Usp1":[1,"usp-1"],"Usp2":[1,"usp-2"],"Usp3":[1,"usp-3"],"description":[16],"showMeasurement":[4,"show-measurement"],"showInternational":[4,"show-international"],"selectedCountrycode":[1,"selected-countrycode"],"market":[1],"language":[1025],"weightText":[32],"linkId":[32],"shopLabel":[32],"shopUrl":[32],"shopId":[32],"i18n":[32]}]]],["p-666d2bfb",[[0,"pn-find-service-and-price-result",{"item":[1040],"shownitems":[16],"weightText":[32]}]]],["p-c6409b81",[[0,"pn-multi-row-connected-dropdown-row",{"dropdownData":[1,"dropdown-data"],"languageCode":[1,"language-code"],"label":[1],"firstDropdownLabel":[1,"first-dropdown-label"],"secondDropdownLabel":[1,"second-dropdown-label"],"dropdownPlaceholder":[1,"dropdown-placeholder"],"addRowText":[1,"add-row-text"],"inputFildLabel":[1,"input-fild-label"],"inputFildPlaceholder":[1,"input-fild-placeholder"],"dateButtonText":[1,"date-button-text"],"datePlaceholder":[1,"date-placeholder"],"dateDaysFromToday":[2,"date-days-from-today"],"allowMultipleDates":[4,"allow-multiple-dates"],"startDateLabel":[1,"start-date-label"],"endDateLabel":[1,"end-date-label"],"multiDateHelperText":[1,"multi-date-helper-text"],"generateDatesButtonText":[1,"generate-dates-button-text"],"saveDateButtonText":[1,"save-date-button-text"],"noDatesText":[1,"no-dates-text"],"index":[2],"predefinedValue":[1,"predefined-value"],"yearsToAddToEndDate":[2,"years-to-add-to-end-date"],"buttonsArray":[32],"firstDropdownArr":[32],"secondDropdownArr":[32],"firstDropdownClass":[32],"secondDropdownClass":[32],"firstValidDateString":[32],"lastValidDateString":[32],"firstDropdownPlaceholder":[32],"secondDropdownPlaceholder":[32],"starDateValue":[32],"endDateValue":[32],"generatedDatesArr":[32],"selectedButtonValue":[32],"inputFieldValue":[32],"dateValue":[32],"daysArr":[32]}]]],["p-6aab92c0",[[0,"pn-dropdown-with-multi-input-rows-row",{"languageCode":[1,"language-code"],"fristInputPlaceholder":[1,"frist-input-placeholder"],"firstInputMin":[2,"first-input-min"],"firstInputMax":[2,"first-input-max"],"firstInputWarning":[2,"first-input-warning"],"firstInputWarningText":[1,"first-input-warning-text"],"firstInputLowErrorText":[1,"first-input-low-error-text"],"firstInputHighErrorText":[1,"first-input-high-error-text"],"secondInputPlaceholder":[1,"second-input-placeholder"],"secondInputMin":[2,"second-input-min"],"secondInputMax":[2,"second-input-max"],"secondInputWarning":[2,"second-input-warning"],"secondInputWarningText":[1,"second-input-warning-text"],"secondInputLowErrorText":[1,"second-input-low-error-text"],"secondInputHighErrorText":[1,"second-input-high-error-text"],"dateLabel":[1,"date-label"],"datePlaceholder":[1,"date-placeholder"],"firstValidDate":[1,"first-valid-date"],"lastValidDate":[1,"last-valid-date"],"predefinedValue":[1,"predefined-value"],"rowIndex":[2,"row-index"],"minRowCount":[2,"min-row-count"],"showFirstInputWarning":[32],"showFirstInputLowError":[32],"showFirstInputHighError":[32],"showSecondInputWarning":[32],"showSecondInputLowError":[32],"showSecondInputHighError":[32],"firstInputValue":[32],"secondInputValue":[32],"dateValue":[32]}]]],["p-c1ec42a6",[[4,"pn-share-item",{"link":[1],"text":[1]}]]],["p-9d0074fb",[[0,"pn-stats-info-data",{"format":[1],"formatStyle":[1,"format-style"],"startValue":[2,"start-value"],"data":[2],"unit":[1],"preamble":[1],"duration":[2],"index":[2],"hasBeenShown":[32],"compId":[32]}]]],["p-f91cee83",[[0,"pn-find-price-result",{"item":[1040],"shownitems":[16],"Usp1":[1,"usp-1"],"Usp2":[1,"usp-2"],"Usp3":[1,"usp-3"],"description":[16],"showMeasurement":[4,"show-measurement"],"weightText":[32],"linkId":[32],"shopLabel":[32],"shopUrl":[32],"shopId":[32]}]]],["p-b2fc3594",[[4,"pn-scroll",{"observerOptions":[16],"behaviourClasses":[1,"behaviour-classes"],"transitionDurationSeconds":[2,"transition-duration-seconds"],"shouldLoop":[4,"should-loop"],"intersectFunc":[16],"notIntersectFunc":[16],"compId":[32]}],[0,"pn-video-overlay",{"language":[1],"isPaused":[4,"is-paused"],"i18n":[32]}]]],["p-6125c132",[[1,"pn-filter-checkbox",{"value":[520],"name":[1],"checkboxid":[1],"disabled":[4],"checked":[4],"indeterminate":[1028]},[[0,"change","handlechange"]]]]],["p-64691d51",[[4,"pn-mainnav-link",{"name":[1],"href":[1],"target":[1],"linkid":[1],"levelId":[32],"open":[32],"hasChildren":[32]}]]],["p-4e73bb67",[[4,"pn-site-footer",{"url":[1],"linktitle":[1],"theme":[513]}],[4,"pn-site-footer-col",{"theme":[513]}],[0,"pn-swan",{"licenseNumber":[1,"license-number"],"language":[1537],"linkTo":[1,"link-to"],"i18n":[32]}]]],["p-81876fba",[[4,"pn-choice-button",{"value":[520],"name":[1],"choiceid":[1],"type":[1],"disabled":[4],"checked":[4],"indeterminate":[1028]},[[0,"change","handlechange"]]]]],["p-d6492b8a",[[0,"pn-product-tile-info",{"label":[1],"text":[1],"icon":[1]}],[0,"pn-product-tile-price",{"label":[1],"amount":[1],"currency":[1],"url":[1]}]]],["p-4572f290",[[0,"pn-marketweb-siteheader-login-linklist",{"heading":[1],"links":[16],"idNamespace":[1,"id-namespace"],"showUnifiedLogin":[4,"show-unified-login"]}]]],["p-eb42a545",[[4,"pn-titletag",{"icon":[1],"color":[1537]}]]],["p-3396f3c8",[[0,"pn-marketweb-siteheader-unified-login",{"loggedIn":[4,"logged-in"],"myPageLabel":[1,"my-page-label"],"myPageUrl":[1,"my-page-url"],"logInLabel":[1,"log-in-label"]}],[0,"pn-marketweb-siteheader-login-links",{"loginDialog":[1040],"idNamespace":[1,"id-namespace"],"loggedin":[516],"username":[1],"showUnifiedLogin":[4,"show-unified-login"]}],[0,"pn-marketweb-siteheader-login-profileselection",{"loginDialog":[1040],"endpoint":[1],"loggedin":[4],"idNamespace":[1,"id-namespace"],"heading":[1],"i18n":[16],"currentProfile":[1040],"profileoptions":[1040],"user":[32],"logoutLink":[32],"userName":[32],"userEmail":[32]}],[0,"pn-marketweb-siteheader-login-button",{"label":[1]}],[0,"pn-marketweb-siteheader-login-mypage-button",{"label":[1],"myPageUrl":[1,"my-page-url"]}]]],["p-2c790fc8",[[0,"pn-marketweb-siteheader-login",{"endpoint":[1],"token":[1],"i18n":[16],"siteUrl":[1,"site-url"],"emitEvents":[4,"emit-events"],"loginDialog":[1040],"fullname":[1],"loggedin":[4],"showProfileSelection":[1028,"show-profile-selection"],"showUnifiedLogin":[4,"show-unified-login"],"checkUserLoggedInStateInterval":[2,"check-user-logged-in-state-interval"],"environment":[1],"loginLinks":[32],"toggleButtonText":[32],"username":[32]}],[4,"pn-mainnav-level",{"label":[1537],"level":[32],"levelId":[32],"isOpen":[32],"parentName":[32],"parentHref":[32],"parentLinkId":[32],"listCount":[32],"alignment":[32]}],[4,"pn-language-selector",{"value":[1537],"selectedLanguageName":[32],"options":[32],"i18n":[32]}],[0,"pn-language-selector-option",{"name":[1],"code":[1],"url":[1],"selected":[4],"currentLanguage":[1,"current-language"]}],[4,"pn-mainnav",{"market":[1],"language":[1],"navigationId":[1,"navigation-id"],"openMenu":[1028,"open-menu"],"navLabel":[1,"nav-label"]},[[0,"language","setLanguage"],[0,"market","setMarket"],[0,"menuLanguageChange","onLanguageChange"],[0,"setmenuopenstate","setMenuOpenState"],[0,"openMenuLevelChange","onOpenMenuLevelChange"]]],[4,"pn-mainnav-list",{"heading":[1],"linkCount":[32]}],[0,"pn-marketweb-siteheader-search",{"i18n":[8,"i-1-8n"],"showOnlyLink":[1028,"show-only-link"],"hideSearch":[1028,"hide-search"],"language":[1537],"siteid":[1],"search":[1040],"primary":[4],"icononly":[4],"autoCompleteOptions":[32]}],[4,"pn-site-selector",{"buttontext":[1537],"heading":[1537],"language":[1537],"i18n":[32]}],[0,"pn-site-selector-item",{"url":[1],"heading":[1],"description":[1],"newwindow":[4]}]]],["p-64048a03",[[0,"pn-marketweb-input",{"disabled":[4],"error":[1],"invalid":[4],"helpertext":[1],"label":[1],"placeholder":[1],"inputid":[1],"name":[1],"required":[4],"type":[1025],"autocomplete":[1],"valid":[4],"value":[1],"maxlength":[1],"min":[1],"max":[1],"step":[1],"pattern":[1],"showText":[32]}]]],["p-b6301b42",[[0,"pn-product-card-info",{"rulle":[1],"paket":[1],"label":[1],"text":[1]}],[0,"pn-product-card-price",{"label":[1],"amount":[1],"currency":[1],"note":[1],"url":[1],"service":[1],"linkid":[1]}],[4,"pn-product-card"]]]]'),e)));
|
package/umd/pn-marketweb-init.js
CHANGED
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
};
|
|
37
37
|
|
|
38
38
|
const s = document.createElement('script');
|
|
39
|
-
const currentMinorVersion = "2.
|
|
39
|
+
const currentMinorVersion = "2.8.0";
|
|
40
40
|
const requestedComponentVersion = (new URLSearchParams(window.location.search)).get("componentversion");
|
|
41
41
|
const versionToLoad = (requestedComponentVersion) ? requestedComponentVersion : currentMinorVersion;
|
|
42
42
|
const currentScriptTag = document.querySelector('script[src*="pn-marketweb-init.js"]');
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
document.body.insertBefore(header, document.body.firstElementChild);
|
|
25
25
|
document.body.appendChild(footer);
|
|
26
26
|
|
|
27
|
-
const currentMinorVersion = "2.
|
|
27
|
+
const currentMinorVersion = "2.8.0";
|
|
28
28
|
const requestedComponentVersion = new URLSearchParams(window.location.search).get("componentversion");
|
|
29
29
|
const versionToLoad = requestedComponentVersion ? requestedComponentVersion : currentMinorVersion;
|
|
30
30
|
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
if (lang.indexOf("en") !== -1) {
|
|
60
60
|
const rootUrl = window.location.href.indexOf("kundeservice-test.postnord.dk" !== -1)
|
|
61
61
|
? "https://www.postnord.dk"
|
|
62
|
-
: "https://dk-
|
|
62
|
+
: "https://dk-prep.postnord.com";
|
|
63
63
|
window.location.href = `${rootUrl}/en/help-and-support/private`;
|
|
64
64
|
}
|
|
65
65
|
// if (currentLanguageValue === lang) {
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(t,e,n,r){function o(t){return t instanceof n?t:new n((function(e){e(t)}))}return new(n||(n=Promise))((function(n,i){function a(t){try{u(r.next(t))}catch(e){i(e)}}function s(t){try{u(r["throw"](t))}catch(e){i(e)}}function u(t){t.done?n(t.value):o(t.value).then(a,s)}u((r=r.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var n={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,o,i,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(t){return function(e){return u([t,e])}}function u(s){if(r)throw new TypeError("Generator is already executing.");while(a&&(a=0,s[0]&&(n=0)),n)try{if(r=1,o&&(i=s[0]&2?o["return"]:s[0]?o["throw"]||((i=o["return"])&&i.call(o),0):o.next)&&!(i=i.call(o,s[1])).done)return i;if(o=0,i)s=[s[0]&2,i.value];switch(s[0]){case 0:case 1:i=s;break;case 4:n.label++;return{value:s[1],done:false};case 5:n.label++;o=s[1];s=[0];continue;case 7:s=n.ops.pop();n.trys.pop();continue;default:if(!(i=n.trys,i=i.length>0&&i[i.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){n.label=s[1];break}if(s[0]===6&&n.label<i[1]){n.label=i[1];i=s;break}if(i&&n.label<i[2]){n.label=i[2];n.ops.push(s);break}if(i[2])n.ops.pop();n.trys.pop();continue}s=e.call(t,n)}catch(u){s=[6,u];o=0}finally{r=i=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};var MarketWebContextService=function(){function t(t){if(t===void 0){t=window.location.href}this.href="";this.market="";this.language="";this.environment="";this.url=null;this.allowedLanguages=["sv","da","fi","no","en","de","zh","fr","es","it","nl"];this.allowedMarkets=["se","dk","fi","no","com","de","tpl"];this.wwwMarkets=["se","dk","fi","no","de","com"];this.developmentDomains=["localhost",".local","local.",".dev","dev."];this.markets={se:{fallbackLanguage:"sv",integration:"se-integration.postnord.com",preproduction:"se-preproduction.postnord.com",production:"se-production.postnord.com",live:"www.postnord.se"},dk:{fallbackLanguage:"da",integration:"dk-integration.postnord.com",preproduction:"dk-preproduction.postnord.com",production:"dk-production.postnord.com",live:"www.postnord.dk"},fi:{fallbackLanguage:"fi",integration:"fi-integration.postnord.com",preproduction:"fi-preproduction.postnord.com",production:"fi-production.postnord.com",live:"www.postnord.fi"},no:{fallbackLanguage:"no",integration:"no-integration.postnord.com",preproduction:"no-preproduction.postnord.com",production:"no-production.postnord.com",live:"www.postnord.no"},com:{fallbackLanguage:"en",integration:"com-integration.postnord.com",preproduction:"com-preproduction.postnord.com",production:"com-production.postnord.com",live:"www.postnord.com"},de:{fallbackLanguage:"en",integration:"de-integration.postnord.com",preproduction:"de-preproduction.postnord.com",production:"de-production.postnord.com",live:"www.postnord.de"},tpl:{fallbackLanguage:"sv",integration:"tpl-integration.postnord.com",preproduction:"tpl-preproduction.postnord.com",production:"tpl-production.postnord.com",live:"tpl.postnord.com"}};this.environmentTypes=["integration","preproduction","production"];this.environments={production:{name:"production",url:"https://www.postnord.xx/"},preproduction:{name:"preproduction",url:"https://com-preproduction.postnord.com/"},integration:{name:"integration",url:"https://com-integration.postnord.com/"}};this.href=t;this.url=new URL(this.href)}t.prototype.getLanguage=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:if(this.language){return[2,this.language]}return[4,this.resolveLanguage()];case 1:t.sent();return[2,this.language]}}))}))};t.prototype.getMarket=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:if(this.market){return[2,this.market]}return[4,this.resolveMarket()];case 1:t.sent();return[2,this.market]}}))}))};t.prototype.getEndpoint=function(t,e){if(e===void 0){e=""}return __awaiter(this,void 0,void 0,(function(){var n;return __generator(this,(function(r){n=this.environments.production.url;if(this.markets[e]&&this.markets[e][t]){if(t==="production"&&window.location.hostname.indexOf(this.markets[e]["live"])===0){return[2,"https://"+this.markets[e]["live"]]}if(window.location.hostname.indexOf(this.markets[e][t])===0){return[2,"https://"+this.markets[e][t]]}}if(this.environments[t]){n=this.environments[t].url;if(t===this.environments.production.name){if(this.wwwMarkets.indexOf(e)!==-1){n=n.replace(".xx","."+e)}else{n=n.replace(".xx",".com");n=n.replace("www.",e+".")}}}return[2,n]}))}))};t.prototype.getEnvironmentName=function(){return __awaiter(this,void 0,void 0,(function(){var t;var e=this;return __generator(this,(function(n){t=this.environmentTypes.filter((function(t){return e.url.hostname.indexOf("-"+t)!==-1}))[0];if(t){this.environment=t;return[2,this.environment]}if(this.url.hostname.indexOf("www.")!==-1){this.environment=this.environments.production.name;return[2,this.environment]}this.environment=this.environments.integration.name;return[2,this.environment]}))}))};t.prototype.isDevEnvironment=function(){var t=this;var e=this.developmentDomains.filter((function(e){return t.url.hostname.indexOf(e)!==-1}))[0];return e.length>0};t.prototype.resolveMarket=function(){return __awaiter(this,void 0,void 0,(function(){var t,e,n,r,o,i,a,s,u,c;var l=this;return __generator(this,(function(f){if(this.href.indexOf("//www.")!==-1){t=this.url.hostname.substring(this.url.hostname.lastIndexOf(".")+1,this.url.hostname.length);if(t&&this.markets[t]){this.market=t}else{console.warn("Unable to define market from www. domain",this.href)}}e=this.environmentTypes.filter((function(t){return l.url.hostname.indexOf("-"+t)!==-1}));if(!this.market&&e&&e.length>0){n=e[0];r=this.url.hostname.substring(0,this.url.hostname.indexOf("-"+n));if(r&&this.markets[r]){this.market=r}else{console.warn("Unable to define market from preset environment names",this.href)}}if(!this.market){if(this.url.hostname.indexOf("www")===-1&&this.url.hostname.indexOf(".postnord.")>0){o=this.url.hostname.indexOf(".")!==this.url.hostname.indexOf(".postnord")?this.url.hostname.indexOf("."):0;i=this.url.hostname.substring(o,this.url.hostname.indexOf(".postnord."));if(this.allowedMarkets.indexOf(i)!==-1){this.market=i;return[2]}}}if(!this.market){a=this.developmentDomains.filter((function(t){return l.url.hostname.indexOf(t)!==-1}))[0];if(!a){this.market=this.allowedMarkets[0];return[2]}s=this.href.replace(a,"");u=this.allowedMarkets.filter((function(t){var e=["."+t,t+".","/"+t+"/"];var n=e.filter((function(t){return s.indexOf(t)!==-1}));return n.length>0}))[0];if(u){this.market=u}else{c=Object.entries(this.markets).filter((function(t){var e=["."+t[1].fallbackLanguage,t[1].fallbackLanguage+".","/"+t[1].fallbackLanguage+"/"];var n=e.filter((function(t){return s.indexOf(t)!==-1}));return n.length>0}))[0];if(c&&c[0]){this.market=c[0]}}}if(!this.market){console.info("Was unable to detect market, used fallback");this.market=this.allowedMarkets[0]}return[2]}))}))};t.prototype.resolveLanguage=function(){return __awaiter(this,void 0,void 0,(function(){var t,e,n,r,o;var i=this;return __generator(this,(function(a){if(this.language){return[2]}o=[(t=document.querySelector("html[lang]"))===null||t===void 0?void 0:t.getAttribute("lang"),(e=document.querySelector('[http-equiv="content-language"][content]'))===null||e===void 0?void 0:e.getAttribute("content"),(n=document.querySelector('[property="og:locale"][content]'))===null||n===void 0?void 0:n.getAttribute("content"),(r=document.querySelector("[lang]"))===null||r===void 0?void 0:r.getAttribute("lang")];o.filter((function(t){return t})).forEach((function(t){if(i.allowedLanguages.indexOf(t)){i.language=t;return}}));if(!this.language&&this.market){this.language=this.markets[this.market].fallbackLanguage}return[2]}))}))};return t}();var FetchHelper=function(){function t(t){if(t===void 0){t=""}var e=this;this.storagePrefix="";this.store={get:function(t,n){if(n===void 0){n=false}var r=n?window.localStorage:window.sessionStorage;var o=n?window.sessionStorage:window.localStorage;var i=r.getItem("".concat(e.storagePrefix,"-").concat(t));if(!i){i=o.getItem("".concat(e.storagePrefix,"-").concat(t))}if(!i){return i}if(i.indexOf("{")===0){try{return JSON.parse(i)}catch(a){}}if(i.indexOf(",")!==-1){return i.split(",")}return i},set:function(t,n,r){if(r===void 0){r=false}var o=r?window.localStorage:window.sessionStorage;if(typeof n==="object"&&typeof n.length==="undefined"){o.setItem("".concat(e.storagePrefix,"-").concat(t),JSON.stringify(n));return}o.setItem("".concat(e.storagePrefix,"-").concat(t),n)},remove:function(t){window.sessionStorage.removeItem("".concat(e.storagePrefix,"-").concat(t))}};this.storagePrefix=t}t.prototype.fetchJson=function(t,e,n,r){if(e===void 0){e={}}if(n===void 0){n=false}if(r===void 0){r=null}return __awaiter(this,void 0,void 0,(function(){var o;var i=this;return __generator(this,(function(a){o=new Promise((function(o){return __awaiter(i,void 0,void 0,(function(){var i,a,s,u,c,l;return __generator(this,(function(f){switch(f.label){case 0:i=true;a=typeof t==="string"?t:t.url;s=a;u=null;c=null;if(n){c=this.store.get(s);if(c&&!c.permanent){i=false}if(c&&c.data){u=c.data;o(u)}}if(!i)return[3,3];return[4,window.fetch(t,e)];case 1:l=f.sent();return[4,l.json()];case 2:u=f.sent();o(u);if(n){if(typeof r==="function"&&c!=null){r(u)}this.store.set(s,this.wrapJson(u,true),true);this.store.set(s,this.wrapJson(u,false),false)}f.label=3;case 3:return[2]}}))}))}));return[2,o]}))}))};t.prototype.wrapJson=function(t,e){if(e===void 0){e=false}var n=new Date;return{timestamp:n.getTime(),time:n.toISOString(),data:t,permanent:e}};return t}();export{FetchHelper as F,MarketWebContextService as M};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,h as e,a as i}from"./p-d0e65d70.js";import{w as s}from"./p-fd0d5f6c.js";import{a as n}from"./p-bfe239ca.js";import{s as a}from"./p-746a2620.js";import"./p-814af281.js";import"./p-03d7d79b.js";const r={sv:{componentheading:"Våra priser och villkor för inrikesförsändelser för dig som direktbetalande kund?",deliveryscopeheading:"Endast leveranser inom Sverige",resultlistheading:"Några bra alternativ för dig",weightlabel:"Vikt",maxweightlabel:"Maxvikt",maxmeasurementlabel:"Maxvolym",senddirectcta:"Köp online",stampshopcta:"Köp frimärken",message:"*Vid köp hos valfritt ombud",servicePointHeader:"Eller hitta närmaste serviceställe",servicePointLink:"Sök serviceställe eller brevlåda"},en:{componentheading:"Our prices and terms and conditions for domestic shipments for you as a direct paying customer",deliveryscopeheading:"Deliveries within Sweden only",resultlistheading:"Some suitable options for you",weightlabel:"Weight",maxweightlabel:"Max weight",maxmeasurementlabel:"Maximum measurement",senddirectcta:"Buy Online",stampshopcta:"Buy Stamps",message:"When buying from any agent",servicePointHeader:"Or find nearest service point",servicePointLink:"Search letter-box or service point"},da:{componentheading:"Vad vill du skicka?",deliveryscopeheading:"Kun leveringer indenfor Sverige",resultlistheading:"Some suitable options for you",weightlabel:"Vægt",maxweightlabel:"Max vægt",maxmeasurementlabel:"Maks. Volumen",senddirectcta:"Buy shipping in Send Direct",stampshopcta:"Order home stamps from the webshop"},no:{componentheading:"Vad vill du skicka?",deliveryscopeheading:"Kun leveranser innen Sverige",resultlistheading:"Some suitable options for you",weightlabel:"Vekt",maxweightlabel:"Maks vekt",maxmeasurementlabel:"Maks volum",senddirectcta:"Buy shipping in Send Direct",stampshopcta:"Order home stamps from the webshop"},fi:{componentheading:"Vad vill du skicka?",deliveryscopeheading:"Toimitukset vain Ruotsin sisällä",resultlistheading:"Some suitable options for you",weightlabel:"Paino",maxweightlabel:"Max paino",maxmeasurementlabel:"Max äänenvoimakkuus",senddirectcta:"Buy shipping in Send Direct",stampshopcta:"Order home stamps from the webshop"}},o={se:{currency:"kr"},dk:{currency:"dk"},fi:{currency:" €"},no:{currency:"kr"}},l=class{constructor(e){t(this,e),this.source="https://com-integration.postnord.com/globalassets/global/prices/sv-findprice-1-PN.xlsx",this.language="sv",this.market="se",this.productid="",this.filteredItems=[],this.sourceData={types:[],data:[]},this.gotData=!1,this.loading=!1,this.postagetype={value:""},this.weight={value:0,name:""},this.weightvalue=0}componentWillLoad(){this.setState(),this.getDataSource().then((()=>{}))}setState(){this.market&&(a.market=o[this.market]),this.language&&r[this.language]&&(a.i18n=r[this.language])}async getDataSource(){if(!this.productid)return;this.loading=!0;const t=`?cache=${Math.floor(9999*Math.random()+1)}`,e=await fetch(this.source+t),i=await e.blob();try{const t=await n(i);this.sourceData=t,this.filterItems()}catch(s){this.loading=!1,console.warn("Unable to parse data")}}filterItems(){var t;if(!(null===(t=this.sourceData)||void 0===t?void 0:t.data))return void console.info("Data has not yet been loaded");this.loading=!1;const e=this.sourceData.data.filter((t=>t.id===this.productid));if(0===e.length)return;if(this.postagetype.value=e[0].what,!s[this.postagetype.value]||0===s[this.postagetype.value].length)return;0===this.weightvalue&&(this.weight=s[this.postagetype.value][0],this.weightvalue=this.weight.value);const i="kg"===this.weight.abbreviation.toLocaleLowerCase()&&"letter"===this.postagetype.value?1e3*this.weight.value:this.weight.value;let n=e.filter((t=>t.maxweight===i));if(0===n.length&&(n=e.filter((t=>t.maxweight>=i)),n.length>0)){const t=[...new Map(n.reverse().map((t=>[t.id,t]))).values()];t.length>0&&(n=t)}this.filteredItems=n,this.gotData=this.filteredItems.length>0}render(){return e(i,null,e("div",{class:"content"},e("slot",null)),this.loading?e("pn-spinner",null):null,this.postagetype.value&&s[this.postagetype.value]?e("div",{class:"weightselection"},e("div",{class:"weightoption"},e("div",{class:"weightoption-input"},e("pn-input",{inputid:"weightvalue",name:"weightvalue",type:"number",label:a.i18n.weightlabel,value:this.weightvalue,onChange:t=>{if(t&&t.target&&t.target.value){const e=parseInt(t.target.value,10);if(!isNaN(e)){let t=s[this.postagetype.value].filter((t=>("kg"===t.abbreviation?1e3*t.value:t.value)>=e));t&&t.length>0&&(this.weight=t[0],this.weightvalue=this.weight.value)}}}}),e("span",{class:"weightoption-input-abbreviation"},this.weight.abbreviation)),e("div",{class:"weightoption-range"},e("input",{type:"range",id:"weightrange",name:"weightrange",list:"weightlist",value:this.weight.value?s[this.postagetype.value].findIndex((t=>t.value===this.weightvalue)):0,onChange:t=>{this.weight=s[this.postagetype.value][t.target.value],this.weightvalue=this.weight.value},min:"0",max:s[this.postagetype.value].length-1}),e("datalist",{id:"weightlist"},s[this.postagetype.value].map(((t,i)=>{let n=t.name;return s[this.postagetype.value].length>6&&(n=i%5==0||0===i||i===s[this.postagetype.value].length-1?t.name:""),e("option",Object.assign({value:i},n?{label:n}:{}))})))))):null,e("div",{class:"resultlist","data-list-count":this.filteredItems.length},this.filteredItems.map((t=>e("div",null,e("pn-find-price-result",{item:t}))))))}static get watchers(){return{market:["setState"],language:["setState"],postagetype:["filterItems"],weightvalue:["filterItems"]}}};l.style='pn-product-pricelist pn-spinner{margin:1em auto}pn-product-pricelist h2,pn-product-pricelist .heading{text-align:center;font-size:1.5em;line-height:1.1;font-weight:bold;margin-bottom:1rem}pn-product-pricelist .content,pn-product-pricelist .weightselection,pn-product-pricelist .resultlist{max-width:50em;margin:0 auto 1.6rem}pn-product-pricelist .weightoption{display:-ms-flexbox;display:flex;gap:1.6rem}pn-product-pricelist .weightoption-input{width:5em;position:relative;display:none}pn-product-pricelist .weightoption-input input::-webkit-outer-spin-button,pn-product-pricelist .weightoption-input input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}pn-product-pricelist .weightoption-input-abbreviation{position:absolute;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);right:1.2em;margin-top:1.55rem;font-weight:500}pn-product-pricelist .weightoption-range{-ms-flex-positive:1;flex-grow:1;-ms-flex-item-align:end;align-self:flex-end;position:relative;top:0.5em}pn-product-pricelist .weightoption-range input{width:calc(100% - 1.5em)}pn-product-pricelist .weightoption-range datalist{width:100%;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;font-size:0.75em}pn-product-pricelist .resultlist:not([data-list-count="0"]){margin-top:2em}';export{l as pn_product_pricelist}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e,h as i}from"./p-d0e65d70.js";import{a as t}from"./p-bfe239ca.js";import{s as a}from"./p-6a230cb1.js";import"./p-814af281.js";import"./p-03d7d79b.js";const n={sv:{componentheading:"Vad vill du skicka?",deliveryscopeheading:"Hit eller dit?",sizeheading:"Hur mycket väger det?",resultlistheading:"Några utvalda val",weightlabel:"Vikt",maxweightlabel:"Maxvikt",maxmeasurementlabel:"Maxvolym",senddirectcta:"Köp frakt via Skicka Direkt",stampshopcta:"Köp frimärken via vår webshop"},en:{componentheading:"What do you want to send?",deliveryscopeheading:"Here or there?",sizeheading:"How much does it weigh?",resultlistheading:"Some suitable options for you",weightlabel:"Weight",maxweightlabel:"Max weight",maxmeasurementlabel:"Maximum measurement",senddirectcta:"Buy shipping in Send Direct",stampshopcta:"Order home stamps from the webshop"},da:{componentheading:"Vad vill du skicka?",deliveryscopeheading:"Here or there?",sizeheading:"How much does it weigh?",resultlistheading:"Some suitable options for you",weightlabel:"Vægt",maxweightlabel:"Max vægt",maxmeasurementlabel:"Maks. Volumen",senddirectcta:"Buy shipping in Send Direct",stampshopcta:"Order home stamps from the webshop"},no:{componentheading:"Vad vill du skicka?",deliveryscopeheading:"Here or there?",sizeheading:"How much does it weigh?",resultlistheading:"Some suitable options for you",weightlabel:"Vekt",maxweightlabel:"Maks vekt",maxmeasurementlabel:"Maks volum",senddirectcta:"Buy shipping in Send Direct",stampshopcta:"Order home stamps from the webshop"},fi:{componentheading:"Vad vill du skicka?",deliveryscopeheading:"Here or there?",sizeheading:"How much does it weigh?",resultlistheading:"Some suitable options for you",weightlabel:"Paino",maxweightlabel:"Max paino",maxmeasurementlabel:"Max äänenvoimakkuus",senddirectcta:"Buy shipping in Send Direct",stampshopcta:"Order home stamps from the webshop"}},s={se:{currency:"kr"},dk:{currency:"dk"},fi:{currency:" €"},no:{currency:"kr"}},r=[{name:"Brev",value:"letter",illustration:"letterbox-reply-letter-plants"},{name:"Paket",value:"parcel",illustration:"tracking"}],o={letter:[{name:"Sweden",value:"sweden",illustration:"letterboxes"},{name:"Abroad",value:"abroad",illustration:"character-box-letters-globe"}],parcel:[{name:"Sweden",value:"sweden",illustration:"letterboxes"},{name:"Within Europe",value:"withineurope",illustration:"character-box-letters-globe"},{name:"Outside Europe",value:"outsideeurope",illustration:"discover"}]},l={letter:[{name:"50g",abbreviation:"g",value:50},{name:"100g",abbreviation:"g",value:100},{name:"250g",abbreviation:"g",value:250},{name:"500g",abbreviation:"g",value:500},{name:"1kg",abbreviation:"kg",value:1},{name:"2kg",abbreviation:"kg",value:2}],parcel:[{name:"1kg",abbreviation:"kg",value:1},{name:"2kg",abbreviation:"kg",value:2},{name:"3kg",abbreviation:"kg",value:3},{name:"4kg",abbreviation:"kg",value:4},{name:"5kg",abbreviation:"kg",value:5},{name:"6kg",abbreviation:"kg",value:6},{name:"7Kg",abbreviation:"kg",value:7},{name:"8kg",abbreviation:"kg",value:8},{name:"9kg",abbreviation:"kg",value:9},{name:"10kg",abbreviation:"kg",value:10},{name:"11kg",abbreviation:"kg",value:11},{name:"12kg",abbreviation:"kg",value:12},{name:"13kg",abbreviation:"kg",value:13},{name:"14kg",abbreviation:"kg",value:14},{name:"15kg",abbreviation:"kg",value:15},{name:"16kg",abbreviation:"kg",value:16},{name:"17kg",abbreviation:"kg",value:17},{name:"18kg",abbreviation:"kg",value:18},{name:"20kg",abbreviation:"kg",value:20}]},h=class{constructor(i){e(this,i),this.source="https://com-integration.postnord.com/globalassets/global/prices/sv-se-findprice.xlsx",this.language="sv",this.market="se",this.filteredItems=[],this.postagetype={value:"",name:"",icon:""},this.weight={value:0,name:""},this.weightvalue=0,this.deliveryscope={value:"",name:"",icon:""},this.sourceData={types:[],data:[]}}componentWillLoad(){this.setState(),this.getDataSource()}async getDataSource(){const e=`?cache=${Math.floor(9999*Math.random()+1)}`,i=await fetch(this.source+e),a=await i.blob();try{const e=await t(a);this.sourceData=e,this.filterItems()}catch(n){console.log("Unable to parse data")}}setState(){this.market&&(a.market=s[this.market]),this.language&&n[this.language]&&(a.i18n=n[this.language])}filterItems(){var e;if(!(null===(e=this.sourceData)||void 0===e?void 0:e.data))return void console.log("Data has not yet been loaded");if(!this.postagetype)return;const i=this.sourceData.data.filter((e=>e.what===this.postagetype.value));if(!this.deliveryscope)return;const t=i.filter((e=>e.deliveryscope===this.deliveryscope.value));if(!this.weight||!this.weight.value)return;const a="kg"===this.weight.abbreviation.toLocaleLowerCase()&&"letter"===this.postagetype.value?1e3*this.weight.value:this.weight.value;let n=t.filter((e=>e.maxweight===a));if(0===n.length&&(n=t.filter((e=>e.maxweight>=a)),n.length>0)){const e=[...new Map(n.reverse().map((e=>[e.id,e]))).values()];e.length>0&&(n=e)}this.filteredItems=n}render(){return i("div",null,i("div",{class:"findprice-form"},a.i18n.componentheading?i("h2",null,a.i18n.componentheading):null,i("div",{class:"postagetypes"},r.map((e=>i("pn-choice-button",{choiceid:e.value,value:e.value,name:"postagetype",type:"radio",checked:e.value===this.postagetype.value,onChange:()=>{this.postagetype=r.filter((i=>i.value===e.value))[0],this.deliveryscope={value:"",name:"",icon:""},this.weight={value:0,name:""},this.weightvalue=this.weight.value}},i("pn-illustration",{illustration:e.illustration})," ",e.name)))),this.postagetype.value&&o[this.postagetype.value]?i("div",null,a.i18n.deliveryscopeheading?i("div",{class:"heading"},a.i18n.deliveryscopeheading):null,i("div",{class:"deliveryscope"},o[this.postagetype.value].map((e=>i("pn-choice-button",{choiceid:this.postagetype.value+e.value,value:e.value,name:"deliveryscope",type:"radio",checked:e.value===this.deliveryscope.value,onChange:()=>{this.deliveryscope=o[this.postagetype.value].filter((i=>i.value===e.value))[0],0===this.weight.value&&(this.weight=l[this.postagetype.value][0],this.weightvalue=this.weight.value)}},i("pn-illustration",{illustration:e.illustration})," ",e.name))))):null,this.postagetype.value&&l[this.postagetype.value]&&this.deliveryscope.value?i("div",null,a.i18n.sizeheading?i("div",{class:"heading"},a.i18n.sizeheading):null,i("div",{class:"weightoption"},i("div",{class:"weightoption-input"},i("pn-input",{inputid:"weightvalue",name:"weightvalue",type:"number",label:a.i18n.weightlabel,value:this.weightvalue,onChange:e=>{if(e&&e.target&&e.target.value){const i=parseInt(e.target.value,10);if(!isNaN(i)){let e=l[this.postagetype.value].filter((e=>("kg"===e.abbreviation?1e3*e.value:e.value)>=i));e&&e.length>0&&(this.weight=e[0],this.weightvalue=this.weight.value)}}}}),i("span",{class:"weightoption-input-abbreviation"},this.weight.abbreviation)),i("div",{class:"weightoption-range"},i("input",{type:"range",id:"weightrange",name:"weightrange",list:"weightlist",value:this.weight.value?l[this.postagetype.value].findIndex((e=>e.value===this.weightvalue)):0,onChange:e=>{this.weight=l[this.postagetype.value][e.target.value],this.weightvalue=this.weight.value},min:"0",max:l[this.postagetype.value].length-1}),i("datalist",{id:"weightlist"},l[this.postagetype.value].map(((e,t)=>{let a=e.name;return l[this.postagetype.value].length>6&&(a=t%5==0||0===t||t===l[this.postagetype.value].length-1?e.name:""),i("option",Object.assign({value:t},a?{label:a}:{}))})))))):null),this.filteredItems&&this.filteredItems.length>0?i("div",{class:"resultlist"},a.i18n.resultlistheading?i("div",{class:"heading"},a.i18n.resultlistheading):null,this.filteredItems.map((e=>i("div",null,i("pn-find-service-and-price-result",{item:e}))))):null)}static get watchers(){return{market:["setState"],language:["setState"],postagetype:["filterItems"],deliveryscope:["filterItems"],weightvalue:["filterItems"]}}};h.style="pn-find-service-and-price .findprice-form{max-width:50em;margin:0 auto}pn-find-service-and-price h2,pn-find-service-and-price .heading{text-align:center;font-size:1.5em;line-height:1.1;font-weight:bold;margin-bottom:1rem}pn-find-service-and-price .postagetypes,pn-find-service-and-price .deliveryscope{text-align:center;margin-bottom:3rem}pn-find-service-and-price .weightoption{display:-ms-flexbox;display:flex;gap:1em}pn-find-service-and-price .weightoption-input{width:5em;position:relative}pn-find-service-and-price .weightoption-input input::-webkit-outer-spin-button,pn-find-service-and-price .weightoption-input input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}pn-find-service-and-price .weightoption-input-abbreviation{position:absolute;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);right:1.2em;margin-top:1.55rem;font-weight:500}pn-find-service-and-price .weightoption-range{-ms-flex-positive:1;flex-grow:1;-ms-flex-item-align:end;align-self:flex-end;position:relative;top:0.5em}pn-find-service-and-price .weightoption-range input{width:calc(100% - 1.5em)}pn-find-service-and-price .weightoption-range datalist{width:100%;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;font-size:0.75em}pn-find-service-and-price .resultlist{margin:3em 0}";export{h as pn_find_service_and_price}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(t,e,n,r){function o(t){return t instanceof n?t:new n((function(e){e(t)}))}return new(n||(n=Promise))((function(n,i){function a(t){try{u(r.next(t))}catch(e){i(e)}}function s(t){try{u(r["throw"](t))}catch(e){i(e)}}function u(t){t.done?n(t.value):o(t.value).then(a,s)}u((r=r.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var n={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,o,i,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(t){return function(e){return u([t,e])}}function u(s){if(r)throw new TypeError("Generator is already executing.");while(a&&(a=0,s[0]&&(n=0)),n)try{if(r=1,o&&(i=s[0]&2?o["return"]:s[0]?o["throw"]||((i=o["return"])&&i.call(o),0):o.next)&&!(i=i.call(o,s[1])).done)return i;if(o=0,i)s=[s[0]&2,i.value];switch(s[0]){case 0:case 1:i=s;break;case 4:n.label++;return{value:s[1],done:false};case 5:n.label++;o=s[1];s=[0];continue;case 7:s=n.ops.pop();n.trys.pop();continue;default:if(!(i=n.trys,i=i.length>0&&i[i.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){n.label=s[1];break}if(s[0]===6&&n.label<i[1]){n.label=i[1];i=s;break}if(i&&n.label<i[2]){n.label=i[2];n.ops.push(s);break}if(i[2])n.ops.pop();n.trys.pop();continue}s=e.call(t,n)}catch(u){s=[6,u];o=0}finally{r=i=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register([],(function(t){"use strict";return{execute:function(){var e=function(){function t(t){if(t===void 0){t=window.location.href}this.href="";this.market="";this.language="";this.environment="";this.url=null;this.allowedLanguages=["sv","da","fi","no","en","de","zh","fr","es","it","nl"];this.allowedMarkets=["se","dk","fi","no","com","de","tpl"];this.wwwMarkets=["se","dk","fi","no","de","com"];this.developmentDomains=["localhost",".local","local.",".dev","dev."];this.markets={se:{fallbackLanguage:"sv",integration:"se-integration.postnord.com",preproduction:"se-preproduction.postnord.com",production:"se-production.postnord.com",live:"www.postnord.se"},dk:{fallbackLanguage:"da",integration:"dk-integration.postnord.com",preproduction:"dk-preproduction.postnord.com",production:"dk-production.postnord.com",live:"www.postnord.dk"},fi:{fallbackLanguage:"fi",integration:"fi-integration.postnord.com",preproduction:"fi-preproduction.postnord.com",production:"fi-production.postnord.com",live:"www.postnord.fi"},no:{fallbackLanguage:"no",integration:"no-integration.postnord.com",preproduction:"no-preproduction.postnord.com",production:"no-production.postnord.com",live:"www.postnord.no"},com:{fallbackLanguage:"en",integration:"com-integration.postnord.com",preproduction:"com-preproduction.postnord.com",production:"com-production.postnord.com",live:"www.postnord.com"},de:{fallbackLanguage:"en",integration:"de-integration.postnord.com",preproduction:"de-preproduction.postnord.com",production:"de-production.postnord.com",live:"www.postnord.de"},tpl:{fallbackLanguage:"sv",integration:"tpl-integration.postnord.com",preproduction:"tpl-preproduction.postnord.com",production:"tpl-production.postnord.com",live:"tpl.postnord.com"}};this.environmentTypes=["integration","preproduction","production"];this.environments={production:{name:"production",url:"https://www.postnord.xx/"},preproduction:{name:"preproduction",url:"https://com-preproduction.postnord.com/"},integration:{name:"integration",url:"https://com-integration.postnord.com/"}};this.href=t;this.url=new URL(this.href)}t.prototype.getLanguage=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:if(this.language){return[2,this.language]}return[4,this.resolveLanguage()];case 1:t.sent();return[2,this.language]}}))}))};t.prototype.getMarket=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:if(this.market){return[2,this.market]}return[4,this.resolveMarket()];case 1:t.sent();return[2,this.market]}}))}))};t.prototype.getEndpoint=function(t,e){if(e===void 0){e=""}return __awaiter(this,void 0,void 0,(function(){var n;return __generator(this,(function(r){n=this.environments.production.url;if(this.markets[e]&&this.markets[e][t]){if(t==="production"&&window.location.hostname.indexOf(this.markets[e]["live"])===0){return[2,"https://"+this.markets[e]["live"]]}if(window.location.hostname.indexOf(this.markets[e][t])===0){return[2,"https://"+this.markets[e][t]]}}if(this.environments[t]){n=this.environments[t].url;if(t===this.environments.production.name){if(this.wwwMarkets.indexOf(e)!==-1){n=n.replace(".xx","."+e)}else{n=n.replace(".xx",".com");n=n.replace("www.",e+".")}}}return[2,n]}))}))};t.prototype.getEnvironmentName=function(){return __awaiter(this,void 0,void 0,(function(){var t;var e=this;return __generator(this,(function(n){t=this.environmentTypes.filter((function(t){return e.url.hostname.indexOf("-"+t)!==-1}))[0];if(t){this.environment=t;return[2,this.environment]}if(this.url.hostname.indexOf("www.")!==-1){this.environment=this.environments.production.name;return[2,this.environment]}this.environment=this.environments.integration.name;return[2,this.environment]}))}))};t.prototype.isDevEnvironment=function(){var t=this;var e=this.developmentDomains.filter((function(e){return t.url.hostname.indexOf(e)!==-1}))[0];return e.length>0};t.prototype.resolveMarket=function(){return __awaiter(this,void 0,void 0,(function(){var t,e,n,r,o,i,a,s,u,c;var l=this;return __generator(this,(function(f){if(this.href.indexOf("//www.")!==-1){t=this.url.hostname.substring(this.url.hostname.lastIndexOf(".")+1,this.url.hostname.length);if(t&&this.markets[t]){this.market=t}else{console.warn("Unable to define market from www. domain",this.href)}}e=this.environmentTypes.filter((function(t){return l.url.hostname.indexOf("-"+t)!==-1}));if(!this.market&&e&&e.length>0){n=e[0];r=this.url.hostname.substring(0,this.url.hostname.indexOf("-"+n));if(r&&this.markets[r]){this.market=r}else{console.warn("Unable to define market from preset environment names",this.href)}}if(!this.market){if(this.url.hostname.indexOf("www")===-1&&this.url.hostname.indexOf(".postnord.")>0){o=this.url.hostname.indexOf(".")!==this.url.hostname.indexOf(".postnord")?this.url.hostname.indexOf("."):0;i=this.url.hostname.substring(o,this.url.hostname.indexOf(".postnord."));if(this.allowedMarkets.indexOf(i)!==-1){this.market=i;return[2]}}}if(!this.market){a=this.developmentDomains.filter((function(t){return l.url.hostname.indexOf(t)!==-1}))[0];if(!a){this.market=this.allowedMarkets[0];return[2]}s=this.href.replace(a,"");u=this.allowedMarkets.filter((function(t){var e=["."+t,t+".","/"+t+"/"];var n=e.filter((function(t){return s.indexOf(t)!==-1}));return n.length>0}))[0];if(u){this.market=u}else{c=Object.entries(this.markets).filter((function(t){var e=["."+t[1].fallbackLanguage,t[1].fallbackLanguage+".","/"+t[1].fallbackLanguage+"/"];var n=e.filter((function(t){return s.indexOf(t)!==-1}));return n.length>0}))[0];if(c&&c[0]){this.market=c[0]}}}if(!this.market){console.info("Was unable to detect market, used fallback");this.market=this.allowedMarkets[0]}return[2]}))}))};t.prototype.resolveLanguage=function(){return __awaiter(this,void 0,void 0,(function(){var t,e,n,r,o;var i=this;return __generator(this,(function(a){if(this.language){return[2]}o=[(t=document.querySelector("html[lang]"))===null||t===void 0?void 0:t.getAttribute("lang"),(e=document.querySelector('[http-equiv="content-language"][content]'))===null||e===void 0?void 0:e.getAttribute("content"),(n=document.querySelector('[property="og:locale"][content]'))===null||n===void 0?void 0:n.getAttribute("content"),(r=document.querySelector("[lang]"))===null||r===void 0?void 0:r.getAttribute("lang")];o.filter((function(t){return t})).forEach((function(t){if(i.allowedLanguages.indexOf(t)){i.language=t;return}}));if(!this.language&&this.market){this.language=this.markets[this.market].fallbackLanguage}return[2]}))}))};return t}();t("M",e);var n=function(){function t(t){if(t===void 0){t=""}var e=this;this.storagePrefix="";this.store={get:function(t,n){if(n===void 0){n=false}var r=n?window.localStorage:window.sessionStorage;var o=n?window.sessionStorage:window.localStorage;var i=r.getItem("".concat(e.storagePrefix,"-").concat(t));if(!i){i=o.getItem("".concat(e.storagePrefix,"-").concat(t))}if(!i){return i}if(i.indexOf("{")===0){try{return JSON.parse(i)}catch(a){}}if(i.indexOf(",")!==-1){return i.split(",")}return i},set:function(t,n,r){if(r===void 0){r=false}var o=r?window.localStorage:window.sessionStorage;if(typeof n==="object"&&typeof n.length==="undefined"){o.setItem("".concat(e.storagePrefix,"-").concat(t),JSON.stringify(n));return}o.setItem("".concat(e.storagePrefix,"-").concat(t),n)},remove:function(t){window.sessionStorage.removeItem("".concat(e.storagePrefix,"-").concat(t))}};this.storagePrefix=t}t.prototype.fetchJson=function(t,e,n,r){if(e===void 0){e={}}if(n===void 0){n=false}if(r===void 0){r=null}return __awaiter(this,void 0,void 0,(function(){var o;var i=this;return __generator(this,(function(a){o=new Promise((function(o){return __awaiter(i,void 0,void 0,(function(){var i,a,s,u,c,l;return __generator(this,(function(f){switch(f.label){case 0:i=true;a=typeof t==="string"?t:t.url;s=a;u=null;c=null;if(n){c=this.store.get(s);if(c&&!c.permanent){i=false}if(c&&c.data){u=c.data;o(u)}}if(!i)return[3,3];return[4,window.fetch(t,e)];case 1:l=f.sent();return[4,l.json()];case 2:u=f.sent();o(u);if(n){if(typeof r==="function"&&c!=null){r(u)}this.store.set(s,this.wrapJson(u,true),true);this.store.set(s,this.wrapJson(u,false),false)}f.label=3;case 3:return[2]}}))}))}));return[2,o]}))}))};t.prototype.wrapJson=function(t,e){if(e===void 0){e=false}var n=new Date;return{timestamp:n.getTime(),time:n.toISOString(),data:t,permanent:e}};return t}();t("F",n)}}}));
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
class t{constructor(t=window.location.href){this.href="",this.market="",this.language="",this.environment="",this.url=null,this.allowedLanguages=["sv","da","fi","no","en","de","zh","fr","es","it","nl"],this.allowedMarkets=["se","dk","fi","no","com","de","tpl"],this.wwwMarkets=["se","dk","fi","no","de","com"],this.developmentDomains=["localhost",".local","local.",".dev","dev."],this.markets={se:{fallbackLanguage:"sv",integration:"se-integration.postnord.com",preproduction:"se-preproduction.postnord.com",production:"se-production.postnord.com",live:"www.postnord.se"},dk:{fallbackLanguage:"da",integration:"dk-integration.postnord.com",preproduction:"dk-preproduction.postnord.com",production:"dk-production.postnord.com",live:"www.postnord.dk"},fi:{fallbackLanguage:"fi",integration:"fi-integration.postnord.com",preproduction:"fi-preproduction.postnord.com",production:"fi-production.postnord.com",live:"www.postnord.fi"},no:{fallbackLanguage:"no",integration:"no-integration.postnord.com",preproduction:"no-preproduction.postnord.com",production:"no-production.postnord.com",live:"www.postnord.no"},com:{fallbackLanguage:"en",integration:"com-integration.postnord.com",preproduction:"com-preproduction.postnord.com",production:"com-production.postnord.com",live:"www.postnord.com"},de:{fallbackLanguage:"en",integration:"de-integration.postnord.com",preproduction:"de-preproduction.postnord.com",production:"de-production.postnord.com",live:"www.postnord.de"},tpl:{fallbackLanguage:"sv",integration:"tpl-integration.postnord.com",preproduction:"tpl-preproduction.postnord.com",production:"tpl-production.postnord.com",live:"tpl.postnord.com"}},this.environmentTypes=["integration","preproduction","production"],this.environments={production:{name:"production",url:"https://www.postnord.xx/"},preproduction:{name:"preproduction",url:"https://com-preproduction.postnord.com/"},integration:{name:"integration",url:"https://com-integration.postnord.com/"}},this.href=t,this.url=new URL(this.href)}async getLanguage(){return this.language||await this.resolveLanguage(),this.language}async getMarket(){return this.market||await this.resolveMarket(),this.market}async getEndpoint(t,o=""){let i=this.environments.production.url;if(this.markets[o]&&this.markets[o][t]){if("production"===t&&0===window.location.hostname.indexOf(this.markets[o].live))return"https://"+this.markets[o].live;if(0===window.location.hostname.indexOf(this.markets[o][t]))return"https://"+this.markets[o][t]}return this.environments[t]&&(i=this.environments[t].url,t===this.environments.production.name&&(-1!==this.wwwMarkets.indexOf(o)?i=i.replace(".xx","."+o):(i=i.replace(".xx",".com"),i=i.replace("www.",o+".")))),i}async getEnvironmentName(){const t=this.environmentTypes.filter((t=>-1!==this.url.hostname.indexOf("-"+t)))[0];return t?(this.environment=t,this.environment):-1!==this.url.hostname.indexOf("www.")?(this.environment=this.environments.production.name,this.environment):(this.environment=this.environments.integration.name,this.environment)}isDevEnvironment(){return this.developmentDomains.filter((t=>-1!==this.url.hostname.indexOf(t)))[0].length>0}async resolveMarket(){if(-1!==this.href.indexOf("//www.")){const t=this.url.hostname.substring(this.url.hostname.lastIndexOf(".")+1,this.url.hostname.length);t&&this.markets[t]?this.market=t:console.warn("Unable to define market from www. domain",this.href)}const t=this.environmentTypes.filter((t=>-1!==this.url.hostname.indexOf("-"+t)));if(!this.market&&t&&t.length>0){const o=this.url.hostname.substring(0,this.url.hostname.indexOf("-"+t[0]));o&&this.markets[o]?this.market=o:console.warn("Unable to define market from preset environment names",this.href)}if(!this.market&&-1===this.url.hostname.indexOf("www")&&this.url.hostname.indexOf(".postnord.")>0){const t=this.url.hostname.indexOf(".")!==this.url.hostname.indexOf(".postnord")?this.url.hostname.indexOf("."):0,o=this.url.hostname.substring(t,this.url.hostname.indexOf(".postnord."));if(-1!==this.allowedMarkets.indexOf(o))return void(this.market=o)}if(!this.market){const t=this.developmentDomains.filter((t=>-1!==this.url.hostname.indexOf(t)))[0];if(!t)return void(this.market=this.allowedMarkets[0]);const o=this.href.replace(t,"");let i=this.allowedMarkets.filter((t=>["."+t,t+".","/"+t+"/"].filter((t=>-1!==o.indexOf(t))).length>0))[0];if(i)this.market=i;else{let t=Object.entries(this.markets).filter((t=>["."+t[1].fallbackLanguage,t[1].fallbackLanguage+".","/"+t[1].fallbackLanguage+"/"].filter((t=>-1!==o.indexOf(t))).length>0))[0];t&&t[0]&&(this.market=t[0])}}this.market||(console.info("Was unable to detect market, used fallback"),this.market=this.allowedMarkets[0])}async resolveLanguage(){var t,o,i,n;this.language||([null===(t=document.querySelector("html[lang]"))||void 0===t?void 0:t.getAttribute("lang"),null===(o=document.querySelector('[http-equiv="content-language"][content]'))||void 0===o?void 0:o.getAttribute("content"),null===(i=document.querySelector('[property="og:locale"][content]'))||void 0===i?void 0:i.getAttribute("content"),null===(n=document.querySelector("[lang]"))||void 0===n?void 0:n.getAttribute("lang")].filter((t=>t)).forEach((t=>{this.allowedLanguages.indexOf(t)&&(this.language=t)})),!this.language&&this.market&&(this.language=this.markets[this.market].fallbackLanguage))}}class o{constructor(t=""){this.storagePrefix="",this.store={get:(t,o=!1)=>{const i=o?window.localStorage:window.sessionStorage,n=o?window.sessionStorage:window.localStorage;let s=i.getItem(`${this.storagePrefix}-${t}`);if(s||(s=n.getItem(`${this.storagePrefix}-${t}`)),!s)return s;if(0===s.indexOf("{"))try{return JSON.parse(s)}catch(e){}return-1!==s.indexOf(",")?s.split(","):s},set:(t,o,i=!1)=>{(i?window.localStorage:window.sessionStorage).setItem(`${this.storagePrefix}-${t}`,"object"!=typeof o||void 0!==o.length?o:JSON.stringify(o))},remove:t=>{window.sessionStorage.removeItem(`${this.storagePrefix}-${t}`)}},this.storagePrefix=t}async fetchJson(t,o={},i=!1,n=null){return new Promise((async s=>{let e=!0;const r="string"==typeof t?t:t.url;let c=null,d=null;if(i&&(d=this.store.get(r),d&&!d.permanent&&(e=!1),d&&d.data&&(c=d.data,s(c))),e){const e=await window.fetch(t,o);c=await e.json(),s(c),i&&("function"==typeof n&&null!=d&&n(c),this.store.set(r,this.wrapJson(c,!0),!0),this.store.set(r,this.wrapJson(c,!1),!1))}}))}wrapJson(t,o=!1){const i=new Date;return{timestamp:i.getTime(),time:i.toISOString(),data:t,permanent:o}}}export{o as F,t as M}
|