@trimble-oss/moduswebcomponents
Version:
Modus Web Components is a modern, accessible UI library built with Stencil JS that provides reusable web components following Trimble's Modus design system. This updated version focuses on improved flexibility, enhanced theming options, comprehensive cust
2 lines • 20 kB
JavaScript
var t=Object.defineProperty,e=t=>{if(t.__stencil__getHostRef)return t.__stencil__getHostRef()},n=(t,e)=>{t.__stencil__getHostRef=()=>e,e.t=t},o=(t,e)=>e in t,l=(t,e)=>(0,console.error)(t,e),s=new Map,i=new Map,r="slot-fb{display:contents}slot-fb[hidden]{display:none}",c="http://www.w3.org/1999/xlink",u="undefined"!=typeof window?window:{},f={o:0,l:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,e,n,o)=>t.addEventListener(e,n,o),rel:(t,e,n,o)=>t.removeEventListener(e,n,o),ce:(t,e)=>new CustomEvent(t,e)},a=t=>Promise.resolve(t),d=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(t){}return!1})(),p=!1,h=[],v=[],m=(t,e)=>n=>{t.push(n),p||(p=!0,e&&4&f.o?w(b):f.raf(b))},y=t=>{for(let e=0;e<t.length;e++)try{t[e](performance.now())}catch(t){l(t)}t.length=0},b=()=>{y(h),y(v),(p=h.length>0)&&f.raf(b)},w=t=>a().then(t),$=m(v,!0),g=t=>"object"==(t=typeof t)||"function"===t;function S(t){var e,n,o;return null!=(o=null==(n=null==(e=t.head)?void 0:e.querySelector('meta[name="csp-nonce"]'))?void 0:n.getAttribute("content"))?o:void 0}((e,n)=>{for(var o in n)t(e,o,{get:n[o],enumerable:!0})})({},{err:()=>k,map:()=>O,ok:()=>j,unwrap:()=>E,unwrapErr:()=>C});var j=t=>({isOk:!0,isErr:!1,value:t}),k=t=>({isOk:!1,isErr:!0,value:t});function O(t,e){if(t.isOk){const n=e(t.value);return n instanceof Promise?n.then((t=>j(t))):j(n)}if(t.isErr)return k(t.value);throw"should never get here"}var E=t=>{if(t.isOk)return t.value;throw t.value},C=t=>{if(t.isErr)return t.value;throw t.value},x=t=>{const e=F(t,"childNodes");t.tagName&&t.tagName.includes("-")&&t["s-cr"]&&"SLOT-FB"!==t.tagName&&N(e,t.tagName).forEach((t=>{1===t.nodeType&&"SLOT-FB"===t.tagName&&(t.hidden=!!M(t,T(t),!1).length)}));let n=0;for(n=0;n<e.length;n++){const t=e[n];1===t.nodeType&&F(t,"childNodes").length&&x(t)}};function N(t,e,n){let o,l=0,s=[];for(;l<t.length;l++)o=t[l],!o["s-sr"]||e&&o["s-hn"]!==e||void 0!==n||s.push(o),s=[...s,...N(o.childNodes,e,n)];return s}var M=(t,e,n=!0)=>{const o=[];(n&&t["s-sr"]||!t["s-sr"])&&o.push(t);let l=t;for(;l=l.nextSibling;)T(l)!==e||!n&&l["s-sr"]||o.push(l);return o},R=(t,e)=>1===t.nodeType?null===t.getAttribute("slot")&&""===e||t.getAttribute("slot")===e:t["s-sn"]===e||""===e,T=t=>"string"==typeof t["s-sn"]?t["s-sn"]:1===t.nodeType&&t.getAttribute("slot")||void 0;function F(t,e){if("__"+e in t){const n=t["__"+e];return"function"!=typeof n?n:n.bind(t)}return"function"!=typeof t[e]?t[e]:t[e].bind(t)}var P=(t,e,...n)=>{let o=null,l=null,s=null,i=!1,r=!1;const c=[],u=e=>{for(let n=0;n<e.length;n++)o=e[n],Array.isArray(o)?u(o):null!=o&&"boolean"!=typeof o&&((i="function"!=typeof t&&!g(o))&&(o+=""),i&&r?c[c.length-1].i+=o:c.push(i?L(null,o):o),r=i)};if(u(n),e){e.key&&(l=e.key),e.name&&(s=e.name);{const t=e.className||e.class;t&&(e.class="object"!=typeof t?t:Object.keys(t).filter((e=>t[e])).join(" "))}}if("function"==typeof t)return t(null===e?{}:e,c,D);const f=L(t,null);return f.u=e,c.length>0&&(f.p=c),f.h=l,f.v=s,f},L=(t,e)=>({o:0,m:t,i:e,$:null,p:null,u:null,h:null,v:null}),A={},D={forEach:(t,e)=>t.map(W).forEach(e),map:(t,e)=>t.map(W).map(e).map(U)},W=t=>({vattrs:t.u,vchildren:t.p,vkey:t.h,vname:t.v,vtag:t.m,vtext:t.i}),U=t=>{if("function"==typeof t.vtag){const e={...t.vattrs};return t.vkey&&(e.key=t.vkey),t.vname&&(e.name=t.vname),P(t.vtag,e,...t.vchildren||[])}const e=L(t.vtag,t.vtext);return e.u=t.vattrs,e.p=t.vchildren,e.h=t.vkey,e.v=t.vname,e},_=t=>{const e=(t=>t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"))(t);return RegExp(`(^|[^@]|@(?!supports\\s+selector\\s*\\([^{]*?${e}))(${e}\\b)`,"g")};_("::slotted"),_(":host"),_(":host-context");var H,B,z=(t,e)=>null==t||g(t)?t:4&e?"false"!==t&&(""===t||!!t):2&e?"string"==typeof t?parseFloat(t):"number"==typeof t?t:NaN:1&e?t+"":t,I=t=>e(t).$hostElement$,V=(t,e)=>{const n=I(t);return{emit:t=>Y(n,e,{bubbles:!0,composed:!0,cancelable:!0,detail:t})}},Y=(t,e,n)=>{const o=f.ce(e,n);return t.dispatchEvent(o),o},q=new WeakMap,G=t=>"sc-"+t.S,J=(t,e,n,l,s,i)=>{if(n===l)return;let r=o(t,e),a=e.toLowerCase();if("class"===e){const e=t.classList,o=Q(n);let s=Q(l);e.remove(...o.filter((t=>t&&!s.includes(t)))),e.add(...s.filter((t=>t&&!o.includes(t))))}else if("style"===e){for(const e in n)l&&null!=l[e]||(e.includes("-")?t.style.removeProperty(e):t.style[e]="");for(const e in l)n&&l[e]===n[e]||(e.includes("-")?t.style.setProperty(e,l[e]):t.style[e]=l[e])}else if("key"===e);else if("ref"===e)l&&l(t);else if(r||"o"!==e[0]||"n"!==e[1]){const o=g(l);if((r||o&&null!==l)&&!s)try{if(t.tagName.includes("-"))t[e]!==l&&(t[e]=l);else{const o=null==l?"":l;"list"===e?r=!1:null!=n&&t[e]==o||("function"==typeof t.__lookupSetter__(e)?t[e]=o:t.setAttribute(e,o))}}catch(t){}let u=!1;a!==(a=a.replace(/^xlink\:?/,""))&&(e=a,u=!0),null==l||!1===l?!1===l&&""!==t.getAttribute(e)||(u?t.removeAttributeNS(c,e):t.removeAttribute(e)):(!r||4&i||s)&&!o&&1===t.nodeType&&(l=!0===l?"":l,u?t.setAttributeNS(c,e,l):t.setAttribute(e,l))}else if(e="-"===e[2]?e.slice(3):o(u,a)?a.slice(2):a[2]+e.slice(3),n||l){const o=e.endsWith(X);e=e.replace(Z,""),n&&f.rel(t,e,n,o),l&&f.ael(t,e,l,o)}},K=/\s/,Q=t=>("object"==typeof t&&t&&"baseVal"in t&&(t=t.baseVal),t&&"string"==typeof t?t.split(K):[]),X="Capture",Z=RegExp(X+"$"),tt=(t,e,n)=>{const o=11===e.$.nodeType&&e.$.host?e.$.host:e.$,l=t&&t.u||{},s=e.u||{};for(const t of et(Object.keys(l)))t in s||J(o,t,l[t],void 0,n,e.o);for(const t of et(Object.keys(s)))J(o,t,l[t],s[t],n,e.o)};function et(t){return t.includes("ref")?[...t.filter((t=>"ref"!==t)),"ref"]:t}var nt=!1,ot=!1,lt=!1,st=!1,it=(t,e,n)=>{var o;const l=e.p[n];let s,i,r,c=0;if(nt||(lt=!0,"slot"===l.m&&(l.o|=l.p?2:1)),null!==l.i)s=l.$=u.document.createTextNode(l.i);else if(1&l.o)s=l.$=u.document.createTextNode(""),tt(null,l,st);else{if(st||(st="svg"===l.m),!u.document)throw Error("You are trying to render a Stencil component in an environment that doesn't support the DOM. Make sure to populate the [`window`](https://developer.mozilla.org/en-US/docs/Web/API/Window/window) object before rendering a component.");if(s=l.$=u.document.createElementNS(st?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",!nt&&2&l.o?"slot-fb":l.m),st&&"foreignObject"===l.m&&(st=!1),tt(null,l,st),l.p)for(c=0;c<l.p.length;++c)i=it(t,l,c),i&&s.appendChild(i);"svg"===l.m?st=!1:"foreignObject"===s.tagName&&(st=!0)}return s["s-hn"]=B,3&l.o&&(s["s-sr"]=!0,s["s-cr"]=H,s["s-sn"]=l.v||"",s["s-rf"]=null==(o=l.u)?void 0:o.ref,function(t){if(t.assignedElements||t.assignedNodes||!t["s-sr"])return;const e=e=>function(t){const n=[],o=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 l=this["s-cr"].parentElement;return(l.__childNodes?l.childNodes:(t=>{const e=[];for(let n=0;n<t.length;n++){const o=t[n]["s-nr"]||void 0;o&&o.isConnected&&e.push(o)}return e})(l.childNodes)).forEach((t=>{o===T(t)&&n.push(t)})),e?n.filter((t=>1===t.nodeType)):n}.bind(t);t.assignedElements=e(!0),t.assignedNodes=e(!1)}(s),r=t&&t.p&&t.p[n],r&&r.m===l.m&&t.$&&rt(t.$,!1)),s},rt=(t,e)=>{f.o|=1;const n=Array.from(t.__childNodes||t.childNodes);for(let t=n.length-1;t>=0;t--){const o=n[t];o["s-hn"]!==B&&o["s-ol"]&&(mt(at(o).parentNode,o,at(o)),o["s-ol"].remove(),o["s-ol"]=void 0,o["s-sh"]=void 0,lt=!0),e&&rt(o,e)}f.o&=-2},ct=(t,e,n,o,l,s)=>{let i,r=t["s-cr"]&&t["s-cr"].parentNode||t;for(;l<=s;++l)o[l]&&(i=it(null,n,l),i&&(o[l].$=i,mt(r,i,at(e))))},ut=(t,e,n)=>{for(let o=e;o<=n;++o){const e=t[o];if(e){const t=e.$;vt(e),t&&(ot=!0,t["s-ol"]?t["s-ol"].remove():rt(t,!0),t.remove())}}},ft=(t,e,n=!1)=>t.m===e.m&&("slot"===t.m?t.v===e.v:n?(n&&!t.h&&e.h&&(t.h=e.h),!0):t.h===e.h),at=t=>t&&t["s-ol"]||t,dt=(t,e,n=!1)=>{const o=e.$=t.$,l=t.p,s=e.p,i=e.m,r=e.i;let c;null===r?(tt(t,e,st="svg"===i||"foreignObject"!==i&&st),null!==l&&null!==s?((t,e,n,o,l=!1)=>{let s,i,r=0,c=0,u=0,f=0,a=e.length-1,d=e[0],p=e[a],h=o.length-1,v=o[0],m=o[h];for(;r<=a&&c<=h;)if(null==d)d=e[++r];else if(null==p)p=e[--a];else if(null==v)v=o[++c];else if(null==m)m=o[--h];else if(ft(d,v,l))dt(d,v,l),d=e[++r],v=o[++c];else if(ft(p,m,l))dt(p,m,l),p=e[--a],m=o[--h];else if(ft(d,m,l))"slot"!==d.m&&"slot"!==m.m||rt(d.$.parentNode,!1),dt(d,m,l),mt(t,d.$,p.$.nextSibling),d=e[++r],m=o[--h];else if(ft(p,v,l))"slot"!==d.m&&"slot"!==m.m||rt(p.$.parentNode,!1),dt(p,v,l),mt(t,p.$,d.$),p=e[--a],v=o[++c];else{for(u=-1,f=r;f<=a;++f)if(e[f]&&null!==e[f].h&&e[f].h===v.h){u=f;break}u>=0?(i=e[u],i.m!==v.m?s=it(e&&e[c],n,u):(dt(i,v,l),e[u]=void 0,s=i.$),v=o[++c]):(s=it(e&&e[c],n,c),v=o[++c]),s&&mt(at(d.$).parentNode,s,at(d.$))}r>a?ct(t,null==o[h+1]?null:o[h+1].$,n,o,c,h):c>h&&ut(e,r,a)})(o,l,e,s,n):null!==s?(null!==t.i&&(o.textContent=""),ct(o,null,e,s,0,s.length-1)):!n&&null!==l&&ut(l,0,l.length-1),st&&"svg"===i&&(st=!1)):(c=o["s-cr"])?c.parentNode.textContent=r:t.i!==r&&(o.data=r)},pt=[],ht=t=>{let e,n,o;const l=t.__childNodes||t.childNodes;for(const t of l){if(t["s-sr"]&&(e=t["s-cr"])&&e.parentNode){n=e.parentNode.__childNodes||e.parentNode.childNodes;const l=t["s-sn"];for(o=n.length-1;o>=0;o--)if(e=n[o],!e["s-cn"]&&!e["s-nr"]&&e["s-hn"]!==t["s-hn"])if(R(e,l)){let n=pt.find((t=>t.j===e));ot=!0,e["s-sn"]=e["s-sn"]||l,n?(n.j["s-sh"]=t["s-hn"],n.k=t):(e["s-sh"]=t["s-hn"],pt.push({k:t,j:e})),e["s-sr"]&&pt.map((t=>{R(t.j,e["s-sn"])&&(n=pt.find((t=>t.j===e)),n&&!t.k&&(t.k=n.k))}))}else pt.some((t=>t.j===e))||pt.push({j:e})}1===t.nodeType&&ht(t)}},vt=t=>{t.u&&t.u.ref&&t.u.ref(null),t.p&&t.p.map(vt)},mt=(t,e,n)=>null==t?void 0:t.insertBefore(e,n),yt=(t,e)=>{if(e&&!t.O&&e["s-p"]){const n=e["s-p"].push(new Promise((o=>t.O=()=>{e["s-p"].splice(n-1,1),o()})))}},bt=(t,e)=>{if(t.o|=16,!(4&t.o))return yt(t,t.C),$((()=>wt(t,e)));t.o|=512},wt=(t,e)=>{const n=t.$hostElement$,o=t.t;if(!o)throw Error(`Can't render component <${n.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 l;return e?(t.o|=256,t.N&&(t.N.map((([t,e])=>Nt(o,t,e,n))),t.N=void 0),l=Nt(o,"componentWillLoad",void 0,n)):l=Nt(o,"componentWillUpdate",void 0,n),l=$t(l,(()=>Nt(o,"componentWillRender",void 0,n))),$t(l,(()=>St(t,o,e)))},$t=(t,e)=>gt(t)?t.then(e).catch((t=>{console.error(t),e()})):e(),gt=t=>t instanceof Promise||t&&t.then&&"function"==typeof t.then,St=async(t,e,n)=>{var o;const l=t.$hostElement$,s=l["s-rc"];n&&(t=>{const e=t.M;((t,e)=>{var n;const o=G(e),l=i.get(o);if(!u.document)return o;if(t=11===t.nodeType?t:u.document,l)if("string"==typeof l){let s,i=q.get(t=t.head||t);if(i||q.set(t,i=new Set),!i.has(o)){{s=document.querySelector(`[sty-id="${o}"]`)||u.document.createElement("style"),s.innerHTML=l;const i=null!=(n=f.R)?n:S(u.document);if(null!=i&&s.setAttribute("nonce",i),!(1&e.o))if("HEAD"===t.nodeName){const e=t.querySelectorAll("link[rel=preconnect]"),n=e.length>0?e[e.length-1].nextSibling:t.querySelector("style");t.insertBefore(s,(null==n?void 0:n.parentNode)===t?n:null)}else if("host"in t)if(d){const e=new CSSStyleSheet;e.replaceSync(l),t.adoptedStyleSheets=[e,...t.adoptedStyleSheets]}else{const e=t.querySelector("style");e?e.innerHTML=l+e.innerHTML:t.prepend(s)}else t.append(s);1&e.o&&t.insertBefore(s,null)}4&e.o&&(s.innerHTML+=r),i&&i.add(o)}}else t.adoptedStyleSheets.includes(l)||(t.adoptedStyleSheets=[...t.adoptedStyleSheets,l])})(t.$hostElement$.getRootNode(),e)})(t);kt(t,e,l,n),s&&(s.map((t=>t())),l["s-rc"]=void 0);{const e=null!=(o=l["s-p"])?o:[],n=()=>Et(t);0===e.length?n():(Promise.all(e).then(n),t.o|=4,e.length=0)}},jt=null,kt=(t,e,n,o)=>{try{jt=e,e=e.render(),t.o&=-17,t.o|=2,((t,e,n=!1)=>{var o,l,s,i;const r=t.$hostElement$,c=t.M,a=t.T||L(null,null),d=(t=>t&&t.m===A)(e)?e:P(null,null,e);if(B=r.tagName,c.F&&(d.u=d.u||{},c.F.map((([t,e])=>d.u[e]=r[t]))),n&&d.u)for(const t of Object.keys(d.u))r.hasAttribute(t)&&!["key","ref","style","class"].includes(t)&&(d.u[t]=r[t]);if(d.m=null,d.o|=4,t.T=d,d.$=a.$=r,nt=!1,H=r["s-cr"],ot=!1,dt(a,d,n),f.o|=1,lt){ht(d.$);for(const t of pt){const e=t.j;if(!e["s-ol"]&&u.document){const t=u.document.createTextNode("");t["s-nr"]=e,mt(e.parentNode,e["s-ol"]=t,e)}}for(const t of pt){const e=t.j,r=t.k;if(r){const t=r.parentNode;let n=r.nextSibling;{let s=null==(o=e["s-ol"])?void 0:o.previousSibling;for(;s;){let o=null!=(l=s["s-nr"])?l:null;if(o&&o["s-sn"]===e["s-sn"]&&t===(o.__parentNode||o.parentNode)){for(o=o.nextSibling;o===e||(null==o?void 0:o["s-sr"]);)o=null==o?void 0:o.nextSibling;if(!o||!o["s-nr"]){n=o;break}}s=s.previousSibling}}(!n&&t!==(e.__parentNode||e.parentNode)||(e.__nextSibling||e.nextSibling)!==n)&&e!==n&&(!e["s-hn"]&&e["s-ol"]&&(e["s-hn"]=e["s-ol"].parentNode.nodeName),mt(t,e,n),1===e.nodeType&&"SLOT-FB"!==e.tagName&&(e.hidden=null!=(s=e["s-ih"])&&s)),e&&"function"==typeof r["s-rf"]&&r["s-rf"](r)}else 1===e.nodeType&&(n&&(e["s-ih"]=null!=(i=e.hidden)&&i),e.hidden=!0)}}ot&&x(d.$),f.o&=-2,pt.length=0,H=void 0})(t,e,o)}catch(e){l(e,t.$hostElement$)}return jt=null,null},Ot=()=>jt,Et=t=>{const e=t.$hostElement$,n=t.t,o=t.C;Nt(n,"componentDidRender",void 0,e),64&t.o?Nt(n,"componentDidUpdate",void 0,e):(t.o|=64,Mt(e),Nt(n,"componentDidLoad",void 0,e),t.P(e),o||xt()),t.O&&(t.O(),t.O=void 0),512&t.o&&w((()=>bt(t,!1))),t.o&=-517},Ct=t=>{{const n=e(t),o=n.$hostElement$.isConnected;return o&&2==(18&n.o)&&bt(n,!1),o}},xt=()=>{w((()=>Y(u,"appload",{detail:{namespace:"modus-wc"}})))},Nt=(t,e,n,o)=>{if(t&&t[e])try{return t[e](n)}catch(t){l(t,o)}},Mt=t=>t.classList.add("hydrated"),Rt=(t,n,o,s)=>{const i=e(t);if(!i)throw Error(`Couldn't find host element for "${s.S}" 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 r=i.$hostElement$,c=i.L.get(n),u=i.o,f=i.t;if(o=z(o,s.A[n][0]),(!(8&u)||void 0===c)&&o!==c&&(!Number.isNaN(c)||!Number.isNaN(o))&&(i.L.set(n,o),f)){if(s.D&&128&u){const t=s.D[n];t&&t.map((t=>{try{f[t](o,c,n)}catch(t){l(t,r)}}))}if(2==(18&u)){if(f.componentShouldUpdate&&!1===f.componentShouldUpdate(o,c,n))return;bt(i,!1)}}},Tt=(t,n,o)=>{var l,s;const i=t.prototype;if(n.A||n.D||t.watchers){t.watchers&&!n.D&&(n.D=t.watchers);const r=Object.entries(null!=(l=n.A)?l:{});if(r.map((([t,[l]])=>{if(31&l||2&o&&32&l){const{get:s,set:r}=Object.getOwnPropertyDescriptor(i,t)||{};s&&(n.A[t][0]|=2048),r&&(n.A[t][0]|=4096),(1&o||!s)&&Object.defineProperty(i,t,{get(){{if(!(2048&n.A[t][0]))return((t,n)=>e(this).L.get(n))(0,t);const o=e(this),l=o?o.t:i;if(!l)return;return l[t]}},configurable:!0,enumerable:!0}),Object.defineProperty(i,t,{set(s){const i=e(this);if(r){const e=32&l?this[t]:i.$hostElement$[t];return void 0===e&&i.L.get(t)?s=i.L.get(t):!i.L.get(t)&&e&&i.L.set(t,e),r.call(this,z(s,l)),void Rt(this,t,s=32&l?this[t]:i.$hostElement$[t],n)}{if(!(1&o&&4096&n.A[t][0]))return Rt(this,t,s,n),void(1&o&&!i.t&&i.W.then((()=>{4096&n.A[t][0]&&i.t[t]!==i.L.get(t)&&(i.t[t]=s)})));const e=()=>{const e=i.t[t];!i.L.get(t)&&e&&i.L.set(t,e),i.t[t]=z(s,l),Rt(this,t,i.t[t],n)};i.t?e():i.W.then((()=>e()))}}})}})),1&o){const o=new Map;i.attributeChangedCallback=function(t,l,s){f.jmp((()=>{var r;const c=o.get(t);if(this.hasOwnProperty(c))s=this[c],delete this[c];else{if(i.hasOwnProperty(c)&&"number"==typeof this[c]&&this[c]==s)return;if(null==c){const o=e(this),i=null==o?void 0:o.o;if(i&&!(8&i)&&128&i&&s!==l){const e=o.t,i=null==(r=n.D)?void 0:r[t];null==i||i.forEach((n=>{null!=e[n]&&e[n].call(e,s,l,t)}))}return}}const u=Object.getOwnPropertyDescriptor(i,c);(s=(null!==s||"boolean"!=typeof this[c])&&s)===this[c]||u.get&&!u.set||(this[c]=s)}))},t.observedAttributes=Array.from(new Set([...Object.keys(null!=(s=n.D)?s:{}),...r.filter((([t,e])=>15&e[0])).map((([t,e])=>{var l;const s=e[1]||t;return o.set(s,t),512&e[0]&&(null==(l=n.F)||l.push([t,s])),s}))]))}}return t},Ft=(t,e)=>{Nt(t,"connectedCallback",void 0,e)},Pt=(t,e)=>{Nt(t,"disconnectedCallback",void 0,e||t)},Lt=(t,n={})=>{var o;if(!u.document)return void console.warn("Stencil: No document found. Skipping bootstrapping lazy components.");const c=[],a=n.exclude||[],p=u.customElements,h=u.document.head,v=h.querySelector("meta[charset]"),m=u.document.createElement("style"),y=[];let b,w=!0;Object.assign(f,n),f.l=new URL(n.resourcesUrl||"./",u.document.baseURI).href;let $=!1;if(t.map((t=>{t[1].map((n=>{var o;const r={o:n[0],S:n[1],A:n[2],U:n[3]};4&r.o&&($=!0),r.A=n[2],r.U=n[3],r.F=[],r.D=null!=(o=n[4])?o:{};const h=r.S,v=class extends HTMLElement{constructor(t){super(t),this.hasRegisteredEventListeners=!1,((t,e)=>{const n={o:0,$hostElement$:t,M:e,L:new Map};n.W=new Promise((t=>n.P=t)),t["s-p"]=[],t["s-rc"]=[];const o=n;t.__stencil__getHostRef=()=>o})(t=this,r)}connectedCallback(){const t=e(this);this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0,Dt(this,t,r.U)),b&&(clearTimeout(b),b=null),w?y.push(this):f.jmp((()=>(t=>{if(!(1&f.o)){const n=e(t),o=n.M,r=()=>{};if(1&n.o)Dt(t,n,o.U),(null==n?void 0:n.t)?Ft(n.t,t):(null==n?void 0:n.W)&&n.W.then((()=>Ft(n.t,t)));else{n.o|=1,12&o.o&&(t=>{if(!u.document)return;const e=t["s-cr"]=u.document.createComment("");e["s-cn"]=!0,mt(t,e,t.firstChild)})(t);{let e=t;for(;e=e.parentNode||e.host;)if(e["s-p"]){yt(n,n.C=e);break}}o.A&&Object.entries(o.A).map((([e,[n]])=>{if(31&n&&t.hasOwnProperty(e)){const n=t[e];delete t[e],t[e]=n}})),(async(t,e,n)=>{let o;if(!(32&e.o)){if(e.o|=32,n._){const i=((t,e)=>{const n=t.S.replace(/-/g,"_"),o=t._;if(!o)return;const i=s.get(o);return i?i[n]:import(`./${o}.entry.js`).then((t=>(s.set(o,t),t[n])),(t=>{l(t,e.$hostElement$)}))
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/})(n,e);if(i&&"then"in i){const t=()=>{};o=await i,t()}else o=i;if(!o)throw Error(`Constructor for "${n.S}#${e.H}" was not found`);o.isProxied||(n.D=o.watchers,Tt(o,n,2),o.isProxied=!0);const r=()=>{};e.o|=8;try{new o(e)}catch(e){l(e,t)}e.o&=-9,e.o|=128,r(),Ft(e.t,t)}else o=t.constructor,customElements.whenDefined(t.localName).then((()=>e.o|=128));if(o&&o.style){let t;"string"==typeof o.style&&(t=o.style);const e=G(n);if(!i.has(e)){const o=()=>{};((t,e,n)=>{let o=i.get(t);d&&n?(o=o||new CSSStyleSheet,"string"==typeof o?o=e:o.replaceSync(e)):o=e,i.set(t,o)})(e,t,!!(1&n.o)),o()}}}const r=e.C,c=()=>bt(e,!0);r&&r["s-rc"]?r["s-rc"].push(c):c()})(t,n,o)}r()}})(this)))}disconnectedCallback(){f.jmp((()=>(async t=>{if(!(1&f.o)){const n=e(t);n.B&&(n.B.map((t=>t())),n.B=void 0),(null==n?void 0:n.t)?Pt(n.t,t):(null==n?void 0:n.W)&&n.W.then((()=>Pt(n.t,t)))}q.has(t)&&q.delete(t),t.shadowRoot&&q.has(t.shadowRoot)&&q.delete(t.shadowRoot)})(this))),f.raf((()=>{var t;const n=e(this),o=y.findIndex((t=>t===this));o>-1&&y.splice(o,1),(null==(t=null==n?void 0:n.T)?void 0:t.$)instanceof Node&&!n.T.$.isConnected&&delete n.T.$}))}componentOnReady(){return e(this).W}};r._=t[0],a.includes(h)||p.get(h)||(c.push(h),p.define(h,Tt(v,r,1)))}))})),c.length>0&&($&&(m.textContent+=r),m.textContent+=c.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",m.innerHTML.length)){m.setAttribute("data-styles","");const t=null!=(o=f.R)?o:S(u.document);null!=t&&m.setAttribute("nonce",t),h.insertBefore(m,v?v.nextSibling:h.firstChild)}w=!1,y.length?y.map((t=>t.connectedCallback())):f.jmp((()=>b=setTimeout(xt,30)))},At=(t,e)=>e,Dt=(t,e,n)=>{n&&u.document&&n.map((([n,o,l])=>{const s=Ut(u.document,t,n),i=Wt(e,l),r=_t(n);f.ael(s,o,i,r),(e.B=e.B||[]).push((()=>f.rel(s,o,i,r)))}))},Wt=(t,e)=>n=>{var o;try{256&t.o?null==(o=t.t)||o[e](n):(t.N=t.N||[]).push([e,n])}catch(e){l(e,t.$hostElement$)}},Ut=(t,e,n)=>4&n?t:e,_t=t=>({passive:!!(1&t),capture:!!(2&t)}),Ht=t=>f.R=t;export{At as F,A as H,Ot as a,Lt as b,V as c,Ct as f,I as g,P as h,a as p,n as r,Ht as s}