@warp-ds/elements 2.10.0-next.7 → 2.10.0-next.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/custom-elements.json +10 -4
- package/dist/docs/icon/api.md +8 -2
- package/dist/docs/icon/icon.md +8 -2
- package/dist/packages/affix/affix.js +4 -4
- package/dist/packages/affix/affix.js.map +2 -2
- package/dist/packages/alert/alert.js +2 -2
- package/dist/packages/alert/alert.js.map +2 -2
- package/dist/packages/attention/attention.js +5 -5
- package/dist/packages/attention/attention.js.map +2 -2
- package/dist/packages/datepicker/datepicker.js.map +2 -2
- package/dist/packages/expandable/expandable.js +4 -4
- package/dist/packages/expandable/expandable.js.map +2 -2
- package/dist/packages/icon/icon.d.ts +3 -1
- package/dist/packages/icon/icon.js +2 -2
- package/dist/packages/icon/icon.js.map +2 -2
- package/dist/packages/modal-header/modal-header.js +1 -1
- package/dist/packages/modal-header/modal-header.js.map +2 -2
- package/dist/packages/pagination/pagination.js +1 -1
- package/dist/packages/pagination/pagination.js.map +2 -2
- package/dist/packages/pill/pill.js +2 -2
- package/dist/packages/pill/pill.js.map +2 -2
- package/dist/packages/select/select.js +4 -4
- package/dist/packages/select/select.js.map +2 -2
- package/dist/packages/step/step.js +3 -3
- package/dist/packages/step/step.js.map +2 -2
- package/dist/packages/toast/toast.js +3 -3
- package/dist/packages/toast/toast.js.map +2 -2
- package/dist/web-types.json +3 -3
- package/package.json +1 -1
|
@@ -6,7 +6,7 @@ That means you use raw catalog or your catalog doesn't have a translation for th
|
|
|
6
6
|
ICU features such as interpolation and plurals will not work properly for that message.
|
|
7
7
|
|
|
8
8
|
Please compile your catalog first.
|
|
9
|
-
`)),oe(l)&&Dt.test(l)?Lt(l):oe(l)?l:Jr(l,this._locale,this._locales)(r,o==null?void 0:o.formats)}date(t,r){return at(this._locales||this._locale,t,r)}number(t,r){return rt(this._locales||this._locale,t,r)}};function oo(e={}){return new nt(e)}var D=oo();var Pt=["top","right","bottom","left"];var ee=Math.min,B=Math.max,we=Math.round;var G=e=>({x:e,y:e}),no={left:"right",right:"left",bottom:"top",top:"bottom"};function Le(e,t,r){return B(e,ee(t,r))}function ne(e,t){return typeof e=="function"?e(t):e}function te(e){return e.split("-")[0]}function le(e){return e.split("-")[1]}function st(e){return e==="x"?"y":"x"}function Re(e){return e==="y"?"height":"width"}function J(e){let t=e[0];return t==="t"||t==="b"?"y":"x"}function Te(e){return st(J(e))}function $t(e,t,r){r===void 0&&(r=!1);let o=le(e),n=Te(e),a=Re(n),i=n==="x"?o===(r?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(i=ve(i)),[i,ve(i)]}function Ft(e){let t=ve(e);return[De(e),t,De(t)]}function De(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}var Tt=["left","right"],Mt=["right","left"],io=["top","bottom"],ao=["bottom","top"];function so(e,t,r){switch(e){case"top":case"bottom":return r?t?Mt:Tt:t?Tt:Mt;case"left":case"right":return t?io:ao;default:return[]}}function jt(e,t,r,o){let n=le(e),a=so(te(e),r==="start",o);return n&&(a=a.map(i=>i+"-"+n),t&&(a=a.concat(a.map(De)))),a}function ve(e){let t=te(e);return no[t]+e.slice(t.length)}function lo(e){return{top:0,right:0,bottom:0,left:0,...e}}function lt(e){return typeof e!="number"?lo(e):{top:e,right:e,bottom:e,left:e}}function ce(e){let{x:t,y:r,width:o,height:n}=e;return{width:o,height:n,top:r,left:t,right:t+o,bottom:r+n,x:t,y:r}}function Vt(e,t,r){let{reference:o,floating:n}=e,a=J(t),i=Te(t),s=Re(i),l=te(t),u=a==="y",c=o.x+o.width/2-n.width/2,g=o.y+o.height/2-n.height/2,p=o[s]/2-n[s]/2,d;switch(l){case"top":d={x:c,y:o.y-n.height};break;case"bottom":d={x:c,y:o.y+o.height};break;case"right":d={x:o.x+o.width,y:g};break;case"left":d={x:o.x-n.width,y:g};break;default:d={x:o.x,y:o.y}}switch(le(t)){case"start":d[i]-=p*(r&&u?-1:1);break;case"end":d[i]+=p*(r&&u?-1:1);break}return d}async function It(e,t){var r;t===void 0&&(t={});let{x:o,y:n,platform:a,rects:i,elements:s,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:g="floating",altBoundary:p=!1,padding:d=0}=ne(t,e),m=lt(d),v=s[p?g==="floating"?"reference":"floating":g],x=ce(await a.getClippingRect({element:(r=await(a.isElement==null?void 0:a.isElement(v)))==null||r?v:v.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(s.floating)),boundary:u,rootBoundary:c,strategy:l})),y=g==="floating"?{x:o,y:n,width:i.floating.width,height:i.floating.height}:i.reference,k=await(a.getOffsetParent==null?void 0:a.getOffsetParent(s.floating)),z=await(a.isElement==null?void 0:a.isElement(k))?await(a.getScale==null?void 0:a.getScale(k))||{x:1,y:1}:{x:1,y:1},R=ce(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:y,offsetParent:k,strategy:l}):y);return{top:(x.top-R.top+m.top)/z.y,bottom:(R.bottom-x.bottom+m.bottom)/z.y,left:(x.left-R.left+m.left)/z.x,right:(R.right-x.right+m.right)/z.x}}var co=50,Ht=async(e,t,r)=>{let{placement:o="bottom",strategy:n="absolute",middleware:a=[],platform:i}=r,s=i.detectOverflow?i:{...i,detectOverflow:It},l=await(i.isRTL==null?void 0:i.isRTL(t)),u=await i.getElementRects({reference:e,floating:t,strategy:n}),{x:c,y:g}=Vt(u,o,l),p=o,d=0,m={};for(let f=0;f<a.length;f++){let v=a[f];if(!v)continue;let{name:x,fn:y}=v,{x:k,y:z,data:R,reset:b}=await y({x:c,y:g,initialPlacement:o,placement:p,strategy:n,middlewareData:m,rects:u,platform:s,elements:{reference:e,floating:t}});c=k!=null?k:c,g=z!=null?z:g,m[x]={...m[x],...R},b&&d<co&&(d++,typeof b=="object"&&(b.placement&&(p=b.placement),b.rects&&(u=b.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:n}):b.rects),{x:c,y:g}=Vt(u,p,l)),f=-1)}return{x:c,y:g,placement:p,strategy:n,middlewareData:m}},Yt=e=>({name:"arrow",options:e,async fn(t){let{x:r,y:o,placement:n,rects:a,platform:i,elements:s,middlewareData:l}=t,{element:u,padding:c=0}=ne(e,t)||{};if(u==null)return{};let g=lt(c),p={x:r,y:o},d=Te(n),m=Re(d),f=await i.getDimensions(u),v=d==="y",x=v?"top":"left",y=v?"bottom":"right",k=v?"clientHeight":"clientWidth",z=a.reference[m]+a.reference[d]-p[d]-a.floating[m],R=p[d]-a.reference[d],b=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u)),w=b?b[k]:0;(!w||!await(i.isElement==null?void 0:i.isElement(b)))&&(w=s.floating[k]||a.floating[m]);let _=z/2-R/2,C=w/2-f[m]/2-1,A=ee(g[x],C),V=ee(g[y],C),j=A,N=w-f[m]-V,M=w/2-f[m]/2+_,L=Le(j,M,N),H=!l.arrow&&le(n)!=null&&M!==L&&a.reference[m]/2-(M<j?A:V)-f[m]/2<0,P=H?M<j?M-j:M-N:0;return{[d]:p[d]+P,data:{[d]:L,centerOffset:M-L-P,...H&&{alignmentOffset:P}},reset:H}}});var Xt=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,o;let{placement:n,middlewareData:a,rects:i,initialPlacement:s,platform:l,elements:u}=t,{mainAxis:c=!0,crossAxis:g=!0,fallbackPlacements:p,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:f=!0,...v}=ne(e,t);if((r=a.arrow)!=null&&r.alignmentOffset)return{};let x=te(n),y=J(s),k=te(s)===s,z=await(l.isRTL==null?void 0:l.isRTL(u.floating)),R=p||(k||!f?[ve(s)]:Ft(s)),b=m!=="none";!p&&b&&R.push(...jt(s,f,m,z));let w=[s,...R],_=await l.detectOverflow(t,v),C=[],A=((o=a.flip)==null?void 0:o.overflows)||[];if(c&&C.push(_[x]),g){let M=$t(n,i,z);C.push(_[M[0]],_[M[1]])}if(A=[...A,{placement:n,overflows:C}],!C.every(M=>M<=0)){var V,j;let M=(((V=a.flip)==null?void 0:V.index)||0)+1,L=w[M];if(L&&(!(g==="alignment"?y!==J(L):!1)||A.every(q=>J(q.placement)===y?q.overflows[0]>0:!0)))return{data:{index:M,overflows:A},reset:{placement:L}};let H=(j=A.filter(P=>P.overflows[0]<=0).sort((P,q)=>P.overflows[1]-q.overflows[1])[0])==null?void 0:j.placement;if(!H)switch(d){case"bestFit":{var N;let P=(N=A.filter(q=>{if(b){let U=J(q.placement);return U===y||U==="y"}return!0}).map(q=>[q.placement,q.overflows.filter(U=>U>0).reduce((U,Yr)=>U+Yr,0)]).sort((q,U)=>q[1]-U[1])[0])==null?void 0:N[0];P&&(H=P);break}case"initialPlacement":H=s;break}if(n!==H)return{reset:{placement:H}}}return{}}}};function Nt(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Bt(e){return Pt.some(t=>e[t]>=0)}var qt=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){let{rects:r,platform:o}=t,{strategy:n="referenceHidden",...a}=ne(e,t);switch(n){case"referenceHidden":{let i=await o.detectOverflow(t,{...a,elementContext:"reference"}),s=Nt(i,r.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:Bt(s)}}}case"escaped":{let i=await o.detectOverflow(t,{...a,altBoundary:!0}),s=Nt(i,r.floating);return{data:{escapedOffsets:s,escaped:Bt(s)}}}default:return{}}}}};var uo=new Set(["left","top"]);async function go(e,t){let{placement:r,platform:o,elements:n}=e,a=await(o.isRTL==null?void 0:o.isRTL(n.floating)),i=te(r),s=le(r),l=J(r)==="y",u=uo.has(i)?-1:1,c=a&&l?-1:1,g=ne(t,e),{mainAxis:p,crossAxis:d,alignmentAxis:m}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:g.mainAxis||0,crossAxis:g.crossAxis||0,alignmentAxis:g.alignmentAxis};return s&&typeof m=="number"&&(d=s==="end"?m*-1:m),l?{x:d*c,y:p*u}:{x:p*u,y:d*c}}var Ut=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,o;let{x:n,y:a,placement:i,middlewareData:s}=t,l=await go(t,e);return i===((r=s.offset)==null?void 0:r.placement)&&(o=s.arrow)!=null&&o.alignmentOffset?{}:{x:n+l.x,y:a+l.y,data:{...l,placement:i}}}}},Qt=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:r,y:o,placement:n,platform:a}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:l={fn:x=>{let{x:y,y:k}=x;return{x:y,y:k}}},...u}=ne(e,t),c={x:r,y:o},g=await a.detectOverflow(t,u),p=J(te(n)),d=st(p),m=c[d],f=c[p];if(i){let x=d==="y"?"top":"left",y=d==="y"?"bottom":"right",k=m+g[x],z=m-g[y];m=Le(k,m,z)}if(s){let x=p==="y"?"top":"left",y=p==="y"?"bottom":"right",k=f+g[x],z=f-g[y];f=Le(k,f,z)}let v=l.fn({...t,[d]:m,[p]:f});return{...v,data:{x:v.x-r,y:v.y-o,enabled:{[d]:i,[p]:s}}}}}};var Zt=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,o;let{placement:n,rects:a,platform:i,elements:s}=t,{apply:l=()=>{},...u}=ne(e,t),c=await i.detectOverflow(t,u),g=te(n),p=le(n),d=J(n)==="y",{width:m,height:f}=a.floating,v,x;g==="top"||g==="bottom"?(v=g,x=p===(await(i.isRTL==null?void 0:i.isRTL(s.floating))?"start":"end")?"left":"right"):(x=g,v=p==="end"?"top":"bottom");let y=f-c.top-c.bottom,k=m-c.left-c.right,z=ee(f-c[v],y),R=ee(m-c[x],k),b=!t.middlewareData.shift,w=z,_=R;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(_=k),(o=t.middlewareData.shift)!=null&&o.enabled.y&&(w=y),b&&!p){let A=B(c.left,0),V=B(c.right,0),j=B(c.top,0),N=B(c.bottom,0);d?_=m-2*(A!==0||V!==0?A+V:B(c.left,c.right)):w=f-2*(j!==0||N!==0?j+N:B(c.top,c.bottom))}await l({...t,availableWidth:_,availableHeight:w});let C=await i.getDimensions(s.floating);return m!==C.width||f!==C.height?{reset:{rects:!0}}:{}}}};function Pe(){return typeof window!="undefined"}function ue(e){return Jt(e)?(e.nodeName||"").toLowerCase():"#document"}function I(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function K(e){var t;return(t=(Jt(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Jt(e){return Pe()?e instanceof Node||e instanceof I(e).Node:!1}function Q(e){return Pe()?e instanceof Element||e instanceof I(e).Element:!1}function W(e){return Pe()?e instanceof HTMLElement||e instanceof I(e).HTMLElement:!1}function Gt(e){return!Pe()||typeof ShadowRoot=="undefined"?!1:e instanceof ShadowRoot||e instanceof I(e).ShadowRoot}function me(e){let{overflow:t,overflowX:r,overflowY:o,display:n}=Z(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+r)&&n!=="inline"&&n!=="contents"}function Kt(e){return/^(table|td|th)$/.test(ue(e))}function xe(e){try{if(e.matches(":popover-open"))return!0}catch(t){}try{return e.matches(":modal")}catch(t){return!1}}var po=/transform|translate|scale|rotate|perspective|filter/,mo=/paint|layout|strict|content/,de=e=>!!e&&e!=="none",ct;function $e(e){let t=Q(e)?Z(e):e;return de(t.transform)||de(t.translate)||de(t.scale)||de(t.rotate)||de(t.perspective)||!Fe()&&(de(t.backdropFilter)||de(t.filter))||po.test(t.willChange||"")||mo.test(t.contain||"")}function Wt(e){let t=re(e);for(;W(t)&&!ge(t);){if($e(t))return t;if(xe(t))return null;t=re(t)}return null}function Fe(){return ct==null&&(ct=typeof CSS!="undefined"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),ct}function ge(e){return/^(html|body|#document)$/.test(ue(e))}function Z(e){return I(e).getComputedStyle(e)}function ye(e){return Q(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function re(e){if(ue(e)==="html")return e;let t=e.assignedSlot||e.parentNode||Gt(e)&&e.host||K(e);return Gt(t)?t.host:t}function er(e){let t=re(e);return ge(t)?e.ownerDocument?e.ownerDocument.body:e.body:W(t)&&me(t)?t:er(t)}function Me(e,t,r){var o;t===void 0&&(t=[]),r===void 0&&(r=!0);let n=er(e),a=n===((o=e.ownerDocument)==null?void 0:o.body),i=I(n);if(a){let s=je(i);return t.concat(i,i.visualViewport||[],me(n)?n:[],s&&r?Me(s):[])}else return t.concat(n,Me(n,[],r))}function je(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function nr(e){let t=Z(e),r=parseFloat(t.width)||0,o=parseFloat(t.height)||0,n=W(e),a=n?e.offsetWidth:r,i=n?e.offsetHeight:o,s=we(r)!==a||we(o)!==i;return s&&(r=a,o=i),{width:r,height:o,$:s}}function ir(e){return Q(e)?e:e.contextElement}function be(e){let t=ir(e);if(!W(t))return G(1);let r=t.getBoundingClientRect(),{width:o,height:n,$:a}=nr(t),i=(a?we(r.width):r.width)/o,s=(a?we(r.height):r.height)/n;return(!i||!Number.isFinite(i))&&(i=1),(!s||!Number.isFinite(s))&&(s=1),{x:i,y:s}}var bo=G(0);function ar(e){let t=I(e);return!Fe()||!t.visualViewport?bo:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function ho(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==I(e)?!1:t}function ke(e,t,r,o){t===void 0&&(t=!1),r===void 0&&(r=!1);let n=e.getBoundingClientRect(),a=ir(e),i=G(1);t&&(o?Q(o)&&(i=be(o)):i=be(e));let s=ho(a,r,o)?ar(a):G(0),l=(n.left+s.x)/i.x,u=(n.top+s.y)/i.y,c=n.width/i.x,g=n.height/i.y;if(a){let p=I(a),d=o&&Q(o)?I(o):o,m=p,f=je(m);for(;f&&o&&d!==m;){let v=be(f),x=f.getBoundingClientRect(),y=Z(f),k=x.left+(f.clientLeft+parseFloat(y.paddingLeft))*v.x,z=x.top+(f.clientTop+parseFloat(y.paddingTop))*v.y;l*=v.x,u*=v.y,c*=v.x,g*=v.y,l+=k,u+=z,m=I(f),f=je(m)}}return ce({width:c,height:g,x:l,y:u})}function Ve(e,t){let r=ye(e).scrollLeft;return t?t.left+r:ke(K(e)).left+r}function sr(e,t){let r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-Ve(e,r),n=r.top+t.scrollTop;return{x:o,y:n}}function fo(e){let{elements:t,rect:r,offsetParent:o,strategy:n}=e,a=n==="fixed",i=K(o),s=t?xe(t.floating):!1;if(o===i||s&&a)return r;let l={scrollLeft:0,scrollTop:0},u=G(1),c=G(0),g=W(o);if((g||!g&&!a)&&((ue(o)!=="body"||me(i))&&(l=ye(o)),g)){let d=ke(o);u=be(o),c.x=d.x+o.clientLeft,c.y=d.y+o.clientTop}let p=i&&!g&&!a?sr(i,l):G(0);return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-l.scrollLeft*u.x+c.x+p.x,y:r.y*u.y-l.scrollTop*u.y+c.y+p.y}}function vo(e){return Array.from(e.getClientRects())}function wo(e){let t=K(e),r=ye(e),o=e.ownerDocument.body,n=B(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),a=B(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight),i=-r.scrollLeft+Ve(e),s=-r.scrollTop;return Z(o).direction==="rtl"&&(i+=B(t.clientWidth,o.clientWidth)-n),{width:n,height:a,x:i,y:s}}var tr=25;function xo(e,t){let r=I(e),o=K(e),n=r.visualViewport,a=o.clientWidth,i=o.clientHeight,s=0,l=0;if(n){a=n.width,i=n.height;let c=Fe();(!c||c&&t==="fixed")&&(s=n.offsetLeft,l=n.offsetTop)}let u=Ve(o);if(u<=0){let c=o.ownerDocument,g=c.body,p=getComputedStyle(g),d=c.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,m=Math.abs(o.clientWidth-g.clientWidth-d);m<=tr&&(a-=m)}else u<=tr&&(a+=u);return{width:a,height:i,x:s,y:l}}function yo(e,t){let r=ke(e,!0,t==="fixed"),o=r.top+e.clientTop,n=r.left+e.clientLeft,a=W(e)?be(e):G(1),i=e.clientWidth*a.x,s=e.clientHeight*a.y,l=n*a.x,u=o*a.y;return{width:i,height:s,x:l,y:u}}function rr(e,t,r){let o;if(t==="viewport")o=xo(e,r);else if(t==="document")o=wo(K(e));else if(Q(t))o=yo(t,r);else{let n=ar(e);o={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return ce(o)}function lr(e,t){let r=re(e);return r===t||!Q(r)||ge(r)?!1:Z(r).position==="fixed"||lr(r,t)}function ko(e,t){let r=t.get(e);if(r)return r;let o=Me(e,[],!1).filter(s=>Q(s)&&ue(s)!=="body"),n=null,a=Z(e).position==="fixed",i=a?re(e):e;for(;Q(i)&&!ge(i);){let s=Z(i),l=$e(i);!l&&s.position==="fixed"&&(n=null),(a?!l&&!n:!l&&s.position==="static"&&!!n&&(n.position==="absolute"||n.position==="fixed")||me(i)&&!l&&lr(e,i))?o=o.filter(c=>c!==i):n=s,i=re(i)}return t.set(e,o),o}function _o(e){let{element:t,boundary:r,rootBoundary:o,strategy:n}=e,i=[...r==="clippingAncestors"?xe(t)?[]:ko(t,this._c):[].concat(r),o],s=rr(t,i[0],n),l=s.top,u=s.right,c=s.bottom,g=s.left;for(let p=1;p<i.length;p++){let d=rr(t,i[p],n);l=B(d.top,l),u=ee(d.right,u),c=ee(d.bottom,c),g=B(d.left,g)}return{width:u-g,height:c-l,x:g,y:l}}function Eo(e){let{width:t,height:r}=nr(e);return{width:t,height:r}}function Co(e,t,r){let o=W(t),n=K(t),a=r==="fixed",i=ke(e,!0,a,t),s={scrollLeft:0,scrollTop:0},l=G(0);function u(){l.x=Ve(n)}if(o||!o&&!a)if((ue(t)!=="body"||me(n))&&(s=ye(t)),o){let d=ke(t,!0,a,t);l.x=d.x+t.clientLeft,l.y=d.y+t.clientTop}else n&&u();a&&!o&&n&&u();let c=n&&!o&&!a?sr(n,s):G(0),g=i.left+s.scrollLeft-l.x-c.x,p=i.top+s.scrollTop-l.y-c.y;return{x:g,y:p,width:i.width,height:i.height}}function dt(e){return Z(e).position==="static"}function or(e,t){if(!W(e)||Z(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return K(e)===r&&(r=r.ownerDocument.body),r}function cr(e,t){let r=I(e);if(xe(e))return r;if(!W(e)){let n=re(e);for(;n&&!ge(n);){if(Q(n)&&!dt(n))return n;n=re(n)}return r}let o=or(e,t);for(;o&&Kt(o)&&dt(o);)o=or(o,t);return o&&ge(o)&&dt(o)&&!$e(o)?r:o||Wt(e)||r}var So=async function(e){let t=this.getOffsetParent||cr,r=this.getDimensions,o=await r(e.floating);return{reference:Co(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function zo(e){return Z(e).direction==="rtl"}var Ao={convertOffsetParentRelativeRectToViewportRelativeRect:fo,getDocumentElement:K,getClippingRect:_o,getOffsetParent:cr,getElementRects:So,getClientRects:vo,getDimensions:Eo,getScale:be,isElement:Q,isRTL:zo};var dr=Ut;var ur=Qt,gr=Xt,pr=Zt,mr=qt,br=Yt;var hr=(e,t,r)=>{let o=new Map,n={platform:Ao,...r},a={...n.platform,_c:o};return Ht(e,t,{...n,platform:a})};var Be="top-start",Ie="top",He="top-end",Ye="right-start",Xe="right",qe="right-end",Ue="bottom-start",_e="bottom",Qe="bottom-end",Ze="left-start",Ge="left",Je="left-end",ut=[Be,Ie,He,Ye,Xe,qe,Ue,_e,Qe,Ze,Ge,Je],pe={[Be]:Ue,[Ie]:_e,[He]:Qe,[Ue]:Be,[_e]:Ie,[Qe]:He,[Ze]:Ye,[Ge]:Xe,[Je]:qe,[Ye]:Ze,[Xe]:Ge,[qe]:Je},Oo={[Ze]:-45,[Ge]:-45,[Je]:-45,[Be]:45,[Ie]:45,[He]:45,[Ye]:135,[Xe]:135,[qe]:135,[Ue]:-135,[_e]:-135,[Qe]:-135},Do=e=>{let t;return/-/.test(e)?t=e.split("-").map(r=>r.charAt(0).toUpperCase()+r.slice(1)).join(""):t=e.charAt(0).toUpperCase()+e.slice(1),t},Lo=e=>e.split("-")[0],Ro=e=>pe[Lo(e)],vr=e=>pe[e],To=e=>Oo[vr(e)],Mo=(e,t,r)=>{Object.assign(e==null?void 0:e.style,{borderTopLeftRadius:"4px",zIndex:1,[`margin${Do(Ro(r))}`]:"-0.5px",transform:`rotate(${t}deg)`})},fr=8,Ne=24;async function gt(e){var o,n,a;if(!(e!=null&&e.isShowing)||(e!=null&&e.waitForDOM&&await(e==null?void 0:e.waitForDOM()),!(e!=null&&e.targetEl)||!(e!=null&&e.attentionEl)))return;let t=e==null?void 0:e.targetEl,r=e.attentionEl;return hr(t,r,{placement:(o=e==null?void 0:e.directionName)!=null?o:_e,middleware:[dr({mainAxis:(n=e==null?void 0:e.distance)!=null?n:8,crossAxis:(a=e==null?void 0:e.skidding)!=null?a:0}),(e==null?void 0:e.flip)&&gr({crossAxis:e==null?void 0:e.crossAxis,fallbackPlacements:e==null?void 0:e.fallbackPlacements}),(e==null?void 0:e.flip)&&ur({crossAxis:!0}),!(e!=null&&e.noArrow)&&(e==null?void 0:e.arrowEl)&&br({element:e==null?void 0:e.arrowEl}),mr(),pr({apply(){Object.assign(r.style,{paddingRight:`${fr}px`,paddingLeft:`${fr}px`})}})]}).then(({x:i,y:s,middlewareData:l,placement:u})=>{if(e.actualDirection=u,e!=null&&e.isCallout||Object.assign(r.style,{left:`${i}px`,top:`${s}px`}),l!=null&&l.hide&&!(e!=null&&e.isCallout)){let{referenceHidden:c}=l.hide;Object.assign(r.style,{visibility:c?"hidden":""})}if(l!=null&&l.arrow&&(e!=null&&e.arrowEl)){let c=e==null?void 0:e.arrowEl,{x:g,y:p}=l.arrow,d=window.getComputedStyle(r).direction==="rtl",m=vr(u).split("-")[1],f="",v="",x="",y="";if(m==="start"){let k=typeof g=="number"?`calc(${Ne}px - ${c.offsetWidth/2}px)`:"";f=typeof p=="number"?`calc(${Ne}px - ${c.offsetWidth/2}px)`:"",v=d?k:"",y=d?"":k}else if(m==="end"){let k=typeof g=="number"?`calc(${Ne}px - ${c.offsetWidth/2}px)`:"";v=d?"":k,y=d?k:"",x=typeof p=="number"?`calc(${Ne}px - ${c.offsetWidth/2}px)`:""}else y=typeof g=="number"?`${g}px`:"",f=typeof p=="number"?`${p}px`:"";Object.assign(c.style,{top:f,right:v,bottom:x,left:y}),Mo(c,To(u),u)}}),e}import{css as en,html as fe,LitElement as tn,nothing as yt}from"lit";import{property as X}from"lit/decorators.js";import{ifDefined as rn}from"lit/directives/if-defined.js";var Po=["en","nb","fi","da","sv"],pt="en",Ke=e=>Po.find(t=>e===t||e.toLowerCase().includes(t))||pt;function We(){if(typeof window=="undefined"){let e=process.env.NMP_LANGUAGE||Intl.DateTimeFormat().resolvedOptions().locale;return Ke(e)}try{let e=xr(document);if(e)return Ke(e);let t=Vo();if(t)return Ke(t);let r=xr(kr());return r?Ke(r):pt}catch(e){return console.warn("could not detect locale, falling back to source locale",e),pt}}var et=(e,t,r,o,n)=>{D.load("en",e),D.load("nb",t),D.load("fi",r),D.load("da",o),D.load("sv",n);let a=We();D.activate(a),yr(),Fo()},$o="warp-i18n-change";function yr(){typeof window!="undefined"&&window.dispatchEvent(new Event($o))}var wr=!1;function Fo(){if(wr||typeof window=="undefined"||!(document!=null&&document.documentElement))return;wr=!0;let e=()=>{let n=We();D.locale!==n&&(D.activate(n),yr())},t=new MutationObserver(n=>{for(let a of n)if(a.type==="attributes"&&a.attributeName==="lang"){e();break}});t.observe(document.documentElement,{attributes:!0,attributeFilter:["lang"]});let r=kr();r&&r.documentElement&&r!==document&&t.observe(r.documentElement,{attributes:!0,attributeFilter:["lang"]});let o=jo();o&&t.observe(o,{attributes:!0,attributeFilter:["lang"]})}function kr(){var e,t;try{return(t=(e=window.parent)==null?void 0:e.document)!=null?t:null}catch(r){return null}}function xr(e){var t,r;try{return(r=(t=e==null?void 0:e.documentElement)==null?void 0:t.lang)!=null?r:""}catch(o){return""}}function jo(){var e;try{return(e=window.frameElement)!=null?e:null}catch(t){return null}}function Vo(){var e,t,r;try{return(r=(t=(e=window.frameElement)==null?void 0:e.getAttribute)==null?void 0:t.call(e,"lang"))!=null?r:""}catch(o){return""}}import{css as _r}from"lit";var he=_r`
|
|
9
|
+
`)),oe(l)&&Dt.test(l)?Lt(l):oe(l)?l:Jr(l,this._locale,this._locales)(r,o==null?void 0:o.formats)}date(t,r){return at(this._locales||this._locale,t,r)}number(t,r){return rt(this._locales||this._locale,t,r)}};function oo(e={}){return new nt(e)}var D=oo();var Mt=["top","right","bottom","left"];var ee=Math.min,B=Math.max,we=Math.round;var G=e=>({x:e,y:e}),no={left:"right",right:"left",bottom:"top",top:"bottom"};function Le(e,t,r){return B(e,ee(t,r))}function ne(e,t){return typeof e=="function"?e(t):e}function te(e){return e.split("-")[0]}function le(e){return e.split("-")[1]}function st(e){return e==="x"?"y":"x"}function Re(e){return e==="y"?"height":"width"}function J(e){let t=e[0];return t==="t"||t==="b"?"y":"x"}function Te(e){return st(J(e))}function $t(e,t,r){r===void 0&&(r=!1);let o=le(e),n=Te(e),a=Re(n),i=n==="x"?o===(r?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(i=ve(i)),[i,ve(i)]}function Ft(e){let t=ve(e);return[De(e),t,De(t)]}function De(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}var Tt=["left","right"],Pt=["right","left"],io=["top","bottom"],ao=["bottom","top"];function so(e,t,r){switch(e){case"top":case"bottom":return r?t?Pt:Tt:t?Tt:Pt;case"left":case"right":return t?io:ao;default:return[]}}function jt(e,t,r,o){let n=le(e),a=so(te(e),r==="start",o);return n&&(a=a.map(i=>i+"-"+n),t&&(a=a.concat(a.map(De)))),a}function ve(e){let t=te(e);return no[t]+e.slice(t.length)}function lo(e){return{top:0,right:0,bottom:0,left:0,...e}}function lt(e){return typeof e!="number"?lo(e):{top:e,right:e,bottom:e,left:e}}function ce(e){let{x:t,y:r,width:o,height:n}=e;return{width:o,height:n,top:r,left:t,right:t+o,bottom:r+n,x:t,y:r}}function Vt(e,t,r){let{reference:o,floating:n}=e,a=J(t),i=Te(t),s=Re(i),l=te(t),u=a==="y",c=o.x+o.width/2-n.width/2,g=o.y+o.height/2-n.height/2,p=o[s]/2-n[s]/2,d;switch(l){case"top":d={x:c,y:o.y-n.height};break;case"bottom":d={x:c,y:o.y+o.height};break;case"right":d={x:o.x+o.width,y:g};break;case"left":d={x:o.x-n.width,y:g};break;default:d={x:o.x,y:o.y}}switch(le(t)){case"start":d[i]-=p*(r&&u?-1:1);break;case"end":d[i]+=p*(r&&u?-1:1);break}return d}async function It(e,t){var r;t===void 0&&(t={});let{x:o,y:n,platform:a,rects:i,elements:s,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:g="floating",altBoundary:p=!1,padding:d=0}=ne(t,e),m=lt(d),v=s[p?g==="floating"?"reference":"floating":g],x=ce(await a.getClippingRect({element:(r=await(a.isElement==null?void 0:a.isElement(v)))==null||r?v:v.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(s.floating)),boundary:u,rootBoundary:c,strategy:l})),y=g==="floating"?{x:o,y:n,width:i.floating.width,height:i.floating.height}:i.reference,k=await(a.getOffsetParent==null?void 0:a.getOffsetParent(s.floating)),z=await(a.isElement==null?void 0:a.isElement(k))?await(a.getScale==null?void 0:a.getScale(k))||{x:1,y:1}:{x:1,y:1},R=ce(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:y,offsetParent:k,strategy:l}):y);return{top:(x.top-R.top+m.top)/z.y,bottom:(R.bottom-x.bottom+m.bottom)/z.y,left:(x.left-R.left+m.left)/z.x,right:(R.right-x.right+m.right)/z.x}}var co=50,Ht=async(e,t,r)=>{let{placement:o="bottom",strategy:n="absolute",middleware:a=[],platform:i}=r,s=i.detectOverflow?i:{...i,detectOverflow:It},l=await(i.isRTL==null?void 0:i.isRTL(t)),u=await i.getElementRects({reference:e,floating:t,strategy:n}),{x:c,y:g}=Vt(u,o,l),p=o,d=0,m={};for(let f=0;f<a.length;f++){let v=a[f];if(!v)continue;let{name:x,fn:y}=v,{x:k,y:z,data:R,reset:b}=await y({x:c,y:g,initialPlacement:o,placement:p,strategy:n,middlewareData:m,rects:u,platform:s,elements:{reference:e,floating:t}});c=k!=null?k:c,g=z!=null?z:g,m[x]={...m[x],...R},b&&d<co&&(d++,typeof b=="object"&&(b.placement&&(p=b.placement),b.rects&&(u=b.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:n}):b.rects),{x:c,y:g}=Vt(u,p,l)),f=-1)}return{x:c,y:g,placement:p,strategy:n,middlewareData:m}},Yt=e=>({name:"arrow",options:e,async fn(t){let{x:r,y:o,placement:n,rects:a,platform:i,elements:s,middlewareData:l}=t,{element:u,padding:c=0}=ne(e,t)||{};if(u==null)return{};let g=lt(c),p={x:r,y:o},d=Te(n),m=Re(d),f=await i.getDimensions(u),v=d==="y",x=v?"top":"left",y=v?"bottom":"right",k=v?"clientHeight":"clientWidth",z=a.reference[m]+a.reference[d]-p[d]-a.floating[m],R=p[d]-a.reference[d],b=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u)),w=b?b[k]:0;(!w||!await(i.isElement==null?void 0:i.isElement(b)))&&(w=s.floating[k]||a.floating[m]);let _=z/2-R/2,C=w/2-f[m]/2-1,A=ee(g[x],C),V=ee(g[y],C),j=A,N=w-f[m]-V,P=w/2-f[m]/2+_,L=Le(j,P,N),H=!l.arrow&&le(n)!=null&&P!==L&&a.reference[m]/2-(P<j?A:V)-f[m]/2<0,M=H?P<j?P-j:P-N:0;return{[d]:p[d]+M,data:{[d]:L,centerOffset:P-L-M,...H&&{alignmentOffset:M}},reset:H}}});var Xt=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,o;let{placement:n,middlewareData:a,rects:i,initialPlacement:s,platform:l,elements:u}=t,{mainAxis:c=!0,crossAxis:g=!0,fallbackPlacements:p,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:f=!0,...v}=ne(e,t);if((r=a.arrow)!=null&&r.alignmentOffset)return{};let x=te(n),y=J(s),k=te(s)===s,z=await(l.isRTL==null?void 0:l.isRTL(u.floating)),R=p||(k||!f?[ve(s)]:Ft(s)),b=m!=="none";!p&&b&&R.push(...jt(s,f,m,z));let w=[s,...R],_=await l.detectOverflow(t,v),C=[],A=((o=a.flip)==null?void 0:o.overflows)||[];if(c&&C.push(_[x]),g){let P=$t(n,i,z);C.push(_[P[0]],_[P[1]])}if(A=[...A,{placement:n,overflows:C}],!C.every(P=>P<=0)){var V,j;let P=(((V=a.flip)==null?void 0:V.index)||0)+1,L=w[P];if(L&&(!(g==="alignment"?y!==J(L):!1)||A.every(q=>J(q.placement)===y?q.overflows[0]>0:!0)))return{data:{index:P,overflows:A},reset:{placement:L}};let H=(j=A.filter(M=>M.overflows[0]<=0).sort((M,q)=>M.overflows[1]-q.overflows[1])[0])==null?void 0:j.placement;if(!H)switch(d){case"bestFit":{var N;let M=(N=A.filter(q=>{if(b){let U=J(q.placement);return U===y||U==="y"}return!0}).map(q=>[q.placement,q.overflows.filter(U=>U>0).reduce((U,Yr)=>U+Yr,0)]).sort((q,U)=>q[1]-U[1])[0])==null?void 0:N[0];M&&(H=M);break}case"initialPlacement":H=s;break}if(n!==H)return{reset:{placement:H}}}return{}}}};function Nt(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Bt(e){return Mt.some(t=>e[t]>=0)}var qt=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){let{rects:r,platform:o}=t,{strategy:n="referenceHidden",...a}=ne(e,t);switch(n){case"referenceHidden":{let i=await o.detectOverflow(t,{...a,elementContext:"reference"}),s=Nt(i,r.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:Bt(s)}}}case"escaped":{let i=await o.detectOverflow(t,{...a,altBoundary:!0}),s=Nt(i,r.floating);return{data:{escapedOffsets:s,escaped:Bt(s)}}}default:return{}}}}};var uo=new Set(["left","top"]);async function go(e,t){let{placement:r,platform:o,elements:n}=e,a=await(o.isRTL==null?void 0:o.isRTL(n.floating)),i=te(r),s=le(r),l=J(r)==="y",u=uo.has(i)?-1:1,c=a&&l?-1:1,g=ne(t,e),{mainAxis:p,crossAxis:d,alignmentAxis:m}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:g.mainAxis||0,crossAxis:g.crossAxis||0,alignmentAxis:g.alignmentAxis};return s&&typeof m=="number"&&(d=s==="end"?m*-1:m),l?{x:d*c,y:p*u}:{x:p*u,y:d*c}}var Ut=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,o;let{x:n,y:a,placement:i,middlewareData:s}=t,l=await go(t,e);return i===((r=s.offset)==null?void 0:r.placement)&&(o=s.arrow)!=null&&o.alignmentOffset?{}:{x:n+l.x,y:a+l.y,data:{...l,placement:i}}}}},Qt=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:r,y:o,placement:n,platform:a}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:l={fn:x=>{let{x:y,y:k}=x;return{x:y,y:k}}},...u}=ne(e,t),c={x:r,y:o},g=await a.detectOverflow(t,u),p=J(te(n)),d=st(p),m=c[d],f=c[p];if(i){let x=d==="y"?"top":"left",y=d==="y"?"bottom":"right",k=m+g[x],z=m-g[y];m=Le(k,m,z)}if(s){let x=p==="y"?"top":"left",y=p==="y"?"bottom":"right",k=f+g[x],z=f-g[y];f=Le(k,f,z)}let v=l.fn({...t,[d]:m,[p]:f});return{...v,data:{x:v.x-r,y:v.y-o,enabled:{[d]:i,[p]:s}}}}}};var Zt=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,o;let{placement:n,rects:a,platform:i,elements:s}=t,{apply:l=()=>{},...u}=ne(e,t),c=await i.detectOverflow(t,u),g=te(n),p=le(n),d=J(n)==="y",{width:m,height:f}=a.floating,v,x;g==="top"||g==="bottom"?(v=g,x=p===(await(i.isRTL==null?void 0:i.isRTL(s.floating))?"start":"end")?"left":"right"):(x=g,v=p==="end"?"top":"bottom");let y=f-c.top-c.bottom,k=m-c.left-c.right,z=ee(f-c[v],y),R=ee(m-c[x],k),b=!t.middlewareData.shift,w=z,_=R;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(_=k),(o=t.middlewareData.shift)!=null&&o.enabled.y&&(w=y),b&&!p){let A=B(c.left,0),V=B(c.right,0),j=B(c.top,0),N=B(c.bottom,0);d?_=m-2*(A!==0||V!==0?A+V:B(c.left,c.right)):w=f-2*(j!==0||N!==0?j+N:B(c.top,c.bottom))}await l({...t,availableWidth:_,availableHeight:w});let C=await i.getDimensions(s.floating);return m!==C.width||f!==C.height?{reset:{rects:!0}}:{}}}};function Me(){return typeof window!="undefined"}function ue(e){return Jt(e)?(e.nodeName||"").toLowerCase():"#document"}function I(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function K(e){var t;return(t=(Jt(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Jt(e){return Me()?e instanceof Node||e instanceof I(e).Node:!1}function Q(e){return Me()?e instanceof Element||e instanceof I(e).Element:!1}function W(e){return Me()?e instanceof HTMLElement||e instanceof I(e).HTMLElement:!1}function Gt(e){return!Me()||typeof ShadowRoot=="undefined"?!1:e instanceof ShadowRoot||e instanceof I(e).ShadowRoot}function me(e){let{overflow:t,overflowX:r,overflowY:o,display:n}=Z(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+r)&&n!=="inline"&&n!=="contents"}function Kt(e){return/^(table|td|th)$/.test(ue(e))}function xe(e){try{if(e.matches(":popover-open"))return!0}catch(t){}try{return e.matches(":modal")}catch(t){return!1}}var po=/transform|translate|scale|rotate|perspective|filter/,mo=/paint|layout|strict|content/,de=e=>!!e&&e!=="none",ct;function $e(e){let t=Q(e)?Z(e):e;return de(t.transform)||de(t.translate)||de(t.scale)||de(t.rotate)||de(t.perspective)||!Fe()&&(de(t.backdropFilter)||de(t.filter))||po.test(t.willChange||"")||mo.test(t.contain||"")}function Wt(e){let t=re(e);for(;W(t)&&!ge(t);){if($e(t))return t;if(xe(t))return null;t=re(t)}return null}function Fe(){return ct==null&&(ct=typeof CSS!="undefined"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),ct}function ge(e){return/^(html|body|#document)$/.test(ue(e))}function Z(e){return I(e).getComputedStyle(e)}function ye(e){return Q(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function re(e){if(ue(e)==="html")return e;let t=e.assignedSlot||e.parentNode||Gt(e)&&e.host||K(e);return Gt(t)?t.host:t}function er(e){let t=re(e);return ge(t)?e.ownerDocument?e.ownerDocument.body:e.body:W(t)&&me(t)?t:er(t)}function Pe(e,t,r){var o;t===void 0&&(t=[]),r===void 0&&(r=!0);let n=er(e),a=n===((o=e.ownerDocument)==null?void 0:o.body),i=I(n);if(a){let s=je(i);return t.concat(i,i.visualViewport||[],me(n)?n:[],s&&r?Pe(s):[])}else return t.concat(n,Pe(n,[],r))}function je(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function nr(e){let t=Z(e),r=parseFloat(t.width)||0,o=parseFloat(t.height)||0,n=W(e),a=n?e.offsetWidth:r,i=n?e.offsetHeight:o,s=we(r)!==a||we(o)!==i;return s&&(r=a,o=i),{width:r,height:o,$:s}}function ir(e){return Q(e)?e:e.contextElement}function be(e){let t=ir(e);if(!W(t))return G(1);let r=t.getBoundingClientRect(),{width:o,height:n,$:a}=nr(t),i=(a?we(r.width):r.width)/o,s=(a?we(r.height):r.height)/n;return(!i||!Number.isFinite(i))&&(i=1),(!s||!Number.isFinite(s))&&(s=1),{x:i,y:s}}var bo=G(0);function ar(e){let t=I(e);return!Fe()||!t.visualViewport?bo:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function ho(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==I(e)?!1:t}function ke(e,t,r,o){t===void 0&&(t=!1),r===void 0&&(r=!1);let n=e.getBoundingClientRect(),a=ir(e),i=G(1);t&&(o?Q(o)&&(i=be(o)):i=be(e));let s=ho(a,r,o)?ar(a):G(0),l=(n.left+s.x)/i.x,u=(n.top+s.y)/i.y,c=n.width/i.x,g=n.height/i.y;if(a){let p=I(a),d=o&&Q(o)?I(o):o,m=p,f=je(m);for(;f&&o&&d!==m;){let v=be(f),x=f.getBoundingClientRect(),y=Z(f),k=x.left+(f.clientLeft+parseFloat(y.paddingLeft))*v.x,z=x.top+(f.clientTop+parseFloat(y.paddingTop))*v.y;l*=v.x,u*=v.y,c*=v.x,g*=v.y,l+=k,u+=z,m=I(f),f=je(m)}}return ce({width:c,height:g,x:l,y:u})}function Ve(e,t){let r=ye(e).scrollLeft;return t?t.left+r:ke(K(e)).left+r}function sr(e,t){let r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-Ve(e,r),n=r.top+t.scrollTop;return{x:o,y:n}}function fo(e){let{elements:t,rect:r,offsetParent:o,strategy:n}=e,a=n==="fixed",i=K(o),s=t?xe(t.floating):!1;if(o===i||s&&a)return r;let l={scrollLeft:0,scrollTop:0},u=G(1),c=G(0),g=W(o);if((g||!g&&!a)&&((ue(o)!=="body"||me(i))&&(l=ye(o)),g)){let d=ke(o);u=be(o),c.x=d.x+o.clientLeft,c.y=d.y+o.clientTop}let p=i&&!g&&!a?sr(i,l):G(0);return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-l.scrollLeft*u.x+c.x+p.x,y:r.y*u.y-l.scrollTop*u.y+c.y+p.y}}function vo(e){return Array.from(e.getClientRects())}function wo(e){let t=K(e),r=ye(e),o=e.ownerDocument.body,n=B(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),a=B(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight),i=-r.scrollLeft+Ve(e),s=-r.scrollTop;return Z(o).direction==="rtl"&&(i+=B(t.clientWidth,o.clientWidth)-n),{width:n,height:a,x:i,y:s}}var tr=25;function xo(e,t){let r=I(e),o=K(e),n=r.visualViewport,a=o.clientWidth,i=o.clientHeight,s=0,l=0;if(n){a=n.width,i=n.height;let c=Fe();(!c||c&&t==="fixed")&&(s=n.offsetLeft,l=n.offsetTop)}let u=Ve(o);if(u<=0){let c=o.ownerDocument,g=c.body,p=getComputedStyle(g),d=c.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,m=Math.abs(o.clientWidth-g.clientWidth-d);m<=tr&&(a-=m)}else u<=tr&&(a+=u);return{width:a,height:i,x:s,y:l}}function yo(e,t){let r=ke(e,!0,t==="fixed"),o=r.top+e.clientTop,n=r.left+e.clientLeft,a=W(e)?be(e):G(1),i=e.clientWidth*a.x,s=e.clientHeight*a.y,l=n*a.x,u=o*a.y;return{width:i,height:s,x:l,y:u}}function rr(e,t,r){let o;if(t==="viewport")o=xo(e,r);else if(t==="document")o=wo(K(e));else if(Q(t))o=yo(t,r);else{let n=ar(e);o={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return ce(o)}function lr(e,t){let r=re(e);return r===t||!Q(r)||ge(r)?!1:Z(r).position==="fixed"||lr(r,t)}function ko(e,t){let r=t.get(e);if(r)return r;let o=Pe(e,[],!1).filter(s=>Q(s)&&ue(s)!=="body"),n=null,a=Z(e).position==="fixed",i=a?re(e):e;for(;Q(i)&&!ge(i);){let s=Z(i),l=$e(i);!l&&s.position==="fixed"&&(n=null),(a?!l&&!n:!l&&s.position==="static"&&!!n&&(n.position==="absolute"||n.position==="fixed")||me(i)&&!l&&lr(e,i))?o=o.filter(c=>c!==i):n=s,i=re(i)}return t.set(e,o),o}function _o(e){let{element:t,boundary:r,rootBoundary:o,strategy:n}=e,i=[...r==="clippingAncestors"?xe(t)?[]:ko(t,this._c):[].concat(r),o],s=rr(t,i[0],n),l=s.top,u=s.right,c=s.bottom,g=s.left;for(let p=1;p<i.length;p++){let d=rr(t,i[p],n);l=B(d.top,l),u=ee(d.right,u),c=ee(d.bottom,c),g=B(d.left,g)}return{width:u-g,height:c-l,x:g,y:l}}function Eo(e){let{width:t,height:r}=nr(e);return{width:t,height:r}}function Co(e,t,r){let o=W(t),n=K(t),a=r==="fixed",i=ke(e,!0,a,t),s={scrollLeft:0,scrollTop:0},l=G(0);function u(){l.x=Ve(n)}if(o||!o&&!a)if((ue(t)!=="body"||me(n))&&(s=ye(t)),o){let d=ke(t,!0,a,t);l.x=d.x+t.clientLeft,l.y=d.y+t.clientTop}else n&&u();a&&!o&&n&&u();let c=n&&!o&&!a?sr(n,s):G(0),g=i.left+s.scrollLeft-l.x-c.x,p=i.top+s.scrollTop-l.y-c.y;return{x:g,y:p,width:i.width,height:i.height}}function dt(e){return Z(e).position==="static"}function or(e,t){if(!W(e)||Z(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return K(e)===r&&(r=r.ownerDocument.body),r}function cr(e,t){let r=I(e);if(xe(e))return r;if(!W(e)){let n=re(e);for(;n&&!ge(n);){if(Q(n)&&!dt(n))return n;n=re(n)}return r}let o=or(e,t);for(;o&&Kt(o)&&dt(o);)o=or(o,t);return o&&ge(o)&&dt(o)&&!$e(o)?r:o||Wt(e)||r}var So=async function(e){let t=this.getOffsetParent||cr,r=this.getDimensions,o=await r(e.floating);return{reference:Co(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function zo(e){return Z(e).direction==="rtl"}var Ao={convertOffsetParentRelativeRectToViewportRelativeRect:fo,getDocumentElement:K,getClippingRect:_o,getOffsetParent:cr,getElementRects:So,getClientRects:vo,getDimensions:Eo,getScale:be,isElement:Q,isRTL:zo};var dr=Ut;var ur=Qt,gr=Xt,pr=Zt,mr=qt,br=Yt;var hr=(e,t,r)=>{let o=new Map,n={platform:Ao,...r},a={...n.platform,_c:o};return Ht(e,t,{...n,platform:a})};var Be="top-start",Ie="top",He="top-end",Ye="right-start",Xe="right",qe="right-end",Ue="bottom-start",_e="bottom",Qe="bottom-end",Ze="left-start",Ge="left",Je="left-end",ut=[Be,Ie,He,Ye,Xe,qe,Ue,_e,Qe,Ze,Ge,Je],pe={[Be]:Ue,[Ie]:_e,[He]:Qe,[Ue]:Be,[_e]:Ie,[Qe]:He,[Ze]:Ye,[Ge]:Xe,[Je]:qe,[Ye]:Ze,[Xe]:Ge,[qe]:Je},Oo={[Ze]:-45,[Ge]:-45,[Je]:-45,[Be]:45,[Ie]:45,[He]:45,[Ye]:135,[Xe]:135,[qe]:135,[Ue]:-135,[_e]:-135,[Qe]:-135},Do=e=>{let t;return/-/.test(e)?t=e.split("-").map(r=>r.charAt(0).toUpperCase()+r.slice(1)).join(""):t=e.charAt(0).toUpperCase()+e.slice(1),t},Lo=e=>e.split("-")[0],Ro=e=>pe[Lo(e)],vr=e=>pe[e],To=e=>Oo[vr(e)],Po=(e,t,r)=>{Object.assign(e==null?void 0:e.style,{borderTopLeftRadius:"4px",zIndex:1,[`margin${Do(Ro(r))}`]:"-0.5px",transform:`rotate(${t}deg)`})},fr=8,Ne=24;async function gt(e){var o,n,a;if(!(e!=null&&e.isShowing)||(e!=null&&e.waitForDOM&&await(e==null?void 0:e.waitForDOM()),!(e!=null&&e.targetEl)||!(e!=null&&e.attentionEl)))return;let t=e==null?void 0:e.targetEl,r=e.attentionEl;return hr(t,r,{placement:(o=e==null?void 0:e.directionName)!=null?o:_e,middleware:[dr({mainAxis:(n=e==null?void 0:e.distance)!=null?n:8,crossAxis:(a=e==null?void 0:e.skidding)!=null?a:0}),(e==null?void 0:e.flip)&&gr({crossAxis:e==null?void 0:e.crossAxis,fallbackPlacements:e==null?void 0:e.fallbackPlacements}),(e==null?void 0:e.flip)&&ur({crossAxis:!0}),!(e!=null&&e.noArrow)&&(e==null?void 0:e.arrowEl)&&br({element:e==null?void 0:e.arrowEl}),mr(),pr({apply(){Object.assign(r.style,{paddingRight:`${fr}px`,paddingLeft:`${fr}px`})}})]}).then(({x:i,y:s,middlewareData:l,placement:u})=>{if(e.actualDirection=u,e!=null&&e.isCallout||Object.assign(r.style,{left:`${i}px`,top:`${s}px`}),l!=null&&l.hide&&!(e!=null&&e.isCallout)){let{referenceHidden:c}=l.hide;Object.assign(r.style,{visibility:c?"hidden":""})}if(l!=null&&l.arrow&&(e!=null&&e.arrowEl)){let c=e==null?void 0:e.arrowEl,{x:g,y:p}=l.arrow,d=window.getComputedStyle(r).direction==="rtl",m=vr(u).split("-")[1],f="",v="",x="",y="";if(m==="start"){let k=typeof g=="number"?`calc(${Ne}px - ${c.offsetWidth/2}px)`:"";f=typeof p=="number"?`calc(${Ne}px - ${c.offsetWidth/2}px)`:"",v=d?k:"",y=d?"":k}else if(m==="end"){let k=typeof g=="number"?`calc(${Ne}px - ${c.offsetWidth/2}px)`:"";v=d?"":k,y=d?k:"",x=typeof p=="number"?`calc(${Ne}px - ${c.offsetWidth/2}px)`:""}else y=typeof g=="number"?`${g}px`:"",f=typeof p=="number"?`${p}px`:"";Object.assign(c.style,{top:f,right:v,bottom:x,left:y}),Po(c,To(u),u)}}),e}import{css as en,html as fe,LitElement as tn,nothing as yt}from"lit";import{property as X}from"lit/decorators.js";import{ifDefined as rn}from"lit/directives/if-defined.js";var Mo=["en","nb","fi","da","sv"],pt="en",Ke=e=>Mo.find(t=>e===t||e.toLowerCase().includes(t))||pt;function We(){if(typeof window=="undefined"){let e=process.env.NMP_LANGUAGE||Intl.DateTimeFormat().resolvedOptions().locale;return Ke(e)}try{let e=xr(document);if(e)return Ke(e);let t=Vo();if(t)return Ke(t);let r=xr(kr());return r?Ke(r):pt}catch(e){return console.warn("could not detect locale, falling back to source locale",e),pt}}var et=(e,t,r,o,n)=>{D.load("en",e),D.load("nb",t),D.load("fi",r),D.load("da",o),D.load("sv",n);let a=We();D.activate(a),yr(),Fo()},$o="warp-i18n-change";function yr(){typeof window!="undefined"&&window.dispatchEvent(new Event($o))}var wr=!1;function Fo(){if(wr||typeof window=="undefined"||!(document!=null&&document.documentElement))return;wr=!0;let e=()=>{let n=We();D.locale!==n&&(D.activate(n),yr())},t=new MutationObserver(n=>{for(let a of n)if(a.type==="attributes"&&a.attributeName==="lang"){e();break}});t.observe(document.documentElement,{attributes:!0,attributeFilter:["lang"]});let r=kr();r&&r.documentElement&&r!==document&&t.observe(r.documentElement,{attributes:!0,attributeFilter:["lang"]});let o=jo();o&&t.observe(o,{attributes:!0,attributeFilter:["lang"]})}function kr(){var e,t;try{return(t=(e=window.parent)==null?void 0:e.document)!=null?t:null}catch(r){return null}}function xr(e){var t,r;try{return(r=(t=e==null?void 0:e.documentElement)==null?void 0:t.lang)!=null?r:""}catch(o){return""}}function jo(){var e;try{return(e=window.frameElement)!=null?e:null}catch(t){return null}}function Vo(){var e,t,r;try{return(r=(t=(e=window.frameElement)==null?void 0:e.getAttribute)==null?void 0:t.call(e,"lang"))!=null?r:""}catch(o){return""}}import{css as _r}from"lit";var he=_r`
|
|
10
10
|
*,
|
|
11
11
|
:before,
|
|
12
12
|
:after {
|
|
@@ -3370,7 +3370,7 @@ Please compile your catalog first.
|
|
|
3370
3370
|
--w-icon-size: 32px;
|
|
3371
3371
|
}
|
|
3372
3372
|
|
|
3373
|
-
`;var bt=new Map,Uo='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"></svg>';function Qo(e,t={}){var o;let r=(o=t.responseParser)!=null?o:(n=>n.text());return bt.has(e)||bt.set(e,fetch(e).then(r)),bt.get(e)}var ie=class extends Yo{constructor(){super(...arguments);this.locale=document.documentElement.lang||"en";this.svg=null}async fetchIcon(r){let o=`https://assets.finn.no/pkg/eikons/v1/${this.locale}/${r}.svg`;try{let n=await Qo(o);return new DOMParser().parseFromString(n,"text/html").body.querySelector("svg")}catch(n){return null}}firstUpdated(){this.loadIcon()}updated(r){(r.has("name")||r.has("locale"))&&this.loadIcon()}async loadIcon(){if(!this.name){this.svg=null;return}let r=await this.fetchIcon(this.name);r||(r=new DOMParser().parseFromString(Uo,"text/html").body.firstElementChild),this.svg=r}render(){let r=this.size||"medium",o=this.name||"",n={"w-icon":!0,"w-icon--s":r==="small","w-icon--m":r==="medium","w-icon--l":r==="large"},a=typeof r=="string"&&r.endsWith("px")?`--w-icon-size: ${r};`:"";return Ho`<div class="${qo(n)}" style="${a}" part="w-${o.toLowerCase()}">${this.svg}</div>`}};ie.styles=[Lr],h([mt({type:String,reflect:!0})],ie.prototype,"name",2),h([mt({type:String,reflect:!0})],ie.prototype,"size",2),h([mt({type:String,reflect:!0,useDefault:!0})],ie.prototype,"locale",2),h([Xo()],ie.prototype,"svg",2);customElements.get("w-icon")||customElements.define("w-icon",ie);var E=function(e,t,r,o){if(r==="a"&&!o)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!o:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?o:r==="a"?o.call(e):o?o.value:t.get(e)},T=function(e,t,r,o,n){if(o==="m")throw new TypeError("Private method is not writable");if(o==="a"&&!n)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return o==="a"?n.call(e,r):n?n.value=r:t.set(e,r),r};function Rr(e){var t,r,o,n,a,i,s,l,u,c,g,p,d,m,f,v,x,y,k;class z extends e{constructor(...b){var w,_,C;super(...b),t.add(this),this.internals=this.attachInternals(),r.set(this,!1),o.set(this,!1),n.set(this,!1),a.set(this,void 0),i.set(this,void 0),s.set(this,!0),u.set(this,""),c.set(this,()=>{T(this,n,!0,"f"),T(this,r,!0,"f"),E(this,t,"m",v).call(this)}),g.set(this,()=>{T(this,r,!1,"f"),E(this,t,"m",x).call(this,this.shouldFormValueUpdate()?E(this,u,"f"):""),!this.validity.valid&&E(this,n,"f")&&T(this,o,!0,"f");let A=E(this,t,"m",v).call(this);this.validationMessageCallback&&this.validationMessageCallback(A?this.internals.validationMessage:"")}),p.set(this,()=>{var A;E(this,s,"f")&&this.validationTarget&&(this.internals.setValidity(this.validity,this.validationMessage,this.validationTarget),T(this,s,!1,"f")),T(this,n,!0,"f"),T(this,o,!0,"f"),E(this,t,"m",v).call(this),(A=this===null||this===void 0?void 0:this.validationMessageCallback)===null||A===void 0||A.call(this,this.showError?this.internals.validationMessage:"")}),d.set(this,void 0),m.set(this,!1),f.set(this,Promise.resolve()),(w=this.addEventListener)===null||w===void 0||w.call(this,"focus",E(this,c,"f")),(_=this.addEventListener)===null||_===void 0||_.call(this,"blur",E(this,g,"f")),(C=this.addEventListener)===null||C===void 0||C.call(this,"invalid",E(this,p,"f")),this.setValue(null)}static get formAssociated(){return!0}static get validators(){return this.formControlValidators||[]}static get observedAttributes(){let b=this.validators.map(C=>C.attribute).flat(),w=super.observedAttributes||[];return[...new Set([...w,...b])]}static getValidator(b){return this.validators.find(w=>w.attribute===b)||null}static getValidators(b){return this.validators.filter(w=>{var _;if(w.attribute===b||!((_=w.attribute)===null||_===void 0)&&_.includes(b))return!0})}get form(){return this.internals.form}get showError(){return E(this,t,"m",v).call(this)}checkValidity(){return this.internals.checkValidity()}get validity(){return this.internals.validity}get validationMessage(){return this.internals.validationMessage}attributeChangedCallback(b,w,_){var C;(C=super.attributeChangedCallback)===null||C===void 0||C.call(this,b,w,_);let V=this.constructor.getValidators(b);V!=null&&V.length&&this.validationTarget&&this.setValue(E(this,u,"f"))}setValue(b){var w;T(this,o,!1,"f"),(w=this.validationMessageCallback)===null||w===void 0||w.call(this,""),T(this,u,b,"f");let C=this.shouldFormValueUpdate()?b:null;this.internals.setFormValue(C),E(this,t,"m",x).call(this,C),this.valueChangedCallback&&this.valueChangedCallback(C),E(this,t,"m",v).call(this)}shouldFormValueUpdate(){return!0}get validationComplete(){return new Promise(b=>b(E(this,f,"f")))}formResetCallback(){var b,w;T(this,n,!1,"f"),T(this,o,!1,"f"),E(this,t,"m",v).call(this),(b=this.resetFormControl)===null||b===void 0||b.call(this),(w=this.validationMessageCallback)===null||w===void 0||w.call(this,E(this,t,"m",v).call(this)?this.validationMessage:"")}}return r=new WeakMap,o=new WeakMap,n=new WeakMap,a=new WeakMap,i=new WeakMap,s=new WeakMap,u=new WeakMap,c=new WeakMap,g=new WeakMap,p=new WeakMap,d=new WeakMap,m=new WeakMap,f=new WeakMap,t=new WeakSet,l=function(){let b=this.getRootNode(),w=`${this.localName}[name="${this.getAttribute("name")}"]`;return b.querySelectorAll(w)},v=function(){if(this.hasAttribute("disabled"))return!1;let b=E(this,o,"f")||E(this,n,"f")&&!this.validity.valid&&!E(this,r,"f");return b&&this.internals.states?this.internals.states.add("--show-error"):this.internals.states&&this.internals.states.delete("--show-error"),b},x=function(b){let w=this.constructor,_={},C=w.validators,A=[],V=C.some(L=>L.isValid instanceof Promise);E(this,m,"f")||(T(this,f,new Promise(L=>{T(this,d,L,"f")}),"f"),T(this,m,!0,"f")),E(this,a,"f")&&(E(this,a,"f").abort(),T(this,i,E(this,a,"f"),"f"));let j=new AbortController;T(this,a,j,"f");let N,
|
|
3373
|
+
`;var bt=new Map,Uo='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"></svg>';function Qo(e,t={}){var o;let r=(o=t.responseParser)!=null?o:(n=>n.text());return bt.has(e)||bt.set(e,fetch(e).then(r)),bt.get(e)}var ie=class extends Yo{constructor(){super(...arguments);this.locale=document.documentElement.lang||"en";this.svg=null}async fetchIcon(r){let o=`https://assets.finn.no/pkg/eikons/v1/${this.locale}/${r}.svg`;try{let n=await Qo(o);return new DOMParser().parseFromString(n,"text/html").body.querySelector("svg")}catch(n){return null}}firstUpdated(){this.loadIcon()}updated(r){(r.has("name")||r.has("locale"))&&this.loadIcon()}async loadIcon(){if(!this.name){this.svg=null;return}let r=await this.fetchIcon(this.name);r||(r=new DOMParser().parseFromString(Uo,"text/html").body.firstElementChild),this.svg=r}render(){let r=this.size||"medium",o=this.name||"",n={"w-icon":!0,"w-icon--s":r==="small","w-icon--m":r==="medium","w-icon--l":r==="large"},a=typeof r=="string"&&r.endsWith("px")?`--w-icon-size: ${r};`:"";return Ho`<div class="${qo(n)}" style="${a}" part="w-${o.toLowerCase()}">${this.svg}</div>`}};ie.styles=[Lr],h([mt({type:String,reflect:!0})],ie.prototype,"name",2),h([mt({type:String,reflect:!0})],ie.prototype,"size",2),h([mt({type:String,reflect:!0,useDefault:!0})],ie.prototype,"locale",2),h([Xo()],ie.prototype,"svg",2);customElements.get("w-icon")||customElements.define("w-icon",ie);var E=function(e,t,r,o){if(r==="a"&&!o)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!o:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?o:r==="a"?o.call(e):o?o.value:t.get(e)},T=function(e,t,r,o,n){if(o==="m")throw new TypeError("Private method is not writable");if(o==="a"&&!n)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return o==="a"?n.call(e,r):n?n.value=r:t.set(e,r),r};function Rr(e){var t,r,o,n,a,i,s,l,u,c,g,p,d,m,f,v,x,y,k;class z extends e{constructor(...b){var w,_,C;super(...b),t.add(this),this.internals=this.attachInternals(),r.set(this,!1),o.set(this,!1),n.set(this,!1),a.set(this,void 0),i.set(this,void 0),s.set(this,!0),u.set(this,""),c.set(this,()=>{T(this,n,!0,"f"),T(this,r,!0,"f"),E(this,t,"m",v).call(this)}),g.set(this,()=>{T(this,r,!1,"f"),E(this,t,"m",x).call(this,this.shouldFormValueUpdate()?E(this,u,"f"):""),!this.validity.valid&&E(this,n,"f")&&T(this,o,!0,"f");let A=E(this,t,"m",v).call(this);this.validationMessageCallback&&this.validationMessageCallback(A?this.internals.validationMessage:"")}),p.set(this,()=>{var A;E(this,s,"f")&&this.validationTarget&&(this.internals.setValidity(this.validity,this.validationMessage,this.validationTarget),T(this,s,!1,"f")),T(this,n,!0,"f"),T(this,o,!0,"f"),E(this,t,"m",v).call(this),(A=this===null||this===void 0?void 0:this.validationMessageCallback)===null||A===void 0||A.call(this,this.showError?this.internals.validationMessage:"")}),d.set(this,void 0),m.set(this,!1),f.set(this,Promise.resolve()),(w=this.addEventListener)===null||w===void 0||w.call(this,"focus",E(this,c,"f")),(_=this.addEventListener)===null||_===void 0||_.call(this,"blur",E(this,g,"f")),(C=this.addEventListener)===null||C===void 0||C.call(this,"invalid",E(this,p,"f")),this.setValue(null)}static get formAssociated(){return!0}static get validators(){return this.formControlValidators||[]}static get observedAttributes(){let b=this.validators.map(C=>C.attribute).flat(),w=super.observedAttributes||[];return[...new Set([...w,...b])]}static getValidator(b){return this.validators.find(w=>w.attribute===b)||null}static getValidators(b){return this.validators.filter(w=>{var _;if(w.attribute===b||!((_=w.attribute)===null||_===void 0)&&_.includes(b))return!0})}get form(){return this.internals.form}get showError(){return E(this,t,"m",v).call(this)}checkValidity(){return this.internals.checkValidity()}get validity(){return this.internals.validity}get validationMessage(){return this.internals.validationMessage}attributeChangedCallback(b,w,_){var C;(C=super.attributeChangedCallback)===null||C===void 0||C.call(this,b,w,_);let V=this.constructor.getValidators(b);V!=null&&V.length&&this.validationTarget&&this.setValue(E(this,u,"f"))}setValue(b){var w;T(this,o,!1,"f"),(w=this.validationMessageCallback)===null||w===void 0||w.call(this,""),T(this,u,b,"f");let C=this.shouldFormValueUpdate()?b:null;this.internals.setFormValue(C),E(this,t,"m",x).call(this,C),this.valueChangedCallback&&this.valueChangedCallback(C),E(this,t,"m",v).call(this)}shouldFormValueUpdate(){return!0}get validationComplete(){return new Promise(b=>b(E(this,f,"f")))}formResetCallback(){var b,w;T(this,n,!1,"f"),T(this,o,!1,"f"),E(this,t,"m",v).call(this),(b=this.resetFormControl)===null||b===void 0||b.call(this),(w=this.validationMessageCallback)===null||w===void 0||w.call(this,E(this,t,"m",v).call(this)?this.validationMessage:"")}}return r=new WeakMap,o=new WeakMap,n=new WeakMap,a=new WeakMap,i=new WeakMap,s=new WeakMap,u=new WeakMap,c=new WeakMap,g=new WeakMap,p=new WeakMap,d=new WeakMap,m=new WeakMap,f=new WeakMap,t=new WeakSet,l=function(){let b=this.getRootNode(),w=`${this.localName}[name="${this.getAttribute("name")}"]`;return b.querySelectorAll(w)},v=function(){if(this.hasAttribute("disabled"))return!1;let b=E(this,o,"f")||E(this,n,"f")&&!this.validity.valid&&!E(this,r,"f");return b&&this.internals.states?this.internals.states.add("--show-error"):this.internals.states&&this.internals.states.delete("--show-error"),b},x=function(b){let w=this.constructor,_={},C=w.validators,A=[],V=C.some(L=>L.isValid instanceof Promise);E(this,m,"f")||(T(this,f,new Promise(L=>{T(this,d,L,"f")}),"f"),T(this,m,!0,"f")),E(this,a,"f")&&(E(this,a,"f").abort(),T(this,i,E(this,a,"f"),"f"));let j=new AbortController;T(this,a,j,"f");let N,P=!1;C.length&&(C.forEach(L=>{let H=L.key||"customError",M=L.isValid(this,b,j.signal);M instanceof Promise?(A.push(M),M.then(U=>{U!=null&&(_[H]=!U,N=E(this,t,"m",k).call(this,L,b),E(this,t,"m",y).call(this,_,N))})):(_[H]=!M,this.validity[H]!==!M&&(P=!0),!M&&!N&&(N=E(this,t,"m",k).call(this,L,b)))}),Promise.allSettled(A).then(()=>{var L;j!=null&&j.signal.aborted||(T(this,m,!1,"f"),(L=E(this,d,"f"))===null||L===void 0||L.call(this))}),(P||!V)&&E(this,t,"m",y).call(this,_,N))},y=function(b,w){if(this.validationTarget)this.internals.setValidity(b,w,this.validationTarget),T(this,s,!1,"f");else{if(this.internals.setValidity(b,w),this.internals.validity.valid)return;T(this,s,!0,"f")}},k=function(b,w){if(this.validityCallback){let _=this.validityCallback(b.key||"customError");if(_)return _}return b.message instanceof Function?b.message(this,w):b.message},z}import{html as tt,LitElement as Ir,nothing as Ko}from"lit";import{property as $,query as Wo}from"lit/decorators.js";import{html as Go,LitElement as Mr,nothing as Jo}from"lit";import{property as ae}from"lit/decorators.js";import{css as Zo}from"lit";import{css as Ee}from"lit";var ht=Ee`
|
|
3374
3374
|
:host {
|
|
3375
3375
|
display: inline-block;
|
|
3376
3376
|
|
|
@@ -3737,7 +3737,7 @@ Please compile your catalog first.
|
|
|
3737
3737
|
background-position: 60px 0;
|
|
3738
3738
|
}
|
|
3739
3739
|
}
|
|
3740
|
-
`;var
|
|
3740
|
+
`;var Pr=Zo`
|
|
3741
3741
|
${ht}
|
|
3742
3742
|
|
|
3743
3743
|
/* ============================================================
|
|
@@ -3810,7 +3810,7 @@ Please compile your catalog first.
|
|
|
3810
3810
|
|
|
3811
3811
|
/* ===== Disabled (shared from button) ===== */
|
|
3812
3812
|
${wt}
|
|
3813
|
-
`;var $r=["primary","secondary","negative","negativeQuiet","utility","utilityQuiet","quiet","link","overlay","overlayInverted","overlayQuiet","overlayInvertedQuiet"],Y=class extends
|
|
3813
|
+
`;var $r=["primary","secondary","negative","negativeQuiet","utility","utilityQuiet","quiet","link","overlay","overlayInverted","overlayQuiet","overlayInvertedQuiet"],Y=class extends Mr{constructor(){super(...arguments);this.autofocus=!1;this.small=!1;this.disabled=!1;this.fullWidth=!1}connectedCallback(){if(super.connectedCallback(),this.variant&&!$r.includes(this.variant))throw new Error(`Invalid "variant" attribute. Set its value to one of the following:
|
|
3814
3814
|
${$r.join(", ")}.`)}firstUpdated(){this.autofocus&&setTimeout(()=>this.focus(),0)}render(){return Go`
|
|
3815
3815
|
<a
|
|
3816
3816
|
href="${this.href}"
|
|
@@ -3821,7 +3821,7 @@ ${$r.join(", ")}.`)}firstUpdated(){this.autofocus&&setTimeout(()=>this.focus(),0
|
|
|
3821
3821
|
>
|
|
3822
3822
|
<slot></slot>
|
|
3823
3823
|
</a>
|
|
3824
|
-
`}};Y.shadowRootOptions={...
|
|
3824
|
+
`}};Y.shadowRootOptions={...Mr.shadowRootOptions,delegatesFocus:!0},Y.styles=[he,Pr],h([ae({type:Boolean,reflect:!0})],Y.prototype,"autofocus",2),h([ae({reflect:!0})],Y.prototype,"variant",2),h([ae({type:Boolean,reflect:!0})],Y.prototype,"small",2),h([ae({reflect:!0})],Y.prototype,"href",2),h([ae({type:Boolean,reflect:!0})],Y.prototype,"disabled",2),h([ae({reflect:!0})],Y.prototype,"target",2),h([ae({reflect:!0})],Y.prototype,"rel",2),h([ae({attribute:"full-width",type:Boolean,reflect:!0})],Y.prototype,"fullWidth",2);customElements.get("w-link")||customElements.define("w-link",Y);import{ifDefined as xt}from"lit/directives/if-defined.js";var Fr=JSON.parse('{"button.aria.loading":["Indl\xE6ser..."]}');var jr=JSON.parse('{"button.aria.loading":["Loading..."]}');var Vr=JSON.parse('{"button.aria.loading":["Ladataan..."]}');var Nr=JSON.parse('{"button.aria.loading":["Laster..."]}');var Br=JSON.parse('{"button.aria.loading":["Laddar ..."]}');var Hr=["primary","secondary","negative","negativeQuiet","utility","pill","link","quiet","utilityQuiet","overlay","overlayInverted","overlayQuiet","overlayInvertedQuiet"],Ce,S=class extends Rr(Ir){constructor(){super();this.autofocus=!1;this.quiet=!1;this.iconOnly=!1;this.small=!1;this.loading=!1;this.disabled=!1;this.fullWidth=!1;Ct(this,Ce,null);et(jr,Nr,Vr,Fr,Br),this.ariaValueTextLoading=D.t({id:"button.aria.loading",message:"Loading...",comment:"Screen reader message for buttons that are loading"})}updated(r){r.has("value")&&this.setValue(this.value)}connectedCallback(){super.connectedCallback();let r=this.variant||"secondary";if(!Hr.includes(r))throw new Error(`Invalid "variant" attribute. Set its value to one of the following:
|
|
3825
3825
|
${Hr.join(", ")}.`);St(this,Ce,this.value)}closestWithId(r){var a;let o=this.shadowRoot,n=null;try{for(;o;){if(n=o.getElementById(r),n)return n;o=(a=o.getRootNode().host)==null?void 0:a.getRootNode()}}catch(i){}return document.getElementById(r)}firstUpdated(){this.autofocus&&!this.href&&setTimeout(()=>this.focus(),0),this.buttonEl&&this.commandfor&&(this.buttonEl.commandForElement=this.closestWithId(this.commandfor))}_handleButtonClick(){this.type==="submit"?this.internals.form.requestSubmit():this.type==="reset"&&this.internals.form.reset()}resetFormControl(){this.value=Et(this,Ce)}render(){let r=this.variant||"secondary";return tt` ${this.href?tt`
|
|
3826
3826
|
<w-link
|
|
3827
3827
|
href=${this.href}
|