@mgdis/stencil-helpers 3.2.13 → 3.2.15
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/index.es.js +3 -3
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +3 -3
- package/dist/index.umd.js.map +1 -1
- package/dist/locale/index.d.ts +1 -1
- package/dist/locale/index.d.ts.map +1 -1
- package/dist/storybook/index.d.ts +1 -1
- package/dist/storybook/index.d.ts.map +1 -1
- package/dist/tests/index.d.ts +1 -1
- package/dist/tests/index.d.ts.map +1 -1
- package/package.json +12 -12
package/dist/index.umd.js
CHANGED
|
@@ -10,15 +10,15 @@
|
|
|
10
10
|
`,t+=e.listeners.map(({event:e})=>`- \`${e}\`\n`).join(``),t+=`
|
|
11
11
|
`),e.slots.length&&(t+=`Slots:
|
|
12
12
|
`,t+=e.slots.map(({name:e,docs:t})=>`- ${e?`\`${e}\``:`default`}: ${t}\n`).join(``),t+=`
|
|
13
|
-
`),t},b=e=>`${e.docs}\n\nType: \`${e.type}\``,ce=(e,t,n,r)=>({$schema:`https://json.schemastore.org/web-types`,name:e,version:t,"description-markup":`markdown`,contributions:{html:{elements:n.components.map(e=>{let t=ae(r,e.filePath);return{name:e.tag,description:se(e),"doc-url":t,attributes:e.props.filter(e=>e.attr).map(e=>({name:e.attr,description:b(e),"doc-url":t,value:{type:e.type,default:e.default,required:e.required}})),js:{properties:e.props.filter(e=>e.attr===void 0).map(e=>({name:e.name,description:b(e),"doc-url":t,value:{type:e.type,default:e.default,required:e.required}})),events:e.events.map(e=>({name:e.event,description:e.docs}))},css:{properties:e.styles.map(e=>({name:e.name,description:e.docs}))}}})}}}),le=(e,t,n)=>[{name:`Storybook`,url:ae(e,n)},{name:`Sources`,url:oe(t,n)}],ue=e=>{if(!e.values.some(({value:e})=>e===void 0))return e.values.map(({value:e})=>({name:e}))},de=(e,t,n)=>({version:1.1,tags:e.components.map(e=>{let r=le(t,n,e.filePath);return{name:e.tag,description:se(e),attributes:e.props.filter(e=>e.attr!==void 0).map(e=>({name:e.attr,description:b(e),values:ue(e),references:r})),references:r}}),globalAttributes:[],valueSets:[]}),fe=e=>({version:1.1,properties:e.components.flatMap(e=>e.styles.map(e=>({name:e.name,description:e.docs})))}),pe=/^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$/,me=e=>{let t={value:`2023`,pattern:`yyyy`},n={value:`12`,pattern:`mm`},r={value:`24`,pattern:`dd`};return be([t.value,n.value,r.value].join(`-`),e,{timeZone:`UTC`}).replace(t.value,t.pattern).replace(n.value,n.pattern).replace(r.value,r.pattern)},he=(e,t,n)=>{let r=e.closest(`[lang]`),i=Intl.NumberFormat.supportedLocalesOf(r?.lang),a=i.length>0&&typeof i[0]==`string`?i[0]:navigator.language||n,o=a.split(`-`).shift();return Object.keys(t).length===0?{locale:a,messages:{lang:n}}:{locale:a,messages:t[o]??t[n]??{lang:n}}},ge=(e,t,n)=>new Intl.NumberFormat(t,{style:`currency`,currency:n}).format(e),_e=(e,t,n=0)=>new Intl.NumberFormat(t,{minimumFractionDigits:n}).format(Number(e)),ve=(e,t,n=0)=>new Intl.NumberFormat(t,{style:`percent`,minimumFractionDigits:n,maximumFractionDigits:n}).format(e),ye=(e,t,n,r=`short`,i=0)=>new Intl.NumberFormat(t,{style:`unit`,unit:n,unitDisplay:r,minimumFractionDigits:i,maximumFractionDigits:i}).format(e),be=(e,t,n)=>typeof e!=`string`||e===``||!pe.test(e)?``:new Intl.DateTimeFormat(t,n).format(new Date(e)),xe=(e,t)=>n=>he(n,e,t),x={updatable:!0,slotRelocation:!0},Se=`http://www.w3.org/2000/svg`,Ce=`http://www.w3.org/1999/xhtml`,we=e=>{if(e.__stencil__getHostRef)return e.__stencil__getHostRef()},S=(e,t)=>t in e,Te=`http://www.w3.org/1999/xlink`,C=typeof window<`u`?window:{},w={$flags$:0,$resourcesUrl$:``,jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,n,r)=>e.addEventListener(t,n,r),rel:(e,t,n,r)=>e.removeEventListener(t,n,r),ce:(e,t)=>new CustomEvent(e,t)},Ee=e=>{let t=D(e,`childNodes`);e.tagName&&e.tagName.includes(`-`)&&e[`s-cr`]&&e.tagName!==`SLOT-FB`&&T(t,e.tagName).forEach(e=>{e.nodeType===1&&e.tagName===`SLOT-FB`&&(Oe(e,E(e),!1).length?e.hidden=!0:e.hidden=!1)});let n=0;for(n=0;n<t.length;n++){let e=t[n];e.nodeType===1&&D(e,`childNodes`).length&&Ee(e)}},De=e=>{let t=[];for(let n=0;n<e.length;n++){let r=e[n][`s-nr`]||void 0;r&&r.isConnected&&t.push(r)}return t};function T(e,t,n){let r=0,i=[],a;for(;r<e.length;r++){if(a=e[r],a[`s-sr`]&&(!t||a[`s-hn`]===t)&&(n===void 0||E(a)===n)&&(i.push(a),n!==void 0))return i;i=[...i,...T(a.childNodes,t,n)]}return i}var Oe=(e,t,n=!0)=>{let r=[];(n&&e[`s-sr`]||!e[`s-sr`])&&r.push(e);let i=e;for(;i=i.nextSibling;)E(i)===t&&(n||!i[`s-sr`])&&r.push(i);return r},ke=(e,t)=>e.nodeType===1?e.getAttribute(`slot`)===null&&t===``||e.getAttribute(`slot`)===t:e[`s-sn`]===t
|
|
13
|
+
`),t},b=e=>`${e.docs}\n\nType: \`${e.type}\``,ce=(e,t,n,r)=>({$schema:`https://json.schemastore.org/web-types`,name:e,version:t,"description-markup":`markdown`,contributions:{html:{elements:n.components.map(e=>{let t=ae(r,e.filePath);return{name:e.tag,description:se(e),"doc-url":t,attributes:e.props.filter(e=>e.attr).map(e=>({name:e.attr,description:b(e),"doc-url":t,value:{type:e.type,default:e.default,required:e.required}})),js:{properties:e.props.filter(e=>e.attr===void 0).map(e=>({name:e.name,description:b(e),"doc-url":t,value:{type:e.type,default:e.default,required:e.required}})),events:e.events.map(e=>({name:e.event,description:e.docs}))},css:{properties:e.styles.map(e=>({name:e.name,description:e.docs}))}}})}}}),le=(e,t,n)=>[{name:`Storybook`,url:ae(e,n)},{name:`Sources`,url:oe(t,n)}],ue=e=>{if(!e.values.some(({value:e})=>e===void 0))return e.values.map(({value:e})=>({name:e}))},de=(e,t,n)=>({version:1.1,tags:e.components.map(e=>{let r=le(t,n,e.filePath);return{name:e.tag,description:se(e),attributes:e.props.filter(e=>e.attr!==void 0).map(e=>({name:e.attr,description:b(e),values:ue(e),references:r})),references:r}}),globalAttributes:[],valueSets:[]}),fe=e=>({version:1.1,properties:e.components.flatMap(e=>e.styles.map(e=>({name:e.name,description:e.docs})))}),pe=/^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$/,me=e=>{let t={value:`2023`,pattern:`yyyy`},n={value:`12`,pattern:`mm`},r={value:`24`,pattern:`dd`};return be([t.value,n.value,r.value].join(`-`),e,{timeZone:`UTC`}).replace(t.value,t.pattern).replace(n.value,n.pattern).replace(r.value,r.pattern)},he=(e,t,n)=>{let r=e.closest(`[lang]`),i=Intl.NumberFormat.supportedLocalesOf(r?.lang),a=i.length>0&&typeof i[0]==`string`?i[0]:navigator.language||n,o=a.split(`-`).shift();return Object.keys(t).length===0?{locale:a,messages:{lang:n}}:{locale:a,messages:t[o]??t[n]??{lang:n}}},ge=(e,t,n)=>new Intl.NumberFormat(t,{style:`currency`,currency:n}).format(e),_e=(e,t,n=0)=>new Intl.NumberFormat(t,{minimumFractionDigits:n}).format(Number(e)),ve=(e,t,n=0)=>new Intl.NumberFormat(t,{style:`percent`,minimumFractionDigits:n,maximumFractionDigits:n}).format(e),ye=(e,t,n,r=`short`,i=0)=>new Intl.NumberFormat(t,{style:`unit`,unit:n,unitDisplay:r,minimumFractionDigits:i,maximumFractionDigits:i}).format(e),be=(e,t,n)=>typeof e!=`string`||e===``||!pe.test(e)?``:new Intl.DateTimeFormat(t,n).format(new Date(e)),xe=(e,t)=>n=>he(n,e,t),x={updatable:!0,slotRelocation:!0},Se=`http://www.w3.org/2000/svg`,Ce=`http://www.w3.org/1999/xhtml`,we=e=>{if(e.__stencil__getHostRef)return e.__stencil__getHostRef()},S=(e,t)=>t in e,Te=`http://www.w3.org/1999/xlink`,C=typeof window<`u`?window:{},w={$flags$:0,$resourcesUrl$:``,jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,n,r)=>e.addEventListener(t,n,r),rel:(e,t,n,r)=>e.removeEventListener(t,n,r),ce:(e,t)=>new CustomEvent(e,t)},Ee=e=>{let t=D(e,`childNodes`);e.tagName&&e.tagName.includes(`-`)&&e[`s-cr`]&&e.tagName!==`SLOT-FB`&&T(t,e.tagName).forEach(e=>{e.nodeType===1&&e.tagName===`SLOT-FB`&&(Oe(e,E(e),!1).length?e.hidden=!0:e.hidden=!1)});let n=0;for(n=0;n<t.length;n++){let e=t[n];e.nodeType===1&&D(e,`childNodes`).length&&Ee(e)}},De=e=>{let t=[];for(let n=0;n<e.length;n++){let r=e[n][`s-nr`]||void 0;r&&r.isConnected&&t.push(r)}return t};function T(e,t,n){let r=0,i=[],a;for(;r<e.length;r++){if(a=e[r],a[`s-sr`]&&(!t||a[`s-hn`]===t)&&(n===void 0||E(a)===n)&&(i.push(a),n!==void 0))return i;i=[...i,...T(a.childNodes,t,n)]}return i}var Oe=(e,t,n=!0)=>{let r=[];(n&&e[`s-sr`]||!e[`s-sr`])&&r.push(e);let i=e;for(;i=i.nextSibling;)E(i)===t&&(n||!i[`s-sr`])&&r.push(i);return r},ke=(e,t)=>e.nodeType===1?e.getAttribute(`slot`)===null&&t===``||e.getAttribute(`slot`)===t:e[`s-sn`]===t||t===``,E=e=>typeof e[`s-sn`]==`string`?e[`s-sn`]:e.nodeType===1&&e.getAttribute(`slot`)||void 0;function Ae(e){if(e.assignedElements||e.assignedNodes||!e[`s-sr`])return;let t=t=>(function(e){let n=[],r=this[`s-sn`];e?.flatten&&console.error(`
|
|
14
14
|
Flattening is not supported for Stencil non-shadow slots.
|
|
15
15
|
You can use \`.childNodes\` to nested slot fallback content.
|
|
16
16
|
If you have a particular use case, please open an issue on the Stencil repo.
|
|
17
|
-
`);let i=this[`s-cr`].parentElement;return(i.__childNodes?i.childNodes:De(i.childNodes)).forEach(e=>{r===E(e)&&n.push(e)}),t?n.filter(e=>e.nodeType===1):n}).bind(e);e.assignedElements=t(!0),e.assignedNodes=t(!1)}function je(e){e.dispatchEvent(new CustomEvent(`slotchange`,{bubbles:!1,cancelable:!1,composed:!1}))}function Me(e,t){if(t||=e[`s-ol`]?.parentElement,!t)return{slotNode:null,slotName:``};let n=e[`s-sn`]=E(e)||``;return{slotNode:T(D(t,`childNodes`),t.tagName,n)[0],slotName:n}}function D(e,t){if(`__`+t in e){let n=e[`__`+t];return typeof n==`function`?n.bind(e):n}else return typeof e[t]==`function`?e[t].bind(e):e[t]}var Ne=e=>e!=null&&e!==void 0,Pe=e=>(e=typeof e,e===`object`||e===`function`),Fe=(e,t,...n)=>{let r=null,i=!1,a=!1,o=[],s=e=>{for(let t=0;t<e.length;t++)r=e[t],Array.isArray(r)?s(r):r!=null&&typeof r!=`boolean`&&((i=!Pe(r))&&(r=String(r)),i&&a?o[o.length-1].$text$+=r:o.push(i?O(null,r):r),a=i)};s(n);let c=O(e,null);return c.$attrs$=t,o.length>0&&(c.$children$=o),c.$key$=null,c.$name$=null,c},O=(e,t)=>{let n={$flags$:0,$tag$:e,$text$:t??null,$elm$:null,$children$:null};return n.$attrs$=null,n.$key$=null,n.$name$=null,n},Ie={},Le=e=>e&&e.$tag$===Ie,k=(e,t,n,r,i,a,o)=>{if(n===r)return;let s=S(e,t),c=t.toLowerCase();if(t===`class`){let t=e.classList,i=A(n),a=A(r);t.remove(...i.filter(e=>e&&!a.includes(e))),t.add(...a.filter(e=>e&&!i.includes(e)))}else if(t===`style`){for(let t in n)(!r||r[t]==null)&&(t.includes(`-`)?e.style.removeProperty(t):e.style[t]=``);for(let t in r)(!n||r[t]!==n[t])&&(t.includes(`-`)?e.style.setProperty(t,r[t]):e.style[t]=r[t])}else if(t!==`key`)if(t===`ref`)r&&qe(r,e);else if(!e.__lookupSetter__(t)&&t[0]===`o`&&t[1]===`n`){if(t=t[2]===`-`?t.slice(3):S(C,c)?c.slice(2):c[2]+t.slice(3),n||r){let i=t.endsWith(j);t=t.replace(ze,``),n&&w.rel(e,t,n,i),r&&w.ael(e,t,r,i)}}else if(t[0]===`a`&&t.startsWith(`attr:`)){let n=t.slice(5),i;{let t=we(e);if(t&&t.$cmpMeta$&&t.$cmpMeta$.$members$){let e=t.$cmpMeta$.$members$[n];e&&e[1]&&(i=e[1])}}i||=n.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),r==null||r===!1?(r!==!1||e.getAttribute(i)===``)&&e.removeAttribute(i):e.setAttribute(i,r===!0?``:r);return}else if(t[0]===`p`&&t.startsWith(`prop:`)){let n=t.slice(5);try{e[n]=r}catch{}return}else{let o=Pe(r);if((s||o&&r!==null)&&!i)try{if(e.tagName.includes(`-`))e[t]!==r&&(e[t]=r);else{let i=r??``;t===`list`?s=!1:(n==null||e[t]!==i)&&(typeof e.__lookupSetter__(t)==`function`?e[t]=i:e.setAttribute(t,i))}}catch{}let l=!1;c!==(c=c.replace(/^xlink\:?/,``))&&(t=c,l=!0),r==null||r===!1?(r!==!1||e.getAttribute(t)===``)&&(l?e.removeAttributeNS(Te,t):e.removeAttribute(t)):(!s||a&4||i)&&!o&&e.nodeType===1&&(r=r===!0?``:r,l?e.setAttributeNS(Te,t,r):e.setAttribute(t,r))}},Re=/\s/,A=e=>(typeof e==`object`&&e&&`baseVal`in e&&(e=e.baseVal),!e||typeof e!=`string`?[]:e.split(Re)),j=`Capture`,ze=RegExp(j+`$`),M=(e,t,n,r)=>{let i=t.$elm$.nodeType===11&&t.$elm$.host?t.$elm$.host:t.$elm$,a=e&&e.$attrs$||{},o=t.$attrs$||{};for(let e of Be(Object.keys(a)))e in o||k(i,e,a[e],void 0,n,t.$flags$);for(let e of Be(Object.keys(o)))k(i,e,a[e],o[e],n,t.$flags$)};function Be(e){return e.includes(`ref`)?[...e.filter(e=>e!==`ref`),`ref`]:e}var N,P,F,I=!1,L=!1,R=!1,z=!1,B=[],V=[],H=(e,t,n)=>{let r=t.$children$[n],i=0,a,o,s;if(I||(R=!0,r.$tag$===`slot`&&(r.$flags$|=r.$children$?2:1)),r.$text$!=null)a=r.$elm$=C.document.createTextNode(r.$text$);else if(r.$flags$&1)a=r.$elm$=C.document.createTextNode(``),M(null,r,z);else{if(z||=r.$tag$===`svg`,!C.document)throw Error(`You are trying to render a Stencil component in an environment that doesn't support the DOM.`);if(a=r.$elm$=C.document.createElementNS(z?Se:Ce,!I&&x.slotRelocation&&r.$flags$&2?`slot-fb`:r.$tag$),z&&r.$tag$===`foreignObject`&&(z=!1),M(null,r,z),Ne(N)&&a[`s-si`]!==N&&a.classList.add(a[`s-si`]=N),r.$children$){let t=r.$tag$===`template`?a.content:a;for(i=0;i<r.$children$.length;++i)o=H(e,r,i),o&&t.appendChild(o)}r.$tag$===`svg`?z=!1:a.tagName===`foreignObject`&&(z=!0)}return a[`s-hn`]=F,r.$flags$&3&&(a[`s-sr`]=!0,a[`s-cr`]=P,a[`s-sn`]=r.$name$||``,a[`s-rf`]=r.$attrs$?.ref,Ae(a),s=e&&e.$children$&&e.$children$[n],s&&s.$tag$===r.$tag$&&e.$elm$&&Ve(e.$elm$),Ye(P,a,t.$elm$,e?.$elm$)),a},Ve=e=>{w.$flags$|=1;let t=e.closest(F.toLowerCase());if(t!=null){let n=Array.from(t.__childNodes||t.childNodes).find(e=>e[`s-cr`]),r=Array.from(e.__childNodes||e.childNodes);for(let e of n?r.reverse():r)e[`s-sh`]!=null&&(J(t,e,n??null),e[`s-sh`]=void 0,R=!0)}w.$flags$&=-2},U=(e,t)=>{w.$flags$|=1;let n=Array.from(e.__childNodes||e.childNodes);if(e[`s-sr`]){let t=e;for(;t=t.nextSibling;)t&&t[`s-sn`]===e[`s-sn`]&&t[`s-sh`]===F&&n.push(t)}for(let e=n.length-1;e>=0;e--){let r=n[e];r[`s-hn`]!==F&&r[`s-ol`]&&(J(G(r).parentNode,r,G(r)),r[`s-ol`].remove(),r[`s-ol`]=void 0,r[`s-sh`]=void 0,R=!0),t&&U(r,t)}w.$flags$&=-2},He=(e,t,n,r,i,a)=>{let o=e[`s-cr`]&&e[`s-cr`].parentNode||e,s;for(o.shadowRoot&&o.tagName===F&&(o=o.shadowRoot),n.$tag$===`template`&&(o=o.content);i<=a;++i)r[i]&&(s=H(null,n,i),s&&(r[i].$elm$=s,J(o,s,G(t))))},Ue=(e,t,n)=>{for(let r=t;r<=n;++r){let t=e[r];if(t){let e=t.$elm$;Ke(t),e&&(L=!0,e[`s-ol`]?e[`s-ol`].remove():U(e,!0),e.remove())}}},We=(e,t,n,r,i=!1)=>{let a=0,o=0,s=0,c=0,l=t.length-1,u=t[0],d=t[l],f=r.length-1,p=r[0],m=r[f],h,g,_=n.$tag$===`template`?e.content:e;for(;a<=l&&o<=f;)if(u==null)u=t[++a];else if(d==null)d=t[--l];else if(p==null)p=r[++o];else if(m==null)m=r[--f];else if(W(u,p,i))K(u,p,i),u=t[++a],p=r[++o];else if(W(d,m,i))K(d,m,i),d=t[--l],m=r[--f];else if(W(u,m,i))(u.$tag$===`slot`||m.$tag$===`slot`)&&U(u.$elm$.parentNode,!1),K(u,m,i),J(_,u.$elm$,d.$elm$.nextSibling),u=t[++a],m=r[--f];else if(W(d,p,i))(u.$tag$===`slot`||m.$tag$===`slot`)&&U(d.$elm$.parentNode,!1),K(d,p,i),J(_,d.$elm$,u.$elm$),d=t[--l],p=r[++o];else{for(s=-1,c=a;c<=l;++c)if(t[c]&&t[c].$key$!==null&&t[c].$key$===p.$key$){s=c;break}s>=0?(g=t[s],g.$tag$===p.$tag$?(K(g,p,i),t[s]=void 0,h=g.$elm$):h=H(t&&t[o],n,s),p=r[++o]):(h=H(t&&t[o],n,o),p=r[++o]),h&&J(G(u.$elm$).parentNode,h,G(u.$elm$))}a>l?He(e,r[f+1]==null?null:r[f+1].$elm$,n,r,o,f):o>f&&Ue(t,a,l)},W=(e,t,n=!1)=>e.$tag$===t.$tag$?e.$tag$===`slot`?e.$name$===t.$name$:n?(n&&!e.$key$&&t.$key$&&(e.$key$=t.$key$),!0):e.$key$===t.$key$:!1,G=e=>e&&e[`s-ol`]||e,K=(e,t,n=!1)=>{let r=t.$elm$=e.$elm$,i=e.$children$,a=t.$children$,o=t.$tag$,s=t.$text$,c;s==null?(z=o===`svg`?!0:o===`foreignObject`?!1:z,o===`slot`&&!I&&e.$name$!==t.$name$&&(t.$elm$[`s-sn`]=t.$name$||``,Ve(t.$elm$.parentElement)),M(e,t,z),i!==null&&a!==null?We(r,i,t,a,n):a===null?!n&&x.updatable&&i!==null&&Ue(i,0,i.length-1):(e.$text$!==null&&(r.textContent=``),He(r,null,t,a,0,a.length-1)),z&&o===`svg`&&(z=!1)):(c=r[`s-cr`])?c.parentNode.textContent=s:e.$text$!==s&&(r.data=s)},q=[],Ge=e=>{let t,n,r,i=e.__childNodes||e.childNodes;for(let e of i){if(e[`s-sr`]&&(t=e[`s-cr`])&&t.parentNode){n=t.parentNode.__childNodes||t.parentNode.childNodes;let i=e[`s-sn`];for(r=n.length-1;r>=0;r--)if(t=n[r],!t[`s-cn`]&&!t[`s-nr`]&&t[`s-hn`]!==e[`s-hn`]&&(!t[`s-sh`]||t[`s-sh`]!==e[`s-hn`]))if(ke(t,i)){let n=q.find(e=>e.$nodeToRelocate$===t);L=!0,t[`s-sn`]=t[`s-sn`]||i,n?(n.$nodeToRelocate$[`s-sh`]=e[`s-hn`],n.$slotRefNode$=e):(t[`s-sh`]=e[`s-hn`],q.push({$slotRefNode$:e,$nodeToRelocate$:t})),t[`s-sr`]&&q.map(e=>{ke(e.$nodeToRelocate$,t[`s-sn`])&&(n=q.find(e=>e.$nodeToRelocate$===t),n&&!e.$slotRefNode$&&(e.$slotRefNode$=n.$slotRefNode$))})}else q.some(e=>e.$nodeToRelocate$===t)||q.push({$nodeToRelocate$:t})}e.nodeType===1&&Ge(e)}},Ke=e=>{e.$attrs$&&e.$attrs$.ref&&B.push(()=>e.$attrs$.ref(null)),e.$children$&&e.$children$.map(Ke)},qe=(e,t)=>{V.push(()=>e(t))},Je=()=>{B.forEach(e=>e()),B.length=0,V.forEach(e=>e()),V.length=0},J=(e,t,n,r)=>{if(typeof t[`s-sn`]==`string`&&t[`s-sr`]&&t[`s-cr`])Ye(t[`s-cr`],t,e,t.parentElement);else if(typeof t[`s-sn`]==`string`){e.insertBefore(t,n);let{slotNode:i}=Me(t);return i&&!r&&je(i),t}return e.__insertBefore?e.__insertBefore(t,n):e?.insertBefore(t,n)};function Ye(e,t,n,r){var i;let a;if(e&&typeof t[`s-sn`]==`string`&&t[`s-sr`]&&e.parentNode&&e.parentNode[`s-sc`]&&(a=t[`s-si`]||e.parentNode[`s-sc`])){let e=t[`s-sn`],o=t[`s-hn`];if((i=n.classList)==null||i.add(a+`-s`),r&&r.classList?.contains(a+`-s`)){let t=(r.__childNodes||r.childNodes)[0],n=!1;for(;t;){if(t[`s-sn`]!==e&&t[`s-hn`]===o&&t[`s-sr`]){n=!0;break}t=t.nextSibling}n||r.classList.remove(a+`-s`)}}}var Xe=(e,t,n=!1)=>{let r=e.$hostElement$,i=e.$cmpMeta$,a=e.$vnode$||O(null,null),o=Le(t)?t:Fe(null,null,t);if(F=r.tagName,i.$attrsToReflect$&&(o.$attrs$=o.$attrs$||{},i.$attrsToReflect$.forEach(([t,n])=>{x.serializer&&e.$serializerValues$.has(t)?o.$attrs$[n]=e.$serializerValues$.get(t):o.$attrs$[n]=r[t]})),n&&o.$attrs$)for(let e of Object.keys(o.$attrs$))r.hasAttribute(e)&&![`key`,`ref`,`style`,`class`].includes(e)&&(o.$attrs$[e]=r[e]);if(o.$tag$=null,o.$flags$|=4,e.$vnode$=o,o.$elm$=a.$elm$=r.shadowRoot||r,N=r[`s-sc`],I=!!(i.$flags$&1)&&!(i.$flags$&128),P=r[`s-cr`],L=!1,K(a,o,n),w.$flags$|=1,R){Ge(o.$elm$);for(let e of q){let t=e.$nodeToRelocate$;if(!t[`s-ol`]&&C.document){let e=C.document.createTextNode(``);e[`s-nr`]=t,J(t.parentNode,t[`s-ol`]=e,t,n)}}for(let e of q){let t=e.$nodeToRelocate$,r=e.$slotRefNode$;if(t.nodeType===1&&n&&(t[`s-ih`]=t.hidden??!1),r){let e=r.parentNode,i=r.nextSibling;if(i&&i.nodeType===1){let n=t[`s-ol`]?.previousSibling;for(;n;){let r=n[`s-nr`]??null;if(r&&r[`s-sn`]===t[`s-sn`]&&e===(r.__parentNode||r.parentNode)){for(r=r.nextSibling;r===t||r?.[`s-sr`];)r=r?.nextSibling;if(!r||!r[`s-nr`]){i=r;break}}n=n.previousSibling}}let a=t.__parentNode||t.parentNode,o=t.__nextSibling||t.nextSibling;if((!i&&e!==a||o!==i)&&t!==i){if(J(e,t,i,n),t.nodeType===8&&t.nodeValue.startsWith(`s-nt-`)){let e=C.document.createTextNode(t.nodeValue.replace(/^s-nt-/,``));e[`s-hn`]=t[`s-hn`],e[`s-sn`]=t[`s-sn`],e[`s-sh`]=t[`s-sh`],e[`s-sr`]=t[`s-sr`],e[`s-ol`]=t[`s-ol`],e[`s-ol`][`s-nr`]=e,J(t.parentNode,e,t,n),t.parentNode.removeChild(t)}t.nodeType===1&&t.tagName!==`SLOT-FB`&&(t.hidden=t[`s-ih`]??!1)}t&&typeof r[`s-rf`]==`function`&&r[`s-rf`](r)}else t.nodeType===1&&(t.hidden=!0)}}if(L&&Ee(o.$elm$),w.$flags$&=-2,q.length=0,!I&&!(i.$flags$&1)&&r[`s-cr`]){let e=o.$elm$.__childNodes||o.$elm$.childNodes;for(let t of e)if(t[`s-hn`]!==F&&!t[`s-sh`]){if(n&&t[`s-ih`]==null&&(t[`s-ih`]=t.hidden??!1),t.nodeType===1)t.hidden=!0;else if(t.nodeType===3&&t.nodeValue.trim()){let e=C.document.createComment(`s-nt-`+t.nodeValue);e[`s-sn`]=t[`s-sn`],J(t.parentNode,e,t,n),t.parentNode.removeChild(t)}}}P=void 0,Je()},Y={content_wrap:0,ignore:[],ignore_with:`!i-£___£%_`,strict:!1,tab_size:2,tag_wrap:0,trim:[]},Ze=[`area`,`base`,`br`,`col`,`embed`,`hr`,`img`,`input`,`link`,`meta`,`param`,`source`,`track`,`wbr`],Qe={checked_html:!1,config:{...Y},ignored:!1,constants:{CONTENT_IGNORE_PLACEHOLDER:`${Y.ignore_with}_`,SELF_CLOSING_PLACEHOLDER:`${Y.ignore_with}/_>`,ATTRIBUTE_IGNORE_PLACEHOLDER:`${Y.ignore_with}=_`}},X=()=>Qe,Z=e=>Object.assign(Qe,e),$e=e=>(Z({checked_html:!0}),/<(?:[A-Za-z]+[A-Za-z0-9]*)(?:\s+.*?)*?\/{0,1}>/.test(e)||/<(?<Element>(?:[A-Za-z]+[A-Za-z0-9]*:)?(?:[A-Za-z]+[A-Za-z0-9]*))(?:\s+.*?)*?>(?:.|\n)*?<\/{1}\k<Element>>/.test(e)||/<(?<Element>(?:[a-z][a-z0-9._]*:)?[a-z][a-z0-9._]*-[a-z0-9._-]+)(?:\s+.*?)*?>(?:.|\n)*?<\/{1}\k<Element>>/.test(e)),et=(e,t)=>{if(!e||!t)throw Error(`Both 'current' and 'updates' must be passed-in to mergeObjects()`);let n;if(Array.isArray(e))n=structuredClone(e).concat(t);else if(typeof e==`object`){n={...e};for(let e of Object.keys(t))typeof t[e]==`object`?n[e]=et(n[e]||{},t[e]):n[e]=t[e]}return n},tt=(e,t)=>{let n=et(e,t);return Z({config:n,constants:{CONTENT_IGNORE_PLACEHOLDER:`${n.ignore_with}_`,SELF_CLOSING_PLACEHOLDER:`${n.ignore_with}/_>`,ATTRIBUTE_IGNORE_PLACEHOLDER:`${n.ignore_with}=_`}}),n},nt=e=>{let{constants:t}=X();return e=e.replace(/<[\w:\-]+([^>]*[^\/])>/g,(e,n)=>e.replace(n,e=>e.replace(/\n/g,t.ATTRIBUTE_IGNORE_PLACEHOLDER+`nl!`).replace(/\r/g,t.ATTRIBUTE_IGNORE_PLACEHOLDER+`cr!`).replace(/\s/g,t.ATTRIBUTE_IGNORE_PLACEHOLDER+`ws!`))),e},rt=e=>{let{constants:t}=X();return e.replace(/\n/g,t.CONTENT_IGNORE_PLACEHOLDER+`nl!`).replace(/\r/g,t.CONTENT_IGNORE_PLACEHOLDER+`cr!`).replace(/\s/g,t.CONTENT_IGNORE_PLACEHOLDER+`ws!`)},it=e=>{let t=/\s*<([a-zA-Z0-9:-]+)[^>]*>\n\s*<\/\1>(?=\n[ ]*[^\n]*__!i-£___£%__[^\n]*\n)(\n[ ]*\S[^\n]*\n)|<([a-zA-Z0-9:-]+)[^>]*>(?=\n[ ]*[^\n]*__!i-£___£%__[^\n]*\n)(\n[ ]*\S[^\n]*\n\s*)<\/\3>/g,{constants:n}=X();return e.replace(t,(e,t,r,i,a)=>{let o=r||a;if(!o)return e;let s=o.replace(/\n/g,n.CONTENT_IGNORE_PLACEHOLDER+`nl!`).replace(/\r/g,n.CONTENT_IGNORE_PLACEHOLDER+`cr!`).replace(/\s/g,n.CONTENT_IGNORE_PLACEHOLDER+`ws!`);return e.replace(o,s)})},at=e=>{let t=/<([A-Za-z][A-Za-z0-9]*|[a-z][a-z0-9._]*-[a-z0-9._-]+)((?:\s+[A-Za-z0-9_-]+="[^"]*"|\s*[a-z]*)*)>/g,{constants:n}=X();return e=e.replace(t,(e,t,r)=>e.replace(r,e=>e.replace(/</g,n.ATTRIBUTE_IGNORE_PLACEHOLDER+`lt!`).replace(/>/g,n.ATTRIBUTE_IGNORE_PLACEHOLDER+`gt!`))),e},ot=(e,t)=>{for(let n=0;n<t.length;n++){let r=RegExp(`(<${t[n]}[^>]*>)\\s+`,`g`),i=RegExp(`\\s+(</${t[n]}>)`,`g`);e=e.replace(r,`$1`).replace(i,`$1`)}return e},st=e=>{let{constants:t}=X();return e=e.replace(/<[\w:\-]+([^>]*[^\/])>/g,(e,n)=>e.replace(n,e=>e.replace(RegExp(t.ATTRIBUTE_IGNORE_PLACEHOLDER+`nl!`,`g`),`
|
|
17
|
+
`);let i=this[`s-cr`].parentElement;return(i.__childNodes?i.childNodes:De(i.childNodes)).forEach(e=>{r===E(e)&&n.push(e)}),t?n.filter(e=>e.nodeType===1):n}).bind(e);e.assignedElements=t(!0),e.assignedNodes=t(!1)}function je(e){e.dispatchEvent(new CustomEvent(`slotchange`,{bubbles:!1,cancelable:!1,composed:!1}))}function Me(e,t){if(t||=e[`s-ol`]?.parentElement,!t)return{slotNode:null,slotName:``};let n=e[`s-sn`]=E(e)||``;return{slotNode:T(D(t,`childNodes`),t.tagName,n)[0],slotName:n}}function D(e,t){if(`__`+t in e){let n=e[`__`+t];return typeof n==`function`?n.bind(e):n}else return typeof e[t]==`function`?e[t].bind(e):e[t]}var Ne=e=>e!=null&&e!==void 0,Pe=e=>(e=typeof e,e===`object`||e===`function`),Fe=(e,t,...n)=>{let r=null,i=!1,a=!1,o=[],s=e=>{for(let t=0;t<e.length;t++)r=e[t],Array.isArray(r)?s(r):r!=null&&typeof r!=`boolean`&&((i=!Pe(r))&&(r=String(r)),i&&a?o[o.length-1].$text$+=r:o.push(i?O(null,r):r),a=i)};s(n);let c=O(e,null);return c.$attrs$=t,o.length>0&&(c.$children$=o),c.$key$=null,c.$name$=null,c},O=(e,t)=>{let n={$flags$:0,$tag$:e,$text$:t??null,$elm$:null,$children$:null};return n.$attrs$=null,n.$key$=null,n.$name$=null,n},Ie={},Le=e=>e&&e.$tag$===Ie,k=(e,t,n,r,i,a,o)=>{if(n===r)return;let s=S(e,t),c=t.toLowerCase();if(t===`class`){let t=e.classList,i=A(n),a=A(r);t.remove(...i.filter(e=>e&&!a.includes(e))),t.add(...a.filter(e=>e&&!i.includes(e)))}else if(t===`style`){for(let t in n)(!r||r[t]==null)&&(t.includes(`-`)?e.style.removeProperty(t):e.style[t]=``);for(let t in r)(!n||r[t]!==n[t])&&(t.includes(`-`)?e.style.setProperty(t,r[t]):e.style[t]=r[t])}else if(t!==`key`)if(t===`ref`)r&&qe(r,e);else if(!e.__lookupSetter__(t)&&t[0]===`o`&&t[1]===`n`){if(t=t[2]===`-`?t.slice(3):S(C,c)?c.slice(2):c[2]+t.slice(3),n||r){let i=t.endsWith(j);t=t.replace(ze,``),n&&w.rel(e,t,n,i),r&&w.ael(e,t,r,i)}}else if(t[0]===`a`&&t.startsWith(`attr:`)){let n=t.slice(5),i;{let t=we(e);if(t&&t.$cmpMeta$&&t.$cmpMeta$.$members$){let e=t.$cmpMeta$.$members$[n];e&&e[1]&&(i=e[1])}}i||=n.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),r==null||r===!1?(r!==!1||e.getAttribute(i)===``)&&e.removeAttribute(i):e.setAttribute(i,r===!0?``:r);return}else if(t[0]===`p`&&t.startsWith(`prop:`)){let n=t.slice(5);try{e[n]=r}catch{}return}else{let o=Pe(r);if((s||o&&r!==null)&&!i)try{if(e.tagName.includes(`-`))e[t]!==r&&(e[t]=r);else{let i=r??``;t===`list`?s=!1:(n==null||e[t]!==i)&&(typeof e.__lookupSetter__(t)==`function`?e[t]=i:e.setAttribute(t,i))}}catch{}let l=!1;c!==(c=c.replace(/^xlink\:?/,``))&&(t=c,l=!0),r==null||r===!1?(r!==!1||e.getAttribute(t)===``)&&(l?e.removeAttributeNS(Te,t):e.removeAttribute(t)):(!s||a&4||i)&&!o&&e.nodeType===1&&(r=r===!0?``:r,l?e.setAttributeNS(Te,t,r):e.setAttribute(t,r))}},Re=/\s/,A=e=>(typeof e==`object`&&e&&`baseVal`in e&&(e=e.baseVal),!e||typeof e!=`string`?[]:e.split(Re)),j=`Capture`,ze=RegExp(j+`$`),M=(e,t,n,r)=>{let i=t.$elm$.nodeType===11&&t.$elm$.host?t.$elm$.host:t.$elm$,a=e&&e.$attrs$||{},o=t.$attrs$||{};for(let e of Be(Object.keys(a)))e in o||k(i,e,a[e],void 0,n,t.$flags$);for(let e of Be(Object.keys(o)))k(i,e,a[e],o[e],n,t.$flags$)};function Be(e){return e.includes(`ref`)?[...e.filter(e=>e!==`ref`),`ref`]:e}var N,P,F,I=!1,L=!1,R=!1,z=!1,B=[],V=[],H=(e,t,n)=>{let r=t.$children$[n],i=0,a,o,s;if(I||(R=!0,r.$tag$===`slot`&&(r.$flags$|=r.$children$?2:1)),r.$text$!=null)a=r.$elm$=C.document.createTextNode(r.$text$);else if(r.$flags$&1)a=r.$elm$=C.document.createTextNode(``),M(null,r,z);else{if(z||=r.$tag$===`svg`,!C.document)throw Error(`You are trying to render a Stencil component in an environment that doesn't support the DOM.`);if(a=r.$elm$=C.document.createElementNS(z?Se:Ce,!I&&x.slotRelocation&&r.$flags$&2?`slot-fb`:r.$tag$),z&&r.$tag$===`foreignObject`&&(z=!1),M(null,r,z),Ne(N)&&a[`s-si`]!==N&&a.classList.add(a[`s-si`]=N),r.$children$){let t=r.$tag$===`template`?a.content:a;for(i=0;i<r.$children$.length;++i)o=H(e,r,i),o&&t.appendChild(o)}r.$tag$===`svg`?z=!1:a.tagName===`foreignObject`&&(z=!0)}return a[`s-hn`]=F,r.$flags$&3&&(a[`s-sr`]=!0,a[`s-cr`]=P,a[`s-sn`]=r.$name$||``,a[`s-rf`]=r.$attrs$?.ref,Ae(a),s=e&&e.$children$&&e.$children$[n],s&&s.$tag$===r.$tag$&&e.$elm$&&Ve(e.$elm$),Ye(P,a,t.$elm$,e?.$elm$)),a},Ve=e=>{w.$flags$|=1;let t=e.closest(F.toLowerCase());if(t!=null){let n=Array.from(t.__childNodes||t.childNodes).find(e=>e[`s-cr`]),r=Array.from(e.__childNodes||e.childNodes);for(let e of n?r.reverse():r)e[`s-sh`]!=null&&(J(t,e,n??null),e[`s-sh`]=void 0,R=!0)}w.$flags$&=-2},U=(e,t)=>{w.$flags$|=1;let n=Array.from(e.__childNodes||e.childNodes);if(e[`s-sr`]){let t=e;for(;t=t.nextSibling;)t&&t[`s-sn`]===e[`s-sn`]&&t[`s-sh`]===F&&n.push(t)}for(let e=n.length-1;e>=0;e--){let r=n[e];r[`s-hn`]!==F&&r[`s-ol`]&&(J(G(r).parentNode,r,G(r)),r[`s-ol`].remove(),r[`s-ol`]=void 0,r[`s-sh`]=void 0,R=!0),t&&U(r,t)}w.$flags$&=-2},He=(e,t,n,r,i,a)=>{let o=e[`s-cr`]&&e[`s-cr`].parentNode||e,s;for(o.shadowRoot&&o.tagName===F&&(o=o.shadowRoot),n.$tag$===`template`&&(o=o.content);i<=a;++i)r[i]&&(s=H(null,n,i),s&&(r[i].$elm$=s,J(o,s,G(t))))},Ue=(e,t,n)=>{for(let r=t;r<=n;++r){let t=e[r];if(t){let e=t.$elm$;Ke(t),e&&(L=!0,e[`s-ol`]?e[`s-ol`].remove():U(e,!0),e.remove())}}},We=(e,t,n,r,i=!1)=>{let a=0,o=0,s=0,c=0,l=t.length-1,u=t[0],d=t[l],f=r.length-1,p=r[0],m=r[f],h,g,_=n.$tag$===`template`?e.content:e;for(;a<=l&&o<=f;)if(u==null)u=t[++a];else if(d==null)d=t[--l];else if(p==null)p=r[++o];else if(m==null)m=r[--f];else if(W(u,p,i))K(u,p,i),u=t[++a],p=r[++o];else if(W(d,m,i))K(d,m,i),d=t[--l],m=r[--f];else if(W(u,m,i))(u.$tag$===`slot`||m.$tag$===`slot`)&&U(u.$elm$.parentNode,!1),K(u,m,i),J(_,u.$elm$,d.$elm$.nextSibling),u=t[++a],m=r[--f];else if(W(d,p,i))(u.$tag$===`slot`||m.$tag$===`slot`)&&U(d.$elm$.parentNode,!1),K(d,p,i),J(_,d.$elm$,u.$elm$),d=t[--l],p=r[++o];else{for(s=-1,c=a;c<=l;++c)if(t[c]&&t[c].$key$!==null&&t[c].$key$===p.$key$){s=c;break}s>=0?(g=t[s],g.$tag$===p.$tag$?(K(g,p,i),t[s]=void 0,h=g.$elm$):h=H(t&&t[o],n,s),p=r[++o]):(h=H(t&&t[o],n,o),p=r[++o]),h&&J(G(u.$elm$).parentNode,h,G(u.$elm$))}a>l?He(e,r[f+1]==null?null:r[f+1].$elm$,n,r,o,f):o>f&&Ue(t,a,l)},W=(e,t,n=!1)=>e.$tag$===t.$tag$?e.$tag$===`slot`?e.$name$===t.$name$:n?(n&&!e.$key$&&t.$key$&&(e.$key$=t.$key$),!0):e.$key$===t.$key$:!1,G=e=>e&&e[`s-ol`]||e,K=(e,t,n=!1)=>{let r=t.$elm$=e.$elm$,i=e.$children$,a=t.$children$,o=t.$tag$,s=t.$text$,c;s==null?(z=o===`svg`||o!==`foreignObject`&&z,o===`slot`&&!I&&e.$name$!==t.$name$&&(t.$elm$[`s-sn`]=t.$name$||``,Ve(t.$elm$.parentElement)),M(e,t,z),i!==null&&a!==null?We(r,i,t,a,n):a===null?!n&&x.updatable&&i!==null&&Ue(i,0,i.length-1):(e.$text$!==null&&(r.textContent=``),He(r,null,t,a,0,a.length-1)),z&&o===`svg`&&(z=!1)):(c=r[`s-cr`])?c.parentNode.textContent=s:e.$text$!==s&&(r.data=s)},q=[],Ge=e=>{let t,n,r,i=e.__childNodes||e.childNodes;for(let e of i){if(e[`s-sr`]&&(t=e[`s-cr`])&&t.parentNode){n=t.parentNode.__childNodes||t.parentNode.childNodes;let i=e[`s-sn`];for(r=n.length-1;r>=0;r--)if(t=n[r],!t[`s-cn`]&&!t[`s-nr`]&&t[`s-hn`]!==e[`s-hn`]&&(!t[`s-sh`]||t[`s-sh`]!==e[`s-hn`]))if(ke(t,i)){let n=q.find(e=>e.$nodeToRelocate$===t);L=!0,t[`s-sn`]=t[`s-sn`]||i,n?(n.$nodeToRelocate$[`s-sh`]=e[`s-hn`],n.$slotRefNode$=e):(t[`s-sh`]=e[`s-hn`],q.push({$slotRefNode$:e,$nodeToRelocate$:t})),t[`s-sr`]&&q.map(e=>{ke(e.$nodeToRelocate$,t[`s-sn`])&&(n=q.find(e=>e.$nodeToRelocate$===t),n&&!e.$slotRefNode$&&(e.$slotRefNode$=n.$slotRefNode$))})}else q.some(e=>e.$nodeToRelocate$===t)||q.push({$nodeToRelocate$:t})}e.nodeType===1&&Ge(e)}},Ke=e=>{e.$attrs$&&e.$attrs$.ref&&B.push(()=>e.$attrs$.ref(null)),e.$children$&&e.$children$.map(Ke)},qe=(e,t)=>{V.push(()=>e(t))},Je=()=>{B.forEach(e=>e()),B.length=0,V.forEach(e=>e()),V.length=0},J=(e,t,n,r)=>{if(typeof t[`s-sn`]==`string`&&t[`s-sr`]&&t[`s-cr`])Ye(t[`s-cr`],t,e,t.parentElement);else if(typeof t[`s-sn`]==`string`){e.insertBefore(t,n);let{slotNode:i}=Me(t);return i&&!r&&je(i),t}return e.__insertBefore?e.__insertBefore(t,n):e?.insertBefore(t,n)};function Ye(e,t,n,r){var i;let a;if(e&&typeof t[`s-sn`]==`string`&&t[`s-sr`]&&e.parentNode&&e.parentNode[`s-sc`]&&(a=t[`s-si`]||e.parentNode[`s-sc`])){let e=t[`s-sn`],o=t[`s-hn`];if((i=n.classList)==null||i.add(a+`-s`),r&&r.classList?.contains(a+`-s`)){let t=(r.__childNodes||r.childNodes)[0],n=!1;for(;t;){if(t[`s-sn`]!==e&&t[`s-hn`]===o&&t[`s-sr`]){n=!0;break}t=t.nextSibling}n||r.classList.remove(a+`-s`)}}}var Xe=(e,t,n=!1)=>{let r=e.$hostElement$,i=e.$cmpMeta$,a=e.$vnode$||O(null,null),o=Le(t)?t:Fe(null,null,t);if(F=r.tagName,i.$attrsToReflect$&&(o.$attrs$=o.$attrs$||{},i.$attrsToReflect$.forEach(([t,n])=>{x.serializer&&e.$serializerValues$.has(t)?o.$attrs$[n]=e.$serializerValues$.get(t):o.$attrs$[n]=r[t]})),n&&o.$attrs$)for(let e of Object.keys(o.$attrs$))r.hasAttribute(e)&&![`key`,`ref`,`style`,`class`].includes(e)&&(o.$attrs$[e]=r[e]);if(o.$tag$=null,o.$flags$|=4,e.$vnode$=o,o.$elm$=a.$elm$=r.shadowRoot||r,N=r[`s-sc`],I=!!(i.$flags$&1)&&!(i.$flags$&128),P=r[`s-cr`],L=!1,K(a,o,n),w.$flags$|=1,R){Ge(o.$elm$);for(let e of q){let t=e.$nodeToRelocate$;if(!t[`s-ol`]&&C.document){let e=C.document.createTextNode(``);e[`s-nr`]=t,J(t.parentNode,t[`s-ol`]=e,t,n)}}for(let e of q){let t=e.$nodeToRelocate$,r=e.$slotRefNode$;if(t.nodeType===1&&n&&(t[`s-ih`]=t.hidden??!1),r){let e=r.parentNode,i=r.nextSibling;if(i&&i.nodeType===1){let n=t[`s-ol`]?.previousSibling;for(;n;){let r=n[`s-nr`]??null;if(r&&r[`s-sn`]===t[`s-sn`]&&e===(r.__parentNode||r.parentNode)){for(r=r.nextSibling;r===t||r?.[`s-sr`];)r=r?.nextSibling;if(!r||!r[`s-nr`]){i=r;break}}n=n.previousSibling}}let a=t.__parentNode||t.parentNode,o=t.__nextSibling||t.nextSibling;if((!i&&e!==a||o!==i)&&t!==i){if(J(e,t,i,n),t.nodeType===8&&t.nodeValue.startsWith(`s-nt-`)){let e=C.document.createTextNode(t.nodeValue.replace(/^s-nt-/,``));e[`s-hn`]=t[`s-hn`],e[`s-sn`]=t[`s-sn`],e[`s-sh`]=t[`s-sh`],e[`s-sr`]=t[`s-sr`],e[`s-ol`]=t[`s-ol`],e[`s-ol`][`s-nr`]=e,J(t.parentNode,e,t,n),t.parentNode.removeChild(t)}t.nodeType===1&&t.tagName!==`SLOT-FB`&&(t.hidden=t[`s-ih`]??!1)}t&&typeof r[`s-rf`]==`function`&&r[`s-rf`](r)}else t.nodeType===1&&(t.hidden=!0)}}if(L&&Ee(o.$elm$),w.$flags$&=-2,q.length=0,!I&&!(i.$flags$&1)&&r[`s-cr`]){let e=o.$elm$.__childNodes||o.$elm$.childNodes;for(let t of e)if(t[`s-hn`]!==F&&!t[`s-sh`]){if(n&&t[`s-ih`]==null&&(t[`s-ih`]=t.hidden??!1),t.nodeType===1)t.hidden=!0;else if(t.nodeType===3&&t.nodeValue.trim()){let e=C.document.createComment(`s-nt-`+t.nodeValue);e[`s-sn`]=t[`s-sn`],J(t.parentNode,e,t,n),t.parentNode.removeChild(t)}}}P=void 0,Je()},Y={content_wrap:0,ignore:[],ignore_with:`!i-£___£%_`,strict:!1,tab_size:2,tag_wrap:0,trim:[]},Ze=[`area`,`base`,`br`,`col`,`embed`,`hr`,`img`,`input`,`link`,`meta`,`param`,`source`,`track`,`wbr`],Qe={checked_html:!1,config:{...Y},ignored:!1,constants:{CONTENT_IGNORE_PLACEHOLDER:`${Y.ignore_with}_`,SELF_CLOSING_PLACEHOLDER:`${Y.ignore_with}/_>`,ATTRIBUTE_IGNORE_PLACEHOLDER:`${Y.ignore_with}=_`}},X=()=>Qe,Z=e=>Object.assign(Qe,e),$e=e=>(Z({checked_html:!0}),/<(?:[A-Za-z]+[A-Za-z0-9]*)(?:\s+.*?)*?\/{0,1}>/.test(e)||/<(?<Element>(?:[A-Za-z]+[A-Za-z0-9]*:)?(?:[A-Za-z]+[A-Za-z0-9]*))(?:\s+.*?)*?>(?:.|\n)*?<\/{1}\k<Element>>/.test(e)||/<(?<Element>(?:[a-z][a-z0-9._]*:)?[a-z][a-z0-9._]*-[a-z0-9._-]+)(?:\s+.*?)*?>(?:.|\n)*?<\/{1}\k<Element>>/.test(e)),et=(e,t)=>{if(!e||!t)throw Error(`Both 'current' and 'updates' must be passed-in to mergeObjects()`);let n;if(Array.isArray(e))n=structuredClone(e).concat(t);else if(typeof e==`object`){n={...e};for(let e of Object.keys(t))typeof t[e]==`object`?n[e]=et(n[e]||{},t[e]):n[e]=t[e]}return n},tt=(e,t)=>{let n=et(e,t);return Z({config:n,constants:{CONTENT_IGNORE_PLACEHOLDER:`${n.ignore_with}_`,SELF_CLOSING_PLACEHOLDER:`${n.ignore_with}/_>`,ATTRIBUTE_IGNORE_PLACEHOLDER:`${n.ignore_with}=_`}}),n},nt=e=>{let{constants:t}=X();return e=e.replace(/<[\w:\-]+([^>]*[^\/])>/g,(e,n)=>e.replace(n,e=>e.replace(/\n/g,t.ATTRIBUTE_IGNORE_PLACEHOLDER+`nl!`).replace(/\r/g,t.ATTRIBUTE_IGNORE_PLACEHOLDER+`cr!`).replace(/\s/g,t.ATTRIBUTE_IGNORE_PLACEHOLDER+`ws!`))),e},rt=e=>{let{constants:t}=X();return e.replace(/\n/g,t.CONTENT_IGNORE_PLACEHOLDER+`nl!`).replace(/\r/g,t.CONTENT_IGNORE_PLACEHOLDER+`cr!`).replace(/\s/g,t.CONTENT_IGNORE_PLACEHOLDER+`ws!`)},it=e=>{let t=/\s*<([a-zA-Z0-9:-]+)[^>]*>\n\s*<\/\1>(?=\n[ ]*[^\n]*__!i-£___£%__[^\n]*\n)(\n[ ]*\S[^\n]*\n)|<([a-zA-Z0-9:-]+)[^>]*>(?=\n[ ]*[^\n]*__!i-£___£%__[^\n]*\n)(\n[ ]*\S[^\n]*\n\s*)<\/\3>/g,{constants:n}=X();return e.replace(t,(e,t,r,i,a)=>{let o=r||a;if(!o)return e;let s=o.replace(/\n/g,n.CONTENT_IGNORE_PLACEHOLDER+`nl!`).replace(/\r/g,n.CONTENT_IGNORE_PLACEHOLDER+`cr!`).replace(/\s/g,n.CONTENT_IGNORE_PLACEHOLDER+`ws!`);return e.replace(o,s)})},at=e=>{let t=/<([A-Za-z][A-Za-z0-9]*|[a-z][a-z0-9._]*-[a-z0-9._-]+)((?:\s+[A-Za-z0-9_-]+="[^"]*"|\s*[a-z]*)*)>/g,{constants:n}=X();return e=e.replace(t,(e,t,r)=>e.replace(r,e=>e.replace(/</g,n.ATTRIBUTE_IGNORE_PLACEHOLDER+`lt!`).replace(/>/g,n.ATTRIBUTE_IGNORE_PLACEHOLDER+`gt!`))),e},ot=(e,t)=>{for(let n=0;n<t.length;n++){let r=RegExp(`(<${t[n]}[^>]*>)\\s+`,`g`),i=RegExp(`\\s+(</${t[n]}>)`,`g`);e=e.replace(r,`$1`).replace(i,`$1`)}return e},st=e=>{let{constants:t}=X();return e=e.replace(/<[\w:\-]+([^>]*[^\/])>/g,(e,n)=>e.replace(n,e=>e.replace(RegExp(t.ATTRIBUTE_IGNORE_PLACEHOLDER+`nl!`,`g`),`
|
|
18
18
|
`).replace(RegExp(t.ATTRIBUTE_IGNORE_PLACEHOLDER+`cr!`,`g`),`\r`).replace(RegExp(t.ATTRIBUTE_IGNORE_PLACEHOLDER+`ws!`,`g`),` `))),e},ct=e=>{let{constants:t}=X();return e=e.replace(RegExp(`.*${t.CONTENT_IGNORE_PLACEHOLDER}[a-z]{2}!.*`,`g`),e=>e.replace(RegExp(`${t.CONTENT_IGNORE_PLACEHOLDER}[a-z]{2}!`,`g`),e=>e.replace(RegExp(t.CONTENT_IGNORE_PLACEHOLDER+`nl!`,`g`),`
|
|
19
19
|
`).replace(RegExp(t.CONTENT_IGNORE_PLACEHOLDER+`cr!`,`g`),`\r`).replace(RegExp(t.CONTENT_IGNORE_PLACEHOLDER+`ws!`,`g`),` `))),e},lt=e=>{let t=/<([\w:\-]+)([^>]*)>/g,{constants:n}=X(),r=n.ATTRIBUTE_IGNORE_PLACEHOLDER.replace(/[-\/\\^$*+?.()|[\]{}]/g,`\\$&`),i=RegExp(r+`lt!`,`g`),a=RegExp(r+`gt!`,`g`);return e.replace(t,(e,t,n)=>`<${t}${n.replace(i,`<`).replace(a,`>`)}>`)},ut=e=>{if(typeof e!=`object`)throw Error(`Config must be an object.`);let t={...Y};if(!(Object.hasOwn(e,`content_wrap`)||Object.hasOwn(e,`ignore`)||Object.hasOwn(e,`ignore_with`)||Object.hasOwn(e,`strict`)||Object.hasOwn(e,`tab_size`)||Object.hasOwn(e,`tag_wrap`)||Object.hasOwn(e,`trim`)))return Z({config:t}),t;let n=e.tab_size;if(n){if(typeof n!=`number`)throw Error(`tab_size must be a number, not ${typeof e.tab_size}.`);if(!Number.isSafeInteger(n))throw Error(`Tab size ${n} is not safe. See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isSafeInteger for more info.`);if(n=Math.floor(n),n<1||n>16)throw Error(`Tab size out of range. Expecting 1 to 16.`);e.tab_size=n}if(Object.hasOwn(e,`content_wrap`)&&typeof e.content_wrap!=`number`)throw Error(`content_wrap config must be a number, not ${typeof e.content_wrap}.`);if(Object.hasOwn(e,`ignore`)&&(!Array.isArray(e.ignore)||!e.ignore?.every(e=>typeof e==`string`)))throw Error(`Ignore config must be an array of strings.`);if(Object.hasOwn(e,`ignore_with`)){if(typeof e.ignore_with!=`string`)throw Error(`ignore_with must be a string, not ${typeof e.ignore_with}.`);if(e.ignore_with.startsWith(`_`))throw Error(`ignore_with cannot start with an underscore.`)}if(Object.hasOwn(e,`strict`)&&typeof e.strict!=`boolean`)throw Error(`Strict config must be a boolean, not ${typeof e.strict}.`);if(Object.hasOwn(e,`tag_wrap`)&&typeof e.tag_wrap!=`number`)throw Error(`tag_wrap config must be a number, not ${typeof e.tag_wrap}.`);if(Object.hasOwn(e,`trim`)&&(!Array.isArray(e.trim)||!e.trim?.every(e=>typeof e==`string`)))throw Error(`Trim config must be an array of strings.`);return tt(t,e)},dt=(e,t,n)=>{let r=e.trim().split(/\s+/);if(r.length===0||r.length===1&&r[0]===``)return``;let i=[],a=``,o=n;return r.forEach(e=>{if(e===``)return;if(e.length>=t){a!==``&&i.push(i.length===0?n+a:o+a),i.push(i.length===0?n+e:o+e),a=``;return}let r=a===``?e:a+` `+e;r.length<=t?a=r:(a!==``&&i.push(i.length===0?n+a:o+a),a=e)}),a!==``&&i.push(i.length===0?n+a:o+a),rt(i.join(`
|
|
20
20
|
`))};function ft(e){Z({ignored:!0});let t=X().config,n=e,r=new Map,i=0;for(let e of t.ignore){let t=e.replace(/[-\/\\^$*+?.()|[\]{}]/g,`\\$&`),a=RegExp(`(<\\s*${t}[^>]*>)(.*?)(<\\s*\/\\s*${t}\\s*>)`,`gs`),o,s=[];for(;(o=a.exec(n))!==null;){let e=`___HTMLFY_SPECIAL_IGNORE_MARKER_${i++}___`;r.set(e,o[2]),s.push({start:o.index+o[1].length,end:o.index+o[1].length+o[2].length,marker:e})}for(let e=s.length-1;e>=0;e--){let t=s[e];n=n.substring(0,t.start)+t.marker+n.substring(t.end)}}return{html_with_markers:n,extracted_map:r}}function pt(e,t){Z({ignored:!1});let n=e;for(let[e,r]of t)n=n.split(e).join(r);return n}var mt=RegExp(`<(${Ze.join(`|`)})(?:\\s(?:[^/>]|/(?!>))*)*>`,`g`);function ht(e){let{constants:t}=X();return e.replace(mt,e=>e.replace(/>$/,t.SELF_CLOSING_PLACEHOLDER))}function gt(e){let{constants:t}=X();return e.replace(t.SELF_CLOSING_PLACEHOLDER,`>`)}var _t=(e,t=!1)=>(e=e.replace(/<\s*textarea[^>]*>((.|\n)*?)<s*\/\s*textarea\s*>/g,(e,t)=>e.replace(t,e=>e.replace(/</g,`<`).replace(/>/g,`>`).replace(/"/g,`"`).replace(/'/g,`'`).replace(/\n/g,` `).replace(/\r/g,` `).replace(/\s/g,` `))),t&&(e=e.replace(/<\s*textarea[^>]*>(.|\n)*?<\s*\/\s*textarea\s*>/g,e=>e.replace(/\s+/g,` `).replace(/\s>/g,`>`).replace(/>\s/g,`>`).replace(/\s</g,`<`).replace(/<\s/g,`<`).replace(/<\/\s/g,`</`).replace(/class=["']\s/g,e=>e.replace(/\s/g,``)).replace(/(class=.*)\s(["'])/g,`$1$2`))),e),vt=e=>e=e.replace(/<textarea[^>]*>((.|\n)*?)<\/textarea>/g,(e,t)=>e.replace(t,e=>(e=e.replace(/</g,`<`).replace(/>/g,`>`).replace(/"/g,`"`).replace(/'/g,`'`).replace(/ /g,`
|
|
21
|
-
`).replace(/ /g,`\r`).replace(/ /g,` `).replace(/\s+/g,` `),e))),yt,bt=(e,t)=>{let n=!1,{checked_html:r,ignored:i,constants:a}=X();if(!r&&!$e(e))return e;let o=X().config.ignore.length>0;if(!i&&o){let{html_with_markers:t,extracted_map:r}=ft(e);e=t,yt=r,n=!0}return e=_t(e,!0),e=e.replace(/\n|\t/g,``),e=e.replace(/>\s+</g,`><`),e=e.replace(/ {2,}/g,` `),e=e.replace(/(\S) (<[a-zA-Z][a-zA-Z0-9_:-]*)/g,`$1___MINIFY-PROTECTED-SPACE___$2`),e=e.replace(/(<\/[a-zA-Z][a-zA-Z0-9_:-]*>) (\S)/g,`$1___MINIFY-PROTECTED-SPACE___$2`),e=e.replace(/ >/g,`>`),e=e.replace(/ </g,`<`),e=e.replace(/> /g,`>`),e=e.replace(/< /g,`<`),e=e.replace(/<\s+\//g,`</`),e=e.replace(/<\/\s+/g,`</`),e=e.replace(RegExp(`___MINIFY-PROTECTED-SPACE___`,`g`),` `),e=e.replace(/ = /g,`=`),e=e.replace(/([a-zA-Z0-9_-]+)=(['"])(.*?)\2/g,(e,t,n,r)=>`${t}=${n}${r.trim()}${n}`),e=e.trim(),e=vt(e),n&&(e=pt(e,yt)),e},Q={line:[]},xt,St=e=>{Q.line=[];let t=-1;e.replace(/(<[^>]+>)|([^<]+)/g,(e,n,r)=>(n?Q.line.push({type:`tag`,value:e}):r&&r.trim().length>0&&Q.line.push({type:`text`,value:e}),t++,`\n[#-# : ${t} : ${e} : #-#]\n`))},Ct=()=>{let{config:e,constants:t}=X(),n=` `.repeat(e.tab_size),r=e.tag_wrap,i=e.content_wrap,a=e.strict,o=``,s=[],c=/<[A-Za-z]+\b[^>]*(?:.|\n)*?\/?>/g,l=/\s{1}[A-Za-z
|
|
21
|
+
`).replace(/ /g,`\r`).replace(/ /g,` `).replace(/\s+/g,` `),e))),yt,bt=(e,t)=>{let n=!1,{checked_html:r,ignored:i,constants:a}=X();if(!r&&!$e(e))return e;let o=X().config.ignore.length>0;if(!i&&o){let{html_with_markers:t,extracted_map:r}=ft(e);e=t,yt=r,n=!0}return e=_t(e,!0),e=e.replace(/\n|\t/g,``),e=e.replace(/>\s+</g,`><`),e=e.replace(/ {2,}/g,` `),e=e.replace(/(\S) (<[a-zA-Z][a-zA-Z0-9_:-]*)/g,`$1___MINIFY-PROTECTED-SPACE___$2`),e=e.replace(/(<\/[a-zA-Z][a-zA-Z0-9_:-]*>) (\S)/g,`$1___MINIFY-PROTECTED-SPACE___$2`),e=e.replace(/ >/g,`>`),e=e.replace(/ </g,`<`),e=e.replace(/> /g,`>`),e=e.replace(/< /g,`<`),e=e.replace(/<\s+\//g,`</`),e=e.replace(/<\/\s+/g,`</`),e=e.replace(RegExp(`___MINIFY-PROTECTED-SPACE___`,`g`),` `),e=e.replace(/ = /g,`=`),e=e.replace(/([a-zA-Z0-9_-]+)=(['"])(.*?)\2/g,(e,t,n,r)=>`${t}=${n}${r.trim()}${n}`),e=e.trim(),e=vt(e),n&&(e=pt(e,yt)),e},Q={line:[]},xt,St=e=>{Q.line=[];let t=-1;e.replace(/(<[^>]+>)|([^<]+)/g,(e,n,r)=>(n?Q.line.push({type:`tag`,value:e}):r&&r.trim().length>0&&Q.line.push({type:`text`,value:e}),t++,`\n[#-# : ${t} : ${e} : #-#]\n`))},Ct=()=>{let{config:e,constants:t}=X(),n=` `.repeat(e.tab_size),r=e.tag_wrap,i=e.content_wrap,a=e.strict,o=``,s=[],c=/<[A-Za-z]+\b[^>]*(?:.|\n)*?\/?>/g,l=/\s{1}[A-Za-z:@#*?$()\[\].-]+(?:=".*?")?/g;Q.line.forEach((e,u)=>{let d=e.value,f=d.startsWith(`___HTMLFY_SPECIAL_IGNORE_MARKER_`),p=0,m=Q.line[u-1],h=m?.value??``;o+=`0`,u===0&&p++,d.trim().startsWith(`</`)&&p++,h.trim().startsWith(`<!doctype`)&&p++,h.trim().startsWith(`<!--`)&&p++,(h.trim().endsWith(`/>`)||h.trim().endsWith(t.SELF_CLOSING_PLACEHOLDER))&&p++,h.trim().startsWith(`</`)&&p++,m?.type===`text`&&p++;let g=Math.max(0,o.length-p);if(o=o.substring(0,g),e.type===`text`&&/^[!,;\.]/.test(d)){if(d.length===1){s[s.length-1]=s.at(-1)+d;return}else if(s[s.length-1]=s.at(-1)+d.charAt(0),d=d.slice(1).trim(),d.length===0)return}let _=n.repeat(g);if(f)s.push(d);else{if(a&&d.trim().startsWith(`<!--`))return;let t=d;if(t=gt(t),e.type===`text`&&i>0&&t.length>=i)t=dt(t,i,_);else if(r>0&&t.length>r&&c.test(t)){c.lastIndex=0,l.lastIndex=0;let e=t.split(l).filter(Boolean);if(e.length>=2){let r=t.matchAll(l),i=_+n,o=_+e[0]+`
|
|
22
22
|
`;for(let e of r){let t=e[0].trim();o+=i+t+`
|
|
23
23
|
`}let s=e[0].match(/<([A-Za-z_:-]+)/),c=s?s[1]:``,u=e.at(-1)?.endsWith(`/>`)&&Ze.includes(c),d=e[1].trim(),f=_+(a&&u?` `:``);o+=f+d,t=o}else t=_+t}else t=_+t;s.push(t)}});let u=s.join(`
|
|
24
24
|
`);return r>0&&(u=nt(u)),i>0&&RegExp(`/\\n[ ]*[^\\n]*${t.CONTENT_IGNORE_PLACEHOLDER}[^\\n]*\\n/`).test(u)&&(u=it(u)),u=u.replace(/<(?<Element>[^>\s]+)[^>]*>[^<]*?[^><\/\s][^<]*?<\/\k<Element>>|<script[^>]*>[\s]*<\/script>|<([\w:\._-]+)([^>]*)><\/\2>|<([\w:\._-]+)([^>]*)>[\s]+<\/\4>/g,e=>e.includes(t.SELF_CLOSING_PLACEHOLDER)||e.includes(t.CONTENT_IGNORE_PLACEHOLDER)?e:e.replace(/\n|\t|\s{2,}/g,``)),i>0&&(u=ct(u)),r>0&&(u=st(u)),a&&(u=u.replace(/\s\/>|\/>/g,`>`)),u.startsWith(`
|