From 079fabc0e81bb70b2f2c52e7fb1ddfedb62c5568 Mon Sep 17 00:00:00 2001 From: Pascal Garber Date: Thu, 22 Jun 2023 11:31:18 +0200 Subject: [PATCH] Add favicons and custom JSX types --- .../typedoc-theme-client/scripts/module.ts | 4 +- .../types/jsx/jsx-member-signatures-props.ts | 2 +- .../scripts/types/jsx/jsx-navbar-props.ts | 2 +- .../types/jsx/jsx-navigation-primary-props.ts | 2 +- .../jsx/jsx-navigation-secondary-props.ts | 2 +- .../scripts/types/jsx/jsx-search-props.ts | 2 +- .../scripts/types/module-options.ts | 9 +- packages/typedoc-theme/assets/main.bundle.js | 52 ++-- .../typedoc-theme/assets/main.bundle.js.map | 2 +- packages/typedoc-theme/package.json | 1 + packages/typedoc-theme/src/index.ts | 1 + packages/typedoc-theme/src/jsx/index.ts | 5 + .../src/jsx/intrinsic-elements.ts | 26 ++ .../typedoc-theme/src/jsx/jsx-children.ts | 5 + packages/typedoc-theme/src/jsx/jsx-element.ts | 4 + packages/typedoc-theme/src/jsx/jsx.ts | 62 +++++ .../typedoc-theme/src/layouts/default.tsx | 54 ++++- packages/typedoc-theme/src/lib.tsx | 65 ++--- .../typedoc-theme/src/partials/analytics.tsx | 2 +- .../src/partials/anchor-icon.tsx | 2 +- .../typedoc-theme/src/partials/breadcrumb.tsx | 36 +-- .../typedoc-theme/src/partials/comment.tsx | 4 +- .../typedoc-theme/src/partials/footer.tsx | 2 +- .../typedoc-theme/src/partials/header.tsx | 2 +- .../typedoc-theme/src/partials/hierarchy.tsx | 2 +- packages/typedoc-theme/src/partials/index.tsx | 12 +- .../src/partials/member.declaration.tsx | 4 +- .../src/partials/member.getterSetter.tsx | 2 +- .../src/partials/member.reference.tsx | 2 +- .../src/partials/member.signature.body.tsx | 4 +- .../src/partials/member.signature.title.tsx | 6 +- .../src/partials/member.signatures.tsx | 2 +- .../src/partials/member.sources.tsx | 68 +++--- .../typedoc-theme/src/partials/member.tsx | 2 +- .../src/partials/members.group.tsx | 2 +- .../typedoc-theme/src/partials/members.tsx | 2 +- .../typedoc-theme/src/partials/navigation.tsx | 12 +- .../typedoc-theme/src/partials/parameter.tsx | 2 +- .../typedoc-theme/src/partials/toolbar.tsx | 2 +- packages/typedoc-theme/src/partials/type.tsx | 225 ++++++++++-------- .../src/partials/typeAndParent.tsx | 10 +- .../src/partials/typeParameters.tsx | 2 +- .../typedoc-theme/src/templates/index.tsx | 4 +- .../src/templates/reflection.tsx | 4 +- packages/typedoc-theme/src/theme.tsx | 13 +- packages/typedoc-theme/src/types/index.ts | 35 +-- packages/typedoc-theme/src/types/internal.ts | 34 +++ yarn.lock | 3 +- 48 files changed, 490 insertions(+), 312 deletions(-) create mode 100644 packages/typedoc-theme/src/jsx/index.ts create mode 100644 packages/typedoc-theme/src/jsx/intrinsic-elements.ts create mode 100644 packages/typedoc-theme/src/jsx/jsx-children.ts create mode 100644 packages/typedoc-theme/src/jsx/jsx-element.ts create mode 100644 packages/typedoc-theme/src/jsx/jsx.ts create mode 100644 packages/typedoc-theme/src/types/internal.ts diff --git a/packages/typedoc-theme-client/scripts/module.ts b/packages/typedoc-theme-client/scripts/module.ts index b4a618367..add30cbb8 100644 --- a/packages/typedoc-theme-client/scripts/module.ts +++ b/packages/typedoc-theme-client/scripts/module.ts @@ -3,9 +3,9 @@ import * as binders from "./binders/index.js"; import * as formatters from "./formatters/index.js"; import * as services from "./services/index.js"; import * as components from "./components/index.js"; -import { GjsifyTypedocModuleOptions } from "./types/index.js"; +import { TypedocModuleOptions } from "./types/index.js"; -export const gjsifyTypedocModule: RibaModule = { +export const gjsifyTypedocModule: RibaModule = { binders, services, formatters, diff --git a/packages/typedoc-theme-client/scripts/types/jsx/jsx-member-signatures-props.ts b/packages/typedoc-theme-client/scripts/types/jsx/jsx-member-signatures-props.ts index eff26105f..908fb1b9f 100644 --- a/packages/typedoc-theme-client/scripts/types/jsx/jsx-member-signatures-props.ts +++ b/packages/typedoc-theme-client/scripts/types/jsx/jsx-member-signatures-props.ts @@ -1,3 +1,3 @@ -import type { JsxHtmlGlobalProps } from "@ribajs/jsx"; +import type { JsxHtmlGlobalProps } from "@ribajs/jsx/src/types/index"; export type JsxTsdMemberSignaturesProps = JsxHtmlGlobalProps; diff --git a/packages/typedoc-theme-client/scripts/types/jsx/jsx-navbar-props.ts b/packages/typedoc-theme-client/scripts/types/jsx/jsx-navbar-props.ts index 3c7b49ec2..0ab4c5095 100644 --- a/packages/typedoc-theme-client/scripts/types/jsx/jsx-navbar-props.ts +++ b/packages/typedoc-theme-client/scripts/types/jsx/jsx-navbar-props.ts @@ -1,3 +1,3 @@ -import type { JsxHtmlGlobalProps } from "@ribajs/jsx"; +import type { JsxHtmlGlobalProps } from "@ribajs/jsx/src/types/index"; export type JsxTsdNavbarProps = JsxHtmlGlobalProps; diff --git a/packages/typedoc-theme-client/scripts/types/jsx/jsx-navigation-primary-props.ts b/packages/typedoc-theme-client/scripts/types/jsx/jsx-navigation-primary-props.ts index 7a9330849..b8d050905 100644 --- a/packages/typedoc-theme-client/scripts/types/jsx/jsx-navigation-primary-props.ts +++ b/packages/typedoc-theme-client/scripts/types/jsx/jsx-navigation-primary-props.ts @@ -1,4 +1,4 @@ -import type { JsxHtmlGlobalProps } from "@ribajs/jsx"; +import type { JsxHtmlGlobalProps } from "@ribajs/jsx/src/types/index"; export interface JsxTsdNavigationPrimaryProps extends JsxHtmlGlobalProps { type: "list" | "dropdown"; diff --git a/packages/typedoc-theme-client/scripts/types/jsx/jsx-navigation-secondary-props.ts b/packages/typedoc-theme-client/scripts/types/jsx/jsx-navigation-secondary-props.ts index 7c0d03b0b..a3e278306 100644 --- a/packages/typedoc-theme-client/scripts/types/jsx/jsx-navigation-secondary-props.ts +++ b/packages/typedoc-theme-client/scripts/types/jsx/jsx-navigation-secondary-props.ts @@ -1,3 +1,3 @@ -import type { JsxHtmlGlobalProps } from "@ribajs/jsx"; +import type { JsxHtmlGlobalProps } from "@ribajs/jsx/src/types/index"; export type JsxTsdNavigationSecondaryProps = JsxHtmlGlobalProps; diff --git a/packages/typedoc-theme-client/scripts/types/jsx/jsx-search-props.ts b/packages/typedoc-theme-client/scripts/types/jsx/jsx-search-props.ts index 48eb48715..c28d3acb5 100644 --- a/packages/typedoc-theme-client/scripts/types/jsx/jsx-search-props.ts +++ b/packages/typedoc-theme-client/scripts/types/jsx/jsx-search-props.ts @@ -1,4 +1,4 @@ -import type { JsxHtmlGlobalProps } from "@ribajs/jsx"; +import type { JsxHtmlGlobalProps } from "@ribajs/jsx/src/types/index"; export interface JsxTsdSearchProps extends JsxHtmlGlobalProps { /** The base url of the remote search server */ diff --git a/packages/typedoc-theme-client/scripts/types/module-options.ts b/packages/typedoc-theme-client/scripts/types/module-options.ts index 8b5b9852d..d59ee818c 100644 --- a/packages/typedoc-theme-client/scripts/types/module-options.ts +++ b/packages/typedoc-theme-client/scripts/types/module-options.ts @@ -1,5 +1,4 @@ -export interface GjsifyTypedocModuleOptions { - /** The base url of the remote search server */ - serverBaseUrl?: string; - } - \ No newline at end of file +export interface TypedocModuleOptions { + /** The base url of the remote search server */ + serverBaseUrl?: string; +} diff --git a/packages/typedoc-theme/assets/main.bundle.js b/packages/typedoc-theme/assets/main.bundle.js index e4ae0d3f1..2fd6407d2 100644 --- a/packages/typedoc-theme/assets/main.bundle.js +++ b/packages/typedoc-theme/assets/main.bundle.js @@ -1,16 +1,16 @@ -var Jh=Object.defineProperty;var Zh=(n,t,e)=>t in n?Jh(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e;var a=(n,t,e)=>(Zh(n,typeof t!="symbol"?t+"":t,e),e);const Ao=()=>{const n="0123456789ABCDEF";let t="#";for(let e=0;e<6;e++)t+=n[Math.floor(Math.random()*16)];return t},ed=(n,...t)=>{const e=[];n.color?(n.namespace?e.push(`%c[${n.namespace}] ${n.mode.toUpperCase()}: `):e.push(`%c${n.mode.toUpperCase()}: `),e.push(`color: ${n.color}`)):n.namespace?e.push(`[${n.namespace}] ${n.mode.toUpperCase()}: `):e.push(`${n.mode.toUpperCase()}: `),e.push(...t),console[n.mode](...e)},Mi="base64:";const td=/^'.*'$|^".*"$/,sd=(n,t)=>{for(let e=0;e{const n={},t=new Promise((e,s)=>{n.resolve=e,n.reject=s});return n.promise=t,n},id=(n,t=100)=>{let e;return(...s)=>{clearTimeout(e),e=setTimeout(()=>n(...s),t)}},nd=(n,t=100)=>{let e,s;const i=new Promise((o,l)=>{e=o,s=l});let r;return(...o)=>(r||(r=id(()=>{try{e(n(...o)),r=void 0}catch(l){s(l)}},t)),r(...o),i)},rd=n=>{let t=null,e,s,i=new Promise((r,o)=>{e=r,s=o});return(...r)=>(t&&cancelAnimationFrame(t),t=window.requestAnimationFrame(()=>{try{e(n(...r))}catch(o){s(o)}t=null,i=new Promise((o,l)=>{e=o,s=l})}),i)},Oe=(n,t)=>typeof t=="number"?nd(n,t):rd(n),jt=(n,t=100)=>{let e=null,s,i,r=new Promise((o,l)=>{s=o,i=l});return(...o)=>{if(e===null){e=window.setTimeout(()=>{e=null,r=new Promise((l,c)=>{s=l,i=c})},t);try{s(n(...o))}catch(l){i(l)}}return r}},Gi=(n,t=2,e=!0)=>{const s=JSON.stringify(n,null,t);return e&&s?s.replace(/'/g,"'"):s},Xi=n=>{let t=null;if(!n||!hr(n))return t;if(Ka(n))t=JSON.parse(n)||null;else try{t=JSON.parse(n.replace(/'/g,'"'))||null}catch(e){console.warn(`Can't parse json string of "${n}" `,e)}return t},hr=n=>!n||typeof n!="string"?!1:(n=n.trim(),n.charAt(0)==="{"&&n.charAt(n.length-1)==="}"||n.charAt(0)==="["&&n.charAt(n.length-1)==="]"),od=n=>!n||typeof n!="string"?!1:n.startsWith(Mi),ad=n=>{let t;return X(n)?t=JSON.stringify(n,null,0):t=n.toString(),Mi+btoa(encodeURIComponent(t))},ld=n=>{if(typeof n!="string")return"Not a base64 string!";n.startsWith(Mi)&&(n=n.substring(Mi.length));const t=atob(n);let e;try{e=decodeURIComponent(t)}catch{e=t}return Ze(e,!1).value},Ka=n=>{if(!n||!hr(n))return!1;try{const t=JSON.parse(n);return!!(Array.isArray(t)||typeof t=="object")}catch{return!1}},Ze=(n,t=!1)=>{let e=0,s=n;if(n===void 0)return{type:e,value:void 0};if(n===null)return{type:e,value:null};if(td.test(n))s=Ze(n.slice(1,-1),t).value;else if(n==="true")s=!0;else if(n==="false")s=!1;else if(n==="null")s=null;else if(n==="undefined")s=void 0;else if(n.startsWith("http://")||n.startsWith("https://"))s=n;else if(n==="")t?s=!0:s="";else if(!isNaN(Number(n)))s=Number(n),s>=Number.MAX_SAFE_INTEGER&&(s=n);else if(od(s))s=ld(s);else if(hr(s)){const i=Xi(s);s=i||s}else e=1;return{type:e,value:s}},Ga=n=>typeof n>"u",mt=n=>!Ga(n),X=n=>mt(n)&&typeof n=="object"&&n!==null,Ue=n=>n!=null&&n.toString?n.toString():void 0,cd=n=>n?parseFloat(n):void 0,je=n=>!isNaN(parseFloat(n))&&!isNaN(n-0),Ot=n=>typeof n=="boolean",bt=n=>typeof n=="string",xs=n=>{if(typeof n=="number")return n;const t=n.replace(/[^-\d.]/g,"");return je(t)?Number(t):0},hd=n=>n.replace(/[&<>'"]/g,t=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[t]),dd=n=>(n=n.replace(/[`~!@#$%^&*()_|+\-=?;:'",.<>{}[\]\\/]/gi,""),n),ud=n=>(n=n.replace(/ä/g,"ae").replace(/ö/g,"oe").replace(/ü/g,"ue").replace(/ß/g,"ss").replace(/Ä/g,"Ae").replace(/Ö/g,"Oe").replace(/Ü/g,"Üe"),n),pd=n=>(n=n.replace(/\s\s+/g," "),n),fd=n=>(n=n.trim(),n=n.toLowerCase(),n=pd(n),n=dd(n),n=ud(n),n=n.replace(/ /g,"-"),n),Ri=n=>{const t=document.createElement("DIV");return t.innerHTML=n,t.textContent||t.innerText||""},ke=n=>n.replace(/-([a-z0-9])/g,t=>t[1].toUpperCase()),md=n=>n.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`),gd=n=>typeof n!="string"?"":n.charAt(0).toUpperCase()+n.slice(1),Tt=(n={},t={},...e)=>{const s=i=>{for(const r in i)Object.hasOwnProperty.bind(i)(r)&&(n.deep&&Object.prototype.toString.call(i[r])==="[object Object]"?t[r]=Tt(n,t[r],i[r]):n.keepValues?typeof t[r]>"u"&&(t[r]=i[r]):n.onlyDefined?typeof i[r]<"u"&&(t[r]=i[r]):n.mergeArrays&&Array.isArray(t[r])&&Array.isArray(i[r])?t[r]=[...t[r],...i[r]]:t[r]=i[r])};for(let i=0;iArray.isArray(t)?n?t.map(e=>Xa(!0,e)):t.slice():X(t)?Tt({deep:n},{},t):t;const Ja=(n,t,e)=>{if(!t)throw new Error("Can't set attribute of "+t);const s=n.getAttribute(t);let i,r=!1;switch(typeof e){case"string":case"number":case"boolean":i=String(e);break;case"undefined":i=void 0;case"object":e===null?i=null:i=Gi(e,0);break;default:i=String(e);break}return i==null?(n.removeAttribute(t),r=!0):s!==i&&(n.setAttribute(t,i),r=!0),{name:t,newValue:i,oldValue:s,changed:r}},To=n=>{const t=Xa(!1,n.dataset);for(const e in t)t[e]&&(t[e]=Ze(t[e],!0).value);return t},ne=n=>{var e;if(!n.hasChildNodes())return!1;const t=n.childNodes;return!(t.length===1&&t[0].nodeType===3&&(!t[0].nodeValue||((e=t[0].nodeValue)==null?void 0:e.trim())===""))},Is=n=>{const t=[];if(n.type==="checkbox")return n.checked;if(n.type==="select-multiple"){const e=n.options;for(const s in e)if(e[s]){const i=e[s];i.selected&&t.push(i.value)}return t}else return n.hasAttribute&&n.hasAttribute("contenteditable")?n.innerHTML:n.value},Za=async n=>new Promise(t=>{let e;const s=()=>{e!==void 0&&clearTimeout(e),e=setTimeout(()=>{t()},100)};n.removeEventListener("scroll",s),n.addEventListener("scroll",s,{passive:!0}),s()}),Zt=async(n,t=0,e=window,s="vertical",i="smooth")=>{e||(e=window);const r=Za(e);let o=0,l=0;if(e.document)if(s==="vertical"){const c=e.scrollY||e.pageYOffset;o=Math.round(n.getBoundingClientRect().top+c-t)}else{const c=e.scrollX||e.pageXOffset;l=Math.round(n.getBoundingClientRect().left+c-t)}else if(s==="vertical"){const c=xs(window.getComputedStyle(e).marginTop);o=Math.round(n.offsetTop-t-c)}else{const c=xs(window.getComputedStyle(e).marginLeft);l=Math.round(n.offsetLeft-t-c)}return e.scroll({behavior:i,left:l,top:o}),r},Co=n=>{if(n.document){const t=n,e=t.document;return t.scrollMaxY||Math.max(e.body.scrollHeight,e.body.offsetHeight,e.documentElement.clientHeight,e.documentElement.scrollHeight,e.documentElement.offsetHeight,0)}return n.scrollHeight},Lo=n=>{if(n.document){const t=n,e=t.document;return t.scrollMaxX||Math.max(e.body.scrollWidth,e.body.offsetWidth,e.documentElement.clientWidth,e.documentElement.scrollWidth,e.documentElement.offsetWidth)}return n.scrollWidth},dr=async(n,t,e="vertical",s="smooth")=>{var l,c;let i,r;if(!n)return;const o=Za(n);if(e==="vertical"||e==="both")switch(t){case"start":i=0;break;case"end":i=Co(n);break;case"center":i=Co(n),i&&(i/=2,n.document?i-=(((l=n.visualViewport)==null?void 0:l.height)||0)/2:i-=n.clientHeight/2);break;default:i=t;break}if(e==="horizontal"||e==="both")switch(t){case"start":r=0;break;case"end":r=Lo(n);break;case"center":r=Lo(n),r&&(r/=2,n.document?r-=(((c=n.visualViewport)==null?void 0:c.width)||0)/2:r-=n.clientWidth/2);break;default:r=t;break}return n.scroll({behavior:s,top:i,left:r}),o},Ji=n=>n.target||n.currentTarget||n.relatedTarget||n.delegateTarget||n.fromElement,ur=()=>{const n=Math.max(document.documentElement?document.documentElement.clientWidth:0,window.innerWidth||0);return{h:Math.max(document.documentElement?document.documentElement.clientHeight:0,window.innerHeight||0),w:n}},vd=(n,t={})=>{if(!n)return!1;const e=n.getBoundingClientRect(),s=ur();t.top||(t.top=0),t.left||(t.left=0),t.bottom||(t.bottom=0),t.right||(t.right=0),t.top+=s.h-e.height,t.left+=s.w-e.width;const i=e.top+e.height>=t.bottom&&e.bottom-e.height<=t.top,r=e.left+e.width>=t.right&&e.right-e.width<=t.left;return i&&r},bd=n=>{if(!n||typeof n!="function")return new Error("The callback is required!");const t=e=>{e!=null&&e.fake||document.readyState!=="loading"&&(n(),document.attachEvent&&document.detachEvent("onreadystatechange",t),document.removeEventListener("DOMContentLoaded",t))};document.attachEvent&&document.attachEvent("onreadystatechange",t),document.addEventListener&&document.addEventListener("DOMContentLoaded",t),t()},Ed=async(n,t,e=!0,s=!0)=>await new Promise((r,o)=>{let l=document.getElementById(t);if(l){if(console.warn("script already loaded, do nothing."),l.hasAttribute("loaded"))return r(l)}else l=document.createElement("script"),l.type="text/javascript",l.id=t,l.src=n,e&&(l.async=!0),s&&(l.defer=!0),(document.head||document.getElementsByTagName("head")[0]).appendChild(l);l.readyState&&(l.onreadystatechange=function(){(l.readyState==="loaded"||l.readyState==="complete")&&(l.onreadystatechange=null,l==null||l.setAttribute("loaded","true"),r(l))}),l.addEventListener("load",()=>{l==null||l.setAttribute("loaded","true"),r(l)}),l.addEventListener("error",(...c)=>{const h=new Error("Error on load script "+(l==null?void 0:l.src));console.error(h),console.error(...c),o(h)})}),el=n=>{do n+=~~(Math.random()*1e3);while(document.getElementById(n));return n},Xe=(n,t=!1,e=!1)=>{const s=typeof n=="string"?n:n.localName,i=s.includes("-");if(i&&t&&customElements){const r=customElements.get(s);return r?e?r===n.constructor:!0:!1}return i},Dn=async n=>(await customElements.whenDefined(n.localName),n),ko=n=>{if(!n)return-1;let t=0;do t++,n=n.previousElementSibling;while(n);return t},yd=typeof process<"u"&&process.versions!=null&&process.versions.node!=null;!yd&&typeof WorkerGlobalScope<"u"&&typeof importScripts=="function"&&navigator instanceof WorkerNavigator;typeof window<"u"&&window.name==="nodejs"||typeof navigator<"u"&&(navigator.userAgent.includes("Node.js")||navigator.userAgent.includes("jsdom"));typeof Deno<"u"&&typeof Deno.core<"u";const tl={};let bn=!1;const xo="setImmediate$"+Math.random()+"$",wd=function(n){n.source===window&&typeof n.data=="string"&&n.data.indexOf(xo)===0&&sl(+n.data.slice(xo.length))};window&&window.addEventListener("message",wd,!1);function _d(n){delete tl[n]}function Sd(n){const t=n.callback,e=n.args;t(...e)}function sl(n){if(bn)setTimeout(sl,0,n);else{const t=tl[n];if(t){bn=!0;try{Sd(t)}finally{_d(n),bn=!1}}}}const Ad=n=>{const t=document.createElement("textarea");t.value=n,t.style.top="0",t.style.left="0",t.style.position="fixed",document.body.appendChild(t),t.focus(),t.select();try{const s=document.execCommand("copy")?"successful":"unsuccessful";console.log(`Fallback: Copying text command was ${s}: ${n}`)}catch(e){console.error("Fallback: Oops, unable to copy",e)}document.body.removeChild(t)},Td=async n=>{if(!navigator.clipboard){Ad(n);return}try{await navigator.clipboard.writeText(n),console.log("Copying to clipboard was successful: "+n)}catch(t){console.error("Could not copy text: ",t)}},il=()=>{const n=navigator.userAgent,t=window.navigator.platform,e={windows7:/Windows NT 6.1/,windows8:/Windows NT 6.2/,windows81:/Windows NT 6.3/,windows10:/Windows NT 10.0/,windows:/windows/i,windowsPhone:/trident/i,android:/android/i,ios:/(ipad|iphone|ipod)/i,linux:/(linux)/i,unix:/(openbsd|freebsd|netbsd)/i,osxCatalina:/macintosh.+10(_|\.)15/i,osxBigSur:/macintosh.+((10(_|\.)16)|(11(_|\.)))/i,osx:/macintosh/i,mac:/mac/i},s={linux:/Linux/i,unix:/(FreeBSD|OpenBSD|X11|SunOS)/i,webOS:/webOS/i,playstation3:/playstation 3/i,playstation4:/playstation 4/i,PlaystationPortable:/psp/i,newNintendo3Ds:/new nintendo 3ds/i,nintendoDsi:/nintendo dsi/i,nintendo3Ds:/nintendo 3ds/i,nintendoWii:/nintendo wii/i,nintendoWiiU:/nintendo wiiu/i,palmos:/palmos/i,symbian:/(nokia_series_40|s60|symbian)/i};for(const i of Object.keys(e))if(e[i].test(n))return i==="mac"&&"ontouchend"in document?"ios":i;for(const i of Object.keys(s))if(s[i].test(t))return i;return"Unknown"},nl=()=>{const n=il();let t=!1,e=!1,s=!1;switch(n){case"windows":case"windows10":case"windows7":case"windows8":case"windows81":case"osxBigSur":case"osxCatalina":case"osx":case"mac":case"linux":case"unix":e=!0;break;case"ios":case"android":case"windowsPhone":case"symbian":t=!0;break}return(n.includes("playstation")||n.includes("nintendo"))&&(s=!0),{isMobile:t,isDesktop:e,isGameConsole:s}},Cd=()=>nl().isMobile,Ld=()=>nl().isDesktop,Pe=n=>{if(!n)return window.location;const t=document.createElement("a");return t.href=n,t},Se=n=>{const t=Pe(n),e=Pe().hostname;return t.hostname===e?{url:t.pathname+t.search+t.hash,location:t}:{url:$i(n),location:t}},$i=n=>{const t=Pe(n);return t.protocol+"//"+t.host+t.pathname+t.search+t.hash},Zi=(n,t=!1)=>{if(n){const e=Pe(),s=Pe(n);return t&&e.search!==s.search?!1:e.hostname===s.hostname&&e.pathname===s.pathname}return!1},kd=n=>{if(n){const t=Pe(),e=t.pathname,s=t.hostname,i=Pe(n),r=i.pathname,o=i.hostname;return s===o&&e.startsWith(r)}return!1},En=n=>n.replace(/#.*/,""),Io=(n,t)=>{const e=Pe(t),s=typeof n<"u"?n:e.port,i=e.protocol;if(s!=="")return Number(s);if(i==="http:")return 80;if(i==="https:")return 443},xd=n=>n?new RegExp("^(?:[a-z]+:)?//","i").test(n)||n.startsWith("mailto:")||n.startsWith("tel:")||n.startsWith("fax:"):!1,Id=n=>{if(xd(n)){const t=Pe(),e=t.protocol+"//"+t.hostname;let s=!0;return n.startsWith(e)&&(s=!1),s}return!1};class en{constructor(t){a(this,"elements");this.elements=t}registerAll(t){if(!X(t))throw new Error("Elements to register must be an object of elements");for(const e in t)if(t[e]&&e!=="__esModule"){const s=t[e];this.register(s,e)}return this.elements}}const M=class{constructor(t,e,s){a(this,"keypath");a(this,"callback");a(this,"objectPath");a(this,"obj");a(this,"target");a(this,"key");a(this,"tokens");this.keypath=e,this.callback=s,this.objectPath=[];const i=this.parse();this.key=i.key,this.tokens=i.tokens,this.obj=this.getRootObject(t),this.target=this.realize(),X(this.target)&&M.set(!0,this.key,this.target,this.callback)}static updateOptions(t){if(!t.adapters)throw new Error("adapters are required!");if(t.adapters&&(M.adapters={...M.adapters,...t.adapters},M.interfaces=Object.keys(M.adapters)),M.rootInterface=t.rootInterface||M.interfaces[0],!M.rootInterface)throw new Error("rootInterface is required!")}static tokenize(t,e){const s=[];let i={i:e,path:""},r,o;for(r=0;r{t.options.ignore||(this.resetTimeout(),this.components[t.tagName]=this.components[t.tagName]||this.getEmpty(),this.components[t.tagName].components.push(t.component))}),this.events.on("Component:disconnected",t=>{t.options.ignore||(this.resetTimeout(),this.checkStates())}),this.events.on("Component:afterBind",t=>{t.options.ignore||(this.resetTimeout(),this.checkStates())}),this.events.on("Component:error",(t,e)=>{this.onError(t,e)}),this.routerEvents.on("newPageReady",(t,e,s,i,r,o,l)=>{this.debug&&console.debug("newPageReady",t,e,s,"firstPageLoad",l),l||this.reset()})}getState(t){let e=0,s=0;for(const i of this.components[t].components)i.connected&&(e++,i.bound&&s++);return{connected:e,bound:s}}getStates(){const t={};for(const e in this.components){const s=this.getState(e);t[e]={state:s,components:this.components[e].components}}return t}checkStates(){let t=!0;const e=this.getStates();for(const s in e){const i=e[s].state;if(i.connected!==i.bound){t=!1;break}}return t&&!this.allBound&&this.onAllBound(),this.allBound=t,{states:e,allBound:t}}onAllBound(){this.clearTimeout(),this.events.trigger("ComponentLifecycle:allBound",this.components),this.debug&&console.debug("[ComponentLifecycle] All components bound!")}onError(t,e){this.clearTimeout(),console.error(`The component "${e.tagName}" has caused an error:`,t),this.events.trigger("ComponentLifecycle:error",t,e)}onTimeout(){this.clearTimeout();const t=this.getStates();let e=`[ComponentLifecycle] Timeout! {count} component(s) takes too long! +var Ph=Object.defineProperty;var Dh=(n,t,e)=>t in n?Ph(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e;var a=(n,t,e)=>(Dh(n,typeof t!="symbol"?t+"":t,e),e);const wo=()=>{const n="0123456789ABCDEF";let t="#";for(let e=0;e<6;e++)t+=n[Math.floor(Math.random()*16)];return t},Mh=(n,...t)=>{const e=[];n.color?(n.namespace?e.push(`%c[${n.namespace}] ${n.mode.toUpperCase()}: `):e.push(`%c${n.mode.toUpperCase()}: `),e.push(`color: ${n.color}`)):n.namespace?e.push(`[${n.namespace}] ${n.mode.toUpperCase()}: `):e.push(`${n.mode.toUpperCase()}: `),e.push(...t),console[n.mode](...e)},Li="base64:";const Rh=/^'.*'$|^".*"$/,$h=(n,t)=>{for(let e=0;e{const n={},t=new Promise((e,s)=>{n.resolve=e,n.reject=s});return n.promise=t,n},Bh=(n,t=100)=>{let e;return(...s)=>{clearTimeout(e),e=setTimeout(()=>n(...s),t)}},Fh=(n,t=100)=>{let e,s;const i=new Promise((o,l)=>{e=o,s=l});let r;return(...o)=>(r||(r=Bh(()=>{try{e(n(...o)),r=void 0}catch(l){s(l)}},t)),r(...o),i)},Hh=n=>{let t=null,e,s,i=new Promise((r,o)=>{e=r,s=o});return(...r)=>(t&&cancelAnimationFrame(t),t=window.requestAnimationFrame(()=>{try{e(n(...r))}catch(o){s(o)}t=null,i=new Promise((o,l)=>{e=o,s=l})}),i)},xe=(n,t)=>typeof t=="number"?Fh(n,t):Hh(n),Ft=(n,t=100)=>{let e=null,s,i,r=new Promise((o,l)=>{s=o,i=l});return(...o)=>{if(e===null){e=window.setTimeout(()=>{e=null,r=new Promise((l,c)=>{s=l,i=c})},t);try{s(n(...o))}catch(l){i(l)}}return r}},ji=(n,t=2,e=!0)=>{const s=JSON.stringify(n,null,t);return e&&s?s.replace(/'/g,"'"):s},Wi=n=>{let t=null;if(!n||!rr(n))return t;if(ka(n))t=JSON.parse(n)||null;else try{t=JSON.parse(n.replace(/'/g,'"'))||null}catch(e){console.warn(`Can't parse json string of "${n}" `,e)}return t},rr=n=>!n||typeof n!="string"?!1:(n=n.trim(),n.charAt(0)==="{"&&n.charAt(n.length-1)==="}"||n.charAt(0)==="["&&n.charAt(n.length-1)==="]"),Vh=n=>!n||typeof n!="string"?!1:n.startsWith(Li),Uh=n=>{let t;return X(n)?t=JSON.stringify(n,null,0):t=n.toString(),Li+btoa(encodeURIComponent(t))},jh=n=>{if(typeof n!="string")return"Not a base64 string!";n.startsWith(Li)&&(n=n.substring(Li.length));const t=atob(n);let e;try{e=decodeURIComponent(t)}catch{e=t}return Je(e,!1).value},ka=n=>{if(!n||!rr(n))return!1;try{const t=JSON.parse(n);return!!(Array.isArray(t)||typeof t=="object")}catch{return!1}},Je=(n,t=!1)=>{let e=0,s=n;if(n===void 0)return{type:e,value:void 0};if(n===null)return{type:e,value:null};if(Rh.test(n))s=Je(n.slice(1,-1),t).value;else if(n==="true")s=!0;else if(n==="false")s=!1;else if(n==="null")s=null;else if(n==="undefined")s=void 0;else if(n.startsWith("http://")||n.startsWith("https://"))s=n;else if(n==="")t?s=!0:s="";else if(!isNaN(Number(n)))s=Number(n),s>=Number.MAX_SAFE_INTEGER&&(s=n);else if(Vh(s))s=jh(s);else if(rr(s)){const i=Wi(s);s=i||s}else e=1;return{type:e,value:s}},xa=n=>typeof n>"u",dt=n=>!xa(n),X=n=>dt(n)&&typeof n=="object"&&n!==null,Be=n=>n!=null&&n.toString?n.toString():void 0,Wh=n=>n?parseFloat(n):void 0,Ve=n=>!isNaN(parseFloat(n))&&!isNaN(n-0),Lt=n=>typeof n=="boolean",mt=n=>typeof n=="string",ys=n=>{if(typeof n=="number")return n;const t=n.replace(/[^-\d.]/g,"");return Ve(t)?Number(t):0},zh=n=>n.replace(/[&<>'"]/g,t=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[t]),qh=n=>(n=n.replace(/[`~!@#$%^&*()_|+\-=?;:'",.<>{}[\]\\/]/gi,""),n),Qh=n=>(n=n.replace(/ä/g,"ae").replace(/ö/g,"oe").replace(/ü/g,"ue").replace(/ß/g,"ss").replace(/Ä/g,"Ae").replace(/Ö/g,"Oe").replace(/Ü/g,"Üe"),n),Yh=n=>(n=n.replace(/\s\s+/g," "),n),Kh=n=>(n=n.trim(),n=n.toLowerCase(),n=Yh(n),n=qh(n),n=Qh(n),n=n.replace(/ /g,"-"),n),ki=n=>{const t=document.createElement("DIV");return t.innerHTML=n,t.textContent||t.innerText||""},Te=n=>n.replace(/-([a-z0-9])/g,t=>t[1].toUpperCase()),Gh=n=>n.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`),Xh=n=>typeof n!="string"?"":n.charAt(0).toUpperCase()+n.slice(1),yt=(n={},t={},...e)=>{const s=i=>{for(const r in i)Object.hasOwnProperty.bind(i)(r)&&(n.deep&&Object.prototype.toString.call(i[r])==="[object Object]"?t[r]=yt(n,t[r],i[r]):n.keepValues?typeof t[r]>"u"&&(t[r]=i[r]):n.onlyDefined?typeof i[r]<"u"&&(t[r]=i[r]):n.mergeArrays&&Array.isArray(t[r])&&Array.isArray(i[r])?t[r]=[...t[r],...i[r]]:t[r]=i[r])};for(let i=0;iArray.isArray(t)?n?t.map(e=>Ia(!0,e)):t.slice():X(t)?yt({deep:n},{},t):t;const Na=(n,t,e)=>{if(!t)throw new Error("Can't set attribute of "+t);const s=n.getAttribute(t);let i,r=!1;switch(typeof e){case"string":case"number":case"boolean":i=String(e);break;case"undefined":i=void 0;case"object":e===null?i=null:i=ji(e,0);break;default:i=String(e);break}return i==null?(n.removeAttribute(t),r=!0):s!==i&&(n.setAttribute(t,i),r=!0),{name:t,newValue:i,oldValue:s,changed:r}},_o=n=>{const t=Ia(!1,n.dataset);for(const e in t)t[e]&&(t[e]=Je(t[e],!0).value);return t},ie=n=>{var e;if(!n.hasChildNodes())return!1;const t=n.childNodes;return!(t.length===1&&t[0].nodeType===3&&(!t[0].nodeValue||((e=t[0].nodeValue)==null?void 0:e.trim())===""))},ws=n=>{const t=[];if(n.type==="checkbox")return n.checked;if(n.type==="select-multiple"){const e=n.options;for(const s in e)if(e[s]){const i=e[s];i.selected&&t.push(i.value)}return t}else return n.hasAttribute&&n.hasAttribute("contenteditable")?n.innerHTML:n.value},Oa=async n=>new Promise(t=>{let e;const s=()=>{e!==void 0&&clearTimeout(e),e=setTimeout(()=>{t()},100)};n.removeEventListener("scroll",s),n.addEventListener("scroll",s,{passive:!0}),s()}),Gt=async(n,t=0,e=window,s="vertical",i="smooth")=>{e||(e=window);const r=Oa(e);let o=0,l=0;if(e.document)if(s==="vertical"){const c=e.scrollY||e.pageYOffset;o=Math.round(n.getBoundingClientRect().top+c-t)}else{const c=e.scrollX||e.pageXOffset;l=Math.round(n.getBoundingClientRect().left+c-t)}else if(s==="vertical"){const c=ys(window.getComputedStyle(e).marginTop);o=Math.round(n.offsetTop-t-c)}else{const c=ys(window.getComputedStyle(e).marginLeft);l=Math.round(n.offsetLeft-t-c)}return e.scroll({behavior:i,left:l,top:o}),r},So=n=>{if(n.document){const t=n,e=t.document;return t.scrollMaxY||Math.max(e.body.scrollHeight,e.body.offsetHeight,e.documentElement.clientHeight,e.documentElement.scrollHeight,e.documentElement.offsetHeight,0)}return n.scrollHeight},Ao=n=>{if(n.document){const t=n,e=t.document;return t.scrollMaxX||Math.max(e.body.scrollWidth,e.body.offsetWidth,e.documentElement.clientWidth,e.documentElement.scrollWidth,e.documentElement.offsetWidth)}return n.scrollWidth},or=async(n,t,e="vertical",s="smooth")=>{var l,c;let i,r;if(!n)return;const o=Oa(n);if(e==="vertical"||e==="both")switch(t){case"start":i=0;break;case"end":i=So(n);break;case"center":i=So(n),i&&(i/=2,n.document?i-=(((l=n.visualViewport)==null?void 0:l.height)||0)/2:i-=n.clientHeight/2);break;default:i=t;break}if(e==="horizontal"||e==="both")switch(t){case"start":r=0;break;case"end":r=Ao(n);break;case"center":r=Ao(n),r&&(r/=2,n.document?r-=(((c=n.visualViewport)==null?void 0:c.width)||0)/2:r-=n.clientWidth/2);break;default:r=t;break}return n.scroll({behavior:s,top:i,left:r}),o},zi=n=>n.target||n.currentTarget||n.relatedTarget||n.delegateTarget||n.fromElement,ar=()=>{const n=Math.max(document.documentElement?document.documentElement.clientWidth:0,window.innerWidth||0);return{h:Math.max(document.documentElement?document.documentElement.clientHeight:0,window.innerHeight||0),w:n}},Jh=(n,t={})=>{if(!n)return!1;const e=n.getBoundingClientRect(),s=ar();t.top||(t.top=0),t.left||(t.left=0),t.bottom||(t.bottom=0),t.right||(t.right=0),t.top+=s.h-e.height,t.left+=s.w-e.width;const i=e.top+e.height>=t.bottom&&e.bottom-e.height<=t.top,r=e.left+e.width>=t.right&&e.right-e.width<=t.left;return i&&r},Zh=n=>{if(!n||typeof n!="function")return new Error("The callback is required!");const t=e=>{e!=null&&e.fake||document.readyState!=="loading"&&(n(),document.attachEvent&&document.detachEvent("onreadystatechange",t),document.removeEventListener("DOMContentLoaded",t))};document.attachEvent&&document.attachEvent("onreadystatechange",t),document.addEventListener&&document.addEventListener("DOMContentLoaded",t),t()},ed=async(n,t,e=!0,s=!0)=>await new Promise((r,o)=>{let l=document.getElementById(t);if(l){if(console.warn("script already loaded, do nothing."),l.hasAttribute("loaded"))return r(l)}else l=document.createElement("script"),l.type="text/javascript",l.id=t,l.src=n,e&&(l.async=!0),s&&(l.defer=!0),(document.head||document.getElementsByTagName("head")[0]).appendChild(l);l.readyState&&(l.onreadystatechange=function(){(l.readyState==="loaded"||l.readyState==="complete")&&(l.onreadystatechange=null,l==null||l.setAttribute("loaded","true"),r(l))}),l.addEventListener("load",()=>{l==null||l.setAttribute("loaded","true"),r(l)}),l.addEventListener("error",(...c)=>{const h=new Error("Error on load script "+(l==null?void 0:l.src));console.error(h),console.error(...c),o(h)})}),Pa=n=>{do n+=~~(Math.random()*1e3);while(document.getElementById(n));return n},Ge=(n,t=!1,e=!1)=>{const s=typeof n=="string"?n:n.localName,i=s.includes("-");if(i&&t&&customElements){const r=customElements.get(s);return r?e?r===n.constructor:!0:!1}return i},Nn=async n=>(await customElements.whenDefined(n.localName),n),To=n=>{if(!n)return-1;let t=0;do t++,n=n.previousElementSibling;while(n);return t},td=typeof process<"u"&&process.versions!=null&&process.versions.node!=null;!td&&typeof WorkerGlobalScope<"u"&&typeof importScripts=="function"&&navigator instanceof WorkerNavigator;typeof window<"u"&&window.name==="nodejs"||typeof navigator<"u"&&(navigator.userAgent.includes("Node.js")||navigator.userAgent.includes("jsdom"));typeof Deno<"u"&&typeof Deno.core<"u";const Da={};let hn=!1;const Co="setImmediate$"+Math.random()+"$",sd=function(n){n.source===window&&typeof n.data=="string"&&n.data.indexOf(Co)===0&&Ma(+n.data.slice(Co.length))};window&&window.addEventListener("message",sd,!1);function id(n){delete Da[n]}function nd(n){const t=n.callback,e=n.args;t(...e)}function Ma(n){if(hn)setTimeout(Ma,0,n);else{const t=Da[n];if(t){hn=!0;try{nd(t)}finally{id(n),hn=!1}}}}const rd=n=>{const t=document.createElement("textarea");t.value=n,t.style.top="0",t.style.left="0",t.style.position="fixed",document.body.appendChild(t),t.focus(),t.select();try{const s=document.execCommand("copy")?"successful":"unsuccessful";console.log(`Fallback: Copying text command was ${s}: ${n}`)}catch(e){console.error("Fallback: Oops, unable to copy",e)}document.body.removeChild(t)},od=async n=>{if(!navigator.clipboard){rd(n);return}try{await navigator.clipboard.writeText(n),console.log("Copying to clipboard was successful: "+n)}catch(t){console.error("Could not copy text: ",t)}},Ra=()=>{const n=navigator.userAgent,t=window.navigator.platform,e={windows7:/Windows NT 6.1/,windows8:/Windows NT 6.2/,windows81:/Windows NT 6.3/,windows10:/Windows NT 10.0/,windows:/windows/i,windowsPhone:/trident/i,android:/android/i,ios:/(ipad|iphone|ipod)/i,linux:/(linux)/i,unix:/(openbsd|freebsd|netbsd)/i,osxCatalina:/macintosh.+10(_|\.)15/i,osxBigSur:/macintosh.+((10(_|\.)16)|(11(_|\.)))/i,osx:/macintosh/i,mac:/mac/i},s={linux:/Linux/i,unix:/(FreeBSD|OpenBSD|X11|SunOS)/i,webOS:/webOS/i,playstation3:/playstation 3/i,playstation4:/playstation 4/i,PlaystationPortable:/psp/i,newNintendo3Ds:/new nintendo 3ds/i,nintendoDsi:/nintendo dsi/i,nintendo3Ds:/nintendo 3ds/i,nintendoWii:/nintendo wii/i,nintendoWiiU:/nintendo wiiu/i,palmos:/palmos/i,symbian:/(nokia_series_40|s60|symbian)/i};for(const i of Object.keys(e))if(e[i].test(n))return i==="mac"&&"ontouchend"in document?"ios":i;for(const i of Object.keys(s))if(s[i].test(t))return i;return"Unknown"},$a=()=>{const n=Ra();let t=!1,e=!1,s=!1;switch(n){case"windows":case"windows10":case"windows7":case"windows8":case"windows81":case"osxBigSur":case"osxCatalina":case"osx":case"mac":case"linux":case"unix":e=!0;break;case"ios":case"android":case"windowsPhone":case"symbian":t=!0;break}return(n.includes("playstation")||n.includes("nintendo"))&&(s=!0),{isMobile:t,isDesktop:e,isGameConsole:s}},ad=()=>$a().isMobile,ld=()=>$a().isDesktop,Ie=n=>{if(!n)return window.location;const t=document.createElement("a");return t.href=n,t},_e=n=>{const t=Ie(n),e=Ie().hostname;return t.hostname===e?{url:t.pathname+t.search+t.hash,location:t}:{url:xi(n),location:t}},xi=n=>{const t=Ie(n);return t.protocol+"//"+t.host+t.pathname+t.search+t.hash},qi=(n,t=!1)=>{if(n){const e=Ie(),s=Ie(n);return t&&e.search!==s.search?!1:e.hostname===s.hostname&&e.pathname===s.pathname}return!1},cd=n=>{if(n){const t=Ie(),e=t.pathname,s=t.hostname,i=Ie(n),r=i.pathname,o=i.hostname;return s===o&&e.startsWith(r)}return!1},dn=n=>n.replace(/#.*/,""),Lo=(n,t)=>{const e=Ie(t),s=typeof n<"u"?n:e.port,i=e.protocol;if(s!=="")return Number(s);if(i==="http:")return 80;if(i==="https:")return 443},hd=n=>n?new RegExp("^(?:[a-z]+:)?//","i").test(n)||n.startsWith("mailto:")||n.startsWith("tel:")||n.startsWith("fax:"):!1,dd=n=>{if(hd(n)){const t=Ie(),e=t.protocol+"//"+t.hostname;let s=!0;return n.startsWith(e)&&(s=!1),s}return!1};class Qi{constructor(t){a(this,"elements");this.elements=t}registerAll(t){if(!X(t))throw new Error("Elements to register must be an object of elements");for(const e in t)if(t[e]&&e!=="__esModule"){const s=t[e];this.register(s,e)}return this.elements}}const M=class{constructor(t,e,s){a(this,"keypath");a(this,"callback");a(this,"objectPath");a(this,"obj");a(this,"target");a(this,"key");a(this,"tokens");this.keypath=e,this.callback=s,this.objectPath=[];const i=this.parse();this.key=i.key,this.tokens=i.tokens,this.obj=this.getRootObject(t),this.target=this.realize(),X(this.target)&&M.set(!0,this.key,this.target,this.callback)}static updateOptions(t){if(!t.adapters)throw new Error("adapters are required!");if(t.adapters&&(M.adapters={...M.adapters,...t.adapters},M.interfaces=Object.keys(M.adapters)),M.rootInterface=t.rootInterface||M.interfaces[0],!M.rootInterface)throw new Error("rootInterface is required!")}static tokenize(t,e){const s=[];let i={i:e,path:""},r,o;for(r=0;r{t.options.ignore||(this.resetTimeout(),this.components[t.tagName]=this.components[t.tagName]||this.getEmpty(),this.components[t.tagName].components.push(t.component))}),this.events.on("Component:disconnected",t=>{t.options.ignore||(this.resetTimeout(),this.checkStates())}),this.events.on("Component:afterBind",t=>{t.options.ignore||(this.resetTimeout(),this.checkStates())}),this.events.on("Component:error",(t,e)=>{this.onError(t,e)}),this.routerEvents.on("newPageReady",(t,e,s,i,r,o,l)=>{this.debug&&console.debug("newPageReady",t,e,s,"firstPageLoad",l),l||this.reset()})}getState(t){let e=0,s=0;for(const i of this.components[t].components)i.connected&&(e++,i.bound&&s++);return{connected:e,bound:s}}getStates(){const t={};for(const e in this.components){const s=this.getState(e);t[e]={state:s,components:this.components[e].components}}return t}checkStates(){let t=!0;const e=this.getStates();for(const s in e){const i=e[s].state;if(i.connected!==i.bound){t=!1;break}}return t&&!this.allBound&&this.onAllBound(),this.allBound=t,{states:e,allBound:t}}onAllBound(){this.clearTimeout(),this.events.trigger("ComponentLifecycle:allBound",this.components),this.debug&&console.debug("[ComponentLifecycle] All components bound!")}onError(t,e){this.clearTimeout(),console.error(`The component "${e.tagName}" has caused an error:`,t),this.events.trigger("ComponentLifecycle:error",t,e)}onTimeout(){this.clearTimeout();const t=this.getStates();let e=`[ComponentLifecycle] Timeout! {count} component(s) takes too long! Unfinished components: `,s=0;for(const i in t){const r=t[i].state;r.connected!==r.bound&&(s++,e+=`${i}: connected: ${t[i].state.connected}, bound: ${t[i].state.bound} -`)}if(s<=0){console.warn("No component found"),this.events.trigger("ComponentLifecycle:noComponents");return}e=e.replace("{count}",s.toString()),this.events.trigger("ComponentLifecycle:error",new Error(e),{})}clearTimeout(){this.timeout&&window.clearTimeout(this.timeout)}resetTimeout(){var t;return this.debug&&console.debug("[ComponentLifecycle] reset timeout.."),this.clearTimeout(),this.timeout=window.setTimeout(this.onTimeout.bind(this),((t=Ns.options.lifecycle)==null?void 0:t.timeout)||5e3),this.timeout}reset(){this.debug&&console.debug("[ComponentLifecycle] reset!"),this.allBound=!1,this.components={},this.resetTimeout()}};let gs=Qe;a(gs,"instance");class al extends en{constructor(e){super(e);a(this,"type","components")}register(e,s,i=!1){const r=i?s||e.tagName:e.tagName||s;return r?(this.elements[r]=e,this.elements):(console.warn(new Error("Component name not found!"),e),this.elements)}}class ll extends en{constructor(e){super(e);a(this,"type","formatter")}register(e,s,i=!1){const r=i?s||e.name:e.name||s;if(!r)throw new Error("Formatter name not found!");return this.elements[r]=e,this.elements}}class es{static setRequestHeaderEachRequest(t,e){this._requestHeadersEachRequest.push({name:t,value:e})}static async getJSON(t,e,s={},i={}){return this.fetch(t,"GET",e,"json",s,i)}static async post(t,e,s,i={},r={}){return this.fetch(t,"POST",e,s,i,r)}static async delete(t,e,s,i={},r={}){return this.fetch(t,"DELETE",e,s,i,r)}static async put(t,e,s,i={},r={}){return this.fetch(t,"PUT",e,s,i,r)}static async get(t,e,s,i={},r={}){return this.fetch(t,"GET",e,s,i,r)}static parseDataType(t){const e={};let s="application/x-www-form-urlencoded",i="*/*";switch(t){case"script":s="application/javascript";break;case"json":s="application/json",i="application/json, text/javascript";break;case"xml":s="application/xml",i="application/xml, text/xml";break;case"text":s="text/plain",i="text/plain";break;case"html":s="text/html",i="text/html";break;case"form":s="application/x-www-form-urlencoded";break}return s&&(e["Content-Type"]=s,e.Accept=i),e}static async fetch(t,e="GET",s={},i,r={},o={}){if(!fetch)throw new Error("Your browser does not support the fetch API, use xhr instead or install a polyfill.");let l;for(const p of this._requestHeadersEachRequest)r[p.name]=p.value;i&&(r=Tt({deep:!1},r,this.parseDataType(i))),!o.crossDomain&&!r["X-Requested-With"]&&(r["X-Requested-With"]="XMLHttpRequest");const c=o.cache?o.cache:"default";if(e==="GET"&&s){if(new URLSearchParams(s).toString()){const f=t.includes("?")?"&":"?";t=t+f+new URLSearchParams(s).toString()}}else s&&(i==="form"?l=new URLSearchParams(s):l=JSON.stringify(s));const h=await fetch(t,{credentials:"same-origin",cache:c,method:e,body:l,headers:r,mode:o.mode||"cors"});let d=await h.text();if(typeof d=="string"&&Ka(d)&&(d=JSON.parse(d)),typeof d=="string")switch(d){case"null":d=null;break;case"true":d=!0;break;case"false":d=!1;break;case"undefined":d=void 0;break}return{status:h.status,headers:h.headers,ok:h.ok,redirected:h.redirected,statusText:h.statusText,type:h.type,url:h.url,arrayBuffer:h.arrayBuffer,blob:h.blob,bodyUsed:h.bodyUsed,clone:h.clone,formData:h.formData,text:h.text,body:d}}}a(es,"_requestHeadersEachRequest",[]);const Nd=Object.freeze(Object.defineProperty({__proto__:null,AdapterService:rl,BindersService:ol,ComponentService:al,CoreService:Ns,FormatterService:ll,HttpService:es,LifecycleService:gs},Symbol.toStringTag,{value:"Module"})),$r=class{constructor(){a(this,"name",".");a(this,"counter",0);a(this,"weakmap",{})}weakReference(t){if(!Object.hasOwnProperty.bind(t)("__rv")){const e=this.counter++;Object.defineProperty(t,"__rv",{value:e})}return this.weakmap[t.__rv]||(this.weakmap[t.__rv]={callbacks:{}}),this.weakmap[t.__rv]}cleanupWeakReference(t,e){Object.keys(t.callbacks).length||t.pointers&&Object.keys(t.pointers).length||delete this.weakmap[e]}stubFunction(t,e){const s=t[e],i=this.weakReference(t),r=this.weakmap;t[e]=(...o)=>{const l=s.apply(t,o);return Object.keys(i.pointers).forEach(c=>{const h=i.pointers[c];r[c]&&Array.isArray(r[c].callbacks[h])&&r[c].callbacks[h].forEach(d=>{d.sync()})}),l}}observeMutations(t,e,s){if(Array.isArray(t)){const i=this.weakReference(t);i.pointers||(i.pointers={},$r.ARRAY_METHODS.forEach(r=>{this.stubFunction(t,r)})),i.pointers[e]||(i.pointers[e]=[]),i.pointers[e].indexOf(s)===-1&&i.pointers[e].push(s)}}unobserveMutations(t,e,s){if(Array.isArray(t)&&t.__rv!=null){const i=this.weakmap[t.__rv];if(i){const r=i.pointers[e];if(r){const o=r.indexOf(s);o>-1&&r.splice(o,1),r.length||delete i.pointers[e],this.cleanupWeakReference(i,t.__rv)}}}}observe(t,e,s){let i;const r=this.weakReference(t).callbacks;if(!r[e]){r[e]=[];const o=Object.getOwnPropertyDescriptor(t,e);(!o||!(o.get||o.set||!o.configurable))&&(i=t[e],Object.defineProperty(t,e,{enumerable:!0,get:()=>i,set:l=>{if(l!==i){this.unobserveMutations(i,t.__rv,e),i=l;const c=this.weakmap[t.__rv];if(c){const h=c.callbacks[e];h&&h.forEach(d=>{d.sync()}),this.observeMutations(l,t.__rv,e)}}}}))}r[e].indexOf(s)===-1&&r[e].push(s),this.observeMutations(t[e],t.__rv,e)}unobserve(t,e,s){const i=this.weakmap[t.__rv];if(i){const r=i.callbacks[e];if(r){const o=r.indexOf(s);o>-1&&(r.splice(o,1),r.length||(delete i.callbacks[e],this.unobserveMutations(t[e],t.__rv,e))),this.cleanupWeakReference(i,t.__rv)}}}get(t,e){return t[e]}set(t,e,s){t[e]=s}};let si=$r;a(si,"ARRAY_METHODS",["push","pop","shift","unshift","sort","reverse","splice"]);const Od=new si,Pd=Object.freeze(Object.defineProperty({__proto__:null,dotAdapter:Od},Symbol.toStringTag,{value:"Module"})),Dd=/[^\s']+|'([^']|'[^\s])*'|"([^"]|"[^\s])*"/g,Md=/\s+/;class A{constructor(t,e,s,i,r,o,l){a(this,"name");a(this,"publishes",!1);a(this,"priority",0);a(this,"value");a(this,"observer");a(this,"view");a(this,"el");a(this,"type");a(this,"formatters");a(this,"formatterObservers",{});a(this,"keypath");a(this,"args");a(this,"model");a(this,"marker");this.view=t,this.el=e,this.type=s,this.name=i,this.keypath=r,this.formatters=o,this.model=void 0,l&&s?this.args=this.getStarArguments(l,s):this.args=new Array}observe(t,e,s){return new He(t,e,s)}parseTarget(){if(this.keypath){const t=Ze(this.keypath,!0);if(t.type===0)this.value=t.value;else if(t.type===1)this.observer=this.observe(this.view.models,this.keypath,this),this.model=this.observer.target;else throw new Error(`[${this.name}] Unknown type in token`)}else this.value=void 0}getIterationAlias(t){return"%"+t+"%"}parseFormatterArguments(t,e){return t.map(s=>Ze(s,!0)).map(({type:s,value:i},r)=>{if(s===0)return i;if(s===1){const o=i;this.formatterObservers[e]||(this.formatterObservers[e]={});let l=this.formatterObservers[e][r];return l||(l=this.observe(this.view.models,o,this),this.formatterObservers[e][r]=l),l.value()}else throw new Error(`[${this.name}] Unknown argument type`)})}formattedValue(t,e=0){if(this.formatters===null)throw new Error(`[${this.name} formatters is null`);let s=!1;const i=e?this.formatters.slice(e):this.formatters;return i.reduce((r,o,l)=>{if(s)return r;const c=o.match(Dd);if(c===null)return console.warn(new Error(`[${this.name}] No args matched with regex "FORMATTER_ARGS"! +`)}if(s<=0){console.warn("No component found"),this.events.trigger("ComponentLifecycle:noComponents");return}e=e.replace("{count}",s.toString()),this.events.trigger("ComponentLifecycle:error",new Error(e),{})}clearTimeout(){this.timeout&&window.clearTimeout(this.timeout)}resetTimeout(){var t;return this.debug&&console.debug("[ComponentLifecycle] reset timeout.."),this.clearTimeout(),this.timeout=window.setTimeout(this.onTimeout.bind(this),((t=_s.options.lifecycle)==null?void 0:t.timeout)||5e3),this.timeout}reset(){this.debug&&console.debug("[ComponentLifecycle] reset!"),this.allBound=!1,this.components={},this.resetTimeout()}};let cs=qe;a(cs,"instance");class Ha extends Qi{constructor(e){super(e);a(this,"type","components")}register(e,s,i=!1){const r=i?s||e.tagName:e.tagName||s;return r?(this.elements[r]=e,this.elements):(console.warn(new Error("Component name not found!"),e),this.elements)}}class Va extends Qi{constructor(e){super(e);a(this,"type","formatter")}register(e,s,i=!1){const r=i?s||e.name:e.name||s;if(!r)throw new Error("Formatter name not found!");return this.elements[r]=e,this.elements}}class Xt{static setRequestHeaderEachRequest(t,e){this._requestHeadersEachRequest.push({name:t,value:e})}static async getJSON(t,e,s={},i={}){return this.fetch(t,"GET",e,"json",s,i)}static async post(t,e,s,i={},r={}){return this.fetch(t,"POST",e,s,i,r)}static async delete(t,e,s,i={},r={}){return this.fetch(t,"DELETE",e,s,i,r)}static async put(t,e,s,i={},r={}){return this.fetch(t,"PUT",e,s,i,r)}static async get(t,e,s,i={},r={}){return this.fetch(t,"GET",e,s,i,r)}static parseDataType(t){const e={};let s="application/x-www-form-urlencoded",i="*/*";switch(t){case"script":s="application/javascript";break;case"json":s="application/json",i="application/json, text/javascript";break;case"xml":s="application/xml",i="application/xml, text/xml";break;case"text":s="text/plain",i="text/plain";break;case"html":s="text/html",i="text/html";break;case"form":s="application/x-www-form-urlencoded";break}return s&&(e["Content-Type"]=s,e.Accept=i),e}static async fetch(t,e="GET",s={},i,r={},o={}){if(!fetch)throw new Error("Your browser does not support the fetch API, use xhr instead or install a polyfill.");let l;for(const p of this._requestHeadersEachRequest)r[p.name]=p.value;i&&(r=yt({deep:!1},r,this.parseDataType(i))),!o.crossDomain&&!r["X-Requested-With"]&&(r["X-Requested-With"]="XMLHttpRequest");const c=o.cache?o.cache:"default";if(e==="GET"&&s){if(new URLSearchParams(s).toString()){const f=t.includes("?")?"&":"?";t=t+f+new URLSearchParams(s).toString()}}else s&&(i==="form"?l=new URLSearchParams(s):l=JSON.stringify(s));const h=await fetch(t,{credentials:"same-origin",cache:c,method:e,body:l,headers:r,mode:o.mode||"cors"});let d=await h.text();if(typeof d=="string"&&ka(d)&&(d=JSON.parse(d)),typeof d=="string")switch(d){case"null":d=null;break;case"true":d=!0;break;case"false":d=!1;break;case"undefined":d=void 0;break}return{status:h.status,headers:h.headers,ok:h.ok,redirected:h.redirected,statusText:h.statusText,type:h.type,url:h.url,arrayBuffer:h.arrayBuffer,blob:h.blob,bodyUsed:h.bodyUsed,clone:h.clone,formData:h.formData,text:h.text,body:d}}}a(Xt,"_requestHeadersEachRequest",[]);const ud=Object.freeze(Object.defineProperty({__proto__:null,AdapterService:Ba,BindersService:Fa,ComponentService:Ha,CoreService:_s,FormatterService:Va,HttpService:Xt,LifecycleService:cs},Symbol.toStringTag,{value:"Module"})),Dr=class{constructor(){a(this,"name",".");a(this,"counter",0);a(this,"weakmap",{})}weakReference(t){if(!Object.hasOwnProperty.bind(t)("__rv")){const e=this.counter++;Object.defineProperty(t,"__rv",{value:e})}return this.weakmap[t.__rv]||(this.weakmap[t.__rv]={callbacks:{}}),this.weakmap[t.__rv]}cleanupWeakReference(t,e){Object.keys(t.callbacks).length||t.pointers&&Object.keys(t.pointers).length||delete this.weakmap[e]}stubFunction(t,e){const s=t[e],i=this.weakReference(t),r=this.weakmap;t[e]=(...o)=>{const l=s.apply(t,o);return Object.keys(i.pointers).forEach(c=>{const h=i.pointers[c];r[c]&&Array.isArray(r[c].callbacks[h])&&r[c].callbacks[h].forEach(d=>{d.sync()})}),l}}observeMutations(t,e,s){if(Array.isArray(t)){const i=this.weakReference(t);i.pointers||(i.pointers={},Dr.ARRAY_METHODS.forEach(r=>{this.stubFunction(t,r)})),i.pointers[e]||(i.pointers[e]=[]),i.pointers[e].indexOf(s)===-1&&i.pointers[e].push(s)}}unobserveMutations(t,e,s){if(Array.isArray(t)&&t.__rv!=null){const i=this.weakmap[t.__rv];if(i){const r=i.pointers[e];if(r){const o=r.indexOf(s);o>-1&&r.splice(o,1),r.length||delete i.pointers[e],this.cleanupWeakReference(i,t.__rv)}}}}observe(t,e,s){let i;const r=this.weakReference(t).callbacks;if(!r[e]){r[e]=[];const o=Object.getOwnPropertyDescriptor(t,e);(!o||!(o.get||o.set||!o.configurable))&&(i=t[e],Object.defineProperty(t,e,{enumerable:!0,get:()=>i,set:l=>{if(l!==i){this.unobserveMutations(i,t.__rv,e),i=l;const c=this.weakmap[t.__rv];if(c){const h=c.callbacks[e];h&&h.forEach(d=>{d.sync()}),this.observeMutations(l,t.__rv,e)}}}}))}r[e].indexOf(s)===-1&&r[e].push(s),this.observeMutations(t[e],t.__rv,e)}unobserve(t,e,s){const i=this.weakmap[t.__rv];if(i){const r=i.callbacks[e];if(r){const o=r.indexOf(s);o>-1&&(r.splice(o,1),r.length||(delete i.callbacks[e],this.unobserveMutations(t[e],t.__rv,e))),this.cleanupWeakReference(i,t.__rv)}}}get(t,e){return t[e]}set(t,e,s){t[e]=s}};let Ys=Dr;a(Ys,"ARRAY_METHODS",["push","pop","shift","unshift","sort","reverse","splice"]);const pd=new Ys,fd=Object.freeze(Object.defineProperty({__proto__:null,dotAdapter:pd},Symbol.toStringTag,{value:"Module"})),md=/[^\s']+|'([^']|'[^\s])*'|"([^"]|"[^\s])*"/g,gd=/\s+/;class A{constructor(t,e,s,i,r,o,l){a(this,"name");a(this,"publishes",!1);a(this,"priority",0);a(this,"value");a(this,"observer");a(this,"view");a(this,"el");a(this,"type");a(this,"formatters");a(this,"formatterObservers",{});a(this,"keypath");a(this,"args");a(this,"model");a(this,"marker");this.view=t,this.el=e,this.type=s,this.name=i,this.keypath=r,this.formatters=o,this.model=void 0,l&&s?this.args=this.getStarArguments(l,s):this.args=new Array}observe(t,e,s){return new Me(t,e,s)}parseTarget(){if(this.keypath){const t=Je(this.keypath,!0);if(t.type===0)this.value=t.value;else if(t.type===1)this.observer=this.observe(this.view.models,this.keypath,this),this.model=this.observer.target;else throw new Error(`[${this.name}] Unknown type in token`)}else this.value=void 0}getIterationAlias(t){return"%"+t+"%"}parseFormatterArguments(t,e){return t.map(s=>Je(s,!0)).map(({type:s,value:i},r)=>{if(s===0)return i;if(s===1){const o=i;this.formatterObservers[e]||(this.formatterObservers[e]={});let l=this.formatterObservers[e][r];return l||(l=this.observe(this.view.models,o,this),this.formatterObservers[e][r]=l),l.value()}else throw new Error(`[${this.name}] Unknown argument type`)})}formattedValue(t,e=0){if(this.formatters===null)throw new Error(`[${this.name} formatters is null`);let s=!1;const i=e?this.formatters.slice(e):this.formatters;return i.reduce((r,o,l)=>{if(s)return r;const c=o.match(md);if(c===null)return console.warn(new Error(`[${this.name}] No args matched with regex "FORMATTER_ARGS"! value: ${JSON.stringify(t)} result: ${JSON.stringify(r)} declaration: ${JSON.stringify(o)} index: ${l} -`)),r;const h=c.shift();if(!h)throw new Error(`[${this.name}] No formatter id found in args!`);if(!this.view.options.formatters)throw new Error(`[${this.name}] No formatters are defined!`);const d=this.view.options.formatters[h];if(!d)throw new Error(`[${this.name}] No formatters with id "${h}" found!`);const u=this.parseFormatterArguments(c,l);return d&&typeof d.read=="function"&&(r=d.read.apply(this.model,[r,...u])),lthis.formattedValue(p,l+1))):r},t)}eventHandler(t,e){const s=this.view.options.handler;return i=>{if(!s)throw new Error("No handler defined in binding.view.options.handler");s.call(t,this,i,this,e)}}set(t){try{t=this.formattedValue(t)}catch(e){return console.error(e),t}typeof this.routine=="function"&&(t&&typeof t.then=="function"&&typeof t.catch=="function"?t.then(e=>{this.routine(this.el,e)}).catch(e=>{console.error(e)}):this.routine(this.el,t))}sync(){this.observer?(this.model=this.observer.target,this.set(this.observer.value())):this.set(this.value)}publish(){if(this.observer){if(this.formatters===null)throw new Error("formatters is null");const t=this.formatters.reduceRight((e,s,i)=>{const r=s.split(Md),o=r.shift();if(!o)throw new Error("id not defined");if(!this.view.options.formatters)return;const l=this.view.options.formatters[o],c=this.parseFormatterArguments(r,i);return l&&typeof l.publish=="function"&&(e=l.publish(e,...c)),e},this._getValue(this.el));this.observer.setValue(t)}}_bind(){if(this.parseTarget(),this.bind){if(typeof this.bind!="function")throw new Error("the method bind is not a function");this.bind(this.el)}this.view.options.preloadData&&this.sync()}_unbind(){this.unbind&&this.unbind(this.el),this.observer&&this.observer.unobserve(),Object.keys(this.formatterObservers).forEach(t=>{const e=this.formatterObservers[t];Object.keys(e).forEach(s=>{e[s].unobserve()})}),this.formatterObservers={}}_update(t={}){this.observer&&(this.model=this.observer.target),typeof this.update=="function"&&this.update(t)}_getValue(t){return typeof this.getValue=="function"?this.getValue(t):Is(t)}getStarArguments(t,e){var r;const s=this.view.binderRegex(t);return((r=e.match(s))==null?void 0:r.slice(1))||[]}}a(A,"key",""),a(A,"block",!1);class cl extends A{constructor(){super(...arguments);a(this,"function",!0);a(this,"priority",1e3)}bind(e){const s=this.args[0];e.classList.add(s)}routine(e,s){const i=this.args[0];s?(e.classList.add(i+"-start"),e.classList.remove(i+"-done")):(e.classList.remove(i+"-start"),e.classList.add(i+"-done"))}}a(cl,"key","animate-*");class hl extends A{constructor(){super(...arguments);a(this,"function",!0);a(this,"priority",1e3);a(this,"staticClasses")}bind(e){const s=e.getAttribute("class")||"";this.staticClasses=s.split(" ")}unbind(){delete this.staticClasses}routine(e,s){var r;s?((r=this.staticClasses)==null?void 0:r.indexOf(s))===-1&&e.setAttribute("class",this.staticClasses.join(" ")+" "+s):this.staticClasses&&e.setAttribute("class",this.staticClasses.join(" "));const i=e.getAttribute("class");i&&e.setAttribute("class",i.trim())}}a(hl,"key","add-class");class dl extends A{routine(t,e){const s=ke(this.args[0].trim());this.view.models[s]=e}}a(dl,"key","assign-*");class ul extends A{routine(t,e){if(typeof e=="object")return Tt({deep:!1},this.view.models,e);console.warn("Value must be an object or propertyName is required")}}a(ul,"key","assign");class tn extends A{routine(t,e){var o;if(!this.type)throw new Error("Can't set attribute of "+this.type);const{newValue:s,oldValue:i,changed:r}=Ja(t,this.type,e);this.type==="src"&&t.tagName.toUpperCase()==="SOURCE"&&((o=t.parentElement)==null?void 0:o.tagName.toUpperCase())==="VIDEO"&&t.parentElement.load(),r&&t.dispatchEvent(new CustomEvent("binder-changed",{detail:{name:this.type,newValue:s,oldValue:i}}))}}a(tn,"key","attr-*");class Mn extends A{routine(){}}a(Mn,"key","block"),a(Mn,"block",!0);class pl extends A{constructor(){super(...arguments);a(this,"publishes",!0);a(this,"priority",2e3);a(this,"onChange",this.publish.bind(this))}bind(e){e.addEventListener("change",this.onChange)}unbind(e){e.removeEventListener("change",this.onChange)}routine(e,s){let i;this._getValue?i=this._getValue(e):(console.warn("this._getValue is not a function, this: ",this),i=Is(e)),e.type==="radio"?e.checked=Ue(i)===Ue(s):i!==s&&(e.checked=!!s)}getValue(e){return Is(e)}}a(pl,"key","checked");class fl extends A{routine(t,e){if(this.args===null)throw new Error("args is null");const s=t.getAttribute("class")||"",i=s.split(" ").filter(l=>l!==""),r=this.args[0].trim(),o=i.indexOf(r);o===-1?e&&t.setAttribute("class",`${s} ${r}`):e||t.setAttribute("class",i.filter((l,c)=>c!==o).join(" "))}}a(fl,"key","class-*");const qs='[componentAttributeBinder] You can only use the "rv-co-*" binder on Riba components, but "{tagName}" is not registered.';class Bi extends A{constructor(){super(...arguments);a(this,"publishes",!0);a(this,"componentAttributeObserver");a(this,"attributeName")}__routine(e,s){const i=this.args[0].trim();e.setBinderAttribute?e.setBinderAttribute(i,s):console.warn(qs.replace("{tagName}",e.tagName),e)}async routine(e,s){Xe(e,!0,!0)?this.__routine(e,s):Xe(e,!0)?(await Dn(e),this.__routine(e,s)):console.warn(qs.replace("{tagName}",e.tagName),e)}__bind(e){if(this.attributeName=this.args[0].toString().trim(),typeof e.observeAttribute!="function"){console.warn(qs.replace("{tagName}",e.tagName),e);return}this.componentAttributeObserver=e.observeAttribute(this.attributeName,{sync:()=>{this.publish()}})}async bind(e){Xe(e,!0,!0)?this.__bind(e):Xe(e,!0)?(await Dn(e),this.__bind(e)):console.warn(qs.replace("{tagName}",e.tagName),e)}unbind(){var e;(e=this.componentAttributeObserver)==null||e.unobserve()}getValue(e){const s=this.args[0].trim();return e.getBinderAttribute(s)}}a(Bi,"key","co-*");class ml extends A{routine(t,e){t.disabled=!!e}}a(ml,"key","disabled");class gl extends A{constructor(){super(...arguments);a(this,"enable",!1);a(this,"onDrag",this._onDrag.bind(this))}_onDrag(e){this.enable||e.preventDefault()}routine(e,s){this.enable=s,e.setAttribute("draggable",s?"true":"false")}bind(e){e.addEventListener("dragstart",this.onDrag,!0)}unbind(e){e.removeAttribute("draggable"),e.removeEventListener("dragstart",this.onDrag,!0)}}a(gl,"key","draggable");class vl extends A{routine(t,e){t.data=e??""}}a(vl,"key","mustache-text");const Qs=0,bl=1,Rd=/((?:'[^']*')*(?:(?:[^|']*(?:'[^']*')+[^|']*)+|[^|]+))|^$/g;function El(n,t){let e=null;const s=n.length;let i=0,r=0;const o=t[0],l=t[1];for(;r0&&r0)for(let i=0;ii.trim());return{keypath:e.shift()||void 0,pipes:e}}const Rt=class{constructor(t,e,s){a(this,"els");a(this,"models");a(this,"options");a(this,"bindings",[]);a(this,"webComponents",[]);if(Array.isArray(t)?this.els=t:this.els=[t],this.models=e,this.models.$root)for(const i of Object.keys(this.models.$root))Rt.$rootScope[i]=this.models.$root[i];this.models.$root=Rt.$rootScope,this.options=s,this.build()}static create(t,e,s){var o;const i=t.el.cloneNode(!0),r=new Rt(i,e,t.view.options);return r.bind(),(o=t==null?void 0:t.marker)!=null&&o.parentNode?t.marker.parentNode.insertBefore(i,s):console.warn("[View]: No parent node for binding!"),r}bind(){this.bindings.forEach(t=>{t._bind()})}unbind(){Array.isArray(this.bindings)&&this.bindings.forEach(t=>{t._unbind(),typeof t.el&&this.options.removeBinderAttributes}),Array.isArray(this.webComponents)&&this.webComponents.forEach(t=>{typeof t.unbind=="function"&&t.unbind()})}sync(){this.bindings.forEach(t=>{t.sync&&t.sync()})}publish(){this.bindings.forEach(t=>{t.publishes&&t.publish&&t.publish()})}update(t={}){Object.keys(t).forEach(e=>{this.models[e]=t[e]});for(const e of this.bindings)e._update&&e._update(t)}build(){if(this.bindings=[],!this.options.templateDelimiters)throw new Error("templateDelimiters required");const t=this.els;for(let e=0;e1?s=new RegExp(`^${t.replace("*","([^-]*)").replaceAll("-*","-(.+)")}$`):s=new RegExp(`^${t.replaceAll("*","(.+)")}$`),s}bindBinders(t,e,s=this.options.attributeBinders){let i=!1;if(!this.options.binders)return i;const r=[];for(let o=0,l=t.length;o{const s=t.priority||0;return(e.priority||0)-s});class Rn extends A{constructor(){super(...arguments);a(this,"priority",4e3);a(this,"iterated",[])}bind(e){var s,i;this.marker?this.iterated.forEach(r=>{r.bind()}):(this.marker=(s=window==null?void 0:window.document)==null?void 0:s.createComment(` riba: ${this.type} `),!((i=e.parentNode)!=null&&i.insertBefore)||!this.marker||(e.parentNode.insertBefore(this.marker,e),e.parentNode.removeChild(e)))}unbind(){this.iterated&&this.iterated.forEach(e=>{e.unbind()})}routine(e,s){if(this.args===null)throw new Error("args is null");let i=!1;const r=ke(this.args[0].toString());if(s=s||[],!Array.isArray(s)&&typeof s=="object"&&s!==null&&(s=Object.entries(s).map(([l,c])=>({key:l,value:c})),i=!0),!Array.isArray(s))throw new Error(`each-${this.args[0]} needs an array or object to iterate over, but it is ${typeof s}`);const o=e.getAttribute("index-property")||this.getIterationAlias(r);s.forEach((l,c)=>{var u;const h={$parent:this.view.models};i?(h[o]=l.key,h[r]=l.value):(h[o]=c,h[r]=l);let d=this.iterated[c];if(d)if(d.models[r]!==l){let p,f=this.iterated[c];for(let m=c+1;ms.length&&sd(this.iterated.length-s.length,()=>{const l=this.iterated.pop();if(!l)throw new Error("view is undefined!");if(l.unbind(),!this.marker||!this.marker.parentNode)throw new Error("Marker has no parent node");this.marker.parentNode.removeChild(l.els[0])}),e.nodeName==="OPTION"&&this.view.bindings&&this.view.bindings.forEach(l=>{this.marker&&l.el===this.marker.parentNode&&l.type==="value"&&l.sync&&l.sync()})}update(e){const s={};Object.keys(e).forEach(i=>{if(this.args===null)throw new Error("args is null");i!==this.args[0]&&(s[i]=e[i])}),this.iterated.forEach(i=>{i.update(s)})}}a(Rn,"key","each-*"),a(Rn,"block",!0);class wl extends A{constructor(){super(...arguments);a(this,"publishes",!0)}bind(){this.publish()}routine(){}getValue(e){return e}}a(wl,"key","element");class _l extends A{routine(t,e){t.disabled=!e}}a(_l,"key","enabled");class Sl extends A{constructor(){super(...arguments);a(this,"priority",9e4)}routine(e,s){const i=Array.from(e.children);i.sort((r,o)=>!r.dataset.sortBy||!o.dataset.sortBy?0:r.dataset.sortByo.dataset.sortBy?s?-1:1:0);for(let r=0;r0){const r=i.length>0?", ":"";i+=`${r}${e} ${s}`}else{let r=i.split(",");r=r.map(o=>o.trim()),r=r.filter(o=>!o.includes(s)),i=r.join(", ")||""}t.setAttribute("srcset",i)}}a(Ol,"key","srcset-*");class Pl extends A{routine(t,e){const s="background-image";e==null||e===""?t.style.removeProperty(s):t.style.setProperty(s,`url(${e})`)}}a(Pl,"key","style-background-image");class Dl extends A{routine(t,e){const s=this.args[0];e==null||e===""?t.style.removeProperty(s.toString()):t.style.setProperty(s.toString(),e)}}a(Dl,"key","style-*");class Ml extends A{routine(t,e){if(e)if(typeof e=="string")t.setAttribute("style",e);else for(const s of Object.keys(e))t.style.setProperty(md(s),e[s]||null);else for(const s of Object.keys(t.style))t.style.removeProperty(s)}}a(Ml,"key","style");class Rl extends A{constructor(){super(...arguments);a(this,"priority",-1e3);a(this,"originalTag")}bind(e){this.originalTag=e.tagName.toLowerCase()}routine(e,s){if(this.args===null)throw new Error("args is null");const i=this.el.tagName.toLowerCase();let r;if(s)r=this.args[0].trim().toLowerCase();else if(this.originalTag)r=this.originalTag.toLowerCase();else throw new Error("Tag name not found!");if(i!==r){const o=document.createElement(r);for(;e.childNodes.length>0;)e.firstChild&&o.appendChild(e.firstChild);const l=Array.prototype.slice.call(e.attributes);for(const c of l)o.setAttribute(c.name,c.value);e.parentNode?e.parentNode.replaceChild(o,e):console.warn("No parent"),this.el=o}}}a(Rl,"key","tag-*");class $l extends A{constructor(){super(...arguments);a(this,"nested")}bind(e){this.nested=new ve(e,this.view.models,this.view.options)}routine(e,s){var i,r;(i=this.nested)==null||i.unbind(),e.innerHTML=s||"",this.nested=new ve(e,this.view.models,this.view.options),(r=this.nested)==null||r.bind()}unbind(){var e;(e=this.nested)==null||e.unbind()}update(e){var s;(s=this.nested)==null||s.update(e)}}a($l,"key","template");class Bl extends A{routine(t,e){typeof e!="string"&&typeof(e==null?void 0:e.toString)=="function"&&(e=e.toString()),t.textContent=e||""}}a(Bl,"key","text");class Hl extends A{constructor(){super(...arguments);a(this,"propertyKey")}toggle(){this.propertyKey&&(this.view.models[this.propertyKey]=!this.view.models[this.propertyKey])}bind(e){const s=this.args[0],i=this.el.dataset.passive==="true";e.addEventListener(s,this.toggle,{passive:i})}unbind(e){if(this.args===null)throw new Error("args is null");const s=this.args[0];e.removeEventListener(s,this.toggle)}routine(e,s){if(this.args===null)throw new Error("args is null");this.propertyKey=s}}a(Hl,"key","toggle-on-*");class Fl extends A{constructor(){super(...arguments);a(this,"publishes",!0);a(this,"priority",2e3);a(this,"onChange",this.publish.bind(this))}bind(e){e.addEventListener("change",this.onChange)}unbind(e){e.removeEventListener("change",this.onChange)}routine(e,s){e.type==="radio"?e.checked=Ue(e.value)!==Ue(s):e.checked=!s}getValue(e){return Is(e)}}a(Fl,"key","unchecked");class Vl extends Hi{routine(t,e){return super.routine(t,!e)}}a(Vl,"key","unless");const Bd="change input paste blur focus";class Ul extends A{constructor(){super(...arguments);a(this,"publishes",!0);a(this,"priority",3e3);a(this,"event");a(this,"onChange",this.publish.bind(this))}getData(e){const s={type:e.type,tagName:e.tagName,contenteditable:!!e.getAttribute("contenteditable"),isRadio:!1,isOption:!1};return s.isRadio=s.tagName==="INPUT"&&s.type==="radio",s.isOption=s.tagName==="OPTION",s}bind(e){if(e.tagName==="OPTION")return;if(!this.getData(e).isRadio){this.event=e.getAttribute("event-name")||Bd;const i=this.event.split(" ");for(const r of i)e.addEventListener(r.trim(),this.onChange,!1)}}unbind(e){if(this.event){const s=this.event.split(" ");for(const i in s)e.removeEventListener(i.trim(),this.onChange)}}routine(e,s){let i=this.getValue(e);if(Array.isArray(s)||(s!=null?s=Ue(s):s=""),Array.isArray(i)||(i!=null?i=Ue(i):i=""),i===s)return;const r=this.getData(e);if(r.isRadio||r.isOption)return Ja(e,"value",s);if(e.type==="select-multiple"){if(Array.isArray(s))for(let o=0;o-1}}else e.getAttribute("contenteditable")?e.innerHTML=s:e.value=s}getValue(e){return Is(e)}}a(Ul,"key","value");const Hd=Object.freeze(Object.defineProperty({__proto__:null,AddClassBinder:hl,AnimateStarBinder:cl,AssignBinder:ul,AssignPropertyBinder:dl,AttributeBinder:tn,BlockBinder:Mn,CheckedBinder:pl,ClassStarBinder:fl,ComponentAttributeBinder:Bi,DisabledBinder:ml,EachStarBinder:Rn,ElementBinder:wl,EnabledBinder:_l,FlexSortChildsBinder:Sl,HideBinder:Al,HtmlBinder:Tl,IfBinder:Hi,MaxlengthBinder:Cl,NoDragBinder:gl,OnEventBinder:Ll,ParentBinder:kl,ReadonlyBinder:xl,RemoveClassBinder:Il,ShowBinder:Nl,SrcsetSizeBinder:Ol,StyleBackgroundImageBinder:Pl,StyleBinder:Ml,StyleStarBinder:Dl,TagStarBinder:Rl,TemplateBinder:$l,TextBinder:Bl,ToggleOnEventBinder:Hl,UncheckedBinder:Fl,UnlessBinder:Vl,ValueBinder:Ul},Symbol.toStringTag,{value:"Module"}));class Fd{constructor(t,e,s,i){a(this,"binder");a(this,"component");a(this,"formatter");a(this,"adapter");this.binder=new ol(t),this.component=new al(e),this.formatter=new ll(s),this.adapter=new rl(i)}register(t){if(!t)throw console.error(t),new Error("The Riba module is falsy!");t.binders&&this.binder.registerAll(t.binders),t.components&&this.component.registerAll(t.components),t.formatters&&this.formatter.registerAll(t.formatters),t.adapters&&this.adapter.registerAll(t.adapters)}}const $t=class{constructor(){a(this,"module");a(this,"lifecycle",gs.getInstance());a(this,"binders",{});a(this,"components",{});a(this,"formatters",{});a(this,"adapters",{});a(this,"parseTemplate",El);a(this,"parseType",Ze);a(this,"templateDelimiters",["{","}"]);a(this,"rootInterface",".");a(this,"preloadData",!0);a(this,"removeBinderAttributes",!0);a(this,"blockNodeNames",["SCRIPT","STYLE","TEMPLATE","CODE"]);a(this,"blockUnknownCustomElements",!0);a(this,"_prefix",["rv"]);a(this,"_fullPrefix",["rv-"]);if(this.module=new Fd(this.binders,this.components,this.formatters,this.adapters),$t.instance)return $t.instance;$t.instance=this}static handler(t,e,s,i){if(!this||!this.call){const r=new Error(`[rv-${s.type}="${s.keypath}"] Event handler "${s.keypath}" not found!"`);throw console.error(r,s,i,s.view.models),r}this.call(t,e,s.view.models,i)}set prefix(t){if(Array.isArray(t)){this._prefix=[],this._fullPrefix=[];for(const e of t)this._prefix.push(e),this._fullPrefix.push(e+"-")}}get prefix(){return this._prefix}get fullPrefix(){return this._fullPrefix}configure(t){if(t)for(const[e,s]of Object.entries(t))switch(e){case"binders":this.binders={...this.binders,...s};break;case"formatters":this.formatters={...this.formatters,...s};break;case"components":this.components={...this.components,...s};break;case"adapters":this.adapters={...this.adapters,...s};break;case"prefix":this.prefix=s;break;case"parseTemplate":this.parseTemplate=s;break;case"parseType":this.parseType=s;break;case"templateDelimiters":this.templateDelimiters=s;break;case"rootInterface":this.rootInterface=s;break;case"preloadData":this.preloadData=s;break;case"blockNodeNames":this.blockNodeNames=s;break;case"blockUnknownCustomElements":this.blockUnknownCustomElements=!!s;break;default:console.warn("Option not supported",e,s);break}}getViewOptions(t){const e={adapters:{},binders:{},components:{},formatters:{},attributeBinders:[],rootInterface:{}};if(t&&(e.binders={...e.binders,...t.binders},e.formatters={...e.formatters,...t.formatters},e.components={...e.components,...t.components},e.adapters={...e.adapters,...t.adapters}),t!=null&&t.prefix&&Array.isArray(t==null?void 0:t.prefix)){e.prefix=[],e.fullPrefix=[];for(const s of t.prefix)e.prefix.push(s),e.fullPrefix.push(s+"-")}else e.prefix=this.prefix,e.fullPrefix=this.fullPrefix;if(e.templateDelimiters=(t==null?void 0:t.templateDelimiters)||this.templateDelimiters,e.rootInterface=(t==null?void 0:t.rootInterface)||this.rootInterface,e.removeBinderAttributes=typeof(t==null?void 0:t.removeBinderAttributes)=="boolean"?t.removeBinderAttributes:this.removeBinderAttributes,e.blockNodeNames=(t==null?void 0:t.blockNodeNames)||this.blockNodeNames,e.preloadData=typeof(t==null?void 0:t.preloadData)=="boolean"?t.preloadData:this.preloadData,e.handler=(t==null?void 0:t.handler)||$t.handler,e.binders={...this.binders,...e.binders},e.formatters={...this.formatters,...e.formatters},e.components={...this.components,...e.components},e.adapters={...this.adapters,...e.adapters},e.attributeBinders||(e.attributeBinders=[]),e.binders){const s=Object.keys(e.binders).filter(i=>i.indexOf("*")>=1);e.attributeBinders.push(...s)}return e}bind(t,e={},s){const i=this.getViewOptions(s);He.updateOptions(i);const r=new ve(t,e,i);return r.bind(),r}};let Ft=$t;a(Ft,"instance");window.Riba=Ft;const ii=Symbol();function Vd(n){return null}const Ud=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]);function jd(n,t,...e){return{tag:n,props:t,children:e}}function $n(n){if(!n)return"";const{tag:t,props:e,children:s}=n;if(typeof t=="function")return t===Vd?String(e.html):$n(t(Object.assign({children:s},e)));const i=[];if(t!==ii){i.push("<",t);for(const[l,c]of Object.entries(e??{}))c!=null&&(typeof c=="boolean"&&!Xe(t)?c&&i.push(" ",l):i.push(" ",l,"=",Gi(c)))}let r=!1;return s.length&&(r=!0,t!==ii&&i.push(">"),o(s)),t!==ii&&(r?i.push(""):Ud.has(t)?i.push("/>"):i.push(">")),i.join("");function o(l){for(const c of l)c&&(Array.isArray(c)?o(c):typeof c=="string"||typeof c=="number"?i.push(hd(c.toString())):i.push($n(c)))}}globalThis.jsxCreateElement=jd;globalThis.jsxFragment=ii;class pr extends HTMLElement{constructor(){super();a(this,"_debug",!1);a(this,"_color");a(this,"templateLoaded",!1);a(this,"observedAttributesToCheck",{});a(this,"observedAttributes",[]);this._debug&&(this._color=Ao())}remove(){this&&this.parentElement&&this.parentElement.removeChild(this)}_log(e,...s){const i=this.constructor.name||this.tagName;this._color||(this._color=Ao()),ed({namespace:i,color:this._color,mode:e},...s)}info(...e){return this._log("info",...e)}debug(...e){if(this._debug)return this._log("debug",...e)}error(...e){console.error(...e)}requiredAttributes(){return[]}async init(e){this.loadAttributes(e),this.getPassedObservedAttributes(e)}ready(){return this.allPassedObservedAttributesAreInitialized()&&this.checkRequiredAttributes()}attributeIsPassed(e){return this.hasAttribute(e)}getPassedObservedAttributes(e){const s=this.observedAttributesToCheck;for(const i of e)s[i]?s[i].passed||(s[i].passed=this.attributeIsPassed(i)):s[i]={passed:!1,initialized:!1}}allPassedObservedAttributesAreInitialized(){return Object.keys(this.observedAttributesToCheck).every(e=>{var s,i;return!((s=this.observedAttributesToCheck[e])!=null&&s.passed)||((i=this.observedAttributesToCheck[e])==null?void 0:i.initialized)})}checkRequiredAttributes(){return this.requiredAttributes().every(e=>(e=ke(e),this.scope.hasOwnProperty(e)&&typeof this.scope[e]<"u"))}parseAttribute(e){let s=e;if(typeof e!="string")return e;if(e==="true")s=!0;else if(e==="false")s=!1;else if(e==="null")s=null;else if(e==="undefined")s=void 0;else if(e==="")s=void 0;else if(!isNaN(Number(e)))s=Number(e),s>=Number.MAX_SAFE_INTEGER&&(s=e);else{const i=Xi(s);s=i||s}return s}eventHandler(e){return function(s,i,r,o){if(!this||!this.call){const l=new Error(`[rv-${r.type}="${r.keypath}"] Event handler "${r.keypath}" not found!"`);throw console.error(r,o),l}this.call(e,i,r.view.models,o)}}connectedCallback(){}disconnectedCallback(){}async attributeChangedCallback(e,s,i,r){this.observedAttributesToCheck&&this.observedAttributesToCheck[e]&&(this.observedAttributesToCheck[e].initialized=!0),i=this.parseAttribute(i);const o=ke(e);this.scope&&this.scope[o]&&(s=this.scope[o]),this.scope[o]=i,this.parsedAttributeChangedCallback(o,s,i,r)}parsedAttributeChangedCallback(e,s,i,r){this.debug("parsedAttributeChangedCallback called",e,s,i,r)}adoptedCallback(e,s){this.debug("adoptedCallback called",e,s)}async loadTemplate(){if(this.templateLoaded===!0)return null;if(!this.checkRequiredAttributes())return this.debug("Not all required attributes are set to load the template"),null;this.templateLoaded=!0;const e=await this.template();try{return e&&(e instanceof HTMLElement?(this.innerHTML="",this.appendChild(e)):typeof e=="string"?this.innerHTML=e:e.tag&&(this.innerHTML=$n(e))),e}catch(s){throw this.templateLoaded=!1,s}}async beforeTemplate(){}async afterTemplate(e){this.debug("afterTemplate",e)}async onReady(){}observe(e,s){return new He(this.scope,e,s)}observeAttribute(e,s){const i=ke(e);return this.observe(i,s)}setBinderAttribute(e,s,i=null){const r=ke(e),o=this.scope[r];this.attributeChangedCallback(e,o,s,i)}getBinderAttribute(e){const s=ke(e);return this.scope[s]}loadAttributes(e){const s=this.attributes;for(const i in s){const r=s[i],o=r.nodeName;if(e.indexOf(o)!==-1){const l=r.nodeValue;this.attributeChangedCallback(o,void 0,l,null)}}}}a(pr,"tagName");let H=class extends pr{constructor(){super();a(this,"view",null);a(this,"riba");a(this,"_binds",!1);a(this,"_bound",!1);a(this,"_connected",!1);a(this,"_disconnected",!1);a(this,"lifecycleEvents",$.getInstance("lifecycle"));a(this,"lifecycleOptions",{});a(this,"autobind",!0);this.lifecycleEvents.trigger("Component:constructor",this.getLifecycleEventData()),this.lifecycleEvents.on("ComponentLifecycle:allBound",this.afterAllBind,this)}get binds(){return this._binds}get bound(){return this._bound}get connected(){return this._connected}get disconnected(){return this._disconnected}async init(e){try{return await super.init(e),this.lifecycleEvents.trigger("Component:init",this.getLifecycleEventData()),await this.bindIfReady()}catch(s){this.throw(s)}}throw(e){e.message&&console.error(`[${this.tagName}] ${e.message}`),this.lifecycleEvents.trigger("Component:error",e,this.getLifecycleEventData()),this.error(e)}async bindIfReady(){if(this.ready()){await this.beforeTemplate();const e=await this.loadTemplate();await this.afterTemplate(e),this.autobind&&await this.bind(),await this.onReady();return}this.debug("Not all required or passed attributes are set to load and bind the template",this.observedAttributesToCheck,this.scope)}async _beforeBind(){this._binds=!0,this.debug("Start to bind Riba"),this.lifecycleEvents.trigger("Component:beforeBind",this.getLifecycleEventData())}async beforeBind(){}async _afterBind(){this._binds=!1,this._bound=!0,this.lifecycleEvents.trigger("Component:afterBind",this.getLifecycleEventData())}async afterBind(){}async afterAllBind(){}getLifecycleEventData(){return{tagName:this.tagName.toLowerCase(),component:this,options:this.lifecycleOptions}}disconnectedCallback(){try{this._disconnected=!0,this._connected=!1,super.disconnectedCallback(),this.lifecycleEvents.trigger("Component:disconnected",this.getLifecycleEventData()),this.lifecycleEvents.off("ComponentLifecycle:allBound",this.afterAllBind,this),this.lifecycleEvents.off("ComponentLifecycle:error",this.afterAllBind,this)}catch(e){this.throw(e)}}connectedCallback(){try{this._disconnected=!1,this._connected=!0,super.connectedCallback(),this.lifecycleEvents.trigger("Component:connected",this.getLifecycleEventData())}catch(e){this.throw(e)}}async attributeChangedCallback(e,s,i,r){try{super.attributeChangedCallback(e,s,i,r),await this.bindIfReady()}catch(o){this.throw(o)}}callFormatterHandler(e){return{name:"call",read:(s,...i)=>{if(!s)throw new Error(`[${e.tagName}] Can not use "call" formatter: fn is undefined!`);return s.apply(e,i)}}}argsFormatterHandler(e){return{name:"args",read:(s,...i)=>(r,o,l,c)=>{if(!s)throw new Error(`[${e.tagName}] Can not use "args" formatter: fn is undefined!`);return i.push(r),i.push(o),i.push(l),i.push(c),s.apply(e,i)}}}async bind(){if(this.binds||this.bound)return this.view;if(!this.checkRequiredAttributes()){this.debug("Not all required attributes are set for bind");return}try{await this._beforeBind(),await this.beforeBind(),this.riba=new Ft,this.view=this.getView(),this.view&&(this.scope=this.view.models,this.view.bind()),await this._afterBind(),await this.afterBind()}catch(e){this._binds=!1,this._bound=!1,this.throw(e)}return this.view}getView(){var e;try{const s=(e=this.riba)==null?void 0:e.getViewOptions({handler:this.eventHandler(this),formatters:{call:this.callFormatterHandler(this),args:this.argsFormatterHandler(this)}});return s?new ve(Array.prototype.slice.call(this.childNodes),this.scope,s):null}catch(s){this.throw(s)}}async unbind(){try{this.view&&(this._binds=!1,this._bound=!1,this.view.unbind(),this.view=null)}catch(e){this.throw(e)}}async build(){try{this.view&&this.view.build()}catch(e){this.throw(e)}}};const Wd=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));class fr extends H{constructor(){super(...arguments);a(this,"templateAttributes",[]);a(this,"templateReady",!1)}connectedCallback(){this.addItemsByTemplate(),super.connectedCallback(),this.removeTemplates(),this.bindIfReady()}ready(){return super.ready()&&this.templateReady}transformTemplateAttribute(e,s,i){switch(i){case"number":return Number(s);case"boolean":return s==="true";case"string":if(typeof s=="string")return s;if(typeof(s==null?void 0:s.toString)=="function")return s.toString();case"object":return Xi(s)}return Ze(s).value}transformTemplateAttributes(e,s){return e.index=e.index||s,e}getTemplateAttributes(e,s){const i={};for(const r of this.templateAttributes)typeof e.getAttribute(r.name)!="string"&&r.required?console.error(new Error(`template "${r.name}" attribute is required!`)):i[ke(r.name)]=this.transformTemplateAttribute(r.name,e.getAttribute(r.name));return this.transformTemplateAttributes(i,s)}addItemByTemplate(e,s){const i=this.getTemplateAttributes(e,s),r=e.innerHTML;this.scope.items||(this.scope.items=[]),this.scope.items.push({...i,content:r})}addItemsByTemplate(){const e=this.querySelectorAll("template, .template");for(let s=0;s{var s;return e.nodeName!=="TEMPLATE"&&!((s=e.classList)!=null&&s.contains("template"))&&e.nodeName!=="#text"})}}const zd={name:"contains",read(n,t,e){if(bt(n))return n.indexOf(t)>-1;if(Array.isArray(n)){if(je(t)||console.warn("[containsFormatter] The second parameter must be of type number for arrays but is "+typeof t),t=Number(t),mt(t))return mt(e)?n[t]===e:n.includes(t)}else if(X(n)&&mt(t))return mt(e)?n[t]===e:(bt(t)||console.warn("[containsFormatter] The second parameter must be of type string for objects"+typeof t),Object.keys(n).includes(String(t)));return!1}},jl={name:"size",read(n){return n&&n.length?n.length:0}},Wl={name:"empty",read(n){return jl.read(n)<=0}},mr={name:"get",read(n,t){return X(n)||Array.isArray(n)?n[t]:bt(n)&&je(t)?n.charAt(t):null}},qd={name:"first",read(n){return mr.read(n,0)}},Qd={name:"isLast",read(n,t){return n.length===t+1}},Yd={name:"last",read(n){return mr.read(n,n.length-1)}},Kd={name:"random",read(n,t=0){if(Array.isArray(n))return n[Math.floor(Math.random()*n.length)];if(je(n)){const e=n;return Math.floor(Math.random()*(e-t+1)+t)}return null}},Gd={name:"range",read(n,t,e){return t=Number(je(t)?t:0),e=Number(je(e)?e:n.length-1),e>n.length-1&&(e=n.length-1),t>e?[]:n.slice(Number(t||0),1+e)}},Xd={name:"set",read(n,t,e){return e||(e=t),X(n)||Array.isArray(n)?n[t]=e:n=e,n}},Jd={name:"overlaps",read(n,t){for(const e of n)for(const s of t)if(e.equals&&e.equals(s)||e===s)return!0;return!1}},Zd={name:"join",read(n,t){return n.join(t)}},eu={name:"and",read(n,t){return n&&t}},tu={name:"between",read(n,...t){return n>=t[0]&&n<=t[1]}},su={name:"egt",read(n,t){return n>=t}},iu={name:"eq",read(n,t){return n===t}},nu={name:"gt",read(n,t){return n>t}},ru={name:"ne",read(n,t){return n!==t}},ou={name:"lt",read(n,t){return nt===0?n:zl(t,n%t),mu={name:"gcd",read:zl},gu={name:"even",read(n){return n%2===0}},vu={name:"uneven",read(n){return n%2!==0}},bu={name:"digits",read(n){return je(n)?n:xs(n)}},Eu={name:"args",read(n,...t){return(e,s,i,r)=>(t.push(e),t.push(s),t.push(i),t.push(r),n.apply(this,t))}},yu={name:"debug",read(n,t="debug"){return console[t](n),n}},wu={name:"default",read(n,t){return mt(n)?bt(n)?n.length>0?n:t:n===null?t:n:t}},_u={name:"is-desktop",read(){return Ld()}},Su={name:"is-mobile",read(){return Cd()}},Au={name:"call",read(n,...t){return n.apply(this,t)}},Tu={name:"call-name",read:function(n,t,...e){return n[t](...e)}},Cu={name:"map",read(n,t,e){const s=Array.prototype.slice.call(arguments);return s.splice(1,2),t[e].apply(t,s)}},Lu={name:"os",read(){return il()}},ku={name:"prefer",read(n,t){return t||n}},xu={name:"ternary",read(n,t,e){return n?t:e}},Iu={name:"append",read(n,t){return n+t}},Nu={name:"capitalize",read(n){return gd(n)}},Ou={name:"cut",read(n,t,e=""){return n?typeof n!="string"?(console.warn("[cutFormatter] Value must be of type string"),n):n.length>t?n.substring(t,t===-1?void 0:-1)+e:n:""}},Pu={name:"downcase",read(n){return n.toLowerCase()}},Du={name:"ends-with",read(n,t){return typeof n!="string"?(console.warn("[endsWithFormatter] Value must be of type string"),n):n.endsWith(t)}},Mu={name:"filled",read(n){return bt(n)&&!Wl.read(n.replace(/\s/g,""))}},sn={name:"handleize",read(n){return n?fd(n):(console.warn("[handleizeFormatter] str is not set"),"")}},Ru={name:"match",read(n,t,e){return!n||!t?!1:n.match(new RegExp(t,e))}},$u={name:"padStart",read(n,t=2,e="0"){return n.padStart(t,e)}},Bu={name:"padEnd",read(n,t=2,e="0"){return n.padEnd(t,e)}},Bn={name:"to-integer",read(n){const t=parseInt(n*1,10);return isNaN(t)?0:t}},Hn={name:"to-float",read(n){const t=parseFloat(n*1);return isNaN(t)?0:t}},Fn={name:"to-decimal",read(n){if(!Bn.read)throw new Error("toIntegerFormatter must have a read function");if(!Hn.read)throw new Error("toFloatFormatter must have a read function");const t=Bn.read(n*1),e=Hn.read(n);return t==e?t:e}},Vn={name:"is-integer",read(n){return n===+n&&n===(n|0)}},Hu=".",Fu="'",No=2,Vu={name:"numberFormat",read(n,t=No,e=Hu,s=Fu){if(!Fn.read)throw new Error("toDecimalFormatter must have a read function");if(!Vn.read)throw new Error("isIntegerFormatter must have a read function");n=je(n)?n:Fn.read(n),Vn.read(t)||(t=No);let i=(+(Math.round(+(Math.abs(n)+"e"+t))+"e"+-t)).toFixed(t);n<0&&(i="-"+i);const r=i.split(".");return r.length==2?r[0].replace(/\B(?=(\d{3})+(?!\d))/g,s)+e+r[1]:r[0].replace(/\B(?=(\d{3})+(?!\d))/g,s)}},Uu={name:"pluralize",read(n,t,e){return e===null&&(e=t+"s"),Array.isArray(n)&&(n=n.length),n===1?t:e}},ju={name:"prepend",read(n,t){return t+n}},Wu={name:"upcase",read(n){return n.toUpperCase()}},zu={name:"replace",read(n,t,e){return n.replace(new RegExp(t,"g"),e)}},qu={name:"replaceFirst",read(n,t,e){return n.replace(t,e)}},Qu={name:"slice",read(n,t,e){return n.slice(t,e)}},Yu={name:"starts-with",read(n,t){return typeof n!="string"?(console.warn("[startsWithFormatter] Value must be of type string"),n):n.startsWith(t)}},Ku={name:"strip",read(n){return n.trim()}},Gu={name:"strip-html",read(n){return Ri(n)}},Xu={name:"boolean",read(n){return n==="true"?!0:n==="false"?!1:!!n}},Ju={name:"is-array",read:Array.isArray},Zu={name:"is-boolean",read:Ot},ep={name:"is-defined",read:mt},tp={name:"is-number",read:je},sp={name:"is-object",read:X},ip={name:"is-string",read(n){return bt(n)}},np={name:"is-undefined",read:Ga},rp={name:"json",read(n,t=2,e=!0){return Gi(n,t,e)}},op={name:"parse",read(n){return X(n)||Array.isArray(n)||typeof n=="boolean"||typeof n=="number"?(console.warn("[parseFormatter] You do not need to parse the value because since it already been parsed"),n):typeof n=="string"?Ze(n,!0).value:null}},ap={name:"toBase64",read(n){return ad(n)}},lp={name:"to-string",read(n,t){if(Array.isArray(n))for(const e in n)n[e]&&(n[e]=Ue(n[e]));else if(X(n))for(const e in n)n[e]=Ue(n[e]);else n=Ue(n);return t?n||t:n}},cp={name:"to-number",read(n,t){const e=cd(n);return t?e||t:e}},hp=Object.freeze(Object.defineProperty({__proto__:null,andFormatter:eu,appendFormatter:Iu,argsFormatter:Eu,betweenFormatter:tu,booleanFormatter:Xu,callFormatter:Au,callNameFormatter:Tu,capitalizeFormatter:Nu,containsFormatter:zd,cutFormatter:Ou,debugFormatter:yu,defaultFormatter:wu,digitsFormatter:bu,dividedByFormatter:pu,downcaseFormatter:Pu,egtFormatter:su,eltFormatter:au,emptyFormatter:Wl,endsWithFormatter:Du,eqFormatter:iu,evenFormatter:gu,filledFormatter:Mu,firstFormatter:qd,gcdFormatter:mu,getFormatter:mr,gtFormatter:nu,handleizeFormatter:sn,isArrayFormatter:Ju,isBooleanFormatter:Zu,isDefinedFormatter:ep,isDesktopFormatter:_u,isIntegerFormatter:Vn,isLastFormatter:Qd,isMobileFormatter:Su,isNumberFormatter:tp,isObjectFormatter:sp,isStringFormatter:ip,isUndefinedFormatter:np,joinFormatter:Zd,jsonFormatter:rp,lastFormatter:Yd,ltFormatter:ou,mapFormatter:Cu,matchFormatter:Ru,minusFormatter:du,moduloFormatter:fu,neFormatter:ru,notFormatter:cu,numberFormatFormatter:Vu,orFormatter:lu,osFormatter:Lu,overlapsFormatter:Jd,padEndFormatter:Bu,padStartFormatter:$u,parseFormatter:op,pluralizeFormatter:Uu,plusFormatter:hu,preferFormatter:ku,prependFormatter:ju,randomFormatter:Kd,rangeFormatter:Gd,replaceFirstFormatter:qu,replaceFormatter:zu,setFormatter:Xd,sizeFormatter:jl,sliceFormatter:Qu,startsWithFormatter:Yu,stripFormatter:Ku,stripHtmlFormatter:Gu,ternaryFormatter:xu,timesFormatter:uu,toBase64Formatter:ap,toDecimalFormatter:Fn,toFloatFormatter:Hn,toIntegerFormatter:Bn,toNumberFormatter:cp,toStringFormatter:lp,unevenFormatter:vu,upcaseFormatter:Wu},Symbol.toStringTag,{value:"Module"})),dp={formatters:hp,binders:Hd,services:Nd,components:Wd,adapters:Pd,init(n={}){return Ns.setSingleton(n),window.onerror=(t,e,s,i,r)=>{console.error(t,e,s,i,r)},window.addEventListener("error",t=>{console.error(t)}),this}},Bt=class{constructor(){a(this,"history",[]);return Bt.instance||(Bt.instance=this),Bt.instance}currentStatus(){return this.history[this.history.length-1]}prevStatus(){const t=this.history;return t.length<2?null:t[t.length-2]}add(t,e=null){this.history.push({namespace:e,url:t})}};let ni=Bt;a(ni,"instance");const vs="router-error",up="no-barba",pp="no-barba-prefetch";class nn{constructor(t="replace"){a(this,"oldContainer");a(this,"newContainer");a(this,"newContainerLoading");a(this,"deferred",vn());a(this,"action");this.action=t}async init(t,e){this.oldContainer=t,this.deferred=vn();const s=vn();return this.newContainerLoading=s.promise,this.start(),this.newContainer=await e,s.resolve(this.newContainer),this.deferred.promise}async done(){if(!this.oldContainer)throw new Error("Can't remove old container");if(this.action==="replace"&&this.oldContainer.remove(),!this.newContainer)throw new Error("Can't show new container");return this.newContainer.style.visibility="visible",this.deferred.resolve(void 0)}}class fp extends nn{async start(){if(!this.newContainerLoading)throw new Error("this.newContainerLoading is not set");await this.newContainerLoading,this.finish()}async finish(){return document.body.scrollTop=0,this.done()}}class ql extends nn{constructor(e=!0){super("replace");a(this,"scrollToTop");a(this,"durationMs",200);this.scrollToTop=e}async start(){if(!this.newContainerLoading)throw new Error("this.newContainerLoading is not set");this.oldContainer&&(this.oldContainer.style.transition=`opacity ${this.durationMs}ms`,this.oldContainer.style.opacity="0"),this.scrollToTop&&await dr(window,"start","vertical","smooth");const e=await this.newContainerLoading;e.style.opacity="0",e.style.transition=`opacity ${this.durationMs}ms`,setTimeout(()=>{this.finish(e)},this.durationMs)}async finish(e){return e.style.opacity="1",this.done()}}class Os extends nn{constructor(e="replace",s=!0){super(e);a(this,"action");a(this,"scrollToTop");this.action=e,this.scrollToTop=s}async start(){if(!this.newContainerLoading)throw new Error("this.newContainerLoading is not set");this.oldContainer&&(this.oldContainer.style.display="none"),this.scrollToTop&&await dr(window,"start","vertical","smooth"),await this.newContainerLoading,await this.finish(),this.oldContainer&&(this.oldContainer.style.display="")}async finish(){return this.done()}}class mp{constructor(){a(this,"namespace");a(this,"container");a(this,"dispatcher",$.getInstance())}extend(t){return Tt({deep:!1},this,t)}init(){this.dispatcher.on("initStateChange",(t,e,s)=>{s&&s.namespace===this.namespace&&this.onLeave()}),this.dispatcher.on("newPageReady",(t,e,s,i)=>{this.container=i,e.namespace===this.namespace&&this.onEnter()}),this.dispatcher.on("transitionCompleted",(t,e,s)=>{e.namespace===this.namespace&&this.onEnterCompleted(),s&&s.namespace===this.namespace&&this.onLeaveCompleted()})}}class ct{static getPrefetchLinkElements(t){return t.querySelectorAll('link[href][rel="dns-prefetch"], link[href][rel="preconnect"], link[href][rel="prefetch"], link[href][rel="subresource"], link[href][rel="preload"], link[href][rel="router-preload"]')}static parseTitle(t){let e="";const s=t.querySelector("title");return s&&s.innerText&&(e=s.innerText),e}static parseResponse(t,e,s,i=!0){let r="",o=[];const l=document.createElement("template");return l.innerHTML=t,e&&(r=this.parseTitle(l.content)),i&&(o=this.getPrefetchLinkElements(l.content)),{container:this.getContainer(l,s),title:r,prefetchLinks:o}}static parseInitial(t,e,s=!0){let i="",r=[];const o=this.getContainer(document,e);return t&&(i=this.parseTitle(document)),s&&(r=this.getPrefetchLinkElements(document)),{container:o,title:i,prefetchLinks:r}}static getContainer(t,e){if(!t)throw new Error("Barba.js: [getContainer] No element to get container from, maybe the DOM is not ready!");const s=this.parseContainer(t,e);if(!s)throw new Error("[DOM] No container found");return s}static getNamespace(t){return t&&t.dataset&&t.dataset.namespace?t.dataset.namespace:null}static putContainer(t,e){t=t,t.style.visibility="hidden",e.appendChild(t)}static parseContainer(t,e){if(!t){const i=new Error("New page not loaded!");throw console.error(i,t),i}let s;if(t.content?s=t.content.querySelector(e):s=t.querySelector(e),!s){const i=new Error(`No container with selector "${e}" found!`);throw console.error(i,t),i}return s}}const Ht=class{constructor(t){if(this.viewId=t,this.viewId=t,Ht.instances[this.viewId])return Ht.instances[this.viewId];Ht.instances[this.viewId]=this,this.onLinkEnterIntern=this.onLinkEnterIntern.bind(this)}static getInstance(t="main"){const e=Ht.instances[t];return e||new this(t)}init(t=!1){if(!window.history.pushState)return!1;t&&(this.deInit(),document.body.addEventListener("mouseover",this.onLinkEnterIntern,{passive:!0}),document.body.addEventListener("touchstart",this.onLinkEnterIntern,{passive:!0}))}deInit(){document.body.removeEventListener("mouseover",this.onLinkEnterIntern),document.body.removeEventListener("touchstart",this.onLinkEnterIntern)}initBinder(t,e){if(!window.history.pushState)return!1;this.deInitBinder(t,e),t.addEventListener("mouseover",this.onLinkEnter.bind(this,e,t),{passive:!0}),t.addEventListener("touchstart",this.onLinkEnter.bind(this,e,t),{passive:!0})}deInitBinder(t,e){t.removeEventListener("mouseover",this.onLinkEnter.bind(this,e,t)),t.removeEventListener("touchstart",this.onLinkEnter.bind(this,e,t))}onLinkEnter(t,e,s){if(e.classList&&(e.classList.contains(pp)||e.classList.contains(vs)))return;t=Se(t).url;const i=te.preventCheck(t,e,s);if(t&&i){const r=te.getInstance(this.viewId);r?r.loadResponseCached(t,!1,!1).catch(o=>{e.classList.add(vs),console.error(t),console.error(o)}):(console.warn(`[Prefetch.onLinkEnter] No pjax instance for viewId "${this.viewId}" found!`),e.classList.add(vs))}}url(t){t=Se(t).url;const e=te.preventCheck(t);if(t&&e){const s=te.getInstance(this.viewId);s?s.loadResponseCached(t,!1,!1).catch(i=>{console.error(i)}):console.warn(`[Prefetch.url] No pjax instance for viewId "${this.viewId}" found!`)}}onLinkEnterIntern(t){let e=Ji(t);if(!e)throw new Error("HTML Element not set");for(;e&&!te.getHref(e);)e=e.parentNode;if(!e||e.nodeName!=="A")return;const s=te.getHref(e);if(!(e.classList.contains("route")||e.hasAttribute("rv-route"))){if(!s){console.warn("Url is not defined, you can't cache the link without the url. Please make sure your element has the href attribute or pass the url directly to this function.",e);return}return this.onLinkEnter(s,e,t)}}};let Vt=Ht;a(Vt,"instances",{});var Ql=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function gp(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Wt=1e3,zt=Wt*60,qt=zt*60,Et=qt*24,vp=Et*7,bp=Et*365.25,Ep=function(n,t){t=t||{};var e=typeof n;if(e==="string"&&n.length>0)return yp(n);if(e==="number"&&isFinite(n))return t.long?_p(n):wp(n);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(n))};function yp(n){if(n=String(n),!(n.length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(n);if(t){var e=parseFloat(t[1]),s=(t[2]||"ms").toLowerCase();switch(s){case"years":case"year":case"yrs":case"yr":case"y":return e*bp;case"weeks":case"week":case"w":return e*vp;case"days":case"day":case"d":return e*Et;case"hours":case"hour":case"hrs":case"hr":case"h":return e*qt;case"minutes":case"minute":case"mins":case"min":case"m":return e*zt;case"seconds":case"second":case"secs":case"sec":case"s":return e*Wt;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return e;default:return}}}}function wp(n){var t=Math.abs(n);return t>=Et?Math.round(n/Et)+"d":t>=qt?Math.round(n/qt)+"h":t>=zt?Math.round(n/zt)+"m":t>=Wt?Math.round(n/Wt)+"s":n+"ms"}function _p(n){var t=Math.abs(n);return t>=Et?Ys(n,t,Et,"day"):t>=qt?Ys(n,t,qt,"hour"):t>=zt?Ys(n,t,zt,"minute"):t>=Wt?Ys(n,t,Wt,"second"):n+" ms"}function Ys(n,t,e,s){var i=t>=e*1.5;return Math.round(n/e)+" "+s+(i?"s":"")}let Sp=class{constructor(){this.cache=new Map}get(t){return this.cache.get(t)}set(t,e){this.cache.set(t,e)}keys(){return Array.from(this.cache.keys())}del(t){this.cache.delete(t)}clear(){this.cache.clear()}};var Ap=Sp;const Oo=Ep,Tp=Ap;function Cp({cleanupInterval:n="5 mins",customStorage:t}={}){let e=t||new Tp,s;const i=m=>typeof m>"u",r=m=>typeof m<"u",o=m=>typeof m=="function",l=m=>typeof m=="number",c=m=>m&&new Date(m).getTime(){E.indexOf(m)===0&&e.del(E)});return}e.del(m)}function p(){return e.clear()}function f(){clearInterval(s)}return n&&(s=setInterval(async()=>{(await e.keys()).forEach(async v=>{const b=await e.get(v);if(b){const E=b[1];c(E)&&e.del(v)}})},Oo(n))),{resolve:d,del:u,clear:p,teardown:f}}var Lp=Cp;const kp=gp(Lp);class Yl{constructor(){a(this,"data");this.data={}}set(t,e){return this.data[t]=e,this.data[t]}get(t){return this.data[t]}reset(){this.data={}}}function Ct(n){return new Promise((t,e)=>{n.oncomplete=n.onsuccess=()=>t(n.result),n.onabort=n.onerror=()=>e(n.error)})}function xp(n,t){const e=indexedDB.open(n);e.onupgradeneeded=()=>e.result.createObjectStore(t);const s=Ct(e);return(i,r)=>s.then(o=>r(o.transaction(t,i).objectStore(t)))}let yn;function $s(){return yn||(yn=xp("keyval-store","keyval")),yn}function Ip(n,t=$s()){return t("readonly",e=>Ct(e.get(n)))}function Np(n,t,e=$s()){return e("readwrite",s=>(s.put(t,n),Ct(s.transaction)))}function Op(n,t=$s()){return t("readwrite",e=>(e.delete(n),Ct(e.transaction)))}function Pp(n=$s()){return n("readwrite",t=>(t.clear(),Ct(t.transaction)))}function Dp(n,t){return n.openCursor().onsuccess=function(){this.result&&(t(this.result),this.result.continue())},Ct(n.transaction)}function Mp(n=$s()){return n("readonly",t=>{if(t.getAllKeys)return Ct(t.getAllKeys());const e=[];return Dp(t,s=>e.push(s.key)).then(()=>e)})}const Rp={get:Ip,set:Np,keys:Mp,del:Op,clear:()=>Pp()};kp({customStorage:window.ssr?void 0:Rp});const re=class{constructor({id:t,action:e="replace",wrapper:s,containerSelector:i="[data-namespace]",listenAllLinks:r=!1,listenPopstate:o=!0,parseTitle:l=!0,changeBrowserUrl:c=!0,prefetchLinks:h=!0,scrollToTop:d=!0,scrollToAnchorOffset:u=yt.options.scrollToAnchorOffset}){a(this,"history",new ni);a(this,"cacheEnabled",!0);a(this,"transitionProgress",!1);a(this,"listenAllLinks");a(this,"listenPopstate");a(this,"parseTitle");a(this,"changeBrowserUrl");a(this,"dispatcher");a(this,"transition");a(this,"wrapper");a(this,"viewId","main");a(this,"containerSelector");a(this,"prefetchLinks");a(this,"scrollToAnchorOffset");t&&(this.viewId=t);let p=this;return this.scrollToAnchorOffset=u||0,this.dispatcher=new $(this.viewId),this.listenAllLinks=r,this.listenPopstate=o,this.parseTitle=l,this.changeBrowserUrl=c,this.containerSelector=i,this.prefetchLinks=h,re.instances[this.viewId]&&(p=re.instances[this.viewId]),p.transition=p.transition||new Os(e,d),p.wrapper=p.wrapper||s,p.containerSelector=p.containerSelector||i,p.listenAllLinks=Ot(p.listenAllLinks)?p.listenAllLinks:r,p.listenPopstate=Ot(p.listenPopstate)?p.listenPopstate:o,p.parseTitle=Ot(p.parseTitle)?p.parseTitle:l,p.changeBrowserUrl=Ot(p.changeBrowserUrl)?p.changeBrowserUrl:c,p.prefetchLinks=Ot(p.prefetchLinks)?p.prefetchLinks:h,p.wrapper&&p.wrapper.setAttribute("aria-live","polite"),re.instances[this.viewId]=p,re.instances[this.viewId]}static getInstance(t="main"){const e=re.instances[t];return e||console.warn(`[Pjax.getInstance] No pjax instance for viewId "${t}" found!`),e}static preventCheckUrl(t){const e=document.createElement("a");return e.setAttribute("href",t),!(!e||!t||En(t)===En(location.href)||window.location.protocol!==e.protocol||window.location.hostname!==e.hostname||Io()!==Io(e.port))}static preventCheck(t,e,s){return!(!window.history.pushState||!this.preventCheckUrl(t)||s&&(s&&s.which&&s.which>1||s.metaKey||s.ctrlKey||s.shiftKey||s.altKey)||e&&(e.target&&e.target==="_blank"||e.getAttribute&&typeof e.getAttribute("download")=="string"||e.classList.contains(up)))}static getHref(t){if(t){if(t.getAttribute&&typeof t.getAttribute("xlink:href")=="string")return t.getAttribute("xlink:href")||void 0;if(typeof t.href=="string"||t.hasAttribute&&t.hasAttribute("href")){const e=t.href||t.getAttribute("href");if(!e)throw console.error("href attribute not found for element: ",t),new Error("href attribute not found!");return e}}}setActiveWrapper(t){this.wrapper=t}start(){if(this.wrapper)try{this.init(this.wrapper,this.listenAllLinks,this.listenPopstate)}catch(t){console.error(t)}else console.error("Can't init pjax without wrapper")}getCurrentUrl(){return En($i())}goTo(t,e=!1){if(e){const s=window.open(t,"_blank");return s?s.focus():!1}if(t.startsWith("http")&&(t=Se(t).url),t.startsWith("http"))this.forceGoTo(t);else return this.changeBrowserUrl&&window.history.pushState(null,"",t),this.onStateChange(void 0,t)}getTransition(){return this.transition||new Os}prefetchLink(t){if(t=Se(t).url,re.preventCheckUrl(t))return this.loadResponseCached(t,!0,!1)}prefetchLinkElement(t,e){const s=t.getAttribute("rel"),i=re.getHref(t);if(s==="router-preload"&&i&&this.cacheEnabled&&!t.classList.contains(vs))try{this.prefetchLink(i)}catch(r){t.classList.add(vs),console.error(r)}e.appendChild(t)}removePrefetchLinks(t){t.querySelectorAll('link[href][rel="dns-prefetch"], link[href][rel="preconnect"], link[href][rel="prefetch"], link[href][rel="subresource"], link[href][rel="preload"], link[href][rel="router-preload"]').forEach(s=>{s&&s.parentNode&&s.parentNode.removeChild(s)})}replacePrefetchLinkElements(t){const e=document.head||document.getElementsByTagName("head")[0];this.removePrefetchLinks(e),t.forEach(s=>{this.prefetchLinkElement(s,e)})}async loadCached(t){try{const{responsePromise:e}=await this.loadResponseCached(t,!1,!0);if(!this.wrapper)throw new Error("[Pjax] you need a wrapper!");const s=await e;return ct.putContainer(s.container,this.wrapper),this.parseTitle===!0&&s.title&&(document.title=s.title),this.prefetchLinks===!0&&s.prefetchLinks&&this.replacePrefetchLinkElements(s.prefetchLinks),s.container}catch(e){throw console.error(e),this.forceGoTo(t),e}}async loadResponseCached(t,e=!1,s=!0){let i;try{if(this.cacheEnabled&&(i=re.cache.get(t),i))return{fromCache:!0,responsePromise:i};i=this.loadResponse(t,e),this.cacheEnabled&&i&&re.cache.set(t,i)}catch(r){throw console.error(r),s&&this.forceGoTo(t),r}return{fromCache:!1,responsePromise:i}}async loadResponse(t,e=!1){const s=e?{cache:"force-cache"}:{},i=await es.get(t,void 0,"html",{},s);if(!i||!i.body)throw new Error("No body!");return ct.parseResponse(i.body,this.parseTitle,this.containerSelector,this.prefetchLinks)}bindEvents(t,e){t&&document.addEventListener("click",this.onLinkClickIntern.bind(this)),e&&window.addEventListener("popstate",this.onStateChange.bind(this))}forceGoTo(t){console.warn("forceGoTo",t),t&&t.href&&(window.location=t),typeof t=="string"&&(window.location.href=t)}onLinkClickIntern(t){let e=Ji(t);for(;e&&!re.getHref(e);)e=e.parentNode;if(!e||e.nodeName!=="A")return;const s=re.getHref(e);if(!(e.classList.contains("route")||e.hasAttribute("rv-route"))){if(!s)throw new Error("Url is not defined, you can't cache the link without the url. Please make sure your element has the href attribute or pass the url directly to this function.");return e.classList.contains("route")||e.hasAttribute("rv-route")?!1:this.onLinkClick(t,e,s)}}onLinkClick(t,e,s,i=!1){const{url:r,location:o}=Se(s),{location:l}=Se();if(o.hash&&l.pathname===o.pathname){let h=o.hash.slice(1);h=decodeURI(h);const d=document.getElementById(h);if(d)return t.stopPropagation(),t.preventDefault(),this.changeBrowserUrl&&window.history.pushState(null,"",r),Zt(d,this.scrollToAnchorOffset)}if(!r)throw new Error("url is falsy");re.preventCheck(r,e,t)&&(t.stopPropagation(),t.preventDefault(),this.dispatcher.trigger("linkClicked",e,t),this.goTo(r,i))}async onStateChange(t,e=this.getCurrentUrl()){e=Se(e).url;const s=Se(this.history.currentStatus().url).url;if(this.changeBrowserUrl&&s===e)return!1;this.history.add(e),this.dispatcher.trigger("initStateChange",this.viewId,this.history.currentStatus(),this.history.prevStatus());const i=ct.getContainer(document,this.containerSelector),r=this.loadCached(e),o=this.getTransition();this.transitionProgress=!0;const l=o.init(i,r);this.onNewContainerLoaded(await r),await l,this.onTransitionEnd()}onNewContainerLoaded(t){const e=this.history.currentStatus();e.namespace=ct.getNamespace(t);const s=To(t);this.dispatcher.trigger("newPageReady",this.viewId,this.history.currentStatus(),this.history.prevStatus(),t,t.innerHTML,s,!1)}onTransitionEnd(){this.transitionProgress=!1,this.dispatcher.trigger("transitionCompleted",this.viewId,this.history.currentStatus(),this.history.prevStatus())}init(t,e,s){const i=ct.parseInitial(this.parseTitle,this.containerSelector,this.prefetchLinks),r=window.location.pathname;if(this.cacheEnabled){const l=Se(window.location.href).url;re.cache.get(r)||this.loadResponseCached(l,!1,!1)}this.replacePrefetchLinkElements(i.prefetchLinks),this.wrapper=t,this.history.add(this.getCurrentUrl(),ct.getNamespace(i.container)),this.dispatcher.trigger("initStateChange",this.viewId,this.history.currentStatus());const o=To(i.container);this.dispatcher.trigger("newPageReady",this.viewId,this.history.currentStatus(),{},i.container,i.container.innerHTML,o,!0),this.dispatcher.trigger("transitionCompleted",this.viewId,this.history.currentStatus()),this.bindEvents(e,s)}};let te=re;a(te,"cache",new Yl),a(te,"instances",{});class yt{static get options(){return this._options}constructor(){}static getSingleton(){if(this.instance)return this.instance;throw new Error("Singleton of RouterService not defined, please call setSingleton first!")}static setSingleton(t={}){return this.instance?(console.warn("Singleton of RouterService already defined!"),this.instance):(t.defaultTransition=t.defaultTransition??new Os,t.scrollToAnchorOffset=t.scrollToAnchorOffset??0,this._options=t,this.instance=new this,this.instance)}}a(yt,"_options"),a(yt,"instance");const $p=Object.freeze(Object.defineProperty({__proto__:null,BaseTransition:nn,BaseView:mp,CustomTransition:fp,Dom:ct,FadeTransition:ql,HideShowTransition:Os,Pjax:te,Prefetch:Vt,RouterService:yt},Symbol.toStringTag,{value:"Module"})),Bp=sn.read;class Un extends A{constructor(){super(...arguments);a(this,"nested",null)}async routine(e,s){const i=e;s=s||{},s.listenAllLinks=!1,s.listenPopstate=!1,s.parseTitle=!1,s.transition=s.transition||new Os,s.viewId=s.viewId||e.getAttribute("id")||Bp(s.url),s.containerSelector=s.containerSelector||"[data-namespace]",s.changeBrowserUrl=!1;const r=new te(s),{responsePromise:o}=await r.loadResponseCached(s.url,!1,!1),l=await o;i.replaceWith(l.container),l.container.style.visibility="visible",X(this.view.models)||(this.view.models={}),this.nested&&this.nested.unbind(),this.nested=new ve(l.container,this.view.models,this.view.options),this.nested.bind()}unbind(){this.nested&&this.nested.unbind()}}a(Un,"key","view-static"),a(Un,"block",!0);class Kl extends A{constructor(){super(...arguments);a(this,"prefetch");a(this,"options",{url:"",viewId:"main",removeAfterActivation:!1,newTab:!1,newTabOnExtern:!0});a(this,"onClick",this._onClick.bind(this))}_onClick(e){const s=te.getInstance(this.options.viewId);if(Zi(this.options.url,!0))console.info("already on this site, do nothing"),e.stopPropagation(),e.preventDefault();else if(Id(this.options.url)){if(!s)return;e.stopPropagation(),e.preventDefault();const i=this.options.newTab||this.options.newTabOnExtern;s.goTo(this.options.url,i)}else if(this.options.url){if(!s)return;s.onLinkClick(e,this.el,this.options.url,this.options.newTab)}this.options.removeAfterActivation&&this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)}bind(e){e.classList.add("route"),!window.ssr&&(this.onClick=this.onClick.bind(this),e.addEventListener("click",this.onClick))}routine(e,s){bt(s)?this.options.url=s:X(s)&&(this.options=s),this.options.viewId=this.options.viewId||"main",this.prefetch=new Vt(this.options.viewId),this.options.newTab=!1;const i=e.tagName==="A";if(!this.options.url&&i){const r=e.getAttribute("href");r&&(this.options.url=r)}e.getAttribute("target")==="_blank"&&(this.options.newTab=!0),this.options.url=Se(this.options.url).url,i&&(!e.href||!e.getAttribute("href"))&&this.options.url&&(e.setAttribute("href",this.options.url),e.href=this.options.url),this.options.newTab||this.prefetch.initBinder(e,this.options.url)}unbind(e){var s;(s=this.prefetch)==null||s.deInitBinder(e,this.options.url),e.removeEventListener("click",this.onClick)}}a(Kl,"key","route");class Gl extends A{constructor(){super(...arguments);a(this,"dispatcher",new $("main"));a(this,"url");a(this,"className","");a(this,"onUrlChange",this._onUrlChange.bind(this))}_onUrlChange(){if(this.url){if(Zi(this.url))return this.el.classList.add(this.className),this.el.getAttribute("type")==="radio"&&(this.el.checked=!0),!0;this.el.classList.remove(this.className),this.el.getAttribute("type")==="radio"&&(this.el.checked=!1)}return!1}bind(){this.dispatcher.on("newPageReady",this.onUrlChange)}routine(e,s){this.url=s,this.className=this.args[0].toString()||"active";const i=e.tagName==="A";if(!this.url&&i){const r=e.getAttribute("href");r&&(this.url=r)}this.onUrlChange()}unbind(){this.dispatcher.off("newPageReady",this.onUrlChange)}}a(Gl,"key","route-class-*");class Xl extends A{routine(t,e){var i;if(window.ssr)return;const s=t.tagName==="A";if(!e&&s){const r=t.getAttribute("href");r&&(e=r)}e&&((i=te.getInstance())==null||i.prefetchLink(e))}}a(Xl,"key","route-preload");class Jl extends A{constructor(){super(...arguments);a(this,"dispatcher",new $("main"));a(this,"className");a(this,"url");a(this,"onUrlChange",this._onUrlChange.bind(this))}_onUrlChange(){if(!this.url)throw new Error("url is not defined!");if(!this.className)throw new Error("className is not defined!");return kd(this.url)?(this.el.classList.add(this.className),this.el.getAttribute("type")==="radio"&&(this.el.checked=!0),!0):(this.el.classList.remove(this.className),this.el.getAttribute("type")==="radio"&&(this.el.checked=!1),!1)}routine(e,s){this.url=s,this.className=this.args[0].toString()||"active";const i=e.tagName==="A";if(!this.url&&i){const r=e.getAttribute("href");r&&(this.url=r)}this.onUrlChange()}bind(){this.dispatcher.on("newPageReady",this.onUrlChange)}unbind(){this.dispatcher.off("newPageReady",this.onUrlChange)}}a(Jl,"class","parent-route-class-*");const wn=()=>{window.history.back()};class Zl extends A{constructor(){super(...arguments);a(this,"priority",3e3);a(this,"eventName")}unbind(e){this.eventName&&e.removeEventListener(this.eventName,wn)}routine(e){if(this.args===null)throw new Error("args is null");this.eventName&&e.removeEventListener(this.eventName,wn),this.eventName=this.args[0],e.addEventListener(this.args[0],wn)}}a(Zl,"key","route-back-on-*");const Hp=Object.freeze(Object.defineProperty({__proto__:null,ParentRouteClassStarBinder:Jl,RouteBackOnStarBinder:Zl,RouteBinder:Kl,RouteClassStarBinder:Gl,RoutePreloadBinder:Xl,ViewStaticBinder:Un},Symbol.toStringTag,{value:"Module"})),Br=class extends H{constructor(){super();a(this,"autobind",!1);a(this,"scope",{src:"",id:"",async:!0,defer:!0})}static get observedAttributes(){return["src","id","async","defer"]}connectedCallback(){super.connectedCallback(),super.init(Br.observedAttributes)}async onReady(){await super.onReady(),this.scope.id||(this.scope.id=el("script-")),Ed(this.scope.src,this.scope.id,this.scope.async)}requiredAttributes(){return["src"]}template(){return null}};let ri=Br;a(ri,"tagName","router-load-script");const Cs=class extends H{constructor(){super();a(this,"events",$.getInstance("main"));a(this,"nested",null);a(this,"wrapper",null);a(this,"pjax",null);a(this,"prefetch",null);a(this,"scope",{id:"main",action:"replace",scrollToTop:!0,listenAllLinks:!0,listenPopstate:!0,scrollToAnchorHash:!0,scrollToAnchorOffset:yt.options.scrollToAnchorOffset,datasetToRootScope:!0,parseTitle:!0,changeBrowserUrl:!0,prefetchLinks:!0,transition:yt.options.defaultTransition})}static get observedAttributes(){return["id","action","container-selector","scroll-to-top","listen-all-links","listen-popstate","scroll-to-anchor-hash","scroll-to-anchor-offset","dataset-to-root-scope","parse-title","change-browser-url","prefetch-links"]}connectedCallback(){super.connectedCallback(),this.init(Cs.observedAttributes)}addEventListeners(){this.events.on("newPageReady",this.onPageReady,this),this.events.on("initStateChange",this.onTransitionInit,this),this.events.on("transitionCompleted",this.onTransitionCompleted,this)}removeEventListeners(){this.events.off("newPageReady",this.onPageReady,this),this.events.off("initStateChange",this.onTransitionInit,this),this.events.off("transitionCompleted",this.onTransitionCompleted,this)}getContainerSelector(){return this.scope.id==="main"?`${Cs.tagName} > *:first-child`:`${Cs.tagName}#${this.scope.id} > *:first-child`}initAndStartPjax(){if(!this.scope.id){console.error("Id attribute is required!");return}const e={id:this.scope.id,action:this.scope.action,wrapper:this,containerSelector:this.getContainerSelector(),listenAllLinks:!!this.scope.listenAllLinks,listenPopstate:!!this.scope.listenPopstate,transition:this.scope.transition,parseTitle:!!this.scope.parseTitle,changeBrowserUrl:!!this.scope.changeBrowserUrl,prefetchLinks:!!this.scope.prefetchLinks,scrollToTop:!!this.scope.scrollToTop};this.pjax=new te(e),this.pjax.setActiveWrapper(this),this.prefetch=new Vt(this.scope.id),this.prefetch.init(e.prefetchLinks),this.pjax.start()}onPageReady(e,s,i,r,o,l,c){if(e!==this.scope.id){console.warn("not the right view",this.scope.id,e,l);return}if(this.debug("New page ready!",this.innerHTML),this.scope.datasetToRootScope&&(this.scope.$root||(this.scope.$root={}),this.scope.$root.dataset=l),!c){if(this.view=this.getView(),!this.view){console.warn("View ist not ready!");return}this.view.bind()}}async onTransitionInit(e){e===this.scope.id&&this.setTransitionClass("init")}async onTransitionCompleted(e){if(e===this.scope.id){if(this.setTransitionClass("complete"),this.scope.scrollToAnchorHash){let s=null;if(window.location.hash.substr(1)&&(s=document.getElementById(window.location.hash.substr(1)),s))return await Zt(s,this.scope.scrollToAnchorOffset,window)}if(this.scope.scrollToTop)return await dr(window,"start","vertical","smooth")}}setTransitionClass(e){this.classList.remove("transition-init"),this.classList.remove("transition-complete"),this.classList.add(`transition-${e}`)}requiredAttributes(){return[]}parsedAttributeChangedCallback(e,s,i,r){switch(super.parsedAttributeChangedCallback(e,s,i,r),e){case"id":this.events=$.getInstance(this.scope.id);break}}async beforeBind(){await super.beforeBind(),this.addEventListeners(),this.initAndStartPjax()}template(){return null}};let oi=Cs;a(oi,"tagName","router-view");const Fp=Object.freeze(Object.defineProperty({__proto__:null,RouterLoadScriptComponent:ri,RouterViewComponent:oi},Symbol.toStringTag,{value:"Module"})),Vp={binders:Hp,components:Fp,services:$p,formatters:{},init(n={}){return yt.setSingleton(n),this}},gr=["os","dark","light"],ec={dimension:0,name:"xs"},tc={dimension:576,name:"sm"},sc={dimension:768,name:"md"},ic={dimension:992,name:"lg"},nc={dimension:1200,name:"xl"},rc={dimension:1400,name:"xxl"},Fi={breakpoints:[ec,tc,sc,ic,nc,rc],allowStoreDataInBrowser:!0},D={nsPrefix:"bs5-toggle-button:",eventNames:{toggle:"toggle",toggled:"toggled",init:"init",state:"state"}},jn={elEventNames:{removed:"removed",added:"added"}},Wn={elEventNames:{removed:"removed",added:"added"}},Up=Object.freeze(Object.defineProperty({__proto__:null,DEFAULT_BP_LG:ic,DEFAULT_BP_MD:sc,DEFAULT_BP_SM:tc,DEFAULT_BP_XL:nc,DEFAULT_BP_XS:ec,DEFAULT_BP_XXL:rc,DEFAULT_MODULE_OPTIONS:Fi,TOGGLE_ATTRIBUTE:jn,TOGGLE_BUTTON:D,TOGGLE_CLASS:Wn,themeChoices:gr},Symbol.toStringTag,{value:"Module"})),Ye=class{constructor(t){a(this,"_options",Fi);a(this,"_events",$.getInstance("bs5"));a(this,"_activeBreakpoint",null);a(this,"onViewChanges",Oe(this._onViewChanges.bind(this)));this._options=t,this.sortBreakpoints(this._options.breakpoints),this._onViewChanges(),this.addEventListeners()}static getSingleton(){if(Ye.instance)return Ye.instance;throw new Error("Singleton of Bs5Service not defined, please call `Bs5Service.setSingleton` or `bs5Module.init` first!")}static setSingleton(t=Fi){if(Ye.instance)throw new Error("Singleton of Bs5Service already defined!");return Ye.instance=new Ye(t),Ye.instance}onBreakpointChanges(){this._events.trigger("breakpoint:changed",this.activeBreakpoint)}setActiveBreakpoint(t){var e;t&&t.name!==((e=this.activeBreakpoint)==null?void 0:e.name)&&(this._activeBreakpoint=t,this.onBreakpointChanges())}addEventListeners(){window.addEventListener("resize",this.onViewChanges,{passive:!0})}removeEventListeners(){window.removeEventListener("resize",this.onViewChanges)}_onViewChanges(){const t=this.getBreakpointByDimension(ur().w)||this.getBreakpointByName("xs");t&&this.setActiveBreakpoint(t)}sortBreakpoints(t){t.sort((e,s)=>e.dimension-s.dimension)}get options(){return this._options}get activeBreakpoint(){return this._activeBreakpoint}get breakpointNames(){return this.options.breakpoints.map(t=>t.name)}get events(){return this._events}on(t,e,s){return this.events.on(t,e,s)}once(t,e,s){return this.events.once(t,e,s)}off(t,e,s){return this.events.off(t,e,s)}getBreakpointByDimension(t,e){e=e||this.options.breakpoints;for(let i=0;ir.dimension&&t=s.dimension?s:null}getBreakpointByName(t,e){e=e||this.options.breakpoints;const s=e.find(i=>i.name===t);return s||null}getNextBreakpointByName(t){const e=this.breakpointNames,s=e.indexOf(t);if(s<0)throw new Error(`the breakpoint "${t}" does not exist!`);return s===e.length-1?null:e[s+1]}getPrevBreakpointByName(t){const e=this.breakpointNames,s=e.indexOf(t);if(s<0)throw new Error(`the breakpoint "${t}" does not exist!`);return s===0?null:e[s-1]}isBreakpointGreaterThan(t,e){const s=this.getBreakpointByName(t),i=this.getBreakpointByName(e);return s&&i?s.dimension>i.dimension:null}isBreakpointSmallerThan(t,e){const s=this.getBreakpointByName(t),i=this.getBreakpointByName(e);return s&&i?s.dimension"u")return!1;var t=fe(n).ShadowRoot;return n instanceof t||n instanceof ShadowRoot}function jp(n){var t=n.state;Object.keys(t.elements).forEach(function(e){var s=t.styles[e]||{},i=t.attributes[e]||{},r=t.elements[e];!be(r)||!De(r)||(Object.assign(r.style,s),Object.keys(i).forEach(function(o){var l=i[o];l===!1?r.removeAttribute(o):r.setAttribute(o,l===!0?"":l)}))})}function Wp(n){var t=n.state,e={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,e.popper),t.styles=e,t.elements.arrow&&Object.assign(t.elements.arrow.style,e.arrow),function(){Object.keys(t.elements).forEach(function(s){var i=t.elements[s],r=t.attributes[s]||{},o=Object.keys(t.styles.hasOwnProperty(s)?t.styles[s]:e[s]),l=o.reduce(function(c,h){return c[h]="",c},{});!be(i)||!De(i)||(Object.assign(i.style,l),Object.keys(r).forEach(function(c){i.removeAttribute(c)}))})}}const yr={name:"applyStyles",enabled:!0,phase:"write",fn:jp,effect:Wp,requires:["computeStyles"]};function Ne(n){return n.split("-")[0]}var gt=Math.max,Vi=Math.min,Yt=Math.round;function qn(){var n=navigator.userAgentData;return n!=null&&n.brands&&Array.isArray(n.brands)?n.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function bc(){return!/^((?!chrome|android).)*safari/i.test(qn())}function Kt(n,t,e){t===void 0&&(t=!1),e===void 0&&(e=!1);var s=n.getBoundingClientRect(),i=1,r=1;t&&be(n)&&(i=n.offsetWidth>0&&Yt(s.width)/n.offsetWidth||1,r=n.offsetHeight>0&&Yt(s.height)/n.offsetHeight||1);var o=_t(n)?fe(n):window,l=o.visualViewport,c=!bc()&&e,h=(s.left+(c&&l?l.offsetLeft:0))/i,d=(s.top+(c&&l?l.offsetTop:0))/r,u=s.width/i,p=s.height/r;return{width:u,height:p,top:d,right:h+u,bottom:d+p,left:h,x:h,y:d}}function wr(n){var t=Kt(n),e=n.offsetWidth,s=n.offsetHeight;return Math.abs(t.width-e)<=1&&(e=t.width),Math.abs(t.height-s)<=1&&(s=t.height),{x:n.offsetLeft,y:n.offsetTop,width:e,height:s}}function Ec(n,t){var e=t.getRootNode&&t.getRootNode();if(n.contains(t))return!0;if(e&&Er(e)){var s=t;do{if(s&&n.isSameNode(s))return!0;s=s.parentNode||s.host}while(s)}return!1}function We(n){return fe(n).getComputedStyle(n)}function zp(n){return["table","td","th"].indexOf(De(n))>=0}function st(n){return((_t(n)?n.ownerDocument:n.document)||window.document).documentElement}function on(n){return De(n)==="html"?n:n.assignedSlot||n.parentNode||(Er(n)?n.host:null)||st(n)}function Po(n){return!be(n)||We(n).position==="fixed"?null:n.offsetParent}function qp(n){var t=/firefox/i.test(qn()),e=/Trident/i.test(qn());if(e&&be(n)){var s=We(n);if(s.position==="fixed")return null}var i=on(n);for(Er(i)&&(i=i.host);be(i)&&["html","body"].indexOf(De(i))<0;){var r=We(i);if(r.transform!=="none"||r.perspective!=="none"||r.contain==="paint"||["transform","perspective"].indexOf(r.willChange)!==-1||t&&r.willChange==="filter"||t&&r.filter&&r.filter!=="none")return i;i=i.parentNode}return null}function Bs(n){for(var t=fe(n),e=Po(n);e&&zp(e)&&We(e).position==="static";)e=Po(e);return e&&(De(e)==="html"||De(e)==="body"&&We(e).position==="static")?t:e||qp(n)||t}function _r(n){return["top","bottom"].indexOf(n)>=0?"x":"y"}function bs(n,t,e){return gt(n,Vi(t,e))}function Qp(n,t,e){var s=bs(n,t,e);return s>e?e:s}function yc(){return{top:0,right:0,bottom:0,left:0}}function wc(n){return Object.assign({},yc(),n)}function _c(n,t){return t.reduce(function(e,s){return e[s]=n,e},{})}var Yp=function(t,e){return t=typeof t=="function"?t(Object.assign({},e.rects,{placement:e.placement})):t,wc(typeof t!="number"?t:_c(t,ts))};function Kp(n){var t,e=n.state,s=n.name,i=n.options,r=e.elements.arrow,o=e.modifiersData.popperOffsets,l=Ne(e.placement),c=_r(l),h=[ae,pe].indexOf(l)>=0,d=h?"height":"width";if(!(!r||!o)){var u=Yp(i.padding,e),p=wr(r),f=c==="y"?oe:ae,m=c==="y"?ue:pe,v=e.rects.reference[d]+e.rects.reference[c]-o[c]-e.rects.popper[d],b=o[c]-e.rects.reference[c],E=Bs(r),w=E?c==="y"?E.clientHeight||0:E.clientWidth||0:0,_=v/2-b/2,S=u[f],T=w-p[d]-u[m],x=w/2-p[d]/2+_,I=bs(S,x,T),R=c;e.modifiersData[s]=(t={},t[R]=I,t.centerOffset=I-x,t)}}function Gp(n){var t=n.state,e=n.options,s=e.element,i=s===void 0?"[data-popper-arrow]":s;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||Ec(t.elements.popper,i)&&(t.elements.arrow=i))}const Sc={name:"arrow",enabled:!0,phase:"main",fn:Kp,effect:Gp,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Gt(n){return n.split("-")[1]}var Xp={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Jp(n,t){var e=n.x,s=n.y,i=t.devicePixelRatio||1;return{x:Yt(e*i)/i||0,y:Yt(s*i)/i||0}}function Do(n){var t,e=n.popper,s=n.popperRect,i=n.placement,r=n.variation,o=n.offsets,l=n.position,c=n.gpuAcceleration,h=n.adaptive,d=n.roundOffsets,u=n.isFixed,p=o.x,f=p===void 0?0:p,m=o.y,v=m===void 0?0:m,b=typeof d=="function"?d({x:f,y:v}):{x:f,y:v};f=b.x,v=b.y;var E=o.hasOwnProperty("x"),w=o.hasOwnProperty("y"),_=ae,S=oe,T=window;if(h){var x=Bs(e),I="clientHeight",R="clientWidth";if(x===fe(e)&&(x=st(e),We(x).position!=="static"&&l==="absolute"&&(I="scrollHeight",R="scrollWidth")),x=x,i===oe||(i===ae||i===pe)&&r===Qt){S=ue;var O=u&&x===T&&T.visualViewport?T.visualViewport.height:x[I];v-=O-s.height,v*=c?1:-1}if(i===ae||(i===oe||i===ue)&&r===Qt){_=pe;var U=u&&x===T&&T.visualViewport?T.visualViewport.width:x[R];f-=U-s.width,f*=c?1:-1}}var z=Object.assign({position:l},h&&Xp),q=d===!0?Jp({x:f,y:v},fe(e)):{x:f,y:v};if(f=q.x,v=q.y,c){var Y;return Object.assign({},z,(Y={},Y[S]=w?"0":"",Y[_]=E?"0":"",Y.transform=(T.devicePixelRatio||1)<=1?"translate("+f+"px, "+v+"px)":"translate3d("+f+"px, "+v+"px, 0)",Y))}return Object.assign({},z,(t={},t[S]=w?v+"px":"",t[_]=E?f+"px":"",t.transform="",t))}function Zp(n){var t=n.state,e=n.options,s=e.gpuAcceleration,i=s===void 0?!0:s,r=e.adaptive,o=r===void 0?!0:r,l=e.roundOffsets,c=l===void 0?!0:l,h={placement:Ne(t.placement),variation:Gt(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,Do(Object.assign({},h,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:o,roundOffsets:c})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,Do(Object.assign({},h,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const Sr={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Zp,data:{}};var Ks={passive:!0};function ef(n){var t=n.state,e=n.instance,s=n.options,i=s.scroll,r=i===void 0?!0:i,o=s.resize,l=o===void 0?!0:o,c=fe(t.elements.popper),h=[].concat(t.scrollParents.reference,t.scrollParents.popper);return r&&h.forEach(function(d){d.addEventListener("scroll",e.update,Ks)}),l&&c.addEventListener("resize",e.update,Ks),function(){r&&h.forEach(function(d){d.removeEventListener("scroll",e.update,Ks)}),l&&c.removeEventListener("resize",e.update,Ks)}}const Ar={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:ef,data:{}};var tf={left:"right",right:"left",bottom:"top",top:"bottom"};function ai(n){return n.replace(/left|right|bottom|top/g,function(t){return tf[t]})}var sf={start:"end",end:"start"};function Mo(n){return n.replace(/start|end/g,function(t){return sf[t]})}function Tr(n){var t=fe(n),e=t.pageXOffset,s=t.pageYOffset;return{scrollLeft:e,scrollTop:s}}function Cr(n){return Kt(st(n)).left+Tr(n).scrollLeft}function nf(n,t){var e=fe(n),s=st(n),i=e.visualViewport,r=s.clientWidth,o=s.clientHeight,l=0,c=0;if(i){r=i.width,o=i.height;var h=bc();(h||!h&&t==="fixed")&&(l=i.offsetLeft,c=i.offsetTop)}return{width:r,height:o,x:l+Cr(n),y:c}}function rf(n){var t,e=st(n),s=Tr(n),i=(t=n.ownerDocument)==null?void 0:t.body,r=gt(e.scrollWidth,e.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),o=gt(e.scrollHeight,e.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),l=-s.scrollLeft+Cr(n),c=-s.scrollTop;return We(i||e).direction==="rtl"&&(l+=gt(e.clientWidth,i?i.clientWidth:0)-r),{width:r,height:o,x:l,y:c}}function Lr(n){var t=We(n),e=t.overflow,s=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(e+i+s)}function Ac(n){return["html","body","#document"].indexOf(De(n))>=0?n.ownerDocument.body:be(n)&&Lr(n)?n:Ac(on(n))}function Es(n,t){var e;t===void 0&&(t=[]);var s=Ac(n),i=s===((e=n.ownerDocument)==null?void 0:e.body),r=fe(s),o=i?[r].concat(r.visualViewport||[],Lr(s)?s:[]):s,l=t.concat(o);return i?l:l.concat(Es(on(o)))}function Qn(n){return Object.assign({},n,{left:n.x,top:n.y,right:n.x+n.width,bottom:n.y+n.height})}function of(n,t){var e=Kt(n,!1,t==="fixed");return e.top=e.top+n.clientTop,e.left=e.left+n.clientLeft,e.bottom=e.top+n.clientHeight,e.right=e.left+n.clientWidth,e.width=n.clientWidth,e.height=n.clientHeight,e.x=e.left,e.y=e.top,e}function Ro(n,t,e){return t===vr?Qn(nf(n,e)):_t(t)?of(t,e):Qn(rf(st(n)))}function af(n){var t=Es(on(n)),e=["absolute","fixed"].indexOf(We(n).position)>=0,s=e&&be(n)?Bs(n):n;return _t(s)?t.filter(function(i){return _t(i)&&Ec(i,s)&&De(i)!=="body"}):[]}function lf(n,t,e,s){var i=t==="clippingParents"?af(n):[].concat(t),r=[].concat(i,[e]),o=r[0],l=r.reduce(function(c,h){var d=Ro(n,h,s);return c.top=gt(d.top,c.top),c.right=Vi(d.right,c.right),c.bottom=Vi(d.bottom,c.bottom),c.left=gt(d.left,c.left),c},Ro(n,o,s));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}function Tc(n){var t=n.reference,e=n.element,s=n.placement,i=s?Ne(s):null,r=s?Gt(s):null,o=t.x+t.width/2-e.width/2,l=t.y+t.height/2-e.height/2,c;switch(i){case oe:c={x:o,y:t.y-e.height};break;case ue:c={x:o,y:t.y+t.height};break;case pe:c={x:t.x+t.width,y:l};break;case ae:c={x:t.x-e.width,y:l};break;default:c={x:t.x,y:t.y}}var h=i?_r(i):null;if(h!=null){var d=h==="y"?"height":"width";switch(r){case wt:c[h]=c[h]-(t[d]/2-e[d]/2);break;case Qt:c[h]=c[h]+(t[d]/2-e[d]/2);break}}return c}function Xt(n,t){t===void 0&&(t={});var e=t,s=e.placement,i=s===void 0?n.placement:s,r=e.strategy,o=r===void 0?n.strategy:r,l=e.boundary,c=l===void 0?oc:l,h=e.rootBoundary,d=h===void 0?vr:h,u=e.elementContext,p=u===void 0?Pt:u,f=e.altBoundary,m=f===void 0?!1:f,v=e.padding,b=v===void 0?0:v,E=wc(typeof b!="number"?b:_c(b,ts)),w=p===Pt?ac:Pt,_=n.rects.popper,S=n.elements[m?w:p],T=lf(_t(S)?S:S.contextElement||st(n.elements.popper),c,d,o),x=Kt(n.elements.reference),I=Tc({reference:x,element:_,strategy:"absolute",placement:i}),R=Qn(Object.assign({},_,I)),O=p===Pt?R:x,U={top:T.top-O.top+E.top,bottom:O.bottom-T.bottom+E.bottom,left:T.left-O.left+E.left,right:O.right-T.right+E.right},z=n.modifiersData.offset;if(p===Pt&&z){var q=z[i];Object.keys(U).forEach(function(Y){var j=[pe,ue].indexOf(Y)>=0?1:-1,J=[oe,ue].indexOf(Y)>=0?"y":"x";U[Y]+=q[J]*j})}return U}function cf(n,t){t===void 0&&(t={});var e=t,s=e.placement,i=e.boundary,r=e.rootBoundary,o=e.padding,l=e.flipVariations,c=e.allowedAutoPlacements,h=c===void 0?br:c,d=Gt(s),u=d?l?zn:zn.filter(function(m){return Gt(m)===d}):ts,p=u.filter(function(m){return h.indexOf(m)>=0});p.length===0&&(p=u);var f=p.reduce(function(m,v){return m[v]=Xt(n,{placement:v,boundary:i,rootBoundary:r,padding:o})[Ne(v)],m},{});return Object.keys(f).sort(function(m,v){return f[m]-f[v]})}function hf(n){if(Ne(n)===rn)return[];var t=ai(n);return[Mo(n),t,Mo(t)]}function df(n){var t=n.state,e=n.options,s=n.name;if(!t.modifiersData[s]._skip){for(var i=e.mainAxis,r=i===void 0?!0:i,o=e.altAxis,l=o===void 0?!0:o,c=e.fallbackPlacements,h=e.padding,d=e.boundary,u=e.rootBoundary,p=e.altBoundary,f=e.flipVariations,m=f===void 0?!0:f,v=e.allowedAutoPlacements,b=t.options.placement,E=Ne(b),w=E===b,_=c||(w||!m?[ai(b)]:hf(b)),S=[b].concat(_).reduce(function(F,ie){return F.concat(Ne(ie)===rn?cf(t,{placement:ie,boundary:d,rootBoundary:u,padding:h,flipVariations:m,allowedAutoPlacements:v}):ie)},[]),T=t.rects.reference,x=t.rects.popper,I=new Map,R=!0,O=S[0],U=0;U=0,J=j?"width":"height",K=Xt(t,{placement:z,boundary:d,rootBoundary:u,altBoundary:p,padding:h}),Z=j?Y?pe:ae:Y?ue:oe;T[J]>x[J]&&(Z=ai(Z));var we=ai(Z),y=[];if(r&&y.push(K[q]<=0),l&&y.push(K[Z]<=0,K[we]<=0),y.every(function(F){return F})){O=z,R=!1;break}I.set(z,y)}if(R)for(var B=m?3:1,_e=function(ie){var ge=S.find(function(W){var Re=I.get(W);if(Re)return Re.slice(0,ie).every(function(ns){return ns})});if(ge)return O=ge,"break"},G=B;G>0;G--){var C=_e(G);if(C==="break")break}t.placement!==O&&(t.modifiersData[s]._skip=!0,t.placement=O,t.reset=!0)}}const Cc={name:"flip",enabled:!0,phase:"main",fn:df,requiresIfExists:["offset"],data:{_skip:!1}};function $o(n,t,e){return e===void 0&&(e={x:0,y:0}),{top:n.top-t.height-e.y,right:n.right-t.width+e.x,bottom:n.bottom-t.height+e.y,left:n.left-t.width-e.x}}function Bo(n){return[oe,pe,ue,ae].some(function(t){return n[t]>=0})}function uf(n){var t=n.state,e=n.name,s=t.rects.reference,i=t.rects.popper,r=t.modifiersData.preventOverflow,o=Xt(t,{elementContext:"reference"}),l=Xt(t,{altBoundary:!0}),c=$o(o,s),h=$o(l,i,r),d=Bo(c),u=Bo(h);t.modifiersData[e]={referenceClippingOffsets:c,popperEscapeOffsets:h,isReferenceHidden:d,hasPopperEscaped:u},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":d,"data-popper-escaped":u})}const Lc={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:uf};function pf(n,t,e){var s=Ne(n),i=[ae,oe].indexOf(s)>=0?-1:1,r=typeof e=="function"?e(Object.assign({},t,{placement:n})):e,o=r[0],l=r[1];return o=o||0,l=(l||0)*i,[ae,pe].indexOf(s)>=0?{x:l,y:o}:{x:o,y:l}}function ff(n){var t=n.state,e=n.options,s=n.name,i=e.offset,r=i===void 0?[0,0]:i,o=br.reduce(function(d,u){return d[u]=pf(u,t.rects,r),d},{}),l=o[t.placement],c=l.x,h=l.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=c,t.modifiersData.popperOffsets.y+=h),t.modifiersData[s]=o}const kc={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:ff};function mf(n){var t=n.state,e=n.name;t.modifiersData[e]=Tc({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const kr={name:"popperOffsets",enabled:!0,phase:"read",fn:mf,data:{}};function gf(n){return n==="x"?"y":"x"}function vf(n){var t=n.state,e=n.options,s=n.name,i=e.mainAxis,r=i===void 0?!0:i,o=e.altAxis,l=o===void 0?!1:o,c=e.boundary,h=e.rootBoundary,d=e.altBoundary,u=e.padding,p=e.tether,f=p===void 0?!0:p,m=e.tetherOffset,v=m===void 0?0:m,b=Xt(t,{boundary:c,rootBoundary:h,padding:u,altBoundary:d}),E=Ne(t.placement),w=Gt(t.placement),_=!w,S=_r(E),T=gf(S),x=t.modifiersData.popperOffsets,I=t.rects.reference,R=t.rects.popper,O=typeof v=="function"?v(Object.assign({},t.rects,{placement:t.placement})):v,U=typeof O=="number"?{mainAxis:O,altAxis:O}:Object.assign({mainAxis:0,altAxis:0},O),z=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,q={x:0,y:0};if(x){if(r){var Y,j=S==="y"?oe:ae,J=S==="y"?ue:pe,K=S==="y"?"height":"width",Z=x[S],we=Z+b[j],y=Z-b[J],B=f?-R[K]/2:0,_e=w===wt?I[K]:R[K],G=w===wt?-R[K]:-I[K],C=t.elements.arrow,F=f&&C?wr(C):{width:0,height:0},ie=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:yc(),ge=ie[j],W=ie[J],Re=bs(0,I[K],F[K]),ns=_?I[K]/2-B-Re-ge-U.mainAxis:_e-Re-ge-U.mainAxis,Qh=_?-I[K]/2+B+Re+W+U.mainAxis:G+Re+W+U.mainAxis,rs=t.elements.arrow&&Bs(t.elements.arrow),mn=rs?S==="y"?rs.clientTop||0:rs.clientLeft||0:0,mo=(Y=z==null?void 0:z[S])!=null?Y:0,Yh=Z+ns-mo-mn,Kh=Z+Qh-mo,go=bs(f?Vi(we,Yh):we,Z,f?gt(y,Kh):y);x[S]=go,q[S]=go-Z}if(l){var vo,Gh=S==="x"?oe:ae,Xh=S==="x"?ue:pe,rt=x[T],zs=T==="y"?"height":"width",bo=rt+b[Gh],Eo=rt-b[Xh],gn=[oe,ae].indexOf(E)!==-1,yo=(vo=z==null?void 0:z[T])!=null?vo:0,wo=gn?bo:rt-I[zs]-R[zs]-yo+U.altAxis,_o=gn?rt+I[zs]+R[zs]-yo-U.altAxis:Eo,So=f&&gn?Qp(wo,rt,_o):bs(f?wo:bo,rt,f?_o:Eo);x[T]=So,q[T]=So-rt}t.modifiersData[s]=q}}const xc={name:"preventOverflow",enabled:!0,phase:"main",fn:vf,requiresIfExists:["offset"]};function bf(n){return{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}}function Ef(n){return n===fe(n)||!be(n)?Tr(n):bf(n)}function yf(n){var t=n.getBoundingClientRect(),e=Yt(t.width)/n.offsetWidth||1,s=Yt(t.height)/n.offsetHeight||1;return e!==1||s!==1}function wf(n,t,e){e===void 0&&(e=!1);var s=be(t),i=be(t)&&yf(t),r=st(t),o=Kt(n,i,e),l={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(s||!s&&!e)&&((De(t)!=="body"||Lr(r))&&(l=Ef(t)),be(t)?(c=Kt(t,!0),c.x+=t.clientLeft,c.y+=t.clientTop):r&&(c.x=Cr(r))),{x:o.left+l.scrollLeft-c.x,y:o.top+l.scrollTop-c.y,width:o.width,height:o.height}}function _f(n){var t=new Map,e=new Set,s=[];n.forEach(function(r){t.set(r.name,r)});function i(r){e.add(r.name);var o=[].concat(r.requires||[],r.requiresIfExists||[]);o.forEach(function(l){if(!e.has(l)){var c=t.get(l);c&&i(c)}}),s.push(r)}return n.forEach(function(r){e.has(r.name)||i(r)}),s}function Sf(n){var t=_f(n);return vc.reduce(function(e,s){return e.concat(t.filter(function(i){return i.phase===s}))},[])}function Af(n){var t;return function(){return t||(t=new Promise(function(e){Promise.resolve().then(function(){t=void 0,e(n())})})),t}}function Tf(n){var t=n.reduce(function(e,s){var i=e[s.name];return e[s.name]=i?Object.assign({},i,s,{options:Object.assign({},i.options,s.options),data:Object.assign({},i.data,s.data)}):s,e},{});return Object.keys(t).map(function(e){return t[e]})}var Ho={placement:"bottom",modifiers:[],strategy:"absolute"};function Fo(){for(var n=arguments.length,t=new Array(n),e=0;ethis.formattedValue(p,l+1))):r},t)}eventHandler(t,e){const s=this.view.options.handler;return i=>{if(!s)throw new Error("No handler defined in binding.view.options.handler");s.call(t,this,i,this,e)}}set(t){try{t=this.formattedValue(t)}catch(e){return console.error(e),t}typeof this.routine=="function"&&(t&&typeof t.then=="function"&&typeof t.catch=="function"?t.then(e=>{this.routine(this.el,e)}).catch(e=>{console.error(e)}):this.routine(this.el,t))}sync(){this.observer?(this.model=this.observer.target,this.set(this.observer.value())):this.set(this.value)}publish(){if(this.observer){if(this.formatters===null)throw new Error("formatters is null");const t=this.formatters.reduceRight((e,s,i)=>{const r=s.split(gd),o=r.shift();if(!o)throw new Error("id not defined");if(!this.view.options.formatters)return;const l=this.view.options.formatters[o],c=this.parseFormatterArguments(r,i);return l&&typeof l.publish=="function"&&(e=l.publish(e,...c)),e},this._getValue(this.el));this.observer.setValue(t)}}_bind(){if(this.parseTarget(),this.bind){if(typeof this.bind!="function")throw new Error("the method bind is not a function");this.bind(this.el)}this.view.options.preloadData&&this.sync()}_unbind(){this.unbind&&this.unbind(this.el),this.observer&&this.observer.unobserve(),Object.keys(this.formatterObservers).forEach(t=>{const e=this.formatterObservers[t];Object.keys(e).forEach(s=>{e[s].unobserve()})}),this.formatterObservers={}}_update(t={}){this.observer&&(this.model=this.observer.target),typeof this.update=="function"&&this.update(t)}_getValue(t){return typeof this.getValue=="function"?this.getValue(t):ws(t)}getStarArguments(t,e){var r;const s=this.view.binderRegex(t);return((r=e.match(s))==null?void 0:r.slice(1))||[]}}a(A,"key",""),a(A,"block",!1);class Ua extends A{constructor(){super(...arguments);a(this,"function",!0);a(this,"priority",1e3)}bind(e){const s=this.args[0];e.classList.add(s)}routine(e,s){const i=this.args[0];s?(e.classList.add(i+"-start"),e.classList.remove(i+"-done")):(e.classList.remove(i+"-start"),e.classList.add(i+"-done"))}}a(Ua,"key","animate-*");class ja extends A{constructor(){super(...arguments);a(this,"function",!0);a(this,"priority",1e3);a(this,"staticClasses")}bind(e){const s=e.getAttribute("class")||"";this.staticClasses=s.split(" ")}unbind(){delete this.staticClasses}routine(e,s){var r;s?((r=this.staticClasses)==null?void 0:r.indexOf(s))===-1&&e.setAttribute("class",this.staticClasses.join(" ")+" "+s):this.staticClasses&&e.setAttribute("class",this.staticClasses.join(" "));const i=e.getAttribute("class");i&&e.setAttribute("class",i.trim())}}a(ja,"key","add-class");class Wa extends A{routine(t,e){const s=Te(this.args[0].trim());this.view.models[s]=e}}a(Wa,"key","assign-*");class za extends A{routine(t,e){if(typeof e=="object")return yt({deep:!1},this.view.models,e);console.warn("Value must be an object or propertyName is required")}}a(za,"key","assign");class Yi extends A{routine(t,e){var o;if(!this.type)throw new Error("Can't set attribute of "+this.type);const{newValue:s,oldValue:i,changed:r}=Na(t,this.type,e);this.type==="src"&&t.tagName.toUpperCase()==="SOURCE"&&((o=t.parentElement)==null?void 0:o.tagName.toUpperCase())==="VIDEO"&&t.parentElement.load(),r&&t.dispatchEvent(new CustomEvent("binder-changed",{detail:{name:this.type,newValue:s,oldValue:i}}))}}a(Yi,"key","attr-*");class On extends A{routine(){}}a(On,"key","block"),a(On,"block",!0);class qa extends A{constructor(){super(...arguments);a(this,"publishes",!0);a(this,"priority",2e3);a(this,"onChange",this.publish.bind(this))}bind(e){e.addEventListener("change",this.onChange)}unbind(e){e.removeEventListener("change",this.onChange)}routine(e,s){let i;this._getValue?i=this._getValue(e):(console.warn("this._getValue is not a function, this: ",this),i=ws(e)),e.type==="radio"?e.checked=Be(i)===Be(s):i!==s&&(e.checked=!!s)}getValue(e){return ws(e)}}a(qa,"key","checked");class Qa extends A{routine(t,e){if(this.args===null)throw new Error("args is null");const s=t.getAttribute("class")||"",i=s.split(" ").filter(l=>l!==""),r=this.args[0].trim(),o=i.indexOf(r);o===-1?e&&t.setAttribute("class",`${s} ${r}`):e||t.setAttribute("class",i.filter((l,c)=>c!==o).join(" "))}}a(Qa,"key","class-*");const Rs='[componentAttributeBinder] You can only use the "rv-co-*" binder on Riba components, but "{tagName}" is not registered.';class Ii extends A{constructor(){super(...arguments);a(this,"publishes",!0);a(this,"componentAttributeObserver");a(this,"attributeName")}__routine(e,s){const i=this.args[0].trim();e.setBinderAttribute?e.setBinderAttribute(i,s):console.warn(Rs.replace("{tagName}",e.tagName),e)}async routine(e,s){Ge(e,!0,!0)?this.__routine(e,s):Ge(e,!0)?(await Nn(e),this.__routine(e,s)):console.warn(Rs.replace("{tagName}",e.tagName),e)}__bind(e){if(this.attributeName=this.args[0].toString().trim(),typeof e.observeAttribute!="function"){console.warn(Rs.replace("{tagName}",e.tagName),e);return}this.componentAttributeObserver=e.observeAttribute(this.attributeName,{sync:()=>{this.publish()}})}async bind(e){Ge(e,!0,!0)?this.__bind(e):Ge(e,!0)?(await Nn(e),this.__bind(e)):console.warn(Rs.replace("{tagName}",e.tagName),e)}unbind(){var e;(e=this.componentAttributeObserver)==null||e.unobserve()}getValue(e){const s=this.args[0].trim();return e.getBinderAttribute(s)}}a(Ii,"key","co-*");class Ya extends A{routine(t,e){t.disabled=!!e}}a(Ya,"key","disabled");class Ka extends A{constructor(){super(...arguments);a(this,"enable",!1);a(this,"onDrag",this._onDrag.bind(this))}_onDrag(e){this.enable||e.preventDefault()}routine(e,s){this.enable=s,e.setAttribute("draggable",s?"true":"false")}bind(e){e.addEventListener("dragstart",this.onDrag,!0)}unbind(e){e.removeAttribute("draggable"),e.removeEventListener("dragstart",this.onDrag,!0)}}a(Ka,"key","draggable");class Ga extends A{routine(t,e){t.data=e??""}}a(Ga,"key","mustache-text");const $s=0,Xa=1,vd=/((?:'[^']*')*(?:(?:[^|']*(?:'[^']*')+[^|']*)+|[^|]+))|^$/g;function Ja(n,t){let e=null;const s=n.length;let i=0,r=0;const o=t[0],l=t[1];for(;r0&&r0)for(let i=0;ii.trim());return{keypath:e.shift()||void 0,pipes:e}}const Ot=class{constructor(t,e,s){a(this,"els");a(this,"models");a(this,"options");a(this,"bindings",[]);a(this,"webComponents",[]);if(Array.isArray(t)?this.els=t:this.els=[t],this.models=e,this.models.$root)for(const i of Object.keys(this.models.$root))Ot.$rootScope[i]=this.models.$root[i];this.models.$root=Ot.$rootScope,this.options=s,this.build()}static create(t,e,s){var o;const i=t.el.cloneNode(!0),r=new Ot(i,e,t.view.options);return r.bind(),(o=t==null?void 0:t.marker)!=null&&o.parentNode?t.marker.parentNode.insertBefore(i,s):console.warn("[View]: No parent node for binding!"),r}bind(){this.bindings.forEach(t=>{t._bind()})}unbind(){Array.isArray(this.bindings)&&this.bindings.forEach(t=>{t._unbind(),typeof t.el&&this.options.removeBinderAttributes}),Array.isArray(this.webComponents)&&this.webComponents.forEach(t=>{typeof t.unbind=="function"&&t.unbind()})}sync(){this.bindings.forEach(t=>{t.sync&&t.sync()})}publish(){this.bindings.forEach(t=>{t.publishes&&t.publish&&t.publish()})}update(t={}){Object.keys(t).forEach(e=>{this.models[e]=t[e]});for(const e of this.bindings)e._update&&e._update(t)}build(){if(this.bindings=[],!this.options.templateDelimiters)throw new Error("templateDelimiters required");const t=this.els;for(let e=0;e1?s=new RegExp(`^${t.replace("*","([^-]*)").replaceAll("-*","-(.+)")}$`):s=new RegExp(`^${t.replaceAll("*","(.+)")}$`),s}bindBinders(t,e,s=this.options.attributeBinders){let i=!1;if(!this.options.binders)return i;const r=[];for(let o=0,l=t.length;o{const s=t.priority||0;return(e.priority||0)-s});class Pn extends A{constructor(){super(...arguments);a(this,"priority",4e3);a(this,"iterated",[])}bind(e){var s,i;this.marker?this.iterated.forEach(r=>{r.bind()}):(this.marker=(s=window==null?void 0:window.document)==null?void 0:s.createComment(` riba: ${this.type} `),!((i=e.parentNode)!=null&&i.insertBefore)||!this.marker||(e.parentNode.insertBefore(this.marker,e),e.parentNode.removeChild(e)))}unbind(){this.iterated&&this.iterated.forEach(e=>{e.unbind()})}routine(e,s){if(this.args===null)throw new Error("args is null");let i=!1;const r=Te(this.args[0].toString());if(s=s||[],!Array.isArray(s)&&typeof s=="object"&&s!==null&&(s=Object.entries(s).map(([l,c])=>({key:l,value:c})),i=!0),!Array.isArray(s))throw new Error(`each-${this.args[0]} needs an array or object to iterate over, but it is ${typeof s}`);const o=e.getAttribute("index-property")||this.getIterationAlias(r);s.forEach((l,c)=>{var u;const h={$parent:this.view.models};i?(h[o]=l.key,h[r]=l.value):(h[o]=c,h[r]=l);let d=this.iterated[c];if(d)if(d.models[r]!==l){let p,f=this.iterated[c];for(let m=c+1;ms.length&&$h(this.iterated.length-s.length,()=>{const l=this.iterated.pop();if(!l)throw new Error("view is undefined!");if(l.unbind(),!this.marker||!this.marker.parentNode)throw new Error("Marker has no parent node");this.marker.parentNode.removeChild(l.els[0])}),e.nodeName==="OPTION"&&this.view.bindings&&this.view.bindings.forEach(l=>{this.marker&&l.el===this.marker.parentNode&&l.type==="value"&&l.sync&&l.sync()})}update(e){const s={};Object.keys(e).forEach(i=>{if(this.args===null)throw new Error("args is null");i!==this.args[0]&&(s[i]=e[i])}),this.iterated.forEach(i=>{i.update(s)})}}a(Pn,"key","each-*"),a(Pn,"block",!0);class el extends A{constructor(){super(...arguments);a(this,"publishes",!0)}bind(){this.publish()}routine(){}getValue(e){return e}}a(el,"key","element");class tl extends A{routine(t,e){t.disabled=!e}}a(tl,"key","enabled");class sl extends A{constructor(){super(...arguments);a(this,"priority",9e4)}routine(e,s){const i=Array.from(e.children);i.sort((r,o)=>!r.dataset.sortBy||!o.dataset.sortBy?0:r.dataset.sortByo.dataset.sortBy?s?-1:1:0);for(let r=0;r0){const r=i.length>0?", ":"";i+=`${r}${e} ${s}`}else{let r=i.split(",");r=r.map(o=>o.trim()),r=r.filter(o=>!o.includes(s)),i=r.join(", ")||""}t.setAttribute("srcset",i)}}a(dl,"key","srcset-*");class ul extends A{routine(t,e){const s="background-image";e==null||e===""?t.style.removeProperty(s):t.style.setProperty(s,`url(${e})`)}}a(ul,"key","style-background-image");class pl extends A{routine(t,e){const s=this.args[0];e==null||e===""?t.style.removeProperty(s.toString()):t.style.setProperty(s.toString(),e)}}a(pl,"key","style-*");class fl extends A{routine(t,e){if(e)if(typeof e=="string")t.setAttribute("style",e);else for(const s of Object.keys(e))t.style.setProperty(Gh(s),e[s]||null);else for(const s of Object.keys(t.style))t.style.removeProperty(s)}}a(fl,"key","style");class ml extends A{constructor(){super(...arguments);a(this,"priority",-1e3);a(this,"originalTag")}bind(e){this.originalTag=e.tagName.toLowerCase()}routine(e,s){if(this.args===null)throw new Error("args is null");const i=this.el.tagName.toLowerCase();let r;if(s)r=this.args[0].trim().toLowerCase();else if(this.originalTag)r=this.originalTag.toLowerCase();else throw new Error("Tag name not found!");if(i!==r){const o=document.createElement(r);for(;e.childNodes.length>0;)e.firstChild&&o.appendChild(e.firstChild);const l=Array.prototype.slice.call(e.attributes);for(const c of l)o.setAttribute(c.name,c.value);e.parentNode?e.parentNode.replaceChild(o,e):console.warn("No parent"),this.el=o}}}a(ml,"key","tag-*");class gl extends A{constructor(){super(...arguments);a(this,"nested")}bind(e){this.nested=new me(e,this.view.models,this.view.options)}routine(e,s){var i,r;(i=this.nested)==null||i.unbind(),e.innerHTML=s||"",this.nested=new me(e,this.view.models,this.view.options),(r=this.nested)==null||r.bind()}unbind(){var e;(e=this.nested)==null||e.unbind()}update(e){var s;(s=this.nested)==null||s.update(e)}}a(gl,"key","template");class vl extends A{routine(t,e){typeof e!="string"&&typeof(e==null?void 0:e.toString)=="function"&&(e=e.toString()),t.textContent=e||""}}a(vl,"key","text");class bl extends A{constructor(){super(...arguments);a(this,"propertyKey")}toggle(){this.propertyKey&&(this.view.models[this.propertyKey]=!this.view.models[this.propertyKey])}bind(e){const s=this.args[0],i=this.el.dataset.passive==="true";e.addEventListener(s,this.toggle,{passive:i})}unbind(e){if(this.args===null)throw new Error("args is null");const s=this.args[0];e.removeEventListener(s,this.toggle)}routine(e,s){if(this.args===null)throw new Error("args is null");this.propertyKey=s}}a(bl,"key","toggle-on-*");class El extends A{constructor(){super(...arguments);a(this,"publishes",!0);a(this,"priority",2e3);a(this,"onChange",this.publish.bind(this))}bind(e){e.addEventListener("change",this.onChange)}unbind(e){e.removeEventListener("change",this.onChange)}routine(e,s){e.type==="radio"?e.checked=Be(e.value)!==Be(s):e.checked=!s}getValue(e){return ws(e)}}a(El,"key","unchecked");class yl extends Ni{routine(t,e){return super.routine(t,!e)}}a(yl,"key","unless");const Ed="change input paste blur focus";class wl extends A{constructor(){super(...arguments);a(this,"publishes",!0);a(this,"priority",3e3);a(this,"event");a(this,"onChange",this.publish.bind(this))}getData(e){const s={type:e.type,tagName:e.tagName,contenteditable:!!e.getAttribute("contenteditable"),isRadio:!1,isOption:!1};return s.isRadio=s.tagName==="INPUT"&&s.type==="radio",s.isOption=s.tagName==="OPTION",s}bind(e){if(e.tagName==="OPTION")return;if(!this.getData(e).isRadio){this.event=e.getAttribute("event-name")||Ed;const i=this.event.split(" ");for(const r of i)e.addEventListener(r.trim(),this.onChange,!1)}}unbind(e){if(this.event){const s=this.event.split(" ");for(const i in s)e.removeEventListener(i.trim(),this.onChange)}}routine(e,s){let i=this.getValue(e);if(Array.isArray(s)||(s!=null?s=Be(s):s=""),Array.isArray(i)||(i!=null?i=Be(i):i=""),i===s)return;const r=this.getData(e);if(r.isRadio||r.isOption)return Na(e,"value",s);if(e.type==="select-multiple"){if(Array.isArray(s))for(let o=0;o-1}}else e.getAttribute("contenteditable")?e.innerHTML=s:e.value=s}getValue(e){return ws(e)}}a(wl,"key","value");const yd=Object.freeze(Object.defineProperty({__proto__:null,AddClassBinder:ja,AnimateStarBinder:Ua,AssignBinder:za,AssignPropertyBinder:Wa,AttributeBinder:Yi,BlockBinder:On,CheckedBinder:qa,ClassStarBinder:Qa,ComponentAttributeBinder:Ii,DisabledBinder:Ya,EachStarBinder:Pn,ElementBinder:el,EnabledBinder:tl,FlexSortChildsBinder:sl,HideBinder:il,HtmlBinder:nl,IfBinder:Ni,MaxlengthBinder:rl,NoDragBinder:Ka,OnEventBinder:ol,ParentBinder:al,ReadonlyBinder:ll,RemoveClassBinder:cl,ShowBinder:hl,SrcsetSizeBinder:dl,StyleBackgroundImageBinder:ul,StyleBinder:fl,StyleStarBinder:pl,TagStarBinder:ml,TemplateBinder:gl,TextBinder:vl,ToggleOnEventBinder:bl,UncheckedBinder:El,UnlessBinder:yl,ValueBinder:wl},Symbol.toStringTag,{value:"Module"}));class wd{constructor(t,e,s,i){a(this,"binder");a(this,"component");a(this,"formatter");a(this,"adapter");this.binder=new Fa(t),this.component=new Ha(e),this.formatter=new Va(s),this.adapter=new Ba(i)}register(t){if(!t)throw console.error(t),new Error("The Riba module is falsy!");t.binders&&this.binder.registerAll(t.binders),t.components&&this.component.registerAll(t.components),t.formatters&&this.formatter.registerAll(t.formatters),t.adapters&&this.adapter.registerAll(t.adapters)}}const Pt=class{constructor(){a(this,"module");a(this,"lifecycle",cs.getInstance());a(this,"binders",{});a(this,"components",{});a(this,"formatters",{});a(this,"adapters",{});a(this,"parseTemplate",Ja);a(this,"parseType",Je);a(this,"templateDelimiters",["{","}"]);a(this,"rootInterface",".");a(this,"preloadData",!0);a(this,"removeBinderAttributes",!0);a(this,"blockNodeNames",["SCRIPT","STYLE","TEMPLATE","CODE"]);a(this,"blockUnknownCustomElements",!0);a(this,"_prefix",["rv"]);a(this,"_fullPrefix",["rv-"]);if(this.module=new wd(this.binders,this.components,this.formatters,this.adapters),Pt.instance)return Pt.instance;Pt.instance=this}static handler(t,e,s,i){if(!this||!this.call){const r=new Error(`[rv-${s.type}="${s.keypath}"] Event handler "${s.keypath}" not found!"`);throw console.error(r,s,i,s.view.models),r}this.call(t,e,s.view.models,i)}set prefix(t){if(Array.isArray(t)){this._prefix=[],this._fullPrefix=[];for(const e of t)this._prefix.push(e),this._fullPrefix.push(e+"-")}}get prefix(){return this._prefix}get fullPrefix(){return this._fullPrefix}configure(t){if(t)for(const[e,s]of Object.entries(t))switch(e){case"binders":this.binders={...this.binders,...s};break;case"formatters":this.formatters={...this.formatters,...s};break;case"components":this.components={...this.components,...s};break;case"adapters":this.adapters={...this.adapters,...s};break;case"prefix":this.prefix=s;break;case"parseTemplate":this.parseTemplate=s;break;case"parseType":this.parseType=s;break;case"templateDelimiters":this.templateDelimiters=s;break;case"rootInterface":this.rootInterface=s;break;case"preloadData":this.preloadData=s;break;case"blockNodeNames":this.blockNodeNames=s;break;case"blockUnknownCustomElements":this.blockUnknownCustomElements=!!s;break;default:console.warn("Option not supported",e,s);break}}getViewOptions(t){const e={adapters:{},binders:{},components:{},formatters:{},attributeBinders:[],rootInterface:{}};if(t&&(e.binders={...e.binders,...t.binders},e.formatters={...e.formatters,...t.formatters},e.components={...e.components,...t.components},e.adapters={...e.adapters,...t.adapters}),t!=null&&t.prefix&&Array.isArray(t==null?void 0:t.prefix)){e.prefix=[],e.fullPrefix=[];for(const s of t.prefix)e.prefix.push(s),e.fullPrefix.push(s+"-")}else e.prefix=this.prefix,e.fullPrefix=this.fullPrefix;if(e.templateDelimiters=(t==null?void 0:t.templateDelimiters)||this.templateDelimiters,e.rootInterface=(t==null?void 0:t.rootInterface)||this.rootInterface,e.removeBinderAttributes=typeof(t==null?void 0:t.removeBinderAttributes)=="boolean"?t.removeBinderAttributes:this.removeBinderAttributes,e.blockNodeNames=(t==null?void 0:t.blockNodeNames)||this.blockNodeNames,e.preloadData=typeof(t==null?void 0:t.preloadData)=="boolean"?t.preloadData:this.preloadData,e.handler=(t==null?void 0:t.handler)||Pt.handler,e.binders={...this.binders,...e.binders},e.formatters={...this.formatters,...e.formatters},e.components={...this.components,...e.components},e.adapters={...this.adapters,...e.adapters},e.attributeBinders||(e.attributeBinders=[]),e.binders){const s=Object.keys(e.binders).filter(i=>i.indexOf("*")>=1);e.attributeBinders.push(...s)}return e}bind(t,e={},s){const i=this.getViewOptions(s);Me.updateOptions(i);const r=new me(t,e,i);return r.bind(),r}};let Rt=Pt;a(Rt,"instance");window.Riba=Rt;const Ks=Symbol();function _d(n){return null}const Sd=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]);function Ad(n,t,...e){return{tag:n,props:t,children:e}}function Dn(n){if(!n)return"";const{tag:t,props:e,children:s}=n;if(typeof t=="function")return t===_d?String(e.html):Dn(t(Object.assign({children:s},e)));const i=[];if(t!==Ks){i.push("<",t);for(const[l,c]of Object.entries(e??{}))c!=null&&(typeof c=="boolean"&&!Ge(t)?c&&i.push(" ",l):i.push(" ",l,"=",ji(c)))}let r=!1;return s.length&&(r=!0,t!==Ks&&i.push(">"),o(s)),t!==Ks&&(r?i.push(""):Sd.has(t)?i.push("/>"):i.push(">")),i.join("");function o(l){for(const c of l)c&&(Array.isArray(c)?o(c):typeof c=="string"||typeof c=="number"?i.push(zh(c.toString())):i.push(Dn(c)))}}globalThis.jsxCreateElement=Ad;globalThis.jsxFragment=Ks;class lr extends HTMLElement{constructor(){super();a(this,"_debug",!1);a(this,"_color");a(this,"templateLoaded",!1);a(this,"observedAttributesToCheck",{});a(this,"observedAttributes",[]);this._debug&&(this._color=wo())}remove(){this&&this.parentElement&&this.parentElement.removeChild(this)}_log(e,...s){const i=this.constructor.name||this.tagName;this._color||(this._color=wo()),Mh({namespace:i,color:this._color,mode:e},...s)}info(...e){return this._log("info",...e)}debug(...e){if(this._debug)return this._log("debug",...e)}error(...e){console.error(...e)}requiredAttributes(){return[]}async init(e){this.loadAttributes(e),this.getPassedObservedAttributes(e)}ready(){return this.allPassedObservedAttributesAreInitialized()&&this.checkRequiredAttributes()}attributeIsPassed(e){return this.hasAttribute(e)}getPassedObservedAttributes(e){const s=this.observedAttributesToCheck;for(const i of e)s[i]?s[i].passed||(s[i].passed=this.attributeIsPassed(i)):s[i]={passed:!1,initialized:!1}}allPassedObservedAttributesAreInitialized(){return Object.keys(this.observedAttributesToCheck).every(e=>{var s,i;return!((s=this.observedAttributesToCheck[e])!=null&&s.passed)||((i=this.observedAttributesToCheck[e])==null?void 0:i.initialized)})}checkRequiredAttributes(){return this.requiredAttributes().every(e=>(e=Te(e),this.scope.hasOwnProperty(e)&&typeof this.scope[e]<"u"))}parseAttribute(e){let s=e;if(typeof e!="string")return e;if(e==="true")s=!0;else if(e==="false")s=!1;else if(e==="null")s=null;else if(e==="undefined")s=void 0;else if(e==="")s=void 0;else if(!isNaN(Number(e)))s=Number(e),s>=Number.MAX_SAFE_INTEGER&&(s=e);else{const i=Wi(s);s=i||s}return s}eventHandler(e){return function(s,i,r,o){if(!this||!this.call){const l=new Error(`[rv-${r.type}="${r.keypath}"] Event handler "${r.keypath}" not found!"`);throw console.error(r,o),l}this.call(e,i,r.view.models,o)}}connectedCallback(){}disconnectedCallback(){}async attributeChangedCallback(e,s,i,r){this.observedAttributesToCheck&&this.observedAttributesToCheck[e]&&(this.observedAttributesToCheck[e].initialized=!0),i=this.parseAttribute(i);const o=Te(e);this.scope&&this.scope[o]&&(s=this.scope[o]),this.scope[o]=i,this.parsedAttributeChangedCallback(o,s,i,r)}parsedAttributeChangedCallback(e,s,i,r){this.debug("parsedAttributeChangedCallback called",e,s,i,r)}adoptedCallback(e,s){this.debug("adoptedCallback called",e,s)}async loadTemplate(){if(this.templateLoaded===!0)return null;if(!this.checkRequiredAttributes())return this.debug("Not all required attributes are set to load the template"),null;this.templateLoaded=!0;const e=await this.template();try{return e&&(e instanceof HTMLElement?(this.innerHTML="",this.appendChild(e)):typeof e=="string"?this.innerHTML=e:e.tag&&(this.innerHTML=Dn(e))),e}catch(s){throw this.templateLoaded=!1,s}}async beforeTemplate(){}async afterTemplate(e){this.debug("afterTemplate",e)}async onReady(){}observe(e,s){return new Me(this.scope,e,s)}observeAttribute(e,s){const i=Te(e);return this.observe(i,s)}setBinderAttribute(e,s,i=null){const r=Te(e),o=this.scope[r];this.attributeChangedCallback(e,o,s,i)}getBinderAttribute(e){const s=Te(e);return this.scope[s]}loadAttributes(e){const s=this.attributes;for(const i in s){const r=s[i],o=r.nodeName;if(e.indexOf(o)!==-1){const l=r.nodeValue;this.attributeChangedCallback(o,void 0,l,null)}}}}a(lr,"tagName");let F=class extends lr{constructor(){super();a(this,"view",null);a(this,"riba");a(this,"_binds",!1);a(this,"_bound",!1);a(this,"_connected",!1);a(this,"_disconnected",!1);a(this,"lifecycleEvents",$.getInstance("lifecycle"));a(this,"lifecycleOptions",{});a(this,"autobind",!0);this.lifecycleEvents.trigger("Component:constructor",this.getLifecycleEventData()),this.lifecycleEvents.on("ComponentLifecycle:allBound",this.afterAllBind,this)}get binds(){return this._binds}get bound(){return this._bound}get connected(){return this._connected}get disconnected(){return this._disconnected}async init(e){try{return await super.init(e),this.lifecycleEvents.trigger("Component:init",this.getLifecycleEventData()),await this.bindIfReady()}catch(s){this.throw(s)}}throw(e){e.message&&console.error(`[${this.tagName}] ${e.message}`),this.lifecycleEvents.trigger("Component:error",e,this.getLifecycleEventData()),this.error(e)}async bindIfReady(){if(this.ready()){await this.beforeTemplate();const e=await this.loadTemplate();await this.afterTemplate(e),this.autobind&&await this.bind(),await this.onReady();return}this.debug("Not all required or passed attributes are set to load and bind the template",this.observedAttributesToCheck,this.scope)}async _beforeBind(){this._binds=!0,this.debug("Start to bind Riba"),this.lifecycleEvents.trigger("Component:beforeBind",this.getLifecycleEventData())}async beforeBind(){}async _afterBind(){this._binds=!1,this._bound=!0,this.lifecycleEvents.trigger("Component:afterBind",this.getLifecycleEventData())}async afterBind(){}async afterAllBind(){}getLifecycleEventData(){return{tagName:this.tagName.toLowerCase(),component:this,options:this.lifecycleOptions}}disconnectedCallback(){try{this._disconnected=!0,this._connected=!1,super.disconnectedCallback(),this.lifecycleEvents.trigger("Component:disconnected",this.getLifecycleEventData()),this.lifecycleEvents.off("ComponentLifecycle:allBound",this.afterAllBind,this),this.lifecycleEvents.off("ComponentLifecycle:error",this.afterAllBind,this)}catch(e){this.throw(e)}}connectedCallback(){try{this._disconnected=!1,this._connected=!0,super.connectedCallback(),this.lifecycleEvents.trigger("Component:connected",this.getLifecycleEventData())}catch(e){this.throw(e)}}async attributeChangedCallback(e,s,i,r){try{super.attributeChangedCallback(e,s,i,r),await this.bindIfReady()}catch(o){this.throw(o)}}callFormatterHandler(e){return{name:"call",read:(s,...i)=>{if(!s)throw new Error(`[${e.tagName}] Can not use "call" formatter: fn is undefined!`);return s.apply(e,i)}}}argsFormatterHandler(e){return{name:"args",read:(s,...i)=>(r,o,l,c)=>{if(!s)throw new Error(`[${e.tagName}] Can not use "args" formatter: fn is undefined!`);return i.push(r),i.push(o),i.push(l),i.push(c),s.apply(e,i)}}}async bind(){if(this.binds||this.bound)return this.view;if(!this.checkRequiredAttributes()){this.debug("Not all required attributes are set for bind");return}try{await this._beforeBind(),await this.beforeBind(),this.riba=new Rt,this.view=this.getView(),this.view&&(this.scope=this.view.models,this.view.bind()),await this._afterBind(),await this.afterBind()}catch(e){this._binds=!1,this._bound=!1,this.throw(e)}return this.view}getView(){var e;try{const s=(e=this.riba)==null?void 0:e.getViewOptions({handler:this.eventHandler(this),formatters:{call:this.callFormatterHandler(this),args:this.argsFormatterHandler(this)}});return s?new me(Array.prototype.slice.call(this.childNodes),this.scope,s):null}catch(s){this.throw(s)}}async unbind(){try{this.view&&(this._binds=!1,this._bound=!1,this.view.unbind(),this.view=null)}catch(e){this.throw(e)}}async build(){try{this.view&&this.view.build()}catch(e){this.throw(e)}}};const Td=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));class cr extends F{constructor(){super(...arguments);a(this,"templateAttributes",[]);a(this,"templateReady",!1)}connectedCallback(){this.addItemsByTemplate(),super.connectedCallback(),this.removeTemplates(),this.bindIfReady()}ready(){return super.ready()&&this.templateReady}transformTemplateAttribute(e,s,i){switch(i){case"number":return Number(s);case"boolean":return s==="true";case"string":if(typeof s=="string")return s;if(typeof(s==null?void 0:s.toString)=="function")return s.toString();case"object":return Wi(s)}return Je(s).value}transformTemplateAttributes(e,s){return e.index=e.index||s,e}getTemplateAttributes(e,s){const i={};for(const r of this.templateAttributes)typeof e.getAttribute(r.name)!="string"&&r.required?console.error(new Error(`template "${r.name}" attribute is required!`)):i[Te(r.name)]=this.transformTemplateAttribute(r.name,e.getAttribute(r.name));return this.transformTemplateAttributes(i,s)}addItemByTemplate(e,s){const i=this.getTemplateAttributes(e,s),r=e.innerHTML;this.scope.items||(this.scope.items=[]),this.scope.items.push({...i,content:r})}addItemsByTemplate(){const e=this.querySelectorAll("template, .template");for(let s=0;s{var s;return e.nodeName!=="TEMPLATE"&&!((s=e.classList)!=null&&s.contains("template"))&&e.nodeName!=="#text"})}}const Cd={name:"contains",read(n,t,e){if(mt(n))return n.indexOf(t)>-1;if(Array.isArray(n)){if(Ve(t)||console.warn("[containsFormatter] The second parameter must be of type number for arrays but is "+typeof t),t=Number(t),dt(t))return dt(e)?n[t]===e:n.includes(t)}else if(X(n)&&dt(t))return dt(e)?n[t]===e:(mt(t)||console.warn("[containsFormatter] The second parameter must be of type string for objects"+typeof t),Object.keys(n).includes(String(t)));return!1}},_l={name:"size",read(n){return n&&n.length?n.length:0}},Sl={name:"empty",read(n){return _l.read(n)<=0}},hr={name:"get",read(n,t){return X(n)||Array.isArray(n)?n[t]:mt(n)&&Ve(t)?n.charAt(t):null}},Ld={name:"first",read(n){return hr.read(n,0)}},kd={name:"isLast",read(n,t){return n.length===t+1}},xd={name:"last",read(n){return hr.read(n,n.length-1)}},Id={name:"random",read(n,t=0){if(Array.isArray(n))return n[Math.floor(Math.random()*n.length)];if(Ve(n)){const e=n;return Math.floor(Math.random()*(e-t+1)+t)}return null}},Nd={name:"range",read(n,t,e){return t=Number(Ve(t)?t:0),e=Number(Ve(e)?e:n.length-1),e>n.length-1&&(e=n.length-1),t>e?[]:n.slice(Number(t||0),1+e)}},Od={name:"set",read(n,t,e){return e||(e=t),X(n)||Array.isArray(n)?n[t]=e:n=e,n}},Pd={name:"overlaps",read(n,t){for(const e of n)for(const s of t)if(e.equals&&e.equals(s)||e===s)return!0;return!1}},Dd={name:"join",read(n,t){return n.join(t)}},Md={name:"and",read(n,t){return n&&t}},Rd={name:"between",read(n,...t){return n>=t[0]&&n<=t[1]}},$d={name:"egt",read(n,t){return n>=t}},Bd={name:"eq",read(n,t){return n===t}},Fd={name:"gt",read(n,t){return n>t}},Hd={name:"ne",read(n,t){return n!==t}},Vd={name:"lt",read(n,t){return nt===0?n:Al(t,n%t),Gd={name:"gcd",read:Al},Xd={name:"even",read(n){return n%2===0}},Jd={name:"uneven",read(n){return n%2!==0}},Zd={name:"digits",read(n){return Ve(n)?n:ys(n)}},eu={name:"args",read(n,...t){return(e,s,i,r)=>(t.push(e),t.push(s),t.push(i),t.push(r),n.apply(this,t))}},tu={name:"debug",read(n,t="debug"){return console[t](n),n}},su={name:"default",read(n,t){return dt(n)?mt(n)?n.length>0?n:t:n===null?t:n:t}},iu={name:"is-desktop",read(){return ld()}},nu={name:"is-mobile",read(){return ad()}},ru={name:"call",read(n,...t){return n.apply(this,t)}},ou={name:"call-name",read:function(n,t,...e){return n[t](...e)}},au={name:"map",read(n,t,e){const s=Array.prototype.slice.call(arguments);return s.splice(1,2),t[e].apply(t,s)}},lu={name:"os",read(){return Ra()}},cu={name:"prefer",read(n,t){return t||n}},hu={name:"ternary",read(n,t,e){return n?t:e}},du={name:"append",read(n,t){return n+t}},uu={name:"capitalize",read(n){return Xh(n)}},pu={name:"cut",read(n,t,e=""){return n?typeof n!="string"?(console.warn("[cutFormatter] Value must be of type string"),n):n.length>t?n.substring(t,t===-1?void 0:-1)+e:n:""}},fu={name:"downcase",read(n){return n.toLowerCase()}},mu={name:"ends-with",read(n,t){return typeof n!="string"?(console.warn("[endsWithFormatter] Value must be of type string"),n):n.endsWith(t)}},gu={name:"filled",read(n){return mt(n)&&!Sl.read(n.replace(/\s/g,""))}},Ki={name:"handleize",read(n){return n?Kh(n):(console.warn("[handleizeFormatter] str is not set"),"")}},vu={name:"match",read(n,t,e){return!n||!t?!1:n.match(new RegExp(t,e))}},bu={name:"padStart",read(n,t=2,e="0"){return n.padStart(t,e)}},Eu={name:"padEnd",read(n,t=2,e="0"){return n.padEnd(t,e)}},Mn={name:"to-integer",read(n){const t=parseInt(n*1,10);return isNaN(t)?0:t}},Rn={name:"to-float",read(n){const t=parseFloat(n*1);return isNaN(t)?0:t}},$n={name:"to-decimal",read(n){if(!Mn.read)throw new Error("toIntegerFormatter must have a read function");if(!Rn.read)throw new Error("toFloatFormatter must have a read function");const t=Mn.read(n*1),e=Rn.read(n);return t==e?t:e}},Bn={name:"is-integer",read(n){return n===+n&&n===(n|0)}},yu=".",wu="'",ko=2,_u={name:"numberFormat",read(n,t=ko,e=yu,s=wu){if(!$n.read)throw new Error("toDecimalFormatter must have a read function");if(!Bn.read)throw new Error("isIntegerFormatter must have a read function");n=Ve(n)?n:$n.read(n),Bn.read(t)||(t=ko);let i=(+(Math.round(+(Math.abs(n)+"e"+t))+"e"+-t)).toFixed(t);n<0&&(i="-"+i);const r=i.split(".");return r.length==2?r[0].replace(/\B(?=(\d{3})+(?!\d))/g,s)+e+r[1]:r[0].replace(/\B(?=(\d{3})+(?!\d))/g,s)}},Su={name:"pluralize",read(n,t,e){return e===null&&(e=t+"s"),Array.isArray(n)&&(n=n.length),n===1?t:e}},Au={name:"prepend",read(n,t){return t+n}},Tu={name:"upcase",read(n){return n.toUpperCase()}},Cu={name:"replace",read(n,t,e){return n.replace(new RegExp(t,"g"),e)}},Lu={name:"replaceFirst",read(n,t,e){return n.replace(t,e)}},ku={name:"slice",read(n,t,e){return n.slice(t,e)}},xu={name:"starts-with",read(n,t){return typeof n!="string"?(console.warn("[startsWithFormatter] Value must be of type string"),n):n.startsWith(t)}},Iu={name:"strip",read(n){return n.trim()}},Nu={name:"strip-html",read(n){return ki(n)}},Ou={name:"boolean",read(n){return n==="true"?!0:n==="false"?!1:!!n}},Pu={name:"is-array",read:Array.isArray},Du={name:"is-boolean",read:Lt},Mu={name:"is-defined",read:dt},Ru={name:"is-number",read:Ve},$u={name:"is-object",read:X},Bu={name:"is-string",read(n){return mt(n)}},Fu={name:"is-undefined",read:xa},Hu={name:"json",read(n,t=2,e=!0){return ji(n,t,e)}},Vu={name:"parse",read(n){return X(n)||Array.isArray(n)||typeof n=="boolean"||typeof n=="number"?(console.warn("[parseFormatter] You do not need to parse the value because since it already been parsed"),n):typeof n=="string"?Je(n,!0).value:null}},Uu={name:"toBase64",read(n){return Uh(n)}},ju={name:"to-string",read(n,t){if(Array.isArray(n))for(const e in n)n[e]&&(n[e]=Be(n[e]));else if(X(n))for(const e in n)n[e]=Be(n[e]);else n=Be(n);return t?n||t:n}},Wu={name:"to-number",read(n,t){const e=Wh(n);return t?e||t:e}},zu=Object.freeze(Object.defineProperty({__proto__:null,andFormatter:Md,appendFormatter:du,argsFormatter:eu,betweenFormatter:Rd,booleanFormatter:Ou,callFormatter:ru,callNameFormatter:ou,capitalizeFormatter:uu,containsFormatter:Cd,cutFormatter:pu,debugFormatter:tu,defaultFormatter:su,digitsFormatter:Zd,dividedByFormatter:Yd,downcaseFormatter:fu,egtFormatter:$d,eltFormatter:Ud,emptyFormatter:Sl,endsWithFormatter:mu,eqFormatter:Bd,evenFormatter:Xd,filledFormatter:gu,firstFormatter:Ld,gcdFormatter:Gd,getFormatter:hr,gtFormatter:Fd,handleizeFormatter:Ki,isArrayFormatter:Pu,isBooleanFormatter:Du,isDefinedFormatter:Mu,isDesktopFormatter:iu,isIntegerFormatter:Bn,isLastFormatter:kd,isMobileFormatter:nu,isNumberFormatter:Ru,isObjectFormatter:$u,isStringFormatter:Bu,isUndefinedFormatter:Fu,joinFormatter:Dd,jsonFormatter:Hu,lastFormatter:xd,ltFormatter:Vd,mapFormatter:au,matchFormatter:vu,minusFormatter:qd,moduloFormatter:Kd,neFormatter:Hd,notFormatter:Wd,numberFormatFormatter:_u,orFormatter:jd,osFormatter:lu,overlapsFormatter:Pd,padEndFormatter:Eu,padStartFormatter:bu,parseFormatter:Vu,pluralizeFormatter:Su,plusFormatter:zd,preferFormatter:cu,prependFormatter:Au,randomFormatter:Id,rangeFormatter:Nd,replaceFirstFormatter:Lu,replaceFormatter:Cu,setFormatter:Od,sizeFormatter:_l,sliceFormatter:ku,startsWithFormatter:xu,stripFormatter:Iu,stripHtmlFormatter:Nu,ternaryFormatter:hu,timesFormatter:Qd,toBase64Formatter:Uu,toDecimalFormatter:$n,toFloatFormatter:Rn,toIntegerFormatter:Mn,toNumberFormatter:Wu,toStringFormatter:ju,unevenFormatter:Jd,upcaseFormatter:Tu},Symbol.toStringTag,{value:"Module"})),qu={formatters:zu,binders:yd,services:ud,components:Td,adapters:fd,init(n={}){return _s.setSingleton(n),window.onerror=(t,e,s,i,r)=>{console.error(t,e,s,i,r)},window.addEventListener("error",t=>{console.error(t)}),this}},Dt=class{constructor(){a(this,"history",[]);return Dt.instance||(Dt.instance=this),Dt.instance}currentStatus(){return this.history[this.history.length-1]}prevStatus(){const t=this.history;return t.length<2?null:t[t.length-2]}add(t,e=null){this.history.push({namespace:e,url:t})}};let Gs=Dt;a(Gs,"instance");const hs="router-error",Qu="no-barba",Yu="no-barba-prefetch";class Gi{constructor(t="replace"){a(this,"oldContainer");a(this,"newContainer");a(this,"newContainerLoading");a(this,"deferred",cn());a(this,"action");this.action=t}async init(t,e){this.oldContainer=t,this.deferred=cn();const s=cn();return this.newContainerLoading=s.promise,this.start(),this.newContainer=await e,s.resolve(this.newContainer),this.deferred.promise}async done(){if(!this.oldContainer)throw new Error("Can't remove old container");if(this.action==="replace"&&this.oldContainer.remove(),!this.newContainer)throw new Error("Can't show new container");return this.newContainer.style.visibility="visible",this.deferred.resolve(void 0)}}class Ku extends Gi{async start(){if(!this.newContainerLoading)throw new Error("this.newContainerLoading is not set");await this.newContainerLoading,this.finish()}async finish(){return document.body.scrollTop=0,this.done()}}class Tl extends Gi{constructor(e=!0){super("replace");a(this,"scrollToTop");a(this,"durationMs",200);this.scrollToTop=e}async start(){if(!this.newContainerLoading)throw new Error("this.newContainerLoading is not set");this.oldContainer&&(this.oldContainer.style.transition=`opacity ${this.durationMs}ms`,this.oldContainer.style.opacity="0"),this.scrollToTop&&await or(window,"start","vertical","smooth");const e=await this.newContainerLoading;e.style.opacity="0",e.style.transition=`opacity ${this.durationMs}ms`,setTimeout(()=>{this.finish(e)},this.durationMs)}async finish(e){return e.style.opacity="1",this.done()}}class Ss extends Gi{constructor(e="replace",s=!0){super(e);a(this,"action");a(this,"scrollToTop");this.action=e,this.scrollToTop=s}async start(){if(!this.newContainerLoading)throw new Error("this.newContainerLoading is not set");this.oldContainer&&(this.oldContainer.style.display="none"),this.scrollToTop&&await or(window,"start","vertical","smooth"),await this.newContainerLoading,await this.finish(),this.oldContainer&&(this.oldContainer.style.display="")}async finish(){return this.done()}}class Gu{constructor(){a(this,"namespace");a(this,"container");a(this,"dispatcher",$.getInstance())}extend(t){return yt({deep:!1},this,t)}init(){this.dispatcher.on("initStateChange",(t,e,s)=>{s&&s.namespace===this.namespace&&this.onLeave()}),this.dispatcher.on("newPageReady",(t,e,s,i)=>{this.container=i,e.namespace===this.namespace&&this.onEnter()}),this.dispatcher.on("transitionCompleted",(t,e,s)=>{e.namespace===this.namespace&&this.onEnterCompleted(),s&&s.namespace===this.namespace&&this.onLeaveCompleted()})}}class at{static getPrefetchLinkElements(t){return t.querySelectorAll('link[href][rel="dns-prefetch"], link[href][rel="preconnect"], link[href][rel="prefetch"], link[href][rel="subresource"], link[href][rel="preload"], link[href][rel="router-preload"]')}static parseTitle(t){let e="";const s=t.querySelector("title");return s&&s.innerText&&(e=s.innerText),e}static parseResponse(t,e,s,i=!0){let r="",o=[];const l=document.createElement("template");return l.innerHTML=t,e&&(r=this.parseTitle(l.content)),i&&(o=this.getPrefetchLinkElements(l.content)),{container:this.getContainer(l,s),title:r,prefetchLinks:o}}static parseInitial(t,e,s=!0){let i="",r=[];const o=this.getContainer(document,e);return t&&(i=this.parseTitle(document)),s&&(r=this.getPrefetchLinkElements(document)),{container:o,title:i,prefetchLinks:r}}static getContainer(t,e){if(!t)throw new Error("Barba.js: [getContainer] No element to get container from, maybe the DOM is not ready!");const s=this.parseContainer(t,e);if(!s)throw new Error("[DOM] No container found");return s}static getNamespace(t){return t&&t.dataset&&t.dataset.namespace?t.dataset.namespace:null}static putContainer(t,e){t=t,t.style.visibility="hidden",e.appendChild(t)}static parseContainer(t,e){if(!t){const i=new Error("New page not loaded!");throw console.error(i,t),i}let s;if(t.content?s=t.content.querySelector(e):s=t.querySelector(e),!s){const i=new Error(`No container with selector "${e}" found!`);throw console.error(i,t),i}return s}}const Mt=class{constructor(t){if(this.viewId=t,this.viewId=t,Mt.instances[this.viewId])return Mt.instances[this.viewId];Mt.instances[this.viewId]=this,this.onLinkEnterIntern=this.onLinkEnterIntern.bind(this)}static getInstance(t="main"){const e=Mt.instances[t];return e||new this(t)}init(t=!1){if(!window.history.pushState)return!1;t&&(this.deInit(),document.body.addEventListener("mouseover",this.onLinkEnterIntern,{passive:!0}),document.body.addEventListener("touchstart",this.onLinkEnterIntern,{passive:!0}))}deInit(){document.body.removeEventListener("mouseover",this.onLinkEnterIntern),document.body.removeEventListener("touchstart",this.onLinkEnterIntern)}initBinder(t,e){if(!window.history.pushState)return!1;this.deInitBinder(t,e),t.addEventListener("mouseover",this.onLinkEnter.bind(this,e,t),{passive:!0}),t.addEventListener("touchstart",this.onLinkEnter.bind(this,e,t),{passive:!0})}deInitBinder(t,e){t.removeEventListener("mouseover",this.onLinkEnter.bind(this,e,t)),t.removeEventListener("touchstart",this.onLinkEnter.bind(this,e,t))}onLinkEnter(t,e,s){if(e.classList&&(e.classList.contains(Yu)||e.classList.contains(hs)))return;t=_e(t).url;const i=te.preventCheck(t,e,s);if(t&&i){const r=te.getInstance(this.viewId);r?r.loadResponseCached(t,!1,!1).catch(o=>{e.classList.add(hs),console.error(t),console.error(o)}):(console.warn(`[Prefetch.onLinkEnter] No pjax instance for viewId "${this.viewId}" found!`),e.classList.add(hs))}}url(t){t=_e(t).url;const e=te.preventCheck(t);if(t&&e){const s=te.getInstance(this.viewId);s?s.loadResponseCached(t,!1,!1).catch(i=>{console.error(i)}):console.warn(`[Prefetch.url] No pjax instance for viewId "${this.viewId}" found!`)}}onLinkEnterIntern(t){let e=zi(t);if(!e)throw new Error("HTML Element not set");for(;e&&!te.getHref(e);)e=e.parentNode;if(!e||e.nodeName!=="A")return;const s=te.getHref(e);if(!(e.classList.contains("route")||e.hasAttribute("rv-route"))){if(!s){console.warn("Url is not defined, you can't cache the link without the url. Please make sure your element has the href attribute or pass the url directly to this function.",e);return}return this.onLinkEnter(s,e,t)}}};let $t=Mt;a($t,"instances",{});var Cl=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Xu(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Ht=1e3,Vt=Ht*60,Ut=Vt*60,gt=Ut*24,Ju=gt*7,Zu=gt*365.25,ep=function(n,t){t=t||{};var e=typeof n;if(e==="string"&&n.length>0)return tp(n);if(e==="number"&&isFinite(n))return t.long?ip(n):sp(n);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(n))};function tp(n){if(n=String(n),!(n.length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(n);if(t){var e=parseFloat(t[1]),s=(t[2]||"ms").toLowerCase();switch(s){case"years":case"year":case"yrs":case"yr":case"y":return e*Zu;case"weeks":case"week":case"w":return e*Ju;case"days":case"day":case"d":return e*gt;case"hours":case"hour":case"hrs":case"hr":case"h":return e*Ut;case"minutes":case"minute":case"mins":case"min":case"m":return e*Vt;case"seconds":case"second":case"secs":case"sec":case"s":return e*Ht;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return e;default:return}}}}function sp(n){var t=Math.abs(n);return t>=gt?Math.round(n/gt)+"d":t>=Ut?Math.round(n/Ut)+"h":t>=Vt?Math.round(n/Vt)+"m":t>=Ht?Math.round(n/Ht)+"s":n+"ms"}function ip(n){var t=Math.abs(n);return t>=gt?Bs(n,t,gt,"day"):t>=Ut?Bs(n,t,Ut,"hour"):t>=Vt?Bs(n,t,Vt,"minute"):t>=Ht?Bs(n,t,Ht,"second"):n+" ms"}function Bs(n,t,e,s){var i=t>=e*1.5;return Math.round(n/e)+" "+s+(i?"s":"")}let np=class{constructor(){this.cache=new Map}get(t){return this.cache.get(t)}set(t,e){this.cache.set(t,e)}keys(){return Array.from(this.cache.keys())}del(t){this.cache.delete(t)}clear(){this.cache.clear()}};var rp=np;const xo=ep,op=rp;function ap({cleanupInterval:n="5 mins",customStorage:t}={}){let e=t||new op,s;const i=m=>typeof m>"u",r=m=>typeof m<"u",o=m=>typeof m=="function",l=m=>typeof m=="number",c=m=>m&&new Date(m).getTime(){E.indexOf(m)===0&&e.del(E)});return}e.del(m)}function p(){return e.clear()}function f(){clearInterval(s)}return n&&(s=setInterval(async()=>{(await e.keys()).forEach(async v=>{const b=await e.get(v);if(b){const E=b[1];c(E)&&e.del(v)}})},xo(n))),{resolve:d,del:u,clear:p,teardown:f}}var lp=ap;const cp=Xu(lp);class Ll{constructor(){a(this,"data");this.data={}}set(t,e){return this.data[t]=e,this.data[t]}get(t){return this.data[t]}reset(){this.data={}}}function wt(n){return new Promise((t,e)=>{n.oncomplete=n.onsuccess=()=>t(n.result),n.onabort=n.onerror=()=>e(n.error)})}function hp(n,t){const e=indexedDB.open(n);e.onupgradeneeded=()=>e.result.createObjectStore(t);const s=wt(e);return(i,r)=>s.then(o=>r(o.transaction(t,i).objectStore(t)))}let un;function Ls(){return un||(un=hp("keyval-store","keyval")),un}function dp(n,t=Ls()){return t("readonly",e=>wt(e.get(n)))}function up(n,t,e=Ls()){return e("readwrite",s=>(s.put(t,n),wt(s.transaction)))}function pp(n,t=Ls()){return t("readwrite",e=>(e.delete(n),wt(e.transaction)))}function fp(n=Ls()){return n("readwrite",t=>(t.clear(),wt(t.transaction)))}function mp(n,t){return n.openCursor().onsuccess=function(){this.result&&(t(this.result),this.result.continue())},wt(n.transaction)}function gp(n=Ls()){return n("readonly",t=>{if(t.getAllKeys)return wt(t.getAllKeys());const e=[];return mp(t,s=>e.push(s.key)).then(()=>e)})}const vp={get:dp,set:up,keys:gp,del:pp,clear:()=>fp()};cp({customStorage:window.ssr?void 0:vp});const ne=class{constructor({id:t,action:e="replace",wrapper:s,containerSelector:i="[data-namespace]",listenAllLinks:r=!1,listenPopstate:o=!0,parseTitle:l=!0,changeBrowserUrl:c=!0,prefetchLinks:h=!0,scrollToTop:d=!0,scrollToAnchorOffset:u=vt.options.scrollToAnchorOffset}){a(this,"history",new Gs);a(this,"cacheEnabled",!0);a(this,"transitionProgress",!1);a(this,"listenAllLinks");a(this,"listenPopstate");a(this,"parseTitle");a(this,"changeBrowserUrl");a(this,"dispatcher");a(this,"transition");a(this,"wrapper");a(this,"viewId","main");a(this,"containerSelector");a(this,"prefetchLinks");a(this,"scrollToAnchorOffset");t&&(this.viewId=t);let p=this;return this.scrollToAnchorOffset=u||0,this.dispatcher=new $(this.viewId),this.listenAllLinks=r,this.listenPopstate=o,this.parseTitle=l,this.changeBrowserUrl=c,this.containerSelector=i,this.prefetchLinks=h,ne.instances[this.viewId]&&(p=ne.instances[this.viewId]),p.transition=p.transition||new Ss(e,d),p.wrapper=p.wrapper||s,p.containerSelector=p.containerSelector||i,p.listenAllLinks=Lt(p.listenAllLinks)?p.listenAllLinks:r,p.listenPopstate=Lt(p.listenPopstate)?p.listenPopstate:o,p.parseTitle=Lt(p.parseTitle)?p.parseTitle:l,p.changeBrowserUrl=Lt(p.changeBrowserUrl)?p.changeBrowserUrl:c,p.prefetchLinks=Lt(p.prefetchLinks)?p.prefetchLinks:h,p.wrapper&&p.wrapper.setAttribute("aria-live","polite"),ne.instances[this.viewId]=p,ne.instances[this.viewId]}static getInstance(t="main"){const e=ne.instances[t];return e||console.warn(`[Pjax.getInstance] No pjax instance for viewId "${t}" found!`),e}static preventCheckUrl(t){const e=document.createElement("a");return e.setAttribute("href",t),!(!e||!t||dn(t)===dn(location.href)||window.location.protocol!==e.protocol||window.location.hostname!==e.hostname||Lo()!==Lo(e.port))}static preventCheck(t,e,s){return!(!window.history.pushState||!this.preventCheckUrl(t)||s&&(s&&s.which&&s.which>1||s.metaKey||s.ctrlKey||s.shiftKey||s.altKey)||e&&(e.target&&e.target==="_blank"||e.getAttribute&&typeof e.getAttribute("download")=="string"||e.classList.contains(Qu)))}static getHref(t){if(t){if(t.getAttribute&&typeof t.getAttribute("xlink:href")=="string")return t.getAttribute("xlink:href")||void 0;if(typeof t.href=="string"||t.hasAttribute&&t.hasAttribute("href")){const e=t.href||t.getAttribute("href");if(!e)throw console.error("href attribute not found for element: ",t),new Error("href attribute not found!");return e}}}setActiveWrapper(t){this.wrapper=t}start(){if(this.wrapper)try{this.init(this.wrapper,this.listenAllLinks,this.listenPopstate)}catch(t){console.error(t)}else console.error("Can't init pjax without wrapper")}getCurrentUrl(){return dn(xi())}goTo(t,e=!1){if(e){const s=window.open(t,"_blank");return s?s.focus():!1}if(t.startsWith("http")&&(t=_e(t).url),t.startsWith("http"))this.forceGoTo(t);else return this.changeBrowserUrl&&window.history.pushState(null,"",t),this.onStateChange(void 0,t)}getTransition(){return this.transition||new Ss}prefetchLink(t){if(t=_e(t).url,ne.preventCheckUrl(t))return this.loadResponseCached(t,!0,!1)}prefetchLinkElement(t,e){const s=t.getAttribute("rel"),i=ne.getHref(t);if(s==="router-preload"&&i&&this.cacheEnabled&&!t.classList.contains(hs))try{this.prefetchLink(i)}catch(r){t.classList.add(hs),console.error(r)}e.appendChild(t)}removePrefetchLinks(t){t.querySelectorAll('link[href][rel="dns-prefetch"], link[href][rel="preconnect"], link[href][rel="prefetch"], link[href][rel="subresource"], link[href][rel="preload"], link[href][rel="router-preload"]').forEach(s=>{s&&s.parentNode&&s.parentNode.removeChild(s)})}replacePrefetchLinkElements(t){const e=document.head||document.getElementsByTagName("head")[0];this.removePrefetchLinks(e),t.forEach(s=>{this.prefetchLinkElement(s,e)})}async loadCached(t){try{const{responsePromise:e}=await this.loadResponseCached(t,!1,!0);if(!this.wrapper)throw new Error("[Pjax] you need a wrapper!");const s=await e;return at.putContainer(s.container,this.wrapper),this.parseTitle===!0&&s.title&&(document.title=s.title),this.prefetchLinks===!0&&s.prefetchLinks&&this.replacePrefetchLinkElements(s.prefetchLinks),s.container}catch(e){throw console.error(e),this.forceGoTo(t),e}}async loadResponseCached(t,e=!1,s=!0){let i;try{if(this.cacheEnabled&&(i=ne.cache.get(t),i))return{fromCache:!0,responsePromise:i};i=this.loadResponse(t,e),this.cacheEnabled&&i&&ne.cache.set(t,i)}catch(r){throw console.error(r),s&&this.forceGoTo(t),r}return{fromCache:!1,responsePromise:i}}async loadResponse(t,e=!1){const s=e?{cache:"force-cache"}:{},i=await Xt.get(t,void 0,"html",{},s);if(!i||!i.body)throw new Error("No body!");return at.parseResponse(i.body,this.parseTitle,this.containerSelector,this.prefetchLinks)}bindEvents(t,e){t&&document.addEventListener("click",this.onLinkClickIntern.bind(this)),e&&window.addEventListener("popstate",this.onStateChange.bind(this))}forceGoTo(t){console.warn("forceGoTo",t),t&&t.href&&(window.location=t),typeof t=="string"&&(window.location.href=t)}onLinkClickIntern(t){let e=zi(t);for(;e&&!ne.getHref(e);)e=e.parentNode;if(!e||e.nodeName!=="A")return;const s=ne.getHref(e);if(!(e.classList.contains("route")||e.hasAttribute("rv-route"))){if(!s)throw new Error("Url is not defined, you can't cache the link without the url. Please make sure your element has the href attribute or pass the url directly to this function.");return e.classList.contains("route")||e.hasAttribute("rv-route")?!1:this.onLinkClick(t,e,s)}}onLinkClick(t,e,s,i=!1){const{url:r,location:o}=_e(s),{location:l}=_e();if(o.hash&&l.pathname===o.pathname){let h=o.hash.slice(1);h=decodeURI(h);const d=document.getElementById(h);if(d)return t.stopPropagation(),t.preventDefault(),this.changeBrowserUrl&&window.history.pushState(null,"",r),Gt(d,this.scrollToAnchorOffset)}if(!r)throw new Error("url is falsy");ne.preventCheck(r,e,t)&&(t.stopPropagation(),t.preventDefault(),this.dispatcher.trigger("linkClicked",e,t),this.goTo(r,i))}async onStateChange(t,e=this.getCurrentUrl()){e=_e(e).url;const s=_e(this.history.currentStatus().url).url;if(this.changeBrowserUrl&&s===e)return!1;this.history.add(e),this.dispatcher.trigger("initStateChange",this.viewId,this.history.currentStatus(),this.history.prevStatus());const i=at.getContainer(document,this.containerSelector),r=this.loadCached(e),o=this.getTransition();this.transitionProgress=!0;const l=o.init(i,r);this.onNewContainerLoaded(await r),await l,this.onTransitionEnd()}onNewContainerLoaded(t){const e=this.history.currentStatus();e.namespace=at.getNamespace(t);const s=_o(t);this.dispatcher.trigger("newPageReady",this.viewId,this.history.currentStatus(),this.history.prevStatus(),t,t.innerHTML,s,!1)}onTransitionEnd(){this.transitionProgress=!1,this.dispatcher.trigger("transitionCompleted",this.viewId,this.history.currentStatus(),this.history.prevStatus())}init(t,e,s){const i=at.parseInitial(this.parseTitle,this.containerSelector,this.prefetchLinks),r=window.location.pathname;if(this.cacheEnabled){const l=_e(window.location.href).url;ne.cache.get(r)||this.loadResponseCached(l,!1,!1)}this.replacePrefetchLinkElements(i.prefetchLinks),this.wrapper=t,this.history.add(this.getCurrentUrl(),at.getNamespace(i.container)),this.dispatcher.trigger("initStateChange",this.viewId,this.history.currentStatus());const o=_o(i.container);this.dispatcher.trigger("newPageReady",this.viewId,this.history.currentStatus(),{},i.container,i.container.innerHTML,o,!0),this.dispatcher.trigger("transitionCompleted",this.viewId,this.history.currentStatus()),this.bindEvents(e,s)}};let te=ne;a(te,"cache",new Ll),a(te,"instances",{});class vt{static get options(){return this._options}constructor(){}static getSingleton(){if(this.instance)return this.instance;throw new Error("Singleton of RouterService not defined, please call setSingleton first!")}static setSingleton(t={}){return this.instance?(console.warn("Singleton of RouterService already defined!"),this.instance):(t.defaultTransition=t.defaultTransition??new Ss,t.scrollToAnchorOffset=t.scrollToAnchorOffset??0,this._options=t,this.instance=new this,this.instance)}}a(vt,"_options"),a(vt,"instance");const bp=Object.freeze(Object.defineProperty({__proto__:null,BaseTransition:Gi,BaseView:Gu,CustomTransition:Ku,Dom:at,FadeTransition:Tl,HideShowTransition:Ss,Pjax:te,Prefetch:$t,RouterService:vt},Symbol.toStringTag,{value:"Module"})),Ep=Ki.read;class Fn extends A{constructor(){super(...arguments);a(this,"nested",null)}async routine(e,s){const i=e;s=s||{},s.listenAllLinks=!1,s.listenPopstate=!1,s.parseTitle=!1,s.transition=s.transition||new Ss,s.viewId=s.viewId||e.getAttribute("id")||Ep(s.url),s.containerSelector=s.containerSelector||"[data-namespace]",s.changeBrowserUrl=!1;const r=new te(s),{responsePromise:o}=await r.loadResponseCached(s.url,!1,!1),l=await o;i.replaceWith(l.container),l.container.style.visibility="visible",X(this.view.models)||(this.view.models={}),this.nested&&this.nested.unbind(),this.nested=new me(l.container,this.view.models,this.view.options),this.nested.bind()}unbind(){this.nested&&this.nested.unbind()}}a(Fn,"key","view-static"),a(Fn,"block",!0);class kl extends A{constructor(){super(...arguments);a(this,"prefetch");a(this,"options",{url:"",viewId:"main",removeAfterActivation:!1,newTab:!1,newTabOnExtern:!0});a(this,"onClick",this._onClick.bind(this))}_onClick(e){const s=te.getInstance(this.options.viewId);if(qi(this.options.url,!0))console.info("already on this site, do nothing"),e.stopPropagation(),e.preventDefault();else if(dd(this.options.url)){if(!s)return;e.stopPropagation(),e.preventDefault();const i=this.options.newTab||this.options.newTabOnExtern;s.goTo(this.options.url,i)}else if(this.options.url){if(!s)return;s.onLinkClick(e,this.el,this.options.url,this.options.newTab)}this.options.removeAfterActivation&&this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)}bind(e){e.classList.add("route"),!window.ssr&&(this.onClick=this.onClick.bind(this),e.addEventListener("click",this.onClick))}routine(e,s){mt(s)?this.options.url=s:X(s)&&(this.options=s),this.options.viewId=this.options.viewId||"main",this.prefetch=new $t(this.options.viewId),this.options.newTab=!1;const i=e.tagName==="A";if(!this.options.url&&i){const r=e.getAttribute("href");r&&(this.options.url=r)}e.getAttribute("target")==="_blank"&&(this.options.newTab=!0),this.options.url=_e(this.options.url).url,i&&(!e.href||!e.getAttribute("href"))&&this.options.url&&(e.setAttribute("href",this.options.url),e.href=this.options.url),this.options.newTab||this.prefetch.initBinder(e,this.options.url)}unbind(e){var s;(s=this.prefetch)==null||s.deInitBinder(e,this.options.url),e.removeEventListener("click",this.onClick)}}a(kl,"key","route");class xl extends A{constructor(){super(...arguments);a(this,"dispatcher",new $("main"));a(this,"url");a(this,"className","");a(this,"onUrlChange",this._onUrlChange.bind(this))}_onUrlChange(){if(this.url){if(qi(this.url))return this.el.classList.add(this.className),this.el.getAttribute("type")==="radio"&&(this.el.checked=!0),!0;this.el.classList.remove(this.className),this.el.getAttribute("type")==="radio"&&(this.el.checked=!1)}return!1}bind(){this.dispatcher.on("newPageReady",this.onUrlChange)}routine(e,s){this.url=s,this.className=this.args[0].toString()||"active";const i=e.tagName==="A";if(!this.url&&i){const r=e.getAttribute("href");r&&(this.url=r)}this.onUrlChange()}unbind(){this.dispatcher.off("newPageReady",this.onUrlChange)}}a(xl,"key","route-class-*");class Il extends A{routine(t,e){var i;if(window.ssr)return;const s=t.tagName==="A";if(!e&&s){const r=t.getAttribute("href");r&&(e=r)}e&&((i=te.getInstance())==null||i.prefetchLink(e))}}a(Il,"key","route-preload");class Nl extends A{constructor(){super(...arguments);a(this,"dispatcher",new $("main"));a(this,"className");a(this,"url");a(this,"onUrlChange",this._onUrlChange.bind(this))}_onUrlChange(){if(!this.url)throw new Error("url is not defined!");if(!this.className)throw new Error("className is not defined!");return cd(this.url)?(this.el.classList.add(this.className),this.el.getAttribute("type")==="radio"&&(this.el.checked=!0),!0):(this.el.classList.remove(this.className),this.el.getAttribute("type")==="radio"&&(this.el.checked=!1),!1)}routine(e,s){this.url=s,this.className=this.args[0].toString()||"active";const i=e.tagName==="A";if(!this.url&&i){const r=e.getAttribute("href");r&&(this.url=r)}this.onUrlChange()}bind(){this.dispatcher.on("newPageReady",this.onUrlChange)}unbind(){this.dispatcher.off("newPageReady",this.onUrlChange)}}a(Nl,"class","parent-route-class-*");const pn=()=>{window.history.back()};class Ol extends A{constructor(){super(...arguments);a(this,"priority",3e3);a(this,"eventName")}unbind(e){this.eventName&&e.removeEventListener(this.eventName,pn)}routine(e){if(this.args===null)throw new Error("args is null");this.eventName&&e.removeEventListener(this.eventName,pn),this.eventName=this.args[0],e.addEventListener(this.args[0],pn)}}a(Ol,"key","route-back-on-*");const yp=Object.freeze(Object.defineProperty({__proto__:null,ParentRouteClassStarBinder:Nl,RouteBackOnStarBinder:Ol,RouteBinder:kl,RouteClassStarBinder:xl,RoutePreloadBinder:Il,ViewStaticBinder:Fn},Symbol.toStringTag,{value:"Module"})),Mr=class extends F{constructor(){super();a(this,"autobind",!1);a(this,"scope",{src:"",id:"",async:!0,defer:!0})}static get observedAttributes(){return["src","id","async","defer"]}connectedCallback(){super.connectedCallback(),super.init(Mr.observedAttributes)}async onReady(){await super.onReady(),this.scope.id||(this.scope.id=Pa("script-")),ed(this.scope.src,this.scope.id,this.scope.async)}requiredAttributes(){return["src"]}template(){return null}};let Xs=Mr;a(Xs,"tagName","router-load-script");const vs=class extends F{constructor(){super();a(this,"events",$.getInstance("main"));a(this,"nested",null);a(this,"wrapper",null);a(this,"pjax",null);a(this,"prefetch",null);a(this,"scope",{id:"main",action:"replace",scrollToTop:!0,listenAllLinks:!0,listenPopstate:!0,scrollToAnchorHash:!0,scrollToAnchorOffset:vt.options.scrollToAnchorOffset,datasetToRootScope:!0,parseTitle:!0,changeBrowserUrl:!0,prefetchLinks:!0,transition:vt.options.defaultTransition})}static get observedAttributes(){return["id","action","container-selector","scroll-to-top","listen-all-links","listen-popstate","scroll-to-anchor-hash","scroll-to-anchor-offset","dataset-to-root-scope","parse-title","change-browser-url","prefetch-links"]}connectedCallback(){super.connectedCallback(),this.init(vs.observedAttributes)}addEventListeners(){this.events.on("newPageReady",this.onPageReady,this),this.events.on("initStateChange",this.onTransitionInit,this),this.events.on("transitionCompleted",this.onTransitionCompleted,this)}removeEventListeners(){this.events.off("newPageReady",this.onPageReady,this),this.events.off("initStateChange",this.onTransitionInit,this),this.events.off("transitionCompleted",this.onTransitionCompleted,this)}getContainerSelector(){return this.scope.id==="main"?`${vs.tagName} > *:first-child`:`${vs.tagName}#${this.scope.id} > *:first-child`}initAndStartPjax(){if(!this.scope.id){console.error("Id attribute is required!");return}const e={id:this.scope.id,action:this.scope.action,wrapper:this,containerSelector:this.getContainerSelector(),listenAllLinks:!!this.scope.listenAllLinks,listenPopstate:!!this.scope.listenPopstate,transition:this.scope.transition,parseTitle:!!this.scope.parseTitle,changeBrowserUrl:!!this.scope.changeBrowserUrl,prefetchLinks:!!this.scope.prefetchLinks,scrollToTop:!!this.scope.scrollToTop};this.pjax=new te(e),this.pjax.setActiveWrapper(this),this.prefetch=new $t(this.scope.id),this.prefetch.init(e.prefetchLinks),this.pjax.start()}onPageReady(e,s,i,r,o,l,c){if(e!==this.scope.id){console.warn("not the right view",this.scope.id,e,l);return}if(this.debug("New page ready!",this.innerHTML),this.scope.datasetToRootScope&&(this.scope.$root||(this.scope.$root={}),this.scope.$root.dataset=l),!c){if(this.view=this.getView(),!this.view){console.warn("View ist not ready!");return}this.view.bind()}}async onTransitionInit(e){e===this.scope.id&&this.setTransitionClass("init")}async onTransitionCompleted(e){if(e===this.scope.id){if(this.setTransitionClass("complete"),this.scope.scrollToAnchorHash){let s=null;if(window.location.hash.substr(1)&&(s=document.getElementById(window.location.hash.substr(1)),s))return await Gt(s,this.scope.scrollToAnchorOffset,window)}if(this.scope.scrollToTop)return await or(window,"start","vertical","smooth")}}setTransitionClass(e){this.classList.remove("transition-init"),this.classList.remove("transition-complete"),this.classList.add(`transition-${e}`)}requiredAttributes(){return[]}parsedAttributeChangedCallback(e,s,i,r){switch(super.parsedAttributeChangedCallback(e,s,i,r),e){case"id":this.events=$.getInstance(this.scope.id);break}}async beforeBind(){await super.beforeBind(),this.addEventListeners(),this.initAndStartPjax()}template(){return null}};let Js=vs;a(Js,"tagName","router-view");const wp=Object.freeze(Object.defineProperty({__proto__:null,RouterLoadScriptComponent:Xs,RouterViewComponent:Js},Symbol.toStringTag,{value:"Module"})),_p={binders:yp,components:wp,services:bp,formatters:{},init(n={}){return vt.setSingleton(n),this}},dr=["os","dark","light"],Pl={dimension:0,name:"xs"},Dl={dimension:576,name:"sm"},Ml={dimension:768,name:"md"},Rl={dimension:992,name:"lg"},$l={dimension:1200,name:"xl"},Bl={dimension:1400,name:"xxl"},Oi={breakpoints:[Pl,Dl,Ml,Rl,$l,Bl],allowStoreDataInBrowser:!0},D={nsPrefix:"bs5-toggle-button:",eventNames:{toggle:"toggle",toggled:"toggled",init:"init",state:"state"}},Hn={elEventNames:{removed:"removed",added:"added"}},Vn={elEventNames:{removed:"removed",added:"added"}},Sp=Object.freeze(Object.defineProperty({__proto__:null,DEFAULT_BP_LG:Rl,DEFAULT_BP_MD:Ml,DEFAULT_BP_SM:Dl,DEFAULT_BP_XL:$l,DEFAULT_BP_XS:Pl,DEFAULT_BP_XXL:Bl,DEFAULT_MODULE_OPTIONS:Oi,TOGGLE_ATTRIBUTE:Hn,TOGGLE_BUTTON:D,TOGGLE_CLASS:Vn,themeChoices:dr},Symbol.toStringTag,{value:"Module"})),Qe=class{constructor(t){a(this,"_options",Oi);a(this,"_events",$.getInstance("bs5"));a(this,"_activeBreakpoint",null);a(this,"onViewChanges",xe(this._onViewChanges.bind(this)));this._options=t,this.sortBreakpoints(this._options.breakpoints),this._onViewChanges(),this.addEventListeners()}static getSingleton(){if(Qe.instance)return Qe.instance;throw new Error("Singleton of Bs5Service not defined, please call `Bs5Service.setSingleton` or `bs5Module.init` first!")}static setSingleton(t=Oi){if(Qe.instance)throw new Error("Singleton of Bs5Service already defined!");return Qe.instance=new Qe(t),Qe.instance}onBreakpointChanges(){this._events.trigger("breakpoint:changed",this.activeBreakpoint)}setActiveBreakpoint(t){var e;t&&t.name!==((e=this.activeBreakpoint)==null?void 0:e.name)&&(this._activeBreakpoint=t,this.onBreakpointChanges())}addEventListeners(){window.addEventListener("resize",this.onViewChanges,{passive:!0})}removeEventListeners(){window.removeEventListener("resize",this.onViewChanges)}_onViewChanges(){const t=this.getBreakpointByDimension(ar().w)||this.getBreakpointByName("xs");t&&this.setActiveBreakpoint(t)}sortBreakpoints(t){t.sort((e,s)=>e.dimension-s.dimension)}get options(){return this._options}get activeBreakpoint(){return this._activeBreakpoint}get breakpointNames(){return this.options.breakpoints.map(t=>t.name)}get events(){return this._events}on(t,e,s){return this.events.on(t,e,s)}once(t,e,s){return this.events.once(t,e,s)}off(t,e,s){return this.events.off(t,e,s)}getBreakpointByDimension(t,e){e=e||this.options.breakpoints;for(let i=0;ir.dimension&&t=s.dimension?s:null}getBreakpointByName(t,e){e=e||this.options.breakpoints;const s=e.find(i=>i.name===t);return s||null}getNextBreakpointByName(t){const e=this.breakpointNames,s=e.indexOf(t);if(s<0)throw new Error(`the breakpoint "${t}" does not exist!`);return s===e.length-1?null:e[s+1]}getPrevBreakpointByName(t){const e=this.breakpointNames,s=e.indexOf(t);if(s<0)throw new Error(`the breakpoint "${t}" does not exist!`);return s===0?null:e[s-1]}isBreakpointGreaterThan(t,e){const s=this.getBreakpointByName(t),i=this.getBreakpointByName(e);return s&&i?s.dimension>i.dimension:null}isBreakpointSmallerThan(t,e){const s=this.getBreakpointByName(t),i=this.getBreakpointByName(e);return s&&i?s.dimension"u")return!1;var t=pe(n).ShadowRoot;return n instanceof t||n instanceof ShadowRoot}function Ap(n){var t=n.state;Object.keys(t.elements).forEach(function(e){var s=t.styles[e]||{},i=t.attributes[e]||{},r=t.elements[e];!ge(r)||!Ne(r)||(Object.assign(r.style,s),Object.keys(i).forEach(function(o){var l=i[o];l===!1?r.removeAttribute(o):r.setAttribute(o,l===!0?"":l)}))})}function Tp(n){var t=n.state,e={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,e.popper),t.styles=e,t.elements.arrow&&Object.assign(t.elements.arrow.style,e.arrow),function(){Object.keys(t.elements).forEach(function(s){var i=t.elements[s],r=t.attributes[s]||{},o=Object.keys(t.styles.hasOwnProperty(s)?t.styles[s]:e[s]),l=o.reduce(function(c,h){return c[h]="",c},{});!ge(i)||!Ne(i)||(Object.assign(i.style,l),Object.keys(r).forEach(function(c){i.removeAttribute(c)}))})}}const mr={name:"applyStyles",enabled:!0,phase:"write",fn:Ap,effect:Tp,requires:["computeStyles"]};function ke(n){return n.split("-")[0]}var ft=Math.max,Pi=Math.min,Wt=Math.round;function jn(){var n=navigator.userAgentData;return n!=null&&n.brands&&Array.isArray(n.brands)?n.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function Xl(){return!/^((?!chrome|android).)*safari/i.test(jn())}function zt(n,t,e){t===void 0&&(t=!1),e===void 0&&(e=!1);var s=n.getBoundingClientRect(),i=1,r=1;t&&ge(n)&&(i=n.offsetWidth>0&&Wt(s.width)/n.offsetWidth||1,r=n.offsetHeight>0&&Wt(s.height)/n.offsetHeight||1);var o=Et(n)?pe(n):window,l=o.visualViewport,c=!Xl()&&e,h=(s.left+(c&&l?l.offsetLeft:0))/i,d=(s.top+(c&&l?l.offsetTop:0))/r,u=s.width/i,p=s.height/r;return{width:u,height:p,top:d,right:h+u,bottom:d+p,left:h,x:h,y:d}}function gr(n){var t=zt(n),e=n.offsetWidth,s=n.offsetHeight;return Math.abs(t.width-e)<=1&&(e=t.width),Math.abs(t.height-s)<=1&&(s=t.height),{x:n.offsetLeft,y:n.offsetTop,width:e,height:s}}function Jl(n,t){var e=t.getRootNode&&t.getRootNode();if(n.contains(t))return!0;if(e&&fr(e)){var s=t;do{if(s&&n.isSameNode(s))return!0;s=s.parentNode||s.host}while(s)}return!1}function Ue(n){return pe(n).getComputedStyle(n)}function Cp(n){return["table","td","th"].indexOf(Ne(n))>=0}function st(n){return((Et(n)?n.ownerDocument:n.document)||window.document).documentElement}function Ji(n){return Ne(n)==="html"?n:n.assignedSlot||n.parentNode||(fr(n)?n.host:null)||st(n)}function Io(n){return!ge(n)||Ue(n).position==="fixed"?null:n.offsetParent}function Lp(n){var t=/firefox/i.test(jn()),e=/Trident/i.test(jn());if(e&&ge(n)){var s=Ue(n);if(s.position==="fixed")return null}var i=Ji(n);for(fr(i)&&(i=i.host);ge(i)&&["html","body"].indexOf(Ne(i))<0;){var r=Ue(i);if(r.transform!=="none"||r.perspective!=="none"||r.contain==="paint"||["transform","perspective"].indexOf(r.willChange)!==-1||t&&r.willChange==="filter"||t&&r.filter&&r.filter!=="none")return i;i=i.parentNode}return null}function ks(n){for(var t=pe(n),e=Io(n);e&&Cp(e)&&Ue(e).position==="static";)e=Io(e);return e&&(Ne(e)==="html"||Ne(e)==="body"&&Ue(e).position==="static")?t:e||Lp(n)||t}function vr(n){return["top","bottom"].indexOf(n)>=0?"x":"y"}function ds(n,t,e){return ft(n,Pi(t,e))}function kp(n,t,e){var s=ds(n,t,e);return s>e?e:s}function Zl(){return{top:0,right:0,bottom:0,left:0}}function ec(n){return Object.assign({},Zl(),n)}function tc(n,t){return t.reduce(function(e,s){return e[s]=n,e},{})}var xp=function(t,e){return t=typeof t=="function"?t(Object.assign({},e.rects,{placement:e.placement})):t,ec(typeof t!="number"?t:tc(t,Jt))};function Ip(n){var t,e=n.state,s=n.name,i=n.options,r=e.elements.arrow,o=e.modifiersData.popperOffsets,l=ke(e.placement),c=vr(l),h=[oe,ue].indexOf(l)>=0,d=h?"height":"width";if(!(!r||!o)){var u=xp(i.padding,e),p=gr(r),f=c==="y"?re:oe,m=c==="y"?de:ue,v=e.rects.reference[d]+e.rects.reference[c]-o[c]-e.rects.popper[d],b=o[c]-e.rects.reference[c],E=ks(r),w=E?c==="y"?E.clientHeight||0:E.clientWidth||0:0,_=v/2-b/2,S=u[f],C=w-p[d]-u[m],x=w/2-p[d]/2+_,I=ds(S,x,C),R=c;e.modifiersData[s]=(t={},t[R]=I,t.centerOffset=I-x,t)}}function Np(n){var t=n.state,e=n.options,s=e.element,i=s===void 0?"[data-popper-arrow]":s;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||Jl(t.elements.popper,i)&&(t.elements.arrow=i))}const sc={name:"arrow",enabled:!0,phase:"main",fn:Ip,effect:Np,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function qt(n){return n.split("-")[1]}var Op={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Pp(n,t){var e=n.x,s=n.y,i=t.devicePixelRatio||1;return{x:Wt(e*i)/i||0,y:Wt(s*i)/i||0}}function No(n){var t,e=n.popper,s=n.popperRect,i=n.placement,r=n.variation,o=n.offsets,l=n.position,c=n.gpuAcceleration,h=n.adaptive,d=n.roundOffsets,u=n.isFixed,p=o.x,f=p===void 0?0:p,m=o.y,v=m===void 0?0:m,b=typeof d=="function"?d({x:f,y:v}):{x:f,y:v};f=b.x,v=b.y;var E=o.hasOwnProperty("x"),w=o.hasOwnProperty("y"),_=oe,S=re,C=window;if(h){var x=ks(e),I="clientHeight",R="clientWidth";if(x===pe(e)&&(x=st(e),Ue(x).position!=="static"&&l==="absolute"&&(I="scrollHeight",R="scrollWidth")),x=x,i===re||(i===oe||i===ue)&&r===jt){S=de;var O=u&&x===C&&C.visualViewport?C.visualViewport.height:x[I];v-=O-s.height,v*=c?1:-1}if(i===oe||(i===re||i===de)&&r===jt){_=ue;var U=u&&x===C&&C.visualViewport?C.visualViewport.width:x[R];f-=U-s.width,f*=c?1:-1}}var z=Object.assign({position:l},h&&Op),q=d===!0?Pp({x:f,y:v},pe(e)):{x:f,y:v};if(f=q.x,v=q.y,c){var Y;return Object.assign({},z,(Y={},Y[S]=w?"0":"",Y[_]=E?"0":"",Y.transform=(C.devicePixelRatio||1)<=1?"translate("+f+"px, "+v+"px)":"translate3d("+f+"px, "+v+"px, 0)",Y))}return Object.assign({},z,(t={},t[S]=w?v+"px":"",t[_]=E?f+"px":"",t.transform="",t))}function Dp(n){var t=n.state,e=n.options,s=e.gpuAcceleration,i=s===void 0?!0:s,r=e.adaptive,o=r===void 0?!0:r,l=e.roundOffsets,c=l===void 0?!0:l,h={placement:ke(t.placement),variation:qt(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,No(Object.assign({},h,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:o,roundOffsets:c})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,No(Object.assign({},h,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const br={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Dp,data:{}};var Fs={passive:!0};function Mp(n){var t=n.state,e=n.instance,s=n.options,i=s.scroll,r=i===void 0?!0:i,o=s.resize,l=o===void 0?!0:o,c=pe(t.elements.popper),h=[].concat(t.scrollParents.reference,t.scrollParents.popper);return r&&h.forEach(function(d){d.addEventListener("scroll",e.update,Fs)}),l&&c.addEventListener("resize",e.update,Fs),function(){r&&h.forEach(function(d){d.removeEventListener("scroll",e.update,Fs)}),l&&c.removeEventListener("resize",e.update,Fs)}}const Er={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Mp,data:{}};var Rp={left:"right",right:"left",bottom:"top",top:"bottom"};function Zs(n){return n.replace(/left|right|bottom|top/g,function(t){return Rp[t]})}var $p={start:"end",end:"start"};function Oo(n){return n.replace(/start|end/g,function(t){return $p[t]})}function yr(n){var t=pe(n),e=t.pageXOffset,s=t.pageYOffset;return{scrollLeft:e,scrollTop:s}}function wr(n){return zt(st(n)).left+yr(n).scrollLeft}function Bp(n,t){var e=pe(n),s=st(n),i=e.visualViewport,r=s.clientWidth,o=s.clientHeight,l=0,c=0;if(i){r=i.width,o=i.height;var h=Xl();(h||!h&&t==="fixed")&&(l=i.offsetLeft,c=i.offsetTop)}return{width:r,height:o,x:l+wr(n),y:c}}function Fp(n){var t,e=st(n),s=yr(n),i=(t=n.ownerDocument)==null?void 0:t.body,r=ft(e.scrollWidth,e.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),o=ft(e.scrollHeight,e.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),l=-s.scrollLeft+wr(n),c=-s.scrollTop;return Ue(i||e).direction==="rtl"&&(l+=ft(e.clientWidth,i?i.clientWidth:0)-r),{width:r,height:o,x:l,y:c}}function _r(n){var t=Ue(n),e=t.overflow,s=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(e+i+s)}function ic(n){return["html","body","#document"].indexOf(Ne(n))>=0?n.ownerDocument.body:ge(n)&&_r(n)?n:ic(Ji(n))}function us(n,t){var e;t===void 0&&(t=[]);var s=ic(n),i=s===((e=n.ownerDocument)==null?void 0:e.body),r=pe(s),o=i?[r].concat(r.visualViewport||[],_r(s)?s:[]):s,l=t.concat(o);return i?l:l.concat(us(Ji(o)))}function Wn(n){return Object.assign({},n,{left:n.x,top:n.y,right:n.x+n.width,bottom:n.y+n.height})}function Hp(n,t){var e=zt(n,!1,t==="fixed");return e.top=e.top+n.clientTop,e.left=e.left+n.clientLeft,e.bottom=e.top+n.clientHeight,e.right=e.left+n.clientWidth,e.width=n.clientWidth,e.height=n.clientHeight,e.x=e.left,e.y=e.top,e}function Po(n,t,e){return t===ur?Wn(Bp(n,e)):Et(t)?Hp(t,e):Wn(Fp(st(n)))}function Vp(n){var t=us(Ji(n)),e=["absolute","fixed"].indexOf(Ue(n).position)>=0,s=e&&ge(n)?ks(n):n;return Et(s)?t.filter(function(i){return Et(i)&&Jl(i,s)&&Ne(i)!=="body"}):[]}function Up(n,t,e,s){var i=t==="clippingParents"?Vp(n):[].concat(t),r=[].concat(i,[e]),o=r[0],l=r.reduce(function(c,h){var d=Po(n,h,s);return c.top=ft(d.top,c.top),c.right=Pi(d.right,c.right),c.bottom=Pi(d.bottom,c.bottom),c.left=ft(d.left,c.left),c},Po(n,o,s));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}function nc(n){var t=n.reference,e=n.element,s=n.placement,i=s?ke(s):null,r=s?qt(s):null,o=t.x+t.width/2-e.width/2,l=t.y+t.height/2-e.height/2,c;switch(i){case re:c={x:o,y:t.y-e.height};break;case de:c={x:o,y:t.y+t.height};break;case ue:c={x:t.x+t.width,y:l};break;case oe:c={x:t.x-e.width,y:l};break;default:c={x:t.x,y:t.y}}var h=i?vr(i):null;if(h!=null){var d=h==="y"?"height":"width";switch(r){case bt:c[h]=c[h]-(t[d]/2-e[d]/2);break;case jt:c[h]=c[h]+(t[d]/2-e[d]/2);break}}return c}function Qt(n,t){t===void 0&&(t={});var e=t,s=e.placement,i=s===void 0?n.placement:s,r=e.strategy,o=r===void 0?n.strategy:r,l=e.boundary,c=l===void 0?Fl:l,h=e.rootBoundary,d=h===void 0?ur:h,u=e.elementContext,p=u===void 0?kt:u,f=e.altBoundary,m=f===void 0?!1:f,v=e.padding,b=v===void 0?0:v,E=ec(typeof b!="number"?b:tc(b,Jt)),w=p===kt?Hl:kt,_=n.rects.popper,S=n.elements[m?w:p],C=Up(Et(S)?S:S.contextElement||st(n.elements.popper),c,d,o),x=zt(n.elements.reference),I=nc({reference:x,element:_,strategy:"absolute",placement:i}),R=Wn(Object.assign({},_,I)),O=p===kt?R:x,U={top:C.top-O.top+E.top,bottom:O.bottom-C.bottom+E.bottom,left:C.left-O.left+E.left,right:O.right-C.right+E.right},z=n.modifiersData.offset;if(p===kt&&z){var q=z[i];Object.keys(U).forEach(function(Y){var j=[ue,de].indexOf(Y)>=0?1:-1,J=[re,de].indexOf(Y)>=0?"y":"x";U[Y]+=q[J]*j})}return U}function jp(n,t){t===void 0&&(t={});var e=t,s=e.placement,i=e.boundary,r=e.rootBoundary,o=e.padding,l=e.flipVariations,c=e.allowedAutoPlacements,h=c===void 0?pr:c,d=qt(s),u=d?l?Un:Un.filter(function(m){return qt(m)===d}):Jt,p=u.filter(function(m){return h.indexOf(m)>=0});p.length===0&&(p=u);var f=p.reduce(function(m,v){return m[v]=Qt(n,{placement:v,boundary:i,rootBoundary:r,padding:o})[ke(v)],m},{});return Object.keys(f).sort(function(m,v){return f[m]-f[v]})}function Wp(n){if(ke(n)===Xi)return[];var t=Zs(n);return[Oo(n),t,Oo(t)]}function zp(n){var t=n.state,e=n.options,s=n.name;if(!t.modifiersData[s]._skip){for(var i=e.mainAxis,r=i===void 0?!0:i,o=e.altAxis,l=o===void 0?!0:o,c=e.fallbackPlacements,h=e.padding,d=e.boundary,u=e.rootBoundary,p=e.altBoundary,f=e.flipVariations,m=f===void 0?!0:f,v=e.allowedAutoPlacements,b=t.options.placement,E=ke(b),w=E===b,_=c||(w||!m?[Zs(b)]:Wp(b)),S=[b].concat(_).reduce(function(H,se){return H.concat(ke(se)===Xi?jp(t,{placement:se,boundary:d,rootBoundary:u,padding:h,flipVariations:m,allowedAutoPlacements:v}):se)},[]),C=t.rects.reference,x=t.rects.popper,I=new Map,R=!0,O=S[0],U=0;U=0,J=j?"width":"height",K=Qt(t,{placement:z,boundary:d,rootBoundary:u,altBoundary:p,padding:h}),Z=j?Y?ue:oe:Y?de:re;C[J]>x[J]&&(Z=Zs(Z));var ye=Zs(Z),y=[];if(r&&y.push(K[q]<=0),l&&y.push(K[Z]<=0,K[ye]<=0),y.every(function(H){return H})){O=z,R=!1;break}I.set(z,y)}if(R)for(var B=m?3:1,we=function(se){var fe=S.find(function(W){var Oe=I.get(W);if(Oe)return Oe.slice(0,se).every(function(ss){return ss})});if(fe)return O=fe,"break"},G=B;G>0;G--){var L=we(G);if(L==="break")break}t.placement!==O&&(t.modifiersData[s]._skip=!0,t.placement=O,t.reset=!0)}}const rc={name:"flip",enabled:!0,phase:"main",fn:zp,requiresIfExists:["offset"],data:{_skip:!1}};function Do(n,t,e){return e===void 0&&(e={x:0,y:0}),{top:n.top-t.height-e.y,right:n.right-t.width+e.x,bottom:n.bottom-t.height+e.y,left:n.left-t.width-e.x}}function Mo(n){return[re,ue,de,oe].some(function(t){return n[t]>=0})}function qp(n){var t=n.state,e=n.name,s=t.rects.reference,i=t.rects.popper,r=t.modifiersData.preventOverflow,o=Qt(t,{elementContext:"reference"}),l=Qt(t,{altBoundary:!0}),c=Do(o,s),h=Do(l,i,r),d=Mo(c),u=Mo(h);t.modifiersData[e]={referenceClippingOffsets:c,popperEscapeOffsets:h,isReferenceHidden:d,hasPopperEscaped:u},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":d,"data-popper-escaped":u})}const oc={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:qp};function Qp(n,t,e){var s=ke(n),i=[oe,re].indexOf(s)>=0?-1:1,r=typeof e=="function"?e(Object.assign({},t,{placement:n})):e,o=r[0],l=r[1];return o=o||0,l=(l||0)*i,[oe,ue].indexOf(s)>=0?{x:l,y:o}:{x:o,y:l}}function Yp(n){var t=n.state,e=n.options,s=n.name,i=e.offset,r=i===void 0?[0,0]:i,o=pr.reduce(function(d,u){return d[u]=Qp(u,t.rects,r),d},{}),l=o[t.placement],c=l.x,h=l.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=c,t.modifiersData.popperOffsets.y+=h),t.modifiersData[s]=o}const ac={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Yp};function Kp(n){var t=n.state,e=n.name;t.modifiersData[e]=nc({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const Sr={name:"popperOffsets",enabled:!0,phase:"read",fn:Kp,data:{}};function Gp(n){return n==="x"?"y":"x"}function Xp(n){var t=n.state,e=n.options,s=n.name,i=e.mainAxis,r=i===void 0?!0:i,o=e.altAxis,l=o===void 0?!1:o,c=e.boundary,h=e.rootBoundary,d=e.altBoundary,u=e.padding,p=e.tether,f=p===void 0?!0:p,m=e.tetherOffset,v=m===void 0?0:m,b=Qt(t,{boundary:c,rootBoundary:h,padding:u,altBoundary:d}),E=ke(t.placement),w=qt(t.placement),_=!w,S=vr(E),C=Gp(S),x=t.modifiersData.popperOffsets,I=t.rects.reference,R=t.rects.popper,O=typeof v=="function"?v(Object.assign({},t.rects,{placement:t.placement})):v,U=typeof O=="number"?{mainAxis:O,altAxis:O}:Object.assign({mainAxis:0,altAxis:0},O),z=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,q={x:0,y:0};if(x){if(r){var Y,j=S==="y"?re:oe,J=S==="y"?de:ue,K=S==="y"?"height":"width",Z=x[S],ye=Z+b[j],y=Z-b[J],B=f?-R[K]/2:0,we=w===bt?I[K]:R[K],G=w===bt?-R[K]:-I[K],L=t.elements.arrow,H=f&&L?gr(L):{width:0,height:0},se=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:Zl(),fe=se[j],W=se[J],Oe=ds(0,I[K],H[K]),ss=_?I[K]/2-B-Oe-fe-U.mainAxis:we-Oe-fe-U.mainAxis,kh=_?-I[K]/2+B+Oe+W+U.mainAxis:G+Oe+W+U.mainAxis,is=t.elements.arrow&&ks(t.elements.arrow),an=is?S==="y"?is.clientTop||0:is.clientLeft||0:0,uo=(Y=z==null?void 0:z[S])!=null?Y:0,xh=Z+ss-uo-an,Ih=Z+kh-uo,po=ds(f?Pi(ye,xh):ye,Z,f?ft(y,Ih):y);x[S]=po,q[S]=po-Z}if(l){var fo,Nh=S==="x"?re:oe,Oh=S==="x"?de:ue,ot=x[C],Ms=C==="y"?"height":"width",mo=ot+b[Nh],go=ot-b[Oh],ln=[re,oe].indexOf(E)!==-1,vo=(fo=z==null?void 0:z[C])!=null?fo:0,bo=ln?mo:ot-I[Ms]-R[Ms]-vo+U.altAxis,Eo=ln?ot+I[Ms]+R[Ms]-vo-U.altAxis:go,yo=f&&ln?kp(bo,ot,Eo):ds(f?bo:mo,ot,f?Eo:go);x[C]=yo,q[C]=yo-ot}t.modifiersData[s]=q}}const lc={name:"preventOverflow",enabled:!0,phase:"main",fn:Xp,requiresIfExists:["offset"]};function Jp(n){return{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}}function Zp(n){return n===pe(n)||!ge(n)?yr(n):Jp(n)}function ef(n){var t=n.getBoundingClientRect(),e=Wt(t.width)/n.offsetWidth||1,s=Wt(t.height)/n.offsetHeight||1;return e!==1||s!==1}function tf(n,t,e){e===void 0&&(e=!1);var s=ge(t),i=ge(t)&&ef(t),r=st(t),o=zt(n,i,e),l={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(s||!s&&!e)&&((Ne(t)!=="body"||_r(r))&&(l=Zp(t)),ge(t)?(c=zt(t,!0),c.x+=t.clientLeft,c.y+=t.clientTop):r&&(c.x=wr(r))),{x:o.left+l.scrollLeft-c.x,y:o.top+l.scrollTop-c.y,width:o.width,height:o.height}}function sf(n){var t=new Map,e=new Set,s=[];n.forEach(function(r){t.set(r.name,r)});function i(r){e.add(r.name);var o=[].concat(r.requires||[],r.requiresIfExists||[]);o.forEach(function(l){if(!e.has(l)){var c=t.get(l);c&&i(c)}}),s.push(r)}return n.forEach(function(r){e.has(r.name)||i(r)}),s}function nf(n){var t=sf(n);return Gl.reduce(function(e,s){return e.concat(t.filter(function(i){return i.phase===s}))},[])}function rf(n){var t;return function(){return t||(t=new Promise(function(e){Promise.resolve().then(function(){t=void 0,e(n())})})),t}}function of(n){var t=n.reduce(function(e,s){var i=e[s.name];return e[s.name]=i?Object.assign({},i,s,{options:Object.assign({},i.options,s.options),data:Object.assign({},i.data,s.data)}):s,e},{});return Object.keys(t).map(function(e){return t[e]})}var Ro={placement:"bottom",modifiers:[],strategy:"absolute"};function $o(){for(var n=arguments.length,t=new Array(n),e=0;en==null?`${n}`:{}.toString.call(n).match(/\s([a-z]+)/i)[1].toLowerCase(),Pf=n=>{do n+=Math.floor(Math.random()*If);while(document.getElementById(n));return n},Nc=n=>{let t=n.getAttribute("data-bs-target");if(!t||t==="#"){let e=n.getAttribute("href");if(!e||!e.includes("#")&&!e.startsWith("."))return null;e.includes("#")&&!e.startsWith("#")&&(e=`#${e.split("#")[1]}`),t=e&&e!=="#"?e.trim():null}return t},xr=n=>{const t=Nc(n);return t&&document.querySelector(t)?t:null},et=n=>{const t=Nc(n);return t?document.querySelector(t):null},Df=n=>{if(!n)return 0;let{transitionDuration:t,transitionDelay:e}=window.getComputedStyle(n);const s=Number.parseFloat(t),i=Number.parseFloat(e);return!s&&!i?0:(t=t.split(",")[0],e=e.split(",")[0],(Number.parseFloat(t)+Number.parseFloat(e))*Nf)},Oc=n=>{n.dispatchEvent(new Event(Yn))},St=n=>!n||typeof n!="object"?!1:(typeof n.jquery<"u"&&(n=n[0]),typeof n.nodeType<"u"),tt=n=>St(n)?n.jquery?n[0]:n:typeof n=="string"&&n.length>0?document.querySelector(n):null,Me=(n,t,e)=>{Object.keys(e).forEach(s=>{const i=e[s],r=t[s],o=r&&St(r)?"element":Of(r);if(!new RegExp(i).test(o))throw new TypeError(`${n.toUpperCase()}: Option "${s}" provided type "${o}" but expected type "${i}".`)})},Hs=n=>!St(n)||n.getClientRects().length===0?!1:getComputedStyle(n).getPropertyValue("visibility")==="visible",vt=n=>!n||n.nodeType!==Node.ELEMENT_NODE||n.classList.contains("disabled")?!0:typeof n.disabled<"u"?n.disabled:n.hasAttribute("disabled")&&n.getAttribute("disabled")!=="false",Pc=n=>{if(!document.documentElement.attachShadow)return null;if(typeof n.getRootNode=="function"){const t=n.getRootNode();return t instanceof ShadowRoot?t:null}return n instanceof ShadowRoot?n:n.parentNode?Pc(n.parentNode):null},Ui=()=>{},ss=n=>{n.offsetHeight},Dc=()=>{const{jQuery:n}=window;return n&&!document.body.hasAttribute("data-bs-no-jquery")?n:null},_n=[],Mf=n=>{document.readyState==="loading"?(_n.length||document.addEventListener("DOMContentLoaded",()=>{_n.forEach(t=>t())}),_n.push(n)):n()},ce=()=>document.documentElement.dir==="rtl",Ee=n=>{Mf(()=>{const t=Dc();if(t){const e=n.NAME,s=t.fn[e];t.fn[e]=n.jQueryInterface,t.fn[e].Constructor=n,t.fn[e].noConflict=()=>(t.fn[e]=s,n.jQueryInterface)}})},ut=n=>{typeof n=="function"&&n()},Mc=(n,t,e=!0)=>{if(!e){ut(n);return}const s=5,i=Df(t)+s;let r=!1;const o=({target:l})=>{l===t&&(r=!0,t.removeEventListener(Yn,o),ut(n))};t.addEventListener(Yn,o),setTimeout(()=>{r||Oc(t)},i)},Rc=(n,t,e,s)=>{let i=n.indexOf(t);if(i===-1)return n[!e&&s?n.length-1:0];const r=n.length;return i+=e?1:-1,s&&(i=(i+r)%r),n[Math.max(0,Math.min(i,r-1))]},Rf=/[^.]*(?=\..*)\.|.*/,$f=/\..*/,Bf=/::\d+$/,Sn={};let Vo=1;const Hf={mouseenter:"mouseover",mouseleave:"mouseout"},Ff=/^(mouseenter|mouseleave)/i,$c=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function Bc(n,t){return t&&`${t}::${Vo++}`||n.uidEvent||Vo++}function Hc(n){const t=Bc(n);return n.uidEvent=t,Sn[t]=Sn[t]||{},Sn[t]}function Vf(n,t){return function e(s){return s.delegateTarget=n,e.oneOff&&g.off(n,s.type,t),t.apply(n,[s])}}function Uf(n,t,e){return function s(i){const r=n.querySelectorAll(t);for(let{target:o}=i;o&&o!==this;o=o.parentNode)for(let l=r.length;l--;)if(r[l]===o)return i.delegateTarget=o,s.oneOff&&g.off(n,i.type,t,e),e.apply(o,[i]);return null}}function Fc(n,t,e=null){const s=Object.keys(n);for(let i=0,r=s.length;ifunction(v){if(!v.relatedTarget||v.relatedTarget!==v.delegateTarget&&!v.delegateTarget.contains(v.relatedTarget))return m.call(this,v)};s?s=f(s):e=f(e)}const[r,o,l]=Vc(t,e,s),c=Hc(n),h=c[l]||(c[l]={}),d=Fc(h,o,r?e:null);if(d){d.oneOff=d.oneOff&&i;return}const u=Bc(o,t.replace(Rf,"")),p=r?Uf(n,e,s):Vf(n,e);p.delegationSelector=r?e:null,p.originalHandler=o,p.oneOff=i,p.uidEvent=u,h[u]=p,n.addEventListener(l,p,r)}function Kn(n,t,e,s,i){const r=Fc(t[e],s,i);r&&(n.removeEventListener(e,r,!!i),delete t[e][r.uidEvent])}function jf(n,t,e,s){const i=t[e]||{};Object.keys(i).forEach(r=>{if(r.includes(s)){const o=i[r];Kn(n,t,e,o.originalHandler,o.delegationSelector)}})}function Uc(n){return n=n.replace($f,""),Hf[n]||n}const g={on(n,t,e,s){Uo(n,t,e,s,!1)},one(n,t,e,s){Uo(n,t,e,s,!0)},off(n,t,e,s){if(typeof t!="string"||!n)return;const[i,r,o]=Vc(t,e,s),l=o!==t,c=Hc(n),h=t.startsWith(".");if(typeof r<"u"){if(!c||!c[o])return;Kn(n,c,o,r,i?e:null);return}h&&Object.keys(c).forEach(u=>{jf(n,c,u,t.slice(1))});const d=c[o]||{};Object.keys(d).forEach(u=>{const p=u.replace(Bf,"");if(!l||t.includes(p)){const f=d[u];Kn(n,c,o,f.originalHandler,f.delegationSelector)}})},trigger(n,t,e){if(typeof t!="string"||!n)return null;const s=Dc(),i=Uc(t),r=t!==i,o=$c.has(i);let l,c=!0,h=!0,d=!1,u=null;return r&&s&&(l=s.Event(t,e),s(n).trigger(l),c=!l.isPropagationStopped(),h=!l.isImmediatePropagationStopped(),d=l.isDefaultPrevented()),o?(u=document.createEvent("HTMLEvents"),u.initEvent(i,c,!0)):u=new CustomEvent(t,{bubbles:c,cancelable:!0}),typeof e<"u"&&Object.keys(e).forEach(p=>{Object.defineProperty(u,p,{get(){return e[p]}})}),d&&u.preventDefault(),h&&n.dispatchEvent(u),u.defaultPrevented&&typeof l<"u"&&l.preventDefault(),u}},qe=new Map,ys={set(n,t,e){qe.has(n)||qe.set(n,new Map);const s=qe.get(n);if(!s.has(t)&&s.size!==0){console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(s.keys())[0]}.`);return}s.set(t,e)},get(n,t){return qe.has(n)&&qe.get(n).get(t)||null},remove(n,t){if(!qe.has(n))return;const e=qe.get(n);e.delete(t),e.size===0&&qe.delete(n)}},Wf="5.1.3";class Ae{constructor(t){t=tt(t),t&&(this._element=t,ys.set(this._element,this.constructor.DATA_KEY,this))}dispose(){ys.remove(this._element,this.constructor.DATA_KEY),g.off(this._element,this.constructor.EVENT_KEY),Object.getOwnPropertyNames(this).forEach(t=>{this[t]=null})}_queueCallback(t,e,s=!0){Mc(t,e,s)}static getInstance(t){return ys.get(tt(t),this.DATA_KEY)}static getOrCreateInstance(t,e={}){return this.getInstance(t)||new this(t,typeof e=="object"?e:null)}static get VERSION(){return Wf}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}}const cn=(n,t="hide")=>{const e=`click.dismiss${n.EVENT_KEY}`,s=n.NAME;g.on(document,e,`[data-bs-dismiss="${s}"]`,function(i){if(["A","AREA"].includes(this.tagName)&&i.preventDefault(),vt(this))return;const r=et(this)||this.closest(`.${s}`);n.getOrCreateInstance(r)[t]()})},zf="alert",qf="bs.alert",jc=`.${qf}`,Qf=`close${jc}`,Yf=`closed${jc}`,Kf="fade",Gf="show";class hn extends Ae{static get NAME(){return zf}close(){if(g.trigger(this._element,Qf).defaultPrevented)return;this._element.classList.remove(Gf);const e=this._element.classList.contains(Kf);this._queueCallback(()=>this._destroyElement(),this._element,e)}_destroyElement(){this._element.remove(),g.trigger(this._element,Yf),this.dispose()}static jQueryInterface(t){return this.each(function(){const e=hn.getOrCreateInstance(this);if(typeof t=="string"){if(e[t]===void 0||t.startsWith("_")||t==="constructor")throw new TypeError(`No method named "${t}"`);e[t](this)}})}}cn(hn,"close");Ee(hn);const Xf="button",Jf="bs.button",Zf=`.${Jf}`,em=".data-api",tm="active",jo='[data-bs-toggle="button"]',sm=`click${Zf}${em}`;class dn extends Ae{static get NAME(){return Xf}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle(tm))}static jQueryInterface(t){return this.each(function(){const e=dn.getOrCreateInstance(this);t==="toggle"&&e[t]()})}}g.on(document,sm,jo,n=>{n.preventDefault();const t=n.target.closest(jo);dn.getOrCreateInstance(t).toggle()});Ee(dn);function Wo(n){return n==="true"?!0:n==="false"?!1:n===Number(n).toString()?Number(n):n===""||n==="null"?null:n}function An(n){return n.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)}const se={setDataAttribute(n,t,e){n.setAttribute(`data-bs-${An(t)}`,e)},removeDataAttribute(n,t){n.removeAttribute(`data-bs-${An(t)}`)},getDataAttributes(n){if(!n)return{};const t={};return Object.keys(n.dataset).filter(e=>e.startsWith("bs")).forEach(e=>{let s=e.replace(/^bs/,"");s=s.charAt(0).toLowerCase()+s.slice(1,s.length),t[s]=Wo(n.dataset[e])}),t},getDataAttribute(n,t){return Wo(n.getAttribute(`data-bs-${An(t)}`))},offset(n){const t=n.getBoundingClientRect();return{top:t.top+window.pageYOffset,left:t.left+window.pageXOffset}},position(n){return{top:n.offsetTop,left:n.offsetLeft}}},im=3,L={find(n,t=document.documentElement){return[].concat(...Element.prototype.querySelectorAll.call(t,n))},findOne(n,t=document.documentElement){return Element.prototype.querySelector.call(t,n)},children(n,t){return[].concat(...n.children).filter(e=>e.matches(t))},parents(n,t){const e=[];let s=n.parentNode;for(;s&&s.nodeType===Node.ELEMENT_NODE&&s.nodeType!==im;)s.matches(t)&&e.push(s),s=s.parentNode;return e},prev(n,t){let e=n.previousElementSibling;for(;e;){if(e.matches(t))return[e];e=e.previousElementSibling}return[]},next(n,t){let e=n.nextElementSibling;for(;e;){if(e.matches(t))return[e];e=e.nextElementSibling}return[]},focusableChildren(n){const t=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map(e=>`${e}:not([tabindex^="-"])`).join(", ");return this.find(t,n).filter(e=>!vt(e)&&Hs(e))}},zo="carousel",nm="bs.carousel",me=`.${nm}`,Wc=".data-api",rm="ArrowLeft",om="ArrowRight",am=500,lm=40,qo={interval:5e3,keyboard:!0,slide:!1,pause:"hover",wrap:!0,touch:!0},cm={interval:"(number|boolean)",keyboard:"boolean",slide:"(boolean|string)",pause:"(string|boolean)",wrap:"boolean",touch:"boolean"},ot="next",at="prev",ht="left",ds="right",hm={[rm]:ds,[om]:ht},dm=`slide${me}`,Qo=`slid${me}`,um=`keydown${me}`,pm=`mouseenter${me}`,fm=`mouseleave${me}`,mm=`touchstart${me}`,gm=`touchmove${me}`,vm=`touchend${me}`,bm=`pointerdown${me}`,Em=`pointerup${me}`,ym=`dragstart${me}`,wm=`load${me}${Wc}`,_m=`click${me}${Wc}`,Sm="carousel",lt="active",Am="slide",Tm="carousel-item-end",Cm="carousel-item-start",Lm="carousel-item-next",km="carousel-item-prev",xm="pointer-event",Im=".active",Gs=".active.carousel-item",Nm=".carousel-item",Om=".carousel-item img",Pm=".carousel-item-next, .carousel-item-prev",Dm=".carousel-indicators",Mm="[data-bs-target]",Rm="[data-bs-slide], [data-bs-slide-to]",$m='[data-bs-ride="carousel"]',Bm="touch",Hm="pen";let Ps=class us extends Ae{constructor(t,e){super(t),this._items=null,this._interval=null,this._activeElement=null,this._isPaused=!1,this._isSliding=!1,this.touchTimeout=null,this.touchStartX=0,this.touchDeltaX=0,this._config=this._getConfig(e),this._indicatorsElement=L.findOne(Dm,this._element),this._touchSupported="ontouchstart"in document.documentElement||navigator.maxTouchPoints>0,this._pointerEvent=!!window.PointerEvent,this._addEventListeners()}static get Default(){return qo}static get NAME(){return zo}next(){this._slide(ot)}nextWhenVisible(){!document.hidden&&Hs(this._element)&&this.next()}prev(){this._slide(at)}pause(t){t||(this._isPaused=!0),L.findOne(Pm,this._element)&&(Oc(this._element),this.cycle(!0)),clearInterval(this._interval),this._interval=null}cycle(t){t||(this._isPaused=!1),this._interval&&(clearInterval(this._interval),this._interval=null),this._config&&this._config.interval&&!this._isPaused&&(this._updateInterval(),this._interval=setInterval((document.visibilityState?this.nextWhenVisible:this.next).bind(this),this._config.interval))}to(t){this._activeElement=L.findOne(Gs,this._element);const e=this._getItemIndex(this._activeElement);if(t>this._items.length-1||t<0)return;if(this._isSliding){g.one(this._element,Qo,()=>this.to(t));return}if(e===t){this.pause(),this.cycle();return}const s=t>e?ot:at;this._slide(s,this._items[t])}_getConfig(t){return t={...qo,...se.getDataAttributes(this._element),...typeof t=="object"?t:{}},Me(zo,t,cm),t}_handleSwipe(){const t=Math.abs(this.touchDeltaX);if(t<=lm)return;const e=t/this.touchDeltaX;this.touchDeltaX=0,e&&this._slide(e>0?ds:ht)}_addEventListeners(){this._config.keyboard&&g.on(this._element,um,t=>this._keydown(t)),this._config.pause==="hover"&&(g.on(this._element,pm,t=>this.pause(t)),g.on(this._element,fm,t=>this.cycle(t))),this._config.touch&&this._touchSupported&&this._addTouchEventListeners()}_addTouchEventListeners(){const t=r=>this._pointerEvent&&(r.pointerType===Hm||r.pointerType===Bm),e=r=>{t(r)?this.touchStartX=r.clientX:this._pointerEvent||(this.touchStartX=r.touches[0].clientX)},s=r=>{this.touchDeltaX=r.touches&&r.touches.length>1?0:r.touches[0].clientX-this.touchStartX},i=r=>{t(r)&&(this.touchDeltaX=r.clientX-this.touchStartX),this._handleSwipe(),this._config.pause==="hover"&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout(o=>this.cycle(o),am+this._config.interval))};L.find(Om,this._element).forEach(r=>{g.on(r,ym,o=>o.preventDefault())}),this._pointerEvent?(g.on(this._element,bm,r=>e(r)),g.on(this._element,Em,r=>i(r)),this._element.classList.add(xm)):(g.on(this._element,mm,r=>e(r)),g.on(this._element,gm,r=>s(r)),g.on(this._element,vm,r=>i(r)))}_keydown(t){if(/input|textarea/i.test(t.target.tagName))return;const e=hm[t.key];e&&(t.preventDefault(),this._slide(e))}_getItemIndex(t){return this._items=t&&t.parentNode?L.find(Nm,t.parentNode):[],this._items.indexOf(t)}_getItemByOrder(t,e){const s=t===ot;return Rc(this._items,e,s,this._config.wrap)}_triggerSlideEvent(t,e){const s=this._getItemIndex(t),i=this._getItemIndex(L.findOne(Gs,this._element));return g.trigger(this._element,dm,{relatedTarget:t,direction:e,from:i,to:s})}_setActiveIndicatorElement(t){if(this._indicatorsElement){const e=L.findOne(Im,this._indicatorsElement);e.classList.remove(lt),e.removeAttribute("aria-current");const s=L.find(Mm,this._indicatorsElement);for(let i=0;i{g.trigger(this._element,Qo,{relatedTarget:o,direction:p,from:r,to:l})};if(this._element.classList.contains(Am)){o.classList.add(u),ss(o),i.classList.add(d),o.classList.add(d);const v=()=>{o.classList.remove(d,u),o.classList.add(lt),i.classList.remove(lt,u,d),this._isSliding=!1,setTimeout(m,0)};this._queueCallback(v,i,!0)}else i.classList.remove(lt),o.classList.add(lt),this._isSliding=!1,m();c&&this.cycle()}_directionToOrder(t){return[ds,ht].includes(t)?ce()?t===ht?at:ot:t===ht?ot:at:t}_orderToDirection(t){return[ot,at].includes(t)?ce()?t===at?ht:ds:t===at?ds:ht:t}static carouselInterface(t,e){const s=us.getOrCreateInstance(t,e);let{_config:i}=s;typeof e=="object"&&(i={...i,...e});const r=typeof e=="string"?e:i.slide;if(typeof e=="number")s.to(e);else if(typeof r=="string"){if(typeof s[r]>"u")throw new TypeError(`No method named "${r}"`);s[r]()}else i.interval&&i.ride&&(s.pause(),s.cycle())}static jQueryInterface(t){return this.each(function(){us.carouselInterface(this,t)})}static dataApiClickHandler(t){const e=et(this);if(!e||!e.classList.contains(Sm))return;const s={...se.getDataAttributes(e),...se.getDataAttributes(this)},i=this.getAttribute("data-bs-slide-to");i&&(s.interval=!1),us.carouselInterface(e,s),i&&us.getInstance(e).to(i),t.preventDefault()}};g.on(document,_m,Rm,Ps.dataApiClickHandler);g.on(window,wm,()=>{const n=L.find($m);for(let t=0,e=n.length;th===this._element);l!==null&&c.length&&(this._selector=l,this._triggerArray.push(o))}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return Ko}static get NAME(){return Yo}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let t=[],e;if(this._config.parent){const h=L.find(Xo,this._config.parent);t=L.find(Gm,this._config.parent).filter(d=>!h.includes(d))}const s=L.findOne(this._selector);if(t.length){const h=t.find(d=>s!==d);if(e=h?li.getInstance(h):null,e&&e._isTransitioning)return}if(g.trigger(this._element,Um).defaultPrevented)return;t.forEach(h=>{s!==h&&li.getOrCreateInstance(h,{toggle:!1}).hide(),e||ys.set(h,zc,null)});const r=this._getDimension();this._element.classList.remove(Mt),this._element.classList.add(Xs),this._element.style[r]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const o=()=>{this._isTransitioning=!1,this._element.classList.remove(Xs),this._element.classList.add(Mt,Tn),this._element.style[r]="",g.trigger(this._element,jm)},c=`scroll${r[0].toUpperCase()+r.slice(1)}`;this._queueCallback(o,this._element,!0),this._element.style[r]=`${this._element[c]}px`}hide(){if(this._isTransitioning||!this._isShown()||g.trigger(this._element,Wm).defaultPrevented)return;const e=this._getDimension();this._element.style[e]=`${this._element.getBoundingClientRect()[e]}px`,ss(this._element),this._element.classList.add(Xs),this._element.classList.remove(Mt,Tn);const s=this._triggerArray.length;for(let r=0;r{this._isTransitioning=!1,this._element.classList.remove(Xs),this._element.classList.add(Mt),g.trigger(this._element,zm)};this._element.style[e]="",this._queueCallback(i,this._element,!0)}_isShown(t=this._element){return t.classList.contains(Tn)}_getConfig(t){return t={...Ko,...se.getDataAttributes(this._element),...t},t.toggle=!!t.toggle,t.parent=tt(t.parent),Me(Yo,t,Vm),t}_getDimension(){return this._element.classList.contains(Qm)?Ym:Km}_initializeChildren(){if(!this._config.parent)return;const t=L.find(Xo,this._config.parent);L.find(Gn,this._config.parent).filter(e=>!t.includes(e)).forEach(e=>{const s=et(e);s&&this._addAriaAndCollapsedClass([e],this._isShown(s))})}_addAriaAndCollapsedClass(t,e){t.length&&t.forEach(s=>{e?s.classList.remove(Go):s.classList.add(Go),s.setAttribute("aria-expanded",e)})}static jQueryInterface(t){return this.each(function(){const e={};typeof t=="string"&&/show|hide/.test(t)&&(e.toggle=!1);const s=li.getOrCreateInstance(this,e);if(typeof t=="string"){if(typeof s[t]>"u")throw new TypeError(`No method named "${t}"`);s[t]()}})}};g.on(document,qm,Gn,function(n){(n.target.tagName==="A"||n.delegateTarget&&n.delegateTarget.tagName==="A")&&n.preventDefault();const t=xr(this);L.find(t).forEach(s=>{Ir.getOrCreateInstance(s,{toggle:!1}).toggle()})});Ee(Ir);const Cn="dropdown",Xm="bs.dropdown",Lt=`.${Xm}`,Nr=".data-api",ci="Escape",Jo="Space",Zo="Tab",Xn="ArrowUp",hi="ArrowDown",Jm=2,Zm=new RegExp(`${Xn}|${hi}|${ci}`),eg=`hide${Lt}`,tg=`hidden${Lt}`,sg=`show${Lt}`,ig=`shown${Lt}`,qc=`click${Lt}${Nr}`,Qc=`keydown${Lt}${Nr}`,ng=`keyup${Lt}${Nr}`,It="show",rg="dropup",og="dropend",ag="dropstart",lg="navbar",ws='[data-bs-toggle="dropdown"]',Jn=".dropdown-menu",cg=".navbar-nav",hg=".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",dg=ce()?"top-end":"top-start",ug=ce()?"top-start":"top-end",pg=ce()?"bottom-end":"bottom-start",fg=ce()?"bottom-start":"bottom-end",mg=ce()?"left-start":"right-start",gg=ce()?"right-start":"left-start",vg={offset:[0,2],boundary:"clippingParents",reference:"toggle",display:"dynamic",popperConfig:null,autoClose:!0},bg={offset:"(array|string|function)",boundary:"(string|element)",reference:"(string|element|object)",display:"string",popperConfig:"(null|object|function)",autoClose:"(boolean|string)"};let kt=class Dt extends Ae{constructor(t,e){super(t),this._popper=null,this._config=this._getConfig(e),this._menu=this._getMenuElement(),this._inNavbar=this._detectNavbar()}static get Default(){return vg}static get DefaultType(){return bg}static get NAME(){return Cn}toggle(){return this._isShown()?this.hide():this.show()}show(){if(vt(this._element)||this._isShown(this._menu))return;const t={relatedTarget:this._element};if(g.trigger(this._element,sg,t).defaultPrevented)return;const s=Dt.getParentFromElement(this._element);this._inNavbar?se.setDataAttribute(this._menu,"popper","none"):this._createPopper(s),"ontouchstart"in document.documentElement&&!s.closest(cg)&&[].concat(...document.body.children).forEach(i=>g.on(i,"mouseover",Ui)),this._element.focus(),this._element.setAttribute("aria-expanded",!0),this._menu.classList.add(It),this._element.classList.add(It),g.trigger(this._element,ig,t)}hide(){if(vt(this._element)||!this._isShown(this._menu))return;const t={relatedTarget:this._element};this._completeHide(t)}dispose(){this._popper&&this._popper.destroy(),super.dispose()}update(){this._inNavbar=this._detectNavbar(),this._popper&&this._popper.update()}_completeHide(t){g.trigger(this._element,eg,t).defaultPrevented||("ontouchstart"in document.documentElement&&[].concat(...document.body.children).forEach(s=>g.off(s,"mouseover",Ui)),this._popper&&this._popper.destroy(),this._menu.classList.remove(It),this._element.classList.remove(It),this._element.setAttribute("aria-expanded","false"),se.removeDataAttribute(this._menu,"popper"),g.trigger(this._element,tg,t))}_getConfig(t){if(t={...this.constructor.Default,...se.getDataAttributes(this._element),...t},Me(Cn,t,this.constructor.DefaultType),typeof t.reference=="object"&&!St(t.reference)&&typeof t.reference.getBoundingClientRect!="function")throw new TypeError(`${Cn.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);return t}_createPopper(t){if(typeof Ic>"u")throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org)");let e=this._element;this._config.reference==="parent"?e=t:St(this._config.reference)?e=tt(this._config.reference):typeof this._config.reference=="object"&&(e=this._config.reference);const s=this._getPopperConfig(),i=s.modifiers.find(r=>r.name==="applyStyles"&&r.enabled===!1);this._popper=ln(e,this._menu,s),i&&se.setDataAttribute(this._menu,"popper","static")}_isShown(t=this._element){return t.classList.contains(It)}_getMenuElement(){return L.next(this._element,Jn)[0]}_getPlacement(){const t=this._element.parentNode;if(t.classList.contains(og))return mg;if(t.classList.contains(ag))return gg;const e=getComputedStyle(this._menu).getPropertyValue("--bs-position").trim()==="end";return t.classList.contains(rg)?e?ug:dg:e?fg:pg}_detectNavbar(){return this._element.closest(`.${lg}`)!==null}_getOffset(){const{offset:t}=this._config;return typeof t=="string"?t.split(",").map(e=>Number.parseInt(e,10)):typeof t=="function"?e=>t(e,this._element):t}_getPopperConfig(){const t={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return this._config.display==="static"&&(t.modifiers=[{name:"applyStyles",enabled:!1}]),{...t,...typeof this._config.popperConfig=="function"?this._config.popperConfig(t):this._config.popperConfig}}_selectMenuItem({key:t,target:e}){const s=L.find(hg,this._menu).filter(Hs);s.length&&Rc(s,e,t===hi,!s.includes(e)).focus()}static jQueryInterface(t){return this.each(function(){const e=Dt.getOrCreateInstance(this,t);if(typeof t=="string"){if(typeof e[t]>"u")throw new TypeError(`No method named "${t}"`);e[t]()}})}static clearMenus(t){if(t&&(t.button===Jm||t.type==="keyup"&&t.key!==Zo))return;const e=L.find(ws);for(let s=0,i=e.length;se+t),this._setElementAttributes(ea,"paddingRight",e=>e+t),this._setElementAttributes(ta,"marginRight",e=>e-t)}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(t,e,s){const i=this.getWidth(),r=o=>{if(o!==this._element&&window.innerWidth>o.clientWidth+i)return;this._saveInitialAttribute(o,e);const l=window.getComputedStyle(o)[e];o.style[e]=`${s(Number.parseFloat(l))}px`};this._applyManipulationCallback(t,r)}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,"paddingRight"),this._resetElementAttributes(ea,"paddingRight"),this._resetElementAttributes(ta,"marginRight")}_saveInitialAttribute(t,e){const s=t.style[e];s&&se.setDataAttribute(t,e,s)}_resetElementAttributes(t,e){const s=i=>{const r=se.getDataAttribute(i,e);typeof r>"u"?i.style.removeProperty(e):(se.removeDataAttribute(i,e),i.style[e]=r)};this._applyManipulationCallback(t,s)}_applyManipulationCallback(t,e){St(t)?e(t):L.find(t,this._element).forEach(e)}isOverflowing(){return this.getWidth()>0}}const Eg={className:"modal-backdrop",isVisible:!0,isAnimated:!1,rootElement:"body",clickCallback:null},yg={className:"string",isVisible:"boolean",isAnimated:"boolean",rootElement:"(element|string)",clickCallback:"(function|null)"},Yc="backdrop",wg="fade",sa="show",ia=`mousedown.bs.${Yc}`;class Kc{constructor(t){this._config=this._getConfig(t),this._isAppended=!1,this._element=null}show(t){if(!this._config.isVisible){ut(t);return}this._append(),this._config.isAnimated&&ss(this._getElement()),this._getElement().classList.add(sa),this._emulateAnimation(()=>{ut(t)})}hide(t){if(!this._config.isVisible){ut(t);return}this._getElement().classList.remove(sa),this._emulateAnimation(()=>{this.dispose(),ut(t)})}_getElement(){if(!this._element){const t=document.createElement("div");t.className=this._config.className,this._config.isAnimated&&t.classList.add(wg),this._element=t}return this._element}_getConfig(t){return t={...Eg,...typeof t=="object"?t:{}},t.rootElement=tt(t.rootElement),Me(Yc,t,yg),t}_append(){this._isAppended||(this._config.rootElement.append(this._getElement()),g.on(this._getElement(),ia,()=>{ut(this._config.clickCallback)}),this._isAppended=!0)}dispose(){this._isAppended&&(g.off(this._element,ia),this._element.remove(),this._isAppended=!1)}_emulateAnimation(t){Mc(t,this._getElement(),this._config.isAnimated)}}const _g={trapElement:null,autofocus:!0},Sg={trapElement:"element",autofocus:"boolean"},Ag="focustrap",Tg="bs.focustrap",ji=`.${Tg}`,Cg=`focusin${ji}`,Lg=`keydown.tab${ji}`,kg="Tab",xg="forward",na="backward";class Gc{constructor(t){this._config=this._getConfig(t),this._isActive=!1,this._lastTabNavDirection=null}activate(){const{trapElement:t,autofocus:e}=this._config;this._isActive||(e&&t.focus(),g.off(document,ji),g.on(document,Cg,s=>this._handleFocusin(s)),g.on(document,Lg,s=>this._handleKeydown(s)),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,g.off(document,ji))}_handleFocusin(t){const{target:e}=t,{trapElement:s}=this._config;if(e===document||e===s||s.contains(e))return;const i=L.focusableChildren(s);i.length===0?s.focus():this._lastTabNavDirection===na?i[i.length-1].focus():i[0].focus()}_handleKeydown(t){t.key===kg&&(this._lastTabNavDirection=t.shiftKey?na:xg)}_getConfig(t){return t={..._g,...typeof t=="object"?t:{}},Me(Ag,t,Sg),t}}const ra="modal",Ig="bs.modal",ye=`.${Ig}`,Ng=".data-api",oa="Escape",aa={backdrop:!0,keyboard:!0,focus:!0},Og={backdrop:"(boolean|string)",keyboard:"boolean",focus:"boolean"},Pg=`hide${ye}`,Dg=`hidePrevented${ye}`,Xc=`hidden${ye}`,Jc=`show${ye}`,Mg=`shown${ye}`,la=`resize${ye}`,ca=`click.dismiss${ye}`,ha=`keydown.dismiss${ye}`,Rg=`mouseup.dismiss${ye}`,da=`mousedown.dismiss${ye}`,$g=`click${ye}${Ng}`,ua="modal-open",Bg="fade",pa="show",Ln="modal-static",Hg=".modal.show",Fg=".modal-dialog",Vg=".modal-body",Ug='[data-bs-toggle="modal"]';let Ds=class Zc extends Ae{constructor(t,e){super(t),this._config=this._getConfig(e),this._dialog=L.findOne(Fg,this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._ignoreBackdropClick=!1,this._isTransitioning=!1,this._scrollBar=new Zn}static get Default(){return aa}static get NAME(){return ra}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){this._isShown||this._isTransitioning||g.trigger(this._element,Jc,{relatedTarget:t}).defaultPrevented||(this._isShown=!0,this._isAnimated()&&(this._isTransitioning=!0),this._scrollBar.hide(),document.body.classList.add(ua),this._adjustDialog(),this._setEscapeEvent(),this._setResizeEvent(),g.on(this._dialog,da,()=>{g.one(this._element,Rg,s=>{s.target===this._element&&(this._ignoreBackdropClick=!0)})}),this._showBackdrop(()=>this._showElement(t)))}hide(){if(!this._isShown||this._isTransitioning||g.trigger(this._element,Pg).defaultPrevented)return;this._isShown=!1;const e=this._isAnimated();e&&(this._isTransitioning=!0),this._setEscapeEvent(),this._setResizeEvent(),this._focustrap.deactivate(),this._element.classList.remove(pa),g.off(this._element,ca),g.off(this._dialog,da),this._queueCallback(()=>this._hideModal(),this._element,e)}dispose(){[window,this._dialog].forEach(t=>g.off(t,ye)),this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new Kc({isVisible:!!this._config.backdrop,isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new Gc({trapElement:this._element})}_getConfig(t){return t={...aa,...se.getDataAttributes(this._element),...typeof t=="object"?t:{}},Me(ra,t,Og),t}_showElement(t){const e=this._isAnimated(),s=L.findOne(Vg,this._dialog);(!this._element.parentNode||this._element.parentNode.nodeType!==Node.ELEMENT_NODE)&&document.body.append(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0,s&&(s.scrollTop=0),e&&ss(this._element),this._element.classList.add(pa);const i=()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,g.trigger(this._element,Mg,{relatedTarget:t})};this._queueCallback(i,this._dialog,e)}_setEscapeEvent(){this._isShown?g.on(this._element,ha,t=>{this._config.keyboard&&t.key===oa?(t.preventDefault(),this.hide()):!this._config.keyboard&&t.key===oa&&this._triggerBackdropTransition()}):g.off(this._element,ha)}_setResizeEvent(){this._isShown?g.on(window,la,()=>this._adjustDialog()):g.off(window,la)}_hideModal(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._backdrop.hide(()=>{document.body.classList.remove(ua),this._resetAdjustments(),this._scrollBar.reset(),g.trigger(this._element,Xc)})}_showBackdrop(t){g.on(this._element,ca,e=>{if(this._ignoreBackdropClick){this._ignoreBackdropClick=!1;return}e.target===e.currentTarget&&(this._config.backdrop===!0?this.hide():this._config.backdrop==="static"&&this._triggerBackdropTransition())}),this._backdrop.show(t)}_isAnimated(){return this._element.classList.contains(Bg)}_triggerBackdropTransition(){if(g.trigger(this._element,Dg).defaultPrevented)return;const{classList:e,scrollHeight:s,style:i}=this._element,r=s>document.documentElement.clientHeight;!r&&i.overflowY==="hidden"||e.contains(Ln)||(r||(i.overflowY="hidden"),e.add(Ln),this._queueCallback(()=>{e.remove(Ln),r||this._queueCallback(()=>{i.overflowY=""},this._dialog)},this._dialog),this._element.focus())}_adjustDialog(){const t=this._element.scrollHeight>document.documentElement.clientHeight,e=this._scrollBar.getWidth(),s=e>0;(!s&&t&&!ce()||s&&!t&&ce())&&(this._element.style.paddingLeft=`${e}px`),(s&&!t&&!ce()||!s&&t&&ce())&&(this._element.style.paddingRight=`${e}px`)}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(t,e){return this.each(function(){const s=Zc.getOrCreateInstance(this,t);if(typeof t=="string"){if(typeof s[t]>"u")throw new TypeError(`No method named "${t}"`);s[t](e)}})}};g.on(document,$g,Ug,function(n){const t=et(this);["A","AREA"].includes(this.tagName)&&n.preventDefault(),g.one(t,Jc,i=>{i.defaultPrevented||g.one(t,Xc,()=>{Hs(this)&&this.focus()})});const e=L.findOne(Hg);e&&Ds.getInstance(e).hide(),Ds.getOrCreateInstance(t).toggle(this)});cn(Ds);Ee(Ds);const fa="offcanvas",jg="bs.offcanvas",xt=`.${jg}`,eh=".data-api",Wg=`load${xt}${eh}`,zg="Escape",ma={backdrop:!0,keyboard:!0,scroll:!1},qg={backdrop:"boolean",keyboard:"boolean",scroll:"boolean"},ga="show",Qg="offcanvas-backdrop",th=".offcanvas.show",Yg=`show${xt}`,Kg=`shown${xt}`,Gg=`hide${xt}`,sh=`hidden${xt}`,Xg=`click${xt}${eh}`,Jg=`keydown.dismiss${xt}`,Zg='[data-bs-toggle="offcanvas"]';class At extends Ae{constructor(t,e){super(t),this._config=this._getConfig(e),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get NAME(){return fa}static get Default(){return ma}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){if(this._isShown||g.trigger(this._element,Yg,{relatedTarget:t}).defaultPrevented)return;this._isShown=!0,this._element.style.visibility="visible",this._backdrop.show(),this._config.scroll||new Zn().hide(),this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add(ga);const s=()=>{this._config.scroll||this._focustrap.activate(),g.trigger(this._element,Kg,{relatedTarget:t})};this._queueCallback(s,this._element,!0)}hide(){if(!this._isShown||g.trigger(this._element,Gg).defaultPrevented)return;this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.remove(ga),this._backdrop.hide();const e=()=>{this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._element.style.visibility="hidden",this._config.scroll||new Zn().reset(),g.trigger(this._element,sh)};this._queueCallback(e,this._element,!0)}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_getConfig(t){return t={...ma,...se.getDataAttributes(this._element),...typeof t=="object"?t:{}},Me(fa,t,qg),t}_initializeBackDrop(){return new Kc({className:Qg,isVisible:this._config.backdrop,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:()=>this.hide()})}_initializeFocusTrap(){return new Gc({trapElement:this._element})}_addEventListeners(){g.on(this._element,Jg,t=>{this._config.keyboard&&t.key===zg&&this.hide()})}static jQueryInterface(t){return this.each(function(){const e=At.getOrCreateInstance(this,t);if(typeof t=="string"){if(e[t]===void 0||t.startsWith("_")||t==="constructor")throw new TypeError(`No method named "${t}"`);e[t](this)}})}}g.on(document,Xg,Zg,function(n){const t=et(this);if(["A","AREA"].includes(this.tagName)&&n.preventDefault(),vt(this))return;g.one(t,sh,()=>{Hs(this)&&this.focus()});const e=L.findOne(th);e&&e!==t&&At.getInstance(e).hide(),At.getOrCreateInstance(t).toggle(this)});g.on(window,Wg,()=>L.find(th).forEach(n=>At.getOrCreateInstance(n).show()));cn(At);Ee(At);const ev=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),tv=/^aria-[\w-]*$/i,sv=/^(?:(?:https?|mailto|ftp|tel|file|sms):|[^#&/:?]*(?:[#/?]|$))/i,iv=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z]+=*$/i,nv=(n,t)=>{const e=n.nodeName.toLowerCase();if(t.includes(e))return ev.has(e)?!!(sv.test(n.nodeValue)||iv.test(n.nodeValue)):!0;const s=t.filter(i=>i instanceof RegExp);for(let i=0,r=s.length;i{nv(p,u)||c.removeAttribute(p.nodeName)})}return i.body.innerHTML}const ba="tooltip",ov="bs.tooltip",Te=`.${ov}`,av="bs-tooltip",lv=new Set(["sanitize","allowList","sanitizeFn"]),cv={animation:"boolean",template:"string",title:"(string|element|function)",trigger:"string",delay:"(number|object)",html:"boolean",selector:"(string|boolean)",placement:"(string|function)",offset:"(array|string|function)",container:"(string|element|boolean)",fallbackPlacements:"array",boundary:"(string|element)",customClass:"(string|function)",sanitize:"boolean",sanitizeFn:"(null|function)",allowList:"object",popperConfig:"(null|object|function)"},hv={AUTO:"auto",TOP:"top",RIGHT:ce()?"left":"right",BOTTOM:"bottom",LEFT:ce()?"right":"left"},dv={animation:!0,template:'',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:[0,0],container:!1,fallbackPlacements:["top","right","bottom","left"],boundary:"clippingParents",customClass:"",sanitize:!0,sanitizeFn:null,allowList:rv,popperConfig:null},uv={HIDE:`hide${Te}`,HIDDEN:`hidden${Te}`,SHOW:`show${Te}`,SHOWN:`shown${Te}`,INSERTED:`inserted${Te}`,CLICK:`click${Te}`,FOCUSIN:`focusin${Te}`,FOCUSOUT:`focusout${Te}`,MOUSEENTER:`mouseenter${Te}`,MOUSELEAVE:`mouseleave${Te}`},Js="fade",pv="modal",os="show",as="show",kn="out",Ea=".tooltip-inner",ya=`.${pv}`,wa="hide.bs.modal",ls="hover",xn="focus",fv="click",mv="manual";let Vs=class ih extends Ae{constructor(t,e){if(typeof Ic>"u")throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");super(t),this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._popper=null,this._config=this._getConfig(e),this.tip=null,this._setListeners()}static get Default(){return dv}static get NAME(){return ba}static get Event(){return uv}static get DefaultType(){return cv}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(t){if(this._isEnabled)if(t){const e=this._initializeOnDelegatedTarget(t);e._activeTrigger.click=!e._activeTrigger.click,e._isWithActiveTrigger()?e._enter(null,e):e._leave(null,e)}else{if(this.getTipElement().classList.contains(os)){this._leave(null,this);return}this._enter(null,this)}}dispose(){clearTimeout(this._timeout),g.off(this._element.closest(ya),wa,this._hideModalHandler),this.tip&&this.tip.remove(),this._disposePopper(),super.dispose()}show(){if(this._element.style.display==="none")throw new Error("Please use show on visible elements");if(!(this.isWithContent()&&this._isEnabled))return;const t=g.trigger(this._element,this.constructor.Event.SHOW),e=Pc(this._element),s=e===null?this._element.ownerDocument.documentElement.contains(this._element):e.contains(this._element);if(t.defaultPrevented||!s)return;this.constructor.NAME==="tooltip"&&this.tip&&this.getTitle()!==this.tip.querySelector(Ea).innerHTML&&(this._disposePopper(),this.tip.remove(),this.tip=null);const i=this.getTipElement(),r=Pf(this.constructor.NAME);i.setAttribute("id",r),this._element.setAttribute("aria-describedby",r),this._config.animation&&i.classList.add(Js);const o=typeof this._config.placement=="function"?this._config.placement.call(this,i,this._element):this._config.placement,l=this._getAttachment(o);this._addAttachmentClass(l);const{container:c}=this._config;ys.set(i,this.constructor.DATA_KEY,this),this._element.ownerDocument.documentElement.contains(this.tip)||(c.append(i),g.trigger(this._element,this.constructor.Event.INSERTED)),this._popper?this._popper.update():this._popper=ln(this._element,i,this._getPopperConfig(l)),i.classList.add(os);const h=this._resolvePossibleFunction(this._config.customClass);h&&i.classList.add(...h.split(" ")),"ontouchstart"in document.documentElement&&[].concat(...document.body.children).forEach(p=>{g.on(p,"mouseover",Ui)});const d=()=>{const p=this._hoverState;this._hoverState=null,g.trigger(this._element,this.constructor.Event.SHOWN),p===kn&&this._leave(null,this)},u=this.tip.classList.contains(Js);this._queueCallback(d,this.tip,u)}hide(){if(!this._popper)return;const t=this.getTipElement(),e=()=>{this._isWithActiveTrigger()||(this._hoverState!==as&&t.remove(),this._cleanTipClass(),this._element.removeAttribute("aria-describedby"),g.trigger(this._element,this.constructor.Event.HIDDEN),this._disposePopper())};if(g.trigger(this._element,this.constructor.Event.HIDE).defaultPrevented)return;t.classList.remove(os),"ontouchstart"in document.documentElement&&[].concat(...document.body.children).forEach(r=>g.off(r,"mouseover",Ui)),this._activeTrigger[fv]=!1,this._activeTrigger[xn]=!1,this._activeTrigger[ls]=!1;const i=this.tip.classList.contains(Js);this._queueCallback(e,this.tip,i),this._hoverState=""}update(){this._popper!==null&&this._popper.update()}isWithContent(){return!!this.getTitle()}getTipElement(){if(this.tip)return this.tip;const t=document.createElement("div");t.innerHTML=this._config.template;const e=t.children[0];return this.setContent(e),e.classList.remove(Js,os),this.tip=e,this.tip}setContent(t){this._sanitizeAndSetContent(t,this.getTitle(),Ea)}_sanitizeAndSetContent(t,e,s){const i=L.findOne(s,t);if(!e&&i){i.remove();return}this.setElementContent(i,e)}setElementContent(t,e){if(t!==null){if(St(e)){e=tt(e),this._config.html?e.parentNode!==t&&(t.innerHTML="",t.append(e)):t.textContent=e.textContent;return}this._config.html?(this._config.sanitize&&(e=va(e,this._config.allowList,this._config.sanitizeFn)),t.innerHTML=e):t.textContent=e}}getTitle(){const t=this._element.getAttribute("data-bs-original-title")||this._config.title;return this._resolvePossibleFunction(t)}updateAttachment(t){return t==="right"?"end":t==="left"?"start":t}_initializeOnDelegatedTarget(t,e){return e||this.constructor.getOrCreateInstance(t.delegateTarget,this._getDelegateConfig())}_getOffset(){const{offset:t}=this._config;return typeof t=="string"?t.split(",").map(e=>Number.parseInt(e,10)):typeof t=="function"?e=>t(e,this._element):t}_resolvePossibleFunction(t){return typeof t=="function"?t.call(this._element):t}_getPopperConfig(t){const e={placement:t,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"onChange",enabled:!0,phase:"afterWrite",fn:s=>this._handlePopperPlacementChange(s)}],onFirstUpdate:s=>{s.options.placement!==s.placement&&this._handlePopperPlacementChange(s)}};return{...e,...typeof this._config.popperConfig=="function"?this._config.popperConfig(e):this._config.popperConfig}}_addAttachmentClass(t){this.getTipElement().classList.add(`${this._getBasicClassPrefix()}-${this.updateAttachment(t)}`)}_getAttachment(t){return hv[t.toUpperCase()]}_setListeners(){this._config.trigger.split(" ").forEach(e=>{if(e==="click")g.on(this._element,this.constructor.Event.CLICK,this._config.selector,s=>this.toggle(s));else if(e!==mv){const s=e===ls?this.constructor.Event.MOUSEENTER:this.constructor.Event.FOCUSIN,i=e===ls?this.constructor.Event.MOUSELEAVE:this.constructor.Event.FOCUSOUT;g.on(this._element,s,this._config.selector,r=>this._enter(r)),g.on(this._element,i,this._config.selector,r=>this._leave(r))}}),this._hideModalHandler=()=>{this._element&&this.hide()},g.on(this._element.closest(ya),wa,this._hideModalHandler),this._config.selector?this._config={...this._config,trigger:"manual",selector:""}:this._fixTitle()}_fixTitle(){const t=this._element.getAttribute("title"),e=typeof this._element.getAttribute("data-bs-original-title");(t||e!=="string")&&(this._element.setAttribute("data-bs-original-title",t||""),t&&!this._element.getAttribute("aria-label")&&!this._element.textContent&&this._element.setAttribute("aria-label",t),this._element.setAttribute("title",""))}_enter(t,e){if(e=this._initializeOnDelegatedTarget(t,e),t&&(e._activeTrigger[t.type==="focusin"?xn:ls]=!0),e.getTipElement().classList.contains(os)||e._hoverState===as){e._hoverState=as;return}if(clearTimeout(e._timeout),e._hoverState=as,!e._config.delay||!e._config.delay.show){e.show();return}e._timeout=setTimeout(()=>{e._hoverState===as&&e.show()},e._config.delay.show)}_leave(t,e){if(e=this._initializeOnDelegatedTarget(t,e),t&&(e._activeTrigger[t.type==="focusout"?xn:ls]=e._element.contains(t.relatedTarget)),!e._isWithActiveTrigger()){if(clearTimeout(e._timeout),e._hoverState=kn,!e._config.delay||!e._config.delay.hide){e.hide();return}e._timeout=setTimeout(()=>{e._hoverState===kn&&e.hide()},e._config.delay.hide)}}_isWithActiveTrigger(){for(const t in this._activeTrigger)if(this._activeTrigger[t])return!0;return!1}_getConfig(t){const e=se.getDataAttributes(this._element);return Object.keys(e).forEach(s=>{lv.has(s)&&delete e[s]}),t={...this.constructor.Default,...e,...typeof t=="object"&&t?t:{}},t.container=t.container===!1?document.body:tt(t.container),typeof t.delay=="number"&&(t.delay={show:t.delay,hide:t.delay}),typeof t.title=="number"&&(t.title=t.title.toString()),typeof t.content=="number"&&(t.content=t.content.toString()),Me(ba,t,this.constructor.DefaultType),t.sanitize&&(t.template=va(t.template,t.allowList,t.sanitizeFn)),t}_getDelegateConfig(){const t={};for(const e in this._config)this.constructor.Default[e]!==this._config[e]&&(t[e]=this._config[e]);return t}_cleanTipClass(){const t=this.getTipElement(),e=new RegExp(`(^|\\s)${this._getBasicClassPrefix()}\\S+`,"g"),s=t.getAttribute("class").match(e);s!==null&&s.length>0&&s.map(i=>i.trim()).forEach(i=>t.classList.remove(i))}_getBasicClassPrefix(){return av}_handlePopperPlacementChange(t){const{state:e}=t;e&&(this.tip=e.elements.popper,this._cleanTipClass(),this._addAttachmentClass(this._getAttachment(e.placement)))}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null)}static jQueryInterface(t){return this.each(function(){const e=ih.getOrCreateInstance(this,t);if(typeof t=="string"){if(typeof e[t]>"u")throw new TypeError(`No method named "${t}"`);e[t]()}})}};Ee(Vs);const gv="popover",vv="bs.popover",Ce=`.${vv}`,bv="bs-popover",Ev={...Vs.Default,placement:"right",offset:[0,8],trigger:"click",content:"",template:''},yv={...Vs.DefaultType,content:"(string|element|function)"},wv={HIDE:`hide${Ce}`,HIDDEN:`hidden${Ce}`,SHOW:`show${Ce}`,SHOWN:`shown${Ce}`,INSERTED:`inserted${Ce}`,CLICK:`click${Ce}`,FOCUSIN:`focusin${Ce}`,FOCUSOUT:`focusout${Ce}`,MOUSEENTER:`mouseenter${Ce}`,MOUSELEAVE:`mouseleave${Ce}`},_v=".popover-header",Sv=".popover-body";let nh=class rh extends Vs{static get Default(){return Ev}static get NAME(){return gv}static get Event(){return wv}static get DefaultType(){return yv}isWithContent(){return this.getTitle()||this._getContent()}setContent(t){this._sanitizeAndSetContent(t,this.getTitle(),_v),this._sanitizeAndSetContent(t,this._getContent(),Sv)}_getContent(){return this._resolvePossibleFunction(this._config.content)}_getBasicClassPrefix(){return bv}static jQueryInterface(t){return this.each(function(){const e=rh.getOrCreateInstance(this,t);if(typeof t=="string"){if(typeof e[t]>"u")throw new TypeError(`No method named "${t}"`);e[t]()}})}};Ee(nh);const _a="scrollspy",Av="bs.scrollspy",un=`.${Av}`,Tv=".data-api",Sa={offset:10,method:"auto",target:""},Cv={offset:"number",method:"string",target:"(string|element)"},Lv=`activate${un}`,kv=`scroll${un}`,xv=`load${un}${Tv}`,oh="dropdown-item",Nt="active",Iv='[data-bs-spy="scroll"]',Nv=".nav, .list-group",er=".nav-link",Ov=".nav-item",ah=".list-group-item",In=`${er}, ${ah}, .${oh}`,Pv=".dropdown",Dv=".dropdown-toggle",Mv="offset",Aa="position";class pn extends Ae{constructor(t,e){super(t),this._scrollElement=this._element.tagName==="BODY"?window:this._element,this._config=this._getConfig(e),this._offsets=[],this._targets=[],this._activeTarget=null,this._scrollHeight=0,g.on(this._scrollElement,kv,()=>this._process()),this.refresh(),this._process()}static get Default(){return Sa}static get NAME(){return _a}refresh(){const t=this._scrollElement===this._scrollElement.window?Mv:Aa,e=this._config.method==="auto"?t:this._config.method,s=e===Aa?this._getScrollTop():0;this._offsets=[],this._targets=[],this._scrollHeight=this._getScrollHeight(),L.find(In,this._config.target).map(r=>{const o=xr(r),l=o?L.findOne(o):null;if(l){const c=l.getBoundingClientRect();if(c.width||c.height)return[se[e](l).top+s,o]}return null}).filter(r=>r).sort((r,o)=>r[0]-o[0]).forEach(r=>{this._offsets.push(r[0]),this._targets.push(r[1])})}dispose(){g.off(this._scrollElement,un),super.dispose()}_getConfig(t){return t={...Sa,...se.getDataAttributes(this._element),...typeof t=="object"&&t?t:{}},t.target=tt(t.target)||document.documentElement,Me(_a,t,Cv),t}_getScrollTop(){return this._scrollElement===window?this._scrollElement.pageYOffset:this._scrollElement.scrollTop}_getScrollHeight(){return this._scrollElement.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)}_getOffsetHeight(){return this._scrollElement===window?window.innerHeight:this._scrollElement.getBoundingClientRect().height}_process(){const t=this._getScrollTop()+this._config.offset,e=this._getScrollHeight(),s=this._config.offset+e-this._getOffsetHeight();if(this._scrollHeight!==e&&this.refresh(),t>=s){const i=this._targets[this._targets.length-1];this._activeTarget!==i&&this._activate(i);return}if(this._activeTarget&&t0){this._activeTarget=null,this._clear();return}for(let i=this._offsets.length;i--;)this._activeTarget!==this._targets[i]&&t>=this._offsets[i]&&(typeof this._offsets[i+1]>"u"||t`${i}[data-bs-target="${t}"],${i}[href="${t}"]`),s=L.findOne(e.join(","),this._config.target);s.classList.add(Nt),s.classList.contains(oh)?L.findOne(Dv,s.closest(Pv)).classList.add(Nt):L.parents(s,Nv).forEach(i=>{L.prev(i,`${er}, ${ah}`).forEach(r=>r.classList.add(Nt)),L.prev(i,Ov).forEach(r=>{L.children(r,er).forEach(o=>o.classList.add(Nt))})}),g.trigger(this._scrollElement,Lv,{relatedTarget:t})}_clear(){L.find(In,this._config.target).filter(t=>t.classList.contains(Nt)).forEach(t=>t.classList.remove(Nt))}static jQueryInterface(t){return this.each(function(){const e=pn.getOrCreateInstance(this,t);if(typeof t=="string"){if(typeof e[t]>"u")throw new TypeError(`No method named "${t}"`);e[t]()}})}}g.on(window,xv,()=>{L.find(Iv).forEach(n=>new pn(n))});Ee(pn);const Rv="tab",$v="bs.tab",Us=`.${$v}`,Bv=".data-api",Hv=`hide${Us}`,Fv=`hidden${Us}`,Vv=`show${Us}`,Uv=`shown${Us}`,jv=`click${Us}${Bv}`,Wv="dropdown-menu",cs="active",Ta="fade",Ca="show",zv=".dropdown",qv=".nav, .list-group",La=".active",ka=":scope > li > .active",Qv='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',Yv=".dropdown-toggle",Kv=":scope > .dropdown-menu .active";class fn extends Ae{static get NAME(){return Rv}show(){if(this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE&&this._element.classList.contains(cs))return;let t;const e=et(this._element),s=this._element.closest(qv);if(s){const l=s.nodeName==="UL"||s.nodeName==="OL"?ka:La;t=L.find(l,s),t=t[t.length-1]}const i=t?g.trigger(t,Hv,{relatedTarget:this._element}):null;if(g.trigger(this._element,Vv,{relatedTarget:t}).defaultPrevented||i!==null&&i.defaultPrevented)return;this._activate(this._element,s);const o=()=>{g.trigger(t,Fv,{relatedTarget:this._element}),g.trigger(this._element,Uv,{relatedTarget:t})};e?this._activate(e,e.parentNode,o):o()}_activate(t,e,s){const r=(e&&(e.nodeName==="UL"||e.nodeName==="OL")?L.find(ka,e):L.children(e,La))[0],o=s&&r&&r.classList.contains(Ta),l=()=>this._transitionComplete(t,r,s);r&&o?(r.classList.remove(Ca),this._queueCallback(l,t,!0)):l()}_transitionComplete(t,e,s){if(e){e.classList.remove(cs);const r=L.findOne(Kv,e.parentNode);r&&r.classList.remove(cs),e.getAttribute("role")==="tab"&&e.setAttribute("aria-selected",!1)}t.classList.add(cs),t.getAttribute("role")==="tab"&&t.setAttribute("aria-selected",!0),ss(t),t.classList.contains(Ta)&&t.classList.add(Ca);let i=t.parentNode;if(i&&i.nodeName==="LI"&&(i=i.parentNode),i&&i.classList.contains(Wv)){const r=t.closest(zv);r&&L.find(Yv,r).forEach(o=>o.classList.add(cs)),t.setAttribute("aria-expanded",!0)}s&&s()}static jQueryInterface(t){return this.each(function(){const e=fn.getOrCreateInstance(this);if(typeof t=="string"){if(typeof e[t]>"u")throw new TypeError(`No method named "${t}"`);e[t]()}})}}g.on(document,jv,Qv,function(n){if(["A","AREA"].includes(this.tagName)&&n.preventDefault(),vt(this))return;fn.getOrCreateInstance(this).show()});Ee(fn);const xa="toast",Gv="bs.toast",it=`.${Gv}`,Xv=`mouseover${it}`,Jv=`mouseout${it}`,Zv=`focusin${it}`,eb=`focusout${it}`,tb=`hide${it}`,sb=`hidden${it}`,ib=`show${it}`,nb=`shown${it}`,rb="fade",Ia="hide",hs="show",Zs="showing",ob={animation:"boolean",autohide:"boolean",delay:"number"},Na={animation:!0,autohide:!0,delay:5e3};let Or=class lh extends Ae{constructor(t,e){super(t),this._config=this._getConfig(e),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get DefaultType(){return ob}static get Default(){return Na}static get NAME(){return xa}show(){if(g.trigger(this._element,ib).defaultPrevented)return;this._clearTimeout(),this._config.animation&&this._element.classList.add(rb);const e=()=>{this._element.classList.remove(Zs),g.trigger(this._element,nb),this._maybeScheduleHide()};this._element.classList.remove(Ia),ss(this._element),this._element.classList.add(hs),this._element.classList.add(Zs),this._queueCallback(e,this._element,this._config.animation)}hide(){if(!this._element.classList.contains(hs)||g.trigger(this._element,tb).defaultPrevented)return;const e=()=>{this._element.classList.add(Ia),this._element.classList.remove(Zs),this._element.classList.remove(hs),g.trigger(this._element,sb)};this._element.classList.add(Zs),this._queueCallback(e,this._element,this._config.animation)}dispose(){this._clearTimeout(),this._element.classList.contains(hs)&&this._element.classList.remove(hs),super.dispose()}_getConfig(t){return t={...Na,...se.getDataAttributes(this._element),...typeof t=="object"&&t?t:{}},Me(xa,t,this.constructor.DefaultType),t}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout(()=>{this.hide()},this._config.delay)))}_onInteraction(t,e){switch(t.type){case"mouseover":case"mouseout":this._hasMouseInteraction=e;break;case"focusin":case"focusout":this._hasKeyboardInteraction=e;break}if(e){this._clearTimeout();return}const s=t.relatedTarget;this._element===s||this._element.contains(s)||this._maybeScheduleHide()}_setListeners(){g.on(this._element,Xv,t=>this._onInteraction(t,!0)),g.on(this._element,Jv,t=>this._onInteraction(t,!1)),g.on(this._element,Zv,t=>this._onInteraction(t,!0)),g.on(this._element,eb,t=>this._onInteraction(t,!1))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(t){return this.each(function(){const e=lh.getOrCreateInstance(this,t);if(typeof t=="string"){if(typeof e[t]>"u")throw new TypeError(`No method named "${t}"`);e[t](this)}})}};cn(Or);Ee(Or);class dt extends Ps{}class Q extends Ir{}a(Q,"CLASS_NAME_SHOW","show"),a(Q,"CLASS_NAME_COLLAPSE","collapse"),a(Q,"CLASS_NAME_COLLAPSING","collapsing"),a(Q,"CLASS_NAME_COLLAPSED","collapsed"),a(Q,"SELECTOR_ACTIVES",".show, .collapsing"),a(Q,"SELECTOR_DATA_TOGGLE",'[data-bs-toggle="collapse"]');const Hr=class extends H{constructor(){super();a(this,"scope",{toggle:this.toggle,show:this.show,hide:this.hide,update:this.update,isShown:!1});a(this,"dropdown");a(this,"toggler",null);a(this,"onShown",this._onShown.bind(this));a(this,"onHidden",this._onHidden.bind(this))}static get observedAttributes(){return["offset","boundary","reference","display","popper-config","auto-close"]}isShown(){var e;return((e=this.dropdown)==null?void 0:e._isShown())||!1}toggle(e,s,i){if(!this.dropdown)throw new Error("Dropdown not ready!");i!==this.toggler&&this.dropdown.toggle()}show(){if(!this.dropdown)throw new Error("Dropdown not ready!");this.dropdown.show()}hide(){if(!this.dropdown)throw new Error("Dropdown not ready!");this.dropdown.hide()}update(){if(!this.dropdown)throw new Error("Dropdown not ready!");this.dropdown.update()}connectedCallback(){super.connectedCallback(),this.init(Hr.observedAttributes)}async afterBind(){this.initDropdown(),this.addEventListeners(),await super.afterBind()}initDropdown(){this.toggler=this.classList.contains("dropdown-toggle")?this:this.querySelector(".dropdown-toggle")||this,this.toggler.dataset.bsToggle="dropdown",this.dropdown=new N(this.toggler,this.scope),this.dropdown.hide(),this.scope.isShown=this.isShown()}_onShown(){console.debug("onShown"),this.scope.isShown=this.isShown()}_onHidden(){console.debug("onHidden"),this.scope.isShown=this.isShown()}addEventListeners(){var e,s;(e=this.toggler)==null||e.addEventListener(N.EVENT_SHOWN,this.onShown),(s=this.toggler)==null||s.addEventListener(N.EVENT_HIDDEN,this.onHidden)}template(){return null}};let _s=Hr;a(_s,"tagName","bs5-dropdown");const ei=".data-api",Oa="ArrowDown",Pa="ArrowUp",Da="Escape",Le=class extends kt{static hideAll(){this.clearMenus()}static getAllComponents(){const t=document.querySelectorAll(_s.tagName);return Array.from(t)}static hideAllComponents(){var e;const t=this.getAllComponents();for(const s of Array.from(t))(e=s.dropdown)==null||e.hide()}constructor(t,e){super(t,e)}};let N=Le;a(N,"DATA_API_KEY",ei),a(N,"ESCAPE_KEY",Da),a(N,"SPACE_KEY","Space"),a(N,"TAB_KEY","Tab"),a(N,"ARROW_UP_KEY",Pa),a(N,"ARROW_DOWN_KEY",Oa),a(N,"RIGHT_MOUSE_BUTTON",2),a(N,"REGEXP_KEYDOWN",new RegExp(`${Pa}|${Oa}|${Da}`)),a(N,"EVENT_HIDE",`hide${Le.EVENT_KEY}`),a(N,"EVENT_HIDDEN",`hidden${Le.EVENT_KEY}`),a(N,"EVENT_SHOW",`show${Le.EVENT_KEY}`),a(N,"EVENT_SHOWN",`shown${Le.EVENT_KEY}`),a(N,"EVENT_CLICK",`click${Le.EVENT_KEY}`),a(N,"EVENT_CLICK_DATA_API",`click${Le.EVENT_KEY}${ei}`),a(N,"EVENT_KEYDOWN_DATA_API",`keydown${Le.EVENT_KEY}${ei}`),a(N,"EVENT_KEYUP_DATA_API",`keyup${Le.EVENT_KEY}${ei}`),a(N,"CLASS_NAME_DISABLED","disabled"),a(N,"CLASS_NAME_SHOW","show"),a(N,"CLASS_NAME_DROPUP","dropup"),a(N,"CLASS_NAME_DROPEND","dropend"),a(N,"CLASS_NAME_DROPSTART","dropstart"),a(N,"CLASS_NAME_NAVBAR","navbar"),a(N,"SELECTOR_DATA_TOGGLE",'[data-bs-toggle="dropdown"]'),a(N,"SELECTOR_FORM_CHILD",".dropdown form"),a(N,"SELECTOR_MENU",".dropdown-menu"),a(N,"SELECTOR_NAVBAR_NAV",".navbar-nav"),a(N,"SELECTOR_VISIBLE_ITEMS",".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)");var Fe=(n=>(n.show="show.bs.collapse",n.shown="shown.bs.collapse",n.hide="hide.bs.collapse",n.hidden="hidden.bs.collapse",n))(Fe||{});class ch{constructor(t,e){a(this,"type");a(this,"title");a(this,"channel");a(this,"$event");a(this,"$context");this.type=t,this.title=e}}class ab extends ch{constructor({title:e,message:s,iconUrl:i,focus:r,keyboard:o,backdrop:l,buttons:c,modalService:h,contextualClass:d,channel:u,$event:p,$context:f}){super("modal",e);a(this,"message");a(this,"iconUrl");a(this,"focus");a(this,"keyboard");a(this,"backdrop");a(this,"buttons",[]);a(this,"modalService");a(this,"contextualClass");this.message=s,this.iconUrl=i,this.focus=r||!1,this.keyboard=o||!0,this.backdrop=l||!0,this.buttons=c||[],this.modalService=h,this.contextualClass=d,this.channel=u,this.$event=p,this.$context=f}}const hh="bs.modal",Ma=".data-api",he=`.${hh}`;class V extends Ds{static get DATA_KEY(){return hh}static get DATA_API_KEY(){return Ma}static get EVENT_KEY(){return he}}a(V,"ESCAPE_KEY","Escape"),a(V,"EVENT_HIDE",`hide${he}`),a(V,"EVENT_HIDE_PREVENTED",`hidePrevented${he}`),a(V,"EVENT_HIDDEN",`hidden${he}`),a(V,"EVENT_SHOW",`show${he}`),a(V,"EVENT_SHOWN",`shown${he}`),a(V,"EVENT_FOCUSIN",`focusin${he}`),a(V,"EVENT_RESIZE",`resize${he}`),a(V,"EVENT_CLICK_DISMISS",`click.dismiss${he}`),a(V,"EVENT_KEYDOWN_DISMISS",`keydown.dismiss${he}`),a(V,"EVENT_MOUSEUP_DISMISS",`mouseup.dismiss${he}`),a(V,"EVENT_MOUSEDOWN_DISMISS",`mousedown.dismiss${he}`),a(V,"EVENT_CLICK_DATA_API",`click${he}${Ma}`),a(V,"CLASS_NAME_SCROLLBAR_MEASURER","modal-scrollbar-measure"),a(V,"CLASS_NAME_BACKDROP","modal-backdrop"),a(V,"CLASS_NAME_OPEN","modal-open"),a(V,"CLASS_NAME_FADE","fade"),a(V,"CLASS_NAME_SHOW","show"),a(V,"CLASS_NAME_STATIC","modal-static"),a(V,"SELECTOR_DIALOG",".modal-dialog"),a(V,"SELECTOR_MODAL_BODY",".modal-body"),a(V,"SELECTOR_DATA_TOGGLE",'[data-bs-toggle="modal"]'),a(V,"SELECTOR_DATA_DISMISS",'[data-bs-dismiss="modal"]'),a(V,"SELECTOR_FIXED_CONTENT",".fixed-top, .fixed-bottom, .is-fixed, .sticky-top"),a(V,"SELECTOR_STICKY_CONTENT",".sticky-top");class lb extends Vs{}class tr extends nh{}const Ke=class{constructor(){a(this,"eventDispatcher",$.getInstance());a(this,"bs5",Ie.getSingleton());a(this,"current","os");this.addEventListeners();const t=this.init(),e=document.getElementById("theme");e&&this.select(t.choice,e)}static getSingleton(){return Ke.instance?Ke.instance:this.setSingleton()}static setSingleton(){if(Ke.instance)throw new Error("Singleton of ThemeService already defined!");return Ke.instance=new Ke,Ke.instance}addEventListeners(){window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",t=>{this.triggerChange(t)})}init(){let t="os";return this.bs5.options.allowStoreDataInBrowser&&(t=localStorage.getItem("bs5-theme")||"os"),this.set(t)}select(t,e){(e==null?void 0:e.nodeName)==="SELECT"&&(e.value=t)}getDefaultData(){return{supported:!!window.matchMedia,isDark:!1,isLight:!1,systemIsDark:!1,systemIsLight:!0,bySystem:!0,byUser:!1,choice:"os"}}triggerChange(t,e){e||(e=this.getDefaultData());const s=this.getScheme();return this.eventDispatcher.trigger("theme-change",{oldValue:e,newValue:s}),s}onceChange(t,e){this.eventDispatcher.once("theme-change",t,e)}onChange(t,e){this.eventDispatcher.on("theme-change",t,e)}offChange(t,e){this.eventDispatcher.off("theme-change",t,e)}set(t){const e=this.getScheme();if(gr.includes(t)||(console.warn(`Unsupported theme "${t}", set instead the default "os".`),t="os"),this.bs5.options.allowStoreDataInBrowser&&localStorage.setItem("bs5-theme",t),t==="os"){const s=this.getScheme(t);document.documentElement.setAttribute("data-bs-theme",s.isDark?"dark":"light")}else document.documentElement.setAttribute("data-bs-theme",t);return this.current=t,this.triggerChange(void 0,e)}getScheme(t=this.current){const e=this.getDefaultData();return e.systemIsDark=window.matchMedia("(prefers-color-scheme: dark)").matches,e.systemIsLight=!e.systemIsDark,t==="os"?(e.bySystem=!0,e.byUser=!1,e.choice="os",e.isDark=e.systemIsDark,e.isLight=e.systemIsLight):(e.bySystem=!1,e.byUser=!0,t==="dark"&&(e.isDark=!0,e.choice="dark"),t==="light"&&(e.isLight=!0,e.choice="light")),e}};let Ut=Ke;a(Ut,"instance");class dh extends ch{constructor({title:e,message:s,iconUrl:i,delay:r,autoHide:o,animation:l,toastService:c,contextualClass:h,channel:d,$event:u,$context:p}){super("toast",e);a(this,"message");a(this,"iconUrl");a(this,"delay");a(this,"autoHide");a(this,"animation");a(this,"toastService");a(this,"contextualClass");this.message=s,this.iconUrl=i,this.delay=r,this.autoHide=o,this.animation=l,this.toastService=c,this.contextualClass=h,this.channel=d,this.$event=u,this.$context=p}}const ft=class extends Or{};let le=ft;a(le,"EVENT_CLICK_DISMISS",`click.dismiss${ft.EVENT_KEY}`),a(le,"EVENT_HIDE",`hide${ft.EVENT_KEY}`),a(le,"EVENT_HIDDEN",`hidden${ft.EVENT_KEY}`),a(le,"EVENT_SHOW",`show${ft.EVENT_KEY}`),a(le,"EVENT_SHOWN",`shown${ft.EVENT_KEY}`),a(le,"CLASS_NAME_FADE","fade"),a(le,"CLASS_NAME_HIDE","hide"),a(le,"CLASS_NAME_SHOW","show"),a(le,"CLASS_NAME_SHOWING","showing");const cb=Object.freeze(Object.defineProperty({__proto__:null,Bs5Service:Ie,Carousel:dt,Collapse:Q,Dropdown:N,Modal:V,ModalNotification:ab,Popover:tr,ThemeService:Ut,Toast:le,ToastNotification:dh,Tooltip:lb},Symbol.toStringTag,{value:"Module"}));class uh extends A{constructor(e,s,i,r,o,l,c){super(e,s,i,r,o,l,c);a(this,"bs5");a(this,"breakpoint");a(this,"attributeName");a(this,"val");if(this.bs5=Ie.getSingleton(),this.args.length!==2)throw new Error("The Bs5AttributeBreakpointBinder was not initialized correctly!");const h=this.args[0].toString(),d=this.args[1].toString();if(!this.bs5.breakpointNames.includes(h))throw new Error(`Unknown breakpoint "${h}"! You can define breakpoints at the initialization of the Bs5Module.`);this.breakpoint=h,this.attributeName=d}onBreakpointChanges(){this.setAttributeOnMatch()}setAttributeOnMatch(){if(this.bs5.activeBreakpoint){if(this.isBreakpointMatch(this.breakpoint))return this.defaultAttributeBinder.routine(this.el,this.val);this.breakpointUnhandled(this.bs5.activeBreakpoint.name)&&this.defaultAttributeBinder.routine(this.el,void 0)}}isBreakpointMatch(e=this.breakpoint){return this.bs5.activeBreakpoint?!!(this.bs5.activeBreakpoint.name===e||this.myBreakpoints(e).includes(this.bs5.activeBreakpoint.name)):!1}myBreakpoints(e=this.breakpoint){const s=[e];let i=e;for(;i&&(i=this.bs5.getNextBreakpointByName(i),!(!i||this.breakpointHandledByAnother(i)));)s.push(i);return s}breakpointHandledByAnother(e){return!!this.getHandledBreakpoints().includes(e)}breakpointUnhandled(e){let s=e,i=!0;for(;s&&i;){if(this.breakpointHandledByAnother(s)){i=!1;break}if(s=this.bs5.getPrevBreakpointByName(s),!s)break}return i}addToHandledBreakpoints(){const e=this.getHandledBreakpoints();e.push(this.breakpoint),this.el.dataset[ke(this.attributeName)]=Gi(e)}getHandledBreakpoints(){const e=Xi(this.el.dataset[ke(this.attributeName)]||"[]");if(!Array.isArray(e))throw new Error("breakpoints dataset has unsupported values!");return e}bind(e){this.bs5.on("breakpoint:changed",this.onBreakpointChanges,this),typeof this.defaultAttributeBinder.bind=="function"&&this.defaultAttributeBinder.bind(e)}routine(e,s){this.addToHandledBreakpoints(),this.val=s,this.setAttributeOnMatch()}unbind(e){var s;(s=this.bs5)==null||s.off("breakpoint:changed",this.onBreakpointChanges,this),typeof this.defaultAttributeBinder.unbind=="function"&&this.defaultAttributeBinder.unbind(e)}}class ph extends uh{constructor(e,s,i,r,o,l,c){super(e,s,i,r,o,l,c);a(this,"defaultAttributeBinder");this.defaultAttributeBinder=new tn(e,s,this.attributeName,r,o,l,"*")}}a(ph,"key","bs5-attr-*-*");class fh extends A{constructor(){super(...arguments);a(this,"dispatcher",$.getInstance("main"));a(this,"collapseService");a(this,"url");a(this,"checkURL",this._checkURL.bind(this))}_checkURL(){var e;return this.url&&Zi(this.url)?((e=this.collapseService)==null||e.hide(),!0):!1}bind(e){this.collapseService=new Q(e,{toggle:!1})}unbind(){this.checkURL&&this.dispatcher.off("newPageReady",this.checkURL)}routine(e,s){this.url=s,this.checkURL&&this.dispatcher.off("newPageReady",this.checkURL),this.dispatcher.on("newPageReady",this.checkURL)}}a(fh,"key","bs5-collapse-on-url");class mh extends uh{constructor(e,s,i,r,o,l,c){super(e,s,i,r,o,l,c);a(this,"defaultAttributeBinder");this.defaultAttributeBinder=new Bi(e,s,`co-${this.attributeName}`,r,o,l,Bi.key)}}a(mh,"key","bs5-co-*-*");class gh extends A{constructor(){super(...arguments);a(this,"targets",new Map);a(this,"onEvent",this._onEvent.bind(this))}_onEvent(e){e.preventDefault();for(const s of this.targets.values())s.toggle()}bind(e){if(this.args===null)throw new Error("args is null");const s=this.args[0];e.addEventListener(s,this.onEvent)}unbind(){const e=this.args[0];this.el.removeEventListener(e,this.onEvent)}routine(e,s){var r;const i=Array.from(document.querySelectorAll(s));i.length<=0&&console.warn(`[toggleCollapseOnEventBinder] No element with selector "${s}" found.`);for(const o of this.targets.keys())i.find(l=>l===o)||((r=this.targets.get(o))==null||r.dispose(),this.targets.delete(o));for(const o of i)this.targets.has(o)||this.targets.set(o,new Q(o,{toggle:!1}))}}a(gh,"key","bs5-toggle-collapse-on-*");class vh extends A{constructor(){super(...arguments);a(this,"toggler");a(this,"dropdownService")}bind(e){this.toggler=(e.classList.contains("dropdown-toggle")?e:e.querySelector(".dropdown-toggle"))||e}routine(e,s={}){if(!this.toggler)throw new Error("No dropdown toggle element found!");this.dropdownService&&(this.dropdownService.dispose(),this.toggler.dataset.bsToggle="");const i=new N(this.toggler,s);this.toggler.dataset.bsToggle="dropdown",this.dropdownService=i,this.dropdownService.hide()}}a(vh,"key","bs5-dropdown");class bh extends A{routine(t,e){const s=new Q(t,{toggle:!1}),i=new $("main"),r=o=>o&&Zi(o)?(s.show(),!0):(s.hide(),!1);i.on("newPageReady",()=>r(e)),r(e)}}a(bh,"key","bs5-expand-on-url");class Eh extends A{constructor(){super(...arguments);a(this,"popover");a(this,"listeners",{})}routine(e,s){let i={};typeof s=="string"?i.content=s:typeof s=="object"&&(i={...s}),i.placement=i.placement||"auto";const r=new tr(e,{...tr.Default,...i});this.popover&&this.popover.dispose(),this.popover=r;const o=["show","hide","toggle","dispose","enable","disable","update"];if(this.listeners)for(const[l,c]of Object.entries(this.listeners))this.el.removeEventListener(l,c);this.listeners=Object.create(null);for(const l of o)if(r[l]&&typeof r[l]=="function"){const c=`trigger-${String(l)}`,h=r[l].bind(r);this.el.addEventListener(c,h),this.listeners[c]=h}else console.warn("Unknown method "+l)}bind(e){e.dispatchEvent(new CustomEvent("bound.bs.popover",{bubbles:!0,cancelable:!0}))}unbind(){if(this.popover&&this.popover.dispose(),this.listeners)for(const[e,s]of Object.entries(this.listeners))this.el.removeEventListener(e,s)}}a(Eh,"key","bs5-popover");class yh extends A{constructor(){super(...arguments);a(this,"toastData");a(this,"onEvent",this._onEvent.bind(this))}_onEvent(e){if(!this.toastData)throw new Error("Toast data not set!");this.toastData.$event=e,this.toastData.$context=this.view.models;const s=new dh(this.toastData);new $(s.channel||"toast").trigger("show-notification",s)}bind(e){const s=this.args[0];e.addEventListener(s,this.onEvent)}routine(e,s){if(this.args===null)throw new Error("args is null");this.toastData=s}unbind(e){const s=this.args[0];e.removeEventListener(s,this.onEvent)}}a(yh,"key","show-toast-on-*");class wh extends A{constructor(){super(...arguments);a(this,"target");a(this,"className");a(this,"onScroll",Oe(this._onScroll.bind(this)));a(this,"isInViewport",this._isInViewport.bind(this))}_onScroll(){if(!this.target)throw new Error("No target element found!");if(!this.className)throw new Error("className not set!");this.isInViewport(this.target)?(this.el.classList.add(this.className),this.el.type==="radio"&&(this.el.checked=!0)):(this.el.classList.remove(this.className),this.el.type==="radio"&&(this.el.checked=!1))}_isInViewport(e){if(!e)return!1;const s=Number(this.el.dataset.offset||0),i=Number(this.el.dataset.offsetBottom||0);return vd(e,{top:s,bottom:i})}bind(){window.addEventListener("scroll",this.onScroll,{passive:!0}),this.onScroll()}routine(e,s){const i=s.replace("#","");this.target=document.getElementById(i)||void 0,this.className=this.args[0]}unbind(){window.removeEventListener("scroll",this.onScroll)}}a(wh,"key","bs5-scrollspy-*");const js=document.createElement("div");js.classList.add("tooltip");js.setAttribute("role","tooltip");const _h=document.createElement("div");_h.classList.add("arrow");js.appendChild(_h);const Sh=document.createElement("div");Sh.classList.add("tooltip-inner");js.appendChild(Sh);class Ah extends A{constructor(){super(...arguments);a(this,"popper");a(this,"tip",js.cloneNode(!0));a(this,"show",this._show.bind(this));a(this,"hide",this._hide.bind(this))}_show(){const e=this.el.dataset.placement||"start",s=0;this.popper=ln(this.el,this.tip,{placement:e,modifiers:[{name:"flip",options:{altBoundary:!0,behavior:"flip"}},{name:"offset",options:{offset:s}},{name:"arrow",options:{element:".arrow"}},{name:"preventOverflow",options:{boundariesElement:"scrollParent"}}],strategy:void 0}),document.body.appendChild(this.tip),this.tip.classList.add("show"),this.tip.classList.add("bs-tooltip-"+e)}_hide(){this.tip.classList.remove("show"),this.popper&&this.popper.destroy()}bind(e){e.addEventListener("mouseenter",this.show),e.addEventListener("mouseleave",this.hide)}routine(e,s){const i=this.tip.querySelector(".tooltip-inner");i.innerHTML=s}unbind(){this.hide(),this.el.removeEventListener("mouseenter",this.show),this.el.removeEventListener("mouseleave",this.hide)}}a(Ah,"key","bs5-tooltip");class Th extends A{constructor(){super(...arguments);a(this,"target");a(this,"onEvent",this._onEvent.bind(this))}_onEvent(e){const s=Number(this.el.dataset.offset||0),i=this.el.dataset.scrollElement?document.querySelector(this.el.dataset.scrollElement):window;this.target&&(Zt(this.target,s,i),e.preventDefault())}bind(e){this.onEvent=this.onEvent.bind(this);const s=this.args[0];e.addEventListener(s,this.onEvent)}routine(e,s){this.target=document.querySelector(s)||void 0}unbind(e){const s=this.args[0];e.removeEventListener(s,this.onEvent)}}a(Th,"key","scroll-to-on-*");class Ch extends A{constructor(){super(...arguments);a(this,"toggleButtonEvents");a(this,"state","off");a(this,"triggerState",this._triggerState.bind(this));a(this,"onToggle",this._onToggle.bind(this))}_triggerState(){var e;(e=this.toggleButtonEvents)==null||e.trigger(D.eventNames.state,this.state)}_onToggle(){this.toggle.bind(this)(this.el)}toggle(e){this.state==="removed"?this.add.bind(this)(e):this.remove.bind(this)(e)}remove(e){const s=this.args[0];e.removeAttribute(s),this.state="removed",e.dispatchEvent(new CustomEvent(jn.elEventNames.removed,{detail:{attributeName:s}})),this.triggerState()}add(e){const s=this.args[0];e.setAttribute(s,s),this.state="added",e.dispatchEvent(new CustomEvent(jn.elEventNames.added,{detail:{attributeName:s}})),this.triggerState()}bind(e){const s=this.args[0];this.state=e.hasAttribute(s)?"added":"removed"}unbind(){var e,s;(e=this.toggleButtonEvents)==null||e.off(D.eventNames.toggle,this.onToggle,this),(s=this.toggleButtonEvents)==null||s.off(D.eventNames.init,this.triggerState,this)}routine(e,s){const i=this._getValue(e);let r=this.toggleButtonEvents;i&&r&&(r.off(D.eventNames.toggle,this.onToggle,this),r.off(D.eventNames.init,this.triggerState,this)),this.toggleButtonEvents||(this.toggleButtonEvents=new $(D.nsPrefix+s),r=this.toggleButtonEvents,r.on(D.eventNames.toggle,this.onToggle,this),r.on(D.eventNames.init,this.triggerState,this))}}a(Ch,"key","bs5-toggle-attribute-*");class Lh extends A{constructor(){super(...arguments);a(this,"toggleButtonEvents");a(this,"state","off");a(this,"triggerState",this._triggerState.bind(this));a(this,"onToggle",this._onToggle.bind(this))}_triggerState(){var e;(e=this.toggleButtonEvents)==null||e.trigger(D.eventNames.state,this.state)}_onToggle(){this.toggle.bind(this)(this.el)}toggle(e){this.state==="removed"?this.add.bind(this)(e):this.remove.bind(this)(e)}remove(e){const s=this.args[0];e.classList.remove(s),this.state="removed",e.dispatchEvent(new CustomEvent(Wn.elEventNames.removed,{detail:{className:s}})),this.triggerState()}add(e){const s=this.args[0];e.classList.add(s,s),this.state="added",e.dispatchEvent(new CustomEvent(Wn.elEventNames.added,{detail:{className:s}})),this.triggerState()}bind(e){const s=this.args[0];this.state=e.classList.contains(s)?"added":"removed"}unbind(){var e,s;(e=this.toggleButtonEvents)==null||e.off(D.eventNames.toggle,this.onToggle,this),(s=this.toggleButtonEvents)==null||s.off(D.eventNames.init,this.triggerState,this)}routine(e,s){const i=this._getValue(e);let r=this.toggleButtonEvents;i&&r&&(r.off(D.eventNames.toggle,this.onToggle,this),r.off(D.eventNames.init,this.triggerState,this)),this.toggleButtonEvents||(this.toggleButtonEvents=new $(D.nsPrefix+s),r=this.toggleButtonEvents,r.on(D.eventNames.toggle,this.onToggle,this),r.on(D.eventNames.init,this.triggerState,this))}}a(Lh,"key","bs5-toggle-class-*");const hb=Object.freeze(Object.defineProperty({__proto__:null,Bs5AttributeBreakpointBinder:ph,Bs5ComponentAttributeBreakpointBinder:mh,CollapseOnUrlBinder:fh,DropdownBinder:vh,ExpandOnUrlBinder:bh,PopoverBinder:Eh,ScrollToOnEventBinder:Th,ScrollspyClassBinder:wh,ShowToastOnEventBinder:yh,ToggleAttributeBinder:Ch,ToggleClassBinder:Lh,ToggleCollapseOnEventBinder:gh,TooltipBinder:Ah},Symbol.toStringTag,{value:"Module"})),db="modulepreload",ub=function(n){return"/"+n},Ra={},Ws=function(t,e,s){if(!e||e.length===0)return t();const i=document.getElementsByTagName("link");return Promise.all(e.map(r=>{if(r=ub(r),r in Ra)return;Ra[r]=!0;const o=r.endsWith(".css"),l=o?'[rel="stylesheet"]':"";if(!!s)for(let d=i.length-1;d>=0;d--){const u=i[d];if(u.href===r&&(!o||u.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${r}"]${l}`))return;const h=document.createElement("link");if(h.rel=o?"stylesheet":db,o||(h.as="script",h.crossOrigin=""),h.href=r,document.head.appendChild(h),o)return new Promise((d,u)=>{h.addEventListener("load",d),h.addEventListener("error",()=>u(new Error(`Unable to preload CSS for ${r}`)))})})).then(()=>t())},pb=sn.read,Fr=class extends fr{constructor(){super();a(this,"autobind",!0);a(this,"templateAttributes",[{name:"title",required:!0},{name:"show",required:!1},{name:"icon-direction",required:!1}]);a(this,"scope",{items:[],toggle:this.toggle,show:this.show,hide:this.hide,collapseIconSize:16,showOnlyOne:!0})}static get observedAttributes(){return["items","collapse-icon-src","collapse-icon-size","show-only-one"]}hide(e,s){const i=this.querySelector(`[data-index="${s}"]`);i&&(this.initItemEventListeners(e,i),new Q(i,{toggle:!1}).hide())}show(e,s){const i=this.querySelector(`[data-index="${s}"]`),r=Array.from(this.querySelectorAll(`[data-index]:not([data-index="${s}"])`));if(r&&this.scope.showOnlyOne)for(const o of r)new Q(o,{toggle:!1}).hide();i&&(this.initItemEventListeners(e,i),new Q(i,{toggle:!1}).show())}toggle(e,s){const i=this.querySelector(`[data-index="${s}"]`),r=Array.from(this.querySelectorAll(`[data-index]:not([data-index="${s}"])`));if(r&&this.scope.showOnlyOne)for(const o of r)new Q(o,{toggle:!1}).hide();i&&(this.initItemEventListeners(e,i),new Q(i,{toggle:!1}).toggle())}initItemEventListeners(e,s){s.removeEventListener(Fe.hide,this.onHide.bind(this,s,e)),s.removeEventListener(Fe.show,this.onShow.bind(this,s,e)),s.addEventListener(Fe.hide,this.onHide.bind(this,s,e),{once:!0}),s.addEventListener(Fe.show,this.onShow.bind(this,s,e),{once:!0})}getContentChildByIndex(){return this.querySelector(".card-body > *")||void 0}onShow(e,s){s.show=!0,s.iconDirection="up";const i=this.getContentChildByIndex();i&&this.triggerVisibilityChangedForElement(i,s.show)}onHide(e,s){s.show=!1,s.iconDirection="down";const i=this.getContentChildByIndex();i&&this.triggerVisibilityChangedForElement(i,s.show)}transformTemplateAttributes(e){return e.handle=e.handle||pb(e.title),e.show=!!e.show,e.iconDirection=e.iconDirection||e.show?"up":"down",e}triggerVisibilityChangedForElement(e,s){setTimeout(()=>{e.dispatchEvent(new CustomEvent("visibility-changed",{detail:{visible:s}}))},200)}connectedCallback(){super.connectedCallback(),this.init(Fr.observedAttributes)}async init(e){return super.init(e).then(s=>s)}async beforeBind(){return await super.beforeBind()}async afterBind(){return await super.afterBind()}requiredAttributes(){return[]}parsedAttributeChangedCallback(e,s,i,r){super.parsedAttributeChangedCallback(e,s,i,r)}disconnectedCallback(){super.disconnectedCallback()}async template(){if(!ne(this)||this.hasOnlyTemplateChilds()){const{default:e}=await Ws(()=>import("./bs5-accordion.component-cad06286.chunk.js"),[]);return e}else return null}};let di=Fr;a(di,"tagName","bs5-accordion");const Vr=class extends H{constructor(){super();a(this,"autobind",!0);a(this,"scope",{animationClass:"btn-animation-start",onClick:this.onClick.bind(this)})}static get observedAttributes(){return["animation-class"]}onClick(){this.startAnimation()}connectedCallback(){super.connectedCallback(),this.init(Vr.observedAttributes)}startAnimation(){this.classList.add(this.scope.animationClass)}onStartAnimation(){}onEndAnimation(){setTimeout(()=>{this.classList.remove(this.scope.animationClass)})}async init(e){return super.init(e).then(s=>(this.onStartAnimation=this.onStartAnimation.bind(this),this.addEventListener("webkitAnimationStart",this.onStartAnimation),this.addEventListener("animationstart",this.onStartAnimation),this.onEndAnimation=this.onEndAnimation.bind(this),this.addEventListener("webkitAnimationEnd",this.onEndAnimation),this.addEventListener("animationend",this.onEndAnimation),this.addEventListener("click",this.scope.onClick),s))}requiredAttributes(){return[]}parsedAttributeChangedCallback(e,s,i,r){super.parsedAttributeChangedCallback(e,s,i,r)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("webkitAnimationStart",this.onStartAnimation),this.removeEventListener("animationstart",this.onStartAnimation),this.removeEventListener("webkitAnimationEnd",this.onEndAnimation),this.removeEventListener("animationend",this.onEndAnimation),this.removeEventListener("click",this.scope.onClick)}template(){return null}};let ui=Vr;a(ui,"tagName","bs5-button");const Ur=class extends H{constructor(){super();a(this,"scope",{interval:dt.Default.interval,keyboard:dt.Default.keyboard,pause:dt.Default.pause||!1,wrap:dt.Default.wrap,touch:dt.Default.touch,fade:!1,next:this.next,nextWhenVisible:this.nextWhenVisible,prev:this.prev,startPause:this.pause,cycle:this.cycle,to:this.to,dispose:this.dispose});a(this,"autobind",!0);a(this,"carouselService")}static get observedAttributes(){return["interval","keyboard","pause","wrap","touch","fade"]}requiredAttributes(){return[]}async beforeBind(){await super.beforeBind(),this.classList.add("carousel","slide")}async afterBind(){this.carouselService=new dt(this,{interval:this.scope.interval,keyboard:this.scope.keyboard,pause:this.scope.pause,wrap:this.scope.wrap,touch:this.scope.touch}),this.scope.fade&&this.classList.add("carousel-fade"),this.carouselService.cycle(),await super.afterBind()}next(){this.carouselService&&this.carouselService.next()}nextWhenVisible(){this.carouselService&&this.carouselService.nextWhenVisible()}prev(){this.carouselService&&this.carouselService.prev()}pause(){this.carouselService&&this.carouselService.pause()}cycle(){this.carouselService&&this.carouselService.cycle()}to(){if(this.carouselService)throw new Error("TODO")}dispose(){this.carouselService&&this.carouselService.dispose()}connectedCallback(){super.connectedCallback(),super.init(Ur.observedAttributes)}template(){return null}};let pi=Ur;a(pi,"tagName","bs5-carousel");const jr=class extends H{constructor(){super();a(this,"autobind",!0);a(this,"collapse");a(this,"scope",{title:"",content:"Please set the content of the collapse using the content attribute or just by set the content as the child of this element",collapsed:!0,toggle:this.toggle,show:this.show,hide:this.hide})}static get observedAttributes(){return["title","content","collapsed"]}requiredAttributes(){return["title"]}hide(){console.debug("hide"),this.collapse&&(this.scope.collapsed=!0,this.collapse.hide())}show(){this.collapse&&(this.scope.collapsed=!1,this.collapse.show())}toggle(){this.collapse&&(this.collapse.toggle(),this.scope.collapsed=!!this.scope.collapsed)}addEventListeners(){this.scope.collapseEl&&(this.scope.collapseEl.addEventListener(Fe.hide,this.onHide.bind(this)),this.scope.collapseEl.addEventListener(Fe.show,this.onShow.bind(this)))}removeEventListeners(){this.scope.collapseEl&&(this.scope.collapseEl.removeEventListener(Fe.hide,this.onHide.bind(this)),this.scope.collapseEl.removeEventListener(Fe.show,this.onShow.bind(this)))}onShow(){console.debug("onShow"),this.scope.collapsed=!1,this.triggerVisibilityChangedForElement(!this.scope.collapsed)}onHide(){console.debug("onShow"),this.scope.collapsed=!0,this.triggerVisibilityChangedForElement(!this.scope.collapsed)}triggerVisibilityChangedForElement(e){setTimeout(()=>{const s=new CustomEvent("visibility-changed",{detail:{visible:e}});this.dispatchEvent(s),this.scope.collapseEl&&this.scope.collapseEl.dispatchEvent(s)},200)}connectedCallback(){super.connectedCallback(),this.init(jr.observedAttributes)}async afterBind(){if(console.debug("afterBind",this.scope.collapsed),this.scope.collapseEl=this.querySelector(".collapse")||void 0,!this.scope.collapseEl)throw new Error("No collapse element found!");this.collapse=new Q(this.scope.collapseEl,{toggle:!this.scope.collapsed})}template(){return ne(this)&&(this.scope.content=this.innerHTML),jsxCreateElement("div",null,jsxCreateElement("button",{"rv-on-click":"toggle",class:"btn btn-primary",type:"button","aria-expanded":"false","rv-aria-controls":"title | handleize","rv-text":"title"}),jsxCreateElement("div",{class:"collapse mt-2","rv-id":"title"},jsxCreateElement("div",{class:"card card-body","rv-template":"content"})))}};let fi=jr;a(fi,"tagName","bs5-collapse");String.prototype.startsWith=String.prototype.startsWith||function(n){return this.indexOf(n)===0};String.prototype.padStart=String.prototype.padStart||function(n,t){let e=this;for(;e.length0?n.toFixed(t).replace(/0+$/,"").replace(/\.$/,""):n.toString())||"0"}class $e{constructor(t,e,s,i){const r=this;function o(l){if(l.startsWith("hsl")){let[c,h,d,u]=l.match(/([\-\d\.e]+)/g).map(Number);u===void 0&&(u=1),c/=360,h/=100,d/=100,r.hsla=[c,h,d,u]}else if(l.startsWith("rgb")){let[c,h,d,u]=l.match(/([\-\d\.e]+)/g).map(Number);u===void 0&&(u=1),r.rgba=[c,h,d,u]}else l.startsWith("#")?r.rgba=$e.hexToRgb(l):r.rgba=$e.nameToRgb(l)||$e.hexToRgb(l)}if(t!==void 0)if(Array.isArray(t))this.rgba=t;else if(s===void 0){const l=t&&""+t;l&&o(l.toLowerCase())}else this.rgba=[t,e,s,i===void 0?1:i]}get rgba(){if(this._rgba)return this._rgba;if(!this._hsla)throw new Error("No color is set");return this._rgba=$e.hslToRgb(this._hsla)}set rgba(t){t.length===3&&(t[3]=1),this._rgba=t,this._hsla=null}printRGB(t){const e=t?this.rgba:this.rgba.slice(0,3),s=e.map((i,r)=>$a(i,r===3?3:0));return t?`rgba(${s})`:`rgb(${s})`}get rgbString(){return this.printRGB()}get rgbaString(){return this.printRGB(!0)}get hsla(){if(this._hsla)return this._hsla;if(!this._rgba)throw new Error("No color is set");return this._hsla=$e.rgbToHsl(this._rgba)}set hsla(t){t.length===3&&(t[3]=1),this._hsla=t,this._rgba=null}printHSL(t){const e=[360,100,100,1],s=["","%","%",""],i=t?this.hsla:this.hsla.slice(0,3),r=i.map((o,l)=>$a(o*e[l],l===3?3:1)+s[l]);return t?`hsla(${r})`:`hsl(${r})`}get hslString(){return this.printHSL()}get hslaString(){return this.printHSL(!0)}get hex(){return"#"+this.rgba.map((s,i)=>i<3?s.toString(16):Math.round(s*255).toString(16)).map(s=>s.padStart(2,"0")).join("")}set hex(t){this.rgba=$e.hexToRgb(t)}printHex(t){const e=this.hex;return t?e:e.substring(0,7)}static hexToRgb(t){const e=(t.startsWith("#")?t.slice(1):t).replace(/^(\w{3})$/,"$1F").replace(/^(\w)(\w)(\w)(\w)$/,"$1$1$2$2$3$3$4$4").replace(/^(\w{6})$/,"$1FF");if(!e.match(/^([0-9a-fA-F]{8})$/))throw new Error("Unknown hex color; "+t);const s=e.match(/^(\w\w)(\w\w)(\w\w)(\w\w)$/).slice(1).map(i=>parseInt(i,16));return s[3]=s[3]/255,s}static nameToRgb(t){const e=t.toLowerCase().replace("at","T").replace(/[aeiouyldf]/g,"").replace("ght","L").replace("rk","D").slice(-5,4),s=fb[e];return s===void 0?s:$e.hexToRgb(s.replace(/\-/g,"00").padStart(6,"f"))}static rgbToHsl([t,e,s,i]){t/=255,e/=255,s/=255;const r=Math.max(t,e,s),o=Math.min(t,e,s);let l,c,h=(r+o)/2;if(r===o)l=c=0;else{const d=r-o;switch(c=h>.5?d/(2-r-o):d/(r+o),r){case t:l=(e-s)/d+(e1&&(m-=1),m<.16666666666666666?p+(f-p)*6*m:m<.5?f:m<.6666666666666666?p+(f-p)*(.6666666666666666-m)*6:p},d=s<.5?s*(1+e):s+e-s*e,u=2*s-d;r=h(u,d,t+1/3),o=h(u,d,t),l=h(u,d,t-1/3)}const c=[r*255,o*255,l*255].map(Math.round);return c[3]=i,c}}class Wi{constructor(){a(this,"events",[])}add(t,e,s){t.addEventListener(e,s,!1),this.events.push({target:t,type:e,handler:s})}remove(t,e,s){this.events=this.events.filter(i=>{let r=!0;return t&&t!==i.target&&(r=!1),e&&e!==i.type&&(r=!1),s&&s!==i.handler&&(r=!1),r&&Wi._doRemove(i.target,i.type,i.handler),!r})}static _doRemove(t,e,s){t.removeEventListener(e,s,!1)}destroy(){this.events.forEach(t=>Wi._doRemove(t.target,t.type,t.handler)),this.events=[]}}const mb=(n,t,e)=>{let s=!1;const i=(c,h,d)=>Math.max(h,Math.min(c,d)),r=(c,h,d)=>{if(d&&(s=!0),!s)return;c.preventDefault();const u=t.getBoundingClientRect(),p=u.width,f=u.height,m=h.clientX,v=h.clientY,b=i(m-u.left,0,p),E=i(v-u.top,0,f);e(b/p,E/f)},o=(c,h)=>{(c.buttons===void 0?c.which:c.buttons)===1?r(c,c,h):s=!1};function l(c,h){c.touches.length===1?r(c,c.touches[0],h):s=!1}n.add(t,"mousedown",c=>{o(c,!0)}),n.add(t,"touchstart",c=>{l(c,!0)}),n.add(window,"mousemove",o),n.add(t,"touchmove",l),n.add(window,"mouseup",()=>{s=!1}),n.add(t,"touchend",()=>{s=!1}),n.add(t,"touchcancel",()=>{s=!1})},gb=`url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='2' height='2'%3E%3Cpath d='M1,0H0V1H2V2H1' fill='lightgrey'/%3E%3C/svg%3E")`,vb=360,bb="keydown";function Eb(n){n.preventDefault(),n.stopPropagation()}function yb(n,t,e,s,i=!1){n.add(t,bb,function(r){e.indexOf(r.key)>=0&&(i&&Eb(r),s(r))})}const Wr=class extends H{constructor(){super();a(this,"eventDispatcher");a(this,"color");a(this,"_debug",!1);a(this,"scope",{namespace:"main",hsl:[],cssHue:"",cssHsl:"",cssHsla:"",alphaBg:"",color:"#0cf",alpha:!0,editor:!0,editorFormat:"hex",cancelButton:!1,okayButton:!1});a(this,"events",new Wi);a(this,"_domH",null);a(this,"_domSL",null);a(this,"_domA",null);a(this,"_domEdit",null);a(this,"_domSample",null);a(this,"_domOkay",null);a(this,"_domCancel",null);a(this,"setColor",Oe(this._setColor.bind(this)));a(this,"updateUI",Oe(this._updateUI.bind(this)))}static get observedAttributes(){return["namespace","alpha","editor","editor-format","cancel-button","okay-button","color"]}connectedCallback(){super.connectedCallback(),super.init(Wr.observedAttributes)}requiredAttributes(){return[]}async beforeBind(){await super.beforeBind(),this.eventDispatcher=$.getInstance("bs5-colorpicker:"+this.scope.namespace),this.setColor(this.scope.color),this.updateUI(),this.bindEvents()}async afterTemplate(e){await super.afterTemplate(e),this.setElements()}onChange(e){var s;this.debug("onChange",e),(s=this.eventDispatcher)==null||s.trigger("change",e)}onDone(e){var s;this.debug("onDone",e),(s=this.eventDispatcher)==null||s.trigger("done",e)}async template(){if(ne(this))return null;{const{default:e}=await Ws(()=>import("./bs5-colorpicker.component-1e5e88ee.chunk.js"),[]);return e}}parsedAttributeChangedCallback(e,s,i,r){super.parsedAttributeChangedCallback(e,s,i,r),e==="color"&&this.setColor(this.scope.color)}_setColor(e,s={silent:!1}){if(typeof e=="string"&&(e=e.trim()),!e)return;s=s||{};let i;try{i=new $e(e)}catch(r){if(s.failSilently)return;throw r}if(!this.scope.alpha){const r=i.hsla;r[3]=1,i.hsla=r}this.color=i,this.setHSLA(null,null,null,null,s)}setElements(){this._domH=this.querySelector(".picker-hue"),this._domSL=this.querySelector(".picker-sl"),this._domA=this.querySelector(".picker-alpha"),this._domEdit=this.querySelector(".picker-editor")||null,this._domSample=this.querySelector(".picker-sample"),this._domOkay=this.querySelector(".picker-done"),this._domCancel=this.querySelector(".picker-cancel")}disconnectedCallback(){this.events.destroy()}bindEvents(){const e=this.events,s=(o,l,c)=>{e.add(o,l,c)};s(this,"click",o=>o.preventDefault());const i=mb.bind(this);if(!this._domH||!this._domSL||!this._domA||!this._domEdit||!this._domOkay)throw new Error("Not ready!");i(e,this._domH,o=>this.setHSLA(o)),i(e,this._domSL,(o,l)=>this.setHSLA(null,o,1-l)),this.scope.alpha&&i(e,this._domA,(o,l)=>this.setHSLA(null,null,null,1-l)),s(this._domEdit,"input",o=>{const l=o.target;this.setColor(l.value,{fromEditor:!0,failSilently:!0})}),s(this._domEdit,"focus",o=>{const l=o.target;l.selectionStart===l.selectionEnd&&l.select()});const r=()=>{this.onDone(this.color)};s(this._domOkay,"click",r),yb(e,this,["Enter"],r)}setHSLA(e=null,s=null,i=null,r=null,o={}){if(!this.color)throw new Error("Not ready!");const l=this.color.hsla;[e,s,i,r].forEach((c,h)=>{(c||c===0)&&(l[h]=c)}),this.color.hsla=l,this.updateUI(o),this.onChange&&!o.silent&&this.onChange(this.color)}_updateUI(e={}){if(!this||!this.color)return;if(this.scope.hsl=this.color.hsla,this.scope.cssHue=`hsl(${this.scope.hsl[0]*vb}, 100%, 50%)`,this.scope.cssHsl=this.color.hslString,this.scope.cssHsla=this.color.hslaString,!this._domH||!this._domSL||!this._domA)throw new Error("Color ui elements not found!");const s=this._domH.querySelector(".picker-selector"),i=this._domSL.querySelector(".picker-selector"),r=this._domA.querySelector(".picker-selector");if(!s||!i||!r||!this._domEdit||!this._domSample)throw console.error(s,i,r,this._domA,this._domSL,this._domH,this._domEdit,this._domSample),new Error("Not ready!");const o=(u,p,f)=>{p.style.left=f*100+"%"},l=(u,p,f)=>{p.style.top=f*100+"%"};o(this._domH,s,this.scope.hsl[0]),o(this._domSL,i,this.scope.hsl[1]),l(this._domSL,i,1-this.scope.hsl[2]),l(this._domA,r,1-this.scope.hsl[3]);const c=this.scope.cssHsl,h=c.replace("hsl","hsla").replace(")",", 0)"),d=`linear-gradient(${[c,h]})`;if(this.scope.alphaBg=d+", "+gb,!e.fromEditor){const u=this.scope.editorFormat,p=this.scope.alpha;let f;switch(u){case"rgb":f=this.color.printRGB(p);break;case"hsl":f=this.color.printHSL(p);break;default:f=this.color.printHex(p)}this.scope.color=f}}};let mi=Wr;a(mi,"tagName","bs5-colorpicker");const zr=class extends H{constructor(){super();a(this,"autobind",!0);a(this,"wrapperElement");a(this,"scope",{headersDepth:1,headersStart:2,findHeaderIdDepth:1,headerParentSelector:void 0,scrollOffset:0,anchors:[]})}static get observedAttributes(){return["headers-start","headers-depth","find-header-id-depth","header-parent-selector","scroll-offset","scroll-element"]}connectedCallback(){super.connectedCallback(),this.init(zr.observedAttributes)}getIdFromElementOrParent(e,s=1){return e.id?e.id:s<=this.scope.findHeaderIdDepth&&e.parentElement?this.getIdFromElementOrParent(e.parentElement,++s):null}pushHeaders(e,s,i,r){e.querySelectorAll("h"+s).forEach(l=>{const c=this.getIdFromElementOrParent(l);c&&(r.push({element:l,href:"#"+c,title:l.innerHTML,childs:[]}),l.parentElement&&i>=s+1&&this.pushHeaders(l.parentElement,s+1,i,r[r.length-1].childs))})}async afterBind(){if(this.scope.headerParentSelector&&this.scope.headersStart&&this.scope.headersDepth){if(this.wrapperElement=document.querySelector(this.scope.headerParentSelector)||void 0,this.scope.anchors=[],!this.wrapperElement){console.error("No wrapper element found!");return}this.pushHeaders(this.wrapperElement,this.scope.headersStart,this.scope.headersDepth,this.scope.anchors)}await super.afterBind()}requiredAttributes(){return["headersStart","headersDepth","headerParentSelector"]}async attributeChangedCallback(e,s,i,r){super.attributeChangedCallback(e,s,i,r)}disconnectedCallback(){super.disconnectedCallback(),this.scope.anchors=[]}async template(){if(ne(this))return null;{const{default:e}=await Ws(()=>import("./bs5-contents.component-9014ea28.chunk.js"),[]);return e}}};let Ss=zr;a(Ss,"tagName","bs5-contents");const qr=class extends H{constructor(){super();a(this,"_debug",!1);a(this,"autobind",!0);a(this,"formEl",null);a(this,"scope",this.getDefaultScope());this.enableSubmit=this.enableSubmit.bind(this)}static get observedAttributes(){return["id","disable-submit-until-change","use-ajax","ajax-request-type","auto-set-form-data","strip-html","scroll-invalid-element","animate-invalid-element"]}getDefaultScope(){return{id:el("form"),form:{fields:{},valid:!1,error:void 0},disableSubmitUntilChange:!1,submitDisabled:!1,onSubmit:this.onSubmit,useAjax:!0,ajaxRequestType:"form",autoSetFormData:!0,stripHtml:!0,scrollToInvalidElement:!0,animateInvalidElement:!0}}connectedCallback(){super.connectedCallback(),this.init(qr.observedAttributes),this.addEventListeners()}addEventListeners(){this.scope.disableSubmitUntilChange&&this.addEventListener("input",this.enableSubmit)}removeEventListeners(){this.removeEventListener("input",this.enableSubmit)}enableSubmit(){this.scope.submitDisabled=!1}requiredAttributes(){return[]}async beforeBind(){await super.beforeBind(),this.id=this.scope.id}async afterBind(){await super.afterBind()}stripHtml(){for(const e in this.scope.form.fields)this.scope.form.fields[e]&&typeof this.scope.form.fields[e]=="string"&&(this.scope.form.fields[e]=Ri(this.scope.form.fields[e]))}onSubmit(e,s){if(this.debug("onSubmit",e,s),!this.formEl)return console.warn("No form found"),!1;if(this.scope.autoSetFormData&&this.getFormValues(),this.scope.stripHtml&&this.stripHtml(),this.validate(this.formEl,this.scope.form),!this.scope.form.valid){this.onInvalidForm(e);return}const i=this.getSubmitSettings(e);if((i==null?void 0:i.target)==="_blank")return!0;this.scope.useAjax&&(e.preventDefault(),e.stopPropagation(),this.ajaxSubmit(e,s))}async ajaxSubmit(e,s){this.debug("onSubmit",e,s,this.scope);const i=this.getSubmitSettings(e);if(!i){console.warn("Can't get submit settings");return}this.scope.autoSetFormData&&this.getFormValues();try{const r=await es.fetch(i.action,i.method,this.scope.form.fields,i.type);if(!r||!r.body)return this.onErrorSubmit("500","Error","Empty body!");const o=r.body&&r.body.message?r.body.message:"";return Number(r.status)>=400&&this.onErrorSubmit(r.status.toString(),o,r.body),this.onSuccessSubmit(r.status.toString(),o,r.body)}catch(r){if(r.status&&r.body)this.onErrorSubmit(r.status,r.body.message,r.body);else throw this.error}}getSubmitSettings(e){var l,c;if(!this.formEl)return console.warn("No form found"),null;let s=this.formEl.action,i=this.formEl.method,r=this.formEl.method;if((l=e==null?void 0:e.originalEvent)!=null&&l.submitter){const h=(c=e==null?void 0:e.originalEvent)==null?void 0:c.submitter;s=(h==null?void 0:h.formAction)||s,i=(h==null?void 0:h.formMethod)||i,r=(h==null?void 0:h.formTarget)||r}return{action:s,method:i.toUpperCase(),target:r,type:this.scope.ajaxRequestType}}onInvalidForm(e){if(this.debug("Form not valid",this.scope),e.preventDefault(),e.stopPropagation(),!this.formEl){console.warn("No form found");return}const s=this.formEl.querySelectorAll(":invalid");if(s&&s.length){const i=s[0];this.scope.scrollToInvalidElement&&this.scrollToElement(i),this.scope.animateInvalidElement&&this.scrollToElement(i)}this.dispatchEvent(new CustomEvent("invalid",{detail:{elements:s}}))}scrollToElement(e){const i=ur().h/2;Zt(e,i,window),this.animateInvalidElement(e)}animateInvalidElement(e,s=3e3){e.classList.add("invalid-flashing-animation"),setTimeout(()=>{e.classList.remove("invalid-flashing-animation")},s)}onErrorSubmit(e,s,i){this.debug("onErrorSubmit"),this.dispatchEvent(new CustomEvent("submit-error",{detail:{status:e,message:s,response:i}}))}onSuccessSubmit(e,s,i){this.debug("onSuccessSubmit"),this.scope.disableSubmitUntilChange&&(this.scope.submitDisabled=!0),this.dispatchEvent(new CustomEvent("submit-success",{detail:{status:e,message:s,response:i}}))}validate(e,s,i="validation-error"){s.valid=e.checkValidity(),s.error=e.validationMessage,s.valid||(this.dispatchEvent(new CustomEvent(i)),e.classList.add("was-validated"))}getFormValues(){return this.formEl?(this.scope.form.fields=new FormData(this.formEl),this.scope.form.fields):(console.warn("No form found"),null)}initForm(){const e=this.querySelector("form");e&&e.length>0?(this.formEl=e,this.formEl.classList.add("needs-validation"),this.formEl.setAttribute("novalidate","")):console.warn("bs5 form without children found")}async template(){if(ne(this))return this.initForm(),null;{const{default:e}=await Ws(()=>import("./bs5-form.component-56e21618.chunk.js"),[]);return e}}};let gi=qr;a(gi,"tagName","bs5-form");const Ls=class extends pr{constructor(){super();a(this,"scope",{})}static get observedAttributes(){return["size","width","height","src","color","direction","alt"]}getSvg(){return this.querySelector("svg")}async fetchCached(e){let s=Ls.cache.get(e);return s||(s=es.get(e),s&&Ls.cache.set(e,s),s)}async fetchIcon(e){var i;let s;if(window!=null&&window.ssr&&!e.startsWith("http")&&!e.startsWith("ftp")&&!e.startsWith("sftp")){let r;if(window.ssr.env.NEST_INTERN_URL)r=new URL(e,window.ssr.env.NEST_INTERN_URL);else if(window.ssr.ctx)r=new URL(e,window.ssr.ctx.protocol+"://"+window.ssr.ctx.hostname);else throw new Error("Host for SSR not found!");s=await this.fetchCached(r.href)}else s=await this.fetchCached(e);return s.status!==200?(console.error(s.status),""):(i=s.headers.get("content-type"))!=null&&i.includes("image/svg+xml")?s.body:(console.error("[bs5-icon] Only SVG's are supported! But content-type is "+s.headers.get("content-type")),"")}getBasename(e){const s=Pe(e).pathname.split("/");return s==null?void 0:s[s.length-1]}getAlternativeText(e){var i;return(i=this.getBasename(e).split(".")[0])==null?void 0:i.replaceAll("_"," ")}async onSrcChanged(){let e="";if(!this.scope.src){this.innerHTML="";return}const s=this.getAlternativeText(this.scope.src);s&&this.setAttribute("alt",s);const i=this.getSvg();if((i?i.getAttribute("src"):"")===this.scope.src)return;try{e=await this.fetchIcon(this.scope.src)}catch(l){console.warn(`Error on fetch icon "${this.scope.src}"! Try to switch the protocol...`,l),this.scope.src.startsWith("//")&&(this.scope.src=location.protocol+this.scope.src);const c=new URL(this.scope.src);c.protocol==="http:"?c.protocol="https:":c.protocol="http:";try{e=await this.fetchIcon(c.href)}catch(h){console.error(`Error on fetch icon "${this.scope.src}"!`,l,h);return}}if(!e){console.error(`Error on fetch icon "${this.scope.src}"!`);return}this.innerHTML=e;const o=this.getSvg();o&&o.setAttribute("src",this.scope.src)}removeColor(){this.className=this.className.replace(/(^|\s)color-\S+/g,""),this.style.color=""}setColor(e){if(!e)return this.removeColor();if(e.includes(",")){const s=e.split(",");if(s.length>0){this.className=this.className.replace(/(^|\s)color-\S+/g,"");for(let i=0;i + */const ze=new Map,fn={set(n,t,e){ze.has(n)||ze.set(n,new Map);const s=ze.get(n);if(!s.has(t)&&s.size!==0){console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(s.keys())[0]}.`);return}s.set(t,e)},get(n,t){return ze.has(n)&&ze.get(n).get(t)||null},remove(n,t){if(!ze.has(n))return;const e=ze.get(n);e.delete(t),e.size===0&&ze.delete(n)}},df=1e6,uf=1e3,zn="transitionend",hc=n=>(n&&window.CSS&&window.CSS.escape&&(n=n.replace(/#([^\s"#']+)/g,(t,e)=>`#${CSS.escape(e)}`)),n),pf=n=>n==null?`${n}`:Object.prototype.toString.call(n).match(/\s([a-z]+)/i)[1].toLowerCase(),ff=n=>{do n+=Math.floor(Math.random()*df);while(document.getElementById(n));return n},mf=n=>{if(!n)return 0;let{transitionDuration:t,transitionDelay:e}=window.getComputedStyle(n);const s=Number.parseFloat(t),i=Number.parseFloat(e);return!s&&!i?0:(t=t.split(",")[0],e=e.split(",")[0],(Number.parseFloat(t)+Number.parseFloat(e))*uf)},dc=n=>{n.dispatchEvent(new Event(zn))},Fe=n=>!n||typeof n!="object"?!1:(typeof n.jquery<"u"&&(n=n[0]),typeof n.nodeType<"u"),Ze=n=>Fe(n)?n.jquery?n[0]:n:typeof n=="string"&&n.length>0?document.querySelector(hc(n)):null,Zt=n=>{if(!Fe(n)||n.getClientRects().length===0)return!1;const t=getComputedStyle(n).getPropertyValue("visibility")==="visible",e=n.closest("details:not([open])");if(!e)return t;if(e!==n){const s=n.closest("summary");if(s&&s.parentNode!==e||s===null)return!1}return t},et=n=>!n||n.nodeType!==Node.ELEMENT_NODE||n.classList.contains("disabled")?!0:typeof n.disabled<"u"?n.disabled:n.hasAttribute("disabled")&&n.getAttribute("disabled")!=="false",uc=n=>{if(!document.documentElement.attachShadow)return null;if(typeof n.getRootNode=="function"){const t=n.getRootNode();return t instanceof ShadowRoot?t:null}return n instanceof ShadowRoot?n:n.parentNode?uc(n.parentNode):null},Di=()=>{},xs=n=>{n.offsetHeight},pc=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,mn=[],gf=n=>{document.readyState==="loading"?(mn.length||document.addEventListener("DOMContentLoaded",()=>{for(const t of mn)t()}),mn.push(n)):n()},ve=()=>document.documentElement.dir==="rtl",Ee=n=>{gf(()=>{const t=pc();if(t){const e=n.NAME,s=t.fn[e];t.fn[e]=n.jQueryInterface,t.fn[e].Constructor=n,t.fn[e].noConflict=()=>(t.fn[e]=s,n.jQueryInterface)}})},le=(n,t=[],e=n)=>typeof n=="function"?n(...t):e,fc=(n,t,e=!0)=>{if(!e){le(n);return}const s=5,i=mf(t)+s;let r=!1;const o=({target:l})=>{l===t&&(r=!0,t.removeEventListener(zn,o),le(n))};t.addEventListener(zn,o),setTimeout(()=>{r||dc(t)},i)},Ar=(n,t,e,s)=>{const i=n.length;let r=n.indexOf(t);return r===-1?!e&&s?n[i-1]:n[0]:(r+=e?1:-1,s&&(r=(r+i)%i),n[Math.max(0,Math.min(r,i-1))])},vf=/[^.]*(?=\..*)\.|.*/,bf=/\..*/,Ef=/::\d+$/,gn={};let Bo=1;const mc={mouseenter:"mouseover",mouseleave:"mouseout"},yf=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function gc(n,t){return t&&`${t}::${Bo++}`||n.uidEvent||Bo++}function vc(n){const t=gc(n);return n.uidEvent=t,gn[t]=gn[t]||{},gn[t]}function wf(n,t){return function e(s){return Tr(s,{delegateTarget:n}),e.oneOff&&g.off(n,s.type,t),t.apply(n,[s])}}function _f(n,t,e){return function s(i){const r=n.querySelectorAll(t);for(let{target:o}=i;o&&o!==this;o=o.parentNode)for(const l of r)if(l===o)return Tr(i,{delegateTarget:o}),s.oneOff&&g.off(n,i.type,t,e),e.apply(o,[i])}}function bc(n,t,e=null){return Object.values(n).find(s=>s.callable===t&&s.delegationSelector===e)}function Ec(n,t,e){const s=typeof t=="string",i=s?e:t||e;let r=yc(n);return yf.has(r)||(r=n),[s,i,r]}function Fo(n,t,e,s,i){if(typeof t!="string"||!n)return;let[r,o,l]=Ec(t,e,s);t in mc&&(o=(m=>function(v){if(!v.relatedTarget||v.relatedTarget!==v.delegateTarget&&!v.delegateTarget.contains(v.relatedTarget))return m.call(this,v)})(o));const c=vc(n),h=c[l]||(c[l]={}),d=bc(h,o,r?e:null);if(d){d.oneOff=d.oneOff&&i;return}const u=gc(o,t.replace(vf,"")),p=r?_f(n,e,o):wf(n,o);p.delegationSelector=r?e:null,p.callable=o,p.oneOff=i,p.uidEvent=u,h[u]=p,n.addEventListener(l,p,r)}function qn(n,t,e,s,i){const r=bc(t[e],s,i);r&&(n.removeEventListener(e,r,!!i),delete t[e][r.uidEvent])}function Sf(n,t,e,s){const i=t[e]||{};for(const[r,o]of Object.entries(i))r.includes(s)&&qn(n,t,e,o.callable,o.delegationSelector)}function yc(n){return n=n.replace(bf,""),mc[n]||n}const g={on(n,t,e,s){Fo(n,t,e,s,!1)},one(n,t,e,s){Fo(n,t,e,s,!0)},off(n,t,e,s){if(typeof t!="string"||!n)return;const[i,r,o]=Ec(t,e,s),l=o!==t,c=vc(n),h=c[o]||{},d=t.startsWith(".");if(typeof r<"u"){if(!Object.keys(h).length)return;qn(n,c,o,r,i?e:null);return}if(d)for(const u of Object.keys(c))Sf(n,c,u,t.slice(1));for(const[u,p]of Object.entries(h)){const f=u.replace(Ef,"");(!l||t.includes(f))&&qn(n,c,o,p.callable,p.delegationSelector)}},trigger(n,t,e){if(typeof t!="string"||!n)return null;const s=pc(),i=yc(t),r=t!==i;let o=null,l=!0,c=!0,h=!1;r&&s&&(o=s.Event(t,e),s(n).trigger(o),l=!o.isPropagationStopped(),c=!o.isImmediatePropagationStopped(),h=o.isDefaultPrevented());const d=Tr(new Event(t,{bubbles:l,cancelable:!0}),e);return h&&d.preventDefault(),c&&n.dispatchEvent(d),d.defaultPrevented&&o&&o.preventDefault(),d}};function Tr(n,t={}){for(const[e,s]of Object.entries(t))try{n[e]=s}catch{Object.defineProperty(n,e,{configurable:!0,get(){return s}})}return n}function Ho(n){if(n==="true")return!0;if(n==="false")return!1;if(n===Number(n).toString())return Number(n);if(n===""||n==="null")return null;if(typeof n!="string")return n;try{return JSON.parse(decodeURIComponent(n))}catch{return n}}function vn(n){return n.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)}const He={setDataAttribute(n,t,e){n.setAttribute(`data-bs-${vn(t)}`,e)},removeDataAttribute(n,t){n.removeAttribute(`data-bs-${vn(t)}`)},getDataAttributes(n){if(!n)return{};const t={},e=Object.keys(n.dataset).filter(s=>s.startsWith("bs")&&!s.startsWith("bsConfig"));for(const s of e){let i=s.replace(/^bs/,"");i=i.charAt(0).toLowerCase()+i.slice(1,i.length),t[i]=Ho(n.dataset[s])}return t},getDataAttribute(n,t){return Ho(n.getAttribute(`data-bs-${vn(t)}`))}};let Is=class{static get Default(){return{}}static get DefaultType(){return{}}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}_getConfig(t){return t=this._mergeConfigObj(t),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}_configAfterMerge(t){return t}_mergeConfigObj(t,e){const s=Fe(e)?He.getDataAttribute(e,"config"):{};return{...this.constructor.Default,...typeof s=="object"?s:{},...Fe(e)?He.getDataAttributes(e):{},...typeof t=="object"?t:{}}}_typeCheckConfig(t,e=this.constructor.DefaultType){for(const[s,i]of Object.entries(e)){const r=t[s],o=Fe(r)?"element":pf(r);if(!new RegExp(i).test(o))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${s}" provided type "${o}" but expected type "${i}".`)}}};const Af="5.3.0";class Se extends Is{constructor(t,e){super(),t=Ze(t),t&&(this._element=t,this._config=this._getConfig(e),fn.set(this._element,this.constructor.DATA_KEY,this))}dispose(){fn.remove(this._element,this.constructor.DATA_KEY),g.off(this._element,this.constructor.EVENT_KEY);for(const t of Object.getOwnPropertyNames(this))this[t]=null}_queueCallback(t,e,s=!0){fc(t,e,s)}_getConfig(t){return t=this._mergeConfigObj(t,this._element),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}static getInstance(t){return fn.get(Ze(t),this.DATA_KEY)}static getOrCreateInstance(t,e={}){return this.getInstance(t)||new this(t,typeof e=="object"?e:null)}static get VERSION(){return Af}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(t){return`${t}${this.EVENT_KEY}`}}const bn=n=>{let t=n.getAttribute("data-bs-target");if(!t||t==="#"){let e=n.getAttribute("href");if(!e||!e.includes("#")&&!e.startsWith("."))return null;e.includes("#")&&!e.startsWith("#")&&(e=`#${e.split("#")[1]}`),t=e&&e!=="#"?e.trim():null}return hc(t)},T={find(n,t=document.documentElement){return[].concat(...Element.prototype.querySelectorAll.call(t,n))},findOne(n,t=document.documentElement){return Element.prototype.querySelector.call(t,n)},children(n,t){return[].concat(...n.children).filter(e=>e.matches(t))},parents(n,t){const e=[];let s=n.parentNode.closest(t);for(;s;)e.push(s),s=s.parentNode.closest(t);return e},prev(n,t){let e=n.previousElementSibling;for(;e;){if(e.matches(t))return[e];e=e.previousElementSibling}return[]},next(n,t){let e=n.nextElementSibling;for(;e;){if(e.matches(t))return[e];e=e.nextElementSibling}return[]},focusableChildren(n){const t=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map(e=>`${e}:not([tabindex^="-"])`).join(",");return this.find(t,n).filter(e=>!et(e)&&Zt(e))},getSelectorFromElement(n){const t=bn(n);return t&&T.findOne(t)?t:null},getElementFromSelector(n){const t=bn(n);return t?T.findOne(t):null},getMultipleElementsFromSelector(n){const t=bn(n);return t?T.find(t):[]}},tn=(n,t="hide")=>{const e=`click.dismiss${n.EVENT_KEY}`,s=n.NAME;g.on(document,e,`[data-bs-dismiss="${s}"]`,function(i){if(["A","AREA"].includes(this.tagName)&&i.preventDefault(),et(this))return;const r=T.getElementFromSelector(this)||this.closest(`.${s}`);n.getOrCreateInstance(r)[t]()})},Tf="alert",Cf="bs.alert",wc=`.${Cf}`,Lf=`close${wc}`,kf=`closed${wc}`,xf="fade",If="show";class sn extends Se{static get NAME(){return Tf}close(){if(g.trigger(this._element,Lf).defaultPrevented)return;this._element.classList.remove(If);const e=this._element.classList.contains(xf);this._queueCallback(()=>this._destroyElement(),this._element,e)}_destroyElement(){this._element.remove(),g.trigger(this._element,kf),this.dispose()}static jQueryInterface(t){return this.each(function(){const e=sn.getOrCreateInstance(this);if(typeof t=="string"){if(e[t]===void 0||t.startsWith("_")||t==="constructor")throw new TypeError(`No method named "${t}"`);e[t](this)}})}}tn(sn,"close");Ee(sn);const Nf="button",Of="bs.button",Pf=`.${Of}`,Df=".data-api",Mf="active",Vo='[data-bs-toggle="button"]',Rf=`click${Pf}${Df}`;class nn extends Se{static get NAME(){return Nf}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle(Mf))}static jQueryInterface(t){return this.each(function(){const e=nn.getOrCreateInstance(this);t==="toggle"&&e[t]()})}}g.on(document,Rf,Vo,n=>{n.preventDefault();const t=n.target.closest(Vo);nn.getOrCreateInstance(t).toggle()});Ee(nn);const $f="swipe",es=".bs.swipe",Bf=`touchstart${es}`,Ff=`touchmove${es}`,Hf=`touchend${es}`,Vf=`pointerdown${es}`,Uf=`pointerup${es}`,jf="touch",Wf="pen",zf="pointer-event",qf=40,Qf={endCallback:null,leftCallback:null,rightCallback:null},Yf={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"};class Mi extends Is{constructor(t,e){super(),this._element=t,!(!t||!Mi.isSupported())&&(this._config=this._getConfig(e),this._deltaX=0,this._supportPointerEvents=!!window.PointerEvent,this._initEvents())}static get Default(){return Qf}static get DefaultType(){return Yf}static get NAME(){return $f}dispose(){g.off(this._element,es)}_start(t){if(!this._supportPointerEvents){this._deltaX=t.touches[0].clientX;return}this._eventIsPointerPenTouch(t)&&(this._deltaX=t.clientX)}_end(t){this._eventIsPointerPenTouch(t)&&(this._deltaX=t.clientX-this._deltaX),this._handleSwipe(),le(this._config.endCallback)}_move(t){this._deltaX=t.touches&&t.touches.length>1?0:t.touches[0].clientX-this._deltaX}_handleSwipe(){const t=Math.abs(this._deltaX);if(t<=qf)return;const e=t/this._deltaX;this._deltaX=0,e&&le(e>0?this._config.rightCallback:this._config.leftCallback)}_initEvents(){this._supportPointerEvents?(g.on(this._element,Vf,t=>this._start(t)),g.on(this._element,Uf,t=>this._end(t)),this._element.classList.add(zf)):(g.on(this._element,Bf,t=>this._start(t)),g.on(this._element,Ff,t=>this._move(t)),g.on(this._element,Hf,t=>this._end(t)))}_eventIsPointerPenTouch(t){return this._supportPointerEvents&&(t.pointerType===Wf||t.pointerType===jf)}static isSupported(){return"ontouchstart"in document.documentElement||navigator.maxTouchPoints>0}}const Kf="carousel",Gf="bs.carousel",it=`.${Gf}`,_c=".data-api",Xf="ArrowLeft",Jf="ArrowRight",Zf=500,ns="next",Tt="prev",xt="left",ei="right",em=`slide${it}`,En=`slid${it}`,tm=`keydown${it}`,sm=`mouseenter${it}`,im=`mouseleave${it}`,nm=`dragstart${it}`,rm=`load${it}${_c}`,om=`click${it}${_c}`,Sc="carousel",Hs="active",am="slide",lm="carousel-item-end",cm="carousel-item-start",hm="carousel-item-next",dm="carousel-item-prev",Ac=".active",Tc=".carousel-item",um=Ac+Tc,pm=".carousel-item img",fm=".carousel-indicators",mm="[data-bs-slide], [data-bs-slide-to]",gm='[data-bs-ride="carousel"]',vm={[Xf]:ei,[Jf]:xt},bm={interval:5e3,keyboard:!0,pause:"hover",ride:!1,touch:!0,wrap:!0},Em={interval:"(number|boolean)",keyboard:"boolean",pause:"(string|boolean)",ride:"(boolean|string)",touch:"boolean",wrap:"boolean"};let rn=class Cc extends Se{constructor(t,e){super(t,e),this._interval=null,this._activeElement=null,this._isSliding=!1,this.touchTimeout=null,this._swipeHelper=null,this._indicatorsElement=T.findOne(fm,this._element),this._addEventListeners(),this._config.ride===Sc&&this.cycle()}static get Default(){return bm}static get DefaultType(){return Em}static get NAME(){return Kf}next(){this._slide(ns)}nextWhenVisible(){!document.hidden&&Zt(this._element)&&this.next()}prev(){this._slide(Tt)}pause(){this._isSliding&&dc(this._element),this._clearInterval()}cycle(){this._clearInterval(),this._updateInterval(),this._interval=setInterval(()=>this.nextWhenVisible(),this._config.interval)}_maybeEnableCycle(){if(this._config.ride){if(this._isSliding){g.one(this._element,En,()=>this.cycle());return}this.cycle()}}to(t){const e=this._getItems();if(t>e.length-1||t<0)return;if(this._isSliding){g.one(this._element,En,()=>this.to(t));return}const s=this._getItemIndex(this._getActive());if(s===t)return;const i=t>s?ns:Tt;this._slide(i,e[t])}dispose(){this._swipeHelper&&this._swipeHelper.dispose(),super.dispose()}_configAfterMerge(t){return t.defaultInterval=t.interval,t}_addEventListeners(){this._config.keyboard&&g.on(this._element,tm,t=>this._keydown(t)),this._config.pause==="hover"&&(g.on(this._element,sm,()=>this.pause()),g.on(this._element,im,()=>this._maybeEnableCycle())),this._config.touch&&Mi.isSupported()&&this._addTouchEventListeners()}_addTouchEventListeners(){for(const s of T.find(pm,this._element))g.on(s,nm,i=>i.preventDefault());const e={leftCallback:()=>this._slide(this._directionToOrder(xt)),rightCallback:()=>this._slide(this._directionToOrder(ei)),endCallback:()=>{this._config.pause==="hover"&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout(()=>this._maybeEnableCycle(),Zf+this._config.interval))}};this._swipeHelper=new Mi(this._element,e)}_keydown(t){if(/input|textarea/i.test(t.target.tagName))return;const e=vm[t.key];e&&(t.preventDefault(),this._slide(this._directionToOrder(e)))}_getItemIndex(t){return this._getItems().indexOf(t)}_setActiveIndicatorElement(t){if(!this._indicatorsElement)return;const e=T.findOne(Ac,this._indicatorsElement);e.classList.remove(Hs),e.removeAttribute("aria-current");const s=T.findOne(`[data-bs-slide-to="${t}"]`,this._indicatorsElement);s&&(s.classList.add(Hs),s.setAttribute("aria-current","true"))}_updateInterval(){const t=this._activeElement||this._getActive();if(!t)return;const e=Number.parseInt(t.getAttribute("data-bs-interval"),10);this._config.interval=e||this._config.defaultInterval}_slide(t,e=null){if(this._isSliding)return;const s=this._getActive(),i=t===ns,r=e||Ar(this._getItems(),s,i,this._config.wrap);if(r===s)return;const o=this._getItemIndex(r),l=f=>g.trigger(this._element,f,{relatedTarget:r,direction:this._orderToDirection(t),from:this._getItemIndex(s),to:o});if(l(em).defaultPrevented||!s||!r)return;const h=!!this._interval;this.pause(),this._isSliding=!0,this._setActiveIndicatorElement(o),this._activeElement=r;const d=i?cm:lm,u=i?hm:dm;r.classList.add(u),xs(r),s.classList.add(d),r.classList.add(d);const p=()=>{r.classList.remove(d,u),r.classList.add(Hs),s.classList.remove(Hs,u,d),this._isSliding=!1,l(En)};this._queueCallback(p,s,this._isAnimated()),h&&this.cycle()}_isAnimated(){return this._element.classList.contains(am)}_getActive(){return T.findOne(um,this._element)}_getItems(){return T.find(Tc,this._element)}_clearInterval(){this._interval&&(clearInterval(this._interval),this._interval=null)}_directionToOrder(t){return ve()?t===xt?Tt:ns:t===xt?ns:Tt}_orderToDirection(t){return ve()?t===Tt?xt:ei:t===Tt?ei:xt}static jQueryInterface(t){return this.each(function(){const e=Cc.getOrCreateInstance(this,t);if(typeof t=="number"){e.to(t);return}if(typeof t=="string"){if(e[t]===void 0||t.startsWith("_")||t==="constructor")throw new TypeError(`No method named "${t}"`);e[t]()}})}};g.on(document,om,mm,function(n){const t=T.getElementFromSelector(this);if(!t||!t.classList.contains(Sc))return;n.preventDefault();const e=rn.getOrCreateInstance(t),s=this.getAttribute("data-bs-slide-to");if(s){e.to(s),e._maybeEnableCycle();return}if(He.getDataAttribute(this,"slide")==="next"){e.next(),e._maybeEnableCycle();return}e.prev(),e._maybeEnableCycle()});g.on(window,rm,()=>{const n=T.find(gm);for(const t of n)rn.getOrCreateInstance(t)});Ee(rn);const ym="collapse",wm="bs.collapse",Ns=`.${wm}`,_m=".data-api",Sm=`show${Ns}`,Am=`shown${Ns}`,Tm=`hide${Ns}`,Cm=`hidden${Ns}`,Lm=`click${Ns}${_m}`,yn="show",Nt="collapse",Vs="collapsing",km="collapsed",xm=`:scope .${Nt} .${Nt}`,Im="collapse-horizontal",Nm="width",Om="height",Pm=".collapse.show, .collapse.collapsing",Qn='[data-bs-toggle="collapse"]',Dm={parent:null,toggle:!0},Mm={parent:"(null|element)",toggle:"boolean"};let Cr=class Yn extends Se{constructor(t,e){super(t,e),this._isTransitioning=!1,this._triggerArray=[];const s=T.find(Qn);for(const i of s){const r=T.getSelectorFromElement(i),o=T.find(r).filter(l=>l===this._element);r!==null&&o.length&&this._triggerArray.push(i)}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return Dm}static get DefaultType(){return Mm}static get NAME(){return ym}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let t=[];if(this._config.parent&&(t=this._getFirstLevelChildren(Pm).filter(l=>l!==this._element).map(l=>Yn.getOrCreateInstance(l,{toggle:!1}))),t.length&&t[0]._isTransitioning||g.trigger(this._element,Sm).defaultPrevented)return;for(const l of t)l.hide();const s=this._getDimension();this._element.classList.remove(Nt),this._element.classList.add(Vs),this._element.style[s]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const i=()=>{this._isTransitioning=!1,this._element.classList.remove(Vs),this._element.classList.add(Nt,yn),this._element.style[s]="",g.trigger(this._element,Am)},o=`scroll${s[0].toUpperCase()+s.slice(1)}`;this._queueCallback(i,this._element,!0),this._element.style[s]=`${this._element[o]}px`}hide(){if(this._isTransitioning||!this._isShown()||g.trigger(this._element,Tm).defaultPrevented)return;const e=this._getDimension();this._element.style[e]=`${this._element.getBoundingClientRect()[e]}px`,xs(this._element),this._element.classList.add(Vs),this._element.classList.remove(Nt,yn);for(const i of this._triggerArray){const r=T.getElementFromSelector(i);r&&!this._isShown(r)&&this._addAriaAndCollapsedClass([i],!1)}this._isTransitioning=!0;const s=()=>{this._isTransitioning=!1,this._element.classList.remove(Vs),this._element.classList.add(Nt),g.trigger(this._element,Cm)};this._element.style[e]="",this._queueCallback(s,this._element,!0)}_isShown(t=this._element){return t.classList.contains(yn)}_configAfterMerge(t){return t.toggle=!!t.toggle,t.parent=Ze(t.parent),t}_getDimension(){return this._element.classList.contains(Im)?Nm:Om}_initializeChildren(){if(!this._config.parent)return;const t=this._getFirstLevelChildren(Qn);for(const e of t){const s=T.getElementFromSelector(e);s&&this._addAriaAndCollapsedClass([e],this._isShown(s))}}_getFirstLevelChildren(t){const e=T.find(xm,this._config.parent);return T.find(t,this._config.parent).filter(s=>!e.includes(s))}_addAriaAndCollapsedClass(t,e){if(t.length)for(const s of t)s.classList.toggle(km,!e),s.setAttribute("aria-expanded",e)}static jQueryInterface(t){const e={};return typeof t=="string"&&/show|hide/.test(t)&&(e.toggle=!1),this.each(function(){const s=Yn.getOrCreateInstance(this,e);if(typeof t=="string"){if(typeof s[t]>"u")throw new TypeError(`No method named "${t}"`);s[t]()}})}};g.on(document,Lm,Qn,function(n){(n.target.tagName==="A"||n.delegateTarget&&n.delegateTarget.tagName==="A")&&n.preventDefault();for(const t of T.getMultipleElementsFromSelector(this))Cr.getOrCreateInstance(t,{toggle:!1}).toggle()});Ee(Cr);const Uo="dropdown",Rm="bs.dropdown",_t=`.${Rm}`,Lr=".data-api",$m="Escape",jo="Tab",Bm="ArrowUp",Wo="ArrowDown",Fm=2,Hm=`hide${_t}`,Vm=`hidden${_t}`,Um=`show${_t}`,jm=`shown${_t}`,Lc=`click${_t}${Lr}`,kc=`keydown${_t}${Lr}`,Wm=`keyup${_t}${Lr}`,It="show",zm="dropup",qm="dropend",Qm="dropstart",Ym="dropup-center",Km="dropdown-center",ut='[data-bs-toggle="dropdown"]:not(.disabled):not(:disabled)',Gm=`${ut}.${It}`,ti=".dropdown-menu",Xm=".navbar",Jm=".navbar-nav",Zm=".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",eg=ve()?"top-end":"top-start",tg=ve()?"top-start":"top-end",sg=ve()?"bottom-end":"bottom-start",ig=ve()?"bottom-start":"bottom-end",ng=ve()?"left-start":"right-start",rg=ve()?"right-start":"left-start",og="top",ag="bottom",lg={autoClose:!0,boundary:"clippingParents",display:"dynamic",offset:[0,2],popperConfig:null,reference:"toggle"},cg={autoClose:"(boolean|string)",boundary:"(string|element)",display:"string",offset:"(array|string|function)",popperConfig:"(null|object|function)",reference:"(string|element|object)"};let St=class si extends Se{constructor(t,e){super(t,e),this._popper=null,this._parent=this._element.parentNode,this._menu=T.next(this._element,ti)[0]||T.prev(this._element,ti)[0]||T.findOne(ti,this._parent),this._inNavbar=this._detectNavbar()}static get Default(){return lg}static get DefaultType(){return cg}static get NAME(){return Uo}toggle(){return this._isShown()?this.hide():this.show()}show(){if(et(this._element)||this._isShown())return;const t={relatedTarget:this._element};if(!g.trigger(this._element,Um,t).defaultPrevented){if(this._createPopper(),"ontouchstart"in document.documentElement&&!this._parent.closest(Jm))for(const s of[].concat(...document.body.children))g.on(s,"mouseover",Di);this._element.focus(),this._element.setAttribute("aria-expanded",!0),this._menu.classList.add(It),this._element.classList.add(It),g.trigger(this._element,jm,t)}}hide(){if(et(this._element)||!this._isShown())return;const t={relatedTarget:this._element};this._completeHide(t)}dispose(){this._popper&&this._popper.destroy(),super.dispose()}update(){this._inNavbar=this._detectNavbar(),this._popper&&this._popper.update()}_completeHide(t){if(!g.trigger(this._element,Hm,t).defaultPrevented){if("ontouchstart"in document.documentElement)for(const s of[].concat(...document.body.children))g.off(s,"mouseover",Di);this._popper&&this._popper.destroy(),this._menu.classList.remove(It),this._element.classList.remove(It),this._element.setAttribute("aria-expanded","false"),He.removeDataAttribute(this._menu,"popper"),g.trigger(this._element,Vm,t)}}_getConfig(t){if(t=super._getConfig(t),typeof t.reference=="object"&&!Fe(t.reference)&&typeof t.reference.getBoundingClientRect!="function")throw new TypeError(`${Uo.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);return t}_createPopper(){if(typeof cc>"u")throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org)");let t=this._element;this._config.reference==="parent"?t=this._parent:Fe(this._config.reference)?t=Ze(this._config.reference):typeof this._config.reference=="object"&&(t=this._config.reference);const e=this._getPopperConfig();this._popper=en(t,this._menu,e)}_isShown(){return this._menu.classList.contains(It)}_getPlacement(){const t=this._parent;if(t.classList.contains(qm))return ng;if(t.classList.contains(Qm))return rg;if(t.classList.contains(Ym))return og;if(t.classList.contains(Km))return ag;const e=getComputedStyle(this._menu).getPropertyValue("--bs-position").trim()==="end";return t.classList.contains(zm)?e?tg:eg:e?ig:sg}_detectNavbar(){return this._element.closest(Xm)!==null}_getOffset(){const{offset:t}=this._config;return typeof t=="string"?t.split(",").map(e=>Number.parseInt(e,10)):typeof t=="function"?e=>t(e,this._element):t}_getPopperConfig(){const t={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return(this._inNavbar||this._config.display==="static")&&(He.setDataAttribute(this._menu,"popper","static"),t.modifiers=[{name:"applyStyles",enabled:!1}]),{...t,...le(this._config.popperConfig,[t])}}_selectMenuItem({key:t,target:e}){const s=T.find(Zm,this._menu).filter(i=>Zt(i));s.length&&Ar(s,e,t===Wo,!s.includes(e)).focus()}static jQueryInterface(t){return this.each(function(){const e=si.getOrCreateInstance(this,t);if(typeof t=="string"){if(typeof e[t]>"u")throw new TypeError(`No method named "${t}"`);e[t]()}})}static clearMenus(t){if(t.button===Fm||t.type==="keyup"&&t.key!==jo)return;const e=T.find(Gm);for(const s of e){const i=si.getInstance(s);if(!i||i._config.autoClose===!1)continue;const r=t.composedPath(),o=r.includes(i._menu);if(r.includes(i._element)||i._config.autoClose==="inside"&&!o||i._config.autoClose==="outside"&&o||i._menu.contains(t.target)&&(t.type==="keyup"&&t.key===jo||/input|select|option|textarea|form/i.test(t.target.tagName)))continue;const l={relatedTarget:i._element};t.type==="click"&&(l.clickEvent=t),i._completeHide(l)}}static dataApiKeydownHandler(t){const e=/input|textarea/i.test(t.target.tagName),s=t.key===$m,i=[Bm,Wo].includes(t.key);if(!i&&!s||e&&!s)return;t.preventDefault();const r=this.matches(ut)?this:T.prev(this,ut)[0]||T.next(this,ut)[0]||T.findOne(ut,t.delegateTarget.parentNode),o=si.getOrCreateInstance(r);if(i){t.stopPropagation(),o.show(),o._selectMenuItem(t);return}o._isShown()&&(t.stopPropagation(),o.hide(),r.focus())}};g.on(document,kc,ut,St.dataApiKeydownHandler);g.on(document,kc,ti,St.dataApiKeydownHandler);g.on(document,Lc,St.clearMenus);g.on(document,Wm,St.clearMenus);g.on(document,Lc,ut,function(n){n.preventDefault(),St.getOrCreateInstance(this).toggle()});Ee(St);const xc="backdrop",hg="fade",zo="show",qo=`mousedown.bs.${xc}`,dg={className:"modal-backdrop",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:"body"},ug={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"};class Ic extends Is{constructor(t){super(),this._config=this._getConfig(t),this._isAppended=!1,this._element=null}static get Default(){return dg}static get DefaultType(){return ug}static get NAME(){return xc}show(t){if(!this._config.isVisible){le(t);return}this._append();const e=this._getElement();this._config.isAnimated&&xs(e),e.classList.add(zo),this._emulateAnimation(()=>{le(t)})}hide(t){if(!this._config.isVisible){le(t);return}this._getElement().classList.remove(zo),this._emulateAnimation(()=>{this.dispose(),le(t)})}dispose(){this._isAppended&&(g.off(this._element,qo),this._element.remove(),this._isAppended=!1)}_getElement(){if(!this._element){const t=document.createElement("div");t.className=this._config.className,this._config.isAnimated&&t.classList.add(hg),this._element=t}return this._element}_configAfterMerge(t){return t.rootElement=Ze(t.rootElement),t}_append(){if(this._isAppended)return;const t=this._getElement();this._config.rootElement.append(t),g.on(t,qo,()=>{le(this._config.clickCallback)}),this._isAppended=!0}_emulateAnimation(t){fc(t,this._getElement(),this._config.isAnimated)}}const pg="focustrap",fg="bs.focustrap",Ri=`.${fg}`,mg=`focusin${Ri}`,gg=`keydown.tab${Ri}`,vg="Tab",bg="forward",Qo="backward",Eg={autofocus:!0,trapElement:null},yg={autofocus:"boolean",trapElement:"element"};class Nc extends Is{constructor(t){super(),this._config=this._getConfig(t),this._isActive=!1,this._lastTabNavDirection=null}static get Default(){return Eg}static get DefaultType(){return yg}static get NAME(){return pg}activate(){this._isActive||(this._config.autofocus&&this._config.trapElement.focus(),g.off(document,Ri),g.on(document,mg,t=>this._handleFocusin(t)),g.on(document,gg,t=>this._handleKeydown(t)),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,g.off(document,Ri))}_handleFocusin(t){const{trapElement:e}=this._config;if(t.target===document||t.target===e||e.contains(t.target))return;const s=T.focusableChildren(e);s.length===0?e.focus():this._lastTabNavDirection===Qo?s[s.length-1].focus():s[0].focus()}_handleKeydown(t){t.key===vg&&(this._lastTabNavDirection=t.shiftKey?Qo:bg)}}const Yo=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",Ko=".sticky-top",Us="padding-right",Go="margin-right";class Kn{constructor(){this._element=document.body}getWidth(){const t=document.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}hide(){const t=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,Us,e=>e+t),this._setElementAttributes(Yo,Us,e=>e+t),this._setElementAttributes(Ko,Go,e=>e-t)}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,Us),this._resetElementAttributes(Yo,Us),this._resetElementAttributes(Ko,Go)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(t,e,s){const i=this.getWidth(),r=o=>{if(o!==this._element&&window.innerWidth>o.clientWidth+i)return;this._saveInitialAttribute(o,e);const l=window.getComputedStyle(o).getPropertyValue(e);o.style.setProperty(e,`${s(Number.parseFloat(l))}px`)};this._applyManipulationCallback(t,r)}_saveInitialAttribute(t,e){const s=t.style.getPropertyValue(e);s&&He.setDataAttribute(t,e,s)}_resetElementAttributes(t,e){const s=i=>{const r=He.getDataAttribute(i,e);if(r===null){i.style.removeProperty(e);return}He.removeDataAttribute(i,e),i.style.setProperty(e,r)};this._applyManipulationCallback(t,s)}_applyManipulationCallback(t,e){if(Fe(t)){e(t);return}for(const s of T.find(t,this._element))e(s)}}const wg="modal",_g="bs.modal",be=`.${_g}`,Sg=".data-api",Ag="Escape",Tg=`hide${be}`,Cg=`hidePrevented${be}`,Oc=`hidden${be}`,Pc=`show${be}`,Lg=`shown${be}`,kg=`resize${be}`,xg=`click.dismiss${be}`,Ig=`mousedown.dismiss${be}`,Ng=`keydown.dismiss${be}`,Og=`click${be}${Sg}`,Xo="modal-open",Pg="fade",Jo="show",wn="modal-static",Dg=".modal.show",Mg=".modal-dialog",Rg=".modal-body",$g='[data-bs-toggle="modal"]',Bg={backdrop:!0,focus:!0,keyboard:!0},Fg={backdrop:"(boolean|string)",focus:"boolean",keyboard:"boolean"};let As=class Dc extends Se{constructor(t,e){super(t,e),this._dialog=T.findOne(Mg,this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._isTransitioning=!1,this._scrollBar=new Kn,this._addEventListeners()}static get Default(){return Bg}static get DefaultType(){return Fg}static get NAME(){return wg}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){this._isShown||this._isTransitioning||g.trigger(this._element,Pc,{relatedTarget:t}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),document.body.classList.add(Xo),this._adjustDialog(),this._backdrop.show(()=>this._showElement(t)))}hide(){!this._isShown||this._isTransitioning||g.trigger(this._element,Tg).defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,this._focustrap.deactivate(),this._element.classList.remove(Jo),this._queueCallback(()=>this._hideModal(),this._element,this._isAnimated()))}dispose(){g.off(window,be),g.off(this._dialog,be),this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new Ic({isVisible:!!this._config.backdrop,isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new Nc({trapElement:this._element})}_showElement(t){document.body.contains(this._element)||document.body.append(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0;const e=T.findOne(Rg,this._dialog);e&&(e.scrollTop=0),xs(this._element),this._element.classList.add(Jo);const s=()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,g.trigger(this._element,Lg,{relatedTarget:t})};this._queueCallback(s,this._dialog,this._isAnimated())}_addEventListeners(){g.on(this._element,Ng,t=>{if(t.key===Ag){if(this._config.keyboard){this.hide();return}this._triggerBackdropTransition()}}),g.on(window,kg,()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()}),g.on(this._element,Ig,t=>{g.one(this._element,xg,e=>{if(!(this._element!==t.target||this._element!==e.target)){if(this._config.backdrop==="static"){this._triggerBackdropTransition();return}this._config.backdrop&&this.hide()}})})}_hideModal(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._backdrop.hide(()=>{document.body.classList.remove(Xo),this._resetAdjustments(),this._scrollBar.reset(),g.trigger(this._element,Oc)})}_isAnimated(){return this._element.classList.contains(Pg)}_triggerBackdropTransition(){if(g.trigger(this._element,Cg).defaultPrevented)return;const e=this._element.scrollHeight>document.documentElement.clientHeight,s=this._element.style.overflowY;s==="hidden"||this._element.classList.contains(wn)||(e||(this._element.style.overflowY="hidden"),this._element.classList.add(wn),this._queueCallback(()=>{this._element.classList.remove(wn),this._queueCallback(()=>{this._element.style.overflowY=s},this._dialog)},this._dialog),this._element.focus())}_adjustDialog(){const t=this._element.scrollHeight>document.documentElement.clientHeight,e=this._scrollBar.getWidth(),s=e>0;if(s&&!t){const i=ve()?"paddingLeft":"paddingRight";this._element.style[i]=`${e}px`}if(!s&&t){const i=ve()?"paddingRight":"paddingLeft";this._element.style[i]=`${e}px`}}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(t,e){return this.each(function(){const s=Dc.getOrCreateInstance(this,t);if(typeof t=="string"){if(typeof s[t]>"u")throw new TypeError(`No method named "${t}"`);s[t](e)}})}};g.on(document,Og,$g,function(n){const t=T.getElementFromSelector(this);["A","AREA"].includes(this.tagName)&&n.preventDefault(),g.one(t,Pc,i=>{i.defaultPrevented||g.one(t,Oc,()=>{Zt(this)&&this.focus()})});const e=T.findOne(Dg);e&&As.getInstance(e).hide(),As.getOrCreateInstance(t).toggle(this)});tn(As);Ee(As);const Hg="offcanvas",Vg="bs.offcanvas",We=`.${Vg}`,Mc=".data-api",Ug=`load${We}${Mc}`,jg="Escape",Zo="show",ea="showing",ta="hiding",Wg="offcanvas-backdrop",Rc=".offcanvas.show",zg=`show${We}`,qg=`shown${We}`,Qg=`hide${We}`,sa=`hidePrevented${We}`,$c=`hidden${We}`,Yg=`resize${We}`,Kg=`click${We}${Mc}`,Gg=`keydown.dismiss${We}`,Xg='[data-bs-toggle="offcanvas"]',Jg={backdrop:!0,keyboard:!0,scroll:!1},Zg={backdrop:"(boolean|string)",keyboard:"boolean",scroll:"boolean"};class tt extends Se{constructor(t,e){super(t,e),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get Default(){return Jg}static get DefaultType(){return Zg}static get NAME(){return Hg}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){if(this._isShown||g.trigger(this._element,zg,{relatedTarget:t}).defaultPrevented)return;this._isShown=!0,this._backdrop.show(),this._config.scroll||new Kn().hide(),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add(ea);const s=()=>{(!this._config.scroll||this._config.backdrop)&&this._focustrap.activate(),this._element.classList.add(Zo),this._element.classList.remove(ea),g.trigger(this._element,qg,{relatedTarget:t})};this._queueCallback(s,this._element,!0)}hide(){if(!this._isShown||g.trigger(this._element,Qg).defaultPrevented)return;this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.add(ta),this._backdrop.hide();const e=()=>{this._element.classList.remove(Zo,ta),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._config.scroll||new Kn().reset(),g.trigger(this._element,$c)};this._queueCallback(e,this._element,!0)}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_initializeBackDrop(){const t=()=>{if(this._config.backdrop==="static"){g.trigger(this._element,sa);return}this.hide()},e=!!this._config.backdrop;return new Ic({className:Wg,isVisible:e,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:e?t:null})}_initializeFocusTrap(){return new Nc({trapElement:this._element})}_addEventListeners(){g.on(this._element,Gg,t=>{if(t.key===jg){if(this._config.keyboard){this.hide();return}g.trigger(this._element,sa)}})}static jQueryInterface(t){return this.each(function(){const e=tt.getOrCreateInstance(this,t);if(typeof t=="string"){if(e[t]===void 0||t.startsWith("_")||t==="constructor")throw new TypeError(`No method named "${t}"`);e[t](this)}})}}g.on(document,Kg,Xg,function(n){const t=T.getElementFromSelector(this);if(["A","AREA"].includes(this.tagName)&&n.preventDefault(),et(this))return;g.one(t,$c,()=>{Zt(this)&&this.focus()});const e=T.findOne(Rc);e&&e!==t&&tt.getInstance(e).hide(),tt.getOrCreateInstance(t).toggle(this)});g.on(window,Ug,()=>{for(const n of T.find(Rc))tt.getOrCreateInstance(n).show()});g.on(window,Yg,()=>{for(const n of T.find("[aria-modal][class*=show][class*=offcanvas-]"))getComputedStyle(n).position!=="fixed"&&tt.getOrCreateInstance(n).hide()});tn(tt);Ee(tt);const ev=/^aria-[\w-]*$/i,Bc={"*":["class","dir","id","lang","role",ev],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},tv=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),sv=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i,iv=(n,t)=>{const e=n.nodeName.toLowerCase();return t.includes(e)?tv.has(e)?!!sv.test(n.nodeValue):!0:t.filter(s=>s instanceof RegExp).some(s=>s.test(e))};function nv(n,t,e){if(!n.length)return n;if(e&&typeof e=="function")return e(n);const i=new window.DOMParser().parseFromString(n,"text/html"),r=[].concat(...i.body.querySelectorAll("*"));for(const o of r){const l=o.nodeName.toLowerCase();if(!Object.keys(t).includes(l)){o.remove();continue}const c=[].concat(...o.attributes),h=[].concat(t["*"]||[],t[l]||[]);for(const d of c)iv(d,h)||o.removeAttribute(d.nodeName)}return i.body.innerHTML}const rv="TemplateFactory",ov={allowList:Bc,content:{},extraClass:"",html:!1,sanitize:!0,sanitizeFn:null,template:"
"},av={allowList:"object",content:"object",extraClass:"(string|function)",html:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",template:"string"},lv={entry:"(string|element|function|null)",selector:"(string|element)"};class cv extends Is{constructor(t){super(),this._config=this._getConfig(t)}static get Default(){return ov}static get DefaultType(){return av}static get NAME(){return rv}getContent(){return Object.values(this._config.content).map(t=>this._resolvePossibleFunction(t)).filter(Boolean)}hasContent(){return this.getContent().length>0}changeContent(t){return this._checkContent(t),this._config.content={...this._config.content,...t},this}toHtml(){const t=document.createElement("div");t.innerHTML=this._maybeSanitize(this._config.template);for(const[i,r]of Object.entries(this._config.content))this._setContent(t,r,i);const e=t.children[0],s=this._resolvePossibleFunction(this._config.extraClass);return s&&e.classList.add(...s.split(" ")),e}_typeCheckConfig(t){super._typeCheckConfig(t),this._checkContent(t.content)}_checkContent(t){for(const[e,s]of Object.entries(t))super._typeCheckConfig({selector:e,entry:s},lv)}_setContent(t,e,s){const i=T.findOne(s,t);if(i){if(e=this._resolvePossibleFunction(e),!e){i.remove();return}if(Fe(e)){this._putElementInTemplate(Ze(e),i);return}if(this._config.html){i.innerHTML=this._maybeSanitize(e);return}i.textContent=e}}_maybeSanitize(t){return this._config.sanitize?nv(t,this._config.allowList,this._config.sanitizeFn):t}_resolvePossibleFunction(t){return le(t,[this])}_putElementInTemplate(t,e){if(this._config.html){e.innerHTML="",e.append(t);return}e.textContent=t.textContent}}const hv="tooltip",dv=new Set(["sanitize","allowList","sanitizeFn"]),_n="fade",uv="modal",js="show",pv=".tooltip-inner",ia=`.${uv}`,na="hide.bs.modal",rs="hover",Sn="focus",fv="click",mv="manual",gv="hide",vv="hidden",bv="show",Ev="shown",yv="inserted",wv="click",_v="focusin",Sv="focusout",Av="mouseenter",Tv="mouseleave",Cv={AUTO:"auto",TOP:"top",RIGHT:ve()?"left":"right",BOTTOM:"bottom",LEFT:ve()?"right":"left"},Lv={allowList:Bc,animation:!0,boundary:"clippingParents",container:!1,customClass:"",delay:0,fallbackPlacements:["top","right","bottom","left"],html:!1,offset:[0,6],placement:"top",popperConfig:null,sanitize:!0,sanitizeFn:null,selector:!1,template:'',title:"",trigger:"hover focus"},kv={allowList:"object",animation:"boolean",boundary:"(string|element)",container:"(string|element|boolean)",customClass:"(string|function)",delay:"(number|object)",fallbackPlacements:"array",html:"boolean",offset:"(array|string|function)",placement:"(string|function)",popperConfig:"(null|object|function)",sanitize:"boolean",sanitizeFn:"(null|function)",selector:"(string|boolean)",template:"string",title:"(string|element|function)",trigger:"string"};let Os=class Fc extends Se{constructor(t,e){if(typeof cc>"u")throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");super(t,e),this._isEnabled=!0,this._timeout=0,this._isHovered=null,this._activeTrigger={},this._popper=null,this._templateFactory=null,this._newContent=null,this.tip=null,this._setListeners(),this._config.selector||this._fixTitle()}static get Default(){return Lv}static get DefaultType(){return kv}static get NAME(){return hv}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(){if(this._isEnabled){if(this._activeTrigger.click=!this._activeTrigger.click,this._isShown()){this._leave();return}this._enter()}}dispose(){clearTimeout(this._timeout),g.off(this._element.closest(ia),na,this._hideModalHandler),this._element.getAttribute("data-bs-original-title")&&this._element.setAttribute("title",this._element.getAttribute("data-bs-original-title")),this._disposePopper(),super.dispose()}show(){if(this._element.style.display==="none")throw new Error("Please use show on visible elements");if(!(this._isWithContent()&&this._isEnabled))return;const t=g.trigger(this._element,this.constructor.eventName(bv)),s=(uc(this._element)||this._element.ownerDocument.documentElement).contains(this._element);if(t.defaultPrevented||!s)return;this._disposePopper();const i=this._getTipElement();this._element.setAttribute("aria-describedby",i.getAttribute("id"));const{container:r}=this._config;if(this._element.ownerDocument.documentElement.contains(this.tip)||(r.append(i),g.trigger(this._element,this.constructor.eventName(yv))),this._popper=this._createPopper(i),i.classList.add(js),"ontouchstart"in document.documentElement)for(const l of[].concat(...document.body.children))g.on(l,"mouseover",Di);const o=()=>{g.trigger(this._element,this.constructor.eventName(Ev)),this._isHovered===!1&&this._leave(),this._isHovered=!1};this._queueCallback(o,this.tip,this._isAnimated())}hide(){if(!this._isShown()||g.trigger(this._element,this.constructor.eventName(gv)).defaultPrevented)return;if(this._getTipElement().classList.remove(js),"ontouchstart"in document.documentElement)for(const i of[].concat(...document.body.children))g.off(i,"mouseover",Di);this._activeTrigger[fv]=!1,this._activeTrigger[Sn]=!1,this._activeTrigger[rs]=!1,this._isHovered=null;const s=()=>{this._isWithActiveTrigger()||(this._isHovered||this._disposePopper(),this._element.removeAttribute("aria-describedby"),g.trigger(this._element,this.constructor.eventName(vv)))};this._queueCallback(s,this.tip,this._isAnimated())}update(){this._popper&&this._popper.update()}_isWithContent(){return!!this._getTitle()}_getTipElement(){return this.tip||(this.tip=this._createTipElement(this._newContent||this._getContentForTemplate())),this.tip}_createTipElement(t){const e=this._getTemplateFactory(t).toHtml();if(!e)return null;e.classList.remove(_n,js),e.classList.add(`bs-${this.constructor.NAME}-auto`);const s=ff(this.constructor.NAME).toString();return e.setAttribute("id",s),this._isAnimated()&&e.classList.add(_n),e}setContent(t){this._newContent=t,this._isShown()&&(this._disposePopper(),this.show())}_getTemplateFactory(t){return this._templateFactory?this._templateFactory.changeContent(t):this._templateFactory=new cv({...this._config,content:t,extraClass:this._resolvePossibleFunction(this._config.customClass)}),this._templateFactory}_getContentForTemplate(){return{[pv]:this._getTitle()}}_getTitle(){return this._resolvePossibleFunction(this._config.title)||this._element.getAttribute("data-bs-original-title")}_initializeOnDelegatedTarget(t){return this.constructor.getOrCreateInstance(t.delegateTarget,this._getDelegateConfig())}_isAnimated(){return this._config.animation||this.tip&&this.tip.classList.contains(_n)}_isShown(){return this.tip&&this.tip.classList.contains(js)}_createPopper(t){const e=le(this._config.placement,[this,t,this._element]),s=Cv[e.toUpperCase()];return en(this._element,t,this._getPopperConfig(s))}_getOffset(){const{offset:t}=this._config;return typeof t=="string"?t.split(",").map(e=>Number.parseInt(e,10)):typeof t=="function"?e=>t(e,this._element):t}_resolvePossibleFunction(t){return le(t,[this._element])}_getPopperConfig(t){const e={placement:t,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"preSetPlacement",enabled:!0,phase:"beforeMain",fn:s=>{this._getTipElement().setAttribute("data-popper-placement",s.state.placement)}}]};return{...e,...le(this._config.popperConfig,[e])}}_setListeners(){const t=this._config.trigger.split(" ");for(const e of t)if(e==="click")g.on(this._element,this.constructor.eventName(wv),this._config.selector,s=>{this._initializeOnDelegatedTarget(s).toggle()});else if(e!==mv){const s=e===rs?this.constructor.eventName(Av):this.constructor.eventName(_v),i=e===rs?this.constructor.eventName(Tv):this.constructor.eventName(Sv);g.on(this._element,s,this._config.selector,r=>{const o=this._initializeOnDelegatedTarget(r);o._activeTrigger[r.type==="focusin"?Sn:rs]=!0,o._enter()}),g.on(this._element,i,this._config.selector,r=>{const o=this._initializeOnDelegatedTarget(r);o._activeTrigger[r.type==="focusout"?Sn:rs]=o._element.contains(r.relatedTarget),o._leave()})}this._hideModalHandler=()=>{this._element&&this.hide()},g.on(this._element.closest(ia),na,this._hideModalHandler)}_fixTitle(){const t=this._element.getAttribute("title");t&&(!this._element.getAttribute("aria-label")&&!this._element.textContent.trim()&&this._element.setAttribute("aria-label",t),this._element.setAttribute("data-bs-original-title",t),this._element.removeAttribute("title"))}_enter(){if(this._isShown()||this._isHovered){this._isHovered=!0;return}this._isHovered=!0,this._setTimeout(()=>{this._isHovered&&this.show()},this._config.delay.show)}_leave(){this._isWithActiveTrigger()||(this._isHovered=!1,this._setTimeout(()=>{this._isHovered||this.hide()},this._config.delay.hide))}_setTimeout(t,e){clearTimeout(this._timeout),this._timeout=setTimeout(t,e)}_isWithActiveTrigger(){return Object.values(this._activeTrigger).includes(!0)}_getConfig(t){const e=He.getDataAttributes(this._element);for(const s of Object.keys(e))dv.has(s)&&delete e[s];return t={...e,...typeof t=="object"&&t?t:{}},t=this._mergeConfigObj(t),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}_configAfterMerge(t){return t.container=t.container===!1?document.body:Ze(t.container),typeof t.delay=="number"&&(t.delay={show:t.delay,hide:t.delay}),typeof t.title=="number"&&(t.title=t.title.toString()),typeof t.content=="number"&&(t.content=t.content.toString()),t}_getDelegateConfig(){const t={};for(const[e,s]of Object.entries(this._config))this.constructor.Default[e]!==s&&(t[e]=s);return t.selector=!1,t.trigger="manual",t}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null),this.tip&&(this.tip.remove(),this.tip=null)}static jQueryInterface(t){return this.each(function(){const e=Fc.getOrCreateInstance(this,t);if(typeof t=="string"){if(typeof e[t]>"u")throw new TypeError(`No method named "${t}"`);e[t]()}})}};Ee(Os);const xv="popover",Iv=".popover-header",Nv=".popover-body",Ov={...Os.Default,content:"",offset:[0,8],placement:"right",template:'',trigger:"click"},Pv={...Os.DefaultType,content:"(null|string|element|function)"};let Hc=class Vc extends Os{static get Default(){return Ov}static get DefaultType(){return Pv}static get NAME(){return xv}_isWithContent(){return this._getTitle()||this._getContent()}_getContentForTemplate(){return{[Iv]:this._getTitle(),[Nv]:this._getContent()}}_getContent(){return this._resolvePossibleFunction(this._config.content)}static jQueryInterface(t){return this.each(function(){const e=Vc.getOrCreateInstance(this,t);if(typeof t=="string"){if(typeof e[t]>"u")throw new TypeError(`No method named "${t}"`);e[t]()}})}};Ee(Hc);const Dv="scrollspy",Mv="bs.scrollspy",kr=`.${Mv}`,Rv=".data-api",$v=`activate${kr}`,ra=`click${kr}`,Bv=`load${kr}${Rv}`,Fv="dropdown-item",Ct="active",Hv='[data-bs-spy="scroll"]',An="[href]",Vv=".nav, .list-group",oa=".nav-link",Uv=".nav-item",jv=".list-group-item",Wv=`${oa}, ${Uv} > ${oa}, ${jv}`,zv=".dropdown",qv=".dropdown-toggle",Qv={offset:null,rootMargin:"0px 0px -25%",smoothScroll:!1,target:null,threshold:[.1,.5,1]},Yv={offset:"(number|null)",rootMargin:"string",smoothScroll:"boolean",target:"element",threshold:"array"};class on extends Se{constructor(t,e){super(t,e),this._targetLinks=new Map,this._observableSections=new Map,this._rootElement=getComputedStyle(this._element).overflowY==="visible"?null:this._element,this._activeTarget=null,this._observer=null,this._previousScrollData={visibleEntryTop:0,parentScrollTop:0},this.refresh()}static get Default(){return Qv}static get DefaultType(){return Yv}static get NAME(){return Dv}refresh(){this._initializeTargetsAndObservables(),this._maybeEnableSmoothScroll(),this._observer?this._observer.disconnect():this._observer=this._getNewObserver();for(const t of this._observableSections.values())this._observer.observe(t)}dispose(){this._observer.disconnect(),super.dispose()}_configAfterMerge(t){return t.target=Ze(t.target)||document.body,t.rootMargin=t.offset?`${t.offset}px 0px -30%`:t.rootMargin,typeof t.threshold=="string"&&(t.threshold=t.threshold.split(",").map(e=>Number.parseFloat(e))),t}_maybeEnableSmoothScroll(){this._config.smoothScroll&&(g.off(this._config.target,ra),g.on(this._config.target,ra,An,t=>{const e=this._observableSections.get(t.target.hash);if(e){t.preventDefault();const s=this._rootElement||window,i=e.offsetTop-this._element.offsetTop;if(s.scrollTo){s.scrollTo({top:i,behavior:"smooth"});return}s.scrollTop=i}}))}_getNewObserver(){const t={root:this._rootElement,threshold:this._config.threshold,rootMargin:this._config.rootMargin};return new IntersectionObserver(e=>this._observerCallback(e),t)}_observerCallback(t){const e=o=>this._targetLinks.get(`#${o.target.id}`),s=o=>{this._previousScrollData.visibleEntryTop=o.target.offsetTop,this._process(e(o))},i=(this._rootElement||document.documentElement).scrollTop,r=i>=this._previousScrollData.parentScrollTop;this._previousScrollData.parentScrollTop=i;for(const o of t){if(!o.isIntersecting){this._activeTarget=null,this._clearActiveClass(e(o));continue}const l=o.target.offsetTop>=this._previousScrollData.visibleEntryTop;if(r&&l){if(s(o),!i)return;continue}!r&&!l&&s(o)}}_initializeTargetsAndObservables(){this._targetLinks=new Map,this._observableSections=new Map;const t=T.find(An,this._config.target);for(const e of t){if(!e.hash||et(e))continue;const s=T.findOne(decodeURI(e.hash),this._element);Zt(s)&&(this._targetLinks.set(decodeURI(e.hash),e),this._observableSections.set(e.hash,s))}}_process(t){this._activeTarget!==t&&(this._clearActiveClass(this._config.target),this._activeTarget=t,t.classList.add(Ct),this._activateParents(t),g.trigger(this._element,$v,{relatedTarget:t}))}_activateParents(t){if(t.classList.contains(Fv)){T.findOne(qv,t.closest(zv)).classList.add(Ct);return}for(const e of T.parents(t,Vv))for(const s of T.prev(e,Wv))s.classList.add(Ct)}_clearActiveClass(t){t.classList.remove(Ct);const e=T.find(`${An}.${Ct}`,t);for(const s of e)s.classList.remove(Ct)}static jQueryInterface(t){return this.each(function(){const e=on.getOrCreateInstance(this,t);if(typeof t=="string"){if(e[t]===void 0||t.startsWith("_")||t==="constructor")throw new TypeError(`No method named "${t}"`);e[t]()}})}}g.on(window,Bv,()=>{for(const n of T.find(Hv))on.getOrCreateInstance(n)});Ee(on);const Kv="tab",Gv="bs.tab",At=`.${Gv}`,Xv=`hide${At}`,Jv=`hidden${At}`,Zv=`show${At}`,eb=`shown${At}`,tb=`click${At}`,sb=`keydown${At}`,ib=`load${At}`,nb="ArrowLeft",aa="ArrowRight",rb="ArrowUp",la="ArrowDown",pt="active",ca="fade",Tn="show",ob="dropdown",ab=".dropdown-toggle",lb=".dropdown-menu",Cn=":not(.dropdown-toggle)",cb='.list-group, .nav, [role="tablist"]',hb=".nav-item, .list-group-item",db=`.nav-link${Cn}, .list-group-item${Cn}, [role="tab"]${Cn}`,Uc='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',Ln=`${db}, ${Uc}`,ub=`.${pt}[data-bs-toggle="tab"], .${pt}[data-bs-toggle="pill"], .${pt}[data-bs-toggle="list"]`;class Yt extends Se{constructor(t){super(t),this._parent=this._element.closest(cb),this._parent&&(this._setInitialAttributes(this._parent,this._getChildren()),g.on(this._element,sb,e=>this._keydown(e)))}static get NAME(){return Kv}show(){const t=this._element;if(this._elemIsActive(t))return;const e=this._getActiveElem(),s=e?g.trigger(e,Xv,{relatedTarget:t}):null;g.trigger(t,Zv,{relatedTarget:e}).defaultPrevented||s&&s.defaultPrevented||(this._deactivate(e,t),this._activate(t,e))}_activate(t,e){if(!t)return;t.classList.add(pt),this._activate(T.getElementFromSelector(t));const s=()=>{if(t.getAttribute("role")!=="tab"){t.classList.add(Tn);return}t.removeAttribute("tabindex"),t.setAttribute("aria-selected",!0),this._toggleDropDown(t,!0),g.trigger(t,eb,{relatedTarget:e})};this._queueCallback(s,t,t.classList.contains(ca))}_deactivate(t,e){if(!t)return;t.classList.remove(pt),t.blur(),this._deactivate(T.getElementFromSelector(t));const s=()=>{if(t.getAttribute("role")!=="tab"){t.classList.remove(Tn);return}t.setAttribute("aria-selected",!1),t.setAttribute("tabindex","-1"),this._toggleDropDown(t,!1),g.trigger(t,Jv,{relatedTarget:e})};this._queueCallback(s,t,t.classList.contains(ca))}_keydown(t){if(![nb,aa,rb,la].includes(t.key))return;t.stopPropagation(),t.preventDefault();const e=[aa,la].includes(t.key),s=Ar(this._getChildren().filter(i=>!et(i)),t.target,e,!0);s&&(s.focus({preventScroll:!0}),Yt.getOrCreateInstance(s).show())}_getChildren(){return T.find(Ln,this._parent)}_getActiveElem(){return this._getChildren().find(t=>this._elemIsActive(t))||null}_setInitialAttributes(t,e){this._setAttributeIfNotExists(t,"role","tablist");for(const s of e)this._setInitialAttributesOnChild(s)}_setInitialAttributesOnChild(t){t=this._getInnerElement(t);const e=this._elemIsActive(t),s=this._getOuterElement(t);t.setAttribute("aria-selected",e),s!==t&&this._setAttributeIfNotExists(s,"role","presentation"),e||t.setAttribute("tabindex","-1"),this._setAttributeIfNotExists(t,"role","tab"),this._setInitialAttributesOnTargetPanel(t)}_setInitialAttributesOnTargetPanel(t){const e=T.getElementFromSelector(t);e&&(this._setAttributeIfNotExists(e,"role","tabpanel"),t.id&&this._setAttributeIfNotExists(e,"aria-labelledby",`${t.id}`))}_toggleDropDown(t,e){const s=this._getOuterElement(t);if(!s.classList.contains(ob))return;const i=(r,o)=>{const l=T.findOne(r,s);l&&l.classList.toggle(o,e)};i(ab,pt),i(lb,Tn),s.setAttribute("aria-expanded",e)}_setAttributeIfNotExists(t,e,s){t.hasAttribute(e)||t.setAttribute(e,s)}_elemIsActive(t){return t.classList.contains(pt)}_getInnerElement(t){return t.matches(Ln)?t:T.findOne(Ln,t)}_getOuterElement(t){return t.closest(hb)||t}static jQueryInterface(t){return this.each(function(){const e=Yt.getOrCreateInstance(this);if(typeof t=="string"){if(e[t]===void 0||t.startsWith("_")||t==="constructor")throw new TypeError(`No method named "${t}"`);e[t]()}})}}g.on(document,tb,Uc,function(n){["A","AREA"].includes(this.tagName)&&n.preventDefault(),!et(this)&&Yt.getOrCreateInstance(this).show()});g.on(window,ib,()=>{for(const n of T.find(ub))Yt.getOrCreateInstance(n)});Ee(Yt);const pb="toast",fb="bs.toast",nt=`.${fb}`,mb=`mouseover${nt}`,gb=`mouseout${nt}`,vb=`focusin${nt}`,bb=`focusout${nt}`,Eb=`hide${nt}`,yb=`hidden${nt}`,wb=`show${nt}`,_b=`shown${nt}`,Sb="fade",ha="hide",Ws="show",zs="showing",Ab={animation:"boolean",autohide:"boolean",delay:"number"},Tb={animation:!0,autohide:!0,delay:5e3};let xr=class jc extends Se{constructor(t,e){super(t,e),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get Default(){return Tb}static get DefaultType(){return Ab}static get NAME(){return pb}show(){if(g.trigger(this._element,wb).defaultPrevented)return;this._clearTimeout(),this._config.animation&&this._element.classList.add(Sb);const e=()=>{this._element.classList.remove(zs),g.trigger(this._element,_b),this._maybeScheduleHide()};this._element.classList.remove(ha),xs(this._element),this._element.classList.add(Ws,zs),this._queueCallback(e,this._element,this._config.animation)}hide(){if(!this.isShown()||g.trigger(this._element,Eb).defaultPrevented)return;const e=()=>{this._element.classList.add(ha),this._element.classList.remove(zs,Ws),g.trigger(this._element,yb)};this._element.classList.add(zs),this._queueCallback(e,this._element,this._config.animation)}dispose(){this._clearTimeout(),this.isShown()&&this._element.classList.remove(Ws),super.dispose()}isShown(){return this._element.classList.contains(Ws)}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout(()=>{this.hide()},this._config.delay)))}_onInteraction(t,e){switch(t.type){case"mouseover":case"mouseout":{this._hasMouseInteraction=e;break}case"focusin":case"focusout":{this._hasKeyboardInteraction=e;break}}if(e){this._clearTimeout();return}const s=t.relatedTarget;this._element===s||this._element.contains(s)||this._maybeScheduleHide()}_setListeners(){g.on(this._element,mb,t=>this._onInteraction(t,!0)),g.on(this._element,gb,t=>this._onInteraction(t,!1)),g.on(this._element,vb,t=>this._onInteraction(t,!0)),g.on(this._element,bb,t=>this._onInteraction(t,!1))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(t){return this.each(function(){const e=jc.getOrCreateInstance(this,t);if(typeof t=="string"){if(typeof e[t]>"u")throw new TypeError(`No method named "${t}"`);e[t](this)}})}};tn(xr);Ee(xr);class lt extends rn{}class Q extends Cr{}a(Q,"CLASS_NAME_SHOW","show"),a(Q,"CLASS_NAME_COLLAPSE","collapse"),a(Q,"CLASS_NAME_COLLAPSING","collapsing"),a(Q,"CLASS_NAME_COLLAPSED","collapsed"),a(Q,"SELECTOR_ACTIVES",".show, .collapsing"),a(Q,"SELECTOR_DATA_TOGGLE",'[data-bs-toggle="collapse"]');const Rr=class extends F{constructor(){super();a(this,"scope",{toggle:this.toggle,show:this.show,hide:this.hide,update:this.update,isShown:!1});a(this,"dropdown");a(this,"toggler",null);a(this,"onShown",this._onShown.bind(this));a(this,"onHidden",this._onHidden.bind(this))}static get observedAttributes(){return["offset","boundary","reference","display","popper-config","auto-close"]}isShown(){var e;return((e=this.dropdown)==null?void 0:e._isShown())||!1}toggle(e,s,i){if(!this.dropdown)throw new Error("Dropdown not ready!");i!==this.toggler&&this.dropdown.toggle()}show(){if(!this.dropdown)throw new Error("Dropdown not ready!");this.dropdown.show()}hide(){if(!this.dropdown)throw new Error("Dropdown not ready!");this.dropdown.hide()}update(){if(!this.dropdown)throw new Error("Dropdown not ready!");this.dropdown.update()}connectedCallback(){super.connectedCallback(),this.init(Rr.observedAttributes)}async afterBind(){this.initDropdown(),this.addEventListeners(),await super.afterBind()}initDropdown(){this.toggler=this.classList.contains("dropdown-toggle")?this:this.querySelector(".dropdown-toggle")||this,this.toggler.dataset.bsToggle="dropdown",this.dropdown=new N(this.toggler,this.scope),this.dropdown.hide(),this.scope.isShown=this.isShown()}_onShown(){console.debug("onShown"),this.scope.isShown=this.isShown()}_onHidden(){console.debug("onHidden"),this.scope.isShown=this.isShown()}addEventListeners(){var e,s;(e=this.toggler)==null||e.addEventListener(N.EVENT_SHOWN,this.onShown),(s=this.toggler)==null||s.addEventListener(N.EVENT_HIDDEN,this.onHidden)}template(){return null}};let ps=Rr;a(ps,"tagName","bs5-dropdown");const qs=".data-api",da="ArrowDown",ua="ArrowUp",pa="Escape",Ae=class extends St{static hideAll(){this.clearMenus()}static getAllComponents(){const t=document.querySelectorAll(ps.tagName);return Array.from(t)}static hideAllComponents(){var e;const t=this.getAllComponents();for(const s of Array.from(t))(e=s.dropdown)==null||e.hide()}constructor(t,e){super(t,e)}};let N=Ae;a(N,"DATA_API_KEY",qs),a(N,"ESCAPE_KEY",pa),a(N,"SPACE_KEY","Space"),a(N,"TAB_KEY","Tab"),a(N,"ARROW_UP_KEY",ua),a(N,"ARROW_DOWN_KEY",da),a(N,"RIGHT_MOUSE_BUTTON",2),a(N,"REGEXP_KEYDOWN",new RegExp(`${ua}|${da}|${pa}`)),a(N,"EVENT_HIDE",`hide${Ae.EVENT_KEY}`),a(N,"EVENT_HIDDEN",`hidden${Ae.EVENT_KEY}`),a(N,"EVENT_SHOW",`show${Ae.EVENT_KEY}`),a(N,"EVENT_SHOWN",`shown${Ae.EVENT_KEY}`),a(N,"EVENT_CLICK",`click${Ae.EVENT_KEY}`),a(N,"EVENT_CLICK_DATA_API",`click${Ae.EVENT_KEY}${qs}`),a(N,"EVENT_KEYDOWN_DATA_API",`keydown${Ae.EVENT_KEY}${qs}`),a(N,"EVENT_KEYUP_DATA_API",`keyup${Ae.EVENT_KEY}${qs}`),a(N,"CLASS_NAME_DISABLED","disabled"),a(N,"CLASS_NAME_SHOW","show"),a(N,"CLASS_NAME_DROPUP","dropup"),a(N,"CLASS_NAME_DROPEND","dropend"),a(N,"CLASS_NAME_DROPSTART","dropstart"),a(N,"CLASS_NAME_NAVBAR","navbar"),a(N,"SELECTOR_DATA_TOGGLE",'[data-bs-toggle="dropdown"]'),a(N,"SELECTOR_FORM_CHILD",".dropdown form"),a(N,"SELECTOR_MENU",".dropdown-menu"),a(N,"SELECTOR_NAVBAR_NAV",".navbar-nav"),a(N,"SELECTOR_VISIBLE_ITEMS",".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)");var Re=(n=>(n.show="show.bs.collapse",n.shown="shown.bs.collapse",n.hide="hide.bs.collapse",n.hidden="hidden.bs.collapse",n))(Re||{});class Wc{constructor(t,e){a(this,"type");a(this,"title");a(this,"channel");a(this,"$event");a(this,"$context");this.type=t,this.title=e}}class Cb extends Wc{constructor({title:e,message:s,iconUrl:i,focus:r,keyboard:o,backdrop:l,buttons:c,modalService:h,contextualClass:d,channel:u,$event:p,$context:f}){super("modal",e);a(this,"message");a(this,"iconUrl");a(this,"focus");a(this,"keyboard");a(this,"backdrop");a(this,"buttons",[]);a(this,"modalService");a(this,"contextualClass");this.message=s,this.iconUrl=i,this.focus=r||!1,this.keyboard=o||!0,this.backdrop=l||!0,this.buttons=c||[],this.modalService=h,this.contextualClass=d,this.channel=u,this.$event=p,this.$context=f}}const zc="bs.modal",fa=".data-api",ce=`.${zc}`;class V extends As{static get DATA_KEY(){return zc}static get DATA_API_KEY(){return fa}static get EVENT_KEY(){return ce}}a(V,"ESCAPE_KEY","Escape"),a(V,"EVENT_HIDE",`hide${ce}`),a(V,"EVENT_HIDE_PREVENTED",`hidePrevented${ce}`),a(V,"EVENT_HIDDEN",`hidden${ce}`),a(V,"EVENT_SHOW",`show${ce}`),a(V,"EVENT_SHOWN",`shown${ce}`),a(V,"EVENT_FOCUSIN",`focusin${ce}`),a(V,"EVENT_RESIZE",`resize${ce}`),a(V,"EVENT_CLICK_DISMISS",`click.dismiss${ce}`),a(V,"EVENT_KEYDOWN_DISMISS",`keydown.dismiss${ce}`),a(V,"EVENT_MOUSEUP_DISMISS",`mouseup.dismiss${ce}`),a(V,"EVENT_MOUSEDOWN_DISMISS",`mousedown.dismiss${ce}`),a(V,"EVENT_CLICK_DATA_API",`click${ce}${fa}`),a(V,"CLASS_NAME_SCROLLBAR_MEASURER","modal-scrollbar-measure"),a(V,"CLASS_NAME_BACKDROP","modal-backdrop"),a(V,"CLASS_NAME_OPEN","modal-open"),a(V,"CLASS_NAME_FADE","fade"),a(V,"CLASS_NAME_SHOW","show"),a(V,"CLASS_NAME_STATIC","modal-static"),a(V,"SELECTOR_DIALOG",".modal-dialog"),a(V,"SELECTOR_MODAL_BODY",".modal-body"),a(V,"SELECTOR_DATA_TOGGLE",'[data-bs-toggle="modal"]'),a(V,"SELECTOR_DATA_DISMISS",'[data-bs-dismiss="modal"]'),a(V,"SELECTOR_FIXED_CONTENT",".fixed-top, .fixed-bottom, .is-fixed, .sticky-top"),a(V,"SELECTOR_STICKY_CONTENT",".sticky-top");class Lb extends Os{}class Gn extends Hc{}const Ye=class{constructor(){a(this,"eventDispatcher",$.getInstance());a(this,"bs5",Le.getSingleton());a(this,"current","os");this.addEventListeners();const t=this.init(),e=document.getElementById("theme");e&&this.select(t.choice,e)}static getSingleton(){return Ye.instance?Ye.instance:this.setSingleton()}static setSingleton(){if(Ye.instance)throw new Error("Singleton of ThemeService already defined!");return Ye.instance=new Ye,Ye.instance}addEventListeners(){window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",t=>{this.triggerChange(t)})}init(){let t="os";return this.bs5.options.allowStoreDataInBrowser&&(t=localStorage.getItem("bs5-theme")||"os"),this.set(t)}select(t,e){(e==null?void 0:e.nodeName)==="SELECT"&&(e.value=t)}getDefaultData(){return{supported:!!window.matchMedia,isDark:!1,isLight:!1,systemIsDark:!1,systemIsLight:!0,bySystem:!0,byUser:!1,choice:"os"}}triggerChange(t,e){e||(e=this.getDefaultData());const s=this.getScheme();return this.eventDispatcher.trigger("theme-change",{oldValue:e,newValue:s}),s}onceChange(t,e){this.eventDispatcher.once("theme-change",t,e)}onChange(t,e){this.eventDispatcher.on("theme-change",t,e)}offChange(t,e){this.eventDispatcher.off("theme-change",t,e)}set(t){const e=this.getScheme();if(dr.includes(t)||(console.warn(`Unsupported theme "${t}", set instead the default "os".`),t="os"),this.bs5.options.allowStoreDataInBrowser&&localStorage.setItem("bs5-theme",t),t==="os"){const s=this.getScheme(t);document.documentElement.setAttribute("data-bs-theme",s.isDark?"dark":"light")}else document.documentElement.setAttribute("data-bs-theme",t);return this.current=t,this.triggerChange(void 0,e)}getScheme(t=this.current){const e=this.getDefaultData();return e.systemIsDark=window.matchMedia("(prefers-color-scheme: dark)").matches,e.systemIsLight=!e.systemIsDark,t==="os"?(e.bySystem=!0,e.byUser=!1,e.choice="os",e.isDark=e.systemIsDark,e.isLight=e.systemIsLight):(e.bySystem=!1,e.byUser=!0,t==="dark"&&(e.isDark=!0,e.choice="dark"),t==="light"&&(e.isLight=!0,e.choice="light")),e}};let Bt=Ye;a(Bt,"instance");class qc extends Wc{constructor({title:e,message:s,iconUrl:i,delay:r,autoHide:o,animation:l,toastService:c,contextualClass:h,channel:d,$event:u,$context:p}){super("toast",e);a(this,"message");a(this,"iconUrl");a(this,"delay");a(this,"autoHide");a(this,"animation");a(this,"toastService");a(this,"contextualClass");this.message=s,this.iconUrl=i,this.delay=r,this.autoHide=o,this.animation=l,this.toastService=c,this.contextualClass=h,this.channel=d,this.$event=u,this.$context=p}}const ht=class extends xr{};let ae=ht;a(ae,"EVENT_CLICK_DISMISS",`click.dismiss${ht.EVENT_KEY}`),a(ae,"EVENT_HIDE",`hide${ht.EVENT_KEY}`),a(ae,"EVENT_HIDDEN",`hidden${ht.EVENT_KEY}`),a(ae,"EVENT_SHOW",`show${ht.EVENT_KEY}`),a(ae,"EVENT_SHOWN",`shown${ht.EVENT_KEY}`),a(ae,"CLASS_NAME_FADE","fade"),a(ae,"CLASS_NAME_HIDE","hide"),a(ae,"CLASS_NAME_SHOW","show"),a(ae,"CLASS_NAME_SHOWING","showing");const kb=Object.freeze(Object.defineProperty({__proto__:null,Bs5Service:Le,Carousel:lt,Collapse:Q,Dropdown:N,Modal:V,ModalNotification:Cb,Popover:Gn,ThemeService:Bt,Toast:ae,ToastNotification:qc,Tooltip:Lb},Symbol.toStringTag,{value:"Module"}));class Qc extends A{constructor(e,s,i,r,o,l,c){super(e,s,i,r,o,l,c);a(this,"bs5");a(this,"breakpoint");a(this,"attributeName");a(this,"val");if(this.bs5=Le.getSingleton(),this.args.length!==2)throw new Error("The Bs5AttributeBreakpointBinder was not initialized correctly!");const h=this.args[0].toString(),d=this.args[1].toString();if(!this.bs5.breakpointNames.includes(h))throw new Error(`Unknown breakpoint "${h}"! You can define breakpoints at the initialization of the Bs5Module.`);this.breakpoint=h,this.attributeName=d}onBreakpointChanges(){this.setAttributeOnMatch()}setAttributeOnMatch(){if(this.bs5.activeBreakpoint){if(this.isBreakpointMatch(this.breakpoint))return this.defaultAttributeBinder.routine(this.el,this.val);this.breakpointUnhandled(this.bs5.activeBreakpoint.name)&&this.defaultAttributeBinder.routine(this.el,void 0)}}isBreakpointMatch(e=this.breakpoint){return this.bs5.activeBreakpoint?!!(this.bs5.activeBreakpoint.name===e||this.myBreakpoints(e).includes(this.bs5.activeBreakpoint.name)):!1}myBreakpoints(e=this.breakpoint){const s=[e];let i=e;for(;i&&(i=this.bs5.getNextBreakpointByName(i),!(!i||this.breakpointHandledByAnother(i)));)s.push(i);return s}breakpointHandledByAnother(e){return!!this.getHandledBreakpoints().includes(e)}breakpointUnhandled(e){let s=e,i=!0;for(;s&&i;){if(this.breakpointHandledByAnother(s)){i=!1;break}if(s=this.bs5.getPrevBreakpointByName(s),!s)break}return i}addToHandledBreakpoints(){const e=this.getHandledBreakpoints();e.push(this.breakpoint),this.el.dataset[Te(this.attributeName)]=ji(e)}getHandledBreakpoints(){const e=Wi(this.el.dataset[Te(this.attributeName)]||"[]");if(!Array.isArray(e))throw new Error("breakpoints dataset has unsupported values!");return e}bind(e){this.bs5.on("breakpoint:changed",this.onBreakpointChanges,this),typeof this.defaultAttributeBinder.bind=="function"&&this.defaultAttributeBinder.bind(e)}routine(e,s){this.addToHandledBreakpoints(),this.val=s,this.setAttributeOnMatch()}unbind(e){var s;(s=this.bs5)==null||s.off("breakpoint:changed",this.onBreakpointChanges,this),typeof this.defaultAttributeBinder.unbind=="function"&&this.defaultAttributeBinder.unbind(e)}}class Yc extends Qc{constructor(e,s,i,r,o,l,c){super(e,s,i,r,o,l,c);a(this,"defaultAttributeBinder");this.defaultAttributeBinder=new Yi(e,s,this.attributeName,r,o,l,"*")}}a(Yc,"key","bs5-attr-*-*");class Kc extends A{constructor(){super(...arguments);a(this,"dispatcher",$.getInstance("main"));a(this,"collapseService");a(this,"url");a(this,"checkURL",this._checkURL.bind(this))}_checkURL(){var e;return this.url&&qi(this.url)?((e=this.collapseService)==null||e.hide(),!0):!1}bind(e){this.collapseService=new Q(e,{toggle:!1})}unbind(){this.checkURL&&this.dispatcher.off("newPageReady",this.checkURL)}routine(e,s){this.url=s,this.checkURL&&this.dispatcher.off("newPageReady",this.checkURL),this.dispatcher.on("newPageReady",this.checkURL)}}a(Kc,"key","bs5-collapse-on-url");class Gc extends Qc{constructor(e,s,i,r,o,l,c){super(e,s,i,r,o,l,c);a(this,"defaultAttributeBinder");this.defaultAttributeBinder=new Ii(e,s,`co-${this.attributeName}`,r,o,l,Ii.key)}}a(Gc,"key","bs5-co-*-*");class Xc extends A{constructor(){super(...arguments);a(this,"targets",new Map);a(this,"onEvent",this._onEvent.bind(this))}_onEvent(e){e.preventDefault();for(const s of this.targets.values())s.toggle()}bind(e){if(this.args===null)throw new Error("args is null");const s=this.args[0];e.addEventListener(s,this.onEvent)}unbind(){const e=this.args[0];this.el.removeEventListener(e,this.onEvent)}routine(e,s){var r;const i=Array.from(document.querySelectorAll(s));i.length<=0&&console.warn(`[toggleCollapseOnEventBinder] No element with selector "${s}" found.`);for(const o of this.targets.keys())i.find(l=>l===o)||((r=this.targets.get(o))==null||r.dispose(),this.targets.delete(o));for(const o of i)this.targets.has(o)||this.targets.set(o,new Q(o,{toggle:!1}))}}a(Xc,"key","bs5-toggle-collapse-on-*");class Jc extends A{constructor(){super(...arguments);a(this,"toggler");a(this,"dropdownService")}bind(e){this.toggler=(e.classList.contains("dropdown-toggle")?e:e.querySelector(".dropdown-toggle"))||e}routine(e,s={}){if(!this.toggler)throw new Error("No dropdown toggle element found!");this.dropdownService&&(this.dropdownService.dispose(),this.toggler.dataset.bsToggle="");const i=new N(this.toggler,s);this.toggler.dataset.bsToggle="dropdown",this.dropdownService=i,this.dropdownService.hide()}}a(Jc,"key","bs5-dropdown");class Zc extends A{routine(t,e){const s=new Q(t,{toggle:!1}),i=new $("main"),r=o=>o&&qi(o)?(s.show(),!0):(s.hide(),!1);i.on("newPageReady",()=>r(e)),r(e)}}a(Zc,"key","bs5-expand-on-url");class eh extends A{constructor(){super(...arguments);a(this,"popover");a(this,"listeners",{})}routine(e,s){let i={};typeof s=="string"?i.content=s:typeof s=="object"&&(i={...s}),i.placement=i.placement||"auto";const r=new Gn(e,{...Gn.Default,...i});this.popover&&this.popover.dispose(),this.popover=r;const o=["show","hide","toggle","dispose","enable","disable","update"];if(this.listeners)for(const[l,c]of Object.entries(this.listeners))this.el.removeEventListener(l,c);this.listeners=Object.create(null);for(const l of o)if(r[l]&&typeof r[l]=="function"){const c=`trigger-${String(l)}`,h=r[l].bind(r);this.el.addEventListener(c,h),this.listeners[c]=h}else console.warn("Unknown method "+l)}bind(e){e.dispatchEvent(new CustomEvent("bound.bs.popover",{bubbles:!0,cancelable:!0}))}unbind(){if(this.popover&&this.popover.dispose(),this.listeners)for(const[e,s]of Object.entries(this.listeners))this.el.removeEventListener(e,s)}}a(eh,"key","bs5-popover");class th extends A{constructor(){super(...arguments);a(this,"toastData");a(this,"onEvent",this._onEvent.bind(this))}_onEvent(e){if(!this.toastData)throw new Error("Toast data not set!");this.toastData.$event=e,this.toastData.$context=this.view.models;const s=new qc(this.toastData);new $(s.channel||"toast").trigger("show-notification",s)}bind(e){const s=this.args[0];e.addEventListener(s,this.onEvent)}routine(e,s){if(this.args===null)throw new Error("args is null");this.toastData=s}unbind(e){const s=this.args[0];e.removeEventListener(s,this.onEvent)}}a(th,"key","show-toast-on-*");class sh extends A{constructor(){super(...arguments);a(this,"target");a(this,"className");a(this,"onScroll",xe(this._onScroll.bind(this)));a(this,"isInViewport",this._isInViewport.bind(this))}_onScroll(){if(!this.target)throw new Error("No target element found!");if(!this.className)throw new Error("className not set!");this.isInViewport(this.target)?(this.el.classList.add(this.className),this.el.type==="radio"&&(this.el.checked=!0)):(this.el.classList.remove(this.className),this.el.type==="radio"&&(this.el.checked=!1))}_isInViewport(e){if(!e)return!1;const s=Number(this.el.dataset.offset||0),i=Number(this.el.dataset.offsetBottom||0);return Jh(e,{top:s,bottom:i})}bind(){window.addEventListener("scroll",this.onScroll,{passive:!0}),this.onScroll()}routine(e,s){const i=s.replace("#","");this.target=document.getElementById(i)||void 0,this.className=this.args[0]}unbind(){window.removeEventListener("scroll",this.onScroll)}}a(sh,"key","bs5-scrollspy-*");const Ps=document.createElement("div");Ps.classList.add("tooltip");Ps.setAttribute("role","tooltip");const ih=document.createElement("div");ih.classList.add("arrow");Ps.appendChild(ih);const nh=document.createElement("div");nh.classList.add("tooltip-inner");Ps.appendChild(nh);class rh extends A{constructor(){super(...arguments);a(this,"popper");a(this,"tip",Ps.cloneNode(!0));a(this,"show",this._show.bind(this));a(this,"hide",this._hide.bind(this))}_show(){const e=this.el.dataset.placement||"start",s=0;this.popper=en(this.el,this.tip,{placement:e,modifiers:[{name:"flip",options:{altBoundary:!0,behavior:"flip"}},{name:"offset",options:{offset:s}},{name:"arrow",options:{element:".arrow"}},{name:"preventOverflow",options:{boundariesElement:"scrollParent"}}],strategy:void 0}),document.body.appendChild(this.tip),this.tip.classList.add("show"),this.tip.classList.add("bs-tooltip-"+e)}_hide(){this.tip.classList.remove("show"),this.popper&&this.popper.destroy()}bind(e){e.addEventListener("mouseenter",this.show),e.addEventListener("mouseleave",this.hide)}routine(e,s){const i=this.tip.querySelector(".tooltip-inner");i.innerHTML=s}unbind(){this.hide(),this.el.removeEventListener("mouseenter",this.show),this.el.removeEventListener("mouseleave",this.hide)}}a(rh,"key","bs5-tooltip");class oh extends A{constructor(){super(...arguments);a(this,"target");a(this,"onEvent",this._onEvent.bind(this))}_onEvent(e){const s=Number(this.el.dataset.offset||0),i=this.el.dataset.scrollElement?document.querySelector(this.el.dataset.scrollElement):window;this.target&&(Gt(this.target,s,i),e.preventDefault())}bind(e){this.onEvent=this.onEvent.bind(this);const s=this.args[0];e.addEventListener(s,this.onEvent)}routine(e,s){this.target=document.querySelector(s)||void 0}unbind(e){const s=this.args[0];e.removeEventListener(s,this.onEvent)}}a(oh,"key","scroll-to-on-*");class ah extends A{constructor(){super(...arguments);a(this,"toggleButtonEvents");a(this,"state","off");a(this,"triggerState",this._triggerState.bind(this));a(this,"onToggle",this._onToggle.bind(this))}_triggerState(){var e;(e=this.toggleButtonEvents)==null||e.trigger(D.eventNames.state,this.state)}_onToggle(){this.toggle.bind(this)(this.el)}toggle(e){this.state==="removed"?this.add.bind(this)(e):this.remove.bind(this)(e)}remove(e){const s=this.args[0];e.removeAttribute(s),this.state="removed",e.dispatchEvent(new CustomEvent(Hn.elEventNames.removed,{detail:{attributeName:s}})),this.triggerState()}add(e){const s=this.args[0];e.setAttribute(s,s),this.state="added",e.dispatchEvent(new CustomEvent(Hn.elEventNames.added,{detail:{attributeName:s}})),this.triggerState()}bind(e){const s=this.args[0];this.state=e.hasAttribute(s)?"added":"removed"}unbind(){var e,s;(e=this.toggleButtonEvents)==null||e.off(D.eventNames.toggle,this.onToggle,this),(s=this.toggleButtonEvents)==null||s.off(D.eventNames.init,this.triggerState,this)}routine(e,s){const i=this._getValue(e);let r=this.toggleButtonEvents;i&&r&&(r.off(D.eventNames.toggle,this.onToggle,this),r.off(D.eventNames.init,this.triggerState,this)),this.toggleButtonEvents||(this.toggleButtonEvents=new $(D.nsPrefix+s),r=this.toggleButtonEvents,r.on(D.eventNames.toggle,this.onToggle,this),r.on(D.eventNames.init,this.triggerState,this))}}a(ah,"key","bs5-toggle-attribute-*");class lh extends A{constructor(){super(...arguments);a(this,"toggleButtonEvents");a(this,"state","off");a(this,"triggerState",this._triggerState.bind(this));a(this,"onToggle",this._onToggle.bind(this))}_triggerState(){var e;(e=this.toggleButtonEvents)==null||e.trigger(D.eventNames.state,this.state)}_onToggle(){this.toggle.bind(this)(this.el)}toggle(e){this.state==="removed"?this.add.bind(this)(e):this.remove.bind(this)(e)}remove(e){const s=this.args[0];e.classList.remove(s),this.state="removed",e.dispatchEvent(new CustomEvent(Vn.elEventNames.removed,{detail:{className:s}})),this.triggerState()}add(e){const s=this.args[0];e.classList.add(s,s),this.state="added",e.dispatchEvent(new CustomEvent(Vn.elEventNames.added,{detail:{className:s}})),this.triggerState()}bind(e){const s=this.args[0];this.state=e.classList.contains(s)?"added":"removed"}unbind(){var e,s;(e=this.toggleButtonEvents)==null||e.off(D.eventNames.toggle,this.onToggle,this),(s=this.toggleButtonEvents)==null||s.off(D.eventNames.init,this.triggerState,this)}routine(e,s){const i=this._getValue(e);let r=this.toggleButtonEvents;i&&r&&(r.off(D.eventNames.toggle,this.onToggle,this),r.off(D.eventNames.init,this.triggerState,this)),this.toggleButtonEvents||(this.toggleButtonEvents=new $(D.nsPrefix+s),r=this.toggleButtonEvents,r.on(D.eventNames.toggle,this.onToggle,this),r.on(D.eventNames.init,this.triggerState,this))}}a(lh,"key","bs5-toggle-class-*");const xb=Object.freeze(Object.defineProperty({__proto__:null,Bs5AttributeBreakpointBinder:Yc,Bs5ComponentAttributeBreakpointBinder:Gc,CollapseOnUrlBinder:Kc,DropdownBinder:Jc,ExpandOnUrlBinder:Zc,PopoverBinder:eh,ScrollToOnEventBinder:oh,ScrollspyClassBinder:sh,ShowToastOnEventBinder:th,ToggleAttributeBinder:ah,ToggleClassBinder:lh,ToggleCollapseOnEventBinder:Xc,TooltipBinder:rh},Symbol.toStringTag,{value:"Module"})),Ib="modulepreload",Nb=function(n){return"/"+n},ma={},Ds=function(t,e,s){if(!e||e.length===0)return t();const i=document.getElementsByTagName("link");return Promise.all(e.map(r=>{if(r=Nb(r),r in ma)return;ma[r]=!0;const o=r.endsWith(".css"),l=o?'[rel="stylesheet"]':"";if(!!s)for(let d=i.length-1;d>=0;d--){const u=i[d];if(u.href===r&&(!o||u.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${r}"]${l}`))return;const h=document.createElement("link");if(h.rel=o?"stylesheet":Ib,o||(h.as="script",h.crossOrigin=""),h.href=r,document.head.appendChild(h),o)return new Promise((d,u)=>{h.addEventListener("load",d),h.addEventListener("error",()=>u(new Error(`Unable to preload CSS for ${r}`)))})})).then(()=>t())},Ob=Ki.read,$r=class extends cr{constructor(){super();a(this,"autobind",!0);a(this,"templateAttributes",[{name:"title",required:!0},{name:"show",required:!1},{name:"icon-direction",required:!1}]);a(this,"scope",{items:[],toggle:this.toggle,show:this.show,hide:this.hide,collapseIconSize:16,showOnlyOne:!0})}static get observedAttributes(){return["items","collapse-icon-src","collapse-icon-size","show-only-one"]}hide(e,s){const i=this.querySelector(`[data-index="${s}"]`);i&&(this.initItemEventListeners(e,i),new Q(i,{toggle:!1}).hide())}show(e,s){const i=this.querySelector(`[data-index="${s}"]`),r=Array.from(this.querySelectorAll(`[data-index]:not([data-index="${s}"])`));if(r&&this.scope.showOnlyOne)for(const o of r)new Q(o,{toggle:!1}).hide();i&&(this.initItemEventListeners(e,i),new Q(i,{toggle:!1}).show())}toggle(e,s){const i=this.querySelector(`[data-index="${s}"]`),r=Array.from(this.querySelectorAll(`[data-index]:not([data-index="${s}"])`));if(r&&this.scope.showOnlyOne)for(const o of r)new Q(o,{toggle:!1}).hide();i&&(this.initItemEventListeners(e,i),new Q(i,{toggle:!1}).toggle())}initItemEventListeners(e,s){s.removeEventListener(Re.hide,this.onHide.bind(this,s,e)),s.removeEventListener(Re.show,this.onShow.bind(this,s,e)),s.addEventListener(Re.hide,this.onHide.bind(this,s,e),{once:!0}),s.addEventListener(Re.show,this.onShow.bind(this,s,e),{once:!0})}getContentChildByIndex(){return this.querySelector(".card-body > *")||void 0}onShow(e,s){s.show=!0,s.iconDirection="up";const i=this.getContentChildByIndex();i&&this.triggerVisibilityChangedForElement(i,s.show)}onHide(e,s){s.show=!1,s.iconDirection="down";const i=this.getContentChildByIndex();i&&this.triggerVisibilityChangedForElement(i,s.show)}transformTemplateAttributes(e){return e.handle=e.handle||Ob(e.title),e.show=!!e.show,e.iconDirection=e.iconDirection||e.show?"up":"down",e}triggerVisibilityChangedForElement(e,s){setTimeout(()=>{e.dispatchEvent(new CustomEvent("visibility-changed",{detail:{visible:s}}))},200)}connectedCallback(){super.connectedCallback(),this.init($r.observedAttributes)}async init(e){return super.init(e).then(s=>s)}async beforeBind(){return await super.beforeBind()}async afterBind(){return await super.afterBind()}requiredAttributes(){return[]}parsedAttributeChangedCallback(e,s,i,r){super.parsedAttributeChangedCallback(e,s,i,r)}disconnectedCallback(){super.disconnectedCallback()}async template(){if(!ie(this)||this.hasOnlyTemplateChilds()){const{default:e}=await Ds(()=>import("./bs5-accordion.component-cad06286.chunk.js"),[]);return e}else return null}};let ii=$r;a(ii,"tagName","bs5-accordion");const Br=class extends F{constructor(){super();a(this,"autobind",!0);a(this,"scope",{animationClass:"btn-animation-start",onClick:this.onClick.bind(this)})}static get observedAttributes(){return["animation-class"]}onClick(){this.startAnimation()}connectedCallback(){super.connectedCallback(),this.init(Br.observedAttributes)}startAnimation(){this.classList.add(this.scope.animationClass)}onStartAnimation(){}onEndAnimation(){setTimeout(()=>{this.classList.remove(this.scope.animationClass)})}async init(e){return super.init(e).then(s=>(this.onStartAnimation=this.onStartAnimation.bind(this),this.addEventListener("webkitAnimationStart",this.onStartAnimation),this.addEventListener("animationstart",this.onStartAnimation),this.onEndAnimation=this.onEndAnimation.bind(this),this.addEventListener("webkitAnimationEnd",this.onEndAnimation),this.addEventListener("animationend",this.onEndAnimation),this.addEventListener("click",this.scope.onClick),s))}requiredAttributes(){return[]}parsedAttributeChangedCallback(e,s,i,r){super.parsedAttributeChangedCallback(e,s,i,r)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("webkitAnimationStart",this.onStartAnimation),this.removeEventListener("animationstart",this.onStartAnimation),this.removeEventListener("webkitAnimationEnd",this.onEndAnimation),this.removeEventListener("animationend",this.onEndAnimation),this.removeEventListener("click",this.scope.onClick)}template(){return null}};let ni=Br;a(ni,"tagName","bs5-button");const Fr=class extends F{constructor(){super();a(this,"scope",{interval:lt.Default.interval,keyboard:lt.Default.keyboard,pause:lt.Default.pause||!1,wrap:lt.Default.wrap,touch:lt.Default.touch,fade:!1,next:this.next,nextWhenVisible:this.nextWhenVisible,prev:this.prev,startPause:this.pause,cycle:this.cycle,to:this.to,dispose:this.dispose});a(this,"autobind",!0);a(this,"carouselService")}static get observedAttributes(){return["interval","keyboard","pause","wrap","touch","fade"]}requiredAttributes(){return[]}async beforeBind(){await super.beforeBind(),this.classList.add("carousel","slide")}async afterBind(){this.carouselService=new lt(this,{interval:this.scope.interval,keyboard:this.scope.keyboard,pause:this.scope.pause,wrap:this.scope.wrap,touch:this.scope.touch}),this.scope.fade&&this.classList.add("carousel-fade"),this.carouselService.cycle(),await super.afterBind()}next(){this.carouselService&&this.carouselService.next()}nextWhenVisible(){this.carouselService&&this.carouselService.nextWhenVisible()}prev(){this.carouselService&&this.carouselService.prev()}pause(){this.carouselService&&this.carouselService.pause()}cycle(){this.carouselService&&this.carouselService.cycle()}to(){if(this.carouselService)throw new Error("TODO")}dispose(){this.carouselService&&this.carouselService.dispose()}connectedCallback(){super.connectedCallback(),super.init(Fr.observedAttributes)}template(){return null}};let ri=Fr;a(ri,"tagName","bs5-carousel");const Hr=class extends F{constructor(){super();a(this,"autobind",!0);a(this,"collapse");a(this,"scope",{title:"",content:"Please set the content of the collapse using the content attribute or just by set the content as the child of this element",collapsed:!0,toggle:this.toggle,show:this.show,hide:this.hide})}static get observedAttributes(){return["title","content","collapsed"]}requiredAttributes(){return["title"]}hide(){console.debug("hide"),this.collapse&&(this.scope.collapsed=!0,this.collapse.hide())}show(){this.collapse&&(this.scope.collapsed=!1,this.collapse.show())}toggle(){this.collapse&&(this.collapse.toggle(),this.scope.collapsed=!!this.scope.collapsed)}addEventListeners(){this.scope.collapseEl&&(this.scope.collapseEl.addEventListener(Re.hide,this.onHide.bind(this)),this.scope.collapseEl.addEventListener(Re.show,this.onShow.bind(this)))}removeEventListeners(){this.scope.collapseEl&&(this.scope.collapseEl.removeEventListener(Re.hide,this.onHide.bind(this)),this.scope.collapseEl.removeEventListener(Re.show,this.onShow.bind(this)))}onShow(){console.debug("onShow"),this.scope.collapsed=!1,this.triggerVisibilityChangedForElement(!this.scope.collapsed)}onHide(){console.debug("onShow"),this.scope.collapsed=!0,this.triggerVisibilityChangedForElement(!this.scope.collapsed)}triggerVisibilityChangedForElement(e){setTimeout(()=>{const s=new CustomEvent("visibility-changed",{detail:{visible:e}});this.dispatchEvent(s),this.scope.collapseEl&&this.scope.collapseEl.dispatchEvent(s)},200)}connectedCallback(){super.connectedCallback(),this.init(Hr.observedAttributes)}async afterBind(){if(console.debug("afterBind",this.scope.collapsed),this.scope.collapseEl=this.querySelector(".collapse")||void 0,!this.scope.collapseEl)throw new Error("No collapse element found!");this.collapse=new Q(this.scope.collapseEl,{toggle:!this.scope.collapsed})}template(){return ie(this)&&(this.scope.content=this.innerHTML),jsxCreateElement("div",null,jsxCreateElement("button",{"rv-on-click":"toggle",class:"btn btn-primary",type:"button","aria-expanded":"false","rv-aria-controls":"title | handleize","rv-text":"title"}),jsxCreateElement("div",{class:"collapse mt-2","rv-id":"title"},jsxCreateElement("div",{class:"card card-body","rv-template":"content"})))}};let oi=Hr;a(oi,"tagName","bs5-collapse");String.prototype.startsWith=String.prototype.startsWith||function(n){return this.indexOf(n)===0};String.prototype.padStart=String.prototype.padStart||function(n,t){let e=this;for(;e.length0?n.toFixed(t).replace(/0+$/,"").replace(/\.$/,""):n.toString())||"0"}class Pe{constructor(t,e,s,i){const r=this;function o(l){if(l.startsWith("hsl")){let[c,h,d,u]=l.match(/([\-\d\.e]+)/g).map(Number);u===void 0&&(u=1),c/=360,h/=100,d/=100,r.hsla=[c,h,d,u]}else if(l.startsWith("rgb")){let[c,h,d,u]=l.match(/([\-\d\.e]+)/g).map(Number);u===void 0&&(u=1),r.rgba=[c,h,d,u]}else l.startsWith("#")?r.rgba=Pe.hexToRgb(l):r.rgba=Pe.nameToRgb(l)||Pe.hexToRgb(l)}if(t!==void 0)if(Array.isArray(t))this.rgba=t;else if(s===void 0){const l=t&&""+t;l&&o(l.toLowerCase())}else this.rgba=[t,e,s,i===void 0?1:i]}get rgba(){if(this._rgba)return this._rgba;if(!this._hsla)throw new Error("No color is set");return this._rgba=Pe.hslToRgb(this._hsla)}set rgba(t){t.length===3&&(t[3]=1),this._rgba=t,this._hsla=null}printRGB(t){const e=t?this.rgba:this.rgba.slice(0,3),s=e.map((i,r)=>ga(i,r===3?3:0));return t?`rgba(${s})`:`rgb(${s})`}get rgbString(){return this.printRGB()}get rgbaString(){return this.printRGB(!0)}get hsla(){if(this._hsla)return this._hsla;if(!this._rgba)throw new Error("No color is set");return this._hsla=Pe.rgbToHsl(this._rgba)}set hsla(t){t.length===3&&(t[3]=1),this._hsla=t,this._rgba=null}printHSL(t){const e=[360,100,100,1],s=["","%","%",""],i=t?this.hsla:this.hsla.slice(0,3),r=i.map((o,l)=>ga(o*e[l],l===3?3:1)+s[l]);return t?`hsla(${r})`:`hsl(${r})`}get hslString(){return this.printHSL()}get hslaString(){return this.printHSL(!0)}get hex(){return"#"+this.rgba.map((s,i)=>i<3?s.toString(16):Math.round(s*255).toString(16)).map(s=>s.padStart(2,"0")).join("")}set hex(t){this.rgba=Pe.hexToRgb(t)}printHex(t){const e=this.hex;return t?e:e.substring(0,7)}static hexToRgb(t){const e=(t.startsWith("#")?t.slice(1):t).replace(/^(\w{3})$/,"$1F").replace(/^(\w)(\w)(\w)(\w)$/,"$1$1$2$2$3$3$4$4").replace(/^(\w{6})$/,"$1FF");if(!e.match(/^([0-9a-fA-F]{8})$/))throw new Error("Unknown hex color; "+t);const s=e.match(/^(\w\w)(\w\w)(\w\w)(\w\w)$/).slice(1).map(i=>parseInt(i,16));return s[3]=s[3]/255,s}static nameToRgb(t){const e=t.toLowerCase().replace("at","T").replace(/[aeiouyldf]/g,"").replace("ght","L").replace("rk","D").slice(-5,4),s=Pb[e];return s===void 0?s:Pe.hexToRgb(s.replace(/\-/g,"00").padStart(6,"f"))}static rgbToHsl([t,e,s,i]){t/=255,e/=255,s/=255;const r=Math.max(t,e,s),o=Math.min(t,e,s);let l,c,h=(r+o)/2;if(r===o)l=c=0;else{const d=r-o;switch(c=h>.5?d/(2-r-o):d/(r+o),r){case t:l=(e-s)/d+(e1&&(m-=1),m<.16666666666666666?p+(f-p)*6*m:m<.5?f:m<.6666666666666666?p+(f-p)*(.6666666666666666-m)*6:p},d=s<.5?s*(1+e):s+e-s*e,u=2*s-d;r=h(u,d,t+1/3),o=h(u,d,t),l=h(u,d,t-1/3)}const c=[r*255,o*255,l*255].map(Math.round);return c[3]=i,c}}class $i{constructor(){a(this,"events",[])}add(t,e,s){t.addEventListener(e,s,!1),this.events.push({target:t,type:e,handler:s})}remove(t,e,s){this.events=this.events.filter(i=>{let r=!0;return t&&t!==i.target&&(r=!1),e&&e!==i.type&&(r=!1),s&&s!==i.handler&&(r=!1),r&&$i._doRemove(i.target,i.type,i.handler),!r})}static _doRemove(t,e,s){t.removeEventListener(e,s,!1)}destroy(){this.events.forEach(t=>$i._doRemove(t.target,t.type,t.handler)),this.events=[]}}const Db=(n,t,e)=>{let s=!1;const i=(c,h,d)=>Math.max(h,Math.min(c,d)),r=(c,h,d)=>{if(d&&(s=!0),!s)return;c.preventDefault();const u=t.getBoundingClientRect(),p=u.width,f=u.height,m=h.clientX,v=h.clientY,b=i(m-u.left,0,p),E=i(v-u.top,0,f);e(b/p,E/f)},o=(c,h)=>{(c.buttons===void 0?c.which:c.buttons)===1?r(c,c,h):s=!1};function l(c,h){c.touches.length===1?r(c,c.touches[0],h):s=!1}n.add(t,"mousedown",c=>{o(c,!0)}),n.add(t,"touchstart",c=>{l(c,!0)}),n.add(window,"mousemove",o),n.add(t,"touchmove",l),n.add(window,"mouseup",()=>{s=!1}),n.add(t,"touchend",()=>{s=!1}),n.add(t,"touchcancel",()=>{s=!1})},Mb=`url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='2' height='2'%3E%3Cpath d='M1,0H0V1H2V2H1' fill='lightgrey'/%3E%3C/svg%3E")`,Rb=360,$b="keydown";function Bb(n){n.preventDefault(),n.stopPropagation()}function Fb(n,t,e,s,i=!1){n.add(t,$b,function(r){e.indexOf(r.key)>=0&&(i&&Bb(r),s(r))})}const Vr=class extends F{constructor(){super();a(this,"eventDispatcher");a(this,"color");a(this,"_debug",!1);a(this,"scope",{namespace:"main",hsl:[],cssHue:"",cssHsl:"",cssHsla:"",alphaBg:"",color:"#0cf",alpha:!0,editor:!0,editorFormat:"hex",cancelButton:!1,okayButton:!1});a(this,"events",new $i);a(this,"_domH",null);a(this,"_domSL",null);a(this,"_domA",null);a(this,"_domEdit",null);a(this,"_domSample",null);a(this,"_domOkay",null);a(this,"_domCancel",null);a(this,"setColor",xe(this._setColor.bind(this)));a(this,"updateUI",xe(this._updateUI.bind(this)))}static get observedAttributes(){return["namespace","alpha","editor","editor-format","cancel-button","okay-button","color"]}connectedCallback(){super.connectedCallback(),super.init(Vr.observedAttributes)}requiredAttributes(){return[]}async beforeBind(){await super.beforeBind(),this.eventDispatcher=$.getInstance("bs5-colorpicker:"+this.scope.namespace),this.setColor(this.scope.color),this.updateUI(),this.bindEvents()}async afterTemplate(e){await super.afterTemplate(e),this.setElements()}onChange(e){var s;this.debug("onChange",e),(s=this.eventDispatcher)==null||s.trigger("change",e)}onDone(e){var s;this.debug("onDone",e),(s=this.eventDispatcher)==null||s.trigger("done",e)}async template(){if(ie(this))return null;{const{default:e}=await Ds(()=>import("./bs5-colorpicker.component-1e5e88ee.chunk.js"),[]);return e}}parsedAttributeChangedCallback(e,s,i,r){super.parsedAttributeChangedCallback(e,s,i,r),e==="color"&&this.setColor(this.scope.color)}_setColor(e,s={silent:!1}){if(typeof e=="string"&&(e=e.trim()),!e)return;s=s||{};let i;try{i=new Pe(e)}catch(r){if(s.failSilently)return;throw r}if(!this.scope.alpha){const r=i.hsla;r[3]=1,i.hsla=r}this.color=i,this.setHSLA(null,null,null,null,s)}setElements(){this._domH=this.querySelector(".picker-hue"),this._domSL=this.querySelector(".picker-sl"),this._domA=this.querySelector(".picker-alpha"),this._domEdit=this.querySelector(".picker-editor")||null,this._domSample=this.querySelector(".picker-sample"),this._domOkay=this.querySelector(".picker-done"),this._domCancel=this.querySelector(".picker-cancel")}disconnectedCallback(){this.events.destroy()}bindEvents(){const e=this.events,s=(o,l,c)=>{e.add(o,l,c)};s(this,"click",o=>o.preventDefault());const i=Db.bind(this);if(!this._domH||!this._domSL||!this._domA||!this._domEdit||!this._domOkay)throw new Error("Not ready!");i(e,this._domH,o=>this.setHSLA(o)),i(e,this._domSL,(o,l)=>this.setHSLA(null,o,1-l)),this.scope.alpha&&i(e,this._domA,(o,l)=>this.setHSLA(null,null,null,1-l)),s(this._domEdit,"input",o=>{const l=o.target;this.setColor(l.value,{fromEditor:!0,failSilently:!0})}),s(this._domEdit,"focus",o=>{const l=o.target;l.selectionStart===l.selectionEnd&&l.select()});const r=()=>{this.onDone(this.color)};s(this._domOkay,"click",r),Fb(e,this,["Enter"],r)}setHSLA(e=null,s=null,i=null,r=null,o={}){if(!this.color)throw new Error("Not ready!");const l=this.color.hsla;[e,s,i,r].forEach((c,h)=>{(c||c===0)&&(l[h]=c)}),this.color.hsla=l,this.updateUI(o),this.onChange&&!o.silent&&this.onChange(this.color)}_updateUI(e={}){if(!this||!this.color)return;if(this.scope.hsl=this.color.hsla,this.scope.cssHue=`hsl(${this.scope.hsl[0]*Rb}, 100%, 50%)`,this.scope.cssHsl=this.color.hslString,this.scope.cssHsla=this.color.hslaString,!this._domH||!this._domSL||!this._domA)throw new Error("Color ui elements not found!");const s=this._domH.querySelector(".picker-selector"),i=this._domSL.querySelector(".picker-selector"),r=this._domA.querySelector(".picker-selector");if(!s||!i||!r||!this._domEdit||!this._domSample)throw console.error(s,i,r,this._domA,this._domSL,this._domH,this._domEdit,this._domSample),new Error("Not ready!");const o=(u,p,f)=>{p.style.left=f*100+"%"},l=(u,p,f)=>{p.style.top=f*100+"%"};o(this._domH,s,this.scope.hsl[0]),o(this._domSL,i,this.scope.hsl[1]),l(this._domSL,i,1-this.scope.hsl[2]),l(this._domA,r,1-this.scope.hsl[3]);const c=this.scope.cssHsl,h=c.replace("hsl","hsla").replace(")",", 0)"),d=`linear-gradient(${[c,h]})`;if(this.scope.alphaBg=d+", "+Mb,!e.fromEditor){const u=this.scope.editorFormat,p=this.scope.alpha;let f;switch(u){case"rgb":f=this.color.printRGB(p);break;case"hsl":f=this.color.printHSL(p);break;default:f=this.color.printHex(p)}this.scope.color=f}}};let ai=Vr;a(ai,"tagName","bs5-colorpicker");const Ur=class extends F{constructor(){super();a(this,"autobind",!0);a(this,"wrapperElement");a(this,"scope",{headersDepth:1,headersStart:2,findHeaderIdDepth:1,headerParentSelector:void 0,scrollOffset:0,anchors:[]})}static get observedAttributes(){return["headers-start","headers-depth","find-header-id-depth","header-parent-selector","scroll-offset","scroll-element"]}connectedCallback(){super.connectedCallback(),this.init(Ur.observedAttributes)}getIdFromElementOrParent(e,s=1){return e.id?e.id:s<=this.scope.findHeaderIdDepth&&e.parentElement?this.getIdFromElementOrParent(e.parentElement,++s):null}pushHeaders(e,s,i,r){e.querySelectorAll("h"+s).forEach(l=>{const c=this.getIdFromElementOrParent(l);c&&(r.push({element:l,href:"#"+c,title:l.innerHTML,childs:[]}),l.parentElement&&i>=s+1&&this.pushHeaders(l.parentElement,s+1,i,r[r.length-1].childs))})}async afterBind(){if(this.scope.headerParentSelector&&this.scope.headersStart&&this.scope.headersDepth){if(this.wrapperElement=document.querySelector(this.scope.headerParentSelector)||void 0,this.scope.anchors=[],!this.wrapperElement){console.error("No wrapper element found!");return}this.pushHeaders(this.wrapperElement,this.scope.headersStart,this.scope.headersDepth,this.scope.anchors)}await super.afterBind()}requiredAttributes(){return["headersStart","headersDepth","headerParentSelector"]}async attributeChangedCallback(e,s,i,r){super.attributeChangedCallback(e,s,i,r)}disconnectedCallback(){super.disconnectedCallback(),this.scope.anchors=[]}async template(){if(ie(this))return null;{const{default:e}=await Ds(()=>import("./bs5-contents.component-9014ea28.chunk.js"),[]);return e}}};let fs=Ur;a(fs,"tagName","bs5-contents");const jr=class extends F{constructor(){super();a(this,"_debug",!1);a(this,"autobind",!0);a(this,"formEl",null);a(this,"scope",this.getDefaultScope());this.enableSubmit=this.enableSubmit.bind(this)}static get observedAttributes(){return["id","disable-submit-until-change","use-ajax","ajax-request-type","auto-set-form-data","strip-html","scroll-invalid-element","animate-invalid-element"]}getDefaultScope(){return{id:Pa("form"),form:{fields:{},valid:!1,error:void 0},disableSubmitUntilChange:!1,submitDisabled:!1,onSubmit:this.onSubmit,useAjax:!0,ajaxRequestType:"form",autoSetFormData:!0,stripHtml:!0,scrollToInvalidElement:!0,animateInvalidElement:!0}}connectedCallback(){super.connectedCallback(),this.init(jr.observedAttributes),this.addEventListeners()}addEventListeners(){this.scope.disableSubmitUntilChange&&this.addEventListener("input",this.enableSubmit)}removeEventListeners(){this.removeEventListener("input",this.enableSubmit)}enableSubmit(){this.scope.submitDisabled=!1}requiredAttributes(){return[]}async beforeBind(){await super.beforeBind(),this.id=this.scope.id}async afterBind(){await super.afterBind()}stripHtml(){for(const e in this.scope.form.fields)this.scope.form.fields[e]&&typeof this.scope.form.fields[e]=="string"&&(this.scope.form.fields[e]=ki(this.scope.form.fields[e]))}onSubmit(e,s){if(this.debug("onSubmit",e,s),!this.formEl)return console.warn("No form found"),!1;if(this.scope.autoSetFormData&&this.getFormValues(),this.scope.stripHtml&&this.stripHtml(),this.validate(this.formEl,this.scope.form),!this.scope.form.valid){this.onInvalidForm(e);return}const i=this.getSubmitSettings(e);if((i==null?void 0:i.target)==="_blank")return!0;this.scope.useAjax&&(e.preventDefault(),e.stopPropagation(),this.ajaxSubmit(e,s))}async ajaxSubmit(e,s){this.debug("onSubmit",e,s,this.scope);const i=this.getSubmitSettings(e);if(!i){console.warn("Can't get submit settings");return}this.scope.autoSetFormData&&this.getFormValues();try{const r=await Xt.fetch(i.action,i.method,this.scope.form.fields,i.type);if(!r||!r.body)return this.onErrorSubmit("500","Error","Empty body!");const o=r.body&&r.body.message?r.body.message:"";return Number(r.status)>=400&&this.onErrorSubmit(r.status.toString(),o,r.body),this.onSuccessSubmit(r.status.toString(),o,r.body)}catch(r){if(r.status&&r.body)this.onErrorSubmit(r.status,r.body.message,r.body);else throw this.error}}getSubmitSettings(e){var l,c;if(!this.formEl)return console.warn("No form found"),null;let s=this.formEl.action,i=this.formEl.method,r=this.formEl.method;if((l=e==null?void 0:e.originalEvent)!=null&&l.submitter){const h=(c=e==null?void 0:e.originalEvent)==null?void 0:c.submitter;s=(h==null?void 0:h.formAction)||s,i=(h==null?void 0:h.formMethod)||i,r=(h==null?void 0:h.formTarget)||r}return{action:s,method:i.toUpperCase(),target:r,type:this.scope.ajaxRequestType}}onInvalidForm(e){if(this.debug("Form not valid",this.scope),e.preventDefault(),e.stopPropagation(),!this.formEl){console.warn("No form found");return}const s=this.formEl.querySelectorAll(":invalid");if(s&&s.length){const i=s[0];this.scope.scrollToInvalidElement&&this.scrollToElement(i),this.scope.animateInvalidElement&&this.scrollToElement(i)}this.dispatchEvent(new CustomEvent("invalid",{detail:{elements:s}}))}scrollToElement(e){const i=ar().h/2;Gt(e,i,window),this.animateInvalidElement(e)}animateInvalidElement(e,s=3e3){e.classList.add("invalid-flashing-animation"),setTimeout(()=>{e.classList.remove("invalid-flashing-animation")},s)}onErrorSubmit(e,s,i){this.debug("onErrorSubmit"),this.dispatchEvent(new CustomEvent("submit-error",{detail:{status:e,message:s,response:i}}))}onSuccessSubmit(e,s,i){this.debug("onSuccessSubmit"),this.scope.disableSubmitUntilChange&&(this.scope.submitDisabled=!0),this.dispatchEvent(new CustomEvent("submit-success",{detail:{status:e,message:s,response:i}}))}validate(e,s,i="validation-error"){s.valid=e.checkValidity(),s.error=e.validationMessage,s.valid||(this.dispatchEvent(new CustomEvent(i)),e.classList.add("was-validated"))}getFormValues(){return this.formEl?(this.scope.form.fields=new FormData(this.formEl),this.scope.form.fields):(console.warn("No form found"),null)}initForm(){const e=this.querySelector("form");e&&e.length>0?(this.formEl=e,this.formEl.classList.add("needs-validation"),this.formEl.setAttribute("novalidate","")):console.warn("bs5 form without children found")}async template(){if(ie(this))return this.initForm(),null;{const{default:e}=await Ds(()=>import("./bs5-form.component-56e21618.chunk.js"),[]);return e}}};let li=jr;a(li,"tagName","bs5-form");const bs=class extends lr{constructor(){super();a(this,"scope",{})}static get observedAttributes(){return["size","width","height","src","color","direction","alt"]}getSvg(){return this.querySelector("svg")}async fetchCached(e){let s=bs.cache.get(e);return s||(s=Xt.get(e),s&&bs.cache.set(e,s),s)}async fetchIcon(e){var i;let s;if(window!=null&&window.ssr&&!e.startsWith("http")&&!e.startsWith("ftp")&&!e.startsWith("sftp")){let r;if(window.ssr.env.NEST_INTERN_URL)r=new URL(e,window.ssr.env.NEST_INTERN_URL);else if(window.ssr.ctx)r=new URL(e,window.ssr.ctx.protocol+"://"+window.ssr.ctx.hostname);else throw new Error("Host for SSR not found!");s=await this.fetchCached(r.href)}else s=await this.fetchCached(e);return s.status!==200?(console.error(s.status),""):(i=s.headers.get("content-type"))!=null&&i.includes("image/svg+xml")?s.body:(console.error("[bs5-icon] Only SVG's are supported! But content-type is "+s.headers.get("content-type")),"")}getBasename(e){const s=Ie(e).pathname.split("/");return s==null?void 0:s[s.length-1]}getAlternativeText(e){var i;return(i=this.getBasename(e).split(".")[0])==null?void 0:i.replaceAll("_"," ")}async onSrcChanged(){let e="";if(!this.scope.src){this.innerHTML="";return}const s=this.getAlternativeText(this.scope.src);s&&this.setAttribute("alt",s);const i=this.getSvg();if((i?i.getAttribute("src"):"")===this.scope.src)return;try{e=await this.fetchIcon(this.scope.src)}catch(l){console.warn(`Error on fetch icon "${this.scope.src}"! Try to switch the protocol...`,l),this.scope.src.startsWith("//")&&(this.scope.src=location.protocol+this.scope.src);const c=new URL(this.scope.src);c.protocol==="http:"?c.protocol="https:":c.protocol="http:";try{e=await this.fetchIcon(c.href)}catch(h){console.error(`Error on fetch icon "${this.scope.src}"!`,l,h);return}}if(!e){console.error(`Error on fetch icon "${this.scope.src}"!`);return}this.innerHTML=e;const o=this.getSvg();o&&o.setAttribute("src",this.scope.src)}removeColor(){this.className=this.className.replace(/(^|\s)color-\S+/g,""),this.style.color=""}setColor(e){if(!e)return this.removeColor();if(e.includes(",")){const s=e.split(",");if(s.length>0){this.className=this.className.replace(/(^|\s)color-\S+/g,"");for(let i=0;i -`,Qr=class extends H{constructor(){super();a(this,"_debug",!1);a(this,"autobind",!0);a(this,"modalService");a(this,"scope",{onHidden:this.onHidden.bind(this),index:-1,dismiss:this.dismiss.bind(this)})}static get observedAttributes(){return["modal","index"]}requiredAttributes(){return["modal"]}connectedCallback(){super.connectedCallback(),this.init(Qr.observedAttributes)}async afterBind(){this.initModal(),await super.afterBind()}initModal(){const e=this.scope.modal,s=this.firstElementChild;e&&s&&(this.modalService=new V(s,{focus:e.focus!==void 0?e.focus:!0,keyboard:e.keyboard!==void 0?e.keyboard:!0,backdrop:e.backdrop!==void 0?e.backdrop:!0}),s.addEventListener(V.EVENT_HIDDEN,this.scope.onHidden,{once:!0}),this.modalService.show())}dismiss(){var e;(e=this.modalService)==null||e.hide()}onHidden(e,s){var r;s||(s=Ji(e));const i=((r=this.scope.$parent)==null?void 0:r.$parent)||null;typeof(i==null?void 0:i.onItemHide)=="function"&&this.scope.modal&&s&&i.onItemHide(e,s,this.scope.index,this.scope.modal)}async template(){return wb}};let vi=Qr;a(vi,"tagName","bs5-modal-item");const Yr=class extends H{constructor(){super();a(this,"scope",{toggle:this.toggle,show:this.show,hide:this.hide,isCollapsed:!0,collapseSelector:".navbar-collapse"});a(this,"collapseTargets",new Map);a(this,"routerEvents");this.onStateChange=this.onStateChange.bind(this)}static get observedAttributes(){return["collapse-selector"]}async afterBind(){this.hide(),await super.afterBind()}toggle(e){for(const s of this.collapseTargets.values())s.toggle();e&&(e.preventDefault(),e.stopPropagation())}show(e){for(const s of this.collapseTargets.values())s.show();e&&(e.preventDefault(),e.stopPropagation())}hide(e){for(const s of this.collapseTargets.values())s.hide();e&&(e.preventDefault(),e.stopPropagation())}connectedCallback(){super.connectedCallback(),this.routerEvents=new $("main"),this.routerEvents.on("newPageReady",this.onNewPageReady,this),this.setCollapseElement(),this.onStateChange(),this.init(Yr.observedAttributes)}setCollapseElement(){const e=Array.from(this.querySelectorAll(this.scope.collapseSelector)||[]);for(const s of this.collapseTargets.keys())e.find(i=>i===s)||this.disposeCollapseTarget(s);for(const s of e)this.collapseTargets.has(s)||(this.collapseTargets.set(s,new Q(s,{toggle:!1})),s.addEventListener(Q.Events.shown,this.onStateChange),s.addEventListener(Q.Events.hidden,this.onStateChange));this.hide()}disposeCollapseTargets(){for(const e of this.collapseTargets.keys())this.disposeCollapseTarget(e)}disposeCollapseTarget(e){const s=this.collapseTargets.get(e);s&&s.dispose(),this.collapseTargets.delete(e),e.removeEventListener(Q.Events.shown,this.onStateChange),e.removeEventListener(Q.Events.hidden,this.onStateChange)}disconnectedCallback(){super.disconnectedCallback(),this.disposeCollapseTargets(),this.routerEvents&&this.routerEvents.off("newPageReady",this.onNewPageReady,this)}onStateChange(){var e;this.scope.isCollapsed=(e=this.collapseTargets.values().next().value)==null?void 0:e.isCollapsed(),this.scope.isCollapsed?(this.classList.add(Q.CLASS_NAME_COLLAPSED),this.setAttribute("aria-expanded","false")):(this.classList.remove(Q.CLASS_NAME_COLLAPSED),this.setAttribute("aria-expanded","true"))}onNewPageReady(){this.hide()}parsedAttributeChangedCallback(e,s,i,r){super.parsedAttributeChangedCallback(e,s,i,r),e==="collapseSelector"&&this.setCollapseElement()}template(){return null}};let bi=Yr;a(bi,"tagName","bs5-navbar");const _b=`
+
`,Wr=class extends F{constructor(){super();a(this,"_debug",!1);a(this,"autobind",!0);a(this,"modalService");a(this,"scope",{onHidden:this.onHidden.bind(this),index:-1,dismiss:this.dismiss.bind(this)})}static get observedAttributes(){return["modal","index"]}requiredAttributes(){return["modal"]}connectedCallback(){super.connectedCallback(),this.init(Wr.observedAttributes)}async afterBind(){this.initModal(),await super.afterBind()}initModal(){const e=this.scope.modal,s=this.firstElementChild;e&&s&&(this.modalService=new V(s,{focus:e.focus!==void 0?e.focus:!0,keyboard:e.keyboard!==void 0?e.keyboard:!0,backdrop:e.backdrop!==void 0?e.backdrop:!0}),s.addEventListener(V.EVENT_HIDDEN,this.scope.onHidden,{once:!0}),this.modalService.show())}dismiss(){var e;(e=this.modalService)==null||e.hide()}onHidden(e,s){var r;s||(s=zi(e));const i=((r=this.scope.$parent)==null?void 0:r.$parent)||null;typeof(i==null?void 0:i.onItemHide)=="function"&&this.scope.modal&&s&&i.onItemHide(e,s,this.scope.index,this.scope.modal)}async template(){return Hb}};let ci=Wr;a(ci,"tagName","bs5-modal-item");const zr=class extends F{constructor(){super();a(this,"scope",{toggle:this.toggle,show:this.show,hide:this.hide,isCollapsed:!0,collapseSelector:".navbar-collapse"});a(this,"collapseTargets",new Map);a(this,"routerEvents");this.onStateChange=this.onStateChange.bind(this)}static get observedAttributes(){return["collapse-selector"]}async afterBind(){this.hide(),await super.afterBind()}toggle(e){for(const s of this.collapseTargets.values())s.toggle();e&&(e.preventDefault(),e.stopPropagation())}show(e){for(const s of this.collapseTargets.values())s.show();e&&(e.preventDefault(),e.stopPropagation())}hide(e){for(const s of this.collapseTargets.values())s.hide();e&&(e.preventDefault(),e.stopPropagation())}connectedCallback(){super.connectedCallback(),this.routerEvents=new $("main"),this.routerEvents.on("newPageReady",this.onNewPageReady,this),this.setCollapseElement(),this.onStateChange(),this.init(zr.observedAttributes)}setCollapseElement(){const e=Array.from(this.querySelectorAll(this.scope.collapseSelector)||[]);for(const s of this.collapseTargets.keys())e.find(i=>i===s)||this.disposeCollapseTarget(s);for(const s of e)this.collapseTargets.has(s)||(this.collapseTargets.set(s,new Q(s,{toggle:!1})),s.addEventListener(Q.Events.shown,this.onStateChange),s.addEventListener(Q.Events.hidden,this.onStateChange));this.hide()}disposeCollapseTargets(){for(const e of this.collapseTargets.keys())this.disposeCollapseTarget(e)}disposeCollapseTarget(e){const s=this.collapseTargets.get(e);s&&s.dispose(),this.collapseTargets.delete(e),e.removeEventListener(Q.Events.shown,this.onStateChange),e.removeEventListener(Q.Events.hidden,this.onStateChange)}disconnectedCallback(){super.disconnectedCallback(),this.disposeCollapseTargets(),this.routerEvents&&this.routerEvents.off("newPageReady",this.onNewPageReady,this)}onStateChange(){var e;this.scope.isCollapsed=(e=this.collapseTargets.values().next().value)==null?void 0:e.isCollapsed(),this.scope.isCollapsed?(this.classList.add(Q.CLASS_NAME_COLLAPSED),this.setAttribute("aria-expanded","false")):(this.classList.remove(Q.CLASS_NAME_COLLAPSED),this.setAttribute("aria-expanded","true"))}onNewPageReady(){this.hide()}parsedAttributeChangedCallback(e,s,i,r){super.parsedAttributeChangedCallback(e,s,i,r),e==="collapseSelector"&&this.setCollapseElement()}template(){return null}};let hi=zr;a(hi,"tagName","bs5-navbar");const Vb=`
@@ -40,7 +40,7 @@ index: ${l}
-
`,Kr=class extends H{constructor(){super();a(this,"autobind",!0);a(this,"_debug",!1);a(this,"notificationDispatcher");a(this,"scope",{notifications:[],positionClass:"absolute-bottom absolute-center",channelName:"toast",onItemHide:this.onItemHide})}static get observedAttributes(){return["icon-url","position-class","channel-name"]}connectedCallback(){super.connectedCallback(),this.init(Kr.observedAttributes)}onItemHide(e,s,i,r){i>-1?this.notifications.splice(i,1):console.warn("Notification not found",r)}onShowNotification(e){this.debug("Received notification container on "+this.scope.channelName,this.scope,e),this.scope.notifications.push(e)}async afterBind(){this.notificationDispatcher=new $(this.scope.channelName),this.notificationDispatcher.on("show-notification",this.onShowNotification,this),await super.afterBind()}disconnectedCallback(){super.disconnectedCallback(),this.notificationDispatcher.off("show-notification",this.onShowNotification,this)}requiredAttributes(){return[]}async template(){return ne(this)?null:_b}};let Ei=Kr;a(Ei,"tagName","bs5-notification-container");const Gr=class extends Ss{constructor(){super();a(this,"autobind",!0);a(this,"scope",{headersDepth:1,headersStart:2,findHeaderIdDepth:1,headerParentSelector:void 0,offset:0,offsetBottom:0,scrollOffset:0,anchors:[]})}static get observedAttributes(){return["headers-start","headers-depth","find-header-id-depth","header-parent-selector","offset","offset-bottom","scroll-offset"]}connectedCallback(){super.connectedCallback(),this.init(Gr.observedAttributes)}requiredAttributes(){return["headersStart","headersDepth","headerParentSelector"]}async template(){if(ne(this))return null;{const{default:e}=await Ws(()=>import("./bs5-scrollspy.component-1b82c9f2.chunk.js"),[]);return e}}};let yi=Gr;a(yi,"tagName","bs5-scrollspy");const Sb=`
+
`,qr=class extends F{constructor(){super();a(this,"autobind",!0);a(this,"_debug",!1);a(this,"notificationDispatcher");a(this,"scope",{notifications:[],positionClass:"absolute-bottom absolute-center",channelName:"toast",onItemHide:this.onItemHide})}static get observedAttributes(){return["icon-url","position-class","channel-name"]}connectedCallback(){super.connectedCallback(),this.init(qr.observedAttributes)}onItemHide(e,s,i,r){i>-1?this.notifications.splice(i,1):console.warn("Notification not found",r)}onShowNotification(e){this.debug("Received notification container on "+this.scope.channelName,this.scope,e),this.scope.notifications.push(e)}async afterBind(){this.notificationDispatcher=new $(this.scope.channelName),this.notificationDispatcher.on("show-notification",this.onShowNotification,this),await super.afterBind()}disconnectedCallback(){super.disconnectedCallback(),this.notificationDispatcher.off("show-notification",this.onShowNotification,this)}requiredAttributes(){return[]}async template(){return ie(this)?null:Vb}};let di=qr;a(di,"tagName","bs5-notification-container");const Qr=class extends fs{constructor(){super();a(this,"autobind",!0);a(this,"scope",{headersDepth:1,headersStart:2,findHeaderIdDepth:1,headerParentSelector:void 0,offset:0,offsetBottom:0,scrollOffset:0,anchors:[]})}static get observedAttributes(){return["headers-start","headers-depth","find-header-id-depth","header-parent-selector","offset","offset-bottom","scroll-offset"]}connectedCallback(){super.connectedCallback(),this.init(Qr.observedAttributes)}requiredAttributes(){return["headersStart","headersDepth","headerParentSelector"]}async template(){if(ie(this))return null;{const{default:e}=await Ds(()=>import("./bs5-scrollspy.component-1b82c9f2.chunk.js"),[]);return e}}};let ui=Qr;a(ui,"tagName","bs5-scrollspy");const Ub=`
-
`,Ab=` -`,ks=class extends H{constructor(){super();a(this,"_debug",!1);a(this,"dropdown");a(this,"scope");this.scope=this.getScopeDefaults(),ks.count++,this.onExternalOpenEvent=this.onExternalOpenEvent.bind(this),this.onExternalCloseEvent=this.onExternalCloseEvent.bind(this)}static get observedAttributes(){return["type","title","text","url","media-url","filename","label","dropdown-direction","dropdown-alignment","label-facebook","label-twitter","label-pinterest","label-whatsapp","label-telegram","label-email","label-download","label-clipboard"]}getFilename(e){return e.filename?e.filename:this.getMediaUrlForShare().split("/").pop()}getDefaultShareServices(){const e="%0A";return[{id:"facebook",label:this.scope.labelFacebook,urlTemplate:"https://www.facebook.com/sharer/sharer.php?u={{url}}",mediaUrlTemplate:"https://www.facebook.com/sharer/sharer.php?u={{media_url}}",type:"popup",url:"",availableFor:["page","image","video"]},{id:"twitter",label:this.scope.labelTwitter,urlTemplate:"https://twitter.com/intent/tweet?text={{text}}&url={{url}}",mediaUrlTemplate:`https://twitter.com/intent/tweet?text={{text}}&url={{media_url}}${e}({{url}})`,url:"",availableFor:["page","image","video"]},{id:"pinterest",label:this.scope.labelPinterest,urlTemplate:"http://www.pinterest.com/pin/create/button/?url={{url}}&media={{media_url}}&description={{text}}",type:"popup",url:"",availableFor:["image","video"]},{id:"whatsapp",label:this.scope.labelWhatsapp,urlTemplate:`https://api.whatsapp.com/send?text={{text}}${e}${e}{{url}}`,mediaUrlTemplate:`https://api.whatsapp.com/send?text={{text}}${e}${e}{{media_url}}${e}({{url}})`,type:"popup",url:"",availableFor:["page","image","video"]},{id:"telegram",label:this.scope.labelTelegram,urlTemplate:"https://telegram.me/share/url?url={{url}}&text={{text}}",mediaUrlTemplate:`https://telegram.me/share/url?url={{media_url}}&text={{text}}${e}({{url}})`,type:"popup",url:"",availableFor:["page","image","video"]},{id:"email",label:this.scope.labelEmail,urlTemplate:`mailto:?subject={{title}}&body={{text}}${e}${e}{{url}}`,mediaUrlTemplate:`mailto:?subject={{title}}&body={{text}}${e}${e}{{media_url}}${e}({{url}})`,type:"href",url:"",availableFor:["page","image","video"]},{id:"download",label:this.scope.labelDownload,urlTemplate:"{{raw_media_url}}",type:"download",url:"",availableFor:["image","video"],filename:this.scope.filename},{id:"clipboard",label:this.scope.labelClipboard,urlTemplate:"{{url}}",mediaUrlTemplate:"{{media_url}}",type:"clipboard",url:"",availableFor:["page","image","video"]}]}isIos(){return navigator.userAgent.match(/iPhone|iPad|iPod/i)!==null}isAndroid(){return navigator.userAgent.match(/Android/i)!==null}browserSupportsNativeShare(){return typeof navigator.share=="function"}getScopeDefaults(){const e={type:"page",title:document.title,text:"Look at this! 👀🤩",url:void 0,label:"Share",labelTemplate:Ab,isAndroid:this.isAndroid(),isIos:this.isIos(),isDesktop:!1,isNative:this.browserSupportsNativeShare(),dropdownId:"dropdownShare"+ks.count,shareItems:[],dropdownDirection:"down",dropdownAlignment:"auto",labelFacebook:"Facebook",labelTwitter:"Twitter",labelPinterest:"Pinterest",labelWhatsapp:"Whatsapp",labelTelegram:"Telegram",labelEmail:"Email",labelDownload:"Download",labelClipboard:"Copy to clipboard",share:this.share,shareOnService:this.shareOnService,getFilename:this.getFilename};return e.isDesktop=!e.isIos&&!e.isAndroid,e}onExternalOpenEvent(){var e;(e=this.dropdown)==null||e.show()}onExternalCloseEvent(){var e;(e=this.dropdown)==null||e.hide()}connectedCallback(){super.connectedCallback(),this.init(ks.observedAttributes),this.addEventListeners()}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListeners()}addEventListeners(){this.addEventListener("open",this.onExternalOpenEvent),this.addEventListener("btn-close",this.onExternalCloseEvent)}removeEventListeners(){this.removeEventListener("open",this.onExternalOpenEvent),this.removeEventListener("btn-close",this.onExternalOpenEvent)}getURLForShare(){return this.scope.type==="page"&&this.scope.url?$i(this.scope.url):window.location.href}getMediaUrlForShare(){return this.scope.type!=="page"&&this.scope.url?$i(this.scope.url):""}getTextForShare(){return Ri(this.scope.text)}getTitleForShare(){return Ri(this.scope.title)}updateShareURLs(){for(const e of this.scope.shareItems){const s=this.getURLForShare(),i=this.getMediaUrlForShare(),r=this.getTextForShare(),o=this.getTitleForShare();let l=e.urlTemplate;this.scope.type!=="page"&&e.mediaUrlTemplate&&(l=e.mediaUrlTemplate);const c=e.type!=="clipboard",h=l.replace("{{url}}",c?encodeURIComponent(s):s).replace("{{media_url}}",c?encodeURIComponent(i):i).replace("{{raw_media_url}}",i).replace("{{text}}",c?encodeURIComponent(r):r).replace("{{title}}",c?encodeURIComponent(o):o);e.available=e.availableFor.includes(this.scope.type),e.url=h}}initDropdown(){const e=this.querySelector(".dropdown-toggle-share");if(!e){console.warn('Element with selector ".dropdown-toggle-share" not found!',this);return}this.dropdown=new N(e)}async shareOnService(e,s){var i;return(i=this.dropdown)==null||i.hide(),e.type==="clipboard"?(s.preventDefault(),s.stopPropagation(),await Td(e.url),!1):e.type==="download"?!0:(s.preventDefault(),s.stopPropagation(),window.open(e.url,"Share","scrollbars=yes,resizable=yes,toolbar=no,location=yes,width=550,height=420,top=100,left="+(window.screen?Math.round(screen.width/2-275):100)),!1)}async share(e){var s;if(this.debug("share",this.scope),e.preventDefault(),e.stopPropagation(),this.scope.isNative&&!this.scope.isDesktop)try{await navigator.share({title:this.scope.title,text:`${this.scope.text}\r +
`,jb=` +`,Es=class extends F{constructor(){super();a(this,"_debug",!1);a(this,"dropdown");a(this,"scope");this.scope=this.getScopeDefaults(),Es.count++,this.onExternalOpenEvent=this.onExternalOpenEvent.bind(this),this.onExternalCloseEvent=this.onExternalCloseEvent.bind(this)}static get observedAttributes(){return["type","title","text","url","media-url","filename","label","dropdown-direction","dropdown-alignment","label-facebook","label-twitter","label-pinterest","label-whatsapp","label-telegram","label-email","label-download","label-clipboard"]}getFilename(e){return e.filename?e.filename:this.getMediaUrlForShare().split("/").pop()}getDefaultShareServices(){const e="%0A";return[{id:"facebook",label:this.scope.labelFacebook,urlTemplate:"https://www.facebook.com/sharer/sharer.php?u={{url}}",mediaUrlTemplate:"https://www.facebook.com/sharer/sharer.php?u={{media_url}}",type:"popup",url:"",availableFor:["page","image","video"]},{id:"twitter",label:this.scope.labelTwitter,urlTemplate:"https://twitter.com/intent/tweet?text={{text}}&url={{url}}",mediaUrlTemplate:`https://twitter.com/intent/tweet?text={{text}}&url={{media_url}}${e}({{url}})`,url:"",availableFor:["page","image","video"]},{id:"pinterest",label:this.scope.labelPinterest,urlTemplate:"http://www.pinterest.com/pin/create/button/?url={{url}}&media={{media_url}}&description={{text}}",type:"popup",url:"",availableFor:["image","video"]},{id:"whatsapp",label:this.scope.labelWhatsapp,urlTemplate:`https://api.whatsapp.com/send?text={{text}}${e}${e}{{url}}`,mediaUrlTemplate:`https://api.whatsapp.com/send?text={{text}}${e}${e}{{media_url}}${e}({{url}})`,type:"popup",url:"",availableFor:["page","image","video"]},{id:"telegram",label:this.scope.labelTelegram,urlTemplate:"https://telegram.me/share/url?url={{url}}&text={{text}}",mediaUrlTemplate:`https://telegram.me/share/url?url={{media_url}}&text={{text}}${e}({{url}})`,type:"popup",url:"",availableFor:["page","image","video"]},{id:"email",label:this.scope.labelEmail,urlTemplate:`mailto:?subject={{title}}&body={{text}}${e}${e}{{url}}`,mediaUrlTemplate:`mailto:?subject={{title}}&body={{text}}${e}${e}{{media_url}}${e}({{url}})`,type:"href",url:"",availableFor:["page","image","video"]},{id:"download",label:this.scope.labelDownload,urlTemplate:"{{raw_media_url}}",type:"download",url:"",availableFor:["image","video"],filename:this.scope.filename},{id:"clipboard",label:this.scope.labelClipboard,urlTemplate:"{{url}}",mediaUrlTemplate:"{{media_url}}",type:"clipboard",url:"",availableFor:["page","image","video"]}]}isIos(){return navigator.userAgent.match(/iPhone|iPad|iPod/i)!==null}isAndroid(){return navigator.userAgent.match(/Android/i)!==null}browserSupportsNativeShare(){return typeof navigator.share=="function"}getScopeDefaults(){const e={type:"page",title:document.title,text:"Look at this! 👀🤩",url:void 0,label:"Share",labelTemplate:jb,isAndroid:this.isAndroid(),isIos:this.isIos(),isDesktop:!1,isNative:this.browserSupportsNativeShare(),dropdownId:"dropdownShare"+Es.count,shareItems:[],dropdownDirection:"down",dropdownAlignment:"auto",labelFacebook:"Facebook",labelTwitter:"Twitter",labelPinterest:"Pinterest",labelWhatsapp:"Whatsapp",labelTelegram:"Telegram",labelEmail:"Email",labelDownload:"Download",labelClipboard:"Copy to clipboard",share:this.share,shareOnService:this.shareOnService,getFilename:this.getFilename};return e.isDesktop=!e.isIos&&!e.isAndroid,e}onExternalOpenEvent(){var e;(e=this.dropdown)==null||e.show()}onExternalCloseEvent(){var e;(e=this.dropdown)==null||e.hide()}connectedCallback(){super.connectedCallback(),this.init(Es.observedAttributes),this.addEventListeners()}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListeners()}addEventListeners(){this.addEventListener("open",this.onExternalOpenEvent),this.addEventListener("btn-close",this.onExternalCloseEvent)}removeEventListeners(){this.removeEventListener("open",this.onExternalOpenEvent),this.removeEventListener("btn-close",this.onExternalOpenEvent)}getURLForShare(){return this.scope.type==="page"&&this.scope.url?xi(this.scope.url):window.location.href}getMediaUrlForShare(){return this.scope.type!=="page"&&this.scope.url?xi(this.scope.url):""}getTextForShare(){return ki(this.scope.text)}getTitleForShare(){return ki(this.scope.title)}updateShareURLs(){for(const e of this.scope.shareItems){const s=this.getURLForShare(),i=this.getMediaUrlForShare(),r=this.getTextForShare(),o=this.getTitleForShare();let l=e.urlTemplate;this.scope.type!=="page"&&e.mediaUrlTemplate&&(l=e.mediaUrlTemplate);const c=e.type!=="clipboard",h=l.replace("{{url}}",c?encodeURIComponent(s):s).replace("{{media_url}}",c?encodeURIComponent(i):i).replace("{{raw_media_url}}",i).replace("{{text}}",c?encodeURIComponent(r):r).replace("{{title}}",c?encodeURIComponent(o):o);e.available=e.availableFor.includes(this.scope.type),e.url=h}}initDropdown(){const e=this.querySelector(".dropdown-toggle-share");if(!e){console.warn('Element with selector ".dropdown-toggle-share" not found!',this);return}this.dropdown=new N(e)}async shareOnService(e,s){var i;return(i=this.dropdown)==null||i.hide(),e.type==="clipboard"?(s.preventDefault(),s.stopPropagation(),await od(e.url),!1):e.type==="download"?!0:(s.preventDefault(),s.stopPropagation(),window.open(e.url,"Share","scrollbars=yes,resizable=yes,toolbar=no,location=yes,width=550,height=420,top=100,left="+(window.screen?Math.round(screen.width/2-275):100)),!1)}async share(e){var s;if(this.debug("share",this.scope),e.preventDefault(),e.stopPropagation(),this.scope.isNative&&!this.scope.isDesktop)try{await navigator.share({title:this.scope.title,text:`${this.scope.text}\r \r -`,url:this.scope.url||window.location.href})}catch(i){if(i.name==="AbortError")return;console.error(`Error ${i.name}: ${i.message}`,i)}else return this.updateShareURLs(),(s=this.dropdown)==null?void 0:s.toggle()}async beforeBind(){await super.beforeBind()}async afterBind(){this.initDropdown(),this.debug("afterBind",this.scope),this.scope.shareItems=this.getDefaultShareServices(),await super.afterBind()}requiredAttributes(){return[]}template(){return this&&ne(this)&&(this.scope.labelTemplate=this.innerHTML),Sb}};let fs=ks;a(fs,"tagName","bs5-share"),a(fs,"count",0);const Ve=n=>{const t=n,e=n;return t.document&&t.location?{x:t.pageXOffset,y:t.pageYOffset,maxX:document.documentElement.scrollWidth-document.documentElement.clientWidth,maxY:document.documentElement.scrollHeight-document.documentElement.clientHeight}:{x:e.scrollLeft,y:e.scrollTop,maxX:e.scrollWidth-e.clientWidth,maxY:e.scrollHeight-e.clientHeight}},Tb=n=>{const t=Ve(n);return t.maxX>0||t.maxY>0},Xr=class{static getFps(){return this.fps}static startLoop(t={}){this.setOptions(t),this.loopStarted||(this.loopStarted=!0,window.requestAnimationFrame(this.loop.bind(this)))}static setOptions(t){this.maxFPS=typeof t.maxFPS=="number"?t.maxFPS:this.maxFPS}static loop(t){if(tthis.lastFpsUpdate+1e3&&(this.fps=.25*this.framesThisSecond+.75*this.fps,this.lastFpsUpdate=t,this.framesThisSecond=0),this.framesThisSecond++;let s=0;for(;this.delta>=this.timestep;)if(this.update(this.timestep),this.delta-=this.timestep,++s>=240){this.panic();break}this.render(this.delta/this.timestep),this.end(this.fps),this.frameID=window.requestAnimationFrame(this.loop.bind(this))}static begin(t,e){this.events.trigger("begin",t,e)}static render(t){this.events.trigger("render",t)}static update(t){this.events.trigger("update",t)}static end(t){this.events.trigger("end",t)}static panic(){this.delta=0}constructor(t={}){Xr.setOptions(t)}};let ee=Xr;a(ee,"events",new $("gameloop")),a(ee,"maxFPS",60),a(ee,"fps",60),a(ee,"timestep",1e3/60),a(ee,"loopStarted",!1),a(ee,"lastFrameTimeMs",0),a(ee,"delta",0),a(ee,"framesThisSecond",0),a(ee,"lastFpsUpdate",0),a(ee,"frameID",0);class Cb{constructor(t,e={}){a(this,"touchCapable","ontouchstart"in window);a(this,"direction",1);a(this,"limit");a(this,"options");a(this,"el");a(this,"_pause",!1);a(this,"velocity",.008);a(this,"move",0);a(this,"lastMove",0);a(this,"angle","horizontal");a(this,"pauseOnHover",!0);a(this,"resumeTimer",null);a(this,"onResize",jt(this._onResize.bind(this)));a(this,"onScroll",jt(this._onScroll.bind(this)));this.el=t,this.options=e,this.direction=this.options.direction||this.direction,this.velocity=this.options.velocity||this.velocity,this.angle=this.options.angle||this.angle,this.pauseOnHover=typeof this.options.pauseOnHover=="boolean"?this.options.pauseOnHover:this.pauseOnHover,this.limit=this.getLimit(this.el),this.move=this.getPosition(),this.direction===-1?this.el.scrollLeft=this.limit:this.el.scrollLeft=0,this.addEventListeners(),ee.startLoop({maxFPS:60})}update(){this.limit=this.getLimit(this.el),this.setPosition()}destroy(){this.removeEventListeners()}pause(){this.el.style.scrollBehavior="",this._pause=!0}resume(t=0){this._pause&&(this.stopResumeTimeout(),this.resumeTimer=window.setTimeout(()=>{this.setPosition(),this._pause=!1,this.el.style.scrollBehavior="auto"},t))}addEventListeners(){this.removeEventListeners(),this.onResize=this.onResize.bind(this),this.onMouseIn=this.onMouseIn.bind(this),this.onMouseOut=this.onMouseOut.bind(this),this.onMouseUp=this.onMouseUp.bind(this),this.onScroll=this.onScroll.bind(this),this.render=this.render.bind(this),this.updateMove=this.updateMove.bind(this),window.addEventListener("resize",this.onResize,{passive:!0}),this.el.addEventListener("mouseenter",this.onMouseIn,{passive:!0}),this.el.addEventListener("mouseover",this.onMouseIn,{passive:!0}),this.el.addEventListener("focusin",this.onMouseIn,{passive:!0}),this.el.addEventListener("touchstart",this.onMouseIn,{passive:!0}),this.el.addEventListener("mouseleave",this.onMouseOut,{passive:!0}),this.el.addEventListener("focusout",this.onMouseOut,{passive:!0}),this.el.addEventListener("mouseup",this.onMouseUp,{passive:!0}),this.el.addEventListener("touchend",this.onMouseUp,{passive:!0}),this.touchCapable?(this.el.addEventListener("scroll",this.onMouseUp,{passive:!0}),this.el.addEventListener("scrollend",this.onMouseUp,{passive:!0}),this.el.addEventListener("scrollended",this.onMouseUp,{passive:!0})):(this.el.addEventListener("scroll",this.onScroll,{passive:!0}),this.el.addEventListener("scrollend",this.onScroll,{passive:!0}),this.el.addEventListener("scrollended",this.onScroll,{passive:!0})),ee.events.on("render",this.render),ee.events.on("update",this.updateMove)}removeEventListeners(){window.removeEventListener("resize",this.onResize),this.el.removeEventListener("mouseenter",this.onMouseIn),this.el.removeEventListener("mouseover",this.onMouseIn),this.el.removeEventListener("focusin",this.onMouseIn),this.el.removeEventListener("touchstart",this.onMouseIn),this.el.removeEventListener("mouseleave",this.onMouseOut),this.el.removeEventListener("focusout",this.onMouseOut),this.el.removeEventListener("mouseup",this.onMouseUp),this.el.removeEventListener("touchend",this.onMouseUp),this.touchCapable?(this.el.removeEventListener("scroll",this.onMouseUp),this.el.removeEventListener("scrollend",this.onMouseUp),this.el.removeEventListener("scrollended",this.onMouseUp)):(this.el.removeEventListener("scroll",this.onScroll),this.el.removeEventListener("scrollend",this.onScroll),this.el.removeEventListener("scrollended",this.onScroll)),ee.events.off("render",this.render),ee.events.off("update",this.updateMove)}onMouseIn(){this.pauseOnHover&&this.pause()}onMouseOut(){this.resume(200)}onMouseUp(){this.resume(1e3)}_onResize(){this.limit=this.getLimit(this.el),this.resume(200)}_onScroll(){this.stopResumeTimeout()}stopResumeTimeout(){this.resumeTimer!==null&&(clearTimeout(this.resumeTimer),this.resumeTimer=null)}getPosition(){return(this.angle==="vertical"?this.el.scrollTop:this.el.scrollLeft)||0}setPosition(){this.move=this.getPosition()}getLimit(t){return this.angle==="vertical"?Ve(t).maxY:Ve(t).maxX}render(){this._pause||this.scroll(this.move)}updateMove(t){if(this._pause)return;this.lastMove=this.move;const e=this.velocity*this.direction*t;this.move+=e,this.move<=0&&this.direction!==1&&(this.direction=1),this.move>=this.limit&&this.direction!==-1&&(this.direction=-1)}scroll(t){this.angle==="vertical"?this.el.scrollTop=t:this.el.scrollLeft=t}}class kh{constructor(t,e={detectGlobalMove:!0}){a(this,"options");a(this,"lastClientX",0);a(this,"lastClientY",0);a(this,"el");a(this,"pushed",!1);a(this,"touchCapable","ontouchstart"in window);a(this,"checkDraggable",jt(this._checkDraggable.bind(this)));if(this.el=t,this.options=e,this.touchCapable)return this;this.onMouseDown=this.onMouseDown.bind(this),this.onMouseUp=this.onMouseUp.bind(this),this.onMouseMove=this.onMouseMove.bind(this),this.checkDraggable=this.checkDraggable.bind(this),t.removeEventListener("mousedown",this.onMouseDown),t.addEventListener("mousedown",this.onMouseDown,{passive:!0}),window.addEventListener("resize",this.checkDraggable),this.options.detectGlobalMove?(window.removeEventListener("mouseup",this.onMouseUp),window.removeEventListener("mousemove",this.onMouseMove),window.addEventListener("mouseup",this.onMouseUp,{passive:!0}),window.addEventListener("mousemove",this.onMouseMove,{passive:!0})):(t.removeEventListener("mouseup",this.onMouseUp),t.removeEventListener("mousemove",this.onMouseMove),t.addEventListener("mouseup",this.onMouseUp,{passive:!0}),t.addEventListener("mousemove",this.onMouseMove,{passive:!0})),this.checkDraggable()}destroy(){this.removeEventListeners(),this.el.classList.remove("draggable")}_checkDraggable(){Tb(this.el)?this.el.classList.add("draggable"):this.el.classList.remove("draggable")}onMouseDown(t){this.pushed=!0,this.lastClientX=t.clientX,this.lastClientY=t.clientY}onMouseUp(){this.pushed=!1}onMouseMove(t){let e=0,s=0;this.pushed&&(this.el.scrollLeft-=e=-this.lastClientX+(this.lastClientX=t.clientX),this.el.scrollTop-=s=-this.lastClientY+(this.lastClientY=t.clientY),this.el===document.body&&(document.documentElement&&(this.el=document.documentElement),this.el.scrollLeft-=e,this.el.scrollTop-=s))}removeEventListeners(){window.removeEventListener("resize",this.checkDraggable),this.el.removeEventListener("mousedown",this.onMouseDown),this.el.removeEventListener("mouseup",this.onMouseUp),this.el.removeEventListener("mousemove",this.onMouseMove)}}class xh{constructor(t){a(this,"touchCapable","ontouchstart"in window);a(this,"el");this.el=t}get isTouchCapable(){return this.touchCapable}triggerCustomEvent(t,e,s){s.originalEvent=e,s.target=e.target;const i=new CustomEvent(t,{detail:s});this.el.dispatchEvent(i)}}class Ih extends xh{constructor(e,s={}){super(e);a(this,"isScrolling",!1);a(this,"_scrollEvent");a(this,"delay",300);a(this,"startPosition",null);a(this,"endPosition",null);a(this,"scrollTimer",null);a(this,"onScrollEvent",this._onScrollEvent.bind(this));a(this,"scroll",this._scroll.bind(this));this.el=e,this.delay=s.delay||this.delay,this.startPosition=Ve(this.el),this._scrollEvent=this.touchCapable?["touchmove","scrollend","scroll"]:["scroll","scrollend"],this.removeEventListeners(),this.addEventListeners()}destroy(){this.removeEventListeners()}get scrollEvent(){return this._scrollEvent}getScrollDir(e,s){return!e||!s?"unknown":e.x>s.x?"right":e.xs.y?"down":e.y{this.scrollended(e)},this.delay),!0):!1}scrollended(e){this.isScrolling=!1,this.endPosition=Ve(this.el);const s=this.getScrollDir(this.startPosition,this.endPosition);this.triggerCustomEvent("scrollended",e,{startPosition:this.startPosition,endPosition:this.endPosition,direction:s})}scrollstart(e){this.isScrolling=!0,this.startPosition=Ve(this.el),this.triggerCustomEvent("scrollstart",e,{startPosition:this.startPosition})}_scroll(e){const s=Ve(this.el),i=this.getScrollDir(this.startPosition,s);this.triggerCustomEvent("scroll"+i,e,{startPosition:this.startPosition,currentPosition:s,direction:i}),this.triggerCustomEvent("scrolling",e,{startPosition:this.startPosition,currentPosition:s,direction:i})}}var sr=(n=>(n[n.HAVE_NOTHING=0]="HAVE_NOTHING",n[n.HAVE_METADATA=1]="HAVE_METADATA",n[n.HAVE_CURRENT_DATA=2]="HAVE_CURRENT_DATA",n[n.HAVE_FUTURE_DATA=3]="HAVE_FUTURE_DATA",n[n.HAVE_ENOUGH_DATA=4]="HAVE_ENOUGH_DATA",n))(sr||{}),P=(n=>(n[n.DEFAULT=0]="DEFAULT",n[n.TARGET=1]="TARGET",n[n.CHANGED=2]="CHANGED",n))(P||{});class Lb extends xh{constructor(e,s={tapPixelRange:5,swipeHThreshold:50,swipeVThreshold:50,tapholdThreshold:750,doubletapInterval:500,shakeThreshold:15,touchCapable:"ontouchstart"in window,startevent:["touchstart"],endevent:["touchend"],moveevent:["touchmove"],tapevent:["tap"]}){super(e);a(this,"startPosition",{x:0,y:0});a(this,"endPosition",{x:0,y:0});a(this,"originalCoord",{x:0,y:0});a(this,"finalCoord",{x:0,y:0});a(this,"startEvnt",null);a(this,"tapheld",!1);a(this,"firstTap",null);a(this,"cooling",!1);a(this,"doubletapped",!1);a(this,"lastTouch",0);a(this,"hasSwiped",!1);a(this,"tapStarted",!1);a(this,"swipeStarted",!1);a(this,"startTime",0);a(this,"holdTimer",-1);a(this,"tapTimer",-1);a(this,"actionTimer",-1);a(this,"settings");this.el=e,s.startevent=s.touchCapable?["touchstart"]:["mousedown"],s.endevent=s.touchCapable?["touchend"]:["mouseup"],s.moveevent=s.touchCapable?["touchmove"]:["mousemove"],s.tapevent=s.touchCapable?["tap"]:["click"],this.settings=s,this.onStartEvent=this.onStartEvent.bind(this),this.onMoveEvent=this.onMoveEvent.bind(this),this.onEndEvent=this.onEndEvent.bind(this),this.addEventListeners()}get isTouchCapable(){return this.settings.touchCapable}get startEvent(){return this.settings.startevent}get endEvent(){return this.settings.endevent}get moveEvent(){return this.settings.moveevent}get tapEvent(){return this.settings.tapevent}set swipeThresholdX(e){if(typeof e!="number")throw new Error("Threshold parameter must be a type of number");this.settings.swipeHThreshold=e}set swipeThresholdY(e){if(typeof e!="number")throw new Error("Threshold parameter must be a type of number");this.settings.swipeVThreshold=e}set doubleTapInt(e){if(typeof e!="number")throw new Error("Interval parameter must be a type of number");this.settings.doubletapInterval=e}set tapHoldThreshold(e){if(typeof e!="number")throw new Error("Threshold parameter must be a type of number");this.settings.tapholdThreshold=e}set tapRange(e){if(typeof e!="number")throw new Error("Ranger parameter must be a type of number");this.settings.tapPixelRange=e}destroy(){this.removeEventListeners()}removeEventListeners(){for(const e of this.settings.startevent)this.el.removeEventListener(e,this.onStartEvent);for(const e of this.settings.moveevent)this.el.removeEventListener(e,this.onMoveEvent);for(const e of this.settings.endevent)this.el.removeEventListener(e,this.onEndEvent)}getSwipeDir(e,s,i=this.settings.swipeHThreshold,r=this.settings.swipeVThreshold){let o="";return e.y>s.y&&e.y-s.y>r&&(o="swipeup"),e.xi&&(o="swiperight"),e.yr&&(o="swipedown"),e.x>s.x&&e.x-s.x>i&&(o="swipeleft"),o}getPosition(e,s=P.DEFAULT,i=0){let r;switch(s){case P.CHANGED:r=e.changedTouches;break;case P.TARGET:r=e.targetTouches;break;default:r=e.touches;break}return{x:this.settings.touchCapable?r[i].pageX:e.pageX,y:this.settings.touchCapable?r[i].pageY:e.pageY}}getOffset(e,s=P.DEFAULT,i=0){const r=this.el.getBoundingClientRect();let o;switch(s){case P.CHANGED:o=e.changedTouches;break;case P.TARGET:o=e.targetTouches;break;default:o=e.touches;break}return{x:this.settings.touchCapable?Math.round(o[i].pageX-(r?r.left:0)):Math.round(e.pageX-(r?r.left:0)),y:this.settings.touchCapable?Math.round(o[i].pageY-(r?r.top:0)):Math.round(e.pageY-(r?r.top:0))}}getTouchData(e,s=!1,i=P.DEFAULT,r=P.CHANGED){const o={position:this.getPosition(e,i),offset:this.getOffset(e,r),time:Date.now()};return s&&(o.index=ko(e.target)),o}addEventListeners(){for(const e of this.settings.startevent)this.el.addEventListener(e,this.onStartEvent,{passive:!0});for(const e of this.settings.moveevent)this.el.addEventListener(e,this.onMoveEvent,{passive:!0});for(const e of this.settings.endevent)this.el.addEventListener(e,this.onEndEvent,{passive:!0})}onStartEvent(e){return e.which&&e.which!==1?!1:(this.startPosition=this.getPosition(e,P.TARGET),this.endPosition={x:this.startPosition.x,y:this.startPosition.y},this.startTime=Date.now(),this.doubletapped=!1,this.firstTap||(this.firstTap=this.getTouchData(e,!0,P.DEFAULT,P.CHANGED)),this.tapStarted=!0,this.swipeStarted=!0,this.originalCoord=this.getPosition(e,P.TARGET),this.finalCoord=this.getPosition(e,P.TARGET),this.startEvnt=this.getTouchData(e,!1,P.DEFAULT,P.CHANGED),this.tapstart(e),this.taphold(e),!0)}onEndEvent(e){return this.endPosition=this.getPosition(e,P.CHANGED),this.tapheld=!1,window.clearTimeout(this.holdTimer),this.tapend(e),this.swipeend(e),this.tap(e),this.doubletap(e),this.singletap(e),this.tapStarted=!1,this.swipeStarted=!1,this.hasSwiped=!1,!0}onMoveEvent(e){return this.endPosition=this.getPosition(e,P.TARGET),this.finalCoord=this.getPosition(e,P.TARGET),this.tapmove(e),this.swipe(e),!0}tapstart(e){return this.triggerCustomEvent("tapstart",e,this.getTouchData(e,!1,P.DEFAULT,P.CHANGED)),!0}tapmove(e){return this.triggerCustomEvent("tapmove",e,this.getTouchData(e,!1,P.DEFAULT,P.CHANGED)),!0}tapend(e){return this.triggerCustomEvent("tapend",e,this.getTouchData(e,!1,P.CHANGED,P.CHANGED)),!0}taphold(e){return this.holdTimer=window.setTimeout(()=>{const s={x:this.startPosition.x-this.endPosition.x,y:this.startPosition.y-this.endPosition.y};if(this.startPosition.x===this.endPosition.x&&this.startPosition.y===this.endPosition.y||s.x>=-this.settings.tapPixelRange&&s.x<=this.settings.tapPixelRange&&s.y>=-this.settings.tapPixelRange&&s.y<=this.settings.tapPixelRange){this.tapheld=!0;const r=Date.now()-this.startTime,o=e.targetTouches?e.targetTouches.length:1,l=new Array;for(let d=0;d1?"taphold"+o:"taphold",h={touches:l,time:Date.now(),duration:r};this.triggerCustomEvent(c,e,h)}},this.settings.tapholdThreshold),!0}doubletap(e){const s=Date.now(),i=Number(this.lastTouch)||s+1,r=s-i;if(this.actionTimer!==-1&&window.clearTimeout(this.actionTimer),r100&&this.firstTap&&ko(e.target)===this.firstTap.index){this.doubletapped=!0,window.clearTimeout(this.tapTimer);const o=this.getTouchData(e,!0,P.CHANGED,P.CHANGED),l={firstTap:this.firstTap,secondTap:o,interval:o.time-this.firstTap.time};this.cooling||(this.triggerCustomEvent("doubletap",e,l),this.firstTap=null),this.cooling=!0,window.setTimeout(()=>{this.cooling=!1},this.settings.doubletapInterval)}else this.actionTimer=window.setTimeout(()=>{this.firstTap=null,window.clearTimeout(this.actionTimer)},this.settings.doubletapInterval,[e]);this.lastTouch=s}singletap(e){this.tapTimer=window.setTimeout(()=>{const s={x:this.startPosition.x-this.endPosition.x,y:this.startPosition.y-this.endPosition.y};if(!this.doubletapped&&!this.tapheld&&(this.startPosition.x===this.endPosition.x&&this.startPosition.y===this.endPosition.y||s.x>=-this.settings.tapPixelRange&&s.x<=this.settings.tapPixelRange&&s.y>=-this.settings.tapPixelRange&&s.y<=this.settings.tapPixelRange)){const i=this.getTouchData(e,!1,P.CHANGED,P.CHANGED);i.time-this.startTime=-this.settings.tapPixelRange&&s.x<=this.settings.tapPixelRange&&s.y>=-this.settings.tapPixelRange&&s.y<=this.settings.tapPixelRange)){const i=e.targetTouches?e.targetTouches.length:1,r=new Array;for(let c=0;c1?"tap"+i:"tap";this.triggerCustomEvent(l,e,o)}}swipe(e){const s=this.getSwipeDir(this.originalCoord,this.finalCoord);if(s&&this.swipeStarted&&this.startEvnt){this.originalCoord.x=0,this.originalCoord.y=0,this.finalCoord.x=0,this.finalCoord.y=0,this.swipeStarted=!1;const i=this.getTouchData(e,!1,P.DEFAULT,P.CHANGED),r=Math.abs(this.startEvnt.position.x-i.position.x),o=Math.abs(this.startEvnt.position.y-i.position.y),l={startEvnt:this.startEvnt,endEvnt:i,direction:s.replace("swipe",""),xAmount:r,yAmount:o,duration:i.time-this.startEvnt.time};this.hasSwiped=!0,this.triggerCustomEvent("swipe",e,l),this.triggerCustomEvent(s,e,l)}}swipeend(e){const s=this.getTouchData(e,!1,P.CHANGED,P.CHANGED);if(this.hasSwiped&&this.startEvnt){const i=this.getSwipeDir(this.startEvnt.position,s.position),r=Math.abs(this.startEvnt.position.x-s.position.x),o=Math.abs(this.startEvnt.position.y-s.position.y),l={startEvnt:this.startEvnt,endEvnt:s,direction:i.replace("swipe",""),xAmount:r,yAmount:o,duration:s.time-this.startEvnt.time};this.triggerCustomEvent("swipeend",e,l)}}}var kb={exports:{}},Nn={exports:{}},Ba;function xb(){return Ba||(Ba=1,function(n){(function(t,e){n.exports?n.exports=e():t.EvEmitter=e()})(typeof window<"u"?window:Ql,function(){function t(){}let e=t.prototype;return e.on=function(s,i){if(!s||!i)return this;let r=this._events=this._events||{},o=r[s]=r[s]||[];return o.includes(i)||o.push(i),this},e.once=function(s,i){if(!s||!i)return this;this.on(s,i);let r=this._onceEvents=this._onceEvents||{},o=r[s]=r[s]||{};return o[i]=!0,this},e.off=function(s,i){let r=this._events&&this._events[s];if(!r||!r.length)return this;let o=r.indexOf(i);return o!=-1&&r.splice(o,1),this},e.emitEvent=function(s,i){let r=this._events&&this._events[s];if(!r||!r.length)return this;r=r.slice(0),i=i||[];let o=this._onceEvents&&this._onceEvents[s];for(let l of r)o&&o[l]&&(this.off(s,l),delete o[l]),l.apply(this,i);return this},e.allOff=function(){return delete this._events,delete this._onceEvents,this},t})}(Nn)),Nn.exports}/*! +`,url:this.scope.url||window.location.href})}catch(i){if(i.name==="AbortError")return;console.error(`Error ${i.name}: ${i.message}`,i)}else return this.updateShareURLs(),(s=this.dropdown)==null?void 0:s.toggle()}async beforeBind(){await super.beforeBind()}async afterBind(){this.initDropdown(),this.debug("afterBind",this.scope),this.scope.shareItems=this.getDefaultShareServices(),await super.afterBind()}requiredAttributes(){return[]}template(){return this&&ie(this)&&(this.scope.labelTemplate=this.innerHTML),Ub}};let as=Es;a(as,"tagName","bs5-share"),a(as,"count",0);const $e=n=>{const t=n,e=n;return t.document&&t.location?{x:t.pageXOffset,y:t.pageYOffset,maxX:document.documentElement.scrollWidth-document.documentElement.clientWidth,maxY:document.documentElement.scrollHeight-document.documentElement.clientHeight}:{x:e.scrollLeft,y:e.scrollTop,maxX:e.scrollWidth-e.clientWidth,maxY:e.scrollHeight-e.clientHeight}},Wb=n=>{const t=$e(n);return t.maxX>0||t.maxY>0},Yr=class{static getFps(){return this.fps}static startLoop(t={}){this.setOptions(t),this.loopStarted||(this.loopStarted=!0,window.requestAnimationFrame(this.loop.bind(this)))}static setOptions(t){this.maxFPS=typeof t.maxFPS=="number"?t.maxFPS:this.maxFPS}static loop(t){if(tthis.lastFpsUpdate+1e3&&(this.fps=.25*this.framesThisSecond+.75*this.fps,this.lastFpsUpdate=t,this.framesThisSecond=0),this.framesThisSecond++;let s=0;for(;this.delta>=this.timestep;)if(this.update(this.timestep),this.delta-=this.timestep,++s>=240){this.panic();break}this.render(this.delta/this.timestep),this.end(this.fps),this.frameID=window.requestAnimationFrame(this.loop.bind(this))}static begin(t,e){this.events.trigger("begin",t,e)}static render(t){this.events.trigger("render",t)}static update(t){this.events.trigger("update",t)}static end(t){this.events.trigger("end",t)}static panic(){this.delta=0}constructor(t={}){Yr.setOptions(t)}};let ee=Yr;a(ee,"events",new $("gameloop")),a(ee,"maxFPS",60),a(ee,"fps",60),a(ee,"timestep",1e3/60),a(ee,"loopStarted",!1),a(ee,"lastFrameTimeMs",0),a(ee,"delta",0),a(ee,"framesThisSecond",0),a(ee,"lastFpsUpdate",0),a(ee,"frameID",0);class zb{constructor(t,e={}){a(this,"touchCapable","ontouchstart"in window);a(this,"direction",1);a(this,"limit");a(this,"options");a(this,"el");a(this,"_pause",!1);a(this,"velocity",.008);a(this,"move",0);a(this,"lastMove",0);a(this,"angle","horizontal");a(this,"pauseOnHover",!0);a(this,"resumeTimer",null);a(this,"onResize",Ft(this._onResize.bind(this)));a(this,"onScroll",Ft(this._onScroll.bind(this)));this.el=t,this.options=e,this.direction=this.options.direction||this.direction,this.velocity=this.options.velocity||this.velocity,this.angle=this.options.angle||this.angle,this.pauseOnHover=typeof this.options.pauseOnHover=="boolean"?this.options.pauseOnHover:this.pauseOnHover,this.limit=this.getLimit(this.el),this.move=this.getPosition(),this.direction===-1?this.el.scrollLeft=this.limit:this.el.scrollLeft=0,this.addEventListeners(),ee.startLoop({maxFPS:60})}update(){this.limit=this.getLimit(this.el),this.setPosition()}destroy(){this.removeEventListeners()}pause(){this.el.style.scrollBehavior="",this._pause=!0}resume(t=0){this._pause&&(this.stopResumeTimeout(),this.resumeTimer=window.setTimeout(()=>{this.setPosition(),this._pause=!1,this.el.style.scrollBehavior="auto"},t))}addEventListeners(){this.removeEventListeners(),this.onResize=this.onResize.bind(this),this.onMouseIn=this.onMouseIn.bind(this),this.onMouseOut=this.onMouseOut.bind(this),this.onMouseUp=this.onMouseUp.bind(this),this.onScroll=this.onScroll.bind(this),this.render=this.render.bind(this),this.updateMove=this.updateMove.bind(this),window.addEventListener("resize",this.onResize,{passive:!0}),this.el.addEventListener("mouseenter",this.onMouseIn,{passive:!0}),this.el.addEventListener("mouseover",this.onMouseIn,{passive:!0}),this.el.addEventListener("focusin",this.onMouseIn,{passive:!0}),this.el.addEventListener("touchstart",this.onMouseIn,{passive:!0}),this.el.addEventListener("mouseleave",this.onMouseOut,{passive:!0}),this.el.addEventListener("focusout",this.onMouseOut,{passive:!0}),this.el.addEventListener("mouseup",this.onMouseUp,{passive:!0}),this.el.addEventListener("touchend",this.onMouseUp,{passive:!0}),this.touchCapable?(this.el.addEventListener("scroll",this.onMouseUp,{passive:!0}),this.el.addEventListener("scrollend",this.onMouseUp,{passive:!0}),this.el.addEventListener("scrollended",this.onMouseUp,{passive:!0})):(this.el.addEventListener("scroll",this.onScroll,{passive:!0}),this.el.addEventListener("scrollend",this.onScroll,{passive:!0}),this.el.addEventListener("scrollended",this.onScroll,{passive:!0})),ee.events.on("render",this.render),ee.events.on("update",this.updateMove)}removeEventListeners(){window.removeEventListener("resize",this.onResize),this.el.removeEventListener("mouseenter",this.onMouseIn),this.el.removeEventListener("mouseover",this.onMouseIn),this.el.removeEventListener("focusin",this.onMouseIn),this.el.removeEventListener("touchstart",this.onMouseIn),this.el.removeEventListener("mouseleave",this.onMouseOut),this.el.removeEventListener("focusout",this.onMouseOut),this.el.removeEventListener("mouseup",this.onMouseUp),this.el.removeEventListener("touchend",this.onMouseUp),this.touchCapable?(this.el.removeEventListener("scroll",this.onMouseUp),this.el.removeEventListener("scrollend",this.onMouseUp),this.el.removeEventListener("scrollended",this.onMouseUp)):(this.el.removeEventListener("scroll",this.onScroll),this.el.removeEventListener("scrollend",this.onScroll),this.el.removeEventListener("scrollended",this.onScroll)),ee.events.off("render",this.render),ee.events.off("update",this.updateMove)}onMouseIn(){this.pauseOnHover&&this.pause()}onMouseOut(){this.resume(200)}onMouseUp(){this.resume(1e3)}_onResize(){this.limit=this.getLimit(this.el),this.resume(200)}_onScroll(){this.stopResumeTimeout()}stopResumeTimeout(){this.resumeTimer!==null&&(clearTimeout(this.resumeTimer),this.resumeTimer=null)}getPosition(){return(this.angle==="vertical"?this.el.scrollTop:this.el.scrollLeft)||0}setPosition(){this.move=this.getPosition()}getLimit(t){return this.angle==="vertical"?$e(t).maxY:$e(t).maxX}render(){this._pause||this.scroll(this.move)}updateMove(t){if(this._pause)return;this.lastMove=this.move;const e=this.velocity*this.direction*t;this.move+=e,this.move<=0&&this.direction!==1&&(this.direction=1),this.move>=this.limit&&this.direction!==-1&&(this.direction=-1)}scroll(t){this.angle==="vertical"?this.el.scrollTop=t:this.el.scrollLeft=t}}class ch{constructor(t,e={detectGlobalMove:!0}){a(this,"options");a(this,"lastClientX",0);a(this,"lastClientY",0);a(this,"el");a(this,"pushed",!1);a(this,"touchCapable","ontouchstart"in window);a(this,"checkDraggable",Ft(this._checkDraggable.bind(this)));if(this.el=t,this.options=e,this.touchCapable)return this;this.onMouseDown=this.onMouseDown.bind(this),this.onMouseUp=this.onMouseUp.bind(this),this.onMouseMove=this.onMouseMove.bind(this),this.checkDraggable=this.checkDraggable.bind(this),t.removeEventListener("mousedown",this.onMouseDown),t.addEventListener("mousedown",this.onMouseDown,{passive:!0}),window.addEventListener("resize",this.checkDraggable),this.options.detectGlobalMove?(window.removeEventListener("mouseup",this.onMouseUp),window.removeEventListener("mousemove",this.onMouseMove),window.addEventListener("mouseup",this.onMouseUp,{passive:!0}),window.addEventListener("mousemove",this.onMouseMove,{passive:!0})):(t.removeEventListener("mouseup",this.onMouseUp),t.removeEventListener("mousemove",this.onMouseMove),t.addEventListener("mouseup",this.onMouseUp,{passive:!0}),t.addEventListener("mousemove",this.onMouseMove,{passive:!0})),this.checkDraggable()}destroy(){this.removeEventListeners(),this.el.classList.remove("draggable")}_checkDraggable(){Wb(this.el)?this.el.classList.add("draggable"):this.el.classList.remove("draggable")}onMouseDown(t){this.pushed=!0,this.lastClientX=t.clientX,this.lastClientY=t.clientY}onMouseUp(){this.pushed=!1}onMouseMove(t){let e=0,s=0;this.pushed&&(this.el.scrollLeft-=e=-this.lastClientX+(this.lastClientX=t.clientX),this.el.scrollTop-=s=-this.lastClientY+(this.lastClientY=t.clientY),this.el===document.body&&(document.documentElement&&(this.el=document.documentElement),this.el.scrollLeft-=e,this.el.scrollTop-=s))}removeEventListeners(){window.removeEventListener("resize",this.checkDraggable),this.el.removeEventListener("mousedown",this.onMouseDown),this.el.removeEventListener("mouseup",this.onMouseUp),this.el.removeEventListener("mousemove",this.onMouseMove)}}class hh{constructor(t){a(this,"touchCapable","ontouchstart"in window);a(this,"el");this.el=t}get isTouchCapable(){return this.touchCapable}triggerCustomEvent(t,e,s){s.originalEvent=e,s.target=e.target;const i=new CustomEvent(t,{detail:s});this.el.dispatchEvent(i)}}class dh extends hh{constructor(e,s={}){super(e);a(this,"isScrolling",!1);a(this,"_scrollEvent");a(this,"delay",300);a(this,"startPosition",null);a(this,"endPosition",null);a(this,"scrollTimer",null);a(this,"onScrollEvent",this._onScrollEvent.bind(this));a(this,"scroll",this._scroll.bind(this));this.el=e,this.delay=s.delay||this.delay,this.startPosition=$e(this.el),this._scrollEvent=this.touchCapable?["touchmove","scrollend","scroll"]:["scroll","scrollend"],this.removeEventListeners(),this.addEventListeners()}destroy(){this.removeEventListeners()}get scrollEvent(){return this._scrollEvent}getScrollDir(e,s){return!e||!s?"unknown":e.x>s.x?"right":e.xs.y?"down":e.y{this.scrollended(e)},this.delay),!0):!1}scrollended(e){this.isScrolling=!1,this.endPosition=$e(this.el);const s=this.getScrollDir(this.startPosition,this.endPosition);this.triggerCustomEvent("scrollended",e,{startPosition:this.startPosition,endPosition:this.endPosition,direction:s})}scrollstart(e){this.isScrolling=!0,this.startPosition=$e(this.el),this.triggerCustomEvent("scrollstart",e,{startPosition:this.startPosition})}_scroll(e){const s=$e(this.el),i=this.getScrollDir(this.startPosition,s);this.triggerCustomEvent("scroll"+i,e,{startPosition:this.startPosition,currentPosition:s,direction:i}),this.triggerCustomEvent("scrolling",e,{startPosition:this.startPosition,currentPosition:s,direction:i})}}var Xn=(n=>(n[n.HAVE_NOTHING=0]="HAVE_NOTHING",n[n.HAVE_METADATA=1]="HAVE_METADATA",n[n.HAVE_CURRENT_DATA=2]="HAVE_CURRENT_DATA",n[n.HAVE_FUTURE_DATA=3]="HAVE_FUTURE_DATA",n[n.HAVE_ENOUGH_DATA=4]="HAVE_ENOUGH_DATA",n))(Xn||{}),P=(n=>(n[n.DEFAULT=0]="DEFAULT",n[n.TARGET=1]="TARGET",n[n.CHANGED=2]="CHANGED",n))(P||{});class qb extends hh{constructor(e,s={tapPixelRange:5,swipeHThreshold:50,swipeVThreshold:50,tapholdThreshold:750,doubletapInterval:500,shakeThreshold:15,touchCapable:"ontouchstart"in window,startevent:["touchstart"],endevent:["touchend"],moveevent:["touchmove"],tapevent:["tap"]}){super(e);a(this,"startPosition",{x:0,y:0});a(this,"endPosition",{x:0,y:0});a(this,"originalCoord",{x:0,y:0});a(this,"finalCoord",{x:0,y:0});a(this,"startEvnt",null);a(this,"tapheld",!1);a(this,"firstTap",null);a(this,"cooling",!1);a(this,"doubletapped",!1);a(this,"lastTouch",0);a(this,"hasSwiped",!1);a(this,"tapStarted",!1);a(this,"swipeStarted",!1);a(this,"startTime",0);a(this,"holdTimer",-1);a(this,"tapTimer",-1);a(this,"actionTimer",-1);a(this,"settings");this.el=e,s.startevent=s.touchCapable?["touchstart"]:["mousedown"],s.endevent=s.touchCapable?["touchend"]:["mouseup"],s.moveevent=s.touchCapable?["touchmove"]:["mousemove"],s.tapevent=s.touchCapable?["tap"]:["click"],this.settings=s,this.onStartEvent=this.onStartEvent.bind(this),this.onMoveEvent=this.onMoveEvent.bind(this),this.onEndEvent=this.onEndEvent.bind(this),this.addEventListeners()}get isTouchCapable(){return this.settings.touchCapable}get startEvent(){return this.settings.startevent}get endEvent(){return this.settings.endevent}get moveEvent(){return this.settings.moveevent}get tapEvent(){return this.settings.tapevent}set swipeThresholdX(e){if(typeof e!="number")throw new Error("Threshold parameter must be a type of number");this.settings.swipeHThreshold=e}set swipeThresholdY(e){if(typeof e!="number")throw new Error("Threshold parameter must be a type of number");this.settings.swipeVThreshold=e}set doubleTapInt(e){if(typeof e!="number")throw new Error("Interval parameter must be a type of number");this.settings.doubletapInterval=e}set tapHoldThreshold(e){if(typeof e!="number")throw new Error("Threshold parameter must be a type of number");this.settings.tapholdThreshold=e}set tapRange(e){if(typeof e!="number")throw new Error("Ranger parameter must be a type of number");this.settings.tapPixelRange=e}destroy(){this.removeEventListeners()}removeEventListeners(){for(const e of this.settings.startevent)this.el.removeEventListener(e,this.onStartEvent);for(const e of this.settings.moveevent)this.el.removeEventListener(e,this.onMoveEvent);for(const e of this.settings.endevent)this.el.removeEventListener(e,this.onEndEvent)}getSwipeDir(e,s,i=this.settings.swipeHThreshold,r=this.settings.swipeVThreshold){let o="";return e.y>s.y&&e.y-s.y>r&&(o="swipeup"),e.xi&&(o="swiperight"),e.yr&&(o="swipedown"),e.x>s.x&&e.x-s.x>i&&(o="swipeleft"),o}getPosition(e,s=P.DEFAULT,i=0){let r;switch(s){case P.CHANGED:r=e.changedTouches;break;case P.TARGET:r=e.targetTouches;break;default:r=e.touches;break}return{x:this.settings.touchCapable?r[i].pageX:e.pageX,y:this.settings.touchCapable?r[i].pageY:e.pageY}}getOffset(e,s=P.DEFAULT,i=0){const r=this.el.getBoundingClientRect();let o;switch(s){case P.CHANGED:o=e.changedTouches;break;case P.TARGET:o=e.targetTouches;break;default:o=e.touches;break}return{x:this.settings.touchCapable?Math.round(o[i].pageX-(r?r.left:0)):Math.round(e.pageX-(r?r.left:0)),y:this.settings.touchCapable?Math.round(o[i].pageY-(r?r.top:0)):Math.round(e.pageY-(r?r.top:0))}}getTouchData(e,s=!1,i=P.DEFAULT,r=P.CHANGED){const o={position:this.getPosition(e,i),offset:this.getOffset(e,r),time:Date.now()};return s&&(o.index=To(e.target)),o}addEventListeners(){for(const e of this.settings.startevent)this.el.addEventListener(e,this.onStartEvent,{passive:!0});for(const e of this.settings.moveevent)this.el.addEventListener(e,this.onMoveEvent,{passive:!0});for(const e of this.settings.endevent)this.el.addEventListener(e,this.onEndEvent,{passive:!0})}onStartEvent(e){return e.which&&e.which!==1?!1:(this.startPosition=this.getPosition(e,P.TARGET),this.endPosition={x:this.startPosition.x,y:this.startPosition.y},this.startTime=Date.now(),this.doubletapped=!1,this.firstTap||(this.firstTap=this.getTouchData(e,!0,P.DEFAULT,P.CHANGED)),this.tapStarted=!0,this.swipeStarted=!0,this.originalCoord=this.getPosition(e,P.TARGET),this.finalCoord=this.getPosition(e,P.TARGET),this.startEvnt=this.getTouchData(e,!1,P.DEFAULT,P.CHANGED),this.tapstart(e),this.taphold(e),!0)}onEndEvent(e){return this.endPosition=this.getPosition(e,P.CHANGED),this.tapheld=!1,window.clearTimeout(this.holdTimer),this.tapend(e),this.swipeend(e),this.tap(e),this.doubletap(e),this.singletap(e),this.tapStarted=!1,this.swipeStarted=!1,this.hasSwiped=!1,!0}onMoveEvent(e){return this.endPosition=this.getPosition(e,P.TARGET),this.finalCoord=this.getPosition(e,P.TARGET),this.tapmove(e),this.swipe(e),!0}tapstart(e){return this.triggerCustomEvent("tapstart",e,this.getTouchData(e,!1,P.DEFAULT,P.CHANGED)),!0}tapmove(e){return this.triggerCustomEvent("tapmove",e,this.getTouchData(e,!1,P.DEFAULT,P.CHANGED)),!0}tapend(e){return this.triggerCustomEvent("tapend",e,this.getTouchData(e,!1,P.CHANGED,P.CHANGED)),!0}taphold(e){return this.holdTimer=window.setTimeout(()=>{const s={x:this.startPosition.x-this.endPosition.x,y:this.startPosition.y-this.endPosition.y};if(this.startPosition.x===this.endPosition.x&&this.startPosition.y===this.endPosition.y||s.x>=-this.settings.tapPixelRange&&s.x<=this.settings.tapPixelRange&&s.y>=-this.settings.tapPixelRange&&s.y<=this.settings.tapPixelRange){this.tapheld=!0;const r=Date.now()-this.startTime,o=e.targetTouches?e.targetTouches.length:1,l=new Array;for(let d=0;d1?"taphold"+o:"taphold",h={touches:l,time:Date.now(),duration:r};this.triggerCustomEvent(c,e,h)}},this.settings.tapholdThreshold),!0}doubletap(e){const s=Date.now(),i=Number(this.lastTouch)||s+1,r=s-i;if(this.actionTimer!==-1&&window.clearTimeout(this.actionTimer),r100&&this.firstTap&&To(e.target)===this.firstTap.index){this.doubletapped=!0,window.clearTimeout(this.tapTimer);const o=this.getTouchData(e,!0,P.CHANGED,P.CHANGED),l={firstTap:this.firstTap,secondTap:o,interval:o.time-this.firstTap.time};this.cooling||(this.triggerCustomEvent("doubletap",e,l),this.firstTap=null),this.cooling=!0,window.setTimeout(()=>{this.cooling=!1},this.settings.doubletapInterval)}else this.actionTimer=window.setTimeout(()=>{this.firstTap=null,window.clearTimeout(this.actionTimer)},this.settings.doubletapInterval,[e]);this.lastTouch=s}singletap(e){this.tapTimer=window.setTimeout(()=>{const s={x:this.startPosition.x-this.endPosition.x,y:this.startPosition.y-this.endPosition.y};if(!this.doubletapped&&!this.tapheld&&(this.startPosition.x===this.endPosition.x&&this.startPosition.y===this.endPosition.y||s.x>=-this.settings.tapPixelRange&&s.x<=this.settings.tapPixelRange&&s.y>=-this.settings.tapPixelRange&&s.y<=this.settings.tapPixelRange)){const i=this.getTouchData(e,!1,P.CHANGED,P.CHANGED);i.time-this.startTime=-this.settings.tapPixelRange&&s.x<=this.settings.tapPixelRange&&s.y>=-this.settings.tapPixelRange&&s.y<=this.settings.tapPixelRange)){const i=e.targetTouches?e.targetTouches.length:1,r=new Array;for(let c=0;c1?"tap"+i:"tap";this.triggerCustomEvent(l,e,o)}}swipe(e){const s=this.getSwipeDir(this.originalCoord,this.finalCoord);if(s&&this.swipeStarted&&this.startEvnt){this.originalCoord.x=0,this.originalCoord.y=0,this.finalCoord.x=0,this.finalCoord.y=0,this.swipeStarted=!1;const i=this.getTouchData(e,!1,P.DEFAULT,P.CHANGED),r=Math.abs(this.startEvnt.position.x-i.position.x),o=Math.abs(this.startEvnt.position.y-i.position.y),l={startEvnt:this.startEvnt,endEvnt:i,direction:s.replace("swipe",""),xAmount:r,yAmount:o,duration:i.time-this.startEvnt.time};this.hasSwiped=!0,this.triggerCustomEvent("swipe",e,l),this.triggerCustomEvent(s,e,l)}}swipeend(e){const s=this.getTouchData(e,!1,P.CHANGED,P.CHANGED);if(this.hasSwiped&&this.startEvnt){const i=this.getSwipeDir(this.startEvnt.position,s.position),r=Math.abs(this.startEvnt.position.x-s.position.x),o=Math.abs(this.startEvnt.position.y-s.position.y),l={startEvnt:this.startEvnt,endEvnt:s,direction:i.replace("swipe",""),xAmount:r,yAmount:o,duration:s.time-this.startEvnt.time};this.triggerCustomEvent("swipeend",e,l)}}}var Qb={exports:{}},kn={exports:{}},va;function Yb(){return va||(va=1,function(n){(function(t,e){n.exports?n.exports=e():t.EvEmitter=e()})(typeof window<"u"?window:Cl,function(){function t(){}let e=t.prototype;return e.on=function(s,i){if(!s||!i)return this;let r=this._events=this._events||{},o=r[s]=r[s]||[];return o.includes(i)||o.push(i),this},e.once=function(s,i){if(!s||!i)return this;this.on(s,i);let r=this._onceEvents=this._onceEvents||{},o=r[s]=r[s]||{};return o[i]=!0,this},e.off=function(s,i){let r=this._events&&this._events[s];if(!r||!r.length)return this;let o=r.indexOf(i);return o!=-1&&r.splice(o,1),this},e.emitEvent=function(s,i){let r=this._events&&this._events[s];if(!r||!r.length)return this;r=r.slice(0),i=i||[];let o=this._onceEvents&&this._onceEvents[s];for(let l of r)o&&o[l]&&(this.off(s,l),delete o[l]),l.apply(this,i);return this},e.allOff=function(){return delete this._events,delete this._onceEvents,this},t})}(kn)),kn.exports}/*! * imagesLoaded v5.0.0 * JavaScript is all like "You images are done yet or what?" * MIT License - */(function(n){(function(t,e){n.exports?n.exports=e(t,xb()):t.imagesLoaded=e(t,t.EvEmitter)})(typeof window<"u"?window:Ql,function(e,s){let i=e.console;function r(u){return Array.isArray(u)?u:typeof u=="object"&&typeof u.length=="number"?[...u]:[u]}function o(u,p,f){if(!(this instanceof o))return new o(u,p,f);let m=u;if(typeof u=="string"&&(m=document.querySelectorAll(u)),!m){i.error(`Bad element for imagesLoaded ${m||u}`);return}this.elements=r(m),this.options={},typeof p=="function"?f=p:Object.assign(this.options,p),f&&this.on("always",f),this.getImages(),setTimeout(this.check.bind(this))}o.prototype=Object.create(s.prototype),o.prototype.getImages=function(){this.images=[],this.elements.forEach(this.addElementImages,this)};const l=[1,9,11];o.prototype.addElementImages=function(u){u.nodeName==="IMG"&&this.addImage(u),this.options.background===!0&&this.addElementBackgroundImages(u);let{nodeType:p}=u;if(!p||!l.includes(p))return;let f=u.querySelectorAll("img");for(let m of f)this.addImage(m);if(typeof this.options.background=="string"){let m=u.querySelectorAll(this.options.background);for(let v of m)this.addElementBackgroundImages(v)}};const c=/url\((['"])?(.*?)\1\)/gi;o.prototype.addElementBackgroundImages=function(u){let p=getComputedStyle(u);if(!p)return;let f=c.exec(p.backgroundImage);for(;f!==null;){let m=f&&f[2];m&&this.addBackground(m,u),f=c.exec(p.backgroundImage)}},o.prototype.addImage=function(u){let p=new h(u);this.images.push(p)},o.prototype.addBackground=function(u,p){let f=new d(u,p);this.images.push(f)},o.prototype.check=function(){if(this.progressedCount=0,this.hasAnyBroken=!1,!this.images.length){this.complete();return}let u=(p,f,m)=>{setTimeout(()=>{this.progress(p,f,m)})};this.images.forEach(function(p){p.once("progress",u),p.check()})},o.prototype.progress=function(u,p,f){this.progressedCount++,this.hasAnyBroken=this.hasAnyBroken||!u.isLoaded,this.emitEvent("progress",[this,u,p]),this.progressedCount===this.images.length&&this.complete(),this.options.debug&&i&&i.log(`progress: ${f}`,u,p)},o.prototype.complete=function(){let u=this.hasAnyBroken?"fail":"done";this.isComplete=!0,this.emitEvent(u,[this]),this.emitEvent("always",[this])};function h(u){this.img=u}h.prototype=Object.create(s.prototype),h.prototype.check=function(){if(this.getIsImageComplete()){this.confirm(this.img.naturalWidth!==0,"naturalWidth");return}const p=this.img.currentSrc||this.img.src;p&&(this.proxyImage=new Image,this.img.crossOrigin&&(this.proxyImage.crossOrigin=this.img.crossOrigin),this.proxyImage.addEventListener("load",this),this.proxyImage.addEventListener("error",this),this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.proxyImage.src=p)},h.prototype.getIsImageComplete=function(){return this.img.complete&&this.img.naturalWidth},h.prototype.confirm=function(u,p){this.isLoaded=u;let{parentNode:f}=this.img,m=f.nodeName==="PICTURE"?f:this.img;this.emitEvent("progress",[this,m,p])},h.prototype.handleEvent=function(u){let p="on"+u.type;this[p]&&this[p](u)},h.prototype.onload=function(){this.confirm(!0,"onload"),this.unbindEvents()},h.prototype.onerror=function(){this.confirm(!1,"onerror"),this.unbindEvents()},h.prototype.unbindEvents=function(){this.proxyImage.removeEventListener("load",this),this.proxyImage.removeEventListener("error",this),this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)};function d(u,p){this.url=u,this.element=p,this.img=new Image}return d.prototype=Object.create(h.prototype),d.prototype.check=function(){this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.img.src=this.url,this.getIsImageComplete()&&(this.confirm(this.img.naturalWidth!==0,"naturalWidth"),this.unbindEvents())},d.prototype.unbindEvents=function(){this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},d.prototype.confirm=function(u,p){this.isLoaded=u,this.emitEvent("progress",[this,this.element,p])},o})})(kb);const Ki=class extends H{constructor(){super();a(this,"computedStyle");a(this,"autobind",!0);a(this,"_debug",!1);a(this,"bs5");a(this,"touch",new Lb(this));a(this,"events");a(this,"routerEvents",new $("main"));a(this,"defaults",{containerSelector:void 0,state:"hidden",oldState:"hidden",id:void 0,width:"250px",position:"left",mode:"overlap",autoShow:!1,autoHide:!1,watchNewPageReadyEvent:!0,forceHideOnLocationPathnames:[],forceShowOnLocationPathnames:[],closeOnSwipe:!0,preventScrollingOnOverlap:!0,hide:this.hide,show:this.show,toggle:this.toggle});a(this,"scope",{...this.defaults});a(this,"onSwipe",this._onSwipe.bind(this));a(this,"onEnvironmentChanges",Oe(this._onEnvironmentChanges.bind(this)));this.bs5=Ie.getSingleton(),this.onEnvironmentChanges=this.onEnvironmentChanges.bind(this)}static get observedAttributes(){return["id","container-selector","position","mode","width","auto-show","auto-hide","force-hide-on-location-pathnames","force-show-on-location-pathnames","watch-new-page-ready-event","close-on-swipe","prevent-scrolling-on-overlap"]}setState(e){this.scope.oldState=this.scope.state,this.scope.state=e,this.onStateChange()}getState(){return this.scope.state}getShowMode(){return`${this.scope.mode}-${this.scope.position}`}hide(){this.setState("hidden")}show(){const e=this.getShowMode();this.setState(e)}toggle(){this.debug("toggle state: "+this.scope.state),this.scope.state==="hidden"?this.show():this.hide(),this.debug("toggled state: "+this.scope.state)}preventScrolling(e=document.body){e.style.overflow="hidden"}allowScrolling(e=document.body){e.style.overflow==="hidden"&&(e.style.overflow="")}connectedCallback(){super.connectedCallback(),this.init(Ki.observedAttributes),this.computedStyle=window.getComputedStyle(this),this.addEventListeners(),this.onEnvironmentChanges()}onBreakpoint(){this.onEnvironmentChanges()}addEventListeners(){this.addEventListener("swipe",this.onSwipe),this.bs5.events.on("breakpoint:changed",this.onBreakpoint,this)}removeEventListeners(){var e,s;(e=this.events)==null||e.off(D.eventNames.init,this.triggerState,this),(s=this.events)==null||s.off(D.eventNames.toggle,this.toggle,this),this.routerEvents.off("newPageReady",this.onEnvironmentChanges,this),this.bs5.events.off("breakpoint:changed",this.onBreakpoint,this)}initToggleButtonEventDispatcher(){this.events&&(this.events.off(D.eventNames.toggle,this.toggle,this),this.events.off(D.eventNames.init,this.triggerState,this));const e=D.nsPrefix+this.scope.id;this.debug(`Init event dispatcher for namespace ${e}`),this.events=new $(e),this.events.on(D.eventNames.toggle,this.toggle,this),this.events.on(D.eventNames.init,this.triggerState,this)}initRouterEventDispatcher(){this.scope.watchNewPageReadyEvent&&this.routerEvents.on("newPageReady",this.onEnvironmentChanges,this)}_onSwipe(e){this.scope.closeOnSwipe&&(this.scope.state==="side-left"||this.scope.state==="side-right"||(this.scope.position==="left"&&e.detail.direction==="left"&&this.hide(),this.scope.position==="right"&&e.detail.direction==="right"&&this.hide()))}onHidden(){const e=this.scope.position==="left"?"-100%":"100%";this.style.transform=`translateX(${e})`,this.width=this.scope.width,this.setContainersStyle(this.scope.state),this.scope.preventScrollingOnOverlap&&this.allowScrolling()}onMove(e){this.style.transform="translateX(0)",this.style.width=this.scope.width,this.width=this.scope.width,this.setContainersStyle(e),this.scope.preventScrollingOnOverlap&&this.allowScrolling()}onSide(e){this.style.transform="translateX(0)",this.style.width=this.scope.width,this.width=this.scope.width,this.setContainersStyle(e),this.scope.preventScrollingOnOverlap&&this.allowScrolling()}onOverlap(e){this.style.transform="translateX(0)",this.width=this.scope.width,this.setContainersStyle(e),this.scope.preventScrollingOnOverlap&&this.preventScrolling()}triggerState(){var e;(e=this.events)==null||e.trigger("state",this.scope.state)}onStateChange(){switch(this.scope.state){case"side-left":case"side-right":this.onSide(this.scope.state);break;case"overlap-left":case"overlap-right":this.onOverlap(this.scope.state);break;case"move-left":case"move-right":this.onMove(this.scope.state);break;default:this.onHidden();break}this.classList.remove(...Ki.states),this.classList.add(this.scope.state),this.events&&this.events.trigger(D.eventNames.toggled,this.scope.state),this.dispatchEvent(new CustomEvent(D.eventNames.toggled,{detail:this.scope.state}))}get width(){return this.scope.width===this.defaults.width?this.offsetWidth+"px":this.scope.width}set width(e){this.scope.width=e,this.style.width=e}setStateByEnvironment(){if(this.scope.forceHideOnLocationPathnames.includes(window.location.pathname))return this.hide();if(this.scope.forceShowOnLocationPathnames.includes(window.location.pathname))return this.show();if(this.scope.autoHide)return this.hide();if(this.scope.autoShow)return this.show()}_onEnvironmentChanges(){this.setStateByEnvironment()}getContainers(){return this.scope.containerSelector?document.querySelectorAll(this.scope.containerSelector):void 0}initContainers(e){this.setContainersStyle(e)}setContainersStyle(e){const s=this.getContainers()||[];if(s)for(let i=0;i + */(function(n){(function(t,e){n.exports?n.exports=e(t,Yb()):t.imagesLoaded=e(t,t.EvEmitter)})(typeof window<"u"?window:Cl,function(e,s){let i=e.console;function r(u){return Array.isArray(u)?u:typeof u=="object"&&typeof u.length=="number"?[...u]:[u]}function o(u,p,f){if(!(this instanceof o))return new o(u,p,f);let m=u;if(typeof u=="string"&&(m=document.querySelectorAll(u)),!m){i.error(`Bad element for imagesLoaded ${m||u}`);return}this.elements=r(m),this.options={},typeof p=="function"?f=p:Object.assign(this.options,p),f&&this.on("always",f),this.getImages(),setTimeout(this.check.bind(this))}o.prototype=Object.create(s.prototype),o.prototype.getImages=function(){this.images=[],this.elements.forEach(this.addElementImages,this)};const l=[1,9,11];o.prototype.addElementImages=function(u){u.nodeName==="IMG"&&this.addImage(u),this.options.background===!0&&this.addElementBackgroundImages(u);let{nodeType:p}=u;if(!p||!l.includes(p))return;let f=u.querySelectorAll("img");for(let m of f)this.addImage(m);if(typeof this.options.background=="string"){let m=u.querySelectorAll(this.options.background);for(let v of m)this.addElementBackgroundImages(v)}};const c=/url\((['"])?(.*?)\1\)/gi;o.prototype.addElementBackgroundImages=function(u){let p=getComputedStyle(u);if(!p)return;let f=c.exec(p.backgroundImage);for(;f!==null;){let m=f&&f[2];m&&this.addBackground(m,u),f=c.exec(p.backgroundImage)}},o.prototype.addImage=function(u){let p=new h(u);this.images.push(p)},o.prototype.addBackground=function(u,p){let f=new d(u,p);this.images.push(f)},o.prototype.check=function(){if(this.progressedCount=0,this.hasAnyBroken=!1,!this.images.length){this.complete();return}let u=(p,f,m)=>{setTimeout(()=>{this.progress(p,f,m)})};this.images.forEach(function(p){p.once("progress",u),p.check()})},o.prototype.progress=function(u,p,f){this.progressedCount++,this.hasAnyBroken=this.hasAnyBroken||!u.isLoaded,this.emitEvent("progress",[this,u,p]),this.progressedCount===this.images.length&&this.complete(),this.options.debug&&i&&i.log(`progress: ${f}`,u,p)},o.prototype.complete=function(){let u=this.hasAnyBroken?"fail":"done";this.isComplete=!0,this.emitEvent(u,[this]),this.emitEvent("always",[this])};function h(u){this.img=u}h.prototype=Object.create(s.prototype),h.prototype.check=function(){if(this.getIsImageComplete()){this.confirm(this.img.naturalWidth!==0,"naturalWidth");return}const p=this.img.currentSrc||this.img.src;p&&(this.proxyImage=new Image,this.img.crossOrigin&&(this.proxyImage.crossOrigin=this.img.crossOrigin),this.proxyImage.addEventListener("load",this),this.proxyImage.addEventListener("error",this),this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.proxyImage.src=p)},h.prototype.getIsImageComplete=function(){return this.img.complete&&this.img.naturalWidth},h.prototype.confirm=function(u,p){this.isLoaded=u;let{parentNode:f}=this.img,m=f.nodeName==="PICTURE"?f:this.img;this.emitEvent("progress",[this,m,p])},h.prototype.handleEvent=function(u){let p="on"+u.type;this[p]&&this[p](u)},h.prototype.onload=function(){this.confirm(!0,"onload"),this.unbindEvents()},h.prototype.onerror=function(){this.confirm(!1,"onerror"),this.unbindEvents()},h.prototype.unbindEvents=function(){this.proxyImage.removeEventListener("load",this),this.proxyImage.removeEventListener("error",this),this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)};function d(u,p){this.url=u,this.element=p,this.img=new Image}return d.prototype=Object.create(h.prototype),d.prototype.check=function(){this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.img.src=this.url,this.getIsImageComplete()&&(this.confirm(this.img.naturalWidth!==0,"naturalWidth"),this.unbindEvents())},d.prototype.unbindEvents=function(){this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},d.prototype.confirm=function(u,p){this.isLoaded=u,this.emitEvent("progress",[this,this.element,p])},o})})(Qb);const Ui=class extends F{constructor(){super();a(this,"computedStyle");a(this,"autobind",!0);a(this,"_debug",!1);a(this,"bs5");a(this,"touch",new qb(this));a(this,"events");a(this,"routerEvents",new $("main"));a(this,"defaults",{containerSelector:void 0,state:"hidden",oldState:"hidden",id:void 0,width:"250px",position:"left",mode:"overlap",autoShow:!1,autoHide:!1,watchNewPageReadyEvent:!0,forceHideOnLocationPathnames:[],forceShowOnLocationPathnames:[],closeOnSwipe:!0,preventScrollingOnOverlap:!0,hide:this.hide,show:this.show,toggle:this.toggle});a(this,"scope",{...this.defaults});a(this,"onSwipe",this._onSwipe.bind(this));a(this,"onEnvironmentChanges",xe(this._onEnvironmentChanges.bind(this)));this.bs5=Le.getSingleton(),this.onEnvironmentChanges=this.onEnvironmentChanges.bind(this)}static get observedAttributes(){return["id","container-selector","position","mode","width","auto-show","auto-hide","force-hide-on-location-pathnames","force-show-on-location-pathnames","watch-new-page-ready-event","close-on-swipe","prevent-scrolling-on-overlap"]}setState(e){this.scope.oldState=this.scope.state,this.scope.state=e,this.onStateChange()}getState(){return this.scope.state}getShowMode(){return`${this.scope.mode}-${this.scope.position}`}hide(){this.setState("hidden")}show(){const e=this.getShowMode();this.setState(e)}toggle(){this.debug("toggle state: "+this.scope.state),this.scope.state==="hidden"?this.show():this.hide(),this.debug("toggled state: "+this.scope.state)}preventScrolling(e=document.body){e.style.overflow="hidden"}allowScrolling(e=document.body){e.style.overflow==="hidden"&&(e.style.overflow="")}connectedCallback(){super.connectedCallback(),this.init(Ui.observedAttributes),this.computedStyle=window.getComputedStyle(this),this.addEventListeners(),this.onEnvironmentChanges()}onBreakpoint(){this.onEnvironmentChanges()}addEventListeners(){this.addEventListener("swipe",this.onSwipe),this.bs5.events.on("breakpoint:changed",this.onBreakpoint,this)}removeEventListeners(){var e,s;(e=this.events)==null||e.off(D.eventNames.init,this.triggerState,this),(s=this.events)==null||s.off(D.eventNames.toggle,this.toggle,this),this.routerEvents.off("newPageReady",this.onEnvironmentChanges,this),this.bs5.events.off("breakpoint:changed",this.onBreakpoint,this)}initToggleButtonEventDispatcher(){this.events&&(this.events.off(D.eventNames.toggle,this.toggle,this),this.events.off(D.eventNames.init,this.triggerState,this));const e=D.nsPrefix+this.scope.id;this.debug(`Init event dispatcher for namespace ${e}`),this.events=new $(e),this.events.on(D.eventNames.toggle,this.toggle,this),this.events.on(D.eventNames.init,this.triggerState,this)}initRouterEventDispatcher(){this.scope.watchNewPageReadyEvent&&this.routerEvents.on("newPageReady",this.onEnvironmentChanges,this)}_onSwipe(e){this.scope.closeOnSwipe&&(this.scope.state==="side-left"||this.scope.state==="side-right"||(this.scope.position==="left"&&e.detail.direction==="left"&&this.hide(),this.scope.position==="right"&&e.detail.direction==="right"&&this.hide()))}onHidden(){const e=this.scope.position==="left"?"-100%":"100%";this.style.transform=`translateX(${e})`,this.width=this.scope.width,this.setContainersStyle(this.scope.state),this.scope.preventScrollingOnOverlap&&this.allowScrolling()}onMove(e){this.style.transform="translateX(0)",this.style.width=this.scope.width,this.width=this.scope.width,this.setContainersStyle(e),this.scope.preventScrollingOnOverlap&&this.allowScrolling()}onSide(e){this.style.transform="translateX(0)",this.style.width=this.scope.width,this.width=this.scope.width,this.setContainersStyle(e),this.scope.preventScrollingOnOverlap&&this.allowScrolling()}onOverlap(e){this.style.transform="translateX(0)",this.width=this.scope.width,this.setContainersStyle(e),this.scope.preventScrollingOnOverlap&&this.preventScrolling()}triggerState(){var e;(e=this.events)==null||e.trigger("state",this.scope.state)}onStateChange(){switch(this.scope.state){case"side-left":case"side-right":this.onSide(this.scope.state);break;case"overlap-left":case"overlap-right":this.onOverlap(this.scope.state);break;case"move-left":case"move-right":this.onMove(this.scope.state);break;default:this.onHidden();break}this.classList.remove(...Ui.states),this.classList.add(this.scope.state),this.events&&this.events.trigger(D.eventNames.toggled,this.scope.state),this.dispatchEvent(new CustomEvent(D.eventNames.toggled,{detail:this.scope.state}))}get width(){return this.scope.width===this.defaults.width?this.offsetWidth+"px":this.scope.width}set width(e){this.scope.width=e,this.style.width=e}setStateByEnvironment(){if(this.scope.forceHideOnLocationPathnames.includes(window.location.pathname))return this.hide();if(this.scope.forceShowOnLocationPathnames.includes(window.location.pathname))return this.show();if(this.scope.autoHide)return this.hide();if(this.scope.autoShow)return this.show()}_onEnvironmentChanges(){this.setStateByEnvironment()}getContainers(){return this.scope.containerSelector?document.querySelectorAll(this.scope.containerSelector):void 0}initContainers(e){this.setContainersStyle(e)}setContainersStyle(e){const s=this.getContainers()||[];if(s)for(let i=0;i
-`,Nb=` -`,Ob=`
    +`,Xb=`
    -`,Pb='',Nh=".slideshow-row",Db=`${Nh} .slide`,Jr=class extends fr{constructor(){super();a(this,"resizeObserver");a(this,"bs5");a(this,"defaultScope",{slidesToScroll:1,controls:!0,controlsPosition:"inside-middle",pauseOnHover:!0,sticky:!1,indicators:!0,indicatorsPosition:"inside-bottom",pause:!1,drag:!0,touchScroll:!0,autoplay:!1,autoplayInterval:0,autoplayVelocity:.8,controlPrevIconSrc:"",controlNextIconSrc:"",indicatorActiveIconSrc:"",indicatorInactiveIconSrc:"",angle:"horizontal",infinite:!0,next:this.next.bind(this),prev:this.prev.bind(this),goTo:this.goTo.bind(this),enableTouchScroll:this.enableTouchScroll.bind(this),disableTouchScroll:this.disableTouchScroll.bind(this),items:void 0,controlsPositionClass:"",indicatorsPositionClass:"",intervalCount:0,intervalProgress:0,nextIndex:-1,prevIndex:-1,activeIndex:0});a(this,"templateAttributes",[{name:"class",required:!1},{name:"handle",required:!1},{name:"type",required:!0},{name:"active",type:"boolean",required:!1},{name:"index",type:"number",required:!1},{name:"src",type:"string",required:!1}]);a(this,"autobind",!0);a(this,"dragscrollService");a(this,"continuousAutoplayService");a(this,"scrollEventsService");a(this,"templateControls",Nb);a(this,"templateIndicators",Ob);a(this,"autoplayIntervalIndex",null);a(this,"continuousAutoplayIntervalIndex",null);a(this,"resumeTimer",null);a(this,"routerEvents",new $("main"));a(this,"scope",{...this.defaultScope});a(this,"onViewChanges",Oe(this._onViewChanges.bind(this)));a(this,"onScroll",Oe(this._onScroll.bind(this)));a(this,"onMouseUp",jt(this._onMouseUp.bind(this)));a(this,"resume",jt(this._resume.bind(this),500));this.bs5=Ie.getSingleton(),this.onViewChanges=this.onViewChanges.bind(this),this.onVisibilityChanged=this.onVisibilityChanged.bind(this),this.onScroll=this.onScroll.bind(this),this.onScrollend=this.onScrollend.bind(this),this.onMouseIn=this.onMouseIn.bind(this),this.onMouseOut=this.onMouseOut.bind(this)}get slideshowInner(){return this.querySelector(Nh)}get slideElements(){return this.querySelectorAll(Db)}get controlsElements(){return this.querySelectorAll(".slideshow-control-prev, .slideshow-control-next")}get indicatorsElement(){return this.querySelector(".slideshow-indicators")}static get observedAttributes(){return["items","slides-to-scroll","controls","controls-position","drag","autoplay","autoplay-interval","autoplay-velocity","control-prev-icon-src","control-next-icon-src","indicator-inactive-icon-src","indicator-active-icon-src","angle","pause-on-hover","sticky","indicators","indicators-position","pause","infinite"]}next(){this.scrollToNextSlide()}prev(){this.scrollToPrevSlide()}goTo(e){var s;if(e<0||!((s=this.scope.items)!=null&&s[e])||!this.slideElements[e]||!this.slideshowInner){this.throw(new Error(`Can't go to slide of index ${e}`)),console.error("items",this.scope.items),console.error("this.slideElements",this.slideElements),console.error("this.slideshowInner",this.slideshowInner);return}this.setSlidePositions(),this.slideElements[e]?(Zt(this.slideElements[e],0,this.slideshowInner,this.scope.angle),this.setSlideActive(e)):this.throw(new Error(`Slide element with index "${e}" not found!`))}getNextIndex(e){let s=e+this.scope.slidesToScroll;if(s>=this.slideElements.length){if(!this.scope.infinite)return this.slideElements.length-1;s=s-this.slideElements.length}return s}getPrevIndex(e){let s=e-this.scope.slidesToScroll;if(s<0){if(!this.scope.infinite)return 0;s=this.slideElements.length-1+(s+1)}return s}scrollToNearestSlide(){this.setSlidePositions();const e=this.getMostCenteredSlideIndex();return this.goTo(e)}scrollToNextSlide(){this.setSlidePositions();const e=this.getMostCenteredSlideIndex(),s=this.getNextIndex(e);return this.goTo(s)}scrollToPrevSlide(){this.setSlidePositions();const e=this.getMostCenteredSlideIndex(),s=this.getPrevIndex(e);return this.goTo(s)}initOptions(){this.setOptions()}setOptions(){this.scope.autoplay?this.enableAutoplay():this.disableAutoplay(),this.scope.drag?this.enableDesktopDragscroll():this.disableDesktopDragscroll(),this.scope.touchScroll?this.enableTouchScroll():this.disableTouchScroll(),this.setControlsOptions(),this.setIndicatorsOptions()}setControlsOptions(){var s;const e=(s=this.scope.controlsPosition)==null?void 0:s.split("-");this.scope.controls&&e.length===2?this.scope.controlsPositionClass=`control-${e[0]} control-${e[1]}`:this.scope.controlsPositionClass=""}setIndicatorsOptions(){var s;const e=(s=this.scope.indicatorsPosition)==null?void 0:s.split("-");this.scope.indicators&&e.length===2?this.scope.indicatorsPositionClass=`indicators-${e[0]} indicators-${e[1]}`:this.scope.indicatorsPositionClass=""}_onViewChanges(){var e,s;if(this.debug("onViewChanges"),!(!((e=this.scope.items)!=null&&e.length)||!((s=this.slideElements)!=null&&s.length)))try{this.setSlidePositions();const i=this.setCenteredSlideActive();this.scope.sticky&&this.goTo(i)}catch(i){this.throw(i)}}onVisibilityChanged(e){var s,i;e.detail.visible&&((s=this.dragscrollService)==null||s.checkDraggable(),(i=this.continuousAutoplayService)==null||i.update())}_onScroll(){}onScrollend(){var e;if((e=this.scope.items)!=null&&e.length)try{this.setSlidePositions(),this.setCenteredSlideActive(),this.scope.sticky&&this.scrollToNearestSlide()}catch(s){this.throw(s)}}onMouseIn(){this.scope.pauseOnHover&&(this.scope.pause=!0)}onMouseOut(){this.resume()}_onMouseUp(){}_resume(){this.setSlidePositions(),this.scope.pause=!1}connectedCallback(){var e;!((e=this.scope.items)!=null&&e.length)&&this.slideElements&&this.addItemsByChilds(),super.connectedCallback(),this.init(Jr.observedAttributes),this.addEventListeners()}addEventListeners(){var e,s,i;this.routerEvents.on("newPageReady",this.onViewChanges),window.ResizeObserver&&(this.resizeObserver=new window.ResizeObserver(this.onViewChanges),(e=this.resizeObserver)==null||e.observe(this)),window.addEventListener("resize",this.onViewChanges,{passive:!0}),this.addEventListener("visibility-changed",this.onVisibilityChanged),(s=this.slideshowInner)==null||s.addEventListener("scroll",this.onScroll,{passive:!0}),(i=this.slideshowInner)==null||i.addEventListener("scrollended",this.onScrollend,{passive:!0}),this.addEventListener("mouseenter",this.onMouseIn,{passive:!0}),this.addEventListener("mouseover",this.onMouseIn,{passive:!0}),this.addEventListener("focusin",this.onMouseIn,{passive:!0}),this.addEventListener("touchstart",this.onMouseIn,{passive:!0}),this.addEventListener("mouseleave",this.onMouseOut,{passive:!0}),this.addEventListener("focusout",this.onMouseOut,{passive:!0}),this.addEventListener("mouseup",this.onMouseUp,{passive:!0}),this.addEventListener("touchend",this.onMouseUp,{passive:!0}),this.addEventListener("scroll",this.onMouseUp,{passive:!0}),this.addEventListener("scrollend",this.onMouseUp,{passive:!0}),this.addEventListener("scrollended",this.onMouseUp,{passive:!0})}removeEventListeners(){var e,s,i;this.routerEvents.off("newPageReady",this.onViewChanges,this),window.removeEventListener("resize",this.onViewChanges),(e=this.resizeObserver)==null||e.unobserve(this),this.bs5.events.off("breakpoint:changed",this.onViewChanges,this),this.removeEventListener("visibility-changed",this.onVisibilityChanged),(s=this.slideshowInner)==null||s.removeEventListener("scroll",this.onScroll),(i=this.slideshowInner)==null||i.removeEventListener("scrollended",this.onScrollend),this.removeEventListener("mouseenter",this.onMouseIn),this.removeEventListener("mouseover",this.onMouseIn),this.removeEventListener("focusin",this.onMouseIn),this.removeEventListener("touchstart",this.onMouseIn),this.removeEventListener("mouseleave",this.onMouseOut),this.removeEventListener("focusout",this.onMouseOut),this.removeEventListener("mouseup",this.onMouseUp),this.removeEventListener("touchend",this.onMouseUp),this.removeEventListener("scroll",this.onMouseUp),this.removeEventListener("scrollend",this.onMouseUp),this.removeEventListener("scrollended",this.onMouseUp)}initAll(){this.initSlideshowInner(),this.initOptions(),this.addEventListeners(),this.onViewChanges(),this.onScrollend()}async beforeBind(){await super.beforeBind(),this.validateItems()}async afterBind(){this.initAll(),await super.afterBind()}initSlideshowInner(){if(!this.slideshowInner){this.throw(new Error("Can't init slideshow inner!"));return}this.scrollEventsService=new Ih(this.slideshowInner)}enableDesktopDragscroll(){if(!this.dragscrollService){if(!this.slideshowInner)return;const e={detectGlobalMove:!0};this.dragscrollService=new kh(this.slideshowInner,e)}}disableDesktopDragscroll(){this.dragscrollService&&(this.dragscrollService.destroy(),this.dragscrollService=void 0)}enableTouchScroll(){this.classList.remove("touchscroll-disabled")}disableTouchScroll(){this.classList.add("touchscroll-disabled")}enableContinuousAutoplay(){if(!this.continuousAutoplayService&&this.slideshowInner){const e={velocity:this.scope.autoplayVelocity,angle:this.scope.angle,pauseOnHover:this.scope.pauseOnHover};this.continuousAutoplayService=new Cb(this.slideshowInner,e)}if(this.continuousAutoplayIntervalIndex===null){const e=this.scope.autoplayVelocity*1e4;this.continuousAutoplayIntervalIndex=window.setInterval(this.onScrollend.bind(this),e)}}disableContinuousAutoplay(){this.continuousAutoplayService&&(this.continuousAutoplayService.pause(),this.continuousAutoplayService.destroy(),this.continuousAutoplayService=void 0),this.continuousAutoplayIntervalIndex!==null&&(window.clearInterval(this.continuousAutoplayIntervalIndex),this.continuousAutoplayIntervalIndex=null)}resetIntervalAutoplay(){this.scope.intervalCount=0,this.scope.intervalProgress=0}enableIntervalAutoplay(){this.autoplayIntervalIndex===null&&(this.autoplayIntervalIndex=window.setInterval(()=>{this.scope.pause||(this.scope.intervalCount+=100,this.scope.intervalProgress=this.scope.intervalCount/this.scope.autoplayInterval*100,this.scope.intervalProgress>=100&&this.next())},100))}disableIntervalAutoplay(){this.resetIntervalAutoplay(),console.debug("disableIntervalAutoplay",this.autoplayIntervalIndex),this.autoplayIntervalIndex!==null&&(window.clearInterval(this.autoplayIntervalIndex),this.autoplayIntervalIndex=null)}disableAutoplay(){this.disableIntervalAutoplay(),this.disableContinuousAutoplay()}enableAutoplay(){this.disableAutoplay(),this.scope.autoplayInterval<=0?this.enableContinuousAutoplay():this.enableIntervalAutoplay()}transformTemplateAttributes(e,s){return e=super.transformTemplateAttributes(e,s),e.handle=e.handle||s.toString(),e.index=s,e.class=e.class||"",e.class+=" slide",e}validateItems(){if(!this.scope.items){this.throw(new Error("No items to validate!"));return}for(let e=0;e{const i=e.getAttribute("handle")||e.getAttribute("id")||s.toString();e.setAttribute("index",s.toString());const r={handle:i,active:!1,content:e.innerHTML,index:s,position:{...e.getBoundingClientRect(),centerY:0,centerX:0}};this.scope.items||(this.scope.items=[]),this.scope.items.push(r)})}getScrollPosition(){return this.slideshowInner?Ve(this.slideshowInner):null}getCurrentClosestNumber(e,s,i){return Math.abs(s-e)=0}setSlidePositions(){var s,i,r,o;if(!this.bound)return;if(((s=this.scope.items)==null?void 0:s.length)!==((i=this.slideElements)==null?void 0:i.length)){console.warn(new Error(`The slide objects must be the same size as the slide elements! items (${(r=this.scope.items)==null?void 0:r.length}) !== slideElements (${(o=this.slideElements)==null?void 0:o.length})`),this.slideElements,this);return}if(!this.slideshowInner)return;const e=this.slideshowInner.getBoundingClientRect();for(let l=0;l1&&(e=e-this.scope.activeSlides.length+1,e<0&&(e=0));const i=this.scope.items[e];return!i||!this.sliderInner||!i.el?(console.warn(`Slide element with index "${e}" not found!`),-1):(Zt(i.el,0,this.sliderInner,this.scope.angle),e)}getNextIndex(e){let s=e+this.scope.slidesToScroll;if(s>this.scope.items.length-1)if(this.scope.infinite)s=s-this.scope.items.length;else return-1;return s}getPrevIndex(e){let s=e-this.scope.slidesToScroll;if(s<0)if(this.scope.infinite)s=this.scope.items.length-1+(s+1);else return-1;return s}scrollToNextSlide(){return this.scope.isScrolling&&(this.scope.nextIndex=this.getNextIndex(this.scope.nextIndex),this.updateControls()),this.goTo(this.scope.nextIndex,!0)}scrollToPrevSlide(){return this.scope.isScrolling&&(this.scope.prevIndex=this.getPrevIndex(this.scope.prevIndex),this.updateControls()),this.goTo(this.scope.prevIndex,!1)}initOptions(){this.setOptions()}setOptions(){this.scope.drag?this.enableDesktopDragscroll():this.disableDesktopDragscroll(),this.scope.touchScroll?this.enableTouchScroll():this.disableTouchScroll(),this.updateColumns(),this.setControlsOptions(),this.setIndicatorsOptions()}updateColumns(){var e;(e=this.scope).slideItemStyle||(e.slideItemStyle={}),this.scope.columns>0?this.scope.slideItemStyle.flex=`0 0 ${100/this.scope.columns}%`:this.scope.slideItemStyle.flex=""}setControlsOptions(){var s;const e=(s=this.scope.controlsPosition)==null?void 0:s.split("-");this.scope.controls&&e.length===2?this.scope.controlsPositionClass=`control-${e[0]} control-${e[1]}`:this.scope.controlsPositionClass=""}setIndicatorsOptions(){var s;const e=(s=this.scope.indicatorsPosition)==null?void 0:s.split("-");this.scope.indicators&&e.length===2?this.scope.indicatorsPositionClass=`indicators-${e[0]} indicators-${e[1]}`:this.scope.indicatorsPositionClass=""}_onViewChanges(){var e,s;if(this.debug("onViewChanges"),!(!((e=this.scope.items)!=null&&e.length)||!((s=this.slideElements)!=null&&s.length)))try{this.updateSlides()}catch(i){this.throw(i)}}onVisibilityChanged(e){var s,i;e.detail.visible&&((s=this.dragscrollService)==null||s.checkDraggable(),(i=this.continuousAutoplayService)==null||i.update())}onScroll(e){this.scope.isScrolling=!0,this.dispatchEvent(new CustomEvent(e.type,{detail:e.detail}))}onScrollEnd(e){var s;if(this.scope.isScrolling=!1,!!((s=this.scope.items)!=null&&s.length)&&e.detail.direction!=="none"){try{this.updateSlides()}catch(i){this.throw(i)}this.dispatchEvent(new CustomEvent(e.type,{detail:e.detail}))}}connectedCallback(){this.scope.items.length||this.scope.slideTemplate?this.updateItems():this.initItemsByChildren(),super.connectedCallback(),this.init(Ge.observedAttributes),this.addEventListeners()}addEventListeners(){var e,s,i;this.routerEvents.on("newPageReady",this.onViewChanges),window.ResizeObserver&&(this.resizeObserver=new window.ResizeObserver(this.onViewChanges),(e=this.resizeObserver)==null||e.observe(this)),window.addEventListener("resize",this.onViewChanges,{passive:!0}),this.addEventListener("visibility-changed",this.onVisibilityChanged),(s=this.sliderInner)==null||s.addEventListener(Ge.EVENTS.scrolling,this.onScroll,{passive:!0}),(i=this.sliderInner)==null||i.addEventListener(Ge.EVENTS.scrollended,this.onScrollEnd,{passive:!0})}removeEventListeners(){var e,s,i;this.routerEvents.off("newPageReady",this.onViewChanges,this),window.removeEventListener("resize",this.onViewChanges),(e=this.resizeObserver)==null||e.unobserve(this),this.bs5.events.off("breakpoint:changed",this.onViewChanges,this),this.removeEventListener("visibility-changed",this.onVisibilityChanged),(s=this.sliderInner)==null||s.removeEventListener(Ge.EVENTS.scrolling,this.onScroll),(i=this.sliderInner)==null||i.removeEventListener(Ge.EVENTS.scrollended,this.onScrollEnd)}initAll(){this.initSlideshowInner(),this.initOptions(),this.addEventListeners(),this.updateSlides()}async beforeBind(){await super.beforeBind(),this.validateItems()}async afterBind(){this.initAll(),this.updateItems(),this.classList.add(`${Ge.tagName}-ready`),await super.afterBind()}async afterAllBind(){this.updateItems(),await super.afterAllBind()}initSlideshowInner(){if(!this.sliderInner){this.throw(new Error("Can't init slider inner!"));return}this.scrollEventsService=new Ih(this.sliderInner)}enableDesktopDragscroll(){if(!this.dragscrollService){if(!this.sliderInner)return;const e={detectGlobalMove:!0};this.dragscrollService=new kh(this.sliderInner,e)}}disableDesktopDragscroll(){this.dragscrollService&&(this.dragscrollService.destroy(),this.dragscrollService=void 0)}enableTouchScroll(){this.classList.remove("touchscroll-disabled")}disableTouchScroll(){this.classList.add("touchscroll-disabled")}validateItems(){if(!this.scope.items){this.throw(new Error("No items to validate!"));return}for(let e=0;e{this.scope.items.find(l=>l.el===i)||(this.addItemByElement(i,r),e=!0)});for(const i of this.scope.items)s.find(o=>o===i.el)||(this.removeItem(i.index,!1),e=!0);return e&&(this.updateItemIndexes(),this.updateSlides()),e}removeItem(e,s=!0){var r;const i=this.scope.items[e];i&&((r=i.el)==null||r.remove(),this.scope.items.splice(e,1),s&&this.updateItemIndexes())}updateItemIndexes(){for(let e=0;ethis.sliderInner.clientWidth:this.sliderInner.scrollHeight>this.sliderInner.clientHeight:!1}getSlideElementByIndex(e){return this.sliderInner?this.sliderInner.querySelector(`[index="${e}"]`):void 0}isSlideVisible(e,s){if(!this.sliderInner)return!1;const i=this.sliderInner.getBoundingClientRect();e.el||(e.el=this.getSlideElementByIndex(e.index));const r=e.el;if(!r)return console.warn("Slide element not found!"),!1;const o=r.getBoundingClientRect();return this.scope.angle==="horizontal"?o.left+s>=i.left&&o.right-s<=i.right:o.top+s>=i.top&&o.bottom-s<=i.bottom}getVisibleSlides(e){var i;const s=[];if(!((i=this.scope.items)!=null&&i.length))return s;for(const r of this.scope.items)this.isSlideVisible(r,e)&&s.push(r.index);return s.sort((r,o)=>r-o)}setVisibleSlidesActive(e){this.setAllSlidesInactive();const s=this.getVisibleSlides(e);return this.setSlidesActive(s),s}updateActiveSlides(e=8){const s=this.setVisibleSlidesActive(e),i=s[0]||0,r=s[s.length-1]||0,o=this.getPrevIndex(i),l=this.getNextIndex(r);return{firstIndex:i,lastIndex:r,activeSlides:s,prevIndex:o,nextIndex:l}}updateSlides(e=8,s=!1){var c,h,d,u;if(!this.scope.items.length)return[];const{activeSlides:i,firstIndex:r,prevIndex:o,nextIndex:l}=this.updateActiveSlides(e);if(!i.length&&!s){let p=e*2;if(this.scope.angle==="horizontal"){const f=((h=(c=this.scope.items[0])==null?void 0:c.el)==null?void 0:h.clientWidth)||0;f&&(p=Math.round(f/2-.5))}else{const f=((u=(d=this.scope.items[0])==null?void 0:d.el)==null?void 0:u.clientHeight)||0;f&&(p=Math.round(f/2-.5))}return this.updateSlides(p,!0)}return this.scope.activeSlides=i,this.scope.prevIndex=o,this.scope.nextIndex=l,this.updateControls(),this.updateIndicators(),this.scope.sticky&&this.goTo(r),i}updateControls(){const e=this.isScrollable();if(this.scope.showControls=this.scope.controls&&e&&this.scope.items.length>1,this.scope.infinite){this.scope.enableNextControl=!0,this.scope.enablePrevControl=!0;return}this.scope.enableNextControl=e&&this.scope.nextIndex!==-1&&this.scope.nextIndex<=this.scope.items.length-1,this.scope.enablePrevControl=e&&this.scope.prevIndex!==-1&&this.scope.prevIndex>=0}updateIndicators(){const e=this.isScrollable();this.scope.showIndicators=this.scope.indicators&&e&&this.scope.items.length>1}requiredAttributes(){return[]}parsedAttributeChangedCallback(e,s,i,r){super.parsedAttributeChangedCallback(e,s,i,r),e==="items"&&this.validateItems(),e==="drag"&&(this.scope.drag?this.enableDesktopDragscroll():this.disableDesktopDragscroll()),e==="touchScroll"&&(this.scope.touchScroll?this.enableTouchScroll():this.disableTouchScroll()),(e==="controls"||e==="controlsPosition")&&this.setControlsOptions(),(e==="indicators"||e==="indicatorsPosition")&&this.setIndicatorsOptions(),e==="columns"&&this.updateColumns()}disconnectedCallback(){this.removeEventListeners()}async beforeTemplate(){var s;const e=Array.from(this.querySelectorAll("template"));for(const i of e){const r=i.getAttribute("type");switch(r){case"slide-item":this.scope.slideTemplate=((s=i.content.children.item(0))==null?void 0:s.outerHTML)||void 0,this.debug("Slide template found!",this.scope.slideTemplate);break;default:console.warn(`Unknown template type: ${r}`,i);break}}}template(){return null}};let Je=Ge;a(Je,"EVENTS",{scrolling:"scrolling",scrollended:"scrollended"}),a(Je,"tagName","bs5-slider");const Zr=class extends H{constructor(){super();a(this,"autobind",!0);a(this,"alreadyStartedPlaying",!1);a(this,"wasPaused",!1);a(this,"_debug",!1);a(this,"video");a(this,"scope",{muted:this.muted,volume:this.volume,loop:this.loop,controls:this.controls,currentTime:this.currentTime,videoSrc:void 0,autoplayOnMinBuffer:0,autoplayMediaQuery:"",disablePictureInPicture:this.disablePictureInPicture,paused:this.paused,loading:!1,duration:0,readyState:sr.HAVE_NOTHING,buffer:0,toggleMute:this.toggleMute,toggleControls:this.toggleControls,play:this.play,pause:this.pause,togglePlay:this.togglePlay,togglePause:this.togglePause,reset:this.reset});a(this,"onUpdate",this._onUpdate.bind(this));a(this,"forceAutoplay",this._forceAutoplay.bind(this));a(this,"onMediaQueryListEvent",this._onMediaQueryListEvent.bind(this));a(this,"onVideoProgress",this._onVideoProgress.bind(this));a(this,"onLoadStart",this._onLoadStart.bind(this));a(this,"onCanPlay",this._onCanPlay.bind(this));a(this,"onCanPlayThrough",this._onCanPlayThrough.bind(this));a(this,"onWaiting",this._onWaiting.bind(this));a(this,"onDurationChange",this._onDurationChange.bind(this));a(this,"onTimeUpdate",this._onTimeUpdate.bind(this));a(this,"onPlay",this._onPlay.bind(this));a(this,"onPause",this._onPause.bind(this));this.video=this.getVideoEl()}static get observedAttributes(){return["video-src","autoplay-on-min-buffer","autoplay-media-query"]}get muted(){return this.video&&this.video.muted}set muted(e){this.video.muted=e,this.scope.muted=this.video.muted,e?this.video.setAttribute("muted",""):this.video.removeAttribute("muted"),this.onUpdate()}get volume(){var e;return((e=this.video)==null?void 0:e.volume)||0}set volume(e){this.video.volume=e,this.onUpdate()}get loop(){var e;return(e=this.video)==null?void 0:e.loop}set loop(e){this.video.loop=e,e?this.video.setAttribute("loop",""):this.video.removeAttribute("loop"),this.onUpdate()}get controls(){var e;return(e=this.video)==null?void 0:e.controls}set controls(e){this.video.controls=e,this.scope.controls=this.video.controls,e?(this.video.setAttribute("controls",""),this.video.dispatchEvent(new Event("mouseover")),this.video.dispatchEvent(new Event("mouseenter")),this.video.dispatchEvent(new Event("mousemove"))):this.video.removeAttribute("controls"),this.onUpdate()}get currentTime(){var e;return((e=this.video)==null?void 0:e.currentTime)||0}set currentTime(e){this.video.currentTime=e,this.onUpdate()}get autoplay(){var e;return((e=this.video)==null?void 0:e.autoplay)||!1}set autoplay(e){this.video.autoplay=e,this.onUpdate()}get height(){var e;return((e=this.video)==null?void 0:e.height)||0}set height(e){this.video.height=e,this.onUpdate()}get width(){var e;return((e=this.video)==null?void 0:e.width)||0}set width(e){this.video.width=e,this.onUpdate()}get poster(){var e;return(e=this.video)==null?void 0:e.poster}set poster(e){this.video.poster=e,this.onUpdate()}get preload(){var e;return(e=this.video)==null?void 0:e.preload}set preload(e){this.video.preload=e,this.onUpdate()}get disablePictureInPicture(){var e,s;return((e=this.video)==null?void 0:e.disablePictureInPicture)||((s=this.video)==null?void 0:s.hasAttribute("disablePictureInPicture"))||!1}set disablePictureInPicture(e){var s;typeof((s=this.video)==null?void 0:s.disablePictureInPicture)<"u"&&(this.video.disablePictureInPicture=e),e?this.video.setAttribute("disablePictureInPicture",""):this.video.removeAttribute("disablePictureInPicture"),this.onUpdate()}get paused(){var e;return((e=this.video)==null?void 0:e.paused)??!0}getVideoEl(){const e=this.querySelector("video");if(!e)throw new Error("No video element found");return e}load(){this.video.load()}toggleMute(){this.debug("toggleMute"),this.muted=!this.muted,this.onUpdate()}toggleControls(){this.debug("toggleControls"),this.controls=!this.controls,this.onUpdate()}async play(){this.debug("play");try{this.video.play()}catch(e){this.error(e)}}pause(){this.debug("pause"),this.video.pause(),this.onUpdate()}async togglePlay(){return this.paused?this.play():this.pause()}togglePause(){return this.debug("togglePause"),this.togglePlay()}reset(){this.debug("reset"),this.video.currentTime=0,this.onUpdate()}connectedCallback(){super.connectedCallback(),this.init(Zr.observedAttributes),this.video=this.getVideoEl(),(this.preload==="auto"||this.preload==="metadata")&&this.load()}initVideoElement(){const e=this.querySelector("video");if(!e)throw new Error("The video child element is required!");this.video=e,this.addEventListeners(),this.onUpdate()}resetVideo(){this.video.innerHTML="";const e=this.video.cloneNode(!0),s=this.querySelector(".video-wrapper");this.removeEventListeners(),this.video.remove(),s?s.appendChild(e):this.appendChild(e),this.video=e,this.video.hasAttribute("muted")?this.muted=!0:this.muted=!1,this.video.hasAttribute("controls")?this.controls=!0:this.controls=!1,this.video.hasAttribute("autoplay")?this.autoplay=!0:this.autoplay=!1,this.video.hasAttribute("height")&&(this.height=xs(this.video.getAttribute("height")||0)),this.video.hasAttribute("width")&&(this.width=xs(this.video.getAttribute("width")||0)),this.video.hasAttribute("loop")?this.loop=!0:this.loop=!1,this.video.hasAttribute("muted")?this.muted=!0:this.muted=!1,this.video.hasAttribute("poster")&&(this.poster=this.video.getAttribute("poster")||""),this.video.hasAttribute("preload")&&(this.preload=this.video.getAttribute("preload")||""),this.video.hasAttribute("disablePictureInPicture")?this.disablePictureInPicture=!0:this.disablePictureInPicture=!1,this.scope.readyState=sr.HAVE_NOTHING,this.alreadyStartedPlaying=!1,this.scope.loading=!1,this.initVideoElement(),this.reset()}setVideoSource(){if(this.scope.videoSrc){this.resetVideo();let e=this.video.querySelector("source");e||(e=document.createElement("source"),this.video.appendChild(e)),e.setAttribute("src",this.scope.videoSrc)}}parsedAttributeChangedCallback(e,s,i,r){super.parsedAttributeChangedCallback(e,s,i,r),this.debug("parsedAttributeChangedCallback",e),e==="videoSrc"&&this.setVideoSource()}addEventListeners(){if(this.scope.autoplayMediaQuery){const e=window.matchMedia(this.scope.autoplayMediaQuery);e.addEventListener("change",this.onMediaQueryListEvent),e.matches&&this.startAutoplay()}this.video.addEventListener("progress",this.onVideoProgress),this.video.addEventListener("loadstart",this.onLoadStart),this.video.addEventListener("canplay",this.onCanPlay),this.video.addEventListener("canplaythrough",this.onCanPlayThrough),this.video.addEventListener("waiting",this.onWaiting),this.video.addEventListener("durationchange",this.onDurationChange),this.video.addEventListener("timeupdate",this.onTimeUpdate),this.video.addEventListener("play",this.onPlay),this.video.addEventListener("pause",this.onPause)}removeEventListeners(){this.scope.autoplayMediaQuery&&window.matchMedia(this.scope.autoplayMediaQuery).removeEventListener("change",this.onMediaQueryListEvent),this.video.removeEventListener("progress",this.onVideoProgress),this.video.removeEventListener("loadstart",this.onLoadStart),this.video.removeEventListener("canplay",this.onCanPlay),this.video.removeEventListener("canplaythrough",this.onCanPlayThrough),this.video.removeEventListener("waiting",this.onWaiting),this.video.removeEventListener("durationchange",this.onDurationChange),this.video.removeEventListener("timeupdate",this.onTimeUpdate),this.video.removeEventListener("play",this.onPlay),this.video.removeEventListener("pause",this.onPause)}_onUpdate(){this.scope.muted!==this.video.muted&&(this.scope.muted=this.video.muted),this.scope.volume!==this.video.volume&&(this.scope.volume=this.video.volume),this.scope.loop!==this.video.loop&&(this.scope.loop=this.video.loop),this.scope.controls!==this.video.controls&&(this.scope.controls=this.video.controls),this.scope.currentTime!==this.video.currentTime&&(this.scope.currentTime=this.video.currentTime),this.scope.paused!==this.video.paused&&(this.scope.paused=this.video.paused),this.scope.duration!==this.video.duration&&(this.scope.duration=this.video.duration),this.scope.readyState!==this.video.readyState&&(this.scope.readyState=this.video.readyState)}async beforeBind(){this.initVideoElement()}async afterBind(){this.video.load()}startAutoplay(){this.scope.autoplayOnMinBuffer?this.forceLoad():this.forceAutoplay()}forceLoad(){this.video.setAttribute("preload","auto"),this.video.load()}_forceAutoplay(){this.alreadyStartedPlaying||(this.alreadyStartedPlaying=!0,this.video.muted=!0,this.forceLoad(),this.play())}_onMediaQueryListEvent(e){e.matches?this.alreadyStartedPlaying?this.wasPaused||this.play():this.startAutoplay():(this.wasPaused=this.video.paused,this.pause())}_onVideoProgress(){if(this.debug("_onVideoProgress"),this.alreadyStartedPlaying)return;if(isNaN(this.video.duration)){console.warn("Video duration is NaN");return}let e=0;for(let s=0;sthis.scope.autoplayOnMinBuffer&&this.forceAutoplay()}_onLoadStart(){this.debug("_onLoadStart"),this.scope.loading=!0,this.onUpdate()}_onCanPlay(){this.debug("_onCanPlay"),this.onUpdate()}_onCanPlayThrough(){this.scope.loading=!1,this.scope.autoplayOnMinBuffer&&this.forceAutoplay(),this.onUpdate()}_onWaiting(){this.debug("_onPlay"),this.scope.loading=!0,this.onUpdate()}_onDurationChange(){this.onUpdate()}_onTimeUpdate(){this.onUpdate()}_onPlay(){this.debug("_onPlay"),this.scope.loading=!1,this.alreadyStartedPlaying=!0,this.scope.paused=!1,this.onUpdate()}_onPause(){this.scope.paused=!0,this.onUpdate()}async init(e){return super.init(e).then(s=>s)}disconnectedCallback(){super.disconnectedCallback()}template(){return null}};let _i=Zr;a(_i,"tagName","rv-video");const eo=class extends H{constructor(){super(...arguments);a(this,"scope",{autoplay:!1});a(this,"slider",null);a(this,"videoCo",null);a(this,"videoEl",null);a(this,"slideEl",null)}static get observedAttributes(){return["autoplay"]}connectedCallback(){super.connectedCallback(),this.init(eo.observedAttributes),this.onSlideEnd=this.onSlideEnd.bind(this)}onSlideEnd(e){var s;this.debug("[Bs5SlideVideoComponent] onSlideEnd",e,(s=this.slideEl)==null?void 0:s.classList),this.scope.autoplay&&this.playIfActive()}playIfActive(){var e;(e=this.slideEl)!=null&&e.classList.contains("active")&&(this.videoCo?this.videoCo.play():this.videoEl&&this.videoEl.play())}addEventListeners(){var e;(e=this.slider)==null||e.addEventListener(Je.EVENTS.scrollended,this.onSlideEnd)}removeEventListeners(){var e;(e=this.slider)==null||e.removeEventListener(Je.EVENTS.scrollended,this.onSlideEnd)}async beforeBind(){await super.beforeBind(),this.addEventListeners()}async afterBind(){this.scope.autoplay&&this.playIfActive(),await super.beforeBind()}async beforeTemplate(){this.slider=this.closest(Je.tagName),this.videoCo=this.querySelector(_i.tagName),this.videoEl=this.querySelector("video"),this.slideEl=this.closest(".slide")}template(){return null}};let Si=eo;a(Si,"tagName","bs5-slide-video");const Rb=`