@warp-ds/elements 2.2.0-next.20 → 2.2.0-next.21
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/api.js.map +1 -1
- package/dist/custom-elements.json +1219 -1078
- package/dist/index.d.ts +194 -173
- package/dist/packages/affix/affix.react.stories.d.ts +9 -0
- package/dist/packages/affix/affix.react.stories.js +10 -0
- package/dist/packages/affix/affix.stories.js +1 -1
- package/dist/packages/affix/index.js +1 -1
- package/dist/packages/affix/index.js.map +4 -4
- package/dist/packages/affix/react.d.ts +1 -1
- package/dist/packages/affix/react.js +10 -3
- package/dist/packages/alert/alert.react.stories.d.ts +13 -0
- package/dist/packages/alert/alert.react.stories.js +44 -0
- package/dist/packages/alert/alert.stories.js +1 -1
- package/dist/packages/alert/alert.test.js +3 -1
- package/dist/packages/alert/index.d.ts +1 -1
- package/dist/packages/alert/index.js +1 -1
- package/dist/packages/alert/index.js.map +4 -4
- package/dist/packages/alert/react.d.ts +1 -1
- package/dist/packages/alert/react.js +6 -3
- package/dist/packages/attention/attention.react.stories.d.ts +15 -0
- package/dist/packages/attention/attention.react.stories.js +92 -0
- package/dist/packages/attention/attention.stories.js +17 -32
- package/dist/packages/attention/attention.test.js +1 -1
- package/dist/packages/attention/index.d.ts +3 -2
- package/dist/packages/attention/index.js +238 -17
- package/dist/packages/attention/index.js.map +4 -4
- package/dist/packages/attention/react.d.ts +15 -1
- package/dist/packages/attention/react.js +13 -5
- package/dist/packages/badge/badge.react.stories.d.ts +18 -0
- package/dist/packages/badge/badge.react.stories.js +60 -0
- package/dist/packages/badge/badge.stories.js +1 -1
- package/dist/packages/badge/index.js +1 -1
- package/dist/packages/badge/index.js.map +4 -4
- package/dist/packages/badge/react.d.ts +1 -1
- package/dist/packages/badge/react.js +6 -3
- package/dist/packages/box/box.react.stories.d.ts +15 -0
- package/dist/packages/box/box.react.stories.js +45 -0
- package/dist/packages/box/box.stories.js +1 -1
- package/dist/packages/box/index.js +3 -3
- package/dist/packages/box/index.js.map +4 -4
- package/dist/packages/box/react.d.ts +1 -1
- package/dist/packages/box/react.js +6 -3
- package/dist/packages/breadcrumbs/breadcrumbs.react.stories.d.ts +13 -0
- package/dist/packages/breadcrumbs/breadcrumbs.react.stories.js +40 -0
- package/dist/packages/breadcrumbs/breadcrumbs.stories.js +1 -1
- package/dist/packages/breadcrumbs/index.js +6 -6
- package/dist/packages/breadcrumbs/index.js.map +4 -4
- package/dist/packages/breadcrumbs/react.d.ts +1 -1
- package/dist/packages/breadcrumbs/react.js +6 -3
- package/dist/packages/button/button.react.stories.d.ts +22 -0
- package/dist/packages/button/button.react.stories.js +102 -0
- package/dist/packages/button/button.stories.js +1 -1
- package/dist/packages/button/index.js +2 -2
- package/dist/packages/button/index.js.map +4 -4
- package/dist/packages/button/react.d.ts +1 -1
- package/dist/packages/button/react.js +6 -3
- package/dist/packages/card/card.react.stories.d.ts +16 -0
- package/dist/packages/card/card.react.stories.js +63 -0
- package/dist/packages/card/card.stories.js +2 -2
- package/dist/packages/card/index.d.ts +1 -1
- package/dist/packages/card/index.js +2 -2
- package/dist/packages/card/index.js.map +4 -4
- package/dist/packages/card/react.d.ts +1 -1
- package/dist/packages/card/react.js +6 -3
- package/dist/packages/combobox/combobox.react.stories.d.ts +28 -0
- package/dist/packages/combobox/combobox.react.stories.js +90 -0
- package/dist/packages/combobox/combobox.stories.d.ts +5 -1
- package/dist/packages/combobox/combobox.stories.js +47 -25
- package/dist/packages/combobox/index.d.ts +1 -1
- package/dist/packages/combobox/index.js +4 -4
- package/dist/packages/combobox/index.js.map +4 -4
- package/dist/packages/combobox/react.d.ts +7 -0
- package/dist/packages/combobox/react.js +17 -0
- package/dist/packages/datepicker/DatePicker.test.d.ts +1 -0
- package/dist/packages/datepicker/DatePicker.test.js +3 -2
- package/dist/packages/datepicker/datepicker.d.ts +1 -1
- package/dist/packages/datepicker/datepicker.js +105 -105
- package/dist/packages/datepicker/datepicker.js.map +4 -4
- package/dist/packages/datepicker/datepicker.react.stories.d.ts +18 -0
- package/dist/packages/datepicker/datepicker.react.stories.js +26 -0
- package/dist/packages/datepicker/datepicker.stories.js +1 -1
- package/dist/packages/datepicker/datepicker.test.js +1 -1
- package/dist/packages/datepicker/index.js +105 -105
- package/dist/packages/datepicker/index.js.map +4 -4
- package/dist/packages/datepicker/react.d.ts +5 -2
- package/dist/packages/datepicker/react.js +10 -3
- package/dist/packages/dead-toggle/dead-toggle.react.stories.d.ts +15 -0
- package/dist/packages/dead-toggle/dead-toggle.react.stories.js +34 -0
- package/dist/packages/dead-toggle/dead-toggle.stories.d.ts +5 -1
- package/dist/packages/dead-toggle/dead-toggle.stories.js +25 -3
- package/dist/packages/dead-toggle/index.js +1 -1
- package/dist/packages/dead-toggle/index.js.map +2 -2
- package/dist/packages/dead-toggle/react.d.ts +1 -1
- package/dist/packages/dead-toggle/react.js +6 -3
- package/dist/packages/expandable/expandable.react.stories.d.ts +18 -0
- package/dist/packages/expandable/expandable.react.stories.js +103 -0
- package/dist/packages/expandable/expandable.stories.js +1 -1
- package/dist/packages/expandable/index.js +2 -2
- package/dist/packages/expandable/index.js.map +4 -4
- package/dist/packages/expandable/react.d.ts +1 -1
- package/dist/packages/expandable/react.js +6 -3
- package/dist/packages/i18n.js +2 -1
- package/dist/packages/link/index.js +1 -1
- package/dist/packages/link/index.js.map +4 -4
- package/dist/packages/link/link.react.stories.d.ts +21 -0
- package/dist/packages/link/link.react.stories.js +96 -0
- package/dist/packages/link/link.stories.js +1 -12
- package/dist/packages/link/link.test.js +1 -1
- package/dist/packages/link/react.d.ts +1 -1
- package/dist/packages/link/react.js +6 -3
- package/dist/packages/modal/index.js +8 -8
- package/dist/packages/modal/index.js.map +4 -4
- package/dist/packages/modal/modal-footer.js +3 -3
- package/dist/packages/modal/modal-footer.js.map +3 -3
- package/dist/packages/modal/modal-header.js +4 -4
- package/dist/packages/modal/modal-header.js.map +4 -4
- package/dist/packages/modal/modal-main.js.map +1 -1
- package/dist/packages/modal/modal.react.stories.d.ts +14 -0
- package/dist/packages/modal/modal.react.stories.js +27 -0
- package/dist/packages/modal/modal.stories.d.ts +1 -1
- package/dist/packages/modal/modal.stories.js +1 -1
- package/dist/packages/modal/react.d.ts +11 -3
- package/dist/packages/modal/react.js +19 -6
- package/dist/packages/pageindicator/pageindicator.react.stories.d.ts +19 -0
- package/dist/packages/pageindicator/pageindicator.react.stories.js +20 -0
- package/dist/packages/pageindicator/pageindicator.stories.d.ts +1 -1
- package/dist/packages/pageindicator/pageindicator.stories.js +1 -1
- package/dist/packages/pageindicator/react.d.ts +1 -1
- package/dist/packages/pageindicator/react.js +6 -3
- package/dist/packages/pagination/index.js +9 -3
- package/dist/packages/pagination/index.js.map +3 -3
- package/dist/packages/pagination/pagination.react.stories.d.ts +21 -0
- package/dist/packages/pagination/pagination.react.stories.js +45 -0
- package/dist/packages/pagination/pagination.stories.js +6 -6
- package/dist/packages/pagination/pagination.test.js +1 -1
- package/dist/packages/pagination/react.d.ts +5 -2
- package/dist/packages/pagination/react.js +10 -3
- package/dist/packages/pill/index.js.map +2 -2
- package/dist/packages/pill/pill.react.stories.d.ts +23 -0
- package/dist/packages/pill/pill.react.stories.js +22 -0
- package/dist/packages/pill/pill.stories.js +1 -1
- package/dist/packages/pill/pill.test.js +3 -1
- package/dist/packages/pill/react.d.ts +7 -0
- package/dist/packages/pill/react.js +17 -0
- package/dist/packages/rip-and-tear-checkbox/checkbox.js +5 -5
- package/dist/packages/rip-and-tear-checkbox/checkbox.js.map +3 -3
- package/dist/packages/rip-and-tear-checkbox/checkbox.stories.d.ts +8 -0
- package/dist/packages/rip-and-tear-checkbox/checkbox.stories.js +11 -0
- package/dist/packages/rip-and-tear-checkbox/index.js +5 -5
- package/dist/packages/rip-and-tear-checkbox/index.js.map +3 -3
- package/dist/packages/rip-and-tear-checkbox/react.d.ts +5 -0
- package/dist/packages/rip-and-tear-checkbox/react.js +15 -0
- package/dist/packages/rip-and-tear-checkbox/rip-and-tear-checkbox.react.stories.d.ts +12 -0
- package/dist/packages/rip-and-tear-checkbox/rip-and-tear-checkbox.react.stories.js +10 -0
- package/dist/packages/rip-and-tear-radio/index.js +8 -8
- package/dist/packages/rip-and-tear-radio/index.js.map +3 -3
- package/dist/packages/rip-and-tear-radio/radio-group.js +8 -8
- package/dist/packages/rip-and-tear-radio/radio-group.js.map +3 -3
- package/dist/packages/rip-and-tear-radio/radio.js.map +2 -2
- package/dist/packages/rip-and-tear-radio/radio.stories.js +9 -9
- package/dist/packages/rip-and-tear-radio/radio.stories.js.map +3 -3
- package/dist/packages/rip-and-tear-radio/react.d.ts +9 -0
- package/dist/packages/rip-and-tear-radio/react.js +22 -0
- package/dist/packages/rip-and-tear-radio/rip-and-tear-radio.react.stories.d.ts +9 -0
- package/dist/packages/rip-and-tear-radio/rip-and-tear-radio.react.stories.js +10 -0
- package/dist/packages/rip-and-tear-radio/slot.js +3 -3
- package/dist/packages/select/index.d.ts +4 -4
- package/dist/packages/select/index.js +12 -12
- package/dist/packages/select/index.js.map +3 -3
- package/dist/packages/select/react.d.ts +6 -2
- package/dist/packages/select/react.js +15 -3
- package/dist/packages/select/select.react.stories.d.ts +18 -0
- package/dist/packages/select/select.react.stories.js +28 -0
- package/dist/packages/select/select.stories.js +2 -2
- package/dist/packages/select/select.test.js +1 -1
- package/dist/packages/slider/Slider.js +1 -1
- package/dist/packages/slider/SliderThumb.js +1 -1
- package/dist/packages/slider/index.js +6 -6
- package/dist/packages/slider/index.js.map +4 -4
- package/dist/packages/slider/react.d.ts +8 -0
- package/dist/packages/slider/react.js +20 -0
- package/dist/packages/slider/slider-thumb.js +2 -2
- package/dist/packages/slider/slider-thumb.js.map +4 -4
- package/dist/packages/slider/slider.js +2 -2
- package/dist/packages/slider/slider.js.map +4 -4
- package/dist/packages/slider/slider.react.stories.d.ts +18 -0
- package/dist/packages/slider/slider.react.stories.js +119 -0
- package/dist/packages/slider/slider.stories.js +2 -2
- package/dist/packages/slider/slider.test.js +1 -1
- package/dist/packages/steps/index.js +2 -2
- package/dist/packages/steps/index.js.map +4 -4
- package/dist/packages/steps/react.d.ts +1 -1
- package/dist/packages/steps/react.js +7 -4
- package/dist/packages/steps/steps.react.stories.d.ts +15 -0
- package/dist/packages/steps/steps.react.stories.js +112 -0
- package/dist/packages/switch/index.js +1 -1
- package/dist/packages/switch/index.js.map +4 -4
- package/dist/packages/switch/react.d.ts +5 -2
- package/dist/packages/switch/react.js +10 -3
- package/dist/packages/switch/switch.react.stories.d.ts +15 -0
- package/dist/packages/switch/switch.react.stories.js +29 -0
- package/dist/packages/tabs/index.d.ts +1 -1
- package/dist/packages/tabs/index.js +12 -12
- package/dist/packages/tabs/index.js.map +4 -4
- package/dist/packages/tabs/react.d.ts +11 -3
- package/dist/packages/tabs/react.js +18 -5
- package/dist/packages/tabs/tab-panel.js.map +2 -2
- package/dist/packages/tabs/tab.js +1 -1
- package/dist/packages/tabs/tab.js.map +4 -4
- package/dist/packages/tabs/tabs.d.ts +2 -0
- package/dist/packages/tabs/tabs.js +4 -4
- package/dist/packages/tabs/tabs.js.map +4 -4
- package/dist/packages/tabs/tabs.react.stories.d.ts +15 -0
- package/dist/packages/tabs/tabs.react.stories.js +51 -0
- package/dist/packages/tabs/tabs.stories.js +12 -12
- package/dist/packages/tabs/tabs.stories.js.map +4 -4
- package/dist/packages/textfield/index.js +1 -1
- package/dist/packages/textfield/index.js.map +4 -4
- package/dist/packages/textfield/react.d.ts +11 -2
- package/dist/packages/textfield/react.js +16 -3
- package/dist/packages/textfield/textfield.react.stories.d.ts +37 -0
- package/dist/packages/textfield/textfield.react.stories.js +88 -0
- package/dist/packages/textfield/textfield.stories.js +1 -1
- package/dist/packages/textfield/textfield.test.js +1 -1
- package/dist/packages/toast/api.d.ts +1 -1
- package/dist/packages/toast/index.d.ts +1 -1
- package/dist/packages/toast/index.js +14 -14
- package/dist/packages/toast/index.js.map +4 -4
- package/dist/packages/toast/toast-container.d.ts +1 -1
- package/dist/packages/toast/toast-container.js +2454 -149
- package/dist/packages/toast/toast-container.js.map +7 -0
- package/dist/packages/toast/toast.js +2459 -193
- package/dist/packages/toast/toast.js.map +7 -0
- package/dist/packages/toast/toast.stories.js +1 -1
- package/dist/packages/utils/expand-transition.js +1 -1
- package/dist/vscode.html-custom-data.json +90 -85
- package/dist/web-types.json +147 -139
- package/package.json +22 -21
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
var
|
|
2
|
-
`],["r","\r"],["t"," "],["v","\v"],["0","\0"]]);function
|
|
1
|
+
var Xr=Object.create;var dt=Object.defineProperty;var $t=Object.getOwnPropertyDescriptor;var Zr=Object.getOwnPropertyNames;var Jr=Object.getPrototypeOf,Gr=Object.prototype.hasOwnProperty;var _t=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Wr=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Zr(t))!Gr.call(e,i)&&i!==r&&dt(e,i,{get:()=>t[i],enumerable:!(o=$t(t,i))||o.enumerable});return e};var Kr=(e,t,r)=>(r=e!=null?Xr(Jr(e)):{},Wr(t||!e||!e.__esModule?dt(r,"default",{value:e,enumerable:!0}):r,e));var $=(e,t,r,o)=>{for(var i=o>1?void 0:o?$t(t,r):t,a=e.length-1,n;a>=0;a--)(n=e[a])&&(i=(o?n(t,r,i):n(i))||i);return o&&i&&dt(t,r,i),i};var Ct=_t(pe=>{"use strict";Object.defineProperty(pe,"__esModule",{value:!0});pe.errorMessages=pe.ErrorType=void 0;var ke;(function(e){e.MalformedUnicode="MALFORMED_UNICODE",e.MalformedHexadecimal="MALFORMED_HEXADECIMAL",e.CodePointLimit="CODE_POINT_LIMIT",e.OctalDeprecation="OCTAL_DEPRECATION",e.EndOfString="END_OF_STRING"})(ke=pe.ErrorType||(pe.ErrorType={}));pe.errorMessages=new Map([[ke.MalformedUnicode,"malformed Unicode character escape sequence"],[ke.MalformedHexadecimal,"malformed hexadecimal character escape sequence"],[ke.CodePointLimit,"Unicode codepoint must not be greater than 0x10FFFF in escape sequence"],[ke.OctalDeprecation,'"0"-prefixed octal literals and octal escape sequences are deprecated; for octal literals use the "0o" prefix instead'],[ke.EndOfString,"malformed escape sequence at end of string"]])});var Lt=_t(se=>{"use strict";Object.defineProperty(se,"__esModule",{value:!0});se.unraw=se.errorMessages=se.ErrorType=void 0;var H=Ct();Object.defineProperty(se,"ErrorType",{enumerable:!0,get:function(){return H.ErrorType}});Object.defineProperty(se,"errorMessages",{enumerable:!0,get:function(){return H.errorMessages}});function eo(e){return!e.match(/[^a-f0-9]/i)?parseInt(e,16):NaN}function Re(e,t,r){let o=eo(e);if(Number.isNaN(o)||r!==void 0&&r!==e.length)throw new SyntaxError(H.errorMessages.get(t));return o}function to(e){let t=Re(e,H.ErrorType.MalformedHexadecimal,2);return String.fromCharCode(t)}function St(e,t){let r=Re(e,H.ErrorType.MalformedUnicode,4);if(t!==void 0){let o=Re(t,H.ErrorType.MalformedUnicode,4);return String.fromCharCode(r,o)}return String.fromCharCode(r)}function ro(e){return e.charAt(0)==="{"&&e.charAt(e.length-1)==="}"}function oo(e){if(!ro(e))throw new SyntaxError(H.errorMessages.get(H.ErrorType.MalformedUnicode));let t=e.slice(1,-1),r=Re(t,H.ErrorType.MalformedUnicode);try{return String.fromCodePoint(r)}catch(o){throw o instanceof RangeError?new SyntaxError(H.errorMessages.get(H.ErrorType.CodePointLimit)):o}}function io(e,t=!1){if(t)throw new SyntaxError(H.errorMessages.get(H.ErrorType.OctalDeprecation));let r=parseInt(e,8);return String.fromCharCode(r)}var no=new Map([["b","\b"],["f","\f"],["n",`
|
|
2
|
+
`],["r","\r"],["t"," "],["v","\v"],["0","\0"]]);function ao(e){return no.get(e)||e}var so=/\\(?:(\\)|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 Et(e,t=!1){return e.replace(so,function(r,o,i,a,n,s,l,d,c){if(o!==void 0)return"\\";if(i!==void 0)return to(i);if(a!==void 0)return oo(a);if(n!==void 0)return St(n,s);if(l!==void 0)return St(l);if(d==="0")return"\0";if(d!==void 0)return io(d,!t);if(c!==void 0)return ao(c);throw new SyntaxError(H.errorMessages.get(H.ErrorType.EndOfString))})}se.unraw=Et;se.default=Et});var ye=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return e.reduce(function(r,o){return r.concat(typeof o=="string"?o:Array.isArray(o)?ye.apply(void 0,o):typeof o=="object"&&o?Object.keys(o).map(function(i){return o[i]?i:""}):"")},[]).join(" ")};var Dt=Kr(Lt(),1);var ue=e=>typeof e=="string",lo=e=>typeof e=="function",Ot=new Map,zt="en";function pt(e){return[...Array.isArray(e)?e:[e],zt]}function ht(e,t,r){let o=pt(e);r||(r="default");let i;if(typeof r=="string")switch(i={day:"numeric",month:"short",year:"numeric"},r){case"full":i.weekday="long";case"long":i.month="long";break;case"short":i.month="numeric";break}else i=r;return je(()=>Fe("date",o,r),()=>new Intl.DateTimeFormat(o,i)).format(ue(t)?new Date(t):t)}function co(e,t,r){let o;if(r||(r="default"),typeof r=="string")switch(o={second:"numeric",minute:"numeric",hour:"numeric"},r){case"full":case"long":o.timeZoneName="short";break;case"short":delete o.second}else o=r;return ht(e,t,o)}function ut(e,t,r){let o=pt(e);return je(()=>Fe("number",o,r),()=>new Intl.NumberFormat(o,r)).format(t)}function At(e,t,r,{offset:o=0,...i}){var s,l;let a=pt(e),n=t?je(()=>Fe("plural-ordinal",a),()=>new Intl.PluralRules(a,{type:"ordinal"})):je(()=>Fe("plural-cardinal",a),()=>new Intl.PluralRules(a,{type:"cardinal"}));return(l=(s=i[r])!=null?s:i[n.select(r-o)])!=null?l:i.other}function je(e,t){let r=e(),o=Ot.get(r);return o||(o=t(),Ot.set(r,o)),o}function Fe(e,t,r){let o=t.join("-");return`${e}-${o}-${JSON.stringify(r)}`}var Tt=/\\u[a-fA-F0-9]{4}|\\x[a-fA-F0-9]{2}/,Mt="%__lingui_octothorpe__%",uo=(e,t,r={})=>{let o=t||e,i=n=>typeof n=="object"?n:r[n],a=(n,s)=>{let l=Object.keys(r).length?i("number"):void 0,d=ut(o,n,l);return s.replace(new RegExp(Mt,"g"),d)};return{plural:(n,s)=>{let{offset:l=0}=s,d=At(o,!1,n,s);return a(n-l,d)},selectordinal:(n,s)=>{let{offset:l=0}=s,d=At(o,!0,n,s);return a(n-l,d)},select:go,number:(n,s)=>ut(o,n,i(s)||{style:s}),date:(n,s)=>ht(o,n,i(s)||s),time:(n,s)=>co(o,n,i(s)||s)}},go=(e,t)=>{var r;return(r=t[e])!=null?r:t.other};function mo(e,t,r){return(o={},i)=>{let a=uo(t,r,i),n=(l,d=!1)=>Array.isArray(l)?l.reduce((c,g)=>{if(g==="#"&&d)return c+Mt;if(ue(g))return c+g;let[f,u,b]=g,x={};u==="plural"||u==="selectordinal"||u==="select"?Object.entries(b).forEach(([_,C])=>{x[_]=n(C,u==="plural"||u==="selectordinal")}):x=b;let v;if(u){let _=a[u];v=_(o[f],x)}else v=o[f];return v==null?c:c+v},""):l,s=n(e);return ue(s)&&Tt.test(s)?(0,Dt.unraw)(s):ue(s)?s:s?String(s):""}}var po=Object.defineProperty,ho=(e,t,r)=>t in e?po(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,bo=(e,t,r)=>(ho(e,typeof t!="symbol"?t+"":t,r),r),gt=class{constructor(){bo(this,"_events",{})}on(t,r){var i;var o;return(i=(o=this._events)[t])!=null||(o[t]=[]),this._events[t].push(r),()=>this.removeListener(t,r)}removeListener(t,r){let o=this._getListeners(t);if(!o)return;let i=o.indexOf(r);~i&&o.splice(i,1)}emit(t,...r){let o=this._getListeners(t);o&&o.map(i=>i.apply(this,r))}_getListeners(t){let r=this._events[t];return Array.isArray(r)?r:!1}},fo=Object.defineProperty,vo=(e,t,r)=>t in e?fo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,he=(e,t,r)=>(vo(e,typeof t!="symbol"?t+"":t,r),r),mt=class extends gt{constructor(t){var r;super(),he(this,"_locale",""),he(this,"_locales"),he(this,"_localeData",{}),he(this,"_messages",{}),he(this,"_missing"),he(this,"_messageCompiler"),he(this,"t",this._.bind(this)),t.missing!=null&&(this._missing=t.missing),t.messages!=null&&this.load(t.messages),t.localeData!=null&&this.loadLocaleData(t.localeData),(typeof t.locale=="string"||t.locales)&&this.activate((r=t.locale)!=null?r:zt,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,r){let o=this._localeData[t];o?Object.assign(o,r):this._localeData[t]=r}setMessagesCompiler(t){return this._messageCompiler=t,this}loadLocaleData(t,r){typeof t=="string"?this._loadLocaleData(t,r):Object.keys(t).forEach(o=>this._loadLocaleData(o,t[o])),this.emit("change")}_load(t,r){let o=this._messages[t];o?Object.assign(o,r):this._messages[t]=r}load(t,r){typeof t=="string"&&typeof r=="object"?this._load(t,r):Object.entries(t).forEach(([o,i])=>this._load(o,i)),this.emit("change")}loadAndActivate({locale:t,locales:r,messages:o}){this._locale=t,this._locales=r||void 0,this._messages[this._locale]=o,this.emit("change")}activate(t,r){this._locale=t,this._locales=r,this.emit("change")}_(t,r,o){if(!this.locale)throw new Error("Lingui: Attempted to call a translation function without setting a locale.\nMake sure to call `i18n.activate(locale)` before using Lingui functions.\nThis issue may also occur due to a race condition in your initialization logic.");let i=o==null?void 0:o.message;t||(t=""),ue(t)||(r=t.values||r,i=t.message,t=t.id);let a=this.messages[t],n=a===void 0,s=this._missing;if(s&&n)return lo(s)?s(this._locale,t):s;n&&this.emit("missing",{id:t,locale:this._locale});let l=a||i||t;return ue(l)&&(this._messageCompiler?l=this._messageCompiler(l):console.warn(`Uncompiled message detected! Message:
|
|
3
3
|
|
|
4
4
|
> ${l}
|
|
5
5
|
|
|
@@ -7,7 +7,7 @@ That means you use raw catalog or your catalog doesn't have a translation for th
|
|
|
7
7
|
ICU features such as interpolation and plurals will not work properly for that message.
|
|
8
8
|
|
|
9
9
|
Please compile your catalog first.
|
|
10
|
-
`)),G(l)&&bt.test(l)?JSON.parse(`"${l}"`):G(l)?l:Br(l,this._locale,this._locales)(r,o==null?void 0:o.formats)}date(t,r){return Ge(this._locales||this._locale,t,r)}number(t,r){return qe(this._locales||this._locale,t,r)}};function Vr(e={}){return new Je(e)}var y=Vr();var xt=["top","right","bottom","left"];var U=Math.min,A=Math.max,fe=Math.round;var j=e=>({x:e,y:e}),Zr={left:"right",right:"left",bottom:"top",top:"bottom"},qr={start:"end",end:"start"};function Ce(e,t,r){return A(e,U(t,r))}function Q(e,t){return typeof e=="function"?e(t):e}function V(e){return e.split("-")[0]}function oe(e){return e.split("-")[1]}function Qe(e){return e==="x"?"y":"x"}function Ae(e){return e==="y"?"height":"width"}var Wr=new Set(["top","bottom"]);function B(e){return Wr.has(V(e))?"y":"x"}function Se(e){return Qe(B(e))}function yt(e,t,r){r===void 0&&(r=!1);let o=oe(e),n=Se(e),a=Ae(n),i=n==="x"?o===(r?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(i=ue(i)),[i,ue(i)]}function kt(e){let t=ue(e);return[Oe(e),t,Oe(t)]}function Oe(e){return e.replace(/start|end/g,t=>qr[t])}var vt=["left","right"],wt=["right","left"],Jr=["top","bottom"],Kr=["bottom","top"];function Gr(e,t,r){switch(e){case"top":case"bottom":return r?t?wt:vt:t?vt:wt;case"left":case"right":return t?Jr:Kr;default:return[]}}function Et(e,t,r,o){let n=oe(e),a=Gr(V(e),r==="start",o);return n&&(a=a.map(i=>i+"-"+n),t&&(a=a.concat(a.map(Oe)))),a}function ue(e){return e.replace(/left|right|bottom|top/g,t=>Zr[t])}function Qr(e){return{top:0,right:0,bottom:0,left:0,...e}}function et(e){return typeof e!="number"?Qr(e):{top:e,right:e,bottom:e,left:e}}function ne(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 _t(e,t,r){let{reference:o,floating:n}=e,a=B(t),i=Se(t),s=Ae(i),l=V(t),d=a==="y",c=o.x+o.width/2-n.width/2,p=o.y+o.height/2-n.height/2,u=o[s]/2-n[s]/2,g;switch(l){case"top":g={x:c,y:o.y-n.height};break;case"bottom":g={x:c,y:o.y+o.height};break;case"right":g={x:o.x+o.width,y:p};break;case"left":g={x:o.x-n.width,y:p};break;default:g={x:o.x,y:o.y}}switch(oe(t)){case"start":g[i]-=u*(r&&d?-1:1);break;case"end":g[i]+=u*(r&&d?-1:1);break}return g}var At=async(e,t,r)=>{let{placement:o="bottom",strategy:n="absolute",middleware:a=[],platform:i}=r,s=a.filter(Boolean),l=await(i.isRTL==null?void 0:i.isRTL(t)),d=await i.getElementRects({reference:e,floating:t,strategy:n}),{x:c,y:p}=_t(d,o,l),u=o,g={},m=0;for(let f=0;f<s.length;f++){let{name:b,fn:h}=s[f],{x:v,y:w,data:E,reset:x}=await h({x:c,y:p,initialPlacement:o,placement:u,strategy:n,middlewareData:g,rects:d,platform:i,elements:{reference:e,floating:t}});c=v!=null?v:c,p=w!=null?w:p,g={...g,[b]:{...g[b],...E}},x&&m<=50&&(m++,typeof x=="object"&&(x.placement&&(u=x.placement),x.rects&&(d=x.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:n}):x.rects),{x:c,y:p}=_t(d,u,l)),f=-1)}return{x:c,y:p,placement:u,strategy:n,middlewareData:g}};async function ce(e,t){var r;t===void 0&&(t={});let{x:o,y:n,platform:a,rects:i,elements:s,strategy:l}=e,{boundary:d="clippingAncestors",rootBoundary:c="viewport",elementContext:p="floating",altBoundary:u=!1,padding:g=0}=Q(t,e),m=et(g),b=s[u?p==="floating"?"reference":"floating":p],h=ne(await a.getClippingRect({element:(r=await(a.isElement==null?void 0:a.isElement(b)))==null||r?b:b.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(s.floating)),boundary:d,rootBoundary:c,strategy:l})),v=p==="floating"?{x:o,y:n,width:i.floating.width,height:i.floating.height}:i.reference,w=await(a.getOffsetParent==null?void 0:a.getOffsetParent(s.floating)),E=await(a.isElement==null?void 0:a.isElement(w))?await(a.getScale==null?void 0:a.getScale(w))||{x:1,y:1}:{x:1,y:1},x=ne(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:v,offsetParent:w,strategy:l}):v);return{top:(h.top-x.top+m.top)/E.y,bottom:(x.bottom-h.bottom+m.bottom)/E.y,left:(h.left-x.left+m.left)/E.x,right:(x.right-h.right+m.right)/E.x}}var St=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:d,padding:c=0}=Q(e,t)||{};if(d==null)return{};let p=et(c),u={x:r,y:o},g=Se(n),m=Ae(g),f=await i.getDimensions(d),b=g==="y",h=b?"top":"left",v=b?"bottom":"right",w=b?"clientHeight":"clientWidth",E=a.reference[m]+a.reference[g]-u[g]-a.floating[m],x=u[g]-a.reference[g],q=await(i.getOffsetParent==null?void 0:i.getOffsetParent(d)),T=q?q[w]:0;(!T||!await(i.isElement==null?void 0:i.isElement(q)))&&(T=s.floating[w]||a.floating[m]);let I=E/2-x/2,N=T/2-f[m]/2-1,D=U(p[h],N),W=U(p[v],N),F=D,J=T-f[m]-W,_=T/2-f[m]/2+I,ee=Ce(F,_,J),Y=!l.arrow&&oe(n)!=null&&_!==ee&&a.reference[m]/2-(_<F?D:W)-f[m]/2<0,M=Y?_<F?_-F:_-J:0;return{[g]:u[g]+M,data:{[g]:ee,centerOffset:_-ee-M,...Y&&{alignmentOffset:M}},reset:Y}}});var Lt=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:d}=t,{mainAxis:c=!0,crossAxis:p=!0,fallbackPlacements:u,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:f=!0,...b}=Q(e,t);if((r=a.arrow)!=null&&r.alignmentOffset)return{};let h=V(n),v=B(s),w=V(s)===s,E=await(l.isRTL==null?void 0:l.isRTL(d.floating)),x=u||(w||!f?[ue(s)]:kt(s)),q=m!=="none";!u&&q&&x.push(...Et(s,f,m,E));let T=[s,...x],I=await ce(t,b),N=[],D=((o=a.flip)==null?void 0:o.overflows)||[];if(c&&N.push(I[h]),p){let _=yt(n,i,E);N.push(I[_[0]],I[_[1]])}if(D=[...D,{placement:n,overflows:N}],!N.every(_=>_<=0)){var W,F;let _=(((W=a.flip)==null?void 0:W.index)||0)+1,ee=T[_];if(ee&&(!(p==="alignment"?v!==B(ee):!1)||D.every(P=>B(P.placement)===v?P.overflows[0]>0:!0)))return{data:{index:_,overflows:D},reset:{placement:ee}};let Y=(F=D.filter(M=>M.overflows[0]<=0).sort((M,P)=>M.overflows[1]-P.overflows[1])[0])==null?void 0:F.placement;if(!Y)switch(g){case"bestFit":{var J;let M=(J=D.filter(P=>{if(q){let K=B(P.placement);return K===v||K==="y"}return!0}).map(P=>[P.placement,P.overflows.filter(K=>K>0).reduce((K,yr)=>K+yr,0)]).sort((P,K)=>P[1]-K[1])[0])==null?void 0:J[0];M&&(Y=M);break}case"initialPlacement":Y=s;break}if(n!==Y)return{reset:{placement:Y}}}return{}}}};function Ot(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Ct(e){return xt.some(t=>e[t]>=0)}var Dt=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){let{rects:r}=t,{strategy:o="referenceHidden",...n}=Q(e,t);switch(o){case"referenceHidden":{let a=await ce(t,{...n,elementContext:"reference"}),i=Ot(a,r.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:Ct(i)}}}case"escaped":{let a=await ce(t,{...n,altBoundary:!0}),i=Ot(a,r.floating);return{data:{escapedOffsets:i,escaped:Ct(i)}}}default:return{}}}}};var eo=new Set(["left","top"]);async function to(e,t){let{placement:r,platform:o,elements:n}=e,a=await(o.isRTL==null?void 0:o.isRTL(n.floating)),i=V(r),s=oe(r),l=B(r)==="y",d=eo.has(i)?-1:1,c=a&&l?-1:1,p=Q(t,e),{mainAxis:u,crossAxis:g,alignmentAxis:m}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return s&&typeof m=="number"&&(g=s==="end"?m*-1:m),l?{x:g*c,y:u*d}:{x:u*d,y:g*c}}var zt=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 to(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}}}}},Rt=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:r,y:o,placement:n}=t,{mainAxis:a=!0,crossAxis:i=!1,limiter:s={fn:b=>{let{x:h,y:v}=b;return{x:h,y:v}}},...l}=Q(e,t),d={x:r,y:o},c=await ce(t,l),p=B(V(n)),u=Qe(p),g=d[u],m=d[p];if(a){let b=u==="y"?"top":"left",h=u==="y"?"bottom":"right",v=g+c[b],w=g-c[h];g=Ce(v,g,w)}if(i){let b=p==="y"?"top":"left",h=p==="y"?"bottom":"right",v=m+c[b],w=m-c[h];m=Ce(v,m,w)}let f=s.fn({...t,[u]:g,[p]:m});return{...f,data:{x:f.x-r,y:f.y-o,enabled:{[u]:a,[p]:i}}}}}};var Tt=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=()=>{},...d}=Q(e,t),c=await ce(t,d),p=V(n),u=oe(n),g=B(n)==="y",{width:m,height:f}=a.floating,b,h;p==="top"||p==="bottom"?(b=p,h=u===(await(i.isRTL==null?void 0:i.isRTL(s.floating))?"start":"end")?"left":"right"):(h=p,b=u==="end"?"top":"bottom");let v=f-c.top-c.bottom,w=m-c.left-c.right,E=U(f-c[b],v),x=U(m-c[h],w),q=!t.middlewareData.shift,T=E,I=x;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(I=w),(o=t.middlewareData.shift)!=null&&o.enabled.y&&(T=v),q&&!u){let D=A(c.left,0),W=A(c.right,0),F=A(c.top,0),J=A(c.bottom,0);g?I=m-2*(D!==0||W!==0?D+W:A(c.left,c.right)):T=f-2*(F!==0||J!==0?F+J:A(c.top,c.bottom))}await l({...t,availableWidth:I,availableHeight:T});let N=await i.getDimensions(s.floating);return m!==N.width||f!==N.height?{reset:{rects:!0}}:{}}}};function De(){return typeof window!="undefined"}function ie(e){return Pt(e)?(e.nodeName||"").toLowerCase():"#document"}function S(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function H(e){var t;return(t=(Pt(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Pt(e){return De()?e instanceof Node||e instanceof S(e).Node:!1}function z(e){return De()?e instanceof Element||e instanceof S(e).Element:!1}function $(e){return De()?e instanceof HTMLElement||e instanceof S(e).HTMLElement:!1}function Mt(e){return!De()||typeof ShadowRoot=="undefined"?!1:e instanceof ShadowRoot||e instanceof S(e).ShadowRoot}var ro=new Set(["inline","contents"]);function de(e){let{overflow:t,overflowX:r,overflowY:o,display:n}=R(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+r)&&!ro.has(n)}var oo=new Set(["table","td","th"]);function jt(e){return oo.has(ie(e))}var no=[":popover-open",":modal"];function be(e){return no.some(t=>{try{return e.matches(t)}catch(r){return!1}})}var io=["transform","translate","scale","rotate","perspective"],ao=["transform","translate","scale","rotate","perspective","filter"],so=["paint","layout","strict","content"];function ze(e){let t=Re(),r=z(e)?R(e):e;return io.some(o=>r[o]?r[o]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||ao.some(o=>(r.willChange||"").includes(o))||so.some(o=>(r.contain||"").includes(o))}function $t(e){let t=Z(e);for(;$(t)&&!ae(t);){if(ze(t))return t;if(be(t))return null;t=Z(t)}return null}function Re(){return typeof CSS=="undefined"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}var lo=new Set(["html","body","#document"]);function ae(e){return lo.has(ie(e))}function R(e){return S(e).getComputedStyle(e)}function he(e){return z(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Z(e){if(ie(e)==="html")return e;let t=e.assignedSlot||e.parentNode||Mt(e)&&e.host||H(e);return Mt(t)?t.host:t}function Nt(e){let t=Z(e);return ae(t)?e.ownerDocument?e.ownerDocument.body:e.body:$(t)&&de(t)?t:Nt(t)}function Le(e,t,r){var o;t===void 0&&(t=[]),r===void 0&&(r=!0);let n=Nt(e),a=n===((o=e.ownerDocument)==null?void 0:o.body),i=S(n);if(a){let s=Te(i);return t.concat(i,i.visualViewport||[],de(n)?n:[],s&&r?Le(s):[])}return t.concat(n,Le(n,[],r))}function Te(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function It(e){let t=R(e),r=parseFloat(t.width)||0,o=parseFloat(t.height)||0,n=$(e),a=n?e.offsetWidth:r,i=n?e.offsetHeight:o,s=fe(r)!==a||fe(o)!==i;return s&&(r=a,o=i),{width:r,height:o,$:s}}function Yt(e){return z(e)?e:e.contextElement}function pe(e){let t=Yt(e);if(!$(t))return j(1);let r=t.getBoundingClientRect(),{width:o,height:n,$:a}=It(t),i=(a?fe(r.width):r.width)/o,s=(a?fe(r.height):r.height)/n;return(!i||!Number.isFinite(i))&&(i=1),(!s||!Number.isFinite(s))&&(s=1),{x:i,y:s}}var co=j(0);function Xt(e){let t=S(e);return!Re()||!t.visualViewport?co:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function po(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==S(e)?!1:t}function ve(e,t,r,o){t===void 0&&(t=!1),r===void 0&&(r=!1);let n=e.getBoundingClientRect(),a=Yt(e),i=j(1);t&&(o?z(o)&&(i=pe(o)):i=pe(e));let s=po(a,r,o)?Xt(a):j(0),l=(n.left+s.x)/i.x,d=(n.top+s.y)/i.y,c=n.width/i.x,p=n.height/i.y;if(a){let u=S(a),g=o&&z(o)?S(o):o,m=u,f=Te(m);for(;f&&o&&g!==m;){let b=pe(f),h=f.getBoundingClientRect(),v=R(f),w=h.left+(f.clientLeft+parseFloat(v.paddingLeft))*b.x,E=h.top+(f.clientTop+parseFloat(v.paddingTop))*b.y;l*=b.x,d*=b.y,c*=b.x,p*=b.y,l+=w,d+=E,m=S(f),f=Te(m)}}return ne({width:c,height:p,x:l,y:d})}function Me(e,t){let r=he(e).scrollLeft;return t?t.left+r:ve(H(e)).left+r}function Ut(e,t){let r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-Me(e,r),n=r.top+t.scrollTop;return{x:o,y:n}}function go(e){let{elements:t,rect:r,offsetParent:o,strategy:n}=e,a=n==="fixed",i=H(o),s=t?be(t.floating):!1;if(o===i||s&&a)return r;let l={scrollLeft:0,scrollTop:0},d=j(1),c=j(0),p=$(o);if((p||!p&&!a)&&((ie(o)!=="body"||de(i))&&(l=he(o)),$(o))){let g=ve(o);d=pe(o),c.x=g.x+o.clientLeft,c.y=g.y+o.clientTop}let u=i&&!p&&!a?Ut(i,l):j(0);return{width:r.width*d.x,height:r.height*d.y,x:r.x*d.x-l.scrollLeft*d.x+c.x+u.x,y:r.y*d.y-l.scrollTop*d.y+c.y+u.y}}function mo(e){return Array.from(e.getClientRects())}function uo(e){let t=H(e),r=he(e),o=e.ownerDocument.body,n=A(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),a=A(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight),i=-r.scrollLeft+Me(e),s=-r.scrollTop;return R(o).direction==="rtl"&&(i+=A(t.clientWidth,o.clientWidth)-n),{width:n,height:a,x:i,y:s}}var Ft=25;function fo(e,t){let r=S(e),o=H(e),n=r.visualViewport,a=o.clientWidth,i=o.clientHeight,s=0,l=0;if(n){a=n.width,i=n.height;let c=Re();(!c||c&&t==="fixed")&&(s=n.offsetLeft,l=n.offsetTop)}let d=Me(o);if(d<=0){let c=o.ownerDocument,p=c.body,u=getComputedStyle(p),g=c.compatMode==="CSS1Compat"&&parseFloat(u.marginLeft)+parseFloat(u.marginRight)||0,m=Math.abs(o.clientWidth-p.clientWidth-g);m<=Ft&&(a-=m)}else d<=Ft&&(a+=d);return{width:a,height:i,x:s,y:l}}var bo=new Set(["absolute","fixed"]);function ho(e,t){let r=ve(e,!0,t==="fixed"),o=r.top+e.clientTop,n=r.left+e.clientLeft,a=$(e)?pe(e):j(1),i=e.clientWidth*a.x,s=e.clientHeight*a.y,l=n*a.x,d=o*a.y;return{width:i,height:s,x:l,y:d}}function Bt(e,t,r){let o;if(t==="viewport")o=fo(e,r);else if(t==="document")o=uo(H(e));else if(z(t))o=ho(t,r);else{let n=Xt(e);o={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return ne(o)}function Vt(e,t){let r=Z(e);return r===t||!z(r)||ae(r)?!1:R(r).position==="fixed"||Vt(r,t)}function vo(e,t){let r=t.get(e);if(r)return r;let o=Le(e,[],!1).filter(s=>z(s)&&ie(s)!=="body"),n=null,a=R(e).position==="fixed",i=a?Z(e):e;for(;z(i)&&!ae(i);){let s=R(i),l=ze(i);!l&&s.position==="fixed"&&(n=null),(a?!l&&!n:!l&&s.position==="static"&&!!n&&bo.has(n.position)||de(i)&&!l&&Vt(e,i))?o=o.filter(c=>c!==i):n=s,i=Z(i)}return t.set(e,o),o}function wo(e){let{element:t,boundary:r,rootBoundary:o,strategy:n}=e,i=[...r==="clippingAncestors"?be(t)?[]:vo(t,this._c):[].concat(r),o],s=i[0],l=i.reduce((d,c)=>{let p=Bt(t,c,n);return d.top=A(p.top,d.top),d.right=U(p.right,d.right),d.bottom=U(p.bottom,d.bottom),d.left=A(p.left,d.left),d},Bt(t,s,n));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function xo(e){let{width:t,height:r}=It(e);return{width:t,height:r}}function yo(e,t,r){let o=$(t),n=H(t),a=r==="fixed",i=ve(e,!0,a,t),s={scrollLeft:0,scrollTop:0},l=j(0);function d(){l.x=Me(n)}if(o||!o&&!a)if((ie(t)!=="body"||de(n))&&(s=he(t)),o){let g=ve(t,!0,a,t);l.x=g.x+t.clientLeft,l.y=g.y+t.clientTop}else n&&d();a&&!o&&n&&d();let c=n&&!o&&!a?Ut(n,s):j(0),p=i.left+s.scrollLeft-l.x-c.x,u=i.top+s.scrollTop-l.y-c.y;return{x:p,y:u,width:i.width,height:i.height}}function tt(e){return R(e).position==="static"}function Ht(e,t){if(!$(e)||R(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return H(e)===r&&(r=r.ownerDocument.body),r}function Zt(e,t){let r=S(e);if(be(e))return r;if(!$(e)){let n=Z(e);for(;n&&!ae(n);){if(z(n)&&!tt(n))return n;n=Z(n)}return r}let o=Ht(e,t);for(;o&&jt(o)&&tt(o);)o=Ht(o,t);return o&&ae(o)&&tt(o)&&!ze(o)?r:o||$t(e)||r}var ko=async function(e){let t=this.getOffsetParent||Zt,r=this.getDimensions,o=await r(e.floating);return{reference:yo(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function Eo(e){return R(e).direction==="rtl"}var _o={convertOffsetParentRelativeRectToViewportRelativeRect:go,getDocumentElement:H,getClippingRect:wo,getOffsetParent:Zt,getElementRects:ko,getClientRects:mo,getDimensions:xo,getScale:pe,isElement:z,isRTL:Eo};var qt=zt;var Wt=Rt,Jt=Lt,Kt=Tt,Gt=Dt,Qt=St;var er=(e,t,r)=>{let o=new Map,n={platform:_o,...r},a={...n.platform,_c:o};return At(e,t,{...n,platform:a})};var je="top-start",$e="top",Ne="top-end",Fe="right-start",Be="right",He="right-end",Ie="bottom-start",we="bottom",Ye="bottom-end",Xe="left-start",Ue="left",Ve="left-end",rt=[je,$e,Ne,Fe,Be,He,Ie,we,Ye,Xe,Ue,Ve],se={[je]:Ie,[$e]:we,[Ne]:Ye,[Ie]:je,[we]:$e,[Ye]:Ne,[Xe]:Fe,[Ue]:Be,[Ve]:He,[Fe]:Xe,[Be]:Ue,[He]:Ve},Oo={[Xe]:-45,[Ue]:-45,[Ve]:-45,[je]:45,[$e]:45,[Ne]:45,[Fe]:135,[Be]:135,[He]:135,[Ie]:-135,[we]:-135,[Ye]:-135},ot=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},Co=e=>e.split("-")[0],Ao=e=>se[Co(e)],rr=e=>se[e],So=e=>Oo[rr(e)],Lo=(e,t,r)=>{Object.assign(e==null?void 0:e.style,{borderTopLeftRadius:"4px",zIndex:1,[`margin${ot(Ao(r))}`]:"-0.5px",transform:`rotate(${t}deg)`})},tr=8,Pe=24;async function nt(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 er(t,r,{placement:(o=e==null?void 0:e.directionName)!=null?o:we,middleware:[qt({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)&&Jt({crossAxis:e==null?void 0:e.crossAxis,fallbackPlacements:e==null?void 0:e.fallbackPlacements}),(e==null?void 0:e.flip)&&Wt({crossAxis:!0}),!(e!=null&&e.noArrow)&&(e==null?void 0:e.arrowEl)&&Qt({element:e==null?void 0:e.arrowEl}),Gt(),Kt({apply(){Object.assign(r.style,{paddingRight:`${tr}px`,paddingLeft:`${tr}px`})}})]}).then(({x:i,y:s,middlewareData:l,placement:d})=>{if(e.actualDirection=d,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:p,y:u}=l.arrow,g=window.getComputedStyle(r).direction==="rtl",m=rr(d).split("-")[1],f="",b="",h="",v="";if(m==="start"){let w=typeof p=="number"?`calc(${Pe}px - ${c.offsetWidth/2}px)`:"";f=typeof u=="number"?`calc(${Pe}px - ${c.offsetWidth/2}px)`:"",b=g?w:"",v=g?"":w}else if(m==="end"){let w=typeof p=="number"?`calc(${Pe}px - ${c.offsetWidth/2}px)`:"";b=g?"":w,v=g?w:"",h=typeof u=="number"?`calc(${Pe}px - ${c.offsetWidth/2}px)`:""}else v=typeof p=="number"?`${p}px`:"",f=typeof u=="number"?`${u}px`:"";Object.assign(c.style,{top:f,right:b,bottom:h,left:v}),Lo(c,So(d),d)}}),e}import{property as L}from"lit/decorators.js";import{ifDefined as Jo}from"lit/directives/if-defined.js";var Do=["en","nb","fi","da","sv"],nr="en",or=e=>Do.find(t=>e===t||e.toLowerCase().includes(t))||nr;function zo(){if(typeof window=="undefined"){let e=process.env.NMP_LANGUAGE||Intl.DateTimeFormat().resolvedOptions().locale;return or(e)}try{let e=document.documentElement.lang;return or(e)}catch(e){return console.warn("could not detect locale, falling back to source locale",e),nr}}var Ro=(e,t,r,o,n,a)=>e==="nb"?r:e==="fi"?o:e==="da"?n:e==="sv"?a:t,ir=(e,t,r,o,n)=>{let a=zo(),i=Ro(a,e,t,r,o,n);y.load(a,i),y.activate(a)};import{css as ar}from"lit";var sr=ar`
|
|
10
|
+
`)),ue(l)&&Tt.test(l)?JSON.parse(`"${l}"`):ue(l)?l:mo(l,this._locale,this._locales)(r,o==null?void 0:o.formats)}date(t,r){return ht(this._locales||this._locale,t,r)}number(t,r){return ut(this._locales||this._locale,t,r)}};function wo(e={}){return new mt(e)}var P=wo();var jt=["top","right","bottom","left"];var le=Math.min,Y=Math.max,Ae=Math.round;var re=e=>({x:e,y:e}),xo={left:"right",right:"left",bottom:"top",top:"bottom"},yo={start:"end",end:"start"};function qe(e,t,r){return Y(e,le(t,r))}function ge(e,t){return typeof e=="function"?e(t):e}function ce(e){return e.split("-")[0]}function be(e){return e.split("-")[1]}function bt(e){return e==="x"?"y":"x"}function Ve(e){return e==="y"?"height":"width"}var ko=new Set(["top","bottom"]);function ne(e){return ko.has(ce(e))?"y":"x"}function Be(e){return bt(ne(e))}function Ft(e,t,r){r===void 0&&(r=!1);let o=be(e),i=Be(e),a=Ve(i),n=i==="x"?o===(r?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(n=Oe(n)),[n,Oe(n)]}function Nt(e){let t=Oe(e);return[Ne(e),t,Ne(t)]}function Ne(e){return e.replace(/start|end/g,t=>yo[t])}var Pt=["left","right"],Rt=["right","left"],$o=["top","bottom"],_o=["bottom","top"];function Co(e,t,r){switch(e){case"top":case"bottom":return r?t?Rt:Pt:t?Pt:Rt;case"left":case"right":return t?$o:_o;default:return[]}}function qt(e,t,r,o){let i=be(e),a=Co(ce(e),r==="start",o);return i&&(a=a.map(n=>n+"-"+i),t&&(a=a.concat(a.map(Ne)))),a}function Oe(e){return e.replace(/left|right|bottom|top/g,t=>xo[t])}function So(e){return{top:0,right:0,bottom:0,left:0,...e}}function ft(e){return typeof e!="number"?So(e):{top:e,right:e,bottom:e,left:e}}function fe(e){let{x:t,y:r,width:o,height:i}=e;return{width:o,height:i,top:r,left:t,right:t+o,bottom:r+i,x:t,y:r}}function Vt(e,t,r){let{reference:o,floating:i}=e,a=ne(t),n=Be(t),s=Ve(n),l=ce(t),d=a==="y",c=o.x+o.width/2-i.width/2,g=o.y+o.height/2-i.height/2,f=o[s]/2-i[s]/2,u;switch(l){case"top":u={x:c,y:o.y-i.height};break;case"bottom":u={x:c,y:o.y+o.height};break;case"right":u={x:o.x+o.width,y:g};break;case"left":u={x:o.x-i.width,y:g};break;default:u={x:o.x,y:o.y}}switch(be(t)){case"start":u[n]-=f*(r&&d?-1:1);break;case"end":u[n]+=f*(r&&d?-1:1);break}return u}var Ht=async(e,t,r)=>{let{placement:o="bottom",strategy:i="absolute",middleware:a=[],platform:n}=r,s=a.filter(Boolean),l=await(n.isRTL==null?void 0:n.isRTL(t)),d=await n.getElementRects({reference:e,floating:t,strategy:i}),{x:c,y:g}=Vt(d,o,l),f=o,u={},b=0;for(let x=0;x<s.length;x++){let{name:v,fn:_}=s[x],{x:C,y:E,data:q,reset:D}=await _({x:c,y:g,initialPlacement:o,placement:f,strategy:i,middlewareData:u,rects:d,platform:n,elements:{reference:e,floating:t}});c=C!=null?C:c,g=E!=null?E:g,u={...u,[v]:{...u[v],...q}},D&&b<=50&&(b++,typeof D=="object"&&(D.placement&&(f=D.placement),D.rects&&(d=D.rects===!0?await n.getElementRects({reference:e,floating:t,strategy:i}):D.rects),{x:c,y:g}=Vt(d,f,l)),x=-1)}return{x:c,y:g,placement:f,strategy:i,middlewareData:u}};async function $e(e,t){var r;t===void 0&&(t={});let{x:o,y:i,platform:a,rects:n,elements:s,strategy:l}=e,{boundary:d="clippingAncestors",rootBoundary:c="viewport",elementContext:g="floating",altBoundary:f=!1,padding:u=0}=ge(t,e),b=ft(u),v=s[f?g==="floating"?"reference":"floating":g],_=fe(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:d,rootBoundary:c,strategy:l})),C=g==="floating"?{x:o,y:i,width:n.floating.width,height:n.floating.height}:n.reference,E=await(a.getOffsetParent==null?void 0:a.getOffsetParent(s.floating)),q=await(a.isElement==null?void 0:a.isElement(E))?await(a.getScale==null?void 0:a.getScale(E))||{x:1,y:1}:{x:1,y:1},D=fe(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:C,offsetParent:E,strategy:l}):C);return{top:(_.top-D.top+b.top)/q.y,bottom:(D.bottom-_.bottom+b.bottom)/q.y,left:(_.left-D.left+b.left)/q.x,right:(D.right-_.right+b.right)/q.x}}var It=e=>({name:"arrow",options:e,async fn(t){let{x:r,y:o,placement:i,rects:a,platform:n,elements:s,middlewareData:l}=t,{element:d,padding:c=0}=ge(e,t)||{};if(d==null)return{};let g=ft(c),f={x:r,y:o},u=Be(i),b=Ve(u),x=await n.getDimensions(d),v=u==="y",_=v?"top":"left",C=v?"bottom":"right",E=v?"clientHeight":"clientWidth",q=a.reference[b]+a.reference[u]-f[u]-a.floating[b],D=f[u]-a.reference[u],w=await(n.getOffsetParent==null?void 0:n.getOffsetParent(d)),y=w?w[E]:0;(!y||!await(n.isElement==null?void 0:n.isElement(w)))&&(y=s.floating[E]||a.floating[b]);let L=q/2-D/2,A=y/2-x[b]/2-1,z=le(g[_],A),I=le(g[C],A),B=z,U=y-x[b]-I,j=y/2-x[b]/2+L,M=qe(B,j,U),Z=!l.arrow&&be(i)!=null&&j!==M&&a.reference[b]/2-(j<B?z:I)-x[b]/2<0,F=Z?j<B?j-B:j-U:0;return{[u]:f[u]+F,data:{[u]:M,centerOffset:j-M-F,...Z&&{alignmentOffset:F}},reset:Z}}});var Ut=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,o;let{placement:i,middlewareData:a,rects:n,initialPlacement:s,platform:l,elements:d}=t,{mainAxis:c=!0,crossAxis:g=!0,fallbackPlacements:f,fallbackStrategy:u="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:x=!0,...v}=ge(e,t);if((r=a.arrow)!=null&&r.alignmentOffset)return{};let _=ce(i),C=ne(s),E=ce(s)===s,q=await(l.isRTL==null?void 0:l.isRTL(d.floating)),D=f||(E||!x?[Oe(s)]:Nt(s)),w=b!=="none";!f&&w&&D.push(...qt(s,x,b,q));let y=[s,...D],L=await $e(t,v),A=[],z=((o=a.flip)==null?void 0:o.overflows)||[];if(c&&A.push(L[_]),g){let j=Ft(i,n,q);A.push(L[j[0]],L[j[1]])}if(z=[...z,{placement:i,overflows:A}],!A.every(j=>j<=0)){var I,B;let j=(((I=a.flip)==null?void 0:I.index)||0)+1,M=y[j];if(M&&(!(g==="alignment"?C!==ne(M):!1)||z.every(W=>ne(W.placement)===C?W.overflows[0]>0:!0)))return{data:{index:j,overflows:z},reset:{placement:M}};let Z=(B=z.filter(F=>F.overflows[0]<=0).sort((F,W)=>F.overflows[1]-W.overflows[1])[0])==null?void 0:B.placement;if(!Z)switch(u){case"bestFit":{var U;let F=(U=z.filter(W=>{if(w){let K=ne(W.placement);return K===C||K==="y"}return!0}).map(W=>[W.placement,W.overflows.filter(K=>K>0).reduce((K,Yr)=>K+Yr,0)]).sort((W,K)=>W[1]-K[1])[0])==null?void 0:U[0];F&&(Z=F);break}case"initialPlacement":Z=s;break}if(i!==Z)return{reset:{placement:Z}}}return{}}}};function Bt(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Qt(e){return jt.some(t=>e[t]>=0)}var Yt=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){let{rects:r}=t,{strategy:o="referenceHidden",...i}=ge(e,t);switch(o){case"referenceHidden":{let a=await $e(t,{...i,elementContext:"reference"}),n=Bt(a,r.reference);return{data:{referenceHiddenOffsets:n,referenceHidden:Qt(n)}}}case"escaped":{let a=await $e(t,{...i,altBoundary:!0}),n=Bt(a,r.floating);return{data:{escapedOffsets:n,escaped:Qt(n)}}}default:return{}}}}};var Eo=new Set(["left","top"]);async function Lo(e,t){let{placement:r,platform:o,elements:i}=e,a=await(o.isRTL==null?void 0:o.isRTL(i.floating)),n=ce(r),s=be(r),l=ne(r)==="y",d=Eo.has(n)?-1:1,c=a&&l?-1:1,g=ge(t,e),{mainAxis:f,crossAxis:u,alignmentAxis:b}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:g.mainAxis||0,crossAxis:g.crossAxis||0,alignmentAxis:g.alignmentAxis};return s&&typeof b=="number"&&(u=s==="end"?b*-1:b),l?{x:u*c,y:f*d}:{x:f*d,y:u*c}}var Xt=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,o;let{x:i,y:a,placement:n,middlewareData:s}=t,l=await Lo(t,e);return n===((r=s.offset)==null?void 0:r.placement)&&(o=s.arrow)!=null&&o.alignmentOffset?{}:{x:i+l.x,y:a+l.y,data:{...l,placement:n}}}}},Zt=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:r,y:o,placement:i}=t,{mainAxis:a=!0,crossAxis:n=!1,limiter:s={fn:v=>{let{x:_,y:C}=v;return{x:_,y:C}}},...l}=ge(e,t),d={x:r,y:o},c=await $e(t,l),g=ne(ce(i)),f=bt(g),u=d[f],b=d[g];if(a){let v=f==="y"?"top":"left",_=f==="y"?"bottom":"right",C=u+c[v],E=u-c[_];u=qe(C,u,E)}if(n){let v=g==="y"?"top":"left",_=g==="y"?"bottom":"right",C=b+c[v],E=b-c[_];b=qe(C,b,E)}let x=s.fn({...t,[f]:u,[g]:b});return{...x,data:{x:x.x-r,y:x.y-o,enabled:{[f]:a,[g]:n}}}}}};var Jt=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,o;let{placement:i,rects:a,platform:n,elements:s}=t,{apply:l=()=>{},...d}=ge(e,t),c=await $e(t,d),g=ce(i),f=be(i),u=ne(i)==="y",{width:b,height:x}=a.floating,v,_;g==="top"||g==="bottom"?(v=g,_=f===(await(n.isRTL==null?void 0:n.isRTL(s.floating))?"start":"end")?"left":"right"):(_=g,v=f==="end"?"top":"bottom");let C=x-c.top-c.bottom,E=b-c.left-c.right,q=le(x-c[v],C),D=le(b-c[_],E),w=!t.middlewareData.shift,y=q,L=D;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(L=E),(o=t.middlewareData.shift)!=null&&o.enabled.y&&(y=C),w&&!f){let z=Y(c.left,0),I=Y(c.right,0),B=Y(c.top,0),U=Y(c.bottom,0);u?L=b-2*(z!==0||I!==0?z+I:Y(c.left,c.right)):y=x-2*(B!==0||U!==0?B+U:Y(c.top,c.bottom))}await l({...t,availableWidth:L,availableHeight:y});let A=await n.getDimensions(s.floating);return b!==A.width||x!==A.height?{reset:{rects:!0}}:{}}}};function He(){return typeof window!="undefined"}function ve(e){return Wt(e)?(e.nodeName||"").toLowerCase():"#document"}function X(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ae(e){var t;return(t=(Wt(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Wt(e){return He()?e instanceof Node||e instanceof X(e).Node:!1}function ee(e){return He()?e instanceof Element||e instanceof X(e).Element:!1}function oe(e){return He()?e instanceof HTMLElement||e instanceof X(e).HTMLElement:!1}function Gt(e){return!He()||typeof ShadowRoot=="undefined"?!1:e instanceof ShadowRoot||e instanceof X(e).ShadowRoot}var Oo=new Set(["inline","contents"]);function _e(e){let{overflow:t,overflowX:r,overflowY:o,display:i}=te(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+r)&&!Oo.has(i)}var Ao=new Set(["table","td","th"]);function Kt(e){return Ao.has(ve(e))}var Do=[":popover-open",":modal"];function De(e){return Do.some(t=>{try{return e.matches(t)}catch(r){return!1}})}var zo=["transform","translate","scale","rotate","perspective"],To=["transform","translate","scale","rotate","perspective","filter"],Mo=["paint","layout","strict","content"];function Ie(e){let t=Ue(),r=ee(e)?te(e):e;return zo.some(o=>r[o]?r[o]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||To.some(o=>(r.willChange||"").includes(o))||Mo.some(o=>(r.contain||"").includes(o))}function er(e){let t=de(e);for(;oe(t)&&!we(t);){if(Ie(t))return t;if(De(t))return null;t=de(t)}return null}function Ue(){return typeof CSS=="undefined"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}var Po=new Set(["html","body","#document"]);function we(e){return Po.has(ve(e))}function te(e){return X(e).getComputedStyle(e)}function ze(e){return ee(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function de(e){if(ve(e)==="html")return e;let t=e.assignedSlot||e.parentNode||Gt(e)&&e.host||ae(e);return Gt(t)?t.host:t}function tr(e){let t=de(e);return we(t)?e.ownerDocument?e.ownerDocument.body:e.body:oe(t)&&_e(t)?t:tr(t)}function Qe(e,t,r){var o;t===void 0&&(t=[]),r===void 0&&(r=!0);let i=tr(e),a=i===((o=e.ownerDocument)==null?void 0:o.body),n=X(i);if(a){let s=Ye(n);return t.concat(n,n.visualViewport||[],_e(i)?i:[],s&&r?Qe(s):[])}return t.concat(i,Qe(i,[],r))}function Ye(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function nr(e){let t=te(e),r=parseFloat(t.width)||0,o=parseFloat(t.height)||0,i=oe(e),a=i?e.offsetWidth:r,n=i?e.offsetHeight:o,s=Ae(r)!==a||Ae(o)!==n;return s&&(r=a,o=n),{width:r,height:o,$:s}}function ar(e){return ee(e)?e:e.contextElement}function Ce(e){let t=ar(e);if(!oe(t))return re(1);let r=t.getBoundingClientRect(),{width:o,height:i,$:a}=nr(t),n=(a?Ae(r.width):r.width)/o,s=(a?Ae(r.height):r.height)/i;return(!n||!Number.isFinite(n))&&(n=1),(!s||!Number.isFinite(s))&&(s=1),{x:n,y:s}}var Ro=re(0);function sr(e){let t=X(e);return!Ue()||!t.visualViewport?Ro:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function jo(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==X(e)?!1:t}function Te(e,t,r,o){t===void 0&&(t=!1),r===void 0&&(r=!1);let i=e.getBoundingClientRect(),a=ar(e),n=re(1);t&&(o?ee(o)&&(n=Ce(o)):n=Ce(e));let s=jo(a,r,o)?sr(a):re(0),l=(i.left+s.x)/n.x,d=(i.top+s.y)/n.y,c=i.width/n.x,g=i.height/n.y;if(a){let f=X(a),u=o&&ee(o)?X(o):o,b=f,x=Ye(b);for(;x&&o&&u!==b;){let v=Ce(x),_=x.getBoundingClientRect(),C=te(x),E=_.left+(x.clientLeft+parseFloat(C.paddingLeft))*v.x,q=_.top+(x.clientTop+parseFloat(C.paddingTop))*v.y;l*=v.x,d*=v.y,c*=v.x,g*=v.y,l+=E,d+=q,b=X(x),x=Ye(b)}}return fe({width:c,height:g,x:l,y:d})}function Xe(e,t){let r=ze(e).scrollLeft;return t?t.left+r:Te(ae(e)).left+r}function lr(e,t){let r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-Xe(e,r),i=r.top+t.scrollTop;return{x:o,y:i}}function Fo(e){let{elements:t,rect:r,offsetParent:o,strategy:i}=e,a=i==="fixed",n=ae(o),s=t?De(t.floating):!1;if(o===n||s&&a)return r;let l={scrollLeft:0,scrollTop:0},d=re(1),c=re(0),g=oe(o);if((g||!g&&!a)&&((ve(o)!=="body"||_e(n))&&(l=ze(o)),oe(o))){let u=Te(o);d=Ce(o),c.x=u.x+o.clientLeft,c.y=u.y+o.clientTop}let f=n&&!g&&!a?lr(n,l):re(0);return{width:r.width*d.x,height:r.height*d.y,x:r.x*d.x-l.scrollLeft*d.x+c.x+f.x,y:r.y*d.y-l.scrollTop*d.y+c.y+f.y}}function No(e){return Array.from(e.getClientRects())}function qo(e){let t=ae(e),r=ze(e),o=e.ownerDocument.body,i=Y(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),a=Y(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight),n=-r.scrollLeft+Xe(e),s=-r.scrollTop;return te(o).direction==="rtl"&&(n+=Y(t.clientWidth,o.clientWidth)-i),{width:i,height:a,x:n,y:s}}var rr=25;function Vo(e,t){let r=X(e),o=ae(e),i=r.visualViewport,a=o.clientWidth,n=o.clientHeight,s=0,l=0;if(i){a=i.width,n=i.height;let c=Ue();(!c||c&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}let d=Xe(o);if(d<=0){let c=o.ownerDocument,g=c.body,f=getComputedStyle(g),u=c.compatMode==="CSS1Compat"&&parseFloat(f.marginLeft)+parseFloat(f.marginRight)||0,b=Math.abs(o.clientWidth-g.clientWidth-u);b<=rr&&(a-=b)}else d<=rr&&(a+=d);return{width:a,height:n,x:s,y:l}}var Bo=new Set(["absolute","fixed"]);function Qo(e,t){let r=Te(e,!0,t==="fixed"),o=r.top+e.clientTop,i=r.left+e.clientLeft,a=oe(e)?Ce(e):re(1),n=e.clientWidth*a.x,s=e.clientHeight*a.y,l=i*a.x,d=o*a.y;return{width:n,height:s,x:l,y:d}}function or(e,t,r){let o;if(t==="viewport")o=Vo(e,r);else if(t==="document")o=qo(ae(e));else if(ee(t))o=Qo(t,r);else{let i=sr(e);o={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return fe(o)}function cr(e,t){let r=de(e);return r===t||!ee(r)||we(r)?!1:te(r).position==="fixed"||cr(r,t)}function Ho(e,t){let r=t.get(e);if(r)return r;let o=Qe(e,[],!1).filter(s=>ee(s)&&ve(s)!=="body"),i=null,a=te(e).position==="fixed",n=a?de(e):e;for(;ee(n)&&!we(n);){let s=te(n),l=Ie(n);!l&&s.position==="fixed"&&(i=null),(a?!l&&!i:!l&&s.position==="static"&&!!i&&Bo.has(i.position)||_e(n)&&!l&&cr(e,n))?o=o.filter(c=>c!==n):i=s,n=de(n)}return t.set(e,o),o}function Io(e){let{element:t,boundary:r,rootBoundary:o,strategy:i}=e,n=[...r==="clippingAncestors"?De(t)?[]:Ho(t,this._c):[].concat(r),o],s=n[0],l=n.reduce((d,c)=>{let g=or(t,c,i);return d.top=Y(g.top,d.top),d.right=le(g.right,d.right),d.bottom=le(g.bottom,d.bottom),d.left=Y(g.left,d.left),d},or(t,s,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Uo(e){let{width:t,height:r}=nr(e);return{width:t,height:r}}function Yo(e,t,r){let o=oe(t),i=ae(t),a=r==="fixed",n=Te(e,!0,a,t),s={scrollLeft:0,scrollTop:0},l=re(0);function d(){l.x=Xe(i)}if(o||!o&&!a)if((ve(t)!=="body"||_e(i))&&(s=ze(t)),o){let u=Te(t,!0,a,t);l.x=u.x+t.clientLeft,l.y=u.y+t.clientTop}else i&&d();a&&!o&&i&&d();let c=i&&!o&&!a?lr(i,s):re(0),g=n.left+s.scrollLeft-l.x-c.x,f=n.top+s.scrollTop-l.y-c.y;return{x:g,y:f,width:n.width,height:n.height}}function vt(e){return te(e).position==="static"}function ir(e,t){if(!oe(e)||te(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return ae(e)===r&&(r=r.ownerDocument.body),r}function dr(e,t){let r=X(e);if(De(e))return r;if(!oe(e)){let i=de(e);for(;i&&!we(i);){if(ee(i)&&!vt(i))return i;i=de(i)}return r}let o=ir(e,t);for(;o&&Kt(o)&&vt(o);)o=ir(o,t);return o&&we(o)&&vt(o)&&!Ie(o)?r:o||er(e)||r}var Xo=async function(e){let t=this.getOffsetParent||dr,r=this.getDimensions,o=await r(e.floating);return{reference:Yo(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function Zo(e){return te(e).direction==="rtl"}var Jo={convertOffsetParentRelativeRectToViewportRelativeRect:Fo,getDocumentElement:ae,getClippingRect:Io,getOffsetParent:dr,getElementRects:Xo,getClientRects:No,getDimensions:Uo,getScale:Ce,isElement:ee,isRTL:Zo};var ur=Xt;var gr=Zt,mr=Ut,pr=Jt,hr=Yt,br=It;var fr=(e,t,r)=>{let o=new Map,i={platform:Jo,...r},a={...i.platform,_c:o};return Ht(e,t,{...i,platform:a})};var Je="top-start",Ge="top",We="top-end",Ke="right-start",et="right",tt="right-end",rt="bottom-start",Me="bottom",ot="bottom-end",it="left-start",nt="left",at="left-end",wt=[Je,Ge,We,Ke,et,tt,rt,Me,ot,it,nt,at],xe={[Je]:rt,[Ge]:Me,[We]:ot,[rt]:Je,[Me]:Ge,[ot]:We,[it]:Ke,[nt]:et,[at]:tt,[Ke]:it,[et]:nt,[tt]:at},Go={[it]:-45,[nt]:-45,[at]:-45,[Je]:45,[Ge]:45,[We]:45,[Ke]:135,[et]:135,[tt]:135,[rt]:-135,[Me]:-135,[ot]:-135},xt=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},Wo=e=>e.split("-")[0],Ko=e=>xe[Wo(e)],wr=e=>xe[e],ei=e=>Go[wr(e)],ti=(e,t,r)=>{Object.assign(e==null?void 0:e.style,{borderTopLeftRadius:"4px",zIndex:1,[`margin${xt(Ko(r))}`]:"-0.5px",transform:`rotate(${t}deg)`})},vr=8,Ze=24;async function yt(e){var o,i,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 fr(t,r,{placement:(o=e==null?void 0:e.directionName)!=null?o:Me,middleware:[ur({mainAxis:(i=e==null?void 0:e.distance)!=null?i:8,crossAxis:(a=e==null?void 0:e.skidding)!=null?a:0}),(e==null?void 0:e.flip)&&mr({crossAxis:e==null?void 0:e.crossAxis,fallbackPlacements:e==null?void 0:e.fallbackPlacements}),(e==null?void 0:e.flip)&&gr({crossAxis:!0}),!(e!=null&&e.noArrow)&&(e==null?void 0:e.arrowEl)&&br({element:e==null?void 0:e.arrowEl}),hr(),pr({apply(){Object.assign(r.style,{paddingRight:`${vr}px`,paddingLeft:`${vr}px`})}})]}).then(({x:n,y:s,middlewareData:l,placement:d})=>{if(e.actualDirection=d,e!=null&&e.isCallout||Object.assign(r.style,{left:`${n}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:f}=l.arrow,u=window.getComputedStyle(r).direction==="rtl",b=wr(d).split("-")[1],x="",v="",_="",C="";if(b==="start"){let E=typeof g=="number"?`calc(${Ze}px - ${c.offsetWidth/2}px)`:"";x=typeof f=="number"?`calc(${Ze}px - ${c.offsetWidth/2}px)`:"",v=u?E:"",C=u?"":E}else if(b==="end"){let E=typeof g=="number"?`calc(${Ze}px - ${c.offsetWidth/2}px)`:"";v=u?"":E,C=u?E:"",_=typeof f=="number"?`calc(${Ze}px - ${c.offsetWidth/2}px)`:""}else C=typeof g=="number"?`${g}px`:"",x=typeof f=="number"?`${f}px`:"";Object.assign(c.style,{top:x,right:v,bottom:_,left:C}),ti(c,ei(d),d)}}),e}import{css as _i,html as Ee,LitElement as Ci,nothing as Ir}from"lit";import{property as G}from"lit/decorators.js";import{ifDefined as Si}from"lit/directives/if-defined.js";var ri=["en","nb","fi","da","sv"],yr="en",xr=e=>ri.find(t=>e===t||e.toLowerCase().includes(t))||yr;function oi(){if(typeof window=="undefined"){let e=process.env.NMP_LANGUAGE||Intl.DateTimeFormat().resolvedOptions().locale;return xr(e)}try{let e=document.documentElement.lang;return xr(e)}catch(e){return console.warn("could not detect locale, falling back to source locale",e),yr}}var ii=(e,t,r,o,i,a)=>e==="nb"?r:e==="fi"?o:e==="da"?i:e==="sv"?a:t,st=(e,t,r,o,i)=>{let a=oi(),n=ii(a,e,t,r,o,i);P.load(a,n),P.activate(a)};import{css as kr}from"lit";var Se=kr`
|
|
11
11
|
*,
|
|
12
12
|
:before,
|
|
13
13
|
:after {
|
|
@@ -280,7 +280,7 @@ Please compile your catalog first.
|
|
|
280
280
|
svg {
|
|
281
281
|
pointer-events: none;
|
|
282
282
|
}
|
|
283
|
-
`,
|
|
283
|
+
`,on=kr`*, :before, :after {
|
|
284
284
|
--w-rotate: 0;
|
|
285
285
|
--w-rotate-x: 0;
|
|
286
286
|
--w-rotate-y: 0;
|
|
@@ -2446,7 +2446,7 @@ Please compile your catalog first.
|
|
|
2446
2446
|
display: none
|
|
2447
2447
|
}
|
|
2448
2448
|
}
|
|
2449
|
-
`;import{classMap as
|
|
2449
|
+
`;import{classMap as sn}from"lit/directives/class-map.js";function $r(){return`m${Math.random().toString(36).slice(2)}`}import{css as ni}from"lit";var _r=ni`
|
|
2450
2450
|
.place-self-auto {
|
|
2451
2451
|
place-self: auto;
|
|
2452
2452
|
}
|
|
@@ -3346,32 +3346,253 @@ Please compile your catalog first.
|
|
|
3346
3346
|
padding-top: 4rem;
|
|
3347
3347
|
padding-bottom: 4rem;
|
|
3348
3348
|
}
|
|
3349
|
-
`;var dr=JSON.parse('{"attention.aria.callout":["En gr\xF8n taleboble der introducerer noget nyt"],"attention.aria.close":["Luk"],"attention.aria.highlight":["En opm\xE6rksomhedsskabende taleboble med vigtig information"],"attention.aria.pointingDown":["peger nedad"],"attention.aria.pointingLeft":["peger til venstre"],"attention.aria.pointingRight":["peger til h\xF8jre"],"attention.aria.pointingUp":["peger opad"],"attention.aria.popover":["En hvid taleboble med mere information"],"attention.aria.tooltip":["En sort taleboble med flere oplysninger"]}');var pr=JSON.parse('{"attention.aria.callout":["A green speech bubble introducing something new"],"attention.aria.close":["Close"],"attention.aria.highlight":["An attention speech bubble with important information"],"attention.aria.pointingDown":["pointing down"],"attention.aria.pointingLeft":["pointing left"],"attention.aria.pointingRight":["pointing right"],"attention.aria.pointingUp":["pointing up"],"attention.aria.popover":["A white speech bubble providing additional information"],"attention.aria.tooltip":["A black speech bubble providing complementary information"]}');var gr=JSON.parse('{"attention.aria.callout":["Vihre\xE4 puhekupla, joka esittelee jotain uutta"],"attention.aria.close":["Sulje"],"attention.aria.highlight":["Puhekupla, joka sis\xE4lt\xE4\xE4 t\xE4rke\xE4\xE4 tietoa"],"attention.aria.pointingDown":["osoittaa alas"],"attention.aria.pointingLeft":["osoittaa vasemmalle"],"attention.aria.pointingRight":["osoittaa oikealle"],"attention.aria.pointingUp":["osoittaa yl\xF6s"],"attention.aria.popover":["Valkoinen puhekupla, joka tarjoaa lis\xE4tietoa"],"attention.aria.tooltip":["Musta puhekupla, joka tarjoaa t\xE4ydent\xE4v\xE4\xE4 tietoa"]}');var mr=JSON.parse('{"attention.aria.callout":["Gr\xF8nn taleboble som introduserer noe nytt"],"attention.aria.close":["Lukk"],"attention.aria.highlight":["En uthevet taleboble med viktig informasjon"],"attention.aria.pointingDown":["peker ned"],"attention.aria.pointingLeft":["peker til venstre"],"attention.aria.pointingRight":["peker til h\xF8yre"],"attention.aria.pointingUp":["peker opp"],"attention.aria.popover":["En hvit taleboble som gir tilleggsinformasjon"],"attention.aria.tooltip":["En svart taleboble som forklarer konteksten"]}');var ur=JSON.parse('{"attention.aria.callout":["En gr\xF6n pratbubbla som introducerar n\xE5got nytt"],"attention.aria.close":["St\xE4ng"],"attention.aria.highlight":["En pratbubbla med viktig information"],"attention.aria.pointingDown":["pekar ned"],"attention.aria.pointingLeft":["pekar v\xE4nster"],"attention.aria.pointingRight":["pekar h\xF6ger"],"attention.aria.pointingUp":["pekar upp"],"attention.aria.popover":["En vit pratbubbla som ger ytterligare information"],"attention.aria.tooltip":["En svart pratbubbla som ger kompletterande information"]}');import{css as Mo}from"lit";var fr=Mo`*,:before,:after{--w-rotate:0;--w-rotate-x:0;--w-rotate-y:0;--w-rotate-z:0;--w-scale-x:1;--w-scale-y:1;--w-scale-z:1;--w-skew-x:0;--w-skew-y:0;--w-translate-x:0;--w-translate-y:0;--w-translate-z:0}.hover\\:bg-clip-padding:hover{-webkit-background-clip:padding-box;background-clip:padding-box}.bg-transparent{background-color:#0000}.bg-\\[--w-color-button-primary-background\\]{background-color:var(--w-color-button-primary-background)}.bg-\\[--w-color-callout-background\\]{background-color:var(--w-color-callout-background)}.bg-\\[--w-s-color-surface-elevated-300\\]{background-color:var(--w-s-color-surface-elevated-300)}.hover\\:bg-\\[--w-color-button-pill-background-hover\\]:hover{background-color:var(--w-color-button-pill-background-hover)}.hover\\:bg-\\[--w-color-button-primary-background-hover\\]:hover{background-color:var(--w-color-button-primary-background-hover)}.active\\:bg-\\[--w-color-button-pill-background-active\\]:active{background-color:var(--w-color-button-pill-background-active)}.active\\:bg-\\[--w-color-button-primary-background-active\\]:active{background-color:var(--w-color-button-primary-background-active)}.border{border-width:1px}.border-0{border-width:0}.border-2{border-width:2px}.border-b-0{border-bottom-width:0}.border-r-0{border-right-width:0}.border-\\[--w-color-callout-border\\]{border-color:var(--w-color-callout-border)}.border-\\[--w-s-color-background-inverted\\]{border-color:var(--w-s-color-background-inverted)}.border-\\[--w-s-color-surface-elevated-300\\]{border-color:var(--w-s-color-surface-elevated-300)}.border-solid{border-style:solid}.rounded-4{border-radius:4px}.rounded-8{border-radius:8px}.rounded-full{border-radius:9999px}.rounded-tl-4{border-top-left-radius:4px}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.contents{display:contents}.hidden{display:none}.hover\\:underline:hover,.focus\\:underline:focus,.active\\:underline:active{text-decoration-line:underline}.focusable:focus{outline:2px solid var(--w-s-color-border-focus);outline-offset:var(--w-outline-offset,1px)}.focusable:focus-visible{outline:2px solid var(--w-s-color-border-focus);outline-offset:var(--w-outline-offset,1px)}.focusable:not(:focus-visible){outline:none}.items-start{align-items:flex-start}.items-center{align-items:center}.-bottom-\\[8px\\]{bottom:-8px}.-left-\\[8px\\]{left:-8px}.-right-\\[8px\\]{right:-8px}.-top-\\[8px\\]{top:-8px}.justify-center{justify-content:center}.justify-self-end{justify-self:end}.absolute{position:absolute}.relative{position:relative}.static{position:static}.z-50{z-index:50}.s-bg{background-color:var(--w-s-color-background)}.s-bg-disabled{background-color:var(--w-s-color-background-disabled)}.s-bg-inverted{background-color:var(--w-s-color-background-inverted)}.s-bg-negative{background-color:var(--w-s-color-background-negative)}.s-bg-subtle{background-color:var(--w-s-color-background-subtle)}.hover\\:s-bg-hover:hover{background-color:var(--w-s-color-background-hover)}.hover\\:s-bg-negative-hover:hover{background-color:var(--w-s-color-background-negative-hover)}.hover\\:s-bg-negative-subtle-hover:hover{background-color:var(--w-s-color-background-negative-subtle-hover)}.active\\:s-bg-active:active{background-color:var(--w-s-color-background-active)}.active\\:s-bg-negative-active:active{background-color:var(--w-s-color-background-negative-active)}.active\\:s-bg-negative-subtle-active:active{background-color:var(--w-s-color-background-negative-subtle-active)}.s-text{color:var(--w-s-color-text)}.s-text-inverted{color:var(--w-s-color-text-inverted)}.s-text-inverted-static{color:var(--w-s-color-text-inverted-static)}.s-text-link{color:var(--w-s-color-text-link)}.s-text-negative{color:var(--w-s-color-text-negative)}.s-icon{color:var(--w-s-color-icon)}.hover\\:s-icon-hover:hover{color:var(--w-s-color-icon-hover)}.active\\:s-icon-active:active{color:var(--w-s-color-icon-active)}.s-border{border-color:var(--w-s-color-border)}.hover\\:s-border-hover:hover{border-color:var(--w-s-color-border-hover)}.active\\:s-border-active:active{border-color:var(--w-s-color-border-active)}.drop-shadow-m{filter:drop-shadow(0 3px 8px #4040403d)drop-shadow(0 3px 6px #40404029)}.shadow-m{box-shadow:var(--w-shadow-m)}.h-\\[14px\\]{height:14px}.w-\\[14px\\]{width:14px}.-mr-8{margin-right:-.8rem}.last-child\\:mb-0>:last-child{margin-bottom:0}.ml-8{margin-left:.8rem}.p-16{padding:1.6rem}.p-4{padding:.4rem}.px-16{padding-left:1.6rem;padding-right:1.6rem}.px-8{padding-left:.8rem;padding-right:.8rem}.py-6{padding-top:.6rem;padding-bottom:.6rem}.py-8{padding-top:.8rem;padding-bottom:.8rem}.font-bold{font-weight:700}.resize{resize:both}.translate-z-0{--w-translate-z:0rem;transform:translateX(var(--w-translate-x))translateY(var(--w-translate-y))translateZ(var(--w-translate-z))rotate(var(--w-rotate))rotateX(var(--w-rotate-x))rotateY(var(--w-rotate-y))rotateZ(var(--w-rotate-z))skewX(var(--w-skew-x))skewY(var(--w-skew-y))scaleX(var(--w-scale-x))scaleY(var(--w-scale-y))scaleZ(var(--w-scale-z))}.transform{transform:translateX(var(--w-translate-x))translateY(var(--w-translate-y))translateZ(var(--w-translate-z))rotate(var(--w-rotate))rotateX(var(--w-rotate-x))rotateY(var(--w-rotate-y))rotateZ(var(--w-rotate-z))skewX(var(--w-skew-x))skewY(var(--w-skew-y))scaleX(var(--w-scale-x))scaleY(var(--w-scale-y))scaleZ(var(--w-scale-z))}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.text-m{font-size:var(--w-font-size-m);line-height:var(--w-line-height-m)}.text-xs{font-size:var(--w-font-size-xs);line-height:var(--w-line-height-xs)}.leading-\\[24\\]{line-height:2.4rem}`;import{LitElement as Po}from"lit";import{unsafeStatic as jo,html as $o}from"lit/static-html.js";var No=JSON.parse('{"icon.title.close":["Kryss"]}'),Fo=JSON.parse('{"icon.title.close":["Cross"]}'),Bo=JSON.parse('{"icon.title.close":["Rasti"]}'),Ho=JSON.parse('{"icon.title.close":["Kryds"]}'),Io=JSON.parse('{"icon.title.close":["Kryss"]}'),br=["en","nb","fi","da","sv"],hr="en",Yo=()=>{var e;let t;switch((e=process==null?void 0:process.env)==null?void 0:e.NMP_BRAND){case"FINN":t="nb";break;case"TORI":t="fi";break;case"BLOCKET":t="sv";break;case"DBA":t="da";break;default:t="en"}return t},vr=()=>{var e;let t=(e=document==null?void 0:document.location)==null?void 0:e.hostname;return t!=null&&t.includes("finn")?"nb":t.includes("tori")?"fi":t.includes("blocket")?"sv":t.includes("dba")?"da":hr},it=e=>br.find(t=>e===t||e.toLowerCase().includes(t))||vr();function Xo(){var e;if(typeof window=="undefined"){let t=Yo();return it(t)}try{let t=(e=document==null?void 0:document.documentElement)==null?void 0:e.lang,r=vr();return br.includes(t)?it(t!=null?t:r):(console.warn("Unsupported locale set in html lang tag, falling back to detection by hostname"),it(r))}catch(t){return console.warn("could not detect locale, falling back to source locale",t),hr}}var Uo=(e,t,r,o,n,a)=>e==="nb"?r:e==="fi"?o:e==="da"?n:e==="sv"?a:t,Vo=(e,t,r,o,n)=>{let a=Xo(),i=Uo(a,e,t,r,o,n);y.load(a,i),y.activate(a)};Vo(Fo,No,Bo,Ho,Io);var Zo=class extends Po{render(){let e=y.t({message:"Cross",id:"icon.title.close",comment:"Title for close icon"});return $o`<svg xmlns="http://www.w3.org/2000/svg"width="16"height="16"fill="none"viewBox="0 0 16 16" part="w-icon-close-16-part">${jo(`<title>${e}</title>`)}<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="m12.5 3.5-9 9m0-9 9 9"></path></svg>`}};customElements.get("w-icon-close-16")||customElements.define("w-icon-close-16",Zo);var Ko={medium:"text-m leading-[24]",xsmall:"text-xs"},xr={primary:"s-text-inverted bg-[--w-color-button-primary-background] hover:bg-[--w-color-button-primary-background-hover] active:bg-[--w-color-button-primary-background-active]",secondary:"s-text-link s-border s-bg hover:s-bg-hover hover:s-border-hover active:s-bg-active",utility:"s-text s-bg hover:s-bg-hover active:s-bg-active s-border hover:s-border-hover active:s-border-active",destructive:"s-bg-negative s-text-inverted hover:s-bg-negative-hover active:s-bg-negative-active",pill:"s-icon hover:s-icon-hover active:s-icon-active bg-transparent hover:bg-[--w-color-button-pill-background-hover] active:bg-[--w-color-button-pill-background-active]",disabled:"s-text-inverted s-bg-disabled",quiet:"bg-transparent s-text-link hover:s-bg-hover active:s-bg-active",utilityQuiet:"s-text bg-transparent hover:s-bg-hover active:s-bg-active",negativeQuiet:"bg-transparent s-text-negative hover:s-bg-negative-subtle-hover active:s-bg-negative-subtle-active",loading:"s-text s-bg-subtle",link:"s-text-link"},xe="font-bold focusable justify-center transition-colors ease-in-out",Go={primary:`border-0 rounded-8 ${xe}`,secondary:`border-2 rounded-8 ${xe}`,utility:`border rounded-4 ${xe}`,negative:`border-0 rounded-8 ${xe}`,pill:`p-4 rounded-full border-0 inline-flex items-center justify-center hover:bg-clip-padding ${xe}`,link:`bg-transparent focusable ease-in-out inline active:underline hover:underline focus:underline ${xr.link}`},me={base:"border-2 relative flex items-start",tooltip:"s-bg-inverted border-[--w-s-color-background-inverted] shadow-m s-text-inverted-static rounded-4 py-6 px-8",callout:"bg-[--w-color-callout-background] border-[--w-color-callout-border] s-text py-8 px-16 rounded-8",highlight:"bg-[--w-color-callout-background] border-[--w-color-callout-border] s-text py-8 px-16 rounded-8 drop-shadow-m translate-z-0",popover:"bg-[--w-s-color-surface-elevated-300] border-[--w-s-color-surface-elevated-300] s-text rounded-8 p-16 drop-shadow-m translate-z-0",arrowBase:"absolute h-[14px] w-[14px] border-2 border-b-0 border-r-0 rounded-tl-4 transform",arrowDirectionLeftStart:"-left-[8px]",arrowDirectionLeft:"-left-[8px]",arrowDirectionLeftEnd:"-left-[8px]",arrowDirectionRightStart:"-right-[8px]",arrowDirectionRight:"-right-[8px]",arrowDirectionRightEnd:"-right-[8px]",arrowDirectionBottomStart:"-bottom-[8px]",arrowDirectionBottom:"-bottom-[8px]",arrowDirectionBottomEnd:"-bottom-[8px]",arrowDirectionTopStart:"-top-[8px]",arrowDirectionTop:"-top-[8px]",arrowDirectionTopEnd:"-top-[8px]",arrowTooltip:"s-bg-inverted border-[--w-s-color-background-inverted]",arrowCallout:"bg-[--w-color-callout-background] border-[--w-color-callout-border]",arrowPopover:"bg-[--w-s-color-surface-elevated-300] border-[--w-s-color-surface-elevated-300]",arrowHighlight:"bg-[--w-color-callout-background] border-[--w-color-callout-border]",content:"last-child:mb-0",notCallout:"absolute z-50",closeBtn:`${Ko.medium} ${Go.pill} ${xr.pill} justify-self-end -mr-8 ml-8`},k=class extends Wo{constructor(){super(),ir(pr,mr,gr,dr,ur),this.handleDone=this.handleDone.bind(this),this.show=!1,this.placement="bottom",this.tooltip=!1,this.callout=!1,this.popover=!1,this.highlight=!1,this.canClose=!1,this.noArrow=!1,this.distance=8,this.skidding=0,this.flip=!1,this.crossAxis=!1,this._initialPlacement=this.placement,this._actualDirection=this.placement}connectedCallback(){if(super.connectedCallback(),this.placement&&!Object.keys(se).includes(this.placement))throw new Error(`Invalid "placement" attribute. Set its value to one of the following:
|
|
3350
|
-
|
|
3351
|
-
|
|
3352
|
-
|
|
3349
|
+
`;var Cr=JSON.parse('{"attention.aria.callout":["En gr\xF8n taleboble der introducerer noget nyt"],"attention.aria.close":["Luk"],"attention.aria.highlight":["En opm\xE6rksomhedsskabende taleboble med vigtig information"],"attention.aria.pointingDown":["peger nedad"],"attention.aria.pointingLeft":["peger til venstre"],"attention.aria.pointingRight":["peger til h\xF8jre"],"attention.aria.pointingUp":["peger opad"],"attention.aria.popover":["En hvid taleboble med mere information"],"attention.aria.tooltip":["En sort taleboble med flere oplysninger"]}');var Sr=JSON.parse('{"attention.aria.callout":["A green speech bubble introducing something new"],"attention.aria.close":["Close"],"attention.aria.highlight":["An attention speech bubble with important information"],"attention.aria.pointingDown":["pointing down"],"attention.aria.pointingLeft":["pointing left"],"attention.aria.pointingRight":["pointing right"],"attention.aria.pointingUp":["pointing up"],"attention.aria.popover":["A white speech bubble providing additional information"],"attention.aria.tooltip":["A black speech bubble providing complementary information"]}');var Er=JSON.parse('{"attention.aria.callout":["Vihre\xE4 puhekupla, joka esittelee jotain uutta"],"attention.aria.close":["Sulje"],"attention.aria.highlight":["Puhekupla, joka sis\xE4lt\xE4\xE4 t\xE4rke\xE4\xE4 tietoa"],"attention.aria.pointingDown":["osoittaa alas"],"attention.aria.pointingLeft":["osoittaa vasemmalle"],"attention.aria.pointingRight":["osoittaa oikealle"],"attention.aria.pointingUp":["osoittaa yl\xF6s"],"attention.aria.popover":["Valkoinen puhekupla, joka tarjoaa lis\xE4tietoa"],"attention.aria.tooltip":["Musta puhekupla, joka tarjoaa t\xE4ydent\xE4v\xE4\xE4 tietoa"]}');var Lr=JSON.parse('{"attention.aria.callout":["Gr\xF8nn taleboble som introduserer noe nytt"],"attention.aria.close":["Lukk"],"attention.aria.highlight":["En uthevet taleboble med viktig informasjon"],"attention.aria.pointingDown":["peker ned"],"attention.aria.pointingLeft":["peker til venstre"],"attention.aria.pointingRight":["peker til h\xF8yre"],"attention.aria.pointingUp":["peker opp"],"attention.aria.popover":["En hvit taleboble som gir tilleggsinformasjon"],"attention.aria.tooltip":["En svart taleboble som forklarer konteksten"]}');var Or=JSON.parse('{"attention.aria.callout":["En gr\xF6n pratbubbla som introducerar n\xE5got nytt"],"attention.aria.close":["St\xE4ng"],"attention.aria.highlight":["En pratbubbla med viktig information"],"attention.aria.pointingDown":["pekar ned"],"attention.aria.pointingLeft":["pekar v\xE4nster"],"attention.aria.pointingRight":["pekar h\xF6ger"],"attention.aria.pointingUp":["pekar upp"],"attention.aria.popover":["En vit pratbubbla som ger ytterligare information"],"attention.aria.tooltip":["En svart pratbubbla som ger kompletterande information"]}');import{css as ai}from"lit";var Ar=ai`*,:before,:after{--w-rotate:0;--w-rotate-x:0;--w-rotate-y:0;--w-rotate-z:0;--w-scale-x:1;--w-scale-y:1;--w-scale-z:1;--w-skew-x:0;--w-skew-y:0;--w-translate-x:0;--w-translate-y:0;--w-translate-z:0}.hover\\:bg-clip-padding:hover{-webkit-background-clip:padding-box;background-clip:padding-box}.bg-transparent{background-color:#0000}.bg-\\[--w-color-button-primary-background\\]{background-color:var(--w-color-button-primary-background)}.bg-\\[--w-color-callout-background\\]{background-color:var(--w-color-callout-background)}.bg-\\[--w-s-color-surface-elevated-300\\]{background-color:var(--w-s-color-surface-elevated-300)}.hover\\:bg-\\[--w-color-button-pill-background-hover\\]:hover{background-color:var(--w-color-button-pill-background-hover)}.hover\\:bg-\\[--w-color-button-primary-background-hover\\]:hover{background-color:var(--w-color-button-primary-background-hover)}.active\\:bg-\\[--w-color-button-pill-background-active\\]:active{background-color:var(--w-color-button-pill-background-active)}.active\\:bg-\\[--w-color-button-primary-background-active\\]:active{background-color:var(--w-color-button-primary-background-active)}.border{border-width:1px}.border-0{border-width:0}.border-2{border-width:2px}.border-b-0{border-bottom-width:0}.border-r-0{border-right-width:0}.border-\\[--w-color-callout-border\\]{border-color:var(--w-color-callout-border)}.border-\\[--w-s-color-background-inverted\\]{border-color:var(--w-s-color-background-inverted)}.border-\\[--w-s-color-surface-elevated-300\\]{border-color:var(--w-s-color-surface-elevated-300)}.border-solid{border-style:solid}.rounded-4{border-radius:4px}.rounded-8{border-radius:8px}.rounded-full{border-radius:9999px}.rounded-tl-4{border-top-left-radius:4px}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.contents{display:contents}.hidden{display:none}.hover\\:underline:hover,.focus\\:underline:focus,.active\\:underline:active{text-decoration-line:underline}.focusable:focus{outline:2px solid var(--w-s-color-border-focus);outline-offset:var(--w-outline-offset,1px)}.focusable:focus-visible{outline:2px solid var(--w-s-color-border-focus);outline-offset:var(--w-outline-offset,1px)}.focusable:not(:focus-visible){outline:none}.items-start{align-items:flex-start}.items-center{align-items:center}.-bottom-\\[8px\\]{bottom:-8px}.-left-\\[8px\\]{left:-8px}.-right-\\[8px\\]{right:-8px}.-top-\\[8px\\]{top:-8px}.justify-center{justify-content:center}.justify-self-end{justify-self:end}.absolute{position:absolute}.relative{position:relative}.static{position:static}.z-50{z-index:50}.s-bg{background-color:var(--w-s-color-background)}.s-bg-disabled{background-color:var(--w-s-color-background-disabled)}.s-bg-inverted{background-color:var(--w-s-color-background-inverted)}.s-bg-negative{background-color:var(--w-s-color-background-negative)}.s-bg-subtle{background-color:var(--w-s-color-background-subtle)}.hover\\:s-bg-hover:hover{background-color:var(--w-s-color-background-hover)}.hover\\:s-bg-negative-hover:hover{background-color:var(--w-s-color-background-negative-hover)}.hover\\:s-bg-negative-subtle-hover:hover{background-color:var(--w-s-color-background-negative-subtle-hover)}.active\\:s-bg-active:active{background-color:var(--w-s-color-background-active)}.active\\:s-bg-negative-active:active{background-color:var(--w-s-color-background-negative-active)}.active\\:s-bg-negative-subtle-active:active{background-color:var(--w-s-color-background-negative-subtle-active)}.s-text{color:var(--w-s-color-text)}.s-text-inverted{color:var(--w-s-color-text-inverted)}.s-text-inverted-static{color:var(--w-s-color-text-inverted-static)}.s-text-link{color:var(--w-s-color-text-link)}.s-text-negative{color:var(--w-s-color-text-negative)}.s-icon{color:var(--w-s-color-icon)}.hover\\:s-icon-hover:hover{color:var(--w-s-color-icon-hover)}.active\\:s-icon-active:active{color:var(--w-s-color-icon-active)}.s-border{border-color:var(--w-s-color-border)}.hover\\:s-border-hover:hover{border-color:var(--w-s-color-border-hover)}.active\\:s-border-active:active{border-color:var(--w-s-color-border-active)}.drop-shadow-m{filter:drop-shadow(0 3px 8px #4040403d)drop-shadow(0 3px 6px #40404029)}.shadow-m{box-shadow:var(--w-shadow-m)}.h-\\[14px\\]{height:14px}.w-\\[14px\\]{width:14px}.-mr-8{margin-right:-.8rem}.last-child\\:mb-0>:last-child{margin-bottom:0}.ml-8{margin-left:.8rem}.p-16{padding:1.6rem}.p-4{padding:.4rem}.px-16{padding-left:1.6rem;padding-right:1.6rem}.px-8{padding-left:.8rem;padding-right:.8rem}.py-6{padding-top:.6rem;padding-bottom:.6rem}.py-8{padding-top:.8rem;padding-bottom:.8rem}.font-bold{font-weight:700}.resize{resize:both}.translate-z-0{--w-translate-z:0rem;transform:translateX(var(--w-translate-x))translateY(var(--w-translate-y))translateZ(var(--w-translate-z))rotate(var(--w-rotate))rotateX(var(--w-rotate-x))rotateY(var(--w-rotate-y))rotateZ(var(--w-rotate-z))skewX(var(--w-skew-x))skewY(var(--w-skew-y))scaleX(var(--w-scale-x))scaleY(var(--w-scale-y))scaleZ(var(--w-scale-z))}.transform{transform:translateX(var(--w-translate-x))translateY(var(--w-translate-y))translateZ(var(--w-translate-z))rotate(var(--w-rotate))rotateX(var(--w-rotate-x))rotateY(var(--w-rotate-y))rotateZ(var(--w-rotate-z))skewX(var(--w-skew-x))skewY(var(--w-skew-y))scaleX(var(--w-scale-x))scaleY(var(--w-scale-y))scaleZ(var(--w-scale-z))}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.text-m{font-size:var(--w-font-size-m);line-height:var(--w-line-height-m)}.text-xs{font-size:var(--w-font-size-xs);line-height:var(--w-line-height-xs)}.leading-\\[24\\]{line-height:2.4rem}`;import{LitElement as si}from"lit";import{unsafeStatic as li,html as ci}from"lit/static-html.js";var di=JSON.parse('{"icon.title.close":["Kryss"]}'),ui=JSON.parse('{"icon.title.close":["Cross"]}'),gi=JSON.parse('{"icon.title.close":["Rasti"]}'),mi=JSON.parse('{"icon.title.close":["Kryds"]}'),pi=JSON.parse('{"icon.title.close":["Kryss"]}'),Dr=["en","nb","fi","da","sv"],zr="en",hi=()=>{var e;let t;switch((e=process==null?void 0:process.env)==null?void 0:e.NMP_BRAND){case"FINN":t="nb";break;case"TORI":t="fi";break;case"BLOCKET":t="sv";break;case"DBA":t="da";break;default:t="en"}return t},Tr=()=>{var e;let t=(e=document==null?void 0:document.location)==null?void 0:e.hostname;return t!=null&&t.includes("finn")?"nb":t.includes("tori")?"fi":t.includes("blocket")?"sv":t.includes("dba")?"da":zr},kt=e=>Dr.find(t=>e===t||e.toLowerCase().includes(t))||Tr();function bi(){var e;if(typeof window=="undefined"){let t=hi();return kt(t)}try{let t=(e=document==null?void 0:document.documentElement)==null?void 0:e.lang,r=Tr();return Dr.includes(t)?kt(t!=null?t:r):(console.warn("Unsupported locale set in html lang tag, falling back to detection by hostname"),kt(r))}catch(t){return console.warn("could not detect locale, falling back to source locale",t),zr}}var fi=(e,t,r,o,i,a)=>e==="nb"?r:e==="fi"?o:e==="da"?i:e==="sv"?a:t,vi=(e,t,r,o,i)=>{let a=bi(),n=fi(a,e,t,r,o,i);P.load(a,n),P.activate(a)};vi(ui,di,gi,mi,pi);var wi=class extends si{render(){let e=P.t({message:"Cross",id:"icon.title.close",comment:"Title for close icon"});return ci`<svg xmlns="http://www.w3.org/2000/svg"width="16"height="16"fill="none"viewBox="0 0 16 16" part="w-icon-close-16-part">${li(`<title>${e}</title>`)}<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="m12.5 3.5-9 9m0-9 9 9"></path></svg>`}};customElements.get("w-icon-close-16")||customElements.define("w-icon-close-16",wi);var O=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)},R=function(e,t,r,o,i){if(o==="m")throw new TypeError("Private method is not writable");if(o==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return o==="a"?i.call(e,r):i?i.value=r:t.set(e,r),r};function lt(e){var t,r,o,i,a,n,s,l,d,c,g,f,u,b,x,v,_,C,E;class q extends e{constructor(...w){var y,L,A;super(...w),t.add(this),this.internals=this.attachInternals(),r.set(this,!1),o.set(this,!1),i.set(this,!1),a.set(this,void 0),n.set(this,void 0),s.set(this,!0),d.set(this,""),c.set(this,()=>{R(this,i,!0,"f"),R(this,r,!0,"f"),O(this,t,"m",v).call(this)}),g.set(this,()=>{R(this,r,!1,"f"),O(this,t,"m",_).call(this,this.shouldFormValueUpdate()?O(this,d,"f"):""),!this.validity.valid&&O(this,i,"f")&&R(this,o,!0,"f");let z=O(this,t,"m",v).call(this);this.validationMessageCallback&&this.validationMessageCallback(z?this.internals.validationMessage:"")}),f.set(this,()=>{var z;O(this,s,"f")&&this.validationTarget&&(this.internals.setValidity(this.validity,this.validationMessage,this.validationTarget),R(this,s,!1,"f")),R(this,i,!0,"f"),R(this,o,!0,"f"),O(this,t,"m",v).call(this),(z=this===null||this===void 0?void 0:this.validationMessageCallback)===null||z===void 0||z.call(this,this.showError?this.internals.validationMessage:"")}),u.set(this,void 0),b.set(this,!1),x.set(this,Promise.resolve()),(y=this.addEventListener)===null||y===void 0||y.call(this,"focus",O(this,c,"f")),(L=this.addEventListener)===null||L===void 0||L.call(this,"blur",O(this,g,"f")),(A=this.addEventListener)===null||A===void 0||A.call(this,"invalid",O(this,f,"f")),this.setValue(null)}static get formAssociated(){return!0}static get validators(){return this.formControlValidators||[]}static get observedAttributes(){let w=this.validators.map(A=>A.attribute).flat(),y=super.observedAttributes||[];return[...new Set([...y,...w])]}static getValidator(w){return this.validators.find(y=>y.attribute===w)||null}static getValidators(w){return this.validators.filter(y=>{var L;if(y.attribute===w||!((L=y.attribute)===null||L===void 0)&&L.includes(w))return!0})}get form(){return this.internals.form}get showError(){return O(this,t,"m",v).call(this)}checkValidity(){return this.internals.checkValidity()}get validity(){return this.internals.validity}get validationMessage(){return this.internals.validationMessage}attributeChangedCallback(w,y,L){var A;(A=super.attributeChangedCallback)===null||A===void 0||A.call(this,w,y,L);let I=this.constructor.getValidators(w);I!=null&&I.length&&this.validationTarget&&this.setValue(O(this,d,"f"))}setValue(w){var y;R(this,o,!1,"f"),(y=this.validationMessageCallback)===null||y===void 0||y.call(this,""),R(this,d,w,"f");let A=this.shouldFormValueUpdate()?w:null;this.internals.setFormValue(A),O(this,t,"m",_).call(this,A),this.valueChangedCallback&&this.valueChangedCallback(A),O(this,t,"m",v).call(this)}shouldFormValueUpdate(){return!0}get validationComplete(){return new Promise(w=>w(O(this,x,"f")))}formResetCallback(){var w,y;R(this,i,!1,"f"),R(this,o,!1,"f"),O(this,t,"m",v).call(this),(w=this.resetFormControl)===null||w===void 0||w.call(this),(y=this.validationMessageCallback)===null||y===void 0||y.call(this,O(this,t,"m",v).call(this)?this.validationMessage:"")}}return r=new WeakMap,o=new WeakMap,i=new WeakMap,a=new WeakMap,n=new WeakMap,s=new WeakMap,d=new WeakMap,c=new WeakMap,g=new WeakMap,f=new WeakMap,u=new WeakMap,b=new WeakMap,x=new WeakMap,t=new WeakSet,l=function(){let w=this.getRootNode(),y=`${this.localName}[name="${this.getAttribute("name")}"]`;return w.querySelectorAll(y)},v=function(){if(this.hasAttribute("disabled"))return!1;let w=O(this,o,"f")||O(this,i,"f")&&!this.validity.valid&&!O(this,r,"f");return w&&this.internals.states?this.internals.states.add("--show-error"):this.internals.states&&this.internals.states.delete("--show-error"),w},_=function(w){let y=this.constructor,L={},A=y.validators,z=[],I=A.some(M=>M.isValid instanceof Promise);O(this,b,"f")||(R(this,x,new Promise(M=>{R(this,u,M,"f")}),"f"),R(this,b,!0,"f")),O(this,a,"f")&&(O(this,a,"f").abort(),R(this,n,O(this,a,"f"),"f"));let B=new AbortController;R(this,a,B,"f");let U,j=!1;A.length&&(A.forEach(M=>{let Z=M.key||"customError",F=M.isValid(this,w,B.signal);F instanceof Promise?(z.push(F),F.then(K=>{K!=null&&(L[Z]=!K,U=O(this,t,"m",E).call(this,M,w),O(this,t,"m",C).call(this,L,U))})):(L[Z]=!F,this.validity[Z]!==!F&&(j=!0),!F&&!U&&(U=O(this,t,"m",E).call(this,M,w)))}),Promise.allSettled(z).then(()=>{var M;B!=null&&B.signal.aborted||(R(this,b,!1,"f"),(M=O(this,u,"f"))===null||M===void 0||M.call(this))}),(j||!I)&&O(this,t,"m",C).call(this,L,U))},C=function(w,y){if(this.validationTarget)this.internals.setValidity(w,y,this.validationTarget),R(this,s,!1,"f");else{if(this.internals.setValidity(w,y),this.internals.validity.valid)return;R(this,s,!0,"f")}},E=function(w,y){if(this.validityCallback){let L=this.validityCallback(w.key||"customError");if(L)return L}return w.message instanceof Function?w.message(this,y):w.message},q}import{html as ct,LitElement as Qr}from"lit";import{property as J}from"lit/decorators.js";import{html as yi,LitElement as Pr}from"lit";import{property as ie}from"lit/decorators.js";import{classMap as ki}from"lit/directives/class-map.js";import{css as xi}from"lit";var Mr=xi`.w-button,
|
|
3350
|
+
.w-button--secondary {
|
|
3351
|
+
/* Local scoped variables, given the default button (the secondary variant) as a default */
|
|
3352
|
+
--_background: var(--background, var(--w-s-color-background));
|
|
3353
|
+
--_background-hover: var(--background-hover, var(--w-s-color-background-hover));
|
|
3354
|
+
--_background-active: var(--background-active, var(--w-s-color-background-active));
|
|
3355
|
+
--_text-color: var(--color, var(--w-s-color-text-link));
|
|
3356
|
+
--_border-width: var(--border-width, 2px);
|
|
3357
|
+
--_border: var(--border, var(--w-s-color-border));
|
|
3358
|
+
--_border-hover: var(--border-hover, var(--w-s-color-border-hover));
|
|
3359
|
+
--_border-active: var(--border-active, var(--w-s-color-border-active));
|
|
3360
|
+
--_border-radius: var(--border-radius, 8px);
|
|
3361
|
+
--_font-size: var(--font-size, var(--w-font-size-m));
|
|
3362
|
+
--_line-height: var(--line-height, var(--w-line-height-m));
|
|
3363
|
+
--_font-weight: var(--font-weight, bold);
|
|
3364
|
+
--_padding-x: var(--padding-x, 16px);
|
|
3365
|
+
--_padding-y: var(--padding-y, 13px);
|
|
3366
|
+
|
|
3367
|
+
/* Base setup for all buttons */
|
|
3368
|
+
display: inline-flex;
|
|
3369
|
+
justify-content: center;
|
|
3370
|
+
align-items: center;
|
|
3371
|
+
text-align: center;
|
|
3372
|
+
cursor: pointer;
|
|
3373
|
+
transition:
|
|
3374
|
+
color 150ms cubic-bezier(0.4, 0, 0.2, 1),
|
|
3375
|
+
background-color 150ms cubic-bezier(0.4, 0, 0.2, 1),
|
|
3376
|
+
border-color 150ms cubic-bezier(0.4, 0, 0.2, 1),
|
|
3377
|
+
fill 150ms cubic-bezier(0.4, 0, 0.2, 1),
|
|
3378
|
+
stroke 150ms cubic-bezier(0.4, 0, 0.2, 1);
|
|
3379
|
+
|
|
3380
|
+
/* Hook the local vars up to the button stuff */
|
|
3381
|
+
background-color: var(--_background);
|
|
3382
|
+
color: var(--_text-color);
|
|
3383
|
+
border: var(--_border-width) solid var(--_border);
|
|
3384
|
+
border-radius: var(--_border-radius);
|
|
3385
|
+
padding: calc(var(--_padding-y) - var(--_border-width)) calc(var(--_padding-x) - var(--_border-width));
|
|
3386
|
+
font-size: var(--_font-size);
|
|
3387
|
+
line-height: var(--_line-height);
|
|
3388
|
+
font-weight: var(--_font-weight);
|
|
3389
|
+
}
|
|
3390
|
+
|
|
3391
|
+
.w-button:hover {
|
|
3392
|
+
background-color: var(--_background-hover);
|
|
3393
|
+
border-color: var(--_border-hover);
|
|
3394
|
+
}
|
|
3395
|
+
|
|
3396
|
+
.w-button:active {
|
|
3397
|
+
background-color: var(--_background-active);
|
|
3398
|
+
border-color: var(--_border-active);
|
|
3399
|
+
}
|
|
3400
|
+
|
|
3401
|
+
.w-button:focus-visible {
|
|
3402
|
+
outline: 2px solid var(--w-s-color-border-focus);
|
|
3403
|
+
outline-offset: var(--w-outline-offset, 1px);
|
|
3404
|
+
}
|
|
3405
|
+
|
|
3406
|
+
/* Variants config */
|
|
3407
|
+
.w-button--primary {
|
|
3408
|
+
--background: var(--w-s-color-background-primary);
|
|
3409
|
+
--background-hover: var(--w-s-color-background-primary-hover);
|
|
3410
|
+
--background-active: var(--w-s-color-background-primary-active);
|
|
3411
|
+
--color: var(--w-s-color-text-inverted);
|
|
3412
|
+
--border-width: 0px;
|
|
3413
|
+
}
|
|
3414
|
+
.w-button--negative {
|
|
3415
|
+
--background: var(--w-s-color-background-negative);
|
|
3416
|
+
--background-hover: var(--w-s-color-background-negative-hover);
|
|
3417
|
+
--background-active: var(--w-s-color-background-negative-active);
|
|
3418
|
+
--color: var(--w-s-color-text-inverted);
|
|
3419
|
+
--border-width: 0px;
|
|
3420
|
+
}
|
|
3421
|
+
.w-button--negative-quiet {
|
|
3422
|
+
--background: transparent;
|
|
3423
|
+
--background-hover: var(--w-s-color-background-negative-subtle-hover);
|
|
3424
|
+
--background-active: var(--w-s-color-background-negative-subtle-active);
|
|
3425
|
+
--color: var(--w-s-color-text-negative);
|
|
3426
|
+
--border-width: 0px;
|
|
3427
|
+
}
|
|
3428
|
+
.w-button--utility {
|
|
3429
|
+
--background: var(--w-s-color-background);
|
|
3430
|
+
--background-hover: var(--w-s-color-background-hover);
|
|
3431
|
+
--background-active: var(--w-s-color-background-active);
|
|
3432
|
+
--color: var(--w-s-color-text);
|
|
3433
|
+
--border-radius: 4px;
|
|
3434
|
+
--border-width: 1px;
|
|
3435
|
+
}
|
|
3436
|
+
.w-button--utility-quiet {
|
|
3437
|
+
--background: transparent;
|
|
3438
|
+
--color: var(--w-s-color-text);
|
|
3439
|
+
--border-width: 0px;
|
|
3440
|
+
}
|
|
3441
|
+
.w-button--overlay {
|
|
3442
|
+
--background: var(--w-color-background);
|
|
3443
|
+
--background-hover: var(--w-color-background-hover);
|
|
3444
|
+
--background-active: var(--w-color-background-active);
|
|
3445
|
+
--color: var(--w-s-color-text);
|
|
3446
|
+
--border-radius: 9999px;
|
|
3447
|
+
--border-width: 0px;
|
|
3448
|
+
}
|
|
3449
|
+
.w-button--overlay-quiet {
|
|
3450
|
+
--background: transparent;
|
|
3451
|
+
--background-hover: var(--w-s-color-background-hover);
|
|
3452
|
+
--background-active: var(--w-s-color-background-active);
|
|
3453
|
+
--color: var(--w-s-color-text);
|
|
3454
|
+
--border-radius: 9999px;
|
|
3455
|
+
--border-width: 0px;
|
|
3456
|
+
}
|
|
3457
|
+
.w-button--overlay-inverted {
|
|
3458
|
+
--background: var(--w-s-color-background-inverted);
|
|
3459
|
+
--background-hover: var(--w-s-color-background-inverted-hover);
|
|
3460
|
+
--background-active: var(--w-s-color-background-inverted-active);
|
|
3461
|
+
--color: var(--w-s-color-text-inverted);
|
|
3462
|
+
--border-radius: 9999px;
|
|
3463
|
+
--border-width: 0px;
|
|
3464
|
+
}
|
|
3465
|
+
.w-button--overlay-inverted-quiet {
|
|
3466
|
+
--background: transparent;
|
|
3467
|
+
--background-hover: var(--w-s-color-background-inverted-hover);
|
|
3468
|
+
--background-active: var(--w-s-color-background-inverted-active);
|
|
3469
|
+
--color: var(--w-s-color-text-inverted);
|
|
3470
|
+
--border-radius: 9999px;
|
|
3471
|
+
--border-width: 0px;
|
|
3472
|
+
}
|
|
3473
|
+
|
|
3474
|
+
.w-button--link {
|
|
3475
|
+
--background: none;
|
|
3476
|
+
--background-hover: none;
|
|
3477
|
+
--background-active: none;
|
|
3478
|
+
--border-width: 0;
|
|
3479
|
+
--font-weight: normal;
|
|
3480
|
+
display: inline;
|
|
3481
|
+
}
|
|
3482
|
+
|
|
3483
|
+
/* States config, selects --loading as well since loading is always supposed to be disabled */
|
|
3484
|
+
.w-button:disabled,
|
|
3485
|
+
.w-button--disabled,
|
|
3486
|
+
.w-button--loading {
|
|
3487
|
+
--background: var(--w-s-color-background-disabled);
|
|
3488
|
+
--background-hover: var(--w-s-color-background-disabled);
|
|
3489
|
+
--background-active: var(--w-s-color-background-disabled);
|
|
3490
|
+
--color: var(--w-s-color-text-inverted);
|
|
3491
|
+
--border-width: 0px;
|
|
3492
|
+
pointer-events: none;
|
|
3493
|
+
}
|
|
3494
|
+
|
|
3495
|
+
.w-button--link:hover {
|
|
3496
|
+
text-decoration: underline;
|
|
3497
|
+
}
|
|
3498
|
+
|
|
3499
|
+
/* Sizes config */
|
|
3500
|
+
.w-button--small {
|
|
3501
|
+
--padding-x: 12px;
|
|
3502
|
+
--padding-y: 8px;
|
|
3503
|
+
--font-size: var(--w-font-size-xs);
|
|
3504
|
+
--line-height: var(--w-line-height-xs);
|
|
3505
|
+
}
|
|
3506
|
+
|
|
3507
|
+
/* Width config */
|
|
3508
|
+
.w-button--full-width {
|
|
3509
|
+
width: 100%;
|
|
3510
|
+
max-width: 100%;
|
|
3511
|
+
}
|
|
3512
|
+
|
|
3513
|
+
.w-button--has-icon-only {
|
|
3514
|
+
width: auto;
|
|
3515
|
+
max-width: none;
|
|
3516
|
+
--_padding-x: var(--_padding-y);
|
|
3517
|
+
aspect-ratio: 1 / 1;
|
|
3518
|
+
}
|
|
3519
|
+
|
|
3520
|
+
a.w-button {
|
|
3521
|
+
text-decoration: none !important;
|
|
3522
|
+
}
|
|
3523
|
+
|
|
3524
|
+
/* Copy of loading animation from warp */
|
|
3525
|
+
.w-button--loading {
|
|
3526
|
+
background-image: linear-gradient(
|
|
3527
|
+
135deg,
|
|
3528
|
+
rgba(0, 0, 0, 0.05) 25%,
|
|
3529
|
+
transparent 25%,
|
|
3530
|
+
transparent 50%,
|
|
3531
|
+
rgba(0, 0, 0, 0.05) 50%,
|
|
3532
|
+
rgba(0, 0, 0, 0.05) 75%,
|
|
3533
|
+
transparent 75%,
|
|
3534
|
+
transparent
|
|
3535
|
+
);
|
|
3536
|
+
background-size: 30px 30px;
|
|
3537
|
+
animation: animate-inprogress 3s linear infinite;
|
|
3538
|
+
}
|
|
3539
|
+
|
|
3540
|
+
@keyframes animate-inprogress {
|
|
3541
|
+
0% {
|
|
3542
|
+
background-position: 0 0;
|
|
3543
|
+
}
|
|
3544
|
+
100% {
|
|
3545
|
+
background-position: 60px 0;
|
|
3546
|
+
}
|
|
3547
|
+
}`;var Rr=["primary","secondary","negative","negativeQuiet","utility","utilityQuiet","pill","link"],Q=class extends lt(Pr){constructor(){super(),this.variant="secondary"}connectedCallback(){if(super.connectedCallback(),!Rr.includes(this.variant))throw new Error(`Invalid "variant" attribute. Set its value to one of the following:
|
|
3548
|
+
${Rr.join(", ")}.`)}firstUpdated(){this.autofocus&&setTimeout(()=>this.focus(),0)}render(){let t={"w-button":this.variant!=="link","w-button--primary":this.variant==="primary","w-button--secondary":this.variant==="secondary","w-button--negative":this.variant==="negative","w-button--utility":this.variant==="utility","w-button--quiet":this.variant==="quiet","w-button--negative-quiet":this.variant==="negativeQuiet","w-button--utility-quiet":this.variant==="utilityQuiet","w-button--small":this.small,"w-button--full-width":this.fullWidth,"w-button--disabled":this.disabled};return yi`<a
|
|
3549
|
+
href=${this.href}
|
|
3550
|
+
target=${this.target}
|
|
3551
|
+
rel=${this.target==="_blank"?this.rel||"noopener":void 0}
|
|
3552
|
+
class=${ki(t)}>
|
|
3553
|
+
<slot></slot>
|
|
3554
|
+
</a>`}};Q.shadowRootOptions={...Pr.shadowRootOptions,delegatesFocus:!0},Q.styles=[Se,Mr],$([ie({type:Boolean,reflect:!0})],Q.prototype,"autofocus",2),$([ie({reflect:!0})],Q.prototype,"variant",2),$([ie({type:Boolean,reflect:!0})],Q.prototype,"quiet",2),$([ie({type:Boolean,reflect:!0})],Q.prototype,"small",2),$([ie({reflect:!0})],Q.prototype,"href",2),$([ie({type:Boolean,reflect:!0})],Q.prototype,"disabled",2),$([ie({reflect:!0})],Q.prototype,"target",2),$([ie({reflect:!0})],Q.prototype,"rel",2),$([ie({attribute:"full-width",type:Boolean,reflect:!0})],Q.prototype,"fullWidth",2),$([ie({attribute:"button-class",reflect:!0})],Q.prototype,"buttonClass",2),$([ie({reflect:!0})],Q.prototype,"name",2);customElements.get("w-link")||customElements.define("w-link",Q);var jr=JSON.parse('{"button.aria.loading":["Indl\xE6ser..."]}');var Fr=JSON.parse('{"button.aria.loading":["Loading..."]}');var Nr=JSON.parse('{"button.aria.loading":["Ladataan..."]}');var qr=JSON.parse('{"button.aria.loading":["Laster..."]}');var Vr=JSON.parse('{"button.aria.loading":["Laddar ..."]}');import{css as $i}from"lit";var Br=$i`*,:before,:after{--w-rotate:0;--w-rotate-x:0;--w-rotate-y:0;--w-rotate-z:0;--w-scale-x:1;--w-scale-y:1;--w-scale-z:1;--w-skew-x:0;--w-skew-y:0;--w-translate-x:0;--w-translate-y:0;--w-translate-z:0}.text-center{text-align:center}.animate-inprogress{background-size:30px 30px;animation:3s linear infinite animate-inprogress;background-image:linear-gradient(135deg,#0000000d 25%,#0000 0 50%,#0000000d 0 75%,#0000 0,#0000)!important}@keyframes animate-inprogress{0%{background-position:0 0}to{background-position:60px 0}}.hover\\:bg-clip-padding:hover{-webkit-background-clip:padding-box;background-clip:padding-box}.bg-transparent{background-color:#0000}.bg-\\[--w-color-button-primary-background\\]{background-color:var(--w-color-button-primary-background)}.hover\\:bg-\\[--w-color-button-pill-background-hover\\]:hover{background-color:var(--w-color-button-pill-background-hover)}.hover\\:bg-\\[--w-color-button-primary-background-hover\\]:hover{background-color:var(--w-color-button-primary-background-hover)}.active\\:bg-\\[--w-color-button-pill-background-active\\]:active{background-color:var(--w-color-button-pill-background-active)}.active\\:bg-\\[--w-color-button-primary-background-active\\]:active{background-color:var(--w-color-button-primary-background-active)}.border{border-width:1px}.border-0{border-width:0}.border-2{border-width:2px}.border-transparent{border-color:#0000}.rounded-4{border-radius:4px}.rounded-8{border-radius:8px}.rounded-full{border-radius:9999px}.inline-block{display:inline-block}.inline{display:inline}.inline-flex{display:inline-flex}.hover\\:underline:hover,.focus\\:underline:focus,.active\\:underline:active{text-decoration-line:underline}.hover\\:no-underline:hover,.focus\\:no-underline:focus,.active\\:no-underline:active{text-decoration:none}.focusable:focus{outline:2px solid var(--w-s-color-border-focus);outline-offset:var(--w-outline-offset,1px)}.focusable:focus-visible{outline:2px solid var(--w-s-color-border-focus);outline-offset:var(--w-outline-offset,1px)}.focusable:not(:focus-visible){outline:none}.items-center{align-items:center}.justify-center{justify-content:center}.static{position:static}.s-bg{background-color:var(--w-s-color-background)}.s-bg-disabled{background-color:var(--w-s-color-background-disabled)}.s-bg-negative{background-color:var(--w-s-color-background-negative)}.s-bg-subtle{background-color:var(--w-s-color-background-subtle)}.hover\\:s-bg-hover:hover{background-color:var(--w-s-color-background-hover)}.hover\\:s-bg-negative-hover:hover{background-color:var(--w-s-color-background-negative-hover)}.hover\\:s-bg-negative-subtle-hover:hover{background-color:var(--w-s-color-background-negative-subtle-hover)}.active\\:s-bg-active:active{background-color:var(--w-s-color-background-active)}.active\\:s-bg-negative-active:active{background-color:var(--w-s-color-background-negative-active)}.active\\:s-bg-negative-subtle-active:active{background-color:var(--w-s-color-background-negative-subtle-active)}.s-text{color:var(--w-s-color-text)}.s-text-inverted{color:var(--w-s-color-text-inverted)}.s-text-link{color:var(--w-s-color-text-link)}.s-text-negative{color:var(--w-s-color-text-negative)}.s-icon{color:var(--w-s-color-icon)}.hover\\:s-icon-hover:hover{color:var(--w-s-color-icon-hover)}.active\\:s-icon-active:active{color:var(--w-s-color-icon-active)}.s-border{border-color:var(--w-s-color-border)}.hover\\:s-border-hover:hover{border-color:var(--w-s-color-border-hover)}.active\\:s-border-active:active{border-color:var(--w-s-color-border-active)}.max-w-full{max-width:100%}.max-w-max{max-width:max-content}.min-h-32{min-height:3.2rem}.min-w-32{min-width:3.2rem}.w-full{width:100%}.min-h-\\[44px\\]{min-height:44px}.min-w-\\[44px\\]{min-width:44px}.p-0{padding:0}.p-4{padding:.4rem}.px-14{padding-left:1.4rem;padding-right:1.4rem}.px-16{padding-left:1.6rem;padding-right:1.6rem}.py-10{padding-top:1rem;padding-bottom:1rem}.py-12{padding-top:1.2rem;padding-bottom:1.2rem}.py-6{padding-top:.6rem;padding-bottom:.6rem}.py-8{padding-top:.8rem;padding-bottom:.8rem}.px-\\[15px\\]{padding-left:15px;padding-right:15px}.py-\\[11px\\]{padding-top:11px;padding-bottom:11px}.py-\\[7px\\]{padding-top:7px;padding-bottom:7px}.cursor-default{cursor:default}.font-bold{font-weight:700}.pointer-events-none{pointer-events:none}.sr-only{clip:rect(0,0,0,0);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.text-m{font-size:var(--w-font-size-m);line-height:var(--w-line-height-m)}.text-xs{font-size:var(--w-font-size-xs);line-height:var(--w-line-height-xs)}.leading-\\[24\\]{line-height:2.4rem}`;var Hr=["primary","secondary","negative","utility","pill","link"],me="font-bold focusable justify-center transition-colors ease-in-out",T={primary:"s-text-inverted bg-[--w-color-button-primary-background] hover:bg-[--w-color-button-primary-background-hover] active:bg-[--w-color-button-primary-background-active]",secondary:"s-text-link s-border s-bg hover:s-bg-hover hover:s-border-hover active:s-bg-active",utility:"s-text s-bg hover:s-bg-hover active:s-bg-active s-border hover:s-border-hover active:s-border-active",destructive:"s-bg-negative s-text-inverted hover:s-bg-negative-hover active:s-bg-negative-active",pill:"s-icon hover:s-icon-hover active:s-icon-active bg-transparent hover:bg-[--w-color-button-pill-background-hover] active:bg-[--w-color-button-pill-background-active]",disabled:"s-text-inverted s-bg-disabled",quiet:"bg-transparent s-text-link hover:s-bg-hover active:s-bg-active",utilityQuiet:"s-text bg-transparent hover:s-bg-hover active:s-bg-active",negativeQuiet:"bg-transparent s-text-negative hover:s-bg-negative-subtle-hover active:s-bg-negative-subtle-active",loading:"s-text s-bg-subtle",link:"s-text-link"},S={primary:`border-0 rounded-8 ${me}`,secondary:`border-2 rounded-8 ${me}`,utility:`border rounded-4 ${me}`,negative:`border-0 rounded-8 ${me}`,pill:`p-4 rounded-full border-0 inline-flex items-center justify-center hover:bg-clip-padding ${me}`,link:`bg-transparent focusable ease-in-out inline active:underline hover:underline focus:underline ${T.link}`},p={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"},h={medium:"text-m leading-[24]",xsmall:"text-xs"},m={inProgress:`border-transparent animate-inprogress pointer-events-none ${T.loading}`,quiet:`border-0 rounded-8 ${me}`,utilityQuiet:`border-0 rounded-4 ${me}`,negativeQuiet:`border-0 rounded-8 ${me}`,isDisabled:`font-bold justify-center transition-colors ease-in-out cursor-default pointer-events-none ${T.disabled}`},k={secondary:`${p.medium} ${h.medium} ${S.secondary} ${T.secondary}`,secondaryHref:`${p.medium} ${h.medium} ${S.secondary} ${T.secondary}`,secondaryDisabled:`${p.medium} ${h.medium} ${S.secondary} ${m.isDisabled}`,secondarySmall:`${h.xsmall} ${p.xsmall} ${S.secondary} ${T.secondary}`,secondarySmallDisabled:`${h.xsmall} ${p.xsmall} ${S.secondary} ${m.isDisabled}`,secondaryQuiet:`${p.medium} ${h.medium} ${m.quiet} ${T.quiet}`,secondaryQuietDisabled:`${p.medium} ${h.medium} ${m.quiet} ${m.isDisabled}`,secondarySmallQuiet:`${h.xsmall} ${p.xsmall} ${m.quiet} ${T.quiet}`,secondarySmallQuietDisabled:`${h.xsmall} ${p.xsmall} ${m.quiet} ${m.isDisabled}`,secondaryLoading:`${p.medium} ${h.medium} ${S.secondary} ${m.inProgress}`,secondarySmallLoading:`${h.xsmall} ${p.xsmall} ${S.secondary} ${m.inProgress}`,secondarySmallQuietLoading:`${h.xsmall} ${p.xsmall} ${m.quiet} ${m.inProgress}`,secondaryQuietLoading:`${p.medium} ${h.medium} ${m.quiet} ${m.inProgress}`,primary:`${p.large} ${h.medium} ${S.primary} ${T.primary}`,primaryDisabled:`${p.large} ${h.medium} ${m.isDisabled} ${S.primary}`,primarySmall:`${p.small} ${h.xsmall} ${S.primary} ${T.primary}`,primarySmallDisabled:`${p.small} ${h.xsmall} ${m.isDisabled} ${S.primary} `,primaryQuiet:`${p.large} ${h.medium} ${m.quiet} ${T.quiet}`,primaryQuietDisabled:`${p.large} ${h.medium} ${m.quiet} ${m.isDisabled}`,primarySmallQuiet:`${p.small} ${h.xsmall} ${m.quiet} ${T.quiet}`,primarySmallQuietDisabled:`${p.small} ${h.xsmall} ${m.quiet} ${m.isDisabled}`,primaryLoading:`${p.large} ${h.medium} ${m.inProgress} ${S.primary}`,primarySmallLoading:`${p.small} ${h.xsmall} ${m.inProgress} ${S.primary}`,primarySmallQuietLoading:`${p.small} ${h.xsmall} ${m.quiet} ${m.inProgress} ${S.primary}`,primaryQuietLoading:`${p.large} ${h.medium} ${m.quiet} ${m.inProgress}`,utility:`${p.utility} ${h.medium} ${S.utility} ${T.utility}`,utilityDisabled:`${p.utility} ${h.medium} ${S.utility} ${m.isDisabled}`,utilityQuiet:`${p.large} ${h.medium} ${m.utilityQuiet} ${T.utilityQuiet}`,utilityQuietDisabled:`${p.large} ${h.medium} ${m.utilityQuiet} ${m.isDisabled}`,utilitySmall:`${p.smallUtility} ${h.xsmall} ${S.utility} ${T.utility}`,utilitySmallDisabled:`${p.smallUtility} ${h.xsmall} ${S.utility} ${m.isDisabled}`,utilitySmallQuiet:`${p.smallUtility} ${h.xsmall} ${m.utilityQuiet} ${T.utilityQuiet}`,utilitySmallQuietDisabled:`${p.smallUtility} ${h.xsmall} ${m.utilityQuiet} ${m.isDisabled}`,utilityLoading:`${p.large} ${h.medium} ${S.utility} ${m.inProgress}`,utilitySmallLoading:`${p.smallUtility} ${h.xsmall} ${S.utility} ${m.inProgress}`,utilityQuietLoading:`${p.large} ${h.medium} ${m.inProgress} ${m.utilityQuiet}`,utilitySmallQuietLoading:`${p.smallUtility} ${h.xsmall} ${m.inProgress} ${m.utilityQuiet}`,negative:`${p.large} ${h.medium} ${S.negative} ${T.destructive}`,negativeDisabled:`${p.large} ${h.medium} ${S.negative} ${m.isDisabled}`,negativeQuiet:`${p.large} ${h.medium} ${m.negativeQuiet} ${T.negativeQuiet}`,negativeQuietDisabled:`${p.large} ${h.medium} ${m.negativeQuiet}${m.isDisabled}`,negativeSmall:`${p.small} ${h.xsmall} ${S.negative} ${T.destructive}`,negativeSmallDisabled:`${p.small} ${h.xsmall} ${S.negative} ${m.isDisabled}`,negativeSmallQuiet:`${p.small} ${h.xsmall} ${m.negativeQuiet} ${T.negativeQuiet}`,negativeSmallQuietDisabled:`${p.small} ${h.xsmall} ${m.negativeQuiet} ${m.isDisabled}`,negativeLoading:`${p.large} ${h.medium} ${S.negative} ${m.inProgress}`,negativeSmallLoading:`${p.small} ${h.xsmall} ${m.inProgress} ${S.negative}`,negativeQuietLoading:`${p.large} ${h.medium} ${m.negativeQuiet} ${S.negative} ${m.inProgress}`,negativeSmallQuietLoading:`${p.small} ${h.xsmall} ${m.negativeQuiet} ${m.inProgress}`,pill:`${p.pill} ${h.medium} ${S.pill} ${T.pill}`,pillSmall:`${p.pillSmall} ${h.xsmall} ${S.pill} ${T.pill}`,pillLoading:`${p.pill} ${h.medium} ${S.pill} ${m.inProgress}`,pillSmallLoading:`${p.pillSmall} ${h.xsmall} ${S.pill} ${m.inProgress}`,link:`${p.link} ${h.medium} ${S.link}`,linkSmall:`${p.link} ${h.xsmall} ${S.link}`,linkAsButton:"inline-block active:no-underline hover:no-underline focus:no-underline text-center",a11y:"sr-only",fullWidth:"w-full max-w-full",contentWidth:"max-w-max"},N=class extends lt(Qr){constructor(){super();this.type="button";st(Fr,qr,Nr,jr,Vr),this.variant="secondary",this.ariaValueTextLoading=P._({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(){if(super.connectedCallback(),!Hr.includes(this.variant))throw new Error(`Invalid "variant" attribute. Set its value to one of the following:
|
|
3555
|
+
${Hr.join(", ")}.`)}firstUpdated(){this.autofocus&&!this.href&&setTimeout(()=>this.focus(),0)}get _primaryClasses(){return[!this.small&&!this.quiet&&!this.loading&&k.primary,this.small&&!this.quiet&&!this.loading&&k.primarySmall,this.small&&this.quiet&&!this.loading&&k.primarySmallQuiet,this.small&&this.loading&&(this.quiet?k.primarySmallQuietLoading:k.primarySmallLoading),!this.small&&this.quiet&&!this.loading&&k.primaryQuiet,!this.small&&this.loading&&(this.quiet?k.primaryQuietLoading:k.primaryLoading)]}get _secondaryClasses(){return[!this.small&&!this.quiet&&!this.loading&&k.secondary,this.small&&!this.quiet&&!this.loading&&k.secondarySmall,this.small&&this.loading&&(this.quiet?k.secondarySmallQuietLoading:k.secondarySmallLoading),this.small&&this.quiet&&!this.loading&&k.secondarySmallQuiet,!this.small&&this.quiet&&!this.loading&&k.secondaryQuiet,!this.small&&this.loading&&(this.quiet?k.secondaryQuietLoading:k.secondaryLoading)]}get _utilityClasses(){return[!this.small&&!this.quiet&&!this.loading&&k.utility,this.small&&!this.quiet&&!this.loading&&k.utilitySmall,this.small&&this.quiet&&!this.loading&&k.utilitySmallQuiet,this.small&&this.loading&&(this.quiet?k.utilitySmallQuietLoading:k.utilitySmallLoading),!this.small&&this.quiet&&!this.loading&&k.utilityQuiet,!this.small&&this.loading&&(this.quiet?k.utilityQuietLoading:k.utilityLoading)]}get _negativeClasses(){return[!this.small&&!this.quiet&&!this.loading&&k.negative,this.small&&!this.quiet&&!this.loading&&k.negativeSmall,this.small&&this.quiet&&!this.loading&&k.negativeSmallQuiet,this.small&&this.loading&&(this.quiet?k.negativeSmallQuietLoading:k.negativeSmallLoading),!this.small&&this.quiet&&!this.loading&&k.negativeQuiet,!this.small&&this.loading&&(this.quiet?k.negativeQuietLoading:k.negativeLoading)]}get _pillClasses(){return[!this.loading&&(this.small?k.pillSmall:k.pill),this.loading&&(this.small?k.pillSmallLoading:k.pillLoading)]}get _linkClasses(){return[this.small?k.linkSmall:k.link]}get _classes(){return ye(this.buttonClass,[this.variant==="primary"&&this._primaryClasses,this.variant==="secondary"&&this._secondaryClasses,this.variant==="utility"&&this._utilityClasses,this.variant==="negative"&&this._negativeClasses,this.variant==="pill"&&this._pillClasses,this.variant==="link"&&this._linkClasses,this.href&&k.linkAsButton,this.fullWidth?k.fullWidth:k.contentWidth])}_handleButtonClick(){this.type==="submit"?this.internals.form.requestSubmit():this.type==="reset"&&this.internals.form.reset()}render(){return ct` ${this.href?ct`<w-link
|
|
3556
|
+
href=${this.href}
|
|
3557
|
+
target=${this.target}
|
|
3558
|
+
variant=${this.variant}
|
|
3559
|
+
?small=${this.small}
|
|
3560
|
+
?quiet=${this.quiet}
|
|
3561
|
+
?loading=${this.loading}
|
|
3562
|
+
?autofocus=${this.autofocus}
|
|
3563
|
+
?full-width=${this.fullWidth}
|
|
3564
|
+
class=${this.buttonClass}
|
|
3565
|
+
rel=${this.target==="_blank"?this.rel||"noopener":void 0}>
|
|
3566
|
+
<slot></slot>
|
|
3567
|
+
</w-link>`:ct`<button type=${this.type||"button"} class=${this._classes} @click="${this._handleButtonClick}">
|
|
3568
|
+
<slot></slot>
|
|
3569
|
+
</button>`}
|
|
3570
|
+
${this.loading?ct`<span class="sr-only" role="progressbar" aria-valuenow="{0}" aria-valuetext=${this.ariaValueTextLoading}></span>`:null}`}};N.shadowRootOptions={...Qr.shadowRootOptions,delegatesFocus:!0},N.styles=[Se,Br],$([J({reflect:!0})],N.prototype,"type",2),$([J({type:Boolean,reflect:!0})],N.prototype,"autofocus",2),$([J({reflect:!0})],N.prototype,"variant",2),$([J({type:Boolean,reflect:!0})],N.prototype,"quiet",2),$([J({type:Boolean,reflect:!0})],N.prototype,"small",2),$([J({type:Boolean,reflect:!0})],N.prototype,"loading",2),$([J({reflect:!0})],N.prototype,"href",2),$([J({reflect:!0})],N.prototype,"target",2),$([J({reflect:!0})],N.prototype,"rel",2),$([J({attribute:"full-width",type:Boolean,reflect:!0})],N.prototype,"fullWidth",2),$([J({attribute:"button-class",reflect:!0})],N.prototype,"buttonClass",2),$([J({reflect:!0})],N.prototype,"name",2),$([J({reflect:!0})],N.prototype,"value",2);customElements.get("w-button")||customElements.define("w-button",N);var Ei={medium:"text-m leading-[24]",xsmall:"text-xs"},Ur={primary:"s-text-inverted bg-[--w-color-button-primary-background] hover:bg-[--w-color-button-primary-background-hover] active:bg-[--w-color-button-primary-background-active]",secondary:"s-text-link s-border s-bg hover:s-bg-hover hover:s-border-hover active:s-bg-active",utility:"s-text s-bg hover:s-bg-hover active:s-bg-active s-border hover:s-border-hover active:s-border-active",destructive:"s-bg-negative s-text-inverted hover:s-bg-negative-hover active:s-bg-negative-active",pill:"s-icon hover:s-icon-hover active:s-icon-active bg-transparent hover:bg-[--w-color-button-pill-background-hover] active:bg-[--w-color-button-pill-background-active]",disabled:"s-text-inverted s-bg-disabled",quiet:"bg-transparent s-text-link hover:s-bg-hover active:s-bg-active",utilityQuiet:"s-text bg-transparent hover:s-bg-hover active:s-bg-active",negativeQuiet:"bg-transparent s-text-negative hover:s-bg-negative-subtle-hover active:s-bg-negative-subtle-active",loading:"s-text s-bg-subtle",link:"s-text-link"},Pe="font-bold focusable justify-center transition-colors ease-in-out",Li={primary:`border-0 rounded-8 ${Pe}`,secondary:`border-2 rounded-8 ${Pe}`,utility:`border rounded-4 ${Pe}`,negative:`border-0 rounded-8 ${Pe}`,pill:`p-4 rounded-full border-0 inline-flex items-center justify-center hover:bg-clip-padding ${Pe}`,link:`bg-transparent focusable ease-in-out inline active:underline hover:underline focus:underline ${Ur.link}`},Le={base:"border-2 relative flex items-start",tooltip:"s-bg-inverted border-[--w-s-color-background-inverted] shadow-m s-text-inverted-static rounded-4 py-6 px-8",callout:"bg-[--w-color-callout-background] border-[--w-color-callout-border] s-text py-8 px-16 rounded-8",highlight:"bg-[--w-color-callout-background] border-[--w-color-callout-border] s-text py-8 px-16 rounded-8 drop-shadow-m translate-z-0",popover:"bg-[--w-s-color-surface-elevated-300] border-[--w-s-color-surface-elevated-300] s-text rounded-8 p-16 drop-shadow-m translate-z-0",arrowBase:"absolute h-[14px] w-[14px] border-2 border-b-0 border-r-0 rounded-tl-4 transform",arrowDirectionLeftStart:"-left-[8px]",arrowDirectionLeft:"-left-[8px]",arrowDirectionLeftEnd:"-left-[8px]",arrowDirectionRightStart:"-right-[8px]",arrowDirectionRight:"-right-[8px]",arrowDirectionRightEnd:"-right-[8px]",arrowDirectionBottomStart:"-bottom-[8px]",arrowDirectionBottom:"-bottom-[8px]",arrowDirectionBottomEnd:"-bottom-[8px]",arrowDirectionTopStart:"-top-[8px]",arrowDirectionTop:"-top-[8px]",arrowDirectionTopEnd:"-top-[8px]",arrowTooltip:"s-bg-inverted border-[--w-s-color-background-inverted]",arrowCallout:"bg-[--w-color-callout-background] border-[--w-color-callout-border]",arrowPopover:"bg-[--w-s-color-surface-elevated-300] border-[--w-s-color-surface-elevated-300]",arrowHighlight:"bg-[--w-color-callout-background] border-[--w-color-callout-border]",content:"last-child:mb-0",notCallout:"absolute z-50",closeBtn:`${Ei.medium} ${Li.pill} ${Ur.pill} justify-self-end -mr-8 ml-8`},V=class extends Ci{constructor(){super(),st(Sr,Lr,Er,Cr,Or),this.handleDone=this.handleDone.bind(this),this.show=!1,this.placement="bottom",this.tooltip=!1,this.callout=!1,this.popover=!1,this.highlight=!1,this.canClose=!1,this.noArrow=!1,this.distance=8,this.skidding=0,this.flip=!1,this.crossAxis=!1,this._initialPlacement=this.placement,this._actualDirection=this.placement}connectedCallback(){if(super.connectedCallback(),this.placement&&!Object.keys(xe).includes(this.placement))throw new Error(`Invalid "placement" attribute. Set its value to one of the following:
|
|
3571
|
+
${JSON.stringify(Object.keys(xe))}`);if(this.fallbackPlacements&&!this.fallbackPlacements.every(t=>wt.includes(t)))throw new Error(`Invalid "fallbackPlacements" attribute. Set its value to an array with one or more of the following:
|
|
3572
|
+
${JSON.stringify(wt)}`);setTimeout(()=>{this.requestUpdate(),this.handleDone()},0),this.callout||(window.addEventListener("click",this.handleDone),window.addEventListener("scroll",this.handleDone),window.addEventListener("resize",this.handleDone),window.addEventListener("touch",this.handleDone)),this.tooltip&&(window.addEventListener("mouseover",this.handleDone),window.addEventListener("mouseout",this.handleDone))}disconnectedCallback(){window.removeEventListener("click",this.handleDone),window.removeEventListener("scroll",this.handleDone),window.removeEventListener("resize",this.handleDone),window.removeEventListener("touch",this.handleDone),window.removeEventListener("mouseover",this.handleDone),window.removeEventListener("mouseout",this.handleDone),super.disconnectedCallback()}handleDone(){window.requestAnimationFrame(()=>{this.show&&this._targetEl&&this._attentionEl?yt(this.attentionState).then(t=>{this._actualDirection=t==null?void 0:t.actualDirection}):this._actualDirection=this._initialPlacement})}get _actualDirection(){return this.placement}set _actualDirection(t){this.placement=t}get _arrowEl(){return this.renderRoot.querySelector("#arrow")}get _arrowDirection(){return xe[this._actualDirection]}get _arrowClasses(){return ye([Le.arrowBase,this._activeVariantClasses.arrow,Le[`arrowDirection${xt(this._arrowDirection)}`]])}get _arrowHtml(){return this.noArrow?"":Ee`<div id="arrow" class="${this._arrowClasses}"></div>`}get _activeVariantClasses(){let t={callout:this.callout,popover:this.popover,tooltip:this.tooltip,highlight:this.highlight},r=Object.keys(t).find(o=>!!t[o])||"";return{wrapper:Le[r],arrow:Le[`arrow${r.charAt(0).toUpperCase()+r.slice(1)}`]}}get _attentionEl(){return this.renderRoot.querySelector("#attention")}get _targetEl(){var r;let t=(r=this.renderRoot)==null?void 0:r.querySelector("slot[name='target']");return t?t.assignedElements()[0]:null}get _messageEl(){let t=this.renderRoot.querySelector("slot[name='message']");return t?t.assignedElements()[0]:null}get _wrapperClasses(){return ye([Le.base,this._activeVariantClasses.wrapper])}get _ariaClose(){return P._({id:"attention.aria.close",message:"Close",comment:"Aria label for the close button in attention"})}get _closeBtnHtml(){return Ee`
|
|
3573
|
+
<button aria-label="${this._ariaClose}" @click=${this.close} @keydown=${this.keypressed} class="${Le.closeBtn}">
|
|
3353
3574
|
<w-icon-close-16 style="height: 16px; width: 16px; display: flex;"></w-icon-close-16>
|
|
3354
3575
|
</button>
|
|
3355
|
-
`}updated(){this.callout||this._attentionEl.style.setProperty("--attention-visibility",this.show?"":"hidden"),this.tooltip||this._attentionEl.style.setProperty("--attention-display",this.show?"flex":"none"),this.attentionState={isShowing:this.show,isCallout:this.callout,actualDirection:this._actualDirection,directionName:this.placement,arrowEl:this._arrowEl,attentionEl:this._attentionEl,targetEl:this._targetEl,noArrow:this.noArrow,distance:this.distance,skidding:this.skidding,flip:this.flip,crossAxis:this.crossAxis,fallbackPlacements:this.fallbackPlacements},
|
|
3356
|
-
<div class=${
|
|
3357
|
-
${this.placement==="right-start"||this.placement==="right"||this.placement==="right-end"||this.placement==="bottom-start"||this.placement==="bottom"||this.placement==="bottom-end"?
|
|
3576
|
+
`}updated(){this.callout||this._attentionEl.style.setProperty("--attention-visibility",this.show?"":"hidden"),this.tooltip||this._attentionEl.style.setProperty("--attention-display",this.show?"flex":"none"),this.attentionState={isShowing:this.show,isCallout:this.callout,actualDirection:this._actualDirection,directionName:this.placement,arrowEl:this._arrowEl,attentionEl:this._attentionEl,targetEl:this._targetEl,noArrow:this.noArrow,distance:this.distance,skidding:this.skidding,flip:this.flip,crossAxis:this.crossAxis,fallbackPlacements:this.fallbackPlacements},yt(this.attentionState)}pointingAtDirection(){switch(xe[this._actualDirection]){case"top-start":case"top":case"top-end":return P._({id:"attention.aria.pointingUp",message:"pointing up",comment:"Default screenreader message for top direction in the attention component"});case"right-start":case"right":case"right-end":return P._({id:"attention.aria.pointingRight",message:"pointing right",comment:"Default screenreader message for right direction in the attention component"});case"bottom-start":case"bottom":case"bottom-end":return P._({id:"attention.aria.pointingDown",message:"pointing down",comment:"Default screenreader message for bottom direction in the attention component"});case"left-start":case"left":case"left-end":return P._({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 P._({id:"attention.aria.tooltip",message:"tooltip",comment:"Default screenreader message for tooltip in the attention component"});case this.callout:return P._({id:"attention.aria.callout",message:"callout speech bubble",comment:"Default screenreader message for callout speech bubble in the attention component"});case this.popover:return P._({id:"attention.aria.popover",message:"popover speech bubble",comment:"Default screenreader message for popover speech bubble in the attention component"});case this.highlight:return P._({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=$r());this._targetEl.setAttribute("aria-details",t)}}firstUpdated(){this._initialPlacement=this.placement,this.setAriaLabels(),this.callout&&(this._attentionEl.style.position="relative")}close(){let t=new CustomEvent("close",{bubbles:!0,composed:!0});this.updateComplete.then(()=>this.dispatchEvent(t))}keypressed(t){this.canClose&&t.key==="Escape"&&(t.preventDefault(),this.close())}render(){return!this.callout&&this._targetEl===void 0?Ee``:Ee`
|
|
3577
|
+
<div class=${Si(this.className?this.className:void 0)}>
|
|
3578
|
+
${this.placement==="right-start"||this.placement==="right"||this.placement==="right-end"||this.placement==="bottom-start"||this.placement==="bottom"||this.placement==="bottom-end"?Ee`
|
|
3358
3579
|
<slot name="target"></slot>
|
|
3359
3580
|
|
|
3360
3581
|
<div id="attention" class="${this._wrapperClasses}">
|
|
3361
3582
|
<div role="${this.tooltip?"tooltip":"img"}" aria-label="${this.defaultAriaLabel()}">${this._arrowHtml}</div>
|
|
3362
3583
|
<slot name="message"></slot>
|
|
3363
|
-
${this.canClose?this._closeBtnHtml:
|
|
3584
|
+
${this.canClose?this._closeBtnHtml:Ir}
|
|
3364
3585
|
</div>
|
|
3365
|
-
`:
|
|
3586
|
+
`:Ee`
|
|
3366
3587
|
<div id="attention" class="${this._wrapperClasses}">
|
|
3367
3588
|
<slot name="message"></slot>
|
|
3368
3589
|
<div role="${this.tooltip?"tooltip":"img"}" aria-label="${this.defaultAriaLabel()}">${this._arrowHtml}</div>
|
|
3369
|
-
${this.canClose?this._closeBtnHtml:
|
|
3590
|
+
${this.canClose?this._closeBtnHtml:Ir}
|
|
3370
3591
|
</div>
|
|
3371
3592
|
<slot name="target"></slot>
|
|
3372
3593
|
`}
|
|
3373
3594
|
</div>
|
|
3374
|
-
`}};
|
|
3595
|
+
`}};V.styles=[Se,_r,Ar,_i`
|
|
3375
3596
|
#attention {
|
|
3376
3597
|
position: absolute;
|
|
3377
3598
|
z-index: 50;
|
|
@@ -3381,5 +3602,5 @@ ${JSON.stringify(rt)}`);setTimeout(()=>{this.requestUpdate(),this.handleDone()},
|
|
|
3381
3602
|
:host([popover]:not(:popover-open):not(dialog[open])) {
|
|
3382
3603
|
display: contents;
|
|
3383
3604
|
}
|
|
3384
|
-
`]
|
|
3605
|
+
`],$([G({type:Boolean,reflect:!0})],V.prototype,"show",2),$([G({type:String,reflect:!0})],V.prototype,"placement",2),$([G({type:Boolean,reflect:!0})],V.prototype,"tooltip",2),$([G({type:Boolean,reflect:!0})],V.prototype,"callout",2),$([G({type:Boolean,reflect:!0})],V.prototype,"popover",2),$([G({type:Boolean,reflect:!0})],V.prototype,"highlight",2),$([G({attribute:"can-close",type:Boolean,reflect:!0})],V.prototype,"canClose",2),$([G({attribute:"no-arrow",type:Boolean,reflect:!0})],V.prototype,"noArrow",2),$([G({type:Number,reflect:!0})],V.prototype,"distance",2),$([G({type:Number,reflect:!0})],V.prototype,"skidding",2),$([G({type:Boolean,reflect:!0})],V.prototype,"flip",2),$([G({attribute:"cross-axis",type:Boolean,reflect:!0})],V.prototype,"crossAxis",2),$([G({attribute:"fallback-placements",type:Array,reflect:!0})],V.prototype,"fallbackPlacements",2);customElements.get("w-attention")||customElements.define("w-attention",V);export{V as WarpAttention,Le as ccAttention};
|
|
3385
3606
|
//# sourceMappingURL=index.js.map
|