const brightJs=function(){"use strict";function t(t){return Array.from(t.parentElement.children).indexOf(t)}function e(...t){let e=document.createElement("div");return e.innerHTML=t.join(""),new h(...e.children)}function r(t){let e=t.nextSibling;for(;e?.nodeType!=1;)e=e.nextSibling;return e}function i(t){let e=t.previousSibling;for(;e?.nodeType!=1;)e=e.previousSibling;return e}function n(t){return HTMLCollection.prototype.isPrototypeOf(t)||NodeList.prototype.isPrototypeOf(t)}window.addEventListener("load",()=>brightJs.ready=!0);let s={custom:function t(e,r){if("object"==typeof e)for(let i in e)this[i]=e[i];else this[e]=r},extend:function t(e,r){if("object"==typeof e)for(let i in e)h.prototype[i]=e[i];else h.prototype[e]=r},ready:!1,parseHTML:e,...console};class h{constructor(...t){this.elements=t.map(t=>"string"==typeof t?document.querySelectorAll(t):t?.isBrightJs?t?.elements:t),this.clean(),this.length=this.elements.length,this.isBrightJs=!0}apply(t,e){return this.each(r=>{t.forEach(t=>{"string"==typeof t?e?.isString(r,t):t.isBrightJs?e?.isBrightJs(r,t):e?.default(r,t)})})}clean(){return this.elements=this.elements.filter(Boolean),this}each(t){return this.elements.forEach(e=>{if(n(e))for(let r of e)t(r);else t(e)}),this}filter(t){let e=[];return this.elements.forEach(r=>{if(n(r))for(let i of r)t(i)&&e.push(i);else t(r)&&e.push(r)}),e}map(t){let e=[];return this.elements.forEach(r=>{if(n(r))for(let i of r)e.push(t(i));else e.push(t(r))}),e}return(t){return 1===this.length?t[0]:t}addClass(){return this.each(t=>t.classList.add(...arguments))}after(...t){return 0===t.length?this.return(this.map(r)):this.apply(t,{isString:(t,r)=>t.after(...e(r).raw()),isBrightJs:(t,e)=>t.after(...e.raw()),default:(t,e)=>t.after(e)})}append(...t){return this.apply(t,{isString:(t,e)=>t.lastChild.textContent+=e,isBrightJs:(t,e)=>t.append(...e.raw()),default:(t,e)=>t.appendChild(e)})}appendTo(...t){return this.apply(t,{isString:(t,e)=>new h(e).append(t),isBrightJs:(t,e)=>e.append(t),default:(t,e)=>new h(e).append(t)})}attr(t,e){return e?this.each(r=>r.setAttribute(t,e)):this.return(this.map(e=>e.getAttribute(t)))}before(...t){return 0===t.length?this.return(this.map(i)):this.apply(t,{isString:(t,r)=>t.before(...e(r).raw()),isBrightJs:(t,e)=>t.before(...e.raw()),default:(t,e)=>t.before(e)})}blur(){return this.each(t=>t.blur())}change(t){return this.each(e=>{e.value=t,e.dispatchEvent(new Event("change"))})}children(t){return t?this.return(this.map(e=>new h(e.children.item(t)))):this.return(this.map(t=>new h(t.children)))}click(){return this.each(t=>t?.click())}clone(){return this.clean(),new h(...this.raw().map(t=>t?.cloneNode(!0)))}closest(t){return this.return(this.map(e=>new h(e?.closest(t))))}css(t,e){return e||"object"==typeof t?"object"!=typeof t?this.each(r=>r.style[t]=e):this.each(e=>Object.assign(e?.style,t)):this.return(this.map(e=>e?.style[t]))}delay(t){return new Promise(e=>setTimeout(e,t,this))}find(t){return new h(...this.map(e=>e.querySelectorAll(t)))}findOne(t){return new h(...this.map(e=>e.querySelector(t)))}firstChild(){return new h(...this.map(t=>t.firstElementChild))}focus(t){return this.each(e=>e.focus(t))}get(t){return this.return(this.map(e=>(function t(e,r){if(!r)return e;let[i,...n]="string"==typeof r?r.split("."):r;if(e[i])return n.length>0?t(e[i],n):e[i]})(e,t)))}hasClass(){return this.return(this.map(t=>t.classList.contains(...arguments)))}id(t){return t?(this.map(e=>e.id=t),this):this.return(this.map(t=>t.id))}index(){return this.return(this.map(t))}hasChild(){return this.return(this.map(t=>0!==t.children.length))}height(t){return t?this.each(e=>e.style.height=t):this.return(this.map(t=>t.offsetHeight||t.innerHeight))}html(...t){return t.length>0?this.each(e=>e.innerHTML=t.join(" ")):this.return(this.map(t=>t?.innerHTML))}lastChild(){return new h(...this.map(t=>t?.lastElementChild))}async load(t){let e=await fetch(t),r=await e?.text();return this.each(t=>t.innerHTML=r),e}on(){return this.each(t=>t.addEventListener(...arguments))}parent(){return this.return(this.map(t=>t?.parentElement))}raw(){return this.clean(),this.map(t=>t)}remove(){return this.each(t=>t?.remove())}removeClass(){return this.each(t=>t?.classList?.remove(...arguments))}removeEvent(...t){return this.each(e=>e.removeEventListener(...t))}scrollTo(t,e,r="smooth"){return this.each(i=>i.scrollTo({top:e,left:t,behavior:r}))}scrollTop(t){return this.scrollTo(void 0,0,t)}scrollLeft(t){return this.scrollTo(0,void 0,t)}scrollRight(t="smooth"){return this.each(e=>e.scrollTo({left:e.offsetWidth||e.innerWidth,behavior:t}))}scrollBottom(t="smooth"){return this.each(e=>e.scrollTo({top:e.offsetHeight||e.innerHeight,behavior:t}))}set(t,e){return this.each(r=>(function t(e,r,i){let[n,...s]=r;e[n]&&(s.length>0?t(e[n],s,i):Object.defineProperty(e,n,{value:i}))})(r,t.split("."),e))}siblings(){return new h(...this.map(t=>[i(t),r(t)]).flat())}style(t){return this.return(this.map(e=>window.getComputedStyle(e,null)[t]))}text(...t){return t.length>0?this.each(e=>e.textContent=t.join(" ")):this.return(this.map(t=>t?.textContent))}toogleAttr(t,e){return this.each(r=>r.toggleAttribute(t,e))}toogleClass(t,e){return this.each(r=>r?.classList?.toggle(t,e))}trigger(...t){return t.forEach(t=>{let e=new Event(t);this.each(t=>t.dispatchEvent(e))}),this}val(t){return t?this.each(e=>e.value=t):this.return(this.map(t=>t.value))}width(t){return t?this.each(e=>e.style.width=t):this.return(this.map(t=>t.offsetWidth||t.innerWidth))}*[Symbol.iterator](){for(let t of(this.clean(),this.elements))if(n(t))for(let e of t)yield new h(e);else yield new h(t)}}return Object.assign((...t)=>new h(...t),s)}();brightJs.custom({noConflict:()=>$=void 0,getJSON:t=>fetch(t).then(t=>t.json()),fetch:(...t)=>new Promise((e,r)=>fetch(...t).then(async t=>t.ok?e(await t.text()):r(await t.text()))),when:(...t)=>Promise.all(t),delay:t=>new Promise(e=>setTimeout(e.bind(null,!0),t)),from:brightJs.parseHTML});var $=brightJs;