@warp-ds/elements 1.2.0-next.3 → 1.2.0-next.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  var Et=Object.create;var ye=Object.defineProperty,Ct=Object.defineProperties,Rt=Object.getOwnPropertyDescriptor,Tt=Object.getOwnPropertyDescriptors,At=Object.getOwnPropertyNames,ce=Object.getOwnPropertySymbols,Ot=Object.getPrototypeOf,we=Object.prototype.hasOwnProperty,Ie=Object.prototype.propertyIsEnumerable;var ve=(e,t,o)=>t in e?ye(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,S=(e,t)=>{for(var o in t||(t={}))we.call(t,o)&&ve(e,o,t[o]);if(ce)for(var o of ce(t))Ie.call(t,o)&&ve(e,o,t[o]);return e},O=(e,t)=>Ct(e,Tt(t));var J=(e,t)=>{var o={};for(var r in e)we.call(e,r)&&t.indexOf(r)<0&&(o[r]=e[r]);if(e!=null&&ce)for(var r of ce(e))t.indexOf(r)<0&&Ie.call(e,r)&&(o[r]=e[r]);return o};var qe=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Pt=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of At(t))!we.call(e,a)&&a!==o&&ye(e,a,{get:()=>t[a],enumerable:!(r=Rt(t,a))||r.enumerable});return e};var Mt=(e,t,o)=>(o=e!=null?Et(Ot(e)):{},Pt(t||!e||!e.__esModule?ye(o,"default",{value:e,enumerable:!0}):o,e));var ke=(e,t,o)=>(ve(e,typeof t!="symbol"?t+"":t,o),o);var ut=qe(q=>{"use strict";Object.defineProperty(q,"__esModule",{value:!0});q.errorMessages=q.ErrorType=void 0;var V;(function(e){e.MalformedUnicode="MALFORMED_UNICODE",e.MalformedHexadecimal="MALFORMED_HEXADECIMAL",e.CodePointLimit="CODE_POINT_LIMIT",e.OctalDeprecation="OCTAL_DEPRECATION",e.EndOfString="END_OF_STRING"})(V=q.ErrorType||(q.ErrorType={}));q.errorMessages=new Map([[V.MalformedUnicode,"malformed Unicode character escape sequence"],[V.MalformedHexadecimal,"malformed hexadecimal character escape sequence"],[V.CodePointLimit,"Unicode codepoint must not be greater than 0x10FFFF in escape sequence"],[V.OctalDeprecation,'"0"-prefixed octal literals and octal escape sequences are deprecated; for octal literals use the "0o" prefix instead'],[V.EndOfString,"malformed escape sequence at end of string"]])});var gt=qe(H=>{"use strict";Object.defineProperty(H,"__esModule",{value:!0});H.unraw=H.errorMessages=H.ErrorType=void 0;var D=ut();Object.defineProperty(H,"ErrorType",{enumerable:!0,get:function(){return D.ErrorType}});Object.defineProperty(H,"errorMessages",{enumerable:!0,get:function(){return D.errorMessages}});function Zt(e){return!e.match(/[^a-f0-9]/i)?parseInt(e,16):NaN}function he(e,t,o){let r=Zt(e);if(Number.isNaN(r)||o!==void 0&&o!==e.length)throw new SyntaxError(D.errorMessages.get(t));return r}function eo(e){let t=he(e,D.ErrorType.MalformedHexadecimal,2);return String.fromCharCode(t)}function bt(e,t){let o=he(e,D.ErrorType.MalformedUnicode,4);if(t!==void 0){let r=he(t,D.ErrorType.MalformedUnicode,4);return String.fromCharCode(o,r)}return String.fromCharCode(o)}function to(e){return e.charAt(0)==="{"&&e.charAt(e.length-1)==="}"}function oo(e){if(!to(e))throw new SyntaxError(D.errorMessages.get(D.ErrorType.MalformedUnicode));let t=e.slice(1,-1),o=he(t,D.ErrorType.MalformedUnicode);try{return String.fromCodePoint(o)}catch(r){throw r instanceof RangeError?new SyntaxError(D.errorMessages.get(D.ErrorType.CodePointLimit)):r}}function ro(e,t=!1){if(t)throw new SyntaxError(D.errorMessages.get(D.ErrorType.OctalDeprecation));let o=parseInt(e,8);return String.fromCharCode(o)}var io=new Map([["b","\b"],["f","\f"],["n",`
2
- `],["r","\r"],["t"," "],["v","\v"],["0","\0"]]);function no(e){return io.get(e)||e}var lo=/\\(?:(\\)|x([\s\S]{0,2})|u(\{[^}]*\}?)|u([\s\S]{4})\\u([^{][\s\S]{0,3})|u([\s\S]{0,4})|([0-3]?[0-7]{1,2})|([\s\S])|$)/g;function pt(e,t=!1){return e.replace(lo,function(o,r,a,n,l,i,c,p,g){if(r!==void 0)return"\\";if(a!==void 0)return eo(a);if(n!==void 0)return oo(n);if(l!==void 0)return bt(l,i);if(c!==void 0)return bt(c);if(p==="0")return"\0";if(p!==void 0)return ro(p,!t);if(g!==void 0)return no(g);throw new SyntaxError(D.errorMessages.get(D.ErrorType.EndOfString))})}H.unraw=pt;H.default=pt});import{css as vo,html as $e}from"lit";import Lt from"@warp-ds/elements-core";import{ifDefined as yo}from"lit/directives/if-defined.js";import{classMap as _o}from"lit/directives/class-map.js";var Ht=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();function Ue(e){return class extends e{static createProperty(t,o){let r=o;(typeof(o==null?void 0:o.attribute)=="undefined"||(o==null?void 0:o.attribute)===!0)&&(r=Object.assign({},o,{attribute:Ht(t.toString())})),super.createProperty(t,r)}}}function _e(e){let t=[];for(let[o,r]of Object.entries(e))r&&t.push(o);return t.join(" ")}function je(){return`m${Math.random().toString(36).slice(2)}`}var j={base:"border-2 relative",tooltip:"i-bg-$color-tooltip-background i-border-$color-tooltip-background i-shadow-$shadow-tooltip i-text-$color-tooltip-text rounded-4 py-6 px-8",callout:"i-bg-$color-callout-background i-border-$color-callout-border i-text-$color-callout-text py-8 px-16 rounded-8",highlight:"i-bg-$color-callout-background i-border-$color-callout-border i-text-$color-callout-text py-8 px-16 rounded-8 drop-shadow-m",popover:"i-bg-$color-popover-background i-border-$color-popover-background i-text-$color-popover-paragraph-text rounded-8 p-16 drop-shadow-m",arrowBase:"absolute h-[14px] w-[14px] border-2 border-b-0 border-r-0 rounded-tl-4 transform",arrowDirectionLeft:"-left-[8px]",arrowDirectionRight:"-right-[8px]",arrowDirectionBottom:"-bottom-[8px]",arrowDirectionTop:"-top-[8px]",arrowTooltip:"i-bg-$color-tooltip-background i-border-$color-tooltip-background",arrowCallout:"i-bg-$color-callout-background i-border-$color-callout-border",arrowPopover:"i-bg-$color-popover-background i-border-$color-popover-background",arrowHighlight:"i-bg-$color-callout-background i-border-$color-callout-border",content:"last-child:mb-0",notCallout:"absolute z-50"};var De={box:"group block relative break-words last-child:mb-0 p-16 rounded-8",bleed:"-mx-16 sm:mx-0 rounded-l-0 rounded-r-0 sm:rounded-8",info:"i-bg-$color-box-info-background i-text-$color-box-info-text",neutral:"i-bg-$color-box-neutral-background i-text-$color-box-neutral-text",bordered:"border-2 i-border-$color-box-bordered-border i-bg-$color-box-bordered-background i-text-$color-box-bordered-text",infoClickable:"hover:i-bg-$color-box-info-background-hover active:i-bg-$color-box-info-background-hover",neutralClickable:"hover:i-bg-$color-box-neutral-background-hover active:i-bg-$color-box-neutral-background-hover",borderedClickable:"hover:i-bg-$color-box-bordered-background-hover active:i-bg-$color-box-bordered-background-hover hover:i-border-$color-box-bordered-border-hover active:i-border-$color-box-bordered-border-hover"};var Bt="focus:outline-none appearance-none cursor-pointer bg-transparent border-0 m-0 p-0 inline-block",So={expandable:"will-change-height",expandableTitle:"font-bold i-text-$color-expandable-title-text",expandableBox:"i-bg-$color-expandable-background hover:i-bg-$color-expandable-background-hover py-0 px-0 "+De.box,expandableBleed:De.bleed,chevron:"inline-block align-middle i-text-$color-expandable-icon",chevronNonBox:"relative left-8",chevronBox:"absolute right-16",chevronTransform:"transform transition-transform transform-gpu ease-in-out",chevronExpand:"-rotate-180",chevronCollapse:"rotate-180",expansion:"overflow-hidden",expansionNotExpanded:"h-0 invisible",button:Bt+" hover:underline focus:underline",buttonBox:"w-full text-left relative inline-flex items-center "+De.box,paddingTop:"pt-0",title:"flex justify-between items-center",titleType:"h4"},N="font-bold focusable justify-center transition-colors ease-in-out",v={primary:"i-text-$color-button-primary-text hover:i-text-$color-button-primary-text i-bg-$color-button-primary-background hover:i-bg-$color-button-primary-background-hover active:i-bg-$color-button-primary-background-active",secondary:"i-text-$color-button-secondary-text hover:i-text-$color-button-secondary-text i-border-$color-button-secondary-border i-bg-$color-button-secondary-background hover:i-bg-$color-button-secondary-background-hover hover:i-border-$color-button-secondary-border-hover active:i-bg-$color-button-secondary-background-active",utility:"i-text-$color-button-utility-text hover:i-text-$color-button-utility-text i-bg-$color-button-utility-background i-border-$color-button-utility-border hover:i-bg-$color-button-utility-background hover:i-border-$color-button-utility-border-hover active:i-border-$color-button-utility-border-active",destructive:"i-bg-$color-button-negative-background i-text-$color-button-negative-text hover:i-text-$color-button-negative-text hover:i-bg-$color-button-negative-background-hover active:i-bg-$color-button-negative-background-active",pill:"i-text-$color-button-pill-icon hover:i-text-$color-button-pill-icon-hover active:i-text-$color-button-pill-icon-active i-bg-$color-button-pill-background hover:i-bg-$color-button-pill-background-hover active:i-bg-$color-button-pill-background-active",disabled:"i-text-$color-button-disabled-text i-bg-$color-button-disabled-background",quiet:"i-bg-$color-button-quiet-background i-text-$color-button-quiet-text hover:i-bg-$color-button-quiet-background-hover active:i-bg-$color-button-quiet-background-active",utilityQuiet:"i-text-$color-button-utility-quiet-text i-bg-$color-button-utility-quiet-background hover:i-bg-$color-button-utility-quiet-background-hover",negativeQuiet:"i-bg-$color-button-negative-quiet-background i-text-$color-button-negative-quiet-text hover:i-bg-$color-button-negative-quiet-background-hover active:i-bg-$color-button-negative-quiet-background-active",loading:"i-text-$color-button-loading-text i-bg-$color-button-loading-background",link:"i-text-$color-button-link-text"},h={primary:`border-0 rounded-8 ${N}`,secondary:`border-2 rounded-8 ${N}`,utility:`border rounded-4 ${N}`,negative:`border-0 rounded-8 ${N}`,pill:`p-4 rounded-full border-0 inline-flex items-center justify-center hover:bg-clip-padding ${N}`,link:`bg-transparent focusable ease-in-out inline active:underline hover:underline ${v.link}`},d={xsmall:"py-6 px-16",small:"py-8 px-16",medium:"py-10 px-14",large:"py-12 px-16",utility:"py-[11px] px-[15px]",smallUtility:"py-[7px] px-[15px]",pill:"min-h-[44px] min-w-[44px]",pillSmall:"min-h-32 min-w-32",link:"p-0"},u={medium:"text-m leading-[24]",xsmall:"text-xs"},s={inProgress:`border-transparent animate-inprogress pointer-events-none ${v.loading}`,quiet:`border-0 rounded-8 ${N}`,utilityQuiet:`border-0 rounded-4 ${N}`,negativeQuiet:`border-0 rounded-8 ${N}`,isDisabled:`font-bold justify-center transition-colors ease-in-out cursor-default pointer-events-none ${v.disabled}`},Nt={secondary:`${d.medium} ${u.medium} ${h.secondary} ${v.secondary}`,secondaryHref:`${d.medium} ${u.medium} ${h.secondary} ${v.secondary}`,secondaryDisabled:`${d.medium} ${u.medium} ${h.secondary} ${s.isDisabled}`,secondarySmall:`${u.xsmall} ${d.xsmall} ${h.secondary} ${v.secondary}`,secondarySmallDisabled:`${u.xsmall} ${d.xsmall} ${h.secondary} ${s.isDisabled}`,secondaryQuiet:`${d.medium} ${u.medium} ${s.quiet} ${v.quiet}`,secondaryQuietDisabled:`${d.medium} ${u.medium} ${s.quiet} ${s.isDisabled}`,secondarySmallQuiet:`${u.xsmall} ${d.xsmall} ${s.quiet} ${v.quiet}`,secondarySmallQuietDisabled:`${u.xsmall} ${d.xsmall} ${s.quiet} ${s.isDisabled}`,secondaryLoading:`${d.medium} ${u.medium} ${h.secondary} ${s.inProgress}`,secondarySmallLoading:`${u.xsmall} ${d.xsmall} ${h.secondary} ${s.inProgress}`,secondarySmallQuietLoading:`${u.xsmall} ${d.xsmall} ${s.quiet} ${s.inProgress}`,secondaryQuietLoading:`${d.medium} ${u.medium} ${s.quiet} ${s.inProgress}`,primary:`${d.large} ${u.medium} ${h.primary} ${v.primary}`,primaryDisabled:`${d.large} ${u.medium} ${s.isDisabled} ${h.primary}`,primarySmall:`${d.small} ${u.xsmall} ${h.primary} ${v.primary}`,primarySmallDisabled:`${d.small} ${u.xsmall} ${s.isDisabled} ${h.primary} `,primaryQuiet:`${d.large} ${u.medium} ${s.quiet} ${v.quiet}`,primaryQuietDisabled:`${d.large} ${u.medium} ${s.quiet} ${s.isDisabled}`,primarySmallQuiet:`${d.small} ${u.xsmall} ${s.quiet} ${v.quiet}`,primarySmallQuietDisabled:`${d.small} ${u.xsmall} ${s.quiet} ${s.isDisabled}`,primaryLoading:`${d.large} ${u.medium} ${s.inProgress} ${h.primary}`,primarySmallLoading:`${d.small} ${u.xsmall} ${s.inProgress} ${h.primary}`,primarySmallQuietLoading:`${d.small} ${u.xsmall} ${s.quiet} ${s.inProgress} ${h.primary}`,primaryQuietLoading:`${d.large} ${u.medium} ${s.quiet} ${s.inProgress}`,utility:`${d.utility} ${u.medium} ${h.utility} ${v.utility}`,utilityDisabled:`${d.utility} ${u.medium} ${h.utility} ${s.isDisabled}`,utilityQuiet:`${d.large} ${u.medium} ${s.utilityQuiet} ${v.utilityQuiet}`,utilityQuietDisabled:`${d.large} ${u.medium} ${s.utilityQuiet} ${s.isDisabled}`,utilitySmall:`${d.smallUtility} ${u.xsmall} ${h.utility} ${v.utility}`,utilitySmallDisabled:`${d.smallUtility} ${u.xsmall} ${h.utility} ${s.isDisabled}`,utilitySmallQuiet:`${d.smallUtility} ${u.xsmall} ${s.utilityQuiet} ${v.utilityQuiet}`,utilitySmallQuietDisabled:`${d.smallUtility} ${u.xsmall} ${s.utilityQuiet} ${s.isDisabled}`,utilityLoading:`${d.large} ${u.medium} ${h.utility} ${s.inProgress}`,utilitySmallLoading:`${d.smallUtility} ${u.xsmall} ${h.utility} ${s.inProgress}`,utilityQuietLoading:`${d.large} ${u.medium} ${s.inProgress} ${s.utilityQuiet}`,utilitySmallQuietLoading:`${d.smallUtility} ${u.xsmall} ${s.inProgress} ${s.utilityQuiet}`,negative:`${d.large} ${u.medium} ${h.negative} ${v.destructive}`,negativeDisabled:`${d.large} ${u.medium} ${h.negative} ${s.isDisabled}`,negativeQuiet:`${d.large} ${u.medium} ${s.negativeQuiet} ${v.negativeQuiet}`,negativeQuietDisabled:`${d.large} ${u.medium} ${s.negativeQuiet}${s.isDisabled}`,negativeSmall:`${d.small} ${u.xsmall} ${h.negative} ${v.destructive}`,negativeSmallDisabled:`${d.small} ${u.xsmall} ${h.negative} ${s.isDisabled}`,negativeSmallQuiet:`${d.small} ${u.xsmall} ${s.negativeQuiet} ${v.negativeQuiet}`,negativeSmallQuietDisabled:`${d.small} ${u.xsmall} ${s.negativeQuiet} ${s.isDisabled}`,negativeLoading:`${d.large} ${u.medium} ${h.negative} ${s.inProgress}`,negativeSmallLoading:`${d.small} ${u.xsmall} ${s.inProgress} ${h.negative}`,negativeQuietLoading:`${d.large} ${u.medium} ${s.negativeQuiet} ${h.negative} ${s.inProgress}`,negativeSmallQuietLoading:`${d.small} ${u.xsmall} ${s.negativeQuiet} ${s.inProgress}`,pill:`${d.pill} ${u.medium} ${h.pill} ${v.pill}`,pillSmall:`${d.pillSmall} ${u.xsmall} ${h.pill} ${v.pill}`,pillLoading:`${d.pill} ${u.medium} ${h.pill} ${s.inProgress}`,pillSmallLoading:`${d.pillSmall} ${u.xsmall} ${h.pill} ${s.inProgress}`,link:`${d.link} ${u.medium} ${h.link}`,linkSmall:`${d.link} ${u.xsmall} ${h.link}`,linkAsButton:"inline-block hover:no-underline text-center",a11y:"sr-only",fullWidth:"w-full max-w-full",contentWidth:"max-w-max"};var Eo={transparentBg:'before:i-bg-$color-modal-backdrop-background before:content-[""] before:absolute before:top-0 before:bottom-0 before:left-0 before:right-0 before:opacity-25',backdrop:"fixed inset-0 flex sm:place-content-center sm:place-items-center items-end z-20 [--w-modal-max-height:80%] [--w-modal-width:640px]",modal:"pb-safe-[32] i-shadow-$shadow-modal max-h-[--w-modal-max-height] min-h-[--w-modal-min-height] w-[--w-modal-width] h-[--w-modal-height] relative transition-300 ease-in-out backface-hidden will-change-height rounded-8 mx-0 sm:mx-16 i-bg-$color-modal-background flex flex-col overflow-hidden outline-none space-y-16 pt-8 sm:pt-32 sm:pb-32 rounded-b-0 sm:rounded-b-8",content:"block overflow-y-auto overflow-x-hidden last-child:mb-0 grow shrink px-16 sm:px-32 relative",footer:"flex justify-end shrink-0 px-16 sm:px-32",transitionTitle:"transition-all duration-300",transitionTitleCenter:"justify-self-center",transitionTitleColSpan:"col-span-2",title:"-mt-4 sm:-mt-8 h-40 sm:h-48 grid gap-8 sm:gap-16 grid-cols-[auto_1fr_auto] items-center px-16 sm:px-32 border-b sm:border-b-0 shrink-0",titleText:"mb-0 h4 sm:h3",titleButton:Nt.pill+" sm:min-h-[32px] sm:min-w-[32px]",titleButtonLeft:"-ml-8 sm:-ml-12 justify-self-start",titleButtonRight:"-mr-8 sm:-mr-12 justify-self-end",titleButtonIcon:"h-16 w-16 sm:h-24 sm:w-24",titleButtonIconRotated:"transform rotate-90"};var Qt={label:"antialiased block relative text-s font-bold pb-4 cursor-pointer i-text-$color-label-text",labelInvalid:"i-text-$color-label-text-negative",optional:"pl-8 font-normal text-s i-text-$color-label-optional-text"};var ze="absolute top-0 bottom-0 flex justify-center items-center focusable focus:[--w-outline-offset:-2px] bg-transparent ",Co={wrapper:ze+"right-0",wrapperWithLabel:"w-max pr-12",wrapperWithIcon:"w-40",label:"antialiased block relative cursor-default pb-0 font-bold text-xs i-text-$color-label-text"},Ro={wrapper:ze+"left-0",wrapperWithLabel:"w-max pl-12",wrapperWithIcon:"w-40",label:"antialiased block relative cursor-default pb-0 font-bold text-xs i-text-$color-label-text"};var To={toggle:"absolute inset-0 h-full w-full appearance-none cursor-pointer focusable focusable-inset",label:`px-12 ${Qt.label} py-8! cursor-pointer focusable focusable-inset`,buttonOrLink:"bg-transparent focusable",buttonOrLinkStretch:"inset-0 absolute"};function K(e){return e.split("-")[0]}function de(e){return e.split("-")[1]}function Y(e){return["top","bottom"].includes(K(e))?"x":"y"}function Se(e){return e==="y"?"height":"width"}function Ve(e,t,o){let{reference:r,floating:a}=e,n=r.x+r.width/2-a.width/2,l=r.y+r.height/2-a.height/2,i=Y(t),c=Se(i),p=r[c]/2-a[c]/2,g=i==="x",b;switch(K(t)){case"top":b={x:n,y:r.y-a.height};break;case"bottom":b={x:n,y:r.y+r.height};break;case"right":b={x:r.x+r.width,y:l};break;case"left":b={x:r.x-a.width,y:l};break;default:b={x:r.x,y:r.y}}switch(de(t)){case"start":b[i]-=p*(o&&g?-1:1);break;case"end":b[i]+=p*(o&&g?-1:1)}return b}var We=async(e,t,o)=>{let{placement:r="bottom",strategy:a="absolute",middleware:n=[],platform:l}=o,i=await(l.isRTL==null?void 0:l.isRTL(t)),c=await l.getElementRects({reference:e,floating:t,strategy:a}),{x:p,y:g}=Ve(c,r,i),b=r,x={},f=0;for(let m=0;m<n.length;m++){let{name:$,fn:y}=n[m],{x:w,y:L,data:_,reset:k}=await y({x:p,y:g,initialPlacement:r,placement:b,strategy:a,middlewareData:x,rects:c,platform:l,elements:{reference:e,floating:t}});p=w!=null?w:p,g=L!=null?L:g,x=O(S({},x),{[$]:S(S({},x[$]),_)}),k&&f<=50&&(f++,typeof k=="object"&&(k.placement&&(b=k.placement),k.rects&&(c=k.rects===!0?await l.getElementRects({reference:e,floating:t,strategy:a}):k.rects),{x:p,y:g}=Ve(c,b,i)),m=-1)}return{x:p,y:g,placement:b,strategy:a,middlewareData:x}};function Ge(e){return typeof e!="number"?function(t){return S({top:0,right:0,bottom:0,left:0},t)}(e):{top:e,right:e,bottom:e,left:e}}function X(e){return O(S({},e),{top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height})}async function Ee(e,t){var o;t===void 0&&(t={});let{x:r,y:a,platform:n,rects:l,elements:i,strategy:c}=e,{boundary:p="clippingAncestors",rootBoundary:g="viewport",elementContext:b="floating",altBoundary:x=!1,padding:f=0}=t,m=Ge(f),$=i[x?b==="floating"?"reference":"floating":b],y=X(await n.getClippingRect({element:(o=await(n.isElement==null?void 0:n.isElement($)))==null||o?$:$.contextElement||await(n.getDocumentElement==null?void 0:n.getDocumentElement(i.floating)),boundary:p,rootBoundary:g,strategy:c})),w=X(n.convertOffsetParentRelativeRectToViewportRelativeRect?await n.convertOffsetParentRelativeRectToViewportRelativeRect({rect:b==="floating"?O(S({},l.floating),{x:r,y:a}):l.reference,offsetParent:await(n.getOffsetParent==null?void 0:n.getOffsetParent(i.floating)),strategy:c}):l[b]);return{top:y.top-w.top+m.top,bottom:w.bottom-y.bottom+m.bottom,left:y.left-w.left+m.left,right:w.right-y.right+m.right}}var It=Math.min,qt=Math.max;function Le(e,t,o){return qt(e,It(t,o))}var Ce=e=>({name:"arrow",options:e,async fn(t){let{element:o,padding:r=0}=e!=null?e:{},{x:a,y:n,placement:l,rects:i,platform:c}=t;if(o==null)return{};let p=Ge(r),g={x:a,y:n},b=Y(l),x=de(l),f=Se(b),m=await c.getDimensions(o),$=b==="y"?"top":"left",y=b==="y"?"bottom":"right",w=i.reference[f]+i.reference[b]-g[b]-i.floating[f],L=g[b]-i.reference[b],_=await(c.getOffsetParent==null?void 0:c.getOffsetParent(o)),k=_?b==="y"?_.clientHeight||0:_.clientWidth||0:0;k===0&&(k=i.floating[f]);let ne=w/2-L/2,U=p[$],W=k-m[f]-p[y],T=k/2-m[f]/2+ne,E=Le(U,T,W),A=(x==="start"?p[$]:p[y])>0&&T!==E&&i.reference[f]<=i.floating[f];return{[b]:g[b]-(A?T<U?U-T:W-T:0),data:{[b]:E,centerOffset:T-E}}}}),Ut={left:"right",right:"left",bottom:"top",top:"bottom"};function se(e){return e.replace(/left|right|bottom|top/g,t=>Ut[t])}function jt(e,t,o){o===void 0&&(o=!1);let r=de(e),a=Y(e),n=Se(a),l=a==="x"?r===(o?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[n]>t.floating[n]&&(l=se(l)),{main:l,cross:se(l)}}var zt={start:"end",end:"start"};function Fe(e){return e.replace(/start|end/g,t=>zt[t])}var Vt=["top","right","bottom","left"],Oo=Vt.reduce((e,t)=>e.concat(t,t+"-start",t+"-end"),[]);var Re=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var o;let{placement:r,middlewareData:a,rects:n,initialPlacement:l,platform:i,elements:c}=t,T=e,{mainAxis:p=!0,crossAxis:g=!0,fallbackPlacements:b,fallbackStrategy:x="bestFit",flipAlignment:f=!0}=T,m=J(T,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","flipAlignment"]),$=K(r),y=b||($===l||!f?[se(l)]:function(E){let A=se(E);return[Fe(E),A,Fe(A)]}(l)),w=[l,...y],L=await Ee(t,m),_=[],k=((o=a.flip)==null?void 0:o.overflows)||[];if(p&&_.push(L[$]),g){let{main:E,cross:A}=jt(r,n,await(i.isRTL==null?void 0:i.isRTL(c.floating)));_.push(L[E],L[A])}if(k=[...k,{placement:r,overflows:_}],!_.every(E=>E<=0)){var ne,U;let E=((ne=(U=a.flip)==null?void 0:U.index)!=null?ne:0)+1,A=w[E];if(A)return{data:{index:E,overflows:k},reset:{placement:A}};let le="bottom";switch(x){case"bestFit":{var W;let Qe=(W=k.map(ae=>[ae,ae.overflows.filter(G=>G>0).reduce((G,St)=>G+St,0)]).sort((ae,G)=>ae[1]-G[1])[0])==null?void 0:W[0].placement;Qe&&(le=Qe);break}case"initialPlacement":le=l}if(r!==le)return{reset:{placement:le}}}return{}}}};var Te=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){let{x:o,y:r}=t,a=await async function(n,l){let{placement:i,platform:c,elements:p}=n,g=await(c.isRTL==null?void 0:c.isRTL(p.floating)),b=K(i),x=de(i),f=Y(i)==="x",m=["left","top"].includes(b)?-1:1,$=g&&f?-1:1,y=typeof l=="function"?l(n):l,{mainAxis:w,crossAxis:L,alignmentAxis:_}=typeof y=="number"?{mainAxis:y,crossAxis:0,alignmentAxis:null}:S({mainAxis:0,crossAxis:0,alignmentAxis:null},y);return x&&typeof _=="number"&&(L=x==="end"?-1*_:_),f?{x:L*$,y:w*m}:{x:w*m,y:L*$}}(t,e);return{x:o+a.x,y:r+a.y,data:a}}}};function Ft(e){return e==="x"?"y":"x"}var Ae=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:o,y:r,placement:a}=t,y=e,{mainAxis:n=!0,crossAxis:l=!1,limiter:i={fn:w=>{let{x:L,y:_}=w;return{x:L,y:_}}}}=y,c=J(y,["mainAxis","crossAxis","limiter"]),p={x:o,y:r},g=await Ee(t,c),b=Y(K(a)),x=Ft(b),f=p[b],m=p[x];if(n){let w=b==="y"?"bottom":"right";f=Le(f+g[b==="y"?"top":"left"],f,f-g[w])}if(l){let w=x==="y"?"bottom":"right";m=Le(m+g[x==="y"?"top":"left"],m,m-g[w])}let $=i.fn(O(S({},t),{[b]:f,[x]:m}));return O(S({},$),{data:{x:$.x-o,y:$.y-r}})}}};function et(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function M(e){if(e==null)return window;if(!et(e)){let t=e.ownerDocument;return t&&t.defaultView||window}return e}function ee(e){return M(e).getComputedStyle(e)}function P(e){return et(e)?"":e?(e.nodeName||"").toLowerCase():""}function tt(){let e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(t=>t.brand+"/"+t.version).join(" "):navigator.userAgent}function R(e){return e instanceof M(e).HTMLElement}function z(e){return e instanceof M(e).Element}function Pe(e){return typeof ShadowRoot=="undefined"?!1:e instanceof M(e).ShadowRoot||e instanceof ShadowRoot}function be(e){let{overflow:t,overflowX:o,overflowY:r}=ee(e);return/auto|scroll|overlay|hidden/.test(t+r+o)}function Wt(e){return["table","td","th"].includes(P(e))}function Je(e){let t=/firefox/i.test(tt()),o=ee(e);return o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].includes(o.willChange)||t&&o.willChange==="filter"||t&&!!o.filter&&o.filter!=="none"}function ot(){return!/^((?!chrome|android).)*safari/i.test(tt())}var Xe=Math.min,Z=Math.max,ue=Math.round;function I(e,t,o){var r,a,n,l;t===void 0&&(t=!1),o===void 0&&(o=!1);let i=e.getBoundingClientRect(),c=1,p=1;t&&R(e)&&(c=e.offsetWidth>0&&ue(i.width)/e.offsetWidth||1,p=e.offsetHeight>0&&ue(i.height)/e.offsetHeight||1);let g=z(e)?M(e):window,b=!ot()&&o,x=(i.left+(b&&(r=(a=g.visualViewport)==null?void 0:a.offsetLeft)!=null?r:0))/c,f=(i.top+(b&&(n=(l=g.visualViewport)==null?void 0:l.offsetTop)!=null?n:0))/p,m=i.width/c,$=i.height/p;return{width:m,height:$,top:f,right:x+m,bottom:f+$,left:x,x,y:f}}function Q(e){return(t=e,(t instanceof M(t).Node?e.ownerDocument:e.document)||window.document).documentElement;var t}function pe(e){return z(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function rt(e){return I(Q(e)).left+pe(e).scrollLeft}function Gt(e,t,o){let r=R(t),a=Q(t),n=I(e,r&&function(c){let p=I(c);return ue(p.width)!==c.offsetWidth||ue(p.height)!==c.offsetHeight}(t),o==="fixed"),l={scrollLeft:0,scrollTop:0},i={x:0,y:0};if(r||!r&&o!=="fixed")if((P(t)!=="body"||be(a))&&(l=pe(t)),R(t)){let c=I(t,!0);i.x=c.x+t.clientLeft,i.y=c.y+t.clientTop}else a&&(i.x=rt(a));return{x:n.left+l.scrollLeft-i.x,y:n.top+l.scrollTop-i.y,width:n.width,height:n.height}}function it(e){return P(e)==="html"?e:e.assignedSlot||e.parentNode||(Pe(e)?e.host:null)||Q(e)}function Ke(e){return R(e)&&getComputedStyle(e).position!=="fixed"?e.offsetParent:null}function Oe(e){let t=M(e),o=Ke(e);for(;o&&Wt(o)&&getComputedStyle(o).position==="static";)o=Ke(o);return o&&(P(o)==="html"||P(o)==="body"&&getComputedStyle(o).position==="static"&&!Je(o))?t:o||function(r){let a=it(r);for(Pe(a)&&(a=a.host);R(a)&&!["html","body"].includes(P(a));){if(Je(a))return a;a=a.parentNode}return null}(e)||t}function Ye(e){if(R(e))return{width:e.offsetWidth,height:e.offsetHeight};let t=I(e);return{width:t.width,height:t.height}}function nt(e){let t=it(e);return["html","body","#document"].includes(P(t))?e.ownerDocument.body:R(t)&&be(t)?t:nt(t)}function lt(e,t){var o;t===void 0&&(t=[]);let r=nt(e),a=r===((o=e.ownerDocument)==null?void 0:o.body),n=M(r),l=a?[n].concat(n.visualViewport||[],be(r)?r:[]):r,i=t.concat(l);return a?i:i.concat(lt(l))}function Ze(e,t,o){return t==="viewport"?X(function(r,a){let n=M(r),l=Q(r),i=n.visualViewport,c=l.clientWidth,p=l.clientHeight,g=0,b=0;if(i){c=i.width,p=i.height;let x=ot();(x||!x&&a==="fixed")&&(g=i.offsetLeft,b=i.offsetTop)}return{width:c,height:p,x:g,y:b}}(e,o)):z(t)?function(r,a){let n=I(r,!1,a==="fixed"),l=n.top+r.clientTop,i=n.left+r.clientLeft;return{top:l,left:i,x:i,y:l,right:i+r.clientWidth,bottom:l+r.clientHeight,width:r.clientWidth,height:r.clientHeight}}(t,o):X(function(r){var a;let n=Q(r),l=pe(r),i=(a=r.ownerDocument)==null?void 0:a.body,c=Z(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),p=Z(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),g=-l.scrollLeft+rt(r),b=-l.scrollTop;return ee(i||n).direction==="rtl"&&(g+=Z(n.clientWidth,i?i.clientWidth:0)-c),{width:c,height:p,x:g,y:b}}(Q(e)))}function Jt(e){let t=lt(e),o=["absolute","fixed"].includes(ee(e).position)&&R(e)?Oe(e):e;return z(o)?t.filter(r=>z(r)&&function(a,n){let l=n.getRootNode==null?void 0:n.getRootNode();if(a.contains(n))return!0;if(l&&Pe(l)){let i=n;do{if(i&&a===i)return!0;i=i.parentNode||i.host}while(i)}return!1}(r,o)&&P(r)!=="body"):[]}var Xt={getClippingRect:function(e){let{element:t,boundary:o,rootBoundary:r,strategy:a}=e,n=[...o==="clippingAncestors"?Jt(t):[].concat(o),r],l=n[0],i=n.reduce((c,p)=>{let g=Ze(t,p,a);return c.top=Z(g.top,c.top),c.right=Xe(g.right,c.right),c.bottom=Xe(g.bottom,c.bottom),c.left=Z(g.left,c.left),c},Ze(t,l,a));return{width:i.right-i.left,height:i.bottom-i.top,x:i.left,y:i.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:o,strategy:r}=e,a=R(o),n=Q(o);if(o===n)return t;let l={scrollLeft:0,scrollTop:0},i={x:0,y:0};if((a||!a&&r!=="fixed")&&((P(o)!=="body"||be(n))&&(l=pe(o)),R(o))){let c=I(o,!0);i.x=c.x+o.clientLeft,i.y=c.y+o.clientTop}return O(S({},t),{x:t.x-l.scrollLeft+i.x,y:t.y-l.scrollTop+i.y})},isElement:z,getDimensions:Ye,getOffsetParent:Oe,getDocumentElement:Q,getElementRects:e=>{let{reference:t,floating:o,strategy:r}=e;return{reference:Gt(t,Oe(o),r),floating:O(S({},Ye(o)),{x:0,y:0})}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>ee(e).direction==="rtl"};var at=(e,t,o)=>We(e,t,S({platform:Xt},o));var te="top",oe="bottom",ge="left",fe="right",re={[te]:oe,[oe]:te,[ge]:fe,[fe]:ge},Fo={[te]:"\u2191",[oe]:"\u2193",[ge]:"\u2190",[fe]:"\u2192"};var st={[ge]:-45,[te]:45,[fe]:135,[oe]:-135},ct="calc(50% - 7px)",Kt=e=>[te,oe].includes(e);function Yt({actualDirection:e,directionName:t,arrowEl:o}){if(!o)return;e=t;let r=Kt(t);o.style.left=r?ct:"",o.style.top=r?"":ct}async function dt(e){var a,n;if(!e.isShowing)return;if(await((a=e==null?void 0:e.waitForDOM)==null?void 0:a.call(e)),e.isCallout)return Yt(e);let t=await at(e.targetEl,e.attentionEl,{placement:e.directionName,middleware:[Re(),Te(8),Ae({padding:16}),Ce({element:e.noArrow?void 0:e.arrowEl})]});e.actualDirection=t.placement,Object.assign(((n=e.attentionEl)==null?void 0:n.style)||{},{left:"0",top:"0",transform:`translate3d(${Math.round(t.x)}px, ${Math.round(t.y)}px, 0)`});let{x:o,y:r}=t.middlewareData.arrow;e.arrowEl&&(e.arrowEl.style.left=o?o+"px":"",e.arrowEl.style.top=r?r+"px":"")}var mt=Mt(gt(),1);var B=e=>typeof e=="string",ao=e=>typeof e=="function",ft=new Map;function Ne(e){return[...Array.isArray(e)?e:[e],"en"]}function xt(e,t,o){let r=Ne(e);return me(()=>xe("date",r,o),()=>new Intl.DateTimeFormat(r,o)).format(B(t)?new Date(t):t)}function Me(e,t,o){let r=Ne(e);return me(()=>xe("number",r,o),()=>new Intl.NumberFormat(r,o)).format(t)}function ht(e,t,o,n){var l=n,{offset:r=0}=l,a=J(l,["offset"]);var p,g;let i=Ne(e),c=t?me(()=>xe("plural-ordinal",i),()=>new Intl.PluralRules(i,{type:"ordinal"})):me(()=>xe("plural-cardinal",i),()=>new Intl.PluralRules(i,{type:"cardinal"}));return(g=(p=a[o])!=null?p:a[c.select(o-r)])!=null?g:a.other}function me(e,t){let o=e(),r=ft.get(o);return r||(r=t(),ft.set(o,r)),r}function xe(e,t,o){let r=t.join("-");return`${e}-${r}-${JSON.stringify(o)}`}var $t=/\\u[a-fA-F0-9]{4}|\\x[a-fA-F0-9]{2}/g,co=(e,t,o={})=>{t=t||e;let r=n=>B(n)?o[n]||{style:n}:n,a=(n,l)=>{let i=Object.keys(o).length?r("number"):{},c=Me(t,n,i);return l.replace("#",c)};return{plural:(n,l)=>{let{offset:i=0}=l,c=ht(t,!1,n,l);return a(n-i,c)},selectordinal:(n,l)=>{let{offset:i=0}=l,c=ht(t,!0,n,l);return a(n-i,c)},select:(n,l)=>{var i;return(i=l[n])!=null?i:l.other},number:(n,l)=>Me(t,n,r(l)),date:(n,l)=>xt(t,n,r(l)),undefined:n=>n}};function so(e,t,o){return(r,a={})=>{let n=co(t,o,a),l=c=>Array.isArray(c)?c.reduce((p,g)=>{if(B(g))return p+g;let[b,x,f]=g,m={};f!=null&&!B(f)?Object.keys(f).forEach(y=>{m[y]=l(f[y])}):m=f;let $=n[x](r[b],m);return $==null?p:p+$},""):c,i=l(e);return B(i)&&$t.test(i)?(0,mt.default)(i.trim()):B(i)?i.trim():i}}var uo=Object.defineProperty,bo=(e,t,o)=>t in e?uo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,po=(e,t,o)=>(bo(e,typeof t!="symbol"?t+"":t,o),o),He=class{constructor(){po(this,"_events",{})}on(t,o){return this._hasEvent(t)||(this._events[t]=[]),this._events[t].push(o),()=>this.removeListener(t,o)}removeListener(t,o){if(!this._hasEvent(t))return;let r=this._events[t].indexOf(o);~r&&this._events[t].splice(r,1)}emit(t,...o){this._hasEvent(t)&&this._events[t].map(r=>r.apply(this,o))}_hasEvent(t){return Array.isArray(this._events[t])}},go=Object.defineProperty,fo=(e,t,o)=>t in e?go(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,F=(e,t,o)=>(fo(e,typeof t!="symbol"?t+"":t,o),o),Be=class extends He{constructor(t){super(),F(this,"_locale"),F(this,"_locales"),F(this,"_localeData"),F(this,"_messages"),F(this,"_missing"),F(this,"t",this._.bind(this)),this._messages={},this._localeData={},t.missing!=null&&(this._missing=t.missing),t.messages!=null&&this.load(t.messages),t.localeData!=null&&this.loadLocaleData(t.localeData),(t.locale!=null||t.locales!=null)&&this.activate(t.locale,t.locales)}get locale(){return this._locale}get locales(){return this._locales}get messages(){var t;return(t=this._messages[this._locale])!=null?t:{}}get localeData(){var t;return(t=this._localeData[this._locale])!=null?t:{}}_loadLocaleData(t,o){this._localeData[t]==null?this._localeData[t]=o:Object.assign(this._localeData[t],o)}loadLocaleData(t,o){o!=null?this._loadLocaleData(t,o):Object.keys(t).forEach(r=>this._loadLocaleData(r,t[r])),this.emit("change")}_load(t,o){this._messages[t]==null?this._messages[t]=o:Object.assign(this._messages[t],o)}load(t,o){o!=null?this._load(t,o):Object.keys(t).forEach(r=>this._load(r,t[r])),this.emit("change")}loadAndActivate({locale:t,locales:o,messages:r}){this._locale=t,this._locales=o||void 0,this._messages[this._locale]=r,this.emit("change")}activate(t,o){this._locale=t,this._locales=o,this.emit("change")}_(t,o={},{message:r,formats:a}={}){B(t)||(o=t.values||o,r=t.message,t=t.id);let n=!this.messages[t],l=this._missing;if(l&&n)return ao(l)?l(this._locale,t):l;n&&this.emit("missing",{id:t,locale:this._locale});let i=this.messages[t]||r||t;return B(i)&&$t.test(i)?JSON.parse(`"${i}"`):B(i)?i:so(i,this._locale,this._locales)(o,a)}date(t,o){return xt(this._locales||this._locale,t,o)}number(t,o){return Me(this._locales||this._locale,t,o)}};function ho(e={}){return new Be(e)}var C=ho();var vt=JSON.parse('{"attention.callout":"callout speech bubble","attention.aria.highlight":"highlighted speech bubble","attention.pointingDown":"pointing down","attention.pointingLeft":"pointing left","attention.pointingRight":"pointing right","attention.pointingUp":"pointing up","attention.popover":"popover speech bubble","attention.tooltip":"tooltip"}');var yt=JSON.parse('{"attention.callout":"callout speech bubble","attention.aria.highlight":"highlighted speech bubble","attention.pointingDown":"pointing down","attention.pointingLeft":"pointing left","attention.pointingRight":"pointing right","attention.pointingUp":"pointing up","attention.popover":"popover speech bubble","attention.tooltip":"tooltip"}');var wt=JSON.parse('{"attention.callout":"callout speech bubble","attention.aria.highlight":"highlighted speech bubble","attention.pointingDown":"pointing down","attention.pointingLeft":"pointing left","attention.pointingRight":"pointing right","attention.pointingUp":"pointing up","attention.popover":"popover speech bubble","attention.tooltip":"tooltip"}');var mo=["en","nb","fi"],_t="en",kt=e=>mo.find(t=>e===t||e.toLowerCase().includes(t))||_t;function xo(){if(typeof window=="undefined"){let e=process.env.NMP_LANGUAGE||Intl.DateTimeFormat().resolvedOptions().locale;return kt(e)}try{let e=document.documentElement.lang;return kt(e)}catch(e){return console.warn("could not detect locale, falling back to source locale",e),_t}}var $o=(e,t,o,r)=>e==="nb"?o:e==="fi"?r:t,Dt=(e,t,o)=>{let r=xo(),a=$o(r,e,t,o);C.load(r,a),C.activate(r)};var ie=class extends Ue(Lt){constructor(){super(),Dt(vt,yt,wt),this.show=!1,this.tooltip=!1,this.callout=!1,this.popover=!1,this.highlight=!1,this.noArrow=!1}connectedCallback(){if(super.connectedCallback(),!this.placement||!Object.keys(re).includes(this.placement))throw new Error(`Invalid "placement" attribute. Set its value to one of the following:
3
- ${JSON.stringify(Object.keys(re))}`);setTimeout(()=>this.requestUpdate(),0)}get _actualDirection(){return this.placement}set _actualDirection(t){this.placement=t}get _arrowDirection(){return re[this.placement]}updated(){this.callout||this._attentionEl.style.setProperty("--attention-visibility",this.show?"":"hidden"),this.tooltip||this._attentionEl.style.setProperty("--attention-display",this.show?"block":"none"),this.attentionState={isShowing:this.show,isCallout:this.callout,actualDirection:this._actualDirection,directionName:this.placement,arrowEl:this.renderRoot.querySelector("#arrow"),attentionEl:this._attentionEl,targetEl:this._targetEl,noArrow:this.noArrow},dt(this.attentionState)}pointingAtDirection(){switch(re[this._actualDirection]){case"top":return C._({id:"attention.pointingUp",message:"pointing up",comment:"Default screenreader message for top direction in the attention component"});case"right":return C._({id:"attention.pointingRight",message:"pointing right",comment:"Default screenreader message for right direction in the attention component"});case"bottom":return C._({id:"attention.pointingDown",message:"pointing down",comment:"Default screenreader message for bottom direction in the attention component"});case"left":return C._({id:"attention.pointingLeft",message:"pointing left",comment:"Default screenreader message for left direction in the attention component"});default:return""}}activeAttentionType(){switch(!0){case this.tooltip:return C._({id:"attention.tooltip",message:"tooltip",comment:"Default screenreader message for tooltip in the attention component"});case this.callout:return C._({id:"attention.callout",message:"callout speech bubble",comment:"Default screenreader message for callout speech bubble in the attention component"});case this.popover:return C._({id:"attention.popover",message:"popover speech bubble",comment:"Default screenreader message for popover speech bubble in the attention component"});case this.highlight:return C._({id:"attention.aria.highlight",message:"highlighted speech bubble",comment:"Default screenreader message for highlighted speech bubble in the attention component"});default:return""}}defaultAriaLabel(){return`${this.activeAttentionType()} ${this.noArrow?"":this.pointingAtDirection()}`}setAriaLabels(){if(this._targetEl&&!this._targetEl.getAttribute("aria-details")){let t=this._messageEl.id||(this._messageEl.id=je());this._targetEl.setAttribute("aria-details",t)}}get _activeVariantClasses(){let t={callout:this.callout,popover:this.popover,tooltip:this.tooltip,highlight:this.highlight},o=Object.keys(t).find(r=>!!t[r])||"";return{wrapper:j[o],arrow:j[`arrow${o.charAt(0).toUpperCase()+o.slice(1)}`]}}firstUpdated(){this.setAriaLabels(),this.callout&&(this._attentionEl.style.position="relative")}get _attentionEl(){return this.renderRoot.querySelector("#attention")}get _targetEl(){return this.renderRoot.querySelector("slot[name='target']").assignedNodes()[0]}get _messageEl(){return this.renderRoot.querySelector("slot[name='message']").assignedNodes()[0]}get _wrapperClasses(){return _e({[j.base]:!0,[this._activeVariantClasses.wrapper]:!0})}get _arrowClasses(){return _e({[j.arrowBase]:!0,[j[`arrowDirection${this._arrowDirection.charAt(0).toUpperCase()+this._arrowDirection.slice(1)}`]]:!0,[this._activeVariantClasses.arrow]:!0})}get _arrowHtml(){return this.noArrow?"":$e`<div
2
+ `],["r","\r"],["t"," "],["v","\v"],["0","\0"]]);function no(e){return io.get(e)||e}var lo=/\\(?:(\\)|x([\s\S]{0,2})|u(\{[^}]*\}?)|u([\s\S]{4})\\u([^{][\s\S]{0,3})|u([\s\S]{0,4})|([0-3]?[0-7]{1,2})|([\s\S])|$)/g;function pt(e,t=!1){return e.replace(lo,function(o,r,a,n,l,i,c,p,g){if(r!==void 0)return"\\";if(a!==void 0)return eo(a);if(n!==void 0)return oo(n);if(l!==void 0)return bt(l,i);if(c!==void 0)return bt(c);if(p==="0")return"\0";if(p!==void 0)return ro(p,!t);if(g!==void 0)return no(g);throw new SyntaxError(D.errorMessages.get(D.ErrorType.EndOfString))})}H.unraw=pt;H.default=pt});import{css as vo,html as $e}from"lit";import Lt from"@warp-ds/elements-core";import{ifDefined as yo}from"lit/directives/if-defined.js";import{classMap as _o}from"lit/directives/class-map.js";var Ht=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();function Ue(e){return class extends e{static createProperty(t,o){let r=o;(typeof(o==null?void 0:o.attribute)=="undefined"||(o==null?void 0:o.attribute)===!0)&&(r=Object.assign({},o,{attribute:Ht(t.toString())})),super.createProperty(t,r)}}}function _e(e){let t=[];for(let[o,r]of Object.entries(e))r&&t.push(o);return t.join(" ")}function je(){return`m${Math.random().toString(36).slice(2)}`}var j={base:"border-2 relative",tooltip:"i-bg-$color-tooltip-background i-border-$color-tooltip-background i-shadow-$shadow-tooltip i-text-$color-tooltip-text rounded-4 py-6 px-8",callout:"i-bg-$color-callout-background i-border-$color-callout-border i-text-$color-callout-text py-8 px-16 rounded-8",highlight:"i-bg-$color-callout-background i-border-$color-callout-border i-text-$color-callout-text py-8 px-16 rounded-8 drop-shadow-m",popover:"i-bg-$color-popover-background i-border-$color-popover-background i-text-$color-popover-paragraph-text rounded-8 p-16 drop-shadow-m",arrowBase:"absolute h-[14px] w-[14px] border-2 border-b-0 border-r-0 rounded-tl-4 transform",arrowDirectionLeft:"-left-[8px]",arrowDirectionRight:"-right-[8px]",arrowDirectionBottom:"-bottom-[8px]",arrowDirectionTop:"-top-[8px]",arrowTooltip:"i-bg-$color-tooltip-background i-border-$color-tooltip-background",arrowCallout:"i-bg-$color-callout-background i-border-$color-callout-border",arrowPopover:"i-bg-$color-popover-background i-border-$color-popover-background",arrowHighlight:"i-bg-$color-callout-background i-border-$color-callout-border",content:"last-child:mb-0",notCallout:"absolute z-50"};var De={box:"group block relative break-words last-child:mb-0 p-16 rounded-8",bleed:"-mx-16 sm:mx-0 rounded-l-0 rounded-r-0 sm:rounded-8",info:"i-bg-$color-box-info-background i-text-$color-box-info-text",neutral:"i-bg-$color-box-neutral-background i-text-$color-box-neutral-text",bordered:"border-2 i-border-$color-box-bordered-border i-bg-$color-box-bordered-background i-text-$color-box-bordered-text",infoClickable:"hover:i-bg-$color-box-info-background-hover active:i-bg-$color-box-info-background-hover",neutralClickable:"hover:i-bg-$color-box-neutral-background-hover active:i-bg-$color-box-neutral-background-hover",borderedClickable:"hover:i-bg-$color-box-bordered-background-hover active:i-bg-$color-box-bordered-background-hover hover:i-border-$color-box-bordered-border-hover active:i-border-$color-box-bordered-border-hover"};var Bt="focus:outline-none appearance-none cursor-pointer bg-transparent border-0 m-0 p-0 inline-block",So={expandable:"will-change-height",expandableTitle:"font-bold i-text-$color-expandable-title-text",expandableBox:"i-bg-$color-expandable-background hover:i-bg-$color-expandable-background-hover py-0 px-0 "+De.box,expandableBleed:De.bleed,chevron:"inline-block align-middle i-text-$color-expandable-icon",chevronNonBox:"relative left-8",chevronBox:"absolute right-16",chevronTransform:"transform transition-transform transform-gpu ease-in-out",chevronExpand:"-rotate-180",chevronCollapse:"rotate-180",expansion:"overflow-hidden",expansionNotExpanded:"h-0 invisible",button:Bt+" hover:underline focus:underline",buttonBox:"w-full text-left relative inline-flex items-center "+De.box,paddingTop:"pt-0",title:"flex justify-between items-center",titleType:"h4"},N="font-bold focusable justify-center transition-colors ease-in-out",v={primary:"i-text-$color-button-primary-text hover:i-text-$color-button-primary-text i-bg-$color-button-primary-background hover:i-bg-$color-button-primary-background-hover active:i-bg-$color-button-primary-background-active",secondary:"i-text-$color-button-secondary-text hover:i-text-$color-button-secondary-text i-border-$color-button-secondary-border i-bg-$color-button-secondary-background hover:i-bg-$color-button-secondary-background-hover hover:i-border-$color-button-secondary-border-hover active:i-bg-$color-button-secondary-background-active",utility:"i-text-$color-button-utility-text hover:i-text-$color-button-utility-text i-bg-$color-button-utility-background i-border-$color-button-utility-border hover:i-bg-$color-button-utility-background hover:i-border-$color-button-utility-border-hover active:i-border-$color-button-utility-border-active",destructive:"i-bg-$color-button-negative-background i-text-$color-button-negative-text hover:i-text-$color-button-negative-text hover:i-bg-$color-button-negative-background-hover active:i-bg-$color-button-negative-background-active",pill:"i-text-$color-button-pill-icon hover:i-text-$color-button-pill-icon-hover active:i-text-$color-button-pill-icon-active i-bg-$color-button-pill-background hover:i-bg-$color-button-pill-background-hover active:i-bg-$color-button-pill-background-active",disabled:"i-text-$color-button-disabled-text i-bg-$color-button-disabled-background",quiet:"i-bg-$color-button-quiet-background i-text-$color-button-quiet-text hover:i-bg-$color-button-quiet-background-hover active:i-bg-$color-button-quiet-background-active",utilityQuiet:"i-text-$color-button-utility-quiet-text i-bg-$color-button-utility-quiet-background hover:i-bg-$color-button-utility-quiet-background-hover",negativeQuiet:"i-bg-$color-button-negative-quiet-background i-text-$color-button-negative-quiet-text hover:i-bg-$color-button-negative-quiet-background-hover active:i-bg-$color-button-negative-quiet-background-active",loading:"i-text-$color-button-loading-text i-bg-$color-button-loading-background",link:"i-text-$color-button-link-text"},h={primary:`border-0 rounded-8 ${N}`,secondary:`border-2 rounded-8 ${N}`,utility:`border rounded-4 ${N}`,negative:`border-0 rounded-8 ${N}`,pill:`p-4 rounded-full border-0 inline-flex items-center justify-center hover:bg-clip-padding ${N}`,link:`bg-transparent focusable ease-in-out inline active:underline hover:underline ${v.link}`},d={xsmall:"py-6 px-16",small:"py-8 px-16",medium:"py-10 px-14",large:"py-12 px-16",utility:"py-[11px] px-[15px]",smallUtility:"py-[7px] px-[15px]",pill:"min-h-[44px] min-w-[44px]",pillSmall:"min-h-32 min-w-32",link:"p-0"},u={medium:"text-m leading-[24]",xsmall:"text-xs"},s={inProgress:`border-transparent animate-inprogress pointer-events-none ${v.loading}`,quiet:`border-0 rounded-8 ${N}`,utilityQuiet:`border-0 rounded-4 ${N}`,negativeQuiet:`border-0 rounded-8 ${N}`,isDisabled:`font-bold justify-center transition-colors ease-in-out cursor-default pointer-events-none ${v.disabled}`},Nt={secondary:`${d.medium} ${u.medium} ${h.secondary} ${v.secondary}`,secondaryHref:`${d.medium} ${u.medium} ${h.secondary} ${v.secondary}`,secondaryDisabled:`${d.medium} ${u.medium} ${h.secondary} ${s.isDisabled}`,secondarySmall:`${u.xsmall} ${d.xsmall} ${h.secondary} ${v.secondary}`,secondarySmallDisabled:`${u.xsmall} ${d.xsmall} ${h.secondary} ${s.isDisabled}`,secondaryQuiet:`${d.medium} ${u.medium} ${s.quiet} ${v.quiet}`,secondaryQuietDisabled:`${d.medium} ${u.medium} ${s.quiet} ${s.isDisabled}`,secondarySmallQuiet:`${u.xsmall} ${d.xsmall} ${s.quiet} ${v.quiet}`,secondarySmallQuietDisabled:`${u.xsmall} ${d.xsmall} ${s.quiet} ${s.isDisabled}`,secondaryLoading:`${d.medium} ${u.medium} ${h.secondary} ${s.inProgress}`,secondarySmallLoading:`${u.xsmall} ${d.xsmall} ${h.secondary} ${s.inProgress}`,secondarySmallQuietLoading:`${u.xsmall} ${d.xsmall} ${s.quiet} ${s.inProgress}`,secondaryQuietLoading:`${d.medium} ${u.medium} ${s.quiet} ${s.inProgress}`,primary:`${d.large} ${u.medium} ${h.primary} ${v.primary}`,primaryDisabled:`${d.large} ${u.medium} ${s.isDisabled} ${h.primary}`,primarySmall:`${d.small} ${u.xsmall} ${h.primary} ${v.primary}`,primarySmallDisabled:`${d.small} ${u.xsmall} ${s.isDisabled} ${h.primary} `,primaryQuiet:`${d.large} ${u.medium} ${s.quiet} ${v.quiet}`,primaryQuietDisabled:`${d.large} ${u.medium} ${s.quiet} ${s.isDisabled}`,primarySmallQuiet:`${d.small} ${u.xsmall} ${s.quiet} ${v.quiet}`,primarySmallQuietDisabled:`${d.small} ${u.xsmall} ${s.quiet} ${s.isDisabled}`,primaryLoading:`${d.large} ${u.medium} ${s.inProgress} ${h.primary}`,primarySmallLoading:`${d.small} ${u.xsmall} ${s.inProgress} ${h.primary}`,primarySmallQuietLoading:`${d.small} ${u.xsmall} ${s.quiet} ${s.inProgress} ${h.primary}`,primaryQuietLoading:`${d.large} ${u.medium} ${s.quiet} ${s.inProgress}`,utility:`${d.utility} ${u.medium} ${h.utility} ${v.utility}`,utilityDisabled:`${d.utility} ${u.medium} ${h.utility} ${s.isDisabled}`,utilityQuiet:`${d.large} ${u.medium} ${s.utilityQuiet} ${v.utilityQuiet}`,utilityQuietDisabled:`${d.large} ${u.medium} ${s.utilityQuiet} ${s.isDisabled}`,utilitySmall:`${d.smallUtility} ${u.xsmall} ${h.utility} ${v.utility}`,utilitySmallDisabled:`${d.smallUtility} ${u.xsmall} ${h.utility} ${s.isDisabled}`,utilitySmallQuiet:`${d.smallUtility} ${u.xsmall} ${s.utilityQuiet} ${v.utilityQuiet}`,utilitySmallQuietDisabled:`${d.smallUtility} ${u.xsmall} ${s.utilityQuiet} ${s.isDisabled}`,utilityLoading:`${d.large} ${u.medium} ${h.utility} ${s.inProgress}`,utilitySmallLoading:`${d.smallUtility} ${u.xsmall} ${h.utility} ${s.inProgress}`,utilityQuietLoading:`${d.large} ${u.medium} ${s.inProgress} ${s.utilityQuiet}`,utilitySmallQuietLoading:`${d.smallUtility} ${u.xsmall} ${s.inProgress} ${s.utilityQuiet}`,negative:`${d.large} ${u.medium} ${h.negative} ${v.destructive}`,negativeDisabled:`${d.large} ${u.medium} ${h.negative} ${s.isDisabled}`,negativeQuiet:`${d.large} ${u.medium} ${s.negativeQuiet} ${v.negativeQuiet}`,negativeQuietDisabled:`${d.large} ${u.medium} ${s.negativeQuiet}${s.isDisabled}`,negativeSmall:`${d.small} ${u.xsmall} ${h.negative} ${v.destructive}`,negativeSmallDisabled:`${d.small} ${u.xsmall} ${h.negative} ${s.isDisabled}`,negativeSmallQuiet:`${d.small} ${u.xsmall} ${s.negativeQuiet} ${v.negativeQuiet}`,negativeSmallQuietDisabled:`${d.small} ${u.xsmall} ${s.negativeQuiet} ${s.isDisabled}`,negativeLoading:`${d.large} ${u.medium} ${h.negative} ${s.inProgress}`,negativeSmallLoading:`${d.small} ${u.xsmall} ${s.inProgress} ${h.negative}`,negativeQuietLoading:`${d.large} ${u.medium} ${s.negativeQuiet} ${h.negative} ${s.inProgress}`,negativeSmallQuietLoading:`${d.small} ${u.xsmall} ${s.negativeQuiet} ${s.inProgress}`,pill:`${d.pill} ${u.medium} ${h.pill} ${v.pill}`,pillSmall:`${d.pillSmall} ${u.xsmall} ${h.pill} ${v.pill}`,pillLoading:`${d.pill} ${u.medium} ${h.pill} ${s.inProgress}`,pillSmallLoading:`${d.pillSmall} ${u.xsmall} ${h.pill} ${s.inProgress}`,link:`${d.link} ${u.medium} ${h.link}`,linkSmall:`${d.link} ${u.xsmall} ${h.link}`,linkAsButton:"inline-block hover:no-underline text-center",a11y:"sr-only",fullWidth:"w-full max-w-full",contentWidth:"max-w-max"};var Eo={transparentBg:'before:i-bg-$color-modal-backdrop-background before:content-[""] before:absolute before:top-0 before:bottom-0 before:left-0 before:right-0 before:opacity-25',backdrop:"fixed inset-0 flex sm:place-content-center sm:place-items-center items-end z-20 [--w-modal-max-height:80%] [--w-modal-width:640px]",modal:"pb-safe-[32] i-shadow-$shadow-modal max-h-[--w-modal-max-height] min-h-[--w-modal-min-height] w-[--w-modal-width] h-[--w-modal-height] relative transition-300 ease-in-out backface-hidden will-change-height rounded-8 mx-0 sm:mx-16 i-bg-$color-modal-background flex flex-col overflow-hidden outline-none space-y-16 pt-8 sm:pt-32 sm:pb-32 rounded-b-0 sm:rounded-b-8",content:"block overflow-y-auto overflow-x-hidden last-child:mb-0 grow shrink px-16 sm:px-32 relative",footer:"flex justify-end shrink-0 px-16 sm:px-32",transitionTitle:"transition-all duration-300",transitionTitleCenter:"justify-self-center",transitionTitleColSpan:"col-span-2",title:"-mt-4 sm:-mt-8 h-40 sm:h-48 grid gap-8 sm:gap-16 grid-cols-[auto_1fr_auto] items-center px-16 sm:px-32 border-b sm:border-b-0 shrink-0",titleText:"mb-0 h4 sm:h3",titleButton:Nt.pill+" sm:min-h-[32px] sm:min-w-[32px]",titleButtonLeft:"-ml-8 sm:-ml-12 justify-self-start",titleButtonRight:"-mr-8 sm:-mr-12 justify-self-end",titleButtonIcon:"h-16 w-16 sm:h-24 sm:w-24",titleButtonIconRotated:"transform rotate-90"};var Qt={label:"antialiased block relative text-s font-bold pb-4 cursor-pointer i-text-$color-label-text",labelInvalid:"i-text-$color-label-text-negative",optional:"pl-8 font-normal text-s i-text-$color-label-optional-text"};var ze="absolute top-0 bottom-0 flex justify-center items-center focusable focus:[--w-outline-offset:-2px] bg-transparent ",Co={wrapper:ze+"right-0",wrapperWithLabel:"w-max pr-12",wrapperWithIcon:"w-40",label:"antialiased block relative cursor-default pb-0 font-bold text-xs i-text-$color-label-text"},Ro={wrapper:ze+"left-0",wrapperWithLabel:"w-max pl-12",wrapperWithIcon:"w-40",label:"antialiased block relative cursor-default pb-0 font-bold text-xs i-text-$color-label-text"};var To={toggle:"absolute inset-0 h-full w-full appearance-none cursor-pointer focusable focusable-inset",label:`px-12 ${Qt.label} py-8! cursor-pointer focusable focusable-inset`,buttonOrLink:"bg-transparent focusable",buttonOrLinkStretch:"inset-0 absolute"};function K(e){return e.split("-")[0]}function de(e){return e.split("-")[1]}function Y(e){return["top","bottom"].includes(K(e))?"x":"y"}function Se(e){return e==="y"?"height":"width"}function Ve(e,t,o){let{reference:r,floating:a}=e,n=r.x+r.width/2-a.width/2,l=r.y+r.height/2-a.height/2,i=Y(t),c=Se(i),p=r[c]/2-a[c]/2,g=i==="x",b;switch(K(t)){case"top":b={x:n,y:r.y-a.height};break;case"bottom":b={x:n,y:r.y+r.height};break;case"right":b={x:r.x+r.width,y:l};break;case"left":b={x:r.x-a.width,y:l};break;default:b={x:r.x,y:r.y}}switch(de(t)){case"start":b[i]-=p*(o&&g?-1:1);break;case"end":b[i]+=p*(o&&g?-1:1)}return b}var We=async(e,t,o)=>{let{placement:r="bottom",strategy:a="absolute",middleware:n=[],platform:l}=o,i=await(l.isRTL==null?void 0:l.isRTL(t)),c=await l.getElementRects({reference:e,floating:t,strategy:a}),{x:p,y:g}=Ve(c,r,i),b=r,x={},f=0;for(let m=0;m<n.length;m++){let{name:$,fn:y}=n[m],{x:w,y:L,data:_,reset:k}=await y({x:p,y:g,initialPlacement:r,placement:b,strategy:a,middlewareData:x,rects:c,platform:l,elements:{reference:e,floating:t}});p=w!=null?w:p,g=L!=null?L:g,x=O(S({},x),{[$]:S(S({},x[$]),_)}),k&&f<=50&&(f++,typeof k=="object"&&(k.placement&&(b=k.placement),k.rects&&(c=k.rects===!0?await l.getElementRects({reference:e,floating:t,strategy:a}):k.rects),{x:p,y:g}=Ve(c,b,i)),m=-1)}return{x:p,y:g,placement:b,strategy:a,middlewareData:x}};function Ge(e){return typeof e!="number"?function(t){return S({top:0,right:0,bottom:0,left:0},t)}(e):{top:e,right:e,bottom:e,left:e}}function X(e){return O(S({},e),{top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height})}async function Ee(e,t){var o;t===void 0&&(t={});let{x:r,y:a,platform:n,rects:l,elements:i,strategy:c}=e,{boundary:p="clippingAncestors",rootBoundary:g="viewport",elementContext:b="floating",altBoundary:x=!1,padding:f=0}=t,m=Ge(f),$=i[x?b==="floating"?"reference":"floating":b],y=X(await n.getClippingRect({element:(o=await(n.isElement==null?void 0:n.isElement($)))==null||o?$:$.contextElement||await(n.getDocumentElement==null?void 0:n.getDocumentElement(i.floating)),boundary:p,rootBoundary:g,strategy:c})),w=X(n.convertOffsetParentRelativeRectToViewportRelativeRect?await n.convertOffsetParentRelativeRectToViewportRelativeRect({rect:b==="floating"?O(S({},l.floating),{x:r,y:a}):l.reference,offsetParent:await(n.getOffsetParent==null?void 0:n.getOffsetParent(i.floating)),strategy:c}):l[b]);return{top:y.top-w.top+m.top,bottom:w.bottom-y.bottom+m.bottom,left:y.left-w.left+m.left,right:w.right-y.right+m.right}}var It=Math.min,qt=Math.max;function Le(e,t,o){return qt(e,It(t,o))}var Ce=e=>({name:"arrow",options:e,async fn(t){let{element:o,padding:r=0}=e!=null?e:{},{x:a,y:n,placement:l,rects:i,platform:c}=t;if(o==null)return{};let p=Ge(r),g={x:a,y:n},b=Y(l),x=de(l),f=Se(b),m=await c.getDimensions(o),$=b==="y"?"top":"left",y=b==="y"?"bottom":"right",w=i.reference[f]+i.reference[b]-g[b]-i.floating[f],L=g[b]-i.reference[b],_=await(c.getOffsetParent==null?void 0:c.getOffsetParent(o)),k=_?b==="y"?_.clientHeight||0:_.clientWidth||0:0;k===0&&(k=i.floating[f]);let ne=w/2-L/2,U=p[$],W=k-m[f]-p[y],T=k/2-m[f]/2+ne,E=Le(U,T,W),A=(x==="start"?p[$]:p[y])>0&&T!==E&&i.reference[f]<=i.floating[f];return{[b]:g[b]-(A?T<U?U-T:W-T:0),data:{[b]:E,centerOffset:T-E}}}}),Ut={left:"right",right:"left",bottom:"top",top:"bottom"};function se(e){return e.replace(/left|right|bottom|top/g,t=>Ut[t])}function jt(e,t,o){o===void 0&&(o=!1);let r=de(e),a=Y(e),n=Se(a),l=a==="x"?r===(o?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[n]>t.floating[n]&&(l=se(l)),{main:l,cross:se(l)}}var zt={start:"end",end:"start"};function Fe(e){return e.replace(/start|end/g,t=>zt[t])}var Vt=["top","right","bottom","left"],Oo=Vt.reduce((e,t)=>e.concat(t,t+"-start",t+"-end"),[]);var Re=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var o;let{placement:r,middlewareData:a,rects:n,initialPlacement:l,platform:i,elements:c}=t,T=e,{mainAxis:p=!0,crossAxis:g=!0,fallbackPlacements:b,fallbackStrategy:x="bestFit",flipAlignment:f=!0}=T,m=J(T,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","flipAlignment"]),$=K(r),y=b||($===l||!f?[se(l)]:function(E){let A=se(E);return[Fe(E),A,Fe(A)]}(l)),w=[l,...y],L=await Ee(t,m),_=[],k=((o=a.flip)==null?void 0:o.overflows)||[];if(p&&_.push(L[$]),g){let{main:E,cross:A}=jt(r,n,await(i.isRTL==null?void 0:i.isRTL(c.floating)));_.push(L[E],L[A])}if(k=[...k,{placement:r,overflows:_}],!_.every(E=>E<=0)){var ne,U;let E=((ne=(U=a.flip)==null?void 0:U.index)!=null?ne:0)+1,A=w[E];if(A)return{data:{index:E,overflows:k},reset:{placement:A}};let le="bottom";switch(x){case"bestFit":{var W;let Qe=(W=k.map(ae=>[ae,ae.overflows.filter(G=>G>0).reduce((G,St)=>G+St,0)]).sort((ae,G)=>ae[1]-G[1])[0])==null?void 0:W[0].placement;Qe&&(le=Qe);break}case"initialPlacement":le=l}if(r!==le)return{reset:{placement:le}}}return{}}}};var Te=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){let{x:o,y:r}=t,a=await async function(n,l){let{placement:i,platform:c,elements:p}=n,g=await(c.isRTL==null?void 0:c.isRTL(p.floating)),b=K(i),x=de(i),f=Y(i)==="x",m=["left","top"].includes(b)?-1:1,$=g&&f?-1:1,y=typeof l=="function"?l(n):l,{mainAxis:w,crossAxis:L,alignmentAxis:_}=typeof y=="number"?{mainAxis:y,crossAxis:0,alignmentAxis:null}:S({mainAxis:0,crossAxis:0,alignmentAxis:null},y);return x&&typeof _=="number"&&(L=x==="end"?-1*_:_),f?{x:L*$,y:w*m}:{x:w*m,y:L*$}}(t,e);return{x:o+a.x,y:r+a.y,data:a}}}};function Ft(e){return e==="x"?"y":"x"}var Ae=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:o,y:r,placement:a}=t,y=e,{mainAxis:n=!0,crossAxis:l=!1,limiter:i={fn:w=>{let{x:L,y:_}=w;return{x:L,y:_}}}}=y,c=J(y,["mainAxis","crossAxis","limiter"]),p={x:o,y:r},g=await Ee(t,c),b=Y(K(a)),x=Ft(b),f=p[b],m=p[x];if(n){let w=b==="y"?"bottom":"right";f=Le(f+g[b==="y"?"top":"left"],f,f-g[w])}if(l){let w=x==="y"?"bottom":"right";m=Le(m+g[x==="y"?"top":"left"],m,m-g[w])}let $=i.fn(O(S({},t),{[b]:f,[x]:m}));return O(S({},$),{data:{x:$.x-o,y:$.y-r}})}}};function et(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function M(e){if(e==null)return window;if(!et(e)){let t=e.ownerDocument;return t&&t.defaultView||window}return e}function ee(e){return M(e).getComputedStyle(e)}function P(e){return et(e)?"":e?(e.nodeName||"").toLowerCase():""}function tt(){let e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(t=>t.brand+"/"+t.version).join(" "):navigator.userAgent}function R(e){return e instanceof M(e).HTMLElement}function z(e){return e instanceof M(e).Element}function Pe(e){return typeof ShadowRoot=="undefined"?!1:e instanceof M(e).ShadowRoot||e instanceof ShadowRoot}function be(e){let{overflow:t,overflowX:o,overflowY:r}=ee(e);return/auto|scroll|overlay|hidden/.test(t+r+o)}function Wt(e){return["table","td","th"].includes(P(e))}function Je(e){let t=/firefox/i.test(tt()),o=ee(e);return o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].includes(o.willChange)||t&&o.willChange==="filter"||t&&!!o.filter&&o.filter!=="none"}function ot(){return!/^((?!chrome|android).)*safari/i.test(tt())}var Xe=Math.min,Z=Math.max,ue=Math.round;function I(e,t,o){var r,a,n,l;t===void 0&&(t=!1),o===void 0&&(o=!1);let i=e.getBoundingClientRect(),c=1,p=1;t&&R(e)&&(c=e.offsetWidth>0&&ue(i.width)/e.offsetWidth||1,p=e.offsetHeight>0&&ue(i.height)/e.offsetHeight||1);let g=z(e)?M(e):window,b=!ot()&&o,x=(i.left+(b&&(r=(a=g.visualViewport)==null?void 0:a.offsetLeft)!=null?r:0))/c,f=(i.top+(b&&(n=(l=g.visualViewport)==null?void 0:l.offsetTop)!=null?n:0))/p,m=i.width/c,$=i.height/p;return{width:m,height:$,top:f,right:x+m,bottom:f+$,left:x,x,y:f}}function Q(e){return(t=e,(t instanceof M(t).Node?e.ownerDocument:e.document)||window.document).documentElement;var t}function pe(e){return z(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function rt(e){return I(Q(e)).left+pe(e).scrollLeft}function Gt(e,t,o){let r=R(t),a=Q(t),n=I(e,r&&function(c){let p=I(c);return ue(p.width)!==c.offsetWidth||ue(p.height)!==c.offsetHeight}(t),o==="fixed"),l={scrollLeft:0,scrollTop:0},i={x:0,y:0};if(r||!r&&o!=="fixed")if((P(t)!=="body"||be(a))&&(l=pe(t)),R(t)){let c=I(t,!0);i.x=c.x+t.clientLeft,i.y=c.y+t.clientTop}else a&&(i.x=rt(a));return{x:n.left+l.scrollLeft-i.x,y:n.top+l.scrollTop-i.y,width:n.width,height:n.height}}function it(e){return P(e)==="html"?e:e.assignedSlot||e.parentNode||(Pe(e)?e.host:null)||Q(e)}function Ke(e){return R(e)&&getComputedStyle(e).position!=="fixed"?e.offsetParent:null}function Oe(e){let t=M(e),o=Ke(e);for(;o&&Wt(o)&&getComputedStyle(o).position==="static";)o=Ke(o);return o&&(P(o)==="html"||P(o)==="body"&&getComputedStyle(o).position==="static"&&!Je(o))?t:o||function(r){let a=it(r);for(Pe(a)&&(a=a.host);R(a)&&!["html","body"].includes(P(a));){if(Je(a))return a;a=a.parentNode}return null}(e)||t}function Ye(e){if(R(e))return{width:e.offsetWidth,height:e.offsetHeight};let t=I(e);return{width:t.width,height:t.height}}function nt(e){let t=it(e);return["html","body","#document"].includes(P(t))?e.ownerDocument.body:R(t)&&be(t)?t:nt(t)}function lt(e,t){var o;t===void 0&&(t=[]);let r=nt(e),a=r===((o=e.ownerDocument)==null?void 0:o.body),n=M(r),l=a?[n].concat(n.visualViewport||[],be(r)?r:[]):r,i=t.concat(l);return a?i:i.concat(lt(l))}function Ze(e,t,o){return t==="viewport"?X(function(r,a){let n=M(r),l=Q(r),i=n.visualViewport,c=l.clientWidth,p=l.clientHeight,g=0,b=0;if(i){c=i.width,p=i.height;let x=ot();(x||!x&&a==="fixed")&&(g=i.offsetLeft,b=i.offsetTop)}return{width:c,height:p,x:g,y:b}}(e,o)):z(t)?function(r,a){let n=I(r,!1,a==="fixed"),l=n.top+r.clientTop,i=n.left+r.clientLeft;return{top:l,left:i,x:i,y:l,right:i+r.clientWidth,bottom:l+r.clientHeight,width:r.clientWidth,height:r.clientHeight}}(t,o):X(function(r){var a;let n=Q(r),l=pe(r),i=(a=r.ownerDocument)==null?void 0:a.body,c=Z(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),p=Z(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),g=-l.scrollLeft+rt(r),b=-l.scrollTop;return ee(i||n).direction==="rtl"&&(g+=Z(n.clientWidth,i?i.clientWidth:0)-c),{width:c,height:p,x:g,y:b}}(Q(e)))}function Jt(e){let t=lt(e),o=["absolute","fixed"].includes(ee(e).position)&&R(e)?Oe(e):e;return z(o)?t.filter(r=>z(r)&&function(a,n){let l=n.getRootNode==null?void 0:n.getRootNode();if(a.contains(n))return!0;if(l&&Pe(l)){let i=n;do{if(i&&a===i)return!0;i=i.parentNode||i.host}while(i)}return!1}(r,o)&&P(r)!=="body"):[]}var Xt={getClippingRect:function(e){let{element:t,boundary:o,rootBoundary:r,strategy:a}=e,n=[...o==="clippingAncestors"?Jt(t):[].concat(o),r],l=n[0],i=n.reduce((c,p)=>{let g=Ze(t,p,a);return c.top=Z(g.top,c.top),c.right=Xe(g.right,c.right),c.bottom=Xe(g.bottom,c.bottom),c.left=Z(g.left,c.left),c},Ze(t,l,a));return{width:i.right-i.left,height:i.bottom-i.top,x:i.left,y:i.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:o,strategy:r}=e,a=R(o),n=Q(o);if(o===n)return t;let l={scrollLeft:0,scrollTop:0},i={x:0,y:0};if((a||!a&&r!=="fixed")&&((P(o)!=="body"||be(n))&&(l=pe(o)),R(o))){let c=I(o,!0);i.x=c.x+o.clientLeft,i.y=c.y+o.clientTop}return O(S({},t),{x:t.x-l.scrollLeft+i.x,y:t.y-l.scrollTop+i.y})},isElement:z,getDimensions:Ye,getOffsetParent:Oe,getDocumentElement:Q,getElementRects:e=>{let{reference:t,floating:o,strategy:r}=e;return{reference:Gt(t,Oe(o),r),floating:O(S({},Ye(o)),{x:0,y:0})}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>ee(e).direction==="rtl"};var at=(e,t,o)=>We(e,t,S({platform:Xt},o));var te="top",oe="bottom",ge="left",fe="right",re={[te]:oe,[oe]:te,[ge]:fe,[fe]:ge},Fo={[te]:"\u2191",[oe]:"\u2193",[ge]:"\u2190",[fe]:"\u2192"};var st={[ge]:-45,[te]:45,[fe]:135,[oe]:-135},ct="calc(50% - 7px)",Kt=e=>[te,oe].includes(e);function Yt({actualDirection:e,directionName:t,arrowEl:o}){if(!o)return;e=t;let r=Kt(t);o.style.left=r?ct:"",o.style.top=r?"":ct}async function dt(e){var a,n;if(!e.isShowing)return;if(await((a=e==null?void 0:e.waitForDOM)==null?void 0:a.call(e)),e.isCallout)return Yt(e);let t=await at(e.targetEl,e.attentionEl,{placement:e.directionName,middleware:[Re(),Te(8),Ae({padding:16}),Ce({element:e.noArrow?void 0:e.arrowEl})]});e.actualDirection=t.placement,Object.assign(((n=e.attentionEl)==null?void 0:n.style)||{},{left:"0",top:"0",transform:`translate3d(${Math.round(t.x)}px, ${Math.round(t.y)}px, 0)`});let{x:o,y:r}=t.middlewareData.arrow;e.arrowEl&&(e.arrowEl.style.left=o?o+"px":"",e.arrowEl.style.top=r?r+"px":"")}var mt=Mt(gt(),1);var B=e=>typeof e=="string",ao=e=>typeof e=="function",ft=new Map;function Ne(e){return[...Array.isArray(e)?e:[e],"en"]}function xt(e,t,o){let r=Ne(e);return me(()=>xe("date",r,o),()=>new Intl.DateTimeFormat(r,o)).format(B(t)?new Date(t):t)}function Me(e,t,o){let r=Ne(e);return me(()=>xe("number",r,o),()=>new Intl.NumberFormat(r,o)).format(t)}function ht(e,t,o,n){var l=n,{offset:r=0}=l,a=J(l,["offset"]);var p,g;let i=Ne(e),c=t?me(()=>xe("plural-ordinal",i),()=>new Intl.PluralRules(i,{type:"ordinal"})):me(()=>xe("plural-cardinal",i),()=>new Intl.PluralRules(i,{type:"cardinal"}));return(g=(p=a[o])!=null?p:a[c.select(o-r)])!=null?g:a.other}function me(e,t){let o=e(),r=ft.get(o);return r||(r=t(),ft.set(o,r)),r}function xe(e,t,o){let r=t.join("-");return`${e}-${r}-${JSON.stringify(o)}`}var $t=/\\u[a-fA-F0-9]{4}|\\x[a-fA-F0-9]{2}/g,co=(e,t,o={})=>{t=t||e;let r=n=>B(n)?o[n]||{style:n}:n,a=(n,l)=>{let i=Object.keys(o).length?r("number"):{},c=Me(t,n,i);return l.replace("#",c)};return{plural:(n,l)=>{let{offset:i=0}=l,c=ht(t,!1,n,l);return a(n-i,c)},selectordinal:(n,l)=>{let{offset:i=0}=l,c=ht(t,!0,n,l);return a(n-i,c)},select:(n,l)=>{var i;return(i=l[n])!=null?i:l.other},number:(n,l)=>Me(t,n,r(l)),date:(n,l)=>xt(t,n,r(l)),undefined:n=>n}};function so(e,t,o){return(r,a={})=>{let n=co(t,o,a),l=c=>Array.isArray(c)?c.reduce((p,g)=>{if(B(g))return p+g;let[b,x,f]=g,m={};f!=null&&!B(f)?Object.keys(f).forEach(y=>{m[y]=l(f[y])}):m=f;let $=n[x](r[b],m);return $==null?p:p+$},""):c,i=l(e);return B(i)&&$t.test(i)?(0,mt.default)(i.trim()):B(i)?i.trim():i}}var uo=Object.defineProperty,bo=(e,t,o)=>t in e?uo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,po=(e,t,o)=>(bo(e,typeof t!="symbol"?t+"":t,o),o),He=class{constructor(){po(this,"_events",{})}on(t,o){return this._hasEvent(t)||(this._events[t]=[]),this._events[t].push(o),()=>this.removeListener(t,o)}removeListener(t,o){if(!this._hasEvent(t))return;let r=this._events[t].indexOf(o);~r&&this._events[t].splice(r,1)}emit(t,...o){this._hasEvent(t)&&this._events[t].map(r=>r.apply(this,o))}_hasEvent(t){return Array.isArray(this._events[t])}},go=Object.defineProperty,fo=(e,t,o)=>t in e?go(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,F=(e,t,o)=>(fo(e,typeof t!="symbol"?t+"":t,o),o),Be=class extends He{constructor(t){super(),F(this,"_locale"),F(this,"_locales"),F(this,"_localeData"),F(this,"_messages"),F(this,"_missing"),F(this,"t",this._.bind(this)),this._messages={},this._localeData={},t.missing!=null&&(this._missing=t.missing),t.messages!=null&&this.load(t.messages),t.localeData!=null&&this.loadLocaleData(t.localeData),(t.locale!=null||t.locales!=null)&&this.activate(t.locale,t.locales)}get locale(){return this._locale}get locales(){return this._locales}get messages(){var t;return(t=this._messages[this._locale])!=null?t:{}}get localeData(){var t;return(t=this._localeData[this._locale])!=null?t:{}}_loadLocaleData(t,o){this._localeData[t]==null?this._localeData[t]=o:Object.assign(this._localeData[t],o)}loadLocaleData(t,o){o!=null?this._loadLocaleData(t,o):Object.keys(t).forEach(r=>this._loadLocaleData(r,t[r])),this.emit("change")}_load(t,o){this._messages[t]==null?this._messages[t]=o:Object.assign(this._messages[t],o)}load(t,o){o!=null?this._load(t,o):Object.keys(t).forEach(r=>this._load(r,t[r])),this.emit("change")}loadAndActivate({locale:t,locales:o,messages:r}){this._locale=t,this._locales=o||void 0,this._messages[this._locale]=r,this.emit("change")}activate(t,o){this._locale=t,this._locales=o,this.emit("change")}_(t,o={},{message:r,formats:a}={}){B(t)||(o=t.values||o,r=t.message,t=t.id);let n=!this.messages[t],l=this._missing;if(l&&n)return ao(l)?l(this._locale,t):l;n&&this.emit("missing",{id:t,locale:this._locale});let i=this.messages[t]||r||t;return B(i)&&$t.test(i)?JSON.parse(`"${i}"`):B(i)?i:so(i,this._locale,this._locales)(o,a)}date(t,o){return xt(this._locales||this._locale,t,o)}number(t,o){return Me(this._locales||this._locale,t,o)}};function ho(e={}){return new Be(e)}var C=ho();var vt=JSON.parse('{"attention.aria.callout":"callout speech bubble","attention.aria.highlight":"highlighted speech bubble","attention.aria.pointingDown":"pointing down","attention.aria.pointingLeft":"pointing left","attention.aria.pointingRight":"pointing right","attention.aria.pointingUp":"pointing up","attention.aria.popover":"popover speech bubble","attention.aria.tooltip":"tooltip"}');var yt=JSON.parse('{"attention.aria.callout":"callout speech bubble","attention.aria.highlight":"highlighted speech bubble","attention.aria.pointingDown":"pointing down","attention.aria.pointingLeft":"pointing left","attention.aria.pointingRight":"pointing right","attention.aria.pointingUp":"pointing up","attention.aria.popover":"popover speech bubble","attention.aria.tooltip":"tooltip"}');var wt=JSON.parse('{"attention.aria.callout":"callout speech bubble","attention.aria.highlight":"highlighted speech bubble","attention.aria.pointingDown":"pointing down","attention.aria.pointingLeft":"pointing left","attention.aria.pointingRight":"pointing right","attention.aria.pointingUp":"pointing up","attention.aria.popover":"popover speech bubble","attention.aria.tooltip":"tooltip"}');var mo=["en","nb","fi"],_t="en",kt=e=>mo.find(t=>e===t||e.toLowerCase().includes(t))||_t;function xo(){if(typeof window=="undefined"){let e=process.env.NMP_LANGUAGE||Intl.DateTimeFormat().resolvedOptions().locale;return kt(e)}try{let e=document.documentElement.lang;return kt(e)}catch(e){return console.warn("could not detect locale, falling back to source locale",e),_t}}var $o=(e,t,o,r)=>e==="nb"?o:e==="fi"?r:t,Dt=(e,t,o)=>{let r=xo(),a=$o(r,e,t,o);C.load(r,a),C.activate(r)};var ie=class extends Ue(Lt){constructor(){super(),Dt(vt,yt,wt),this.show=!1,this.tooltip=!1,this.callout=!1,this.popover=!1,this.highlight=!1,this.noArrow=!1}connectedCallback(){if(super.connectedCallback(),!this.placement||!Object.keys(re).includes(this.placement))throw new Error(`Invalid "placement" attribute. Set its value to one of the following:
3
+ ${JSON.stringify(Object.keys(re))}`);setTimeout(()=>this.requestUpdate(),0)}get _actualDirection(){return this.placement}set _actualDirection(t){this.placement=t}get _arrowDirection(){return re[this.placement]}updated(){this.callout||this._attentionEl.style.setProperty("--attention-visibility",this.show?"":"hidden"),this.tooltip||this._attentionEl.style.setProperty("--attention-display",this.show?"block":"none"),this.attentionState={isShowing:this.show,isCallout:this.callout,actualDirection:this._actualDirection,directionName:this.placement,arrowEl:this.renderRoot.querySelector("#arrow"),attentionEl:this._attentionEl,targetEl:this._targetEl,noArrow:this.noArrow},dt(this.attentionState)}pointingAtDirection(){switch(re[this._actualDirection]){case"top":return C._({id:"attention.aria.pointingUp",message:"pointing up",comment:"Default screenreader message for top direction in the attention component"});case"right":return C._({id:"attention.aria.pointingRight",message:"pointing right",comment:"Default screenreader message for right direction in the attention component"});case"bottom":return C._({id:"attention.aria.pointingDown",message:"pointing down",comment:"Default screenreader message for bottom direction in the attention component"});case"left":return C._({id:"attention.aria.pointingLeft",message:"pointing left",comment:"Default screenreader message for left direction in the attention component"});default:return""}}activeAttentionType(){switch(!0){case this.tooltip:return C._({id:"attention.aria.tooltip",message:"tooltip",comment:"Default screenreader message for tooltip in the attention component"});case this.callout:return C._({id:"attention.aria.callout",message:"callout speech bubble",comment:"Default screenreader message for callout speech bubble in the attention component"});case this.popover:return C._({id:"attention.aria.popover",message:"popover speech bubble",comment:"Default screenreader message for popover speech bubble in the attention component"});case this.highlight:return C._({id:"attention.aria.highlight",message:"highlighted speech bubble",comment:"Default screenreader message for highlighted speech bubble in the attention component"});default:return""}}defaultAriaLabel(){return`${this.activeAttentionType()} ${this.noArrow?"":this.pointingAtDirection()}`}setAriaLabels(){if(this._targetEl&&!this._targetEl.getAttribute("aria-details")){let t=this._messageEl.id||(this._messageEl.id=je());this._targetEl.setAttribute("aria-details",t)}}get _activeVariantClasses(){let t={callout:this.callout,popover:this.popover,tooltip:this.tooltip,highlight:this.highlight},o=Object.keys(t).find(r=>!!t[r])||"";return{wrapper:j[o],arrow:j[`arrow${o.charAt(0).toUpperCase()+o.slice(1)}`]}}firstUpdated(){this.setAriaLabels(),this.callout&&(this._attentionEl.style.position="relative")}get _attentionEl(){return this.renderRoot.querySelector("#attention")}get _targetEl(){return this.renderRoot.querySelector("slot[name='target']").assignedNodes()[0]}get _messageEl(){return this.renderRoot.querySelector("slot[name='message']").assignedNodes()[0]}get _wrapperClasses(){return _e({[j.base]:!0,[this._activeVariantClasses.wrapper]:!0})}get _arrowClasses(){return _e({[j.arrowBase]:!0,[j[`arrowDirection${this._arrowDirection.charAt(0).toUpperCase()+this._arrowDirection.slice(1)}`]]:!0,[this._activeVariantClasses.arrow]:!0})}get _arrowHtml(){return this.noArrow?"":$e`<div
4
4
  id="arrow"
5
5
  role="img"
6
6
  class="${this._arrowClasses}"