@public-ui/components
Version:
Contains all web components that belong to KoliBri - The accessible HTML-Standard.
5 lines • 21 kB
JavaScript
/*!
* KoliBri - The accessible HTML-Standard
*/
const e="kolibri",t={allRenderFn:!1,appendChildSlotFix:!1,asyncLoading:!0,asyncQueue:!1,attachStyles:!0,cloneNodeFix:!1,cmpDidLoad:!0,cmpDidRender:!0,cmpDidUnload:!1,cmpDidUpdate:!1,cmpShouldUpdate:!1,cmpWillLoad:!0,cmpWillRender:!0,cmpWillUpdate:!1,connectedCallback:!0,constructableCSS:!0,cssAnnotations:!0,devTools:!1,disconnectedCallback:!0,element:!1,event:!1,experimentalScopedSlotChanges:!1,experimentalSlotFixes:!1,formAssociated:!1,hasRenderFn:!0,hostListener:!0,hostListenerTarget:!0,hostListenerTargetBody:!1,hostListenerTargetDocument:!1,hostListenerTargetParent:!1,hostListenerTargetWindow:!0,hotModuleReplacement:!1,hydrateClientSide:!0,hydrateServerSide:!1,hydratedAttribute:!1,hydratedClass:!0,hydratedSelectorName:"hydrated",initializeNextTick:!1,invisiblePrehydration:!0,isDebug:!1,isDev:!1,isTesting:!1,lazyLoad:!0,lifecycle:!0,lifecycleDOMEvents:!1,member:!0,method:!0,mode:!0,observeAttribute:!0,profile:!1,prop:!0,propBoolean:!0,propMutable:!0,propNumber:!0,propString:!0,reflect:!0,scoped:!1,scopedSlotTextContentFix:!1,scriptDataOpts:!1,shadowDelegatesFocus:!0,shadowDom:!0,slot:!0,slotChildNodesFix:!1,slotRelocation:!0,state:!0,style:!0,svg:!0,taskQueue:!1,transformTagName:!0,updatable:!0,vdomAttribute:!0,vdomClass:!0,vdomFunctional:!0,vdomKey:!0,vdomListener:!0,vdomPropOrAttr:!0,vdomRef:!0,vdomRender:!0,vdomStyle:!0,vdomText:!0,vdomXlink:!0,watchCallback:!0},l={kolibriVersion:"2.2.8"};var n=Object.defineProperty,r=(e,t)=>{for(var s in t)n(e,s,{get:t[s],enumerable:!0})},s=new WeakMap,i=e=>s.get(e),o=(e,t)=>s.set(t.t=e,t),a=(e,t)=>{const n={l:0,$hostElement$:e,i:t,o:new Map};return n.u=new Promise((e=>n.v=e)),n.h=new Promise((e=>n.p=e)),e["s-p"]=[],e["s-rc"]=[],s.set(e,n)},f=(e,t)=>t in e,c=(e,t)=>(0,console.error)(e,t),u=new Map,v=(e,t,n)=>{const s=e.m.replace(/-/g,"_"),o=e.$;if(!o)return;const l=u.get(o);return l?l[s]:import(`./${o}.entry.js`).then((e=>(u.set(o,e),e[s])),c)
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/},d=new Map,h=[],p="r",m="o",$="s",y="t",w="s-id",b="sty-id",g="c-id",S="{visibility:hidden}.hydrated{visibility:inherit}",k="slot-fb{display:contents}slot-fb[hidden]{display:none}",x="http://www.w3.org/1999/xlink",C="undefined"!=typeof window?window:{},j=C.document||{head:{}},O={l:0,S:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,n,s)=>e.addEventListener(t,n,s),rel:(e,t,n,s)=>e.removeEventListener(t,n,s),ce:(e,t)=>new CustomEvent(e,t)},R=t.shadowDom,T=(()=>{let e=!1;try{j.addEventListener("e",null,Object.defineProperty({},"passive",{get(){e=!0}}))}catch(e){}return e})(),E=e=>Promise.resolve(e),D=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(e){}return!1})(),L=e=>E().then(e),F={},M="http://www.w3.org/2000/svg",A="http://www.w3.org/1999/xhtml",P=e=>null!=e,N=e=>"object"===(e=typeof e)||"function"===e;function U(e){var t,n,s;return null!=(s=null==(n=null==(t=e.head)?void 0:t.querySelector('meta[name="csp-nonce"]'))?void 0:n.getAttribute("content"))?s:void 0}var W={};r(W,{err:()=>H,map:()=>z,ok:()=>I,unwrap:()=>B,unwrapErr:()=>Q});var I=e=>({isOk:!0,isErr:!1,value:e}),H=e=>({isOk:!1,isErr:!0,value:e});function z(e,t){if(e.isOk){const n=t(e.value);return n instanceof Promise?n.then((e=>I(e))):I(n)}if(e.isErr){const t=e.value;return H(t)}throw"should never get here"}var be,ge,Se,B=e=>{if(e.isOk)return e.value;throw e.value},Q=e=>{if(e.isErr)return e.value;throw e.value},V=(e,t="")=>()=>{},q=(e,t)=>()=>{},G=(e,t,...n)=>{let s=null,o=null,l=null,r=!1,i=!1;const a=[],c=t=>{for(let n=0;n<t.length;n++)s=t[n],Array.isArray(s)?c(s):null!=s&&"boolean"!=typeof s&&((r="function"!=typeof e&&!N(s))&&(s=String(s)),r&&i?a[a.length-1].k+=s:a.push(r?K(null,s):s),i=r)};if(c(n),t){t.key&&(o=t.key),t.name&&(l=t.name);{const e=t.className||t.class;e&&(t.class="object"!=typeof e?e:Object.keys(e).filter((t=>e[t])).join(" "))}}if("function"==typeof e)return e(null===t?{}:t,a,J);const d=K(e,null);return d.C=t,a.length>0&&(d.j=a),d.O=o,d.R=l,d},K=(e,t)=>{const n={l:0,T:e,k:t,D:null,j:null,C:null,O:null,R:null};return n},X={},_=e=>e&&e.T===X,J={forEach:(e,t)=>e.map(Y).forEach(t),map:(e,t)=>e.map(Y).map(t).map(Z)},Y=e=>({vattrs:e.C,vchildren:e.j,vkey:e.O,vname:e.R,vtag:e.T,vtext:e.k}),Z=e=>{if("function"==typeof e.vtag){const t={...e.vattrs};return e.vkey&&(t.key=e.vkey),e.vname&&(t.name=e.vname),G(e.vtag,t,...e.vchildren||[])}const t=K(e.vtag,e.vtext);return t.C=e.vattrs,t.j=e.vchildren,t.O=e.vkey,t.R=e.vname,t},ee=(e,t,n,s)=>{const o=V("hydrateClient",t),l=e.shadowRoot,r=[],i=l?[]:null,a=s.L=K(t,null);O.F||le(j.body,O.F=new Map),e[w]=n,e.removeAttribute(w),te(a,r,[],i,e,e,n),r.map((e=>{const n=e.M+"."+e.A,s=O.F.get(n),o=e.D;s&&R&&""===s["s-en"]&&s.parentNode.insertBefore(o,s.nextSibling),l||(o["s-hn"]=t,s&&(o["s-ol"]=s,o["s-ol"]["s-nr"]=o)),O.F.delete(n)})),l&&i.map((e=>{e&&l.appendChild(e)})),o()},te=(e,t,n,s,o,l,r)=>{let i,a,c,d;if(1===l.nodeType){if(i=l.getAttribute(g),i&&(a=i.split("."),a[0]!==r&&"0"!==a[0]||(c={l:0,M:a[0],A:a[1],P:a[2],N:a[3],T:l.tagName.toLowerCase(),D:l,C:null,j:null,O:null,R:null,k:null},t.push(c),l.removeAttribute(g),e.j||(e.j=[]),e.j[c.N]=c,e=c,s&&"0"===c.P&&(s[c.N]=c.D))),l.shadowRoot)for(d=l.shadowRoot.childNodes.length-1;d>=0;d--)te(e,t,n,s,o,l.shadowRoot.childNodes[d],r);for(d=l.childNodes.length-1;d>=0;d--)te(e,t,n,s,o,l.childNodes[d],r)}else if(8===l.nodeType)a=l.nodeValue.split("."),a[1]!==r&&"0"!==a[1]||(i=a[0],c={l:0,M:a[1],A:a[2],P:a[3],N:a[4],D:l,C:null,j:null,O:null,R:null,T:null,k:null},i===y?(c.D=l.nextSibling,c.D&&3===c.D.nodeType&&(c.k=c.D.textContent,t.push(c),l.remove(),e.j||(e.j=[]),e.j[c.N]=c,s&&"0"===c.P&&(s[c.N]=c.D))):c.M===r&&(i===$?(c.T="slot",a[5]?l["s-sn"]=c.R=a[5]:l["s-sn"]="",l["s-sr"]=!0,s&&(c.D=j.createElement(c.T),c.R&&c.D.setAttribute("name",c.R),l.parentNode.insertBefore(c.D,l),l.remove(),"0"===c.P&&(s[c.N]=c.D)),n.push(c),e.j||(e.j=[]),e.j[c.N]=c):i===p&&(s?l.remove():(o["s-cr"]=l,l["s-cn"]=!0))));else if(e&&"style"===e.T){const t=K(null,l.textContent);t.D=l,t.N="0",e.j=[t]}},le=(e,t)=>{if(1===e.nodeType){let n=0;if(e.shadowRoot)for(;n<e.shadowRoot.childNodes.length;n++)le(e.shadowRoot.childNodes[n],t);for(n=0;n<e.childNodes.length;n++)le(e.childNodes[n],t)}else if(8===e.nodeType){const n=e.nodeValue.split(".");n[0]===m&&(t.set(n[1]+"."+n[2],e),e.nodeValue="",e["s-en"]=n[3])}},ne=e=>h.map((t=>t(e))).find((e=>!!e)),re=e=>h.push(e),se=(e,t)=>null==e||N(e)?e:4&t?"false"!==e&&(""===e||!!e):2&t?parseFloat(e):1&t?String(e):e,ie=e=>i(e).$hostElement$,oe=(e,t,n)=>{const s=O.ce(t,n);return e.dispatchEvent(s),s},ae=new WeakMap,fe=(e,t,n)=>{let s=d.get(e);D&&n?(s=s||new CSSStyleSheet,"string"==typeof s?s=t:s.replaceSync(t)):s=t,d.set(e,s)},ce=(e,t,n)=>{var s;const o=ve(t,n),l=d.get(o);if(e=11===e.nodeType?e:j,l)if("string"==typeof l){e=e.head||e;let n,r=ae.get(e);if(r||ae.set(e,r=new Set),!r.has(o)){if(e.host&&(n=e.querySelector(`[${b}="${o}"]`)))n.innerHTML=l;else{n=j.createElement("style"),n.innerHTML=l;const o=null!=(s=O.U)?s:U(j);null!=o&&n.setAttribute("nonce",o);(!(1&t.l)||1&t.l&&"HEAD"!==e.nodeName)&&e.insertBefore(n,e.querySelector("link"))}4&t.l&&(n.innerHTML+=k),r&&r.add(o)}}else e.adoptedStyleSheets.includes(l)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,l]);return o},ue=e=>{const t=e.i,n=e.$hostElement$,s=t.l,o=V("attachStyles",t.m),l=ce(n.shadowRoot?n.shadowRoot:n.getRootNode(),t,e.W);10&s&&2&s&&(n["s-sc"]=l,n.classList.add(l+"-h")),o()},ve=(e,t)=>"sc-"+(t&&32&e.l?e.m+"-"+t:e.m),de=(e,t,n,s,o,l)=>{if(n!==s){let r=f(e,t),i=t.toLowerCase();if("class"===t){const t=e.classList,o=pe(n),l=pe(s);t.remove(...o.filter((e=>e&&!l.includes(e)))),t.add(...l.filter((e=>e&&!o.includes(e))))}else if("style"===t){for(const t in n)s&&null!=s[t]||(t.includes("-")?e.style.removeProperty(t):e.style[t]="");for(const t in s)n&&s[t]===n[t]||(t.includes("-")?e.style.setProperty(t,s[t]):e.style[t]=s[t])}else if("key"===t);else if("ref"===t)s&&s(e);else if(r||"o"!==t[0]||"n"!==t[1]){const a=N(s);if((r||a&&null!==s)&&!o)try{if(e.tagName.includes("-"))e[t]=s;else{const o=null==s?"":s;"list"===t?r=!1:null!=n&&e[t]==o||(e[t]=o)}}catch(e){}let c=!1;i!==(i=i.replace(/^xlink\:?/,""))&&(t=i,c=!0),null==s||!1===s?!1===s&&""!==e.getAttribute(t)||(c?e.removeAttributeNS(x,t):e.removeAttribute(t)):(!r||4&l||o)&&!a&&(s=!0===s?"":s,c?e.setAttributeNS(x,t,s):e.setAttribute(t,s))}else if(t="-"===t[2]?t.slice(3):f(C,i)?i.slice(2):i[2]+t.slice(3),n||s){const o=t.endsWith(me);t=t.replace($e,""),n&&O.rel(e,t,n,o),s&&O.ael(e,t,s,o)}}},he=/\s/,pe=e=>e?e.split(he):[],me="Capture",$e=new RegExp(me+"$"),ye=(e,t,n)=>{const s=11===t.D.nodeType&&t.D.host?t.D.host:t.D,o=e&&e.C||F,l=t.C||F;for(const e of we(Object.keys(o)))e in l||de(s,e,o[e],void 0,n,t.l);for(const e of we(Object.keys(l)))de(s,e,o[e],l[e],n,t.l)};function we(e){return e.includes("ref")?[...e.filter((e=>"ref"!==e)),"ref"]:e}var ke=!1,xe=!1,Ce=!1,je=!1,Oe=(e,n,s,o)=>{var l;const r=n.j[s];let i,a,c,d=0;if(ke||(Ce=!0,"slot"===r.T&&(be&&o.classList.add(be+"-s"),r.l|=r.j?2:1)),null!==r.k)i=r.D=j.createTextNode(r.k);else if(1&r.l)i=r.D=j.createTextNode("");else{je||(je="svg"===r.T),i=r.D=j.createElementNS(je?M:A,!ke&&t.slotRelocation&&2&r.l?"slot-fb":r.T),je&&"foreignObject"===r.T&&(je=!1),ye(null,r,je);if(!!i.getRootNode().querySelector("body")&&t.scoped&&P(be)&&i["s-si"]!==be&&i.classList.add(i["s-si"]=be),r.j)for(d=0;d<r.j.length;++d)a=Oe(e,r,d,i),a&&i.appendChild(a);"svg"===r.T?je=!1:"foreignObject"===i.tagName&&(je=!0)}return i["s-hn"]=Se,3&r.l&&(i["s-sr"]=!0,i["s-cr"]=ge,i["s-sn"]=r.R||"",i["s-rf"]=null==(l=r.C)?void 0:l.ref,c=e&&e.j&&e.j[s],c&&c.T===r.T&&e.D&&Re(e.D,!1)),i},Re=(e,n)=>{O.l|=1;const s=Array.from(e.childNodes);if(e["s-sr"]&&t.experimentalSlotFixes){let t=e;for(;t=t.nextSibling;)t&&t["s-sn"]===e["s-sn"]&&t["s-sh"]===Se&&s.push(t)}for(let e=s.length-1;e>=0;e--){const t=s[e];t["s-hn"]!==Se&&t["s-ol"]&&(He(Me(t),t,Fe(t)),t["s-ol"].remove(),t["s-ol"]=void 0,t["s-sh"]=void 0,Ce=!0),n&&Re(t,n)}O.l&=-2},Te=(e,t,n,s,o,l)=>{let r,i=e["s-cr"]&&e["s-cr"].parentNode||e;for(i.shadowRoot&&i.tagName===Se&&(i=i.shadowRoot);o<=l;++o)s[o]&&(r=Oe(null,n,o,e),r&&(s[o].D=r,He(i,r,Fe(t))))},Ee=(e,t,n)=>{for(let s=t;s<=n;++s){const t=e[s];if(t){const e=t.D;Ie(t),e&&(xe=!0,e["s-ol"]?e["s-ol"].remove():Re(e,!0),e.remove())}}},De=(e,t,n,s,o=!1)=>{let l,r,i=0,a=0,c=0,d=0,u=t.length-1,h=t[0],p=t[u],f=s.length-1,m=s[0],v=s[f];for(;i<=u&&a<=f;)if(null==h)h=t[++i];else if(null==p)p=t[--u];else if(null==m)m=s[++a];else if(null==v)v=s[--f];else if(Le(h,m,o))Ae(h,m,o),h=t[++i],m=s[++a];else if(Le(p,v,o))Ae(p,v,o),p=t[--u],v=s[--f];else if(Le(h,v,o))"slot"!==h.T&&"slot"!==v.T||Re(h.D.parentNode,!1),Ae(h,v,o),He(e,h.D,p.D.nextSibling),h=t[++i],v=s[--f];else if(Le(p,m,o))"slot"!==h.T&&"slot"!==v.T||Re(p.D.parentNode,!1),Ae(p,m,o),He(e,p.D,h.D),p=t[--u],m=s[++a];else{for(c=-1,d=i;d<=u;++d)if(t[d]&&null!==t[d].O&&t[d].O===m.O){c=d;break}c>=0?(r=t[c],r.T!==m.T?l=Oe(t&&t[a],n,c,e):(Ae(r,m,o),t[c]=void 0,l=r.D),m=s[++a]):(l=Oe(t&&t[a],n,a,e),m=s[++a]),l&&He(Me(h.D),l,Fe(h.D))}i>u?Te(e,null==s[f+1]?null:s[f+1].D,n,s,a,f):a>f&&Ee(t,i,u)},Le=(e,t,n=!1)=>e.T===t.T&&("slot"===e.T?(!("A"in e)||!n||8===e.D.nodeType)&&e.R===t.R:!!n||e.O===t.O),Fe=e=>e&&e["s-ol"]||e,Me=e=>(e["s-ol"]?e["s-ol"]:e).parentNode,Ae=(e,n,s=!1)=>{const o=n.D=e.D,l=e.j,r=n.j,i=n.T,a=n.k;let c;null===a?(je="svg"===i||"foreignObject"!==i&&je,("slot"!==i||ke)&&ye(e,n,je),null!==l&&null!==r?De(o,l,n,r,s):null!==r?(null!==e.k&&(o.textContent=""),Te(o,null,n,r,0,r.length-1)):!s&&t.updatable&&null!==l&&Ee(l,0,l.length-1),je&&"svg"===i&&(je=!1)):(c=o["s-cr"])?c.parentNode.textContent=a:e.k!==a&&(o.data=a)},Pe=e=>{const t=e.childNodes;for(const e of t)if(1===e.nodeType){if(e["s-sr"]){const n=e["s-sn"];e.hidden=!1;for(const s of t)if(s!==e)if(s["s-hn"]!==e["s-hn"]||""!==n){if(1===s.nodeType&&(n===s.getAttribute("slot")||n===s["s-sn"])||3===s.nodeType&&n===s["s-sn"]){e.hidden=!0;break}}else if(1===s.nodeType||3===s.nodeType&&""!==s.textContent.trim()){e.hidden=!0;break}}Pe(e)}},Ne=[],Ue=e=>{let n,s,o;for(const l of e.childNodes){if(l["s-sr"]&&(n=l["s-cr"])&&n.parentNode){s=n.parentNode.childNodes;const e=l["s-sn"];for(o=s.length-1;o>=0;o--)if(n=s[o],!n["s-cn"]&&!n["s-nr"]&&n["s-hn"]!==l["s-hn"]&&!t.experimentalSlotFixes)if(We(n,e)){let t=Ne.find((e=>e.I===n));xe=!0,n["s-sn"]=n["s-sn"]||e,t?(t.I["s-sh"]=l["s-hn"],t.H=l):(n["s-sh"]=l["s-hn"],Ne.push({H:l,I:n})),n["s-sr"]&&Ne.map((e=>{We(e.I,n["s-sn"])&&(t=Ne.find((e=>e.I===n)),t&&!e.H&&(e.H=t.H))}))}else Ne.some((e=>e.I===n))||Ne.push({I:n})}1===l.nodeType&&Ue(l)}},We=(e,t)=>1===e.nodeType?null===e.getAttribute("slot")&&""===t||e.getAttribute("slot")===t:e["s-sn"]===t||""===t,Ie=e=>{e.C&&e.C.ref&&e.C.ref(null),e.j&&e.j.map(Ie)},He=(e,t,n)=>null==e?void 0:e.insertBefore(t,n),ze=(e,t,n=!1)=>{var s,o,l,r;const i=e.$hostElement$,a=e.i,c=e.L||K(null,null),d=_(t)?t:G(null,null,t);if(Se=i.tagName,a.B&&(d.C=d.C||{},a.B.map((([e,t])=>d.C[t]=i[e]))),n&&d.C)for(const e of Object.keys(d.C))i.hasAttribute(e)&&!["key","ref","style","class"].includes(e)&&(d.C[e]=i[e]);if(d.T=null,d.l|=4,e.L=d,d.D=c.D=i.shadowRoot||i,be=i["s-sc"],ke=!!(1&a.l),ge=i["s-cr"],xe=!1,Ae(c,d,n),O.l|=1,Ce){Ue(d.D);for(const e of Ne){const t=e.I;if(!t["s-ol"]){const e=j.createTextNode("");e["s-nr"]=t,He(t.parentNode,t["s-ol"]=e,t)}}for(const e of Ne){const t=e.I,i=e.H;if(i){const e=i.parentNode;let n=i.nextSibling;{let l=null==(s=t["s-ol"])?void 0:s.previousSibling;for(;l;){let s=null!=(o=l["s-nr"])?o:null;if(s&&s["s-sn"]===t["s-sn"]&&e===s.parentNode){for(s=s.nextSibling;s===t||(null==s?void 0:s["s-sr"]);)s=null==s?void 0:s.nextSibling;if(!s||!s["s-nr"]){n=s;break}}l=l.previousSibling}}(!n&&e!==t.parentNode||t.nextSibling!==n)&&t!==n&&(!t["s-hn"]&&t["s-ol"]&&(t["s-hn"]=t["s-ol"].parentNode.nodeName),He(e,t,n),1===t.nodeType&&(t.hidden=null!=(l=t["s-ih"])&&l)),t&&"function"==typeof i["s-rf"]&&i["s-rf"](t)}else 1===t.nodeType&&(n&&(t["s-ih"]=null!=(r=t.hidden)&&r),t.hidden=!0)}}xe&&Pe(d.D),O.l&=-2,Ne.length=0,ge=void 0},Be=(e,t)=>{t&&!e.V&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.V=t)))},Qe=(e,t)=>{if(4&e.l)return void(e.l|=512);Be(e,e.q);return Ve(e,t)},Ve=(e,t)=>{const n=e.$hostElement$,s=V("scheduleUpdate",e.i.m),o=e.t;if(!o)throw new Error(`Can't render component <${n.tagName.toLowerCase()} /> with invalid KoliBri 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 t&&(e.l|=256,e.G&&(e.G.map((([e,t])=>Ye(o,e,t))),e.G=void 0),l=Ye(o,"componentWillLoad")),l=qe(l,(()=>Ye(o,"componentWillRender"))),s(),qe(l,(()=>Ke(e,o,t)))},qe=(e,t)=>Ge(e)?e.then(t).catch((e=>{console.error(e),t()})):t(),Ge=e=>e instanceof Promise||e&&e.then&&"function"==typeof e.then,Ke=async(e,t,n)=>{var s;const o=e.$hostElement$,l=V("update",e.i.m),r=o["s-rc"];n&&ue(e);const i=V("render",e.i.m);Xe(e,t,o,n),r&&(r.map((e=>e())),o["s-rc"]=void 0),i(),l();{const t=null!=(s=o["s-p"])?s:[],n=()=>_e(e);0===t.length?n():(Promise.all(t).then(n),e.l|=4,t.length=0)}},Xe=(e,t,n,s)=>{try{t=t.render&&t.render(),e.l|=2,ze(e,t,s)}catch(t){c(t,e.$hostElement$)}return null},_e=e=>{const t=e.i.m,n=e.$hostElement$,s=V("postUpdate",t),o=e.t,l=e.q;Ye(o,"componentDidRender"),64&e.l?s():(e.l|=64,Ze(n),Ye(o,"componentDidLoad"),s(),e.p(n),l||Je()),e.v(n),e.V&&(e.V(),e.V=void 0),512&e.l&&L((()=>Qe(e,!1))),e.l&=-517},Je=t=>{Ze(j.documentElement),L((()=>oe(C,"appload",{detail:{namespace:e}})))},Ye=(e,t,n)=>{if(e&&e[t])try{return e[t](n)}catch(e){c(e)}},Ze=e=>{var n;return e.classList.add(null!=(n=t.hydratedSelectorName)?n:"hydrated")},et=(e,t)=>i(e).o.get(t),tt=(e,t,n,s)=>{const o=i(e);if(!o)throw new Error(`Couldn't find host element for "${s.m}" as it is unknown to this KoliBri runtime. This usually happens when integrating a 3rd party KoliBri component with another KoliBri component or application. Please reach out to the maintainers of the 3rd party KoliBri component or report this on the KoliBri Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/ionic-team/stencil/issues/5457).`);const l=o.$hostElement$,r=o.o.get(t),a=o.l,d=o.t;n=se(n,s.K[t][0]);const u=Number.isNaN(r)&&Number.isNaN(n);if((!(8&a)||void 0===r)&&(n!==r&&!u)&&(o.o.set(t,n),d)){if(s.X&&128&a){const e=s.X[t];e&&e.map((e=>{try{d[e](n,r,t)}catch(e){c(e,l)}}))}2==(18&a)&&Qe(o,!1)}},lt=(e,t,n)=>{var s,o;const l=e.prototype;if(t.K||t.X||e.watchers){e.watchers&&!t.X&&(t.X=e.watchers);const r=Object.entries(null!=(s=t.K)?s:{});if(r.map((([e,[s]])=>{31&s||2&n&&32&s?Object.defineProperty(l,e,{get(){return et(this,e)},set(n){tt(this,e,n,t)},configurable:!0,enumerable:!0}):1&n&&64&s&&Object.defineProperty(l,e,{value(...t){var n;const s=i(this);return null==(n=null==s?void 0:s.u)?void 0:n.then((()=>{var n;return null==(n=s.t)?void 0:n[e](...t)}))}})})),1&n){const n=new Map;l.attributeChangedCallback=function(e,s,o){O.jmp((()=>{var r;const a=n.get(e);if(this.hasOwnProperty(a))o=this[a],delete this[a];else{if(l.hasOwnProperty(a)&&"number"==typeof this[a]&&this[a]==o)return;if(null==a){const n=i(this),l=null==n?void 0:n.l;if(l&&!(8&l)&&128&l&&o!==s){const l=n.t,i=null==(r=t.X)?void 0:r[e];null==i||i.forEach((t=>{null!=l[t]&&l[t].call(l,o,s,e)}))}return}}this[a]=(null!==o||"boolean"!=typeof this[a])&&o}))},e.observedAttributes=Array.from(new Set([...Object.keys(null!=(o=t.X)?o:{}),...r.filter((([e,t])=>15&t[0])).map((([e,s])=>{var o;const l=s[1]||e;return n.set(l,e),512&s[0]&&(null==(o=t.B)||o.push([e,l])),l}))]))}}return e},nt=async(e,t,n,s)=>{let o;if(!(32&t.l)){t.l|=32;if(n.$){const s=v(n);if(s&&"then"in s){const e=q();o=await s,e()}else o=s;if(!o)throw new Error(`Constructor for "${n.m}#${t.W}" was not found`);o.isProxied||(n.X=o.watchers,lt(o,n,2),o.isProxied=!0);const l=V("createInstance",n.m);t.l|=8;try{new o(t)}catch(e){c(e)}t.l&=-9,t.l|=128,l(),rt(t.t)}else{o=e.constructor;const n=e.localName;customElements.whenDefined(n).then((()=>t.l|=128))}if(o&&o.style){let s;"string"==typeof o.style?s=o.style:"string"!=typeof o.style&&(t.W=ne(e),t.W&&(s=o.style[t.W]));const l=ve(n,t.W);if(!d.has(l)){const e=V("registerStyles",n.m);fe(l,s,!!(1&n.l)),e()}}}const l=t.q,r=()=>Qe(t,!0);l&&l["s-rc"]?l["s-rc"].push(r):r()},rt=e=>{Ye(e,"connectedCallback")},st=e=>{if(!(1&O.l)){const t=i(e),n=t.i,s=V("connectedCallback",n.m);if(1&t.l)ut(e,t,n._),(null==t?void 0:t.t)?rt(t.t):(null==t?void 0:t.h)&&t.h.then((()=>rt(t.t)));else{let s;if(t.l|=1,s=e.getAttribute(w),s){if(1&n.l){const t=ce(e.shadowRoot,n,e.getAttribute("s-mode"));e.classList.remove(t+"-h",t+"-s")}ee(e,n.m,s,t)}s||12&n.l&&it(e);{let n=e;for(;n=n.parentNode||n.host;)if(1===n.nodeType&&n.hasAttribute("s-id")&&n["s-p"]||n["s-p"]){Be(t,t.q=n);break}}n.K&&Object.entries(n.K).map((([t,[n]])=>{if(31&n&&e.hasOwnProperty(t)){const n=e[t];delete e[t],e[t]=n}})),nt(e,t,n)}s()}},it=e=>{const t=e["s-cr"]=j.createComment("");t["s-cn"]=!0,He(e,t,e.firstChild)},ot=e=>{Ye(e,"disconnectedCallback")},at=async e=>{if(!(1&O.l)){const t=i(e);t.J&&(t.J.map((e=>e())),t.J=void 0),(null==t?void 0:t.t)?ot(t.t):(null==t?void 0:t.h)&&t.h.then((()=>ot(t.t)))}},ft=(e,t={})=>{var n;const s=V(),o=[],l=t.exclude||[],r=C.customElements,c=j.head,d=c.querySelector("meta[charset]"),u=j.createElement("style"),h=[];let p,f=!0;Object.assign(O,t),O.S=new URL(t.resourcesUrl||"./",j.baseURI).href,O.l|=2;let m=!1;if(e.map((e=>{e[1].map((n=>{var s;const c={l:n[0],m:n[1],K:n[2],_:n[3]};4&c.l&&(m=!0),c.K=n[2],c._=n[3],c.B=[],c.X=null!=(s=n[4])?s:{};const d=t.transformTagName?t.transformTagName(c.m):c.m,u=class extends HTMLElement{constructor(e){if(super(e),this.hasRegisteredEventListeners=!1,a(e=this,c),1&c.l)if(e.shadowRoot){if("open"!==e.shadowRoot.mode)throw new Error(`Unable to re-use existing shadow root for ${c.m}! Mode is set to ${e.shadowRoot.mode} but KoliBri only supports open shadow roots.`)}else e.attachShadow({mode:"open",delegatesFocus:!!(16&c.l)})}connectedCallback(){const e=i(this);this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0,ut(this,e,c._)),p&&(clearTimeout(p),p=null),f?h.push(this):O.jmp((()=>st(this)))}disconnectedCallback(){O.jmp((()=>at(this)))}componentOnReady(){return i(this).h}};c.$=e[0],l.includes(d)||r.get(d)||(o.push(d),r.define(d,lt(u,c,1)))}))})),o.length>0&&(m&&(u.textContent+=k),u.textContent+=o.sort()+S,u.innerHTML.length)){u.setAttribute("data-styles","");const e=null!=(n=O.U)?n:U(j);null!=e&&u.setAttribute("nonce",e),c.insertBefore(u,d?d.nextSibling:c.firstChild)}f=!1,h.length?h.map((e=>e.connectedCallback())):O.jmp((()=>p=setTimeout(Je,30))),s()},ct=(e,t)=>t,ut=(e,t,n,s)=>{n&&n.map((([n,s,o])=>{const l=dt(e,n),r=vt(t,o),i=ht(n);O.ael(l,s,r,i),(t.J=t.J||[]).push((()=>O.rel(l,s,r,i)))}))},vt=(e,t)=>n=>{var s;try{256&e.l?null==(s=e.t)||s[t](n):(e.G=e.G||[]).push([t,n])}catch(e){c(e)}},dt=(e,t)=>8&t?C:e,ht=e=>T?{passive:!!(1&e),capture:!!(2&e)}:!!(2&e),pt=e=>O.U=e;export{l as E,ct as F,X as H,re as a,ft as b,ie as g,G as h,E as p,o as r,pt as s};