UNPKG

@postnord/web-components

Version:
6 lines 31.4 kB
/*! * Built with Stencil * By PostNord. */ var t=(t=>(t.Undefined="undefined",t.Null="null",t.String="string",t.Number="number",t.SpecialNumber="number",t.Boolean="boolean",t.BigInt="bigint",t))(t||{}),n=(t=>(t.Array="array",t.Date="date",t.Map="map",t.Object="object",t.RegularExpression="regexp",t.Set="set",t.Channel="channel",t.Symbol="symbol",t))(n||{}),e="type",l="value",o="serialized:",s=(t,n)=>{var e;Object.entries(null!=(e=n.l.t)?e:{}).map((([e,[l]])=>{if(31&l||32&l){const l=t[e],o=function(t,n){for(;t;){const e=Object.getOwnPropertyDescriptor(t,n);if(null==e?void 0:e.get)return e;t=Object.getPrototypeOf(t)}}(Object.getPrototypeOf(t),e)||Object.getOwnPropertyDescriptor(t,e);o&&Object.defineProperty(t,e,{get(){return o.get.call(this)},set(t){o.set.call(this,t)},configurable:!0,enumerable:!0}),t[e]=n.o.has(e)?n.o.get(e):l}}))},i=t=>{if(t.__stencil__getHostRef)return t.__stencil__getHostRef()},r=(t,n)=>{n&&(t.__stencil__getHostRef=()=>n,n.i=t,512&n.l.u&&s(t,n))},c=(t,n)=>n in t,u=(t,n)=>(0,console.error)(t,n),f=new Map,a=new Map,d="s-id",h="c-id",p="slot-fb{display:contents}slot-fb[hidden]{display:none}",v="http://www.w3.org/1999/xlink",$="undefined"!=typeof window?window:{},m=$.HTMLElement||class{},b={u:0,h:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,n,e,l)=>t.addEventListener(n,e,l),rel:(t,n,e,l)=>t.removeEventListener(n,e,l),ce:(t,n)=>new CustomEvent(t,n)},y=t=>Promise.resolve(t),g=(()=>{try{return!!$.document.adoptedStyleSheets&&(new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync)}catch(t){}return!1})(),w=!!g&&(()=>!!$.document&&Object.getOwnPropertyDescriptor($.document.adoptedStyleSheets,"length").writable)(),j=!1,O=[],S=[],N=(t,n)=>e=>{t.push(e),j||(j=!0,n&&4&b.u?C(x):b.raf(x))},k=t=>{for(let n=0;n<t.length;n++)try{t[n](performance.now())}catch(t){u(t)}t.length=0},x=()=>{k(O),k(S),(j=O.length>0)&&b.raf(x)},C=t=>y().then(t),E=N(S,!0),M=t=>{const n=W(t,"childNodes");t.tagName&&t.tagName.includes("-")&&t["s-cr"]&&"SLOT-FB"!==t.tagName&&T(n,t.tagName).forEach((t=>{1===t.nodeType&&"SLOT-FB"===t.tagName&&(t.hidden=!!L(t,F(t),!1).length)}));let e=0;for(e=0;e<n.length;e++){const t=n[e];1===t.nodeType&&W(t,"childNodes").length&&M(t)}},I=t=>{const n=[];for(let e=0;e<t.length;e++){const l=t[e]["s-nr"]||void 0;l&&l.isConnected&&n.push(l)}return n};function T(t,n,e){let l,o=0,s=[];for(;o<t.length;o++){if(l=t[o],l["s-sr"]&&(!n||l["s-hn"]===n)&&(void 0===e||F(l)===e)&&(s.push(l),void 0!==e))return s;s=[...s,...T(l.childNodes,n,e)]}return s}var L=(t,n,e=!0)=>{const l=[];(e&&t["s-sr"]||!t["s-sr"])&&l.push(t);let o=t;for(;o=o.nextSibling;)F(o)!==n||!e&&o["s-sr"]||l.push(o);return l},R=(t,n)=>1===t.nodeType?null===t.getAttribute("slot")&&""===n||t.getAttribute("slot")===n:t["s-sn"]===n||""===n,A=(t,n,e,l)=>{if(t["s-ol"]&&t["s-ol"].isConnected)return;const o=document.createTextNode("");if(o["s-nr"]=t,!n["s-cr"]||!n["s-cr"].parentNode)return;const s=n["s-cr"].parentNode,i=W(s,"appendChild");if(void 0!==l){o["s-oo"]=l;const t=W(s,"childNodes"),n=[o];t.forEach((t=>{t["s-nr"]&&n.push(t)})),n.sort(((t,n)=>!t["s-oo"]||t["s-oo"]<(n["s-oo"]||0)?-1:!n["s-oo"]||n["s-oo"]<t["s-oo"]?1:0)),n.forEach((t=>i.call(s,t)))}else i.call(s,o);t["s-ol"]=o,t["s-sh"]=n["s-hn"]},F=t=>"string"==typeof t["s-sn"]?t["s-sn"]:1===t.nodeType&&t.getAttribute("slot")||void 0;function D(t){if(t.assignedElements||t.assignedNodes||!t["s-sr"])return;const n=n=>function(t){const e=[],l=this["s-sn"];(null==t?void 0:t.flatten)&&console.error("\n Flattening is not supported for Stencil non-shadow slots.\n You can use `.childNodes` to nested slot fallback content.\n If you have a particular use case, please open an issue on the Stencil repo.\n ");const o=this["s-cr"].parentElement;return(o.__childNodes?o.childNodes:I(o.childNodes)).forEach((t=>{l===F(t)&&e.push(t)})),n?e.filter((t=>1===t.nodeType)):e}.bind(t);t.assignedElements=n(!0),t.assignedNodes=n(!1)}var P=t=>{if(t.__cloneNode)return;const n=t.__cloneNode=t.cloneNode;t.cloneNode=function(t){const e=n.call(this,!1);if(t){let t,n,l=0;const o=["s-id","s-cr","s-lr","s-rc","s-sc","s-p","s-cn","s-sr","s-sn","s-hn","s-ol","s-nr","s-si","s-rf","s-scs"],s=this.__childNodes||this.childNodes;for(;l<s.length;l++)t=s[l]["s-nr"],n=o.every((t=>!s[l][t])),t&&e.appendChild(t.cloneNode(!0)),n&&e.appendChild(s[l].cloneNode(!0))}return e}},_=t=>{class n extends Array{item(t){return this[t]}}B("children",t),Object.defineProperty(t,"children",{get(){return this.childNodes.filter((t=>1===t.nodeType))}}),Object.defineProperty(t,"childElementCount",{get(){return this.children.length}}),B("firstChild",t),Object.defineProperty(t,"firstChild",{get(){return this.childNodes[0]}}),B("lastChild",t),Object.defineProperty(t,"lastChild",{get(){return this.childNodes[this.childNodes.length-1]}}),B("childNodes",t),Object.defineProperty(t,"childNodes",{get(){const t=new n;return t.push(...I(this.__childNodes)),t}})},V=["children","nextElementSibling","previousElementSibling"],U=["childNodes","firstChild","lastChild","nextSibling","previousSibling","textContent","parentNode"];function B(t,n){if(!globalThis.Node||!globalThis.Element)return;let e;V.includes(t)?e=Object.getOwnPropertyDescriptor(Element.prototype,t):U.includes(t)&&(e=Object.getOwnPropertyDescriptor(Node.prototype,t)),e||(e=Object.getOwnPropertyDescriptor(n,t)),e&&Object.defineProperty(n,"__"+t,e)}function W(t,n){if("__"+n in t){const e=t["__"+n];return"function"!=typeof e?e:e.bind(t)}return"function"!=typeof t[n]?t[n]:t[n].bind(t)}function z(t){var n,e,l;return null!=(l=null==(e=null==(n=t.head)?void 0:n.querySelector('meta[name="csp-nonce"]'))?void 0:e.getAttribute("content"))?l:void 0}var H=new WeakMap,q=t=>"sc-"+t.p,Y=t=>"object"==(t=typeof t)||"function"===t,G=(t,n,...e)=>{"string"==typeof t&&(t=pn(t));let l=null,o=null,s=null,i=!1,r=!1;const c=[],u=n=>{for(let e=0;e<n.length;e++)l=n[e],Array.isArray(l)?u(l):null!=l&&"boolean"!=typeof l&&((i="function"!=typeof t&&!Y(l))&&(l+=""),i&&r?c[c.length-1].v+=l:c.push(i?J(null,l):l),r=i)};if(u(e),n){n.key&&(o=n.key),n.name&&(s=n.name);{const t=n.className||n.class;t&&(n.class="object"!=typeof t?t:Object.keys(t).filter((n=>t[n])).join(" "))}}if("function"==typeof t)return t(null===n?{}:n,c,Q);const f=J(t,null);return f.$=n,c.length>0&&(f.m=c),f.j=o,f.O=s,f},J=(t,n)=>({u:0,S:t,v:null!=n?n:null,N:null,m:null,$:null,j:null,O:null}),K={},Q={forEach:(t,n)=>t.map(X).forEach(n),map:(t,n)=>t.map(X).map(n).map(Z)},X=t=>({vattrs:t.$,vchildren:t.m,vkey:t.j,vname:t.O,vtag:t.S,vtext:t.v}),Z=t=>{if("function"==typeof t.vtag){const n={...t.vattrs};return t.vkey&&(n.key=t.vkey),t.vname&&(n.name=t.vname),G(t.vtag,n,...t.vchildren||[])}const n=J(t.vtag,t.vtext);return n.$=t.vattrs,n.m=t.vchildren,n.j=t.vkey,n.O=t.vname,n},tt=(t,n,e,l,o,s,i,r=[])=>{let c,u,f,a;if(1===s.nodeType){if(c=s.getAttribute(h),c&&(u=c.split("."),u[0]===i||"0"===u[0])){f=et({u:0,k:u[0],C:u[1],M:u[2],I:u[3],S:s.tagName.toLowerCase(),N:s,$:{class:s.className||""}}),n.push(f),s.removeAttribute(h),t.m||(t.m=[]);const l=f.N.getAttribute("s-sn");"string"==typeof l&&("slot-fb"===f.S&&lt(l,u[2],f,s,t,n,e,0,r),f.N["s-sn"]=l,f.N.removeAttribute("s-sn")),void 0!==f.I&&(t.m[f.I]=f),t=f}if(s.shadowRoot)for(a=s.shadowRoot.childNodes.length-1;a>=0;a--)tt(t,n,e,l,o,s.shadowRoot.childNodes[a],i,r);const d=s.__childNodes||s.childNodes;for(a=d.length-1;a>=0;a--)tt(t,n,e,l,o,d[a],i,r)}else if(8===s.nodeType)u=s.nodeValue.split("."),(u[1]===i||"0"===u[1])&&(c=u[0],f=et({k:u[1],C:u[2],M:u[3],I:u[4]||"0",N:s,$:null,m:null,j:null,O:null,S:null,v:null}),"t"===c?(f.N=rt(s,3),f.N&&3===f.N.nodeType&&(f.v=f.N.textContent,n.push(f),s.remove(),i===f.k&&(t.m||(t.m=[]),t.m[f.I]=f))):"c"===c?(f.N=rt(s,8),f.N&&8===f.N.nodeType&&(n.push(f),s.remove())):f.k===i&&("s"===c?lt(s["s-sn"]=u[5]||"",u[2],f,s,t,n,e,0,r):"r"===c&&(o["s-cr"]=s,s["s-cn"]=!0)));else if(t&&"style"===t.S){const n=J(null,s.textContent);n.N=s,n.I="0",t.m=[n]}return t},nt=(t,n)=>{if(1===t.nodeType){const e=t[d]||t.getAttribute(d);e&&n.set(e,t);let l=0;if(t.shadowRoot)for(;l<t.shadowRoot.childNodes.length;l++)nt(t.shadowRoot.childNodes[l],n);const o=t.__childNodes||t.childNodes;for(l=0;l<o.length;l++)nt(o[l],n)}else if(8===t.nodeType){const e=t.nodeValue.split(".");"o"===e[0]&&(n.set(e[1]+"."+e[2],t),t.nodeValue="",t["s-en"]=e[3])}},et=t=>({u:0,k:null,C:null,M:null,I:"0",N:null,$:null,m:null,j:null,O:null,S:null,v:null,...t});function lt(t,n,e,l,o,s,i,r,c){l["s-sr"]=!0,e.O=t||null,e.S="slot";const u=(null==o?void 0:o.N)?o.N["s-id"]||o.N.getAttribute("s-id"):"";{const s=e.N,i=u&&u!==e.k&&o.N.shadowRoot;it(c,n,t,l,i?u:e.k),D(l),i&&o.N.insertBefore(s,o.N.children[0])}s.push(e),i.push(e),o.m||(o.m=[]),o.m[e.I]=e}var ot,st,it=(t,n,e,l,o)=>{var s,i;let r=l.nextSibling;if(t[n]=t[n]||[],r&&!(null==(s=r.nodeValue)?void 0:s.startsWith("s.")))do{!r||(r.getAttribute&&r.getAttribute("slot")||r["s-sn"])!==e&&(""!==e||r["s-sn"]||r.getAttribute&&r.getAttribute("slot")||8!==r.nodeType&&3!==r.nodeType)||(r["s-sn"]=e,t[n].push({slot:l,node:r,hostId:o})),r=null==r?void 0:r.nextSibling}while(r&&!(null==(i=r.nodeValue)?void 0:i.startsWith("s.")))},rt=(t,n)=>{let e=t;do{e=e.nextSibling}while(e&&(e.nodeType!==n||!e.nodeValue));return e},ct=class o{static fromLocalValue(t){const n=t[e],s=l in t?t[l]:void 0;switch(n){case"string":case"boolean":return s;case"bigint":return BigInt(s);case"undefined":return;case"null":return null;case"number":return"NaN"===s?NaN:"-0"===s?-0:"Infinity"===s?1/0:"-Infinity"===s?-1/0:s;case"array":return s.map((t=>o.fromLocalValue(t)));case"date":return new Date(s);case"map":const t=new Map;for(const[n,e]of s){const l="object"==typeof n&&null!==n?o.fromLocalValue(n):n,s=o.fromLocalValue(e);t.set(l,s)}return t;case"object":const e={};for(const[t,n]of s)e[t]=o.fromLocalValue(n);return e;case"regexp":const{pattern:l,flags:i}=s;return RegExp(l,i);case"set":const r=new Set;for(const t of s)r.add(o.fromLocalValue(t));return r;case"symbol":return Symbol(s);default:throw Error("Unsupported type: "+n)}}static fromLocalValueArray(t){return t.map((t=>o.fromLocalValue(t)))}static isLocalValueObject(o){if("object"!=typeof o||null===o)return!1;if(!o.hasOwnProperty(e))return!1;const s=o[e];return!!Object.values({...t,...n}).includes(s)&&("null"===s||"undefined"===s||o.hasOwnProperty(l))}},ut=(t,n)=>"string"==typeof t&&t.startsWith(o)?t=function(t){return"string"==typeof t&&t.startsWith(o)?ct.fromLocalValue(JSON.parse(atob(t.slice(11)))):t}(t):null==t||Y(t)?t:4&n?"false"!==t&&(""===t||!!t):2&n?"string"==typeof t?parseFloat(t):"number"==typeof t?t:NaN:1&n?t+"":t,ft=t=>{var n;return null==(n=i(t))?void 0:n.$hostElement$},at=(t,n)=>{const e=ft(t);return{emit:t=>dt(e,n,{bubbles:!0,composed:!0,cancelable:!0,detail:t})}},dt=(t,n,e)=>{const l=b.ce(n,e);return t.dispatchEvent(l),l},ht=(t,n,e,l,o,s,i)=>{if(e===l)return;let r=c(t,n),u=n.toLowerCase();if("class"===n){const n=t.classList,o=vt(e);let s=vt(l);if((t["s-si"]||t["s-sc"])&&i){const e=t["s-sc"]||t["s-si"];s.push(e),o.forEach((t=>{t.startsWith(e)&&s.push(t)})),s=[...new Set(s)].filter((t=>t)),n.add(...s)}else n.remove(...o.filter((t=>t&&!s.includes(t)))),n.add(...s.filter((t=>t&&!o.includes(t))))}else if("style"===n){for(const n in e)l&&null!=l[n]||(n.includes("-")?t.style.removeProperty(n):t.style[n]="");for(const n in l)e&&l[n]===e[n]||(n.includes("-")?t.style.setProperty(n,l[n]):t.style[n]=l[n])}else if("key"===n);else if("ref"===n)l&&Dt(l,t);else if(r||"o"!==n[0]||"n"!==n[1]){const i=Y(l);if((r||i&&null!==l)&&!o)try{if(t.tagName.includes("-"))t[n]!==l&&(t[n]=l);else{const o=null==l?"":l;"list"===n?r=!1:null!=e&&t[n]==o||("function"==typeof t.__lookupSetter__(n)?t[n]=o:t.setAttribute(n,o))}}catch(t){}let c=!1;u!==(u=u.replace(/^xlink\:?/,""))&&(n=u,c=!0),null==l||!1===l?!1===l&&""!==t.getAttribute(n)||(c?t.removeAttributeNS(v,n):t.removeAttribute(n)):(!r||4&s||o)&&!i&&1===t.nodeType&&(l=!0===l?"":l,c?t.setAttributeNS(v,n,l):t.setAttribute(n,l))}else if(n="-"===n[2]?n.slice(3):c($,u)?u.slice(2):u[2]+n.slice(3),e||l){const o=n.endsWith($t);n=n.replace(mt,""),e&&b.rel(t,n,e,o),l&&b.ael(t,n,l,o)}},pt=/\s/,vt=t=>("object"==typeof t&&t&&"baseVal"in t&&(t=t.baseVal),t&&"string"==typeof t?t.split(pt):[]),$t="Capture",mt=RegExp($t+"$"),bt=(t,n,e,l)=>{const o=11===n.N.nodeType&&n.N.host?n.N.host:n.N,s=t&&t.$||{},i=n.$||{};for(const t of yt(Object.keys(s)))t in i||ht(o,t,s[t],void 0,e,n.u,l);for(const t of yt(Object.keys(i)))ht(o,t,s[t],i[t],e,n.u,l)};function yt(t){return t.includes("ref")?[...t.filter((t=>"ref"!==t)),"ref"]:t}var gt=!1,wt=!1,jt=!1,Ot=!1,St=[],Nt=[],kt=(t,n,e)=>{var l;const o=n.m[e];let s,i,r,c=0;if(gt||(jt=!0,"slot"===o.S&&(o.u|=o.m?2:1)),null!=o.v)s=o.N=$.document.createTextNode(o.v);else if(1&o.u)s=o.N=$.document.createTextNode(""),bt(null,o,Ot);else{if(Ot||(Ot="svg"===o.S),!$.document)throw Error("You are trying to render a Stencil component in an environment that doesn't support the DOM.");if(s=o.N=$.document.createElementNS(Ot?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",!gt&&2&o.u?"slot-fb":o.S),Ot&&"foreignObject"===o.S&&(Ot=!1),bt(null,o,Ot),o.m){const n="template"===o.S?s.content:s;for(c=0;c<o.m.length;++c)i=kt(t,o,c),i&&n.appendChild(i)}"svg"===o.S?Ot=!1:"foreignObject"===s.tagName&&(Ot=!0)}return s["s-hn"]=st,3&o.u&&(s["s-sr"]=!0,s["s-cr"]=ot,s["s-sn"]=o.O||"",s["s-rf"]=null==(l=o.$)?void 0:l.ref,D(s),r=t&&t.m&&t.m[e],r&&r.S===o.S&&t.N&&xt(t.N)),s},xt=t=>{b.u|=1;const n=t.closest(st.toLowerCase());if(null!=n){const e=Array.from(n.__childNodes||n.childNodes).find((t=>t["s-cr"])),l=Array.from(t.__childNodes||t.childNodes);for(const t of e?l.reverse():l)null!=t["s-sh"]&&(Pt(n,t,null!=e?e:null),t["s-sh"]=void 0,jt=!0)}b.u&=-2},Ct=(t,n)=>{b.u|=1;const e=Array.from(t.__childNodes||t.childNodes);if(t["s-sr"]){let n=t;for(;n=n.nextSibling;)n&&n["s-sn"]===t["s-sn"]&&n["s-sh"]===st&&e.push(n)}for(let t=e.length-1;t>=0;t--){const l=e[t];l["s-hn"]!==st&&l["s-ol"]&&(Pt(Tt(l).parentNode,l,Tt(l)),l["s-ol"].remove(),l["s-ol"]=void 0,l["s-sh"]=void 0,jt=!0),n&&Ct(l,n)}b.u&=-2},Et=(t,n,e,l,o,s)=>{let i,r=t["s-cr"]&&t["s-cr"].parentNode||t;for("template"===e.S&&(r=r.content);o<=s;++o)l[o]&&(i=kt(null,e,o),i&&(l[o].N=i,Pt(r,i,Tt(n))))},Mt=(t,n,e)=>{for(let l=n;l<=e;++l){const n=t[l];if(n){const t=n.N;Ft(n),t&&(wt=!0,t["s-ol"]?t["s-ol"].remove():Ct(t,!0),t.remove())}}},It=(t,n,e=!1)=>t.S===n.S&&("slot"===t.S?t.O===n.O:e?(e&&!t.j&&n.j&&(t.j=n.j),!0):t.j===n.j),Tt=t=>t&&t["s-ol"]||t,Lt=(t,n,e=!1)=>{const l=n.N=t.N,o=t.m,s=n.m,i=n.S,r=n.v;let c;null==r?(Ot="svg"===i||"foreignObject"!==i&&Ot,"slot"!==i||gt||t.O!==n.O&&(n.N["s-sn"]=n.O||"",xt(n.N.parentElement)),bt(t,n,Ot,e),null!==o&&null!==s?((t,n,e,l,o=!1)=>{let s,i,r=0,c=0,u=0,f=0,a=n.length-1,d=n[0],h=n[a],p=l.length-1,v=l[0],$=l[p];const m="template"===e.S?t.content:t;for(;r<=a&&c<=p;)if(null==d)d=n[++r];else if(null==h)h=n[--a];else if(null==v)v=l[++c];else if(null==$)$=l[--p];else if(It(d,v,o))Lt(d,v,o),d=n[++r],v=l[++c];else if(It(h,$,o))Lt(h,$,o),h=n[--a],$=l[--p];else if(It(d,$,o))"slot"!==d.S&&"slot"!==$.S||Ct(d.N.parentNode,!1),Lt(d,$,o),Pt(m,d.N,h.N.nextSibling),d=n[++r],$=l[--p];else if(It(h,v,o))"slot"!==d.S&&"slot"!==$.S||Ct(h.N.parentNode,!1),Lt(h,v,o),Pt(m,h.N,d.N),h=n[--a],v=l[++c];else{for(u=-1,f=r;f<=a;++f)if(n[f]&&null!==n[f].j&&n[f].j===v.j){u=f;break}u>=0?(i=n[u],i.S!==v.S?s=kt(n&&n[c],e,u):(Lt(i,v,o),n[u]=void 0,s=i.N),v=l[++c]):(s=kt(n&&n[c],e,c),v=l[++c]),s&&Pt(Tt(d.N).parentNode,s,Tt(d.N))}r>a?Et(t,null==l[p+1]?null:l[p+1].N,e,l,c,p):c>p&&Mt(n,r,a)})(l,o,n,s,e):null!==s?(null!==t.v&&(l.textContent=""),Et(l,null,n,s,0,s.length-1)):e||null===o?e&&null!==o&&null===s&&(n.m=o):Mt(o,0,o.length-1),Ot&&"svg"===i&&(Ot=!1)):(c=l["s-cr"])?c.parentNode.textContent=r:t.v!==r&&(l.data=r)},Rt=[],At=t=>{let n,e,l;const o=t.__childNodes||t.childNodes;for(const t of o){if(t["s-sr"]&&(n=t["s-cr"])&&n.parentNode){e=n.parentNode.__childNodes||n.parentNode.childNodes;const o=t["s-sn"];for(l=e.length-1;l>=0;l--)if(n=e[l],!(n["s-cn"]||n["s-nr"]||n["s-hn"]===t["s-hn"]||n["s-sh"]&&n["s-sh"]===t["s-hn"]))if(R(n,o)){let e=Rt.find((t=>t.T===n));wt=!0,n["s-sn"]=n["s-sn"]||o,e?(e.T["s-sh"]=t["s-hn"],e.L=t):(n["s-sh"]=t["s-hn"],Rt.push({L:t,T:n})),n["s-sr"]&&Rt.map((t=>{R(t.T,n["s-sn"])&&(e=Rt.find((t=>t.T===n)),e&&!t.L&&(t.L=e.L))}))}else Rt.some((t=>t.T===n))||Rt.push({T:n})}1===t.nodeType&&At(t)}},Ft=t=>{t.$&&t.$.ref&&St.push((()=>t.$.ref(null))),t.m&&t.m.map(Ft)},Dt=(t,n)=>{Nt.push((()=>t(n)))},Pt=(t,n,e,l)=>{if("string"==typeof n["s-sn"]){t.insertBefore(n,e);const{slotNode:o}=function(t,n){var e;if(!(n=n||(null==(e=t["s-ol"])?void 0:e.parentElement)))return{slotNode:null,slotName:""};const l=t["s-sn"]=F(t)||"";return{slotNode:T(W(n,"childNodes"),n.tagName,l)[0],slotName:l}}(n);return o&&!l&&function(t){t.dispatchEvent(new CustomEvent("slotchange",{bubbles:!1,cancelable:!1,composed:!1}))}(o),n}return t.__insertBefore?t.__insertBefore(n,e):null==t?void 0:t.insertBefore(n,e)},_t=(t,n)=>{if(n&&!t.R&&n["s-p"]){const e=n["s-p"].push(new Promise((l=>t.R=()=>{n["s-p"].splice(e-1,1),l()})))}},Vt=(t,n)=>{if(t.u|=16,4&t.u)return void(t.u|=512);_t(t,t.A);const e=()=>Ut(t,n);if(!n)return E(e);queueMicrotask((()=>{e()}))},Ut=(t,n)=>{const e=t.$hostElement$,l=t.i;if(!l)throw Error(`Can't render component <${e.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let o;return n?(t.F&&(t.F=!1,Jt(l,"connectedCallback",void 0,e)),t.u|=256,t.D&&(t.D.map((([t,n])=>Jt(l,t,n,e))),t.D=void 0),t.P.length&&t.P.forEach((t=>t(e))),o=Jt(l,"componentWillLoad",void 0,e)):o=Jt(l,"componentWillUpdate",void 0,e),o=Bt(o,(()=>Jt(l,"componentWillRender",void 0,e))),Bt(o,(()=>zt(t,l,n)))},Bt=(t,n)=>Wt(t)?t.then(n).catch((t=>{console.error(t),n()})):n(),Wt=t=>t instanceof Promise||t&&t.then&&"function"==typeof t.then,zt=async(t,n,e)=>{var l;const o=t.$hostElement$,s=o["s-rc"];e&&(t=>{const n=t.l;((t,n)=>{var e,l,o;const s=q(n),i=a.get(s);if(!$.document)return s;if(t=11===t.nodeType?t:$.document,i)if("string"==typeof i){let o,r=H.get(t=t.head||t);r||H.set(t,r=new Set);const c=t.querySelector(`[sty-id="${s}"]`);if(c)c.textContent=i;else if(!r.has(s)){o=$.document.createElement("style"),o.textContent=i;const c=null!=(e=b._)?e:z($.document);if(null!=c&&o.setAttribute("nonce",c),!(1&n.u))if("HEAD"===t.nodeName){const n=t.querySelectorAll("link[rel=preconnect]"),e=n.length>0?n[n.length-1].nextSibling:t.querySelector("style");t.insertBefore(o,(null==e?void 0:e.parentNode)===t?e:null)}else if("host"in t)if(g){const n=new(null!=(l=t.defaultView)?l:t.ownerDocument.defaultView).CSSStyleSheet;n.replaceSync(i),w?t.adoptedStyleSheets.unshift(n):t.adoptedStyleSheets=[n,...t.adoptedStyleSheets]}else{const n=t.querySelector("style");n?n.textContent=i+n.textContent:t.prepend(o)}else t.append(o);1&n.u&&t.insertBefore(o,null),4&n.u&&(o.textContent+=p),r&&r.add(s)}}else{let n=H.get(t);if(n||H.set(t,n=new Set),!n.has(s)){const e=null!=(o=t.defaultView)?o:t.ownerDocument.defaultView;let l;if(i.constructor===e.CSSStyleSheet)l=i;else{l=new e.CSSStyleSheet;for(let t=0;t<i.cssRules.length;t++)l.insertRule(i.cssRules[t].cssText,t)}w?t.adoptedStyleSheets.push(l):t.adoptedStyleSheets=[...t.adoptedStyleSheets,l],n.add(s)}}})(t.$hostElement$.getRootNode(),n)})(t);Ht(t,n,o,e),s&&(s.map((t=>t())),o["s-rc"]=void 0);{const n=null!=(l=o["s-p"])?l:[],e=()=>qt(t);0===n.length?e():(Promise.all(n).then(e),t.u|=4,n.length=0)}},Ht=(t,n,e,l)=>{try{n=n.render(),t.u&=-17,t.u|=2,((t,n,e=!1)=>{var l,o,s,i,r;const c=t.$hostElement$,u=t.l,f=t.V||J(null,null),a=(t=>t&&t.S===K)(n)?n:G(null,null,n);if(st=c.tagName,u.U&&(a.$=a.$||{},u.U.forEach((([t,n])=>{a.$[n]=c[t]}))),e&&a.$)for(const t of Object.keys(a.$))c.hasAttribute(t)&&!["key","ref","style","class"].includes(t)&&(a.$[t]=c[t]);if(a.S=null,a.u|=4,t.V=a,a.N=f.N=c,gt=!1,ot=c["s-cr"],wt=!1,Lt(f,a,e),b.u|=1,jt){At(a.N);for(const t of Rt){const n=t.T;if(!n["s-ol"]&&$.document){const t=$.document.createTextNode("");t["s-nr"]=n,Pt(n.parentNode,n["s-ol"]=t,n,e)}}for(const t of Rt){const n=t.T,r=t.L;if(1===n.nodeType&&e&&(n["s-ih"]=null!=(l=n.hidden)&&l),r){const t=r.parentNode;let l=r.nextSibling;if(l&&1===l.nodeType){let e=null==(o=n["s-ol"])?void 0:o.previousSibling;for(;e;){let o=null!=(s=e["s-nr"])?s:null;if(o&&o["s-sn"]===n["s-sn"]&&t===(o.__parentNode||o.parentNode)){for(o=o.nextSibling;o===n||(null==o?void 0:o["s-sr"]);)o=null==o?void 0:o.nextSibling;if(!o||!o["s-nr"]){l=o;break}}e=e.previousSibling}}if((!l&&t!==(n.__parentNode||n.parentNode)||(n.__nextSibling||n.nextSibling)!==l)&&n!==l){if(Pt(t,n,l,e),8===n.nodeType&&n.nodeValue.startsWith("s-nt-")){const t=$.document.createTextNode(n.nodeValue.replace(/^s-nt-/,""));t["s-hn"]=n["s-hn"],t["s-sn"]=n["s-sn"],t["s-sh"]=n["s-sh"],t["s-sr"]=n["s-sr"],t["s-ol"]=n["s-ol"],t["s-ol"]["s-nr"]=t,Pt(n.parentNode,t,n,e),n.parentNode.removeChild(n)}1===n.nodeType&&"SLOT-FB"!==n.tagName&&(n.hidden=null!=(i=n["s-ih"])&&i)}n&&"function"==typeof r["s-rf"]&&r["s-rf"](r)}else 1===n.nodeType&&(n.hidden=!0)}}if(wt&&M(a.N),b.u&=-2,Rt.length=0,!gt&&!(1&u.u)&&c["s-cr"]){const t=a.N.__childNodes||a.N.childNodes;for(const n of t)if(n["s-hn"]!==st&&!n["s-sh"])if(e&&null==n["s-ih"]&&(n["s-ih"]=null!=(r=n.hidden)&&r),1===n.nodeType)n.hidden=!0;else if(3===n.nodeType&&n.nodeValue.trim()){const t=$.document.createComment("s-nt-"+n.nodeValue);t["s-sn"]=n["s-sn"],Pt(n.parentNode,t,n,e),n.parentNode.removeChild(n)}}ot=void 0,St.forEach((t=>t())),St.length=0,Nt.forEach((t=>t())),Nt.length=0})(t,n,l)}catch(n){u(n,t.$hostElement$)}return null},qt=t=>{const n=t.$hostElement$,e=t.i,l=t.A;Jt(e,"componentDidRender",void 0,n),64&t.u?Jt(e,"componentDidUpdate",void 0,n):(t.u|=64,Kt(n),Jt(e,"componentDidLoad",void 0,n),t.B(n),l||Gt()),t.W(n),t.R&&(t.R(),t.R=void 0),512&t.u&&C((()=>Vt(t,!1))),t.u&=-517},Yt=t=>{var n;{const e=i(t),l=null==(n=null==e?void 0:e.$hostElement$)?void 0:n.isConnected;return l&&2==(18&e.u)&&Vt(e,!1),l}},Gt=()=>{var t;C((()=>dt($,"appload",{detail:{namespace:"postnord-web-components"}}))),(null==(t=b.H)?void 0:t.size)&&b.H.clear()},Jt=(t,n,e,l)=>{if(t&&t[n])try{return t[n](e)}catch(t){u(t,l)}},Kt=t=>t.classList.add("hydrated"),Qt=(t,n,e,l)=>{const o=i(t);if(!o)return;if(!o)throw Error(`Couldn't find host element for "${l.p}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/stenciljs/core/issues/5457).`);const s=o.$hostElement$,r=o.o.get(n),c=o.u,f=o.i;if(e=ut(e,l.t[n][0]),!(8&c&&void 0!==r||e===r||Number.isNaN(r)&&Number.isNaN(e))){if(o.o.set(n,e),l.q){const t=l.q[n];t&&t.map((t=>{try{const[[l,s]]=Object.entries(t);(128&c||1&s)&&(f?f[l](e,r,n):o.P.push((()=>{o.i[l](e,r,n)})))}catch(t){u(t,s)}}))}if(2==(18&c)){if(f.componentShouldUpdate&&!1===f.componentShouldUpdate(e,r,n))return;Vt(o,!1)}}},Xt=(t,n,e)=>{var l,o;const s=t.prototype;{t.watchers&&!n.q&&(n.q=t.watchers),t.deserializers&&!n.Y&&(n.Y=t.deserializers),t.serializers&&!n.G&&(n.G=t.serializers);const r=Object.entries(null!=(l=n.t)?l:{});if(r.map((([t,[l]])=>{if(31&l||2&e&&32&l){const{get:o,set:r}=Object.getOwnPropertyDescriptor(s,t)||{};o&&(n.t[t][0]|=2048),r&&(n.t[t][0]|=4096),(1&e||!o)&&Object.defineProperty(s,t,{get(){{if(!(2048&n.t[t][0]))return((t,n)=>i(this).o.get(n))(0,t);const e=i(this),l=e?e.i:s;if(!l)return;return l[t]}},configurable:!0,enumerable:!0}),Object.defineProperty(s,t,{set(o){const s=i(this);if(s){if(r)return void 0===(32&l?this[t]:s.$hostElement$[t])&&s.o.get(t)&&(o=s.o.get(t)),r.call(this,ut(o,l)),void Qt(this,t,o=32&l?this[t]:s.$hostElement$[t],n);{if(!(1&e&&4096&n.t[t][0]))return Qt(this,t,o,n),void(1&e&&!s.i&&s.P.push((()=>{4096&n.t[t][0]&&s.i[t]!==s.o.get(t)&&(s.i[t]=o)})));const i=()=>{const e=s.i[t];!s.o.get(t)&&e&&s.o.set(t,e),s.i[t]=ut(o,l),Qt(this,t,s.i[t],n)};s.i?i():s.P.push((()=>{i()}))}}}})}else 1&e&&64&l&&Object.defineProperty(s,t,{value(...n){var e;const l=i(this);return null==(e=null==l?void 0:l.J)?void 0:e.then((()=>{var e;return null==(e=l.i)?void 0:e[t](...n)}))}})})),1&e){const e=new Map;s.attributeChangedCallback=function(t,l,o){b.jmp((()=>{var c;const u=e.get(t),f=i(this);if(this.hasOwnProperty(u)&&(o=this[u],delete this[u]),s.hasOwnProperty(u)&&"number"==typeof this[u]&&this[u]==o)return;if(null==u){const e=null==f?void 0:f.u;if(f&&e&&!(8&e)&&o!==l){const s=f.i,i=null==(c=n.q)?void 0:c[t];null==i||i.forEach((n=>{const[[i,r]]=Object.entries(n);null!=s[i]&&(128&e||1&r)&&s[i].call(s,o,l,t)}))}return}const a=r.find((([t])=>t===u));a&&4&a[1][0]&&(o=null!==o&&"false"!==o);const d=Object.getOwnPropertyDescriptor(s,u);o==this[u]||d.get&&!d.set||(this[u]=o)}))},t.observedAttributes=Array.from(new Set([...Object.keys(null!=(o=n.q)?o:{}),...r.filter((([t,n])=>31&n[0])).map((([t,l])=>{var o;const s=l[1]||t;return e.set(s,t),512&l[0]&&(null==(o=n.U)||o.push([t,s])),s}))]))}}return t},Zt=(t,n)=>{Jt(t,"connectedCallback",void 0,n)},tn=t=>{if(!(1&b.u)){const n=i(t);if(!n)return;const e=n.l,l=()=>{};if(1&n.u)sn(t,n,e.K),(null==n?void 0:n.i)?Zt(n.i,t):(null==n?void 0:n.X)&&n.X.then((()=>Zt(n.i,t)));else{let l;n.u|=1,l=t.getAttribute(d),l&&((t,n,e,l)=>{var o,s,r,c;const u=t.shadowRoot,f=[],a=[],h=J(n,null);h.N=t,!$.document||b.H&&b.H.size||nt($.document.body,b.H=new Map),t[d]=e,t.removeAttribute(d),l.V=tt(h,f,[],null,t,t,e,a);let p=0;const v=f.length;let m;for(;p<v;p++){m=f[p];const e=m.k+"."+m.C,l=b.H.get(e),s=m.N;if(u){if((null==(o=m.S)?void 0:(""+o).includes("-"))&&"slot-fb"!==m.S&&!m.N.shadowRoot){const t=i(m.N);if(t){const n=q(t.l),e=$.document.querySelector(`style[sty-id="${n}"]`);e&&null.unshift(e.cloneNode(!0))}}}else s["s-hn"]=pn(n).toUpperCase(),"slot"===m.S&&(s["s-cr"]=t["s-cr"]);"slot"===m.S&&(m.O=m.N["s-sn"]||m.N.name||null,m.m?(m.u|=2,m.N.childNodes.length||m.m.forEach((t=>{m.N.appendChild(t.N)}))):m.u|=1),l&&l.isConnected&&(l.parentElement.shadowRoot&&""===l["s-en"]&&l.parentNode.insertBefore(s,l.nextSibling),l.parentNode.removeChild(l),u||(s["s-oo"]=parseInt(m.C))),l&&!l["s-id"]&&b.H.delete(e)}const y=[],g=a.length;let w,j,O,S,N=0,k=0;for(;N<g;N++)if(w=a[N],w&&w.length)for(O=w.length,j=0;j<O;j++){if(S=w[j],y[S.hostId]||(y[S.hostId]=b.H.get(S.hostId)),!y[S.hostId])continue;const t=y[S.hostId];t.shadowRoot&&S.node.parentElement!==t&&t.insertBefore(S.node,null==(r=null==(s=w[j-1])?void 0:s.node)?void 0:r.nextSibling),t.shadowRoot&&u||(S.slot["s-cr"]||(S.slot["s-cr"]=t["s-cr"],S.slot["s-cr"]=!S.slot["s-cr"]&&t.shadowRoot?t:(t.__childNodes||t.childNodes)[0]),A(S.node,S.slot,0,S.node["s-oo"]||k),(null==(c=S.node.parentElement)?void 0:c.shadowRoot)&&S.node.getAttribute&&S.node.getAttribute("slot")&&S.node.removeAttribute("slot")),k=(S.node["s-oo"]||k)+1}l.$hostElement$=t})(t,e.p,l,n),l||12&e.u&&nn(t);{let e=t;for(;e=e.parentNode||e.host;)if(1===e.nodeType&&e.hasAttribute("s-id")&&e["s-p"]||e["s-p"]){_t(n,n.A=e);break}}e.t&&Object.entries(e.t).map((([n,[e]])=>{if(31&e&&n in t&&t[n]!==Object.prototype[n]){const e=t[n];delete t[n],t[n]=e}})),(async(t,n,e)=>{let l;if(!(32&n.u)){if(n.u|=32,e.Z){const o=((t,n)=>{const e=t.p.replace(/-/g,"_"),l=t.Z;if(!l)return;const o=f.get(l);return o?o[e]:import(`./${l}.entry.js`).then((t=>(f.set(l,t),t[e])),(t=>{u(t,n.$hostElement$)})) /*!__STENCIL_STATIC_IMPORT_SWITCH__*/})(e,n);if(o&&"then"in o){const t=()=>{};l=await o,t()}else l=o;if(!l)throw Error(`Constructor for "${e.p}#${n.tt}" was not found`);l.isProxied||(e.q=l.watchers,e.G=l.serializers,e.Y=l.deserializers,Xt(l,e,2),l.isProxied=!0);const s=()=>{};n.u|=8;try{new l(n)}catch(n){u(n,t)}n.u&=-9,n.u|=128,s(),4&e.u?n.F=!0:Zt(n.i,t)}else l=t.constructor,customElements.whenDefined(t.localName).then((()=>n.u|=128));if(l&&l.style){let t;"string"==typeof l.style&&(t=l.style);const n=q(e);if(!a.has(n)){const l=()=>{};((t,n,e)=>{let l=a.get(t);g&&e?(l=l||new CSSStyleSheet,"string"==typeof l?l=n:l.replaceSync(n)):l=n,a.set(t,l)})(n,t,!!(1&e.u)),l()}}}const o=n.A,s=()=>Vt(n,!0);o&&o["s-rc"]?o["s-rc"].push(s):s()})(t,n,e)}l()}},nn=t=>{if(!$.document)return;const n=t["s-cr"]=$.document.createComment("");n["s-cn"]=!0,Pt(t,n,t.firstChild)},en=(t,n)=>{Jt(t,"disconnectedCallback",void 0,n||t)},ln=(t,n={})=>{var e;if(!$.document)return void console.warn("Stencil: No document found. Skipping bootstrapping lazy components.");const l=[],o=n.exclude||[],s=$.customElements,r=$.document.head,c=r.querySelector("meta[charset]"),u=$.document.createElement("style"),f=[];let a,d=!0;Object.assign(b,n),b.h=new URL(n.resourcesUrl||"./",$.document.baseURI).href,b.u|=2;let h=!1;if(t.map((t=>{t[1].map((e=>{var r,c,u;const p={u:e[0],p:e[1],t:e[2],K:e[3]};4&p.u&&(h=!0),p.t=e[2],p.K=e[3],p.U=[],p.q=null!=(r=e[4])?r:{},p.G=null!=(c=e[5])?c:{},p.Y=null!=(u=e[6])?u:{};const v=n.transformTagName?n.transformTagName(p.p):pn(p.p),$=class extends HTMLElement{"s-p";"s-rc";hasRegisteredEventListeners=!1;constructor(t){super(t),((t,n)=>{const e={u:0,$hostElement$:t,l:n,o:new Map,nt:new Map};e.J=new Promise((t=>e.W=t)),e.X=new Promise((t=>e.B=t)),t["s-p"]=[],t["s-rc"]=[],e.P=[];const l=e;t.__stencil__getHostRef=()=>l})(t=this,p)}connectedCallback(){const t=i(this);t&&(this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0,sn(this,t,p.K)),a&&(clearTimeout(a),a=null),d?f.push(this):b.jmp((()=>tn(this))))}disconnectedCallback(){b.jmp((()=>(async t=>{if(!(1&b.u)){const n=i(t);(null==n?void 0:n.et)&&(n.et.map((t=>t())),n.et=void 0),(null==n?void 0:n.i)?en(n.i,t):(null==n?void 0:n.X)&&n.X.then((()=>en(n.i,t)))}H.has(t)&&H.delete(t),t.shadowRoot&&H.has(t.shadowRoot)&&H.delete(t.shadowRoot)})(this))),b.raf((()=>{var t;const n=i(this);if(!n)return;const e=f.findIndex((t=>t===this));e>-1&&f.splice(e,1),(null==(t=null==n?void 0:n.V)?void 0:t.N)instanceof Node&&!n.V.N.isConnected&&delete n.V.N}))}componentOnReady(){var t;return null==(t=i(this))?void 0:t.X}};!(1&p.u)&&256&p.u?(_($.prototype),P($.prototype)):P($.prototype),p.Z=t[0],o.includes(v)||s.get(v)||(l.push(v),s.define(v,Xt($,p,1)))}))})),l.length>0&&(h&&(u.textContent+=p),u.textContent+=l.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",u.innerHTML.length)){u.setAttribute("data-styles","");const t=null!=(e=b._)?e:z($.document);null!=t&&u.setAttribute("nonce",t),r.insertBefore(u,c?c.nextSibling:r.firstChild)}d=!1,f.length?f.map((t=>t.connectedCallback())):b.jmp((()=>a=setTimeout(Gt,30)))},on=(t,n)=>n,sn=(t,n,e)=>{e&&$.document&&e.map((([e,l,o])=>{const s=cn($.document,t,e),i=rn(n,o),r=un(e);b.ael(s,l,i,r),(n.et=n.et||[]).push((()=>b.rel(s,l,i,r)))}))},rn=(t,n)=>e=>{var l;try{256&t.u?null==(l=t.i)||l[n](e):(t.D=t.D||[]).push([n,e])}catch(n){u(n,t.$hostElement$)}},cn=(t,n,e)=>8&e?$:n,un=t=>({passive:!!(1&t),capture:!!(2&t)}),fn=class{};function an(...t){return t.reduceRight(((t,n)=>n(t)),fn)}var dn=t=>b._=t,hn=void 0;function pn(t){return hn?hn(t):t}function vn(t){hn&&console.warn("\n A tagTransformer has already been set. \n Overwriting it may lead to error and unexpected results if your components have already been defined.\n "),hn=t}export{on as F,m as H,an as M,K as a,ln as b,at as c,vn as d,Yt as f,ft as g,G as h,y as p,r,dn as s,pn as t}