',title:"",trigger:"hover focus"},ls={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"};class cs extends W{constructor(t,e){if(void 0===vi)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 as}static get DefaultType(){return ls}static get NAME(){return"tooltip"}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(){this._isEnabled&&(this._activeTrigger.click=!this._activeTrigger.click,this._isShown()?this._leave():this._enter())}dispose(){clearTimeout(this._timeout),N.off(this._element.closest(is),ns,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("none"===this._element.style.display)throw new Error("Please use show on visible elements");if(!this._isWithContent()||!this._isEnabled)return;const t=N.trigger(this._element,this.constructor.eventName("show")),e=(c(this._element)||this._element.ownerDocument.documentElement).contains(this._element);if(t.defaultPrevented||!e)return;this._disposePopper();const i=this._getTipElement();this._element.setAttribute("aria-describedby",i.getAttribute("id"));const{container:n}=this._config;if(this._element.ownerDocument.documentElement.contains(this.tip)||(n.append(i),N.trigger(this._element,this.constructor.eventName("inserted"))),this._popper=this._createPopper(i),i.classList.add(es),"ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))N.on(t,"mouseover",h);this._queueCallback((()=>{N.trigger(this._element,this.constructor.eventName("shown")),!1===this._isHovered&&this._leave(),this._isHovered=!1}),this.tip,this._isAnimated())}hide(){if(this._isShown()&&!N.trigger(this._element,this.constructor.eventName("hide")).defaultPrevented){if(this._getTipElement().classList.remove(es),"ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))N.off(t,"mouseover",h);this._activeTrigger.click=!1,this._activeTrigger[os]=!1,this._activeTrigger[ss]=!1,this._isHovered=null,this._queueCallback((()=>{this._isWithActiveTrigger()||(this._isHovered||this._disposePopper(),this._element.removeAttribute("aria-describedby"),N.trigger(this._element,this.constructor.eventName("hidden")))}),this.tip,this._isAnimated())}}update(){this._popper&&this._popper.update()}_isWithContent(){return Boolean(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(ts,es),e.classList.add(`bs-${this.constructor.NAME}-auto`);const i=(t=>{do{t+=Math.floor(1e6*Math.random())}while(document.getElementById(t));return t})(this.constructor.NAME).toString();return e.setAttribute("id",i),this._isAnimated()&&e.classList.add(ts),e}setContent(t){this._newContent=t,this._isShown()&&(this._disposePopper(),this.show())}_getTemplateFactory(t){return this._templateFactory?this._templateFactory.changeContent(t):this._templateFactory=new Jn({...this._config,content:t,extraClass:this._resolvePossibleFunction(this._config.customClass)}),this._templateFactory}_getContentForTemplate(){return{".tooltip-inner":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(ts)}_isShown(){return this.tip&&this.tip.classList.contains(es)}_createPopper(t){const e=g(this._config.placement,[this,t,this._element]),i=rs[e.toUpperCase()];return bi(this._element,t,this._getPopperConfig(i))}_getOffset(){const{offset:t}=this._config;return"string"==typeof t?t.split(",").map((t=>Number.parseInt(t,10))):"function"==typeof t?e=>t(e,this._element):t}_resolvePossibleFunction(t){return g(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:t=>{this._getTipElement().setAttribute("data-popper-placement",t.state.placement)}}]};return{...e,...g(this._config.popperConfig,[e])}}_setListeners(){const t=this._config.trigger.split(" ");for(const e of t)if("click"===e)N.on(this._element,this.constructor.eventName("click"),this._config.selector,(t=>{this._initializeOnDelegatedTarget(t).toggle()}));else if("manual"!==e){const t=e===ss?this.constructor.eventName("mouseenter"):this.constructor.eventName("focusin"),i=e===ss?this.constructor.eventName("mouseleave"):this.constructor.eventName("focusout");N.on(this._element,t,this._config.selector,(t=>{const e=this._initializeOnDelegatedTarget(t);e._activeTrigger["focusin"===t.type?os:ss]=!0,e._enter()})),N.on(this._element,i,this._config.selector,(t=>{const e=this._initializeOnDelegatedTarget(t);e._activeTrigger["focusout"===t.type?os:ss]=e._element.contains(t.relatedTarget),e._leave()}))}this._hideModalHandler=()=>{this._element&&this.hide()},N.on(this._element.closest(is),ns,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(){this._isShown()||this._isHovered?this._isHovered=!0:(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=F.getDataAttributes(this._element);for(const t of Object.keys(e))Zn.has(t)&&delete e[t];return t={...e,..."object"==typeof t&&t?t:{}},t=this._mergeConfigObj(t),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}_configAfterMerge(t){return t.container=!1===t.container?document.body:r(t.container),"number"==typeof t.delay&&(t.delay={show:t.delay,hide:t.delay}),"number"==typeof t.title&&(t.title=t.title.toString()),"number"==typeof t.content&&(t.content=t.content.toString()),t}_getDelegateConfig(){const t={};for(const[e,i]of Object.entries(this._config))this.constructor.Default[e]!==i&&(t[e]=i);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=cs.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}}m(cs);const hs={...cs.Default,content:"",offset:[0,8],placement:"right",template:'
',trigger:"click"},ds={...cs.DefaultType,content:"(null|string|element|function)"};class us extends cs{static get Default(){return hs}static get DefaultType(){return ds}static get NAME(){return"popover"}_isWithContent(){return this._getTitle()||this._getContent()}_getContentForTemplate(){return{".popover-header":this._getTitle(),".popover-body":this._getContent()}}_getContent(){return this._resolvePossibleFunction(this._config.content)}static jQueryInterface(t){return this.each((function(){const e=us.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}}m(us);const fs=".bs.scrollspy",ps=`activate${fs}`,ms=`click${fs}`,gs=`load${fs}.data-api`,_s="active",bs="[href]",vs=".nav-link",ys=`${vs}, .nav-item > ${vs}, .list-group-item`,ws={offset:null,rootMargin:"0px 0px -25%",smoothScroll:!1,target:null,threshold:[.1,.5,1]},As={offset:"(number|null)",rootMargin:"string",smoothScroll:"boolean",target:"element",threshold:"array"};class Es extends W{constructor(t,e){super(t,e),this._targetLinks=new Map,this._observableSections=new Map,this._rootElement="visible"===getComputedStyle(this._element).overflowY?null:this._element,this._activeTarget=null,this._observer=null,this._previousScrollData={visibleEntryTop:0,parentScrollTop:0},this.refresh()}static get Default(){return ws}static get DefaultType(){return As}static get NAME(){return"scrollspy"}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=r(t.target)||document.body,t.rootMargin=t.offset?`${t.offset}px 0px -30%`:t.rootMargin,"string"==typeof t.threshold&&(t.threshold=t.threshold.split(",").map((t=>Number.parseFloat(t)))),t}_maybeEnableSmoothScroll(){this._config.smoothScroll&&(N.off(this._config.target,ms),N.on(this._config.target,ms,bs,(t=>{const e=this._observableSections.get(t.target.hash);if(e){t.preventDefault();const i=this._rootElement||window,n=e.offsetTop-this._element.offsetTop;if(i.scrollTo)return void i.scrollTo({top:n,behavior:"smooth"});i.scrollTop=n}})))}_getNewObserver(){const t={root:this._rootElement,threshold:this._config.threshold,rootMargin:this._config.rootMargin};return new IntersectionObserver((t=>this._observerCallback(t)),t)}_observerCallback(t){const e=t=>this._targetLinks.get(`#${t.target.id}`),i=t=>{this._previousScrollData.visibleEntryTop=t.target.offsetTop,this._process(e(t))},n=(this._rootElement||document.documentElement).scrollTop,s=n>=this._previousScrollData.parentScrollTop;this._previousScrollData.parentScrollTop=n;for(const o of t){if(!o.isIntersecting){this._activeTarget=null,this._clearActiveClass(e(o));continue}const t=o.target.offsetTop>=this._previousScrollData.visibleEntryTop;if(s&&t){if(i(o),!n)return}else s||t||i(o)}}_initializeTargetsAndObservables(){this._targetLinks=new Map,this._observableSections=new Map;const t=z.find(bs,this._config.target);for(const e of t){if(!e.hash||l(e))continue;const t=z.findOne(decodeURI(e.hash),this._element);a(t)&&(this._targetLinks.set(decodeURI(e.hash),e),this._observableSections.set(e.hash,t))}}_process(t){this._activeTarget!==t&&(this._clearActiveClass(this._config.target),this._activeTarget=t,t.classList.add(_s),this._activateParents(t),N.trigger(this._element,ps,{relatedTarget:t}))}_activateParents(t){if(t.classList.contains("dropdown-item"))z.findOne(".dropdown-toggle",t.closest(".dropdown")).classList.add(_s);else for(const e of z.parents(t,".nav, .list-group"))for(const t of z.prev(e,ys))t.classList.add(_s)}_clearActiveClass(t){t.classList.remove(_s);const e=z.find(`${bs}.${_s}`,t);for(const t of e)t.classList.remove(_s)}static jQueryInterface(t){return this.each((function(){const e=Es.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t]()}}))}}N.on(window,gs,(()=>{for(const t of z.find('[data-bs-spy="scroll"]'))Es.getOrCreateInstance(t)})),m(Es);const Ts=".bs.tab",Cs=`hide${Ts}`,Os=`hidden${Ts}`,xs=`show${Ts}`,ks=`shown${Ts}`,Ls=`click${Ts}`,Ss=`keydown${Ts}`,Ds=`load${Ts}`,$s="ArrowLeft",Is="ArrowRight",Ns="ArrowUp",Ps="ArrowDown",js="Home",Ms="End",Fs="active",Hs="fade",Ws="show",Bs=".dropdown-toggle",zs=`:not(${Bs})`,Rs='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',qs=`.nav-link${zs}, .list-group-item${zs}, [role="tab"]${zs}, ${Rs}`,Vs=`.${Fs}[data-bs-toggle="tab"], .${Fs}[data-bs-toggle="pill"], .${Fs}[data-bs-toggle="list"]`;class Ks extends W{constructor(t){super(t),this._parent=this._element.closest('.list-group, .nav, [role="tablist"]'),this._parent&&(this._setInitialAttributes(this._parent,this._getChildren()),N.on(this._element,Ss,(t=>this._keydown(t))))}static get NAME(){return"tab"}show(){const t=this._element;if(this._elemIsActive(t))return;const e=this._getActiveElem(),i=e?N.trigger(e,Cs,{relatedTarget:t}):null;N.trigger(t,xs,{relatedTarget:e}).defaultPrevented||i&&i.defaultPrevented||(this._deactivate(e,t),this._activate(t,e))}_activate(t,e){t&&(t.classList.add(Fs),this._activate(z.getElementFromSelector(t)),this._queueCallback((()=>{"tab"===t.getAttribute("role")?(t.removeAttribute("tabindex"),t.setAttribute("aria-selected",!0),this._toggleDropDown(t,!0),N.trigger(t,ks,{relatedTarget:e})):t.classList.add(Ws)}),t,t.classList.contains(Hs)))}_deactivate(t,e){t&&(t.classList.remove(Fs),t.blur(),this._deactivate(z.getElementFromSelector(t)),this._queueCallback((()=>{"tab"===t.getAttribute("role")?(t.setAttribute("aria-selected",!1),t.setAttribute("tabindex","-1"),this._toggleDropDown(t,!1),N.trigger(t,Os,{relatedTarget:e})):t.classList.remove(Ws)}),t,t.classList.contains(Hs)))}_keydown(t){if(![$s,Is,Ns,Ps,js,Ms].includes(t.key))return;t.stopPropagation(),t.preventDefault();const e=this._getChildren().filter((t=>!l(t)));let i;if([js,Ms].includes(t.key))i=e[t.key===js?0:e.length-1];else{const n=[Is,Ps].includes(t.key);i=b(e,t.target,n,!0)}i&&(i.focus({preventScroll:!0}),Ks.getOrCreateInstance(i).show())}_getChildren(){return z.find(qs,this._parent)}_getActiveElem(){return this._getChildren().find((t=>this._elemIsActive(t)))||null}_setInitialAttributes(t,e){this._setAttributeIfNotExists(t,"role","tablist");for(const t of e)this._setInitialAttributesOnChild(t)}_setInitialAttributesOnChild(t){t=this._getInnerElement(t);const e=this._elemIsActive(t),i=this._getOuterElement(t);t.setAttribute("aria-selected",e),i!==t&&this._setAttributeIfNotExists(i,"role","presentation"),e||t.setAttribute("tabindex","-1"),this._setAttributeIfNotExists(t,"role","tab"),this._setInitialAttributesOnTargetPanel(t)}_setInitialAttributesOnTargetPanel(t){const e=z.getElementFromSelector(t);e&&(this._setAttributeIfNotExists(e,"role","tabpanel"),t.id&&this._setAttributeIfNotExists(e,"aria-labelledby",`${t.id}`))}_toggleDropDown(t,e){const i=this._getOuterElement(t);if(!i.classList.contains("dropdown"))return;const n=(t,n)=>{const s=z.findOne(t,i);s&&s.classList.toggle(n,e)};n(Bs,Fs),n(".dropdown-menu",Ws),i.setAttribute("aria-expanded",e)}_setAttributeIfNotExists(t,e,i){t.hasAttribute(e)||t.setAttribute(e,i)}_elemIsActive(t){return t.classList.contains(Fs)}_getInnerElement(t){return t.matches(qs)?t:z.findOne(qs,t)}_getOuterElement(t){return t.closest(".nav-item, .list-group-item")||t}static jQueryInterface(t){return this.each((function(){const e=Ks.getOrCreateInstance(this);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t]()}}))}}N.on(document,Ls,Rs,(function(t){["A","AREA"].includes(this.tagName)&&t.preventDefault(),l(this)||Ks.getOrCreateInstance(this).show()})),N.on(window,Ds,(()=>{for(const t of z.find(Vs))Ks.getOrCreateInstance(t)})),m(Ks);const Qs=".bs.toast",Xs=`mouseover${Qs}`,Ys=`mouseout${Qs}`,Us=`focusin${Qs}`,Gs=`focusout${Qs}`,Js=`hide${Qs}`,Zs=`hidden${Qs}`,to=`show${Qs}`,eo=`shown${Qs}`,io="hide",no="show",so="showing",oo={animation:"boolean",autohide:"boolean",delay:"number"},ro={animation:!0,autohide:!0,delay:5e3};class ao extends W{constructor(t,e){super(t,e),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get Default(){return ro}static get DefaultType(){return oo}static get NAME(){return"toast"}show(){N.trigger(this._element,to).defaultPrevented||(this._clearTimeout(),this._config.animation&&this._element.classList.add("fade"),this._element.classList.remove(io),d(this._element),this._element.classList.add(no,so),this._queueCallback((()=>{this._element.classList.remove(so),N.trigger(this._element,eo),this._maybeScheduleHide()}),this._element,this._config.animation))}hide(){this.isShown()&&(N.trigger(this._element,Js).defaultPrevented||(this._element.classList.add(so),this._queueCallback((()=>{this._element.classList.add(io),this._element.classList.remove(so,no),N.trigger(this._element,Zs)}),this._element,this._config.animation)))}dispose(){this._clearTimeout(),this.isShown()&&this._element.classList.remove(no),super.dispose()}isShown(){return this._element.classList.contains(no)}_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}if(e)return void this._clearTimeout();const i=t.relatedTarget;this._element===i||this._element.contains(i)||this._maybeScheduleHide()}_setListeners(){N.on(this._element,Xs,(t=>this._onInteraction(t,!0))),N.on(this._element,Ys,(t=>this._onInteraction(t,!1))),N.on(this._element,Us,(t=>this._onInteraction(t,!0))),N.on(this._element,Gs,(t=>this._onInteraction(t,!1)))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(t){return this.each((function(){const e=ao.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t](this)}}))}}return R(ao),m(ao),{Alert:Q,Button:Y,Carousel:xt,Collapse:Bt,Dropdown:qi,Modal:On,Offcanvas:qn,Popover:us,ScrollSpy:Es,Tab:Ks,Toast:ao,Tooltip:cs}}));
+//# sourceMappingURL=bootstrap.bundle.min.js.map
\ No newline at end of file
diff --git a/scripts/bootstrap.min.js b/scripts/bootstrap.min.js
new file mode 100644
index 0000000..d5dc5ea
--- /dev/null
+++ b/scripts/bootstrap.min.js
@@ -0,0 +1,7 @@
+/*!
+ * Bootstrap v5.3.3 (https://getbootstrap.com/)
+ * Copyright 2011-2024 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
+ */
+!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("@popperjs/core")):"function"==typeof define&&define.amd?define(["@popperjs/core"],e):(t="undefined"!=typeof globalThis?globalThis:t||self).bootstrap=e(t.Popper)}(this,(function(t){"use strict";function e(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t)for(const i in t)if("default"!==i){const s=Object.getOwnPropertyDescriptor(t,i);Object.defineProperty(e,i,s.get?s:{enumerable:!0,get:()=>t[i]})}return e.default=t,Object.freeze(e)}const i=e(t),s=new Map,n={set(t,e,i){s.has(t)||s.set(t,new Map);const n=s.get(t);n.has(e)||0===n.size?n.set(e,i):console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(n.keys())[0]}.`)},get:(t,e)=>s.has(t)&&s.get(t).get(e)||null,remove(t,e){if(!s.has(t))return;const i=s.get(t);i.delete(e),0===i.size&&s.delete(t)}},o="transitionend",r=t=>(t&&window.CSS&&window.CSS.escape&&(t=t.replace(/#([^\s"#']+)/g,((t,e)=>`#${CSS.escape(e)}`))),t),a=t=>{t.dispatchEvent(new Event(o))},l=t=>!(!t||"object"!=typeof t)&&(void 0!==t.jquery&&(t=t[0]),void 0!==t.nodeType),c=t=>l(t)?t.jquery?t[0]:t:"string"==typeof t&&t.length>0?document.querySelector(r(t)):null,h=t=>{if(!l(t)||0===t.getClientRects().length)return!1;const e="visible"===getComputedStyle(t).getPropertyValue("visibility"),i=t.closest("details:not([open])");if(!i)return e;if(i!==t){const e=t.closest("summary");if(e&&e.parentNode!==i)return!1;if(null===e)return!1}return e},d=t=>!t||t.nodeType!==Node.ELEMENT_NODE||!!t.classList.contains("disabled")||(void 0!==t.disabled?t.disabled:t.hasAttribute("disabled")&&"false"!==t.getAttribute("disabled")),u=t=>{if(!document.documentElement.attachShadow)return null;if("function"==typeof t.getRootNode){const e=t.getRootNode();return e instanceof ShadowRoot?e:null}return t instanceof ShadowRoot?t:t.parentNode?u(t.parentNode):null},_=()=>{},g=t=>{t.offsetHeight},f=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,m=[],p=()=>"rtl"===document.documentElement.dir,b=t=>{var e;e=()=>{const e=f();if(e){const i=t.NAME,s=e.fn[i];e.fn[i]=t.jQueryInterface,e.fn[i].Constructor=t,e.fn[i].noConflict=()=>(e.fn[i]=s,t.jQueryInterface)}},"loading"===document.readyState?(m.length||document.addEventListener("DOMContentLoaded",(()=>{for(const t of m)t()})),m.push(e)):e()},v=(t,e=[],i=t)=>"function"==typeof t?t(...e):i,y=(t,e,i=!0)=>{if(!i)return void v(t);const s=(t=>{if(!t)return 0;let{transitionDuration:e,transitionDelay:i}=window.getComputedStyle(t);const s=Number.parseFloat(e),n=Number.parseFloat(i);return s||n?(e=e.split(",")[0],i=i.split(",")[0],1e3*(Number.parseFloat(e)+Number.parseFloat(i))):0})(e)+5;let n=!1;const r=({target:i})=>{i===e&&(n=!0,e.removeEventListener(o,r),v(t))};e.addEventListener(o,r),setTimeout((()=>{n||a(e)}),s)},w=(t,e,i,s)=>{const n=t.length;let o=t.indexOf(e);return-1===o?!i&&s?t[n-1]:t[0]:(o+=i?1:-1,s&&(o=(o+n)%n),t[Math.max(0,Math.min(o,n-1))])},A=/[^.]*(?=\..*)\.|.*/,E=/\..*/,C=/::\d+$/,T={};let k=1;const $={mouseenter:"mouseover",mouseleave:"mouseout"},S=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 L(t,e){return e&&`${e}::${k++}`||t.uidEvent||k++}function O(t){const e=L(t);return t.uidEvent=e,T[e]=T[e]||{},T[e]}function I(t,e,i=null){return Object.values(t).find((t=>t.callable===e&&t.delegationSelector===i))}function D(t,e,i){const s="string"==typeof e,n=s?i:e||i;let o=M(t);return S.has(o)||(o=t),[s,n,o]}function N(t,e,i,s,n){if("string"!=typeof e||!t)return;let[o,r,a]=D(e,i,s);if(e in $){const t=t=>function(e){if(!e.relatedTarget||e.relatedTarget!==e.delegateTarget&&!e.delegateTarget.contains(e.relatedTarget))return t.call(this,e)};r=t(r)}const l=O(t),c=l[a]||(l[a]={}),h=I(c,r,o?i:null);if(h)return void(h.oneOff=h.oneOff&&n);const d=L(r,e.replace(A,"")),u=o?function(t,e,i){return function s(n){const o=t.querySelectorAll(e);for(let{target:r}=n;r&&r!==this;r=r.parentNode)for(const a of o)if(a===r)return F(n,{delegateTarget:r}),s.oneOff&&j.off(t,n.type,e,i),i.apply(r,[n])}}(t,i,r):function(t,e){return function i(s){return F(s,{delegateTarget:t}),i.oneOff&&j.off(t,s.type,e),e.apply(t,[s])}}(t,r);u.delegationSelector=o?i:null,u.callable=r,u.oneOff=n,u.uidEvent=d,c[d]=u,t.addEventListener(a,u,o)}function P(t,e,i,s,n){const o=I(e[i],s,n);o&&(t.removeEventListener(i,o,Boolean(n)),delete e[i][o.uidEvent])}function x(t,e,i,s){const n=e[i]||{};for(const[o,r]of Object.entries(n))o.includes(s)&&P(t,e,i,r.callable,r.delegationSelector)}function M(t){return t=t.replace(E,""),$[t]||t}const j={on(t,e,i,s){N(t,e,i,s,!1)},one(t,e,i,s){N(t,e,i,s,!0)},off(t,e,i,s){if("string"!=typeof e||!t)return;const[n,o,r]=D(e,i,s),a=r!==e,l=O(t),c=l[r]||{},h=e.startsWith(".");if(void 0===o){if(h)for(const i of Object.keys(l))x(t,l,i,e.slice(1));for(const[i,s]of Object.entries(c)){const n=i.replace(C,"");a&&!e.includes(n)||P(t,l,r,s.callable,s.delegationSelector)}}else{if(!Object.keys(c).length)return;P(t,l,r,o,n?i:null)}},trigger(t,e,i){if("string"!=typeof e||!t)return null;const s=f();let n=null,o=!0,r=!0,a=!1;e!==M(e)&&s&&(n=s.Event(e,i),s(t).trigger(n),o=!n.isPropagationStopped(),r=!n.isImmediatePropagationStopped(),a=n.isDefaultPrevented());const l=F(new Event(e,{bubbles:o,cancelable:!0}),i);return a&&l.preventDefault(),r&&t.dispatchEvent(l),l.defaultPrevented&&n&&n.preventDefault(),l}};function F(t,e={}){for(const[i,s]of Object.entries(e))try{t[i]=s}catch(e){Object.defineProperty(t,i,{configurable:!0,get:()=>s})}return t}function z(t){if("true"===t)return!0;if("false"===t)return!1;if(t===Number(t).toString())return Number(t);if(""===t||"null"===t)return null;if("string"!=typeof t)return t;try{return JSON.parse(decodeURIComponent(t))}catch(e){return t}}function H(t){return t.replace(/[A-Z]/g,(t=>`-${t.toLowerCase()}`))}const B={setDataAttribute(t,e,i){t.setAttribute(`data-bs-${H(e)}`,i)},removeDataAttribute(t,e){t.removeAttribute(`data-bs-${H(e)}`)},getDataAttributes(t){if(!t)return{};const e={},i=Object.keys(t.dataset).filter((t=>t.startsWith("bs")&&!t.startsWith("bsConfig")));for(const s of i){let i=s.replace(/^bs/,"");i=i.charAt(0).toLowerCase()+i.slice(1,i.length),e[i]=z(t.dataset[s])}return e},getDataAttribute:(t,e)=>z(t.getAttribute(`data-bs-${H(e)}`))};class q{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 i=l(e)?B.getDataAttribute(e,"config"):{};return{...this.constructor.Default,..."object"==typeof i?i:{},...l(e)?B.getDataAttributes(e):{},..."object"==typeof t?t:{}}}_typeCheckConfig(t,e=this.constructor.DefaultType){for(const[s,n]of Object.entries(e)){const e=t[s],o=l(e)?"element":null==(i=e)?`${i}`:Object.prototype.toString.call(i).match(/\s([a-z]+)/i)[1].toLowerCase();if(!new RegExp(n).test(o))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${s}" provided type "${o}" but expected type "${n}".`)}var i}}class W extends q{constructor(t,e){super(),(t=c(t))&&(this._element=t,this._config=this._getConfig(e),n.set(this._element,this.constructor.DATA_KEY,this))}dispose(){n.remove(this._element,this.constructor.DATA_KEY),j.off(this._element,this.constructor.EVENT_KEY);for(const t of Object.getOwnPropertyNames(this))this[t]=null}_queueCallback(t,e,i=!0){y(t,e,i)}_getConfig(t){return t=this._mergeConfigObj(t,this._element),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}static getInstance(t){return n.get(c(t),this.DATA_KEY)}static getOrCreateInstance(t,e={}){return this.getInstance(t)||new this(t,"object"==typeof e?e:null)}static get VERSION(){return"5.3.3"}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 R=t=>{let e=t.getAttribute("data-bs-target");if(!e||"#"===e){let i=t.getAttribute("href");if(!i||!i.includes("#")&&!i.startsWith("."))return null;i.includes("#")&&!i.startsWith("#")&&(i=`#${i.split("#")[1]}`),e=i&&"#"!==i?i.trim():null}return e?e.split(",").map((t=>r(t))).join(","):null},K={find:(t,e=document.documentElement)=>[].concat(...Element.prototype.querySelectorAll.call(e,t)),findOne:(t,e=document.documentElement)=>Element.prototype.querySelector.call(e,t),children:(t,e)=>[].concat(...t.children).filter((t=>t.matches(e))),parents(t,e){const i=[];let s=t.parentNode.closest(e);for(;s;)i.push(s),s=s.parentNode.closest(e);return i},prev(t,e){let i=t.previousElementSibling;for(;i;){if(i.matches(e))return[i];i=i.previousElementSibling}return[]},next(t,e){let i=t.nextElementSibling;for(;i;){if(i.matches(e))return[i];i=i.nextElementSibling}return[]},focusableChildren(t){const e=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map((t=>`${t}:not([tabindex^="-"])`)).join(",");return this.find(e,t).filter((t=>!d(t)&&h(t)))},getSelectorFromElement(t){const e=R(t);return e&&K.findOne(e)?e:null},getElementFromSelector(t){const e=R(t);return e?K.findOne(e):null},getMultipleElementsFromSelector(t){const e=R(t);return e?K.find(e):[]}},V=(t,e="hide")=>{const i=`click.dismiss${t.EVENT_KEY}`,s=t.NAME;j.on(document,i,`[data-bs-dismiss="${s}"]`,(function(i){if(["A","AREA"].includes(this.tagName)&&i.preventDefault(),d(this))return;const n=K.getElementFromSelector(this)||this.closest(`.${s}`);t.getOrCreateInstance(n)[e]()}))},Q=".bs.alert",X=`close${Q}`,Y=`closed${Q}`;class U extends W{static get NAME(){return"alert"}close(){if(j.trigger(this._element,X).defaultPrevented)return;this._element.classList.remove("show");const t=this._element.classList.contains("fade");this._queueCallback((()=>this._destroyElement()),this._element,t)}_destroyElement(){this._element.remove(),j.trigger(this._element,Y),this.dispose()}static jQueryInterface(t){return this.each((function(){const e=U.getOrCreateInstance(this);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t](this)}}))}}V(U,"close"),b(U);const G='[data-bs-toggle="button"]';class J extends W{static get NAME(){return"button"}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle("active"))}static jQueryInterface(t){return this.each((function(){const e=J.getOrCreateInstance(this);"toggle"===t&&e[t]()}))}}j.on(document,"click.bs.button.data-api",G,(t=>{t.preventDefault();const e=t.target.closest(G);J.getOrCreateInstance(e).toggle()})),b(J);const Z=".bs.swipe",tt=`touchstart${Z}`,et=`touchmove${Z}`,it=`touchend${Z}`,st=`pointerdown${Z}`,nt=`pointerup${Z}`,ot={endCallback:null,leftCallback:null,rightCallback:null},rt={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"};class at extends q{constructor(t,e){super(),this._element=t,t&&at.isSupported()&&(this._config=this._getConfig(e),this._deltaX=0,this._supportPointerEvents=Boolean(window.PointerEvent),this._initEvents())}static get Default(){return ot}static get DefaultType(){return rt}static get NAME(){return"swipe"}dispose(){j.off(this._element,Z)}_start(t){this._supportPointerEvents?this._eventIsPointerPenTouch(t)&&(this._deltaX=t.clientX):this._deltaX=t.touches[0].clientX}_end(t){this._eventIsPointerPenTouch(t)&&(this._deltaX=t.clientX-this._deltaX),this._handleSwipe(),v(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<=40)return;const e=t/this._deltaX;this._deltaX=0,e&&v(e>0?this._config.rightCallback:this._config.leftCallback)}_initEvents(){this._supportPointerEvents?(j.on(this._element,st,(t=>this._start(t))),j.on(this._element,nt,(t=>this._end(t))),this._element.classList.add("pointer-event")):(j.on(this._element,tt,(t=>this._start(t))),j.on(this._element,et,(t=>this._move(t))),j.on(this._element,it,(t=>this._end(t))))}_eventIsPointerPenTouch(t){return this._supportPointerEvents&&("pen"===t.pointerType||"touch"===t.pointerType)}static isSupported(){return"ontouchstart"in document.documentElement||navigator.maxTouchPoints>0}}const lt=".bs.carousel",ct=".data-api",ht="next",dt="prev",ut="left",_t="right",gt=`slide${lt}`,ft=`slid${lt}`,mt=`keydown${lt}`,pt=`mouseenter${lt}`,bt=`mouseleave${lt}`,vt=`dragstart${lt}`,yt=`load${lt}${ct}`,wt=`click${lt}${ct}`,At="carousel",Et="active",Ct=".active",Tt=".carousel-item",kt=Ct+Tt,$t={ArrowLeft:_t,ArrowRight:ut},St={interval:5e3,keyboard:!0,pause:"hover",ride:!1,touch:!0,wrap:!0},Lt={interval:"(number|boolean)",keyboard:"boolean",pause:"(string|boolean)",ride:"(boolean|string)",touch:"boolean",wrap:"boolean"};class Ot extends W{constructor(t,e){super(t,e),this._interval=null,this._activeElement=null,this._isSliding=!1,this.touchTimeout=null,this._swipeHelper=null,this._indicatorsElement=K.findOne(".carousel-indicators",this._element),this._addEventListeners(),this._config.ride===At&&this.cycle()}static get Default(){return St}static get DefaultType(){return Lt}static get NAME(){return"carousel"}next(){this._slide(ht)}nextWhenVisible(){!document.hidden&&h(this._element)&&this.next()}prev(){this._slide(dt)}pause(){this._isSliding&&a(this._element),this._clearInterval()}cycle(){this._clearInterval(),this._updateInterval(),this._interval=setInterval((()=>this.nextWhenVisible()),this._config.interval)}_maybeEnableCycle(){this._config.ride&&(this._isSliding?j.one(this._element,ft,(()=>this.cycle())):this.cycle())}to(t){const e=this._getItems();if(t>e.length-1||t<0)return;if(this._isSliding)return void j.one(this._element,ft,(()=>this.to(t)));const i=this._getItemIndex(this._getActive());if(i===t)return;const s=t>i?ht:dt;this._slide(s,e[t])}dispose(){this._swipeHelper&&this._swipeHelper.dispose(),super.dispose()}_configAfterMerge(t){return t.defaultInterval=t.interval,t}_addEventListeners(){this._config.keyboard&&j.on(this._element,mt,(t=>this._keydown(t))),"hover"===this._config.pause&&(j.on(this._element,pt,(()=>this.pause())),j.on(this._element,bt,(()=>this._maybeEnableCycle()))),this._config.touch&&at.isSupported()&&this._addTouchEventListeners()}_addTouchEventListeners(){for(const t of K.find(".carousel-item img",this._element))j.on(t,vt,(t=>t.preventDefault()));const t={leftCallback:()=>this._slide(this._directionToOrder(ut)),rightCallback:()=>this._slide(this._directionToOrder(_t)),endCallback:()=>{"hover"===this._config.pause&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout((()=>this._maybeEnableCycle()),500+this._config.interval))}};this._swipeHelper=new at(this._element,t)}_keydown(t){if(/input|textarea/i.test(t.target.tagName))return;const e=$t[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=K.findOne(Ct,this._indicatorsElement);e.classList.remove(Et),e.removeAttribute("aria-current");const i=K.findOne(`[data-bs-slide-to="${t}"]`,this._indicatorsElement);i&&(i.classList.add(Et),i.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 i=this._getActive(),s=t===ht,n=e||w(this._getItems(),i,s,this._config.wrap);if(n===i)return;const o=this._getItemIndex(n),r=e=>j.trigger(this._element,e,{relatedTarget:n,direction:this._orderToDirection(t),from:this._getItemIndex(i),to:o});if(r(gt).defaultPrevented)return;if(!i||!n)return;const a=Boolean(this._interval);this.pause(),this._isSliding=!0,this._setActiveIndicatorElement(o),this._activeElement=n;const l=s?"carousel-item-start":"carousel-item-end",c=s?"carousel-item-next":"carousel-item-prev";n.classList.add(c),g(n),i.classList.add(l),n.classList.add(l),this._queueCallback((()=>{n.classList.remove(l,c),n.classList.add(Et),i.classList.remove(Et,c,l),this._isSliding=!1,r(ft)}),i,this._isAnimated()),a&&this.cycle()}_isAnimated(){return this._element.classList.contains("slide")}_getActive(){return K.findOne(kt,this._element)}_getItems(){return K.find(Tt,this._element)}_clearInterval(){this._interval&&(clearInterval(this._interval),this._interval=null)}_directionToOrder(t){return p()?t===ut?dt:ht:t===ut?ht:dt}_orderToDirection(t){return p()?t===dt?ut:_t:t===dt?_t:ut}static jQueryInterface(t){return this.each((function(){const e=Ot.getOrCreateInstance(this,t);if("number"!=typeof t){if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t]()}}else e.to(t)}))}}j.on(document,wt,"[data-bs-slide], [data-bs-slide-to]",(function(t){const e=K.getElementFromSelector(this);if(!e||!e.classList.contains(At))return;t.preventDefault();const i=Ot.getOrCreateInstance(e),s=this.getAttribute("data-bs-slide-to");return s?(i.to(s),void i._maybeEnableCycle()):"next"===B.getDataAttribute(this,"slide")?(i.next(),void i._maybeEnableCycle()):(i.prev(),void i._maybeEnableCycle())})),j.on(window,yt,(()=>{const t=K.find('[data-bs-ride="carousel"]');for(const e of t)Ot.getOrCreateInstance(e)})),b(Ot);const It=".bs.collapse",Dt=`show${It}`,Nt=`shown${It}`,Pt=`hide${It}`,xt=`hidden${It}`,Mt=`click${It}.data-api`,jt="show",Ft="collapse",zt="collapsing",Ht=`:scope .${Ft} .${Ft}`,Bt='[data-bs-toggle="collapse"]',qt={parent:null,toggle:!0},Wt={parent:"(null|element)",toggle:"boolean"};class Rt extends W{constructor(t,e){super(t,e),this._isTransitioning=!1,this._triggerArray=[];const i=K.find(Bt);for(const t of i){const e=K.getSelectorFromElement(t),i=K.find(e).filter((t=>t===this._element));null!==e&&i.length&&this._triggerArray.push(t)}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return qt}static get DefaultType(){return Wt}static get NAME(){return"collapse"}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let t=[];if(this._config.parent&&(t=this._getFirstLevelChildren(".collapse.show, .collapse.collapsing").filter((t=>t!==this._element)).map((t=>Rt.getOrCreateInstance(t,{toggle:!1})))),t.length&&t[0]._isTransitioning)return;if(j.trigger(this._element,Dt).defaultPrevented)return;for(const e of t)e.hide();const e=this._getDimension();this._element.classList.remove(Ft),this._element.classList.add(zt),this._element.style[e]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const i=`scroll${e[0].toUpperCase()+e.slice(1)}`;this._queueCallback((()=>{this._isTransitioning=!1,this._element.classList.remove(zt),this._element.classList.add(Ft,jt),this._element.style[e]="",j.trigger(this._element,Nt)}),this._element,!0),this._element.style[e]=`${this._element[i]}px`}hide(){if(this._isTransitioning||!this._isShown())return;if(j.trigger(this._element,Pt).defaultPrevented)return;const t=this._getDimension();this._element.style[t]=`${this._element.getBoundingClientRect()[t]}px`,g(this._element),this._element.classList.add(zt),this._element.classList.remove(Ft,jt);for(const t of this._triggerArray){const e=K.getElementFromSelector(t);e&&!this._isShown(e)&&this._addAriaAndCollapsedClass([t],!1)}this._isTransitioning=!0,this._element.style[t]="",this._queueCallback((()=>{this._isTransitioning=!1,this._element.classList.remove(zt),this._element.classList.add(Ft),j.trigger(this._element,xt)}),this._element,!0)}_isShown(t=this._element){return t.classList.contains(jt)}_configAfterMerge(t){return t.toggle=Boolean(t.toggle),t.parent=c(t.parent),t}_getDimension(){return this._element.classList.contains("collapse-horizontal")?"width":"height"}_initializeChildren(){if(!this._config.parent)return;const t=this._getFirstLevelChildren(Bt);for(const e of t){const t=K.getElementFromSelector(e);t&&this._addAriaAndCollapsedClass([e],this._isShown(t))}}_getFirstLevelChildren(t){const e=K.find(Ht,this._config.parent);return K.find(t,this._config.parent).filter((t=>!e.includes(t)))}_addAriaAndCollapsedClass(t,e){if(t.length)for(const i of t)i.classList.toggle("collapsed",!e),i.setAttribute("aria-expanded",e)}static jQueryInterface(t){const e={};return"string"==typeof t&&/show|hide/.test(t)&&(e.toggle=!1),this.each((function(){const i=Rt.getOrCreateInstance(this,e);if("string"==typeof t){if(void 0===i[t])throw new TypeError(`No method named "${t}"`);i[t]()}}))}}j.on(document,Mt,Bt,(function(t){("A"===t.target.tagName||t.delegateTarget&&"A"===t.delegateTarget.tagName)&&t.preventDefault();for(const t of K.getMultipleElementsFromSelector(this))Rt.getOrCreateInstance(t,{toggle:!1}).toggle()})),b(Rt);const Kt="dropdown",Vt=".bs.dropdown",Qt=".data-api",Xt="ArrowUp",Yt="ArrowDown",Ut=`hide${Vt}`,Gt=`hidden${Vt}`,Jt=`show${Vt}`,Zt=`shown${Vt}`,te=`click${Vt}${Qt}`,ee=`keydown${Vt}${Qt}`,ie=`keyup${Vt}${Qt}`,se="show",ne='[data-bs-toggle="dropdown"]:not(.disabled):not(:disabled)',oe=`${ne}.${se}`,re=".dropdown-menu",ae=p()?"top-end":"top-start",le=p()?"top-start":"top-end",ce=p()?"bottom-end":"bottom-start",he=p()?"bottom-start":"bottom-end",de=p()?"left-start":"right-start",ue=p()?"right-start":"left-start",_e={autoClose:!0,boundary:"clippingParents",display:"dynamic",offset:[0,2],popperConfig:null,reference:"toggle"},ge={autoClose:"(boolean|string)",boundary:"(string|element)",display:"string",offset:"(array|string|function)",popperConfig:"(null|object|function)",reference:"(string|element|object)"};class fe extends W{constructor(t,e){super(t,e),this._popper=null,this._parent=this._element.parentNode,this._menu=K.next(this._element,re)[0]||K.prev(this._element,re)[0]||K.findOne(re,this._parent),this._inNavbar=this._detectNavbar()}static get Default(){return _e}static get DefaultType(){return ge}static get NAME(){return Kt}toggle(){return this._isShown()?this.hide():this.show()}show(){if(d(this._element)||this._isShown())return;const t={relatedTarget:this._element};if(!j.trigger(this._element,Jt,t).defaultPrevented){if(this._createPopper(),"ontouchstart"in document.documentElement&&!this._parent.closest(".navbar-nav"))for(const t of[].concat(...document.body.children))j.on(t,"mouseover",_);this._element.focus(),this._element.setAttribute("aria-expanded",!0),this._menu.classList.add(se),this._element.classList.add(se),j.trigger(this._element,Zt,t)}}hide(){if(d(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(!j.trigger(this._element,Ut,t).defaultPrevented){if("ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))j.off(t,"mouseover",_);this._popper&&this._popper.destroy(),this._menu.classList.remove(se),this._element.classList.remove(se),this._element.setAttribute("aria-expanded","false"),B.removeDataAttribute(this._menu,"popper"),j.trigger(this._element,Gt,t)}}_getConfig(t){if("object"==typeof(t=super._getConfig(t)).reference&&!l(t.reference)&&"function"!=typeof t.reference.getBoundingClientRect)throw new TypeError(`${Kt.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);return t}_createPopper(){if(void 0===i)throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org)");let t=this._element;"parent"===this._config.reference?t=this._parent:l(this._config.reference)?t=c(this._config.reference):"object"==typeof this._config.reference&&(t=this._config.reference);const e=this._getPopperConfig();this._popper=i.createPopper(t,this._menu,e)}_isShown(){return this._menu.classList.contains(se)}_getPlacement(){const t=this._parent;if(t.classList.contains("dropend"))return de;if(t.classList.contains("dropstart"))return ue;if(t.classList.contains("dropup-center"))return"top";if(t.classList.contains("dropdown-center"))return"bottom";const e="end"===getComputedStyle(this._menu).getPropertyValue("--bs-position").trim();return t.classList.contains("dropup")?e?le:ae:e?he:ce}_detectNavbar(){return null!==this._element.closest(".navbar")}_getOffset(){const{offset:t}=this._config;return"string"==typeof t?t.split(",").map((t=>Number.parseInt(t,10))):"function"==typeof t?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||"static"===this._config.display)&&(B.setDataAttribute(this._menu,"popper","static"),t.modifiers=[{name:"applyStyles",enabled:!1}]),{...t,...v(this._config.popperConfig,[t])}}_selectMenuItem({key:t,target:e}){const i=K.find(".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",this._menu).filter((t=>h(t)));i.length&&w(i,e,t===Yt,!i.includes(e)).focus()}static jQueryInterface(t){return this.each((function(){const e=fe.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}static clearMenus(t){if(2===t.button||"keyup"===t.type&&"Tab"!==t.key)return;const e=K.find(oe);for(const i of e){const e=fe.getInstance(i);if(!e||!1===e._config.autoClose)continue;const s=t.composedPath(),n=s.includes(e._menu);if(s.includes(e._element)||"inside"===e._config.autoClose&&!n||"outside"===e._config.autoClose&&n)continue;if(e._menu.contains(t.target)&&("keyup"===t.type&&"Tab"===t.key||/input|select|option|textarea|form/i.test(t.target.tagName)))continue;const o={relatedTarget:e._element};"click"===t.type&&(o.clickEvent=t),e._completeHide(o)}}static dataApiKeydownHandler(t){const e=/input|textarea/i.test(t.target.tagName),i="Escape"===t.key,s=[Xt,Yt].includes(t.key);if(!s&&!i)return;if(e&&!i)return;t.preventDefault();const n=this.matches(ne)?this:K.prev(this,ne)[0]||K.next(this,ne)[0]||K.findOne(ne,t.delegateTarget.parentNode),o=fe.getOrCreateInstance(n);if(s)return t.stopPropagation(),o.show(),void o._selectMenuItem(t);o._isShown()&&(t.stopPropagation(),o.hide(),n.focus())}}j.on(document,ee,ne,fe.dataApiKeydownHandler),j.on(document,ee,re,fe.dataApiKeydownHandler),j.on(document,te,fe.clearMenus),j.on(document,ie,fe.clearMenus),j.on(document,te,ne,(function(t){t.preventDefault(),fe.getOrCreateInstance(this).toggle()})),b(fe);const me="backdrop",pe="show",be=`mousedown.bs.${me}`,ve={className:"modal-backdrop",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:"body"},ye={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"};class we extends q{constructor(t){super(),this._config=this._getConfig(t),this._isAppended=!1,this._element=null}static get Default(){return ve}static get DefaultType(){return ye}static get NAME(){return me}show(t){if(!this._config.isVisible)return void v(t);this._append();const e=this._getElement();this._config.isAnimated&&g(e),e.classList.add(pe),this._emulateAnimation((()=>{v(t)}))}hide(t){this._config.isVisible?(this._getElement().classList.remove(pe),this._emulateAnimation((()=>{this.dispose(),v(t)}))):v(t)}dispose(){this._isAppended&&(j.off(this._element,be),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("fade"),this._element=t}return this._element}_configAfterMerge(t){return t.rootElement=c(t.rootElement),t}_append(){if(this._isAppended)return;const t=this._getElement();this._config.rootElement.append(t),j.on(t,be,(()=>{v(this._config.clickCallback)})),this._isAppended=!0}_emulateAnimation(t){y(t,this._getElement(),this._config.isAnimated)}}const Ae=".bs.focustrap",Ee=`focusin${Ae}`,Ce=`keydown.tab${Ae}`,Te="backward",ke={autofocus:!0,trapElement:null},$e={autofocus:"boolean",trapElement:"element"};class Se extends q{constructor(t){super(),this._config=this._getConfig(t),this._isActive=!1,this._lastTabNavDirection=null}static get Default(){return ke}static get DefaultType(){return $e}static get NAME(){return"focustrap"}activate(){this._isActive||(this._config.autofocus&&this._config.trapElement.focus(),j.off(document,Ae),j.on(document,Ee,(t=>this._handleFocusin(t))),j.on(document,Ce,(t=>this._handleKeydown(t))),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,j.off(document,Ae))}_handleFocusin(t){const{trapElement:e}=this._config;if(t.target===document||t.target===e||e.contains(t.target))return;const i=K.focusableChildren(e);0===i.length?e.focus():this._lastTabNavDirection===Te?i[i.length-1].focus():i[0].focus()}_handleKeydown(t){"Tab"===t.key&&(this._lastTabNavDirection=t.shiftKey?Te:"forward")}}const Le=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",Oe=".sticky-top",Ie="padding-right",De="margin-right";class Ne{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,Ie,(e=>e+t)),this._setElementAttributes(Le,Ie,(e=>e+t)),this._setElementAttributes(Oe,De,(e=>e-t))}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,Ie),this._resetElementAttributes(Le,Ie),this._resetElementAttributes(Oe,De)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(t,e,i){const s=this.getWidth();this._applyManipulationCallback(t,(t=>{if(t!==this._element&&window.innerWidth>t.clientWidth+s)return;this._saveInitialAttribute(t,e);const n=window.getComputedStyle(t).getPropertyValue(e);t.style.setProperty(e,`${i(Number.parseFloat(n))}px`)}))}_saveInitialAttribute(t,e){const i=t.style.getPropertyValue(e);i&&B.setDataAttribute(t,e,i)}_resetElementAttributes(t,e){this._applyManipulationCallback(t,(t=>{const i=B.getDataAttribute(t,e);null!==i?(B.removeDataAttribute(t,e),t.style.setProperty(e,i)):t.style.removeProperty(e)}))}_applyManipulationCallback(t,e){if(l(t))e(t);else for(const i of K.find(t,this._element))e(i)}}const Pe=".bs.modal",xe=`hide${Pe}`,Me=`hidePrevented${Pe}`,je=`hidden${Pe}`,Fe=`show${Pe}`,ze=`shown${Pe}`,He=`resize${Pe}`,Be=`click.dismiss${Pe}`,qe=`mousedown.dismiss${Pe}`,We=`keydown.dismiss${Pe}`,Re=`click${Pe}.data-api`,Ke="modal-open",Ve="show",Qe="modal-static",Xe={backdrop:!0,focus:!0,keyboard:!0},Ye={backdrop:"(boolean|string)",focus:"boolean",keyboard:"boolean"};class Ue extends W{constructor(t,e){super(t,e),this._dialog=K.findOne(".modal-dialog",this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._isTransitioning=!1,this._scrollBar=new Ne,this._addEventListeners()}static get Default(){return Xe}static get DefaultType(){return Ye}static get NAME(){return"modal"}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){this._isShown||this._isTransitioning||j.trigger(this._element,Fe,{relatedTarget:t}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),document.body.classList.add(Ke),this._adjustDialog(),this._backdrop.show((()=>this._showElement(t))))}hide(){this._isShown&&!this._isTransitioning&&(j.trigger(this._element,xe).defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,this._focustrap.deactivate(),this._element.classList.remove(Ve),this._queueCallback((()=>this._hideModal()),this._element,this._isAnimated())))}dispose(){j.off(window,Pe),j.off(this._dialog,Pe),this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new we({isVisible:Boolean(this._config.backdrop),isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new Se({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=K.findOne(".modal-body",this._dialog);e&&(e.scrollTop=0),g(this._element),this._element.classList.add(Ve),this._queueCallback((()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,j.trigger(this._element,ze,{relatedTarget:t})}),this._dialog,this._isAnimated())}_addEventListeners(){j.on(this._element,We,(t=>{"Escape"===t.key&&(this._config.keyboard?this.hide():this._triggerBackdropTransition())})),j.on(window,He,(()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()})),j.on(this._element,qe,(t=>{j.one(this._element,Be,(e=>{this._element===t.target&&this._element===e.target&&("static"!==this._config.backdrop?this._config.backdrop&&this.hide():this._triggerBackdropTransition())}))}))}_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(Ke),this._resetAdjustments(),this._scrollBar.reset(),j.trigger(this._element,je)}))}_isAnimated(){return this._element.classList.contains("fade")}_triggerBackdropTransition(){if(j.trigger(this._element,Me).defaultPrevented)return;const t=this._element.scrollHeight>document.documentElement.clientHeight,e=this._element.style.overflowY;"hidden"===e||this._element.classList.contains(Qe)||(t||(this._element.style.overflowY="hidden"),this._element.classList.add(Qe),this._queueCallback((()=>{this._element.classList.remove(Qe),this._queueCallback((()=>{this._element.style.overflowY=e}),this._dialog)}),this._dialog),this._element.focus())}_adjustDialog(){const t=this._element.scrollHeight>document.documentElement.clientHeight,e=this._scrollBar.getWidth(),i=e>0;if(i&&!t){const t=p()?"paddingLeft":"paddingRight";this._element.style[t]=`${e}px`}if(!i&&t){const t=p()?"paddingRight":"paddingLeft";this._element.style[t]=`${e}px`}}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(t,e){return this.each((function(){const i=Ue.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===i[t])throw new TypeError(`No method named "${t}"`);i[t](e)}}))}}j.on(document,Re,'[data-bs-toggle="modal"]',(function(t){const e=K.getElementFromSelector(this);["A","AREA"].includes(this.tagName)&&t.preventDefault(),j.one(e,Fe,(t=>{t.defaultPrevented||j.one(e,je,(()=>{h(this)&&this.focus()}))}));const i=K.findOne(".modal.show");i&&Ue.getInstance(i).hide(),Ue.getOrCreateInstance(e).toggle(this)})),V(Ue),b(Ue);const Ge=".bs.offcanvas",Je=".data-api",Ze=`load${Ge}${Je}`,ti="show",ei="showing",ii="hiding",si=".offcanvas.show",ni=`show${Ge}`,oi=`shown${Ge}`,ri=`hide${Ge}`,ai=`hidePrevented${Ge}`,li=`hidden${Ge}`,ci=`resize${Ge}`,hi=`click${Ge}${Je}`,di=`keydown.dismiss${Ge}`,ui={backdrop:!0,keyboard:!0,scroll:!1},_i={backdrop:"(boolean|string)",keyboard:"boolean",scroll:"boolean"};class gi extends W{constructor(t,e){super(t,e),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get Default(){return ui}static get DefaultType(){return _i}static get NAME(){return"offcanvas"}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){this._isShown||j.trigger(this._element,ni,{relatedTarget:t}).defaultPrevented||(this._isShown=!0,this._backdrop.show(),this._config.scroll||(new Ne).hide(),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add(ei),this._queueCallback((()=>{this._config.scroll&&!this._config.backdrop||this._focustrap.activate(),this._element.classList.add(ti),this._element.classList.remove(ei),j.trigger(this._element,oi,{relatedTarget:t})}),this._element,!0))}hide(){this._isShown&&(j.trigger(this._element,ri).defaultPrevented||(this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.add(ii),this._backdrop.hide(),this._queueCallback((()=>{this._element.classList.remove(ti,ii),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._config.scroll||(new Ne).reset(),j.trigger(this._element,li)}),this._element,!0)))}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_initializeBackDrop(){const t=Boolean(this._config.backdrop);return new we({className:"offcanvas-backdrop",isVisible:t,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:t?()=>{"static"!==this._config.backdrop?this.hide():j.trigger(this._element,ai)}:null})}_initializeFocusTrap(){return new Se({trapElement:this._element})}_addEventListeners(){j.on(this._element,di,(t=>{"Escape"===t.key&&(this._config.keyboard?this.hide():j.trigger(this._element,ai))}))}static jQueryInterface(t){return this.each((function(){const e=gi.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t](this)}}))}}j.on(document,hi,'[data-bs-toggle="offcanvas"]',(function(t){const e=K.getElementFromSelector(this);if(["A","AREA"].includes(this.tagName)&&t.preventDefault(),d(this))return;j.one(e,li,(()=>{h(this)&&this.focus()}));const i=K.findOne(si);i&&i!==e&&gi.getInstance(i).hide(),gi.getOrCreateInstance(e).toggle(this)})),j.on(window,Ze,(()=>{for(const t of K.find(si))gi.getOrCreateInstance(t).show()})),j.on(window,ci,(()=>{for(const t of K.find("[aria-modal][class*=show][class*=offcanvas-]"))"fixed"!==getComputedStyle(t).position&&gi.getOrCreateInstance(t).hide()})),V(gi),b(gi);const fi={"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],dd:[],div:[],dl:[],dt:[],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:[]},mi=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),pi=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i,bi=(t,e)=>{const i=t.nodeName.toLowerCase();return e.includes(i)?!mi.has(i)||Boolean(pi.test(t.nodeValue)):e.filter((t=>t instanceof RegExp)).some((t=>t.test(i)))},vi={allowList:fi,content:{},extraClass:"",html:!1,sanitize:!0,sanitizeFn:null,template:""},yi={allowList:"object",content:"object",extraClass:"(string|function)",html:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",template:"string"},wi={entry:"(string|element|function|null)",selector:"(string|element)"};class Ai extends q{constructor(t){super(),this._config=this._getConfig(t)}static get Default(){return vi}static get DefaultType(){return yi}static get NAME(){return"TemplateFactory"}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[e,i]of Object.entries(this._config.content))this._setContent(t,i,e);const e=t.children[0],i=this._resolvePossibleFunction(this._config.extraClass);return i&&e.classList.add(...i.split(" ")),e}_typeCheckConfig(t){super._typeCheckConfig(t),this._checkContent(t.content)}_checkContent(t){for(const[e,i]of Object.entries(t))super._typeCheckConfig({selector:e,entry:i},wi)}_setContent(t,e,i){const s=K.findOne(i,t);s&&((e=this._resolvePossibleFunction(e))?l(e)?this._putElementInTemplate(c(e),s):this._config.html?s.innerHTML=this._maybeSanitize(e):s.textContent=e:s.remove())}_maybeSanitize(t){return this._config.sanitize?function(t,e,i){if(!t.length)return t;if(i&&"function"==typeof i)return i(t);const s=(new window.DOMParser).parseFromString(t,"text/html"),n=[].concat(...s.body.querySelectorAll("*"));for(const t of n){const i=t.nodeName.toLowerCase();if(!Object.keys(e).includes(i)){t.remove();continue}const s=[].concat(...t.attributes),n=[].concat(e["*"]||[],e[i]||[]);for(const e of s)bi(e,n)||t.removeAttribute(e.nodeName)}return s.body.innerHTML}(t,this._config.allowList,this._config.sanitizeFn):t}_resolvePossibleFunction(t){return v(t,[this])}_putElementInTemplate(t,e){if(this._config.html)return e.innerHTML="",void e.append(t);e.textContent=t.textContent}}const Ei=new Set(["sanitize","allowList","sanitizeFn"]),Ci="fade",Ti="show",ki=".modal",$i="hide.bs.modal",Si="hover",Li="focus",Oi={AUTO:"auto",TOP:"top",RIGHT:p()?"left":"right",BOTTOM:"bottom",LEFT:p()?"right":"left"},Ii={allowList:fi,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"},Di={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"};class Ni extends W{constructor(t,e){if(void 0===i)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 Ii}static get DefaultType(){return Di}static get NAME(){return"tooltip"}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(){this._isEnabled&&(this._activeTrigger.click=!this._activeTrigger.click,this._isShown()?this._leave():this._enter())}dispose(){clearTimeout(this._timeout),j.off(this._element.closest(ki),$i,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("none"===this._element.style.display)throw new Error("Please use show on visible elements");if(!this._isWithContent()||!this._isEnabled)return;const t=j.trigger(this._element,this.constructor.eventName("show")),e=(u(this._element)||this._element.ownerDocument.documentElement).contains(this._element);if(t.defaultPrevented||!e)return;this._disposePopper();const i=this._getTipElement();this._element.setAttribute("aria-describedby",i.getAttribute("id"));const{container:s}=this._config;if(this._element.ownerDocument.documentElement.contains(this.tip)||(s.append(i),j.trigger(this._element,this.constructor.eventName("inserted"))),this._popper=this._createPopper(i),i.classList.add(Ti),"ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))j.on(t,"mouseover",_);this._queueCallback((()=>{j.trigger(this._element,this.constructor.eventName("shown")),!1===this._isHovered&&this._leave(),this._isHovered=!1}),this.tip,this._isAnimated())}hide(){if(this._isShown()&&!j.trigger(this._element,this.constructor.eventName("hide")).defaultPrevented){if(this._getTipElement().classList.remove(Ti),"ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))j.off(t,"mouseover",_);this._activeTrigger.click=!1,this._activeTrigger[Li]=!1,this._activeTrigger[Si]=!1,this._isHovered=null,this._queueCallback((()=>{this._isWithActiveTrigger()||(this._isHovered||this._disposePopper(),this._element.removeAttribute("aria-describedby"),j.trigger(this._element,this.constructor.eventName("hidden")))}),this.tip,this._isAnimated())}}update(){this._popper&&this._popper.update()}_isWithContent(){return Boolean(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(Ci,Ti),e.classList.add(`bs-${this.constructor.NAME}-auto`);const i=(t=>{do{t+=Math.floor(1e6*Math.random())}while(document.getElementById(t));return t})(this.constructor.NAME).toString();return e.setAttribute("id",i),this._isAnimated()&&e.classList.add(Ci),e}setContent(t){this._newContent=t,this._isShown()&&(this._disposePopper(),this.show())}_getTemplateFactory(t){return this._templateFactory?this._templateFactory.changeContent(t):this._templateFactory=new Ai({...this._config,content:t,extraClass:this._resolvePossibleFunction(this._config.customClass)}),this._templateFactory}_getContentForTemplate(){return{".tooltip-inner":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(Ci)}_isShown(){return this.tip&&this.tip.classList.contains(Ti)}_createPopper(t){const e=v(this._config.placement,[this,t,this._element]),s=Oi[e.toUpperCase()];return i.createPopper(this._element,t,this._getPopperConfig(s))}_getOffset(){const{offset:t}=this._config;return"string"==typeof t?t.split(",").map((t=>Number.parseInt(t,10))):"function"==typeof t?e=>t(e,this._element):t}_resolvePossibleFunction(t){return v(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:t=>{this._getTipElement().setAttribute("data-popper-placement",t.state.placement)}}]};return{...e,...v(this._config.popperConfig,[e])}}_setListeners(){const t=this._config.trigger.split(" ");for(const e of t)if("click"===e)j.on(this._element,this.constructor.eventName("click"),this._config.selector,(t=>{this._initializeOnDelegatedTarget(t).toggle()}));else if("manual"!==e){const t=e===Si?this.constructor.eventName("mouseenter"):this.constructor.eventName("focusin"),i=e===Si?this.constructor.eventName("mouseleave"):this.constructor.eventName("focusout");j.on(this._element,t,this._config.selector,(t=>{const e=this._initializeOnDelegatedTarget(t);e._activeTrigger["focusin"===t.type?Li:Si]=!0,e._enter()})),j.on(this._element,i,this._config.selector,(t=>{const e=this._initializeOnDelegatedTarget(t);e._activeTrigger["focusout"===t.type?Li:Si]=e._element.contains(t.relatedTarget),e._leave()}))}this._hideModalHandler=()=>{this._element&&this.hide()},j.on(this._element.closest(ki),$i,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(){this._isShown()||this._isHovered?this._isHovered=!0:(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=B.getDataAttributes(this._element);for(const t of Object.keys(e))Ei.has(t)&&delete e[t];return t={...e,..."object"==typeof t&&t?t:{}},t=this._mergeConfigObj(t),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}_configAfterMerge(t){return t.container=!1===t.container?document.body:c(t.container),"number"==typeof t.delay&&(t.delay={show:t.delay,hide:t.delay}),"number"==typeof t.title&&(t.title=t.title.toString()),"number"==typeof t.content&&(t.content=t.content.toString()),t}_getDelegateConfig(){const t={};for(const[e,i]of Object.entries(this._config))this.constructor.Default[e]!==i&&(t[e]=i);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=Ni.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}}b(Ni);const Pi={...Ni.Default,content:"",offset:[0,8],placement:"right",template:'
',trigger:"click"},xi={...Ni.DefaultType,content:"(null|string|element|function)"};class Mi extends Ni{static get Default(){return Pi}static get DefaultType(){return xi}static get NAME(){return"popover"}_isWithContent(){return this._getTitle()||this._getContent()}_getContentForTemplate(){return{".popover-header":this._getTitle(),".popover-body":this._getContent()}}_getContent(){return this._resolvePossibleFunction(this._config.content)}static jQueryInterface(t){return this.each((function(){const e=Mi.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}}b(Mi);const ji=".bs.scrollspy",Fi=`activate${ji}`,zi=`click${ji}`,Hi=`load${ji}.data-api`,Bi="active",qi="[href]",Wi=".nav-link",Ri=`${Wi}, .nav-item > ${Wi}, .list-group-item`,Ki={offset:null,rootMargin:"0px 0px -25%",smoothScroll:!1,target:null,threshold:[.1,.5,1]},Vi={offset:"(number|null)",rootMargin:"string",smoothScroll:"boolean",target:"element",threshold:"array"};class Qi extends W{constructor(t,e){super(t,e),this._targetLinks=new Map,this._observableSections=new Map,this._rootElement="visible"===getComputedStyle(this._element).overflowY?null:this._element,this._activeTarget=null,this._observer=null,this._previousScrollData={visibleEntryTop:0,parentScrollTop:0},this.refresh()}static get Default(){return Ki}static get DefaultType(){return Vi}static get NAME(){return"scrollspy"}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=c(t.target)||document.body,t.rootMargin=t.offset?`${t.offset}px 0px -30%`:t.rootMargin,"string"==typeof t.threshold&&(t.threshold=t.threshold.split(",").map((t=>Number.parseFloat(t)))),t}_maybeEnableSmoothScroll(){this._config.smoothScroll&&(j.off(this._config.target,zi),j.on(this._config.target,zi,qi,(t=>{const e=this._observableSections.get(t.target.hash);if(e){t.preventDefault();const i=this._rootElement||window,s=e.offsetTop-this._element.offsetTop;if(i.scrollTo)return void i.scrollTo({top:s,behavior:"smooth"});i.scrollTop=s}})))}_getNewObserver(){const t={root:this._rootElement,threshold:this._config.threshold,rootMargin:this._config.rootMargin};return new IntersectionObserver((t=>this._observerCallback(t)),t)}_observerCallback(t){const e=t=>this._targetLinks.get(`#${t.target.id}`),i=t=>{this._previousScrollData.visibleEntryTop=t.target.offsetTop,this._process(e(t))},s=(this._rootElement||document.documentElement).scrollTop,n=s>=this._previousScrollData.parentScrollTop;this._previousScrollData.parentScrollTop=s;for(const o of t){if(!o.isIntersecting){this._activeTarget=null,this._clearActiveClass(e(o));continue}const t=o.target.offsetTop>=this._previousScrollData.visibleEntryTop;if(n&&t){if(i(o),!s)return}else n||t||i(o)}}_initializeTargetsAndObservables(){this._targetLinks=new Map,this._observableSections=new Map;const t=K.find(qi,this._config.target);for(const e of t){if(!e.hash||d(e))continue;const t=K.findOne(decodeURI(e.hash),this._element);h(t)&&(this._targetLinks.set(decodeURI(e.hash),e),this._observableSections.set(e.hash,t))}}_process(t){this._activeTarget!==t&&(this._clearActiveClass(this._config.target),this._activeTarget=t,t.classList.add(Bi),this._activateParents(t),j.trigger(this._element,Fi,{relatedTarget:t}))}_activateParents(t){if(t.classList.contains("dropdown-item"))K.findOne(".dropdown-toggle",t.closest(".dropdown")).classList.add(Bi);else for(const e of K.parents(t,".nav, .list-group"))for(const t of K.prev(e,Ri))t.classList.add(Bi)}_clearActiveClass(t){t.classList.remove(Bi);const e=K.find(`${qi}.${Bi}`,t);for(const t of e)t.classList.remove(Bi)}static jQueryInterface(t){return this.each((function(){const e=Qi.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t]()}}))}}j.on(window,Hi,(()=>{for(const t of K.find('[data-bs-spy="scroll"]'))Qi.getOrCreateInstance(t)})),b(Qi);const Xi=".bs.tab",Yi=`hide${Xi}`,Ui=`hidden${Xi}`,Gi=`show${Xi}`,Ji=`shown${Xi}`,Zi=`click${Xi}`,ts=`keydown${Xi}`,es=`load${Xi}`,is="ArrowLeft",ss="ArrowRight",ns="ArrowUp",os="ArrowDown",rs="Home",as="End",ls="active",cs="fade",hs="show",ds=".dropdown-toggle",us=`:not(${ds})`,_s='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',gs=`.nav-link${us}, .list-group-item${us}, [role="tab"]${us}, ${_s}`,fs=`.${ls}[data-bs-toggle="tab"], .${ls}[data-bs-toggle="pill"], .${ls}[data-bs-toggle="list"]`;class ms extends W{constructor(t){super(t),this._parent=this._element.closest('.list-group, .nav, [role="tablist"]'),this._parent&&(this._setInitialAttributes(this._parent,this._getChildren()),j.on(this._element,ts,(t=>this._keydown(t))))}static get NAME(){return"tab"}show(){const t=this._element;if(this._elemIsActive(t))return;const e=this._getActiveElem(),i=e?j.trigger(e,Yi,{relatedTarget:t}):null;j.trigger(t,Gi,{relatedTarget:e}).defaultPrevented||i&&i.defaultPrevented||(this._deactivate(e,t),this._activate(t,e))}_activate(t,e){t&&(t.classList.add(ls),this._activate(K.getElementFromSelector(t)),this._queueCallback((()=>{"tab"===t.getAttribute("role")?(t.removeAttribute("tabindex"),t.setAttribute("aria-selected",!0),this._toggleDropDown(t,!0),j.trigger(t,Ji,{relatedTarget:e})):t.classList.add(hs)}),t,t.classList.contains(cs)))}_deactivate(t,e){t&&(t.classList.remove(ls),t.blur(),this._deactivate(K.getElementFromSelector(t)),this._queueCallback((()=>{"tab"===t.getAttribute("role")?(t.setAttribute("aria-selected",!1),t.setAttribute("tabindex","-1"),this._toggleDropDown(t,!1),j.trigger(t,Ui,{relatedTarget:e})):t.classList.remove(hs)}),t,t.classList.contains(cs)))}_keydown(t){if(![is,ss,ns,os,rs,as].includes(t.key))return;t.stopPropagation(),t.preventDefault();const e=this._getChildren().filter((t=>!d(t)));let i;if([rs,as].includes(t.key))i=e[t.key===rs?0:e.length-1];else{const s=[ss,os].includes(t.key);i=w(e,t.target,s,!0)}i&&(i.focus({preventScroll:!0}),ms.getOrCreateInstance(i).show())}_getChildren(){return K.find(gs,this._parent)}_getActiveElem(){return this._getChildren().find((t=>this._elemIsActive(t)))||null}_setInitialAttributes(t,e){this._setAttributeIfNotExists(t,"role","tablist");for(const t of e)this._setInitialAttributesOnChild(t)}_setInitialAttributesOnChild(t){t=this._getInnerElement(t);const e=this._elemIsActive(t),i=this._getOuterElement(t);t.setAttribute("aria-selected",e),i!==t&&this._setAttributeIfNotExists(i,"role","presentation"),e||t.setAttribute("tabindex","-1"),this._setAttributeIfNotExists(t,"role","tab"),this._setInitialAttributesOnTargetPanel(t)}_setInitialAttributesOnTargetPanel(t){const e=K.getElementFromSelector(t);e&&(this._setAttributeIfNotExists(e,"role","tabpanel"),t.id&&this._setAttributeIfNotExists(e,"aria-labelledby",`${t.id}`))}_toggleDropDown(t,e){const i=this._getOuterElement(t);if(!i.classList.contains("dropdown"))return;const s=(t,s)=>{const n=K.findOne(t,i);n&&n.classList.toggle(s,e)};s(ds,ls),s(".dropdown-menu",hs),i.setAttribute("aria-expanded",e)}_setAttributeIfNotExists(t,e,i){t.hasAttribute(e)||t.setAttribute(e,i)}_elemIsActive(t){return t.classList.contains(ls)}_getInnerElement(t){return t.matches(gs)?t:K.findOne(gs,t)}_getOuterElement(t){return t.closest(".nav-item, .list-group-item")||t}static jQueryInterface(t){return this.each((function(){const e=ms.getOrCreateInstance(this);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t]()}}))}}j.on(document,Zi,_s,(function(t){["A","AREA"].includes(this.tagName)&&t.preventDefault(),d(this)||ms.getOrCreateInstance(this).show()})),j.on(window,es,(()=>{for(const t of K.find(fs))ms.getOrCreateInstance(t)})),b(ms);const ps=".bs.toast",bs=`mouseover${ps}`,vs=`mouseout${ps}`,ys=`focusin${ps}`,ws=`focusout${ps}`,As=`hide${ps}`,Es=`hidden${ps}`,Cs=`show${ps}`,Ts=`shown${ps}`,ks="hide",$s="show",Ss="showing",Ls={animation:"boolean",autohide:"boolean",delay:"number"},Os={animation:!0,autohide:!0,delay:5e3};class Is extends W{constructor(t,e){super(t,e),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get Default(){return Os}static get DefaultType(){return Ls}static get NAME(){return"toast"}show(){j.trigger(this._element,Cs).defaultPrevented||(this._clearTimeout(),this._config.animation&&this._element.classList.add("fade"),this._element.classList.remove(ks),g(this._element),this._element.classList.add($s,Ss),this._queueCallback((()=>{this._element.classList.remove(Ss),j.trigger(this._element,Ts),this._maybeScheduleHide()}),this._element,this._config.animation))}hide(){this.isShown()&&(j.trigger(this._element,As).defaultPrevented||(this._element.classList.add(Ss),this._queueCallback((()=>{this._element.classList.add(ks),this._element.classList.remove(Ss,$s),j.trigger(this._element,Es)}),this._element,this._config.animation)))}dispose(){this._clearTimeout(),this.isShown()&&this._element.classList.remove($s),super.dispose()}isShown(){return this._element.classList.contains($s)}_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}if(e)return void this._clearTimeout();const i=t.relatedTarget;this._element===i||this._element.contains(i)||this._maybeScheduleHide()}_setListeners(){j.on(this._element,bs,(t=>this._onInteraction(t,!0))),j.on(this._element,vs,(t=>this._onInteraction(t,!1))),j.on(this._element,ys,(t=>this._onInteraction(t,!0))),j.on(this._element,ws,(t=>this._onInteraction(t,!1)))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(t){return this.each((function(){const e=Is.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t](this)}}))}}return V(Is),b(Is),{Alert:U,Button:J,Carousel:Ot,Collapse:Rt,Dropdown:fe,Modal:Ue,Offcanvas:gi,Popover:Mi,ScrollSpy:Qi,Tab:ms,Toast:Is,Tooltip:Ni}}));
+//# sourceMappingURL=bootstrap.min.js.map
\ No newline at end of file
diff --git a/scripts/scripts.js b/scripts/scripts.js
new file mode 100644
index 0000000..443dfb2
--- /dev/null
+++ b/scripts/scripts.js
@@ -0,0 +1,130 @@
+!function (t, e) { "object" == typeof exports && "object" == typeof module ? module.exports = e() : "function" == typeof define && define.amd ? define("TOTP", [], e) : "object" == typeof exports ? exports.TOTP = e() : t.TOTP = e() }(window, function () { return function (t) { var e = {}; function r(n) { if (e[n]) return e[n].exports; var o = e[n] = { i: n, l: !1, exports: {} }; return t[n].call(o.exports, o, o.exports, r), o.l = !0, o.exports } return r.m = t, r.c = e, r.d = function (t, e, n) { r.o(t, e) || Object.defineProperty(t, e, { configurable: !1, enumerable: !0, get: n }) }, r.r = function (t) { Object.defineProperty(t, "__esModule", { value: !0 }) }, r.n = function (t) { var e = t && t.__esModule ? function () { return t.default } : function () { return t }; return r.d(e, "a", e), e }, r.o = function (t, e) { return Object.prototype.hasOwnProperty.call(t, e) }, r.p = "", r(r.s = 10) }([function (t, e, r) { "use strict"; var n = function () { function t(t, e) { for (var r = 0; r < e.length; r++) { var n = e[r]; n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n) } } return function (e, r, n) { return r && t(e.prototype, r), n && t(e, n), e } }(); var o = r(9), i = r(2), u = function () { function t(e) { var r = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 6; !function (t, e) { if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function") }(this, t), this.key = e, this.digit = r } return n(t, [{ key: "genOTP", value: function (t) { var e = new i("SHA-1", "BYTES"); e.setHMACKey(o.decode(this.key).toString(), "BYTES"); var r = this._factor2ByteText(t); e.update(r); var n = e.getHMAC("BYTES"); return this._truncat(n) } }, { key: "verify", value: function (t, e) { return t === this.genOTP(e) } }, { key: "gaURL", value: function () { return "otpauth://hotp/" + (arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : "") + "?issuer=" + (arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : "") + "&secret=" + this.key } }, { key: "_truncat", value: function (t) { for (var e = 15 & t[19].charCodeAt(), r = (((127 & t[e].charCodeAt()) << 24 | (255 & t[e + 1].charCodeAt()) << 16 | (255 & t[e + 2].charCodeAt()) << 8 | 255 & t[e + 3].charCodeAt()) % 10 ** this.digit).toString(); r.length < this.digit;)r = "0" + r; return r } }, { key: "_factor2ByteText", value: function (t) { for (var e = new Array(8), r = e.length - 1; r >= 0; r--)e[r] = String.fromCharCode(255 & t), t >>= 8; return e.join("") } }], [{ key: "randomKey", value: function () { var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 16, e = Math.random().toString(36); return o.encode(e).toString().substr(0, t) } }, { key: "base32", get: function () { return o } }]), t }(); t.exports = u }, function (t, e, r) { "use strict"; var n = function () { function t(t, e) { for (var r = 0; r < e.length; r++) { var n = e[r]; n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n) } } return function (e, r, n) { return r && t(e.prototype, r), n && t(e, n), e } }(); var o = r(0), i = function (t) { function e() { return function (t, e) { if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function") }(this, e), function (t, e) { if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return !e || "object" != typeof e && "function" != typeof e ? t : e }(this, (e.__proto__ || Object.getPrototypeOf(e)).apply(this, arguments)) } return function (t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, enumerable: !1, writable: !0, configurable: !0 } }), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e) }(e, o), n(e, [{ key: "genOTP", value: function () { var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 30, r = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 0, n = Math.floor((Date.now() / 1e3 - r) / t); return function t(e, r, n) { null === e && (e = Function.prototype); var o = Object.getOwnPropertyDescriptor(e, r); if (void 0 === o) { var i = Object.getPrototypeOf(e); return null === i ? void 0 : t(i, r, n) } if ("value" in o) return o.value; var u = o.get; return void 0 !== u ? u.call(n) : void 0 }(e.prototype.__proto__ || Object.getPrototypeOf(e.prototype), "genOTP", this).call(this, n) } }, { key: "verify", value: function (t) { var e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 30, r = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : 0; return t === this.genOTP(e, r) } }, { key: "gaURL", value: function () { return "otpauth://totp/" + (arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : "") + "?issuer=" + (arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : "") + "&secret=" + this.key } }]), e }(); t.exports = i }, function (t, e, r) { "use strict"; var n; !function (o) { function i(t, e, r) { var n, o, i, u, p, w, g, y, b, d = 0, v = [], A = 0, E = !1, m = [], R = [], S = !1, T = !1, _ = -1; if (n = (r = r || {}).encoding || "UTF8", (b = r.numRounds || 1) !== parseInt(b, 10) || 1 > b) throw Error("numRounds must a integer >= 1"); if ("SHA-1" === t) p = 512, w = M, g = F, u = 160, y = function (t) { return t.slice() }; else if (0 === t.lastIndexOf("SHA-", 0)) if (w = function (e, r) { return D(e, r, t) }, g = function (e, r, n, o) { var i, u; if ("SHA-224" === t || "SHA-256" === t) i = 15 + (r + 65 >>> 9 << 4), u = 16; else { if ("SHA-384" !== t && "SHA-512" !== t) throw Error("Unexpected error in SHA-2 implementation"); i = 31 + (r + 129 >>> 10 << 5), u = 32 } for (; e.length <= i;)e.push(0); for (e[r >>> 5] |= 128 << 24 - r % 32, r += n, e[i] = 4294967295 & r, e[i - 1] = r / 4294967296 | 0, n = e.length, r = 0; r < n; r += u)o = D(e.slice(r, r + u), o, t); if ("SHA-224" === t) e = [o[0], o[1], o[2], o[3], o[4], o[5], o[6]]; else if ("SHA-256" === t) e = o; else if ("SHA-384" === t) e = [o[0].a, o[0].b, o[1].a, o[1].b, o[2].a, o[2].b, o[3].a, o[3].b, o[4].a, o[4].b, o[5].a, o[5].b]; else { if ("SHA-512" !== t) throw Error("Unexpected error in SHA-2 implementation"); e = [o[0].a, o[0].b, o[1].a, o[1].b, o[2].a, o[2].b, o[3].a, o[3].b, o[4].a, o[4].b, o[5].a, o[5].b, o[6].a, o[6].b, o[7].a, o[7].b] } return e }, y = function (t) { return t.slice() }, "SHA-224" === t) p = 512, u = 224; else if ("SHA-256" === t) p = 512, u = 256; else if ("SHA-384" === t) p = 1024, u = 384; else { if ("SHA-512" !== t) throw Error("Chosen SHA variant is not supported"); p = 1024, u = 512 } else { if (0 !== t.lastIndexOf("SHA3-", 0) && 0 !== t.lastIndexOf("SHAKE", 0)) throw Error("Chosen SHA variant is not supported"); var B = 6; if (w = j, y = function (t) { var e, r = []; for (e = 0; 5 > e; e += 1)r[e] = t[e].slice(); return r }, _ = 1, "SHA3-224" === t) p = 1152, u = 224; else if ("SHA3-256" === t) p = 1088, u = 256; else if ("SHA3-384" === t) p = 832, u = 384; else if ("SHA3-512" === t) p = 576, u = 512; else if ("SHAKE128" === t) p = 1344, u = -1, B = 31, T = !0; else { if ("SHAKE256" !== t) throw Error("Chosen SHA variant is not supported"); p = 1088, u = -1, B = 31, T = !0 } g = function (t, e, r, n, o) { var i, u = B, a = [], f = (r = p) >>> 5, s = 0, h = e >>> 5; for (i = 0; i < h && e >= r; i += f)n = j(t.slice(i, i + f), n), e -= r; for (t = t.slice(i), e %= r; t.length < f;)t.push(0); for (t[(i = e >>> 3) >> 2] ^= u << i % 4 * 8, t[f - 1] ^= 2147483648, n = j(t, n); 32 * a.length < o && (t = n[s % 5][s / 5 | 0], a.push(t.b), !(32 * a.length >= o));)a.push(t.a), 0 == 64 * (s += 1) % r && j(null, n); return a } } i = l(e, n, _), o = x(t), this.setHMACKey = function (e, r, i) { var a; if (!0 === E) throw Error("HMAC key already set"); if (!0 === S) throw Error("Cannot set HMAC key after calling update"); if (!0 === T) throw Error("SHAKE is not supported for HMAC"); if (e = (r = l(r, n = (i || {}).encoding || "UTF8", _)(e)).binLen, r = r.value, i = (a = p >>> 3) / 4 - 1, a < e / 8) { for (r = g(r, e, 0, x(t), u); r.length <= i;)r.push(0); r[i] &= 4294967040 } else if (a > e / 8) { for (; r.length <= i;)r.push(0); r[i] &= 4294967040 } for (e = 0; e <= i; e += 1)m[e] = 909522486 ^ r[e], R[e] = 1549556828 ^ r[e]; o = w(m, o), d = p, E = !0 }, this.update = function (t) { var e, r, n, u = 0, a = p >>> 5; for (t = (e = i(t, v, A)).binLen, r = e.value, e = t >>> 5, n = 0; n < e; n += a)u + p <= t && (o = w(r.slice(n, n + a), o), u += p); d += u, v = r.slice(u >>> 5), A = t % p, S = !0 }, this.getHash = function (e, r) { var n, i, l, p; if (!0 === E) throw Error("Cannot call getHash after setting HMAC key"); if (l = c(r), !0 === T) { if (-1 === l.shakeLen) throw Error("shakeLen must be specified in options"); u = l.shakeLen } switch (e) { case "HEX": n = function (t) { return a(t, u, _, l) }; break; case "B64": n = function (t) { return f(t, u, _, l) }; break; case "BYTES": n = function (t) { return s(t, u, _) }; break; case "ARRAYBUFFER": try { i = new ArrayBuffer(0) } catch (t) { throw Error("ARRAYBUFFER not supported by this environment") } n = function (t) { return h(t, u, _) }; break; default: throw Error("format must be HEX, B64, BYTES, or ARRAYBUFFER") }for (p = g(v.slice(), A, d, y(o), u), i = 1; i < b; i += 1)!0 === T && 0 != u % 32 && (p[p.length - 1] &= 16777215 >>> 24 - u % 32), p = g(p, u, 0, x(t), u); return n(p) }, this.getHMAC = function (e, r) { var n, i, l, b; if (!1 === E) throw Error("Cannot call getHMAC without first setting HMAC key"); switch (l = c(r), e) { case "HEX": n = function (t) { return a(t, u, _, l) }; break; case "B64": n = function (t) { return f(t, u, _, l) }; break; case "BYTES": n = function (t) { return s(t, u, _) }; break; case "ARRAYBUFFER": try { n = new ArrayBuffer(0) } catch (t) { throw Error("ARRAYBUFFER not supported by this environment") } n = function (t) { return h(t, u, _) }; break; default: throw Error("outputFormat must be HEX, B64, BYTES, or ARRAYBUFFER") }return i = g(v.slice(), A, d, y(o), u), b = w(R, x(t)), n(b = g(i, u, p, b, u)) } } function u(t, e) { this.a = t, this.b = e } function a(t, e, r, n) { var o, i, u, a = ""; for (e /= 8, u = -1 === r ? 3 : 0, o = 0; o < e; o += 1)i = t[o >>> 2] >>> 8 * (u + o % 4 * r), a += "0123456789abcdef".charAt(i >>> 4 & 15) + "0123456789abcdef".charAt(15 & i); return n.outputUpper ? a.toUpperCase() : a } function f(t, e, r, n) { var o, i, u, a, f = "", s = e / 8; for (a = -1 === r ? 3 : 0, o = 0; o < s; o += 3)for (i = o + 1 < s ? t[o + 1 >>> 2] : 0, u = o + 2 < s ? t[o + 2 >>> 2] : 0, u = (t[o >>> 2] >>> 8 * (a + o % 4 * r) & 255) << 16 | (i >>> 8 * (a + (o + 1) % 4 * r) & 255) << 8 | u >>> 8 * (a + (o + 2) % 4 * r) & 255, i = 0; 4 > i; i += 1)f += 8 * o + 6 * i <= e ? "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(u >>> 6 * (3 - i) & 63) : n.b64Pad; return f } function s(t, e, r) { var n, o, i, u = ""; for (e /= 8, i = -1 === r ? 3 : 0, n = 0; n < e; n += 1)o = t[n >>> 2] >>> 8 * (i + n % 4 * r) & 255, u += String.fromCharCode(o); return u } function h(t, e, r) { e /= 8; var n, o, i, u = new ArrayBuffer(e); for (i = new Uint8Array(u), o = -1 === r ? 3 : 0, n = 0; n < e; n += 1)i[n] = t[n >>> 2] >>> 8 * (o + n % 4 * r) & 255; return u } function c(t) { var e = { outputUpper: !1, b64Pad: "=", shakeLen: -1 }; if (t = t || {}, e.outputUpper = t.outputUpper || !1, !0 === t.hasOwnProperty("b64Pad") && (e.b64Pad = t.b64Pad), !0 === t.hasOwnProperty("shakeLen")) { if (0 != t.shakeLen % 8) throw Error("shakeLen must be a multiple of 8"); e.shakeLen = t.shakeLen } if ("boolean" != typeof e.outputUpper) throw Error("Invalid outputUpper formatting option"); if ("string" != typeof e.b64Pad) throw Error("Invalid b64Pad formatting option"); return e } function l(t, e, r) { switch (e) { case "UTF8": case "UTF16BE": case "UTF16LE": break; default: throw Error("encoding must be UTF8, UTF16BE, or UTF16LE") }switch (t) { case "HEX": t = function (t, e, n) { var o, i, u, a, f, s, h = t.length; if (0 != h % 2) throw Error("String of HEX type must be in byte increments"); for (e = e || [0], f = (n = n || 0) >>> 3, s = -1 === r ? 3 : 0, o = 0; o < h; o += 2) { if (i = parseInt(t.substr(o, 2), 16), isNaN(i)) throw Error("String of HEX type contains invalid characters"); for (u = (a = (o >>> 1) + f) >>> 2; e.length <= u;)e.push(0); e[u] |= i << 8 * (s + a % 4 * r) } return { value: e, binLen: 4 * h + n } }; break; case "TEXT": t = function (t, n, o) { var i, u, a, f, s, h, c, l, p = 0; if (n = n || [0], s = (o = o || 0) >>> 3, "UTF8" === e) for (l = -1 === r ? 3 : 0, a = 0; a < t.length; a += 1)for (u = [], 128 > (i = t.charCodeAt(a)) ? u.push(i) : 2048 > i ? (u.push(192 | i >>> 6), u.push(128 | 63 & i)) : 55296 > i || 57344 <= i ? u.push(224 | i >>> 12, 128 | i >>> 6 & 63, 128 | 63 & i) : (a += 1, i = 65536 + ((1023 & i) << 10 | 1023 & t.charCodeAt(a)), u.push(240 | i >>> 18, 128 | i >>> 12 & 63, 128 | i >>> 6 & 63, 128 | 63 & i)), f = 0; f < u.length; f += 1) { for (h = (c = p + s) >>> 2; n.length <= h;)n.push(0); n[h] |= u[f] << 8 * (l + c % 4 * r), p += 1 } else if ("UTF16BE" === e || "UTF16LE" === e) for (l = -1 === r ? 2 : 0, u = "UTF16LE" === e && 1 !== r || "UTF16LE" !== e && 1 === r, a = 0; a < t.length; a += 1) { for (i = t.charCodeAt(a), !0 === u && (i = (f = 255 & i) << 8 | i >>> 8), h = (c = p + s) >>> 2; n.length <= h;)n.push(0); n[h] |= i << 8 * (l + c % 4 * r), p += 2 } return { value: n, binLen: 8 * p + o } }; break; case "B64": t = function (t, e, n) { var o, i, u, a, f, s, h, c, l = 0; if (-1 === t.search(/^[a-zA-Z0-9=+\/]+$/)) throw Error("Invalid character in base-64 string"); if (i = t.indexOf("="), t = t.replace(/\=/g, ""), -1 !== i && i < t.length) throw Error("Invalid '=' found in base-64 string"); for (e = e || [0], s = (n = n || 0) >>> 3, c = -1 === r ? 3 : 0, i = 0; i < t.length; i += 4) { for (f = t.substr(i, 4), u = a = 0; u < f.length; u += 1)a |= (o = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(f[u])) << 18 - 6 * u; for (u = 0; u < f.length - 1; u += 1) { for (o = (h = l + s) >>> 2; e.length <= o;)e.push(0); e[o] |= (a >>> 16 - 8 * u & 255) << 8 * (c + h % 4 * r), l += 1 } } return { value: e, binLen: 8 * l + n } }; break; case "BYTES": t = function (t, e, n) { var o, i, u, a, f, s; for (e = e || [0], u = (n = n || 0) >>> 3, s = -1 === r ? 3 : 0, i = 0; i < t.length; i += 1)o = t.charCodeAt(i), a = (f = i + u) >>> 2, e.length <= a && e.push(0), e[a] |= o << 8 * (s + f % 4 * r); return { value: e, binLen: 8 * t.length + n } }; break; case "ARRAYBUFFER": try { t = new ArrayBuffer(0) } catch (t) { throw Error("ARRAYBUFFER not supported by this environment") } t = function (t, e, n) { var o, i, u, a, f, s; for (e = e || [0], i = (n = n || 0) >>> 3, f = -1 === r ? 3 : 0, s = new Uint8Array(t), o = 0; o < t.byteLength; o += 1)u = (a = o + i) >>> 2, e.length <= u && e.push(0), e[u] |= s[o] << 8 * (f + a % 4 * r); return { value: e, binLen: 8 * t.byteLength + n } }; break; default: throw Error("format must be HEX, TEXT, B64, BYTES, or ARRAYBUFFER") }return t } function p(t, e) { return t << e | t >>> 32 - e } function w(t, e) { return 32 < e ? (e -= 32, new u(t.b << e | t.a >>> 32 - e, t.a << e | t.b >>> 32 - e)) : 0 !== e ? new u(t.a << e | t.b >>> 32 - e, t.b << e | t.a >>> 32 - e) : t } function g(t, e) { return t >>> e | t << 32 - e } function y(t, e) { var r = null; r = new u(t.a, t.b); return 32 >= e ? new u(r.a >>> e | r.b << 32 - e & 4294967295, r.b >>> e | r.a << 32 - e & 4294967295) : new u(r.b >>> e - 32 | r.a << 64 - e & 4294967295, r.a >>> e - 32 | r.b << 64 - e & 4294967295) } function b(t, e) { return 32 >= e ? new u(t.a >>> e, t.b >>> e | t.a << 32 - e & 4294967295) : new u(0, t.a >>> e - 32) } function d(t, e, r) { return t & e ^ ~t & r } function v(t, e, r) { return new u(t.a & e.a ^ ~t.a & r.a, t.b & e.b ^ ~t.b & r.b) } function A(t, e, r) { return t & e ^ t & r ^ e & r } function E(t, e, r) { return new u(t.a & e.a ^ t.a & r.a ^ e.a & r.a, t.b & e.b ^ t.b & r.b ^ e.b & r.b) } function m(t) { return g(t, 2) ^ g(t, 13) ^ g(t, 22) } function R(t) { var e = y(t, 28), r = y(t, 34); return t = y(t, 39), new u(e.a ^ r.a ^ t.a, e.b ^ r.b ^ t.b) } function S(t) { return g(t, 6) ^ g(t, 11) ^ g(t, 25) } function T(t) { var e = y(t, 14), r = y(t, 18); return t = y(t, 41), new u(e.a ^ r.a ^ t.a, e.b ^ r.b ^ t.b) } function _(t) { return g(t, 7) ^ g(t, 18) ^ t >>> 3 } function B(t) { var e = y(t, 1), r = y(t, 8); return t = b(t, 7), new u(e.a ^ r.a ^ t.a, e.b ^ r.b ^ t.b) } function P(t) { return g(t, 17) ^ g(t, 19) ^ t >>> 10 } function U(t) { var e = y(t, 19), r = y(t, 61); return t = b(t, 6), new u(e.a ^ r.a ^ t.a, e.b ^ r.b ^ t.b) } function O(t, e) { var r = (65535 & t) + (65535 & e); return ((t >>> 16) + (e >>> 16) + (r >>> 16) & 65535) << 16 | 65535 & r } function C(t, e, r, n) { var o = (65535 & t) + (65535 & e) + (65535 & r) + (65535 & n); return ((t >>> 16) + (e >>> 16) + (r >>> 16) + (n >>> 16) + (o >>> 16) & 65535) << 16 | 65535 & o } function H(t, e, r, n, o) { var i = (65535 & t) + (65535 & e) + (65535 & r) + (65535 & n) + (65535 & o); return ((t >>> 16) + (e >>> 16) + (r >>> 16) + (n >>> 16) + (o >>> 16) + (i >>> 16) & 65535) << 16 | 65535 & i } function Y(t, e) { var r, n, o; return r = (65535 & t.b) + (65535 & e.b), o = (65535 & (n = (t.b >>> 16) + (e.b >>> 16) + (r >>> 16))) << 16 | 65535 & r, r = (65535 & t.a) + (65535 & e.a) + (n >>> 16), new u((65535 & (n = (t.a >>> 16) + (e.a >>> 16) + (r >>> 16))) << 16 | 65535 & r, o) } function k(t, e, r, n) { var o, i, a; return o = (65535 & t.b) + (65535 & e.b) + (65535 & r.b) + (65535 & n.b), a = (65535 & (i = (t.b >>> 16) + (e.b >>> 16) + (r.b >>> 16) + (n.b >>> 16) + (o >>> 16))) << 16 | 65535 & o, o = (65535 & t.a) + (65535 & e.a) + (65535 & r.a) + (65535 & n.a) + (i >>> 16), new u((65535 & (i = (t.a >>> 16) + (e.a >>> 16) + (r.a >>> 16) + (n.a >>> 16) + (o >>> 16))) << 16 | 65535 & o, a) } function L(t, e, r, n, o) { var i, a, f; return i = (65535 & t.b) + (65535 & e.b) + (65535 & r.b) + (65535 & n.b) + (65535 & o.b), f = (65535 & (a = (t.b >>> 16) + (e.b >>> 16) + (r.b >>> 16) + (n.b >>> 16) + (o.b >>> 16) + (i >>> 16))) << 16 | 65535 & i, i = (65535 & t.a) + (65535 & e.a) + (65535 & r.a) + (65535 & n.a) + (65535 & o.a) + (a >>> 16), new u((65535 & (a = (t.a >>> 16) + (e.a >>> 16) + (r.a >>> 16) + (n.a >>> 16) + (o.a >>> 16) + (i >>> 16))) << 16 | 65535 & i, f) } function I(t, e) { return new u(t.a ^ e.a, t.b ^ e.b) } function x(t) { var e, r = []; if ("SHA-1" === t) r = [1732584193, 4023233417, 2562383102, 271733878, 3285377520]; else if (0 === t.lastIndexOf("SHA-", 0)) switch (r = [3238371032, 914150663, 812702999, 4144912697, 4290775857, 1750603025, 1694076839, 3204075428], e = [1779033703, 3144134277, 1013904242, 2773480762, 1359893119, 2600822924, 528734635, 1541459225], t) { case "SHA-224": break; case "SHA-256": r = e; break; case "SHA-384": r = [new u(3418070365, r[0]), new u(1654270250, r[1]), new u(2438529370, r[2]), new u(355462360, r[3]), new u(1731405415, r[4]), new u(41048885895, r[5]), new u(3675008525, r[6]), new u(1203062813, r[7])]; break; case "SHA-512": r = [new u(e[0], 4089235720), new u(e[1], 2227873595), new u(e[2], 4271175723), new u(e[3], 1595750129), new u(e[4], 2917565137), new u(e[5], 725511199), new u(e[6], 4215389547), new u(e[7], 327033209)]; break; default: throw Error("Unknown SHA variant") } else { if (0 !== t.lastIndexOf("SHA3-", 0) && 0 !== t.lastIndexOf("SHAKE", 0)) throw Error("No SHA variants supported"); for (t = 0; 5 > t; t += 1)r[t] = [new u(0, 0), new u(0, 0), new u(0, 0), new u(0, 0), new u(0, 0)] } return r } function M(t, e) { var r, n, o, i, u, a, f, s = []; for (r = e[0], n = e[1], o = e[2], i = e[3], u = e[4], f = 0; 80 > f; f += 1)s[f] = 16 > f ? t[f] : p(s[f - 3] ^ s[f - 8] ^ s[f - 14] ^ s[f - 16], 1), a = 20 > f ? H(p(r, 5), n & o ^ ~n & i, u, 1518500249, s[f]) : 40 > f ? H(p(r, 5), n ^ o ^ i, u, 1859775393, s[f]) : 60 > f ? H(p(r, 5), A(n, o, i), u, 2400959708, s[f]) : H(p(r, 5), n ^ o ^ i, u, 3395469782, s[f]), u = i, i = o, o = p(n, 30), n = r, r = a; return e[0] = O(r, e[0]), e[1] = O(n, e[1]), e[2] = O(o, e[2]), e[3] = O(i, e[3]), e[4] = O(u, e[4]), e } function F(t, e, r, n) { var o; for (o = 15 + (e + 65 >>> 9 << 4); t.length <= o;)t.push(0); for (t[e >>> 5] |= 128 << 24 - e % 32, e += r, t[o] = 4294967295 & e, t[o - 1] = e / 4294967296 | 0, e = t.length, o = 0; o < e; o += 16)n = M(t.slice(o, o + 16), n); return n } function D(t, e, r) { var n, o, i, a, f, s, h, c, l, p, w, g, y, b, I, x, M, F, D, j, z, K, V, Z = []; if ("SHA-224" === r || "SHA-256" === r) p = 64, g = 1, K = Number, y = O, b = C, I = H, x = _, M = P, F = m, D = S, z = A, j = d, V = N; else { if ("SHA-384" !== r && "SHA-512" !== r) throw Error("Unexpected error in SHA-2 implementation"); p = 80, g = 2, K = u, y = Y, b = k, I = L, x = B, M = U, F = R, D = T, z = E, j = v, V = X } for (r = e[0], n = e[1], o = e[2], i = e[3], a = e[4], f = e[5], s = e[6], h = e[7], w = 0; w < p; w += 1)16 > w ? (l = w * g, c = t.length <= l ? 0 : t[l], l = t.length <= l + 1 ? 0 : t[l + 1], Z[w] = new K(c, l)) : Z[w] = b(M(Z[w - 2]), Z[w - 7], x(Z[w - 15]), Z[w - 16]), c = I(h, D(a), j(a, f, s), V[w], Z[w]), l = y(F(r), z(r, n, o)), h = s, s = f, f = a, a = y(i, c), i = o, o = n, n = r, r = y(c, l); return e[0] = y(r, e[0]), e[1] = y(n, e[1]), e[2] = y(o, e[2]), e[3] = y(i, e[3]), e[4] = y(a, e[4]), e[5] = y(f, e[5]), e[6] = y(s, e[6]), e[7] = y(h, e[7]), e } function j(t, e) { var r, n, o, i, a = [], f = []; if (null !== t) for (n = 0; n < t.length; n += 2)e[(n >>> 1) % 5][(n >>> 1) / 5 | 0] = I(e[(n >>> 1) % 5][(n >>> 1) / 5 | 0], new u(t[n + 1], t[n])); for (r = 0; 24 > r; r += 1) { for (i = x("SHA3-"), n = 0; 5 > n; n += 1) { o = e[n][0]; var s = e[n][1], h = e[n][2], c = e[n][3], l = e[n][4]; a[n] = new u(o.a ^ s.a ^ h.a ^ c.a ^ l.a, o.b ^ s.b ^ h.b ^ c.b ^ l.b) } for (n = 0; 5 > n; n += 1)f[n] = I(a[(n + 4) % 5], w(a[(n + 1) % 5], 1)); for (n = 0; 5 > n; n += 1)for (o = 0; 5 > o; o += 1)e[n][o] = I(e[n][o], f[n]); for (n = 0; 5 > n; n += 1)for (o = 0; 5 > o; o += 1)i[o][(2 * n + 3 * o) % 5] = w(e[n][o], z[n][o]); for (n = 0; 5 > n; n += 1)for (o = 0; 5 > o; o += 1)e[n][o] = I(i[n][o], new u(~i[(n + 1) % 5][o].a & i[(n + 2) % 5][o].a, ~i[(n + 1) % 5][o].b & i[(n + 2) % 5][o].b)); e[0][0] = I(e[0][0], K[r]) } return e } var N, X, z, K; X = [new u((N = [1116352408, 1899447441, 3049323471, 3921009573, 961987163, 1508970993, 2453635748, 2870763221, 3624381080, 310598401, 607225278, 1426881987, 1925078388, 2162078206, 2614888103, 3248222580, 3835390401, 4022224774, 264347078, 604807628, 770255983, 1249150122, 1555081692, 1996064986, 2554220882, 2821834349, 2952996808, 3210313671, 3336571891, 3584528711, 113926993, 338241895, 666307205, 773529912, 1294757372, 1396182291, 1695183700, 1986661051, 2177026350, 2456956037, 2730485921, 2820302411, 3259730800, 3345764771, 3516065817, 3600352804, 4094571909, 275423344, 430227734, 506948616, 659060556, 883997877, 958139571, 1322822218, 1537002063, 1747873779, 1955562222, 2024104815, 2227730452, 2361852424, 2428436474, 2756734187, 3204031479, 3329325298])[0], 3609767458), new u(N[1], 602891725), new u(N[2], 3964484399), new u(N[3], 2173295548), new u(N[4], 4081628472), new u(N[5], 3053834265), new u(N[6], 2937671579), new u(N[7], 3664609560), new u(N[8], 2734883394), new u(N[9], 1164996542), new u(N[10], 1323610764), new u(N[11], 3590304994), new u(N[12], 4068182383), new u(N[13], 991336113), new u(N[14], 633803317), new u(N[15], 3479774868), new u(N[16], 2666613458), new u(N[17], 944711139), new u(N[18], 2341262773), new u(N[19], 2007800933), new u(N[20], 1495990901), new u(N[21], 1856431235), new u(N[22], 3175218132), new u(N[23], 2198950837), new u(N[24], 3999719339), new u(N[25], 766784016), new u(N[26], 2566594879), new u(N[27], 3203337956), new u(N[28], 1034457026), new u(N[29], 2466948901), new u(N[30], 3758326383), new u(N[31], 168717936), new u(N[32], 1188179964), new u(N[33], 1546045734), new u(N[34], 1522805485), new u(N[35], 2643833823), new u(N[36], 2343527390), new u(N[37], 1014477480), new u(N[38], 1206759142), new u(N[39], 344077627), new u(N[40], 1290863460), new u(N[41], 3158454273), new u(N[42], 3505952657), new u(N[43], 106217008), new u(N[44], 3606008344), new u(N[45], 1432725776), new u(N[46], 1467031594), new u(N[47], 851169720), new u(N[48], 3100823752), new u(N[49], 1363258195), new u(N[50], 3750685593), new u(N[51], 3785050280), new u(N[52], 3318307427), new u(N[53], 3812723403), new u(N[54], 2003034995), new u(N[55], 3602036899), new u(N[56], 1575990012), new u(N[57], 1125592928), new u(N[58], 2716904306), new u(N[59], 442776044), new u(N[60], 593698344), new u(N[61], 3733110249), new u(N[62], 2999351573), new u(N[63], 3815920427), new u(3391569614, 3928383900), new u(3515267271, 566280711), new u(3940187606, 3454069534), new u(4118630271, 4000239992), new u(116418474, 1914138554), new u(174292421, 2731055270), new u(289380356, 3203993006), new u(460393269, 320620315), new u(685471733, 587496836), new u(852142971, 1086792851), new u(1017036298, 365543100), new u(1126000580, 2618297676), new u(1288033470, 3409855158), new u(1501505948, 4234509866), new u(1607167915, 987167468), new u(1816402316, 1246189591)], K = [new u(0, 1), new u(0, 32898), new u(2147483648, 32906), new u(2147483648, 2147516416), new u(0, 32907), new u(0, 2147483649), new u(2147483648, 2147516545), new u(2147483648, 32777), new u(0, 138), new u(0, 136), new u(0, 2147516425), new u(0, 2147483658), new u(0, 2147516555), new u(2147483648, 139), new u(2147483648, 32905), new u(2147483648, 32771), new u(2147483648, 32770), new u(2147483648, 128), new u(0, 32778), new u(2147483648, 2147483658), new u(2147483648, 2147516545), new u(2147483648, 32896), new u(0, 2147483649), new u(2147483648, 2147516424)], z = [[0, 36, 3, 41, 18], [1, 44, 10, 45, 2], [62, 6, 43, 15, 61], [28, 55, 25, 21, 56], [27, 20, 39, 8, 14]], void 0 === (n = function () { return i }.call(e, r, e, t)) || (t.exports = n) }() }, function (t, e) { var r = {}.toString; t.exports = Array.isArray || function (t) { return "[object Array]" == r.call(t) } }, function (t, e) { e.read = function (t, e, r, n, o) { var i, u, a = 8 * o - n - 1, f = (1 << a) - 1, s = f >> 1, h = -7, c = r ? o - 1 : 0, l = r ? -1 : 1, p = t[e + c]; for (c += l, i = p & (1 << -h) - 1, p >>= -h, h += a; h > 0; i = 256 * i + t[e + c], c += l, h -= 8); for (u = i & (1 << -h) - 1, i >>= -h, h += n; h > 0; u = 256 * u + t[e + c], c += l, h -= 8); if (0 === i) i = 1 - s; else { if (i === f) return u ? NaN : 1 / 0 * (p ? -1 : 1); u += Math.pow(2, n), i -= s } return (p ? -1 : 1) * u * Math.pow(2, i - n) }, e.write = function (t, e, r, n, o, i) { var u, a, f, s = 8 * i - o - 1, h = (1 << s) - 1, c = h >> 1, l = 23 === o ? Math.pow(2, -24) - Math.pow(2, -77) : 0, p = n ? 0 : i - 1, w = n ? 1 : -1, g = e < 0 || 0 === e && 1 / e < 0 ? 1 : 0; for (e = Math.abs(e), isNaN(e) || e === 1 / 0 ? (a = isNaN(e) ? 1 : 0, u = h) : (u = Math.floor(Math.log(e) / Math.LN2), e * (f = Math.pow(2, -u)) < 1 && (u--, f *= 2), (e += u + c >= 1 ? l / f : l * Math.pow(2, 1 - c)) * f >= 2 && (u++, f /= 2), u + c >= h ? (a = 0, u = h) : u + c >= 1 ? (a = (e * f - 1) * Math.pow(2, o), u += c) : (a = e * Math.pow(2, c - 1) * Math.pow(2, o), u = 0)); o >= 8; t[r + p] = 255 & a, p += w, a /= 256, o -= 8); for (u = u << o | a, s += o; s > 0; t[r + p] = 255 & u, p += w, u /= 256, s -= 8); t[r + p - w] |= 128 * g } }, function (t, e, r) { "use strict"; e.byteLength = function (t) { return 3 * t.length / 4 - s(t) }, e.toByteArray = function (t) { var e, r, n, u, a, f = t.length; u = s(t), a = new i(3 * f / 4 - u), r = u > 0 ? f - 4 : f; var h = 0; for (e = 0; e < r; e += 4)n = o[t.charCodeAt(e)] << 18 | o[t.charCodeAt(e + 1)] << 12 | o[t.charCodeAt(e + 2)] << 6 | o[t.charCodeAt(e + 3)], a[h++] = n >> 16 & 255, a[h++] = n >> 8 & 255, a[h++] = 255 & n; 2 === u ? (n = o[t.charCodeAt(e)] << 2 | o[t.charCodeAt(e + 1)] >> 4, a[h++] = 255 & n) : 1 === u && (n = o[t.charCodeAt(e)] << 10 | o[t.charCodeAt(e + 1)] << 4 | o[t.charCodeAt(e + 2)] >> 2, a[h++] = n >> 8 & 255, a[h++] = 255 & n); return a }, e.fromByteArray = function (t) { for (var e, r = t.length, o = r % 3, i = "", u = [], a = 0, f = r - o; a < f; a += 16383)u.push(h(t, a, a + 16383 > f ? f : a + 16383)); 1 === o ? (e = t[r - 1], i += n[e >> 2], i += n[e << 4 & 63], i += "==") : 2 === o && (e = (t[r - 2] << 8) + t[r - 1], i += n[e >> 10], i += n[e >> 4 & 63], i += n[e << 2 & 63], i += "="); return u.push(i), u.join("") }; for (var n = [], o = [], i = "undefined" != typeof Uint8Array ? Uint8Array : Array, u = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", a = 0, f = u.length; a < f; ++a)n[a] = u[a], o[u.charCodeAt(a)] = a; function s(t) { var e = t.length; if (e % 4 > 0) throw new Error("Invalid string. Length must be a multiple of 4"); return "=" === t[e - 2] ? 2 : "=" === t[e - 1] ? 1 : 0 } function h(t, e, r) { for (var o, i, u = [], a = e; a < r; a += 3)o = (t[a] << 16 & 16711680) + (t[a + 1] << 8 & 65280) + (255 & t[a + 2]), u.push(n[(i = o) >> 18 & 63] + n[i >> 12 & 63] + n[i >> 6 & 63] + n[63 & i]); return u.join("") } o["-".charCodeAt(0)] = 62, o["_".charCodeAt(0)] = 63 }, function (t, e) { var r; r = function () { return this }(); try { r = r || Function("return this")() || (0, eval)("this") } catch (t) { "object" == typeof window && (r = window) } t.exports = r }, function (t, e, r) { "use strict"; (function (t) { var n = r(5), o = r(4), i = r(3); function u() { return f.TYPED_ARRAY_SUPPORT ? 2147483647 : 1073741823 } function a(t, e) { if (u() < e) throw new RangeError("Invalid typed array length"); return f.TYPED_ARRAY_SUPPORT ? (t = new Uint8Array(e)).__proto__ = f.prototype : (null === t && (t = new f(e)), t.length = e), t } function f(t, e, r) { if (!(f.TYPED_ARRAY_SUPPORT || this instanceof f)) return new f(t, e, r); if ("number" == typeof t) { if ("string" == typeof e) throw new Error("If encoding is specified then the first argument must be a string"); return c(this, t) } return s(this, t, e, r) } function s(t, e, r, n) { if ("number" == typeof e) throw new TypeError('"value" argument must not be a number'); return "undefined" != typeof ArrayBuffer && e instanceof ArrayBuffer ? function (t, e, r, n) { if (e.byteLength, r < 0 || e.byteLength < r) throw new RangeError("'offset' is out of bounds"); if (e.byteLength < r + (n || 0)) throw new RangeError("'length' is out of bounds"); e = void 0 === r && void 0 === n ? new Uint8Array(e) : void 0 === n ? new Uint8Array(e, r) : new Uint8Array(e, r, n); f.TYPED_ARRAY_SUPPORT ? (t = e).__proto__ = f.prototype : t = l(t, e); return t }(t, e, r, n) : "string" == typeof e ? function (t, e, r) { "string" == typeof r && "" !== r || (r = "utf8"); if (!f.isEncoding(r)) throw new TypeError('"encoding" must be a valid string encoding'); var n = 0 | w(e, r), o = (t = a(t, n)).write(e, r); o !== n && (t = t.slice(0, o)); return t }(t, e, r) : function (t, e) { if (f.isBuffer(e)) { var r = 0 | p(e.length); return 0 === (t = a(t, r)).length ? t : (e.copy(t, 0, 0, r), t) } if (e) { if ("undefined" != typeof ArrayBuffer && e.buffer instanceof ArrayBuffer || "length" in e) return "number" != typeof e.length || (n = e.length) != n ? a(t, 0) : l(t, e); if ("Buffer" === e.type && i(e.data)) return l(t, e.data) } var n; throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.") }(t, e) } function h(t) { if ("number" != typeof t) throw new TypeError('"size" argument must be a number'); if (t < 0) throw new RangeError('"size" argument must not be negative') } function c(t, e) { if (h(e), t = a(t, e < 0 ? 0 : 0 | p(e)), !f.TYPED_ARRAY_SUPPORT) for (var r = 0; r < e; ++r)t[r] = 0; return t } function l(t, e) { var r = e.length < 0 ? 0 : 0 | p(e.length); t = a(t, r); for (var n = 0; n < r; n += 1)t[n] = 255 & e[n]; return t } function p(t) { if (t >= u()) throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x" + u().toString(16) + " bytes"); return 0 | t } function w(t, e) { if (f.isBuffer(t)) return t.length; if ("undefined" != typeof ArrayBuffer && "function" == typeof ArrayBuffer.isView && (ArrayBuffer.isView(t) || t instanceof ArrayBuffer)) return t.byteLength; "string" != typeof t && (t = "" + t); var r = t.length; if (0 === r) return 0; for (var n = !1; ;)switch (e) { case "ascii": case "latin1": case "binary": return r; case "utf8": case "utf-8": case void 0: return D(t).length; case "ucs2": case "ucs-2": case "utf16le": case "utf-16le": return 2 * r; case "hex": return r >>> 1; case "base64": return j(t).length; default: if (n) return D(t).length; e = ("" + e).toLowerCase(), n = !0 } } function g(t, e, r) { var n = t[e]; t[e] = t[r], t[r] = n } function y(t, e, r, n, o) { if (0 === t.length) return -1; if ("string" == typeof r ? (n = r, r = 0) : r > 2147483647 ? r = 2147483647 : r < -2147483648 && (r = -2147483648), r = +r, isNaN(r) && (r = o ? 0 : t.length - 1), r < 0 && (r = t.length + r), r >= t.length) { if (o) return -1; r = t.length - 1 } else if (r < 0) { if (!o) return -1; r = 0 } if ("string" == typeof e && (e = f.from(e, n)), f.isBuffer(e)) return 0 === e.length ? -1 : b(t, e, r, n, o); if ("number" == typeof e) return e &= 255, f.TYPED_ARRAY_SUPPORT && "function" == typeof Uint8Array.prototype.indexOf ? o ? Uint8Array.prototype.indexOf.call(t, e, r) : Uint8Array.prototype.lastIndexOf.call(t, e, r) : b(t, [e], r, n, o); throw new TypeError("val must be string, number or Buffer") } function b(t, e, r, n, o) { var i, u = 1, a = t.length, f = e.length; if (void 0 !== n && ("ucs2" === (n = String(n).toLowerCase()) || "ucs-2" === n || "utf16le" === n || "utf-16le" === n)) { if (t.length < 2 || e.length < 2) return -1; u = 2, a /= 2, f /= 2, r /= 2 } function s(t, e) { return 1 === u ? t[e] : t.readUInt16BE(e * u) } if (o) { var h = -1; for (i = r; i < a; i++)if (s(t, i) === s(e, -1 === h ? 0 : i - h)) { if (-1 === h && (h = i), i - h + 1 === f) return h * u } else -1 !== h && (i -= i - h), h = -1 } else for (r + f > a && (r = a - f), i = r; i >= 0; i--) { for (var c = !0, l = 0; l < f; l++)if (s(t, i + l) !== s(e, l)) { c = !1; break } if (c) return i } return -1 } function d(t, e, r, n) { r = Number(r) || 0; var o = t.length - r; n ? (n = Number(n)) > o && (n = o) : n = o; var i = e.length; if (i % 2 != 0) throw new TypeError("Invalid hex string"); n > i / 2 && (n = i / 2); for (var u = 0; u < n; ++u) { var a = parseInt(e.substr(2 * u, 2), 16); if (isNaN(a)) return u; t[r + u] = a } return u } function v(t, e, r, n) { return N(D(e, t.length - r), t, r, n) } function A(t, e, r, n) { return N(function (t) { for (var e = [], r = 0; r < t.length; ++r)e.push(255 & t.charCodeAt(r)); return e }(e), t, r, n) } function E(t, e, r, n) { return A(t, e, r, n) } function m(t, e, r, n) { return N(j(e), t, r, n) } function R(t, e, r, n) { return N(function (t, e) { for (var r, n, o, i = [], u = 0; u < t.length && !((e -= 2) < 0); ++u)r = t.charCodeAt(u), n = r >> 8, o = r % 256, i.push(o), i.push(n); return i }(e, t.length - r), t, r, n) } function S(t, e, r) { return 0 === e && r === t.length ? n.fromByteArray(t) : n.fromByteArray(t.slice(e, r)) } function T(t, e, r) { r = Math.min(t.length, r); for (var n = [], o = e; o < r;) { var i, u, a, f, s = t[o], h = null, c = s > 239 ? 4 : s > 223 ? 3 : s > 191 ? 2 : 1; if (o + c <= r) switch (c) { case 1: s < 128 && (h = s); break; case 2: 128 == (192 & (i = t[o + 1])) && (f = (31 & s) << 6 | 63 & i) > 127 && (h = f); break; case 3: i = t[o + 1], u = t[o + 2], 128 == (192 & i) && 128 == (192 & u) && (f = (15 & s) << 12 | (63 & i) << 6 | 63 & u) > 2047 && (f < 55296 || f > 57343) && (h = f); break; case 4: i = t[o + 1], u = t[o + 2], a = t[o + 3], 128 == (192 & i) && 128 == (192 & u) && 128 == (192 & a) && (f = (15 & s) << 18 | (63 & i) << 12 | (63 & u) << 6 | 63 & a) > 65535 && f < 1114112 && (h = f) }null === h ? (h = 65533, c = 1) : h > 65535 && (h -= 65536, n.push(h >>> 10 & 1023 | 55296), h = 56320 | 1023 & h), n.push(h), o += c } return function (t) { var e = t.length; if (e <= _) return String.fromCharCode.apply(String, t); var r = "", n = 0; for (; n < e;)r += String.fromCharCode.apply(String, t.slice(n, n += _)); return r }(n) } e.Buffer = f, e.SlowBuffer = function (t) { +t != t && (t = 0); return f.alloc(+t) }, e.INSPECT_MAX_BYTES = 50, f.TYPED_ARRAY_SUPPORT = void 0 !== t.TYPED_ARRAY_SUPPORT ? t.TYPED_ARRAY_SUPPORT : function () { try { var t = new Uint8Array(1); return t.__proto__ = { __proto__: Uint8Array.prototype, foo: function () { return 42 } }, 42 === t.foo() && "function" == typeof t.subarray && 0 === t.subarray(1, 1).byteLength } catch (t) { return !1 } }(), e.kMaxLength = u(), f.poolSize = 8192, f._augment = function (t) { return t.__proto__ = f.prototype, t }, f.from = function (t, e, r) { return s(null, t, e, r) }, f.TYPED_ARRAY_SUPPORT && (f.prototype.__proto__ = Uint8Array.prototype, f.__proto__ = Uint8Array, "undefined" != typeof Symbol && Symbol.species && f[Symbol.species] === f && Object.defineProperty(f, Symbol.species, { value: null, configurable: !0 })), f.alloc = function (t, e, r) { return function (t, e, r, n) { return h(e), e <= 0 ? a(t, e) : void 0 !== r ? "string" == typeof n ? a(t, e).fill(r, n) : a(t, e).fill(r) : a(t, e) }(null, t, e, r) }, f.allocUnsafe = function (t) { return c(null, t) }, f.allocUnsafeSlow = function (t) { return c(null, t) }, f.isBuffer = function (t) { return !(null == t || !t._isBuffer) }, f.compare = function (t, e) { if (!f.isBuffer(t) || !f.isBuffer(e)) throw new TypeError("Arguments must be Buffers"); if (t === e) return 0; for (var r = t.length, n = e.length, o = 0, i = Math.min(r, n); o < i; ++o)if (t[o] !== e[o]) { r = t[o], n = e[o]; break } return r < n ? -1 : n < r ? 1 : 0 }, f.isEncoding = function (t) { switch (String(t).toLowerCase()) { case "hex": case "utf8": case "utf-8": case "ascii": case "latin1": case "binary": case "base64": case "ucs2": case "ucs-2": case "utf16le": case "utf-16le": return !0; default: return !1 } }, f.concat = function (t, e) { if (!i(t)) throw new TypeError('"list" argument must be an Array of Buffers'); if (0 === t.length) return f.alloc(0); var r; if (void 0 === e) for (e = 0, r = 0; r < t.length; ++r)e += t[r].length; var n = f.allocUnsafe(e), o = 0; for (r = 0; r < t.length; ++r) { var u = t[r]; if (!f.isBuffer(u)) throw new TypeError('"list" argument must be an Array of Buffers'); u.copy(n, o), o += u.length } return n }, f.byteLength = w, f.prototype._isBuffer = !0, f.prototype.swap16 = function () { var t = this.length; if (t % 2 != 0) throw new RangeError("Buffer size must be a multiple of 16-bits"); for (var e = 0; e < t; e += 2)g(this, e, e + 1); return this }, f.prototype.swap32 = function () { var t = this.length; if (t % 4 != 0) throw new RangeError("Buffer size must be a multiple of 32-bits"); for (var e = 0; e < t; e += 4)g(this, e, e + 3), g(this, e + 1, e + 2); return this }, f.prototype.swap64 = function () { var t = this.length; if (t % 8 != 0) throw new RangeError("Buffer size must be a multiple of 64-bits"); for (var e = 0; e < t; e += 8)g(this, e, e + 7), g(this, e + 1, e + 6), g(this, e + 2, e + 5), g(this, e + 3, e + 4); return this }, f.prototype.toString = function () { var t = 0 | this.length; return 0 === t ? "" : 0 === arguments.length ? T(this, 0, t) : function (t, e, r) { var n = !1; if ((void 0 === e || e < 0) && (e = 0), e > this.length) return ""; if ((void 0 === r || r > this.length) && (r = this.length), r <= 0) return ""; if ((r >>>= 0) <= (e >>>= 0)) return ""; for (t || (t = "utf8"); ;)switch (t) { case "hex": return U(this, e, r); case "utf8": case "utf-8": return T(this, e, r); case "ascii": return B(this, e, r); case "latin1": case "binary": return P(this, e, r); case "base64": return S(this, e, r); case "ucs2": case "ucs-2": case "utf16le": case "utf-16le": return O(this, e, r); default: if (n) throw new TypeError("Unknown encoding: " + t); t = (t + "").toLowerCase(), n = !0 } }.apply(this, arguments) }, f.prototype.equals = function (t) { if (!f.isBuffer(t)) throw new TypeError("Argument must be a Buffer"); return this === t || 0 === f.compare(this, t) }, f.prototype.inspect = function () { var t = "", r = e.INSPECT_MAX_BYTES; return this.length > 0 && (t = this.toString("hex", 0, r).match(/.{2}/g).join(" "), this.length > r && (t += " ... ")), "" }, f.prototype.compare = function (t, e, r, n, o) { if (!f.isBuffer(t)) throw new TypeError("Argument must be a Buffer"); if (void 0 === e && (e = 0), void 0 === r && (r = t ? t.length : 0), void 0 === n && (n = 0), void 0 === o && (o = this.length), e < 0 || r > t.length || n < 0 || o > this.length) throw new RangeError("out of range index"); if (n >= o && e >= r) return 0; if (n >= o) return -1; if (e >= r) return 1; if (e >>>= 0, r >>>= 0, n >>>= 0, o >>>= 0, this === t) return 0; for (var i = o - n, u = r - e, a = Math.min(i, u), s = this.slice(n, o), h = t.slice(e, r), c = 0; c < a; ++c)if (s[c] !== h[c]) { i = s[c], u = h[c]; break } return i < u ? -1 : u < i ? 1 : 0 }, f.prototype.includes = function (t, e, r) { return -1 !== this.indexOf(t, e, r) }, f.prototype.indexOf = function (t, e, r) { return y(this, t, e, r, !0) }, f.prototype.lastIndexOf = function (t, e, r) { return y(this, t, e, r, !1) }, f.prototype.write = function (t, e, r, n) { if (void 0 === e) n = "utf8", r = this.length, e = 0; else if (void 0 === r && "string" == typeof e) n = e, r = this.length, e = 0; else { if (!isFinite(e)) throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported"); e |= 0, isFinite(r) ? (r |= 0, void 0 === n && (n = "utf8")) : (n = r, r = void 0) } var o = this.length - e; if ((void 0 === r || r > o) && (r = o), t.length > 0 && (r < 0 || e < 0) || e > this.length) throw new RangeError("Attempt to write outside buffer bounds"); n || (n = "utf8"); for (var i = !1; ;)switch (n) { case "hex": return d(this, t, e, r); case "utf8": case "utf-8": return v(this, t, e, r); case "ascii": return A(this, t, e, r); case "latin1": case "binary": return E(this, t, e, r); case "base64": return m(this, t, e, r); case "ucs2": case "ucs-2": case "utf16le": case "utf-16le": return R(this, t, e, r); default: if (i) throw new TypeError("Unknown encoding: " + n); n = ("" + n).toLowerCase(), i = !0 } }, f.prototype.toJSON = function () { return { type: "Buffer", data: Array.prototype.slice.call(this._arr || this, 0) } }; var _ = 4096; function B(t, e, r) { var n = ""; r = Math.min(t.length, r); for (var o = e; o < r; ++o)n += String.fromCharCode(127 & t[o]); return n } function P(t, e, r) { var n = ""; r = Math.min(t.length, r); for (var o = e; o < r; ++o)n += String.fromCharCode(t[o]); return n } function U(t, e, r) { var n = t.length; (!e || e < 0) && (e = 0), (!r || r < 0 || r > n) && (r = n); for (var o = "", i = e; i < r; ++i)o += F(t[i]); return o } function O(t, e, r) { for (var n = t.slice(e, r), o = "", i = 0; i < n.length; i += 2)o += String.fromCharCode(n[i] + 256 * n[i + 1]); return o } function C(t, e, r) { if (t % 1 != 0 || t < 0) throw new RangeError("offset is not uint"); if (t + e > r) throw new RangeError("Trying to access beyond buffer length") } function H(t, e, r, n, o, i) { if (!f.isBuffer(t)) throw new TypeError('"buffer" argument must be a Buffer instance'); if (e > o || e < i) throw new RangeError('"value" argument is out of bounds'); if (r + n > t.length) throw new RangeError("Index out of range") } function Y(t, e, r, n) { e < 0 && (e = 65535 + e + 1); for (var o = 0, i = Math.min(t.length - r, 2); o < i; ++o)t[r + o] = (e & 255 << 8 * (n ? o : 1 - o)) >>> 8 * (n ? o : 1 - o) } function k(t, e, r, n) { e < 0 && (e = 4294967295 + e + 1); for (var o = 0, i = Math.min(t.length - r, 4); o < i; ++o)t[r + o] = e >>> 8 * (n ? o : 3 - o) & 255 } function L(t, e, r, n, o, i) { if (r + n > t.length) throw new RangeError("Index out of range"); if (r < 0) throw new RangeError("Index out of range") } function I(t, e, r, n, i) { return i || L(t, 0, r, 4), o.write(t, e, r, n, 23, 4), r + 4 } function x(t, e, r, n, i) { return i || L(t, 0, r, 8), o.write(t, e, r, n, 52, 8), r + 8 } f.prototype.slice = function (t, e) { var r, n = this.length; if (t = ~~t, e = void 0 === e ? n : ~~e, t < 0 ? (t += n) < 0 && (t = 0) : t > n && (t = n), e < 0 ? (e += n) < 0 && (e = 0) : e > n && (e = n), e < t && (e = t), f.TYPED_ARRAY_SUPPORT) (r = this.subarray(t, e)).__proto__ = f.prototype; else { var o = e - t; r = new f(o, void 0); for (var i = 0; i < o; ++i)r[i] = this[i + t] } return r }, f.prototype.readUIntLE = function (t, e, r) { t |= 0, e |= 0, r || C(t, e, this.length); for (var n = this[t], o = 1, i = 0; ++i < e && (o *= 256);)n += this[t + i] * o; return n }, f.prototype.readUIntBE = function (t, e, r) { t |= 0, e |= 0, r || C(t, e, this.length); for (var n = this[t + --e], o = 1; e > 0 && (o *= 256);)n += this[t + --e] * o; return n }, f.prototype.readUInt8 = function (t, e) { return e || C(t, 1, this.length), this[t] }, f.prototype.readUInt16LE = function (t, e) { return e || C(t, 2, this.length), this[t] | this[t + 1] << 8 }, f.prototype.readUInt16BE = function (t, e) { return e || C(t, 2, this.length), this[t] << 8 | this[t + 1] }, f.prototype.readUInt32LE = function (t, e) { return e || C(t, 4, this.length), (this[t] | this[t + 1] << 8 | this[t + 2] << 16) + 16777216 * this[t + 3] }, f.prototype.readUInt32BE = function (t, e) { return e || C(t, 4, this.length), 16777216 * this[t] + (this[t + 1] << 16 | this[t + 2] << 8 | this[t + 3]) }, f.prototype.readIntLE = function (t, e, r) { t |= 0, e |= 0, r || C(t, e, this.length); for (var n = this[t], o = 1, i = 0; ++i < e && (o *= 256);)n += this[t + i] * o; return n >= (o *= 128) && (n -= Math.pow(2, 8 * e)), n }, f.prototype.readIntBE = function (t, e, r) { t |= 0, e |= 0, r || C(t, e, this.length); for (var n = e, o = 1, i = this[t + --n]; n > 0 && (o *= 256);)i += this[t + --n] * o; return i >= (o *= 128) && (i -= Math.pow(2, 8 * e)), i }, f.prototype.readInt8 = function (t, e) { return e || C(t, 1, this.length), 128 & this[t] ? -1 * (255 - this[t] + 1) : this[t] }, f.prototype.readInt16LE = function (t, e) { e || C(t, 2, this.length); var r = this[t] | this[t + 1] << 8; return 32768 & r ? 4294901760 | r : r }, f.prototype.readInt16BE = function (t, e) { e || C(t, 2, this.length); var r = this[t + 1] | this[t] << 8; return 32768 & r ? 4294901760 | r : r }, f.prototype.readInt32LE = function (t, e) { return e || C(t, 4, this.length), this[t] | this[t + 1] << 8 | this[t + 2] << 16 | this[t + 3] << 24 }, f.prototype.readInt32BE = function (t, e) { return e || C(t, 4, this.length), this[t] << 24 | this[t + 1] << 16 | this[t + 2] << 8 | this[t + 3] }, f.prototype.readFloatLE = function (t, e) { return e || C(t, 4, this.length), o.read(this, t, !0, 23, 4) }, f.prototype.readFloatBE = function (t, e) { return e || C(t, 4, this.length), o.read(this, t, !1, 23, 4) }, f.prototype.readDoubleLE = function (t, e) { return e || C(t, 8, this.length), o.read(this, t, !0, 52, 8) }, f.prototype.readDoubleBE = function (t, e) { return e || C(t, 8, this.length), o.read(this, t, !1, 52, 8) }, f.prototype.writeUIntLE = function (t, e, r, n) { (t = +t, e |= 0, r |= 0, n) || H(this, t, e, r, Math.pow(2, 8 * r) - 1, 0); var o = 1, i = 0; for (this[e] = 255 & t; ++i < r && (o *= 256);)this[e + i] = t / o & 255; return e + r }, f.prototype.writeUIntBE = function (t, e, r, n) { (t = +t, e |= 0, r |= 0, n) || H(this, t, e, r, Math.pow(2, 8 * r) - 1, 0); var o = r - 1, i = 1; for (this[e + o] = 255 & t; --o >= 0 && (i *= 256);)this[e + o] = t / i & 255; return e + r }, f.prototype.writeUInt8 = function (t, e, r) { return t = +t, e |= 0, r || H(this, t, e, 1, 255, 0), f.TYPED_ARRAY_SUPPORT || (t = Math.floor(t)), this[e] = 255 & t, e + 1 }, f.prototype.writeUInt16LE = function (t, e, r) { return t = +t, e |= 0, r || H(this, t, e, 2, 65535, 0), f.TYPED_ARRAY_SUPPORT ? (this[e] = 255 & t, this[e + 1] = t >>> 8) : Y(this, t, e, !0), e + 2 }, f.prototype.writeUInt16BE = function (t, e, r) { return t = +t, e |= 0, r || H(this, t, e, 2, 65535, 0), f.TYPED_ARRAY_SUPPORT ? (this[e] = t >>> 8, this[e + 1] = 255 & t) : Y(this, t, e, !1), e + 2 }, f.prototype.writeUInt32LE = function (t, e, r) { return t = +t, e |= 0, r || H(this, t, e, 4, 4294967295, 0), f.TYPED_ARRAY_SUPPORT ? (this[e + 3] = t >>> 24, this[e + 2] = t >>> 16, this[e + 1] = t >>> 8, this[e] = 255 & t) : k(this, t, e, !0), e + 4 }, f.prototype.writeUInt32BE = function (t, e, r) { return t = +t, e |= 0, r || H(this, t, e, 4, 4294967295, 0), f.TYPED_ARRAY_SUPPORT ? (this[e] = t >>> 24, this[e + 1] = t >>> 16, this[e + 2] = t >>> 8, this[e + 3] = 255 & t) : k(this, t, e, !1), e + 4 }, f.prototype.writeIntLE = function (t, e, r, n) { if (t = +t, e |= 0, !n) { var o = Math.pow(2, 8 * r - 1); H(this, t, e, r, o - 1, -o) } var i = 0, u = 1, a = 0; for (this[e] = 255 & t; ++i < r && (u *= 256);)t < 0 && 0 === a && 0 !== this[e + i - 1] && (a = 1), this[e + i] = (t / u >> 0) - a & 255; return e + r }, f.prototype.writeIntBE = function (t, e, r, n) { if (t = +t, e |= 0, !n) { var o = Math.pow(2, 8 * r - 1); H(this, t, e, r, o - 1, -o) } var i = r - 1, u = 1, a = 0; for (this[e + i] = 255 & t; --i >= 0 && (u *= 256);)t < 0 && 0 === a && 0 !== this[e + i + 1] && (a = 1), this[e + i] = (t / u >> 0) - a & 255; return e + r }, f.prototype.writeInt8 = function (t, e, r) { return t = +t, e |= 0, r || H(this, t, e, 1, 127, -128), f.TYPED_ARRAY_SUPPORT || (t = Math.floor(t)), t < 0 && (t = 255 + t + 1), this[e] = 255 & t, e + 1 }, f.prototype.writeInt16LE = function (t, e, r) { return t = +t, e |= 0, r || H(this, t, e, 2, 32767, -32768), f.TYPED_ARRAY_SUPPORT ? (this[e] = 255 & t, this[e + 1] = t >>> 8) : Y(this, t, e, !0), e + 2 }, f.prototype.writeInt16BE = function (t, e, r) { return t = +t, e |= 0, r || H(this, t, e, 2, 32767, -32768), f.TYPED_ARRAY_SUPPORT ? (this[e] = t >>> 8, this[e + 1] = 255 & t) : Y(this, t, e, !1), e + 2 }, f.prototype.writeInt32LE = function (t, e, r) { return t = +t, e |= 0, r || H(this, t, e, 4, 2147483647, -2147483648), f.TYPED_ARRAY_SUPPORT ? (this[e] = 255 & t, this[e + 1] = t >>> 8, this[e + 2] = t >>> 16, this[e + 3] = t >>> 24) : k(this, t, e, !0), e + 4 }, f.prototype.writeInt32BE = function (t, e, r) { return t = +t, e |= 0, r || H(this, t, e, 4, 2147483647, -2147483648), t < 0 && (t = 4294967295 + t + 1), f.TYPED_ARRAY_SUPPORT ? (this[e] = t >>> 24, this[e + 1] = t >>> 16, this[e + 2] = t >>> 8, this[e + 3] = 255 & t) : k(this, t, e, !1), e + 4 }, f.prototype.writeFloatLE = function (t, e, r) { return I(this, t, e, !0, r) }, f.prototype.writeFloatBE = function (t, e, r) { return I(this, t, e, !1, r) }, f.prototype.writeDoubleLE = function (t, e, r) { return x(this, t, e, !0, r) }, f.prototype.writeDoubleBE = function (t, e, r) { return x(this, t, e, !1, r) }, f.prototype.copy = function (t, e, r, n) { if (r || (r = 0), n || 0 === n || (n = this.length), e >= t.length && (e = t.length), e || (e = 0), n > 0 && n < r && (n = r), n === r) return 0; if (0 === t.length || 0 === this.length) return 0; if (e < 0) throw new RangeError("targetStart out of bounds"); if (r < 0 || r >= this.length) throw new RangeError("sourceStart out of bounds"); if (n < 0) throw new RangeError("sourceEnd out of bounds"); n > this.length && (n = this.length), t.length - e < n - r && (n = t.length - e + r); var o, i = n - r; if (this === t && r < e && e < n) for (o = i - 1; o >= 0; --o)t[o + e] = this[o + r]; else if (i < 1e3 || !f.TYPED_ARRAY_SUPPORT) for (o = 0; o < i; ++o)t[o + e] = this[o + r]; else Uint8Array.prototype.set.call(t, this.subarray(r, r + i), e); return i }, f.prototype.fill = function (t, e, r, n) { if ("string" == typeof t) { if ("string" == typeof e ? (n = e, e = 0, r = this.length) : "string" == typeof r && (n = r, r = this.length), 1 === t.length) { var o = t.charCodeAt(0); o < 256 && (t = o) } if (void 0 !== n && "string" != typeof n) throw new TypeError("encoding must be a string"); if ("string" == typeof n && !f.isEncoding(n)) throw new TypeError("Unknown encoding: " + n) } else "number" == typeof t && (t &= 255); if (e < 0 || this.length < e || this.length < r) throw new RangeError("Out of range index"); if (r <= e) return this; var i; if (e >>>= 0, r = void 0 === r ? this.length : r >>> 0, t || (t = 0), "number" == typeof t) for (i = e; i < r; ++i)this[i] = t; else { var u = f.isBuffer(t) ? t : D(new f(t, n).toString()), a = u.length; for (i = 0; i < r - e; ++i)this[i + e] = u[i % a] } return this }; var M = /[^+\/0-9A-Za-z-_]/g; function F(t) { return t < 16 ? "0" + t.toString(16) : t.toString(16) } function D(t, e) { var r; e = e || 1 / 0; for (var n = t.length, o = null, i = [], u = 0; u < n; ++u) { if ((r = t.charCodeAt(u)) > 55295 && r < 57344) { if (!o) { if (r > 56319) { (e -= 3) > -1 && i.push(239, 191, 189); continue } if (u + 1 === n) { (e -= 3) > -1 && i.push(239, 191, 189); continue } o = r; continue } if (r < 56320) { (e -= 3) > -1 && i.push(239, 191, 189), o = r; continue } r = 65536 + (o - 55296 << 10 | r - 56320) } else o && (e -= 3) > -1 && i.push(239, 191, 189); if (o = null, r < 128) { if ((e -= 1) < 0) break; i.push(r) } else if (r < 2048) { if ((e -= 2) < 0) break; i.push(r >> 6 | 192, 63 & r | 128) } else if (r < 65536) { if ((e -= 3) < 0) break; i.push(r >> 12 | 224, r >> 6 & 63 | 128, 63 & r | 128) } else { if (!(r < 1114112)) throw new Error("Invalid code point"); if ((e -= 4) < 0) break; i.push(r >> 18 | 240, r >> 12 & 63 | 128, r >> 6 & 63 | 128, 63 & r | 128) } } return i } function j(t) { return n.toByteArray(function (t) { if ((t = function (t) { return t.trim ? t.trim() : t.replace(/^\s+|\s+$/g, "") }(t).replace(M, "")).length < 2) return ""; for (; t.length % 4 != 0;)t += "="; return t }(t)) } function N(t, e, r, n) { for (var o = 0; o < n && !(o + r >= e.length || o >= t.length); ++o)e[o + r] = t[o]; return o } }).call(this, r(6)) }, function (t, e, r) { "use strict"; (function (t) { var r = [255, 255, 26, 27, 28, 29, 30, 31, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 255, 255, 255, 255, 255, 255, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 255, 255, 255, 255, 255]; e.encode = function (e) { t.isBuffer(e) || (e = new t(e)); for (var r, n, o = 0, i = 0, u = 0, a = 0, f = new t(8 * (r = e, n = Math.floor(r.length / 5), r.length % 5 == 0 ? n : n + 1)); o < e.length;) { var s = e[o]; u > 3 ? (a = (a = s & 255 >> u) << (u = (u + 5) % 8) | (o + 1 < e.length ? e[o + 1] : 0) >> 8 - u, o++) : (a = s >> 8 - (u + 5) & 31, 0 === (u = (u + 5) % 8) && o++), f[i] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ234567".charCodeAt(a), i++ } for (o = i; o < f.length; o++)f[o] = 61; return f }, e.decode = function (e) { var n, o = 0, i = 0, u = 0; t.isBuffer(e) || (e = new t(e)); for (var a = new t(Math.ceil(5 * e.length / 8)), f = 0; f < e.length && 61 !== e[f]; f++) { var s = e[f] - 48; if (!(s < r.length)) throw new Error("Invalid input - it is not base32 encoded string"); i = r[s], o <= 3 ? 0 === (o = (o + 5) % 8) ? (n |= i, a[u] = n, u++, n = 0) : n |= 255 & i << 8 - o : (n |= 255 & i >>> (o = (o + 5) % 8), a[u] = n, u++, n = 255 & i << 8 - o) } return a.slice(0, u) } }).call(this, r(7).Buffer) }, function (t, e, r) { var n = r(8); e.encode = n.encode, e.decode = n.decode }, function (t, e, r) { "use strict"; var n = r(0), o = r(1); o.HOTP = n, t.exports = o }]) });
+
+
+
+
+
+
+
+
+
+
+// si alguien lee esto, ya se que sangran los ojos con la librería entera minimizada ahí arriba
+// pero es lo que hay de momento hasta que aprenda más JavaScript en clase :P
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+const codigo2FAParrafo = document.getElementById('codigo2FA');
+const contador = document.getElementById('counter');
+const resetButton = document.getElementById('reset');
+const secretInput = document.querySelector('input[name="secret"]');
+const digits = 6;
+const interval = 30;
+let codigo = localStorage.getItem('codigo') || '';
+let secret = localStorage.getItem('shasecret') || '';
+
+async function totp() {
+ var totp = new TOTP(secret);
+ var code = totp.genOTP();
+
+ codigo = code.toString().padStart(digits, '0');
+ localStorage.setItem('codigo', code.toString().padStart(digits, '0'));
+ return code.toString().padStart(digits, '0');
+}
+
+async function generarTOTP() {
+ totp()
+ .then(code => {
+ codigo = code;
+ })
+ .catch(error => console.error('Error:', error));
+}
+
+function copyToClipboard() {
+ navigator.clipboard.writeText(codigo);
+}
+
+function updateCodigo() {
+ codigo2FAParrafo.textContent = codigo;
+ codigo2FAParrafo.style.display = ''; // Mostrar el código
+ if(secret === '') {
+ codigo2FAParrafo.style.display = 'none'; // Ocultar el código
+ }
+}
+
+async function fillInput2Factor() {
+ chrome.tabs.query({ 'active': true, 'lastFocusedWindow': true }, function (tabs) {
+ var url = tabs[0].url;
+ if (url.includes("sso.us.es")) {
+ chrome.scripting.executeScript({
+ target: { tabId: tabs[0].id },
+ function: (codigoExtension) => {
+ const input2Factor = document.getElementById('input2factor');
+ input2Factor.value = codigoExtension;
+ },
+ args: [codigo] // Pasamos la variable codigo al contexto de la página
+ });
+ } else {
+
+ }
+ });
+}
+
+async function updateCounterAndGenerate() {
+ const now = Math.floor(Date.now() / 1000);
+ const nextIntervalStart = Math.ceil(now / interval) * interval;
+ const secondsRemaining = nextIntervalStart - now;
+ contador.textContent = `Reinicio en: ${secondsRemaining}s`;
+
+ if (secondsRemaining === 0) {
+ // Si los segundos restantes son 0, genera un nuevo código
+ generarTOTP();
+ updateCodigo();
+ }
+}
+
+function resetSecret() {
+ localStorage.removeItem('shasecret');
+ codigo2FAParrafo.style.display = 'none'; // Ocultar el código
+}
+
+async function init() {
+ if(secret === '') {
+ codigo2FAParrafo.style.display = 'none'; // Ocultar el código
+ } else {
+ generarTOTP();
+ updateCodigo();
+ fillInput2Factor();
+ }
+}
+
+secretInput.addEventListener('keyup', function (event) {
+ if (event.key === 'Enter') {
+ const secretValue = secretInput.value.trim();
+ secretInput.value = ''; // Limpiar el input
+ if (secretValue !== '') {
+ localStorage.setItem('shasecret', secretValue);
+ secret = secretValue; // Actualizar el valor del secret
+ init(); // Iniciar el proceso
+ }
+ }
+});
+
+codigo2FAParrafo.addEventListener('click', copyToClipboard);
+
+resetButton.addEventListener('click', resetSecret);
+
+init();
+setInterval(updateCounterAndGenerate, 1000);
+setInterval(fillInput2Factor, 1000);