diff --git a/.github/workflows/code-compatibility.yaml b/.github/workflows/code-compatibility.yaml index 9271d7bfd7..177164ac14 100644 --- a/.github/workflows/code-compatibility.yaml +++ b/.github/workflows/code-compatibility.yaml @@ -12,7 +12,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@v3 - name: Check for unsupported functions run: | diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 2ab0be9b4f..6397ef8e95 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -34,11 +34,11 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@v3 # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@v3 + uses: github/codeql-action/init@v2 with: languages: ${{ matrix.language }} config-file: ./.github/codeql/codeql-config.yml @@ -46,7 +46,7 @@ jobs: # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). # If this step fails, then you should remove it and run the build manually (see below) - name: Autobuild - uses: github/codeql-action/autobuild@v3 + uses: github/codeql-action/autobuild@v2 # ℹī¸ Command-line programs to run using the OS shell. # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun @@ -59,6 +59,6 @@ jobs: # ./location_of_script_within_repo/buildscript.sh - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v3 + uses: github/codeql-action/analyze@v2 with: category: "/language:${{matrix.language}}" diff --git a/.github/workflows/dispatch.yml b/.github/workflows/dispatch.yml index eb13db1da3..9b1e960515 100644 --- a/.github/workflows/dispatch.yml +++ b/.github/workflows/dispatch.yml @@ -13,8 +13,8 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out repository - uses: actions/checkout@v4 - - uses: dorny/paths-filter@v3 + uses: actions/checkout@v3 + - uses: dorny/paths-filter@v2 id: changes with: base: ${{ github.ref }} @@ -23,7 +23,7 @@ jobs: - 'libs/**' - if: steps.changes.outputs.src == 'true' name: Trigger DC Workflow - uses: actions/github-script@v7 + uses: actions/github-script@v6 with: github-token: ${{ secrets.DC_PAT }} script: | diff --git a/.github/workflows/fg-sync-repos.yml b/.github/workflows/fg-sync-repos.yml index c409d59111..bbac6e3432 100644 --- a/.github/workflows/fg-sync-repos.yml +++ b/.github/workflows/fg-sync-repos.yml @@ -26,7 +26,7 @@ jobs: repositories: "milo-pink" - name: Checkout Repo - uses: actions/checkout@v4 + uses: actions/checkout@v2 with: persist-credentials: false ref: ${{ inputs.syncBranch }} diff --git a/.github/workflows/high-impact-alert.yml b/.github/workflows/high-impact-alert.yml index 9fa01dacc2..13ecbbb8e1 100644 --- a/.github/workflows/high-impact-alert.yml +++ b/.github/workflows/high-impact-alert.yml @@ -14,12 +14,12 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@v4.1.4 with: ref: ${{ github.event.pull_request.base.ref }} - name: Send Slack message for high impact PRs - uses: actions/github-script@v7 + uses: actions/github-script@v7.0.1 with: script: | const main = require('./.github/workflows/high-impact-alert.js') diff --git a/.github/workflows/label-zero-impact.yaml b/.github/workflows/label-zero-impact.yaml index ee7a4322a8..d0ce919246 100644 --- a/.github/workflows/label-zero-impact.yaml +++ b/.github/workflows/label-zero-impact.yaml @@ -10,10 +10,10 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@v4.1.4 - name: Add the zero impact label - uses: actions/github-script@v7 + uses: actions/github-script@v7.0.1 with: script: | const main = require('./.github/workflows/label-zero-impact.js') diff --git a/.github/workflows/merge-to-main.yaml b/.github/workflows/merge-to-main.yaml index ada833d19f..9b4ba782bf 100644 --- a/.github/workflows/merge-to-main.yaml +++ b/.github/workflows/merge-to-main.yaml @@ -19,17 +19,17 @@ jobs: if: github.repository_owner == 'adobecom' && (github.event_name == 'workflow_dispatch' || github.event_name == 'schedule' || (github.event_name == 'pull_request' && github.event.pull_request.base.ref == 'main' && github.event.pull_request.head.ref == 'stage')) steps: - - uses: actions/create-github-app-token@v1 + - uses: actions/create-github-app-token@v1.10.0 id: milo-pr-merge-token with: app-id: ${{ secrets.MILO_PR_MERGE_APP_ID }} private-key: ${{ secrets.MILO_PR_MERGE_PRIVATE_KEY }} - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@v4.1.4 - name: Merge to main - uses: actions/github-script@v7 + uses: actions/github-script@v7.0.1 with: github-token: ${{ steps.milo-pr-merge-token.outputs.token }} script: | diff --git a/.github/workflows/merge-to-stage.js b/.github/workflows/merge-to-stage.js index 833f6564ae..19ef68f570 100644 --- a/.github/workflows/merge-to-stage.js +++ b/.github/workflows/merge-to-stage.js @@ -15,7 +15,6 @@ const LABELS = { highPriority: 'high priority', readyForStage: 'Ready for Stage', SOTPrefix: 'SOT', - zeroImpact: 'zero-impact', }; const TEAM_MENTIONS = [ '@adobecom/miq-sot', @@ -25,8 +24,8 @@ const TEAM_MENTIONS = [ '@adobecom/document-cloud-sot', ]; const SLACK = { - merge: ({ html_url, number, title, prefix = '' }) => - `:merged: PR merged to stage: ${prefix} <${html_url}|${number}: ${title}>.`, + merge: ({ html_url, number, title }) => + `:merged: PR merged to stage: <${html_url}|${number}: ${title}>.`, openedSyncPr: ({ html_url, number }) => `:fast_forward: Created <${html_url}|Stage to Main PR ${number}>`, }; @@ -47,7 +46,6 @@ let body = ` `; const isHighPrio = (labels) => labels.includes(LABELS.highPriority); -const isZeroImpact = (labels) => labels.includes(LABELS.zeroImpact); const hasFailingChecks = (checks) => checks.some( @@ -82,23 +80,11 @@ const getPRs = async () => { return true; }); - return prs.reverse().reduce( - (categorizedPRs, pr) => { - if (isZeroImpact(pr.labels)) { - categorizedPRs.zeroImpactPRs.push(pr); - } else if (isHighPrio(pr.labels)) { - categorizedPRs.highImpactPRs.push(pr); - } else { - categorizedPRs.normalPRs.push(pr); - } - return categorizedPRs; - }, - { zeroImpactPRs: [], highImpactPRs: [], normalPRs: [] } - ); + return prs.reverse(); // OLD PRs first }; -const merge = async ({ prs, type }) => { - console.log(`Merging ${prs.length || 0} ${type} PRs that are ready... `); +const merge = async ({ prs }) => { + console.log(`Merging ${prs.length || 0} PRs that are ready... `); for await (const { number, files, html_url, title } of prs) { try { @@ -106,10 +92,7 @@ const merge = async ({ prs, type }) => { console.log(`Skipping ${number}: ${title} due to overlap in files.`); continue; } - if (type !== LABELS.zeroImpact) { - files.forEach((file) => (SEEN[file] = true)); - } - + files.forEach((file) => (SEEN[file] = true)); if (!process.env.LOCAL_RUN) { await github.rest.pulls.merge({ owner, @@ -118,14 +101,12 @@ const merge = async ({ prs, type }) => { merge_method: 'squash', }); } - const prefix = type === LABELS.zeroImpact ? ' [ZERO IMPACT]' : ''; - body = `-${prefix} ${html_url}\n${body}`; + body = `- ${html_url}\n${body}`; await slackNotification( SLACK.merge({ html_url, number, title, - prefix, }) ); await new Promise((resolve) => setTimeout(resolve, 5000)); @@ -204,12 +185,11 @@ const main = async (params) => { const stageToMainPR = await getStageToMainPR(); console.log('has Stage to Main PR:', !!stageToMainPR); if (stageToMainPR) body = stageToMainPR.body; - const { zeroImpactPRs, highImpactPRs, normalPRs } = await getPRs(); - await merge({ prs: zeroImpactPRs, type: LABELS.zeroImpact }); if (stageToMainPR?.labels.some((label) => label.includes(LABELS.SOTPrefix))) return console.log('PR exists & testing started. Stopping execution.'); - await merge({ prs: highImpactPRs, type: LABELS.highPriority }); - await merge({ prs: normalPRs, type: 'normal' }); + const prs = await getPRs(); + await merge({ prs: prs.filter(({ labels }) => isHighPrio(labels)) }); + await merge({ prs: prs.filter(({ labels }) => !isHighPrio(labels)) }); if (!stageToMainPR) await openStageToMainPR(); if (stageToMainPR && body !== stageToMainPR.body) { console.log("Updating PR's body..."); diff --git a/.github/workflows/merge-to-stage.yaml b/.github/workflows/merge-to-stage.yaml index 16323f9433..c6457233d6 100644 --- a/.github/workflows/merge-to-stage.yaml +++ b/.github/workflows/merge-to-stage.yaml @@ -19,17 +19,17 @@ jobs: environment: milo_pr_merge steps: - - uses: actions/create-github-app-token@v1 + - uses: actions/create-github-app-token@v1.10.0 id: milo-pr-merge-token with: app-id: ${{ secrets.MILO_PR_MERGE_APP_ID }} private-key: ${{ secrets.MILO_PR_MERGE_PRIVATE_KEY }} - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@v4.1.4 - name: Merge to stage or queue to merge - uses: actions/github-script@v7 + uses: actions/github-script@v7.0.1 with: github-token: ${{ steps.milo-pr-merge-token.outputs.token }} script: | diff --git a/.github/workflows/pr-reminders.yaml b/.github/workflows/pr-reminders.yaml index 51d7e0c16a..6851f93de1 100644 --- a/.github/workflows/pr-reminders.yaml +++ b/.github/workflows/pr-reminders.yaml @@ -12,10 +12,10 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@v4.1.1 - name: Remind PR initiators - uses: actions/github-script@v7 + uses: actions/github-script@v7.0.1 with: script: | const main = require('./.github/workflows/pr-reminders.js') diff --git a/.github/workflows/run-lint.yaml b/.github/workflows/run-lint.yaml index adf7b153b7..3aab1f8ebb 100644 --- a/.github/workflows/run-lint.yaml +++ b/.github/workflows/run-lint.yaml @@ -10,11 +10,11 @@ jobs: name: Running eslint runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v2 - - uses: actions/setup-node@v4 + - uses: actions/setup-node@v2 with: - node-version: 20 + node-version: 18 - name: Install dependencies run: npm ci diff --git a/.github/workflows/run-nala-milolibs.yaml b/.github/workflows/run-nala-milolibs.yaml index eb15947493..90eca9d373 100644 --- a/.github/workflows/run-nala-milolibs.yaml +++ b/.github/workflows/run-nala-milolibs.yaml @@ -1,54 +1,54 @@ -name: Run Nala on Milo Libs - -on: - workflow_dispatch: - inputs: - branch: - description: 'Provide the live branch url. ex: https://main--cc--adobecom.hlx.live' - required: false - type: string - milolibs: - description: 'Provide MiloLibs param. ex: ?milolibs=marquee-static-hover' - required: false - type: string - tags: - description: 'Test scenario tags, if empty all tests will run. i.e., @marquee' - required: false - type: string - platform: - description: 'Platform to run tests on; select one, options: [ubuntu-latest, macos-latest]' - required: true - type: string - -jobs: - action: - name: Running tests - runs-on: ${{ inputs.platform }} - env: - WORKFLOW_NAME: 'Milo Libs Run' - MILO_LIBS_RUN: 'true' - - steps: - - name: Check out repository - uses: actions/checkout@v4 - - - name: Set environment variables - run: | - echo "PR_BRANCH_MILOLIBS_LIVE_URL=${{ github.event.inputs.branch }}" >> $GITHUB_ENV - echo "MILO_LIBS=${{ github.event.inputs.milolibs }}" >> $GITHUB_ENV - - - name: Run Nala ${{ inputs.platform }} - uses: adobecom/nala@main - env: - labels: ${{ inputs.tags }} - IMS_EMAIL: ${{ secrets.IMS_EMAIL }} - IMS_PASS: ${{ secrets.IMS_PASS }} - HLX_TKN: ${{ secrets.HLX_TKN }} - SLACK_WH: ${{ secrets.SLACK_WH }} - - name: Persist JSON Artifact - uses: actions/upload-artifact@v3 - if: always() - with: - name: nala-results - path: nala-results.json - retention-days: 30 +name: Run Nala on Milo Libs + +on: + workflow_dispatch: + inputs: + branch: + description: 'Provide the live branch url. ex: https://main--cc--adobecom.hlx.live' + required: false + type: string + milolibs: + description: 'Provide MiloLibs param. ex: ?milolibs=marquee-static-hover' + required: false + type: string + tags: + description: 'Test scenario tags, if empty all tests will run. i.e., @marquee' + required: false + type: string + platform: + description: 'Platform to run tests on; select one, options: [ubuntu-latest, macos-latest]' + required: true + type: string + +jobs: + action: + name: Running tests + runs-on: ${{ inputs.platform }} + env: + WORKFLOW_NAME: 'Milo Libs Run' + MILO_LIBS_RUN: 'true' + + steps: + - name: Check out repository + uses: actions/checkout@v3 + + - name: Set environment variables + run: | + echo "PR_BRANCH_MILOLIBS_LIVE_URL=${{ github.event.inputs.branch }}" >> $GITHUB_ENV + echo "MILO_LIBS=${{ github.event.inputs.milolibs }}" >> $GITHUB_ENV + + - name: Run Nala ${{ inputs.platform }} + uses: adobecom/nala@main + env: + labels: ${{ inputs.tags }} + IMS_EMAIL: ${{ secrets.IMS_EMAIL }} + IMS_PASS: ${{ secrets.IMS_PASS }} + HLX_TKN: ${{ secrets.HLX_TKN }} + SLACK_WH: ${{ secrets.SLACK_WH }} + - name: Persist JSON Artifact + uses: actions/upload-artifact@v3 + if: always() + with: + name: nala-results + path: nala-results.json + retention-days: 30 diff --git a/.github/workflows/run-nala.yml b/.github/workflows/run-nala.yml index 7b701eb8e5..2117468a80 100644 --- a/.github/workflows/run-nala.yml +++ b/.github/workflows/run-nala.yml @@ -12,7 +12,7 @@ jobs: steps: - name: Check out repository - uses: actions/checkout@v4 + uses: actions/checkout@v3 - name: Run Nala uses: adobecom/nala@main # Change if doing dev work env: diff --git a/.github/workflows/run-tests.yaml b/.github/workflows/run-tests.yaml index db78c6d735..1319736fdc 100644 --- a/.github/workflows/run-tests.yaml +++ b/.github/workflows/run-tests.yaml @@ -11,15 +11,15 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node-version: [20.x] + node-version: [18.x] steps: - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@v2 with: fetch-depth: 2 - name: Set up Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v4 + uses: actions/setup-node@v1 with: node-version: ${{ matrix.node-version }} @@ -33,7 +33,7 @@ jobs: run: xvfb-run -a npm test - name: Upload coverage to Codecov - uses: codecov/codecov-action@v4 + uses: codecov/codecov-action@v2 with: token: ${{ secrets.CODECOV_TOKEN }} files: coverage/lcov.info diff --git a/.github/workflows/skms.yaml b/.github/workflows/skms.yaml index 269cfe8969..789514a9a7 100644 --- a/.github/workflows/skms.yaml +++ b/.github/workflows/skms.yaml @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v3 # Runs a single command using the runners shell for shell validation - name: Validate Shell diff --git a/.github/workflows/update-dependencies.yaml b/.github/workflows/update-dependencies.yaml index a6cc0aaf32..c23e90592d 100644 --- a/.github/workflows/update-dependencies.yaml +++ b/.github/workflows/update-dependencies.yaml @@ -11,10 +11,10 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@v4.1.1 - name: Update file and create PR if needed - uses: actions/github-script@v7 + uses: actions/github-script@v7.0.1 with: script: | const updateDependency = require('./.github/workflows/update-script.js') diff --git a/libs/blocks/carousel/carousel.css b/libs/blocks/carousel/carousel.css index 963d6b85d0..3fcb968a49 100644 --- a/libs/blocks/carousel/carousel.css +++ b/libs/blocks/carousel/carousel.css @@ -20,11 +20,6 @@ margin-bottom: 1.8rem; } -/* Late loading controls */ -.carousel .is-delayed { - visibility: hidden; -} - .carousel .carousel-wrapper { position: relative; overflow: hidden; diff --git a/libs/blocks/carousel/carousel.js b/libs/blocks/carousel/carousel.js index d454e46288..f71f429b7c 100644 --- a/libs/blocks/carousel/carousel.js +++ b/libs/blocks/carousel/carousel.js @@ -20,7 +20,7 @@ function decorateNextPreviousBtns() { const previousBtn = createTag( 'button', { - class: 'carousel-button carousel-previous is-delayed', + class: 'carousel-button carousel-previous', 'aria-label': 'Previous', 'data-toggle': 'previous', }, @@ -30,7 +30,7 @@ function decorateNextPreviousBtns() { const nextBtn = createTag( 'button', { - class: 'carousel-button carousel-next is-delayed', + class: 'carousel-button carousel-next', 'aria-label': 'Next', 'data-toggle': 'next', }, @@ -43,7 +43,7 @@ function decorateLightboxButtons() { const expandBtn = createTag( 'button', { - class: 'lightbox-button carousel-expand is-delayed', + class: 'lightbox-button carousel-expand', 'aria-label': 'Open in full screen', }, LIGHTBOX_ICON, @@ -51,7 +51,7 @@ function decorateLightboxButtons() { const closeBtn = createTag( 'button', { - class: 'lightbox-button carousel-close is-delayed', + class: 'lightbox-button carousel-close', 'aria-label': 'Close full screen carousel', }, CLOSE_ICON, @@ -342,7 +342,7 @@ export default function init(el) { const fragment = new DocumentFragment(); const nextPreviousBtns = decorateNextPreviousBtns(); const slideIndicators = decorateSlideIndicators(slides); - const controlsContainer = createTag('div', { class: 'carousel-controls is-delayed' }); + const controlsContainer = createTag('div', { class: 'carousel-controls' }); fragment.append(...slides); const slideWrapper = createTag('div', { class: 'carousel-wrapper' }); @@ -395,11 +395,4 @@ export default function init(el) { } slides.slice(NoOfVisibleSlides).forEach((slide) => slide.querySelectorAll('a').forEach((focusableElement) => { focusableElement.setAttribute('tabindex', -1); })); handleChangingSlides(carouselElements); - - function handleLateLoadingNavigation() { - [...el.querySelectorAll('.is-delayed')].forEach((item) => item.classList.remove('is-delayed')); - parentArea.removeEventListener(MILO_EVENTS.DEFERRED, handleLateLoadingNavigation, true); - } - - parentArea.addEventListener(MILO_EVENTS.DEFERRED, handleLateLoadingNavigation, true); } diff --git a/libs/blocks/global-navigation/utilities/utilities.js b/libs/blocks/global-navigation/utilities/utilities.js index 547232a088..342371bf68 100644 --- a/libs/blocks/global-navigation/utilities/utilities.js +++ b/libs/blocks/global-navigation/utilities/utilities.js @@ -15,7 +15,6 @@ const allowedOrigins = [ 'https://business.adobe.com', 'https://blog.adobe.com', 'https://milo.adobe.com', - 'https://news.adobe.com', ]; export const selectors = { diff --git a/libs/blocks/how-to/how-to.css b/libs/blocks/how-to/how-to.css index 856b713e00..94d6cb3bcc 100644 --- a/libs/blocks/how-to/how-to.css +++ b/libs/blocks/how-to/how-to.css @@ -51,7 +51,7 @@ html[dir="rtl"] .how-to ol > li::before { grid-area: heading; } -.how-to-media { +.how-to-image { grid-area: image; align-self: center; justify-self: center; @@ -59,18 +59,18 @@ html[dir="rtl"] .how-to ol > li::before { order: 3; } -.how-to-media-large { +.how-to-image-large { height: auto; min-height: auto; } -.how-to-media img { +.how-to-image img { max-height: 100%; } /* tablet up */ @media screen and (min-width: 600px) { - .how-to .foreground:not(.has-video) { + .how-to .foreground { column-gap: var(--spacing-m); grid-template-rows: 1fr; grid-template-areas: @@ -78,16 +78,14 @@ html[dir="rtl"] .how-to ol > li::before { "list list" } - .how-to .foreground.has-image:not(.has-video) { + .how-to .foreground.has-image { grid-template-areas: "heading image" "list list" } - .how-to.large-image .foreground:not(.has-video), - .how-to.large-image .foreground.has-image:not(.has-video), - .how-to.large-media .foreground:not(.has-video), - .how-to.large-media .foreground.has-image:not(.has-video) { + .how-to.large-image .foreground, + .how-to.large-image .foreground.has-image { grid-template-rows: 1fr; grid-auto-rows: min-content; grid-template-areas: @@ -95,33 +93,12 @@ html[dir="rtl"] .how-to ol > li::before { "list image" } - .how-to-media { + .how-to-image { order: unset; height: 0; } - .how-to.large-image .how-to-media, - .how-to.large-media .how-to-media { + .how-to.large-image .how-to-image { height: auto; } } - -/* Desktop video */ -@media screen and (min-width: 1200px) { - .how-to .foreground.has-video { - column-gap: var(--spacing-m); - grid-template-rows: 1fr; - grid-template-areas: - "heading heading" - "list list" - } - - .how-to.large-image .foreground.has-video, - .how-to.large-media .foreground.has-video { - grid-template-rows: 1fr; - grid-auto-rows: min-content; - grid-template-areas: - "heading heading" - "list image" - } -} diff --git a/libs/blocks/how-to/how-to.js b/libs/blocks/how-to/how-to.js index acf282ae5c..7e42ba666f 100644 --- a/libs/blocks/how-to/how-to.js +++ b/libs/blocks/how-to/how-to.js @@ -47,7 +47,6 @@ const setJsonLd = (heading, description, mainImage, stepsLd) => { }; const getImage = (el) => el.querySelector('picture') || el.querySelector('a[href$=".svg"'); -const getVideo = (el) => el.querySelector('a[href*=".mp4"]'); const getHowToInfo = (el) => { const infoDiv = el.querySelector(':scope > div > div'); @@ -60,7 +59,6 @@ const getHowToInfo = (el) => { } const image = getImage(infoDiv.lastElementChild); - const video = getVideo(infoDiv.lastElementChild); const desc = infoDiv.childElementCount > 2 || (infoDiv.childElementCount === 2 && !image) ? infoDiv.children[1] @@ -75,7 +73,6 @@ const getHowToInfo = (el) => { heading, desc, mainImage: image, - mainVideo: video, }; }; @@ -119,24 +116,19 @@ const getHowToSteps = (el) => { export default function init(el) { el.classList.add('con-block'); const isSeo = el.classList.contains('seo'); - const isLargeMedia = el.classList.contains('large-image') || el.classList.contains('large-media'); + const isLargeImage = el.classList.contains('large-image'); - const { desc, heading, mainImage, mainVideo } = getHowToInfo(el); + const { desc, heading, mainImage } = getHowToInfo(el); const { steps, images } = getHowToSteps(el); const orderedList = document.createElement('ol'); if (steps) orderedList.append(...steps); if (mainImage) { - const imageClass = `how-to-media${isLargeMedia ? ' how-to-media-large' : ''}`; + const imageClass = `how-to-image${isLargeImage ? ' how-to-image-large' : ''}`; el.append(createTag('div', { class: imageClass }, mainImage)); } - if (mainVideo) { - const videoClass = `how-to-media${isLargeMedia ? ' how-to-media-large' : ''}`; - el.append(createTag('div', { class: videoClass }, mainVideo)); - } - if (isSeo) { const stepsLd = steps.map((step, idx) => getStepLd(idx + 1, heading.id, images[idx], step)); setJsonLd(heading?.textContent, desc?.textContent, mainImage, stepsLd); @@ -145,7 +137,6 @@ export default function init(el) { const rows = el.querySelectorAll(':scope > div'); const foreground = createTag('div', { class: 'foreground' }); if (mainImage) foreground.classList.add('has-image'); - if (mainVideo) foreground.classList.add('has-video'); rows.forEach((row) => { foreground.appendChild(row); }); foreground.appendChild(orderedList); el.appendChild(foreground); diff --git a/libs/blocks/merch/merch.js b/libs/blocks/merch/merch.js index 8cce3dfed0..1c17da5b83 100644 --- a/libs/blocks/merch/merch.js +++ b/libs/blocks/merch/merch.js @@ -10,17 +10,6 @@ export const PRICE_TEMPLATE_DISCOUNT = 'discount'; export const PRICE_TEMPLATE_OPTICAL = 'optical'; export const PRICE_TEMPLATE_REGULAR = 'price'; export const PRICE_TEMPLATE_STRIKETHROUGH = 'strikethrough'; -export const PRICE_TEMPLATE_ANNUAL = 'annual'; -const PRICE_TEMPLATE_MAPPING = new Map([ - ['priceDiscount', PRICE_TEMPLATE_DISCOUNT], - [PRICE_TEMPLATE_DISCOUNT, PRICE_TEMPLATE_DISCOUNT], - ['priceOptical', PRICE_TEMPLATE_OPTICAL], - [PRICE_TEMPLATE_OPTICAL, PRICE_TEMPLATE_OPTICAL], - ['priceStrikethrough', PRICE_TEMPLATE_STRIKETHROUGH], - [PRICE_TEMPLATE_STRIKETHROUGH, PRICE_TEMPLATE_STRIKETHROUGH], - ['priceAnnual', PRICE_TEMPLATE_ANNUAL], - [PRICE_TEMPLATE_ANNUAL, PRICE_TEMPLATE_ANNUAL], -]); export const PLACEHOLDER_KEY_DOWNLOAD = 'download'; @@ -426,8 +415,24 @@ export async function getPriceContext(el, params) { const displayRecurrence = params.get('term'); const displayTax = params.get('tax'); const forceTaxExclusive = params.get('exclusive'); - // The PRICE_TEMPLATE_MAPPING supports legacy OST links - const template = PRICE_TEMPLATE_MAPPING.get(params.get('type')) ?? PRICE_TEMPLATE_REGULAR; + let template = PRICE_TEMPLATE_REGULAR; + // This mapping also supports legacy OST links + switch (params.get('type')) { + case PRICE_TEMPLATE_DISCOUNT: + case 'priceDiscount': + template = PRICE_TEMPLATE_DISCOUNT; + break; + case PRICE_TEMPLATE_OPTICAL: + case 'priceOptical': + template = PRICE_TEMPLATE_OPTICAL; + break; + case PRICE_TEMPLATE_STRIKETHROUGH: + case 'priceStrikethrough': + template = PRICE_TEMPLATE_STRIKETHROUGH; + break; + default: + break; + } return { ...context, displayOldPrice, diff --git a/libs/blocks/ost/ost.js b/libs/blocks/ost/ost.js index 13b1b67f7f..d1faa839ee 100644 --- a/libs/blocks/ost/ost.js +++ b/libs/blocks/ost/ost.js @@ -8,7 +8,7 @@ const IMS_COMMERCE_CLIENT_ID = 'aos_milo_commerce'; const IMS_SCOPE = 'AdobeID,openid'; const IMS_ENV = 'prod'; const IMS_PROD_URL = 'https://auth.services.adobe.com/imslib/imslib.min.js'; -const OST_VERSION = '1.18.2'; +const OST_VERSION = '1.14.4'; const OST_BASE = `https://www.stage.adobe.com/special/tacocat/ost/lib/${OST_VERSION}`; const OST_SCRIPT_URL = `${OST_BASE}/index.js`; const OST_STYLE_URL = `${OST_BASE}/index.css`; diff --git a/libs/blocks/quiz-results/quiz-results.js b/libs/blocks/quiz-results/quiz-results.js index 7465782fc7..b1c7c3f159 100644 --- a/libs/blocks/quiz-results/quiz-results.js +++ b/libs/blocks/quiz-results/quiz-results.js @@ -1,6 +1,6 @@ import { createTag, getConfig } from '../../utils/utils.js'; import { handleStyle } from '../section-metadata/section-metadata.js'; -import { getNormalizedMetadata, getLocalizedURL } from '../quiz/utils.js'; +import { getNormalizedMetadata } from '../quiz/utils.js'; import { decorateSectionAnalytics } from '../../martech/attributes.js'; export const LOADING_ERROR = 'Could not load quiz results:'; @@ -19,7 +19,7 @@ async function loadFragments(el, experiences) { } function redirectPage(quizUrl, debug, message) { - const url = quizUrl ? getLocalizedURL(quizUrl.text) : 'https://adobe.com'; + const url = (quizUrl) ? quizUrl.text : 'https://adobe.com'; window.lana.log(message, { tags: 'errorType=error,module=quiz-results' }); if (debug === 'quiz-results') { diff --git a/libs/blocks/quiz/quiz.js b/libs/blocks/quiz/quiz.js index 413963e545..3aabbde78e 100644 --- a/libs/blocks/quiz/quiz.js +++ b/libs/blocks/quiz/quiz.js @@ -7,7 +7,6 @@ import { DecorateBlockBackground, DecorateBlockForeground } from './quizcontaine import { initConfigPathGlob, handleResultFlow, handleNext, transformToFlowData, getQuizData, getAnalyticsDataForBtn, getUrlParams, isValidUrl, - getLocalizedURL, } from './utils.js'; import StepIndicator from './stepIndicator.js'; @@ -266,7 +265,7 @@ const App = ({ }; const fragmentURL = getStringValue('footerFragment'); if (fragmentURL) { - loadFragments(getLocalizedURL(fragmentURL)); + loadFragments(fragmentURL); } const iconBg = getStringValue('icon-background-color'); if (iconBg) { diff --git a/libs/blocks/quiz/utils.js b/libs/blocks/quiz/utils.js index 6bf625db5f..4af0f53590 100644 --- a/libs/blocks/quiz/utils.js +++ b/libs/blocks/quiz/utils.js @@ -18,7 +18,7 @@ const initConfigPath = (quizMetaData) => { const quizConfigPath = quizMetaData.data.text; const urlParams = new URLSearchParams(window.location.search); const stringsPath = urlParams.get('quiz-data'); - return (filepath) => `${stringsPath || getLocalizedURL(quizConfigPath)}${filepath}`; + return (filepath) => `${stringsPath || quizConfigPath}${filepath}`; }; async function fetchContentOfFile(path) { @@ -84,8 +84,7 @@ export const findAndStoreResultData = async (answers = []) => { let umbrellaProduct = ''; if (resultData.matchedResults.length > 0) { - destinationPage = getLocalizedURL(resultData.matchedResults[0].url); - + destinationPage = resultData.matchedResults[0].url; primaryProductCodes = resultData.primary; secondaryProductCodes = resultData.secondary; umbrellaProduct = resultData.matchedResults[0]['umbrella-result']; @@ -169,11 +168,11 @@ export const structuredFragments = ( resultResources?.data?.forEach((row) => { if (umbrellaProduct) { if (umbrellaProduct && row.product === umbrellaProduct) { - structureFragments.push(getLocalizedURL(row[fragment])); + structureFragments.push(row[fragment]); } } else if (primaryProducts?.length > 0 && primaryProducts.includes(row.product) && row[fragment]) { - structureFragments.push(getLocalizedURL(row[fragment])); + structureFragments.push(row[fragment]); } }); }); @@ -234,7 +233,7 @@ const getNestedFragments = (resultResources, productCodes, fragKey) => { function insertFragment() { row[fragKey]?.split(',').forEach((val) => { - fragArray.push(getLocalizedURL(val.trim())); + fragArray.push(val.trim()); }); } }); @@ -498,9 +497,3 @@ export const getAnalyticsDataForLocalStorage = (config) => { export const isValidUrl = (url) => VALID_URL_RE.test(url); export const getNormalizedMetadata = (el) => normalizeKeys(getMetadata(el)); - -export const getLocalizedURL = (originalURL) => { - const { locale } = getConfig(); - const { prefix, ietf = 'en-US' } = locale || {}; - return ietf !== 'en-US' && !originalURL.startsWith(`${prefix}/`) ? `${prefix}${originalURL}` : originalURL; -}; diff --git a/libs/blocks/section-metadata/section-metadata.css b/libs/blocks/section-metadata/section-metadata.css index 82d18fbb26..6163bcbacd 100644 --- a/libs/blocks/section-metadata/section-metadata.css +++ b/libs/blocks/section-metadata/section-metadata.css @@ -298,19 +298,19 @@ main > .section[class*='-up'] > .content { @media screen and (min-width: 1200px) { .section.two-up { - grid-template-columns: repeat(2, minmax(0, 1fr)); + grid-template-columns: repeat(2, 1fr); } .section.three-up { - grid-template-columns: repeat(3, minmax(0, 1fr)); + grid-template-columns: repeat(3, 1fr); } .section.four-up { - grid-template-columns: repeat(4, minmax(0, 1fr)); + grid-template-columns: repeat(4, 1fr); } .section.five-up { - grid-template-columns: repeat(5, minmax(0, 1fr)); + grid-template-columns: repeat(5, 1fr); } .section.grid-template-columns-1-2 { diff --git a/libs/deps/commerce.js b/libs/deps/commerce.js index 2367f70d5e..d925bbbb6a 100644 --- a/libs/deps/commerce.js +++ b/libs/deps/commerce.js @@ -1,5 +1,5 @@ -// branch: develop commit: b3f6608faa10db8d0187b310044d4690d063f1bf Thu, 06 Jun 2024 16:47:00 GMT -var Ur=Object.defineProperty;var ii=(e,t,r)=>t in e?Ur(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var oi=(e,t)=>{for(var r in t)Ur(e,r,{get:t[r],enumerable:!0})};var te=(e,t,r)=>(ii(e,typeof t!="symbol"?t+"":t,r),r),Dr=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)};var Ot=(e,t,r)=>(Dr(e,t,"read from private field"),r?r.call(e):t.get(e)),Mr=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},Lt=(e,t,r,n)=>(Dr(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r);var Ce;(function(e){e.ServerError="ServerError",e.ClientError="ClientError",e.UnexpectedError="UnexpectedError"})(Ce||(Ce={}));var kr=(e,t,r)=>({type:(i=>i>=500?Ce.ServerError:i<400?Ce.UnexpectedError:Ce.ClientError)(e),message:t,originatingRequest:r,status:e});var si=function(e,t,r,n){function i(o){return o instanceof r?o:new r(function(s){s(o)})}return new(r||(r=Promise))(function(o,s){function a(u){try{l(n.next(u))}catch(p){s(p)}}function c(u){try{l(n.throw(u))}catch(p){s(p)}}function l(u){u.done?o(u.value):i(u.value).then(a,c)}l((n=n.apply(e,t||[])).next())})},He;(function(e){e.AUTHORIZATION="Authorization",e.X_API_KEY="X-Api-Key"})(He||(He={}));var Nt=class{constructor(t){this.fetchOptions=t}commonHeaders(){let t={};return this.fetchOptions.apiKey&&(t[He.X_API_KEY]=this.fetchOptions.apiKey),this.fetchOptions.accessToken&&(t[He.AUTHORIZATION]=`Bearer ${this.fetchOptions.accessToken}`),t}transformData(t,r){return r?t.map(n=>r(n)):t.map(n=>this.identifyTransform(n))}transformDatum(t,r){return r?r(t):this.identifyTransform(t)}identifyTransform(t){return t}failOnBadStatusOrParseBody(t,r){return si(this,void 0,void 0,function*(){if(t.ok)return t.json().then(i=>({headers:t.headers,status:t.status,statusText:t.statusText,data:i}));let n=yield t.text();return Promise.reject(kr(t.status,n,r))})}buildUrl(t,r,n,i,o){var s;let a=(s=this.fetchOptions.baseUrl)!==null&&s!==void 0?s:i(this.fetchOptions.env),c=o(r,n);return this.generateUrl(a,t,c)}generateUrl(t,r,n){let i=new URL(r,t);return n&&(i.search=this.convertToSearchParams(n).toString()),i.toString()}convertToSearchParams(t){return new URLSearchParams(t)}setParams(t,r,n){n!=null&&typeof n=="boolean"?t[r]=String(n):n&&(t[r]=n)}},Ct=Nt;var W;(function(e){e.STAGE="STAGE",e.PRODUCTION="PRODUCTION",e.LOCAL="LOCAL"})(W||(W={}));var Re;(function(e){e.STAGE="STAGE",e.PRODUCTION="PROD",e.LOCAL="LOCAL"})(Re||(Re={}));var M;(function(e){e.DRAFT="DRAFT",e.PUBLISHED="PUBLISHED"})(M||(M={}));var le;(function(e){e.V2="UCv2",e.V3="UCv3"})(le||(le={}));var oe;(function(e){e.CHECKOUT="checkout",e.CHECKOUT_EMAIL="checkout/email",e.SEGMENTATION="segmentation",e.BUNDLE="bundle",e.COMMITMENT="commitment",e.RECOMMENDATION="recommendation",e.EMAIL="email",e.PAYMENT="payment",e.CHANGE_PLAN_TEAM_PLANS="change-plan/team-upgrade/plans",e.CHANGE_PLAN_TEAM_PAYMENT="change-plan/team-upgrade/payment"})(oe||(oe={}));var Rt=function(e){var t;return(t=ai.get(e))!==null&&t!==void 0?t:e},ai=new Map([["countrySpecific","cs"],["quantity","q"],["authCode","code"],["checkoutPromoCode","apc"],["rurl","rUrl"],["curl","cUrl"],["ctxrturl","ctxRtUrl"],["country","co"],["language","lang"],["clientId","cli"],["context","ctx"],["productArrangementCode","pa"],["offerType","ot"],["marketSegment","ms"]]);var Gr=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Fr=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],s;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(s)throw s.error}}return o};function ve(e,t,r){var n,i;try{for(var o=Gr(Object.entries(e)),s=o.next();!s.done;s=o.next()){var a=Fr(s.value,2),c=a[0],l=a[1],u=Rt(c);l!=null&&r.has(u)&&t.set(u,l)}}catch(p){n={error:p}}finally{try{s&&!s.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}}function Xe(e){switch(e){case W.PRODUCTION:return"https://commerce.adobe.com";default:return"https://commerce-stg.adobe.com"}}function Be(e,t){var r,n;for(var i in e){var o=e[i];try{for(var s=(r=void 0,Gr(Object.entries(o))),a=s.next();!a.done;a=s.next()){var c=Fr(a.value,2),l=c[0],u=c[1];if(u!=null){var p=Rt(l);t.set("items["+i+"]["+p+"]",u)}}}catch(f){r={error:f}}finally{try{a&&!a.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}}}var ci=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};function Vr(e){pi(e);var t=e.env,r=e.items,n=e.workflowStep,i=ci(e,["env","items","workflowStep"]),o=new URL(Xe(t));return o.pathname=n+"/",Be(r,o.searchParams),ve(i,o.searchParams,li),o.toString()}var li=new Set(["cli","co","lang","ctx","cUrl","mv","nglwfdata","otac","promoid","rUrl","sdid","spint","trackingid","code","campaignid","appctxid"]),fi=["env","workflowStep","clientId","country","items"];function pi(e){var t,r;try{for(var n=ui(fi),i=n.next();!i.done;i=n.next()){var o=i.value;if(!e[o])throw new Error('Argument "checkoutData" is not valid, missing: '+o)}}catch(s){t={error:s}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}return!0}var mi=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},di="p_draft_landscape",Ei="/store/";function Ut(e){xi(e);var t=e.env,r=e.items,n=e.workflowStep,i=e.ms,o=e.marketSegment,s=e.ot,a=e.offerType,c=e.pa,l=e.productArrangementCode,u=e.landscape,p=mi(e,["env","items","workflowStep","ms","marketSegment","ot","offerType","pa","productArrangementCode","landscape"]),f={marketSegment:o??i,offerType:a??s,productArrangementCode:l??c},m=new URL(Xe(t));return m.pathname=""+Ei+n,n!==oe.SEGMENTATION?Be(r,m.searchParams):ve(f,m.searchParams,It),ve(p,m.searchParams,It),u===M.DRAFT&&ve({af:di},m.searchParams,It),m.toString()}var It=new Set(["af","ai","apc","appctxid","cli","co","csm","ctx","ctxRtUrl","DCWATC","dp","fr","gsp","ijt","lang","lo","mal","ms","mv","mv2","nglwfdata","ot","otac","pa","pcid","promoid","q","rf","sc","scl","sdid","sid","spint","svar","th","thm","trackingid","usid","workflowid","context.guid","so.ca","so.su","so.tr","so.va"]),gi=["env","workflowStep","clientId","country"];function xi(e){var t,r;try{for(var n=hi(gi),i=n.next();!i.done;i=n.next()){var o=i.value;if(!e[o])throw new Error('Argument "checkoutData" is not valid, missing: '+o)}}catch(s){t={error:s}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}if(e.workflowStep!==oe.SEGMENTATION&&!e.items)throw new Error('Argument "checkoutData" is not valid, missing: items');return!0}function Dt(e,t){switch(e){case le.V2:return Vr(t);case le.V3:return Ut(t);default:return console.warn("Unsupported CheckoutType, will use UCv3 as default. Given type: "+e),Ut(t)}}var Mt;(function(e){e.BASE="BASE",e.TRIAL="TRIAL",e.PROMOTION="PROMOTION"})(Mt||(Mt={}));var C;(function(e){e.MONTH="MONTH",e.YEAR="YEAR",e.TWO_YEARS="TWO_YEARS",e.THREE_YEARS="THREE_YEARS",e.PERPETUAL="PERPETUAL",e.TERM_LICENSE="TERM_LICENSE",e.ACCESS_PASS="ACCESS_PASS",e.THREE_MONTHS="THREE_MONTHS",e.SIX_MONTHS="SIX_MONTHS"})(C||(C={}));var w;(function(e){e.ANNUAL="ANNUAL",e.MONTHLY="MONTHLY",e.TWO_YEARS="TWO_YEARS",e.THREE_YEARS="THREE_YEARS",e.P1D="P1D",e.P1Y="P1Y",e.P3Y="P3Y",e.P10Y="P10Y",e.P15Y="P15Y",e.P3D="P3D",e.P7D="P7D",e.P30D="P30D",e.HALF_YEARLY="HALF_YEARLY",e.QUARTERLY="QUARTERLY"})(w||(w={}));var kt;(function(e){e.INDIVIDUAL="INDIVIDUAL",e.TEAM="TEAM",e.ENTERPRISE="ENTERPRISE"})(kt||(kt={}));var Gt;(function(e){e.COM="COM",e.EDU="EDU",e.GOV="GOV"})(Gt||(Gt={}));var Ft;(function(e){e.DIRECT="DIRECT",e.INDIRECT="INDIRECT"})(Ft||(Ft={}));var Vt;(function(e){e.ENTERPRISE_PRODUCT="ENTERPRISE_PRODUCT",e.ETLA="ETLA",e.RETAIL="RETAIL",e.VIP="VIP",e.VIPMP="VIPMP",e.FREE="FREE"})(Vt||(Vt={}));var yi=M.PUBLISHED,jr=e=>{switch(e){case W.PRODUCTION:return"https://wcs.adobe.io";case W.STAGE:return"https://wcs-stage.adobe.io";case W.LOCAL:return"http://localhost:3002";default:return"https://wcs-stage.adobe.io"}},Wr=(e,t)=>{var r;return e.api_key=t.apiKey,e.landscape=(r=t.landscape)!==null&&r!==void 0?r:yi,e};var vi=function(e,t,r,n){function i(o){return o instanceof r?o:new r(function(s){s(o)})}return new(r||(r=Promise))(function(o,s){function a(u){try{l(n.next(u))}catch(p){s(p)}}function c(u){try{l(n.throw(u))}catch(p){s(p)}}function l(u){u.done?o(u.value):i(u.value).then(a,c)}l((n=n.apply(e,t||[])).next())})},jt=class extends Ct{constructor(t){super(t),this.apiPaths={getWebCommerceArtifact:"web_commerce_artifact"},this.getWebCommerceArtifact=(r,n,i,o)=>vi(this,void 0,void 0,function*(){let s=this.buildUrl(this.apiPaths.getWebCommerceArtifact,n,r,a=>jr(a),(a,c)=>this.evaluateGetWebCommerceArtifactParams(a,c));return this.fetchOptions.fetch(s,{signal:o,headers:Object.assign({},this.commonHeaders()),mode:"cors"}).then(a=>this.failOnBadStatusOrParseBody(a,`GET ${s}`)).then(a=>{let l=a.data;return{data:this.transformDatum(l,i)}})})}evaluateGetWebCommerceArtifactParams(t,r){let n={};return this.setParams(n,"offer_selector_ids",r.offerSelectorIds.join(",")),this.setParams(n,"country",r.country),this.setParams(n,"language",r.language),this.setParams(n,"currency",r.currency),this.setParams(n,"locale",r.locale),this.setParams(n,"promotion_code",r.promotionCode),Wr(n,t)}},Hr=jt;var Ye=e=>new Hr(e).getWebCommerceArtifact;var Xr="tacocat.js";var $e=(e,t)=>String(e??"").toLowerCase()==String(t??"").toLowerCase(),Br=e=>`${e??""}`.replace(/[&<>'"]/g,t=>({"&":"&","<":"<",">":">","'":"'",'"':"""})[t]??t)??"";function A(e,t={},{metadata:r=!0,search:n=!0,storage:i=!0}={}){let o;if(n&&o==null){let s=new URLSearchParams(window.location.search),a=Te(n)?n:e;o=s.get(a)}if(i&&o==null){let s=Te(i)?i:e;o=window.sessionStorage.getItem(s)??window.localStorage.getItem(s)}if(r&&o==null){let s=qr(Te(r)?r:e);o=document.documentElement.querySelector(`meta[name="${s}"]`)?.content}return o??t[e]}var be=()=>{};var Yr=e=>typeof e=="boolean",se=e=>typeof e=="function",qe=e=>typeof e=="number",$r=e=>e!=null&&typeof e=="object";var Te=e=>typeof e=="string",Wt=e=>Te(e)&&e,Pe=e=>qe(e)&&Number.isFinite(e)&&e>0;function _e(e,t=r=>r==null||r===""){return e!=null&&Object.entries(e).forEach(([r,n])=>{t(n)&&delete e[r]}),e}function b(e,t){if(Yr(e))return e;let r=String(e);return r==="1"||r==="true"?!0:r==="0"||r==="false"?!1:t}function re(e,t,r){let n=Object.values(t);return n.find(i=>$e(i,e))??r??n[0]}function qr(e=""){return String(e).replace(/(\p{Lowercase_Letter})(\p{Uppercase_Letter})/gu,(t,r,n)=>`${r}-${n}`).replace(/\W+/gu,"-").toLowerCase()}function Se(e,t=1){return qe(e)||(e=Number.parseInt(e,10)),!Number.isNaN(e)&&e>0&&Number.isFinite(e)?e:t}var Ti=Date.now(),Ht=()=>`(+${Date.now()-Ti}ms)`,ze=new Set,bi=b(A("tacocat.debug",{},{metadata:!1}),typeof process<"u"&&process.env?.DEBUG);function zr(e){let t=`[${Xr}/${e}]`,r=(s,a,...c)=>s?!0:(i(a,...c),!1),n=bi?(s,...a)=>{console.debug(`${t} ${s}`,...a,Ht())}:()=>{},i=(s,...a)=>{let c=`${t} ${s}`;ze.forEach(([l])=>l(c,...a))};return{assert:r,debug:n,error:i,warn:(s,...a)=>{let c=`${t} ${s}`;ze.forEach(([,l])=>l(c,...a))}}}function Pi(e,t){let r=[e,t];return ze.add(r),()=>{ze.delete(r)}}Pi((e,...t)=>{console.error(e,...t,Ht())},(e,...t)=>{console.warn(e,...t,Ht())});var _i="no promo",Zr="promo-tag",Si="yellow",Ai="neutral",wi=(e,t,r)=>{let n=o=>o||_i,i=r?` (was "${n(t)}")`:"";return`${n(e)}${i}`},Oi="cancel-context",Ie=(e,t)=>{let r=e===Oi,n=!r&&e?.length>0,i=(n||r)&&(t&&t!=e||!t&&!r),o=i&&n||!i&&!!t,s=o?e||t:void 0;return{effectivePromoCode:s,overridenPromoCode:e,className:o?Zr:`${Zr} no-promo`,text:wi(s,t,i),variant:o?Si:Ai,isOverriden:i}};var Xt=function(e,t){return Xt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},Xt(e,t)};function Ue(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Xt(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var T=function(){return T=Object.assign||function(t){for(var r,n=1,i=arguments.length;n0}),r=[],n=0,i=t;n1)throw new RangeError("integer-width stems only accept a single optional option");i.options[0].replace(Ci,function(a,c,l,u,p,f){if(c)t.minimumIntegerDigits=l.length;else{if(u&&p)throw new Error("We currently do not support maximum integer digits");if(f)throw new Error("We currently do not support exact integer digits")}return""});continue}if(an.test(i.stem)){t.minimumIntegerDigits=i.stem.length;continue}if(tn.test(i.stem)){if(i.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");i.stem.replace(tn,function(a,c,l,u,p,f){return l==="*"?t.minimumFractionDigits=c.length:u&&u[0]==="#"?t.maximumFractionDigits=u.length:p&&f?(t.minimumFractionDigits=p.length,t.maximumFractionDigits=p.length+f.length):(t.minimumFractionDigits=c.length,t.maximumFractionDigits=c.length),""}),i.options.length&&(t=T(T({},t),rn(i.options[0])));continue}if(sn.test(i.stem)){t=T(T({},t),rn(i.stem));continue}var o=cn(i.stem);o&&(t=T(T({},t),o));var s=Ri(i.stem);s&&(t=T(T({},t),s))}return t}var $t,Ii=new RegExp("^"+Yt.source+"*"),Ui=new RegExp(Yt.source+"*$");function E(e,t){return{start:e,end:t}}var Di=!!String.prototype.startsWith,Mi=!!String.fromCodePoint,ki=!!Object.fromEntries,Gi=!!String.prototype.codePointAt,Fi=!!String.prototype.trimStart,Vi=!!String.prototype.trimEnd,ji=!!Number.isSafeInteger,Wi=ji?Number.isSafeInteger:function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},zt=!0;try{ln=hn("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu"),zt=(($t=ln.exec("a"))===null||$t===void 0?void 0:$t[0])==="a"}catch{zt=!1}var ln,fn=Di?function(t,r,n){return t.startsWith(r,n)}:function(t,r,n){return t.slice(n,n+r.length)===r},Zt=Mi?String.fromCodePoint:function(){for(var t=[],r=0;ro;){if(s=t[o++],s>1114111)throw RangeError(s+" is not a valid code point");n+=s<65536?String.fromCharCode(s):String.fromCharCode(((s-=65536)>>10)+55296,s%1024+56320)}return n},pn=ki?Object.fromEntries:function(t){for(var r={},n=0,i=t;n=n)){var i=t.charCodeAt(r),o;return i<55296||i>56319||r+1===n||(o=t.charCodeAt(r+1))<56320||o>57343?i:(i-55296<<10)+(o-56320)+65536}},Hi=Fi?function(t){return t.trimStart()}:function(t){return t.replace(Ii,"")},Xi=Vi?function(t){return t.trimEnd()}:function(t){return t.replace(Ui,"")};function hn(e,t){return new RegExp(e,t)}var Qt;zt?(qt=hn("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu"),Qt=function(t,r){var n;qt.lastIndex=r;var i=qt.exec(t);return(n=i[1])!==null&&n!==void 0?n:""}):Qt=function(t,r){for(var n=[];;){var i=mn(t,r);if(i===void 0||En(i)||$i(i))break;n.push(i),r+=i>=65536?2:1}return Zt.apply(void 0,n)};var qt,dn=function(){function e(t,r){r===void 0&&(r={}),this.message=t,this.position={offset:0,line:1,column:1},this.ignoreTag=!!r.ignoreTag,this.requiresOtherClause=!!r.requiresOtherClause,this.shouldParseSkeletons=!!r.shouldParseSkeletons}return e.prototype.parse=function(){if(this.offset()!==0)throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},e.prototype.parseMessage=function(t,r,n){for(var i=[];!this.isEOF();){var o=this.char();if(o===123){var s=this.parseArgument(t,n);if(s.err)return s;i.push(s.val)}else{if(o===125&&t>0)break;if(o===35&&(r==="plural"||r==="selectordinal")){var a=this.clonePosition();this.bump(),i.push({type:S.pound,location:E(a,this.clonePosition())})}else if(o===60&&!this.ignoreTag&&this.peek()===47){if(n)break;return this.error(d.UNMATCHED_CLOSING_TAG,E(this.clonePosition(),this.clonePosition()))}else if(o===60&&!this.ignoreTag&&Jt(this.peek()||0)){var s=this.parseTag(t,r);if(s.err)return s;i.push(s.val)}else{var s=this.parseLiteral(t,r);if(s.err)return s;i.push(s.val)}}}return{val:i,err:null}},e.prototype.parseTag=function(t,r){var n=this.clonePosition();this.bump();var i=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:S.literal,value:"<"+i+"/>",location:E(n,this.clonePosition())},err:null};if(this.bumpIf(">")){var o=this.parseMessage(t+1,r,!0);if(o.err)return o;var s=o.val,a=this.clonePosition();if(this.bumpIf("")?{val:{type:S.tag,value:i,children:s,location:E(n,this.clonePosition())},err:null}:this.error(d.INVALID_TAG,E(a,this.clonePosition())))}else return this.error(d.UNCLOSED_TAG,E(n,this.clonePosition()))}else return this.error(d.INVALID_TAG,E(n,this.clonePosition()))},e.prototype.parseTagName=function(){var t=this.offset();for(this.bump();!this.isEOF()&&Yi(this.char());)this.bump();return this.message.slice(t,this.offset())},e.prototype.parseLiteral=function(t,r){for(var n=this.clonePosition(),i="";;){var o=this.tryParseQuote(r);if(o){i+=o;continue}var s=this.tryParseUnquoted(t,r);if(s){i+=s;continue}var a=this.tryParseLeftAngleBracket();if(a){i+=a;continue}break}var c=E(n,this.clonePosition());return{val:{type:S.literal,value:i,location:c},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!Bi(this.peek()||0))?(this.bump(),"<"):null},e.prototype.tryParseQuote=function(t){if(this.isEOF()||this.char()!==39)return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if(t==="plural"||t==="selectordinal")break;return null;default:return null}this.bump();var r=[this.char()];for(this.bump();!this.isEOF();){var n=this.char();if(n===39)if(this.peek()===39)r.push(39),this.bump();else{this.bump();break}else r.push(n);this.bump()}return Zt.apply(void 0,r)},e.prototype.tryParseUnquoted=function(t,r){if(this.isEOF())return null;var n=this.char();return n===60||n===123||n===35&&(r==="plural"||r==="selectordinal")||n===125&&t>0?null:(this.bump(),Zt(n))},e.prototype.parseArgument=function(t,r){var n=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(d.EXPECT_ARGUMENT_CLOSING_BRACE,E(n,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(d.EMPTY_ARGUMENT,E(n,this.clonePosition()));var i=this.parseIdentifierIfPossible().value;if(!i)return this.error(d.MALFORMED_ARGUMENT,E(n,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(d.EXPECT_ARGUMENT_CLOSING_BRACE,E(n,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:S.argument,value:i,location:E(n,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(d.EXPECT_ARGUMENT_CLOSING_BRACE,E(n,this.clonePosition())):this.parseArgumentOptions(t,r,i,n);default:return this.error(d.MALFORMED_ARGUMENT,E(n,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var t=this.clonePosition(),r=this.offset(),n=Qt(this.message,r),i=r+n.length;this.bumpTo(i);var o=this.clonePosition(),s=E(t,o);return{value:n,location:s}},e.prototype.parseArgumentOptions=function(t,r,n,i){var o,s=this.clonePosition(),a=this.parseIdentifierIfPossible().value,c=this.clonePosition();switch(a){case"":return this.error(d.EXPECT_ARGUMENT_TYPE,E(s,c));case"number":case"date":case"time":{this.bumpSpace();var l=null;if(this.bumpIf(",")){this.bumpSpace();var u=this.clonePosition(),p=this.parseSimpleArgStyleIfPossible();if(p.err)return p;var f=Xi(p.val);if(f.length===0)return this.error(d.EXPECT_ARGUMENT_STYLE,E(this.clonePosition(),this.clonePosition()));var m=E(u,this.clonePosition());l={style:f,styleLocation:m}}var h=this.tryParseArgumentClose(i);if(h.err)return h;var x=E(i,this.clonePosition());if(l&&fn(l?.style,"::",0)){var y=Hi(l.style.slice(2));if(a==="number"){var p=this.parseNumberSkeletonFromString(y,l.styleLocation);return p.err?p:{val:{type:S.number,value:n,location:x,style:p.val},err:null}}else{if(y.length===0)return this.error(d.EXPECT_DATE_TIME_SKELETON,x);var f={type:fe.dateTime,pattern:y,location:l.styleLocation,parsedOptions:this.shouldParseSkeletons?Kr(y):{}},L=a==="date"?S.date:S.time;return{val:{type:L,value:n,location:x,style:f},err:null}}}return{val:{type:a==="number"?S.number:a==="date"?S.date:S.time,value:n,location:x,style:(o=l?.style)!==null&&o!==void 0?o:null},err:null}}case"plural":case"selectordinal":case"select":{var P=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(d.EXPECT_SELECT_ARGUMENT_OPTIONS,E(P,T({},P)));this.bumpSpace();var v=this.parseIdentifierIfPossible(),O=0;if(a!=="select"&&v.value==="offset"){if(!this.bumpIf(":"))return this.error(d.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,E(this.clonePosition(),this.clonePosition()));this.bumpSpace();var p=this.tryParseDecimalInteger(d.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,d.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(p.err)return p;this.bumpSpace(),v=this.parseIdentifierIfPossible(),O=p.val}var _=this.tryParsePluralOrSelectOptions(t,a,r,v);if(_.err)return _;var h=this.tryParseArgumentClose(i);if(h.err)return h;var U=E(i,this.clonePosition());return a==="select"?{val:{type:S.select,value:n,options:pn(_.val),location:U},err:null}:{val:{type:S.plural,value:n,options:pn(_.val),offset:O,pluralType:a==="plural"?"cardinal":"ordinal",location:U},err:null}}default:return this.error(d.INVALID_ARGUMENT_TYPE,E(s,c))}},e.prototype.tryParseArgumentClose=function(t){return this.isEOF()||this.char()!==125?this.error(d.EXPECT_ARGUMENT_CLOSING_BRACE,E(t,this.clonePosition())):(this.bump(),{val:!0,err:null})},e.prototype.parseSimpleArgStyleIfPossible=function(){for(var t=0,r=this.clonePosition();!this.isEOF();){var n=this.char();switch(n){case 39:{this.bump();var i=this.clonePosition();if(!this.bumpUntil("'"))return this.error(d.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,E(i,this.clonePosition()));this.bump();break}case 123:{t+=1,this.bump();break}case 125:{if(t>0)t-=1;else return{val:this.message.slice(r.offset,this.offset()),err:null};break}default:this.bump();break}}return{val:this.message.slice(r.offset,this.offset()),err:null}},e.prototype.parseNumberSkeletonFromString=function(t,r){var n=[];try{n=on(t)}catch{return this.error(d.INVALID_NUMBER_SKELETON,r)}return{val:{type:fe.number,tokens:n,location:r,parsedOptions:this.shouldParseSkeletons?un(n):{}},err:null}},e.prototype.tryParsePluralOrSelectOptions=function(t,r,n,i){for(var o,s=!1,a=[],c=new Set,l=i.value,u=i.location;;){if(l.length===0){var p=this.clonePosition();if(r!=="select"&&this.bumpIf("=")){var f=this.tryParseDecimalInteger(d.EXPECT_PLURAL_ARGUMENT_SELECTOR,d.INVALID_PLURAL_ARGUMENT_SELECTOR);if(f.err)return f;u=E(p,this.clonePosition()),l=this.message.slice(p.offset,this.offset())}else break}if(c.has(l))return this.error(r==="select"?d.DUPLICATE_SELECT_ARGUMENT_SELECTOR:d.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,u);l==="other"&&(s=!0),this.bumpSpace();var m=this.clonePosition();if(!this.bumpIf("{"))return this.error(r==="select"?d.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:d.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,E(this.clonePosition(),this.clonePosition()));var h=this.parseMessage(t+1,r,n);if(h.err)return h;var x=this.tryParseArgumentClose(m);if(x.err)return x;a.push([l,{value:h.val,location:E(m,this.clonePosition())}]),c.add(l),this.bumpSpace(),o=this.parseIdentifierIfPossible(),l=o.value,u=o.location}return a.length===0?this.error(r==="select"?d.EXPECT_SELECT_ARGUMENT_SELECTOR:d.EXPECT_PLURAL_ARGUMENT_SELECTOR,E(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!s?this.error(d.MISSING_OTHER_CLAUSE,E(this.clonePosition(),this.clonePosition())):{val:a,err:null}},e.prototype.tryParseDecimalInteger=function(t,r){var n=1,i=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(n=-1);for(var o=!1,s=0;!this.isEOF();){var a=this.char();if(a>=48&&a<=57)o=!0,s=s*10+(a-48),this.bump();else break}var c=E(i,this.clonePosition());return o?(s*=n,Wi(s)?{val:s,err:null}:this.error(r,c)):this.error(t,c)},e.prototype.offset=function(){return this.position.offset},e.prototype.isEOF=function(){return this.offset()===this.message.length},e.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},e.prototype.char=function(){var t=this.position.offset;if(t>=this.message.length)throw Error("out of bound");var r=mn(this.message,t);if(r===void 0)throw Error("Offset "+t+" is at invalid UTF-16 code unit boundary");return r},e.prototype.error=function(t,r){return{val:null,err:{kind:t,message:this.message,location:r}}},e.prototype.bump=function(){if(!this.isEOF()){var t=this.char();t===10?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=t<65536?1:2)}},e.prototype.bumpIf=function(t){if(fn(this.message,t,this.offset())){for(var r=0;r=0?(this.bumpTo(n),!0):(this.bumpTo(this.message.length),!1)},e.prototype.bumpTo=function(t){if(this.offset()>t)throw Error("targetOffset "+t+" must be greater than or equal to the current offset "+this.offset());for(t=Math.min(t,this.message.length);;){var r=this.offset();if(r===t)break;if(r>t)throw Error("targetOffset "+t+" is at invalid UTF-16 code unit boundary");if(this.bump(),this.isEOF())break}},e.prototype.bumpSpace=function(){for(;!this.isEOF()&&En(this.char());)this.bump()},e.prototype.peek=function(){if(this.isEOF())return null;var t=this.char(),r=this.offset(),n=this.message.charCodeAt(r+(t>=65536?2:1));return n??null},e}();function Jt(e){return e>=97&&e<=122||e>=65&&e<=90}function Bi(e){return Jt(e)||e===47}function Yi(e){return e===45||e===46||e>=48&&e<=57||e===95||e>=97&&e<=122||e>=65&&e<=90||e==183||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8255&&e<=8256||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}function En(e){return e>=9&&e<=13||e===32||e===133||e>=8206&&e<=8207||e===8232||e===8233}function $i(e){return e>=33&&e<=35||e===36||e>=37&&e<=39||e===40||e===41||e===42||e===43||e===44||e===45||e>=46&&e<=47||e>=58&&e<=59||e>=60&&e<=62||e>=63&&e<=64||e===91||e===92||e===93||e===94||e===96||e===123||e===124||e===125||e===126||e===161||e>=162&&e<=165||e===166||e===167||e===169||e===171||e===172||e===174||e===176||e===177||e===182||e===187||e===191||e===215||e===247||e>=8208&&e<=8213||e>=8214&&e<=8215||e===8216||e===8217||e===8218||e>=8219&&e<=8220||e===8221||e===8222||e===8223||e>=8224&&e<=8231||e>=8240&&e<=8248||e===8249||e===8250||e>=8251&&e<=8254||e>=8257&&e<=8259||e===8260||e===8261||e===8262||e>=8263&&e<=8273||e===8274||e===8275||e>=8277&&e<=8286||e>=8592&&e<=8596||e>=8597&&e<=8601||e>=8602&&e<=8603||e>=8604&&e<=8607||e===8608||e>=8609&&e<=8610||e===8611||e>=8612&&e<=8613||e===8614||e>=8615&&e<=8621||e===8622||e>=8623&&e<=8653||e>=8654&&e<=8655||e>=8656&&e<=8657||e===8658||e===8659||e===8660||e>=8661&&e<=8691||e>=8692&&e<=8959||e>=8960&&e<=8967||e===8968||e===8969||e===8970||e===8971||e>=8972&&e<=8991||e>=8992&&e<=8993||e>=8994&&e<=9e3||e===9001||e===9002||e>=9003&&e<=9083||e===9084||e>=9085&&e<=9114||e>=9115&&e<=9139||e>=9140&&e<=9179||e>=9180&&e<=9185||e>=9186&&e<=9254||e>=9255&&e<=9279||e>=9280&&e<=9290||e>=9291&&e<=9311||e>=9472&&e<=9654||e===9655||e>=9656&&e<=9664||e===9665||e>=9666&&e<=9719||e>=9720&&e<=9727||e>=9728&&e<=9838||e===9839||e>=9840&&e<=10087||e===10088||e===10089||e===10090||e===10091||e===10092||e===10093||e===10094||e===10095||e===10096||e===10097||e===10098||e===10099||e===10100||e===10101||e>=10132&&e<=10175||e>=10176&&e<=10180||e===10181||e===10182||e>=10183&&e<=10213||e===10214||e===10215||e===10216||e===10217||e===10218||e===10219||e===10220||e===10221||e===10222||e===10223||e>=10224&&e<=10239||e>=10240&&e<=10495||e>=10496&&e<=10626||e===10627||e===10628||e===10629||e===10630||e===10631||e===10632||e===10633||e===10634||e===10635||e===10636||e===10637||e===10638||e===10639||e===10640||e===10641||e===10642||e===10643||e===10644||e===10645||e===10646||e===10647||e===10648||e>=10649&&e<=10711||e===10712||e===10713||e===10714||e===10715||e>=10716&&e<=10747||e===10748||e===10749||e>=10750&&e<=11007||e>=11008&&e<=11055||e>=11056&&e<=11076||e>=11077&&e<=11078||e>=11079&&e<=11084||e>=11085&&e<=11123||e>=11124&&e<=11125||e>=11126&&e<=11157||e===11158||e>=11159&&e<=11263||e>=11776&&e<=11777||e===11778||e===11779||e===11780||e===11781||e>=11782&&e<=11784||e===11785||e===11786||e===11787||e===11788||e===11789||e>=11790&&e<=11798||e===11799||e>=11800&&e<=11801||e===11802||e===11803||e===11804||e===11805||e>=11806&&e<=11807||e===11808||e===11809||e===11810||e===11811||e===11812||e===11813||e===11814||e===11815||e===11816||e===11817||e>=11818&&e<=11822||e===11823||e>=11824&&e<=11833||e>=11834&&e<=11835||e>=11836&&e<=11839||e===11840||e===11841||e===11842||e>=11843&&e<=11855||e>=11856&&e<=11857||e===11858||e>=11859&&e<=11903||e>=12289&&e<=12291||e===12296||e===12297||e===12298||e===12299||e===12300||e===12301||e===12302||e===12303||e===12304||e===12305||e>=12306&&e<=12307||e===12308||e===12309||e===12310||e===12311||e===12312||e===12313||e===12314||e===12315||e===12316||e===12317||e>=12318&&e<=12319||e===12320||e===12336||e===64830||e===64831||e>=65093&&e<=65094}function Kt(e){e.forEach(function(t){if(delete t.location,et(t)||tt(t))for(var r in t.options)delete t.options[r].location,Kt(t.options[r].value);else Qe(t)&&nt(t.style)||(Je(t)||Ke(t))&&De(t.style)?delete t.style.location:rt(t)&&Kt(t.children)})}function gn(e,t){t===void 0&&(t={}),t=T({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var r=new dn(e,t).parse();if(r.err){var n=SyntaxError(d[r.err.kind]);throw n.location=r.err.location,n.originalMessage=r.err.message,n}return t?.captureLocation||Kt(r.val),r.val}function Me(e,t){var r=t&&t.cache?t.cache:Ki,n=t&&t.serializer?t.serializer:Ji,i=t&&t.strategy?t.strategy:zi;return i(e,{cache:r,serializer:n})}function qi(e){return e==null||typeof e=="number"||typeof e=="boolean"}function xn(e,t,r,n){var i=qi(n)?n:r(n),o=t.get(i);return typeof o>"u"&&(o=e.call(this,n),t.set(i,o)),o}function yn(e,t,r){var n=Array.prototype.slice.call(arguments,3),i=r(n),o=t.get(i);return typeof o>"u"&&(o=e.apply(this,n),t.set(i,o)),o}function er(e,t,r,n,i){return r.bind(t,e,n,i)}function zi(e,t){var r=e.length===1?xn:yn;return er(e,this,r,t.cache.create(),t.serializer)}function Zi(e,t){return er(e,this,yn,t.cache.create(),t.serializer)}function Qi(e,t){return er(e,this,xn,t.cache.create(),t.serializer)}var Ji=function(){return JSON.stringify(arguments)};function tr(){this.cache=Object.create(null)}tr.prototype.get=function(e){return this.cache[e]};tr.prototype.set=function(e,t){this.cache[e]=t};var Ki={create:function(){return new tr}},it={variadic:Zi,monadic:Qi};var pe;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(pe||(pe={}));var ke=function(e){Ue(t,e);function t(r,n,i){var o=e.call(this,r)||this;return o.code=n,o.originalMessage=i,o}return t.prototype.toString=function(){return"[formatjs Error: "+this.code+"] "+this.message},t}(Error);var rr=function(e){Ue(t,e);function t(r,n,i,o){return e.call(this,'Invalid values for "'+r+'": "'+n+'". Options are "'+Object.keys(i).join('", "')+'"',pe.INVALID_VALUE,o)||this}return t}(ke);var vn=function(e){Ue(t,e);function t(r,n,i){return e.call(this,'Value for "'+r+'" must be of type '+n,pe.INVALID_VALUE,i)||this}return t}(ke);var Tn=function(e){Ue(t,e);function t(r,n){return e.call(this,'The intl string context variable "'+r+'" was not provided to the string "'+n+'"',pe.MISSING_VALUE,n)||this}return t}(ke);var R;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(R||(R={}));function eo(e){return e.length<2?e:e.reduce(function(t,r){var n=t[t.length-1];return!n||n.type!==R.literal||r.type!==R.literal?t.push(r):n.value+=r.value,t},[])}function to(e){return typeof e=="function"}function Ge(e,t,r,n,i,o,s){if(e.length===1&&Bt(e[0]))return[{type:R.literal,value:e[0].value}];for(var a=[],c=0,l=e;ct in e?Xr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var hi=(e,t)=>{for(var r in t)Xr(e,r,{get:t[r],enumerable:!0})};var ee=(e,t,r)=>(mi(e,typeof t!="symbol"?t+"":t,r),r),Yr=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)};var Rt=(e,t,r)=>(Yr(e,t,"read from private field"),r?r.call(e):t.get(e)),Br=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},Nt=(e,t,r,n)=>(Yr(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r);var Ce;(function(e){e.ServerError="ServerError",e.ClientError="ClientError",e.UnexpectedError="UnexpectedError"})(Ce||(Ce={}));var $r=(e,t,r)=>({type:(i=>i>=500?Ce.ServerError:i<400?Ce.UnexpectedError:Ce.ClientError)(e),message:t,originatingRequest:r,status:e});var di=function(e,t,r,n){function i(o){return o instanceof r?o:new r(function(s){s(o)})}return new(r||(r=Promise))(function(o,s){function a(u){try{l(n.next(u))}catch(p){s(p)}}function c(u){try{l(n.throw(u))}catch(p){s(p)}}function l(u){u.done?o(u.value):i(u.value).then(a,c)}l((n=n.apply(e,t||[])).next())})},Be;(function(e){e.AUTHORIZATION="Authorization",e.X_API_KEY="X-Api-Key"})(Be||(Be={}));var It=class{constructor(t){this.fetchOptions=t}commonHeaders(){let t={};return this.fetchOptions.apiKey&&(t[Be.X_API_KEY]=this.fetchOptions.apiKey),this.fetchOptions.accessToken&&(t[Be.AUTHORIZATION]=`Bearer ${this.fetchOptions.accessToken}`),t}transformData(t,r){return r?t.map(n=>r(n)):t.map(n=>this.identifyTransform(n))}transformDatum(t,r){return r?r(t):this.identifyTransform(t)}identifyTransform(t){return t}failOnBadStatusOrParseBody(t,r){return di(this,void 0,void 0,function*(){if(t.ok)return t.json().then(i=>({headers:t.headers,status:t.status,statusText:t.statusText,data:i}));let n=yield t.text();return Promise.reject($r(t.status,n,r))})}buildUrl(t,r,n,i,o){var s;let a=(s=this.fetchOptions.baseUrl)!==null&&s!==void 0?s:i(this.fetchOptions.env),c=o(r,n);return this.generateUrl(a,t,c)}generateUrl(t,r,n){let i=new URL(r,t);return n&&(i.search=this.convertToSearchParams(n).toString()),i.toString()}convertToSearchParams(t){return new URLSearchParams(t)}setParams(t,r,n){n!=null&&typeof n=="boolean"?t[r]=String(n):n&&(t[r]=n)}},Ct=It;var V;(function(e){e.STAGE="STAGE",e.PRODUCTION="PRODUCTION",e.LOCAL="LOCAL"})(V||(V={}));var Ue;(function(e){e.STAGE="STAGE",e.PRODUCTION="PROD",e.LOCAL="LOCAL"})(Ue||(Ue={}));var M;(function(e){e.DRAFT="DRAFT",e.PUBLISHED="PUBLISHED"})(M||(M={}));var le;(function(e){e.V2="UCv2",e.V3="UCv3"})(le||(le={}));var se;(function(e){e.CHECKOUT="checkout",e.CHECKOUT_EMAIL="checkout/email",e.SEGMENTATION="segmentation",e.BUNDLE="bundle",e.COMMITMENT="commitment",e.RECOMMENDATION="recommendation",e.EMAIL="email",e.PAYMENT="payment",e.CHANGE_PLAN_TEAM_PLANS="change-plan/team-upgrade/plans",e.CHANGE_PLAN_TEAM_PAYMENT="change-plan/team-upgrade/payment"})(se||(se={}));var Ut=function(e){var t;return(t=Ei.get(e))!==null&&t!==void 0?t:e},Ei=new Map([["countrySpecific","cs"],["quantity","q"],["authCode","code"],["checkoutPromoCode","apc"],["rurl","rUrl"],["curl","cUrl"],["ctxrturl","ctxRtUrl"],["country","co"],["language","lang"],["clientId","cli"],["context","ctx"],["productArrangementCode","pa"],["offerType","ot"],["marketSegment","ms"]]);var qr=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},zr=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],s;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(s)throw s.error}}return o};function ye(e,t,r){var n,i;try{for(var o=qr(Object.entries(e)),s=o.next();!s.done;s=o.next()){var a=zr(s.value,2),c=a[0],l=a[1],u=Ut(c);l!=null&&r.has(u)&&t.set(u,l)}}catch(p){n={error:p}}finally{try{s&&!s.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}}function $e(e){switch(e){case V.PRODUCTION:return"https://commerce.adobe.com";default:return"https://commerce-stg.adobe.com"}}function qe(e,t){var r,n;for(var i in e){var o=e[i];try{for(var s=(r=void 0,qr(Object.entries(o))),a=s.next();!a.done;a=s.next()){var c=zr(a.value,2),l=c[0],u=c[1];if(u!=null){var p=Ut(l);t.set("items["+i+"]["+p+"]",u)}}}catch(f){r={error:f}}finally{try{a&&!a.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}}}var xi=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};function Zr(e){vi(e);var t=e.env,r=e.items,n=e.workflowStep,i=xi(e,["env","items","workflowStep"]),o=new URL($e(t));return o.pathname=n+"/",qe(r,o.searchParams),ye(i,o.searchParams,yi),o.toString()}var yi=new Set(["cli","co","lang","ctx","cUrl","mv","nglwfdata","otac","promoid","rUrl","sdid","spint","trackingid","code","campaignid","appctxid"]),Ti=["env","workflowStep","clientId","country","items"];function vi(e){var t,r;try{for(var n=gi(Ti),i=n.next();!i.done;i=n.next()){var o=i.value;if(!e[o])throw new Error('Argument "checkoutData" is not valid, missing: '+o)}}catch(s){t={error:s}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}return!0}var Ai=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Si="p_draft_landscape",bi="/store/";function Mt(e){Oi(e);var t=e.env,r=e.items,n=e.workflowStep,i=e.ms,o=e.marketSegment,s=e.ot,a=e.offerType,c=e.pa,l=e.productArrangementCode,u=e.landscape,p=Ai(e,["env","items","workflowStep","ms","marketSegment","ot","offerType","pa","productArrangementCode","landscape"]),f={marketSegment:o??i,offerType:a??s,productArrangementCode:l??c},m=new URL($e(t));return m.pathname=""+bi+n,n!==se.SEGMENTATION?qe(r,m.searchParams):ye(f,m.searchParams,Dt),ye(p,m.searchParams,Dt),u===M.DRAFT&&ye({af:Si},m.searchParams,Dt),m.toString()}var Dt=new Set(["af","ai","apc","appctxid","cli","co","csm","ctx","ctxRtUrl","DCWATC","dp","fr","gsp","ijt","lang","lo","mal","ms","mv","mv2","nglwfdata","ot","otac","pa","pcid","promoid","q","rf","sc","scl","sdid","sid","spint","svar","th","thm","trackingid","usid","workflowid","context.guid","so.ca","so.su","so.tr","so.va"]),_i=["env","workflowStep","clientId","country"];function Oi(e){var t,r;try{for(var n=Pi(_i),i=n.next();!i.done;i=n.next()){var o=i.value;if(!e[o])throw new Error('Argument "checkoutData" is not valid, missing: '+o)}}catch(s){t={error:s}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}if(e.workflowStep!==se.SEGMENTATION&&!e.items)throw new Error('Argument "checkoutData" is not valid, missing: items');return!0}function kt(e,t){switch(e){case le.V2:return Zr(t);case le.V3:return Mt(t);default:return console.warn("Unsupported CheckoutType, will use UCv3 as default. Given type: "+e),Mt(t)}}var Gt;(function(e){e.BASE="BASE",e.TRIAL="TRIAL",e.PROMOTION="PROMOTION"})(Gt||(Gt={}));var De;(function(e){e.MONTH="MONTH",e.YEAR="YEAR",e.TWO_YEARS="TWO_YEARS",e.THREE_YEARS="THREE_YEARS",e.PERPETUAL="PERPETUAL"})(De||(De={}));var Me;(function(e){e.ANNUAL="ANNUAL",e.MONTHLY="MONTHLY",e.TWO_YEARS="TWO_YEARS",e.THREE_YEARS="THREE_YEARS"})(Me||(Me={}));var Ft;(function(e){e.INDIVIDUAL="INDIVIDUAL",e.TEAM="TEAM",e.ENTERPRISE="ENTERPRISE"})(Ft||(Ft={}));var Vt;(function(e){e.COM="COM",e.EDU="EDU",e.GOV="GOV"})(Vt||(Vt={}));var Wt;(function(e){e.DIRECT="DIRECT",e.INDIRECT="INDIRECT"})(Wt||(Wt={}));var jt;(function(e){e.ENTERPRISE_PRODUCT="ENTERPRISE_PRODUCT",e.ETLA="ETLA",e.RETAIL="RETAIL",e.VIP="VIP",e.VIPMP="VIPMP",e.FREE="FREE"})(jt||(jt={}));var wi=M.PUBLISHED,Jr=e=>{switch(e){case V.PRODUCTION:return"https://wcs.adobe.io";case V.STAGE:return"https://wcs-stage.adobe.io";case V.LOCAL:return"http://localhost:3002";default:return"https://wcs-stage.adobe.io"}},Qr=(e,t)=>{var r;return e.api_key=t.apiKey,e.landscape=(r=t.landscape)!==null&&r!==void 0?r:wi,e};var Li=function(e,t,r,n){function i(o){return o instanceof r?o:new r(function(s){s(o)})}return new(r||(r=Promise))(function(o,s){function a(u){try{l(n.next(u))}catch(p){s(p)}}function c(u){try{l(n.throw(u))}catch(p){s(p)}}function l(u){u.done?o(u.value):i(u.value).then(a,c)}l((n=n.apply(e,t||[])).next())})},Ht=class extends Ct{constructor(t){super(t),this.apiPaths={getWebCommerceArtifact:"web_commerce_artifact"},this.getWebCommerceArtifact=(r,n,i,o)=>Li(this,void 0,void 0,function*(){let s=this.buildUrl(this.apiPaths.getWebCommerceArtifact,n,r,a=>Jr(a),(a,c)=>this.evaluateGetWebCommerceArtifactParams(a,c));return this.fetchOptions.fetch(s,{signal:o,headers:Object.assign({},this.commonHeaders()),mode:"cors"}).then(a=>this.failOnBadStatusOrParseBody(a,`GET ${s}`)).then(a=>{let l=a.data;return{data:this.transformDatum(l,i)}})})}evaluateGetWebCommerceArtifactParams(t,r){let n={};return this.setParams(n,"offer_selector_ids",r.offerSelectorIds.join(",")),this.setParams(n,"country",r.country),this.setParams(n,"language",r.language),this.setParams(n,"currency",r.currency),this.setParams(n,"locale",r.locale),this.setParams(n,"promotion_code",r.promotionCode),Qr(n,t)}},Kr=Ht;var ze=e=>new Kr(e).getWebCommerceArtifact;var en="tacocat.js";var Ze=(e,t)=>String(e??"").toLowerCase()==String(t??"").toLowerCase(),tn=e=>`${e??""}`.replace(/[&<>'"]/g,t=>({"&":"&","<":"<",">":">","'":"'",'"':"""})[t]??t)??"";function _(e,t={},{metadata:r=!0,search:n=!0,storage:i=!0}={}){let o;if(n&&o==null){let s=new URLSearchParams(window.location.search),a=Te(n)?n:e;o=s.get(a)}if(i&&o==null){let s=Te(i)?i:e;o=window.sessionStorage.getItem(s)??window.localStorage.getItem(s)}if(r&&o==null){let s=on(Te(r)?r:e);o=document.documentElement.querySelector(`meta[name="${s}"]`)?.content}return o??t[e]}var ve=()=>{};var rn=e=>typeof e=="boolean",ae=e=>typeof e=="function",Je=e=>typeof e=="number",nn=e=>e!=null&&typeof e=="object";var Te=e=>typeof e=="string",Xt=e=>Te(e)&&e,Ae=e=>Je(e)&&Number.isFinite(e)&&e>0;function Pe(e,t=r=>r==null||r===""){return e!=null&&Object.entries(e).forEach(([r,n])=>{t(n)&&delete e[r]}),e}function A(e,t){if(rn(e))return e;let r=String(e);return r==="1"||r==="true"?!0:r==="0"||r==="false"?!1:t}function te(e,t,r){let n=Object.values(t);return n.find(i=>Ze(i,e))??r??n[0]}function on(e=""){return String(e).replace(/(\p{Lowercase_Letter})(\p{Uppercase_Letter})/gu,(t,r,n)=>`${r}-${n}`).replace(/\W+/gu,"-").toLowerCase()}function Se(e,t=1){return Je(e)||(e=Number.parseInt(e,10)),!Number.isNaN(e)&&e>0&&Number.isFinite(e)?e:t}var Ri=Date.now(),Yt=()=>`(+${Date.now()-Ri}ms)`,Qe=new Set,Ni=A(_("tacocat.debug",{},{metadata:!1}),typeof process<"u"&&process.env?.DEBUG);function sn(e){let t=`[${en}/${e}]`,r=(s,a,...c)=>s?!0:(i(a,...c),!1),n=Ni?(s,...a)=>{console.debug(`${t} ${s}`,...a,Yt())}:()=>{},i=(s,...a)=>{let c=`${t} ${s}`;Qe.forEach(([l])=>l(c,...a))};return{assert:r,debug:n,error:i,warn:(s,...a)=>{let c=`${t} ${s}`;Qe.forEach(([,l])=>l(c,...a))}}}function Ii(e,t){let r=[e,t];return Qe.add(r),()=>{Qe.delete(r)}}Ii((e,...t)=>{console.error(e,...t,Yt())},(e,...t)=>{console.warn(e,...t,Yt())});var Ci="no promo",an="promo-tag",Ui="yellow",Di="neutral",Mi=(e,t,r)=>{let n=o=>o||Ci,i=r?` (was "${n(t)}")`:"";return`${n(e)}${i}`},ki="cancel-context",ke=(e,t)=>{let r=e===ki,n=!r&&e?.length>0,i=(n||r)&&(t&&t!=e||!t&&!r),o=i&&n||!i&&!!t,s=o?e||t:void 0;return{effectivePromoCode:s,overridenPromoCode:e,className:o?an:`${an} no-promo`,text:Mi(s,t,i),variant:o?Ui:Di,isOverriden:i}};var Bt=function(e,t){return Bt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},Bt(e,t)};function Ge(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Bt(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var T=function(){return T=Object.assign||function(t){for(var r,n=1,i=arguments.length;n0}),r=[],n=0,i=t;n1)throw new RangeError("integer-width stems only accept a single optional option");i.options[0].replace(Vi,function(a,c,l,u,p,f){if(c)t.minimumIntegerDigits=l.length;else{if(u&&p)throw new Error("We currently do not support maximum integer digits");if(f)throw new Error("We currently do not support exact integer digits")}return""});continue}if(xn.test(i.stem)){t.minimumIntegerDigits=i.stem.length;continue}if(pn.test(i.stem)){if(i.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");i.stem.replace(pn,function(a,c,l,u,p,f){return l==="*"?t.minimumFractionDigits=c.length:u&&u[0]==="#"?t.maximumFractionDigits=u.length:p&&f?(t.minimumFractionDigits=p.length,t.maximumFractionDigits=p.length+f.length):(t.minimumFractionDigits=c.length,t.maximumFractionDigits=c.length),""}),i.options.length&&(t=T(T({},t),mn(i.options[0])));continue}if(En.test(i.stem)){t=T(T({},t),mn(i.stem));continue}var o=gn(i.stem);o&&(t=T(T({},t),o));var s=Wi(i.stem);s&&(t=T(T({},t),s))}return t}var zt,ji=new RegExp("^"+qt.source+"*"),Hi=new RegExp(qt.source+"*$");function E(e,t){return{start:e,end:t}}var Xi=!!String.prototype.startsWith,Yi=!!String.fromCodePoint,Bi=!!Object.fromEntries,$i=!!String.prototype.codePointAt,qi=!!String.prototype.trimStart,zi=!!String.prototype.trimEnd,Zi=!!Number.isSafeInteger,Ji=Zi?Number.isSafeInteger:function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},Jt=!0;try{Tn=Sn("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu"),Jt=((zt=Tn.exec("a"))===null||zt===void 0?void 0:zt[0])==="a"}catch{Jt=!1}var Tn,vn=Xi?function(t,r,n){return t.startsWith(r,n)}:function(t,r,n){return t.slice(n,n+r.length)===r},Qt=Yi?String.fromCodePoint:function(){for(var t=[],r=0;ro;){if(s=t[o++],s>1114111)throw RangeError(s+" is not a valid code point");n+=s<65536?String.fromCharCode(s):String.fromCharCode(((s-=65536)>>10)+55296,s%1024+56320)}return n},An=Bi?Object.fromEntries:function(t){for(var r={},n=0,i=t;n=n)){var i=t.charCodeAt(r),o;return i<55296||i>56319||r+1===n||(o=t.charCodeAt(r+1))<56320||o>57343?i:(i-55296<<10)+(o-56320)+65536}},Qi=qi?function(t){return t.trimStart()}:function(t){return t.replace(ji,"")},Ki=zi?function(t){return t.trimEnd()}:function(t){return t.replace(Hi,"")};function Sn(e,t){return new RegExp(e,t)}var Kt;Jt?(Zt=Sn("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu"),Kt=function(t,r){var n;Zt.lastIndex=r;var i=Zt.exec(t);return(n=i[1])!==null&&n!==void 0?n:""}):Kt=function(t,r){for(var n=[];;){var i=Pn(t,r);if(i===void 0||_n(i)||ro(i))break;n.push(i),r+=i>=65536?2:1}return Qt.apply(void 0,n)};var Zt,bn=function(){function e(t,r){r===void 0&&(r={}),this.message=t,this.position={offset:0,line:1,column:1},this.ignoreTag=!!r.ignoreTag,this.requiresOtherClause=!!r.requiresOtherClause,this.shouldParseSkeletons=!!r.shouldParseSkeletons}return e.prototype.parse=function(){if(this.offset()!==0)throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},e.prototype.parseMessage=function(t,r,n){for(var i=[];!this.isEOF();){var o=this.char();if(o===123){var s=this.parseArgument(t,n);if(s.err)return s;i.push(s.val)}else{if(o===125&&t>0)break;if(o===35&&(r==="plural"||r==="selectordinal")){var a=this.clonePosition();this.bump(),i.push({type:b.pound,location:E(a,this.clonePosition())})}else if(o===60&&!this.ignoreTag&&this.peek()===47){if(n)break;return this.error(d.UNMATCHED_CLOSING_TAG,E(this.clonePosition(),this.clonePosition()))}else if(o===60&&!this.ignoreTag&&er(this.peek()||0)){var s=this.parseTag(t,r);if(s.err)return s;i.push(s.val)}else{var s=this.parseLiteral(t,r);if(s.err)return s;i.push(s.val)}}}return{val:i,err:null}},e.prototype.parseTag=function(t,r){var n=this.clonePosition();this.bump();var i=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:b.literal,value:"<"+i+"/>",location:E(n,this.clonePosition())},err:null};if(this.bumpIf(">")){var o=this.parseMessage(t+1,r,!0);if(o.err)return o;var s=o.val,a=this.clonePosition();if(this.bumpIf("")?{val:{type:b.tag,value:i,children:s,location:E(n,this.clonePosition())},err:null}:this.error(d.INVALID_TAG,E(a,this.clonePosition())))}else return this.error(d.UNCLOSED_TAG,E(n,this.clonePosition()))}else return this.error(d.INVALID_TAG,E(n,this.clonePosition()))},e.prototype.parseTagName=function(){var t=this.offset();for(this.bump();!this.isEOF()&&to(this.char());)this.bump();return this.message.slice(t,this.offset())},e.prototype.parseLiteral=function(t,r){for(var n=this.clonePosition(),i="";;){var o=this.tryParseQuote(r);if(o){i+=o;continue}var s=this.tryParseUnquoted(t,r);if(s){i+=s;continue}var a=this.tryParseLeftAngleBracket();if(a){i+=a;continue}break}var c=E(n,this.clonePosition());return{val:{type:b.literal,value:i,location:c},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!eo(this.peek()||0))?(this.bump(),"<"):null},e.prototype.tryParseQuote=function(t){if(this.isEOF()||this.char()!==39)return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if(t==="plural"||t==="selectordinal")break;return null;default:return null}this.bump();var r=[this.char()];for(this.bump();!this.isEOF();){var n=this.char();if(n===39)if(this.peek()===39)r.push(39),this.bump();else{this.bump();break}else r.push(n);this.bump()}return Qt.apply(void 0,r)},e.prototype.tryParseUnquoted=function(t,r){if(this.isEOF())return null;var n=this.char();return n===60||n===123||n===35&&(r==="plural"||r==="selectordinal")||n===125&&t>0?null:(this.bump(),Qt(n))},e.prototype.parseArgument=function(t,r){var n=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(d.EXPECT_ARGUMENT_CLOSING_BRACE,E(n,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(d.EMPTY_ARGUMENT,E(n,this.clonePosition()));var i=this.parseIdentifierIfPossible().value;if(!i)return this.error(d.MALFORMED_ARGUMENT,E(n,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(d.EXPECT_ARGUMENT_CLOSING_BRACE,E(n,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:b.argument,value:i,location:E(n,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(d.EXPECT_ARGUMENT_CLOSING_BRACE,E(n,this.clonePosition())):this.parseArgumentOptions(t,r,i,n);default:return this.error(d.MALFORMED_ARGUMENT,E(n,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var t=this.clonePosition(),r=this.offset(),n=Kt(this.message,r),i=r+n.length;this.bumpTo(i);var o=this.clonePosition(),s=E(t,o);return{value:n,location:s}},e.prototype.parseArgumentOptions=function(t,r,n,i){var o,s=this.clonePosition(),a=this.parseIdentifierIfPossible().value,c=this.clonePosition();switch(a){case"":return this.error(d.EXPECT_ARGUMENT_TYPE,E(s,c));case"number":case"date":case"time":{this.bumpSpace();var l=null;if(this.bumpIf(",")){this.bumpSpace();var u=this.clonePosition(),p=this.parseSimpleArgStyleIfPossible();if(p.err)return p;var f=Ki(p.val);if(f.length===0)return this.error(d.EXPECT_ARGUMENT_STYLE,E(this.clonePosition(),this.clonePosition()));var m=E(u,this.clonePosition());l={style:f,styleLocation:m}}var h=this.tryParseArgumentClose(i);if(h.err)return h;var v=E(i,this.clonePosition());if(l&&vn(l?.style,"::",0)){var g=Qi(l.style.slice(2));if(a==="number"){var p=this.parseNumberSkeletonFromString(g,l.styleLocation);return p.err?p:{val:{type:b.number,value:n,location:v,style:p.val},err:null}}else{if(g.length===0)return this.error(d.EXPECT_DATE_TIME_SKELETON,v);var f={type:fe.dateTime,pattern:g,location:l.styleLocation,parsedOptions:this.shouldParseSkeletons?ln(g):{}},O=a==="date"?b.date:b.time;return{val:{type:O,value:n,location:v,style:f},err:null}}}return{val:{type:a==="number"?b.number:a==="date"?b.date:b.time,value:n,location:v,style:(o=l?.style)!==null&&o!==void 0?o:null},err:null}}case"plural":case"selectordinal":case"select":{var S=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(d.EXPECT_SELECT_ARGUMENT_OPTIONS,E(S,T({},S)));this.bumpSpace();var y=this.parseIdentifierIfPossible(),P=0;if(a!=="select"&&y.value==="offset"){if(!this.bumpIf(":"))return this.error(d.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,E(this.clonePosition(),this.clonePosition()));this.bumpSpace();var p=this.tryParseDecimalInteger(d.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,d.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(p.err)return p;this.bumpSpace(),y=this.parseIdentifierIfPossible(),P=p.val}var w=this.tryParsePluralOrSelectOptions(t,a,r,y);if(w.err)return w;var h=this.tryParseArgumentClose(i);if(h.err)return h;var I=E(i,this.clonePosition());return a==="select"?{val:{type:b.select,value:n,options:An(w.val),location:I},err:null}:{val:{type:b.plural,value:n,options:An(w.val),offset:P,pluralType:a==="plural"?"cardinal":"ordinal",location:I},err:null}}default:return this.error(d.INVALID_ARGUMENT_TYPE,E(s,c))}},e.prototype.tryParseArgumentClose=function(t){return this.isEOF()||this.char()!==125?this.error(d.EXPECT_ARGUMENT_CLOSING_BRACE,E(t,this.clonePosition())):(this.bump(),{val:!0,err:null})},e.prototype.parseSimpleArgStyleIfPossible=function(){for(var t=0,r=this.clonePosition();!this.isEOF();){var n=this.char();switch(n){case 39:{this.bump();var i=this.clonePosition();if(!this.bumpUntil("'"))return this.error(d.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,E(i,this.clonePosition()));this.bump();break}case 123:{t+=1,this.bump();break}case 125:{if(t>0)t-=1;else return{val:this.message.slice(r.offset,this.offset()),err:null};break}default:this.bump();break}}return{val:this.message.slice(r.offset,this.offset()),err:null}},e.prototype.parseNumberSkeletonFromString=function(t,r){var n=[];try{n=dn(t)}catch{return this.error(d.INVALID_NUMBER_SKELETON,r)}return{val:{type:fe.number,tokens:n,location:r,parsedOptions:this.shouldParseSkeletons?yn(n):{}},err:null}},e.prototype.tryParsePluralOrSelectOptions=function(t,r,n,i){for(var o,s=!1,a=[],c=new Set,l=i.value,u=i.location;;){if(l.length===0){var p=this.clonePosition();if(r!=="select"&&this.bumpIf("=")){var f=this.tryParseDecimalInteger(d.EXPECT_PLURAL_ARGUMENT_SELECTOR,d.INVALID_PLURAL_ARGUMENT_SELECTOR);if(f.err)return f;u=E(p,this.clonePosition()),l=this.message.slice(p.offset,this.offset())}else break}if(c.has(l))return this.error(r==="select"?d.DUPLICATE_SELECT_ARGUMENT_SELECTOR:d.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,u);l==="other"&&(s=!0),this.bumpSpace();var m=this.clonePosition();if(!this.bumpIf("{"))return this.error(r==="select"?d.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:d.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,E(this.clonePosition(),this.clonePosition()));var h=this.parseMessage(t+1,r,n);if(h.err)return h;var v=this.tryParseArgumentClose(m);if(v.err)return v;a.push([l,{value:h.val,location:E(m,this.clonePosition())}]),c.add(l),this.bumpSpace(),o=this.parseIdentifierIfPossible(),l=o.value,u=o.location}return a.length===0?this.error(r==="select"?d.EXPECT_SELECT_ARGUMENT_SELECTOR:d.EXPECT_PLURAL_ARGUMENT_SELECTOR,E(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!s?this.error(d.MISSING_OTHER_CLAUSE,E(this.clonePosition(),this.clonePosition())):{val:a,err:null}},e.prototype.tryParseDecimalInteger=function(t,r){var n=1,i=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(n=-1);for(var o=!1,s=0;!this.isEOF();){var a=this.char();if(a>=48&&a<=57)o=!0,s=s*10+(a-48),this.bump();else break}var c=E(i,this.clonePosition());return o?(s*=n,Ji(s)?{val:s,err:null}:this.error(r,c)):this.error(t,c)},e.prototype.offset=function(){return this.position.offset},e.prototype.isEOF=function(){return this.offset()===this.message.length},e.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},e.prototype.char=function(){var t=this.position.offset;if(t>=this.message.length)throw Error("out of bound");var r=Pn(this.message,t);if(r===void 0)throw Error("Offset "+t+" is at invalid UTF-16 code unit boundary");return r},e.prototype.error=function(t,r){return{val:null,err:{kind:t,message:this.message,location:r}}},e.prototype.bump=function(){if(!this.isEOF()){var t=this.char();t===10?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=t<65536?1:2)}},e.prototype.bumpIf=function(t){if(vn(this.message,t,this.offset())){for(var r=0;r=0?(this.bumpTo(n),!0):(this.bumpTo(this.message.length),!1)},e.prototype.bumpTo=function(t){if(this.offset()>t)throw Error("targetOffset "+t+" must be greater than or equal to the current offset "+this.offset());for(t=Math.min(t,this.message.length);;){var r=this.offset();if(r===t)break;if(r>t)throw Error("targetOffset "+t+" is at invalid UTF-16 code unit boundary");if(this.bump(),this.isEOF())break}},e.prototype.bumpSpace=function(){for(;!this.isEOF()&&_n(this.char());)this.bump()},e.prototype.peek=function(){if(this.isEOF())return null;var t=this.char(),r=this.offset(),n=this.message.charCodeAt(r+(t>=65536?2:1));return n??null},e}();function er(e){return e>=97&&e<=122||e>=65&&e<=90}function eo(e){return er(e)||e===47}function to(e){return e===45||e===46||e>=48&&e<=57||e===95||e>=97&&e<=122||e>=65&&e<=90||e==183||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8255&&e<=8256||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}function _n(e){return e>=9&&e<=13||e===32||e===133||e>=8206&&e<=8207||e===8232||e===8233}function ro(e){return e>=33&&e<=35||e===36||e>=37&&e<=39||e===40||e===41||e===42||e===43||e===44||e===45||e>=46&&e<=47||e>=58&&e<=59||e>=60&&e<=62||e>=63&&e<=64||e===91||e===92||e===93||e===94||e===96||e===123||e===124||e===125||e===126||e===161||e>=162&&e<=165||e===166||e===167||e===169||e===171||e===172||e===174||e===176||e===177||e===182||e===187||e===191||e===215||e===247||e>=8208&&e<=8213||e>=8214&&e<=8215||e===8216||e===8217||e===8218||e>=8219&&e<=8220||e===8221||e===8222||e===8223||e>=8224&&e<=8231||e>=8240&&e<=8248||e===8249||e===8250||e>=8251&&e<=8254||e>=8257&&e<=8259||e===8260||e===8261||e===8262||e>=8263&&e<=8273||e===8274||e===8275||e>=8277&&e<=8286||e>=8592&&e<=8596||e>=8597&&e<=8601||e>=8602&&e<=8603||e>=8604&&e<=8607||e===8608||e>=8609&&e<=8610||e===8611||e>=8612&&e<=8613||e===8614||e>=8615&&e<=8621||e===8622||e>=8623&&e<=8653||e>=8654&&e<=8655||e>=8656&&e<=8657||e===8658||e===8659||e===8660||e>=8661&&e<=8691||e>=8692&&e<=8959||e>=8960&&e<=8967||e===8968||e===8969||e===8970||e===8971||e>=8972&&e<=8991||e>=8992&&e<=8993||e>=8994&&e<=9e3||e===9001||e===9002||e>=9003&&e<=9083||e===9084||e>=9085&&e<=9114||e>=9115&&e<=9139||e>=9140&&e<=9179||e>=9180&&e<=9185||e>=9186&&e<=9254||e>=9255&&e<=9279||e>=9280&&e<=9290||e>=9291&&e<=9311||e>=9472&&e<=9654||e===9655||e>=9656&&e<=9664||e===9665||e>=9666&&e<=9719||e>=9720&&e<=9727||e>=9728&&e<=9838||e===9839||e>=9840&&e<=10087||e===10088||e===10089||e===10090||e===10091||e===10092||e===10093||e===10094||e===10095||e===10096||e===10097||e===10098||e===10099||e===10100||e===10101||e>=10132&&e<=10175||e>=10176&&e<=10180||e===10181||e===10182||e>=10183&&e<=10213||e===10214||e===10215||e===10216||e===10217||e===10218||e===10219||e===10220||e===10221||e===10222||e===10223||e>=10224&&e<=10239||e>=10240&&e<=10495||e>=10496&&e<=10626||e===10627||e===10628||e===10629||e===10630||e===10631||e===10632||e===10633||e===10634||e===10635||e===10636||e===10637||e===10638||e===10639||e===10640||e===10641||e===10642||e===10643||e===10644||e===10645||e===10646||e===10647||e===10648||e>=10649&&e<=10711||e===10712||e===10713||e===10714||e===10715||e>=10716&&e<=10747||e===10748||e===10749||e>=10750&&e<=11007||e>=11008&&e<=11055||e>=11056&&e<=11076||e>=11077&&e<=11078||e>=11079&&e<=11084||e>=11085&&e<=11123||e>=11124&&e<=11125||e>=11126&&e<=11157||e===11158||e>=11159&&e<=11263||e>=11776&&e<=11777||e===11778||e===11779||e===11780||e===11781||e>=11782&&e<=11784||e===11785||e===11786||e===11787||e===11788||e===11789||e>=11790&&e<=11798||e===11799||e>=11800&&e<=11801||e===11802||e===11803||e===11804||e===11805||e>=11806&&e<=11807||e===11808||e===11809||e===11810||e===11811||e===11812||e===11813||e===11814||e===11815||e===11816||e===11817||e>=11818&&e<=11822||e===11823||e>=11824&&e<=11833||e>=11834&&e<=11835||e>=11836&&e<=11839||e===11840||e===11841||e===11842||e>=11843&&e<=11855||e>=11856&&e<=11857||e===11858||e>=11859&&e<=11903||e>=12289&&e<=12291||e===12296||e===12297||e===12298||e===12299||e===12300||e===12301||e===12302||e===12303||e===12304||e===12305||e>=12306&&e<=12307||e===12308||e===12309||e===12310||e===12311||e===12312||e===12313||e===12314||e===12315||e===12316||e===12317||e>=12318&&e<=12319||e===12320||e===12336||e===64830||e===64831||e>=65093&&e<=65094}function tr(e){e.forEach(function(t){if(delete t.location,nt(t)||it(t))for(var r in t.options)delete t.options[r].location,tr(t.options[r].value);else et(t)&&st(t.style)||(tt(t)||rt(t))&&Fe(t.style)?delete t.style.location:ot(t)&&tr(t.children)})}function On(e,t){t===void 0&&(t={}),t=T({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var r=new bn(e,t).parse();if(r.err){var n=SyntaxError(d[r.err.kind]);throw n.location=r.err.location,n.originalMessage=r.err.message,n}return t?.captureLocation||tr(r.val),r.val}function Ve(e,t){var r=t&&t.cache?t.cache:co,n=t&&t.serializer?t.serializer:ao,i=t&&t.strategy?t.strategy:io;return i(e,{cache:r,serializer:n})}function no(e){return e==null||typeof e=="number"||typeof e=="boolean"}function wn(e,t,r,n){var i=no(n)?n:r(n),o=t.get(i);return typeof o>"u"&&(o=e.call(this,n),t.set(i,o)),o}function Ln(e,t,r){var n=Array.prototype.slice.call(arguments,3),i=r(n),o=t.get(i);return typeof o>"u"&&(o=e.apply(this,n),t.set(i,o)),o}function rr(e,t,r,n,i){return r.bind(t,e,n,i)}function io(e,t){var r=e.length===1?wn:Ln;return rr(e,this,r,t.cache.create(),t.serializer)}function oo(e,t){return rr(e,this,Ln,t.cache.create(),t.serializer)}function so(e,t){return rr(e,this,wn,t.cache.create(),t.serializer)}var ao=function(){return JSON.stringify(arguments)};function nr(){this.cache=Object.create(null)}nr.prototype.get=function(e){return this.cache[e]};nr.prototype.set=function(e,t){this.cache[e]=t};var co={create:function(){return new nr}},at={variadic:oo,monadic:so};var pe;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(pe||(pe={}));var We=function(e){Ge(t,e);function t(r,n,i){var o=e.call(this,r)||this;return o.code=n,o.originalMessage=i,o}return t.prototype.toString=function(){return"[formatjs Error: "+this.code+"] "+this.message},t}(Error);var ir=function(e){Ge(t,e);function t(r,n,i,o){return e.call(this,'Invalid values for "'+r+'": "'+n+'". Options are "'+Object.keys(i).join('", "')+'"',pe.INVALID_VALUE,o)||this}return t}(We);var Rn=function(e){Ge(t,e);function t(r,n,i){return e.call(this,'Value for "'+r+'" must be of type '+n,pe.INVALID_VALUE,i)||this}return t}(We);var Nn=function(e){Ge(t,e);function t(r,n){return e.call(this,'The intl string context variable "'+r+'" was not provided to the string "'+n+'"',pe.MISSING_VALUE,n)||this}return t}(We);var R;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(R||(R={}));function uo(e){return e.length<2?e:e.reduce(function(t,r){var n=t[t.length-1];return!n||n.type!==R.literal||r.type!==R.literal?t.push(r):n.value+=r.value,t},[])}function lo(e){return typeof e=="function"}function je(e,t,r,n,i,o,s){if(e.length===1&&$t(e[0]))return[{type:R.literal,value:e[0].value}];for(var a=[],c=0,l=e;c0?e.substring(0,n):"";let i=_n(e.split("").reverse().join("")),o=r-i,s=e.substring(o,o+1),a=o+(s==="."||s===","?1:0);t.suffix=i>0?e.substring(a,r):"",t.mask=e.substring(n,a),t.maskHasNegativeSign=t.mask.charAt(0)==="-",t.maskHasPositiveSign=t.mask.charAt(0)==="+";let c=t.mask.match(so);return t.decimal=c&&c[c.length-1]||".",t.separator=c&&c[1]&&c[0]||",",c=t.mask.split(t.decimal),t.integer=c[0],t.fraction=c[1],t}function co(e,t,r){let n=!1,i={value:e};e<0&&(n=!0,i.value=-i.value),i.sign=n?"-":"",i.value=Number(i.value).toFixed(t.fraction&&t.fraction.length),i.value=Number(i.value).toString();let o=t.fraction&&t.fraction.lastIndexOf("0"),[s="0",a=""]=i.value.split(".");return(!a||a&&a.length<=o)&&(a=o<0?"":(+("0."+a)).toFixed(o+1).replace("0.","")),i.integer=s,i.fraction=a,uo(i,t),(i.result==="0"||i.result==="")&&(n=!1,i.sign=""),!n&&t.maskHasPositiveSign?i.sign="+":n&&t.maskHasPositiveSign?i.sign="-":n&&(i.sign=r&&r.enforceMaskSign&&!t.maskHasNegativeSign?"":"-"),i}function uo(e,t){e.result="";let r=t.integer.split(t.separator),n=r.join(""),i=n&&n.indexOf("0");if(i>-1)for(;e.integer.lengthMath.round(e*20)/20},ir=(e,t)=>({accept:e,round:t}),ho=[ir(({divisor:e,price:t})=>t%e==0,({divisor:e,price:t})=>t/e),ir(({usePrecision:e})=>e,({divisor:e,price:t})=>Math.ceil(Math.floor(t*1e4/e)/100)/100),ir(()=>!0,({divisor:e,price:t})=>Math.ceil(Math.floor(t*100/e)/100))],or={[C.YEAR]:{[w.MONTHLY]:Fe.MONTH,[w.ANNUAL]:Fe.YEAR},[C.MONTH]:{[w.MONTHLY]:Fe.MONTH}},Eo=(e,t)=>e.indexOf(`'${t}'`)===0,go=(e,t=!0)=>{let r=e.replace(/'.*?'/,"").trim(),n=Cn(r);return!!n?t||(r=r.replace(/[,\.]0+/,n)):r=r.replace(/\s?(#.*0)(?!\s)?/,"$&"+yo(e)),r},xo=e=>{let t=vo(e),r=Eo(e,t),n=e.replace(/'.*?'/,""),i=On.test(n)||Ln.test(n);return{currencySymbol:t,isCurrencyFirst:r,hasCurrencySpace:i}},Nn=e=>e.replace(On,wn).replace(Ln,wn),yo=e=>e.match(/#(.?)#/)?.[1]===An?fo:An,vo=e=>e.match(/'(.*?)'/)?.[1]??"",Cn=e=>e.match(/0(.?)0/)?.[1]??"";function ot({formatString:e,price:t,usePrecision:r,isIndianPrice:n=!1},i,o=s=>s){let{currencySymbol:s,isCurrencyFirst:a,hasCurrencySpace:c}=xo(e),l=r?Cn(e):"",u=go(e,r),p=r?2:0,f=o(t,{currencySymbol:s}),m=n?f.toLocaleString("hi-IN",{minimumFractionDigits:p,maximumFractionDigits:p}):Sn(u,f),h=r?m.lastIndexOf(l):m.length,x=m.substring(0,h),y=m.substring(h+1);return{accessiblePrice:e.replace(/'.*?'/,"SYMBOL").replace(/#.*0/,m).replace(/SYMBOL/,s),currencySymbol:s,decimals:y,decimalsDelimiter:l,hasCurrencySpace:c,integer:x,isCurrencyFirst:a,recurrenceTerm:i}}var Rn=e=>{let{commitment:t,term:r,usePrecision:n}=e,i=po[r]??1;return ot(e,i>1?Fe.MONTH:or[t]?.[r],(o,{currencySymbol:s})=>{let a={divisor:i,price:o,usePrecision:n},{round:c}=ho.find(({accept:u})=>u(a));if(!c)throw new Error(`Missing rounding rule for: ${JSON.stringify(a)}`);return(mo[s]??(u=>u))(c(a))})},In=({commitment:e,term:t,...r})=>ot(r,or[e]?.[t]),Un=e=>{let{commitment:t,term:r}=e;return t===C.YEAR&&r===w.MONTHLY?ot(e,Fe.YEAR,n=>n*12):ot(e,or[t]?.[r])};var To={recurrenceLabel:"{recurrenceTerm, select, MONTH {/mo} YEAR {/yr} other {}}",recurrenceAriaLabel:"{recurrenceTerm, select, MONTH {per month} YEAR {per year} other {}}",perUnitLabel:"{perUnit, select, LICENSE {per license} other {}}",perUnitAriaLabel:"{perUnit, select, LICENSE {per license} other {}}",freeLabel:"Free",freeAriaLabel:"Free",taxExclusiveLabel:"{taxTerm, select, GST {excl. GST} VAT {excl. VAT} TAX {excl. tax} IVA {excl. IVA} SST {excl. SST} KDV {excl. KDV} other {}}",taxInclusiveLabel:"{taxTerm, select, GST {incl. GST} VAT {incl. VAT} TAX {incl. tax} IVA {incl. IVA} SST {incl. SST} KDV {incl. KDV} other {}}",alternativePriceAriaLabel:"Alternatively at {alternativePrice}",strikethroughAriaLabel:"Regularly at {strikethroughPrice}"},bo=zr("ConsonantTemplates/price"),Po=/<.+?>/g,V={container:"price",containerOptical:"price-optical",containerStrikethrough:"price-strikethrough",containerAnnual:"price-annual",disabled:"disabled",currencySpace:"price-currency-space",currencySymbol:"price-currency-symbol",decimals:"price-decimals",decimalsDelimiter:"price-decimals-delimiter",integer:"price-integer",recurrence:"price-recurrence",taxInclusivity:"price-tax-inclusivity",unitType:"price-unit-type"},me={perUnitLabel:"perUnitLabel",perUnitAriaLabel:"perUnitAriaLabel",recurrenceLabel:"recurrenceLabel",recurrenceAriaLabel:"recurrenceAriaLabel",taxExclusiveLabel:"taxExclusiveLabel",taxInclusiveLabel:"taxInclusiveLabel",strikethroughAriaLabel:"strikethroughAriaLabel"},_o="TAX_EXCLUSIVE",So=e=>$r(e)?Object.entries(e).filter(([,t])=>Te(t)||qe(t)||t===!0).reduce((t,[r,n])=>t+` ${r}${n===!0?"":'="'+Br(n)+'"'}`,""):"",B=(e,t,r,n=!1)=>`${n?Nn(t):t??""}`;function Ao(e,{accessibleLabel:t,currencySymbol:r,decimals:n,decimalsDelimiter:i,hasCurrencySpace:o,integer:s,isCurrencyFirst:a,recurrenceLabel:c,perUnitLabel:l,taxInclusivityLabel:u},p={}){let f=B(V.currencySymbol,r),m=B(V.currencySpace,o?" ":""),h="";return a&&(h+=f+m),h+=B(V.integer,s),h+=B(V.decimalsDelimiter,i),h+=B(V.decimals,n),a||(h+=m+f),h+=B(V.recurrence,c,null,!0),h+=B(V.unitType,l,null,!0),h+=B(V.taxInclusivity,u,!0),B(e,h,{...p,"aria-label":t})}var he=({displayOptical:e=!1,displayStrikethrough:t=!1,displayAnnual:r=!1}={})=>({country:n,displayFormatted:i=!0,displayRecurrence:o=!0,displayPerUnit:s=!1,displayTax:a=!1,language:c,literals:l={}}={},{commitment:u,formatString:p,price:f,priceWithoutDiscount:m,taxDisplay:h,taxTerm:x,term:y,usePrecision:L}={},P={})=>{Object.entries({country:n,formatString:p,language:c,price:f}).forEach(([ee,At])=>{if(At==null)throw new Error(`Argument "${ee}" is missing`)});let v={...To,...l},O=`${c.toLowerCase()}-${n.toUpperCase()}`;function _(ee,At){let wt=v[ee];if(wt==null)return"";try{return new Pn(wt.replace(Po,""),O).format(At)}catch{return bo.error("Failed to format literal:",wt),""}}let U=t&&m?m:f,F=e?Rn:In;r&&(F=Un);let{accessiblePrice:N,recurrenceTerm:j,...J}=F({commitment:u,formatString:p,term:y,price:e?f:U,usePrecision:L,isIndianPrice:n==="IN"}),H=N,ce="";if(b(o)&&j){let ee=_(me.recurrenceAriaLabel,{recurrenceTerm:j});ee&&(H+=" "+ee),ce=_(me.recurrenceLabel,{recurrenceTerm:j})}let ue="";if(b(s)){ue=_(me.perUnitLabel,{perUnit:"LICENSE"});let ee=_(me.perUnitAriaLabel,{perUnit:"LICENSE"});ee&&(H+=" "+ee)}let K="";b(a)&&x&&(K=_(h===_o?me.taxExclusiveLabel:me.taxInclusiveLabel,{taxTerm:x}),K&&(H+=" "+K)),t&&(H=_(me.strikethroughAriaLabel,{strikethroughPrice:H}));let X=V.container;if(e&&(X+=" "+V.containerOptical),t&&(X+=" "+V.containerStrikethrough),r&&(X+=" "+V.containerAnnual),b(i))return Ao(X,{...J,accessibleLabel:H,recurrenceLabel:ce,perUnitLabel:ue,taxInclusivityLabel:K},P);let{currencySymbol:xe,decimals:je,decimalsDelimiter:We,hasCurrencySpace:Ne,integer:St,isCurrencyFirst:ri}=J,ye=[St,We,je];ri?(ye.unshift(Ne?"\xA0":""),ye.unshift(xe)):(ye.push(Ne?"\xA0":""),ye.push(xe)),ye.push(ce,ue,K);let ni=ye.join("");return B(X,ni,P)},Dn=()=>(e,t,r)=>{let i=(e.displayOldPrice===void 0||b(e.displayOldPrice))&&t.priceWithoutDiscount&&t.priceWithoutDiscount!=t.price;return`${he()(e,t,r)}${i?" "+he({displayStrikethrough:!0})(e,t,r):""}`};var sr=he(),ar=Dn(),cr=he({displayOptical:!0}),ur=he({displayStrikethrough:!0}),lr=he({displayAnnual:!0});var wo=(e,t)=>{if(!(!Pe(e)||!Pe(t)))return Math.floor((t-e)/t*100)},Mn=()=>(e,t,r)=>{let{price:n,priceWithoutDiscount:i}=t,o=wo(n,i);return o===void 0?'':`${o}%`};var fr=Mn();var pr="ABM",mr="PUF",hr="M2M",dr="PERPETUAL",kn="P3Y",Oo="TAX_INCLUSIVE_DETAILS",Lo="TAX_EXCLUSIVE",Gn={ABM:pr,PUF:mr,M2M:hr,PERPETUAL:dr,P3Y:kn},za={[pr]:{commitment:C.YEAR,term:w.MONTHLY},[mr]:{commitment:C.YEAR,term:w.ANNUAL},[hr]:{commitment:C.MONTH,term:w.MONTHLY},[dr]:{commitment:C.PERPETUAL,term:void 0},[kn]:{commitment:C.THREE_MONTHS,term:w.P3Y}},Fn="Value is not an offer",st=e=>{if(typeof e!="object")return Fn;let{commitment:t,term:r}=e,n=No(t,r);return{...e,planType:n}};var No=(e,t)=>{if(e===void 0)return Fn;if(e===""&&t==="")return"";let r="";return e===C.YEAR?t===w.MONTHLY?r=pr:t===w.ANNUAL&&(r=mr):e===C.MONTH?t===w.MONTHLY&&(r=hr):e===C.PERPETUAL&&(r=dr),r};function Er(e){let{priceDetails:t}=e,{price:r,priceWithoutDiscount:n,priceWithoutTax:i,priceWithoutDiscountAndTax:o,taxDisplay:s}=t;if(s!==Oo)return e;let a={...e,priceDetails:{...t,price:i??r,priceWithoutDiscount:o??n,taxDisplay:Lo}};return a.offerType==="TRIAL"&&a.priceDetails.price===0&&(a.priceDetails.price=a.priceDetails.priceWithoutDiscount),a}var{freeze:de}=Object,Y=de({...le}),$=de({...oe}),q=de({...W}),gr=de({...C}),Ae=de({...Re}),xr=de({...Gn}),yr=de({...w});var Ar={};oi(Ar,{CLASS_NAME_FAILED:()=>at,CLASS_NAME_PENDING:()=>ct,CLASS_NAME_RESOLVED:()=>ut,ERROR_MESSAGE_BAD_REQUEST:()=>vr,ERROR_MESSAGE_MISSING_LITERALS_URL:()=>br,ERROR_MESSAGE_OFFER_NOT_FOUND:()=>Tr,EVENT_TYPE_ERROR:()=>Co,EVENT_TYPE_FAILED:()=>lt,EVENT_TYPE_PENDING:()=>ft,EVENT_TYPE_READY:()=>Ee,EVENT_TYPE_RESOLVED:()=>pt,LOG_NAMESPACE:()=>Pr,PARAM_AOS_API_KEY:()=>Ro,PARAM_ENV:()=>_r,PARAM_LANDSCAPE:()=>Sr,PARAM_WCS_API_KEY:()=>Io,STATE_FAILED:()=>z,STATE_PENDING:()=>Z,STATE_RESOLVED:()=>Q,TAG_NAME_SERVICE:()=>ne});var at="placeholder-failed",ct="placeholder-pending",ut="placeholder-resolved",vr="Bad WCS request",Tr="Commerce offer not found",br="Literals URL not provided",Co="wcms:commerce:error",lt="wcms:placeholder:failed",ft="wcms:placeholder:pending",Ee="wcms:commerce:ready",pt="wcms:placeholder:resolved",Pr="wcms/commerce",_r="commerce.env",Sr="commerce.landscape",Ro="commerce.aosKey",Io="commerce.wcsKey",z="failed",Z="pending",Q="resolved",ne="wcms-commerce";var wr={clientId:"merch-at-scale",delimiter:"\xB6",ignoredProperties:["analytics","literals"],serializableTypes:["Array","Object"],sampleRate:30,tags:"consumer=milo/commerce"},Vn=new Set,Uo=e=>e instanceof Error||typeof e.originatingRequest=="string";function jn(e){if(e==null)return;let t=typeof e;if(t==="function"){let{name:r}=e;return r?`${t} ${r}`:t}if(t==="object"){if(e instanceof Error)return e.message;if(typeof e.originatingRequest=="string"){let{message:n,originatingRequest:i,status:o}=e;return[n,o,i].filter(s=>s).join(" ")}let r=e[Symbol.toStringTag]??Object.getPrototypeOf(e).constructor.name;if(!wr.serializableTypes.includes(r))return r}return e}function Do(e,t){if(!wr.ignoredProperties.includes(e))return jn(t)}var Or={append(e){let{delimiter:t,sampleRate:r,tags:n,clientId:i}=wr,{message:o,params:s}=e,a=[],c=o,l=[];s.forEach(f=>{f!=null&&(Uo(f)?a:l).push(f)}),a.length&&(c+=" ",c+=a.map(jn).join(" "));let{pathname:u,search:p}=window.location;c+=`${t}page=`,c+=u+p,l.length&&(c+=`${t}facts=`,c+=JSON.stringify(l,Do)),Vn.has(c)||(Vn.add(c),window.lana.log(c,{sampleRate:r,tags:n,clientId:i}))}};var g=Object.freeze({checkoutClientId:"adobe_com",checkoutWorkflow:Y.V3,checkoutWorkflowStep:$.EMAIL,country:"US",displayOldPrice:!0,displayPerUnit:!1,displayRecurrence:!0,displayTax:!1,env:q.PRODUCTION,forceTaxExclusive:!1,language:"en",entitlement:!1,extraOptions:{},modal:!1,promotionCode:"",quantity:1,wcsApiKey:"wcms-commerce-ims-ro-user-milo",wcsBufferDelay:1,wcsEnv:Ae.PRODUCTION,landscape:M.PUBLISHED,wcsBufferLimit:1});function Wn(e,{once:t=!1}={}){let r=null;function n(){let i=document.querySelector(ne);i!==r&&(r=i,i&&e(i))}return document.addEventListener(Ee,n,{once:t}),ae(n),()=>document.removeEventListener(Ee,n)}function mt(e,{country:t,forceTaxExclusive:r,perpetual:n}){let i;if(e.length<2)i=e;else{let o=t==="GB"||n?"EN":"MULT",[s,a]=e;i=[s.language===o?s:a]}return r&&(i=i.map(Er)),i}var ae=e=>window.setTimeout(e);function we(e,t=1){if(e==null)return[t];let r=(Array.isArray(e)?e:String(e).split(",")).map(Se).filter(Pe);return r.length||(r=[t]),r}function ht(e){return e==null?[]:(Array.isArray(e)?e:String(e).split(",")).filter(Wt)}function k(){return window.customElements.get(ne)?.instance}var Mo="en_US",ko={ar:"AR_es",br:"BR_pt",ca:"CA_en",cl:"CL_es",co:"CO_es",la:"DO_es",mx:"MX_es",pe:"PE_es",africa:"ZA_en",dk:"DK_da",de:"DE_de",ee:"EE_et",es:"ES_es",fr:"FR_fr",ie:"IE_en",il_he:"IL_iw",it:"IT_it",lv:"LV_lv",lt:"LT_lt",hu:"HU_hu",mt:"MT_en",mena_en:"DZ_en",mena_ar:"DZ_ar",nl:"NL_nl",no:"NO_nb",pl:"PL_pl",pt:"PT_pt",ro:"RO_ro",si:"SI_sl",sk:"SK_sk",fi:"FI_fi",se:"SE_sv",tr:"TR_tr",uk:"GB_en",at:"AT_de",cz:"CZ_cs",bg:"BG_bg",ru:"RU_ru",ua:"UA_uk",au:"AU_en",in:"IN_en",id_id:"ID_in",nz:"NZ_en",sg:"SG_en",cn:"CN_zh-Hans",tw:"TW_zh-Hant",hk_zh:"HK_zh-hant",jp:"JP_ja",kr:"KR_ko",za:"ZA_en",ng:"NG_en",cr:"CR_es",ec:"EC_es",pr:"US_es",gt:"GT_es",cis_en:"AZ_en",cis_ru:"AZ_ru",sea:"SG_en",th:"TH_en"},ie=Object.freeze({LOCAL:"local",PROD:"prod",STAGE:"stage"});function Hn({locale:e={}}={}){if(!e.prefix)return{country:g.country,language:g.language,locale:Mo};let t=e.prefix.replace("/","")??"",[r=g.country,n=g.language]=(ko[t]??t).split("_",2);return r=r.toUpperCase(),n=n.toLowerCase(),{country:r,language:n,locale:`${n}_${r}`}}function Lr(e={}){let{commerce:t={},locale:r=void 0}=e,i=(e.env?.name===ie.PROD?ie.PROD:re(A(_r,t,{metadata:!1}),ie,ie.PROD))===ie.STAGE?q.STAGE:q.PRODUCTION,o=A("checkoutClientId",t)??g.checkoutClientId,s=re(A("checkoutWorkflow",t),Y,g.checkoutWorkflow),a=$.CHECKOUT;s===Y.V3&&(a=re(A("checkoutWorkflowStep",t),$,g.checkoutWorkflowStep));let c=b(A("displayOldPrice",t),g.displayOldPrice),l=b(A("displayPerUnit",t),g.displayPerUnit),u=b(A("displayRecurrence",t),g.displayRecurrence),p=b(A("displayTax",t),g.displayTax),f=b(A("entitlement",t),g.entitlement),m=b(A("modal",t),g.modal),h=b(A("forceTaxExclusive",t),g.forceTaxExclusive),x=A("promotionCode",t)??g.promotionCode,y=we(A("quantity",t)),L=A("wcsApiKey",t)??g.wcsApiKey,P=e.env?.name===ie.PROD?M.PUBLISHED:re(A(Sr,t),M,g.landscape),v=Se(A("wcsBufferDelay",t),g.wcsBufferDelay),O=Se(A("wcsBufferLimit",t),g.wcsBufferLimit);return{...Hn({locale:r}),displayOldPrice:c,checkoutClientId:o,checkoutWorkflow:s,checkoutWorkflowStep:a,displayPerUnit:l,displayRecurrence:u,displayTax:p,entitlement:f,extraOptions:g.extraOptions,modal:m,env:i,forceTaxExclusive:h,priceLiteralsURL:t.priceLiteralsURL,priceLiteralsPromise:t.priceLiteralsPromise,promotionCode:x,quantity:y,wcsApiKey:L,wcsBufferDelay:v,wcsBufferLimit:O,wcsEnv:i===q.STAGE?Ae.STAGE:Ae.PRODUCTION,landscape:P}}var Bn="debug",Go="error",Fo="info",Vo="warn",jo=Date.now(),Nr=new Set,Cr=new Set,Xn=new Map,Ve=Object.freeze({DEBUG:Bn,ERROR:Go,INFO:Fo,WARN:Vo}),Yn={append({level:e,message:t,params:r,timestamp:n,source:i}){console[e](`${n}ms [${i}] %c${t}`,"font-weight: bold;",...r)}},$n={filter:({level:e})=>e!==Bn},Wo={filter:()=>!1};function Ho(e,t,r,n,i){return{level:e,message:t,namespace:r,get params(){if(n.length===1){let[o]=n;se(o)&&(n=o(),Array.isArray(n)||(n=[n]))}return n},source:i,timestamp:Date.now()-jo}}function Xo(e){[...Cr].every(t=>t(e))&&Nr.forEach(t=>t(e))}function qn(e){let t=(Xn.get(e)??0)+1;Xn.set(e,t);let r=`${e} #${t}`,n=o=>(s,...a)=>Xo(Ho(o,s,e,a,r)),i=Object.seal({id:r,namespace:e,module(o){return qn(`${i.namespace}/${o}`)},debug:n(Ve.DEBUG),error:n(Ve.ERROR),info:n(Ve.INFO),warn:n(Ve.WARN)});return i}function dt(...e){e.forEach(t=>{let{append:r,filter:n}=t;se(n)?Cr.add(n):se(r)&&Nr.add(r)})}function Bo(e={}){let{name:t}=e,r=b(A("commerce.debug",{search:!0,storage:!0}),t===ie.LOCAL);return dt(r?Yn:$n),t===ie.PROD&&dt(Or),I}function Yo(){Nr.clear(),Cr.clear()}var I={...qn(Pr),Level:Ve,Plugins:{consoleAppender:Yn,debugFilter:$n,quietFilter:Wo,lanaAppender:Or},init:Bo,reset:Yo,use:dt};var $o={CLASS_NAME_FAILED:at,CLASS_NAME_PENDING:ct,CLASS_NAME_RESOLVED:ut,EVENT_TYPE_FAILED:lt,EVENT_TYPE_PENDING:ft,EVENT_TYPE_RESOLVED:pt,STATE_FAILED:z,STATE_PENDING:Z,STATE_RESOLVED:Q},qo={[z]:at,[Z]:ct,[Q]:ut},zo={[z]:lt,[Z]:ft,[Q]:pt},xt=new WeakMap;function G(e){if(!xt.has(e)){let t=I.module(e.constructor.is);xt.set(e,{changes:new Map,connected:!1,dispose:be,error:void 0,log:t,options:void 0,promises:[],state:Z,timer:null,value:void 0,version:0})}return xt.get(e)}function Et(e){let t=G(e),{error:r,promises:n,state:i}=t;(i===Q||i===z)&&(t.promises=[],i===Q?n.forEach(({resolve:o})=>o(e)):i===z&&n.forEach(({reject:o})=>o(r))),e.dispatchEvent(new CustomEvent(zo[i],{bubbles:!0}))}function gt(e){let t=xt.get(e);[z,Z,Q].forEach(r=>{e.classList.toggle(qo[r],r===t.state)})}var Zo={get error(){return G(this).error},get log(){return G(this).log},get options(){return G(this).options},get state(){return G(this).state},get value(){return G(this).value},attributeChangedCallback(e,t,r){G(this).changes.set(e,r),this.requestUpdate()},connectedCallback(){G(this).dispose=Wn(()=>this.requestUpdate(!0))},disconnectedCallback(){let e=G(this);e.connected&&(e.connected=!1,e.log.debug("Disconnected:",{element:this})),e.dispose(),e.dispose=be},onceSettled(){let{error:e,promises:t,state:r}=G(this);return Q===r?Promise.resolve(this):z===r?Promise.reject(e):new Promise((n,i)=>{t.push({resolve:n,reject:i})})},toggleResolved(e,t,r){let n=G(this);return e!==n.version?!1:(r!==void 0&&(n.options=r),n.state=Q,n.value=t,gt(this),this.log.debug("Resolved:",{element:this,value:t}),ae(()=>Et(this)),!0)},toggleFailed(e,t,r){let n=G(this);return e!==n.version?!1:(r!==void 0&&(n.options=r),n.error=t,n.state=z,gt(this),n.log.error("Failed:",{element:this,error:t}),ae(()=>Et(this)),!0)},togglePending(e){let t=G(this);return t.version++,e&&(t.options=e),t.state=Z,gt(this),ae(()=>Et(this)),t.version},requestUpdate(e=!1){if(!this.isConnected||!k())return;let t=G(this);if(t.timer)return;let{error:r,options:n,state:i,value:o,version:s}=t;t.state=Z,t.timer=ae(async()=>{t.timer=null;let a=null;if(t.changes.size&&(a=Object.fromEntries(t.changes.entries()),t.changes.clear()),t.connected?t.log.debug("Updated:",{element:this,changes:a}):(t.connected=!0,t.log.debug("Connected:",{element:this,changes:a})),a||e)try{await this.render?.()===!1&&t.state===Z&&t.version===s&&(t.state=i,t.error=r,t.value=o,gt(this),Et(this))}catch(c){this.toggleFailed(t.version,c,n)}})}};function zn(e={}){return Object.entries(e).forEach(([t,r])=>{(r==null||r===""||r?.length===0)&&delete e[t]}),e}function yt(e,t={}){let{tag:r,is:n}=e,i=document.createElement(r,{is:n});return i.setAttribute("is",n),Object.assign(i.dataset,zn(t)),i}function vt(e){let{tag:t,is:r,prototype:n}=e,i=window.customElements.get(r);return i||(Object.defineProperties(n,Object.getOwnPropertyDescriptors(Zo)),i=Object.defineProperties(e,Object.getOwnPropertyDescriptors($o)),window.customElements.define(r,i,{extends:t})),i}function Tt(e,t=document.body){return Array.from(t?.querySelectorAll(`${e.tag}[is="${e.is}"]`)??[])}function bt(e,t={}){return e instanceof HTMLElement?(Object.assign(e.dataset,zn(t)),e):null}var Qo="download",Jo="upgrade",ge,Oe=class Oe extends HTMLAnchorElement{constructor(){super();Mr(this,ge,void 0);this.addEventListener("click",this.clickHandler)}static get observedAttributes(){return["data-checkout-workflow","data-checkout-workflow-step","data-extra-options","data-ims-country","data-perpetual","data-promotion-code","data-quantity","data-template","data-wcs-osi","data-entitlement","data-upgrade","data-modal"]}static createCheckoutLink(r={},n=""){let i=k();if(!i)return null;let{checkoutMarketSegment:o,checkoutWorkflow:s,checkoutWorkflowStep:a,entitlement:c,upgrade:l,modal:u,perpetual:p,promotionCode:f,quantity:m,wcsOsi:h,extraOptions:x}=i.collectCheckoutOptions(r),y=yt(Oe,{checkoutMarketSegment:o,checkoutWorkflow:s,checkoutWorkflowStep:a,entitlement:c,upgrade:l,modal:u,perpetual:p,promotionCode:f,quantity:m,wcsOsi:h,extraOptions:x});return n&&(y.innerHTML=`${n}`),y}static getCheckoutLinks(r){return Tt(Oe,r)}get isCheckoutLink(){return!0}get placeholder(){return this}clickHandler(r){var n;(n=Ot(this,ge))==null||n.call(this,r)}async render(r={}){if(!this.isConnected)return!1;let n=k();if(!n)return!1;this.dataset.imsCountry||n.imsCountryPromise.then(u=>{u&&(this.dataset.imsCountry=u)},be);let i=n.collectCheckoutOptions(r,this.placeholder);if(!i.wcsOsi.length)return!1;let o;try{o=JSON.parse(i.extraOptions??"{}")}catch(u){this.placeholder.log.error("cannot parse exta checkout options",u)}let s=this.placeholder.togglePending(i);this.href="";let a=n.resolveOfferSelectors(i),c=await Promise.all(a);c=c.map(u=>mt(u,i));let l=await n.buildCheckoutAction(c.flat(),{...o,...i});return this.renderOffers(c.flat(),i,{},l,s)}renderOffers(r,n,i={},o=void 0,s=void 0){if(!this.isConnected)return!1;let a=k();if(!a)return!1;if(n={...JSON.parse(this.placeholder.dataset.extraOptions??"null"),...n,...i},s??(s=this.placeholder.togglePending(n)),Ot(this,ge)&&Lt(this,ge,void 0),o){this.classList.remove(Qo,Jo),this.placeholder.toggleResolved(s,r,n);let{url:l,text:u,className:p,handler:f}=o;return l&&(this.href=l),u&&(this.firstElementChild.innerHTML=u),p&&this.classList.add(...p.split(" ")),f&&(this.setAttribute("href","#"),Lt(this,ge,f.bind(this))),!0}else if(r.length){if(this.placeholder.toggleResolved(s,r,n)){let l=a.buildCheckoutURL(r,n);return this.setAttribute("href",l),!0}}else{let l=new Error(`Not provided: ${n?.wcsOsi??"-"}`);if(this.placeholder.toggleFailed(s,l,n))return this.setAttribute("href","#"),!0}return!1}updateOptions(r={}){let n=k();if(!n)return!1;let{checkoutMarketSegment:i,checkoutWorkflow:o,checkoutWorkflowStep:s,entitlement:a,upgrade:c,modal:l,perpetual:u,promotionCode:p,quantity:f,wcsOsi:m}=n.collectCheckoutOptions(r);return bt(this,{checkoutMarketSegment:i,checkoutWorkflow:o,checkoutWorkflowStep:s,entitlement:a,upgrade:c,modal:l,perpetual:u,promotionCode:p,quantity:f,wcsOsi:m}),!0}};ge=new WeakMap,te(Oe,"is","checkout-link"),te(Oe,"tag","a");var Rr=Oe,Pt=vt(Rr);var Le=class Le extends HTMLSpanElement{static get observedAttributes(){return["data-display-old-price","data-display-per-unit","data-display-recurrence","data-display-tax","data-perpetual","data-promotion-code","data-tax-exclusive","data-template","data-wcs-osi"]}static createInlinePrice(t){let r=k();if(!r)return null;let{displayOldPrice:n,displayPerUnit:i,displayRecurrence:o,displayTax:s,forceTaxExclusive:a,perpetual:c,promotionCode:l,quantity:u,template:p,wcsOsi:f}=r.collectPriceOptions(t);return yt(Le,{displayOldPrice:n,displayPerUnit:i,displayRecurrence:o,displayTax:s,forceTaxExclusive:a,perpetual:c,promotionCode:l,quantity:u,template:p,wcsOsi:f})}static getInlinePrices(t){return Tt(Le,t)}get isInlinePrice(){return!0}get placeholder(){return this}async render(t={}){if(!this.isConnected)return!1;let r=k();if(!r)return!1;let n=r.collectPriceOptions(t,this.placeholder);if(!n.wcsOsi.length)return!1;let i=this.placeholder.togglePending(n);this.innerHTML="";let[o]=r.resolveOfferSelectors(n);return this.renderOffers(mt(await o,n),n,i)}renderOffers(t,r={},n=void 0){if(!this.isConnected)return;let i=k();if(!i)return!1;let o=i.collectPriceOptions({...this.dataset,...r});if(n??(n=this.placeholder.togglePending(o)),t.length){if(this.placeholder.toggleResolved(n,t,o))return this.innerHTML=i.buildPriceHTML(t,o),!0}else{let s=new Error(`Not provided: ${o?.wcsOsi??"-"}`);if(this.placeholder.toggleFailed(n,s,o))return this.innerHTML="",!0}return!1}updateOptions(t){let r=k();if(!r)return!1;let{displayOldPrice:n,displayPerUnit:i,displayRecurrence:o,displayTax:s,forceTaxExclusive:a,perpetual:c,promotionCode:l,quantity:u,template:p,wcsOsi:f}=r.collectPriceOptions(t);return bt(this,{displayOldPrice:n,displayPerUnit:i,displayRecurrence:o,displayTax:s,forceTaxExclusive:a,perpetual:c,promotionCode:l,quantity:u,template:p,wcsOsi:f}),!0}};te(Le,"is","inline-price"),te(Le,"tag","span");var Ir=Le,_t=vt(Ir);function Zn({providers:e,settings:t},r){let n=I.module("checkout");function i(l,u){let{checkoutClientId:p,checkoutWorkflow:f,checkoutWorkflowStep:m,country:h,language:x,promotionCode:y,quantity:L}=t,{checkoutMarketSegment:P,checkoutWorkflow:v=f,checkoutWorkflowStep:O=m,imsCountry:_,country:U=_??h,language:F=x,quantity:N=L,entitlement:j,upgrade:J,modal:H,perpetual:ce,promotionCode:ue=y,wcsOsi:K,extraOptions:X,...xe}=Object.assign({},u?.dataset??{},l??{}),je=re(v,Y,g.checkoutWorkflow),We=$.CHECKOUT;je===Y.V3&&(We=re(O,$,g.checkoutWorkflowStep));let Ne=_e({...xe,extraOptions:X,checkoutClientId:p,checkoutMarketSegment:P,country:U,quantity:we(N,g.quantity),checkoutWorkflow:je,checkoutWorkflowStep:We,language:F,entitlement:b(j),upgrade:b(J),modal:b(H),perpetual:b(ce),promotionCode:Ie(ue).effectivePromoCode,wcsOsi:ht(K)});if(u)for(let St of e.checkout)St(u,Ne);return Ne}async function o(l,u){let p=k(),f=await r.getCheckoutAction?.(l,u,p.imsSignedInPromise);return f||null}function s(l,u){if(!Array.isArray(l)||!l.length||!u)return"";let{env:p,landscape:f}=t,{checkoutClientId:m,checkoutMarketSegment:h,checkoutWorkflow:x,checkoutWorkflowStep:y,country:L,promotionCode:P,quantity:v,...O}=i(u),_=window.frameElement?"if":"fp",U={checkoutPromoCode:P,clientId:m,context:_,country:L,env:p,items:[],marketSegment:h,workflowStep:y,landscape:f,...O};if(l.length===1){let[{offerId:F,offerType:N,productArrangementCode:j}]=l,{marketSegments:[J]}=l[0];Object.assign(U,{marketSegment:J,offerType:N,productArrangementCode:j}),U.items.push(v[0]===1?{id:F}:{id:F,quantity:v[0]})}else U.items.push(...l.map(({offerId:F},N)=>({id:F,quantity:v[N]??g.quantity})));return Dt(x,U)}let{createCheckoutLink:a,getCheckoutLinks:c}=Pt;return{CheckoutLink:Pt,CheckoutWorkflow:Y,CheckoutWorkflowStep:$,buildCheckoutAction:o,buildCheckoutURL:s,collectCheckoutOptions:i,createCheckoutLink:a,getCheckoutLinks:c}}function Ko({interval:e=200,maxAttempts:t=25}={}){let r=I.module("ims");return new Promise(n=>{r.debug("Waing for IMS to be ready");let i=0;function o(){window.adobeIMS?.initialized?n():++i>t?(r.debug("Timeout"),n()):setTimeout(o,e)}o()})}function es(e){return e.then(()=>window.adobeIMS.isSignedInUser())}function ts(e){let t=I.module("ims");return e.then(r=>r?window.adobeIMS.getProfile().then(({countryCode:n})=>(t.debug("Got user country:",n),n),n=>{t.error("Unable to get user country:",n)}):null)}function Qn({}){let e=Ko(),t=es(e),r=ts(t);return{imsReadyPromise:e,imsSignedInPromise:t,imsCountryPromise:r}}function rs(e){if(!e.priceLiteralsURL)throw new Error(br);return new Promise(t=>{window.fetch(e.priceLiteralsURL).then(r=>{r.json().then(({data:n})=>{t(n)})})})}async function Jn(e){let r=await(e.priceLiteralsPromise||rs(e));if(Array.isArray(r)){let n=o=>r.find(s=>$e(s.lang,o)),i=n(e.language)??n(g.language);if(i)return Object.freeze(i)}return{}}function Kn({literals:e,providers:t,settings:r}){function n(a,c){let{country:l,displayOldPrice:u,displayPerUnit:p,displayRecurrence:f,displayTax:m,forceTaxExclusive:h,language:x,promotionCode:y,quantity:L}=r,{displayOldPrice:P=u,displayPerUnit:v=p,displayRecurrence:O=f,displayTax:_=m,forceTaxExclusive:U=h,country:F=l,language:N=x,perpetual:j,promotionCode:J=y,quantity:H=L,template:ce,wcsOsi:ue,...K}=Object.assign({},c?.dataset??{},a??{}),X=_e({...K,country:F,displayOldPrice:b(P),displayPerUnit:b(v),displayRecurrence:b(O),displayTax:b(_),forceTaxExclusive:b(U),language:N,perpetual:b(j),promotionCode:Ie(J).effectivePromoCode,quantity:we(H,g.quantity),template:ce,wcsOsi:ht(ue)});if(c)for(let xe of t.price)xe(c,X);return X}function i(a,c){if(!Array.isArray(a)||!a.length||!c)return"";let{template:l}=c,u;switch(l){case"discount":u=fr;break;case"strikethrough":u=ur;break;case"optical":u=cr;break;case"annual":u=lr;break;default:u=c.promotionCode?ar:sr}let p=n(c);p.literals=Object.assign({},e.price,_e(c.literals??{}));let[f]=a;return f={...f,...f.priceDetails},u(p,f)}let{createInlinePrice:o,getInlinePrices:s}=_t;return{InlinePrice:_t,buildPriceHTML:i,collectPriceOptions:n,createInlinePrice:o,getInlinePrices:s}}var ns={[q.PRODUCTION]:"https://wcs.adobe.com",[q.STAGE]:"https://wcs.stage.adobe.com"};function ei({settings:e}){let t=I.module("wcs"),{env:r,wcsApiKey:n}=e,i={apiKey:n,baseUrl:ns[r],fetch:window.fetch.bind(window)},o=Ye(i),s=new Map,a=new Map,c;async function l(f,m,h=!0){let x=Tr;try{t.debug("Fetching:",f),f.offerSelectorIds=f.offerSelectorIds.sort();let{data:y}=await o(f,{apiKey:n,environment:e.wcsEnv,landscape:r===q.STAGE?"ALL":e.landscape},({resolvedOffers:P})=>({offers:P.map(st)}));t.debug("Fetched:",f,y);let{offers:L}=y??{};m.forEach(({resolve:P},v)=>{let O=L.filter(({offerSelectorIds:_})=>_.includes(v)).flat();O.length&&(m.delete(v),P(O))})}catch(y){y.status===404&&f.offerSelectorIds.length>1?(t.debug("Multi-osi 404, fallback to fetch-by-one strategy"),await Promise.allSettled(f.offerSelectorIds.map(L=>l({...f,offerSelectorIds:[L]},m,!1)))):(t.error("Failed:",f,y),x=vr)}h&&m.size&&(t.debug("Missing:",{offerSelectorIds:[...m.keys()]}),m.forEach(y=>{y.reject(new Error(x))}))}function u(){clearTimeout(c);let f=[...a.values()];a.clear(),f.forEach(({options:m,promises:h})=>l(m,h))}function p({country:f,language:m,perpetual:h=!1,promotionCode:x="",wcsOsi:y=[]}){let L=`${m}_${f}`;f!=="GB"&&(m=h?"EN":"MULT");let P=[f,m,x].filter(v=>v).join("-").toLowerCase();return y.map(v=>{let O=`${v}-${P}`;if(!s.has(O)){let _=new Promise((U,F)=>{let N=a.get(P);if(!N){let j={country:f,locale:L,offerSelectorIds:[]};f!=="GB"&&(j.language=m),N={options:j,promises:new Map},a.set(P,N)}x&&(N.options.promotionCode=x),N.options.offerSelectorIds.push(v),N.promises.set(v,{resolve:U,reject:F}),N.options.offerSelectorIds.length>=e.wcsBufferLimit?u():(t.debug("Queued:",N.options),c||(c=setTimeout(u,e.wcsBufferDelay)))});s.set(O,_)}return s.get(O)})}return{WcsCommitment:gr,WcsPlanType:xr,WcsTerm:yr,resolveOfferSelectors:p}}var D=class extends HTMLElement{get isWcmsCommerce(){return!0}};te(D,"instance"),te(D,"promise",null);window.customElements.define(ne,D);async function is(e,t){let r=I.init(e.env).module("service");r.debug("Activating:",e);let n={price:{}},i=Object.freeze(Lr(e));try{n.price=await Jn(i)}catch(c){r.warn("Price literals were not fetched:",c)}let o={checkout:new Set,price:new Set},s=document.createElement(ne),a={literals:n,providers:o,settings:i};return D.instance=Object.defineProperties(s,Object.getOwnPropertyDescriptors({...Zn(a,t),...Qn(a),...Kn(a),...ei(a),...Ar,Log:I,get defaults(){return g},get literals(){return n},get log(){return I},get providers(){return{checkout(c){return o.checkout.add(c),()=>o.checkout.delete(c)},price(c){return o.price.add(c),()=>o.price.delete(c)}}},get settings(){return i}})),r.debug("Activated:",{literals:n,settings:i,element:s}),document.head.append(s),ae(()=>{let c=new CustomEvent(Ee,{bubbles:!0,cancelable:!1,detail:D.instance});D.instance.dispatchEvent(c)}),D.instance}function ti(){document.head.querySelector(ne)?.remove(),D.promise=null,I.reset()}function os(e,t){if(se(e)){let r=se(t)?t():{};return r.force&&ti(),D.promise??(D.promise=is(e(),r))}return D.promise?D.promise:new Promise(r=>{let n=i=>{r(i.detail)};document.head.addEventListener(Ee,n,{once:!0})})}export{Pt as CheckoutLink,Y as CheckoutWorkflow,$ as CheckoutWorkflowStep,g as Defaults,_t as InlinePrice,M as Landscape,I as Log,ne as TAG_NAME_SERVICE,gr as WcsCommitment,Ae as WcsEnv,xr as WcsPlanType,yr as WcsTerm,st as applyPlanType,Hn as getLocaleSettings,Lr as getSettings,os as init,ti as reset}; +`,pe.MISSING_INTL_API,s);var P=r.getPluralRules(t,{type:u.pluralType}).select(f-(u.offset||0));y=u.options[P]||u.options.other}if(!y)throw new ir(u.value,f,Object.keys(u.options),s);a.push.apply(a,je(y.value,t,r,n,i,f-(u.offset||0)));continue}}return uo(a)}function fo(e,t){return t?T(T(T({},e||{}),t||{}),Object.keys(e).reduce(function(r,n){return r[n]=T(T({},e[n]),t[n]||{}),r},{})):e}function po(e,t){return t?Object.keys(e).reduce(function(r,n){return r[n]=fo(e[n],t[n]),r},T({},e)):e}function or(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,r){e[t]=r}}}}}function mo(e){return e===void 0&&(e={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:Ve(function(){for(var t,r=[],n=0;n0?e.substring(0,n):"";let i=Un(e.split("").reverse().join("")),o=r-i,s=e.substring(o,o+1),a=o+(s==="."||s===","?1:0);t.suffix=i>0?e.substring(a,r):"",t.mask=e.substring(n,a),t.maskHasNegativeSign=t.mask.charAt(0)==="-",t.maskHasPositiveSign=t.mask.charAt(0)==="+";let c=t.mask.match(Eo);return t.decimal=c&&c[c.length-1]||".",t.separator=c&&c[1]&&c[0]||",",c=t.mask.split(t.decimal),t.integer=c[0],t.fraction=c[1],t}function go(e,t,r){let n=!1,i={value:e};e<0&&(n=!0,i.value=-i.value),i.sign=n?"-":"",i.value=Number(i.value).toFixed(t.fraction&&t.fraction.length),i.value=Number(i.value).toString();let o=t.fraction&&t.fraction.lastIndexOf("0"),[s="0",a=""]=i.value.split(".");return(!a||a&&a.length<=o)&&(a=o<0?"":(+("0."+a)).toFixed(o+1).replace("0.","")),i.integer=s,i.fraction=a,yo(i,t),(i.result==="0"||i.result==="")&&(n=!1,i.sign=""),!n&&t.maskHasPositiveSign?i.sign="+":n&&t.maskHasPositiveSign?i.sign="-":n&&(i.sign=r&&r.enforceMaskSign&&!t.maskHasNegativeSign?"":"-"),i}function yo(e,t){e.result="";let r=t.integer.split(t.separator),n=r.join(""),i=n&&n.indexOf("0");if(i>-1)for(;e.integer.lengthMath.round(e*20)/20},fr=(e,t)=>({accept:e,round:t}),So=[fr(({divisor:e,price:t})=>t%e==0,({divisor:e,price:t})=>t/e),fr(({usePrecision:e})=>e,({divisor:e,price:t})=>Math.ceil(Math.floor(t*1e4/e)/100)/100),fr(()=>!0,({divisor:e,price:t})=>Math.ceil(Math.floor(t*100/e)/100))],Vn={[be.YEAR]:{[W.MONTHLY]:ct.MONTH,[W.ANNUAL]:ct.YEAR},[be.MONTH]:{[W.MONTHLY]:ct.MONTH}},bo=(e,t)=>e.indexOf(`'${t}'`)===0,_o=(e,t=!0)=>{let r=e.replace(/'.*?'/,"").trim(),n=jn(r);return!!n?t||(r=r.replace(/[,\.]0+/,n)):r=r.replace(/\s?(#.*0)(?!\s)?/,"$&"+wo(e)),r},Oo=e=>{let t=Lo(e),r=bo(e,t),n=e.replace(/'.*?'/,""),i=Gn.test(n)||Fn.test(n);return{currencySymbol:t,isCurrencyFirst:r,hasCurrencySpace:i}},Wn=e=>e.replace(Gn,kn).replace(Fn,kn),wo=e=>e.match(/#(.?)#/)?.[1]===Mn?vo:Mn,Lo=e=>e.match(/'(.*?)'/)?.[1]??"",jn=e=>e.match(/0(.?)0/)?.[1]??"";function Hn({formatString:e,price:t,usePrecision:r,isIndianPrice:n=!1},i,o=s=>s){let{currencySymbol:s,isCurrencyFirst:a,hasCurrencySpace:c}=Oo(e),l=r?jn(e):"",u=_o(e,r),p=r?2:0,f=o(t,{currencySymbol:s}),m=n?f.toLocaleString("hi-IN",{minimumFractionDigits:p,maximumFractionDigits:p}):Dn(u,f),h=r?m.lastIndexOf(l):m.length,v=m.substring(0,h),g=m.substring(h+1);return{accessiblePrice:e.replace(/'.*?'/,"SYMBOL").replace(/#.*0/,m).replace(/SYMBOL/,s),currencySymbol:s,decimals:g,decimalsDelimiter:l,hasCurrencySpace:c,integer:v,isCurrencyFirst:a,recurrenceTerm:i}}var Xn=e=>{let{commitment:t,term:r,usePrecision:n}=e,i=Ao[r]??1;return Hn(e,i>1?ct.MONTH:Vn[t]?.[r],(o,{currencySymbol:s})=>{let a={divisor:i,price:o,usePrecision:n},{round:c}=So.find(({accept:u})=>u(a));if(!c)throw new Error(`Missing rounding rule for: ${JSON.stringify(a)}`);return(Po[s]??(u=>u))(c(a))})},Yn=({commitment:e,term:t,...r})=>Hn(r,Vn[e]?.[t]);var Ro={recurrenceLabel:"{recurrenceTerm, select, MONTH {/mo} YEAR {/yr} other {}}",recurrenceAriaLabel:"{recurrenceTerm, select, MONTH {per month} YEAR {per year} other {}}",perUnitLabel:"{perUnit, select, LICENSE {per license} other {}}",perUnitAriaLabel:"{perUnit, select, LICENSE {per license} other {}}",freeLabel:"Free",freeAriaLabel:"Free",taxExclusiveLabel:"{taxTerm, select, GST {excl. GST} VAT {excl. VAT} TAX {excl. tax} IVA {excl. IVA} SST {excl. SST} KDV {excl. KDV} other {}}",taxInclusiveLabel:"{taxTerm, select, GST {incl. GST} VAT {incl. VAT} TAX {incl. tax} IVA {incl. IVA} SST {incl. SST} KDV {incl. KDV} other {}}",alternativePriceAriaLabel:"Alternatively at {alternativePrice}",strikethroughAriaLabel:"Regularly at {strikethroughPrice}"},No=sn("ConsonantTemplates/price"),Io=/<.+?>/g,F={container:"price",containerOptical:"price-optical",containerStrikethrough:"price-strikethrough",disabled:"disabled",currencySpace:"price-currency-space",currencySymbol:"price-currency-symbol",decimals:"price-decimals",decimalsDelimiter:"price-decimals-delimiter",integer:"price-integer",recurrence:"price-recurrence",taxInclusivity:"price-tax-inclusivity",unitType:"price-unit-type"},me={perUnitLabel:"perUnitLabel",perUnitAriaLabel:"perUnitAriaLabel",recurrenceLabel:"recurrenceLabel",recurrenceAriaLabel:"recurrenceAriaLabel",taxExclusiveLabel:"taxExclusiveLabel",taxInclusiveLabel:"taxInclusiveLabel",strikethroughAriaLabel:"strikethroughAriaLabel"},Co="TAX_EXCLUSIVE",Uo=e=>nn(e)?Object.entries(e).filter(([,t])=>Te(t)||Je(t)||t===!0).reduce((t,[r,n])=>t+` ${r}${n===!0?"":'="'+tn(n)+'"'}`,""):"",X=(e,t,r,n=!1)=>`${n?Wn(t):t??""}`;function Do(e,{accessibleLabel:t,currencySymbol:r,decimals:n,decimalsDelimiter:i,hasCurrencySpace:o,integer:s,isCurrencyFirst:a,recurrenceLabel:c,perUnitLabel:l,taxInclusivityLabel:u},p={}){let f=X(F.currencySymbol,r),m=X(F.currencySpace,o?" ":""),h="";return a&&(h+=f+m),h+=X(F.integer,s),h+=X(F.decimalsDelimiter,i),h+=X(F.decimals,n),a||(h+=m+f),h+=X(F.recurrence,c,null,!0),h+=X(F.unitType,l,null,!0),h+=X(F.taxInclusivity,u,!0),X(e,h,{...p,"aria-label":t})}var _e=({displayOptical:e=!1,displayStrikethrough:t=!1}={})=>({country:r,displayFormatted:n=!0,displayRecurrence:i=!0,displayPerUnit:o=!1,displayTax:s=!1,language:a,literals:c={}}={},{commitment:l,formatString:u,price:p,priceWithoutDiscount:f,taxDisplay:m,taxTerm:h,term:v,usePrecision:g}={},O={})=>{Object.entries({country:r,formatString:u,language:a,price:p}).forEach(([K,wt])=>{if(wt==null)throw new Error(`Argument "${K}" is missing`)});let S={...Ro,...c},y=`${a.toLowerCase()}-${r.toUpperCase()}`;function P(K,wt){let Lt=S[K];if(Lt==null)return"";try{return new Cn(Lt.replace(Io,""),y).format(wt)}catch{return No.error("Failed to format literal:",Lt),""}}let w=t&&f?f:p,{accessiblePrice:I,recurrenceTerm:D,...L}=(e?Xn:Yn)({commitment:l,formatString:u,term:v,price:e?p:w,usePrecision:g,isIndianPrice:r==="IN"}),C=I,H="";if(A(i)&&D){let K=P(me.recurrenceAriaLabel,{recurrenceTerm:D});K&&(C+=" "+K),H=P(me.recurrenceLabel,{recurrenceTerm:D})}let ue="";if(A(o)){ue=P(me.perUnitLabel,{perUnit:"LICENSE"});let K=P(me.perUnitAriaLabel,{perUnit:"LICENSE"});K&&(C+=" "+K)}let Q="";A(s)&&h&&(Q=P(m===Co?me.taxExclusiveLabel:me.taxInclusiveLabel,{taxTerm:h}),Q&&(C+=" "+Q)),t&&(C=P(me.strikethroughAriaLabel,{strikethroughPrice:C}));let ie=F.container;if(e&&(ie+=" "+F.containerOptical),t&&(ie+=" "+F.containerStrikethrough),A(n))return Do(ie,{...L,accessibleLabel:C,recurrenceLabel:H,perUnitLabel:ue,taxInclusivityLabel:Q},O);let{currencySymbol:xe,decimals:ge,decimalsDelimiter:Ne,hasCurrencySpace:Ie,integer:Xe,isCurrencyFirst:Ye}=L,oe=[Xe,Ne,ge];Ye?(oe.unshift(Ie?"\xA0":""),oe.unshift(xe)):(oe.push(Ie?"\xA0":""),oe.push(xe)),oe.push(H,ue,Q);let pi=oe.join("");return X(ie,pi,O)},Bn=()=>(e,t,r)=>{let i=(e.displayOldPrice===void 0||A(e.displayOldPrice))&&t.priceWithoutDiscount&&t.priceWithoutDiscount!=t.price;return`${_e()(e,t,r)}${i?" "+_e({displayStrikethrough:!0})(e,t,r):""}`};var pr=_e(),mr=Bn(),hr=_e({displayOptical:!0}),dr=_e({displayStrikethrough:!0});var Mo=(e,t)=>{if(!(!Ae(e)||!Ae(t)))return Math.floor((t-e)/t*100)},$n=()=>(e,t,r)=>{let{price:n,priceWithoutDiscount:i}=t,o=Mo(n,i);return o===void 0?'':`${o}%`};var Er=$n();var xr;(function(e){e.BASE="BASE",e.TRIAL="TRIAL",e.PROMOTION="PROMOTION"})(xr||(xr={}));var j;(function(e){e.MONTH="MONTH",e.YEAR="YEAR",e.TWO_YEARS="TWO_YEARS",e.THREE_YEARS="THREE_YEARS",e.PERPETUAL="PERPETUAL"})(j||(j={}));var Y;(function(e){e.ANNUAL="ANNUAL",e.MONTHLY="MONTHLY",e.TWO_YEARS="TWO_YEARS",e.THREE_YEARS="THREE_YEARS"})(Y||(Y={}));var gr;(function(e){e.INDIVIDUAL="INDIVIDUAL",e.TEAM="TEAM",e.ENTERPRISE="ENTERPRISE"})(gr||(gr={}));var yr;(function(e){e.COM="COM",e.EDU="EDU",e.GOV="GOV"})(yr||(yr={}));var Tr;(function(e){e.DIRECT="DIRECT",e.INDIRECT="INDIRECT"})(Tr||(Tr={}));var vr;(function(e){e.ENTERPRISE_PRODUCT="ENTERPRISE_PRODUCT",e.ETLA="ETLA",e.RETAIL="RETAIL",e.VIP="VIP",e.VIPMP="VIPMP",e.FREE="FREE"})(vr||(vr={}));var Ar="ABM",Pr="PUF",Sr="M2M",br="PERPETUAL",ko="TAX_INCLUSIVE_DETAILS",Go="TAX_EXCLUSIVE",qn={ABM:Ar,PUF:Pr,M2M:Sr,PERPETUAL:br},lc={[Ar]:{commitment:j.YEAR,term:Y.MONTHLY},[Pr]:{commitment:j.YEAR,term:Y.ANNUAL},[Sr]:{commitment:j.MONTH,term:Y.MONTHLY},[br]:{commitment:j.PERPETUAL,term:void 0}},zn="Value is not an offer",ut=e=>{if(typeof e!="object")return zn;let{commitment:t,term:r}=e,n=Fo(t,r);return{...e,planType:n}};var Fo=(e,t)=>{if(e===void 0)return zn;if(e===""&&t==="")return"";let r="";return e===j.YEAR?t===Y.MONTHLY?r=Ar:t===Y.ANNUAL&&(r=Pr):e===j.MONTH?t===Y.MONTHLY&&(r=Sr):e===j.PERPETUAL&&(r=br),r};function _r(e){let{priceDetails:t}=e,{price:r,priceWithoutDiscount:n,priceWithoutTax:i,priceWithoutDiscountAndTax:o,taxDisplay:s}=t;if(s!==ko)return e;let a={...e,priceDetails:{...t,price:i??r,priceWithoutDiscount:o??n,taxDisplay:Go}};return a.offerType==="TRIAL"&&a.priceDetails.price===0&&(a.priceDetails.price=a.priceDetails.priceWithoutDiscount),a}var{freeze:he}=Object,B=he({...le}),$=he({...se}),q=he({...V}),Or=he({...De}),Oe=he({...Ue}),wr=he({...qn}),Lr=he({...Me});var Mr={};hi(Mr,{CLASS_NAME_FAILED:()=>lt,CLASS_NAME_PENDING:()=>ft,CLASS_NAME_RESOLVED:()=>pt,ERROR_MESSAGE_BAD_REQUEST:()=>Rr,ERROR_MESSAGE_MISSING_LITERALS_URL:()=>Ir,ERROR_MESSAGE_OFFER_NOT_FOUND:()=>Nr,EVENT_TYPE_ERROR:()=>Vo,EVENT_TYPE_FAILED:()=>mt,EVENT_TYPE_PENDING:()=>ht,EVENT_TYPE_READY:()=>de,EVENT_TYPE_RESOLVED:()=>dt,LOG_NAMESPACE:()=>Cr,PARAM_AOS_API_KEY:()=>Wo,PARAM_ENV:()=>Ur,PARAM_LANDSCAPE:()=>Dr,PARAM_WCS_API_KEY:()=>jo,STATE_FAILED:()=>z,STATE_PENDING:()=>Z,STATE_RESOLVED:()=>J,TAG_NAME_SERVICE:()=>re});var lt="placeholder-failed",ft="placeholder-pending",pt="placeholder-resolved",Rr="Bad WCS request",Nr="Commerce offer not found",Ir="Literals URL not provided",Vo="wcms:commerce:error",mt="wcms:placeholder:failed",ht="wcms:placeholder:pending",de="wcms:commerce:ready",dt="wcms:placeholder:resolved",Cr="wcms/commerce",Ur="commerce.env",Dr="commerce.landscape",Wo="commerce.aosKey",jo="commerce.wcsKey",z="failed",Z="pending",J="resolved",re="wcms-commerce";var kr={clientId:"merch-at-scale",delimiter:"\xB6",ignoredProperties:["analytics","literals"],serializableTypes:["Array","Object"],sampleRate:30,tags:"consumer=milo/commerce"},Zn=new Set,Ho=e=>e instanceof Error||typeof e.originatingRequest=="string";function Jn(e){if(e==null)return;let t=typeof e;if(t==="function"){let{name:r}=e;return r?`${t} ${r}`:t}if(t==="object"){if(e instanceof Error)return e.message;if(typeof e.originatingRequest=="string"){let{message:n,originatingRequest:i,status:o}=e;return[n,o,i].filter(s=>s).join(" ")}let r=e[Symbol.toStringTag]??Object.getPrototypeOf(e).constructor.name;if(!kr.serializableTypes.includes(r))return r}return e}function Xo(e,t){if(!kr.ignoredProperties.includes(e))return Jn(t)}var Gr={append(e){let{delimiter:t,sampleRate:r,tags:n,clientId:i}=kr,{message:o,params:s}=e,a=[],c=o,l=[];s.forEach(f=>{f!=null&&(Ho(f)?a:l).push(f)}),a.length&&(c+=" ",c+=a.map(Jn).join(" "));let{pathname:u,search:p}=window.location;c+=`${t}page=`,c+=u+p,l.length&&(c+=`${t}facts=`,c+=JSON.stringify(l,Xo)),Zn.has(c)||(Zn.add(c),window.lana.log(c,{sampleRate:r,tags:n,clientId:i}))}};var x=Object.freeze({checkoutClientId:"adobe_com",checkoutWorkflow:B.V3,checkoutWorkflowStep:$.EMAIL,country:"US",displayOldPrice:!0,displayPerUnit:!1,displayRecurrence:!0,displayTax:!1,env:q.PRODUCTION,forceTaxExclusive:!1,language:"en",entitlement:!1,extraOptions:{},modal:!1,promotionCode:"",quantity:1,wcsApiKey:"wcms-commerce-ims-ro-user-milo",wcsBufferDelay:1,wcsEnv:Oe.PRODUCTION,landscape:M.PUBLISHED,wcsBufferLimit:1});function Qn(e,{once:t=!1}={}){let r=null;function n(){let i=document.querySelector(re);i!==r&&(r=i,i&&e(i))}return document.addEventListener(de,n,{once:t}),ce(n),()=>document.removeEventListener(de,n)}function Et(e,{country:t,forceTaxExclusive:r,perpetual:n}){let i;if(e.length<2)i=e;else{let o=t==="GB"||n?"EN":"MULT",[s,a]=e;i=[s.language===o?s:a]}return r&&(i=i.map(_r)),i}var ce=e=>window.setTimeout(e);function we(e,t=1){if(e==null)return[t];let r=(Array.isArray(e)?e:String(e).split(",")).map(Se).filter(Ae);return r.length||(r=[t]),r}function xt(e){return e==null?[]:(Array.isArray(e)?e:String(e).split(",")).filter(Xt)}function k(){return window.customElements.get(re)?.instance}var Yo="en_US",Bo={ar:"AR_es",br:"BR_pt",ca:"CA_en",cl:"CL_es",co:"CO_es",la:"DO_es",mx:"MX_es",pe:"PE_es",africa:"ZA_en",dk:"DK_da",de:"DE_de",ee:"EE_et",es:"ES_es",fr:"FR_fr",ie:"IE_en",il_he:"IL_iw",it:"IT_it",lv:"LV_lv",lt:"LT_lt",hu:"HU_hu",mt:"MT_en",mena_en:"DZ_en",mena_ar:"DZ_ar",nl:"NL_nl",no:"NO_nb",pl:"PL_pl",pt:"PT_pt",ro:"RO_ro",si:"SI_sl",sk:"SK_sk",fi:"FI_fi",se:"SE_sv",tr:"TR_tr",uk:"GB_en",at:"AT_de",cz:"CZ_cs",bg:"BG_bg",ru:"RU_ru",ua:"UA_uk",au:"AU_en",in:"IN_en",id_id:"ID_in",nz:"NZ_en",sg:"SG_en",cn:"CN_zh-Hans",tw:"TW_zh-Hant",hk_zh:"HK_zh-hant",jp:"JP_ja",kr:"KR_ko",za:"ZA_en",ng:"NG_en",cr:"CR_es",ec:"EC_es",pr:"US_es",gt:"GT_es",cis_en:"AZ_en",cis_ru:"AZ_ru",sea:"SG_en",th:"TH_en"},ne=Object.freeze({LOCAL:"local",PROD:"prod",STAGE:"stage"});function Kn({locale:e={}}={}){if(!e.prefix)return{country:x.country,language:x.language,locale:Yo};let t=e.prefix.replace("/","")??"",[r=x.country,n=x.language]=(Bo[t]??t).split("_",2);return r=r.toUpperCase(),n=n.toLowerCase(),{country:r,language:n,locale:`${n}_${r}`}}function Fr(e={}){let{commerce:t={},locale:r=void 0}=e,i=(e.env?.name===ne.PROD?ne.PROD:te(_(Ur,t,{metadata:!1}),ne,ne.PROD))===ne.STAGE?q.STAGE:q.PRODUCTION,o=_("checkoutClientId",t)??x.checkoutClientId,s=te(_("checkoutWorkflow",t),B,x.checkoutWorkflow),a=$.CHECKOUT;s===B.V3&&(a=te(_("checkoutWorkflowStep",t),$,x.checkoutWorkflowStep));let c=A(_("displayOldPrice",t),x.displayOldPrice),l=A(_("displayPerUnit",t),x.displayPerUnit),u=A(_("displayRecurrence",t),x.displayRecurrence),p=A(_("displayTax",t),x.displayTax),f=A(_("entitlement",t),x.entitlement),m=A(_("modal",t),x.modal),h=A(_("forceTaxExclusive",t),x.forceTaxExclusive),v=_("promotionCode",t)??x.promotionCode,g=we(_("quantity",t)),O=_("wcsApiKey",t)??x.wcsApiKey,S=e.env?.name===ne.PROD?M.PUBLISHED:te(_(Dr,t),M,x.landscape),y=Se(_("wcsBufferDelay",t),x.wcsBufferDelay),P=Se(_("wcsBufferLimit",t),x.wcsBufferLimit);return{...Kn({locale:r}),displayOldPrice:c,checkoutClientId:o,checkoutWorkflow:s,checkoutWorkflowStep:a,displayPerUnit:l,displayRecurrence:u,displayTax:p,entitlement:f,extraOptions:x.extraOptions,modal:m,env:i,forceTaxExclusive:h,priceLiteralsURL:t.priceLiteralsURL,priceLiteralsPromise:t.priceLiteralsPromise,promotionCode:v,quantity:g,wcsApiKey:O,wcsBufferDelay:y,wcsBufferLimit:P,wcsEnv:i===q.STAGE?Oe.STAGE:Oe.PRODUCTION,landscape:S}}var ti="debug",$o="error",qo="info",zo="warn",Zo=Date.now(),Vr=new Set,Wr=new Set,ei=new Map,He=Object.freeze({DEBUG:ti,ERROR:$o,INFO:qo,WARN:zo}),ri={append({level:e,message:t,params:r,timestamp:n,source:i}){console[e](`${n}ms [${i}] %c${t}`,"font-weight: bold;",...r)}},ni={filter:({level:e})=>e!==ti},Jo={filter:()=>!1};function Qo(e,t,r,n,i){return{level:e,message:t,namespace:r,get params(){if(n.length===1){let[o]=n;ae(o)&&(n=o(),Array.isArray(n)||(n=[n]))}return n},source:i,timestamp:Date.now()-Zo}}function Ko(e){[...Wr].every(t=>t(e))&&Vr.forEach(t=>t(e))}function ii(e){let t=(ei.get(e)??0)+1;ei.set(e,t);let r=`${e} #${t}`,n=o=>(s,...a)=>Ko(Qo(o,s,e,a,r)),i=Object.seal({id:r,namespace:e,module(o){return ii(`${i.namespace}/${o}`)},debug:n(He.DEBUG),error:n(He.ERROR),info:n(He.INFO),warn:n(He.WARN)});return i}function gt(...e){e.forEach(t=>{let{append:r,filter:n}=t;ae(n)?Wr.add(n):ae(r)&&Vr.add(r)})}function es(e={}){let{name:t}=e,r=A(_("commerce.debug",{search:!0,storage:!0}),t===ne.LOCAL);return gt(r?ri:ni),t===ne.PROD&>(Gr),N}function ts(){Vr.clear(),Wr.clear()}var N={...ii(Cr),Level:He,Plugins:{consoleAppender:ri,debugFilter:ni,quietFilter:Jo,lanaAppender:Gr},init:es,reset:ts,use:gt};var rs={CLASS_NAME_FAILED:lt,CLASS_NAME_PENDING:ft,CLASS_NAME_RESOLVED:pt,EVENT_TYPE_FAILED:mt,EVENT_TYPE_PENDING:ht,EVENT_TYPE_RESOLVED:dt,STATE_FAILED:z,STATE_PENDING:Z,STATE_RESOLVED:J},ns={[z]:lt,[Z]:ft,[J]:pt},is={[z]:mt,[Z]:ht,[J]:dt},vt=new WeakMap;function G(e){if(!vt.has(e)){let t=N.module(e.constructor.is);vt.set(e,{changes:new Map,connected:!1,dispose:ve,error:void 0,log:t,options:void 0,promises:[],state:Z,timer:null,value:void 0,version:0})}return vt.get(e)}function yt(e){let t=G(e),{error:r,promises:n,state:i}=t;(i===J||i===z)&&(t.promises=[],i===J?n.forEach(({resolve:o})=>o(e)):i===z&&n.forEach(({reject:o})=>o(r))),e.dispatchEvent(new CustomEvent(is[i],{bubbles:!0}))}function Tt(e){let t=vt.get(e);[z,Z,J].forEach(r=>{e.classList.toggle(ns[r],r===t.state)})}var os={get error(){return G(this).error},get log(){return G(this).log},get options(){return G(this).options},get state(){return G(this).state},get value(){return G(this).value},attributeChangedCallback(e,t,r){G(this).changes.set(e,r),this.requestUpdate()},connectedCallback(){G(this).dispose=Qn(()=>this.requestUpdate(!0))},disconnectedCallback(){let e=G(this);e.connected&&(e.connected=!1,e.log.debug("Disconnected:",{element:this})),e.dispose(),e.dispose=ve},onceSettled(){let{error:e,promises:t,state:r}=G(this);return J===r?Promise.resolve(this):z===r?Promise.reject(e):new Promise((n,i)=>{t.push({resolve:n,reject:i})})},toggleResolved(e,t,r){let n=G(this);return e!==n.version?!1:(r!==void 0&&(n.options=r),n.state=J,n.value=t,Tt(this),this.log.debug("Resolved:",{element:this,value:t}),ce(()=>yt(this)),!0)},toggleFailed(e,t,r){let n=G(this);return e!==n.version?!1:(r!==void 0&&(n.options=r),n.error=t,n.state=z,Tt(this),n.log.error("Failed:",{element:this,error:t}),ce(()=>yt(this)),!0)},togglePending(e){let t=G(this);return t.version++,e&&(t.options=e),t.state=Z,Tt(this),ce(()=>yt(this)),t.version},requestUpdate(e=!1){if(!this.isConnected||!k())return;let t=G(this);if(t.timer)return;let{error:r,options:n,state:i,value:o,version:s}=t;t.state=Z,t.timer=ce(async()=>{t.timer=null;let a=null;if(t.changes.size&&(a=Object.fromEntries(t.changes.entries()),t.changes.clear()),t.connected?t.log.debug("Updated:",{element:this,changes:a}):(t.connected=!0,t.log.debug("Connected:",{element:this,changes:a})),a||e)try{await this.render?.()===!1&&t.state===Z&&t.version===s&&(t.state=i,t.error=r,t.value=o,Tt(this),yt(this))}catch(c){this.toggleFailed(t.version,c,n)}})}};function oi(e={}){return Object.entries(e).forEach(([t,r])=>{(r==null||r===""||r?.length===0)&&delete e[t]}),e}function At(e,t={}){let{tag:r,is:n}=e,i=document.createElement(r,{is:n});return i.setAttribute("is",n),Object.assign(i.dataset,oi(t)),i}function Pt(e){let{tag:t,is:r,prototype:n}=e,i=window.customElements.get(r);return i||(Object.defineProperties(n,Object.getOwnPropertyDescriptors(os)),i=Object.defineProperties(e,Object.getOwnPropertyDescriptors(rs)),window.customElements.define(r,i,{extends:t})),i}function St(e,t=document.body){return Array.from(t?.querySelectorAll(`${e.tag}[is="${e.is}"]`)??[])}function bt(e,t={}){return e instanceof HTMLElement?(Object.assign(e.dataset,oi(t)),e):null}var ss="download",as="upgrade",Ee,Le=class Le extends HTMLAnchorElement{constructor(){super();Br(this,Ee,void 0);this.addEventListener("click",this.clickHandler)}static get observedAttributes(){return["data-checkout-workflow","data-checkout-workflow-step","data-extra-options","data-ims-country","data-perpetual","data-promotion-code","data-quantity","data-template","data-wcs-osi","data-entitlement","data-upgrade","data-modal"]}static createCheckoutLink(r={},n=""){let i=k();if(!i)return null;let{checkoutMarketSegment:o,checkoutWorkflow:s,checkoutWorkflowStep:a,entitlement:c,upgrade:l,modal:u,perpetual:p,promotionCode:f,quantity:m,wcsOsi:h,extraOptions:v}=i.collectCheckoutOptions(r),g=At(Le,{checkoutMarketSegment:o,checkoutWorkflow:s,checkoutWorkflowStep:a,entitlement:c,upgrade:l,modal:u,perpetual:p,promotionCode:f,quantity:m,wcsOsi:h,extraOptions:v});return n&&(g.innerHTML=`${n}`),g}static getCheckoutLinks(r){return St(Le,r)}get isCheckoutLink(){return!0}get placeholder(){return this}clickHandler(r){var n;(n=Rt(this,Ee))==null||n.call(this,r)}async render(r={}){if(!this.isConnected)return!1;let n=k();if(!n)return!1;this.dataset.imsCountry||n.imsCountryPromise.then(u=>{u&&(this.dataset.imsCountry=u)},ve);let i=n.collectCheckoutOptions(r,this.placeholder);if(!i.wcsOsi.length)return!1;let o;try{o=JSON.parse(i.extraOptions??"{}")}catch(u){this.placeholder.log.error("cannot parse exta checkout options",u)}let s=this.placeholder.togglePending(i);this.href="";let a=n.resolveOfferSelectors(i),c=await Promise.all(a);c=c.map(u=>Et(u,i));let l=await n.buildCheckoutAction(c.flat(),{...o,...i});return this.renderOffers(c.flat(),i,{},l,s)}renderOffers(r,n,i={},o=void 0,s=void 0){if(!this.isConnected)return!1;let a=k();if(!a)return!1;if(n={...JSON.parse(this.placeholder.dataset.extraOptions??"null"),...n,...i},s??(s=this.placeholder.togglePending(n)),Rt(this,Ee)&&Nt(this,Ee,void 0),o){this.classList.remove(ss,as),this.placeholder.toggleResolved(s,r,n);let{url:l,text:u,className:p,handler:f}=o;return l&&(this.href=l),u&&(this.firstElementChild.innerHTML=u),p&&this.classList.add(...p.split(" ")),f&&(this.setAttribute("href","#"),Nt(this,Ee,f.bind(this))),!0}else if(r.length){if(this.placeholder.toggleResolved(s,r,n)){let l=a.buildCheckoutURL(r,n);return this.setAttribute("href",l),!0}}else{let l=new Error(`Not provided: ${n?.wcsOsi??"-"}`);if(this.placeholder.toggleFailed(s,l,n))return this.setAttribute("href","#"),!0}return!1}updateOptions(r={}){let n=k();if(!n)return!1;let{checkoutMarketSegment:i,checkoutWorkflow:o,checkoutWorkflowStep:s,entitlement:a,upgrade:c,modal:l,perpetual:u,promotionCode:p,quantity:f,wcsOsi:m}=n.collectCheckoutOptions(r);return bt(this,{checkoutMarketSegment:i,checkoutWorkflow:o,checkoutWorkflowStep:s,entitlement:a,upgrade:c,modal:l,perpetual:u,promotionCode:p,quantity:f,wcsOsi:m}),!0}};Ee=new WeakMap,ee(Le,"is","checkout-link"),ee(Le,"tag","a");var jr=Le,_t=Pt(jr);var Re=class Re extends HTMLSpanElement{static get observedAttributes(){return["data-display-old-price","data-display-per-unit","data-display-recurrence","data-display-tax","data-perpetual","data-promotion-code","data-tax-exclusive","data-template","data-wcs-osi"]}static createInlinePrice(t){let r=k();if(!r)return null;let{displayOldPrice:n,displayPerUnit:i,displayRecurrence:o,displayTax:s,forceTaxExclusive:a,perpetual:c,promotionCode:l,quantity:u,template:p,wcsOsi:f}=r.collectPriceOptions(t);return At(Re,{displayOldPrice:n,displayPerUnit:i,displayRecurrence:o,displayTax:s,forceTaxExclusive:a,perpetual:c,promotionCode:l,quantity:u,template:p,wcsOsi:f})}static getInlinePrices(t){return St(Re,t)}get isInlinePrice(){return!0}get placeholder(){return this}async render(t={}){if(!this.isConnected)return!1;let r=k();if(!r)return!1;let n=r.collectPriceOptions(t,this.placeholder);if(!n.wcsOsi.length)return!1;let i=this.placeholder.togglePending(n);this.innerHTML="";let[o]=r.resolveOfferSelectors(n);return this.renderOffers(Et(await o,n),n,i)}renderOffers(t,r={},n=void 0){if(!this.isConnected)return;let i=k();if(!i)return!1;let o=i.collectPriceOptions({...this.dataset,...r});if(n??(n=this.placeholder.togglePending(o)),t.length){if(this.placeholder.toggleResolved(n,t,o))return this.innerHTML=i.buildPriceHTML(t,o),!0}else{let s=new Error(`Not provided: ${o?.wcsOsi??"-"}`);if(this.placeholder.toggleFailed(n,s,o))return this.innerHTML="",!0}return!1}updateOptions(t){let r=k();if(!r)return!1;let{displayOldPrice:n,displayPerUnit:i,displayRecurrence:o,displayTax:s,forceTaxExclusive:a,perpetual:c,promotionCode:l,quantity:u,template:p,wcsOsi:f}=r.collectPriceOptions(t);return bt(this,{displayOldPrice:n,displayPerUnit:i,displayRecurrence:o,displayTax:s,forceTaxExclusive:a,perpetual:c,promotionCode:l,quantity:u,template:p,wcsOsi:f}),!0}};ee(Re,"is","inline-price"),ee(Re,"tag","span");var Hr=Re,Ot=Pt(Hr);function si({providers:e,settings:t},r){let n=N.module("checkout");function i(l,u){let{checkoutClientId:p,checkoutWorkflow:f,checkoutWorkflowStep:m,country:h,language:v,promotionCode:g,quantity:O}=t,{checkoutMarketSegment:S,checkoutWorkflow:y=f,checkoutWorkflowStep:P=m,imsCountry:w,country:I=w??h,language:D=v,quantity:L=O,entitlement:C,upgrade:H,modal:ue,perpetual:Q,promotionCode:ie=g,wcsOsi:xe,extraOptions:ge,...Ne}=Object.assign({},u?.dataset??{},l??{}),Ie=te(y,B,x.checkoutWorkflow),Xe=$.CHECKOUT;Ie===B.V3&&(Xe=te(P,$,x.checkoutWorkflowStep));let Ye=Pe({...Ne,extraOptions:ge,checkoutClientId:p,checkoutMarketSegment:S,country:I,quantity:we(L,x.quantity),checkoutWorkflow:Ie,checkoutWorkflowStep:Xe,language:D,entitlement:A(C),upgrade:A(H),modal:A(ue),perpetual:A(Q),promotionCode:ke(ie).effectivePromoCode,wcsOsi:xt(xe)});if(u)for(let oe of e.checkout)oe(u,Ye);return Ye}async function o(l,u){let p=k(),f=await r.getCheckoutAction?.(l,u,p.imsSignedInPromise);return f||null}function s(l,u){if(!Array.isArray(l)||!l.length||!u)return"";let{env:p,landscape:f}=t,{checkoutClientId:m,checkoutMarketSegment:h,checkoutWorkflow:v,checkoutWorkflowStep:g,country:O,promotionCode:S,quantity:y,...P}=i(u),w=window.frameElement?"if":"fp",I={checkoutPromoCode:S,clientId:m,context:w,country:O,env:p,items:[],marketSegment:h,workflowStep:g,landscape:f,...P};if(l.length===1){let[{offerId:D,offerType:L,productArrangementCode:C}]=l,{marketSegments:[H]}=l[0];Object.assign(I,{marketSegment:H,offerType:L,productArrangementCode:C}),I.items.push(y[0]===1?{id:D}:{id:D,quantity:y[0]})}else I.items.push(...l.map(({offerId:D},L)=>({id:D,quantity:y[L]??x.quantity})));return kt(v,I)}let{createCheckoutLink:a,getCheckoutLinks:c}=_t;return{CheckoutLink:_t,CheckoutWorkflow:B,CheckoutWorkflowStep:$,buildCheckoutAction:o,buildCheckoutURL:s,collectCheckoutOptions:i,createCheckoutLink:a,getCheckoutLinks:c}}function cs({interval:e=200,maxAttempts:t=25}={}){let r=N.module("ims");return new Promise(n=>{r.debug("Waing for IMS to be ready");let i=0;function o(){window.adobeIMS?.initialized?n():++i>t?(r.debug("Timeout"),n()):setTimeout(o,e)}o()})}function us(e){return e.then(()=>window.adobeIMS.isSignedInUser())}function ls(e){let t=N.module("ims");return e.then(r=>r?window.adobeIMS.getProfile().then(({countryCode:n})=>(t.debug("Got user country:",n),n),n=>{t.error("Unable to get user country:",n)}):null)}function ai({}){let e=cs(),t=us(e),r=ls(t);return{imsReadyPromise:e,imsSignedInPromise:t,imsCountryPromise:r}}function fs(e){if(!e.priceLiteralsURL)throw new Error(Ir);return new Promise(t=>{window.fetch(e.priceLiteralsURL).then(r=>{r.json().then(({data:n})=>{t(n)})})})}async function ci(e){let r=await(e.priceLiteralsPromise||fs(e));if(Array.isArray(r)){let n=o=>r.find(s=>Ze(s.lang,o)),i=n(e.language)??n(x.language);if(i)return Object.freeze(i)}return{}}function ui({literals:e,providers:t,settings:r}){function n(a,c){let{country:l,displayOldPrice:u,displayPerUnit:p,displayRecurrence:f,displayTax:m,forceTaxExclusive:h,language:v,promotionCode:g,quantity:O}=r,{displayOldPrice:S=u,displayPerUnit:y=p,displayRecurrence:P=f,displayTax:w=m,forceTaxExclusive:I=h,country:D=l,language:L=v,perpetual:C,promotionCode:H=g,quantity:ue=O,template:Q,wcsOsi:ie,...xe}=Object.assign({},c?.dataset??{},a??{}),ge=Pe({...xe,country:D,displayOldPrice:A(S),displayPerUnit:A(y),displayRecurrence:A(P),displayTax:A(w),forceTaxExclusive:A(I),language:L,perpetual:A(C),promotionCode:ke(H).effectivePromoCode,quantity:we(ue,x.quantity),template:Q,wcsOsi:xt(ie)});if(c)for(let Ne of t.price)Ne(c,ge);return ge}function i(a,c){if(!Array.isArray(a)||!a.length||!c)return"";let{template:l}=c,u;switch(l){case"discount":u=Er;break;case"strikethrough":u=dr;break;case"optical":u=hr;break;default:u=c.promotionCode?mr:pr}let p=n(c);p.literals=Object.assign({},e.price,Pe(c.literals??{}));let[f]=a;return f={...f,...f.priceDetails},u(p,f)}let{createInlinePrice:o,getInlinePrices:s}=Ot;return{InlinePrice:Ot,buildPriceHTML:i,collectPriceOptions:n,createInlinePrice:o,getInlinePrices:s}}var ps={[q.PRODUCTION]:"https://wcs.adobe.com",[q.STAGE]:"https://wcs.stage.adobe.com"};function li({settings:e}){let t=N.module("wcs"),{env:r,wcsApiKey:n}=e,i={apiKey:n,baseUrl:ps[r],fetch:window.fetch.bind(window)},o=ze(i),s=new Map,a=new Map,c;async function l(f,m,h=!0){let v=Nr;try{t.debug("Fetching:",f),f.offerSelectorIds=f.offerSelectorIds.sort();let{data:g}=await o(f,{apiKey:n,environment:e.wcsEnv,landscape:r===q.STAGE?"ALL":e.landscape},({resolvedOffers:S})=>({offers:S.map(ut)}));t.debug("Fetched:",f,g);let{offers:O}=g??{};m.forEach(({resolve:S},y)=>{let P=O.filter(({offerSelectorIds:w})=>w.includes(y)).flat();P.length&&(m.delete(y),S(P))})}catch(g){g.status===404&&f.offerSelectorIds.length>1?(t.debug("Multi-osi 404, fallback to fetch-by-one strategy"),await Promise.allSettled(f.offerSelectorIds.map(O=>l({...f,offerSelectorIds:[O]},m,!1)))):(t.error("Failed:",f,g),v=Rr)}h&&m.size&&(t.debug("Missing:",{offerSelectorIds:[...m.keys()]}),m.forEach(g=>{g.reject(new Error(v))}))}function u(){clearTimeout(c);let f=[...a.values()];a.clear(),f.forEach(({options:m,promises:h})=>l(m,h))}function p({country:f,language:m,perpetual:h=!1,promotionCode:v="",wcsOsi:g=[]}){let O=`${m}_${f}`;f!=="GB"&&(m=h?"EN":"MULT");let S=[f,m,v].filter(y=>y).join("-").toLowerCase();return g.map(y=>{let P=`${y}-${S}`;if(!s.has(P)){let w=new Promise((I,D)=>{let L=a.get(S);if(!L){let C={country:f,locale:O,offerSelectorIds:[]};f!=="GB"&&(C.language=m),L={options:C,promises:new Map},a.set(S,L)}v&&(L.options.promotionCode=v),L.options.offerSelectorIds.push(y),L.promises.set(y,{resolve:I,reject:D}),L.options.offerSelectorIds.length>=e.wcsBufferLimit?u():(t.debug("Queued:",L.options),c||(c=setTimeout(u,e.wcsBufferDelay)))});s.set(P,w)}return s.get(P)})}return{WcsCommitment:Or,WcsPlanType:wr,WcsTerm:Lr,resolveOfferSelectors:p}}var U=class extends HTMLElement{get isWcmsCommerce(){return!0}};ee(U,"instance"),ee(U,"promise",null);window.customElements.define(re,U);async function ms(e,t){let r=N.init(e.env).module("service");r.debug("Activating:",e);let n={price:{}},i=Object.freeze(Fr(e));try{n.price=await ci(i)}catch(c){r.warn("Price literals were not fetched:",c)}let o={checkout:new Set,price:new Set},s=document.createElement(re),a={literals:n,providers:o,settings:i};return U.instance=Object.defineProperties(s,Object.getOwnPropertyDescriptors({...si(a,t),...ai(a),...ui(a),...li(a),...Mr,Log:N,get defaults(){return x},get literals(){return n},get log(){return N},get providers(){return{checkout(c){return o.checkout.add(c),()=>o.checkout.delete(c)},price(c){return o.price.add(c),()=>o.price.delete(c)}}},get settings(){return i}})),r.debug("Activated:",{literals:n,settings:i,element:s}),document.head.append(s),ce(()=>{let c=new CustomEvent(de,{bubbles:!0,cancelable:!1,detail:U.instance});U.instance.dispatchEvent(c)}),U.instance}function fi(){document.head.querySelector(re)?.remove(),U.promise=null,N.reset()}function hs(e,t){if(ae(e)){let r=ae(t)?t():{};return r.force&&fi(),U.promise??(U.promise=ms(e(),r))}return U.promise?U.promise:new Promise(r=>{let n=i=>{r(i.detail)};document.head.addEventListener(de,n,{once:!0})})}export{_t as CheckoutLink,B as CheckoutWorkflow,$ as CheckoutWorkflowStep,x as Defaults,Ot as InlinePrice,M as Landscape,N as Log,re as TAG_NAME_SERVICE,Or as WcsCommitment,Oe as WcsEnv,wr as WcsPlanType,Lr as WcsTerm,ut as applyPlanType,Kn as getLocaleSettings,Fr as getSettings,hs as init,fi as reset}; //# sourceMappingURL=commerce.js.map diff --git a/libs/deps/merch-quantity-select.js b/libs/deps/merch-quantity-select.js index dafb65c130..82a84129ae 100644 --- a/libs/deps/merch-quantity-select.js +++ b/libs/deps/merch-quantity-select.js @@ -1,4 +1,4 @@ -// branch: develop commit: 70eec73024148e3b3e8682872a90a9c0a0e68b8e Fri, 07 Jun 2024 14:50:35 GMT +// branch: develop commit: f499abc85176fc7d34f43457efeeb72adb1e6103 Thu, 30 May 2024 14:05:27 GMT import{html as o,LitElement as p}from"/libs/deps/lit-all.min.js";import{css as l}from"/libs/deps/lit-all.min.js";var r=l` :host { box-sizing: border-box; @@ -46,12 +46,12 @@ import{html as o,LitElement as p}from"/libs/deps/lit-all.min.js";import{css as l border-right: none; padding-inline-start: 12px; box-sizing: border-box; - -moz-appearance: textfield; } .text-field-input::-webkit-inner-spin-button, .text-field-input::-webkit-outer-spin-button { margin: 0; + -moz-appearance: textfield; -webkit-appearance: none; } diff --git a/libs/features/personalization/personalization.js b/libs/features/personalization/personalization.js index ff55ca81a9..403089c0a9 100644 --- a/libs/features/personalization/personalization.js +++ b/libs/features/personalization/personalization.js @@ -822,12 +822,10 @@ export async function applyPers(manifests, postLCP = false) { const { mep: mepParam, mepHighlight, - mepButton, } = Object.fromEntries(PAGE_URL.searchParams); config.mep = { handleFragmentCommand, - preview: (mepButton !== 'off' - && (config.env?.name !== 'prod' || mepParam || mepParam === '' || mepButton)), + preview: config.mep?.preview, variantOverride: parseMepParam(mepParam), highlight: (mepHighlight !== undefined && mepHighlight !== 'false'), mepParam, diff --git a/libs/utils/utils.js b/libs/utils/utils.js index 5eca10a476..6d3520885b 100644 --- a/libs/utils/utils.js +++ b/libs/utils/utils.js @@ -138,7 +138,6 @@ export const MILO_EVENTS = { DEFERRED: 'milo:deferred' }; const LANGSTORE = 'langstore'; const PAGE_URL = new URL(window.location.href); -const SLD = PAGE_URL.hostname.includes('.aem.') ? 'aem' : 'hlx'; function getEnv(conf) { const { host } = window.location; @@ -147,8 +146,8 @@ function getEnv(conf) { if (query) return { ...ENVS[query], consumer: conf[query] }; if (host.includes('localhost')) return { ...ENVS.local, consumer: conf.local }; /* c8 ignore start */ - if (host.includes(`${SLD}.page`) - || host.includes(`${SLD}.live`) + if (host.includes('hlx.page') + || host.includes('hlx.live') || host.includes('stage.adobe') || host.includes('corp.adobe')) { return { ...ENVS.stage, consumer: conf.stage }; @@ -231,7 +230,7 @@ export const [setConfig, updateConfig, getConfig] = (() => { console.log('Invalid or missing locale:', e); } config.locale.contentRoot = `${origin}${config.locale.prefix}${config.contentRoot ?? ''}`; - config.useDotHtml = !PAGE_URL.origin.includes(`.${SLD}.`) + config.useDotHtml = !PAGE_URL.origin.includes('.hlx.') && (conf.useDotHtml ?? PAGE_URL.pathname.endsWith('.html')); config.entitlements = handleEntitlements; config.consumerEntitlements = conf.entitlements || []; @@ -490,7 +489,7 @@ export function decorateSVG(a) { ? new URL(`${window.location.origin}${a.href}`) : new URL(a.href); - const src = textUrl.hostname.includes(`.${SLD}.`) ? textUrl.pathname : textUrl; + const src = textUrl.hostname.includes('.hlx.') ? textUrl.pathname : textUrl; const img = createTag('img', { loading: 'lazy', src }); if (altText) img.alt = altText; @@ -516,7 +515,7 @@ export function decorateImageLinks(el) { const [source, alt, icon] = img.alt.split('|'); try { const url = new URL(source.trim()); - const href = url.hostname.includes(`.${SLD}.`) ? `${url.pathname}${url.hash}` : url.href; + const href = url.hostname.includes('.hlx.') ? `${url.pathname}${url.hash}` : url.href; if (alt?.trim().length) img.alt = alt.trim(); const pic = img.closest('picture'); const picParent = pic.parentElement; @@ -920,7 +919,7 @@ export const combineMepSources = async (persEnabled, promoEnabled, mepParam) => }; async function checkForPageMods() { - const { mep: mepParam } = Object.fromEntries(PAGE_URL.searchParams); + const { mep: mepParam, mepButton } = Object.fromEntries(PAGE_URL.searchParams); if (mepParam === 'off') return; const persEnabled = getMepEnablement('personalization'); const promoEnabled = getMepEnablement('manifestnames', 'promo'); @@ -929,7 +928,11 @@ async function checkForPageMods() { if (!mepEnabled) return; const config = getConfig(); - config.mep = { targetEnabled }; + config.mep = { + targetEnabled, + preview: (mepButton !== 'off' + && (config.env?.name !== 'prod' || mepParam || mepParam === '' || mepButton)), + }; loadLink( `${config.base}/features/personalization/personalization.js`, { as: 'script', rel: 'modulepreload' }, @@ -1044,7 +1047,7 @@ function initSidekick() { function decorateMeta() { const { origin } = window.location; - const contents = document.head.querySelectorAll(`[content*=".${SLD}."]`); + const contents = document.head.querySelectorAll('[content*=".hlx."]'); contents.forEach((meta) => { if (meta.getAttribute('property') === 'hlx:proxyUrl') return; try { diff --git a/test/blocks/how-to/how-to.test.js b/test/blocks/how-to/how-to.test.js index 16f2372a4f..ed92f68c22 100644 --- a/test/blocks/how-to/how-to.test.js +++ b/test/blocks/how-to/how-to.test.js @@ -98,11 +98,4 @@ describe('How To', () => { const howToList = document.querySelector('#test4 ol'); expect(howToList).to.exist; }); - - it('Renders a video', async () => { - const howTo = document.querySelector('#test5'); - init(howTo); - const howToList = document.querySelector('#test5 a'); - expect(howToList).to.exist; - }); }); diff --git a/test/blocks/how-to/mocks/body.html b/test/blocks/how-to/mocks/body.html index 0c2acc0908..6ced1da136 100644 --- a/test/blocks/how-to/mocks/body.html +++ b/test/blocks/how-to/mocks/body.html @@ -88,28 +88,4 @@

How to do some other cool thing

Download your new file.

- -
-
-
-
-

How to compress a PDF online (with schema)

-

Follow these easy steps to compress a large PDF file online:

-

https://main--milo--adobecom.hlx.page/drafts/gunn/media_16965312b3a8d7a1d48a1d510584dc5e8a0f1e085.mp4

-
-
-
-
-
    -
  • Select the PDF file you want to make smaller.
  • -
  • After uploading, Acrobat will automatically reduce the PDF size.
    - - - - -
  • -
  • Download your compressed PDF file or sign in to share it. Yay!
  • -
-
-
-
+
diff --git a/test/blocks/merch/merch.test.js b/test/blocks/merch/merch.test.js index 33a1e33cba..ec85c43b11 100644 --- a/test/blocks/merch/merch.test.js +++ b/test/blocks/merch/merch.test.js @@ -7,7 +7,6 @@ import merch, { PRICE_TEMPLATE_DISCOUNT, PRICE_TEMPLATE_OPTICAL, PRICE_TEMPLATE_STRIKETHROUGH, - PRICE_TEMPLATE_ANNUAL, CHECKOUT_ALLOWED_KEYS, buildCta, getCheckoutContext, @@ -20,7 +19,6 @@ import merch, { getModalAction, getCheckoutAction, PRICE_LITERALS_URL, - PRICE_TEMPLATE_REGULAR, } from '../../../libs/blocks/merch/merch.js'; import { mockFetch, unmockFetch, readMockText } from './mocks/fetch.js'; @@ -189,14 +187,6 @@ describe('Merch Block', () => { await validatePriceSpan('.merch.price.discount', { template: PRICE_TEMPLATE_DISCOUNT }); }); - it('renders merch link to annual price', async () => { - await validatePriceSpan('.merch.price.annual', { template: PRICE_TEMPLATE_ANNUAL }); - }); - - it('renders merch link to the regular price if template is invalid', async () => { - await validatePriceSpan('.merch.price.invalid', { template: PRICE_TEMPLATE_REGULAR }); - }); - it('renders merch link to tax exclusive price with tax exclusive attribute', async () => { await validatePriceSpan('.merch.price.tax-exclusive', { forceTaxExclusive: 'true' }); }); diff --git a/test/blocks/merch/mocks/body.html b/test/blocks/merch/mocks/body.html index 406e39c6e6..fd8c3c9b75 100644 --- a/test/blocks/merch/mocks/body.html +++ b/test/blocks/merch/mocks/body.html @@ -43,16 +43,6 @@

Optical price

href="/tools/ost?osi=08&type=optical&seat=true&tax=true">Price - 632B3ADD940A7FBB7864AA5AD19B8D28 - All Apps

-

Annual price

-

Display term, seat and tax texts: Price - 632B3ADD940A7FBB7864AA5AD19B8D28 - All Apps -

- -

Invalid price (renderred as regular)

-

Display term, seat and tax texts: Price - 632B3ADD940A7FBB7864AA5AD19B8D28 - All Apps -

-

Discount price

Display term, seat and tax texts: Price - 632B3ADD940A7FBB7864AA5AD19B8D28 - All Apps diff --git a/test/blocks/quiz/utils.test.js b/test/blocks/quiz/utils.test.js index 15bf95bad0..8a9eeb52f4 100644 --- a/test/blocks/quiz/utils.test.js +++ b/test/blocks/quiz/utils.test.js @@ -12,7 +12,7 @@ const { findAndStoreResultData, } = await import('../../../libs/blocks/quiz/utils.js'); -let locales = { '': { ietf: 'en-US', tk: 'hah7vzn.css' } }; +const locales = { '': { ietf: 'en-US', tk: 'hah7vzn.css' } }; const conf = { locales }; const QUIZ_BASE_PATH = 'https://mockdata/path/to/quiz'; @@ -245,28 +245,6 @@ describe('Quiz', () => { expect(flowData).to.be.an('array').of.length(5); }); - it('Testing getLocalizedURL with country code or without country code', async () => { - locales = { '': { ietf: 'de-DE', tk: 'hah7vzn.css' } }; - setConfig({ locales, pathname: '/de' }); - - // Import getLocalizedURL function - const { getLocalizedURL } = await import('../../../libs/blocks/quiz/utils.js'); - - expect(getLocalizedURL('/path/to/quiz/uar-results')).to.equal('/de/path/to/quiz/uar-results'); - expect(getLocalizedURL('/de/path/to/quiz/uar-results')).to.equal('/de/path/to/quiz/uar-results'); - }); - - it('Testing getLocalizedURL without locale define', async () => { - locales = { '': { } }; - setConfig({ locales, pathname: '/de' }); - - // Import getLocalizedURL function - const { getLocalizedURL } = await import('../../../libs/blocks/quiz/utils.js'); - - expect(getLocalizedURL('/path/to/quiz/uar-results')).to.equal('/path/to/quiz/uar-results'); - expect(getLocalizedURL('/de/path/to/quiz/uar-results')).to.equal('/de/path/to/quiz/uar-results'); - }); - describe('Testing storeResultInLocalStorage with empty results as input', async () => { let resultToDelegate; const primaryProductCodes = [];