@thebase/ui 1.2.0 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +32 -260
- package/LICENSE +1 -1
- package/README.md +98 -93
- package/bin/{create-baseui-app.mjs → create-nodexui-app.mjs} +65 -65
- package/dist/{baseui.apidoc.esm.js → nodexui.apidoc.esm.js} +136 -136
- package/dist/{baseui.apidoc.min.js → nodexui.apidoc.min.js} +137 -137
- package/dist/nodexui.esm.js +58 -0
- package/dist/nodexui.i18n.esm.js +2 -0
- package/dist/nodexui.i18n.min.js +2 -0
- package/dist/nodexui.icons.esm.js +1 -0
- package/dist/{baseui.min.css → nodexui.min.css} +1 -1
- package/dist/nodexui.min.js +77 -0
- package/dist/{baseui.pwa.esm.js → nodexui.pwa.esm.js} +5 -5
- package/dist/{baseui.registry.json → nodexui.registry.json} +162 -162
- package/dist/{baseui.templates.xml → nodexui.templates.xml} +573 -573
- package/dist/{baseui.vite.esm.js → nodexui.vite.esm.js} +6 -6
- package/dist/runtime/mermaid/mermaid.esm.min.mjs +2 -2
- package/dist/runtime/milkdown/milkdown-editor.js +1 -1
- package/dist/runtime/milkdown/milkdown-text-editor.js +1 -1
- package/dist/themes/{baseui-dark.css → nodexui-dark.css} +2 -2
- package/dist/themes/{baseui-light.css → nodexui-light.css} +2 -2
- package/dist/types/analytics.d.ts +12 -12
- package/dist/types/apidoc.d.ts +1 -1
- package/dist/types/i18n.d.ts +25 -0
- package/dist/types/index.d.ts +16 -14
- package/dist/types/vite.d.ts +2 -2
- package/docs/analytics.md +12 -12
- package/docs/base-ui-skill.md +4 -4
- package/docs/blocks.md +6 -6
- package/docs/components/accordion.md +4 -4
- package/docs/components/alert-dialog.md +2 -2
- package/docs/components/alert.md +5 -5
- package/docs/components/apidoc.md +14 -14
- package/docs/components/aspect-ratio.md +2 -2
- package/docs/components/attachment.md +5 -5
- package/docs/components/avatar.md +7 -7
- package/docs/components/badge.md +2 -2
- package/docs/components/block-viewer.md +8 -8
- package/docs/components/breadcrumb.md +3 -3
- package/docs/components/bubble.md +2 -2
- package/docs/components/button-group.md +2 -2
- package/docs/components/button.md +2 -2
- package/docs/components/calendar.md +7 -7
- package/docs/components/card.md +2 -2
- package/docs/components/carousel.md +9 -9
- package/docs/components/chart.md +7 -7
- package/docs/components/checkbox.md +2 -2
- package/docs/components/clipboard-button.md +7 -7
- package/docs/components/code-editor.md +1 -1
- package/docs/components/collapsible.md +4 -4
- package/docs/components/combobox.md +7 -7
- package/docs/components/command.md +7 -7
- package/docs/components/context-menu.md +7 -7
- package/docs/components/data-table.md +9 -9
- package/docs/components/date-picker.md +7 -7
- package/docs/components/dialog.md +5 -5
- package/docs/components/direction.md +2 -2
- package/docs/components/drawer.md +4 -4
- package/docs/components/dropdown-menu.md +3 -3
- package/docs/components/empty.md +3 -3
- package/docs/components/field.md +1 -1
- package/docs/components/form.md +3 -3
- package/docs/components/hover-card.md +2 -2
- package/docs/components/icon.md +3 -3
- package/docs/components/input-otp.md +7 -7
- package/docs/components/input.md +6 -6
- package/docs/components/item.md +3 -3
- package/docs/components/kbd.md +2 -2
- package/docs/components/label.md +2 -2
- package/docs/components/markdown.md +13 -13
- package/docs/components/marker.md +2 -2
- package/docs/components/menubar.md +2 -2
- package/docs/components/message-scroller.md +7 -7
- package/docs/components/message.md +7 -7
- package/docs/components/native-select.md +3 -3
- package/docs/components/navigation-menu.md +3 -3
- package/docs/components/pagination.md +3 -3
- package/docs/components/popover.md +10 -10
- package/docs/components/progress.md +2 -2
- package/docs/components/pwa.md +4 -4
- package/docs/components/questionnaire.md +7 -7
- package/docs/components/radio-group.md +2 -2
- package/docs/components/resizable.md +7 -7
- package/docs/components/scroll-area.md +7 -7
- package/docs/components/select.md +2 -2
- package/docs/components/separator.md +2 -2
- package/docs/components/sheet.md +3 -3
- package/docs/components/shell.md +7 -7
- package/docs/components/sidebar.md +3 -3
- package/docs/components/skeleton.md +2 -2
- package/docs/components/slider.md +2 -2
- package/docs/components/spinner.md +4 -4
- package/docs/components/switch.md +2 -2
- package/docs/components/table.md +2 -2
- package/docs/components/tabs.md +6 -6
- package/docs/components/text-editor.md +6 -6
- package/docs/components/textarea.md +3 -3
- package/docs/components/theme-button.md +6 -6
- package/docs/components/toast.md +6 -6
- package/docs/components/toggle-group.md +7 -7
- package/docs/components/toggle.md +7 -7
- package/docs/components/tooltip.md +9 -9
- package/docs/components/typography.md +9 -9
- package/docs/i18n.md +119 -0
- package/docs/icons.md +9 -9
- package/docs/installation.md +31 -32
- package/docs/owl-components.md +36 -38
- package/docs/registry.md +14 -13
- package/docs/runtime-api.md +14 -12
- package/docs/theming.md +15 -15
- package/docs/usage-guide.md +54 -56
- package/package.json +51 -35
- package/dist/baseui.esm.js +0 -58
- package/dist/baseui.icons.esm.js +0 -1
- package/dist/baseui.min.js +0 -77
- /package/dist/{baseui.analytics.esm.js → nodexui.analytics.esm.js} +0 -0
- /package/dist/{baseui.analytics.min.js → nodexui.analytics.min.js} +0 -0
- /package/dist/themes/{baseui-dark.min.css → nodexui-dark.min.css} +0 -0
- /package/dist/themes/{baseui-light.min.css → nodexui-light.min.css} +0 -0
package/dist/baseui.esm.js
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Bootstrap v5.3.8 (https://getbootstrap.com/)
|
|
3
|
-
* Copyright 2011-2025 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
|
4
|
-
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
5
|
-
*/
|
|
6
|
-
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).bootstrap=e()}(this,function(){"use strict";const t=new Map,e={set(e,i,n){t.has(e)||t.set(e,new Map);const s=t.get(e);s.has(i)||0===s.size?s.set(i,n):console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(s.keys())[0]}.`)},get:(e,i)=>t.has(e)&&t.get(e).get(i)||null,remove(e,i){if(!t.has(e))return;const n=t.get(e);n.delete(i),0===n.size&&t.delete(e)}},i="transitionend",n=t=>(t&&window.CSS&&window.CSS.escape&&(t=t.replace(/#([^\s"#']+)/g,(t,e)=>`#${CSS.escape(e)}`)),t),s=t=>null==t?`${t}`:Object.prototype.toString.call(t).match(/\s([a-z]+)/i)[1].toLowerCase(),o=t=>{t.dispatchEvent(new Event(i))},r=t=>!(!t||"object"!=typeof t)&&(void 0!==t.jquery&&(t=t[0]),void 0!==t.nodeType),a=t=>r(t)?t.jquery?t[0]:t:"string"==typeof t&&t.length>0?document.querySelector(n(t)):null,l=t=>{if(!r(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},c=t=>!t||t.nodeType!==Node.ELEMENT_NODE||!!t.classList.contains("disabled")||(void 0!==t.disabled?t.disabled:t.hasAttribute("disabled")&&"false"!==t.getAttribute("disabled")),h=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?h(t.parentNode):null},d=()=>{},u=t=>{t.offsetHeight},f=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,p=[],m=()=>"rtl"===document.documentElement.dir,g=t=>{var e;e=()=>{const e=f();if(e){const i=t.NAME,n=e.fn[i];e.fn[i]=t.jQueryInterface,e.fn[i].Constructor=t,e.fn[i].noConflict=()=>(e.fn[i]=n,t.jQueryInterface)}},"loading"===document.readyState?(p.length||document.addEventListener("DOMContentLoaded",()=>{for(const t of p)t()}),p.push(e)):e()},_=(t,e=[],i=t)=>"function"==typeof t?t.call(...e):i,b=(t,e,n=!0)=>{if(!n)return void _(t);const s=(t=>{if(!t)return 0;let{transitionDuration:e,transitionDelay:i}=window.getComputedStyle(t);const n=Number.parseFloat(e),s=Number.parseFloat(i);return n||s?(e=e.split(",")[0],i=i.split(",")[0],1e3*(Number.parseFloat(e)+Number.parseFloat(i))):0})(e)+5;let r=!1;const a=({target:n})=>{n===e&&(r=!0,e.removeEventListener(i,a),_(t))};e.addEventListener(i,a),setTimeout(()=>{r||o(e)},s)},v=(t,e,i,n)=>{const s=t.length;let o=t.indexOf(e);return-1===o?!i&&n?t[s-1]:t[0]:(o+=i?1:-1,n&&(o=(o+s)%s),t[Math.max(0,Math.min(o,s-1))])},y=/[^.]*(?=\..*)\.|.*/,w=/\..*/,A=/::\d+$/,E={};let T=1;const C={mouseenter:"mouseover",mouseleave:"mouseout"},O=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 x(t,e){return e&&`${e}::${T++}`||t.uidEvent||T++}function k(t){const e=x(t);return t.uidEvent=e,E[e]=E[e]||{},E[e]}function L(t,e,i=null){return Object.values(t).find(t=>t.callable===e&&t.delegationSelector===i)}function S(t,e,i){const n="string"==typeof e,s=n?i:e||i;let o=N(t);return O.has(o)||(o=t),[n,s,o]}function D(t,e,i,n,s){if("string"!=typeof e||!t)return;let[o,r,a]=S(e,i,n);if(e in C){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=k(t),c=l[a]||(l[a]={}),h=L(c,r,o?i:null);if(h)return void(h.oneOff=h.oneOff&&s);const d=x(r,e.replace(y,"")),u=o?function(t,e,i){return function n(s){const o=t.querySelectorAll(e);for(let{target:r}=s;r&&r!==this;r=r.parentNode)for(const a of o)if(a===r)return j(s,{delegateTarget:r}),n.oneOff&&P.off(t,s.type,e,i),i.apply(r,[s])}}(t,i,r):function(t,e){return function i(n){return j(n,{delegateTarget:t}),i.oneOff&&P.off(t,n.type,e),e.apply(t,[n])}}(t,r);u.delegationSelector=o?i:null,u.callable=r,u.oneOff=s,u.uidEvent=d,c[d]=u,t.addEventListener(a,u,o)}function $(t,e,i,n,s){const o=L(e[i],n,s);o&&(t.removeEventListener(i,o,Boolean(s)),delete e[i][o.uidEvent])}function I(t,e,i,n){const s=e[i]||{};for(const[o,r]of Object.entries(s))o.includes(n)&&$(t,e,i,r.callable,r.delegationSelector)}function N(t){return t=t.replace(w,""),C[t]||t}const P={on(t,e,i,n){D(t,e,i,n,!1)},one(t,e,i,n){D(t,e,i,n,!0)},off(t,e,i,n){if("string"!=typeof e||!t)return;const[s,o,r]=S(e,i,n),a=r!==e,l=k(t),c=l[r]||{},h=e.startsWith(".");if(void 0===o){if(h)for(const i of Object.keys(l))I(t,l,i,e.slice(1));for(const[i,n]of Object.entries(c)){const s=i.replace(A,"");a&&!e.includes(s)||$(t,l,r,n.callable,n.delegationSelector)}}else{if(!Object.keys(c).length)return;$(t,l,r,o,s?i:null)}},trigger(t,e,i){if("string"!=typeof e||!t)return null;const n=f();let s=null,o=!0,r=!0,a=!1;e!==N(e)&&n&&(s=n.Event(e,i),n(t).trigger(s),o=!s.isPropagationStopped(),r=!s.isImmediatePropagationStopped(),a=s.isDefaultPrevented());const l=j(new Event(e,{bubbles:o,cancelable:!0}),i);return a&&l.preventDefault(),r&&t.dispatchEvent(l),l.defaultPrevented&&s&&s.preventDefault(),l}};function j(t,e={}){for(const[i,n]of Object.entries(e))try{t[i]=n}catch(e){Object.defineProperty(t,i,{configurable:!0,get:()=>n})}return t}function M(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 F(t){return t.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)}const H={setDataAttribute(t,e,i){t.setAttribute(`data-bs-${F(e)}`,i)},removeDataAttribute(t,e){t.removeAttribute(`data-bs-${F(e)}`)},getDataAttributes(t){if(!t)return{};const e={},i=Object.keys(t.dataset).filter(t=>t.startsWith("bs")&&!t.startsWith("bsConfig"));for(const n of i){let i=n.replace(/^bs/,"");i=i.charAt(0).toLowerCase()+i.slice(1),e[i]=M(t.dataset[n])}return e},getDataAttribute:(t,e)=>M(t.getAttribute(`data-bs-${F(e)}`))};class W{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=r(e)?H.getDataAttribute(e,"config"):{};return{...this.constructor.Default,..."object"==typeof i?i:{},...r(e)?H.getDataAttributes(e):{},..."object"==typeof t?t:{}}}_typeCheckConfig(t,e=this.constructor.DefaultType){for(const[i,n]of Object.entries(e)){const e=t[i],o=r(e)?"element":s(e);if(!new RegExp(n).test(o))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${i}" provided type "${o}" but expected type "${n}".`)}}}class B extends W{constructor(t,i){super(),(t=a(t))&&(this._element=t,this._config=this._getConfig(i),e.set(this._element,this.constructor.DATA_KEY,this))}dispose(){e.remove(this._element,this.constructor.DATA_KEY),P.off(this._element,this.constructor.EVENT_KEY);for(const t of Object.getOwnPropertyNames(this))this[t]=null}_queueCallback(t,e,i=!0){b(t,e,i)}_getConfig(t){return t=this._mergeConfigObj(t,this._element),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}static getInstance(t){return e.get(a(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.8"}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 z=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=>n(t)).join(","):null},R={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 n=t.parentNode.closest(e);for(;n;)i.push(n),n=n.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=>!c(t)&&l(t))},getSelectorFromElement(t){const e=z(t);return e&&R.findOne(e)?e:null},getElementFromSelector(t){const e=z(t);return e?R.findOne(e):null},getMultipleElementsFromSelector(t){const e=z(t);return e?R.find(e):[]}},q=(t,e="hide")=>{const i=`click.dismiss${t.EVENT_KEY}`,n=t.NAME;P.on(document,i,`[data-bs-dismiss="${n}"]`,function(i){if(["A","AREA"].includes(this.tagName)&&i.preventDefault(),c(this))return;const s=R.getElementFromSelector(this)||this.closest(`.${n}`);t.getOrCreateInstance(s)[e]()})},V=".bs.alert",K=`close${V}`,Q=`closed${V}`;class X extends B{static get NAME(){return"alert"}close(){if(P.trigger(this._element,K).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(),P.trigger(this._element,Q),this.dispose()}static jQueryInterface(t){return this.each(function(){const e=X.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)}})}}q(X,"close"),g(X);const Y='[data-bs-toggle="button"]';class U extends B{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=U.getOrCreateInstance(this);"toggle"===t&&e[t]()})}}P.on(document,"click.bs.button.data-api",Y,t=>{t.preventDefault();const e=t.target.closest(Y);U.getOrCreateInstance(e).toggle()}),g(U);const G=".bs.swipe",J=`touchstart${G}`,Z=`touchmove${G}`,tt=`touchend${G}`,et=`pointerdown${G}`,it=`pointerup${G}`,nt={endCallback:null,leftCallback:null,rightCallback:null},st={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"};class ot extends W{constructor(t,e){super(),this._element=t,t&&ot.isSupported()&&(this._config=this._getConfig(e),this._deltaX=0,this._supportPointerEvents=Boolean(window.PointerEvent),this._initEvents())}static get Default(){return nt}static get DefaultType(){return st}static get NAME(){return"swipe"}dispose(){P.off(this._element,G)}_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(),_(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&&_(e>0?this._config.rightCallback:this._config.leftCallback)}_initEvents(){this._supportPointerEvents?(P.on(this._element,et,t=>this._start(t)),P.on(this._element,it,t=>this._end(t)),this._element.classList.add("pointer-event")):(P.on(this._element,J,t=>this._start(t)),P.on(this._element,Z,t=>this._move(t)),P.on(this._element,tt,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 rt=".bs.carousel",at=".data-api",lt="ArrowLeft",ct="ArrowRight",ht="next",dt="prev",ut="left",ft="right",pt=`slide${rt}`,mt=`slid${rt}`,gt=`keydown${rt}`,_t=`mouseenter${rt}`,bt=`mouseleave${rt}`,vt=`dragstart${rt}`,yt=`load${rt}${at}`,wt=`click${rt}${at}`,At="carousel",Et="active",Tt=".active",Ct=".carousel-item",Ot=Tt+Ct,xt={[lt]:ft,[ct]:ut},kt={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 St extends B{constructor(t,e){super(t,e),this._interval=null,this._activeElement=null,this._isSliding=!1,this.touchTimeout=null,this._swipeHelper=null,this._indicatorsElement=R.findOne(".carousel-indicators",this._element),this._addEventListeners(),this._config.ride===At&&this.cycle()}static get Default(){return kt}static get DefaultType(){return Lt}static get NAME(){return"carousel"}next(){this._slide(ht)}nextWhenVisible(){!document.hidden&&l(this._element)&&this.next()}prev(){this._slide(dt)}pause(){this._isSliding&&o(this._element),this._clearInterval()}cycle(){this._clearInterval(),this._updateInterval(),this._interval=setInterval(()=>this.nextWhenVisible(),this._config.interval)}_maybeEnableCycle(){this._config.ride&&(this._isSliding?P.one(this._element,mt,()=>this.cycle()):this.cycle())}to(t){const e=this._getItems();if(t>e.length-1||t<0)return;if(this._isSliding)return void P.one(this._element,mt,()=>this.to(t));const i=this._getItemIndex(this._getActive());if(i===t)return;const n=t>i?ht:dt;this._slide(n,e[t])}dispose(){this._swipeHelper&&this._swipeHelper.dispose(),super.dispose()}_configAfterMerge(t){return t.defaultInterval=t.interval,t}_addEventListeners(){this._config.keyboard&&P.on(this._element,gt,t=>this._keydown(t)),"hover"===this._config.pause&&(P.on(this._element,_t,()=>this.pause()),P.on(this._element,bt,()=>this._maybeEnableCycle())),this._config.touch&&ot.isSupported()&&this._addTouchEventListeners()}_addTouchEventListeners(){for(const t of R.find(".carousel-item img",this._element))P.on(t,vt,t=>t.preventDefault());const t={leftCallback:()=>this._slide(this._directionToOrder(ut)),rightCallback:()=>this._slide(this._directionToOrder(ft)),endCallback:()=>{"hover"===this._config.pause&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout(()=>this._maybeEnableCycle(),500+this._config.interval))}};this._swipeHelper=new ot(this._element,t)}_keydown(t){if(/input|textarea/i.test(t.target.tagName))return;const e=xt[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=R.findOne(Tt,this._indicatorsElement);e.classList.remove(Et),e.removeAttribute("aria-current");const i=R.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(),n=t===ht,s=e||v(this._getItems(),i,n,this._config.wrap);if(s===i)return;const o=this._getItemIndex(s),r=e=>P.trigger(this._element,e,{relatedTarget:s,direction:this._orderToDirection(t),from:this._getItemIndex(i),to:o});if(r(pt).defaultPrevented)return;if(!i||!s)return;const a=Boolean(this._interval);this.pause(),this._isSliding=!0,this._setActiveIndicatorElement(o),this._activeElement=s;const l=n?"carousel-item-start":"carousel-item-end",c=n?"carousel-item-next":"carousel-item-prev";s.classList.add(c),u(s),i.classList.add(l),s.classList.add(l),this._queueCallback(()=>{s.classList.remove(l,c),s.classList.add(Et),i.classList.remove(Et,c,l),this._isSliding=!1,r(mt)},i,this._isAnimated()),a&&this.cycle()}_isAnimated(){return this._element.classList.contains("slide")}_getActive(){return R.findOne(Ot,this._element)}_getItems(){return R.find(Ct,this._element)}_clearInterval(){this._interval&&(clearInterval(this._interval),this._interval=null)}_directionToOrder(t){return m()?t===ut?dt:ht:t===ut?ht:dt}_orderToDirection(t){return m()?t===dt?ut:ft:t===dt?ft:ut}static jQueryInterface(t){return this.each(function(){const e=St.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)})}}P.on(document,wt,"[data-bs-slide], [data-bs-slide-to]",function(t){const e=R.getElementFromSelector(this);if(!e||!e.classList.contains(At))return;t.preventDefault();const i=St.getOrCreateInstance(e),n=this.getAttribute("data-bs-slide-to");return n?(i.to(n),void i._maybeEnableCycle()):"next"===H.getDataAttribute(this,"slide")?(i.next(),void i._maybeEnableCycle()):(i.prev(),void i._maybeEnableCycle())}),P.on(window,yt,()=>{const t=R.find('[data-bs-ride="carousel"]');for(const e of t)St.getOrCreateInstance(e)}),g(St);const Dt=".bs.collapse",$t=`show${Dt}`,It=`shown${Dt}`,Nt=`hide${Dt}`,Pt=`hidden${Dt}`,jt=`click${Dt}.data-api`,Mt="show",Ft="collapse",Ht="collapsing",Wt=`:scope .${Ft} .${Ft}`,Bt='[data-bs-toggle="collapse"]',zt={parent:null,toggle:!0},Rt={parent:"(null|element)",toggle:"boolean"};class qt extends B{constructor(t,e){super(t,e),this._isTransitioning=!1,this._triggerArray=[];const i=R.find(Bt);for(const t of i){const e=R.getSelectorFromElement(t),i=R.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 zt}static get DefaultType(){return Rt}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=>qt.getOrCreateInstance(t,{toggle:!1}))),t.length&&t[0]._isTransitioning)return;if(P.trigger(this._element,$t).defaultPrevented)return;for(const e of t)e.hide();const e=this._getDimension();this._element.classList.remove(Ft),this._element.classList.add(Ht),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(Ht),this._element.classList.add(Ft,Mt),this._element.style[e]="",P.trigger(this._element,It)},this._element,!0),this._element.style[e]=`${this._element[i]}px`}hide(){if(this._isTransitioning||!this._isShown())return;if(P.trigger(this._element,Nt).defaultPrevented)return;const t=this._getDimension();this._element.style[t]=`${this._element.getBoundingClientRect()[t]}px`,u(this._element),this._element.classList.add(Ht),this._element.classList.remove(Ft,Mt);for(const t of this._triggerArray){const e=R.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(Ht),this._element.classList.add(Ft),P.trigger(this._element,Pt)},this._element,!0)}_isShown(t=this._element){return t.classList.contains(Mt)}_configAfterMerge(t){return t.toggle=Boolean(t.toggle),t.parent=a(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=R.getElementFromSelector(e);t&&this._addAriaAndCollapsedClass([e],this._isShown(t))}}_getFirstLevelChildren(t){const e=R.find(Wt,this._config.parent);return R.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=qt.getOrCreateInstance(this,e);if("string"==typeof t){if(void 0===i[t])throw new TypeError(`No method named "${t}"`);i[t]()}})}}P.on(document,jt,Bt,function(t){("A"===t.target.tagName||t.delegateTarget&&"A"===t.delegateTarget.tagName)&&t.preventDefault();for(const t of R.getMultipleElementsFromSelector(this))qt.getOrCreateInstance(t,{toggle:!1}).toggle()}),g(qt);var Vt="top",Kt="bottom",Qt="right",Xt="left",Yt="auto",Ut=[Vt,Kt,Qt,Xt],Gt="start",Jt="end",Zt="clippingParents",te="viewport",ee="popper",ie="reference",ne=Ut.reduce(function(t,e){return t.concat([e+"-"+Gt,e+"-"+Jt])},[]),se=[].concat(Ut,[Yt]).reduce(function(t,e){return t.concat([e,e+"-"+Gt,e+"-"+Jt])},[]),oe="beforeRead",re="read",ae="afterRead",le="beforeMain",ce="main",he="afterMain",de="beforeWrite",ue="write",fe="afterWrite",pe=[oe,re,ae,le,ce,he,de,ue,fe];function me(t){return t?(t.nodeName||"").toLowerCase():null}function ge(t){if(null==t)return window;if("[object Window]"!==t.toString()){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function _e(t){return t instanceof ge(t).Element||t instanceof Element}function be(t){return t instanceof ge(t).HTMLElement||t instanceof HTMLElement}function ve(t){return"undefined"!=typeof ShadowRoot&&(t instanceof ge(t).ShadowRoot||t instanceof ShadowRoot)}const ye={name:"applyStyles",enabled:!0,phase:"write",fn:function(t){var e=t.state;Object.keys(e.elements).forEach(function(t){var i=e.styles[t]||{},n=e.attributes[t]||{},s=e.elements[t];be(s)&&me(s)&&(Object.assign(s.style,i),Object.keys(n).forEach(function(t){var e=n[t];!1===e?s.removeAttribute(t):s.setAttribute(t,!0===e?"":e)}))})},effect:function(t){var e=t.state,i={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,i.popper),e.styles=i,e.elements.arrow&&Object.assign(e.elements.arrow.style,i.arrow),function(){Object.keys(e.elements).forEach(function(t){var n=e.elements[t],s=e.attributes[t]||{},o=Object.keys(e.styles.hasOwnProperty(t)?e.styles[t]:i[t]).reduce(function(t,e){return t[e]="",t},{});be(n)&&me(n)&&(Object.assign(n.style,o),Object.keys(s).forEach(function(t){n.removeAttribute(t)}))})}},requires:["computeStyles"]};function we(t){return t.split("-")[0]}var Ae=Math.max,Ee=Math.min,Te=Math.round;function Ce(){var t=navigator.userAgentData;return null!=t&&t.brands&&Array.isArray(t.brands)?t.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function Oe(){return!/^((?!chrome|android).)*safari/i.test(Ce())}function xe(t,e,i){void 0===e&&(e=!1),void 0===i&&(i=!1);var n=t.getBoundingClientRect(),s=1,o=1;e&&be(t)&&(s=t.offsetWidth>0&&Te(n.width)/t.offsetWidth||1,o=t.offsetHeight>0&&Te(n.height)/t.offsetHeight||1);var r=(_e(t)?ge(t):window).visualViewport,a=!Oe()&&i,l=(n.left+(a&&r?r.offsetLeft:0))/s,c=(n.top+(a&&r?r.offsetTop:0))/o,h=n.width/s,d=n.height/o;return{width:h,height:d,top:c,right:l+h,bottom:c+d,left:l,x:l,y:c}}function ke(t){var e=xe(t),i=t.offsetWidth,n=t.offsetHeight;return Math.abs(e.width-i)<=1&&(i=e.width),Math.abs(e.height-n)<=1&&(n=e.height),{x:t.offsetLeft,y:t.offsetTop,width:i,height:n}}function Le(t,e){var i=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(i&&ve(i)){var n=e;do{if(n&&t.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function Se(t){return ge(t).getComputedStyle(t)}function De(t){return["table","td","th"].indexOf(me(t))>=0}function $e(t){return((_e(t)?t.ownerDocument:t.document)||window.document).documentElement}function Ie(t){return"html"===me(t)?t:t.assignedSlot||t.parentNode||(ve(t)?t.host:null)||$e(t)}function Ne(t){return be(t)&&"fixed"!==Se(t).position?t.offsetParent:null}function Pe(t){for(var e=ge(t),i=Ne(t);i&&De(i)&&"static"===Se(i).position;)i=Ne(i);return i&&("html"===me(i)||"body"===me(i)&&"static"===Se(i).position)?e:i||function(t){var e=/firefox/i.test(Ce());if(/Trident/i.test(Ce())&&be(t)&&"fixed"===Se(t).position)return null;var i=Ie(t);for(ve(i)&&(i=i.host);be(i)&&["html","body"].indexOf(me(i))<0;){var n=Se(i);if("none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||-1!==["transform","perspective"].indexOf(n.willChange)||e&&"filter"===n.willChange||e&&n.filter&&"none"!==n.filter)return i;i=i.parentNode}return null}(t)||e}function je(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function Me(t,e,i){return Ae(t,Ee(e,i))}function Fe(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}function He(t,e){return e.reduce(function(e,i){return e[i]=t,e},{})}const We={name:"arrow",enabled:!0,phase:"main",fn:function(t){var e,i=t.state,n=t.name,s=t.options,o=i.elements.arrow,r=i.modifiersData.popperOffsets,a=we(i.placement),l=je(a),c=[Xt,Qt].indexOf(a)>=0?"height":"width";if(o&&r){var h=function(t,e){return Fe("number"!=typeof(t="function"==typeof t?t(Object.assign({},e.rects,{placement:e.placement})):t)?t:He(t,Ut))}(s.padding,i),d=ke(o),u="y"===l?Vt:Xt,f="y"===l?Kt:Qt,p=i.rects.reference[c]+i.rects.reference[l]-r[l]-i.rects.popper[c],m=r[l]-i.rects.reference[l],g=Pe(o),_=g?"y"===l?g.clientHeight||0:g.clientWidth||0:0,b=p/2-m/2,v=h[u],y=_-d[c]-h[f],w=_/2-d[c]/2+b,A=Me(v,w,y),E=l;i.modifiersData[n]=((e={})[E]=A,e.centerOffset=A-w,e)}},effect:function(t){var e=t.state,i=t.options.element,n=void 0===i?"[data-popper-arrow]":i;null!=n&&("string"!=typeof n||(n=e.elements.popper.querySelector(n)))&&Le(e.elements.popper,n)&&(e.elements.arrow=n)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Be(t){return t.split("-")[1]}var ze={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Re(t){var e,i=t.popper,n=t.popperRect,s=t.placement,o=t.variation,r=t.offsets,a=t.position,l=t.gpuAcceleration,c=t.adaptive,h=t.roundOffsets,d=t.isFixed,u=r.x,f=void 0===u?0:u,p=r.y,m=void 0===p?0:p,g="function"==typeof h?h({x:f,y:m}):{x:f,y:m};f=g.x,m=g.y;var _=r.hasOwnProperty("x"),b=r.hasOwnProperty("y"),v=Xt,y=Vt,w=window;if(c){var A=Pe(i),E="clientHeight",T="clientWidth";A===ge(i)&&"static"!==Se(A=$e(i)).position&&"absolute"===a&&(E="scrollHeight",T="scrollWidth"),(s===Vt||(s===Xt||s===Qt)&&o===Jt)&&(y=Kt,m-=(d&&A===w&&w.visualViewport?w.visualViewport.height:A[E])-n.height,m*=l?1:-1),s!==Xt&&(s!==Vt&&s!==Kt||o!==Jt)||(v=Qt,f-=(d&&A===w&&w.visualViewport?w.visualViewport.width:A[T])-n.width,f*=l?1:-1)}var C,O=Object.assign({position:a},c&&ze),x=!0===h?function(t,e){var i=t.x,n=t.y,s=e.devicePixelRatio||1;return{x:Te(i*s)/s||0,y:Te(n*s)/s||0}}({x:f,y:m},ge(i)):{x:f,y:m};return f=x.x,m=x.y,l?Object.assign({},O,((C={})[y]=b?"0":"",C[v]=_?"0":"",C.transform=(w.devicePixelRatio||1)<=1?"translate("+f+"px, "+m+"px)":"translate3d("+f+"px, "+m+"px, 0)",C)):Object.assign({},O,((e={})[y]=b?m+"px":"",e[v]=_?f+"px":"",e.transform="",e))}const qe={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(t){var e=t.state,i=t.options,n=i.gpuAcceleration,s=void 0===n||n,o=i.adaptive,r=void 0===o||o,a=i.roundOffsets,l=void 0===a||a,c={placement:we(e.placement),variation:Be(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:s,isFixed:"fixed"===e.options.strategy};null!=e.modifiersData.popperOffsets&&(e.styles.popper=Object.assign({},e.styles.popper,Re(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:r,roundOffsets:l})))),null!=e.modifiersData.arrow&&(e.styles.arrow=Object.assign({},e.styles.arrow,Re(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})},data:{}};var Ve={passive:!0};const Ke={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(t){var e=t.state,i=t.instance,n=t.options,s=n.scroll,o=void 0===s||s,r=n.resize,a=void 0===r||r,l=ge(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return o&&c.forEach(function(t){t.addEventListener("scroll",i.update,Ve)}),a&&l.addEventListener("resize",i.update,Ve),function(){o&&c.forEach(function(t){t.removeEventListener("scroll",i.update,Ve)}),a&&l.removeEventListener("resize",i.update,Ve)}},data:{}};var Qe={left:"right",right:"left",bottom:"top",top:"bottom"};function Xe(t){return t.replace(/left|right|bottom|top/g,function(t){return Qe[t]})}var Ye={start:"end",end:"start"};function Ue(t){return t.replace(/start|end/g,function(t){return Ye[t]})}function Ge(t){var e=ge(t);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Je(t){return xe($e(t)).left+Ge(t).scrollLeft}function Ze(t){var e=Se(t),i=e.overflow,n=e.overflowX,s=e.overflowY;return/auto|scroll|overlay|hidden/.test(i+s+n)}function ti(t){return["html","body","#document"].indexOf(me(t))>=0?t.ownerDocument.body:be(t)&&Ze(t)?t:ti(Ie(t))}function ei(t,e){var i;void 0===e&&(e=[]);var n=ti(t),s=n===(null==(i=t.ownerDocument)?void 0:i.body),o=ge(n),r=s?[o].concat(o.visualViewport||[],Ze(n)?n:[]):n,a=e.concat(r);return s?a:a.concat(ei(Ie(r)))}function ii(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function ni(t,e,i){return e===te?ii(function(t,e){var i=ge(t),n=$e(t),s=i.visualViewport,o=n.clientWidth,r=n.clientHeight,a=0,l=0;if(s){o=s.width,r=s.height;var c=Oe();(c||!c&&"fixed"===e)&&(a=s.offsetLeft,l=s.offsetTop)}return{width:o,height:r,x:a+Je(t),y:l}}(t,i)):_e(e)?function(t,e){var i=xe(t,!1,"fixed"===e);return i.top=i.top+t.clientTop,i.left=i.left+t.clientLeft,i.bottom=i.top+t.clientHeight,i.right=i.left+t.clientWidth,i.width=t.clientWidth,i.height=t.clientHeight,i.x=i.left,i.y=i.top,i}(e,i):ii(function(t){var e,i=$e(t),n=Ge(t),s=null==(e=t.ownerDocument)?void 0:e.body,o=Ae(i.scrollWidth,i.clientWidth,s?s.scrollWidth:0,s?s.clientWidth:0),r=Ae(i.scrollHeight,i.clientHeight,s?s.scrollHeight:0,s?s.clientHeight:0),a=-n.scrollLeft+Je(t),l=-n.scrollTop;return"rtl"===Se(s||i).direction&&(a+=Ae(i.clientWidth,s?s.clientWidth:0)-o),{width:o,height:r,x:a,y:l}}($e(t)))}function si(t){var e,i=t.reference,n=t.element,s=t.placement,o=s?we(s):null,r=s?Be(s):null,a=i.x+i.width/2-n.width/2,l=i.y+i.height/2-n.height/2;switch(o){case Vt:e={x:a,y:i.y-n.height};break;case Kt:e={x:a,y:i.y+i.height};break;case Qt:e={x:i.x+i.width,y:l};break;case Xt:e={x:i.x-n.width,y:l};break;default:e={x:i.x,y:i.y}}var c=o?je(o):null;if(null!=c){var h="y"===c?"height":"width";switch(r){case Gt:e[c]=e[c]-(i[h]/2-n[h]/2);break;case Jt:e[c]=e[c]+(i[h]/2-n[h]/2)}}return e}function oi(t,e){void 0===e&&(e={});var i=e,n=i.placement,s=void 0===n?t.placement:n,o=i.strategy,r=void 0===o?t.strategy:o,a=i.boundary,l=void 0===a?Zt:a,c=i.rootBoundary,h=void 0===c?te:c,d=i.elementContext,u=void 0===d?ee:d,f=i.altBoundary,p=void 0!==f&&f,m=i.padding,g=void 0===m?0:m,_=Fe("number"!=typeof g?g:He(g,Ut)),b=u===ee?ie:ee,v=t.rects.popper,y=t.elements[p?b:u],w=function(t,e,i,n){var s="clippingParents"===e?function(t){var e=ei(Ie(t)),i=["absolute","fixed"].indexOf(Se(t).position)>=0&&be(t)?Pe(t):t;return _e(i)?e.filter(function(t){return _e(t)&&Le(t,i)&&"body"!==me(t)}):[]}(t):[].concat(e),o=[].concat(s,[i]),r=o[0],a=o.reduce(function(e,i){var s=ni(t,i,n);return e.top=Ae(s.top,e.top),e.right=Ee(s.right,e.right),e.bottom=Ee(s.bottom,e.bottom),e.left=Ae(s.left,e.left),e},ni(t,r,n));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}(_e(y)?y:y.contextElement||$e(t.elements.popper),l,h,r),A=xe(t.elements.reference),E=si({reference:A,element:v,placement:s}),T=ii(Object.assign({},v,E)),C=u===ee?T:A,O={top:w.top-C.top+_.top,bottom:C.bottom-w.bottom+_.bottom,left:w.left-C.left+_.left,right:C.right-w.right+_.right},x=t.modifiersData.offset;if(u===ee&&x){var k=x[s];Object.keys(O).forEach(function(t){var e=[Qt,Kt].indexOf(t)>=0?1:-1,i=[Vt,Kt].indexOf(t)>=0?"y":"x";O[t]+=k[i]*e})}return O}function ri(t,e){void 0===e&&(e={});var i=e,n=i.placement,s=i.boundary,o=i.rootBoundary,r=i.padding,a=i.flipVariations,l=i.allowedAutoPlacements,c=void 0===l?se:l,h=Be(n),d=h?a?ne:ne.filter(function(t){return Be(t)===h}):Ut,u=d.filter(function(t){return c.indexOf(t)>=0});0===u.length&&(u=d);var f=u.reduce(function(e,i){return e[i]=oi(t,{placement:i,boundary:s,rootBoundary:o,padding:r})[we(i)],e},{});return Object.keys(f).sort(function(t,e){return f[t]-f[e]})}const ai={name:"flip",enabled:!0,phase:"main",fn:function(t){var e=t.state,i=t.options,n=t.name;if(!e.modifiersData[n]._skip){for(var s=i.mainAxis,o=void 0===s||s,r=i.altAxis,a=void 0===r||r,l=i.fallbackPlacements,c=i.padding,h=i.boundary,d=i.rootBoundary,u=i.altBoundary,f=i.flipVariations,p=void 0===f||f,m=i.allowedAutoPlacements,g=e.options.placement,_=we(g),b=l||(_!==g&&p?function(t){if(we(t)===Yt)return[];var e=Xe(t);return[Ue(t),e,Ue(e)]}(g):[Xe(g)]),v=[g].concat(b).reduce(function(t,i){return t.concat(we(i)===Yt?ri(e,{placement:i,boundary:h,rootBoundary:d,padding:c,flipVariations:p,allowedAutoPlacements:m}):i)},[]),y=e.rects.reference,w=e.rects.popper,A=new Map,E=!0,T=v[0],C=0;C<v.length;C++){var O=v[C],x=we(O),k=Be(O)===Gt,L=[Vt,Kt].indexOf(x)>=0,S=L?"width":"height",D=oi(e,{placement:O,boundary:h,rootBoundary:d,altBoundary:u,padding:c}),$=L?k?Qt:Xt:k?Kt:Vt;y[S]>w[S]&&($=Xe($));var I=Xe($),N=[];if(o&&N.push(D[x]<=0),a&&N.push(D[$]<=0,D[I]<=0),N.every(function(t){return t})){T=O,E=!1;break}A.set(O,N)}if(E)for(var P=function(t){var e=v.find(function(e){var i=A.get(e);if(i)return i.slice(0,t).every(function(t){return t})});if(e)return T=e,"break"},j=p?3:1;j>0&&"break"!==P(j);j--);e.placement!==T&&(e.modifiersData[n]._skip=!0,e.placement=T,e.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function li(t,e,i){return void 0===i&&(i={x:0,y:0}),{top:t.top-e.height-i.y,right:t.right-e.width+i.x,bottom:t.bottom-e.height+i.y,left:t.left-e.width-i.x}}function ci(t){return[Vt,Qt,Kt,Xt].some(function(e){return t[e]>=0})}const hi={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(t){var e=t.state,i=t.name,n=e.rects.reference,s=e.rects.popper,o=e.modifiersData.preventOverflow,r=oi(e,{elementContext:"reference"}),a=oi(e,{altBoundary:!0}),l=li(r,n),c=li(a,s,o),h=ci(l),d=ci(c);e.modifiersData[i]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:h,hasPopperEscaped:d},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":h,"data-popper-escaped":d})}},di={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(t){var e=t.state,i=t.options,n=t.name,s=i.offset,o=void 0===s?[0,0]:s,r=se.reduce(function(t,i){return t[i]=function(t,e,i){var n=we(t),s=[Xt,Vt].indexOf(n)>=0?-1:1,o="function"==typeof i?i(Object.assign({},e,{placement:t})):i,r=o[0],a=o[1];return r=r||0,a=(a||0)*s,[Xt,Qt].indexOf(n)>=0?{x:a,y:r}:{x:r,y:a}}(i,e.rects,o),t},{}),a=r[e.placement],l=a.x,c=a.y;null!=e.modifiersData.popperOffsets&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=c),e.modifiersData[n]=r}},ui={name:"popperOffsets",enabled:!0,phase:"read",fn:function(t){var e=t.state,i=t.name;e.modifiersData[i]=si({reference:e.rects.reference,element:e.rects.popper,placement:e.placement})},data:{}},fi={name:"preventOverflow",enabled:!0,phase:"main",fn:function(t){var e=t.state,i=t.options,n=t.name,s=i.mainAxis,o=void 0===s||s,r=i.altAxis,a=void 0!==r&&r,l=i.boundary,c=i.rootBoundary,h=i.altBoundary,d=i.padding,u=i.tether,f=void 0===u||u,p=i.tetherOffset,m=void 0===p?0:p,g=oi(e,{boundary:l,rootBoundary:c,padding:d,altBoundary:h}),_=we(e.placement),b=Be(e.placement),v=!b,y=je(_),w="x"===y?"y":"x",A=e.modifiersData.popperOffsets,E=e.rects.reference,T=e.rects.popper,C="function"==typeof m?m(Object.assign({},e.rects,{placement:e.placement})):m,O="number"==typeof C?{mainAxis:C,altAxis:C}:Object.assign({mainAxis:0,altAxis:0},C),x=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,k={x:0,y:0};if(A){if(o){var L,S="y"===y?Vt:Xt,D="y"===y?Kt:Qt,$="y"===y?"height":"width",I=A[y],N=I+g[S],P=I-g[D],j=f?-T[$]/2:0,M=b===Gt?E[$]:T[$],F=b===Gt?-T[$]:-E[$],H=e.elements.arrow,W=f&&H?ke(H):{width:0,height:0},B=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},z=B[S],R=B[D],q=Me(0,E[$],W[$]),V=v?E[$]/2-j-q-z-O.mainAxis:M-q-z-O.mainAxis,K=v?-E[$]/2+j+q+R+O.mainAxis:F+q+R+O.mainAxis,Q=e.elements.arrow&&Pe(e.elements.arrow),X=Q?"y"===y?Q.clientTop||0:Q.clientLeft||0:0,Y=null!=(L=null==x?void 0:x[y])?L:0,U=I+K-Y,G=Me(f?Ee(N,I+V-Y-X):N,I,f?Ae(P,U):P);A[y]=G,k[y]=G-I}if(a){var J,Z="x"===y?Vt:Xt,tt="x"===y?Kt:Qt,et=A[w],it="y"===w?"height":"width",nt=et+g[Z],st=et-g[tt],ot=-1!==[Vt,Xt].indexOf(_),rt=null!=(J=null==x?void 0:x[w])?J:0,at=ot?nt:et-E[it]-T[it]-rt+O.altAxis,lt=ot?et+E[it]+T[it]-rt-O.altAxis:st,ct=f&&ot?function(t,e,i){var n=Me(t,e,i);return n>i?i:n}(at,et,lt):Me(f?at:nt,et,f?lt:st);A[w]=ct,k[w]=ct-et}e.modifiersData[n]=k}},requiresIfExists:["offset"]};function pi(t,e,i){void 0===i&&(i=!1);var n,s,o=be(e),r=be(e)&&function(t){var e=t.getBoundingClientRect(),i=Te(e.width)/t.offsetWidth||1,n=Te(e.height)/t.offsetHeight||1;return 1!==i||1!==n}(e),a=$e(e),l=xe(t,r,i),c={scrollLeft:0,scrollTop:0},h={x:0,y:0};return(o||!o&&!i)&&(("body"!==me(e)||Ze(a))&&(c=(n=e)!==ge(n)&&be(n)?{scrollLeft:(s=n).scrollLeft,scrollTop:s.scrollTop}:Ge(n)),be(e)?((h=xe(e,!0)).x+=e.clientLeft,h.y+=e.clientTop):a&&(h.x=Je(a))),{x:l.left+c.scrollLeft-h.x,y:l.top+c.scrollTop-h.y,width:l.width,height:l.height}}function mi(t){var e=new Map,i=new Set,n=[];function s(t){i.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach(function(t){if(!i.has(t)){var n=e.get(t);n&&s(n)}}),n.push(t)}return t.forEach(function(t){e.set(t.name,t)}),t.forEach(function(t){i.has(t.name)||s(t)}),n}var gi={placement:"bottom",modifiers:[],strategy:"absolute"};function _i(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return!e.some(function(t){return!(t&&"function"==typeof t.getBoundingClientRect)})}function bi(t){void 0===t&&(t={});var e=t,i=e.defaultModifiers,n=void 0===i?[]:i,s=e.defaultOptions,o=void 0===s?gi:s;return function(t,e,i){void 0===i&&(i=o);var s,r,a={placement:"bottom",orderedModifiers:[],options:Object.assign({},gi,o),modifiersData:{},elements:{reference:t,popper:e},attributes:{},styles:{}},l=[],c=!1,h={state:a,setOptions:function(i){var s="function"==typeof i?i(a.options):i;d(),a.options=Object.assign({},o,a.options,s),a.scrollParents={reference:_e(t)?ei(t):t.contextElement?ei(t.contextElement):[],popper:ei(e)};var r,c,u=function(t){var e=mi(t);return pe.reduce(function(t,i){return t.concat(e.filter(function(t){return t.phase===i}))},[])}((r=[].concat(n,a.options.modifiers),c=r.reduce(function(t,e){var i=t[e.name];return t[e.name]=i?Object.assign({},i,e,{options:Object.assign({},i.options,e.options),data:Object.assign({},i.data,e.data)}):e,t},{}),Object.keys(c).map(function(t){return c[t]})));return a.orderedModifiers=u.filter(function(t){return t.enabled}),a.orderedModifiers.forEach(function(t){var e=t.name,i=t.options,n=void 0===i?{}:i,s=t.effect;if("function"==typeof s){var o=s({state:a,name:e,instance:h,options:n});l.push(o||function(){})}}),h.update()},forceUpdate:function(){if(!c){var t=a.elements,e=t.reference,i=t.popper;if(_i(e,i)){a.rects={reference:pi(e,Pe(i),"fixed"===a.options.strategy),popper:ke(i)},a.reset=!1,a.placement=a.options.placement,a.orderedModifiers.forEach(function(t){return a.modifiersData[t.name]=Object.assign({},t.data)});for(var n=0;n<a.orderedModifiers.length;n++)if(!0!==a.reset){var s=a.orderedModifiers[n],o=s.fn,r=s.options,l=void 0===r?{}:r,d=s.name;"function"==typeof o&&(a=o({state:a,options:l,name:d,instance:h})||a)}else a.reset=!1,n=-1}}},update:(s=function(){return new Promise(function(t){h.forceUpdate(),t(a)})},function(){return r||(r=new Promise(function(t){Promise.resolve().then(function(){r=void 0,t(s())})})),r}),destroy:function(){d(),c=!0}};if(!_i(t,e))return h;function d(){l.forEach(function(t){return t()}),l=[]}return h.setOptions(i).then(function(t){!c&&i.onFirstUpdate&&i.onFirstUpdate(t)}),h}}var vi=bi(),yi=bi({defaultModifiers:[Ke,ui,qe,ye]}),wi=bi({defaultModifiers:[Ke,ui,qe,ye,di,ai,fi,We,hi]});const Ai=Object.freeze(Object.defineProperty({__proto__:null,afterMain:he,afterRead:ae,afterWrite:fe,applyStyles:ye,arrow:We,auto:Yt,basePlacements:Ut,beforeMain:le,beforeRead:oe,beforeWrite:de,bottom:Kt,clippingParents:Zt,computeStyles:qe,createPopper:wi,createPopperBase:vi,createPopperLite:yi,detectOverflow:oi,end:Jt,eventListeners:Ke,flip:ai,hide:hi,left:Xt,main:ce,modifierPhases:pe,offset:di,placements:se,popper:ee,popperGenerator:bi,popperOffsets:ui,preventOverflow:fi,read:re,reference:ie,right:Qt,start:Gt,top:Vt,variationPlacements:ne,viewport:te,write:ue},Symbol.toStringTag,{value:"Module"})),Ei="dropdown",Ti=".bs.dropdown",Ci=".data-api",Oi="ArrowUp",xi="ArrowDown",ki=`hide${Ti}`,Li=`hidden${Ti}`,Si=`show${Ti}`,Di=`shown${Ti}`,$i=`click${Ti}${Ci}`,Ii=`keydown${Ti}${Ci}`,Ni=`keyup${Ti}${Ci}`,Pi="show",ji='[data-bs-toggle="dropdown"]:not(.disabled):not(:disabled)',Mi=`${ji}.${Pi}`,Fi=".dropdown-menu",Hi=m()?"top-end":"top-start",Wi=m()?"top-start":"top-end",Bi=m()?"bottom-end":"bottom-start",zi=m()?"bottom-start":"bottom-end",Ri=m()?"left-start":"right-start",qi=m()?"right-start":"left-start",Vi={autoClose:!0,boundary:"clippingParents",display:"dynamic",offset:[0,2],popperConfig:null,reference:"toggle"},Ki={autoClose:"(boolean|string)",boundary:"(string|element)",display:"string",offset:"(array|string|function)",popperConfig:"(null|object|function)",reference:"(string|element|object)"};class Qi extends B{constructor(t,e){super(t,e),this._popper=null,this._parent=this._element.parentNode,this._menu=R.next(this._element,Fi)[0]||R.prev(this._element,Fi)[0]||R.findOne(Fi,this._parent),this._inNavbar=this._detectNavbar()}static get Default(){return Vi}static get DefaultType(){return Ki}static get NAME(){return Ei}toggle(){return this._isShown()?this.hide():this.show()}show(){if(c(this._element)||this._isShown())return;const t={relatedTarget:this._element};if(!P.trigger(this._element,Si,t).defaultPrevented){if(this._createPopper(),"ontouchstart"in document.documentElement&&!this._parent.closest(".navbar-nav"))for(const t of[].concat(...document.body.children))P.on(t,"mouseover",d);this._element.focus(),this._element.setAttribute("aria-expanded",!0),this._menu.classList.add(Pi),this._element.classList.add(Pi),P.trigger(this._element,Di,t)}}hide(){if(c(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(!P.trigger(this._element,ki,t).defaultPrevented){if("ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))P.off(t,"mouseover",d);this._popper&&this._popper.destroy(),this._menu.classList.remove(Pi),this._element.classList.remove(Pi),this._element.setAttribute("aria-expanded","false"),H.removeDataAttribute(this._menu,"popper"),P.trigger(this._element,Li,t)}}_getConfig(t){if("object"==typeof(t=super._getConfig(t)).reference&&!r(t.reference)&&"function"!=typeof t.reference.getBoundingClientRect)throw new TypeError(`${Ei.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);return t}_createPopper(){if(void 0===Ai)throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org/docs/v2/)");let t=this._element;"parent"===this._config.reference?t=this._parent:r(this._config.reference)?t=a(this._config.reference):"object"==typeof this._config.reference&&(t=this._config.reference);const e=this._getPopperConfig();this._popper=wi(t,this._menu,e)}_isShown(){return this._menu.classList.contains(Pi)}_getPlacement(){const t=this._parent;if(t.classList.contains("dropend"))return Ri;if(t.classList.contains("dropstart"))return qi;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?Wi:Hi:e?zi:Bi}_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)&&(H.setDataAttribute(this._menu,"popper","static"),t.modifiers=[{name:"applyStyles",enabled:!1}]),{...t,..._(this._config.popperConfig,[void 0,t])}}_selectMenuItem({key:t,target:e}){const i=R.find(".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",this._menu).filter(t=>l(t));i.length&&v(i,e,t===xi,!i.includes(e)).focus()}static jQueryInterface(t){return this.each(function(){const e=Qi.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=R.find(Mi);for(const i of e){const e=Qi.getInstance(i);if(!e||!1===e._config.autoClose)continue;const n=t.composedPath(),s=n.includes(e._menu);if(n.includes(e._element)||"inside"===e._config.autoClose&&!s||"outside"===e._config.autoClose&&s)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,n=[Oi,xi].includes(t.key);if(!n&&!i)return;if(e&&!i)return;t.preventDefault();const s=this.matches(ji)?this:R.prev(this,ji)[0]||R.next(this,ji)[0]||R.findOne(ji,t.delegateTarget.parentNode),o=Qi.getOrCreateInstance(s);if(n)return t.stopPropagation(),o.show(),void o._selectMenuItem(t);o._isShown()&&(t.stopPropagation(),o.hide(),s.focus())}}P.on(document,Ii,ji,Qi.dataApiKeydownHandler),P.on(document,Ii,Fi,Qi.dataApiKeydownHandler),P.on(document,$i,Qi.clearMenus),P.on(document,Ni,Qi.clearMenus),P.on(document,$i,ji,function(t){t.preventDefault(),Qi.getOrCreateInstance(this).toggle()}),g(Qi);const Xi="backdrop",Yi="show",Ui=`mousedown.bs.${Xi}`,Gi={className:"modal-backdrop",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:"body"},Ji={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"};class Zi extends W{constructor(t){super(),this._config=this._getConfig(t),this._isAppended=!1,this._element=null}static get Default(){return Gi}static get DefaultType(){return Ji}static get NAME(){return Xi}show(t){if(!this._config.isVisible)return void _(t);this._append();const e=this._getElement();this._config.isAnimated&&u(e),e.classList.add(Yi),this._emulateAnimation(()=>{_(t)})}hide(t){this._config.isVisible?(this._getElement().classList.remove(Yi),this._emulateAnimation(()=>{this.dispose(),_(t)})):_(t)}dispose(){this._isAppended&&(P.off(this._element,Ui),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=a(t.rootElement),t}_append(){if(this._isAppended)return;const t=this._getElement();this._config.rootElement.append(t),P.on(t,Ui,()=>{_(this._config.clickCallback)}),this._isAppended=!0}_emulateAnimation(t){b(t,this._getElement(),this._config.isAnimated)}}const tn=".bs.focustrap",en=`focusin${tn}`,nn=`keydown.tab${tn}`,sn="backward",on={autofocus:!0,trapElement:null},rn={autofocus:"boolean",trapElement:"element"};class an extends W{constructor(t){super(),this._config=this._getConfig(t),this._isActive=!1,this._lastTabNavDirection=null}static get Default(){return on}static get DefaultType(){return rn}static get NAME(){return"focustrap"}activate(){this._isActive||(this._config.autofocus&&this._config.trapElement.focus(),P.off(document,tn),P.on(document,en,t=>this._handleFocusin(t)),P.on(document,nn,t=>this._handleKeydown(t)),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,P.off(document,tn))}_handleFocusin(t){const{trapElement:e}=this._config;if(t.target===document||t.target===e||e.contains(t.target))return;const i=R.focusableChildren(e);0===i.length?e.focus():this._lastTabNavDirection===sn?i[i.length-1].focus():i[0].focus()}_handleKeydown(t){"Tab"===t.key&&(this._lastTabNavDirection=t.shiftKey?sn:"forward")}}const ln=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",cn=".sticky-top",hn="padding-right",dn="margin-right";class un{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,hn,e=>e+t),this._setElementAttributes(ln,hn,e=>e+t),this._setElementAttributes(cn,dn,e=>e-t)}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,hn),this._resetElementAttributes(ln,hn),this._resetElementAttributes(cn,dn)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(t,e,i){const n=this.getWidth();this._applyManipulationCallback(t,t=>{if(t!==this._element&&window.innerWidth>t.clientWidth+n)return;this._saveInitialAttribute(t,e);const s=window.getComputedStyle(t).getPropertyValue(e);t.style.setProperty(e,`${i(Number.parseFloat(s))}px`)})}_saveInitialAttribute(t,e){const i=t.style.getPropertyValue(e);i&&H.setDataAttribute(t,e,i)}_resetElementAttributes(t,e){this._applyManipulationCallback(t,t=>{const i=H.getDataAttribute(t,e);null!==i?(H.removeDataAttribute(t,e),t.style.setProperty(e,i)):t.style.removeProperty(e)})}_applyManipulationCallback(t,e){if(r(t))e(t);else for(const i of R.find(t,this._element))e(i)}}const fn=".bs.modal",pn=`hide${fn}`,mn=`hidePrevented${fn}`,gn=`hidden${fn}`,_n=`show${fn}`,bn=`shown${fn}`,vn=`resize${fn}`,yn=`click.dismiss${fn}`,wn=`mousedown.dismiss${fn}`,An=`keydown.dismiss${fn}`,En=`click${fn}.data-api`,Tn="modal-open",Cn="show",On="modal-static",xn={backdrop:!0,focus:!0,keyboard:!0},kn={backdrop:"(boolean|string)",focus:"boolean",keyboard:"boolean"};class Ln extends B{constructor(t,e){super(t,e),this._dialog=R.findOne(".modal-dialog",this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._isTransitioning=!1,this._scrollBar=new un,this._addEventListeners()}static get Default(){return xn}static get DefaultType(){return kn}static get NAME(){return"modal"}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){this._isShown||this._isTransitioning||P.trigger(this._element,_n,{relatedTarget:t}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),document.body.classList.add(Tn),this._adjustDialog(),this._backdrop.show(()=>this._showElement(t)))}hide(){this._isShown&&!this._isTransitioning&&(P.trigger(this._element,pn).defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,this._focustrap.deactivate(),this._element.classList.remove(Cn),this._queueCallback(()=>this._hideModal(),this._element,this._isAnimated())))}dispose(){P.off(window,fn),P.off(this._dialog,fn),this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new Zi({isVisible:Boolean(this._config.backdrop),isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new an({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=R.findOne(".modal-body",this._dialog);e&&(e.scrollTop=0),u(this._element),this._element.classList.add(Cn),this._queueCallback(()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,P.trigger(this._element,bn,{relatedTarget:t})},this._dialog,this._isAnimated())}_addEventListeners(){P.on(this._element,An,t=>{"Escape"===t.key&&(this._config.keyboard?this.hide():this._triggerBackdropTransition())}),P.on(window,vn,()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()}),P.on(this._element,wn,t=>{P.one(this._element,yn,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(Tn),this._resetAdjustments(),this._scrollBar.reset(),P.trigger(this._element,gn)})}_isAnimated(){return this._element.classList.contains("fade")}_triggerBackdropTransition(){if(P.trigger(this._element,mn).defaultPrevented)return;const t=this._element.scrollHeight>document.documentElement.clientHeight,e=this._element.style.overflowY;"hidden"===e||this._element.classList.contains(On)||(t||(this._element.style.overflowY="hidden"),this._element.classList.add(On),this._queueCallback(()=>{this._element.classList.remove(On),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=m()?"paddingLeft":"paddingRight";this._element.style[t]=`${e}px`}if(!i&&t){const t=m()?"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=Ln.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===i[t])throw new TypeError(`No method named "${t}"`);i[t](e)}})}}P.on(document,En,'[data-bs-toggle="modal"]',function(t){const e=R.getElementFromSelector(this);["A","AREA"].includes(this.tagName)&&t.preventDefault(),P.one(e,_n,t=>{t.defaultPrevented||P.one(e,gn,()=>{l(this)&&this.focus()})});const i=R.findOne(".modal.show");i&&Ln.getInstance(i).hide(),Ln.getOrCreateInstance(e).toggle(this)}),q(Ln),g(Ln);const Sn=".bs.offcanvas",Dn=".data-api",$n=`load${Sn}${Dn}`,In="show",Nn="showing",Pn="hiding",jn=".offcanvas.show",Mn=`show${Sn}`,Fn=`shown${Sn}`,Hn=`hide${Sn}`,Wn=`hidePrevented${Sn}`,Bn=`hidden${Sn}`,zn=`resize${Sn}`,Rn=`click${Sn}${Dn}`,qn=`keydown.dismiss${Sn}`,Vn={backdrop:!0,keyboard:!0,scroll:!1},Kn={backdrop:"(boolean|string)",keyboard:"boolean",scroll:"boolean"};class Qn extends B{constructor(t,e){super(t,e),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get Default(){return Vn}static get DefaultType(){return Kn}static get NAME(){return"offcanvas"}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){this._isShown||P.trigger(this._element,Mn,{relatedTarget:t}).defaultPrevented||(this._isShown=!0,this._backdrop.show(),this._config.scroll||(new un).hide(),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add(Nn),this._queueCallback(()=>{this._config.scroll&&!this._config.backdrop||this._focustrap.activate(),this._element.classList.add(In),this._element.classList.remove(Nn),P.trigger(this._element,Fn,{relatedTarget:t})},this._element,!0))}hide(){this._isShown&&(P.trigger(this._element,Hn).defaultPrevented||(this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.add(Pn),this._backdrop.hide(),this._queueCallback(()=>{this._element.classList.remove(In,Pn),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._config.scroll||(new un).reset(),P.trigger(this._element,Bn)},this._element,!0)))}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_initializeBackDrop(){const t=Boolean(this._config.backdrop);return new Zi({className:"offcanvas-backdrop",isVisible:t,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:t?()=>{"static"!==this._config.backdrop?this.hide():P.trigger(this._element,Wn)}:null})}_initializeFocusTrap(){return new an({trapElement:this._element})}_addEventListeners(){P.on(this._element,qn,t=>{"Escape"===t.key&&(this._config.keyboard?this.hide():P.trigger(this._element,Wn))})}static jQueryInterface(t){return this.each(function(){const e=Qn.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)}})}}P.on(document,Rn,'[data-bs-toggle="offcanvas"]',function(t){const e=R.getElementFromSelector(this);if(["A","AREA"].includes(this.tagName)&&t.preventDefault(),c(this))return;P.one(e,Bn,()=>{l(this)&&this.focus()});const i=R.findOne(jn);i&&i!==e&&Qn.getInstance(i).hide(),Qn.getOrCreateInstance(e).toggle(this)}),P.on(window,$n,()=>{for(const t of R.find(jn))Qn.getOrCreateInstance(t).show()}),P.on(window,zn,()=>{for(const t of R.find("[aria-modal][class*=show][class*=offcanvas-]"))"fixed"!==getComputedStyle(t).position&&Qn.getOrCreateInstance(t).hide()}),q(Qn),g(Qn);const Xn={"*":["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:[]},Yn=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),Un=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i,Gn=(t,e)=>{const i=t.nodeName.toLowerCase();return e.includes(i)?!Yn.has(i)||Boolean(Un.test(t.nodeValue)):e.filter(t=>t instanceof RegExp).some(t=>t.test(i))},Jn={allowList:Xn,content:{},extraClass:"",html:!1,sanitize:!0,sanitizeFn:null,template:"<div></div>"},Zn={allowList:"object",content:"object",extraClass:"(string|function)",html:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",template:"string"},ts={entry:"(string|element|function|null)",selector:"(string|element)"};class es extends W{constructor(t){super(),this._config=this._getConfig(t)}static get Default(){return Jn}static get DefaultType(){return Zn}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},ts)}_setContent(t,e,i){const n=R.findOne(i,t);n&&((e=this._resolvePossibleFunction(e))?r(e)?this._putElementInTemplate(a(e),n):this._config.html?n.innerHTML=this._maybeSanitize(e):n.textContent=e:n.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 n=(new window.DOMParser).parseFromString(t,"text/html"),s=[].concat(...n.body.querySelectorAll("*"));for(const t of s){const i=t.nodeName.toLowerCase();if(!Object.keys(e).includes(i)){t.remove();continue}const n=[].concat(...t.attributes),s=[].concat(e["*"]||[],e[i]||[]);for(const e of n)Gn(e,s)||t.removeAttribute(e.nodeName)}return n.body.innerHTML}(t,this._config.allowList,this._config.sanitizeFn):t}_resolvePossibleFunction(t){return _(t,[void 0,this])}_putElementInTemplate(t,e){if(this._config.html)return e.innerHTML="",void e.append(t);e.textContent=t.textContent}}const is=new Set(["sanitize","allowList","sanitizeFn"]),ns="fade",ss="show",os=".tooltip-inner",rs=".modal",as="hide.bs.modal",ls="hover",cs="focus",hs="click",ds={AUTO:"auto",TOP:"top",RIGHT:m()?"left":"right",BOTTOM:"bottom",LEFT:m()?"right":"left"},us={allowList:Xn,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:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',title:"",trigger:"hover focus"},fs={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 ps extends B{constructor(t,e){if(void 0===Ai)throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org/docs/v2/)");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 us}static get DefaultType(){return fs}static get NAME(){return"tooltip"}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(){this._isEnabled&&(this._isShown()?this._leave():this._enter())}dispose(){clearTimeout(this._timeout),P.off(this._element.closest(rs),as,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=P.trigger(this._element,this.constructor.eventName("show")),e=(h(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),P.trigger(this._element,this.constructor.eventName("inserted"))),this._popper=this._createPopper(i),i.classList.add(ss),"ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))P.on(t,"mouseover",d);this._queueCallback(()=>{P.trigger(this._element,this.constructor.eventName("shown")),!1===this._isHovered&&this._leave(),this._isHovered=!1},this.tip,this._isAnimated())}hide(){if(this._isShown()&&!P.trigger(this._element,this.constructor.eventName("hide")).defaultPrevented){if(this._getTipElement().classList.remove(ss),"ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))P.off(t,"mouseover",d);this._activeTrigger[hs]=!1,this._activeTrigger[cs]=!1,this._activeTrigger[ls]=!1,this._isHovered=null,this._queueCallback(()=>{this._isWithActiveTrigger()||(this._isHovered||this._disposePopper(),this._element.removeAttribute("aria-describedby"),P.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(ns,ss),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(ns),e}setContent(t){this._newContent=t,this._isShown()&&(this._disposePopper(),this.show())}_getTemplateFactory(t){return this._templateFactory?this._templateFactory.changeContent(t):this._templateFactory=new es({...this._config,content:t,extraClass:this._resolvePossibleFunction(this._config.customClass)}),this._templateFactory}_getContentForTemplate(){return{[os]: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(ns)}_isShown(){return this.tip&&this.tip.classList.contains(ss)}_createPopper(t){const e=_(this._config.placement,[this,t,this._element]),i=ds[e.toUpperCase()];return wi(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 _(t,[this._element,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,..._(this._config.popperConfig,[void 0,e])}}_setListeners(){const t=this._config.trigger.split(" ");for(const e of t)if("click"===e)P.on(this._element,this.constructor.eventName("click"),this._config.selector,t=>{const e=this._initializeOnDelegatedTarget(t);e._activeTrigger[hs]=!(e._isShown()&&e._activeTrigger[hs]),e.toggle()});else if("manual"!==e){const t=e===ls?this.constructor.eventName("mouseenter"):this.constructor.eventName("focusin"),i=e===ls?this.constructor.eventName("mouseleave"):this.constructor.eventName("focusout");P.on(this._element,t,this._config.selector,t=>{const e=this._initializeOnDelegatedTarget(t);e._activeTrigger["focusin"===t.type?cs:ls]=!0,e._enter()}),P.on(this._element,i,this._config.selector,t=>{const e=this._initializeOnDelegatedTarget(t);e._activeTrigger["focusout"===t.type?cs:ls]=e._element.contains(t.relatedTarget),e._leave()})}this._hideModalHandler=()=>{this._element&&this.hide()},P.on(this._element.closest(rs),as,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=H.getDataAttributes(this._element);for(const t of Object.keys(e))is.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:a(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=ps.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}})}}g(ps);const ms=".popover-header",gs=".popover-body",_s={...ps.Default,content:"",offset:[0,8],placement:"right",template:'<div class="popover" role="tooltip"><div class="popover-arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>',trigger:"click"},bs={...ps.DefaultType,content:"(null|string|element|function)"};class vs extends ps{static get Default(){return _s}static get DefaultType(){return bs}static get NAME(){return"popover"}_isWithContent(){return this._getTitle()||this._getContent()}_getContentForTemplate(){return{[ms]:this._getTitle(),[gs]:this._getContent()}}_getContent(){return this._resolvePossibleFunction(this._config.content)}static jQueryInterface(t){return this.each(function(){const e=vs.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}})}}g(vs);const ys=".bs.scrollspy",ws=`activate${ys}`,As=`click${ys}`,Es=`load${ys}.data-api`,Ts="active",Cs="[href]",Os=".nav-link",xs=`${Os}, .nav-item > ${Os}, .list-group-item`,ks={offset:null,rootMargin:"0px 0px -25%",smoothScroll:!1,target:null,threshold:[.1,.5,1]},Ls={offset:"(number|null)",rootMargin:"string",smoothScroll:"boolean",target:"element",threshold:"array"};class Ss extends B{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 ks}static get DefaultType(){return Ls}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=a(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&&(P.off(this._config.target,As),P.on(this._config.target,As,Cs,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=R.find(Cs,this._config.target);for(const e of t){if(!e.hash||c(e))continue;const t=R.findOne(decodeURI(e.hash),this._element);l(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(Ts),this._activateParents(t),P.trigger(this._element,ws,{relatedTarget:t}))}_activateParents(t){if(t.classList.contains("dropdown-item"))R.findOne(".dropdown-toggle",t.closest(".dropdown")).classList.add(Ts);else for(const e of R.parents(t,".nav, .list-group"))for(const t of R.prev(e,xs))t.classList.add(Ts)}_clearActiveClass(t){t.classList.remove(Ts);const e=R.find(`${Cs}.${Ts}`,t);for(const t of e)t.classList.remove(Ts)}static jQueryInterface(t){return this.each(function(){const e=Ss.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]()}})}}P.on(window,Es,()=>{for(const t of R.find('[data-bs-spy="scroll"]'))Ss.getOrCreateInstance(t)}),g(Ss);const Ds=".bs.tab",$s=`hide${Ds}`,Is=`hidden${Ds}`,Ns=`show${Ds}`,Ps=`shown${Ds}`,js=`click${Ds}`,Ms=`keydown${Ds}`,Fs=`load${Ds}`,Hs="ArrowLeft",Ws="ArrowRight",Bs="ArrowUp",zs="ArrowDown",Rs="Home",qs="End",Vs="active",Ks="fade",Qs="show",Xs=".dropdown-toggle",Ys=`:not(${Xs})`,Us='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',Gs=`.nav-link${Ys}, .list-group-item${Ys}, [role="tab"]${Ys}, ${Us}`,Js=`.${Vs}[data-bs-toggle="tab"], .${Vs}[data-bs-toggle="pill"], .${Vs}[data-bs-toggle="list"]`;class Zs extends B{constructor(t){super(t),this._parent=this._element.closest('.list-group, .nav, [role="tablist"]'),this._parent&&(this._setInitialAttributes(this._parent,this._getChildren()),P.on(this._element,Ms,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?P.trigger(e,$s,{relatedTarget:t}):null;P.trigger(t,Ns,{relatedTarget:e}).defaultPrevented||i&&i.defaultPrevented||(this._deactivate(e,t),this._activate(t,e))}_activate(t,e){t&&(t.classList.add(Vs),this._activate(R.getElementFromSelector(t)),this._queueCallback(()=>{"tab"===t.getAttribute("role")?(t.removeAttribute("tabindex"),t.setAttribute("aria-selected",!0),this._toggleDropDown(t,!0),P.trigger(t,Ps,{relatedTarget:e})):t.classList.add(Qs)},t,t.classList.contains(Ks)))}_deactivate(t,e){t&&(t.classList.remove(Vs),t.blur(),this._deactivate(R.getElementFromSelector(t)),this._queueCallback(()=>{"tab"===t.getAttribute("role")?(t.setAttribute("aria-selected",!1),t.setAttribute("tabindex","-1"),this._toggleDropDown(t,!1),P.trigger(t,Is,{relatedTarget:e})):t.classList.remove(Qs)},t,t.classList.contains(Ks)))}_keydown(t){if(![Hs,Ws,Bs,zs,Rs,qs].includes(t.key))return;t.stopPropagation(),t.preventDefault();const e=this._getChildren().filter(t=>!c(t));let i;if([Rs,qs].includes(t.key))i=e[t.key===Rs?0:e.length-1];else{const n=[Ws,zs].includes(t.key);i=v(e,t.target,n,!0)}i&&(i.focus({preventScroll:!0}),Zs.getOrCreateInstance(i).show())}_getChildren(){return R.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=R.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=R.findOne(t,i);s&&s.classList.toggle(n,e)};n(Xs,Vs),n(".dropdown-menu",Qs),i.setAttribute("aria-expanded",e)}_setAttributeIfNotExists(t,e,i){t.hasAttribute(e)||t.setAttribute(e,i)}_elemIsActive(t){return t.classList.contains(Vs)}_getInnerElement(t){return t.matches(Gs)?t:R.findOne(Gs,t)}_getOuterElement(t){return t.closest(".nav-item, .list-group-item")||t}static jQueryInterface(t){return this.each(function(){const e=Zs.getOrCreateInstance(this);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t]()}})}}P.on(document,js,Us,function(t){["A","AREA"].includes(this.tagName)&&t.preventDefault(),c(this)||Zs.getOrCreateInstance(this).show()}),P.on(window,Fs,()=>{for(const t of R.find(Js))Zs.getOrCreateInstance(t)}),g(Zs);const to=".bs.toast",eo=`mouseover${to}`,io=`mouseout${to}`,no=`focusin${to}`,so=`focusout${to}`,oo=`hide${to}`,ro=`hidden${to}`,ao=`show${to}`,lo=`shown${to}`,co="hide",ho="show",uo="showing",fo={animation:"boolean",autohide:"boolean",delay:"number"},po={animation:!0,autohide:!0,delay:5e3};class mo extends B{constructor(t,e){super(t,e),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get Default(){return po}static get DefaultType(){return fo}static get NAME(){return"toast"}show(){P.trigger(this._element,ao).defaultPrevented||(this._clearTimeout(),this._config.animation&&this._element.classList.add("fade"),this._element.classList.remove(co),u(this._element),this._element.classList.add(ho,uo),this._queueCallback(()=>{this._element.classList.remove(uo),P.trigger(this._element,lo),this._maybeScheduleHide()},this._element,this._config.animation))}hide(){this.isShown()&&(P.trigger(this._element,oo).defaultPrevented||(this._element.classList.add(uo),this._queueCallback(()=>{this._element.classList.add(co),this._element.classList.remove(uo,ho),P.trigger(this._element,ro)},this._element,this._config.animation)))}dispose(){this._clearTimeout(),this.isShown()&&this._element.classList.remove(ho),super.dispose()}isShown(){return this._element.classList.contains(ho)}_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(){P.on(this._element,eo,t=>this._onInteraction(t,!0)),P.on(this._element,io,t=>this._onInteraction(t,!1)),P.on(this._element,no,t=>this._onInteraction(t,!0)),P.on(this._element,so,t=>this._onInteraction(t,!1))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(t){return this.each(function(){const e=mo.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t](this)}})}}return q(mo),g(mo),{Alert:X,Button:U,Carousel:St,Collapse:qt,Dropdown:Qi,Modal:Ln,Offcanvas:Qn,Popover:vs,ScrollSpy:Ss,Tab:Zs,Toast:mo,Tooltip:ps}});
|
|
7
|
-
/* Vendored from @odoo/owl@2.8.3's dist/owl.iife.min.js, patched to key off globalThis instead of top-level `this` (safe in both classic scripts and ES modules) — see scripts/build.mjs and src/owl/owl-dev-shim.js. */
|
|
8
|
-
!function(t){"use strict";function e(t){t=t.slice();const e=[];let n;for(;(n=t[0])&&"string"==typeof n;)e.push(t.shift());return{modifiers:e,data:t}}const n={shouldNormalizeDom:!0,mainEventHandler:(t,n,o)=>("function"==typeof t?t(n):Array.isArray(t)&&(t=e(t).data)[0](t[1],n),!1)};class o{constructor(t,e){this.key=t,this.child=e}mount(t,e){this.parentEl=t,this.child.mount(t,e)}moveBeforeDOMNode(t,e){this.child.moveBeforeDOMNode(t,e)}moveBeforeVNode(t,e){this.moveBeforeDOMNode(t&&t.firstNode()||e)}patch(t,e){if(this===t)return;let n=this.child,o=t.child;this.key===t.key?n.patch(o,e):(o.mount(this.parentEl,n.firstNode()),e&&n.beforeRemove(),n.remove(),this.child=o,this.key=t.key)}beforeRemove(){this.child.beforeRemove()}remove(){this.child.remove()}firstNode(){return this.child.firstNode()}toString(){return this.child.toString()}}function s(t,e){return new o(t,e)}class r extends Error{}let i,l,a,c;if("undefined"!=typeof Element){({setAttribute:i,removeAttribute:l}=Element.prototype);const t=DOMTokenList.prototype;a=t.add,c=t.remove}const h=Array.isArray,{split:u,trim:d}=String.prototype,f=/\s+/;function p(t,e){switch(e){case!1:case void 0:l.call(this,t);break;case!0:i.call(this,t,"");break;default:i.call(this,t,e)}}function m(t){return function(e){p.call(this,t,e)}}function g(t){if(h(t))"class"===t[0]?y.call(this,t[1]):p.call(this,t[0],t[1]);else for(let e in t)"class"===e?y.call(this,t[e]):p.call(this,e,t[e])}function b(t,e){if(h(t)){const n=t[0],o=t[1];if(n===e[0]){if(o===e[1])return;"class"===n?w.call(this,o,e[1]):p.call(this,n,o)}else l.call(this,e[0]),p.call(this,n,o)}else{for(let n in e)n in t||("class"===n?w.call(this,"",e[n]):l.call(this,n));for(let n in t){const o=t[n];o!==e[n]&&("class"===n?w.call(this,o,e[n]):p.call(this,n,o))}}}function v(t){const e={};switch(typeof t){case"string":const n=d.call(t);if(!n)return{};let o=u.call(n,f);for(let t=0,n=o.length;t<n;t++)e[o[t]]=!0;return e;case"object":for(let n in t){const o=t[n];if(o){if(n=d.call(n),!n)continue;const t=u.call(n,f);for(let n of t)e[n]=o}}return e;case"undefined":return{};case"number":return{[t]:!0};default:return{[t]:!0}}}function y(t){t=""===t?{}:v(t);const e=this.classList;for(let n in t)a.call(e,n)}function w(t,e){e=""===e?{}:v(e),t=""===t?{}:v(t);const n=this.classList;for(let o in e)o in t||c.call(n,o);for(let o in t)o in e||a.call(n,o)}function $(t){let e=!1;return async(...n)=>{e||(e=!0,await Promise.resolve(),e=!1,t(...n))}}function x(t){if(!t)return!1;if(t.ownerDocument.contains(t))return!0;const e=t.getRootNode();return e instanceof ShadowRoot&&t.ownerDocument.contains(e.host)}class N extends EventTarget{trigger(t,e){this.dispatchEvent(new CustomEvent(t,{detail:e}))}}class k extends String{}function T(t){return t instanceof k?t:void 0===t?E(""):"number"==typeof t?E(String(t)):([["&","&"],["<","<"],[">",">"],["'","'"],['"',"""],["`","`"]].forEach((e=>{t=String(t).replace(new RegExp(e[0],"g"),e[1])})),E(t))}function E(t,...e){if(!Array.isArray(t))return new k(t);const n=t;let o="",s=0;for(;s<e.length;++s)o+=n[s]+T(e[s]);return o+=n[s],new k(o)}function A(t){const e=t.split(".")[0],o=t.includes(".capture");return t.includes(".synthetic")?function(t,e=!1){let o=`__event__synthetic_${t}`;e&&(o=`${o}_capture`);!function(t,e,o=!1){if(D[e])return;document.addEventListener(t,(t=>function(t,e){let o=e.target;for(;null!==o;){const s=o[t];if(s)for(const t of Object.values(s)){if(n.mainEventHandler(t,e,o))return}o=o.parentNode}}(e,t)),{capture:o}),D[e]=!0}(t,o,e);const s=C++;function r(t){const e=this[o]||{};e[s]=t,this[o]=e}function i(){delete this[o]}return{setup:r,update:r,remove:i}}(e,o):function(t,e=!1){let o=`__event__${t}_${_++}`;e&&(o=`${o}_capture`);function s(t){const e=t.currentTarget;if(!e||!x(e))return;const s=e[o];s&&n.mainEventHandler(s,t,e)}function r(n){this[o]=n,this.addEventListener(t,s,{capture:e})}function i(){delete this[o],this.removeEventListener(t,s,{capture:e})}function l(t){this[o]=t}return{setup:r,update:l,remove:i}}(e,o)}let _=1;let C=1;const D={};let S,O,R;if("undefined"!=typeof Node){const t=Node.prototype;S=t.insertBefore,O=(L=t,B="textContent",Object.getOwnPropertyDescriptor(L,B)).set,R=t.removeChild}var L,B;class P{constructor(t){this.children=t}mount(t,e){const n=this.children,o=n.length,s=new Array(o);for(let r=0;r<o;r++){let o=n[r];if(o)o.mount(t,e);else{const n=document.createTextNode("");s[r]=n,S.call(t,n,e)}}this.anchors=s,this.parentEl=t}moveBeforeDOMNode(t,e=this.parentEl){this.parentEl=e;const n=this.children,o=this.anchors;for(let s=0,r=n.length;s<r;s++){let r=n[s];if(r)r.moveBeforeDOMNode(t,e);else{const n=o[s];S.call(e,n,t)}}}moveBeforeVNode(t,e){if(t){const n=t.children[0];e=(n?n.firstNode():t.anchors[0])||null}const n=this.children,o=this.parentEl,s=this.anchors;for(let t=0,r=n.length;t<r;t++){let r=n[t];if(r)r.moveBeforeVNode(null,e);else{const n=s[t];S.call(o,n,e)}}}patch(t,e){if(this===t)return;const n=this.children,o=t.children,s=this.anchors,r=this.parentEl;for(let t=0,i=n.length;t<i;t++){const i=n[t],l=o[t];if(i)if(l)i.patch(l,e);else{const o=i.firstNode(),l=document.createTextNode("");s[t]=l,S.call(r,l,o),e&&i.beforeRemove(),i.remove(),n[t]=void 0}else if(l){n[t]=l;const e=s[t];l.mount(r,e),R.call(r,e)}}}beforeRemove(){const t=this.children;for(let e=0,n=t.length;e<n;e++){const n=t[e];n&&n.beforeRemove()}}remove(){const t=this.parentEl;if(this.isOnlyChild)O.call(t,"");else{const e=this.children,n=this.anchors;for(let o=0,s=e.length;o<s;o++){const s=e[o];s?s.remove():R.call(t,n[o])}}}firstNode(){const t=this.children[0];return t?t.firstNode():this.anchors[0]}toString(){return this.children.map((t=>t?t.toString():"")).join("")}}function j(t){return new P(t)}let M,I,W;if("undefined"!=typeof Node){const t=Node.prototype;M=t.insertBefore,W=t.removeChild,I=((t,e)=>Object.getOwnPropertyDescriptor(t,e))(CharacterData.prototype,"data").set}class V{constructor(t){this.text=t}mountNode(t,e,n){this.parentEl=e,M.call(e,t,n),this.el=t}moveBeforeDOMNode(t,e=this.parentEl){this.parentEl=e,M.call(e,this.el,t)}moveBeforeVNode(t,e){M.call(this.parentEl,this.el,t?t.el:e)}beforeRemove(){}remove(){W.call(this.parentEl,this.el)}firstNode(){return this.el}toString(){return this.text}}class F extends V{mount(t,e){this.mountNode(document.createTextNode(U(this.text)),t,e)}patch(t){const e=t.text;this.text!==e&&(I.call(this.el,U(e)),this.text=e)}}class K extends V{mount(t,e){this.mountNode(document.createComment(U(this.text)),t,e)}patch(){}}function z(t){return new F(t)}function H(t){return new K(t)}function U(t){switch(typeof t){case"string":return t;case"number":return String(t);case"boolean":return t?"true":"false";default:return t||""}}const q=(t,e)=>Object.getOwnPropertyDescriptor(t,e);let G,X,Y,Z,J;"undefined"!=typeof Node&&(G=Node.prototype,X=Element.prototype,Y=q(CharacterData.prototype,"data").set,Z=q(G,"firstChild").get,J=q(G,"nextSibling").get);const Q=()=>{};function tt(t){return function(e){this[t]=0===e?0:e?e.valueOf():""}}const et={};function nt(t){if(t in et)return et[t];const e=(new DOMParser).parseFromString(`<t>${t}</t>`,"text/xml").firstChild.firstChild;n.shouldNormalizeDom&&ot(e);const o=st(e),s=lt(o),r=function(t,e){let n=function(t,e){const{refN:n,collectors:o,children:s}=e,r=o.length;e.locations.sort(((t,e)=>t.idx-e.idx));const i=e.locations.map((t=>({refIdx:t.refIdx,setData:t.setData,updateData:t.updateData}))),l=i.length,a=s.length,c=s,h=n>0,u=G.cloneNode,d=G.insertBefore,f=X.remove;class p{constructor(t){this.data=t}beforeRemove(){}remove(){f.call(this.el)}firstNode(){return this.el}moveBeforeDOMNode(t,e=this.parentEl){this.parentEl=e,d.call(e,this.el,t)}moveBeforeVNode(t,e){d.call(this.parentEl,this.el,t?t.el:e)}toString(){const t=document.createElement("div");return this.mount(t,null),t.innerHTML}mount(e,n){const o=u.call(t,!0);d.call(e,o,n),this.el=o,this.parentEl=e}patch(t,e){}}h&&(p.prototype.mount=function(e,s){const h=u.call(t,!0),f=new Array(n);this.refs=f,f[0]=h;for(let t=0;t<r;t++){const e=o[t];f[e.idx]=e.getVal.call(f[e.prevIdx])}if(l){const t=this.data;for(let e=0;e<l;e++){const n=i[e];n.setData.call(f[n.refIdx],t[e])}}if(d.call(e,h,s),a){const t=this.children;for(let e=0;e<a;e++){const n=t[e];if(n){const t=c[e],o=t.afterRefIdx?f[t.afterRefIdx]:null;n.isOnlyChild=t.isOnlyChild,n.mount(f[t.parentRefIdx],o)}}}this.el=h,this.parentEl=e},p.prototype.patch=function(t,e){if(this===t)return;const n=this.refs;if(l){const e=this.data,o=t.data;for(let t=0;t<l;t++){const s=e[t],r=o[t];if(s!==r){const e=i[t];e.updateData.call(n[e.refIdx],r,s)}}this.data=o}if(a){let o=this.children;const s=t.children;for(let t=0;t<a;t++){const r=o[t],i=s[t];if(r)i?r.patch(i,e):(e&&r.beforeRemove(),r.remove(),o[t]=void 0);else if(i){const e=c[t],s=e.afterRefIdx?n[e.afterRefIdx]:null;i.mount(n[e.parentRefIdx],s),o[t]=i}}}});return p}(t,e);if(e.cbRefs.length){const t=e.cbRefs,o=e.refList;let s=t.length;n=class extends n{mount(t,e){o.push(new Array(s)),super.mount(t,e);for(let t of o.pop())t()}remove(){super.remove();for(let e of t){(0,this.data[e])(null)}}}}if(e.children.length)return n=class extends n{constructor(t,e){super(t),this.children=e}},n.prototype.beforeRemove=P.prototype.beforeRemove,(t,e=[])=>new n(t,e);return t=>new n(t)}(o.el,s);return et[t]=r,r}function ot(t){if(t.nodeType!==Node.TEXT_NODE||/\S/.test(t.textContent)){if(t.nodeType!==Node.ELEMENT_NODE||"pre"!==t.tagName)for(let e=t.childNodes.length-1;e>=0;--e)ot(t.childNodes.item(e))}else t.remove()}function st(t,e=null,n=null){switch(t.nodeType){case Node.ELEMENT_NODE:{let o=n&&n.currentNS;const s=t.tagName;let r;const i=[];if(s.startsWith("block-text-")){const t=parseInt(s.slice(11),10);i.push({type:"text",idx:t}),r=document.createTextNode("")}if(s.startsWith("block-child-")){n.isRef||rt(n);const t=parseInt(s.slice(12),10);i.push({type:"child",idx:t}),r=document.createTextNode("")}if(o||(o=t.namespaceURI),r||(r=o?document.createElementNS(o,s):document.createElement(s)),r instanceof Element){if(!n){document.createElement("template").content.appendChild(r)}const e=t.attributes;for(let t=0;t<e.length;t++){const n=e[t].name,o=e[t].value;if(n.startsWith("block-handler-")){const t=parseInt(n.slice(14),10);i.push({type:"handler",idx:t,event:o})}else if(n.startsWith("block-attribute-")){const t=parseInt(n.slice(16),10);i.push({type:"attribute",idx:t,name:o,tag:s})}else if(n.startsWith("block-property-")){const t=parseInt(n.slice(15),10);i.push({type:"property",idx:t,name:o,tag:s})}else"block-attributes"===n?i.push({type:"attributes",idx:parseInt(o,10)}):"block-ref"===n?i.push({type:"ref",idx:parseInt(o,10)}):r.setAttribute(e[t].name,o)}}const l={parent:e,firstChild:null,nextSibling:null,el:r,info:i,refN:0,currentNS:o};if(t.firstChild){const e=t.childNodes[0];if(1===t.childNodes.length&&e.nodeType===Node.ELEMENT_NODE&&e.tagName.startsWith("block-child-")){const t=e.tagName,n=parseInt(t.slice(12),10);i.push({idx:n,type:"child",isOnlyChild:!0})}else{l.firstChild=st(t.firstChild,l,l),r.appendChild(l.firstChild.el);let e=t.firstChild,n=l.firstChild;for(;e=e.nextSibling;)n.nextSibling=st(e,n,l),r.appendChild(n.nextSibling.el),n=n.nextSibling}}return l.info.length&&rt(l),l}case Node.TEXT_NODE:case Node.COMMENT_NODE:return{parent:e,firstChild:null,nextSibling:null,el:t.nodeType===Node.TEXT_NODE?document.createTextNode(t.textContent):document.createComment(t.textContent),info:[],refN:0,currentNS:null}}throw new r("boom")}function rt(t){t.isRef=!0;do{t.refN++}while(t=t.parent)}function it(t){let e=t.parent;for(;e&&e.nextSibling===t;)t=e,e=e.parent;return e}function lt(t,e,n){if(!e){e={collectors:[],locations:[],children:new Array(t.info.filter((t=>"child"===t.type)).length),cbRefs:[],refN:t.refN,refList:[]},n=0}if(t.refN){const o=n,s=t.isRef,r=t.firstChild?t.firstChild.refN:0,i=t.nextSibling?t.nextSibling.refN:0;if(s){for(let e of t.info)e.refIdx=o;t.refIdx=o,function(t,e){for(let n of e.info)switch(n.type){case"text":t.locations.push({idx:n.idx,refIdx:n.refIdx,setData:at,updateData:at});break;case"child":n.isOnlyChild?t.children[n.idx]={parentRefIdx:n.refIdx,isOnlyChild:!0}:t.children[n.idx]={parentRefIdx:it(e).refIdx,afterRefIdx:n.refIdx};break;case"property":{const e=n.refIdx,o=tt(n.name);t.locations.push({idx:n.idx,refIdx:e,setData:o,updateData:o});break}case"attribute":{const e=n.refIdx;let o,s;"class"===n.name?(s=y,o=w):(s=m(n.name),o=s),t.locations.push({idx:n.idx,refIdx:e,setData:s,updateData:o});break}case"attributes":t.locations.push({idx:n.idx,refIdx:n.refIdx,setData:g,updateData:b});break;case"handler":{const{setup:e,update:o}=A(n.event);t.locations.push({idx:n.idx,refIdx:n.refIdx,setData:e,updateData:o});break}case"ref":const o=t.cbRefs.push(n.idx)-1;t.locations.push({idx:n.idx,refIdx:n.refIdx,setData:ct(o,t.refList),updateData:Q})}}(e,t),n++}if(i){const s=n+r;e.collectors.push({idx:s,prevIdx:o,getVal:J}),lt(t.nextSibling,e,s)}r&&(e.collectors.push({idx:n,prevIdx:o,getVal:Z}),lt(t.firstChild,e,n))}return e}function at(t){Y.call(this,U(t))}function ct(t,e){return function(n){e[e.length-1][t]=()=>n(this)}}let ht,ut,dt,ft,pt,mt;if("undefined"!=typeof Node){const t=Node.prototype;ht=t.insertBefore,ut=t.appendChild,dt=t.removeChild,ft=((t,e)=>Object.getOwnPropertyDescriptor(t,e))(t,"textContent").set}class gt{constructor(t){this.children=t}mount(t,e){const n=this.children,o=document.createTextNode("");this.anchor=o,ht.call(t,o,e);const s=n.length;if(s){const e=n[0].mount;for(let r=0;r<s;r++)e.call(n[r],t,o)}this.parentEl=t}moveBeforeDOMNode(t,e=this.parentEl){this.parentEl=e;const n=this.children;for(let o=0,s=n.length;o<s;o++)n[o].moveBeforeDOMNode(t,e);e.insertBefore(this.anchor,t)}moveBeforeVNode(t,e){if(t){const n=t.children[0];e=(n?n.firstNode():t.anchor)||null}const n=this.children;for(let t=0,o=n.length;t<o;t++)n[t].moveBeforeVNode(null,e);this.parentEl.insertBefore(this.anchor,e)}patch(t,e){if(this===t)return;const n=this.children,o=t.children;if(0===o.length&&0===n.length)return;this.children=o;const s=o[0]||n[0],{mount:r,patch:i,remove:l,beforeRemove:a,moveBeforeVNode:c,firstNode:h}=s,u=this.anchor,d=this.isOnlyChild,f=this.parentEl;if(0===o.length&&d){if(e)for(let t=0,e=n.length;t<e;t++)a.call(n[t]);return ft.call(f,""),void ut.call(f,u)}let p,m=0,g=0,b=n[0],v=o[0],y=n.length-1,w=o.length-1,$=n[y],x=o[w];for(;m<=y&&g<=w;){if(null===b){b=n[++m];continue}if(null===$){$=n[--y];continue}let t=b.key,s=v.key;if(t===s){i.call(b,v,e),o[g]=b,b=n[++m],v=o[++g];continue}let l=$.key,a=x.key;if(l===a){i.call($,x,e),o[w]=$,$=n[--y],x=o[--w];continue}if(t===a){i.call(b,x,e),o[w]=b;const t=o[w+1];c.call(b,t,u),b=n[++m],x=o[--w];continue}if(l===s){i.call($,v,e),o[g]=$;const t=n[m];c.call($,t,u),$=n[--y],v=o[++g];continue}p=p||vt(n,m,y);let d=p[s];if(void 0===d)r.call(v,f,h.call(b)||null);else{const t=n[d];c.call(t,b,null),i.call(t,v,e),o[g]=t,n[d]=null}v=o[++g]}if(m<=y||g<=w)if(m>y){const t=o[w+1],e=t?h.call(t)||null:u;for(let t=g;t<=w;t++)r.call(o[t],f,e)}else for(let t=m;t<=y;t++){let o=n[t];o&&(e&&a.call(o),l.call(o))}}beforeRemove(){const t=this.children,e=t.length;if(e){const n=t[0].beforeRemove;for(let o=0;o<e;o++)n.call(t[o])}}remove(){const{parentEl:t,anchor:e}=this;if(this.isOnlyChild)ft.call(t,"");else{const n=this.children,o=n.length;if(o){const t=n[0].remove;for(let e=0;e<o;e++)t.call(n[e])}dt.call(t,e)}}firstNode(){const t=this.children[0];return t?t.firstNode():void 0}toString(){return this.children.map((t=>t.toString())).join("")}}function bt(t){return new gt(t)}function vt(t,e,n){let o={};for(let s=e;s<=n;s++)o[t[s].key]=s;return o}if("undefined"!=typeof Node){const t=Node.prototype;pt=t.insertBefore,mt=t.removeChild}class yt{constructor(t){this.content=[],this.html=t}mount(t,e){this.parentEl=t;const n=document.createElement("template");n.innerHTML=this.html,this.content=[...n.content.childNodes];for(let n of this.content)pt.call(t,n,e);if(!this.content.length){const n=document.createTextNode("");this.content.push(n),pt.call(t,n,e)}}moveBeforeDOMNode(t,e=this.parentEl){this.parentEl=e;for(let n of this.content)pt.call(e,n,t)}moveBeforeVNode(t,e){const n=t?t.content[0]:e;this.moveBeforeDOMNode(n)}patch(t){if(this===t)return;const e=t.html;if(this.html!==e){const n=this.parentEl,o=this.content[0],s=document.createElement("template");s.innerHTML=e;const r=[...s.content.childNodes];for(let t of r)pt.call(n,t,o);if(!r.length){const t=document.createTextNode("");r.push(t),pt.call(n,t,o)}this.remove(),this.content=r,this.html=t.html}}beforeRemove(){}remove(){const t=this.parentEl;for(let e of this.content)mt.call(t,e)}firstNode(){return this.content[0]}toString(){return this.html}}function wt(t){return new yt(t)}function $t(t,e,n=null){t.mount(e,n)}const xt=new WeakMap,Nt=new WeakMap;function kt(t,e){if(!t)return!1;const n=t.fiber;n&&xt.set(n,e);const o=Nt.get(t);if(o){let t=!1;for(let n=o.length-1;n>=0;n--)try{o[n](e),t=!0;break}catch(t){e=t}if(t)return!0}return kt(t.parent,e)}function Tt(t){let{error:e}=t;e instanceof r||(e=Object.assign(new r('An error occured in the owl lifecycle (see this Error\'s "cause" property)'),{cause:e}));const n="node"in t?t.node:t.fiber.node,o="fiber"in t?t.fiber:n.fiber;if(o){let t=o;do{t.node.fiber=t,xt.set(t,e),t=t.parent}while(t);xt.set(o.root,e)}if(!kt(n,e)){console.warn("[Owl] Unhandled error. Destroying the root component");try{n.app.destroy()}catch(t){console.error(t)}throw e}}function Et(){throw new r("Attempted to render cancelled fiber")}function At(t){let e=0;for(let n of t){let t=n.node;n.render=Et,0===t.status&&t.cancel(),t.fiber=null,n.bdom?t.forceNextRender=!0:e++,e+=At(n.children)}return e}class _t{constructor(t,e){if(this.bdom=null,this.children=[],this.appliedToDom=!1,this.deep=!1,this.childrenMap={},this.node=t,this.parent=e,e){this.deep=e.deep;const t=e.root;t.setCounter(t.counter+1),this.root=t,e.children.push(this)}else this.root=this}render(){let t=this.root.node,e=t.app.scheduler,n=t.parent;for(;n;){if(n.fiber){let o=n.fiber.root;if(0!==o.counter||!(t.parentKey in n.fiber.childrenMap))return void e.delayedRenders.push(this);n=o.node}t=n,n=n.parent}this._render()}_render(){const t=this.node,e=this.root;if(e){try{this.bdom=!0,this.bdom=t.renderFn()}catch(e){t.app.handleError({node:t,error:e})}e.setCounter(e.counter-1)}}}class Ct extends _t{constructor(){super(...arguments),this.counter=1,this.willPatch=[],this.patched=[],this.mounted=[],this.locked=!1}complete(){const t=this.node;let e;this.locked=!0;let n=this.mounted;try{for(e of this.willPatch){let t=e.node;if(t.fiber===e){const e=t.component;for(let n of t.willPatch)n.call(e)}}for(e=void 0,t._patch(),this.locked=!1;e=n.pop();)if(e.appliedToDom)for(let t of e.node.mounted)t();let o=this.patched;for(;e=o.pop();)if(e.appliedToDom)for(let t of e.node.patched)t()}catch(o){for(let t of n)t.node.willUnmount=[];this.locked=!1,t.app.handleError({fiber:e||this,error:o})}}setCounter(t){this.counter=t,0===t&&this.node.app.scheduler.flush()}}class Dt extends Ct{constructor(t,e,n={}){super(t,null),this.target=e,this.position=n.position||"last-child"}complete(){let t=this;try{const e=this.node;if(e.children=this.childrenMap,e.app.constructor.validateTarget(this.target),e.bdom)e.updateDom();else if(e.bdom=this.bdom,"last-child"===this.position||0===this.target.childNodes.length)$t(e.bdom,this.target);else{const t=this.target.childNodes[0];$t(e.bdom,this.target,t)}e.fiber=null,e.status=1,this.appliedToDom=!0;let n=this.mounted;for(;t=n.pop();)if(t.appliedToDom)for(let e of t.node.mounted)e()}catch(e){this.node.app.handleError({fiber:t,error:e})}}}const St=Symbol("Key changes"),Ot=()=>{throw new Error("Called NO_CALLBACK. Owl is broken, please report this to the maintainers.")},Rt=Object.prototype.toString,Lt=Object.prototype.hasOwnProperty,Bt=["Object","Array","Set","Map","WeakMap"],Pt=["Set","Map","WeakMap"];function jt(t){return Rt.call(Ft(t)).slice(8,-1)}function Mt(t){return"object"==typeof t&&Bt.includes(jt(t))}function It(t,e){return Mt(t)?Yt(t,e):t}const Wt=new WeakSet;function Vt(t){return Wt.add(t),t}function Ft(t){return Gt.has(t)?Gt.get(t):t}const Kt=new WeakMap;function zt(t,e,n){if(n===Ot)return;Kt.get(t)||Kt.set(t,new Map);const o=Kt.get(t);o.get(e)||o.set(e,new Set),o.get(e).add(n),Ut.has(n)||Ut.set(n,new Set),Ut.get(n).add(t)}function Ht(t,e){const n=Kt.get(t);if(!n)return;const o=n.get(e);if(o)for(const t of[...o])qt(t),t()}const Ut=new WeakMap;function qt(t){const e=Ut.get(t);if(e){for(const n of e){const e=Kt.get(n);if(e)for(const[n,o]of e.entries())o.delete(t),o.size||e.delete(n)}e.clear()}}const Gt=new WeakMap,Xt=new WeakMap;function Yt(t,e=Ot){if(!Mt(t))throw new r("Cannot make the given value reactive");if(Wt.has(t))return t;if(Gt.has(t))return Yt(Gt.get(t),e);Xt.has(t)||Xt.set(t,new WeakMap);const n=Xt.get(t);if(!n.has(e)){const o=jt(t),s=Pt.includes(o)?function(t,e,n){const o=oe[n](t,e);return Object.assign(Zt(e),{get:(t,n)=>Lt.call(o,n)?o[n]:(zt(t,n,e),It(t[n],e))})}(t,e,o):Zt(e),r=new Proxy(t,s);n.set(e,r),Gt.set(r,t)}return n.get(e)}function Zt(t){return{get(e,n,o){const s=Object.getOwnPropertyDescriptor(e,n);return!s||s.writable||s.configurable?(zt(e,n,t),It(Reflect.get(e,n,o),t)):Reflect.get(e,n,o)},set(t,e,n,o){const s=Lt.call(t,e),r=Reflect.get(t,e,o),i=Reflect.set(t,e,Ft(n),o);return!s&&Lt.call(t,e)&&Ht(t,St),(r!==Reflect.get(t,e,o)||"length"===e&&Array.isArray(t))&&Ht(t,e),i},deleteProperty(t,e){const n=Reflect.deleteProperty(t,e);return Ht(t,St),Ht(t,e),n},ownKeys:e=>(zt(e,St,t),Reflect.ownKeys(e)),has:(e,n)=>(zt(e,St,t),Reflect.has(e,n))}}function Jt(t,e,n){return o=>(o=Ft(o),zt(e,o,n),It(e[t](o),n))}function Qt(t,e,n){return function*(){zt(e,St,n);const o=e.keys();for(const s of e[t]()){const t=o.next().value;zt(e,t,n),yield It(s,n)}}}function te(t,e){return function(n,o){zt(t,St,e),t.forEach((function(s,r,i){zt(t,r,e),n.call(o,It(s,e),It(r,e),It(i,e))}),o)}}function ee(t,e,n){return(o,s)=>{o=Ft(o);const r=n.has(o),i=n[e](o),l=n[t](o,s);return r!==n.has(o)&&Ht(n,St),i!==n[e](o)&&Ht(n,o),l}}function ne(t){return()=>{const e=[...t.keys()];t.clear(),Ht(t,St);for(const n of e)Ht(t,n)}}const oe={Set:(t,e)=>({has:Jt("has",t,e),add:ee("add","has",t),delete:ee("delete","has",t),keys:Qt("keys",t,e),values:Qt("values",t,e),entries:Qt("entries",t,e),[Symbol.iterator]:Qt(Symbol.iterator,t,e),forEach:te(t,e),clear:ne(t),get size(){return zt(t,St,e),t.size}}),Map:(t,e)=>({has:Jt("has",t,e),get:Jt("get",t,e),set:ee("set","get",t),delete:ee("delete","has",t),keys:Qt("keys",t,e),values:Qt("values",t,e),entries:Qt("entries",t,e),[Symbol.iterator]:Qt(Symbol.iterator,t,e),forEach:te(t,e),clear:ne(t),get size(){return zt(t,St,e),t.size}}),WeakMap:(t,e)=>({has:Jt("has",t,e),get:Jt("get",t,e),set:ee("set","get",t),delete:ee("delete","has",t)})};let se=null;function re(){if(!se)throw new r("No active component (a hook function should only be called in 'setup')");return se}function ie(t,e){for(let n in e)void 0===t[n]&&(t[n]=e[n])}const le=new WeakMap;function ae(t){const e=re();let n=le.get(e);if(!n){const t={fn:$(e.render.bind(e,!1))};n=(...e)=>t.fn(...e),le.set(e,n),e.willDestroy.push(he.bind(null,t,n))}return Yt(t,n)}const ce=()=>{};function he(t,e){t.fn=ce,qt(e)}class ue{constructor(t,e,n,o,s){this.fiber=null,this.bdom=null,this.status=0,this.forceNextRender=!1,this.nextProps=null,this.children=Object.create(null),this.refs={},this.willStart=[],this.willUpdateProps=[],this.willUnmount=[],this.mounted=[],this.willPatch=[],this.patched=[],this.willDestroy=[],se=this,this.app=n,this.parent=o,this.props=e,this.parentKey=s;const r=t.defaultProps;e=Object.assign({},e),r&&ie(e,r);const i=o&&o.childEnv||n.env;this.childEnv=i;for(const t in e){const n=e[t];n&&"object"==typeof n&&Gt.has(n)&&(e[t]=ae(n))}this.component=new t(e,i,this);const l=Object.assign(Object.create(this.component),{this:this.component});this.renderFn=n.getTemplate(t.template).bind(this.component,l,this),this.component.setup(),se=null}mountComponent(t,e){const n=new Dt(this,t,e);this.app.scheduler.addFiber(n),this.initiateRender(n)}async initiateRender(t){this.fiber=t,this.mounted.length&&t.root.mounted.push(t);const e=this.component;try{await Promise.all(this.willStart.map((t=>t.call(e))))}catch(t){return void this.app.handleError({node:this,error:t})}0===this.status&&this.fiber===t&&t.render()}async render(t){if(this.status>=2)return;let e=this.fiber;if(e&&(e.root.locked||!0===e.bdom)&&(await Promise.resolve(),e=this.fiber),e){if(!e.bdom&&!xt.has(e))return void(t&&(e.deep=t));t=t||e.deep}else if(!this.bdom)return;const n=function(t){let e=t.fiber;if(e){let t=e.root;return t.locked=!0,t.setCounter(t.counter+1-At(e.children)),t.locked=!1,e.children=[],e.childrenMap={},e.bdom=null,xt.has(e)&&(xt.delete(e),xt.delete(t),e.appliedToDom=!1,e instanceof Ct&&(e.mounted=e instanceof Dt?[e]:[])),e}const n=new Ct(t,null);return t.willPatch.length&&n.willPatch.push(n),t.patched.length&&n.patched.push(n),n}(this);n.deep=t,this.fiber=n,this.app.scheduler.addFiber(n),await Promise.resolve(),this.status>=2||this.fiber!==n||!e&&n.parent||n.render()}cancel(){this._cancel(),delete this.parent.children[this.parentKey],this.app.scheduler.scheduleDestroy(this)}_cancel(){this.status=2;const t=this.children;for(let e in t)t[e]._cancel()}destroy(){let t=1===this.status;this._destroy(),t&&this.bdom.remove()}_destroy(){const t=this.component;if(1===this.status)for(let e of this.willUnmount)e.call(t);for(let t of Object.values(this.children))t._destroy();if(this.willDestroy.length)try{for(let e of this.willDestroy)e.call(t)}catch(t){this.app.handleError({error:t,node:this})}this.status=3}async updateAndRender(t,e){this.nextProps=t,t=Object.assign({},t);const n=function(t,e){let n=t.fiber;return n&&(At(n.children),n.root=null),new _t(t,e)}(this,e);this.fiber=n;const o=this.component,s=o.constructor.defaultProps;s&&ie(t,s),se=this;for(const e in t){const n=t[e];n&&"object"==typeof n&&Gt.has(n)&&(t[e]=ae(n))}se=null;const r=Promise.all(this.willUpdateProps.map((e=>e.call(o,t))));if(await r,n!==this.fiber)return;o.props=t,n.render();const i=e.root;this.willPatch.length&&i.willPatch.push(n),this.patched.length&&i.patched.push(n)}updateDom(){if(this.fiber)if(this.bdom===this.fiber.bdom)for(let t in this.children){this.children[t].updateDom()}else this.bdom.patch(this.fiber.bdom,!1),this.fiber.appliedToDom=!0,this.fiber=null}setRef(t,e){e&&(this.refs[t]=e)}firstNode(){const t=this.bdom;return t?t.firstNode():void 0}mount(t,e){const n=this.fiber.bdom;this.bdom=n,n.mount(t,e),this.status=1,this.fiber.appliedToDom=!0,this.children=this.fiber.childrenMap,this.fiber=null}moveBeforeDOMNode(t,e){this.bdom.moveBeforeDOMNode(t,e)}moveBeforeVNode(t,e){this.bdom.moveBeforeVNode(t?t.bdom:null,e)}patch(){this.fiber&&this.fiber.parent&&(this._patch(),this.props=this.nextProps)}_patch(){let t=!1;for(let e in this.children){t=!0;break}const e=this.fiber;this.children=e.childrenMap,this.bdom.patch(e.bdom,t),e.appliedToDom=!0,this.fiber=null}beforeRemove(){this._destroy()}remove(){this.bdom.remove()}get name(){return this.component.constructor.name}get subscriptions(){const t=le.get(this);return t?(e=t,[...Ut.get(e)||[]].map((t=>{const n=Kt.get(t);let o=[];if(n)for(const[t,s]of n)s.has(e)&&o.push(t);return{target:t,keys:o}}))):[];var e}}const de=Symbol("timeout"),fe={onWillStart:3e3,onWillUpdateProps:3e3};function pe(t,e){const n=new r,o=new r,s=re();return(...r)=>{const i=t=>{throw n.cause=t,n.message=t instanceof Error?`The following error occurred in ${e}: "${t.message}"`:`Something that is not an Error was thrown in ${e} (see this Error's "cause" property)`,n};let l;try{l=t(...r)}catch(t){i(t)}if(!(l instanceof Promise))return l;const a=fe[e];if(a){const t=s.fiber;Promise.race([l.catch((()=>{})),new Promise((t=>setTimeout((()=>t(de)),a)))]).then((n=>{n===de&&s.fiber===t&&s.status<=2&&(o.message=`${e}'s promise hasn't resolved after ${a/1e3} seconds`,console.log(o))}))}return l.catch(i)}}function me(t){const e=re(),n=e.app.dev?pe:t=>t;e.mounted.push(n(t.bind(e.component),"onMounted"))}function ge(t){const e=re(),n=e.app.dev?pe:t=>t;e.patched.push(n(t.bind(e.component),"onPatched"))}function be(t){const e=re(),n=e.app.dev?pe:t=>t;e.willUnmount.unshift(n(t.bind(e.component),"onWillUnmount"))}class ve{constructor(t,e,n){this.props=t,this.env=e,this.__owl__=n}setup(){}render(t=!1){this.__owl__.render(!0===t)}}ve.template="";const ye=z("").constructor;class we extends ye{constructor(t,e){super(""),this.target=null,this.selector=t,this.content=e}mount(t,e){super.mount(t,e),this.target=document.querySelector(this.selector),this.target?this.content.mount(this.target,null):this.content.mount(t,e)}beforeRemove(){this.content.beforeRemove()}remove(){this.content&&(super.remove(),this.content.remove(),this.content=null)}patch(t){super.patch(t),this.content?this.content.patch(t.content,!0):(this.content=t.content,this.content.mount(this.target,null))}}class $e extends ve{setup(){const t=this.__owl__;me((()=>{const e=t.bdom;if(!e.target){const t=document.querySelector(this.props.target);if(!t)throw new r("invalid portal target");e.content.moveBeforeDOMNode(t.firstChild,t)}})),be((()=>{t.bdom.remove()}))}}$e.template="__portal__",$e.props={target:{type:String},slots:!0};const xe=t=>Array.isArray(t),Ne=t=>"object"!=typeof t,ke=t=>"object"==typeof t&&t&&"value"in t;function Te(t){return"object"==typeof t&&"optional"in t&&t.optional||!1}function Ee(t){return"*"===t||!0===t?"value":t.name.toLowerCase()}function Ae(t){return Ne(t)?Ee(t):xe(t)?t.map(Ae).join(" or "):ke(t)?String(t.value):"element"in t?`list of ${Ae({type:t.element,optional:!1})}s`:"shape"in t?"object":Ae(t.type||"*")}function _e(t,e){var n;Array.isArray(e)&&(n=e,e=Object.fromEntries(n.map((t=>t.endsWith("?")?[t.slice(0,-1),{optional:!0}]:[t,{type:"*",optional:!1}])))),t=Ft(t);let o=[];for(let n in t)if(n in e){let s=Ce(n,t[n],e[n]);s&&o.push(s)}else"*"in e||o.push(`unknown key '${n}'`);for(let n in e){const s=e[n];if("*"!==n&&!Te(s)&&!(n in t)){const t="object"==typeof s&&!Array.isArray(s);let e="*"===s||(t&&"type"in s?"*"===s.type:t)?"":` (should be a ${Ae(s)})`;o.push(`'${n}' is missing${e}`)}}return o}function Ce(t,e,n){if(void 0===e)return Te(n)?null:`'${t}' is undefined (should be a ${Ae(n)})`;if(Ne(n))return function(t,e,n){if("function"==typeof n)if("object"==typeof e){if(!(e instanceof n))return`'${t}' is not a ${Ee(n)}`}else if(typeof e!==n.name.toLowerCase())return`'${t}' is not a ${Ee(n)}`;return null}(t,e,n);if(ke(n))return e===n.value?null:`'${t}' is not equal to '${n.value}'`;if(xe(n)){let o=n.find((n=>!Ce(t,e,n)));return o?null:`'${t}' is not a ${Ae(n)}`}let o=null;if("element"in n)o=function(t,e,n){if(!Array.isArray(e))return`'${t}' is not a list of ${Ae(n)}s`;for(let o=0;o<e.length;o++){const s=Ce(`${t}[${o}]`,e[o],n);if(s)return s}return null}(t,e,n.element);else if("shape"in n)if("object"!=typeof e||Array.isArray(e))o=`'${t}' is not an object`;else{const s=_e(e,n.shape);s.length&&(o=`'${t}' doesn't have the correct shape (${s.join(", ")})`)}else if("values"in n)if("object"!=typeof e||Array.isArray(e))o=`'${t}' is not an object`;else{const s=Object.entries(e).map((([t,e])=>Ce(t,e,n.values))).filter(Boolean);s.length&&(o=`some of the values in '${t}' are invalid (${s.join(", ")})`)}return"type"in n&&!o&&(o=Ce(t,e,n.type)),"validate"in n&&!o&&(o=n.validate(e)?null:`'${t}' is not valid`),o}const De=Object.create;function Se(t){const e=De(t);for(let n in t)e[n]=t[n];return e}const Oe=Symbol("isBoundary");class Re{constructor(t,e,n,o,s){this.fn=t,this.ctx=Se(e),this.component=n,this.node=o,this.key=s}evaluate(){return this.fn.call(this.component,this.ctx,this.node,this.key)}toString(){return this.evaluate().toString()}}function Le(t,e,n){const o="string"!=typeof t?t:n.constructor.components[t];if(!o)return;const s=o.props;if(!s)return void(n.__owl__.app.warnIfNoStaticProps&&console.warn(`Component '${o.name}' does not have a static props description`));const i=o.defaultProps;if(i){let t=t=>Array.isArray(s)?s.includes(t):t in s&&!("*"in s)&&!Te(s[t]);for(let e in i)if(t(e))throw new r(`A default value cannot be defined for a mandatory prop (name: '${e}', component: ${o.name})`)}const l=_e(e,s);if(l.length)throw new r(`Invalid props for component '${o.name}': `+l.join(", "))}const Be={withDefault:function(t,e){return null==t||!1===t?e:t},zero:Symbol("zero"),isBoundary:Oe,callSlot:function(t,e,n,o,r,i,l){n=n+"__slot_"+o;const a=t.props.slots||{},{__render:c,__ctx:h,__scope:u}=a[o]||{},d=De(h||{});u&&(d[u]=i);const f=c?c(d,e,n):null;if(l){let i,a;return f?i=r?s(o,f):f:a=l(t,e,n),j([i,a])}return f||z("")},capture:Se,withKey:function(t,e){return t.key=e,t},prepareList:function(t){let e,n;if(Array.isArray(t))e=t,n=t;else if(t instanceof Map)e=[...t.keys()],n=[...t.values()];else if(Symbol.iterator in Object(t))e=[...t],n=e;else{if(!t||"object"!=typeof t)throw new r(`Invalid loop expression: "${t}" is not iterable`);n=Object.values(t),e=Object.keys(t)}const o=n.length;return[e,n,o,new Array(o)]},setContextValue:function(t,e,n){const o=t;for(;!t.hasOwnProperty(e)&&!t.hasOwnProperty(Oe);){const e=t.__proto__;if(!e){t=o;break}t=e}t[e]=n},shallowEqual:function(t,e){for(let n=0,o=t.length;n<o;n++)if(t[n]!==e[n])return!1;return!0},toNumber:function(t){const e=parseFloat(t);return isNaN(e)?t:e},validateProps:Le,LazyValue:Re,safeOutput:function(t,e){if(null==t)return e?s("default",e):s("undefined",z(""));let n,o;switch(typeof t){case"object":t instanceof k?(n="string_safe",o=wt(t)):t instanceof Re?(n="lazy_value",o=t.evaluate()):t instanceof String?(n="string_unsafe",o=z(t)):(n="block_safe",o=t);break;case"string":n="string_unsafe",o=z(t);break;default:n="string_unsafe",o=z(String(t))}return s(n,o)},createCatcher:function(t){const e=Object.keys(t).length;class n{constructor(t,e){this.handlerFns=[],this.afterNode=null,this.child=t,this.handlerData=e}mount(e,n){this.parentEl=e,this.child.mount(e,n),this.afterNode=document.createTextNode(""),e.insertBefore(this.afterNode,n),this.wrapHandlerData();for(let n in t){const o=t[n],s=A(n);this.handlerFns[o]=s,s.setup.call(e,this.handlerData[o])}}wrapHandlerData(){for(let t=0;t<e;t++){let e=this.handlerData[t],n=e.length-2,o=e[n];const s=this;e[n]=function(t){const e=t.target;let n=s.child.firstNode();const r=s.afterNode;for(;n&&n!==r;){if(n.contains(e))return o.call(this,t);n=n.nextSibling}}}}moveBeforeDOMNode(t,e=this.parentEl){this.parentEl=e,this.child.moveBeforeDOMNode(t,e),e.insertBefore(this.afterNode,t)}moveBeforeVNode(t,e){t&&(e=t.firstNode()||e),this.child.moveBeforeVNode(t?t.child:null,e),this.parentEl.insertBefore(this.afterNode,e)}patch(t,n){if(this!==t){this.handlerData=t.handlerData,this.wrapHandlerData();for(let t=0;t<e;t++)this.handlerFns[t].update.call(this.parentEl,this.handlerData[t]);this.child.patch(t.child,n)}}beforeRemove(){this.child.beforeRemove()}remove(){for(let t=0;t<e;t++)this.handlerFns[t].remove.call(this.parentEl);this.child.remove(),this.afterNode.remove()}firstNode(){return this.child.firstNode()}toString(){return this.child.toString()}}return function(t,e){return new n(t,e)}},markRaw:Vt,OwlError:r,makeRefWrapper:function(t){let e=new Set;return(n,o)=>{if(e.has(n))throw new r(`Cannot set the same ref more than once in the same component, ref "${n}" was set multiple times in ${t.name}`);return e.add(n),o}}};function Pe(t){const e=(new DOMParser).parseFromString(t,"text/xml");if(e.getElementsByTagName("parsererror").length){let n="Invalid XML in template.";const o=e.getElementsByTagName("parsererror")[0].textContent;if(o){n+="\nThe parser has produced the following error message:\n"+o;const e=/\d+/g,s=e.exec(o);if(s){const r=Number(s[0]),i=t.split("\n")[r-1],l=e.exec(o);if(i&&l){const t=Number(l[0])-1;i[t]&&(n+=`\nThe error might be located at xml line ${r} column ${t}\n${i}\n${"-".repeat(t-1)}^`)}}}throw new r(n)}return e}const je={text:z,createBlock:nt,list:bt,multi:j,html:wt,toggler:s,comment:H};class Me{constructor(t={}){if(this.rawTemplates=Object.create(Ie),this.templates={},this.Portal=$e,this.dev=t.dev||!1,this.translateFn=t.translateFn,this.translatableAttributes=t.translatableAttributes,t.templates)if(t.templates instanceof Document||"string"==typeof t.templates)this.addTemplates(t.templates);else for(const e in t.templates)this.addTemplate(e,t.templates[e]);this.getRawTemplate=t.getTemplate,this.customDirectives=t.customDirectives||{},this.runtimeUtils={...Be,__globals__:t.globalValues||{}},this.hasGlobalValues=Boolean(t.globalValues&&Object.keys(t.globalValues).length)}static registerTemplate(t,e){Ie[t]=e}addTemplate(t,e){if(t in this.rawTemplates){if(!this.dev)return;const n=this.rawTemplates[t];if(("string"==typeof n?n:n instanceof Element?n.outerHTML:n.toString())===("string"==typeof e?e:e.outerHTML))return;throw new r(`Template ${t} already defined with different content`)}this.rawTemplates[t]=e}addTemplates(t){if(t){t=t instanceof Document?t:Pe(t);for(const e of t.querySelectorAll("[t-name]")){const t=e.getAttribute("t-name");this.addTemplate(t,e)}}}getTemplate(t){var e;if(!(t in this.templates)){const n=(null===(e=this.getRawTemplate)||void 0===e?void 0:e.call(this,t))||this.rawTemplates[t];if(void 0===n){let e="";try{e=` (for component "${re().component.constructor.name}")`}catch{}throw new r(`Missing template: "${t}"${e}`)}const o="function"==typeof n&&!(n instanceof Element)?n:this._compileTemplate(t,n),s=this.templates;this.templates[t]=function(e,n){return s[t].call(this,e,n)};const i=o(this,je,this.runtimeUtils);this.templates[t]=i}return this.templates[t]}_compileTemplate(t,e){throw new r("Unable to compile a template. Please use owl full build instead")}callTemplate(t,e,n,o,r){return s(e,this.getTemplate(e).call(t,n,o,r+e))}}const Ie={};function We(...t){const e="__template__"+We.nextId++,n=String.raw(...t);return Ie[e]=n,e}We.nextId=1,Me.registerTemplate("__portal__",(function(t,e,n){let{callSlot:o}=n;return function(t,e,n=""){return new we(t.props.target,o(t,e,n,"default",!1,null))}}));const Ve="true,false,NaN,null,undefined,debugger,console,window,in,instanceof,new,function,return,eval,void,Math,RegExp,Array,Object,Date,__globals__".split(","),Fe=Object.assign(Object.create(null),{and:"&&",or:"||",gt:">",gte:">=",lt:"<",lte:"<="}),Ke=Object.assign(Object.create(null),{"{":"LEFT_BRACE","}":"RIGHT_BRACE","[":"LEFT_BRACKET","]":"RIGHT_BRACKET",":":"COLON",",":"COMMA","(":"LEFT_PAREN",")":"RIGHT_PAREN"}),ze="...,.,===,==,+,!==,!=,!,||,&&,>=,>,<=,<,?,-,*,/,%,typeof ,=>,=,;,in ,new ,|,&,^,~".split(",");const He=[function(t){let e=t[0],n=e;if("'"!==e&&'"'!==e&&"`"!==e)return!1;let o,s=1;for(;t[s]&&t[s]!==n;){if(o=t[s],e+=o,"\\"===o){if(s++,o=t[s],!o)throw new r("Invalid expression");e+=o}s++}if(t[s]!==n)throw new r("Invalid expression");return e+=n,"`"===n?{type:"TEMPLATE_STRING",value:e,replace:t=>e.replace(/\$\{(.*?)\}/g,((e,n)=>"${"+t(n)+"}"))}:{type:"VALUE",value:e}},function(t){let e=t[0];if(e&&e.match(/[0-9]/)){let n=1;for(;t[n]&&t[n].match(/[0-9]|\./);)e+=t[n],n++;return{type:"VALUE",value:e}}return!1},function(t){for(let e of ze)if(t.startsWith(e))return{type:"OPERATOR",value:e};return!1},function(t){let e=t[0];if(e&&e.match(/[a-zA-Z_\$]/)){let n=1;for(;t[n]&&t[n].match(/\w/);)e+=t[n],n++;return e in Fe?{type:"OPERATOR",value:Fe[e],size:e.length}:{type:"SYMBOL",value:e}}return!1},function(t){const e=t[0];return!(!e||!(e in Ke))&&{type:Ke[e],value:e}}];const Ue=t=>t&&("LEFT_BRACE"===t.type||"COMMA"===t.type),qe=t=>t&&("RIGHT_BRACE"===t.type||"COMMA"===t.type);function Ge(t){const e=new Set,n=function(t){const e=[];let n,o=!0,s=t;try{for(;o;)if(s=s.trim(),s){for(let t of He)if(o=t(s),o){e.push(o),s=s.slice(o.size||o.value.length);break}}else o=!1}catch(t){n=t}if(s.length||n)throw new r(`Tokenizer error: could not tokenize \`${t}\``);return e}(t);let o=0,s=[];for(;o<n.length;){let t=n[o],r=n[o-1],i=n[o+1],l=s[s.length-1];switch(t.type){case"LEFT_BRACE":case"LEFT_BRACKET":case"LEFT_PAREN":s.push(t.type);break;case"RIGHT_BRACE":case"RIGHT_BRACKET":case"RIGHT_PAREN":s.pop()}let a="SYMBOL"===t.type&&!Ve.includes(t.value);if("SYMBOL"!==t.type||Ve.includes(t.value)||r&&("LEFT_BRACE"===l&&Ue(r)&&qe(i)&&(n.splice(o+1,0,{type:"COLON",value:":"},{...t}),i=n[o+1]),"OPERATOR"===r.type&&"."===r.value?a=!1:"LEFT_BRACE"!==r.type&&"COMMA"!==r.type||i&&"COLON"===i.type&&(a=!1)),"TEMPLATE_STRING"===t.type&&(t.value=t.replace((t=>Ye(t)))),i&&"OPERATOR"===i.type&&"=>"===i.value)if("RIGHT_PAREN"===t.type){let t=o-1;for(;t>0&&"LEFT_PAREN"!==n[t].type;)"SYMBOL"===n[t].type&&n[t].originalValue&&(n[t].value=n[t].originalValue,e.add(n[t].value)),t--}else e.add(t.value);a&&(t.varName=t.value,e.has(t.value)||(t.originalValue=t.value,t.value=`ctx['${t.value}']`)),o++}for(const t of n)"SYMBOL"===t.type&&t.varName&&e.has(t.value)&&(t.originalValue=t.value,t.value=`_${t.value}`,t.isLocal=!0);return n}const Xe=new Map([["in "," in "]]);function Ye(t){return Ge(t).map((t=>Xe.get(t.value)||t.value)).join("")}const Ze=/\{\{.*?\}\}|\#\{.*?\}/g;function Je(t,e){let n=t.match(Ze);if(n&&n[0].length===t.length)return`(${e(t.slice(2,"{"===n[0][0]?-2:-1))})`;let o=t.replace(Ze,(t=>"${"+e(t.slice(2,"{"===t[0]?-2:-1))+"}"));return"`"+o+"`"}function Qe(t){return Je(t,Ye)}const tn=/\s+/g;let en;"undefined"!=typeof document&&(en=document.implementation.createDocument(null,null,null));const nn=new Set(["stop","capture","prevent","self","synthetic"]);let on={};function sn(t=""){return on[t]=(on[t]||0)+1,t+on[t]}function rn(t,e){switch(t){case"input":return"checked"===e||"indeterminate"===e||"value"===e||"readonly"===e||"readOnly"===e||"disabled"===e;case"option":return"selected"===e||"disabled"===e;case"textarea":return"value"===e||"readonly"===e||"readOnly"===e||"disabled"===e;case"select":return"value"===e||"disabled"===e;case"button":case"optgroup":return"disabled"===e}return!1}function ln(t){return`\`${t.replace(/\\/g,"\\\\").replace(/`/g,"\\`").replace(/\$\{/,"\\${")}\``}class an{constructor(t,e){this.dynamicTagName=null,this.isRoot=!1,this.hasDynamicChildren=!1,this.children=[],this.data=[],this.childNumber=0,this.parentVar="",this.id=an.nextBlockId++,this.varName="b"+this.id,this.blockName="block"+this.id,this.target=t,this.type=e}insertData(t,e="d"){const n=sn(e);return this.target.addLine(`let ${n} = ${t};`),this.data.push(n)-1}insert(t){this.currentDom?this.currentDom.appendChild(t):this.dom=t}generateExpr(t){if("block"===this.type){const t=this.children.length;let e=this.data.length?`[${this.data.join(", ")}]`:t?"[]":"";return t&&(e+=", ["+this.children.map((t=>t.varName)).join(", ")+"]"),this.dynamicTagName?`toggler(${this.dynamicTagName}, ${this.blockName}(${this.dynamicTagName})(${e}))`:`${this.blockName}(${e})`}return"list"===this.type?`list(c_block${this.id})`:t}asXmlString(){const t=en.createElement("t");return t.appendChild(this.dom),t.innerHTML}}function cn(t,e){return Object.assign({block:null,index:0,forceNewBlock:!0,translate:t.translate,translationCtx:t.translationCtx,tKeyExpr:null,nameSpace:t.nameSpace,tModelSelectedExpr:t.tModelSelectedExpr},e)}an.nextBlockId=1;class hn{constructor(t,e){this.indentLevel=0,this.loopLevel=0,this.code=[],this.hasRoot=!1,this.hasCache=!1,this.shouldProtectScope=!1,this.hasRefWrapper=!1,this.name=t,this.on=e||null}addLine(t,e){const n=new Array(this.indentLevel+2).join(" ");void 0===e?this.code.push(n+t):this.code.splice(e,0,n+t)}generateCode(){let t=[];t.push(`function ${this.name}(ctx, node, key = "") {`),this.shouldProtectScope&&(t.push(" ctx = Object.create(ctx);"),t.push(" ctx[isBoundary] = 1")),this.hasRefWrapper&&t.push(" let refWrapper = makeRefWrapper(this.__owl__);"),this.hasCache&&(t.push(" let cache = ctx.cache || {};"),t.push(" let nextCache = ctx.cache = {};"));for(let e of this.code)t.push(e);return this.hasRoot||t.push("return text('');"),t.push("}"),t.join("\n ")}currentKey(t){let e=this.loopLevel?`key${this.loopLevel}`:"key";return t.tKeyExpr&&(e=`${t.tKeyExpr} + ${e}`),e}}const un=["alt","aria-label","aria-placeholder","aria-roledescription","aria-valuetext","label","placeholder","title"],dn=/^(\s*)([\s\S]+?)(\s*)$/;class fn{constructor(t,e){if(this.blocks=[],this.nextBlockId=1,this.isDebug=!1,this.targets=[],this.target=new hn("template"),this.translatableAttributes=un,this.staticDefs=[],this.slotNames=new Set,this.helpers=new Set,this.translateFn=e.translateFn||(t=>t),e.translatableAttributes){const t=new Set(un);for(let n of e.translatableAttributes)n.startsWith("-")?t.delete(n.slice(1)):t.add(n);this.translatableAttributes=[...t]}this.hasSafeContext=e.hasSafeContext||!1,this.dev=e.dev||!1,this.ast=t,this.templateName=e.name,e.hasGlobalValues&&this.helpers.add("__globals__")}generateCode(){const t=this.ast;this.isDebug=12===t.type,an.nextBlockId=1,on={},this.compileAST(t,{block:null,index:0,forceNewBlock:!1,isLast:!0,translate:!0,translationCtx:"",tKeyExpr:null});let e=[" let { text, createBlock, list, multi, html, toggler, comment } = bdom;"];this.helpers.size&&e.push(`let { ${[...this.helpers].join(", ")} } = helpers;`),this.templateName&&e.push(`// Template name: "${this.templateName}"`);for(let{id:t,expr:n}of this.staticDefs)e.push(`const ${t} = ${n};`);if(this.blocks.length){e.push("");for(let t of this.blocks)if(t.dom){let n=ln(t.asXmlString());t.dynamicTagName?(n=n.replace(/^`<\w+/,`\`<\${tag || '${t.dom.nodeName}'}`),n=n.replace(/\w+>`$/,`\${tag || '${t.dom.nodeName}'}>\``),e.push(`let ${t.blockName} = tag => createBlock(${n});`)):e.push(`let ${t.blockName} = createBlock(${n});`)}}if(this.targets.length)for(let t of this.targets)e.push(""),e=e.concat(t.generateCode());e.push(""),e=e.concat("return "+this.target.generateCode());const n=e.join("\n ");if(this.isDebug){const t=`[Owl Debug]\n${n}`;console.log(t)}return n}compileInNewTarget(t,e,n,o){const s=sn(t),r=this.target,i=new hn(s,o);return this.targets.push(i),this.target=i,this.compileAST(e,cn(n)),this.target=r,s}addLine(t,e){this.target.addLine(t,e)}define(t,e){this.addLine(`const ${t} = ${e};`)}insertAnchor(t,e=t.children.length){const n=`block-child-${e}`,o=en.createElement(n);t.insert(o)}createBlock(t,e,n){const o=this.target.hasRoot,s=new an(this.target,e);return o||(this.target.hasRoot=!0,s.isRoot=!0),t&&(t.children.push(s),"list"===t.type&&(s.parentVar=`c_block${t.id}`)),s}insertBlock(t,e,n){let o=e.generateExpr(t);if(e.parentVar){let t=this.target.currentKey(n);return this.helpers.add("withKey"),void this.addLine(`${e.parentVar}[${n.index}] = withKey(${o}, ${t});`)}n.tKeyExpr&&(o=`toggler(${n.tKeyExpr}, ${o})`),e.isRoot?(this.target.on&&(o=this.wrapWithEventCatcher(o,this.target.on)),this.addLine(`return ${o};`)):this.define(e.varName,o)}captureExpression(t,e=!1){if(!e&&!t.includes("=>"))return Ye(t);const n=Ge(t),o=new Map;return n.map((t=>{if(t.varName&&!t.isLocal){if(!o.has(t.varName)){const e=sn("v");o.set(t.varName,e),this.define(e,t.value)}t.value=o.get(t.varName)}return t.value})).join("")}translate(t,e){const n=dn.exec(t);return n[1]+this.translateFn(n[2],e)+n[3]}compileAST(t,e){switch(t.type){case 1:return this.compileComment(t,e);case 0:return this.compileText(t,e);case 2:return this.compileTDomNode(t,e);case 4:return this.compileTEsc(t,e);case 8:return this.compileTOut(t,e);case 5:return this.compileTIf(t,e);case 9:return this.compileTForeach(t,e);case 10:return this.compileTKey(t,e);case 3:return this.compileMulti(t,e);case 7:return this.compileTCall(t,e);case 15:return this.compileTCallBlock(t,e);case 6:return this.compileTSet(t,e);case 11:return this.compileComponent(t,e);case 12:return this.compileDebug(t,e);case 13:return this.compileLog(t,e);case 14:return this.compileTSlot(t,e);case 16:return this.compileTTranslation(t,e);case 17:return this.compileTTranslationContext(t,e);case 18:return this.compileTPortal(t,e)}}compileDebug(t,e){return this.addLine("debugger;"),t.content?this.compileAST(t.content,e):null}compileLog(t,e){return this.addLine(`console.log(${Ye(t.expr)});`),t.content?this.compileAST(t.content,e):null}compileComment(t,e){let{block:n,forceNewBlock:o}=e;if(!n||o)n=this.createBlock(n,"comment",e),this.insertBlock(`comment(${ln(t.value)})`,n,{...e,forceNewBlock:o&&!n});else{const e=en.createComment(t.value);n.insert(e)}return n.varName}compileText(t,e){let{block:n,forceNewBlock:o}=e,s=t.value;if(s&&!1!==e.translate&&(s=this.translate(s,e.translationCtx)),e.inPreTag||(s=s.replace(tn," ")),!n||o)n=this.createBlock(n,"text",e),this.insertBlock(`text(${ln(s)})`,n,{...e,forceNewBlock:o&&!n});else{const e=0===t.type?en.createTextNode:en.createComment;n.insert(e.call(en,s))}return n.varName}generateHandlerCode(t,e){const n=t.split(".").slice(1).map((t=>{if(!nn.has(t))throw new r(`Unknown event modifier: '${t}'`);return`"${t}"`}));let o="";return n.length&&(o=`${n.join(",")}, `),`[${o}${this.captureExpression(e)}, ctx]`}compileTDomNode(t,e){var n;let{block:o,forceNewBlock:s}=e;const r=!o||s||null!==t.dynamicTag||t.ns;let i=this.target.code.length;if(r&&((t.dynamicTag||e.tKeyExpr||t.ns)&&e.block&&this.insertAnchor(e.block),o=this.createBlock(o,"block",e),this.blocks.push(o),t.dynamicTag)){const e=sn("tag");this.define(e,Ye(t.dynamicTag)),o.dynamicTagName=e}const l={};for(let s in t.attrs){let r,i;if(s.startsWith("t-attf")){r=Qe(t.attrs[s]);const e=o.insertData(r,"attr");i=s.slice(7),l["block-attribute-"+e]=i}else if(s.startsWith("t-att"))if(i="t-att"===s?null:s.slice(6),r=Ye(t.attrs[s]),i&&rn(t.tag,i)){"readonly"===i&&(i="readOnly"),r="value"===i?`new String((${r}) === 0 ? 0 : ((${r}) || ""))`:`new Boolean(${r})`;l[`block-property-${o.insertData(r,"prop")}`]=i}else{const t=o.insertData(r,"attr");"t-att"===s?l["block-attributes"]=String(t):l[`block-attribute-${t}`]=i}else if(this.translatableAttributes.includes(s)){const o=(null===(n=t.attrsTranslationCtx)||void 0===n?void 0:n[s])||e.translationCtx;l[s]=this.translateFn(t.attrs[s],o)}else r=`"${t.attrs[s]}"`,i=s,l[s]=t.attrs[s];if("value"===i&&e.tModelSelectedExpr){l[`block-attribute-${o.insertData(`${e.tModelSelectedExpr} === ${r}`,"attr")}`]="selected"}}let a;if(t.model){const{hasDynamicChildren:e,baseExpr:n,expr:s,eventType:r,shouldNumberize:i,shouldTrim:c,targetAttr:h,specialInitTargetAttr:u}=t.model,d=Ye(n),f=sn("bExpr");this.define(f,d);const p=Ye(s),m=sn("expr");this.define(m,p);const g=`${f}[${m}]`;let b;if(u){let e=h in l&&`'${l[h]}'`;if(!e&&t.attrs){const n=t.attrs[`t-att-${h}`];n&&(e=Ye(n))}b=o.insertData(`${g} === ${e}`,"prop"),l[`block-property-${b}`]=u}else if(e){a=`${sn("bValue")}`,this.define(a,g)}else b=o.insertData(`${g}`,"prop"),l[`block-property-${b}`]=h;this.helpers.add("toNumber");let v=`ev.target.${h}`;v=c?`${v}.trim()`:v,v=i?`toNumber(${v})`:v;const y=`[(ev) => { ${g} = ${v}; }]`;b=o.insertData(y,"hdlr"),l[`block-handler-${b}`]=r}for(let e in t.on){const n=this.generateHandlerCode(e,t.on[e]);l[`block-handler-${o.insertData(n,"hdlr")}`]=e}if(t.ref){this.dev&&(this.helpers.add("makeRefWrapper"),this.target.hasRefWrapper=!0);const e=Ze.test(t.ref);let n=`\`${t.ref}\``;e&&(n=Je(t.ref,(t=>this.captureExpression(t,!0))));let s=`(el) => this.__owl__.setRef((${n}), el)`;this.dev&&(s=`refWrapper(${n}, ${s})`);const r=o.insertData(s,"ref");l["block-ref"]=String(r)}const c=t.ns||e.nameSpace,h=c?en.createElementNS(c,t.tag):en.createElement(t.tag);for(const[t,e]of Object.entries(l))"class"===t&&""===e||h.setAttribute(t,e);if(o.insert(h),t.content.length){const n=o.currentDom;o.currentDom=h;const s=t.content;for(let n=0;n<s.length;n++){const r=t.content[n],i=cn(e,{block:o,index:o.childNumber,forceNewBlock:!1,isLast:e.isLast&&n===s.length-1,tKeyExpr:e.tKeyExpr,nameSpace:c,tModelSelectedExpr:a,inPreTag:e.inPreTag||"pre"===t.tag});this.compileAST(r,i)}o.currentDom=n}if(r&&(this.insertBlock(`${o.blockName}(ddd)`,o,e),o.children.length&&o.hasDynamicChildren)){const t=this.target.code,e=o.children.slice();let n=e.shift();for(let o=i;o<t.length&&(!t[o].trimStart().startsWith(`const ${n.varName} `)||(t[o]=t[o].replace(`const ${n.varName}`,n.varName),n=e.shift(),n));o++);this.addLine(`let ${o.children.map((t=>t.varName)).join(", ")};`,i)}return o.varName}compileTEsc(t,e){let n,{block:o,forceNewBlock:s}=e;if("0"===t.expr?(this.helpers.add("zero"),n="ctx[zero]"):(n=Ye(t.expr),t.defaultValue&&(this.helpers.add("withDefault"),n=`withDefault(${n}, ${ln(t.defaultValue)})`)),!o||s)o=this.createBlock(o,"text",e),this.insertBlock(`text(${n})`,o,{...e,forceNewBlock:s&&!o});else{const t=o.insertData(n,"txt"),e=en.createElement(`block-text-${t}`);o.insert(e)}return o.varName}compileTOut(t,e){let n,{block:o}=e;if(o&&this.insertAnchor(o),o=this.createBlock(o,"html",e),"0"===t.expr)this.helpers.add("zero"),n="ctx[zero]";else if(t.body){let o=null;o=an.nextBlockId;const s=cn(e);this.compileAST({type:3,content:t.body},s),this.helpers.add("safeOutput"),n=`safeOutput(${Ye(t.expr)}, b${o})`}else this.helpers.add("safeOutput"),n=`safeOutput(${Ye(t.expr)})`;return this.insertBlock(n,o,e),o.varName}compileTIfBranch(t,e,n){this.target.indentLevel++;let o=e.children.length;this.compileAST(t,cn(n,{block:e,index:n.index})),e.children.length>o&&this.insertAnchor(e,o),this.target.indentLevel--}compileTIf(t,e,n){let{block:o,forceNewBlock:s}=e;const r=this.target.code.length,i=!o||"multi"!==o.type&&s;if(o&&(o.hasDynamicChildren=!0),(!o||"multi"!==o.type&&s)&&(o=this.createBlock(o,"multi",e)),this.addLine(`if (${Ye(t.condition)}) {`),this.compileTIfBranch(t.content,o,e),t.tElif)for(let n of t.tElif)this.addLine(`} else if (${Ye(n.condition)}) {`),this.compileTIfBranch(n.content,o,e);if(t.tElse&&(this.addLine("} else {"),this.compileTIfBranch(t.tElse,o,e)),this.addLine("}"),i){if(o.children.length){const t=this.target.code,e=o.children.slice();let n=e.shift();for(let o=r;o<t.length&&(!t[o].trimStart().startsWith(`const ${n.varName} `)||(t[o]=t[o].replace(`const ${n.varName}`,n.varName),n=e.shift(),n));o++);this.addLine(`let ${o.children.map((t=>t.varName)).join(", ")};`,r)}const t=o.children.map((t=>t.varName)).join(", ");this.insertBlock(`multi([${t}])`,o,e)}return o.varName}compileTForeach(t,e){let{block:n}=e;n&&this.insertAnchor(n),n=this.createBlock(n,"list",e),this.target.loopLevel++;const o=`i${this.target.loopLevel}`;this.addLine("ctx = Object.create(ctx);");const s=`v_block${n.id}`,r=`k_block${n.id}`,i=`l_block${n.id}`,l=`c_block${n.id}`;let a;this.helpers.add("prepareList"),this.define(`[${r}, ${s}, ${i}, ${l}]`,`prepareList(${Ye(t.collection)});`),this.dev&&this.define(`keys${n.id}`,"new Set()"),this.addLine(`for (let ${o} = 0; ${o} < ${i}; ${o}++) {`),this.target.indentLevel++,this.addLine(`ctx[\`${t.elem}\`] = ${r}[${o}];`),t.hasNoFirst||this.addLine(`ctx[\`${t.elem}_first\`] = ${o} === 0;`),t.hasNoLast||this.addLine(`ctx[\`${t.elem}_last\`] = ${o} === ${r}.length - 1;`),t.hasNoIndex||this.addLine(`ctx[\`${t.elem}_index\`] = ${o};`),t.hasNoValue||this.addLine(`ctx[\`${t.elem}_value\`] = ${s}[${o}];`),this.define(`key${this.target.loopLevel}`,t.key?Ye(t.key):o),this.dev&&(this.helpers.add("OwlError"),this.addLine(`if (keys${n.id}.has(String(key${this.target.loopLevel}))) { throw new OwlError(\`Got duplicate key in t-foreach: \${key${this.target.loopLevel}}\`)}`),this.addLine(`keys${n.id}.add(String(key${this.target.loopLevel}));`)),t.memo&&(this.target.hasCache=!0,a=sn(),this.define(`memo${a}`,Ye(t.memo)),this.define(`vnode${a}`,`cache[key${this.target.loopLevel}];`),this.addLine(`if (vnode${a}) {`),this.target.indentLevel++,this.addLine(`if (shallowEqual(vnode${a}.memo, memo${a})) {`),this.target.indentLevel++,this.addLine(`${l}[${o}] = vnode${a};`),this.addLine(`nextCache[key${this.target.loopLevel}] = vnode${a};`),this.addLine("continue;"),this.target.indentLevel--,this.addLine("}"),this.target.indentLevel--,this.addLine("}"));const c=cn(e,{block:n,index:o});return this.compileAST(t.body,c),t.memo&&this.addLine(`nextCache[key${this.target.loopLevel}] = Object.assign(${l}[${o}], {memo: memo${a}});`),this.target.indentLevel--,this.target.loopLevel--,this.addLine("}"),e.isLast||this.addLine("ctx = ctx.__proto__;"),this.insertBlock("l",n,e),n.varName}compileTKey(t,e){const n=sn("tKey_");return this.define(n,Ye(t.expr)),e=cn(e,{tKeyExpr:n,block:e.block,index:e.index}),this.compileAST(t.content,e)}compileMulti(t,e){let{block:n,forceNewBlock:o}=e;const s=!n||o;let r=this.target.code.length;if(s){let o=null;if(t.content.filter((t=>!t.hasNoRepresentation)).length<=1){for(let n of t.content){const t=this.compileAST(n,e);o=o||t}return o}n=this.createBlock(n,"multi",e)}let i=0;for(let o=0,s=t.content.length;o<s;o++){const r=t.content[o],l=!r.hasNoRepresentation,a=cn(e,{block:n,index:i,forceNewBlock:l,isLast:e.isLast&&o===s-1});this.compileAST(r,a),l&&i++}if(s){if(n.hasDynamicChildren&&n.children.length){const t=this.target.code,e=n.children.slice();let o=e.shift();for(let n=r;n<t.length&&(!t[n].trimStart().startsWith(`const ${o.varName} `)||(t[n]=t[n].replace(`const ${o.varName}`,o.varName),o=e.shift(),o));n++);this.addLine(`let ${n.children.map((t=>t.varName)).join(", ")};`,r)}const t=n.children.map((t=>t.varName)).join(", ");this.insertBlock(`multi([${t}])`,n,e)}return n.varName}compileTCall(t,e){let{block:n,forceNewBlock:o}=e,s=e.ctxVar||"ctx";t.context&&(s=sn("ctx"),this.addLine(`let ${s} = ${Ye(t.context)};`));const r=Ze.test(t.name),i=r?Qe(t.name):"`"+t.name+"`";if(n&&!o&&this.insertAnchor(n),n=this.createBlock(n,"multi",e),t.body){this.addLine(`${s} = Object.create(${s});`),this.addLine(`${s}[isBoundary] = 1;`),this.helpers.add("isBoundary");const n=cn(e,{ctxVar:s}),o=this.compileMulti({type:3,content:t.body},n);o&&(this.helpers.add("zero"),this.addLine(`${s}[zero] = ${o};`))}const l=this.generateComponentKey();if(r){const t=sn("template");this.staticDefs.find((t=>"call"===t.id))||this.staticDefs.push({id:"call",expr:"app.callTemplate.bind(app)"}),this.define(t,i),this.insertBlock(`call(this, ${t}, ${s}, node, ${l})`,n,{...e,forceNewBlock:!n})}else{const t=sn("callTemplate_");this.staticDefs.push({id:t,expr:`app.getTemplate(${i})`}),this.insertBlock(`${t}.call(this, ${s}, node, ${l})`,n,{...e,forceNewBlock:!n})}return t.body&&!e.isLast&&this.addLine(`${s} = ${s}.__proto__;`),n.varName}compileTCallBlock(t,e){let{block:n,forceNewBlock:o}=e;return n&&(o||this.insertAnchor(n)),n=this.createBlock(n,"multi",e),this.insertBlock(Ye(t.name),n,{...e,forceNewBlock:!n}),n.varName}compileTSet(t,e){this.target.shouldProtectScope=!0,this.helpers.add("isBoundary").add("withDefault");const n=t.value?Ye(t.value||""):"null";if(t.body){this.helpers.add("LazyValue");const o={type:3,content:t.body};let s=`new LazyValue(${this.compileInNewTarget("value",o,e)}, ctx, this, node, ${this.target.currentKey(e)})`;s=t.value?s?`withDefault(${n}, ${s})`:n:s,this.addLine(`ctx[\`${t.name}\`] = ${s};`)}else{let o;if(t.defaultValue){const s=ln(e.translate?this.translate(t.defaultValue,e.translationCtx):t.defaultValue);o=t.value?`withDefault(${n}, ${s})`:s}else o=n;this.helpers.add("setContextValue"),this.addLine(`setContextValue(${e.ctxVar||"ctx"}, "${t.name}", ${o});`)}return null}generateComponentKey(t="key"){const e=[sn("__")];for(let t=0;t<this.target.loopLevel;t++)e.push(`\${key${t+1}}`);return`${t} + \`${e.join("__")}\``}formatProp(t,e,n,o){if(t.endsWith(".translate")){const s=(null==n?void 0:n[t])||o;e=ln(this.translateFn(e,s))}else e=this.captureExpression(e);if(t.includes(".")){let[n,o]=t.split(".");switch(t=n,o){case"bind":e=`(${e}).bind(this)`;break;case"alike":case"translate":break;default:throw new r(`Invalid prop suffix: ${o}`)}}return`${t=/^[a-z_]+$/i.test(t)?t:`'${t}'`}: ${e||void 0}`}formatPropObject(t,e,n){return Object.entries(t).map((([t,o])=>this.formatProp(t,o,e,n)))}getPropString(t,e){let n=`{${t.join(",")}}`;return e&&(n=`Object.assign({}, ${Ye(e)}${t.length?", "+n:""})`),n}compileComponent(t,e){let{block:n}=e;const o="slots"in(t.props||{}),s=t.props?this.formatPropObject(t.props,t.propsTranslationCtx,e.translationCtx):[];let r="";if(t.slots){let n="ctx";!this.target.loopLevel&&this.hasSafeContext||(n=sn("ctx"),this.helpers.add("capture"),this.define(n,"capture(ctx)"));let o=[];for(let s in t.slots){const r=t.slots[s],i=[];if(r.content){const t=this.compileInNewTarget("slot",r.content,e,r.on);i.push(`__render: ${t}.bind(this), __ctx: ${n}`)}const l=t.slots[s].scope;l&&i.push(`__scope: "${l}"`),t.slots[s].attrs&&i.push(...this.formatPropObject(t.slots[s].attrs,t.slots[s].attrsTranslationCtx,e.translationCtx));const a=`{${i.join(", ")}}`;o.push(`'${s}': ${a}`)}r=`{${o.join(", ")}}`}!r||t.dynamicProps||o||(this.helpers.add("markRaw"),s.push(`slots: markRaw(${r})`));let i,l,a=this.getPropString(s,t.dynamicProps);(r&&(t.dynamicProps||o)||this.dev)&&(i=sn("props"),this.define(i,a),a=i),r&&(t.dynamicProps||o)&&(this.helpers.add("markRaw"),this.addLine(`${i}.slots = markRaw(Object.assign(${r}, ${i}.slots))`)),t.isDynamic?(l=sn("Comp"),this.define(l,Ye(t.name))):l=`\`${t.name}\``,this.dev&&this.addLine(`helpers.validateProps(${l}, ${i}, this);`),n&&(!1===e.forceNewBlock||e.tKeyExpr)&&this.insertAnchor(n);let c=this.generateComponentKey();e.tKeyExpr&&(c=`${e.tKeyExpr} + ${c}`);let h=sn("comp");const u=[];for(let e in t.props||{}){let[t,n]=e.split(".");n||u.push(`"${t}"`)}this.staticDefs.push({id:h,expr:`app.createComponent(${t.isDynamic?null:l}, ${!t.isDynamic}, ${!!t.slots}, ${!!t.dynamicProps}, [${u}])`}),t.isDynamic&&(c=`(${l}).name + ${c}`);let d=`${h}(${a}, ${c}, node, this, ${t.isDynamic?l:null})`;return t.isDynamic&&(d=`toggler(${l}, ${d})`),t.on&&(d=this.wrapWithEventCatcher(d,t.on)),n=this.createBlock(n,"multi",e),this.insertBlock(d,n,e),n.varName}wrapWithEventCatcher(t,e){this.helpers.add("createCatcher");let n=sn("catcher"),o={},s=[];for(let t in e){let n=sn("hdlr"),r=s.push(n)-1;o[t]=r;const i=this.generateHandlerCode(t,e[t]);this.define(n,i)}return this.staticDefs.push({id:n,expr:`createCatcher(${JSON.stringify(o)})`}),`${n}(${t}, [${s.join(",")}])`}compileTSlot(t,e){this.helpers.add("callSlot");let n,o,{block:s}=e,r=!1,i=!1;t.name.match(Ze)?(r=!0,i=!0,o=Qe(t.name)):(o="'"+t.name+"'",i=i||this.slotNames.has(t.name),this.slotNames.add(t.name));const l={...t.attrs},a=l["t-props"];delete l["t-props"];let c=this.target.loopLevel?`key${this.target.loopLevel}`:"key";i&&(c=this.generateComponentKey(c));const h=t.attrs?this.formatPropObject(l,t.attrsTranslationCtx,e.translationCtx):[],u=this.getPropString(h,a);if(t.defaultContent){n=`callSlot(ctx, node, ${c}, ${o}, ${r}, ${u}, ${this.compileInNewTarget("defaultContent",t.defaultContent,e)}.bind(this))`}else if(r){let t=sn("slot");this.define(t,o),n=`toggler(${t}, callSlot(ctx, node, ${c}, ${t}, ${r}, ${u}))`}else n=`callSlot(ctx, node, ${c}, ${o}, ${r}, ${u})`;return t.on&&(n=this.wrapWithEventCatcher(n,t.on)),s&&this.insertAnchor(s),s=this.createBlock(s,"multi",e),this.insertBlock(n,s,{...e,forceNewBlock:!1}),s.varName}compileTTranslation(t,e){return t.content?this.compileAST(t.content,Object.assign({},e,{translate:!1})):null}compileTTranslationContext(t,e){return t.content?this.compileAST(t.content,Object.assign({},e,{translationCtx:t.translationCtx})):null}compileTPortal(t,e){this.staticDefs.find((t=>"Portal"===t.id))||this.staticDefs.push({id:"Portal",expr:"app.Portal"});let{block:n}=e;const o=this.compileInNewTarget("slot",t.content,e);let s="ctx";!this.target.loopLevel&&this.hasSafeContext||(s=sn("ctx"),this.helpers.add("capture"),this.define(s,"capture(ctx)"));let r=sn("comp");this.staticDefs.push({id:r,expr:"app.createComponent(null, false, true, false, false)"});const i=`${r}({target: ${Ye(t.target)},slots: {'default': {__render: ${o}.bind(this), __ctx: ${s}}}}, ${this.generateComponentKey()}, node, ctx, Portal)`;return n&&this.insertAnchor(n),n=this.createBlock(n,"multi",e),this.insertBlock(i,n,{...e,forceNewBlock:!1}),n.varName}}const pn=new WeakMap;function mn(t,e){var n;return function(t){let e=t.querySelectorAll("[t-elif], [t-else]");for(let t=0,n=e.length;t<n;t++){let n=e[t],o=n.previousElementSibling,s=t=>o.getAttribute(t),i=t=>+!!n.getAttribute(t);if(!o||!s("t-if")&&!s("t-elif"))throw new r("t-elif and t-else directives must be preceded by a t-if or t-elif directive");{if(s("t-foreach"))throw new r("t-if cannot stay at the same level as t-foreach when using t-elif or t-else");if(["t-if","t-elif","t-else"].map(i).reduce((function(t,e){return t+e}))>1)throw new r("Only one conditional branching directive is allowed per node");let t;for(;(t=n.previousSibling)!==o;){if(t.nodeValue.trim().length&&8!==t.nodeType)throw new r("text is not allowed between branching directives");t.remove()}}}}(n=t),function(t){for(const e of["t-esc","t-out"]){const n=[...t.querySelectorAll(`[${e}]`)].filter((t=>t.tagName[0]===t.tagName[0].toUpperCase()||t.hasAttribute("t-component")));for(const t of n){if(t.childNodes.length)throw new r(`Cannot have ${e} on a component that already has content`);const n=t.getAttribute(e);t.removeAttribute(e);const o=t.ownerDocument.createElement("t");null!=n&&o.setAttribute(e,n),t.appendChild(o)}}}(n),gn(t,e)||{type:0,value:""}}function gn(t,e){return t instanceof Element?function(t,e){if(!e.customDirectives)return null;const n=t.getAttributeNames();for(let o of n){if("t-custom"===o||"t-custom-"===o)throw new r("Missing custom directive name with t-custom directive");if(o.startsWith("t-custom-")){const n=o.split(".")[0].slice(9),s=e.customDirectives[n];if(!s)throw new r(`Custom directive "${n}" is not defined`);const i=t.getAttribute(o),l=o.split(".").slice(1);t.removeAttribute(o);try{s(t,i,l)}catch(t){throw new r(`Custom directive "${n}" throw the following error: ${t}`)}return gn(t,e)}}return null}(t,e)||function(t,e){if(t.hasAttribute("t-debug")){t.removeAttribute("t-debug");const n=gn(t,e),o={type:12,content:n};return(null==n?void 0:n.hasNoRepresentation)&&(o.hasNoRepresentation=!0),o}if(t.hasAttribute("t-log")){const n=t.getAttribute("t-log");t.removeAttribute("t-log");const o=gn(t,e),s={type:13,expr:n,content:o};return(null==o?void 0:o.hasNoRepresentation)&&(s.hasNoRepresentation=!0),s}return null}(t,e)||function(t,e){if(!t.hasAttribute("t-foreach"))return null;const n=t.outerHTML,o=t.getAttribute("t-foreach");t.removeAttribute("t-foreach");const s=t.getAttribute("t-as")||"";t.removeAttribute("t-as");const i=t.getAttribute("t-key");if(!i)throw new r(`"Directive t-foreach should always be used with a t-key!" (expression: t-foreach="${o}" t-as="${s}")`);t.removeAttribute("t-key");const l=t.getAttribute("t-memo")||"";t.removeAttribute("t-memo");const a=gn(t,e);if(!a)return null;const c=!n.includes("t-call"),h=c&&!n.includes(`${s}_first`),u=c&&!n.includes(`${s}_last`),d=c&&!n.includes(`${s}_index`),f=c&&!n.includes(`${s}_value`);return{type:9,collection:o,elem:s,body:a,memo:l,key:i,hasNoFirst:h,hasNoLast:u,hasNoIndex:d,hasNoValue:f}}(t,e)||function(t,e){if(!t.hasAttribute("t-if"))return null;const n=t.getAttribute("t-if");t.removeAttribute("t-if");const o=gn(t,e)||{type:0,value:""};let s=t.nextElementSibling;const r=[];for(;s&&s.hasAttribute("t-elif");){const t=s.getAttribute("t-elif");s.removeAttribute("t-elif");const n=gn(s,e),o=s.nextElementSibling;s.remove(),s=o,n&&r.push({condition:t,content:n})}let i=null;s&&s.hasAttribute("t-else")&&(s.removeAttribute("t-else"),i=gn(s,e),s.remove());return{type:5,condition:n,content:o,tElif:r.length?r:null,tElse:i}}(t,e)||function(t,e){if(!t.hasAttribute("t-portal"))return null;const n=t.getAttribute("t-portal");t.removeAttribute("t-portal");const o=gn(t,e);if(!o)return{type:0,value:""};return{type:18,target:n,content:o}}(t,e)||function(t,e){if(!t.hasAttribute("t-call"))return null;const n=t.getAttribute("t-call"),o=t.getAttribute("t-call-context");if(t.removeAttribute("t-call"),t.removeAttribute("t-call-context"),"t"!==t.tagName){const s=gn(t,e),r={type:7,name:n,body:null,context:o};if(s&&2===s.type)return s.content=[r],s;if(s&&11===s.type)return{...s,slots:{default:{content:r,scope:null,on:null,attrs:null,attrsTranslationCtx:null}}}}const s=kn(t,e);return{type:7,name:n,body:s.length?s:null,context:o}}(t,e)||function(t,e){if(!t.hasAttribute("t-call-block"))return null;const n=t.getAttribute("t-call-block");return{type:15,name:n}}(t)||function(t,e){if("off"!==t.getAttribute("t-translation"))return null;t.removeAttribute("t-translation");const n=gn(t,e);if(3===(null==n?void 0:n.type)){return Tn(n.content.map(xn))}return xn(n)}(t,e)||function(t,e){const n=t.getAttribute("t-translation-context");if(!n)return null;t.removeAttribute("t-translation-context");const o=gn(t,e);if(3===(null==o?void 0:o.type)){return Tn(o.content.map((t=>Nn(t,n))))}return Nn(o,n)}(t,e)||function(t,e){if(!t.hasAttribute("t-key"))return null;const n=t.getAttribute("t-key");t.removeAttribute("t-key");const o=gn(t,e);if(!o)return null;const s={type:10,expr:n,content:o};o.hasNoRepresentation&&(s.hasNoRepresentation=!0);return s}(t,e)||function(t,e){if(!t.hasAttribute("t-esc"))return null;const n=t.getAttribute("t-esc");t.removeAttribute("t-esc");const o={type:4,expr:n,defaultValue:t.textContent||""};let s=t.getAttribute("t-ref");t.removeAttribute("t-ref");const r=gn(t,e);if(!r)return o;if(2===r.type)return{...r,ref:s,content:[o]};return o}(t,e)||function(t,e){if(!t.hasAttribute("t-out")&&!t.hasAttribute("t-raw"))return null;t.hasAttribute("t-raw")&&console.warn('t-raw has been deprecated in favor of t-out. If the value to render is not wrapped by the "markup" function, it will be escaped');const n=t.getAttribute("t-out")||t.getAttribute("t-raw");t.removeAttribute("t-out"),t.removeAttribute("t-raw");const o={type:8,expr:n,body:null},s=t.getAttribute("t-ref");t.removeAttribute("t-ref");const r=gn(t,e);if(!r)return o;if(2===r.type)return o.body=r.content.length?r.content:null,{...r,ref:s,content:[o]};return o}(t,e)||function(t,e){if(!t.hasAttribute("t-slot"))return null;const n=t.getAttribute("t-slot");t.removeAttribute("t-slot");let o=null,s=null,r=null;for(let e of t.getAttributeNames()){const n=t.getAttribute(e);if(e.startsWith("t-on-"))r=r||{},r[e.slice(5)]=n;else if(e.startsWith("t-translation-context-")){s=s||{},s[e.slice(22)]=n}else o=o||{},o[e]=n}return{type:14,name:n,attrs:o,attrsTranslationCtx:s,on:r,defaultContent:En(t,e)}}(t,e)||function(t,e){let n=t.tagName;const o=n[0];let s=t.hasAttribute("t-component");if(s&&"t"!==n)throw new r(`Directive 't-component' can only be used on <t> nodes (used on a <${n}>)`);if(o!==o.toUpperCase()&&!s)return null;s&&(n=t.getAttribute("t-component"),t.removeAttribute("t-component"));const i=t.getAttribute("t-props");t.removeAttribute("t-props");const l=t.getAttribute("t-slot-scope");t.removeAttribute("t-slot-scope");let a=null,c=null,h=null;for(let e of t.getAttributeNames()){const n=t.getAttribute(e);if(e.startsWith("t-translation-context-")){h=h||{},h[e.slice(22)]=n}else if(e.startsWith("t-")){if(!e.startsWith("t-on-")){const t=$n.get(e.split("-").slice(0,2).join("-"));throw new r(t||`unsupported directive on Component: ${e}`)}a=a||{},a[e.slice(5)]=n}else c=c||{},c[e]=n}let u=null;if(t.hasChildNodes()){const n=t.cloneNode(!0),o=Array.from(n.querySelectorAll("[t-set-slot]"));for(let t of o){if("t"!==t.tagName)throw new r(`Directive 't-set-slot' can only be used on <t> nodes (used on a <${t.tagName}>)`);const o=t.getAttribute("t-set-slot");let s=t.parentElement,i=!1;for(;s&&s!==n;){if(s.hasAttribute("t-component")||s.tagName[0]===s.tagName[0].toUpperCase()){i=!0;break}s=s.parentElement}if(i||!s)continue;t.removeAttribute("t-set-slot"),t.remove();const l=gn(t,e);let a=null,c=null,h=null,d=null;for(let e of t.getAttributeNames()){const n=t.getAttribute(e);if("t-slot-scope"!==e)if(e.startsWith("t-translation-context-")){h=h||{},h[e.slice(22)]=n}else e.startsWith("t-on-")?(a=a||{},a[e.slice(5)]=n):(c=c||{},c[e]=n);else d=n}u=u||{},u[o]={content:l,on:a,attrs:c,attrsTranslationCtx:h,scope:d}}const s=En(n,e);u=u||{},s&&!u.default&&(u.default={content:s,on:a,attrs:null,attrsTranslationCtx:null,scope:l})}return{type:11,name:n,isDynamic:s,dynamicProps:i,props:c,propsTranslationCtx:h,slots:u,on:a}}(t,e)||function(t,e){const{tagName:n}=t,o=t.getAttribute("t-tag");if(t.removeAttribute("t-tag"),"t"===n&&!o)return null;if(n.startsWith("block-"))throw new r(`Invalid tag name: '${n}'`);e=Object.assign({},e),"pre"===n&&(e.inPreTag=!0);let s=!e.nameSpace&&wn.has(n)?"http://www.w3.org/2000/svg":null;const i=t.getAttribute("t-ref");t.removeAttribute("t-ref");const l=t.getAttributeNames();let a=null,c=null,h=null,u=null;for(let o of l){const i=t.getAttribute(o);if("t-on"===o||"t-on-"===o)throw new r("Missing event name with t-on directive");if(o.startsWith("t-on-"))h=h||{},h[o.slice(5)]=i;else if(o.startsWith("t-model")){if(!["input","select","textarea"].includes(n))throw new r("The t-model directive only works with <input>, <textarea> and <select>");let s,l;if(vn.test(i)){const t=i.lastIndexOf(".");s=i.slice(0,t),l=`'${i.slice(t+1)}'`}else{if(!yn.test(i))throw new r(`Invalid t-model expression: "${i}" (it should be assignable)`);{const t=i.lastIndexOf("[");s=i.slice(0,t),l=i.slice(t+1,-1)}}const a=t.getAttribute("type"),c="input"===n,h="select"===n,d=c&&"checkbox"===a,f=c&&"radio"===a,p=o.includes(".trim"),m=p||o.includes(".lazy");u={baseExpr:s,expr:l,targetAttr:d?"checked":"value",specialInitTargetAttr:f?"checked":null,eventType:f?"click":h||m?"change":"input",hasDynamicChildren:!1,shouldTrim:p,shouldNumberize:o.includes(".number")},h&&((e=Object.assign({},e)).tModelInfo=u)}else{if(o.startsWith("block-"))throw new r(`Invalid attribute: '${o}'`);if("xmlns"===o)s=i;else if(o.startsWith("t-translation-context-")){c=c||{},c[o.slice(22)]=i}else if("t-name"!==o){if(o.startsWith("t-")&&!o.startsWith("t-att"))throw new r(`Unknown QWeb directive: '${o}'`);const t=e.tModelInfo;t&&["t-att-value","t-attf-value"].includes(o)&&(t.hasDynamicChildren=!0),a=a||{},a[o]=i}}}s&&(e.nameSpace=s);const d=kn(t,e);return{type:2,tag:n,dynamicTag:o,attrs:a,attrsTranslationCtx:c,on:h,ref:i,content:d,model:u,ns:s}}(t,e)||function(t,e){if(!t.hasAttribute("t-set"))return null;const n=t.getAttribute("t-set"),o=t.getAttribute("t-value")||null,s=t.innerHTML===t.textContent&&t.textContent||null;let r=null;t.textContent!==t.innerHTML&&(r=kn(t,e));return{type:6,name:n,value:o,defaultValue:s,body:r,hasNoRepresentation:!0}}(t,e)||function(t,e){if("t"!==t.tagName)return null;return En(t,e)}(t,e):function(t,e){if(t.nodeType===Node.TEXT_NODE){let n=t.textContent||"";return e.inPreTag||!bn.test(n)||n.trim()?{type:0,value:n}:null}if(t.nodeType===Node.COMMENT_NODE)return{type:1,value:t.textContent||""};return null}(t,e)}const bn=/[\r\n]/;const vn=/\.[\w_]+\s*$/,yn=/\[[^\[]+\]\s*$/,wn=new Set(["svg","g","path"]);const $n=new Map([["t-ref","t-ref is no longer supported on components. Consider exposing only the public part of the component's API through a callback prop."],["t-att","t-att makes no sense on component: props are already treated as expressions"],["t-attf","t-attf is not supported on components: use template strings for string interpolation in props"]]);function xn(t){const e={type:16,content:t};return(null==t?void 0:t.hasNoRepresentation)&&(e.hasNoRepresentation=!0),e}function Nn(t,e){const n={type:17,content:t,translationCtx:e};return(null==t?void 0:t.hasNoRepresentation)&&(n.hasNoRepresentation=!0),n}function kn(t,e){const n=[];for(let o of t.childNodes){const t=gn(o,e);t&&(3===t.type?n.push(...t.content):n.push(t))}return n}function Tn(t){const e={type:3,content:t};return t.every((t=>t.hasNoRepresentation))&&(e.hasNoRepresentation=!0),e}function En(t,e){const n=kn(t,e);switch(n.length){case 0:return null;case 1:return n[0];default:return Tn(n)}}function An(t,e={hasGlobalValues:!1}){const n=function(t,e){const n={inPreTag:!1,customDirectives:e};if("string"==typeof t)return mn(Pe(`<t>${t}</t>`).firstChild,n);let o=pn.get(t);return o||(o=mn(t.cloneNode(!0),n),pn.set(t,o)),o}(t,e.customDirectives),o=t instanceof Node?!(t instanceof Element)||null===t.querySelector("[t-set], [t-call]"):!t.includes("t-set")&&!t.includes("t-call"),s=new fn(n,{...e,hasSafeContext:o}).generateCode();try{return new Function("app, bdom, helpers",s)}catch(t){const{name:n}=e,o=new r(`Failed to compile ${n?`template "${n}"`:"anonymous template"}: ${t.message}\n\ngenerated code:\nfunction(app, bdom, helpers) {\n${s}\n}`);throw o.cause=t,o}}let _n;"undefined"!=typeof window&&(_n=window.requestAnimationFrame.bind(window));class Cn{constructor(){this.tasks=new Set,this.frame=0,this.delayedRenders=[],this.cancelledNodes=new Set,this.processing=!1,this.requestAnimationFrame=Cn.requestAnimationFrame}addFiber(t){this.tasks.add(t.root)}scheduleDestroy(t){this.cancelledNodes.add(t),0===this.frame&&(this.frame=this.requestAnimationFrame((()=>this.processTasks())))}flush(){if(this.delayedRenders.length){let t=this.delayedRenders;this.delayedRenders=[];for(let e of t)e.root&&3!==e.node.status&&e.node.fiber===e&&e.render()}0===this.frame&&(this.frame=this.requestAnimationFrame((()=>this.processTasks())))}processTasks(){if(!this.processing){this.processing=!0,this.frame=0;for(let t of this.cancelledNodes)t._destroy();this.cancelledNodes.clear();for(let t of this.tasks)this.processFiber(t);for(let t of this.tasks)3===t.node.status&&this.tasks.delete(t);this.processing=!1}}processFiber(t){if(t.root!==t)return void this.tasks.delete(t);const e=xt.has(t);e&&0!==t.counter?this.tasks.delete(t):3!==t.node.status?0===t.counter&&(e||t.complete(),t.appliedToDom&&this.tasks.delete(t)):this.tasks.delete(t)}}Cn.requestAnimationFrame=_n;let Dn=!1;const Sn=new Set;"undefined"!=typeof window&&(window.__OWL_DEVTOOLS__||(window.__OWL_DEVTOOLS__={apps:Sn,Fiber:_t,RootFiber:Ct,toRaw:Ft,reactive:Yt}));class On extends Me{constructor(t,e={}){super(e),this.scheduler=new Cn,this.subRoots=new Set,this.root=null,this.name=e.name||"",this.Root=t,Sn.add(this),e.test&&(this.dev=!0),this.warnIfNoStaticProps=e.warnIfNoStaticProps||!1,!this.dev||e.test||Dn||(console.info("Owl is running in 'dev' mode."),Dn=!0);const n=e.env||{},o=Object.getOwnPropertyDescriptors(n);this.env=Object.freeze(Object.create(Object.getPrototypeOf(n),o)),this.props=e.props||{}}mount(t,e){const n=this.createRoot(this.Root,{props:this.props});return this.root=n.node,this.subRoots.delete(n.node),n.mount(t,e)}createRoot(t,e={}){const n=e.props||{},o=this.env;e.env&&(this.env=e.env);const s=function(){let t=se;return()=>{se=t}}(),r=this.makeNode(t,n);return s(),e.env&&(this.env=o),this.subRoots.add(r),{node:r,mount:(e,o)=>{On.validateTarget(e),this.dev&&Le(t,n,{__owl__:{app:this}});return this.mountNode(r,e,o)},destroy:()=>{this.subRoots.delete(r),r.destroy(),this.scheduler.processTasks()}}}makeNode(t,e){return new ue(t,e,this,null,null)}mountNode(t,e,n){const o=new Promise(((e,n)=>{let o=!1;t.mounted.push((()=>{e(t.component),o=!0}));let s=Nt.get(t);s||(s=[],Nt.set(t,s)),s.unshift((t=>{throw o||n(t),t}))}));return t.mountComponent(e,n),o}destroy(){if(this.root){for(let t of this.subRoots)t.destroy();this.root.destroy(),this.scheduler.processTasks()}Sn.delete(this)}createComponent(t,e,n,o,s){const i=!e;let l;const a=0===s.length;l=n?(t,e)=>!0:o?function(t,e){for(let n in t)if(t[n]!==e[n])return!0;return Object.keys(t).length!==Object.keys(e).length}:a?(t,e)=>!1:function(t,e){for(let n of s)if(t[n]!==e[n])return!0;return!1};const c=ue.prototype.updateAndRender,h=ue.prototype.initiateRender;return(n,o,s,a,u)=>{let d=s.children,f=d[o];i&&f&&f.component.constructor!==u&&(f=void 0);const p=s.fiber;if(f)(l(f.props,n)||p.deep||f.forceNextRender)&&(f.forceNextRender=!1,c.call(f,n,p));else{if(e){const e=a.constructor.components;if(!e)throw new r(`Cannot find the definition of component "${t}", missing static components key in parent`);if(!(u=e[t]))throw new r(`Cannot find the definition of component "${t}"`);if(!(u.prototype instanceof ve))throw new r(`"${t}" is not a Component. It must inherit from the Component class`)}f=new ue(u,n,this,s,o),d[o]=f,h.call(f,new _t(f,p))}return p.childrenMap[o]=f,f}}handleError(...t){return Tt(...t)}}On.validateTarget=function(t){const e=t&&t.ownerDocument;if(e){if(!e.defaultView)throw new r("Cannot mount a component: the target document is not attached to a window (defaultView is missing)");if(t instanceof e.defaultView.HTMLElement||t instanceof ShadowRoot){if(!function(t,e){let n=t;const o=e.defaultView.ShadowRoot;for(;n;){if(n===e)return!0;if(n.parentNode)n=n.parentNode;else{if(!(n instanceof o&&n.host))return!1;n=n.host}}return!1}(t,e))throw new r("Cannot mount a component on a detached dom node");return}}throw new r("Cannot mount component: the target is not a valid DOM element")},On.apps=Sn,On.version="2.8.3";function Rn(t,e){const n=Object.create(t),o=Object.getOwnPropertyDescriptors(e);return Object.freeze(Object.defineProperties(n,o))}function Ln(t){const e=re();e.childEnv=Rn(e.childEnv,t)}n.shouldNormalizeDom=!1,n.mainEventHandler=(t,n,o)=>{const{data:s,modifiers:i}=e(t);t=s;let l=!1;if(i.length){let t=!1;const e=n.target===o;for(const o of i)switch(o){case"self":if(t=!0,e)continue;return l;case"prevent":(t&&e||!t)&&n.preventDefault();continue;case"stop":(t&&e||!t)&&n.stopPropagation(),l=!0;continue}}if(Object.hasOwnProperty.call(t,0)){const e=t[0];if("function"!=typeof e)throw new r(`Invalid handler (expected a function, received: '${e}')`);let o=t[1]?t[1].__owl__:null;o&&1!==o.status||e.call(o?o.component:null,n)}return l};const Bn={config:n,mount:$t,patch:function(t,e,n=!1){t.patch(e,n)},remove:function(t,e=!1){e&&t.beforeRemove(),t.remove()},list:bt,multi:j,text:z,toggler:s,createBlock:nt,html:wt,comment:H},Pn={version:On.version};Me.prototype._compileTemplate=function(t,e){return An(e,{name:t,dev:this.dev,translateFn:this.translateFn,translatableAttributes:this.translatableAttributes,customDirectives:this.customDirectives,hasGlobalValues:this.hasGlobalValues})},t.App=On,t.Component=ve,t.EventBus=N,t.OwlError=r,t.__info__=Pn,t.batched=$,t.blockDom=Bn,t.htmlEscape=T,t.loadFile=async function(t){const e=await fetch(t);if(!e.ok)throw new r("Error while fetching xml templates");return await e.text()},t.markRaw=Vt,t.markup=E,t.mount=async function(t,e,n={}){return new On(t,n).mount(e,n)},t.onError=function(t){const e=re();let n=Nt.get(e);n||(n=[],Nt.set(e,n)),n.push(t.bind(e.component))},t.onMounted=me,t.onPatched=ge,t.onRendered=function(t){const e=re(),n=e.renderFn,o=e.app.dev?pe:t=>t;t=o(t.bind(e.component),"onRendered"),e.renderFn=()=>{const e=n();return t(),e}},t.onWillDestroy=function(t){const e=re(),n=e.app.dev?pe:t=>t;e.willDestroy.push(n(t.bind(e.component),"onWillDestroy"))},t.onWillPatch=function(t){const e=re(),n=e.app.dev?pe:t=>t;e.willPatch.unshift(n(t.bind(e.component),"onWillPatch"))},t.onWillRender=function(t){const e=re(),n=e.renderFn,o=e.app.dev?pe:t=>t;t=o(t.bind(e.component),"onWillRender"),e.renderFn=()=>(t(),n())},t.onWillStart=function(t){const e=re(),n=e.app.dev?pe:t=>t;e.willStart.push(n(t.bind(e.component),"onWillStart"))},t.onWillUnmount=be,t.onWillUpdateProps=function(t){const e=re(),n=e.app.dev?pe:t=>t;e.willUpdateProps.push(n(t.bind(e.component),"onWillUpdateProps"))},t.reactive=Yt,t.status=function(t){switch(t.__owl__.status){case 0:return"new";case 2:return"cancelled";case 1:return"mounted";case 3:return"destroyed"}},t.toRaw=Ft,t.useChildSubEnv=Ln,t.useComponent=function(){return se.component},t.useEffect=function(t,e=(()=>[NaN])){let n,o;me((()=>{o=e(),n=t(...o)})),ge((()=>{const s=e();s.some(((t,e)=>t!==o[e]))&&(o=s,n&&n(),n=t(...o))})),be((()=>n&&n()))},t.useEnv=function(){return re().component.env},t.useExternalListener=function(t,e,n,o){const s=re(),r=n.bind(s.component);me((()=>t.addEventListener(e,r,o))),be((()=>t.removeEventListener(e,r,o)))},t.useRef=function(t){const e=re().refs;return{get el(){const n=e[t];return x(n)?n:null}}},t.useState=ae,t.useSubEnv=function(t){const e=re();e.component.env=Rn(e.component.env,t),Ln(t)},t.validate=function(t,e){let n=_e(t,e);if(n.length)throw new r("Invalid object: "+n.join(", "))},t.validateType=Ce,t.whenReady=function(t){return new Promise((function(t){"loading"!==document.readyState?t(!0):document.addEventListener("DOMContentLoaded",t,!1)})).then(t||function(){})},t.xml=We,Object.defineProperty(t,"__esModule",{value:!0}),Pn.date="2026-03-30T13:05:32.099Z",Pn.hash="efae3e4",Pn.url="https://github.com/odoo/owl"}(globalThis.owl=globalThis.owl||{});
|
|
9
|
-
|
|
10
|
-
var Gi=Object.defineProperty;var mn=(t,e,s)=>e in t?Gi(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s;var St=(t,e,s)=>()=>{if(s)throw s[0];try{return t&&(e=t(t=0)),e}catch(o){throw s=[o],o}};var Ji=(t,e)=>{for(var s in e)Gi(t,s,{get:e[s],enumerable:!0})};var r=(t,e,s)=>mn(t,typeof e!="symbol"?e+"":e,s);function vn(t){return typeof t=="string"?document.querySelector(t):t instanceof Element?t:null}function yi(t,e,s={}){t.dispatchEvent(new CustomEvent(e,{bubbles:!0,detail:s}))}function yn(t,e={}){return t.hasAttribute("b-icon")?"icon":e.name||t.getAttribute("b-ui")}function xn(t,e){return e===document||e===t||e.contains(t)}function wn(t,e={}){return!e.allowBootstrapControl&&t.matches(gn)}function Yi(t){return d.version=t,d}function Xi(){if(typeof MutationObserver>"u")return;let t=new MutationObserver(e=>{for(let s of e)for(let o of s.addedNodes)o instanceof Element&&d.mountAll(o)});return t.observe(document.documentElement,{childList:!0,subtree:!0}),t}function Qi(){typeof document>"u"||(document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>{d.mountAll(),Xi()},{once:!0}):(d.mountAll(),Xi()))}var fn,vi,Ur,Gr,gn,xi,d,S=St(()=>{fn="__BASEUI_VERSION__",vi=new Map,Ur=new WeakMap,Gr="[b-ui], [b-icon]",gn="[data-bs-toggle], [data-bs-target], [data-bs-dismiss]";xi=typeof window<"u"?window.thebase:void 0,d=xi?.register?xi:Object.assign(xi||{},{version:fn,register(t,e){if(!t||!e)throw new Error("BaseUI.register requires a name and component definition.");return vi.set(t,e),this},component(t){return vi.get(t)},mount(t,e={}){let s=vn(t);if(!s||wn(s,e))return null;let o=yn(s,e),a=vi.get(o);if(!a)return null;let n=Ur.get(s);if(n?.name===o)return n;n&&(n.destroy?.(),Ur.delete(s),yi(s,"baseui:destroyed",{name:n.name}));let l=a.mount?.(s,this,e)||{},u={name:o,element:s,destroy:l.destroy};return Ur.set(s,u),yi(s,"baseui:mounted",{name:o,instance:u}),u},mountAll(t=document){let e=t||document,s=[...e.querySelectorAll?.(Gr)||[]];return e instanceof Element&&e.matches(Gr)&&s.unshift(e),s.map(o=>this.mount(o)).filter(Boolean)},destroy(t=document){let e=t||document,s=[...e.querySelectorAll?.(Gr)||[]];e instanceof Element&&e.matches(Gr)&&s.unshift(e);for(let o of s){let a=Ur.get(o);a&&xn(o,e)&&(a.destroy?.(),Ur.delete(o),yi(o,"baseui:destroyed",{name:a.name}))}},theme:{set(t){let e=document.documentElement;if(typeof t=="string"){e.setAttribute("b-theme",t),e.dataset.bsTheme=t;return}for(let[s,o]of Object.entries(t||{})){let a=s==="radius"||s==="--b-radius"?"--base-radius":s.startsWith("--")?s:`--b-${s}`;e.style.setProperty(a,o)}}}});typeof window<"u"&&(window.thebase=d,window.BaseUI=d)});function h(...t){let e=[];for(let s of t)if(s){if(typeof s=="string")e.push(s);else if(Array.isArray(s)){let o=h(...s);o&&e.push(o)}else if(typeof s=="object")for(let[o,a]of Object.entries(s))a&&e.push(o)}return e.join(" ")}function i(t){return{type:t,optional:!0}}function K(t,e,s){return t[e]??(s?t[s]:void 0)}function D(t){return t===!0||t==="open"||t==="on"||t==="active"}function H(...t){let e=[];for(let s of t)if(s){if(typeof s=="string"){let o=s.trim().replace(/;$/,"");o&&e.push(o)}else if(typeof s=="object")for(let[o,a]of Object.entries(s)){if(a==null||a==="")continue;let n=o.replace(/[A-Z]/g,l=>"-"+l.toLowerCase());e.push(`${n}:${a}`)}}return e.join(";")}function M(t){return t.state!==void 0?D(t.state):t.open!==void 0?t.open:t["default-open"]!==void 0?t["default-open"]:t.defaultOpen??!1}function ne(t){return t.state!==void 0||t.open!==void 0}var p,v=St(()=>{p={className:i(String),style:i([String,Object]),slots:i(Object)}});var B,An,ea,En,Cn,kn,Ln,Nn,On,ce,Bn,wi,Si,In,T,P,Tn,le,Rn,$n,ot,q,j,qn,Un,Pn,L,Mn,Y,_n,rs,A,y,zn,Dn,jn,Fn,Jr,Ai=St(()=>{B=globalThis.owl;if(!B)throw new Error("BaseUI: load dist/baseui.min.js or dist/baseui.esm.js before this script (globalThis.owl is not set).");An=B.App,ea=B.Component,En=B.EventBus,Cn=B.OwlError,kn=B.__info__,Ln=B.batched,Nn=B.blockDom,On=B.htmlEscape,ce=B.loadFile,Bn=B.markRaw,wi=B.markup,Si=B.mount,In=B.onError,T=B.onMounted,P=B.onPatched,Tn=B.onRendered,le=B.onWillDestroy,Rn=B.onWillPatch,$n=B.onWillRender,ot=B.onWillStart,q=B.onWillUnmount,j=B.onWillUpdateProps,qn=B.reactive,Un=B.status,Pn=B.toRaw,L=B.useChildSubEnv,Mn=B.useComponent,Y=B.useEffect,_n=B.useEnv,rs=B.useExternalListener,A=B.useRef,y=B.useState,zn=B.useSubEnv,Dn=B.validate,jn=B.validateType,Fn=B.whenReady,Jr=B.xml});function sa(t){Object.assign(Pr,t)}function Hn(t){let e=t.components;e?e!==Pr&&Object.getPrototypeOf(e)===Object.prototype&&Object.setPrototypeOf(e,Pr):t.components=Object.create(Pr)}function oa(t){return typeof t!="string"||!/\st-(att|attf|model)([.\s=-]|$)/.test(t)?t:t.replace(/<([A-Z][\w.:-]*)(\s[^<>]*?)?(\/?)>/g,(e,s,o="",a="")=>`<${s}${Wn(s,o)}${a}>`)}function Wn(t,e){let s=/\st-(att|attf|model|on)([.\s=-]|$)/.test(e),o=e.replace(/(\s)t-att\s*=/g,"$1t-props=").replace(/(\s)t-att-([A-Za-z_][\w:.-]*)\s*=/g,"$1$2=").replace(/(\s)t-attf-([A-Za-z_][\w:.-]*)\s*=\s*(["'])(.*?)\3/g,(a,n,l,u,b)=>`${n}${l}=${u}${Gn(b)}${u}`);return o=o.replace(/(\s)t-model((?:\.[\w-]+)*)\s*=\s*(["'])(.*?)\3/g,(a,n,l,u,b)=>Jn(t,n,l,u,b,o)),s?Kn(o):o}function Kn(t){return t.replace(/(\s)([A-Za-z_][\w:.-]*)\s*=\s*(["'])(.*?)\3/g,(e,s,o,a,n)=>o.startsWith("t-")||o==="t-props"||Zn(n)?e:`${s}${o}=${a}${Vn(n)}${a}`)}function Vn(t){return`'${t.replace(/\\/g,"\\\\").replace(/'/g,"\\'")}'`}function Zn(t){let e=t.trim();return!e||/^(['"`[{(]|-?\d+(?:\.\d+)?$)/.test(e)||/[?.()[\]+*/]|=>|===|!==|&&|\|\|/.test(e)||/^(true|false|null|undefined)$/.test(e)}function Gn(t){return`\`${t.replace(/`/g,"\\`").replace(/{{\s*([\s\S]*?)\s*}}|#\{\s*([\s\S]*?)\s*\}/g,(e,s,o)=>`\${${s||o}}`)}\``}function Jn(t,e,s,o,a,n){let l=/^(Checkbox|Switch)$/.test(t),u=Xn(t,s),b=l?"checked":"value",m=new RegExp(`\\s${b}\\s*=`).test(n)?"":`${e}${b}=${o}${a}${o}`,f=new RegExp(`\\s${u}\\s*=`).test(n)?"":`${e}${u}=${o}${Yn(a,s,l)}${o}`;return`${m}${f}`}function Xn(t,e){return e.includes(".lazy")?"onChange":/^(Input|Textarea)$/.test(t)?"onInput":"onChange"}function Yn(t,e,s){if(s)return`(value) => { ${t} = value; }`;let o="value";return e.includes(".trim")&&(o=`(typeof ${o} === 'string' ? ${o}.trim() : ${o})`),e.includes(".number")&&(o=`Number.isNaN(Number(${o})) ? ${o} : Number(${o})`),`(value) => { ${t} = ${o}; }`}function ra(t,...e){return Array.isArray(t?.raw)?Jr({raw:t.raw.map(oa)},...e):Jr(t,...e)}function is(t,e,s={}){let o=oa(s.templates);return t.components={...Pr,...t.components||{}},Si(t,e,o===s.templates?s:{...s,templates:o})}async function Zu(t){let e=await(await fetch(t,{cache:"reload"})).text(),o=new DOMParser().parseFromString(e,"application/xml").querySelector("templates > t[t-name]");return o?o.innerHTML:e}var Ku,Vu,Pr,c,w=St(()=>{Ai();Ai();Ku=Si,Vu=Jr,Pr={};c=class extends ea{constructor(...e){super(...e),Hn(this.constructor)}}});function ec(t){return typeof Image>"u"?Promise.resolve(!0):(Ei.has(t)||Ei.set(t,new Promise(e=>{let s=new Image;s.onload=()=>e(!0),s.onerror=()=>e(!1),s.src=t})),Ei.get(t))}function Xr(t){return String(t||"").trim().replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase()}function Mr(t,e={}){let s=Xr(t);if(!tc.test(s))throw new Error(`BaseUI icon name is invalid: ${t}`);return`${String(e.baseUrl||d.icons.lucide.cdnBaseUrl).replace(/\/+$/,"")}/${s}.svg`}function _(t,e,s={}){let o=s.url||Mr(e,s),a=s.label??t.getAttribute("aria-label")??"";t.classList.add("b-icon"),t.style.setProperty("--b-icon-url",`url("${o.replace(/"/g,"%22")}")`),(s.size||t.getAttribute("b-att-size"))&&t.style.setProperty("--b-icon-size",s.size||t.getAttribute("b-att-size")),a?(t.setAttribute("role","img"),t.setAttribute("aria-label",a)):t.setAttribute("aria-hidden","true");let n=s.fallback===!1?null:s.fallback||Yr;return n&&!s.url&&Xr(e)!==Xr(n)&&ec(o).then(l=>{if(l||!t.isConnected)return;let u=Mr(n,s);t.style.setProperty("--b-icon-url",`url("${u.replace(/"/g,"%22")}")`)}),t}var ia,Qn,Yr,tc,Ei,rt=St(()=>{S();ia="1.31.0",Qn=`https://cdn.jsdelivr.net/npm/lucide-static@${ia}/icons`,Yr="file",tc=/^[a-z0-9][a-z0-9-]*$/,Ei=new Map;d.icons={...d.icons||{},lucide:{version:ia,cdnBaseUrl:Qn,normalizeName:Xr,url:Mr,render:_}}});var W,V,ns=St(()=>{W={default:"btn-primary",secondary:"btn-secondary",destructive:"btn-danger",outline:"btn-outline-secondary",ghost:"btn-light",link:"btn-link"},V={xs:"btn-xs",sm:"btn-sm",lg:"btn-lg",icon:"btn-icon","icon-xs":"btn-icon-xs","icon-sm":"btn-icon-sm","icon-lg":"btn-icon-lg"}});function Qr({variant:t="default",size:e,className:s}={}){return h("btn","b-button","b-clipboard-button",W[t]||W.default,V[e],s)}async function cs(t){let e=String(t??"");if(globalThis.navigator?.clipboard?.writeText)try{await globalThis.navigator.clipboard.writeText(e);return}catch{}if(typeof document>"u")throw new Error("BaseUI ClipboardButton: no clipboard API available in this environment.");let s=document.createElement("textarea");s.value=e,s.setAttribute("readonly",""),s.style.position="fixed",s.style.opacity="0",s.style.pointerEvents="none",document.body.append(s),s.select(),s.setSelectionRange(0,e.length);let o;try{o=document.execCommand("copy")}catch{o=!1}if(s.remove(),!o)throw new Error("BaseUI ClipboardButton: clipboard copy is unavailable in this browser/context.")}var Ci,ti=St(()=>{v();ns();Ci=["btn","b-button","b-clipboard-button",...Object.values(W),...Object.values(V)]});var Ua={};Ji(Ua,{destroyBaseUiPreviews:()=>Cr,enhanceMarkdownDiagrams:()=>Hr,expandSelfClosingTags:()=>yl,extractTagCaseMap:()=>rl,mountMarkdownEditor:()=>Wr,normalizeOwlPreviewMarkup:()=>wl,parseMarkdown:()=>Fr,primeBaseUiTemplates:()=>Sl,renderBaseUiBlocks:()=>qa,renderMermaidBlocks:()=>Ra});function Yc(){return Ti??(Ti=import("./runtime/marked/marked.min.js").then(t=>{let e=t.marked||t.default?.marked||globalThis.marked;if(!e?.parse)throw new Error("BaseUI markdown: failed to load src/runtime/marked/marked.min.js");return e})),Ti}function Qc(t){let e=t.closest("[data-bs-theme]")?.getAttribute("data-bs-theme")||document.documentElement.getAttribute("data-bs-theme");return(e?e==="dark":window.matchMedia?.("(prefers-color-scheme: dark)").matches)?"dark":"default"}function tl(){return Ri??(Ri=import("./runtime/mermaid/mermaid.esm.min.mjs").then(t=>{let e=t.default||t;return e.initialize({startOnLoad:!1,securityLevel:"strict"}),e})),Ri}function el(){return $i??($i=import("./runtime/milkdown/milkdown-editor.js")),$i}async function Fr(t,e={}){return(await Yc()).parse(String(t??""),{gfm:!0,breaks:!1,...e})}function Ui(t,e,s,o=""){t.classList.add("b-markdown-diagram-error"),t.replaceChildren();let a=document.createElement("p");if(a.className="b-markdown-diagram-error-message",a.textContent=`Unable to render ${e} diagram: ${s?.message||s}`,t.append(a),o){let n=document.createElement("pre"),l=document.createElement("code");l.textContent=o,n.append(l),t.append(n)}}async function Ra(t){let e=[...t.querySelectorAll("pre > code.language-mermaid")];if(!e.length)return;let s;try{s=await tl()}catch(o){e.forEach(a=>{let n=a.closest("pre");n.replaceChildren(),n.className="b-markdown-diagram b-markdown-mermaid",Ui(n,"mermaid",o,a.textContent)});return}s.initialize({startOnLoad:!1,securityLevel:"strict",theme:Qc(t)});for(let o of e){let a=o.textContent,n=o.closest("pre");n.replaceChildren(),n.className="b-markdown-diagram b-markdown-mermaid";try{let{svg:l}=await s.render(`b-mermaid-${++Xc}`,a);n.innerHTML=l}catch(l){Ui(n,"mermaid",l,a)}}}function sl(t){let e=globalThis.thebase;if(!e?.mountAll)return;let s=document.createElement("div");s.setAttribute("b-ui","toast"),s.setAttribute("b-att-state","open"),s.setAttribute("b-att-delay","2000"),s.className="b-markdown-b-copy-toast",s.textContent=t,document.body.append(s),e.mountAll(s),s.addEventListener("baseui:close",()=>s.remove(),{once:!0})}function ol(t){let e=document.createElement("div");e.className="b-markdown-b-code";let s=document.createElement("button");s.type="button",s.className="b-markdown-b-copy";let o=document.createElement("span");_(o,"copy",{label:"Copy code"}),s.append(o),s.addEventListener("click",async()=>{try{await cs(t),s.dispatchEvent(new CustomEvent("baseui:markdown-copy",{bubbles:!0,detail:{source:t}})),sl("Copied to clipboard")}catch(l){s.dispatchEvent(new CustomEvent("baseui:markdown-copy-error",{bubbles:!0,detail:{error:l}}))}}),e.append(s);let a=document.createElement("pre"),n=document.createElement("code");n.className="b-markdown-b-code-lines";for(let l of t.replace(/\n$/,"").split(`
|
|
11
|
-
`)){let u=document.createElement("span");u.className="b-markdown-b-code-line",u.textContent=l,n.append(u)}return a.append(n),e.append(a),e}function Oa(t){return t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}function rl(t){let e=new Map;for(let s of t.matchAll(/<\/?([A-Z][A-Za-z0-9]*)\b/g))e.set(s[1].toLowerCase(),s[1]);return e}function il(t){return e=>{if(e.hasAttribute("b-ui"))return e;let s=globalThis.thebase,o=t.get(e.localName)||e.localName,a=Oa(o),n=!!s?.component?.(a),l=U(e.getAttribute("className")||e.getAttribute("class"));if(!n){let u=`b-${a}`;return e.className=l?`${u} ${l}`:u,e}e.setAttribute("b-ui",a),l&&(e.className=l);for(let u of[...e.attributes]){if(u.name==="class"||u.name==="className"||u.name==="b-ui"||/^on[A-Z]/.test(u.name))continue;let b=U(u.value);e.removeAttribute(u.name),!(b===""||b==="false")&&e.setAttribute(`b-att-${Oa(u.name)}`,b==="true"?"true":b)}return e}}function U(t){if(!t)return"";let e=t.trim();return e.startsWith("'")&&e.endsWith("'")||e.startsWith('"')&&e.endsWith('"')?e.slice(1,-1):e}function pi(t,e){for(;t.firstChild;)e.append(t.firstChild)}function st(t,e){return pi(t,e),t.replaceWith(e),e}function al(t){let e=document.createElement("div");e.setAttribute("b-field-group","");let s=U(t.getAttribute("className")||t.getAttribute("class"));return s&&(e.className=s),st(t,e)}function nl(t){let e=document.createElement("div");e.setAttribute("b-ui","field");let s=U(t.getAttribute("orientation")||""),o=U(t.getAttribute("className")||t.getAttribute("class"));return s&&e.setAttribute("b-att-orientation",s),o&&(e.className=o),st(t,e)}function cl(t){let e=document.createElement("label");e.setAttribute("b-field-label","");let s=U(t.getAttribute("for")||""),o=U(t.getAttribute("className")||t.getAttribute("class"));return s&&e.setAttribute("for",s),o&&(e.className=o),st(t,e)}function Ba(t,e,s){let o=document.createElement(e);o.setAttribute(s,"");let a=U(t.getAttribute("className")||t.getAttribute("class"));return a&&(o.className=a),st(t,o)}function ll(t){let e=t.getAttribute("type")||"",s=t.hasAttribute("variant")||t.hasAttribute("size")||t.hasAttribute("className")||t.hasAttribute("onClick")||t.hasAttribute("label")||e.trim().startsWith("'")||e.trim().startsWith('"');if(t.hasAttribute("b-ui")||!s)return t;let o=document.createElement("button");o.setAttribute("b-ui","button");let a=U(e||"button"),n=U(t.getAttribute("variant")||""),l=U(t.getAttribute("size")||""),u=U(t.getAttribute("className")||t.getAttribute("class")),b=U(t.getAttribute("label")||"");return o.type=a||"button",n&&o.setAttribute("b-att-variant",n),l&&o.setAttribute("b-att-size",l),u&&(o.className=u),b&&!t.childNodes.length&&(o.textContent=b),st(t,o)}function pl(t){if(t.hasAttribute("b-ui")||t.hasAttribute("b-icon"))return t;let e=U(t.getAttribute("name")||t.getAttribute("icon")||"");if(!e)return t;let s=document.createElement("span");s.setAttribute("b-ui","icon"),s.setAttribute("b-att-icon",e);let o=U(t.getAttribute("size")||""),a=U(t.getAttribute("label")||""),n=U(t.getAttribute("className")||t.getAttribute("class"));return o&&s.setAttribute("b-att-size",o),a&&s.setAttribute("b-att-label",a),n&&(s.className=n),st(t,s)}function ul(t){if(t.hasAttribute("b-ui"))return t;let e=document.createElement("div");e.setAttribute("b-ui","alert");let s=U(t.getAttribute("variant")||""),o=U(t.getAttribute("className")||t.getAttribute("class"));return s&&e.setAttribute("b-att-variant",s),o&&(e.className=o),st(t,e)}function qi(t){return e=>{if(e.hasAttribute("b-ui"))return e;let s=document.createElement("div"),o=U(e.getAttribute("className")||e.getAttribute("class"));return s.className=o?`${t} ${o}`:t,st(e,s)}}function dl(t){if(t.hasAttribute("b-ui"))return t;let e=document.createElement("div");e.setAttribute("b-ui","accordion"),U(t.getAttribute("multiple"))==="true"&&e.setAttribute("b-att-multiple","true");let s=U(t.getAttribute("className")||t.getAttribute("class"));return s&&(e.className=s),st(t,e)}function bl(t){if(t.hasAttribute("b-accordion-item"))return t;let e=document.createElement("div");e.setAttribute("b-accordion-item",""),U(t.getAttribute("state"))==="open"&&e.setAttribute("b-att-state","open");let s=U(t.getAttribute("className")||t.getAttribute("class"));return s&&(e.className=s),st(t,e)}function hl(t){if(t.hasAttribute("b-accordion-trigger"))return t;let e=document.createElement("button");e.type="button",e.setAttribute("b-accordion-trigger","");let s=U(t.getAttribute("className")||t.getAttribute("class"));s&&(e.className=s),pi(t,e);let o=document.createElement("span");return o.setAttribute("b-icon","chevron-down"),o.className="b-accordion-trigger-icon",e.append(o),t.replaceWith(e),e}function ml(t){if(t.hasAttribute("b-accordion-panel"))return t;let e=document.createElement("div");e.setAttribute("b-accordion-panel","");let s=U(t.getAttribute("className")||t.getAttribute("class"));return s&&(e.className=s),st(t,e)}function fl(t){return Ia+=1,`${t}-${Ia}`}function et(t,e,s){return o=>{if(o.hasAttribute("b-ui"))return o;let a=document.createElement(t);t==="button"&&(a.type="button"),s&&a.setAttribute(s,"");let n=U(o.getAttribute("className")||o.getAttribute("class"));return a.className=n?`${e} ${n}`:e,st(o,a)}}function gl(){let t=document.createElement("button");t.type="button",t.className="btn b-button btn-light btn-icon-sm b-dialog-close b-dialog-close-control",t.setAttribute("b-dialog-close",""),t.setAttribute("aria-label","Close");let e=document.createElement("span");e.setAttribute("b-ui","icon"),e.setAttribute("b-att-icon","x");let s=document.createElement("span");return s.className="visually-hidden",s.textContent="Close",t.append(e,s),t}function Ta({tagPrefix:t,componentName:e,triggerTag:s,triggerClassName:o,panelClassName:a,closeButton:n}){return l=>{if(l.hasAttribute("b-ui"))return l;let u=l.querySelector(`:scope > ${t}trigger`),b=l.querySelector(`:scope > ${t}content`);if(!b)return l;let m=fl(`b-preview-${e}`),f=document.createElement(s);s==="button"&&(f.type="button"),f.className=o,f.setAttribute("b-att-trigger",`#${m}`),u&&pi(u,f);let g=document.createElement("div");g.setAttribute("b-ui",e),g.id=m,g.setAttribute("b-att-trigger",`[b-att-trigger='#${m}']`);let E=document.createElement("div");E.className=a;let N=U(b.getAttribute("size")||"");return N&&E.setAttribute("data-size",N),pi(b,E),n&&E.append(n()),g.append(E),l.before(f,g),l.remove(),g}}function yl(t){return t.replace(/<([a-zA-Z][a-zA-Z0-9-]*)((?:"[^"]*"|'[^']*'|[^"'>])*?)\/>/g,(e,s,o)=>vl.has(s.toLowerCase())?e:`<${s}${o}></${s}>`)}function xl(t){t.querySelectorAll("t[t-esc]").forEach(e=>{let o=e.getAttribute("t-esc")?.includes(".length")?"0":"";e.replaceWith(document.createTextNode(`${o}${e.textContent||""}`))})}function wl(t,e){xl(t);let s={fieldgroup:al,field:nl,fieldlabel:cl,fielddescription:a=>Ba(a,"p","b-field-description"),fielderror:a=>Ba(a,"p","b-field-error"),button:ll,icon:pl,alert:ul,alerttitle:qi("b-alert-title"),alertdescription:qi("b-alert-description"),alertaction:qi("b-alert-action"),accordion:dl,accordionitem:bl,accordiontrigger:hl,accordioncontent:ml,dialog:Ta({tagPrefix:"dialog",componentName:"dialog",triggerTag:"span",triggerClassName:"b-dialog-trigger",panelClassName:"b-dialog-panel",closeButton:gl}),dialogheader:et("div","b-dialog-header"),dialogfooter:et("div","b-dialog-footer"),dialogtitle:et("h2","b-dialog-title"),dialogdescription:et("p","b-dialog-description"),dialogclose:et("button","btn b-button btn-outline-secondary b-dialog-close","b-dialog-close"),alertdialog:Ta({tagPrefix:"alertdialog",componentName:"alert-dialog",triggerTag:"button",triggerClassName:"btn b-button btn-outline-secondary b-alert-dialog-trigger",panelClassName:"b-dialog-panel b-alert-dialog-panel"}),alertdialogheader:et("div","b-dialog-header b-alert-dialog-header"),alertdialogfooter:et("div","b-dialog-footer b-alert-dialog-footer"),alertdialogmedia:et("div","b-alert-dialog-media"),alertdialogtitle:et("h2","b-dialog-title b-alert-dialog-title"),alertdialogdescription:et("p","b-dialog-description b-alert-dialog-description"),alertdialogcancel:et("button","btn b-button btn-outline-secondary b-alert-dialog-cancel","b-alert-dialog-cancel"),alertdialogaction:et("button","btn b-button btn-primary b-alert-dialog-action","b-alert-dialog-action")},o=il(e);for(let a of[...t.querySelectorAll("*")]){let n=a.localName.toLowerCase();s[n]?s[n](a):e.has(n)&&o(a)}}function Sl(t){li=Promise.resolve(t)}function Al(){return li??(li=ce("/dist/baseui.templates.xml")),li}function Cr(t){let e=Pi.get(t);if(e){Pi.delete(t);for(let s of e)try{s.destroy()}catch{}}}function Cl(t){return new Set([...t.matchAll(El)].map(e=>e[1]))}function Nl(t){let e=new Set;for(let s of t.matchAll(kl))e.add(s[1]);for(let s of t.matchAll(Ll))e.add(s[2]);return e}function Ol(t){let e=ra({raw:[t]}),s=Cl(t);class o extends c{setup(){this.state=y(Object.fromEntries([...s].map(n=>[n,""])))}}r(o,"template",e);for(let a of Nl(t))o.prototype[a]=function(){};return o}function $a(t){t.querySelector("[data-slot='dropdown-menu'], .b-dropdown-menu, [b-ui='dropdown-menu'], [b-dropdown-menu]")&&t.classList.add("b-markdown-b-preview-overlay")}async function Bl(t,e){let[s,o]=await Promise.all([Al(),Ol(e)]),a=await is(o,t,{templates:s});return $a(t),a}function Il(t,e){let s=globalThis.thebase;if(!s?.mountAll)throw new Error("BaseUI runtime not found on the page \u2014 load dist/baseui.min.js before mounting Markdown.");t.innerHTML=e,$a(t),s.mountAll(t)}async function qa(t){Cr(t);let e=[...t.querySelectorAll("pre > code.language-base-ui")];if(!e.length)return;let s=new Set;for(let o of e){let a=o.textContent,n=o.closest("pre");n.replaceChildren(),n.className="b-markdown-live b-markdown-baseui";let l=document.createElement("div");l.className="b-markdown-b-preview",n.append(l,ol(a));try{/<[A-Z]/.test(a)?s.add(await Bl(l,a)):Il(l,a)}catch(u){Ui(n,"BaseUI component",u,a)}}s.size&&Pi.set(t,s)}function Tl(t){for(let e of t.querySelectorAll("li > input[type=checkbox]:not([aria-label])"))e.setAttribute("aria-label",e.parentElement.textContent.trim())}async function Hr(t,{mermaid:e=!0,baseUi:s=!0}={}){Tl(t),e&&await Ra(t),s&&await qa(t)}async function Wr(t){return(await el()).createMilkdownMarkdownEditor(t)}var Ti,Ri,$i,Xc,Ia,vl,li,Pi,El,kl,Ll,ui=St(()=>{w();rt();ti();Xc=0;Ia=0;vl=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]);Pi=new WeakMap;El=/\bstate\.([A-Za-z_$][\w$]*)/g;kl=/\bthis\.([A-Za-z_$][\w$]*)\s*\(/g,Ll=/\bt-on-[\w:-]+\s*=\s*(["'])([A-Za-z_$][\w$]*)\1/g});S();v();var ta="1.2.0";w();var Wi={};Ji(Wi,{Accordion:()=>go,AccordionContent:()=>yo,AccordionItem:()=>vo,AccordionTrigger:()=>ke,Alert:()=>ct,AlertAction:()=>ps,AlertDescription:()=>At,AlertDialog:()=>Ps,AlertDialogAction:()=>ve,AlertDialogCancel:()=>ge,AlertDialogContent:()=>Ms,AlertDialogDescription:()=>Fs,AlertDialogFooter:()=>zs,AlertDialogHeader:()=>_s,AlertDialogMedia:()=>Ds,AlertDialogTitle:()=>js,AlertDialogTrigger:()=>fe,AlertTitle:()=>ls,ApiDoc:()=>xt,ApiDocGroup:()=>wt,AspectRatio:()=>pr,Attachment:()=>Jo,AttachmentAction:()=>Ke,AttachmentActions:()=>er,AttachmentContent:()=>Yo,AttachmentDescription:()=>tr,AttachmentDropzone:()=>or,AttachmentGroup:()=>sr,AttachmentMedia:()=>Xo,AttachmentTitle:()=>Qo,AttachmentTrigger:()=>Ve,Avatar:()=>rr,Badge:()=>Q,BlockViewer:()=>ts,Breadcrumb:()=>Wt,BreadcrumbEllipsis:()=>Ne,BreadcrumbItem:()=>Vt,BreadcrumbLink:()=>Zt,BreadcrumbList:()=>Kt,BreadcrumbPage:()=>Gt,BreadcrumbSeparator:()=>ht,Bubble:()=>ur,Button:()=>x,ButtonGroup:()=>hr,ButtonGroupSeparator:()=>mr,ButtonGroupText:()=>fr,Calendar:()=>Fe,Card:()=>us,CardBody:()=>bs,CardDescription:()=>fs,CardFooter:()=>hs,CardHeader:()=>ds,CardTitle:()=>ms,Carousel:()=>Ko,CarouselNext:()=>We,CarouselPrevious:()=>He,CarouselSlide:()=>Vo,Chart:()=>Wo,Checkbox:()=>_t,ClipboardButton:()=>nt,CodeEditor:()=>de,Collapsible:()=>xo,CollapsibleContent:()=>wo,CollapsibleTrigger:()=>Le,Combobox:()=>Fo,Command:()=>Ho,ContextMenu:()=>bo,ContextMenuContent:()=>mo,ContextMenuItem:()=>fo,ContextMenuTrigger:()=>ho,DataTable:()=>je,DatePicker:()=>jo,Dialog:()=>It,DialogClose:()=>be,DialogContent:()=>pt,DialogDescription:()=>qt,DialogFooter:()=>Rt,DialogHeader:()=>Tt,DialogTitle:()=>$t,DialogTrigger:()=>gs,Direction:()=>dr,Drawer:()=>Hs,DrawerClose:()=>xe,DrawerContent:()=>Ws,DrawerDescription:()=>Gs,DrawerFooter:()=>Vs,DrawerHeader:()=>Ks,DrawerTitle:()=>Zs,DrawerTrigger:()=>ye,DropdownMenu:()=>zt,DropdownMenuCheckboxItem:()=>Ee,DropdownMenuContent:()=>Dt,DropdownMenuGroup:()=>no,DropdownMenuItem:()=>jt,DropdownMenuLabel:()=>co,DropdownMenuRadioGroup:()=>lo,DropdownMenuRadioItem:()=>Ce,DropdownMenuSeparator:()=>po,DropdownMenuShortcut:()=>uo,DropdownMenuSub:()=>Ft,DropdownMenuSubContent:()=>Ht,DropdownMenuSubTrigger:()=>dt,DropdownMenuTrigger:()=>ut,Empty:()=>vs,EmptyContent:()=>As,EmptyDescription:()=>Ss,EmptyHeader:()=>ys,EmptyMedia:()=>xs,EmptyTitle:()=>ws,Field:()=>ee,FieldContent:()=>yr,FieldDescription:()=>oe,FieldError:()=>re,FieldGroup:()=>te,FieldLabel:()=>se,FieldLegend:()=>vr,FieldSeparator:()=>wr,FieldSet:()=>gr,FieldTitle:()=>xr,Form:()=>os,HoverCard:()=>ro,HoverCardContent:()=>ao,HoverCardTrigger:()=>io,Icon:()=>R,Input:()=>kt,InputOtp:()=>Bs,Item:()=>br,Kbd:()=>Et,Label:()=>Sr,Markdown:()=>yt,MarkdownTree:()=>Qe,MarkdownTreeNode:()=>Vr,Marker:()=>ks,Menubar:()=>ko,Message:()=>ir,MessageScroller:()=>ar,NativeSelect:()=>Mt,NavigationMenu:()=>Eo,NavigationMenuItem:()=>Co,Pagination:()=>So,PaginationItem:()=>Ao,Popover:()=>so,PopoverContent:()=>oo,PopoverTrigger:()=>Ae,Progress:()=>lr,Pwa:()=>Lr,PwaBody:()=>Tr,PwaClose:()=>ss,PwaContent:()=>Nr,PwaDescription:()=>Ir,PwaFooter:()=>$r,PwaHeader:()=>Or,PwaSteps:()=>Rr,PwaTitle:()=>Br,PwaTrigger:()=>es,Questionnaire:()=>nr,QuestionnaireNext:()=>Ge,QuestionnairePrevious:()=>Ze,QuestionnaireStep:()=>cr,RadioGroup:()=>Ls,RadioGroupItem:()=>Ns,Resizable:()=>Zo,ScrollArea:()=>Go,Select:()=>Ts,SelectContent:()=>Rs,SelectItem:()=>$s,SelectTrigger:()=>me,Separator:()=>Es,Sheet:()=>Js,SheetClose:()=>Se,SheetContent:()=>Xs,SheetDescription:()=>eo,SheetFooter:()=>Qs,SheetHeader:()=>Ys,SheetTitle:()=>to,SheetTrigger:()=>we,Shell:()=>Ue,ShellContent:()=>Me,ShellHeader:()=>zo,ShellMain:()=>_o,ShellNav:()=>Mo,ShellSidebar:()=>Pe,ShellSidebarHeader:()=>Po,ShellUserMenu:()=>_e,Sidebar:()=>ft,SidebarClose:()=>Ie,SidebarContent:()=>Jt,SidebarFooter:()=>No,SidebarGroup:()=>Xt,SidebarGroupAction:()=>Te,SidebarGroupCollapsible:()=>Re,SidebarGroupContent:()=>To,SidebarGroupLabel:()=>Yt,SidebarHeader:()=>Lo,SidebarInput:()=>Bo,SidebarInset:()=>Oo,SidebarMenu:()=>gt,SidebarMenuAction:()=>$e,SidebarMenuBadge:()=>$o,SidebarMenuButton:()=>mt,SidebarMenuItem:()=>Qt,SidebarMenuSkeleton:()=>qo,SidebarMenuSub:()=>Ro,SidebarMenuSubButton:()=>qe,SidebarMenuSubItem:()=>Uo,SidebarProvider:()=>jr,SidebarRail:()=>Be,SidebarSeparator:()=>Io,SidebarTrigger:()=>Oe,Skeleton:()=>Ut,Slider:()=>Os,Spinner:()=>Ct,Switch:()=>he,TabContent:()=>Bt,TabTrigger:()=>lt,Table:()=>Do,Tabs:()=>Lt,TabsContainer:()=>Nt,TabsList:()=>Ot,TextEditor:()=>qr,Textarea:()=>Pt,ThemeButton:()=>vt,Toast:()=>bt,Toggle:()=>Je,ToggleGroup:()=>Er,ToggleGroupItem:()=>Xe,Tooltip:()=>at,Typography:()=>Cs,createNamedIcon:()=>as,findMarkdownTreeNode:()=>Fi,iconComponentName:()=>Ca});w();v();w();rt();v();var R=class extends c{setup(){this.state=y({failed:!1}),Y(e=>{if(this.state.failed=!1,typeof Image>"u"||!e||e===Yr)return;let s=new Image;return s.onerror=()=>{this.state.failed=!0},s.src=this.buildUrl(e),()=>{s.onload=null,s.onerror=null}},()=>[this.name])}buildUrl(e){return Mr(e,{baseUrl:K(this.props,"base-url","baseUrl")})}get name(){return K(this.props,"icon","name")}get url(){return this.buildUrl(this.state.failed?Yr:this.name)}get style(){let e=[`--b-icon-url:url("${this.url.replace(/"/g,"%22")}")`];return this.props.size&&e.push(`--b-icon-size:${this.props.size}`),H(e.join(";"),this.props.style)}get classNames(){return h("b-icon",this.props.className)}};r(R,"template","baseui.Icon"),r(R,"props",{icon:i(String),name:i(String),label:i(String),title:i(String),size:i(String),"base-url":i(String),baseUrl:i(String),className:i(String),style:i([String,Object])});function as(t){return class extends R{get name(){return K(this.props,"icon","name")||t}}}ns();var x=class extends c{setup(){this.rootRef=A("root"),this.props.getRef&&(T(()=>this.props.getRef(this.rootRef.el)),q(()=>this.props.getRef(null)))}get classNames(){return this.props.unstyled?h(this.props.className):h("btn","b-button",W[this.props.variant]||W.default,V[this.props.size],this.isIconOnly&&"b-button-icon",this.props.className)}get iconPosition(){return K(this.props,"icon-position","iconPosition")==="end"?"end":"start"}get ariaLabel(){return K(this.props,"aria-label","ariaLabel")}get ariaPressed(){return K(this.props,"aria-pressed","ariaPressed")}get ariaInvalid(){let e=K(this.props,"aria-invalid","ariaInvalid");return e===!0?"true":e}get isIconOnly(){return!!(this.props.icon&&!this.props.label&&!this.props.slots?.default)}onClick(e){if(this.props.href&&this.props.disabled){e.preventDefault();return}this.props.onClick?.(e)}};r(x,"template","baseui.Button"),r(x,"components",{Icon:R}),r(x,"props",{variant:i(String),size:i(String),type:i(String),href:i(String),disabled:i(Boolean),label:i(String),icon:i(String),"icon-position":i(String),iconPosition:i(String),unstyled:i(Boolean),attrs:i(Object),getRef:i(Function),...p,id:i(String),title:i(String),"aria-label":i(String),ariaLabel:i(String),"aria-pressed":i(String),ariaPressed:i(String),"aria-invalid":i([String,Boolean]),ariaInvalid:i([String,Boolean]),onClick:i(Function)});w();v();ti();var nt=class extends c{setup(){this.state=y({copied:!1}),this.resetTimer=null,q(()=>window.clearTimeout(this.resetTimer))}get classNames(){return Qr(this.props)}get resetDelay(){return K(this.props,"reset-delay","resetDelay")??2e3}get iconName(){return this.state.copied?this.props.copiedIcon||"check":this.props.icon||"copy"}get label(){return this.state.copied&&this.props.copiedLabel?this.props.copiedLabel:this.props.label}get ariaLabel(){return K(this.props,"aria-label","ariaLabel")||this.label}get attrs(){return{"data-copied":this.state.copied?"true":void 0}}async onClick(e){if(this.props.disabled)return;let s=this.props.getValue?this.props.getValue():this.props.value??"";try{await cs(s),this.state.copied=!0,window.clearTimeout(this.resetTimer),this.resetTimer=window.setTimeout(()=>{this.state.copied=!1},this.resetDelay),this.props.onCopy?.({value:s,event:e})}catch(o){this.props.onCopyError?.({error:o,event:e})}}};r(nt,"template","baseui.ClipboardButton"),r(nt,"components",{Button:x}),r(nt,"props",{variant:i(String),size:i(String),value:i(String),getValue:i(Function),label:i(String),copiedLabel:i(String),icon:i(String),copiedIcon:i(String),"reset-delay":i(Number),resetDelay:i(Number),disabled:i(Boolean),...p,"aria-label":i(String),ariaLabel:i(String),onCopy:i(Function),onCopyError:i(Function)});w();v();w();function k(){let t=globalThis.bootstrap;if(!t)throw new Error("BaseUI: load dist/bootstrap.bundle.min.js before this script (globalThis.bootstrap is not set).");return t}v();var aa={default:"b-alert-default",destructive:"b-alert-destructive",info:"b-alert-default",success:"alert-success",warning:"alert-warning",danger:"b-alert-destructive"},ct=class extends c{setup(){this.rootRef=A("root"),this.bootstrapAlert=null,this.props.dismissible&&(T(()=>{this.bootstrapAlert=new(k()).Alert(this.rootRef.el)}),q(()=>{this.bootstrapAlert?.dispose()}))}get classNames(){return h("alert","b-alert",aa[this.props.variant]||aa.default,this.props.dismissible&&"alert-dismissible",this.props.dismissible&&"fade",this.props.dismissible&&"show",this.props.className)}};r(ct,"template","baseui.Alert"),r(ct,"components",{Button:x}),r(ct,"props",{variant:i(String),dismissible:i(Boolean),...p});var ls=class extends c{};r(ls,"template","baseui.AlertTitle"),r(ls,"props",p);var At=class extends c{};r(At,"template","baseui.AlertDescription"),r(At,"props",p);var ps=class extends c{};r(ps,"template","baseui.AlertAction"),r(ps,"props",p);w();v();var pe={primary:"b-badge-primary",secondary:"b-badge-secondary",success:"b-badge-success",warning:"b-badge-warning",danger:"b-badge-danger",info:"b-badge-info",muted:"b-badge-muted"};var Q=class extends c{get classNames(){return h("badge",pe[this.props.variant]||pe.secondary,this.props.pill&&"rounded-pill",this.props.className)}};r(Q,"template","baseui.Badge"),r(Q,"props",{variant:i(String),pill:i(Boolean),label:i(String),...p});w();v();var Et=class extends c{get classNames(){return h("b-kbd",this.props.className)}};r(Et,"template","baseui.Kbd"),r(Et,"props",{...p});w();v();var Ct=class extends c{get classNames(){return h("b-spinner",this.props.type==="grow"?"spinner-grow":"spinner-border",this.props.className)}get label(){return this.props.label||"Loading"}};r(Ct,"template","baseui.Spinner"),r(Ct,"props",{type:i(String),label:i(String),className:i(String),style:i([String,Object])});var it={line:["//"],block:["/*","*/"],quotes:`"'`},ei={line:["#"],quotes:`"'`},na="auto break case char const continue default do double else enum extern float for goto if inline int long register restrict return short signed sizeof static struct switch typedef union unsigned void volatile while include define ifdef ifndef endif pragma",sc="abstract assert boolean break byte case catch char class const continue default do double else enum extends final finally float for goto if implements import instanceof int interface long native new null package private protected public return short static strictfp super switch synchronized this throw throws transient true false try var void volatile while record",ca="async await break case catch class const continue debugger default delete do else export extends false finally for from function if import in instanceof let new null of return static super switch this throw true try typeof undefined var void while with yield",_r={plaintext:{label:"Plain text",indent:" "},javascript:{label:"JavaScript",...it,quotes:"\"'`",multiline:"`",indent:" ",keywords:ca,builtins:"console document window JSON Math Object Array Promise Map Set Date Number String Boolean Symbol require module exports process"},typescript:{annotations:!0,label:"TypeScript",...it,quotes:"\"'`",multiline:"`",indent:" ",keywords:`${ca} abstract as declare enum implements interface keyof namespace private protected public readonly type`,builtins:"console JSON Math Object Array Promise Map Set Date Number string number boolean any unknown never void Record Partial Readonly"},go:{label:"Go",...it,quotes:"\"'`",multiline:"`",indent:" ",keywords:"break case chan const continue default defer else fallthrough for func go goto if import interface map package range return select struct switch type var nil true false",builtins:"append cap close complex copy delete imag len make new panic print println real recover string int int8 int16 int32 int64 uint uint8 uint16 uint32 uint64 uintptr float32 float64 bool byte rune error any context fmt"},c:{label:"C",...it,indent:" ",keywords:na,builtins:"NULL size_t printf scanf malloc free memcpy memset strlen strcmp FILE stdin stdout stderr uint8_t uint16_t uint32_t uint64_t int8_t int16_t int32_t int64_t bool"},cpp:{label:"C++",...it,indent:" ",keywords:`${na} alignas alignof and bool catch class constexpr const_cast decltype delete dynamic_cast explicit export false friend mutable namespace new noexcept nullptr operator or private protected public reinterpret_cast static_assert static_cast template this throw true try typeid typename using virtual override final`,builtins:"std string vector map set unordered_map unique_ptr shared_ptr cout cin endl size_t NULL"},java:{annotations:!0,label:"Java",...it,indent:" ",keywords:sc,builtins:"String System Object Integer Long Double Boolean List Map Set ArrayList HashMap Exception Override Math"},csharp:{label:"C#",...it,indent:" ",keywords:"abstract as base bool break byte case catch char checked class const continue decimal default delegate do double else enum event explicit extern false finally fixed float for foreach goto if implicit in int interface internal is lock long namespace new null object operator out override params private protected public readonly ref return sbyte sealed short sizeof static string struct switch this throw true try typeof uint ulong unchecked unsafe ushort using var virtual void volatile while async await record",builtins:"Console String List Dictionary Task Math Exception"},kotlin:{annotations:!0,label:"Kotlin",...it,quotes:`"'`,indent:" ",keywords:"abstract as break by catch class companion const constructor continue data do else enum false final finally for fun if import in infix init inline interface internal is lateinit null object open operator override package private protected public return sealed super suspend this throw true try typealias val var when while",builtins:"String Int Long Double Boolean List Map Set Any Unit println"},swift:{label:"Swift",...it,indent:" ",keywords:"as associatedtype break case catch class continue default defer deinit do else enum extension fallthrough false fileprivate for func guard if import in init inout internal is let nil open operator private protocol public repeat rethrows return self static struct subscript super switch throw throws true try typealias var where while async await",builtins:"String Int Double Bool Array Dictionary Set Any print"},rust:{label:"Rust",...it,quotes:'"',indent:" ",keywords:"as async await break const continue crate dyn else enum extern false fn for if impl in let loop match mod move mut pub ref return self Self static struct super trait true type unsafe use where while",builtins:"String Vec Option Result Some None Ok Err Box Rc Arc println format vec i8 i16 i32 i64 u8 u16 u32 u64 usize isize f32 f64 bool str"},php:{label:"PHP",variables:!0,line:["//","#"],block:["/*","*/"],quotes:`"'`,indent:" ",keywords:"abstract and array as break callable case catch class clone const continue declare default do echo else elseif empty extends final finally fn for foreach function global if implements include instanceof interface isset namespace new null or print private protected public require return static switch this throw trait true false try unset use var while yield",builtins:"count strlen array_map array_filter in_array json_encode json_decode var_dump"},python:{annotations:!0,label:"Python",...ei,indent:" ",keywords:"and as assert async await break class continue def del elif else except False finally for from global if import in is lambda None nonlocal not or pass raise return True try while with yield match case",builtins:"print len range str int float bool list dict set tuple open isinstance super self cls enumerate zip map filter sorted sum min max abs"},ruby:{label:"Ruby",...ei,indent:" ",keywords:"BEGIN END alias and begin break case class def defined do else elsif end ensure false for if in module next nil not or redo rescue retry return self super then true undef unless until when while yield",builtins:"puts print require require_relative attr_accessor attr_reader attr_writer lambda proc raise"},bash:{label:"Shell",variables:!0,...ei,indent:" ",keywords:"case do done elif else esac fi for function if in select then until while",builtins:"echo cd ls cat grep sed awk export source exit read printf test set unset local return trap"},sql:{label:"SQL",line:["--"],block:["/*","*/"],quotes:`"'`,indent:" ",ci:!0,keywords:"add all alter and as asc begin between by case check column commit constraint create cross database default delete desc distinct drop else end exists foreign from full group having if in index inner insert into is join key left like limit not null offset on or order outer primary references returning right rollback select set table then transaction union unique update values view when where with",builtins:"count sum avg min max coalesce now cast varchar text integer int bigint boolean timestamp date numeric serial"},json:{label:"JSON",plainWords:!0,keys:!0,quotes:'"',indent:" ",keywords:"true false null"},yaml:{label:"YAML",plainWords:!0,keys:!0,...ei,indent:" ",keywords:"true false null yes no on off"},css:{label:"CSS",plainWords:!0,keys:"prop",dashed:!0,hex:!0,block:["/*","*/"],quotes:`"'`,indent:" ",keywords:"important inherit initial unset auto none",builtins:"var calc rgb rgba hsl hsla url"},html:{label:"HTML",plainWords:!0,tags:!0,block:["<!--","-->"],quotes:`"'`,indent:" "},lua:{label:"Lua",line:["--"],block:["--[[","]]"],quotes:`"'`,indent:" ",keywords:"and break do else elseif end false for function goto if in local nil not or repeat return then true until while",builtins:"assert error ipairs next pairs pcall print select tonumber tostring type unpack xpcall string table math os"}};_r.xml={..._r.html,label:"XML"};var oc={js:"javascript",jsx:"javascript",node:"javascript",ts:"typescript",tsx:"typescript",golang:"go",h:"c","c++":"cpp",cc:"cpp",cxx:"cpp",hpp:"cpp",cs:"csharp","c#":"csharp",kt:"kotlin",rs:"rust",py:"python",rb:"ruby",sh:"bash",shell:"bash",zsh:"bash",postgres:"sql",postgresql:"sql",mysql:"sql",mjs:"javascript",cjs:"javascript",htm:"html",yml:"yaml",svg:"xml",text:"plaintext",txt:"plaintext"},rc={comment:"b-code-comment",string:"b-code-string",number:"b-code-number",keyword:"b-code-keyword",builtin:"b-code-builtin",function:"b-code-function",type:"b-code-type",tag:"b-code-tag",attr:"b-code-attr",meta:"b-code-meta",variable:"b-code-variable",plain:""},Li=/[A-Za-z_$]/,ba=/[A-Za-z0-9_$]/,ha=/[A-Za-z0-9_:-]/,ic=/[0-9A-Za-z_.]/,la=/[0-9]/,ac=/[A-Za-z0-9_-]/,pa=/^#[0-9a-fA-F]{3,8}\b/,nc=/^&#?\w+;/,cc=/[A-Za-z/!?]/,ki=new Map;function ua(t,e){return new Set((t?e?t.toLowerCase():t:"").split(" ").filter(Boolean))}function Dr(t){let e=String(t??"").trim().toLowerCase(),s=oc[e]??e,o=s in _r?s:"plaintext";if(!ki.has(o)){let a=_r[o];ki.set(o,{id:o,...a,keywordSet:ua(a.keywords,a.ci),builtinSet:ua(a.builtins,a.ci)})}return ki.get(o)}function ma(t){let e=String(t??"").split(/[?#]/)[0].split("/").pop();return e.includes(".")?e.split(".").pop().toLowerCase():""}var jd=Object.keys(_r);function zr(t,e,s){let o=e;for(;o<t.length&&s.test(t[o]);)o+=1;return o}function lc(t,e,s){if(s.block&&t.startsWith(s.block[0],e)){let a=t.indexOf(s.block[1],e+s.block[0].length);return a===-1?t.length:a+s.block[1].length}if(!s.line?.some(a=>t.startsWith(a,e)))return-1;let o=t.indexOf(`
|
|
12
|
-
`,e);return o===-1?t.length:o}function fa(t,e,s){let o=t[e],a=s.multiline?.includes(o),n=e+1;for(;n<t.length&&t[n]!==o&&(a||t[n]!==`
|
|
13
|
-
`);)n+=t[n]==="\\"?2:1;return Math.min(t.length,t[n]===o?n+1:n)}function pc(t,e){let s=e-1;for(;s>=0&&/\s/.test(t[s]);)s-=1;return t[s]}function da(t,e,s,o){return!o.keys||!/^\s*:(?!:|\/\/)/.test(t.slice(s,s+8))?!1:o.keys!=="prop"||"{;".includes(pc(t,e))}function uc(t,e,s,o){let a=o.ci?t.slice(e,s).toLowerCase():t.slice(e,s);if(o.keywordSet.has(a))return"keyword";let n=t[e-1]==="."||t[e-1]===":";return o.builtinSet.has(a)&&!n?"builtin":o.plainWords?"plain":/^\s*\(/.test(t.slice(s,s+8))?"function":/^[A-Z][A-Za-z0-9_$]*[a-z]/.test(a)?"type":"plain"}function dc(t,e,s,o){let a=t[e],n=/^(\/|\?)?>/.exec(t.slice(e,e+2));return n?(o.inTag=!1,["tag",e+n[0].length]):s.quotes.includes(a)?["string",fa(t,e,s)]:Li.test(a)?["attr",zr(t,e+1,ha)]:["plain",e+1]}function bc(t,e,s){if(t[e]==="<"&&cc.test(t[e+1]??""))return s.inTag=!0,["tag",zr(t,e+2,ha)];let o=t[e]==="&"?nc.exec(t.slice(e,e+12)):null;return o?["number",e+o[0].length]:["plain",e+1]}function hc(t,e,s){let o=t[e];return!(o==="$"&&s.variables||o==="@"&&s.annotations)||!Li.test(t[e+1]??"")?null:[o==="$"?"variable":"meta",zr(t,e+2,ba)]}function mc(t,e,s,o,a){let n=t[e];if(a.inTag)return dc(t,e,s,a);let l=lc(t,e,s);if(l!==-1)return["comment",l];if(s.tags)return bc(t,e,a);if(s.quotes?.includes(n)){let E=fa(t,e,s);return[da(t,e,E,s)?"attr":"string",E]}if(s.hex&&n==="#"&&pa.test(t.slice(e,e+10)))return["number",e+pa.exec(t.slice(e,e+10))[0].length];if(la.test(n)||n==="."&&la.test(t[e+1]??""))return["number",zr(t,e+1,ic)];let u=hc(t,e,s);if(u)return u;let b=s.dashed&&n==="-"&&/[A-Za-z-]/.test(t[e+1]??"");if(!Li.test(n)&&!b)return["plain",e+1];let m=zr(t,e+1,s.dashed?ac:ba);if(da(t,e,m,s))return["attr",m];let f=uc(t,e,m,s);return[f==="plain"&&o.has(t.slice(e,m))&&t[e-1]!=="."?"builtin":f,m]}function si(t,e,s=[]){let o=Dr(e),a=new Set(s),n={inTag:!1},l=[],u=0;for(;u<t.length;){let[b,m]=mc(t,u,o,a,n),f=t.slice(u,m),g=l[l.length-1];b==="plain"&&g?.kind==="plain"?g.text+=f:l.push({kind:b,text:f,className:rc[b]}),u=m}return l}function ga(t,e){return t.startsWith(" ")?1:/^ */.exec(t.slice(0,e.length))[0].length}var fc=new Set(["javascript","typescript","go","c","cpp","java","csharp","kotlin","swift","rust","php","css","lua","html","xml"]),gc=new Set("area base br col embed hr img input link meta source track wbr".split(" ")),vc=/^[}\])]+/,yc=/\b(function|if|for|while|repeat)\b/g,xc=/\b(end|until)\b/g,wc=/^(else|elseif)\b/,Sc=/^(end|until)\b/;function ue(t,e){return(t.match(e)??[]).length}function Ac(t,e){let s=new Uint8Array(t.length),o="",a=0;for(let{kind:n,text:l}of si(t,e)){let u=n==="comment"||n==="string";o+=u?l.replace(/[^\n]/g," "):l,u&&s.fill(1,a,a+l.length),a+=l.length}return{masked:o,inside:s}}function Ec(t,e){let s=u=>!(e&&gc.has(u.toLowerCase())),o=[...t.matchAll(/<([A-Za-z][\w:.-]*)/g)].filter(u=>s(u[1])).length,a=[...t.matchAll(/<([A-Za-z][\w:.-]*)[^<>]*\/>/g)].filter(u=>s(u[1])).length,n=t.includes("<")?0:ue(t,/\/>/g);return{leading:ue(/^(?:<\/[^>]*>\s*)+/.exec(t)?.[0]??"",/<\//g),net:o-a-n-ue(t,/<\//g)}}function Cc(t,e){let s=t.trim();if(e.tags)return Ec(s,e.id==="html");let o=e.id==="lua",a=vc.exec(s)?.[0].length??0,n=ue(s,/[{([]/g)-ue(s,/[})\]]/g);if(!o)return{leading:a,net:n};let l=ue(s,yc)+(/^do\b/.test(s)?1:0)-ue(s,xc);return{leading:a||(wc.test(s)||Sc.test(s)?1:0),net:n+l}}function kc(t,e){return(t.id==="c"||t.id==="cpp")&&e.startsWith("#")}function Lc(t,e){let{masked:s,inside:o}=Ac(t,e.id),a=[],n=0,l=0;for(let u of t.split(`
|
|
14
|
-
`)){let b=s.slice(l,l+u.length),m=l>0&&o[l-1]===1;l+=u.length+1;let f=u.trim(),{leading:g,net:E}=Cc(b,e);m?a.push(u.trimEnd()):f?kc(e,f)?a.push(f):a.push(e.indent.repeat(Math.max(0,n-g))+f):a.push(""),n=Math.max(0,n+E)}return a}function Nc(t){return t.split(`
|
|
15
|
-
`).map(e=>e.trimEnd())}function Oc(t){return`${t.filter((s,o)=>s!==""||o>0&&t[o-1]!=="").join(`
|
|
16
|
-
`).replace(/^\n+|\n+$/g,"")}
|
|
17
|
-
`}function va(t,e){let s=Dr(e),o=String(t??"").replace(/\r\n?/g,`
|
|
18
|
-
`);return o.trim()?s.id==="json"?`${JSON.stringify(JSON.parse(o),null,2)}
|
|
19
|
-
`:Oc(fc.has(s.id)?Lc(o,s):Nc(o)):""}var de=class extends c{setup(){this.state=y({text:null,name:"",loading:!1,error:"",editing:!this.props.readonly}),this.fileInput=A("fileInput"),this.input=A("input"),this.controller=null,T(()=>this.syncInput()),P(()=>this.syncInput()),ot(()=>this.loadUrl(this.props.src)),j(e=>{if(e.readonly!==this.props.readonly&&(this.state.editing=!e.readonly),e.src!==this.props.src)return this.loadUrl(e.src)}),q(()=>this.controller?.abort()),this.tabReleased=!1}get classNames(){return h("b-code-editor",this.props.className)}get code(){return this.state.text??this.props.value??""}get codeLang(){return this.props.codeLang??ma(this.state.name||this.props.src)}get language(){return Dr(this.codeLang)}get globals(){return this.props.globals??[]}get isReadonly(){return!this.state.editing}get showToggle(){return this.props.toggle!==!1}get showFormat(){return this.props.format!==!1&&!this.isReadonly}get ariaLabel(){return this.props.title||`${this.language.label} code`}get tokens(){return si(`${this.code}
|
|
20
|
-
`,this.codeLang,this.globals)}get lineCount(){return this.code.split(`
|
|
21
|
-
`).length}get lineLabel(){return`${this.lineCount} ${this.lineCount===1?"line":"lines"}`}get lineNumbers(){return Array.from({length:this.lineCount},(e,s)=>s+1).join(`
|
|
22
|
-
`)}commit(e){(this.state.text!==null||!this.props.onChange)&&(this.state.text=e),this.props.onChange?.(e)}async loadUrl(e){if(this.controller?.abort(),!!e){this.controller=new globalThis.AbortController,this.state.loading=!0,this.state.error="";try{let s=await fetch(e,{signal:this.controller.signal});if(!s.ok)throw new Error(`Could not load ${e} (HTTP ${s.status})`);this.setFile(await s.text(),e)}catch(s){s.name!=="AbortError"&&this.fail(s)}this.state.loading=!1}}syncInput(){let e=this.input.el;if(!e||e.value===this.code)return;let{selectionStart:s,selectionEnd:o}=e;e.value=this.code,e.setSelectionRange(Math.min(s,this.code.length),Math.min(o,this.code.length))}toggleEditing(){this.state.editing=!this.state.editing}format(){try{this.commit(va(this.code,this.codeLang)),this.state.error=""}catch(e){this.fail(e)}}openPicker(){this.fileInput.el.click()}async onFileChange(e){let s=e.target.files[0];if(e.target.value="",!!s)try{this.setFile(await s.text(),s.name)}catch(o){this.fail(o)}}setFile(e,s){Object.assign(this.state,{text:e,name:s,error:""}),this.props.onLoad?.({code:e,name:s})}fail(e){this.state.error=e.message,this.props.onError?.(e)}onInput(e){this.commit(e.target.value),this.revealCaret(e.target)}revealCaret(e){let s=e.closest(".b-code-editor-box");if(!s||!e.isConnected)return;let o=getComputedStyle(e),a=parseFloat(o.paddingTop)||0,n=parseFloat(o.lineHeight)||21,l=e.value.slice(0,e.selectionEnd),u=l.split(`
|
|
23
|
-
`).length-1,b=a+u*n;b-a<s.scrollTop?s.scrollTop=Math.max(0,b-a):b+n+a>s.scrollTop+s.clientHeight&&(s.scrollTop=b+n+a-s.clientHeight);let m=l.slice(l.lastIndexOf(`
|
|
24
|
-
`)+1).replaceAll(" "," ".repeat(4)).length,f=this.measure??(this.measure=document.createElement("canvas").getContext("2d"));if(!f)return;f.font=`${o.fontSize} ${o.fontFamily}`;let g=e.offsetLeft+parseFloat(o.paddingLeft)+m*f.measureText("0").width,E=s.querySelector(".b-code-editor-gutter")?.offsetWidth??0;g<s.scrollLeft+E?s.scrollLeft=Math.max(0,g-E-a):g+a>s.scrollLeft+s.clientWidth&&(s.scrollLeft=g+a-s.clientWidth)}onKeydown(e){let s=e.target;if(requestAnimationFrame(()=>this.revealCaret(s)),e.key==="F"&&e.shiftKey&&e.altKey&&this.showFormat){e.preventDefault(),this.format();return}if(e.key==="Escape"){this.tabReleased=!0;return}let o=this.tabReleased;if(this.tabReleased=!1,e.key==="Tab"&&!o)e.preventDefault(),e.shiftKey?this.outdentLine(s):s.setRangeText(this.language.indent,s.selectionStart,s.selectionEnd,"end");else if(e.key==="Enter"&&!e.shiftKey&&!e.ctrlKey&&!e.metaKey&&!e.altKey){e.preventDefault();let a=s.value.lastIndexOf(`
|
|
25
|
-
`,s.selectionStart-1)+1,n=/^[ \t]*/.exec(s.value.slice(a,s.selectionStart))[0];s.setRangeText(`
|
|
26
|
-
${n}`,s.selectionStart,s.selectionEnd,"end")}else return;this.commit(s.value)}outdentLine(e){let s=e.value.lastIndexOf(`
|
|
27
|
-
`,e.selectionStart-1)+1,o=ga(e.value.slice(s),this.language.indent);if(!o)return;let{selectionStart:a,selectionEnd:n}=e;e.setRangeText("",s,s+o,"preserve"),e.setSelectionRange(Math.max(s,a-o),Math.max(s,n-o))}};r(de,"template","baseui.CodeEditor"),r(de,"components",{Alert:ct,AlertDescription:At,Badge:Q,Button:x,ClipboardButton:nt,Kbd:Et,Spinner:Ct}),r(de,"props",{value:i(String),codeLang:i(String),src:i(String),upload:i(Boolean),format:i(Boolean),toggle:i(Boolean),onChange:i(Function),onLoad:i(Function),onError:i(Function),readonly:i(Boolean),title:i(String),globals:i(Array),hint:i(String),id:i(String),...p});w();v();var us=class extends c{get tag(){return this.props.tag||"div"}};r(us,"template","baseui.Card"),r(us,"props",{...p,tag:i(String)});var ds=class extends c{};r(ds,"template","baseui.CardHeader"),r(ds,"props",p);var bs=class extends c{};r(bs,"template","baseui.CardBody"),r(bs,"props",p);var hs=class extends c{};r(hs,"template","baseui.CardFooter"),r(hs,"props",p);var ms=class extends c{};r(ms,"template","baseui.CardTitle"),r(ms,"props",p);var fs=class extends c{};r(fs,"template","baseui.CardDescription"),r(fs,"props",p);v();w();v();w();v();var at=class extends c{setup(){this.state=y({open:D(this.props.state)}),this.triggerRef=A("trigger"),this.bufferRef=A("buffer"),this.bootstrapTooltip=null,this.lastContentHtml=null,this.onShown=()=>{this.state.open=!0},this.onHidden=()=>{this.state.open=!1},T(()=>{this.lastContentHtml=this.currentContentHtml();let e=this.triggerElement();this.bootstrapTooltip=new(k()).Tooltip(e,{title:this.lastContentHtml,html:!0,trigger:"hover focus"}),e.addEventListener("shown.bs.tooltip",this.onShown),e.addEventListener("hidden.bs.tooltip",this.onHidden),D(this.props.state)&&this.bootstrapTooltip.show()}),P(()=>{let e=this.currentContentHtml();e!==this.lastContentHtml&&(this.lastContentHtml=e,this.bootstrapTooltip?.setContent({".tooltip-inner":e}))}),q(()=>{let e=this.triggerElement();e?.removeEventListener("shown.bs.tooltip",this.onShown),e?.removeEventListener("hidden.bs.tooltip",this.onHidden),this.bootstrapTooltip?.dispose()})}triggerElement(){return this.triggerRef.el?.firstElementChild||this.triggerRef.el}currentContentHtml(){return this.props.content??this.bufferRef.el?.innerHTML??""}show(){this.bootstrapTooltip?.show()}hide(){this.bootstrapTooltip?.hide()}};r(at,"template","baseui.Tooltip"),r(at,"props",{content:i(String),state:i(String),...p});var Bc=as("circle-question-mark"),Ic=0,tt={label:i(String),labelBackground:i(String),supportingText:i(String),useTip:i(Number),errorText:i(String),leadingIcon:i(String),trailingIcon:i(String),maxLength:i(Number),invalid:i(Boolean),placeholder:i(String),disabled:i(Boolean),slots:i(Object)},Z=class extends c{setup(){this.supportId=`b-input-support-${Ic++}`,this.box=A("box"),this.slotRefs={start:A("start"),end:A("end"),footer:A("footer")},T(()=>this.measureSlots()),P(()=>this.measureSlots())}get field(){return this.env.fieldProps?.()??{}}get label(){return this.props.label??this.field.label}get labelStyle(){let e=this.props.labelBackground??this.field.labelBackground;return e?`--b-label-bg:${e}`:void 0}get isOutlined(){return!!this.label||this.hasStart||this.hasEnd||this.hasFooter}get hasStart(){return!!this.props.slots?.start}get hasEnd(){return!!this.props.slots?.end}get hasFooter(){return!!this.props.slots?.footer}measureSlots(){let e=this.box.el;if(!e)return;let{start:s,end:o,footer:a}=this.slotRefs;e.style.setProperty("--b-slot-start",`${s.el?.offsetWidth??0}px`),e.style.setProperty("--b-slot-end",`${o.el?.offsetWidth??0}px`),e.style.setProperty("--b-slot-footer",`${a.el?.offsetHeight??0}px`)}get isInvalid(){return!!(this.props.invalid||this.field.invalid||this.errorText)}get errorText(){return this.props.errorText??this.field.error}get helperText(){return this.props.supportingText||this.field.description}get useTip(){return Number(this.props.useTip??this.field.useTip??0)===1}get supportingText(){return this.errorText||(this.useTip?void 0:this.helperText)}get tipText(){return this.useTip&&!this.errorText?this.helperText:void 0}get leadingIcon(){return this.props.leadingIcon}get trailingIcon(){return this.isInvalid?"circle-alert":this.props.trailingIcon}get fieldPlaceholder(){return this.props.placeholder??(this.isOutlined?" ":void 0)}get counter(){return`${(this.props.value??"").length}/${this.props.maxLength}`}get controlClass(){return this.isOutlined&&"b-outlined-control"}get describedBy(){return this.supportingText?this.supportId:void 0}get outlinedClassNames(){return h("b-input-outlined",this.isInvalid&&"is-invalid",this.props.disabled&&"is-disabled",this.props.placeholder&&"has-placeholder",this.leadingIcon&&"has-leading",this.trailingIcon&&"has-trailing",this.hasStart&&"has-start",this.hasEnd&&"has-end",this.hasFooter&&"has-footer")}};r(Z,"components",{Icon:R,IconCircleQuestionMark:Bc,Tooltip:at});function oi({tag:t="input",type:e}={}){return t==="select"?"form-select":e==="checkbox"||e==="radio"?"form-check-input":"form-control"}var kt=class extends Z{get ariaLabel(){return this.props["aria-label"]??this.props.ariaLabel}get classNames(){return h("b-input",oi({tag:"input",type:this.props.type}),this.controlClass,this.isInvalid&&"is-invalid",this.props.className)}onInput(e){this.props.onInput?.(e.target.value,e)}onChange(e){this.props.onChange?.(e.target.value,e)}};r(kt,"template","baseui.Input"),r(kt,"props",{...tt,value:i(String),type:i(String),readonly:i(Boolean),className:i(String),style:i([String,Object]),id:i(String),list:i(String),autocomplete:i(String),"aria-label":i(String),ariaLabel:i(String),min:i([String,Number]),max:i([String,Number]),step:i([String,Number]),onInput:i(Function),onChange:i(Function)});w();v();var Ni={default:"b-tabs-list-default",line:"b-tabs-list-line"};function ri(t,e,s,o="horizontal"){let a=o==="vertical",u=t===(a?"ArrowDown":"ArrowRight")?1:t===(a?"ArrowUp":"ArrowLeft")?-1:0;return!u||s===0?-1:(e+u+s)%s}var Tc=0;function ya(t){return String(t).replace(/[^a-zA-Z0-9_-]/g,"_")}var Lt=class extends c{setup(){this.tabsState=y({active:this.props.value??this.props.defaultValue??""}),this.instanceId=`t${++Tc}`,L({tabs:this.tabsState,selectTab:e=>this.select(e),tabsId:this.instanceId,orientation:this.orientation}),j(e=>{e.value!==void 0&&(this.tabsState.active=e.value)})}get orientation(){return this.props.orientation==="vertical"?"vertical":"horizontal"}get classNames(){return h("b-tabs",this.props.className)}select(e){this.props.value===void 0&&(this.tabsState.active=e),this.props.onChange?.(e)}};r(Lt,"template","baseui.Tabs"),r(Lt,"props",{value:i(String),defaultValue:i(String),orientation:i(String),onChange:i(Function),...p});var Nt=class extends c{};r(Nt,"template","baseui.TabsContainer"),r(Nt,"props",{...p});var Ot=class extends c{setup(){this.listRef=A("list")}get classNames(){return h("nav","b-tabs-list",Ni[this.props.variant]||Ni.default,this.props.className)}onKeyDown(e){let s=[...this.listRef.el.querySelectorAll("[role='tab']")],o=s.indexOf(e.target),a=ri(e.key,o,s.length,this.env.orientation);a!==-1&&(e.preventDefault(),s[a].focus(),s[a].click())}};r(Ot,"template","baseui.TabsList"),r(Ot,"props",{variant:i(String),...p});var lt=class extends c{setup(){this.rootEl=null,this.tabInstance=null,this.onShown=()=>this.env.selectTab(this.props.value)}onRootRef(e){e?(this.rootEl=e,this.tabInstance=k().Tab.getOrCreateInstance(e),e.addEventListener("shown.bs.tab",this.onShown)):this.rootEl&&(this.rootEl.removeEventListener("shown.bs.tab",this.onShown),this.tabInstance?.dispose(),this.tabInstance=null,this.rootEl=null)}get isActive(){return this.env.tabs.active===this.props.value}get panelId(){return`b-tabs-panel-${this.env.tabsId}-${ya(this.props.value)}`}get classNames(){return h("nav-link","b-tabs-trigger",this.isActive&&"active",this.props.className)}get tabAttrs(){return{role:"tab","data-bs-target":`#${this.panelId}`,"aria-selected":this.isActive?"true":"false",tabindex:this.isActive?0:-1}}onClick(){this.props.disabled||this.tabInstance?.show()}};r(lt,"template","baseui.TabTrigger"),r(lt,"components",{Button:x}),r(lt,"props",{value:{type:String},disabled:i(Boolean),...p});var Bt=class extends c{setup(){this.initialActive=this.isActive}get isActive(){return this.env.tabs.active===this.props.value}get panelId(){return`b-tabs-panel-${this.env.tabsId}-${ya(this.props.value)}`}};r(Bt,"template","baseui.TabContent"),r(Bt,"props",{value:{type:String},...p});w();v();w();v();function G(t,e){j(s=>{ne(s)&&(t.open=M(s),t.open?e?.instance?.show():e?.instance?.hide())})}function J(t,e,s){ne(t)||(e.open=s),t.onOpenChange?.(s)}function ii(t,e){let s=null;T(()=>{s=new(k()).Collapse(t.el,{toggle:!1})}),P(()=>{if(!s)return;let o=t.el.classList.contains("show");e()&&!o?s.show():!e()&&o&&s.hide()}),q(()=>s?.dispose())}var It=class extends c{setup(){this.dialogState=y({open:M(this.props)}),this.control={instance:null},L({dialog:this.dialogState,dialogControl:this.control,setDialogOpen:e=>this.setOpen(e)}),G(this.dialogState,this.control)}setOpen(e){J(this.props,this.dialogState,e)}};r(It,"template","baseui.Dialog"),r(It,"props",{open:i(Boolean),state:i(String),"default-open":i(Boolean),defaultOpen:i(Boolean),onOpenChange:i(Function),style:i([String,Object]),slots:i(Object)});var gs=class extends c{onClick(){this.env.dialogControl.instance?.show()}};r(gs,"template","baseui.DialogTrigger"),r(gs,"props",p);var pt=class extends c{setup(){this.rootRef=A("root"),this.previousFocus=null,this.onShow=()=>{this.previousFocus=document.activeElement},this.onShown=()=>this.env.setDialogOpen(!0),this.onHidden=()=>{this.env.setDialogOpen(!1),this.previousFocus?.focus?.(),this.previousFocus=null},T(()=>{this.env.dialogControl.instance=k().Modal.getOrCreateInstance(this.rootRef.el,{backdrop:!0,keyboard:!0,focus:!0}),this.rootRef.el.addEventListener("show.bs.modal",this.onShow),this.rootRef.el.addEventListener("shown.bs.modal",this.onShown),this.rootRef.el.addEventListener("hidden.bs.modal",this.onHidden),this.env.dialog.open&&this.env.dialogControl.instance.show()}),q(()=>{this.rootRef.el.removeEventListener("show.bs.modal",this.onShow),this.rootRef.el.removeEventListener("shown.bs.modal",this.onShown),this.rootRef.el.removeEventListener("hidden.bs.modal",this.onHidden),this.env.dialogControl.instance?.dispose(),this.env.dialogControl.instance=null})}get showCloseButton(){return this.props.showCloseButton!==!1&&this.props["show-close-button"]!==!1}};r(pt,"template","baseui.DialogContent"),r(pt,"components",{Button:x}),r(pt,"props",{...p,showCloseButton:i(Boolean),"show-close-button":i(Boolean)});var Tt=class extends c{};r(Tt,"template","baseui.DialogHeader"),r(Tt,"props",p);var Rt=class extends c{};r(Rt,"template","baseui.DialogFooter"),r(Rt,"props",p);var $t=class extends c{};r($t,"template","baseui.DialogTitle"),r($t,"props",p);var qt=class extends c{};r(qt,"template","baseui.DialogDescription"),r(qt,"props",p);var be=class extends c{};r(be,"template","baseui.DialogClose"),r(be,"components",{Button:x}),r(be,"props",p);w();v();var xa={default:"b-empty-default",outline:"b-empty-outline",background:"b-empty-background"},Rc={default:"b-empty-media-default",icon:"b-empty-media-icon"},vs=class extends c{get classNames(){return h("b-empty",xa[this.props.variant]||xa.default,this.props.className)}};r(vs,"template","baseui.Empty"),r(vs,"props",{variant:i(String),...p});var ys=class extends c{};r(ys,"template","baseui.EmptyHeader"),r(ys,"props",p);var xs=class extends c{get variant(){return this.props.variant==="icon"?"icon":"default"}get classNames(){return h("b-empty-media",Rc[this.variant],this.props.className)}};r(xs,"template","baseui.EmptyMedia"),r(xs,"props",{variant:i(String),...p});var ws=class extends c{};r(ws,"template","baseui.EmptyTitle"),r(ws,"props",p);var Ss=class extends c{};r(Ss,"template","baseui.EmptyDescription"),r(Ss,"props",p);var As=class extends c{};r(As,"template","baseui.EmptyContent"),r(As,"props",p);w();v();var Es=class extends c{get vertical(){return this.props.orientation==="vertical"}get classNames(){return h("b-separator",this.vertical?"b-separator-vertical":"b-separator-horizontal",this.props.className)}};r(Es,"template","baseui.Separator"),r(Es,"props",{orientation:i(String),className:i(String),style:i([String,Object])});w();v();var Ut=class extends c{get classNames(){return h("b-skeleton",this.props.shape==="circle"?"b-skeleton-circle":"b-skeleton-block",this.props.className)}};r(Ut,"template","baseui.Skeleton"),r(Ut,"props",{shape:i(String),className:i(String),style:i([String,Object])});w();v();var $c={lead:"lead",muted:"text-body-secondary",code:"b-code",kbd:"b-kbd",h1:"h1",h2:"h2",h3:"h3",h4:"h4",blockquote:"blockquote",small:"small",list:"b-list"},qc={h1:"h1",h2:"h2",h3:"h3",h4:"h4",blockquote:"blockquote",small:"small",list:"ul"},Cs=class extends c{get tag(){return this.props.tag||qc[this.props.variant]||"p"}get classNames(){return h("b-typography",$c[this.props.variant],this.props.className)}};r(Cs,"template","baseui.Typography"),r(Cs,"props",{variant:i(String),tag:i(String),...p});w();v();var ks=class extends c{get classNames(){return h("b-marker",this.props.className)}get variant(){return this.props.variant}};r(ks,"template","baseui.Marker"),r(ks,"props",{variant:i(String),...p});v();var Pt=class extends Z{get outlinedClassNames(){return h(super.outlinedClassNames,"is-anchored")}get classNames(){return h("form-control",this.controlClass,this.isInvalid&&"is-invalid",this.props.resize==="none"&&"b-textarea-no-resize",this.props.className)}onInput(e){this.props.onInput?.(e.target.value,e)}onChange(e){this.props.onChange?.(e.target.value,e)}};r(Pt,"template","baseui.Textarea"),r(Pt,"props",{...tt,value:i(String),rows:i(Number),readonly:i(Boolean),resize:i(String),className:i(String),style:i([String,Object]),id:i(String),onInput:i(Function),onChange:i(Function)});v();var Mt=class extends Z{get ariaLabel(){return this.props["aria-label"]??this.props.ariaLabel}get classNames(){return h("b-native-select","form-select",this.controlClass,this.isInvalid&&"is-invalid",(this.props.size==="sm"||this.props.size==="lg")&&`form-select-${this.props.size}`,this.props.className)}onChange(e){this.props.onChange?.(e.target.value,e)}};r(Mt,"template","baseui.NativeSelect"),r(Mt,"props",{...tt,value:i(String),size:i(String),...p,"aria-label":i(String),ariaLabel:i(String),id:i(String),onChange:i(Function)});w();v();var _t=class extends c{onChange(e){this.props.onChange?.(e.target.checked,e)}};r(_t,"template","baseui.Checkbox"),r(_t,"props",{checked:i(Boolean),disabled:i(Boolean),...p,id:i(String),onChange:i(Function)});w();v();var Ls=class extends c{setup(){L({radioGroupValue:()=>this.props.value,radioGroupDisabled:()=>this.props.disabled,radioGroupName:()=>this.props.name||"b-radio-group",selectRadio:e=>this.props.onChange?.(e)})}get classNames(){return h("b-radio-group",this.props.className)}};r(Ls,"template","baseui.RadioGroup"),r(Ls,"props",{value:i(String),name:i(String),disabled:i(Boolean),...p,onChange:i(Function)});var Ns=class extends c{get checked(){return this.env.radioGroupValue()===this.props.value}get disabled(){return this.props.disabled||this.env.radioGroupDisabled()}onChange(){this.disabled||this.env.selectRadio(this.props.value)}};r(Ns,"template","baseui.RadioGroupItem"),r(Ns,"props",{value:{type:String},disabled:i(Boolean),...p});w();v();var Uc=as("circle-question-mark"),he=class extends c{get tipText(){return Number(this.props.useTip??0)===1?this.props.supportingText:void 0}get supportingText(){return this.tipText?void 0:this.props.supportingText}onChange(e){this.props.onChange?.(e.target.checked,e)}};r(he,"template","baseui.Switch"),r(he,"components",{IconCircleQuestionMark:Uc,Tooltip:at}),r(he,"props",{checked:i(Boolean),disabled:i(Boolean),supportingText:i(String),useTip:i(Number),...p,onChange:i(Function)});w();v();var Os=class extends c{get classNames(){return h("b-slider",this.props.className)}onInput(e){e.target.style.setProperty("--b-slider-value",`${e.target.value}%`),this.props.onChange?.(e.target.value,e)}};r(Os,"template","baseui.Slider"),r(Os,"props",{value:i([Number,String]),min:i([Number,String]),max:i([Number,String]),step:i([Number,String]),disabled:i(Boolean),className:i(String),style:i([String,Object]),onChange:i(Function)});w();v();var Bs=class extends c{setup(){this.length=this.props.length||6;let e=(this.props.value||"").split("");this.state=y({digits:Array.from({length:this.length},(s,o)=>e[o]||"")}),this.rootRef=A("root")}get classNames(){return h("b-input-otp",this.props.className)}get boxes(){return this.state.digits.map((e,s)=>({index:s,value:e}))}emit(){this.props.onChange?.(this.state.digits.join(""))}onInput(e,s){let o=s.target.value.slice(-1);this.state.digits[e]=o,o&&this.rootRef.el&&[...this.rootRef.el.querySelectorAll("input")][e+1]?.focus(),this.emit()}onPaste(e){let s=e.clipboardData.getData("text").trim();if(s){e.preventDefault();for(let o=0;o<this.length;o++)this.state.digits[o]=s[o]||"";this.emit()}}};r(Bs,"template","baseui.InputOtp"),r(Bs,"props",{length:i(Number),value:i(String),disabled:i(Boolean),className:i(String),style:i([String,Object]),onChange:i(Function)});w();w();function Is(t,{defaultOpen:e=!1,onOpenChange:s}={}){let o=y({open:e}),a=b=>{o.open!==b&&(o.open=b,s?.(b))},n=()=>a(!o.open),l=b=>{t.el&&!t.el.contains(b.target)&&a(!1)},u=b=>{b.key==="Escape"&&a(!1)};return Y(b=>{if(b)return document.addEventListener("click",l),document.addEventListener("keydown",u),()=>{document.removeEventListener("click",l),document.removeEventListener("keydown",u)}},()=>[o.open]),q(()=>{document.removeEventListener("click",l),document.removeEventListener("keydown",u)}),{state:o,setOpen:a,toggle:n}}v();var Ts=class extends Z{setup(){super.setup(),this.rootRef=A("root");let{state:e,setOpen:s,toggle:o}=Is(this.rootRef,{defaultOpen:D(this.props.state)});this.disclosure=e,L({select:this.disclosure,selectValue:()=>this.props.value,selectToggle:o,selectClose:()=>s(!1),selectChoose:a=>{this.props.onChange?.(a),s(!1)}})}get outlinedClassNames(){return h(super.outlinedClassNames,"is-anchored",this.props.value&&"is-floated")}get rootStyle(){return H(this.labelStyle,this.props.style)}get classNames(){return h("b-select",this.isOutlined&&this.outlinedClassNames,this.props.className)}};r(Ts,"template","baseui.Select"),r(Ts,"props",{...tt,value:i(String),state:i(String),onChange:i(Function),...p});var me=class extends c{get attrs(){return{"aria-haspopup":"listbox","aria-expanded":this.env.select.open?"true":"false"}}onClick(){this.env.selectToggle()}};r(me,"template","baseui.SelectTrigger"),r(me,"components",{Button:x}),r(me,"props",p);var Rs=class extends c{get open(){return this.env.select.open}};r(Rs,"template","baseui.SelectContent"),r(Rs,"props",p);var $s=class extends c{get selected(){return this.env.selectValue()===this.props.value}onClick(){this.env.selectChoose(this.props.value)}};r($s,"template","baseui.SelectItem"),r($s,"props",{value:{type:String},...p});w();function qs(t){return[...t.querySelectorAll("button, [href], input, select, textarea, [tabindex]:not([tabindex='-1'])")].filter(e=>!e.disabled&&!e.hidden)}function Oi(t,e){if(t.key!=="Tab")return;let s=qs(e);if(!s.length){t.preventDefault();return}let o=s[0],a=s[s.length-1];t.shiftKey&&document.activeElement===o?(t.preventDefault(),a.focus()):!t.shiftKey&&document.activeElement===a&&(t.preventDefault(),o.focus())}function ai(t,{closeSelector:e,trapFocus:s=!1}={}){let o=t.getAttribute("b-att-trigger"),a=o?document.querySelector(o):null,n=[...t.querySelectorAll(e)],l=null,u=()=>qs(t),b=()=>{l=document.activeElement,t.hidden=!1,t.setAttribute("b-att-state","open"),t.setAttribute("role","dialog"),t.setAttribute("aria-modal","true"),u()[0]?.focus(),t.dispatchEvent(new CustomEvent("baseui:open",{bubbles:!0}))},m=()=>{t.hidden=!0,t.setAttribute("b-att-state","closed"),l?.focus?.(),t.dispatchEvent(new CustomEvent("baseui:close",{bubbles:!0}))},f=E=>{if(E.key==="Escape"){m();return}!s||t.hidden||Oi(E,t)},g=E=>{E.target===t&&m()};return a?.addEventListener("click",b),n.forEach(E=>E.addEventListener("click",m)),t.addEventListener("keydown",f),t.addEventListener("click",g),(!t.getAttribute("b-att-state")||t.getAttribute("b-att-state")==="closed")&&(t.hidden=!0),{open:b,close:m,destroy:()=>{a?.removeEventListener("click",b),n.forEach(E=>E.removeEventListener("click",m)),t.removeEventListener("keydown",f),t.removeEventListener("click",g)}}}function Us(t,e,s,o){let a=t.getAttribute("b-att-trigger"),n=a?document.querySelector(a):null,l=null,u=()=>{l=document.activeElement},b=()=>{t.setAttribute("b-att-state","open"),t.dispatchEvent(new CustomEvent("baseui:open",{bubbles:!0}))},m=()=>{t.setAttribute("b-att-state","closed"),t.dispatchEvent(new CustomEvent("baseui:close",{bubbles:!0})),l?.focus?.(),l=null},f=()=>e.show(),g=()=>e.hide();return t.addEventListener(`show.bs.${s}`,u),t.addEventListener(`shown.bs.${s}`,b),t.addEventListener(`hidden.bs.${s}`,m),n?.addEventListener("click",f),t.setAttribute("b-att-state","closed"),t[o]={open:f,close:g},{destroy:()=>{n?.removeEventListener("click",f),t.removeEventListener(`show.bs.${s}`,u),t.removeEventListener(`shown.bs.${s}`,b),t.removeEventListener(`hidden.bs.${s}`,m),e.dispose(),delete t[o]}}}v();var Ps=class extends c{setup(){this.alertDialogState=y({open:M(this.props)}),L({alertDialog:this.alertDialogState,setAlertDialogOpen:e=>this.setOpen(e)}),G(this.alertDialogState)}setOpen(e){J(this.props,this.alertDialogState,e)}};r(Ps,"template","baseui.AlertDialog"),r(Ps,"props",{open:i(Boolean),state:i(String),"default-open":i(Boolean),defaultOpen:i(Boolean),onOpenChange:i(Function),slots:i(Object)});var fe=class extends c{get attrs(){return{"data-slot":"alert-dialog-trigger"}}onClick(){this.env.setAlertDialogOpen(!0)}};r(fe,"template","baseui.AlertDialogTrigger"),r(fe,"components",{Button:x}),r(fe,"props",p);var Ms=class extends c{get size(){return this.props.size==="sm"?"sm":"default"}setup(){this.rootRef=A("root"),Y(e=>{if(!e)return;let s=document.activeElement;return qs(this.rootRef.el)[0]?.focus(),()=>s?.focus?.()},()=>[this.env.alertDialog.open])}get open(){return this.env.alertDialog.open}onKeyDown(e){if(e.key==="Escape"){this.env.setAlertDialogOpen(!1);return}Oi(e,this.rootRef.el)}};r(Ms,"template","baseui.AlertDialogContent"),r(Ms,"props",{...p,size:i(String)});var _s=class extends c{};r(_s,"template","baseui.AlertDialogHeader"),r(_s,"props",p);var zs=class extends c{};r(zs,"template","baseui.AlertDialogFooter"),r(zs,"props",p);var Ds=class extends c{};r(Ds,"template","baseui.AlertDialogMedia"),r(Ds,"props",p);var js=class extends c{};r(js,"template","baseui.AlertDialogTitle"),r(js,"props",p);var Fs=class extends c{};r(Fs,"template","baseui.AlertDialogDescription"),r(Fs,"props",p);var ge=class extends c{get attrs(){return{"data-slot":"alert-dialog-cancel"}}onClick(){this.env.setAlertDialogOpen(!1)}};r(ge,"template","baseui.AlertDialogCancel"),r(ge,"components",{Button:x}),r(ge,"props",p);var ve=class extends c{get attrs(){return{"data-slot":"alert-dialog-action"}}onClick(){this.props.onClick?.(),this.env.setAlertDialogOpen(!1)}};r(ve,"template","baseui.AlertDialogAction"),r(ve,"components",{Button:x}),r(ve,"props",{...p,onClick:i(Function)});w();v();var Hs=class extends c{setup(){this.drawerState=y({open:M(this.props)}),this.control={instance:null},L({drawer:this.drawerState,drawerControl:this.control,setDrawerOpen:e=>this.setOpen(e)}),G(this.drawerState,this.control)}setOpen(e){J(this.props,this.drawerState,e)}};r(Hs,"template","baseui.Drawer"),r(Hs,"props",{open:i(Boolean),state:i(String),"default-open":i(Boolean),defaultOpen:i(Boolean),onOpenChange:i(Function),slots:i(Object)});var ye=class extends c{onClick(){this.env.drawerControl.instance?.show()}};r(ye,"template","baseui.DrawerTrigger"),r(ye,"components",{Button:x}),r(ye,"props",p);var Ws=class extends c{setup(){this.rootRef=A("root"),this.previousFocus=null,this.onShow=()=>{this.previousFocus=document.activeElement},this.onShown=()=>this.env.setDrawerOpen(!0),this.onHidden=()=>{this.env.setDrawerOpen(!1),this.previousFocus?.focus?.(),this.previousFocus=null},T(()=>{this.env.drawerControl.instance=k().Offcanvas.getOrCreateInstance(this.rootRef.el,{backdrop:!0,keyboard:!0,scroll:!1}),this.rootRef.el.addEventListener("show.bs.offcanvas",this.onShow),this.rootRef.el.addEventListener("shown.bs.offcanvas",this.onShown),this.rootRef.el.addEventListener("hidden.bs.offcanvas",this.onHidden),this.env.drawer.open&&this.env.drawerControl.instance.show()}),q(()=>{this.rootRef.el.removeEventListener("show.bs.offcanvas",this.onShow),this.rootRef.el.removeEventListener("shown.bs.offcanvas",this.onShown),this.rootRef.el.removeEventListener("hidden.bs.offcanvas",this.onHidden),this.env.drawerControl.instance?.dispose(),this.env.drawerControl.instance=null})}get open(){return this.env.drawer.open}};r(Ws,"template","baseui.DrawerContent"),r(Ws,"props",p);var Ks=class extends c{};r(Ks,"template","baseui.DrawerHeader"),r(Ks,"props",p);var Vs=class extends c{};r(Vs,"template","baseui.DrawerFooter"),r(Vs,"props",p);var Zs=class extends c{};r(Zs,"template","baseui.DrawerTitle"),r(Zs,"props",p);var Gs=class extends c{};r(Gs,"template","baseui.DrawerDescription"),r(Gs,"props",p);var xe=class extends c{get attrs(){return{"data-bs-dismiss":"offcanvas"}}};r(xe,"template","baseui.DrawerClose"),r(xe,"components",{Button:x}),r(xe,"props",p);w();v();var Js=class extends c{setup(){this.sheetState=y({open:M(this.props),side:this.props.side}),this.control={instance:null},L({sheet:this.sheetState,sheetControl:this.control,setSheetOpen:e=>this.setOpen(e)}),G(this.sheetState,this.control),j(e=>{this.sheetState.side=e.side})}setOpen(e){J(this.props,this.sheetState,e)}};r(Js,"template","baseui.Sheet"),r(Js,"props",{open:i(Boolean),state:i(String),side:i(String),"default-open":i(Boolean),defaultOpen:i(Boolean),onOpenChange:i(Function),slots:i(Object)});var we=class extends c{onClick(){this.env.sheetControl.instance?.show()}};r(we,"template","baseui.SheetTrigger"),r(we,"components",{Button:x}),r(we,"props",p);var Xs=class extends c{setup(){this.rootRef=A("root"),this.previousFocus=null,this.onShow=()=>{this.previousFocus=document.activeElement},this.onShown=()=>this.env.setSheetOpen(!0),this.onHidden=()=>{this.env.setSheetOpen(!1),this.previousFocus?.focus?.(),this.previousFocus=null},T(()=>{this.env.sheetControl.instance=k().Offcanvas.getOrCreateInstance(this.rootRef.el,{backdrop:!0,keyboard:!0,scroll:!1}),this.rootRef.el.addEventListener("show.bs.offcanvas",this.onShow),this.rootRef.el.addEventListener("shown.bs.offcanvas",this.onShown),this.rootRef.el.addEventListener("hidden.bs.offcanvas",this.onHidden),this.env.sheet.open&&this.env.sheetControl.instance.show()}),q(()=>{this.rootRef.el.removeEventListener("show.bs.offcanvas",this.onShow),this.rootRef.el.removeEventListener("shown.bs.offcanvas",this.onShown),this.rootRef.el.removeEventListener("hidden.bs.offcanvas",this.onHidden),this.env.sheetControl.instance?.dispose(),this.env.sheetControl.instance=null})}get open(){return this.env.sheet.open}get side(){return this.props.side??this.env.sheet.side}get placementClass(){return this.side==="left"?"offcanvas-start":"offcanvas-end"}};r(Xs,"template","baseui.SheetContent"),r(Xs,"props",{...p,side:i(String)});var Ys=class extends c{};r(Ys,"template","baseui.SheetHeader"),r(Ys,"props",p);var Qs=class extends c{};r(Qs,"template","baseui.SheetFooter"),r(Qs,"props",p);var to=class extends c{};r(to,"template","baseui.SheetTitle"),r(to,"props",p);var eo=class extends c{};r(eo,"template","baseui.SheetDescription"),r(eo,"props",p);var Se=class extends c{};r(Se,"template","baseui.SheetClose"),r(Se,"components",{Button:x}),r(Se,"props",p);w();v();var so=class extends c{setup(){let e=y({open:D(this.props.state)});this.control={instance:null,bufferEl:null,lastContentHtml:null};let s=o=>{e.open!==o&&(e.open=o,this.props.onOpenChange?.(o))};L({popover:e,popoverControl:this.control,popoverSetOpen:s,popoverToggle:()=>this.control.instance?.toggle(),popoverClose:()=>this.control.instance?.hide()})}};r(so,"template","baseui.Popover"),r(so,"props",{state:i(String),onOpenChange:i(Function),...p});var Ae=class extends c{setup(){this.rootRef={el:null},this.getRef=e=>{this.rootRef.el=e},this.onShown=()=>this.env.popoverSetOpen(!0),this.onHidden=()=>this.env.popoverSetOpen(!1),T(()=>{let e=this.env.popoverControl,s=e.bufferEl?.innerHTML??"";e.lastContentHtml=s,e.instance=new(k()).Popover(this.rootRef.el,{content:s,html:!0,trigger:"manual"}),this.rootRef.el.addEventListener("shown.bs.popover",this.onShown),this.rootRef.el.addEventListener("hidden.bs.popover",this.onHidden)}),q(()=>{this.rootRef.el.removeEventListener("shown.bs.popover",this.onShown),this.rootRef.el.removeEventListener("hidden.bs.popover",this.onHidden),this.env.popoverControl.instance?.dispose(),this.env.popoverControl.instance=null})}get attrs(){return{"aria-haspopup":"dialog","aria-expanded":this.env.popover.open?"true":"false"}}onClick(){this.env.popoverControl.instance?.toggle()}};r(Ae,"template","baseui.PopoverTrigger"),r(Ae,"components",{Button:x}),r(Ae,"props",p);var oo=class extends c{get style(){return H("display:none",this.props.style)}setup(){this.bufferRef=A("buffer"),T(()=>{this.env.popoverControl.bufferEl=this.bufferRef.el}),P(()=>{let e=this.env.popoverControl;e.bufferEl=this.bufferRef.el;let s=this.currentContentHtml();e.instance&&s!==e.lastContentHtml&&(e.lastContentHtml=s,e.instance.setContent({".popover-body":s}))})}currentContentHtml(){return this.props.content??this.bufferRef.el?.innerHTML??""}};r(oo,"template","baseui.PopoverContent"),r(oo,"props",{...p,content:i(String)});w();v();var ro=class extends c{setup(){this.state=y({open:!1}),L({hoverCard:this.state})}open(){this.state.open=!0}close(){this.state.open=!1}onKeyDown(e){e.key==="Escape"&&this.close()}};r(ro,"template","baseui.HoverCard"),r(ro,"props",{...p});var io=class extends c{};r(io,"template","baseui.HoverCardTrigger"),r(io,"props",p);var ao=class extends c{get open(){return this.env.hoverCard.open}};r(ao,"template","baseui.HoverCardContent"),r(ao,"props",p);w();v();var Bi={...p,disabled:i(Boolean),inset:i(Boolean),onClick:i(Function),onSelect:i(Function),variant:i(String)},zt=class extends c{setup(){this.rootRef=A("root");let e=y({open:D(this.props.state)});this.control={instance:null};let s=n=>{e.open!==n&&(e.open=n,this.props.onOpenChange?.(n))};L({dropdownMenu:e,dropdownControl:this.control,dropdownSetOpen:s,dropdownToggle:()=>this.control.instance?.toggle(),dropdownClose:()=>this.control.instance?.hide()});let o=n=>{this.rootRef.el&&!this.rootRef.el.contains(n.target)&&this.control.instance?.hide()},a=n=>{n.key==="Escape"&&this.control.instance?.hide()};Y(n=>{if(n)return document.addEventListener("click",o),document.addEventListener("keydown",a),()=>{document.removeEventListener("click",o),document.removeEventListener("keydown",a)}},()=>[e.open]),q(()=>{document.removeEventListener("click",o),document.removeEventListener("keydown",a)})}};r(zt,"template","baseui.DropdownMenu"),r(zt,"props",{state:i(String),onOpenChange:i(Function),...p});var ut=class extends c{setup(){this.rootRef={el:null},this.onShown=()=>this.env.dropdownSetOpen(!0),this.onHidden=()=>this.env.dropdownSetOpen(!1),this.getRef=e=>{e?(this.rootRef.el=e,this.env.dropdownControl.instance=k().Dropdown.getOrCreateInstance(e),e.addEventListener("shown.bs.dropdown",this.onShown),e.addEventListener("hidden.bs.dropdown",this.onHidden)):this.rootRef.el&&(this.rootRef.el.removeEventListener("shown.bs.dropdown",this.onShown),this.rootRef.el.removeEventListener("hidden.bs.dropdown",this.onHidden),this.env.dropdownControl.instance?.dispose(),this.env.dropdownControl.instance=null,this.rootRef.el=null)}}get classNames(){return h("btn","b-button","btn-outline-secondary","b-dropdown-menu-trigger",this.props.className)}get attrs(){return{"data-slot":"dropdown-menu-trigger","aria-haspopup":"menu","aria-expanded":this.env.dropdownMenu.open?"true":"false"}}onClick(){this.env.dropdownToggle()}};r(ut,"template","baseui.DropdownMenuTrigger"),r(ut,"components",{Button:x}),r(ut,"props",p);var Dt=class extends c{get open(){return this.env.dropdownMenu.open}get classNames(){return h("b-dropdown-menu-content","dropdown-menu",this.open?"show":"",this.props.className)}};r(Dt,"template","baseui.DropdownMenuContent"),r(Dt,"props",{...p,align:i(String),alignOffset:i(Number),side:i(String),sideOffset:i(Number)});var no=class extends c{};r(no,"template","baseui.DropdownMenuGroup"),r(no,"props",p);var co=class extends c{};r(co,"template","baseui.DropdownMenuLabel"),r(co,"props",{...p,inset:i(Boolean)});var jt=class extends c{get variant(){return this.props.variant||"default"}onClick(e){this.props.disabled||(this.props.onClick?.(e),this.props.onSelect?.(e),this.env.dropdownClose())}};r(jt,"template","baseui.DropdownMenuItem"),r(jt,"props",Bi);var Ee=class extends c{onClick(e){this.props.disabled||(this.props.onCheckedChange?.(!this.props.checked,e),this.props.onClick?.(e),this.props.onSelect?.(e))}};r(Ee,"template","baseui.DropdownMenuCheckboxItem"),r(Ee,"components",{Icon:R}),r(Ee,"props",{...Bi,checked:i(Boolean),onCheckedChange:i(Function)});var lo=class extends c{setup(){L({dropdownRadio:{value:this.props.value,onValueChange:this.props.onValueChange}})}};r(lo,"template","baseui.DropdownMenuRadioGroup"),r(lo,"props",{...p,value:i(String),onValueChange:i(Function)});var Ce=class extends c{get checked(){return this.env.dropdownRadio?.value===this.props.value}onClick(e){this.props.disabled||(this.env.dropdownRadio?.onValueChange?.(this.props.value,e),this.props.onClick?.(e),this.props.onSelect?.(e))}};r(Ce,"template","baseui.DropdownMenuRadioItem"),r(Ce,"components",{Icon:R}),r(Ce,"props",{...Bi,value:i(String)});var po=class extends c{};r(po,"template","baseui.DropdownMenuSeparator"),r(po,"props",p);var uo=class extends c{};r(uo,"template","baseui.DropdownMenuShortcut"),r(uo,"props",p);var Ft=class extends c{setup(){this.rootRef=A("root");let{state:e,setOpen:s,toggle:o}=Is(this.rootRef);L({dropdownSub:e,dropdownSubToggle:o,dropdownSubOpen:()=>s(!0),dropdownSubClose:()=>s(!1)})}};r(Ft,"template","baseui.DropdownMenuSub"),r(Ft,"props",p);var dt=class extends c{onMouseEnter(){this.props.disabled||this.env.dropdownSubOpen()}onClick(){this.props.disabled||this.env.dropdownSubToggle()}};r(dt,"template","baseui.DropdownMenuSubTrigger"),r(dt,"components",{Icon:R}),r(dt,"props",{...p,disabled:i(Boolean),inset:i(Boolean)});var Ht=class extends c{get open(){return this.env.dropdownSub.open}};r(Ht,"template","baseui.DropdownMenuSubContent"),r(Ht,"props",p);w();v();var bo=class extends c{setup(){this.state=y({open:!1,x:0,y:0});let e=()=>{this.state.open=!1};this.close=e,L({contextMenu:this.state,contextMenuOpenAt:(s,o)=>{this.state.open=!0,this.state.x=s,this.state.y=o},contextMenuClose:e}),document.addEventListener("click",e),q(()=>document.removeEventListener("click",e))}};r(bo,"template","baseui.ContextMenu"),r(bo,"props",{className:i(String),slots:i(Object)});var ho=class extends c{onContextMenu(e){e.preventDefault(),this.env.contextMenuOpenAt(e.clientX,e.clientY)}};r(ho,"template","baseui.ContextMenuTrigger"),r(ho,"props",p);var mo=class extends c{setup(){this.rootRef=A("root")}get open(){return this.env.contextMenu.open}get style(){return H(`left:${this.env.contextMenu.x}px;top:${this.env.contextMenu.y}px`,this.props.style)}};r(mo,"template","baseui.ContextMenuContent"),r(mo,"props",p);var fo=class extends c{onClick(){this.props.onClick?.(),this.env.contextMenuClose()}};r(fo,"template","baseui.ContextMenuItem"),r(fo,"props",{...p,onClick:i(Function)});w();v();var Pc={"top-left":["top-0","start-0"],"top-right":["top-0","end-0"],"bottom-left":["bottom-0","start-0"],"bottom-right":["bottom-0","end-0"]};function ni(t){let e=Pc[t];return e?["toast-container","position-fixed","p-3","pe-auto",...e]:null}var bt=class extends c{setup(){this.state=y({open:M(this.props)}),this.rootRef=A("root"),this.bootstrapToast=null,this.handleShown=()=>{this.state.open=!0},this.handleHidden=()=>{this.state.open=!1,this.props.onOpenChange?.(!1)},T(()=>{this.mountBootstrapToast(this.props.delay),this.state.open&&this.bootstrapToast.show()}),j(e=>{let s=ne(e)?M(e):this.state.open;e.delay!==this.props.delay?(this.bootstrapToast?.dispose(),this.mountBootstrapToast(e.delay),s&&this.bootstrapToast.show()):s!==this.state.open&&(s?this.bootstrapToast?.show():this.bootstrapToast?.hide())}),q(()=>{this.bootstrapToast?.dispose()})}mountBootstrapToast(e){let s=this.rootRef.el,o=e??3e3;this.bootstrapToast=new(k()).Toast(s,{autohide:o>0,delay:o||3e3}),s.addEventListener("shown.bs.toast",this.handleShown),s.addEventListener("hidden.bs.toast",this.handleHidden)}get classNames(){return h("toast","fade","b-toast",ni(this.props.position),this.props.className)}get role(){return this.props.variant==="danger"?"alert":"status"}get hasActionSlot(){return!!this.props.slots?.action}close(){this.bootstrapToast?.hide()}};r(bt,"template","baseui.Toast"),r(bt,"components",{Button:x}),r(bt,"props",{open:i(Boolean),state:i(String),variant:i(String),delay:i(Number),position:i(String),...p,onOpenChange:i(Function)});w();v();var go=class extends c{setup(){this.state=y({open:new Set}),L({accordion:this.state,accordionToggle:e=>this.toggle(e)})}toggle(e){let s=!this.state.open.has(e);this.props.multiple||this.state.open.clear(),s?this.state.open.add(e):this.state.open.delete(e),this.props.onChange?.(s)}};r(go,"template","baseui.Accordion"),r(go,"props",{multiple:i(Boolean),onChange:i(Function),...p});var vo=class extends c{setup(){L({accordionItemState:this.props.state,accordionItemValue:this.props.value})}};r(vo,"template","baseui.AccordionItem"),r(vo,"props",{value:{type:String},state:i(String),...p});var ke=class extends c{get open(){return this.env.accordionItemState!==void 0?D(this.env.accordionItemState):this.env.accordion.open.has(this.env.accordionItemValue)}get triggerAttrs(){return{"data-slot":"accordion-trigger","aria-expanded":this.open?"true":"false"}}onClick(){this.env.accordionToggle(this.env.accordionItemValue)}};r(ke,"template","baseui.AccordionTrigger"),r(ke,"components",{Icon:R,Button:x}),r(ke,"props",p);var yo=class extends c{setup(){this.rootRef=A("root"),this.initialOpen=this.open,ii(this.rootRef,()=>this.open)}get open(){return this.env.accordionItemState!==void 0?D(this.env.accordionItemState):this.env.accordion.open.has(this.env.accordionItemValue)}};r(yo,"template","baseui.AccordionContent"),r(yo,"props",p);w();v();var xo=class extends c{setup(){this.state=y({open:M(this.props)}),L({collapsible:this.state,collapsibleToggle:()=>this.toggle()}),G(this.state)}toggle(){let e=!this.state.open;J(this.props,this.state,e)}};r(xo,"template","baseui.Collapsible"),r(xo,"props",{open:i(Boolean),state:i(String),"default-open":i(Boolean),defaultOpen:i(Boolean),onOpenChange:i(Function),...p});var Le=class extends c{get attrs(){return{"aria-expanded":this.env.collapsible.open?"true":"false"}}onClick(){this.env.collapsibleToggle()}};r(Le,"template","baseui.CollapsibleTrigger"),r(Le,"components",{Button:x}),r(Le,"props",p);var wo=class extends c{setup(){this.rootRef=A("root"),this.initialOpen=this.open,ii(this.rootRef,()=>this.open)}get open(){return this.env.collapsible.open}};r(wo,"template","baseui.CollapsibleContent"),r(wo,"props",p);w();v();var Wt=class extends c{};r(Wt,"template","baseui.Breadcrumb"),r(Wt,"props",{...p});var Kt=class extends c{};r(Kt,"template","baseui.BreadcrumbList"),r(Kt,"props",{...p});var Vt=class extends c{get classNames(){return h("b-breadcrumb-item",this.props.current&&"b-breadcrumb-page",this.props.className)}};r(Vt,"template","baseui.BreadcrumbItem"),r(Vt,"props",{current:i(Boolean),...p});var Zt=class extends c{get classNames(){return h("b-breadcrumb-link",this.props.className)}onClick(e){this.props.onClick?.(e)}};r(Zt,"template","baseui.BreadcrumbLink"),r(Zt,"props",{href:i(String),target:i(String),rel:i(String),...p,onClick:i(Function)});var Gt=class extends c{get classNames(){return h("b-breadcrumb-page",this.props.className)}};r(Gt,"template","baseui.BreadcrumbPage"),r(Gt,"props",{...p});var ht=class extends c{get classNames(){return h("b-breadcrumb-separator",this.props.className)}get hasCustomContent(){return!!this.props.slots?.default}};r(ht,"template","baseui.BreadcrumbSeparator"),r(ht,"components",{Icon:R}),r(ht,"props",{...p});var Ne=class extends c{get classNames(){return h("b-breadcrumb-ellipsis",this.props.className)}get hasCustomContent(){return!!this.props.slots?.default}};r(Ne,"template","baseui.BreadcrumbEllipsis"),r(Ne,"components",{Icon:R}),r(Ne,"props",{...p});w();v();var So=class extends c{get classNames(){return h("b-pagination",this.props.className)}};r(So,"template","baseui.Pagination"),r(So,"props",{...p});var Ao=class extends c{get classNames(){return h("page-item",this.props.current&&"active",this.props.disabled&&"disabled")}onClick(){this.props.disabled||this.props.onClick?.()}};r(Ao,"template","baseui.PaginationItem"),r(Ao,"props",{current:i(Boolean),disabled:i(Boolean),style:i([String,Object]),onClick:i(Function),slots:i(Object)});w();v();var Eo=class extends c{setup(){this.rootRef=A("root")}onKeyDown(e){let s=[...this.rootRef.el.querySelectorAll("a, button")].filter(n=>!n.disabled),o=s.indexOf(e.target),a=e.key==="ArrowRight"?1:e.key==="ArrowLeft"?-1:0;!a||o<0||(e.preventDefault(),s[(o+a+s.length)%s.length]?.focus())}};r(Eo,"template","baseui.NavigationMenu"),r(Eo,"props",{...p});var Co=class extends c{};r(Co,"template","baseui.NavigationMenuItem"),r(Co,"props",{href:i(String),...p});w();v();var ko=class extends c{get classNames(){return h("b-menubar",this.props.className)}};r(ko,"template","baseui.Menubar"),r(ko,"props",{...p});w();v();var wa={...p,href:i(String)};function Sa(t){globalThis.matchMedia?.("(max-width: 991.98px)").matches&&t.setSidebarOpen?.(!1)}var ft=class extends c{setup(){this.state=y({open:M(this.props)}),L({sidebar:this.state,setSidebarOpen:e=>this.setOpen(e)}),G(this.state)}setOpen(e){J(this.props,this.state,e)}get sidebarState(){return this.state.open?"expanded":"collapsed"}get side(){return this.props.side||"left"}get variant(){return this.props.variant||"sidebar"}get collapsible(){return this.props.collapsible||"offcanvas"}get classNames(){return h("b-sidebar-root",this.props.className)}onKeyDown(e){e.key==="Escape"&&this.setOpen(!1)}};r(ft,"template","baseui.Sidebar"),r(ft,"props",{open:i(Boolean),state:i(String),"default-open":i(Boolean),defaultOpen:i(Boolean),onOpenChange:i(Function),side:i(String),variant:i(String),collapsible:i(String),...p});var jr=class extends ft{};r(jr,"template","baseui.Sidebar");var Oe=class extends c{onClick(){if(this.env.setShellCollapsed&&!globalThis.matchMedia?.("(max-width: 991.98px)").matches){this.env.setShellCollapsed(!this.env.shell.collapsed);return}this.env.setSidebarOpen(!this.env.sidebar.open)}};r(Oe,"template","baseui.SidebarTrigger"),r(Oe,"components",{Icon:R,Button:x}),r(Oe,"props",{...p,icon:i(String),label:i(String)});var Jt=class extends c{get open(){return this.env.sidebar.open}};r(Jt,"template","baseui.SidebarContent"),r(Jt,"props",p);var Lo=class extends c{};r(Lo,"template","baseui.SidebarHeader"),r(Lo,"props",p);var No=class extends c{};r(No,"template","baseui.SidebarFooter"),r(No,"props",p);var Oo=class extends c{};r(Oo,"template","baseui.SidebarInset"),r(Oo,"props",p);var Be=class extends c{onClick(){this.env.setSidebarOpen(!this.env.sidebar.open)}};r(Be,"template","baseui.SidebarRail"),r(Be,"components",{Button:x}),r(Be,"props",p);var Bo=class extends c{};r(Bo,"template","baseui.SidebarInput"),r(Bo,"props",{className:i(String),style:i([String,Object]),placeholder:i(String),value:i(String),type:i(String)});var Io=class extends c{};r(Io,"template","baseui.SidebarSeparator"),r(Io,"props",p);var Ie=class extends c{onClick(){this.env.setSidebarOpen(!1)}};r(Ie,"template","baseui.SidebarClose"),r(Ie,"components",{Icon:R,Button:x}),r(Ie,"props",{...p,icon:i(String),label:i(String)});var Xt=class extends c{};r(Xt,"template","baseui.SidebarGroup"),r(Xt,"props",{muted:i(Boolean),...p});var Yt=class extends c{};r(Yt,"template","baseui.SidebarGroupLabel"),r(Yt,"props",wa);var Te=class extends c{get ariaLabel(){return this.props["aria-label"]??this.props.ariaLabel}onClick(e){this.props.onClick?.(e)}};r(Te,"template","baseui.SidebarGroupAction"),r(Te,"components",{Button:x}),r(Te,"props",{icon:i(String),"aria-label":i(String),ariaLabel:i(String),onClick:i(Function),...p});var To=class extends c{};r(To,"template","baseui.SidebarGroupContent"),r(To,"props",p);var Re=class extends c{setup(){let e=this.props["default-open"]!==void 0||this.props.defaultOpen!==void 0;this.state=y({open:ne(this.props)||e?M(this.props):!0}),G(this.state)}get open(){return this.state.open}toggle(){let e=!this.state.open;J(this.props,this.state,e)}};r(Re,"template","baseui.SidebarGroupCollapsible"),r(Re,"components",{Icon:R,Button:x}),r(Re,"props",{label:{type:String},open:i(Boolean),state:i(String),"default-open":i(Boolean),defaultOpen:i(Boolean),onOpenChange:i(Function),...p});var gt=class extends c{};r(gt,"template","baseui.SidebarMenu"),r(gt,"props",p);var Qt=class extends c{};r(Qt,"template","baseui.SidebarMenuItem"),r(Qt,"props",p);var mt=class extends c{get classNames(){return h("b-sidebar-menu-button",this.isActive&&"is-active",this.props.variant&&`is-${this.props.variant}`,this.props.size&&`is-${this.props.size}`,this.props.className)}get isActive(){return this.props.active||this.props.isActive}onClick(e){this.props.onClick?.(e),Sa(this.env)}};r(mt,"template","baseui.SidebarMenuButton"),r(mt,"components",{Icon:R,Button:x}),r(mt,"props",{href:i(String),icon:i(String),active:i(Boolean),isActive:i(Boolean),variant:i(String),size:i(String),tooltip:i(String),disabled:i(Boolean),onClick:i(Function),...p});var $e=class extends c{get ariaLabel(){return this.props["aria-label"]??this.props.ariaLabel}onClick(e){this.props.onClick?.(e)}};r($e,"template","baseui.SidebarMenuAction"),r($e,"components",{Button:x}),r($e,"props",{icon:i(String),"aria-label":i(String),ariaLabel:i(String),showOnHover:i(Boolean),onClick:i(Function),...p});var Ro=class extends c{};r(Ro,"template","baseui.SidebarMenuSub"),r(Ro,"props",p);var $o=class extends c{};r($o,"template","baseui.SidebarMenuBadge"),r($o,"props",p);var qo=class extends c{setup(){this.state=y({width:this.props.width||`${Math.floor(Math.random()*40)+50}%`})}get style(){return H(`--b-sidebar-skeleton-width:${this.state.width}`,this.props.style)}};r(qo,"template","baseui.SidebarMenuSkeleton"),r(qo,"props",{showIcon:i(Boolean),width:i(String),className:i(String),style:i([String,Object])});var Uo=class extends c{};r(Uo,"template","baseui.SidebarMenuSubItem"),r(Uo,"props",p);var qe=class extends c{get classNames(){return h("b-sidebar-menu-sub-button",(this.props.active||this.props.isActive)&&"is-active",this.props.size&&`is-${this.props.size}`,this.props.className)}onClick(e){this.props.onClick?.(e),Sa(this.env)}};r(qe,"template","baseui.SidebarMenuSubButton"),r(qe,"components",{Button:x}),r(qe,"props",{...wa,active:i(Boolean),isActive:i(Boolean),size:i(String),onClick:i(Function)});w();v();var Ue=class extends c{setup(){this.state=y({collapsed:this.props.collapsed??this.props.defaultCollapsed??!1,authState:this.props.authState??null}),L({shell:this.state,setShellCollapsed:e=>this.setCollapsed(e)}),j(e=>{e.collapsed!==void 0&&(this.state.collapsed=e.collapsed),this.state.authState=e.authState??null})}setCollapsed(e){this.props.collapsed===void 0&&(this.state.collapsed=e),this.props.onCollapsedChange?.(e)}dismissToast(){this.props.onToastOpenChange?.(!1)}runToastAction(){this.props.toast?.onAction?.()}};r(Ue,"template","baseui.Shell"),r(Ue,"components",{Sidebar:ft,Toast:bt,Button:x}),r(Ue,"props",{open:i(Boolean),defaultOpen:i(Boolean),onOpenChange:i(Function),collapsed:i(Boolean),defaultCollapsed:i(Boolean),onCollapsedChange:i(Function),authState:i(Object),toast:i(Object),onToastOpenChange:i(Function),notificationPage:i(Function),pwa:i(Function),...p});var Pe=class extends c{};r(Pe,"template","baseui.ShellSidebar"),r(Pe,"components",{SidebarContent:Jt}),r(Pe,"props",p);var Po=class extends c{};r(Po,"template","baseui.ShellSidebarHeader"),r(Po,"props",p);var Mo=class extends c{};r(Mo,"template","baseui.ShellNav"),r(Mo,"props",p);var _o=class extends c{};r(_o,"template","baseui.ShellMain"),r(_o,"props",p);var zo=class extends c{};r(zo,"template","baseui.ShellHeader"),r(zo,"props",p);var Me=class extends c{};r(Me,"template","baseui.ShellContent"),r(Me,"components",{Skeleton:Ut}),r(Me,"props",{loading:i(Boolean),...p});var _e=class extends c{get authState(){return this.env.shell.authState}logout(){this.authState?.onLogout?.()}};r(_e,"template","baseui.ShellUserMenu"),r(_e,"components",{Button:x}),r(_e,"props",p);w();v();var Do=class extends c{get classNames(){return h("table","b-table",this.props.striped!==!1&&"table-striped",this.props.hover!==!1&&"table-hover",this.props.className)}};r(Do,"template","baseui.Table"),r(Do,"props",{striped:i(Boolean),hover:i(Boolean),responsive:i(Boolean),...p});w();v();var Mc=[{key:"status",label:"Status",format:"capitalize"},{key:"email",label:"Email",sortable:!0,filterable:!0},{key:"amount",label:"Amount",align:"right",format:"currency"}],_c=[{id:"728ed52f",status:"success",email:"ken99@example.com",amount:316},{id:"489e1d42",status:"success",email:"abe45@example.com",amount:242},{id:"6b0888f6",status:"processing",email:"monserrat44@example.com",amount:837},{id:"a1dc8c4e",status:"success",email:"silas22@example.com",amount:874},{id:"15b96de0",status:"failed",email:"carmella@example.com",amount:721}],zc=[{label:"Copy payment ID"},{label:"View customer"},{label:"View payment details"}],ze=4,De=8,Dc=32,je=class extends c{setup(){this.state=y({query:"",sortKey:null,sortDir:1,page:0,pageSize:this.initialPageSize,selectedKeys:[],hiddenColumns:this.columns.filter(e=>e.hidden||e.visible===!1).map(e=>e.key),columnsOpen:!1,actionRowKey:null,actionMenuStyle:null}),this.actionsMenuRef=A("actionsMenu"),this.actionsMenuTriggerEl=null,rs(window,"click",this.onWindowClick,!0),rs(window,"keydown",this.onWindowKeydown),rs(window,"resize",this.closeRowActions),rs(window,"scroll",this.closeRowActions,!0),P(()=>this.refreshActionsMenuPosition())}get columns(){return this.props.columns?.length?this.props.columns:Mc}get rows(){return this.props.rows?.length?this.props.rows:_c}get usesDefaultRows(){return!this.props.rows?.length}get initialPageSize(){return this.props["page-size"]??this.props.pageSize??10}get pageSizeOptions(){return this.props["page-size-options"]??this.props.pageSizeOptions??[10,20,50,80]}get rowActions(){return this.props["row-actions"]??this.props.rowActions??(this.usesDefaultRows?zc:[])}get variant(){return this.props.variant||"default"}get classNames(){return h("b-data-table",`b-data-table-${this.variant}`,this.props.className)}get viewportStyle(){let e=this.props["max-height"]??this.props.maxHeight;return e?`max-height: ${typeof e=="number"?`${e}px`:e};`:""}get hasSearch(){return this.props.searchable!==!1}get hasSorting(){return this.props.sortable!==!1}get hasPagination(){return this.props.pagination!==!1}get hasColumnToggle(){return this.props["column-toggle"]??this.props.columnToggle??!0}get hasToolbarActions(){return!!this.props.slots?.toolbarActions}get hasSelection(){return this.props.selectable??this.usesDefaultRows}get visibleColumns(){return this.columns.filter(e=>!this.state.hiddenColumns.includes(e.key))}get visibleRows(){let e=this.state.query.toLowerCase(),s=this.columns.filter(n=>n.filterable===!0),o=(s.length?s:this.columns).map(n=>n.key),a=this.rows.filter(n=>!e||o.some(l=>String(n[l]).toLowerCase().includes(e)));return this.state.sortKey&&(a=[...a].sort((n,l)=>String(n[this.state.sortKey]).localeCompare(String(l[this.state.sortKey]))*this.state.sortDir)),a}get pageCount(){return Math.max(1,Math.ceil(this.visibleRows.length/this.state.pageSize))}get pageRows(){if(!this.hasPagination)return this.visibleRows;let s=Math.min(this.state.page,this.pageCount-1)*this.state.pageSize;return this.visibleRows.slice(s,s+this.state.pageSize)}get selectedCount(){return this.state.selectedKeys.length}get selectionLabel(){return`${this.selectedCount} of ${this.visibleRows.length} row(s) selected.`}get emptyLabel(){return this.props["empty-label"]??this.props.emptyLabel??"No results."}get filterPlaceholder(){return this.props["filter-placeholder"]??this.props.filterPlaceholder??"Filter emails..."}get canPreviousPage(){return this.hasPagination&&this.state.page>0}get canNextPage(){return this.hasPagination&&this.state.page<this.pageCount-1}get pageLabel(){return`Page ${Math.min(this.state.page,this.pageCount-1)+1} of ${this.pageCount}`}rowKey(e,s){return e.id??e.key??s}isSelected(e,s){return this.state.selectedKeys.includes(this.rowKey(e,s))}isColumnSortable(e){return this.hasSorting&&e.sortable===!0}onSearchInput(e){this.state.query=e.target.value,this.state.page=0}sortBy(e){let s=this.columns.find(o=>o.key===e);!s||!this.isColumnSortable(s)||(this.state.sortKey===e?this.state.sortDir=-this.state.sortDir:(this.state.sortKey=e,this.state.sortDir=1))}sortIcon(e){return this.state.sortKey!==e?"arrow-up-down":this.state.sortDir===1?"arrow-up":"arrow-down"}toggleColumn(e){this.state.hiddenColumns.includes(e)?this.state.hiddenColumns=this.state.hiddenColumns.filter(s=>s!==e):this.state.hiddenColumns=[...this.state.hiddenColumns,e]}toggleColumnsMenu(){this.state.columnsOpen=!this.state.columnsOpen}toggleRowActions(e,s,o){let a=this.rowKey(e,s);if(this.state.actionRowKey===a){this.closeRowActions();return}this.actionsMenuTriggerEl=o.currentTarget,this.state.actionRowKey=a,this.state.actionMenuStyle=this.estimateActionMenuStyle(o.currentTarget)}closeRowActions(){this.state.actionRowKey!==null&&(this.state.actionRowKey=null,this.state.actionMenuStyle=null,this.actionsMenuTriggerEl=null)}get openRowAction(){if(this.state.actionRowKey===null)return null;let e=this.pageRows.findIndex((s,o)=>this.rowKey(s,o)===this.state.actionRowKey);return e===-1?null:{row:this.pageRows[e],index:e}}estimateActionMenuStyle(e){let s=e.getBoundingClientRect(),o=this.rowActions.length*Dc+ze*2,a=window.innerHeight-s.bottom,l=a<o+ze&&s.top>a?Math.max(De,s.top-ze-o):s.bottom+ze,u=Math.min(Math.max(De,s.right-160),window.innerWidth-160-De);return`position: fixed; top: ${Math.round(l)}px; left: ${Math.round(u)}px;`}refreshActionsMenuPosition(){if(this.state.actionRowKey===null||!this.actionsMenuTriggerEl)return;let e=this.actionsMenuRef.el;if(!e)return;let s=this.actionsMenuTriggerEl.getBoundingClientRect(),o=e.getBoundingClientRect(),a=window.innerHeight-s.bottom,n=s.top,u=a<o.height+ze&&n>a?Math.max(De,s.top-ze-o.height):Math.min(s.bottom+ze,window.innerHeight-o.height-De),b=Math.min(Math.max(De,s.right-o.width),window.innerWidth-o.width-De),m=`position: fixed; top: ${Math.round(u)}px; left: ${Math.round(b)}px;`;this.state.actionMenuStyle!==m&&(this.state.actionMenuStyle=m)}onWindowClick(e){this.state.actionRowKey===null||this.actionsMenuRef.el?.contains(e.target)||this.actionsMenuTriggerEl?.contains(e.target)||this.closeRowActions()}onWindowKeydown(e){e.key==="Escape"&&this.closeRowActions()}setPage(e){this.state.page=Math.max(0,Math.min(e,this.pageCount-1))}setPageSize(e){this.state.pageSize=Number(e),this.state.page=0}optionValue(e){return`${e}`}toggleRow(e,s,o){let a=this.rowKey(e,s);this.state.selectedKeys=o?[...new Set([...this.state.selectedKeys,a])]:this.state.selectedKeys.filter(n=>n!==a),this.props.onSelectionChange?.(this.state.selectedKeys)}toggleAllVisible(e){let s=this.pageRows.map((o,a)=>this.rowKey(o,a));this.state.selectedKeys=e?[...new Set([...this.state.selectedKeys,...s])]:this.state.selectedKeys.filter(o=>!s.includes(o)),this.props.onSelectionChange?.(this.state.selectedKeys)}onAction(e,s,o){e.onSelect?.(s,o),this.props.onRowAction?.(e,s,o),this.closeRowActions()}columnLabel(e){return e.label??e.key}cellValue(e,s){let o=e[s.key];if(s.format==="currency"){let a=Number(o);return new Intl.NumberFormat("en-US",{style:"currency",currency:"USD"}).format(Number.isFinite(a)?a:0)}if(s.format==="capitalize"){let a=String(o??"");return a.charAt(0).toUpperCase()+a.slice(1)}return o??""}cellComponentProps(e,s){return s.componentProps?s.componentProps(e,s):{row:e,column:s,value:e[s.key]}}};r(je,"template","baseui.DataTable"),r(je,"components",{Button:x,Icon:R}),r(je,"props",{columns:i(Array),rows:i(Array),variant:i(String),searchable:i(Boolean),sortable:i(Boolean),pagination:i(Boolean),selectable:i(Boolean),"column-toggle":i(Boolean),columnToggle:i(Boolean),"row-actions":i(Array),rowActions:i(Array),"page-size":i(Number),pageSize:i(Number),"page-size-options":i(Array),pageSizeOptions:i(Array),"filter-placeholder":i(String),filterPlaceholder:i(String),"empty-label":i(String),emptyLabel:i(String),onRowAction:i(Function),onSelectionChange:i(Function),...p,"max-height":i([String,Number]),maxHeight:i([String,Number])});w();v();var jc=new Intl.DateTimeFormat(void 0,{month:"long",year:"numeric"}),Fc=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],Fe=class extends c{get baseDate(){return this.props.selected?new Date(`${this.props.selected}T00:00:00`):new Date}get month0(){return(this.props.month??this.baseDate.getMonth()+1)-1}get year(){return this.props.year??this.baseDate.getFullYear()}get headerLabel(){return jc.format(new Date(this.year,this.month0,1))}get weekdays(){return Fc}get days(){let e=new Date(this.year,this.month0+1,0).getDate(),s=new Date(this.year,this.month0,1).getDay(),o=[];for(let a=0;a<s;a++)o.push(null);for(let a=1;a<=e;a++){let n=`${this.year}-${String(this.month0+1).padStart(2,"0")}-${String(a).padStart(2,"0")}`;o.push({day:a,value:n,selected:n===this.props.selected})}return o}onSelect(e){this.props.onChange?.(e)}};r(Fe,"template","baseui.Calendar"),r(Fe,"components",{Button:x}),r(Fe,"props",{selected:i(String),month:i(Number),year:i(Number),className:i(String),style:i([String,Object]),onChange:i(Function)});v();var jo=class extends Z{get classNames(){return h("b-date-picker","form-control",this.controlClass,this.isInvalid&&"is-invalid",this.props.className)}onInput(e){this.props.onChange?.(e.target.value,e)}};r(jo,"template","baseui.DatePicker"),r(jo,"props",{...tt,value:i(String),className:i(String),style:i([String,Object]),onChange:i(Function)});w();v();var Fo=class extends Z{setup(){super.setup(),this.rootRef=A("root");let{state:e}=Is(this.rootRef);this.disclosure=e,this.state=y({query:this.selectedLabel})}get classNames(){return h("form-control",this.controlClass,this.isInvalid&&"is-invalid")}get selectedLabel(){return this.props.options.find(e=>e.value===this.props.value)?.label||""}get filteredOptions(){let e=this.state.query.toLowerCase();return this.props.options.filter(s=>s.label.toLowerCase().includes(e))}onInput(e){this.state.query=e.target.value,this.disclosure.open=!0}onFocus(){this.disclosure.open=!0}choose(e){this.state.query=e.label,this.disclosure.open=!1,this.props.onChange?.(e.value)}};r(Fo,"template","baseui.Combobox"),r(Fo,"props",{options:{type:Array},...tt,value:i(String),className:i(String),style:i([String,Object]),id:i(String),onChange:i(Function)});w();v();var Ho=class extends c{setup(){this.state=y({query:""})}get filteredItems(){let e=this.state.query.toLowerCase();return this.props.items.filter(s=>s.label.toLowerCase().includes(e))}onInput(e){this.state.query=e.target.value}select(e){this.props.onSelect?.(e.value)}};r(Ho,"template","baseui.Command"),r(Ho,"props",{items:{type:Array},placeholder:i(String),className:i(String),style:i([String,Object]),onSelect:i(Function)});w();v();var Wo=class extends c{get classNames(){return h("b-chart",this.props.type&&`b-chart-${this.props.type}`,this.props.variant&&`b-chart-${this.props.variant}`,this.props.className)}};r(Wo,"template","baseui.Chart"),r(Wo,"props",{config:i([String,Object]),label:i(String),type:i(String),value:i([String,Number]),variant:i(String),...p});w();v();var Ko=class extends c{setup(){this.state=y({index:this.props.defaultIndex??0}),this.rootRef=A("root"),this.bootstrapCarousel=null,this.onSlid=e=>{this.state.index=e.to,this.props.onChange?.(this.state.index)},L({carousel:this.state,carouselInstance:()=>this.bootstrapCarousel}),T(()=>{this.bootstrapCarousel=new(k()).Carousel(this.rootRef.el,{interval:!1,wrap:!0,touch:!0}),this.rootRef.el.addEventListener("slid.bs.carousel",this.onSlid)}),q(()=>{this.rootRef.el.removeEventListener("slid.bs.carousel",this.onSlid),this.bootstrapCarousel?.dispose()})}};r(Ko,"template","baseui.Carousel"),r(Ko,"props",{slideCount:{type:Number},defaultIndex:i(Number),onChange:i(Function),...p});var Vo=class extends c{setup(){this.rootRef=A("root"),this.initialActive=this.active,P(()=>{if(!this.rootRef.el)return;let e=this.rootRef.el.classList.contains("active");this.active&&!e?this.rootRef.el.classList.add("active"):!this.active&&e&&this.rootRef.el.classList.remove("active")})}get active(){return this.props.state!==void 0?D(this.props.state):this.env.carousel.index===this.props.index}};r(Vo,"template","baseui.CarouselSlide"),r(Vo,"props",{index:{type:Number},state:i(String),...p});var He=class extends c{onClick(){this.env.carouselInstance()?.prev()}};r(He,"template","baseui.CarouselPrevious"),r(He,"components",{Button:x}),r(He,"props",p);var We=class extends c{onClick(){this.env.carouselInstance()?.next()}};r(We,"template","baseui.CarouselNext"),r(We,"components",{Button:x}),r(We,"props",p);w();v();var Zo=class extends c{setup(){this.panelRef=A("panel"),this.state=y({width:null})}get panelStyle(){return this.state.width?`width:${this.state.width}px`:""}onPointerDown(e){let s=e.clientX,o=this.panelRef.el.getBoundingClientRect().width,a=this.props.min||160,n=this.props.max||720,l=b=>{this.state.width=Math.min(n,Math.max(a,o+b.clientX-s))},u=()=>{document.removeEventListener("pointermove",l),document.removeEventListener("pointerup",u),this.props.onChange?.(this.state.width)};document.addEventListener("pointermove",l),document.addEventListener("pointerup",u)}};r(Zo,"template","baseui.Resizable"),r(Zo,"props",{min:i(Number),max:i(Number),onChange:i(Function),...p});w();v();var Go=class extends c{get classNames(){return h("b-scroll-area",this.props.className)}};r(Go,"template","baseui.ScrollArea"),r(Go,"props",p);w();v();var Aa={idle:"b-attachment-idle",uploading:"b-attachment-uploading",processing:"b-attachment-processing",error:"b-attachment-error",done:"b-attachment-done"},Ea={default:"b-attachment-default",sm:"b-attachment-sm",xs:"b-attachment-xs"},Jo=class extends c{get state(){return Aa[this.props.state]?this.props.state:"done"}get size(){return Ea[this.props.size]?this.props.size:"default"}get orientation(){return this.props.orientation==="vertical"?"vertical":"horizontal"}get classNames(){return h("b-attachment",Aa[this.state],Ea[this.size],`b-attachment-${this.orientation}`,!this.hasContent&&"b-attachment-picker",this.props.className)}get hasContent(){return!!this.props.slots?.default}onChange(e){this.props.onChange?.([...e.target.files])}};r(Jo,"template","baseui.Attachment"),r(Jo,"props",{state:i(String),size:i(String),orientation:i(String),multiple:i(Boolean),...p,onChange:i(Function)});var Xo=class extends c{get variant(){return this.props.variant==="image"?"image":"icon"}get classNames(){return h("b-attachment-media",`b-attachment-media-${this.variant}`,this.props.className)}};r(Xo,"template","baseui.AttachmentMedia"),r(Xo,"props",{variant:i(String),...p});var Yo=class extends c{};r(Yo,"template","baseui.AttachmentContent"),r(Yo,"props",p);var Qo=class extends c{};r(Qo,"template","baseui.AttachmentTitle"),r(Qo,"props",p);var tr=class extends c{};r(tr,"template","baseui.AttachmentDescription"),r(tr,"props",p);var er=class extends c{};r(er,"template","baseui.AttachmentActions"),r(er,"props",p);var Ke=class extends c{get variant(){return this.props.variant||"ghost"}get size(){return this.props.size||"icon-xs"}get className(){return h("b-button-icon","b-attachment-action",this.props.className)}get ariaLabel(){return this.props["aria-label"]??this.props.ariaLabel}onClick(e){this.props.onClick?.(e)}};r(Ke,"template","baseui.AttachmentAction"),r(Ke,"components",{Button:x}),r(Ke,"props",{type:i(String),variant:i(String),size:i(String),disabled:i(Boolean),label:i(String),...p,"aria-label":i(String),ariaLabel:i(String),onClick:i(Function)});var Ve=class extends c{get classNames(){return h("b-attachment-trigger",this.props.className)}get ariaLabel(){return this.props["aria-label"]??this.props.ariaLabel}onClick(e){this.props.onClick?.(e)}};r(Ve,"template","baseui.AttachmentTrigger"),r(Ve,"components",{Button:x}),r(Ve,"props",{href:i(String),target:i(String),rel:i(String),type:i(String),className:i(String),style:i([String,Object]),"aria-label":i(String),ariaLabel:i(String),onClick:i(Function)});var sr=class extends c{get classNames(){return h("b-attachment-group",this.props.className)}};r(sr,"template","baseui.AttachmentGroup"),r(sr,"props",{...p});var or=class extends c{setup(){this.state=y({dragging:!1}),this.fileInput=A("fileInput")}get hasContent(){return!!this.props.slots?.default}get classNames(){return h("b-attachment-dropzone",this.state.dragging&&"b-attachment-dropzone-dragging",this.props.disabled&&"b-attachment-dropzone-disabled",this.props.className)}openPicker(){this.props.disabled||this.fileInput.el?.click()}onInputChange(e){let s=Array.from(e.target.files??[]);e.target.value="",s.length&&this.props.onFilesSelected?.(s)}onDragOver(e){e.preventDefault(),!this.props.disabled&&(this.state.dragging=!0)}onDragLeave(){this.state.dragging=!1}onDrop(e){if(e.preventDefault(),this.state.dragging=!1,this.props.disabled)return;let s=Array.from(e.dataTransfer?.files??[]);s.length&&this.props.onFilesSelected?.(s)}};r(or,"template","baseui.AttachmentDropzone"),r(or,"props",{multiple:i(Boolean),disabled:i(Boolean),...p,onFilesSelected:i(Function)});w();v();var rr=class extends c{setup(){this.state=y({errored:!1})}get showImage(){return!!this.props.src&&!this.state.errored}onError(){this.state.errored=!0}};r(rr,"template","baseui.Avatar"),r(rr,"props",{src:i(String),alt:i(String),title:i(String),...p});w();v();var ir=class extends c{get classNames(){return h("b-message",this.props.className)}get side(){return this.props.side||"incoming"}};r(ir,"template","baseui.Message"),r(ir,"props",{side:i(String),...p});w();v();var ar=class extends c{setup(){this.rootRef=A("root"),Y(()=>{this.props.autoscroll!==!1&&this.rootRef.el&&(this.rootRef.el.scrollTop=this.rootRef.el.scrollHeight)})}};r(ar,"template","baseui.MessageScroller"),r(ar,"props",{autoscroll:i(Boolean),...p});w();v();var nr=class extends c{setup(){this.state=y({index:0}),L({questionnaire:this.state,questionnaireShow:e=>this.show(e)})}show(e){this.state.index=Math.min(this.props.stepCount-1,Math.max(0,e)),this.props.onChange?.(this.state.index)}};r(nr,"template","baseui.Questionnaire"),r(nr,"props",{stepCount:{type:Number},onChange:i(Function),...p});var cr=class extends c{get active(){return this.props.state!==void 0?D(this.props.state):this.env.questionnaire.index===this.props.index}};r(cr,"template","baseui.QuestionnaireStep"),r(cr,"props",{index:{type:Number},state:i(String),...p});var Ze=class extends c{get disabled(){return this.env.questionnaire.index===0}onClick(){this.env.questionnaireShow(this.env.questionnaire.index-1)}};r(Ze,"template","baseui.QuestionnairePrevious"),r(Ze,"components",{Button:x}),r(Ze,"props",p);var Ge=class extends c{onClick(){this.env.questionnaireShow(this.env.questionnaire.index+1)}};r(Ge,"template","baseui.QuestionnaireNext"),r(Ge,"components",{Button:x}),r(Ge,"props",{...p,stepCount:i(Number)});w();v();var lr=class extends c{get max(){return this.props.max||100}get value(){return Math.min(this.max,Math.max(0,this.props.value||0))}get style(){return H(`--b-progress-value:${this.value/this.max*100}%`,this.props.style)}get classNames(){return h("progress b-progress",this.props.className)}};r(lr,"template","baseui.Progress"),r(lr,"props",{value:i(Number),max:i(Number),className:i(String),style:i([String,Object])});w();v();var pr=class extends c{get classNames(){return h("b-aspect-ratio",this.props.className)}get style(){let e=this.props.ratio||`${this.props.width||16} / ${this.props.height||9}`;return H(`--b-aspect-ratio:${e}`,this.props.style)}};r(pr,"template","baseui.AspectRatio"),r(pr,"props",{ratio:i(String),width:i(Number),height:i(Number),...p});w();v();var ur=class extends c{get classNames(){return h("b-bubble",this.props.className)}get side(){return this.props.side}};r(ur,"template","baseui.Bubble"),r(ur,"props",{side:i(String),...p});w();v();var dr=class extends c{get dir(){return this.props.dir==="rtl"?"rtl":"ltr"}};r(dr,"template","baseui.Direction"),r(dr,"props",{dir:i(String),...p});w();v();var br=class extends c{get classNames(){return h("b-item",this.props.className)}get variant(){return this.props.variant}};r(br,"template","baseui.Item"),r(br,"props",{variant:i(String),...p});w();v();var hr=class extends c{get orientation(){return this.props.orientation==="vertical"?"vertical":"horizontal"}get classNames(){return h("b-button-group",this.orientation==="vertical"?"btn-group-vertical":"btn-group",(this.props.size==="sm"||this.props.size==="lg")&&`btn-group-${this.props.size}`,this.props.className)}get ariaLabel(){return this.props["aria-label"]}get ariaLabelledby(){return this.props["aria-labelledby"]}};r(hr,"template","baseui.ButtonGroup"),r(hr,"props",{orientation:i(String),size:i(String),"aria-label":i(String),"aria-labelledby":i(String),...p});var mr=class extends c{get orientation(){return this.props.orientation==="horizontal"?"horizontal":"vertical"}get classNames(){return h("b-button-group-separator",`b-button-group-separator-${this.orientation}`,this.props.className)}};r(mr,"template","baseui.ButtonGroupSeparator"),r(mr,"props",{orientation:i(String),className:i(String),style:i([String,Object])});var fr=class extends c{get classNames(){return h("b-button-group-text",this.props.className)}};r(fr,"template","baseui.ButtonGroupText"),r(fr,"props",{...p});w();v();var gr=class extends c{get classNames(){return h("b-field-set",this.props.className)}};r(gr,"template","baseui.FieldSet"),r(gr,"props",{...p});var vr=class extends c{get variant(){return this.props.variant||"legend"}get classNames(){return h("b-field-legend",this.props.className)}};r(vr,"template","baseui.FieldLegend"),r(vr,"props",{variant:i(String),...p});var te=class extends c{get classNames(){return h("b-field-group",this.props.className)}};r(te,"template","baseui.FieldGroup"),r(te,"props",{...p});var ee=class extends c{setup(){L({fieldProps:()=>this.props})}get orientation(){return this.props.orientation||"vertical"}get classNames(){return h("b-field",`b-field-orientation-${this.orientation}`,this.props.className)}};r(ee,"template","baseui.Field"),r(ee,"props",{orientation:i(String),invalid:i(Boolean),label:i(String),labelBackground:i(String),description:i(String),useTip:i(Number),error:i(String),...p});var yr=class extends c{get classNames(){return h("b-field-content",this.props.className)}};r(yr,"template","baseui.FieldContent"),r(yr,"props",{...p});var se=class extends c{get classNames(){return h("b-field-label",this.props.className)}};r(se,"template","baseui.FieldLabel"),r(se,"props",{for:i(String),...p});var xr=class extends c{get classNames(){return h("b-field-title",this.props.className)}};r(xr,"template","baseui.FieldTitle"),r(xr,"props",{...p});var oe=class extends c{get classNames(){return h("b-field-description",this.props.className)}};r(oe,"template","baseui.FieldDescription"),r(oe,"props",{...p});var wr=class extends c{get hasContent(){return!!this.props.slots?.default}get classNames(){return h("b-field-separator",this.props.className)}};r(wr,"template","baseui.FieldSeparator"),r(wr,"props",{...p});var re=class extends c{get classNames(){return h("b-field-error",this.props.className)}};r(re,"template","baseui.FieldError"),r(re,"props",{message:i(String),...p});function Ca(t){return`Icon${String(t).split("-").filter(Boolean).map(s=>s[0].toUpperCase()+s.slice(1)).join("")}`}w();v();var Sr=class extends c{get classNames(){return h("form-label","b-label","b-label",this.props.className)}get state(){return this.props.state||(this.props.required?"required":void 0)}};r(Sr,"template","baseui.Label"),r(Sr,"props",{for:i(String),required:i(Boolean),state:i(String),...p});w();var Hc="b-theme",Wc="theme",Kc="[b-theme-toggle]",Vc="[b-theme-label]";function Ii(t){return t==="dark"?"dark":"light"}function Zc(t){return typeof globalThis.location>"u"?null:new URLSearchParams(globalThis.location.search).get(t)}function Gc(t,e=document.documentElement){let s=Ii(t);return globalThis.thebase?.theme?.set?globalThis.thebase.theme.set(s):e&&(e.setAttribute("b-theme",s),e.setAttribute("data-bs-theme",s)),s}function ka(t,e,s){try{t.contentWindow?.BaseUI?.theme.set(e),t.contentDocument?.documentElement.setAttribute("b-theme",e),t.contentDocument?.documentElement.setAttribute("data-bs-theme",e)}catch{let o=new URL(t.getAttribute("src"),globalThis.location.href);o.searchParams.set(s,e),t.setAttribute("src",o.pathname+o.search+o.hash)}}function Jc(t){typeof document>"u"||typeof CustomEvent>"u"||document.dispatchEvent(new CustomEvent("baseui:theme-change",{detail:{theme:t}}))}function ie(t={}){let e=t.storageKey||Hc,s=t.queryKey||Wc,o=t.toggleSelector??Kc,a=t.labelSelector??Vc,n=t.root||(typeof document>"u"?null:document.documentElement);function l(){return Zc(s)}function u(){return Ii(l()||globalThis.localStorage?.getItem(e)||n?.getAttribute("b-theme")||"light")}function b(N){typeof document>"u"||!o||document.querySelectorAll(o).forEach(I=>{I.setAttribute("aria-pressed",N==="dark"?"true":"false");let C=a?I.querySelector(a):null;C&&(C.textContent=N==="dark"?"Light theme":"Dark theme")})}function m(N){typeof document>"u"||document.querySelectorAll("iframe").forEach(I=>ka(I,N,s))}function f(N,I={}){let C=Gc(N,n);return!I.skipStorage&&!l()&&globalThis.localStorage?.setItem(e,C),b(C),m(C),Jc(C),C}function g(){return f(n?.getAttribute("b-theme")==="dark"?"light":"dark")}function E(){if(typeof document>"u")return u();let N=u();return f(N,{skipStorage:!!l()}),o&&document.addEventListener("click",I=>{I.target.closest?.(o)&&g()}),document.querySelectorAll("iframe").forEach(I=>{I.addEventListener("load",()=>ka(I,n?.getAttribute("b-theme")||N,s))}),N}return{current:u,set:f,toggle:g,syncFrames:m,init:E}}var La=ie();typeof window<"u"&&(window.BaseUITheme=La);v();v();ns();var Na=["btn","b-theme-button",...Object.values(W),...Object.values(V)];function Ar(t){let e=t==="dark";return{icon:e?"sun":"moon",label:e?"Switch to light theme":"Switch to dark theme",pressed:e?"true":"false"}}function ci({variant:t="outline",size:e,className:s}={}){return h("btn","b-theme-button",W[t]||W.outline,V[e],s)}var vt=class extends c{setup(){this.theme=ie({storageKey:K(this.props,"storage-key","storageKey")}),this.state=y({theme:this.theme.current()}),this.onThemeChange=e=>{this.state.theme=e.detail?.theme||this.theme.current()},T(()=>{this.state.theme=this.theme.set(this.theme.current(),{skipStorage:!0}),document.addEventListener("baseui:theme-change",this.onThemeChange)}),q(()=>document.removeEventListener("baseui:theme-change",this.onThemeChange))}get iconName(){return Ar(this.state.theme).icon}get baseUrl(){return K(this.props,"base-url")}get label(){return Ar(this.state.theme).label}get pressed(){return Ar(this.state.theme).pressed}get classNames(){return ci(this.props)}get attrs(){return{"b-theme-button":""}}onClick(){let e=this.theme.toggle();this.state.theme=e,this.props.onChange?.(e)}};r(vt,"template","baseui.ThemeButton"),r(vt,"components",{Icon:R,Button:x}),r(vt,"props",{variant:i(String),size:i(String),"base-url":i(String),"storage-key":i(String),storageKey:i(String),className:i(String),style:i([String,Object]),onChange:i(Function)});w();v();var Je=class extends c{get classNames(){return h("b-toggle","btn",this.props.variant==="outline"?"btn-outline-secondary":"btn-light",this.props.className)}get pressed(){return this.props.state!==void 0?D(this.props.state):!!this.props.pressed}onClick(){this.props.onChange?.(!this.pressed)}};r(Je,"template","baseui.Toggle"),r(Je,"components",{Button:x}),r(Je,"props",{pressed:i(Boolean),state:i(String),variant:i(String),...p,onChange:i(Function)});w();v();var Er=class extends c{setup(){this.state=y({selected:new Set}),L({toggleGroup:this.state,toggleGroupSelect:e=>this.select(e)})}select(e){this.props.multiple?this.state.selected.has(e)?this.state.selected.delete(e):this.state.selected.add(e):this.state.selected=this.state.selected.has(e)?new Set:new Set([e]);let s=this.props.multiple?[...this.state.selected]:[...this.state.selected][0];this.props.onChange?.(s)}};r(Er,"template","baseui.ToggleGroup"),r(Er,"props",{multiple:i(Boolean),onChange:i(Function),...p});var Xe=class extends c{get pressed(){return this.env.toggleGroup.selected.has(this.props.value)}onClick(){this.env.toggleGroupSelect(this.props.value)}};r(Xe,"template","baseui.ToggleGroupItem"),r(Xe,"components",{Button:x}),r(Xe,"props",{value:{type:String},...p});w();v();w();v();ui();function di(t){let e=String(t??""),s=/^---\r?\n([\s\S]*?)\r?\n---[ \t]*\r?\n?/.exec(e);if(!s)return{data:{},content:e};let o={};for(let a of s[1].split(/\r?\n/)){let n=a.trim();if(!n||n.startsWith("#"))continue;let l=n.indexOf(":");if(l===-1)continue;let u=n.slice(0,l).trim();u&&(o[u]=Rl(n.slice(l+1).trim()))}return{data:o,content:e.slice(s[0].length)}}function Pa(t){return t.length>=2&&(t[0]==='"'&&t.at(-1)==='"'||t[0]==="'"&&t.at(-1)==="'")?t.slice(1,-1):t}function Rl(t){if(t==="")return"";if(t==="true")return!0;if(t==="false")return!1;if(/^-?\d+(\.\d+)?$/.test(t))return Number(t);if(t.startsWith("[")&&t.endsWith("]")){let e=t.slice(1,-1).trim();return e?e.split(",").map(s=>Pa(s.trim())):[]}return Pa(t)}var yt=class extends c{setup(){this.rootRef=A("root"),this.editorRef=A("editor"),this.editorHandle=null,this.state=y({html:"",source:"",status:"loading",error:"",frontmatter:{}}),ot(()=>this.load(this.props)),j(e=>{if(this.shouldReload(e))return this.load(e);this.shouldRestartEditor(e)&&this.destroyEditor()}),T(()=>this.afterRender()),P(()=>this.afterRender()),le(()=>{this.destroyEditor(),this.rootRef.el&&Cr(this.rootRef.el)})}get classNames(){return h("b-markdown",this.props.className)}get editorLabel(){return this.props.collaborative?"Collaborative Markdown editor":"Markdown editor"}shouldReload(e){return e.content!==this.props.content||e.src!==this.props.src}shouldRestartEditor(e){return e.editable!==this.props.editable||e.collaborative!==this.props.collaborative||e.room!==this.props.room||e.password!==this.props.password||e.signaling!==this.props.signaling}async load(e){this.destroyEditor(),this.state.status="loading",this.state.error="";let s=e.content??"";if(e.src)try{let o=await fetch(e.src);if(!o.ok)throw new Error(`${o.status} ${o.statusText}`);s=await o.text()}catch(o){this.state.status="error",this.state.error=o.message||String(o);return}try{this.state.source=s;let{data:o,content:a}=di(s);this.state.frontmatter=o,this.state.html=wi(await Fr(a)),this.state.status="ready"}catch(o){this.state.status="error",this.state.error=o.message||String(o)}}get hasFrontmatterMeta(){let e=this.state.frontmatter;return!!(e.tags?.length||e.authors?.length)}enhance(){let e=this.rootRef.el;!e||this.state.status!=="ready"||Hr(e,{mermaid:this.props.mermaid!==!1,baseUi:this.props.baseUi!==!1})}afterRender(){this.props.editable?this.mountEditor():this.enhance()}async mountEditor(){let e=this.editorRef.el;if(!(!e||this.editorHandle||this.state.status!=="ready"))try{this.editorHandle=await Wr({root:e,value:this.state.source,collaborative:!!this.props.collaborative,room:this.props.room||"b-markdown",password:this.props.password,signaling:this.props.signaling,user:this.props.user,onChange:(s,o,a)=>{this.state.source=s,this.props.onChange?.(s,o,a)}})}catch(s){this.state.status="error",this.state.error=s.message||String(s)}}destroyEditor(){this.editorHandle?.destroy?.(),this.editorHandle=null}};r(yt,"template","baseui.Markdown"),r(yt,"components",{Badge:Q}),r(yt,"props",{content:i(String),src:i(String),mermaid:i(Boolean),baseUi:i(Boolean),editable:i(Boolean),collaborative:i(Boolean),room:i(String),password:i(String),signaling:i(Array),user:i(Object),onChange:i(Function),className:i(String),style:i([String,Object])});var Ma={implicit:"Implicit",password:"Resource Owner Password Credentials",application:"Client Credentials",accessCode:"Authorization Code"},$l=["POST","PUT","PATCH"];function Ye(t){try{return sessionStorage.getItem(t)||""}catch{return""}}function Kr(t,e){try{e?sessionStorage.setItem(t,e):sessionStorage.removeItem(t)}catch{}}function _i(){return!!(Ye("apikey")||Ye("oauthkey"))}function Mi(t){return t.example!==void 0?String(t.example):t.default!==void 0?String(t.default):t.enum?.length?String(t.enum[0]):t.type==="integer"||t.type==="number"?t.format==="int64"?"10":"1":t.type==="boolean"?"true":t.required&&t.in==="path"?"string":""}function zi(t,e){let s=Ye("apikey"),o=Ye("oauthkey");for(let a of t.security)a.type==="apiKey"&&a.in==="header"?e.header[a.name]=s:a.type==="apiKey"&&a.in==="query"?e.query[a.name]=s:a.type==="basic"?e.header.Authorization=s?`Basic ${s}`:"":(a.type==="oauth2"||a.type==="bearer")&&(e.header.Authorization=o?`Bearer ${o}`:"")}function _a(t,e){let s={baseUrl:e,path:{},query:{},header:{},bodyText:"",mimeType:t.consumes?.[0]||"application/json"};return t.parameters.path.forEach(o=>{s.path[o.name]=Mi(o)}),t.parameters.query.forEach(o=>{s.query[o.name]=o.required?Mi(o):""}),t.parameters.header.forEach(o=>{s.header[o.name]=o.required?Mi(o):""}),t.produces?.length&&(s.header.Accept=t.produces.includes("application/json")?"application/json":t.produces[0]),t.parameters.body&&(s.mimeType=t.parameters.body.contentType||s.mimeType,s.bodyText=Di(t.parameters.body.example)),zi(t,s),s}function Di(t){return typeof t=="string"?t:JSON.stringify(t,null,2)??""}function ji(t,e){let s=t.path;for(let[a,n]of Object.entries(e.path))s=s.replace(`{${a}}`,encodeURIComponent(n??""));let o=!!t.parameters.body&&$l.includes(t.method);return{method:t.method,url:`${e.baseUrl}${s}`,query:Object.entries(e.query).filter(([,a])=>a!==""),headers:Object.entries(e.header).filter(([,a])=>a!==""),bodyText:o?e.bodyText:"",mimeType:e.mimeType}}function za(t){let e=t.query.length?`${t.url}?${new URLSearchParams(t.query)}`:t.url,s=Object.fromEntries(t.headers);return t.bodyText&&(s["Content-Type"]=s["Content-Type"]||t.mimeType),{url:e,headers:s,headerLines:Object.entries(s).map(([o,a])=>`${o}: ${a}`).join(`
|
|
28
|
-
`)}}async function Da(t,e){let s=performance.now(),o=await fetch(e.url,{method:t.method,headers:e.headers,body:t.bodyText||void 0}),a=Math.round(performance.now()-s),n=await o.text();return{status:o.status,statusText:o.statusText,ms:a,headerLines:[...o.headers.entries()].map(([l,u])=>`${l}: ${u}`).join(`
|
|
29
|
-
`),bodyText:ql(n)}}function ql(t){try{return JSON.stringify(JSON.parse(t),null,2)}catch{return t}}function ja(t){let e=parseInt(t,10);return t==="default"||Number.isNaN(e)?"default":e<300?"2xx":e<400?"3xx":e<500?"4xx":"5xx"}function Fa(t,e,s){if(!t)return"";try{let o=new URL(e),a=new URL(s.derivedBaseUrl||s.baseUrl||e),n=new URL(t,`${o.href.replace(/\/$/,"")}/`);return n.host===a.host&&(n.protocol=o.protocol,n.username=o.username,n.password=o.password,n.host=o.host),n.href}catch{return String(t)}}function Ha(){return Array.from(crypto.getRandomValues(new Uint8Array(16)),t=>t.toString(16).padStart(2,"0")).join("")}function Wa({def:t,clientId:e,scopes:s,state:o,redirectUri:a,baseUrl:n,doc:l}){let u=new URL(Fa(t.authorizationUrl,n,l));return u.searchParams.set("response_type",t.flow==="implicit"?"token":"code"),e&&u.searchParams.set("client_id",e),u.searchParams.set("redirect_uri",a),s.length&&u.searchParams.set("scope",s.join(" ")),u.searchParams.set("state",o),u.toString()}async function Ka(t,e,s,o){if(!t)throw new Error("No tokenUrl defined for this scheme.");let a=new URLSearchParams;for(let[u,b]of Object.entries(e))b&&a.set(u,b);let n=await fetch(Fa(t,s,o),{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:a.toString()}),l=await n.json().catch(()=>({}));if(!n.ok||!l.access_token)throw new Error(l.error_description||l.error||`HTTP ${n.status}`);return l.access_token}function Va(t,e,s){let o={client_id:e.clientId,client_secret:e.clientSecret,scope:s.join(" ")};return t==="password"?{grant_type:"password",username:e.username,password:e.password,...o}:{grant_type:"client_credentials",...o}}var Za;function Ul(){return Za??(Za=import("./runtime/lazy/apidoc.logic.js"))}var Pl=["curl","csharp","go","node","ruby","php"],Ml="(max-width: 1100px)";function Ga(t){return t==="DELETE"?"DEL":t}function _l(){let t=[...document.scripts].find(e=>/\/baseui(\.[\w-]+)*\.(min\.)?js(\?|$)/.test(e.src));return t?`${t.src.replace(/[?#].*$/,"").replace(/\/[^/]*$/,"")}/apidoc`:""}var wt=class extends c{get children(){return this.props.groups.filter(e=>e.parent===this.props.group.name)}methodLabel(e){return Ga(e)}};r(wt,"template","baseui.ApiDocGroup"),r(wt,"props",{group:Object,groups:Array,current:String,href:Function,onSelect:Function});wt.components={ApiDocGroup:wt,Icon:R};var xt=class extends c{setup(){this.rootRef=A("root"),this.mainRef=A("main"),this.doc=null,this.pendingOAuth=new Map,this.watchers=new Set,this.rowsCache=new WeakMap,this.overlayQuery=window.matchMedia(Ml),this.state=y({status:"loading",error:"",current:"introduction",lang:this.props.language||"curl",sidebarOpen:!this.overlayQuery.matches,systemTheme:"light",themeOverride:"",drafts:{},snippet:"",result:null,respTab:0,respView:{},authOpen:!1,authed:_i(),stored:{apikey:"",oauthkey:""},inputs:{apikey:"",oauthkey:""},oauth:{},oauthStatus:{}}),this.onHashChange=()=>this.setCurrent(this.routeId()),this.onViewportChange=()=>{this.state.sidebarOpen=!this.overlayQuery.matches},this.onDocumentClick=e=>this.closeSidebarOnOutsideClick(e),this.onOAuthMessage=e=>this.handleOAuthMessage(e),this.onThemeChange=()=>this.readSystemTheme(),ot(()=>this.load(this.props)),j(e=>this.shouldReload(e)?this.load(e):void 0),T(()=>this.addListeners()),le(()=>this.removeListeners())}get classNames(){return h("b-apidoc",this.props.className)}get rootStyle(){return H(this.props.height?`--b-apidoc-height:${this.props.height}`:"",this.props.style)}get theme(){return(this.props.theme==="light"||this.props.theme==="dark"?this.props.theme:"")||this.state.themeOverride||this.state.systemTheme}get title(){return this.props.title||this.doc?.info.title||"API Documentation"}get tryItEnabled(){return this.props.tryIt!==!1}get hasSecurity(){return this.props.authorize!==!1&&Object.keys(this.doc?.securityDefinitions||{}).length>0}get languages(){let e=this.logic?.LANGUAGES||[],s=this.props.languages;return s?.length?e.filter(o=>s.includes(o.id)):e}get currentLanguage(){return this.languages.find(e=>e.id===this.state.lang)||this.languages[0]}get op(){return this.state.current==="introduction"?null:this.doc.findOperation(this.state.current)}get draft(){return this.state.drafts[this.state.current]}get showTryIt(){return this.tryItEnabled&&!!this.op}get sidebarGroups(){let e=this.doc.groups.filter(s=>!s.parent);return this.doc.webhooks.length&&e.push({id:"webhooks",name:"Webhooks",items:this.doc.webhooks,kind:""}),e}get breadcrumb(){let e=this.op;if(!e)return[{label:"Home",id:"introduction",home:!0},{label:"Introduction"}];let s=this.doc.groups.find(o=>o.name===e.tag);return[{label:"Home",id:"introduction",home:!0},{label:this.title,id:"introduction"},{label:e.tag,id:s?s.items[0].id:"introduction"},{label:e.summary}]}get authSchemes(){return Object.entries(this.doc.securityDefinitions).map(([e,s])=>({key:e,def:s,scopes:Object.entries(s.scopes||{})}))}get serverOptions(){return this.doc.servers.length?this.doc.servers:[{url:this.doc.baseUrl,name:"",description:""}]}get tryItParams(){let{path:e,query:s,header:o}=this.op.parameters;return[...e.map(a=>({...a,group:"path"})),...s.map(a=>({...a,group:"query"})),...o.map(a=>({...a,group:"header"}))]}get selectedBaseUrl(){return this.draft?.baseUrl||this.doc.baseUrl}methodLabel(e){return Ga(e)}statusClass(e){return ja(e)}formatExample(e){return Di(e)}serverLabel(e){let s=[e.name,e.description].filter(Boolean).join(" \u2014 ");return s?`${s} (${e.url})`:e.url}languageTone(e){return Pl.includes(e)?e:"default"}encodingEntries(e){return Object.entries(e)}oauthFlowLabel(e){return Ma[e]||e||"unknown"}schemaRows(e){return this.rowsCache.has(e)||this.rowsCache.set(e,this.doc.schemaRows(e)),this.rowsCache.get(e)}depth(e){return(e.match(/\./g)||[]).length}lineNumbers(e){return String(e||"").split(`
|
|
30
|
-
`).map((s,o)=>o+1)}iconUrl(e){let s=this.props.assetBase??this.assetBase??(this.assetBase=_l());return s?`${s.replace(/\/$/,"")}/${e.icon}`:""}href(e){return this.props.hash?`#/${e}`:"#"}shouldReload(e){return e.src!==this.props.src||e.spec!==this.props.spec||e.serverUrl!==this.props.serverUrl}async load(e){this.state.status="loading";try{this.logic=await Ul(),this.doc=e.spec?this.logic.buildOpenApiDoc(e.spec,e.serverUrl):await this.logic.loadOpenApiDoc(e.src,e.serverUrl)}catch(s){this.state.status="error",this.state.error=s.message||String(s),e.onError?.(s);return}this.state.drafts={},this.state.current=this.routeId(e),this.ensureDraft(),this.state.status="ready",this.updateSnippet(),e.onLoad?.(this.doc)}routeId(e=this.props){let s=e.hash?location.hash.replace(/^#\//,""):e.operation;return s&&this.doc.findOperation(s)?s:"introduction"}go(e,s){this.props.hash||(e.preventDefault(),this.setCurrent(s)),this.overlayQuery.matches&&(this.state.sidebarOpen=!1)}setCurrent(e){let s=this.state;s.current=e,s.result=null,s.respTab=0,s.respView={},this.ensureDraft(),this.updateSnippet(),this.mainRef.el&&(this.mainRef.el.scrollTop=0),this.props.onNavigate?.(e)}ensureDraft(){let e=this.op;e&&!this.state.drafts[e.id]&&(this.state.drafts[e.id]=_a(e,this.doc.baseUrl))}toggleSidebar(){this.state.sidebarOpen=!this.state.sidebarOpen}closeSidebarOnOutsideClick(e){!this.overlayQuery.matches||!this.state.sidebarOpen||e.target.closest?.(".sidebar-shell, .sidebar-toggle")||(this.state.sidebarOpen=!1)}selectResponse(e){this.state.respTab=Number(e)}setResponseView(e,s){this.state.respView[e]=s}setLanguage(e){this.state.lang=e,this.updateSnippet()}onBaseUrl(e){this.draft.baseUrl=e,this.updateSnippet()}onParam(e,s,o){this.draft[s][o]=e,this.updateSnippet()}onBody(e){this.draft.bodyText=e,this.updateSnippet()}async updateSnippet(){let e=this.op;if(!e||!this.tryItEnabled)return;let s=this.currentLanguage;try{this.state.snippet=await this.logic.generateSnippet(s.id,ji(e,this.draft))}catch(o){this.state.snippet=`// Could not generate ${s.label} snippet: ${o.message}`}}async send(){let e=this.op,s=ji(e,this.draft),o=za(s),a={method:s.method,url:o.url,headerLines:o.headerLines,bodyText:s.bodyText};this.state.result={phase:"sending",sent:a};let n;try{n={phase:"done",sent:a,res:await Da(s,o)}}catch(l){n={phase:"error",sent:a,message:l.message}}this.state.current===e.id&&(this.state.result=n)}clearResult(){this.state.result=null}collapseRequest(){this.rootRef.el.querySelectorAll(".tryit-card details").forEach((e,s)=>{s<3&&(e.open=!1)})}toggleTheme(){this.state.themeOverride=this.theme==="dark"?"light":"dark"}readSystemTheme(){let e=document.documentElement.getAttribute("data-bs-theme"),s=e?e==="dark":window.matchMedia("(prefers-color-scheme: dark)").matches;this.state.systemTheme=s?"dark":"light"}openAuth(){var s;let e=this.state;e.stored.apikey=Ye("apikey"),e.stored.oauthkey=Ye("oauthkey"),e.inputs.apikey=e.stored.apikey,e.inputs.oauthkey=e.stored.oauthkey;for(let{key:o,def:a}of this.authSchemes)(s=e.oauth)[o]??(s[o]={clientId:"",clientSecret:"",username:"",password:"",scopes:Object.keys(a.scopes||{})});e.authOpen=!0}closeAuth(){this.state.authOpen=!1}setAuthOpen(e){this.state.authOpen=e}setAuthInput(e,s){this.state.inputs[e]=s}setField(e,s,o){e[s]=o}saveAuth(){Kr("apikey",this.state.inputs.apikey.trim()),Kr("oauthkey",this.state.inputs.oauthkey.trim()),this.closeAuth(),this.applyAuthToAll()}clearAuth(e){Kr(e,""),this.state.stored[e]="",this.state.inputs[e]="",this.applyAuthToAll()}applyAuthToAll(){for(let[e,s]of Object.entries(this.state.drafts))zi(this.doc.findOperation(e),s);this.state.authed=_i(),this.updateSnippet()}toggleScope(e,s){let o=this.state.oauth[e].scopes,a=o.indexOf(s);a<0?o.push(s):o.splice(a,1)}setOAuthStatus(e,s,o=!1){this.state.oauthStatus[e]={message:s,isError:o}}applyOAuthToken(e,s,o){Kr("oauthkey",s),this.state.stored.oauthkey=s,this.state.inputs.oauthkey=s,Object.assign(this.state.oauth[e],{clientId:o.clientId,clientSecret:o.clientSecret}),this.applyAuthToAll(),this.setOAuthStatus(e,"Token acquired.")}async fetchToken(e,s,o){try{let a=await Ka(this.doc.securityDefinitions[e].tokenUrl,s,this.selectedBaseUrl,this.doc);this.applyOAuthToken(e,a,o)}catch(a){this.setOAuthStatus(e,`Token request failed: ${a.message}. This is usually a CORS restriction on the auth server.`,!0)}}startOAuth2Flow(e){let s=this.doc.securityDefinitions[e],o=this.state.oauth[e],a=[...o.scopes];if(s.flow==="implicit"||s.flow==="accessCode")return this.openOAuthPopup(e,s,o,a);if(s.flow==="password"||s.flow==="application")return this.setOAuthStatus(e,"Requesting token\u2026"),this.fetchToken(e,Va(s.flow,o,a),o);this.setOAuthStatus(e,`Unsupported OAuth2 flow: ${s.flow}`,!0)}openOAuthPopup(e,s,o,a){if(!s.authorizationUrl)return this.setOAuthStatus(e,"No authorizationUrl defined for this scheme.",!0);let n=Ha(),l=Wa({def:s,clientId:o.clientId,scopes:a,state:n,redirectUri:this.redirectUri,baseUrl:this.selectedBaseUrl,doc:this.doc}),u=window.open(l,`oauth2-authorize-${e}`,"width=560,height=680");if(!u)return this.setOAuthStatus(e,"Popup blocked \u2014 allow popups for this site and try again.",!0);this.pendingOAuth.set(n,{key:e,flow:s.flow,fields:{...o}}),this.setOAuthStatus(e,"Waiting for authorization in the popup\u2026"),this.watchPopup(u,n,e)}watchPopup(e,s,o){let a=setInterval(()=>{e.closed&&(clearInterval(a),this.watchers.delete(a),this.pendingOAuth.delete(s)&&this.setOAuthStatus(o,"Authorization window was closed before completing.",!0))},500);this.watchers.add(a)}get redirectUri(){return this.props.oauthRedirectUri||new URL("oauth2-redirect.html",document.baseURI).href}handleOAuthMessage(e){let s=e.data;if(e.origin!==window.location.origin||s?.source!=="oauth2-redirect")return;let o=this.pendingOAuth.get(s.state);if(!o)return;this.pendingOAuth.delete(s.state);let{key:a,flow:n,fields:l}=o;if(s.error)return this.setOAuthStatus(a,`Authorization failed: ${s.error}${s.errorDescription?" - "+s.errorDescription:""}`,!0);if(n==="implicit")return s.accessToken?this.applyOAuthToken(a,s.accessToken,l):this.setOAuthStatus(a,"Authorization server did not return an access token.",!0);if(!s.code)return this.setOAuthStatus(a,"Authorization server did not return a code.",!0);this.setOAuthStatus(a,"Exchanging code for token\u2026"),this.fetchToken(a,{grant_type:"authorization_code",code:s.code,redirect_uri:this.redirectUri,client_id:l.clientId,client_secret:l.clientSecret},l)}addListeners(){this.readSystemTheme(),this.themeObserver=new MutationObserver(this.onThemeChange),this.themeObserver.observe(document.documentElement,{attributes:!0,attributeFilter:["data-bs-theme"]}),window.addEventListener("hashchange",this.onHashChange),window.addEventListener("message",this.onOAuthMessage),document.addEventListener("click",this.onDocumentClick),this.overlayQuery.addEventListener("change",this.onViewportChange)}removeListeners(){this.themeObserver?.disconnect(),window.removeEventListener("hashchange",this.onHashChange),window.removeEventListener("message",this.onOAuthMessage),document.removeEventListener("click",this.onDocumentClick),this.overlayQuery.removeEventListener("change",this.onViewportChange),this.watchers.forEach(clearInterval)}};r(xt,"template","baseui.ApiDoc"),r(xt,"components",{ApiDocGroup:wt,Markdown:yt,Badge:Q,Breadcrumb:Wt,BreadcrumbItem:Vt,BreadcrumbLink:Zt,BreadcrumbList:Kt,BreadcrumbPage:Gt,BreadcrumbSeparator:ht,Button:x,Checkbox:_t,Dialog:It,DialogContent:pt,DialogDescription:qt,DialogFooter:Rt,DialogHeader:Tt,DialogTitle:$t,Icon:R,Input:kt,NativeSelect:Mt,TabContent:Bt,Tabs:Lt,TabsContainer:Nt,TabsList:Ot,TabTrigger:lt,Textarea:Pt}),r(xt,"props",{src:i(String),spec:i(Object),title:i(String),serverUrl:i(String),theme:i(String),themeToggle:i(Boolean),hash:i(Boolean),operation:i(String),tryIt:i(Boolean),authorize:i(Boolean),languages:i(Array),language:i(String),assetBase:i(String),oauthRedirectUri:i(String),height:i(String),onLoad:i(Function),onError:i(Function),onNavigate:i(Function),className:i(String),style:i([String,Object])});w();v();function Fi(t,e){if(!t)return null;if(t.type==="file"&&(t.path===e||t.meta?.slug===e))return t;for(let s of t.children||[]){let o=Fi(s,e);if(o)return o}return null}function zl(t){return t.replace(/\.[^./]+$/,"").replace(/[_-]+/g," ").trim().split(/\s+/).map(s=>s.charAt(0).toUpperCase()+s.slice(1)).join(" ")}var kr=class kr extends c{get label(){let e=this.props.node.meta;return e?.sidebar_label||e?.title||zl(this.props.node.name)}get hasSubfolders(){return(this.props.node.children||[]).some(e=>e.type==="dir")}select(e){this.props.onSelect(e)}};r(kr,"template","baseui.MarkdownTreeNode"),r(kr,"components",{MarkdownTreeNode:kr,Icon:R,SidebarGroupLabel:Yt,SidebarMenu:gt,SidebarMenuItem:Qt,SidebarMenuButton:mt,DropdownMenu:zt,DropdownMenuTrigger:ut,DropdownMenuContent:Dt,DropdownMenuItem:jt,DropdownMenuSub:Ft,DropdownMenuSubTrigger:dt,DropdownMenuSubContent:Ht}),r(kr,"props",{node:{type:Object},activePath:i(String),onSelect:{type:Function},nested:i(Boolean)});var Vr=kr,Qe=class extends c{setup(){this.state=y({tree:null,status:"loading",error:""}),ot(()=>this.load())}async load(){this.state.status="loading",this.state.error="";try{let e=await fetch(this.props.src);if(!e.ok)throw new Error(`${e.status} ${e.statusText}`);this.state.tree=await e.json(),this.state.status="ready"}catch(e){this.state.status="error",this.state.error=e.message||String(e)}}};r(Qe,"template","baseui.MarkdownTree"),r(Qe,"components",{MarkdownTreeNode:Vr,SidebarGroup:Xt,SidebarMenu:gt}),r(Qe,"props",{src:{type:String},activePath:i(String),onSelect:{type:Function},className:i(String),style:i([String,Object])});w();function Ja(t=document.querySelector("[b-block-code-template]")){let o=((t?.tagName==="SCRIPT"?t.textContent:t?.innerHTML)?.replace(/^\n/,"").replace(/\s+$/,"")||"").split(`
|
|
31
|
-
`),a=o.filter(l=>l.trim()).map(l=>l.match(/^\s*/)?.[0].length||0),n=a.length?Math.min(...a):0;return o.map(l=>l.slice(n)).join(`
|
|
32
|
-
`)}function Xa(t,e=0){let s=" ".repeat(e),o=[];for(let a of t.childNodes){if(a.nodeType===Node.TEXT_NODE){let u=a.textContent.trim();u&&o.push(`${s}${u}`);continue}if(a.nodeType!==Node.ELEMENT_NODE)continue;let n=[...a.attributes].map(u=>` ${u.name}="${u.value}"`).join("");if(![...a.childNodes].some(u=>u.nodeType===Node.ELEMENT_NODE||u.nodeType===Node.TEXT_NODE&&u.textContent.trim())){o.push(`${s}<${a.localName}${n}>${a.textContent.trim()}</${a.localName}>`);continue}o.push(`${s}<${a.localName}${n}>`),o.push(...Xa(a,e+1)),o.push(`${s}</${a.localName}>`)}return o}async function Ya(t){if(!t?.trim())return"";let{expandSelfClosingTags:e,extractTagCaseMap:s,normalizeOwlPreviewMarkup:o}=await Promise.resolve().then(()=>(ui(),Ua)),a=document.createElement("div");return a.innerHTML=e(t),o(a,s(t)),Xa(a).join(`
|
|
33
|
-
`)}function Qa(t){t.querySelectorAll('[b-block="dashboard-01"], [b-block^="sidebar-"]').forEach(e=>{let s=e.querySelector("[b-block-sidebar-toggle], button[aria-label='Toggle sidebar']"),o=e.querySelector("[b-block-sidebar]");!s||!o||(e.setAttribute("b-att-sidebar",e.getAttribute("b-att-sidebar")||"open"),s.setAttribute("b-block-sidebar-toggle",""),s.setAttribute("aria-expanded",e.getAttribute("b-att-sidebar")==="open"?"true":"false"),s.addEventListener("click",()=>{let a=e.getAttribute("b-att-sidebar")!=="open";e.setAttribute("b-att-sidebar",a?"open":"collapsed"),s.setAttribute("aria-expanded",a?"true":"false")}))}),t.querySelectorAll('[b-block^="sidebar-"] [b-block-subnav]').forEach(e=>{let s=e.previousElementSibling;s&&(s.setAttribute("b-block-subnav-toggle",""),s.setAttribute("aria-expanded","true"),e.setAttribute("b-att-state","open"),s.addEventListener("click",o=>{o.preventDefault();let a=e.getAttribute("b-att-state")!=="open";e.setAttribute("b-att-state",a?"open":"collapsed"),s.setAttribute("aria-expanded",a?"true":"false")}))})}v();var bi=ie({storageKey:"b-example-theme",toggleSelector:"",labelSelector:""}),Dl=[{key:"docs",label:"Docs",href:"/docs"},{key:"icons",label:"Icons",href:"/docs/icons"},{key:"examples",label:"Examples",href:"/examples/index.html"},{key:"blocks",label:"Blocks",href:"/blocks"}],jl={desktop:"",tablet:"768px",mobile:"390px"},Fl="/dist/icons/lucide";function Hl(){return document.querySelector("[b-block-code-template]")}function Wl(t){return t.match(/<templates[^>]*>([\s\S]*)<\/templates>/)?.[1]||t}function Kl(t){for(let e of t.querySelectorAll?.("[b-block] [b-icon], [b-block] [b-ui='icon']")||[])!e.hasAttribute("b-icon-base-url")&&!e.hasAttribute("b-att-base-url")&&e.setAttribute("b-icon-base-url",Fl)}var ts=class extends c{setup(){this.navItems=this.props.navItems||Dl,this.previewFrame=A("previewFrame"),this.embedRoot=A("embedRoot"),this.code=Ja(),this.state=y({mode:"preview",viewport:"desktop",copyLabel:"Copy code",embed:new URLSearchParams(globalThis.location.search).get("embed")==="1",codeVariant:"owl",staticTemplate:"",staticTemplateStatus:"idle"}),T(()=>this.mountPreview()),P(()=>this.mountStaticBaseUI())}get activeCode(){return this.state.codeVariant==="template"?this.state.staticTemplateStatus==="ready"?this.state.staticTemplate:"Converting to a static template...":this.code}async setCodeVariant(e){if(this.state.codeVariant=e,e==="template"&&this.state.staticTemplateStatus==="idle"){this.state.staticTemplateStatus="loading";let s=await Ya(this.code);this.state.staticTemplate=s,this.state.staticTemplateStatus="ready"}}get title(){return document.body.dataset.blockTitle||document.title||"Block"}get description(){return document.body.dataset.blockDescription||"Preview and copy this BaseUI block."}get previewStyle(){let e=jl[this.state.viewport]||"";return e?`max-width:${e}`:""}setMode(e){this.state.mode=e}setViewport(e){this.state.viewport=e}async copyCode(){await globalThis.navigator?.clipboard?.writeText(this.activeCode),this.state.copyLabel="Copied"}mountPreview(){this.state.embed&&(document.body.className="m-0");let e=this.state.embed?this.embedRoot.el:this.previewFrame.el,s=Hl();if(!(!e||!s)){if(s.tagName==="SCRIPT"){this.mountOwlPreview(e,s);return}e.replaceChildren(s.content.cloneNode(!0)),this.mountStaticBaseUI(e),Qa(e)}}async mountOwlPreview(e,s){e.replaceChildren();class o extends c{setup(){this.state=y({collapsed:!1})}}r(o,"template","examples.SidebarBlock");let a=[await ce("/dist/baseui.templates.xml"),s.textContent].map(Wl).join(`
|
|
34
|
-
`);await is(o,e,{templates:`<templates>${a}</templates>`}),bi.set(bi.current(),{skipStorage:!0})}mountStaticBaseUI(e=document){Kl(e),globalThis.thebase?.mountAll(e),bi.set(bi.current(),{skipStorage:!0})}};r(ts,"template","baseui.BlockViewer"),r(ts,"components",{Button:x,Icon:R,ThemeButton:vt}),r(ts,"props",{navItems:i(Array)});w();v();var Lr=class extends c{setup(){this.pwaState=y({open:M(this.props)}),L({pwa:this.pwaState,setPwaOpen:e=>this.setOpen(e)}),G(this.pwaState)}setOpen(e){J(this.props,this.pwaState,e)}};r(Lr,"template","baseui.Pwa"),r(Lr,"props",{open:i(Boolean),"default-open":i(Boolean),defaultOpen:i(Boolean),onOpenChange:i(Function),slots:i(Object)});var es=class extends c{onClick(){this.env.setPwaOpen(!0)}};r(es,"template","baseui.PwaTrigger"),r(es,"components",{Button:x}),r(es,"props",p);var Nr=class extends c{setup(){this.rootRef=A("root"),Y(e=>{if(!e)return;let s=document.activeElement;return qs(this.rootRef.el)[0]?.focus(),()=>s?.focus?.()},()=>[this.env.pwa.open])}get open(){return this.env.pwa.open}onKeyDown(e){e.key==="Escape"&&this.env.setPwaOpen(!1)}onBackdropClick(e){e.target===this.rootRef.el&&this.env.setPwaOpen(!1)}};r(Nr,"template","baseui.PwaContent"),r(Nr,"props",p);var Or=class extends c{};r(Or,"template","baseui.PwaHeader"),r(Or,"props",p);var Br=class extends c{};r(Br,"template","baseui.PwaTitle"),r(Br,"props",p);var Ir=class extends c{};r(Ir,"template","baseui.PwaDescription"),r(Ir,"props",p);var Tr=class extends c{};r(Tr,"template","baseui.PwaBody"),r(Tr,"props",p);var Rr=class extends c{get steps(){return Array.isArray(this.props.steps)?this.props.steps:[]}};r(Rr,"template","baseui.PwaSteps"),r(Rr,"props",{...p,steps:i(Array)});var $r=class extends c{};r($r,"template","baseui.PwaFooter"),r($r,"props",p);var ss=class extends c{onClick(){this.env.setPwaOpen(!1)}};r(ss,"template","baseui.PwaClose"),r(ss,"components",{Button:x}),r(ss,"props",p);w();v();var tn="",en="";function sn(t,e){return typeof t=="string"?t:e}function Vl(t){return{title:t.submitted&&t.title.trim().length>0&&t.title.trim().length<5?"Bug title must be at least 5 characters.":"",description:t.submitted&&t.description.length>0&&t.description.length<20?"Description must be at least 20 characters.":""}}var os=class extends c{setup(){this.state=y({title:sn(this.props.title,tn),description:sn(this.props.description,en),submitted:!1})}get classNames(){return h("b-form",this.props.className)}get titlePlaceholder(){return this.props.titlePlaceholder||"Login button not working on mobile"}get descriptionPlaceholder(){return this.props.descriptionPlaceholder||"I'm having an issue with the login button on mobile."}get maxDescriptionLength(){return this.props.maxDescriptionLength||100}get descriptionLength(){return this.state.description.length}get errors(){return Vl(this.state)}get titleInvalid(){return!!this.errors.title}get descriptionInvalid(){return!!this.errors.description}reset(){this.state.title=tn,this.state.description=en,this.state.submitted=!1}submit(e){e.preventDefault(),this.state.submitted=!0,!this.titleInvalid&&!this.descriptionInvalid&&this.props.onSubmit?.({title:this.state.title.trim(),description:this.state.description})}};r(os,"template","baseui.Form"),r(os,"components",{Button:x,Field:ee,FieldDescription:oe,FieldError:re,FieldGroup:te,FieldLabel:se}),r(os,"props",{title:i(String),description:i(String),titlePlaceholder:i(String),descriptionPlaceholder:i(String),maxDescriptionLength:i(Number),className:i(String),style:i([String,Object]),onSubmit:i(Function)});w();v();var Hi;function Zl(){return Hi??(Hi=import("./runtime/milkdown/milkdown-text-editor.js")),Hi}async function hi(t){return(await Zl()).createMilkdownTextEditor(t)}function mi({collaborative:t,providerType:e,url:s}={}){return!!t||!!(e&&s)}var qr=class extends c{setup(){this.editorRef=A("editor"),this.editorHandle=null,this.mountPromise=null,this.mountToken=0,this.isDestroyed=!1,this.state=y({content:"",status:"loading",error:""}),ot(()=>this.load(this.props)),j(e=>{if(this.shouldReload(e))return this.load(e);this.shouldRestartEditor(e)&&this.destroyEditor()}),T(()=>this.mountEditor()),P(()=>this.mountEditor()),le(()=>{this.isDestroyed=!0,this.destroyEditor()})}get classNames(){return h("b-text-editor",this.props.className)}get isCollaborative(){return mi({collaborative:this.props.collaborative,providerType:this.props.provider,url:this.props.url})}get editorLabel(){return this.isCollaborative?"Collaborative rich text editor":"Rich text editor"}shouldReload(e){return e.content!==this.props.content||e.src!==this.props.src}shouldRestartEditor(e){return e.collaborative!==this.props.collaborative||e.provider!==this.props.provider||e.room!==this.props.room||e.url!==this.props.url||e.password!==this.props.password||e.signaling!==this.props.signaling}async load(e){this.destroyEditor(),this.state.status="loading",this.state.error="";let s=e.content??"";if(e.src)try{let o=await fetch(e.src);if(!o.ok)throw new Error(`${o.status} ${o.statusText}`);s=await o.text()}catch(o){this.state.status="error",this.state.error=o.message||String(o);return}this.state.content=s,this.state.status="ready"}async mountEditor(){let e=this.editorRef.el;if(this.isDestroyed||!e||this.editorHandle||this.mountPromise||this.state.status!=="ready")return;let s=++this.mountToken;return this.mountPromise=(async()=>{try{let o=await hi({root:e,value:this.state.content,placeholder:this.props.placeholder,collaborative:this.isCollaborative,providerType:this.props.provider,room:this.props.room||"b-text-editor",url:this.props.url,password:this.props.password,signaling:this.props.signaling,user:this.props.user,onChange:(a,n,l)=>{this.state.content=a,this.props.onChange?.(a,n,l)}});if(s!==this.mountToken){o.destroy?.();return}this.editorHandle=o}catch(o){s===this.mountToken&&(this.state.status="error",this.state.error=o.message||String(o))}finally{this.mountPromise=null,this.isDestroyed||this.mountEditor()}})(),this.mountPromise}destroyEditor(){this.mountToken++,this.editorHandle?.destroy?.(),this.editorHandle=null}};r(qr,"template","baseui.TextEditor"),r(qr,"props",{content:i(String),src:i(String),placeholder:i(String),collaborative:i(Boolean),provider:i(String),room:i(String),url:i(String),password:i(String),signaling:i(Array),user:i(Object),onChange:i(Function),className:i(String),style:i([String,Object])});S();function Gl(t){let{open:e,close:s,destroy:o}=ai(t,{closeSelector:"[b-alert-dialog-cancel], [b-alert-dialog-action], [b-alert-dialog-close]",trapFocus:!0});return t.setAttribute("role","alertdialog"),t.BaseUIAlertDialog={open:e,close:s},{destroy:()=>{o(),delete t.BaseUIAlertDialog}}}d.register("alert-dialog",{type:"owl",mount:Gl});S();var Ki={default:"b-alert-default",destructive:"b-alert-destructive",info:"b-alert-default",success:"alert-success",warning:"alert-warning",danger:"b-alert-destructive"};function Jl(t){t.classList.add("alert","b-alert",Ki[t.getAttribute("b-att-variant")||"default"]||Ki.default),t.setAttribute("role",t.getAttribute("role")||"alert");let e=null;if(!!t.getAttribute("b-att-dismissible")){if(t.classList.add("alert-dismissible","fade","show"),!t.querySelector('[data-bs-dismiss="alert"]')){let o=document.createElement("button");o.type="button",o.className="btn-close",o.setAttribute("data-bs-dismiss","alert"),o.setAttribute("aria-label","Close"),t.appendChild(o)}e=new(k()).Alert(t)}return{destroy:()=>{e?.dispose(),t.classList.remove("alert","b-alert","alert-dismissible","fade","show",...Object.values(Ki))}}}d.register("alert",{type:"static",mount:Jl});w();S();function on(t,e){return t.getAttribute(e)!=="false"}function Xl(t){let e=t.getAttribute("b-att-templates");if(e)return e;let s=[...document.scripts].find(o=>/\/baseui(\.[\w-]+)*\.(min\.)?js(\?|$)/.test(o.src));return s?s.src.replace(/[?#].*$/,"").replace(/[^/]*$/,"baseui.templates.xml"):"/dist/baseui.templates.xml"}function Yl(t){let e=(o,a)=>t.dispatchEvent(new CustomEvent(`baseui:${o}`,{bubbles:!0,detail:a})),s=t.getAttribute("b-att-languages");return{src:t.getAttribute("b-att-src")||void 0,title:t.getAttribute("b-att-title")||void 0,serverUrl:t.getAttribute("b-att-server-url")||void 0,theme:t.getAttribute("b-att-theme")||void 0,themeToggle:t.getAttribute("b-att-theme-toggle")==="true",hash:t.getAttribute("b-att-hash")==="true",operation:t.getAttribute("b-att-operation")||void 0,tryIt:on(t,"b-att-try-it"),authorize:on(t,"b-att-authorize"),languages:s?s.split(",").map(o=>o.trim()).filter(Boolean):void 0,language:t.getAttribute("b-att-language")||void 0,assetBase:t.getAttribute("b-att-asset-base")??void 0,oauthRedirectUri:t.getAttribute("b-att-oauth-redirect-uri")||void 0,height:t.getAttribute("b-att-height")||void 0,onLoad:o=>e("load",{info:o.info,operations:o.groups.flatMap(a=>a.items).length}),onError:o=>e("error",{error:o}),onNavigate:o=>e("navigate",{id:o})}}function Ql(t){let e=Yl(t),s=ce(Xl(t)).then(o=>is(xt,t,{templates:o,props:e}));return{destroy:async()=>{(await s).destroy()}}}d.register("apidoc",{type:"owl",mount:Ql});S();function tp(t){let e=[...t.querySelectorAll("[b-accordion-item]")],s=t.getAttribute("b-att-multiple")==="true",o=new Map,a=new Map,n=new Map,l=(u,b)=>{let m=u.querySelector("[b-accordion-trigger]");u.setAttribute("b-att-state",b?"open":"closed"),m?.setAttribute("aria-expanded",String(b)),t.dispatchEvent(new CustomEvent("baseui:change",{bubbles:!0,detail:{open:b}}))};return t.setAttribute("role","presentation"),t.classList.add("accordion"),e.forEach((u,b)=>{let m=u.querySelector("[b-accordion-trigger]"),f=u.querySelector("[b-accordion-panel]");if(!f)return;u.classList.add("accordion-item"),m?.classList.add("accordion-button"),f.classList.add("accordion-collapse");let g=f.id||`b-accordion-panel-${b}`;f.id=g;let E=u.getAttribute("b-att-state")==="open";f.classList.add("collapse"),E&&f.classList.add("show");let N=new(k()).Collapse(f,{toggle:!1});n.set(u,N);let I=()=>l(u,!0),C=()=>l(u,!1);f.addEventListener("shown.bs.collapse",I),f.addEventListener("hidden.bs.collapse",C),a.set(u,{onShown:I,onHidden:C}),m?.setAttribute("aria-expanded",String(E)),m?.setAttribute("aria-controls",g);let $=()=>{let z=f.classList.contains("show");!s&&!z&&e.forEach(O=>{if(O===u)return;let F=n.get(O),X=O.querySelector("[b-accordion-panel]");F&&X?.classList.contains("show")&&F.hide()}),z?N.hide():N.show()};o.set(u,$),m?.addEventListener("click",$)}),{destroy:()=>{e.forEach(u=>{let b=u.querySelector("[b-accordion-trigger]"),m=u.querySelector("[b-accordion-panel]");b?.removeEventListener("click",o.get(u));let f=a.get(u);m&&f&&(m.removeEventListener("shown.bs.collapse",f.onShown),m.removeEventListener("hidden.bs.collapse",f.onHidden)),n.get(u)?.dispose()}),o.clear(),a.clear(),n.clear()}}}d.register("accordion",{type:"owl",mount:tp});S();function ep(t){let e=t.getAttribute("b-att-ratio")||`${t.getAttribute("b-att-width")||16} / ${t.getAttribute("b-att-height")||9}`;return t.classList.add("b-aspect-ratio"),t.style.setProperty("--b-aspect-ratio",e),{destroy:()=>t.classList.remove("b-aspect-ratio")}}d.register("aspect-ratio",{type:"static",mount:ep});S();ns();var sp=["idle","uploading","processing","error","done"],op=["default","sm","xs"],rp=["content","title","description","actions"];function rn(t,e){t.classList.add(`b-attachment-${e}`),t.setAttribute("data-slot",`attachment-${e}`)}function ip(t){let e=t.querySelector("input[type='file']"),s=t.querySelector("[b-attachment-list]"),o=sp.includes(t.getAttribute("b-att-state"))?t.getAttribute("b-att-state"):"done",a=op.includes(t.getAttribute("b-att-size"))?t.getAttribute("b-att-size"):"default",n=t.getAttribute("b-att-orientation")==="vertical"?"vertical":"horizontal";t.classList.add("b-attachment"),t.classList.add(`b-attachment-${o}`,`b-attachment-${a}`,`b-attachment-${n}`),t.setAttribute("data-state",o),t.setAttribute("data-size",a),t.setAttribute("data-orientation",n),t.setAttribute("data-slot","attachment"),e&&t.classList.add("b-attachment-picker"),t.querySelectorAll("[b-attachment-media]").forEach(u=>{let b=u.getAttribute("b-att-variant")==="image"?"image":"icon";rn(u,"media"),u.classList.add(`b-attachment-media-${b}`),u.setAttribute("data-variant",b)}),rp.forEach(u=>t.querySelectorAll(`[b-attachment-${u}]`).forEach(b=>rn(b,u))),t.querySelectorAll("[b-attachment-action]").forEach(u=>{let b=W[u.getAttribute("b-att-variant")]||W.ghost,m=V[u.getAttribute("b-att-size")]||V["icon-xs"];u.classList.add("btn","b-button",b,m,"b-button-icon","b-attachment-action"),u.setAttribute("data-slot","attachment-action"),!u.getAttribute("type")&&u.tagName==="BUTTON"&&u.setAttribute("type","button")}),t.querySelectorAll("[b-attachment-trigger]").forEach(u=>{u.classList.add("b-attachment-trigger"),u.setAttribute("data-slot","attachment-trigger"),!u.getAttribute("type")&&u.tagName==="BUTTON"&&u.setAttribute("type","button")}),e?.classList.add("form-control");let l=()=>{s&&(s.innerHTML=[...e.files].map(u=>`<li>${u.name}</li>`).join("")),t.dispatchEvent(new CustomEvent("baseui:change",{bubbles:!0,detail:{files:[...e.files]}}))};return e?.addEventListener("change",l),{destroy:()=>e?.removeEventListener("change",l)}}function ap(t){return t.classList.add("b-attachment-group"),t.setAttribute("data-slot","attachment-group"),{destroy:()=>t.classList.remove("b-attachment-group")}}function np(t){let e=t.querySelector("input[type='file']");t.classList.add("b-attachment-dropzone"),t.setAttribute("data-slot","attachment-dropzone");let s=()=>e?.click(),o=b=>{b.preventDefault(),t.classList.add("b-attachment-dropzone-dragging")},a=()=>t.classList.remove("b-attachment-dropzone-dragging"),n=b=>{b.length&&t.dispatchEvent(new CustomEvent("baseui:change",{bubbles:!0,detail:{files:b}}))},l=b=>{b.preventDefault(),t.classList.remove("b-attachment-dropzone-dragging"),n([...b.dataTransfer?.files??[]])},u=()=>{n([...e?.files??[]]),e&&(e.value="")};return t.addEventListener("click",s),t.addEventListener("dragover",o),t.addEventListener("dragleave",a),t.addEventListener("drop",l),e?.addEventListener("change",u),{destroy:()=>{t.removeEventListener("click",s),t.removeEventListener("dragover",o),t.removeEventListener("dragleave",a),t.removeEventListener("drop",l),e?.removeEventListener("change",u)}}}d.register("attachment",{type:"owl",mount:ip});d.register("attachment-group",{type:"static",mount:ap});d.register("attachment-dropzone",{type:"static",mount:np});S();function cp(t){t.classList.add("b-avatar");let e=t.querySelector("img"),s=t.querySelector("[b-avatar-fallback]");if(e&&s){let o=()=>{e.hidden=!0,s.hidden=!1};return s.hidden=!!e.getAttribute("src"),e.addEventListener("error",o),{destroy:()=>e.removeEventListener("error",o)}}return{}}d.register("avatar",{type:"static",mount:cp});S();function lp(t){let e=pe[t.getAttribute("b-att-variant")||"secondary"]||pe.secondary;return t.classList.add("badge",e),t.getAttribute("b-att-pill")==="true"&&t.classList.add("rounded-pill"),{destroy:()=>t.classList.remove("badge","rounded-pill",...Object.values(pe))}}d.register("badge",{type:"static",mount:lp});S();rt();function an(t){return[...t.children].filter(e=>!e.matches("[b-breadcrumb-separator], .b-breadcrumb-separator"))}function cn(t,e,s){return _(t,e,{size:s}),t}function pp(){let t=document.createElement("li"),e=document.createElement("span");return t.setAttribute("b-breadcrumb-separator",""),t.setAttribute("data-slot","breadcrumb-separator"),t.setAttribute("role","presentation"),t.setAttribute("aria-hidden","true"),t.className="b-breadcrumb-separator",e.className="b-breadcrumb-separator-icon",t.append(cn(e,"chevron-right","var(--b3_5)")),t}function up(t){t.classList.add("b-breadcrumb-separator"),t.setAttribute("data-slot",t.getAttribute("data-slot")||"breadcrumb-separator"),t.setAttribute("role","presentation"),t.setAttribute("aria-hidden","true")}function dp(t){if(t.classList.add("b-breadcrumb-ellipsis"),t.setAttribute("data-slot",t.getAttribute("data-slot")||"breadcrumb-ellipsis"),t.setAttribute("role","presentation"),t.setAttribute("aria-hidden","true"),!t.querySelector(".b-icon")){let e=document.createElement("span");e.className="b-breadcrumb-ellipsis-icon",t.prepend(cn(e,"ellipsis","var(--b4)"))}if(!t.querySelector(".visually-hidden")){let e=document.createElement("span");e.className="visually-hidden",e.textContent="More",t.append(e)}}function nn(t){t.classList.add("b-breadcrumb-page"),t.setAttribute("data-slot",t.getAttribute("data-slot")||"breadcrumb-page"),t.setAttribute("role",t.getAttribute("role")||"link"),t.setAttribute("aria-disabled","true"),t.setAttribute("aria-current","page")}function bp(t){let e=t.querySelector("ol, ul")||t;t.classList.add("b-breadcrumb"),t.setAttribute("data-slot",t.getAttribute("data-slot")||"breadcrumb"),t.setAttribute("aria-label",t.getAttribute("aria-label")||"breadcrumb"),e.classList.add("breadcrumb","b-breadcrumb-list"),e.setAttribute("data-slot",e.getAttribute("data-slot")||"breadcrumb-list");for(let o of e.querySelectorAll("[b-breadcrumb-separator], .b-breadcrumb-separator"))up(o);for(let o of e.querySelectorAll("[b-breadcrumb-ellipsis], .b-breadcrumb-ellipsis"))dp(o);for(let o of e.querySelectorAll("[b-breadcrumb-page], .b-breadcrumb-page"))nn(o);e.querySelector("[b-breadcrumb-separator], .b-breadcrumb-separator")||an(e).slice(0,-1).forEach(a=>a.after(pp()));let s=an(e);return s.forEach((o,a)=>{o.classList.add("b-breadcrumb-item"),o.setAttribute("data-slot",o.getAttribute("data-slot")||"breadcrumb-item");for(let n of o.querySelectorAll("a"))n.classList.add("b-breadcrumb-link"),n.setAttribute("data-slot",n.getAttribute("data-slot")||"breadcrumb-link");if(a===s.length-1){let n=o.querySelector("[b-breadcrumb-page], .b-breadcrumb-page");n?nn(n):(o.classList.add("b-breadcrumb-page"),o.setAttribute("aria-current",o.getAttribute("aria-current")||"page"))}}),{destroy:()=>{t.classList.remove("b-breadcrumb"),e.classList.remove("breadcrumb","b-breadcrumb-list");for(let o of e.querySelectorAll("[b-breadcrumb-separator]"))o.remove()}}}d.register("breadcrumb",{type:"owl",mount:bp});S();function hp(t){return t.classList.add("b-bubble"),t.getAttribute("role")||t.setAttribute("role","listitem"),{destroy:()=>t.classList.remove("b-bubble")}}d.register("bubble",{type:"static",mount:hp});S();rt();ns();function mp(t){return[...t.childNodes].filter(e=>e.nodeType===Node.TEXT_NODE&&e.textContent.trim()).map(e=>{let s=document.createElement("span");return s.textContent=e.textContent.trim(),e.replaceWith(s),s})}function fp(t){let e=t.getAttribute("b-att-icon"),s=t.getAttribute("b-att-icon-position")==="end"?"end":"start",o=!!t.textContent.trim(),a=e&&o?mp(t):[],n=null;return t.classList.add("btn","b-button",W[t.getAttribute("b-att-variant")||"default"]||"btn-primary"),V[t.getAttribute("b-att-size")]&&t.classList.add(V[t.getAttribute("b-att-size")]),t.dataset.slot="button",e&&(n=document.createElement("span"),n.setAttribute("b-icon",e),n.dataset.icon=`inline-${s}`,_(n,e,{label:""}),t.insertBefore(n,s==="end"?null:t.firstChild),t.dataset.icon=`inline-${s}`,o||(t.dataset.iconOnly="true",t.classList.add("b-button-icon"))),{destroy:()=>{n?.remove();for(let l of a)l.replaceWith(document.createTextNode(l.textContent));t.classList.remove("btn","b-button","b-button-icon",...Object.values(W),...Object.values(V)),t.removeAttribute("data-slot"),t.removeAttribute("data-icon"),t.removeAttribute("data-icon-only")}}}d.register("button",{type:"static",mount:fp});S();function gp(t){let e=t.getAttribute("b-att-orientation")==="vertical",s=t.getAttribute("b-att-size"),o=[...t.querySelectorAll("[b-button-group-separator]")],a=[...t.querySelectorAll("[b-button-group-text]")];return t.classList.add("b-button-group",e?"btn-group-vertical":"btn-group"),(s==="sm"||s==="lg")&&t.classList.add(`btn-group-${s}`),t.setAttribute("role",t.getAttribute("role")||"group"),o.forEach(n=>{let l=n.getAttribute("b-att-orientation")==="horizontal"?"horizontal":"vertical";n.classList.add("b-button-group-separator",`b-button-group-separator-${l}`),n.setAttribute("data-orientation",l),n.setAttribute("role","separator")}),a.forEach(n=>{n.classList.add("b-button-group-text")}),{destroy:()=>{t.classList.remove("b-button-group","btn-group","btn-group-vertical","btn-group-sm","btn-group-lg")}}}d.register("button-group",{type:"static",mount:gp});S();var vp=new Intl.DateTimeFormat(void 0,{month:"long",year:"numeric"});function yp(t){let e=t.getAttribute("b-att-selected")?new Date(`${t.getAttribute("b-att-selected")}T00:00:00`):new Date,s=Number(t.getAttribute("b-att-month")??e.getMonth()+1)-1,o=Number(t.getAttribute("b-att-year")??e.getFullYear()),a=new Date(o,s,1),n=new Date(o,s+1,0).getDate(),l=a.getDay();t.classList.add("b-calendar"),t.querySelector("[b-calendar-grid]")||(t.innerHTML=`
|
|
35
|
-
<div class="b-calendar__header">${vp.format(a)}</div>
|
|
36
|
-
<div class="b-calendar__weekdays">${["Sun","Mon","Tue","Wed","Thu","Fri","Sat"].map(m=>`<span>${m}</span>`).join("")}</div>
|
|
37
|
-
<div b-calendar-grid class="b-calendar__grid"></div>
|
|
38
|
-
`);let u=t.querySelector("[b-calendar-grid]");u.innerHTML="";for(let m=0;m<l;m+=1)u.append(document.createElement("span"));for(let m=1;m<=n;m+=1){let f=document.createElement("button"),g=`${o}-${String(s+1).padStart(2,"0")}-${String(m).padStart(2,"0")}`;f.type="button",f.textContent=String(m),f.setAttribute("b-att-value",g),f.setAttribute("aria-pressed",String(g===t.getAttribute("b-att-selected"))),u.append(f)}let b=m=>{let f=m.target.closest("button[b-att-value]");f&&(t.setAttribute("b-att-selected",f.getAttribute("b-att-value")),u.querySelectorAll("button").forEach(g=>g.setAttribute("aria-pressed",String(g===f))),t.dispatchEvent(new CustomEvent("baseui:change",{bubbles:!0,detail:{value:f.getAttribute("b-att-value")}})))};return u.addEventListener("click",b),{destroy:()=>u.removeEventListener("click",b)}}d.register("calendar",{type:"owl",mount:yp});S();function xp(t){return t.classList.add("card","b-card"),t.querySelector("[b-card-header]")?.classList.add("card-header"),t.querySelector("[b-card-body]")?.classList.add("card-body"),t.querySelector("[b-card-footer]")?.classList.add("card-footer"),{destroy:()=>t.classList.remove("card","b-card")}}d.register("card",{type:"static",mount:xp});S();function wp(t){let e=[...t.querySelectorAll("[b-carousel-slide]")],s=t.querySelector("[b-carousel-prev]"),o=t.querySelector("[b-carousel-next]");if(t.classList.add("carousel","slide"),e.length&&!e[0].parentElement.classList.contains("carousel-inner")){let m=document.createElement("div");m.classList.add("carousel-inner"),e[0].before(m),e.forEach(f=>m.appendChild(f))}let a=Math.max(0,e.findIndex(m=>m.getAttribute("b-att-state")==="active"));e.forEach((m,f)=>{m.classList.add("carousel-item"),f===a&&m.classList.add("active"),m.setAttribute("b-att-state",f===a?"active":"inactive")});let n=e.length?new(k()).Carousel(t,{interval:!1,wrap:!0,touch:!0}):null,l=m=>{e.forEach((f,g)=>{f.setAttribute("b-att-state",g===m.to?"active":"inactive")}),t.dispatchEvent(new CustomEvent("baseui:change",{bubbles:!0,detail:{index:m.to}}))};t.addEventListener("slid.bs.carousel",l);let u=()=>n?.prev(),b=()=>n?.next();return s?.addEventListener("click",u),o?.addEventListener("click",b),{destroy:()=>{s?.removeEventListener("click",u),o?.removeEventListener("click",b),t.removeEventListener("slid.bs.carousel",l),n?.dispose()}}}d.register("carousel",{type:"owl",mount:wp});S();function ln(t,e,s=0){let o=Number(t.getAttribute(e));return Number.isFinite(o)?o:s}function Sp(t){let e=t.getAttribute("b-att-config")||t.querySelector("script[type='application/json']")?.textContent;if(!e)return null;try{return JSON.parse(e)}catch{return null}}function Ap(t,e){let s=globalThis.getComputedStyle(t),o=[1,2,3,4,5].map(l=>s.getPropertyValue(`--b-chart-${l}`).trim()),a=s.getPropertyValue("--b-muted-foreground").trim(),n=s.getPropertyValue("--b-chart-grid").trim()||s.getPropertyValue("--b-border").trim();return e.options={maintainAspectRatio:!1,plugins:{legend:{labels:{boxWidth:8,boxHeight:8,color:a,font:{size:12}}},tooltip:{titleFont:{size:12},bodyFont:{size:12},cornerRadius:10,padding:10},...e.options?.plugins||{}},scales:{x:{border:{display:!1},grid:{display:!1},ticks:{color:a,font:{size:12}}},y:{border:{display:!1},grid:{color:n},ticks:{color:a,font:{size:12}}},...e.options?.scales||{}},...e.options},e.data?.datasets?.forEach((l,u)=>{l.backgroundColor||(l.backgroundColor=o[u%o.length]),l.borderColor||(l.borderColor=o[u%o.length]),l.borderRadius??(l.borderRadius=4)}),e}function Ep(t,e,s){if(t.querySelector("[b-chart-tooltip]"))return;let o=document.createElement("span");o.setAttribute("b-chart-tooltip",""),o.textContent=`${e}: ${s}`,t.append(o)}function Cp(t){t.classList.add("b-chart"),t.setAttribute("role",t.getAttribute("role")||"figure");let e=t.querySelector("canvas"),s=null;if(e&&globalThis.Chart){let n=Sp(t);n&&(s=new globalThis.Chart(e,Ap(t,n)))}let o=[...t.querySelectorAll("[b-att-value]")],a=Math.max(1,...o.map(n=>ln(n,"b-att-value")));return o.forEach((n,l)=>{let u=ln(n,"b-att-value"),b=n.getAttribute("b-att-label")||n.textContent.trim()||`Series ${l+1}`,m=Math.max(0,Math.min(100,u/a*100));n.style.setProperty("--b-chart-value",`${m}%`),n.style.setProperty("--b-chart-index",String(l%5+1)),n.style.setProperty("--b-chart-color",`var(--b-chart-${l%5+1})`),n.setAttribute("role",n.getAttribute("role")||"listitem"),n.setAttribute("aria-label",n.getAttribute("aria-label")||`${b} ${u}`),Ep(n,b,u)}),[...t.querySelectorAll("[b-chart-series], [b-chart-legend] > *")].forEach((n,l)=>{n.style.setProperty("--b-chart-color",n.style.getPropertyValue("--b-chart-color")||`var(--b-chart-${l%5+1})`)}),{destroy:()=>{s?.destroy?.(),t.classList.remove("b-chart")}}}d.register("chart",{type:"static",mount:Cp});S();function fi(t,e){let s=t.matches("input")?t:t.querySelector(`input[type='${e}']`),o=t.matches("input")?t.closest("label, .form-check"):t;return s?.classList.add("form-check-input"),o?.classList.add("form-check","b-check"),{destroy:()=>{s?.classList.remove("form-check-input"),o?.classList.remove("form-check","b-check")}}}d.register("checkbox",{type:"static",mount:t=>fi(t,"checkbox")});S();rt();ti();function kp(t){let e=t.getAttribute("b-att-value");if(e!==null)return e;let s=t.getAttribute("b-att-target");if(s){let o=document.querySelector(s);if(o)return o.textContent??""}return t.textContent??""}function Lp(t){t.classList.remove(...Ci),t.className=`${t.className} ${Qr({variant:t.getAttribute("b-att-variant")||"default",size:t.getAttribute("b-att-size")})}`.trim(),t.type=t.getAttribute("type")||"button";let e=t.querySelector("[b-clipboard-button-icon]");e||(e=document.createElement("span"),e.setAttribute("b-clipboard-button-icon",""),t.prepend(e));let s=t.getAttribute("b-att-icon")||"copy",o=t.getAttribute("b-att-copied-icon")||"check";_(e,s,{label:""});let a=null,n=async()=>{if(t.disabled)return;let l=kp(t);try{await cs(l),_(e,o,{label:""}),t.setAttribute("data-copied","true"),t.dispatchEvent(new CustomEvent("baseui:clipboard-copy",{bubbles:!0,detail:{value:l}})),window.clearTimeout(a),a=window.setTimeout(()=>{_(e,s,{label:""}),t.removeAttribute("data-copied")},Number(t.getAttribute("b-att-reset-delay"))||2e3)}catch(u){t.dispatchEvent(new CustomEvent("baseui:clipboard-copy-error",{bubbles:!0,detail:{error:u}}))}};return t.addEventListener("click",n),{destroy:()=>{t.removeEventListener("click",n),window.clearTimeout(a),e.remove(),t.classList.remove(...Ci),t.removeAttribute("data-copied")}}}d.register("clipboard-button",{type:"static",mount:Lp});S();function Np(t){let e=t.querySelector("[b-collapsible-trigger]"),s=t.querySelector("[b-collapsible-panel]"),o=m=>{t.setAttribute("b-att-state",m?"open":"closed"),e?.setAttribute("aria-expanded",String(m)),t.dispatchEvent(new CustomEvent("baseui:change",{bubbles:!0,detail:{open:m}}))};if(!s){let m=()=>o(t.getAttribute("b-att-state")!=="open");return e?.setAttribute("aria-expanded",String(t.getAttribute("b-att-state")==="open")),e?.addEventListener("click",m),{destroy:()=>e?.removeEventListener("click",m)}}let a=t.getAttribute("b-att-state")==="open";s.classList.add("collapse"),a&&s.classList.add("show");let n=new(k()).Collapse(s,{toggle:!1}),l=()=>o(!0),u=()=>o(!1);s.addEventListener("shown.bs.collapse",l),s.addEventListener("hidden.bs.collapse",u),e?.setAttribute("aria-expanded",String(a));let b=()=>{s.classList.contains("show")?n.hide():n.show()};return e?.addEventListener("click",b),{destroy:()=>{e?.removeEventListener("click",b),s.removeEventListener("shown.bs.collapse",l),s.removeEventListener("hidden.bs.collapse",u),n.dispose()}}}d.register("collapsible",{type:"owl",mount:Np});S();function Op(t){let e=t.querySelector("input"),s=t.querySelector("[b-combobox-list]"),o=()=>[...s?.querySelectorAll("[b-att-value]")||[]];t.classList.add("b-combobox"),e?.setAttribute("role","combobox"),e?.setAttribute("aria-expanded","false"),s?.setAttribute("role","listbox"),s&&(s.hidden=!0);let a=u=>{s&&(s.hidden=!u),e?.setAttribute("aria-expanded",String(u))},n=()=>{let u=e.value.toLowerCase();o().forEach(b=>{b.hidden=!b.textContent.toLowerCase().includes(u)}),a(!0)},l=u=>{let b=u.target.closest("[b-att-value]");b&&(e.value=b.textContent.trim(),t.setAttribute("b-att-value",b.getAttribute("b-att-value")),a(!1),t.dispatchEvent(new CustomEvent("baseui:change",{bubbles:!0,detail:{value:b.getAttribute("b-att-value")}})))};return e?.addEventListener("input",n),e?.addEventListener("focus",()=>a(!0)),s?.addEventListener("click",l),{destroy:()=>{e?.removeEventListener("input",n),s?.removeEventListener("click",l)}}}d.register("combobox",{type:"owl",mount:Op});S();function Bp(t){let e=t.querySelector("input"),s=()=>[...t.querySelectorAll("[b-command-item]")];t.classList.add("b-command"),t.setAttribute("role",t.getAttribute("role")||"dialog"),e?.classList.add("form-control");let o=()=>{let n=(e?.value||"").toLowerCase();s().forEach(l=>{l.hidden=!l.textContent.toLowerCase().includes(n)})},a=n=>{let l=n.target.closest("[b-command-item]");l&&t.dispatchEvent(new CustomEvent("baseui:select",{bubbles:!0,detail:{value:l.getAttribute("b-att-value")||l.textContent.trim()}}))};return e?.addEventListener("input",o),t.addEventListener("click",a),{destroy:()=>{e?.removeEventListener("input",o),t.removeEventListener("click",a)}}}d.register("command",{type:"owl",mount:Bp});S();function Ip(t){let e=t.querySelector("[b-context-menu-content]");if(!e)return{};e.hidden=!0,e.setAttribute("role","menu");let s=n=>{n.preventDefault(),e.hidden=!1,e.style.left=`${n.clientX}px`,e.style.top=`${n.clientY}px`,t.dispatchEvent(new CustomEvent("baseui:open",{bubbles:!0}))},o=()=>{e.hidden=!0,t.dispatchEvent(new CustomEvent("baseui:close",{bubbles:!0}))},a=n=>{n.key==="Escape"&&o()};return t.addEventListener("contextmenu",s),document.addEventListener("click",o),t.addEventListener("keydown",a),{destroy:()=>{t.removeEventListener("contextmenu",s),document.removeEventListener("click",o),t.removeEventListener("keydown",a)}}}d.register("context-menu",{type:"owl",mount:Ip});S();rt();var pn=[["728ed52f","Success","ken99@example.com","$316.00"],["489e1d42","Success","abe45@example.com","$242.00"],["6b0888f6","Processing","monserrat44@example.com","$837.00"],["a1dc8c4e","Success","silas22@example.com","$874.00"],["15b96de0","Failed","carmella@example.com","$721.00"]];function Tp(t){t.querySelector("table")||(t.innerHTML=`
|
|
39
|
-
<div class="b-data-table__toolbar">
|
|
40
|
-
<input b-table-search type="search" class="form-control b-data-table__search" placeholder="Filter emails...">
|
|
41
|
-
<div class="b-data-table__columns"><button type="button" class="btn b-button btn-outline-secondary" data-slot="button" data-icon="inline-end" aria-label="Toggle columns"><span>Columns</span><span b-icon="chevron-down" data-icon="inline-end"></span></button></div>
|
|
42
|
-
</div>
|
|
43
|
-
<div class="b-data-table__viewport">
|
|
44
|
-
<table class="table b-data-table__table">
|
|
45
|
-
<thead><tr><th class="b-data-table__selection-cell"><input type="checkbox" class="form-check-input" aria-label="Select all rows"></th><th>Status</th><th b-att-sortable="true">Email <span class="b-data-table__sort-icon" data-icon="arrow-up-down" aria-hidden="true"></span></th><th class="text-end">Amount</th><th class="b-data-table__actions-cell"><span class="visually-hidden">Actions</span></th></tr></thead>
|
|
46
|
-
<tbody>${pn.map(e=>`<tr data-row-key="${e[0]}"><td class="b-data-table__selection-cell"><input type="checkbox" class="form-check-input" aria-label="Select row"></td><td>${e[1]}</td><td>${e[2]}</td><td class="text-end"><span class="b-data-table__money">${e[3]}</span></td><td class="b-data-table__actions-cell"><button type="button" class="btn b-button btn-ghost b-button-icon" aria-label="Open menu" data-slot="button" data-icon="inline-start" data-icon-only="true"><span b-icon="ellipsis"></span></button></td></tr>`).join("")}</tbody>
|
|
47
|
-
</table>
|
|
48
|
-
</div>
|
|
49
|
-
<div class="b-data-table__cards">
|
|
50
|
-
${pn.map(e=>`<div class="b-data-table__card" data-row-key="${e[0]}">
|
|
51
|
-
<div class="b-data-table__card-header"><input type="checkbox" class="form-check-input" aria-label="Select row"><div class="b-data-table__actions"><button type="button" class="btn b-button btn-ghost b-button-icon" aria-label="Open menu" data-slot="button" data-icon="inline-start" data-icon-only="true"><span b-icon="ellipsis"></span></button></div></div>
|
|
52
|
-
<div class="b-data-table__card-field"><span class="b-data-table__card-label">Status</span><span class="b-data-table__card-value">${e[1]}</span></div>
|
|
53
|
-
<div class="b-data-table__card-field"><span class="b-data-table__card-label">Email</span><span class="b-data-table__card-value">${e[2]}</span></div>
|
|
54
|
-
<div class="b-data-table__card-field"><span class="b-data-table__card-label">Amount</span><span class="b-data-table__card-value b-data-table__money">${e[3]}</span></div>
|
|
55
|
-
</div>`).join("")}
|
|
56
|
-
</div>
|
|
57
|
-
<div class="b-data-table__pagination"><div class="b-data-table__selection-summary">0 of 5 row(s) selected.</div><div class="b-data-table__pager"><button type="button" class="btn b-button btn-outline-secondary btn-sm" disabled>Previous</button><button type="button" class="btn b-button btn-outline-secondary btn-sm" disabled>Next</button></div></div>
|
|
58
|
-
`)}function Rp(t){Tp(t),t.querySelectorAll("[b-icon]").forEach(C=>_(C,C.getAttribute("b-icon"),{label:""}));let e=t.querySelector("table")||t,s=t.querySelector("[b-table-search]"),o=t.querySelector(".b-data-table__selection-summary"),a=t.getAttribute("b-att-variant");t.classList.add("b-data-table"),a&&t.classList.add(`b-data-table-${a}`),e.classList.add("table");let n=t.querySelector(".b-data-table__cards"),l=()=>[...e.querySelectorAll("tbody tr")],u=C=>n?.querySelector(`[data-row-key="${C.dataset.rowKey}"]`),b=()=>[...e.querySelectorAll("tbody input[type='checkbox']")],m=()=>{o&&(o.textContent=`${b().filter(C=>C.checked).length} of ${l().filter(C=>!C.hidden).length} row(s) selected.`)},f=()=>{let C=(s?.value||"").toLowerCase();l().forEach($=>{let O=!($.cells[2]||$.cells[1]||$.cells[0]).textContent.toLowerCase().includes(C);$.hidden=O;let F=u($);F&&(F.hidden=O)}),m()},g=(C,$)=>{let z=e.tBodies[0];l().sort((O,F)=>O.cells[C].textContent.localeCompare(F.cells[C].textContent)*$).forEach(O=>{z.append(O);let F=u(O);F&&n.append(F)})},E=C=>{let $=C.target.closest("th");if(!$)return;let z=$.getAttribute("b-att-sort")==="asc"?-1:1;e.querySelectorAll("th").forEach(O=>O.removeAttribute("b-att-sort")),$.setAttribute("b-att-sort",z===1?"asc":"desc"),g([...$.parentElement.children].indexOf($),z)},N=(C,$)=>{let O=u(C)?.querySelector("input[type='checkbox']");O&&O.checked!==$&&(O.checked=$)},I=C=>{let $=C.target;if($?.matches("input[type='checkbox']")){let z=$.closest("tr"),O=$.closest(".b-data-table__card");if(z)N(z,$.checked);else if(O){let X=l().find(Zr=>Zr.dataset.rowKey===O.dataset.rowKey)?.querySelector("input[type='checkbox']");X&&X.checked!==$.checked&&(X.checked=$.checked)}}m()};return s?.addEventListener("input",f),e.tHead?.addEventListener("click",E),e.addEventListener("change",I),n?.addEventListener("change",I),m(),{destroy:()=>{s?.removeEventListener("input",f),e.tHead?.removeEventListener("click",E),e.removeEventListener("change",I),n?.removeEventListener("change",I)}}}d.register("data-table",{type:"owl",mount:Rp});S();function $p(t){let e=t.matches("input")?t:t.querySelector("input[type='date'], input");t.classList.add("b-date-picker"),e?.classList.add("form-control"),e?.setAttribute("type",e.getAttribute("type")||"date");let s=()=>{t.setAttribute("b-att-value",e.value),t.dispatchEvent(new CustomEvent("baseui:change",{bubbles:!0,detail:{value:e.value}}))};return e?.addEventListener("input",s),{destroy:()=>e?.removeEventListener("input",s)}}d.register("date-picker",{type:"owl",mount:$p});S();function qp(t){let e=t.querySelector("[b-dialog-panel]");if(t.classList.add("modal","fade","b-dialog-backdrop"),t.setAttribute("tabindex","-1"),t.setAttribute("aria-hidden","true"),e){let a=document.createElement("div");a.className="modal-dialog modal-dialog-centered",e.replaceWith(a),a.append(e),e.classList.add("modal-content")}[...t.querySelectorAll("[b-dialog-close]")].forEach(a=>a.setAttribute("data-bs-dismiss","modal"));let o=k().Modal.getOrCreateInstance(t,{backdrop:!0,keyboard:!0,focus:!0});return Us(t,o,"modal","BaseUIDialog")}d.register("dialog",{type:"owl",mount:qp});S();function Up(t){let e=t.getAttribute("b-att-dir")||t.getAttribute("dir")||"ltr";return t.setAttribute("dir",e==="rtl"?"rtl":"ltr"),{}}d.register("direction",{type:"static",mount:Up});S();function Pp(t){t.classList.add("offcanvas","offcanvas-bottom","b-drawer-overlay"),t.setAttribute("tabindex","-1"),[...t.querySelectorAll("[b-drawer-close]")].forEach(o=>o.setAttribute("data-bs-dismiss","offcanvas"));let s=k().Offcanvas.getOrCreateInstance(t,{backdrop:!0,keyboard:!0,scroll:!1});return Us(t,s,"offcanvas","BaseUIDrawer")}d.register("drawer",{type:"owl",mount:Pp});S();rt();var dn="a, button, [role='menuitem'], [role='menuitemcheckbox'], [role='menuitemradio']";function un(t,e){t?.classList.add(e)}function Mp(t,e){if(!e||t.querySelector("[b-dropdown-indicator], [data-slot$='indicator']"))return;let s=document.createElement("span");s.setAttribute("b-dropdown-indicator",""),s.append(_(document.createElement("span"),"check")),t.prepend(s)}function _p(t){t.setAttribute("data-slot",t.getAttribute("data-slot")||"dropdown-menu-content"),t.querySelectorAll("[b-dropdown-group]").forEach(e=>{e.setAttribute("data-slot","dropdown-menu-group"),e.setAttribute("role",e.getAttribute("role")||"group")}),t.querySelectorAll("[b-dropdown-label]").forEach(e=>{e.setAttribute("data-slot","dropdown-menu-label"),e.classList.add("dropdown-header")}),t.querySelectorAll("[b-dropdown-separator]").forEach(e=>{e.setAttribute("data-slot","dropdown-menu-separator"),e.classList.add("dropdown-divider"),e.setAttribute("role",e.getAttribute("role")||"separator")}),t.querySelectorAll("[b-dropdown-shortcut]").forEach(e=>{e.setAttribute("data-slot","dropdown-menu-shortcut")}),t.querySelectorAll("[b-dropdown-checkbox-item], [b-dropdown-radio-item]").forEach(e=>{let s=e.hasAttribute("b-dropdown-radio-item");e.setAttribute("role",s?"menuitemradio":"menuitemcheckbox"),e.setAttribute("data-slot",s?"dropdown-menu-radio-item":"dropdown-menu-checkbox-item"),e.classList.add("dropdown-item"),e.setAttribute("aria-checked",e.hasAttribute("checked")||e.getAttribute("aria-checked")==="true"?"true":"false"),Mp(e,e.getAttribute("aria-checked")==="true")}),t.querySelectorAll(dn).forEach(e=>{e.setAttribute("role",e.getAttribute("role")||"menuitem"),e.setAttribute("tabindex",e.getAttribute("tabindex")||"0"),e.setAttribute("data-slot",e.getAttribute("data-slot")||"dropdown-menu-item"),e.classList.add("dropdown-item")})}function zp(t){let e=[];return t.querySelectorAll("[b-dropdown-sub]").forEach(s=>{let o=s.querySelector("[b-dropdown-sub-trigger]"),a=s.querySelector("[b-dropdown-sub-content]");if(!o||!a)return;if(un(o,"b-dropdown-menu-sub-trigger"),un(a,"b-dropdown-menu-sub-content"),o.setAttribute("data-slot","dropdown-menu-sub-trigger"),o.setAttribute("role","menuitem"),o.setAttribute("aria-haspopup","menu"),a.setAttribute("data-slot","dropdown-menu-sub-content"),a.setAttribute("role","menu"),a.hidden=!0,!o.querySelector(".b-dropdown-menu-sub-trigger-icon")){let m=_(document.createElement("span"),"chevron-right");m.classList.add("b-dropdown-menu-sub-trigger-icon"),o.append(m)}let n=m=>{a.hidden=!m,o.setAttribute("data-state",m?"open":"closed"),o.setAttribute("aria-expanded",String(m))},l=()=>n(!0),u=()=>n(!1),b=m=>{m.preventDefault(),n(a.hidden)};s.addEventListener("mouseenter",l),s.addEventListener("mouseleave",u),o.addEventListener("focus",l),o.addEventListener("click",b),e.push(()=>{s.removeEventListener("mouseenter",l),s.removeEventListener("mouseleave",u),o.removeEventListener("focus",l),o.removeEventListener("click",b)})}),()=>e.forEach(s=>s())}function Dp(t){let e=t.querySelector("[b-dropdown-trigger]"),s=t.querySelector("[b-dropdown-menu]");if(!e||!s)return{destroy:()=>{}};t.classList.add("dropdown"),s.classList.add("dropdown-menu"),e.setAttribute("aria-haspopup","menu"),s.setAttribute("role","menu");let o=k().Dropdown.getOrCreateInstance(e),a=E=>{t.setAttribute("b-att-state",E?"open":"closed"),e.setAttribute("aria-expanded",String(E)),t.dispatchEvent(new CustomEvent(E?"baseui:open":"baseui:close",{bubbles:!0}))},n=()=>a(!0),l=()=>a(!1);e.addEventListener("shown.bs.dropdown",n),e.addEventListener("hidden.bs.dropdown",l);let u=()=>o.toggle();e.addEventListener("click",u);let b=E=>{E.key==="Escape"?(o.hide(),e.focus()):E.key==="ArrowDown"&&!s.classList.contains("show")&&(E.preventDefault(),o.show(),[...s.querySelectorAll("a, button, [tabindex]:not([tabindex='-1'])")][0]?.focus())};t.addEventListener("keydown",b);let m=E=>{t.contains(E.target)||o.hide()};document.addEventListener("click",m),_p(s);let f=zp(s),g=E=>{let N=E.target.closest(dn);!N||N.closest("[b-dropdown-sub]")||o.hide()};return s.addEventListener("click",g),{destroy:()=>{f(),s.removeEventListener("click",g),document.removeEventListener("click",m),t.removeEventListener("keydown",b),e.removeEventListener("click",u),e.removeEventListener("shown.bs.dropdown",n),e.removeEventListener("hidden.bs.dropdown",l),o.dispose()}}}d.register("dropdown-menu",{type:"owl",mount:Dp});S();var Vi={default:"b-empty-default",outline:"b-empty-outline",background:"b-empty-background"};function jp(t){let e=t.getAttribute("b-att-variant")||"default",s=[...t.querySelectorAll("[b-empty-media]")];return t.setAttribute("role",t.getAttribute("role")||"status"),t.classList.add("b-empty",Vi[e]||Vi.default),t.querySelectorAll("[b-empty-header]").forEach(o=>o.classList.add("b-empty-header")),t.querySelectorAll("[b-empty-title]").forEach(o=>o.classList.add("b-empty-title")),t.querySelectorAll("[b-empty-description]").forEach(o=>o.classList.add("b-empty-description")),t.querySelectorAll("[b-empty-content]").forEach(o=>o.classList.add("b-empty-content")),s.forEach(o=>{let a=o.getAttribute("b-att-variant")==="icon"?"icon":"default";o.classList.add("b-empty-media",`b-empty-media-${a}`),o.setAttribute("data-variant",a)}),{destroy:()=>{t.classList.remove("b-empty",...Object.values(Vi))}}}d.register("empty",{type:"owl",mount:jp});S();function gi(t,e){t?.classList.add(...e.filter(Boolean))}function ae(t,e,s,o){t.querySelectorAll(e).forEach(a=>{a.setAttribute("data-slot",s),gi(a,[o])})}function Fp(t){return t.querySelector("input, textarea, select, [role='checkbox'], [role='radio'], [role='switch']")}function Hp(t,e){return e.id?e.id:`${t?.id||"b-field"}-error`}function Wp(t){let e=t.getAttribute("b-att-slot")||t.getAttribute("data-slot")||"field",s=[];if(e==="field-set")t.setAttribute("data-slot","field-set"),gi(t,["b-field-set"]),s.push("b-field-set");else if(e==="field-group")t.setAttribute("data-slot","field-group"),gi(t,["b-field-group"]),s.push("b-field-group");else{let n=t.getAttribute("b-att-orientation")||t.getAttribute("data-orientation")||"vertical";t.setAttribute("role",t.getAttribute("role")||"group"),t.setAttribute("data-slot","field"),t.setAttribute("data-orientation",n),gi(t,["b-field",`b-field-orientation-${n}`]),s.push("b-field",`b-field-orientation-${n}`)}ae(t,"legend[b-field-legend], [b-field-legend]","field-legend","b-field-legend"),ae(t,"[b-field-group]","field-group","b-field-group"),ae(t,"[b-field-content]","field-content","b-field-content"),ae(t,"label[b-field-label], [b-field-label], [b-label]","field-label","b-field-label"),ae(t,"[b-field-title]","field-label","b-field-title"),ae(t,"[b-field-description]","field-description","b-field-description"),ae(t,"[b-field-separator]","field-separator","b-field-separator"),ae(t,"[b-field-error], [b-error]","field-error","b-field-error"),t.querySelectorAll("[b-field-separator]").forEach(n=>{if(!n.querySelector(".b-field-separator-line")){let l=document.createElement("span");l.className="b-field-separator-line",l.setAttribute("aria-hidden","true"),n.prepend(l)}n.textContent.trim()&&n.setAttribute("data-content","true")});let o=Fp(t),a=t.querySelector("[b-field-error], [b-error], [data-slot='field-error']");if(o&&a){a.setAttribute("role",a.getAttribute("role")||"alert");let n=Hp(o,a);a.id=n,o.setAttribute("aria-describedby",n),o.setAttribute("aria-invalid","true"),t.setAttribute("data-invalid","true")}return{destroy:()=>t.classList.remove(...s)}}d.register("field",{type:"static",mount:Wp});S();function Kp(t){t.classList.add("b-form"),t.setAttribute("data-slot","form"),t.setAttribute("novalidate","");let e=t.querySelector("[name='title']"),s=t.querySelector("[name='description']"),o=t.querySelector("[b-form-counter], .b-form-counter-text"),a=Number(s?.getAttribute("maxlength")||100),n=()=>{o&&s&&(o.textContent=`${s.value.length}/${a} characters`)},l=()=>{e&&(e.value=""),s&&(s.value=""),n()},u=t.querySelector("[b-form-reset]");return u?.addEventListener("click",l),s?.addEventListener("input",n),n(),{destroy(){u?.removeEventListener("click",l),s?.removeEventListener("input",n)}}}d.register("form",{type:"static",mount:Kp});S();function Vp(t){let e=t.querySelector("[b-hover-card-trigger]"),s=t.querySelector("[b-hover-card-content]");if(!e||!s)return{};let o=()=>{s.hidden=!1,e.setAttribute("aria-expanded","true")},a=()=>{s.hidden=!0,e.setAttribute("aria-expanded","false")},n=l=>{l.key==="Escape"&&a()};return e.setAttribute("aria-haspopup","dialog"),s.setAttribute("role","dialog"),a(),t.addEventListener("mouseenter",o),t.addEventListener("mouseleave",a),t.addEventListener("focusin",o),t.addEventListener("focusout",a),t.addEventListener("keydown",n),{destroy:()=>{t.removeEventListener("mouseenter",o),t.removeEventListener("mouseleave",a),t.removeEventListener("focusin",o),t.removeEventListener("focusout",a),t.removeEventListener("keydown",n)}}}d.register("hover-card",{type:"owl",mount:Vp});S();rt();function Zp(t){let e=t.getAttribute("b-icon")||t.getAttribute("b-att-icon")||t.getAttribute("aria-label");return e?(_(t,e,{baseUrl:t.getAttribute("b-icon-base-url")||t.getAttribute("b-att-base-url"),label:t.getAttribute("b-att-label")??t.getAttribute("aria-label")??"",size:t.getAttribute("b-icon-size")||t.getAttribute("b-att-size")}),{destroy:()=>{t.classList.remove("b-icon"),t.style.removeProperty("--b-icon-url"),t.style.removeProperty("--b-icon-size"),!t.getAttribute("b-att-label")&&!t.getAttribute("aria-label")&&t.removeAttribute("aria-hidden")}}):{}}d.register("icon",{type:"static",mount:Zp});S();function Gp(t){let e=oi({tag:t.tagName.toLowerCase(),type:t.getAttribute("type")});return t.classList.add(e),{destroy:()=>t.classList.remove(e)}}d.register("input",{type:"static",mount:Gp});S();function Jp(t){let e=[...t.querySelectorAll("input")];t.classList.add("b-input-otp"),e.forEach(n=>{n.classList.add("form-control"),n.inputMode=n.inputMode||"numeric",n.maxLength=n.maxLength>0?n.maxLength:1});let s=()=>{let n=e.map(l=>l.value).join("");t.setAttribute("b-att-value",n),t.dispatchEvent(new CustomEvent("baseui:change",{bubbles:!0,detail:{value:n}}))},o=n=>{let l=e.indexOf(n.target);n.target.value&&e[l+1]&&e[l+1].focus(),s()},a=n=>{let l=n.clipboardData.getData("text").trim();l&&(n.preventDefault(),e.forEach((u,b)=>{u.value=l[b]||""}),s())};return e.forEach(n=>n.addEventListener("input",o)),t.addEventListener("paste",a),{destroy:()=>{e.forEach(n=>n.removeEventListener("input",o)),t.removeEventListener("paste",a)}}}d.register("input-otp",{type:"owl",mount:Jp});S();function Xp(t){return t.classList.add("b-item"),{destroy:()=>t.classList.remove("b-item")}}d.register("item",{type:"static",mount:Xp});S();function Yp(t){return t.classList.add("b-kbd"),{destroy:()=>t.classList.remove("b-kbd")}}d.register("kbd",{type:"static",mount:Yp});S();function Qp(t){return t.classList.add("form-label","b-label","b-label"),t.getAttribute("b-att-required")==="true"&&t.setAttribute("b-att-state","required"),{destroy:()=>t.classList.remove("form-label","b-label","b-label")}}d.register("label",{type:"static",mount:Qp});S();function tu(t){return t.classList.add("b-marker"),{destroy:()=>t.classList.remove("b-marker")}}d.register("marker",{type:"static",mount:tu});S();ui();function eu(t){let e=t.querySelector("script[type='text/markdown'], template");return e?e.tagName==="TEMPLATE"?e.content.textContent:e.textContent:t.getAttribute("b-att-content")||t.textContent||""}function su(t){return String(t||"").split(",").map(e=>e.trim()).filter(Boolean)}function ou(t){t.classList.add("b-markdown");let e=t.getAttribute("b-att-src"),s=t.getAttribute("b-att-mermaid")!=="false",o=t.getAttribute("b-att-base-ui")!=="false",a=t.getAttribute("b-att-editable")==="true",n=t.getAttribute("b-att-collaborative")==="true",l=t.getAttribute("b-att-room")||"b-markdown",u=t.getAttribute("b-att-password")||void 0,b=su(t.getAttribute("b-att-signaling")),m=!1,f=null;function g(N){m||(t.setAttribute("data-status","error"),t.textContent=`Unable to render Markdown: ${N?.message||N}`,t.dispatchEvent(new CustomEvent("baseui:markdown-error",{bubbles:!0,detail:{error:N}})))}async function E(){let N=eu(t);t.setAttribute("data-status","loading");let I=N;if(e)try{let O=await fetch(e);if(!O.ok)throw new Error(`${O.status} ${O.statusText}`);I=await O.text()}catch(O){g(O);return}if(a){t.replaceChildren(),t.classList.add("b-markdown-editable"),t.setAttribute("data-status","ready");let O=document.createElement("div");O.className="b-markdown-editor",O.setAttribute("data-slot","markdown-editor"),O.setAttribute("role","group"),O.setAttribute("aria-label",n?"Collaborative Markdown editor":"Markdown editor"),t.append(O);try{if(f=await Wr({root:O,value:I,collaborative:n,room:l,password:u,signaling:b,onChange:(F,X)=>{t.dispatchEvent(new CustomEvent("baseui:markdown-change",{bubbles:!0,detail:{markdown:F,previousMarkdown:X}}))}}),m){f?.destroy?.(),f=null;return}}catch(F){g(F);return}t.dispatchEvent(new CustomEvent("baseui:markdown-editor-ready",{bubbles:!0,detail:{collaborative:n,room:l}}));return}let{data:C,content:$}=di(I),z;try{z=await Fr($)}catch(O){g(O);return}m||(t.innerHTML=z,t.setAttribute("data-status","ready"),await Hr(t,{mermaid:s,baseUi:o}),m||t.dispatchEvent(new CustomEvent("baseui:markdown-render",{bubbles:!0,detail:{html:z,frontmatter:C}})))}return E(),{destroy:()=>{m=!0,f?.destroy?.(),f=null,Cr(t),t.classList.remove("b-markdown"),t.classList.remove("b-markdown-editable"),t.removeAttribute("data-status")}}}d.register("markdown",{type:"static",mount:ou});S();function ru(t){return t.classList.add("b-message"),t.setAttribute("b-att-side",t.getAttribute("b-att-side")||"incoming"),t.setAttribute("role",t.getAttribute("role")||"listitem"),{}}d.register("message",{type:"static",mount:ru});S();function iu(t){t.classList.add("b-message-scroller");let e=()=>{t.getAttribute("b-att-autoscroll")!=="false"&&(t.scrollTop=t.scrollHeight)},s=new window.MutationObserver(e);return s.observe(t,{childList:!0,subtree:!0}),window.requestAnimationFrame(e),{destroy:()=>s.disconnect()}}d.register("message-scroller",{type:"owl",mount:iu});S();function au(t){t.setAttribute("role","menubar"),t.classList.add("b-menubar");for(let e of t.querySelectorAll("a, button"))e.setAttribute("role","menuitem");return{destroy:()=>t.classList.remove("b-menubar")}}d.register("menubar",{type:"static",mount:au});S();function nu(t){return t.classList.add("form-select"),(t.getAttribute("b-att-size")==="sm"||t.getAttribute("b-att-size")==="lg")&&t.classList.add(`form-select-${t.getAttribute("b-att-size")}`),{destroy:()=>t.classList.remove("form-select","form-select-sm","form-select-lg")}}d.register("native-select",{type:"static",mount:nu});S();function cu(t){t.classList.add("nav");let e=[...t.querySelectorAll("a, button")].filter(o=>!o.disabled);e.forEach(o=>o.classList.add("nav-link"));let s=o=>{let a=e.indexOf(o.target),n=o.key==="ArrowRight"?1:o.key==="ArrowLeft"?-1:0;!n||a<0||(o.preventDefault(),e[(a+n+e.length)%e.length]?.focus())};return t.setAttribute("role",t.getAttribute("role")||"menubar"),e.forEach(o=>o.setAttribute("role","menuitem")),t.addEventListener("keydown",s),{destroy:()=>t.removeEventListener("keydown",s)}}d.register("navigation-menu",{type:"owl",mount:cu});S();function lu(t){let e=t.querySelector("ol, ul")||t,s=[...e.children];return t.classList.add("b-pagination"),e.classList.add("pagination"),s.forEach(o=>{let a=o.querySelector("a, button");o.classList.add("page-item"),a?.classList.add("page-link"),a?.getAttribute("aria-current")==="page"&&o.classList.add("active"),(a?.hasAttribute("disabled")||a?.getAttribute("aria-disabled")==="true")&&o.classList.add("disabled")}),t.setAttribute("aria-label",t.getAttribute("aria-label")||"Pagination"),{destroy:()=>{t.classList.remove("b-pagination"),e.classList.remove("pagination")}}}d.register("pagination",{type:"owl",mount:lu});S();function pu(t){let e=t.querySelector("[b-popover-trigger]")||t,s=t.querySelector("[b-popover-content]"),o=s?s.innerHTML:"";s?.remove(),e.setAttribute("aria-haspopup","dialog");let a=new(k()).Popover(e,{content:o,html:!0,trigger:"click"}),n=()=>{t.setAttribute("b-att-state","open"),e.setAttribute("aria-expanded","true"),t.dispatchEvent(new CustomEvent("baseui:open",{bubbles:!0}))},l=()=>{t.setAttribute("b-att-state","closed"),e.setAttribute("aria-expanded","false"),t.dispatchEvent(new CustomEvent("baseui:close",{bubbles:!0}))};return e.addEventListener("shown.bs.popover",n),e.addEventListener("hidden.bs.popover",l),t.setAttribute("b-att-state","closed"),e.setAttribute("aria-expanded","false"),{destroy:()=>{e.removeEventListener("shown.bs.popover",n),e.removeEventListener("hidden.bs.popover",l),a.dispose()}}}d.register("popover",{type:"owl",mount:pu});S();function uu(t){let e=Number(t.getAttribute("b-att-max")||t.getAttribute("aria-valuemax")||100),s=Math.min(e,Math.max(0,Number(t.getAttribute("b-att-value")||t.getAttribute("aria-valuenow")||0)));if(t.classList.add("progress","b-progress"),t.setAttribute("role","progressbar"),t.setAttribute("aria-valuemin","0"),t.setAttribute("aria-valuemax",String(e)),t.setAttribute("aria-valuenow",String(s)),t.style.setProperty("--b-progress-value",`${s/e*100}%`),!t.querySelector("[b-progress-indicator]")){let o=document.createElement("span");o.className="progress-bar",o.setAttribute("b-progress-indicator",""),t.append(o)}return{destroy:()=>t.classList.remove("progress","b-progress")}}d.register("progress",{type:"static",mount:uu});S();function du(t){let{open:e,close:s,destroy:o}=ai(t,{closeSelector:"[b-pwa-close]"});return t.BaseUIPwa={open:e,close:s},{destroy:()=>{o(),delete t.BaseUIPwa}}}d.register("pwa",{type:"owl",mount:du});S();function bu(t){let e=[...t.querySelectorAll("[b-question]")],s=t.querySelector("[b-question-prev]"),o=t.querySelector("[b-question-next]"),a=0,n=b=>{a=Math.min(e.length-1,Math.max(0,b)),e.forEach((m,f)=>{m.hidden=f!==a,m.setAttribute("b-att-state",f===a?"active":"inactive")}),s&&(s.disabled=a===0),o&&(o.disabled=a===e.length-1),t.dispatchEvent(new CustomEvent("baseui:change",{bubbles:!0,detail:{index:a}}))},l=()=>n(a-1),u=()=>n(a+1);return s?.addEventListener("click",l),o?.addEventListener("click",u),e.length&&n(0),{destroy:()=>{s?.removeEventListener("click",l),o?.removeEventListener("click",u)}}}d.register("questionnaire",{type:"owl",mount:bu});S();d.register("radio-group",{type:"static",mount:t=>fi(t,"radio")});S();function hu(t){let e=t.querySelector("[b-resizable-panel]")||t,s=t.querySelector("[b-resizable-handle]");if(!s)return{};let o=Number(t.getAttribute("b-att-min")||160),a=Number(t.getAttribute("b-att-max")||720),n=l=>{let u=l.clientX,b=e.getBoundingClientRect().width,m=g=>{e.style.width=`${Math.min(a,Math.max(o,b+g.clientX-u))}px`},f=()=>{document.removeEventListener("pointermove",m),document.removeEventListener("pointerup",f),t.dispatchEvent(new CustomEvent("baseui:change",{bubbles:!0,detail:{width:e.style.width}}))};document.addEventListener("pointermove",m),document.addEventListener("pointerup",f)};return s.addEventListener("pointerdown",n),{destroy:()=>s.removeEventListener("pointerdown",n)}}d.register("resizable",{type:"owl",mount:hu});S();function mu(t){return t.classList.add("b-scroll-area"),t.tabIndex=t.tabIndex>=0?t.tabIndex:0,t.setAttribute("role",t.getAttribute("role")||"region"),{}}d.register("scroll-area",{type:"static",mount:mu});S();function fu(t){let e=t.getAttribute("b-att-orientation")==="vertical";return t.classList.add("b-separator",e?"b-separator-vertical":"b-separator-horizontal"),t.setAttribute("role",t.getAttribute("role")||"separator"),t.setAttribute("aria-orientation",e?"vertical":"horizontal"),{destroy:()=>t.classList.remove("b-separator","b-separator-vertical","b-separator-horizontal")}}d.register("separator",{type:"static",mount:fu});S();function bn(t,{triggerSelector:e,panelSelector:s,ariaHaspopup:o,panelRole:a,onKeyDown:n}={}){let l=t.querySelector(e),u=t.querySelector(s),b=E=>{!u||!l||(u.hidden=!E,t.setAttribute("b-att-state",E?"open":"closed"),l.setAttribute("aria-expanded",String(E)),t.dispatchEvent(new CustomEvent(E?"baseui:open":"baseui:close",{bubbles:!0})))},m=()=>b(u?.hidden!==!1),f=E=>{E.key==="Escape"&&(b(!1),l?.focus()),n?.(E,{setOpen:b,panel:u,trigger:l})},g=E=>{t.contains(E.target)||b(!1)};return l?.setAttribute("aria-haspopup",o),u?.setAttribute("role",a),u&&(u.hidden=!0),l?.addEventListener("click",m),t.addEventListener("keydown",f),document.addEventListener("click",g),{trigger:l,panel:u,setOpen:b,destroy:()=>{l?.removeEventListener("click",m),t.removeEventListener("keydown",f),document.removeEventListener("click",g)}}}function gu(t){let{setOpen:e,destroy:s}=bn(t,{triggerSelector:"[b-select-trigger]",panelSelector:"[b-select-content]",ariaHaspopup:"listbox",panelRole:"listbox"}),o=t.querySelector("[b-select-trigger]"),a=t.querySelector("[b-select-value]"),n=l=>{let u=l.target.closest("[b-select-item]");if(!(!u||!t.contains(u))){for(let b of t.querySelectorAll("[b-select-item]"))b.setAttribute("aria-selected",String(b===u));a&&(a.textContent=u.textContent.trim()),t.setAttribute("b-att-value",u.getAttribute("b-att-value")||u.textContent.trim()),t.dispatchEvent(new CustomEvent("baseui:change",{bubbles:!0,detail:{value:t.getAttribute("b-att-value")}})),e(!1),o?.focus()}};for(let l of t.querySelectorAll("[b-select-item]"))l.setAttribute("role","option");return t.addEventListener("click",n),{destroy:()=>{t.removeEventListener("click",n),s()}}}d.register("select",{type:"owl",mount:gu});S();function vu(t){let e=[...t.querySelectorAll("[b-shell-collapse-trigger]")],s=a=>{t.setAttribute("b-att-collapsed",a?"true":"false"),t.dispatchEvent(new CustomEvent(a?"baseui:collapse":"baseui:expand",{bubbles:!0}))},o=()=>s(t.getAttribute("b-att-collapsed")!=="true");return e.forEach(a=>a.addEventListener("click",o)),s(t.getAttribute("b-att-collapsed")==="true"),t.BaseUIShell={collapse:()=>s(!0),expand:()=>s(!1),toggle:o},{destroy:()=>{e.forEach(a=>a.removeEventListener("click",o)),delete t.BaseUIShell}}}d.register("shell",{type:"owl",mount:vu});S();function yu(t){let e=t.getAttribute("b-att-side")==="left"?"offcanvas-start":"offcanvas-end";t.classList.add("offcanvas",e,"b-sheet-overlay"),t.setAttribute("tabindex","-1"),[...t.querySelectorAll("[b-sheet-close]")].forEach(a=>a.setAttribute("data-bs-dismiss","offcanvas"));let o=k().Offcanvas.getOrCreateInstance(t,{backdrop:!0,keyboard:!0,scroll:!1});return Us(t,o,"offcanvas","BaseUISheet")}d.register("sheet",{type:"owl",mount:yu});S();var xu={"[b-sidebar-header]":["b-sidebar-header","sidebar-header","header"],"[b-sidebar-content]":["b-sidebar-content","sidebar-content","content"],"[b-sidebar-footer]":["b-sidebar-footer","sidebar-footer","footer"],"[b-sidebar-group]":["b-sidebar-group","sidebar-group","group"],"[b-sidebar-group-label]":["b-sidebar-group-label","sidebar-group-label","group-label"],"[b-sidebar-group-action]":["b-sidebar-group-action","sidebar-group-action","group-action"],"[b-sidebar-group-content]":["b-sidebar-group-content","sidebar-group-content","group-content"],"[b-sidebar-menu]":["b-sidebar-menu","sidebar-menu","menu"],"[b-sidebar-menu-item]":["b-sidebar-menu-item","sidebar-menu-item","menu-item"],"[b-sidebar-menu-button]":["b-sidebar-menu-button","sidebar-menu-button","menu-button"],"[b-sidebar-menu-action]":["b-sidebar-menu-action","sidebar-menu-action","menu-action"],"[b-sidebar-menu-badge]":["b-sidebar-menu-badge","sidebar-menu-badge","menu-badge"],"[b-sidebar-menu-sub]":["b-sidebar-menu-sub","sidebar-menu-sub","menu-sub"],"[b-sidebar-menu-sub-item]":["b-sidebar-menu-sub-item","sidebar-menu-sub-item","menu-sub-item"],"[b-sidebar-menu-sub-button]":["b-sidebar-menu-sub-button","sidebar-menu-sub-button","menu-sub-button"],"[b-sidebar-separator]":["b-sidebar-separator","sidebar-separator","separator"]};function wu(t){let e=[];for(let[s,[o,a,n]]of Object.entries(xu))for(let l of t.querySelectorAll(s))l.classList.add(o),l.dataset.slot=a,l.dataset.sidebar=n,(l.hasAttribute("b-att-active")||l.getAttribute("aria-current")==="page")&&(l.classList.add("is-active"),l.dataset.active="true"),e.push([l,o]);return e}function Su(t){let e=t.getAttribute("b-att-trigger")?document.querySelector(t.getAttribute("b-att-trigger")):null,s=[...t.querySelectorAll("[b-sidebar-close]")],o=wu(t),a=b=>{t.setAttribute("b-att-state",b?"open":"closed"),t.classList.toggle("is-open",b),t.dataset.state=b?"expanded":"collapsed",t.dispatchEvent(new CustomEvent(b?"baseui:open":"baseui:close",{bubbles:!0}))},n=()=>a(!0),l=()=>a(!1),u=b=>{b.key==="Escape"&&l()};return e?.addEventListener("click",n),s.forEach(b=>b.addEventListener("click",l)),t.addEventListener("keydown",u),t.dataset.sidebar="sidebar",t.dataset.slot="sidebar",a(t.getAttribute("b-att-state")==="open"),t.BaseUISidebar={open:n,close:l},{destroy:()=>{e?.removeEventListener("click",n),s.forEach(b=>b.removeEventListener("click",l)),t.removeEventListener("keydown",u);for(let[b,m]of o)b.classList.remove(m,"is-active"),b.removeAttribute("data-slot"),b.removeAttribute("data-sidebar"),b.removeAttribute("data-active");t.removeAttribute("data-sidebar"),t.removeAttribute("data-slot"),t.removeAttribute("data-state"),delete t.BaseUISidebar}}}d.register("sidebar",{type:"owl",mount:Su});S();function Au(t){t.classList.add("b-slider");let e=()=>{t.style.setProperty("--b-slider-value",`${t.value}%`),t.dispatchEvent(new CustomEvent("baseui:change",{bubbles:!0,detail:{value:t.value}}))};return e(),t.addEventListener("input",e),{destroy:()=>{t.removeEventListener("input",e),t.classList.remove("b-slider")}}}d.register("slider",{type:"static",mount:Au});S();function Eu(t){let e=t.getAttribute("b-att-shape")==="circle"?"b-skeleton-circle":"b-skeleton-block";return t.classList.add("b-skeleton",e),t.setAttribute("aria-hidden",t.getAttribute("aria-hidden")||"true"),{destroy:()=>t.classList.remove("b-skeleton","b-skeleton-circle","b-skeleton-block")}}d.register("skeleton",{type:"static",mount:Eu});S();function Cu(t){let e=t.getAttribute("b-att-type")==="grow",s=t.getAttribute("b-att-label")||"Loading";if(t.classList.add(e?"spinner-grow":"spinner-border"),t.setAttribute("role",t.getAttribute("role")||"status"),!t.querySelector(".visually-hidden")){let o=document.createElement("span");o.className="visually-hidden",o.textContent=s,t.append(o)}return{destroy:()=>t.classList.remove("spinner-border","spinner-grow")}}d.register("spinner",{type:"static",mount:Cu});S();function ku(t){let e=t.matches("input")?t:t.querySelector("input[type='checkbox']"),s=t.matches("input")?t.closest("label, .form-check"):t;return e?.classList.add("form-check-input"),e?.setAttribute("role",e.getAttribute("role")||"switch"),s?.classList.add("form-check","form-switch","b-switch"),{destroy:()=>{e?.classList.remove("form-check-input"),s?.classList.remove("form-check","form-switch","b-switch")}}}d.register("switch",{type:"static",mount:ku});S();function Lu(t){if(t.classList.add("table","b-table"),t.getAttribute("b-att-striped")!=="false"&&t.classList.add("table-striped"),t.getAttribute("b-att-hover")!=="false"&&t.classList.add("table-hover"),t.getAttribute("b-att-responsive")==="true"&&!t.parentElement?.classList.contains("table-responsive")){let e=document.createElement("div");return e.className="table-responsive",t.before(e),e.append(t),{destroy:()=>{e.before(t),e.remove(),t.classList.remove("table","b-table","table-striped","table-hover")}}}return{destroy:()=>t.classList.remove("table","b-table","table-striped","table-hover")}}d.register("table",{type:"static",mount:Lu});S();function Nu(t){t.classList.add("b-tabs-host");let e=[...t.querySelectorAll("[b-tab]")],s=[...t.querySelectorAll("[b-panel]")],o=new Map(s.map(g=>[g.getAttribute("b-panel"),g])),a=new Map,n=new Map,l=new Map,u=new Map,b=e[0]?.parentElement;b&&!b.hasAttribute("role")&&b.setAttribute("role","tablist"),b?.classList.add("nav");let m=t.getAttribute("b-att-value")||e[0]?.getAttribute("b-tab")||"",f=g=>{t.setAttribute("b-att-value",g),e.forEach(E=>{E.tabIndex=E.getAttribute("b-tab")===g?0:-1}),t.dispatchEvent(new CustomEvent("baseui:change",{bubbles:!0,detail:{value:g}}))};return e.forEach((g,E)=>{let N=g.getAttribute("b-tab"),I=o.get(N),C=N===m;if(g.setAttribute("role","tab"),g.classList.add("nav-link"),g.tabIndex=C?0:-1,C&&g.classList.add("active"),I){let X=I.id||`b-tabs-panel-${N}`;I.id=X,I.setAttribute("role","tabpanel"),I.classList.add("tab-pane","fade"),C&&I.classList.add("show","active"),g.setAttribute("data-bs-target",`#${X}`)}let $=k().Tab.getOrCreateInstance(g);a.set(g,$);let z=()=>$.show();g.addEventListener("click",z),n.set(g,z);let O=()=>f(N);g.addEventListener("shown.bs.tab",O),u.set(g,O);let F=X=>{let Zr=ri(X.key,E,e.length);if(Zr===-1)return;X.preventDefault();let Zi=e[Zr];Zi.focus(),a.get(Zi)?.show()};g.addEventListener("keydown",F),l.set(g,F)}),m&&t.setAttribute("b-att-value",m),{destroy:()=>{e.forEach(g=>{g.removeEventListener("click",n.get(g)),g.removeEventListener("keydown",l.get(g)),g.removeEventListener("shown.bs.tab",u.get(g)),a.get(g)?.dispose()}),n.clear(),l.clear(),u.clear(),a.clear()}}}d.register("tabs",{type:"owl",mount:Nu});S();function Ou(t){return t.classList.add("form-control"),t.getAttribute("b-att-resize")==="none"&&t.classList.add("b-textarea-no-resize"),{destroy:()=>t.classList.remove("form-control","b-textarea-no-resize")}}d.register("textarea",{type:"static",mount:Ou});S();function Bu(t){let e=t.querySelector("template, script[type='text/html']");return e?e.tagName==="TEMPLATE"?e.innerHTML:e.textContent:t.getAttribute("b-att-content")||t.innerHTML||""}function Iu(t){return String(t||"").split(",").map(e=>e.trim()).filter(Boolean)}function Tu(t){t.classList.add("b-text-editor");let e=t.getAttribute("b-att-src"),s=t.getAttribute("b-att-provider")||void 0,o=t.getAttribute("b-att-room")||"b-text-editor",a=t.getAttribute("b-att-url")||void 0,n=mi({collaborative:t.getAttribute("b-att-collaborative")==="true",providerType:s,url:a}),l=t.getAttribute("b-att-password")||void 0,u=Iu(t.getAttribute("b-att-signaling")),b=t.getAttribute("b-att-placeholder")||void 0,m=!1,f=null;function g(N){m||(t.setAttribute("data-status","error"),t.textContent=`Unable to mount text editor: ${N?.message||N}`,t.dispatchEvent(new CustomEvent("baseui:text-editor-error",{bubbles:!0,detail:{error:N}})))}async function E(){t.setAttribute("data-status","loading");let N=Bu(t);if(e)try{let C=await fetch(e);if(!C.ok)throw new Error(`${C.status} ${C.statusText}`);N=await C.text()}catch(C){g(C);return}t.replaceChildren();let I=document.createElement("div");I.className="b-text-editor-shell",I.setAttribute("data-slot","text-editor-shell"),I.setAttribute("role","group"),I.setAttribute("aria-label",n?"Collaborative rich text editor":"Rich text editor"),t.append(I);try{if(f=await hi({root:I,value:N,placeholder:b,collaborative:n,providerType:s,room:o,url:a,password:l,signaling:u,onChange:(C,$)=>{t.dispatchEvent(new CustomEvent("baseui:text-editor-change",{bubbles:!0,detail:{html:C,previousHtml:$}}))}}),m){f?.destroy?.(),f=null;return}}catch(C){g(C);return}t.setAttribute("data-status","ready"),t.dispatchEvent(new CustomEvent("baseui:text-editor-ready",{bubbles:!0,detail:{collaborative:n,room:o}}))}return E(),{destroy:()=>{m=!0,f?.destroy?.(),f=null,t.classList.remove("b-text-editor"),t.removeAttribute("data-status")}}}d.register("text-editor",{type:"static",mount:Tu});rt();S();function Ru(t,e){let s=Ar(e);t.classList.remove(...Na),t.className=`${t.className} ${ci({variant:t.getAttribute("b-att-variant")||"outline",size:t.getAttribute("b-att-size")})}`.trim(),t.type=t.getAttribute("type")||"button",t.setAttribute("aria-label",s.label),t.setAttribute("title",s.label),t.setAttribute("aria-pressed",s.pressed);let o=t.querySelector("[b-theme-button-icon]");o||(o=document.createElement("span"),o.setAttribute("b-theme-button-icon",""),t.prepend(o)),o.setAttribute("b-icon",s.icon),_(o,s.icon,{baseUrl:t.getAttribute("b-icon-base-url")||t.getAttribute("b-att-base-url")});let a=t.querySelector("[b-theme-button-label]");a||(a=document.createElement("span"),a.className="visually-hidden",a.setAttribute("b-theme-button-label",""),t.append(a)),a.textContent=s.label}function $u(t){let e=ie({storageKey:t.getAttribute("b-att-storage-key")||void 0,toggleSelector:"[b-theme-toggle]",labelSelector:"[b-theme-label]"}),s=(n=e.current())=>Ru(t,n),o=()=>s(e.toggle()),a=n=>s(n.detail?.theme);return s(e.set(e.current(),{skipStorage:!0})),t.addEventListener("click",o),document.addEventListener("baseui:theme-change",a),{destroy:()=>{t.removeEventListener("click",o),document.removeEventListener("baseui:theme-change",a)}}}d.register("theme-button",{type:"static",mount:$u});S();v();function qu(t){let e=[...t.querySelectorAll("[b-toast-close]")],s=t.getAttribute("b-att-delay"),o=s===null?3e3:Number(s),a=ni(t.getAttribute("b-att-position"));t.className=h(t.className,"toast","fade",a),t.setAttribute("role",t.getAttribute("b-att-variant")==="danger"?"alert":"status"),e.forEach(f=>f.setAttribute("data-bs-dismiss","toast"));let n=new(k()).Toast(t,{autohide:o>0,delay:o||3e3}),l=()=>{t.setAttribute("b-att-state","open"),t.dispatchEvent(new CustomEvent("baseui:open",{bubbles:!0}))},u=()=>{t.setAttribute("b-att-state","closed"),t.dispatchEvent(new CustomEvent("baseui:close",{bubbles:!0}))};t.addEventListener("shown.bs.toast",l),t.addEventListener("hidden.bs.toast",u);let b=()=>n.show(),m=()=>n.hide();return t.getAttribute("b-att-state")==="open"&&b(),t.BaseUIToast={show:b,hide:m},{destroy:()=>{t.removeEventListener("shown.bs.toast",l),t.removeEventListener("hidden.bs.toast",u),n.dispose(),delete t.BaseUIToast}}}d.register("toast",{type:"owl",mount:qu});S();function Uu(t){let e=t.querySelector("[b-tooltip-trigger]")||t,s=t.querySelector("[b-tooltip-content]");!s&&t.getAttribute("b-att-content")&&(s=document.createElement("span"),s.setAttribute("b-tooltip-content",""),s.textContent=t.getAttribute("b-att-content"),t.appendChild(s));let o=s?s.innerHTML:"";s?.remove();let a=new(k()).Tooltip(e,{title:o,html:!0,trigger:"hover focus"}),n=()=>t.setAttribute("b-att-state","open"),l=()=>t.setAttribute("b-att-state","closed");return e.addEventListener("shown.bs.tooltip",n),e.addEventListener("hidden.bs.tooltip",l),t.setAttribute("b-att-state","closed"),{destroy:()=>{e.removeEventListener("shown.bs.tooltip",n),e.removeEventListener("hidden.bs.tooltip",l),a.dispose()}}}d.register("tooltip",{type:"owl",mount:Uu});S();function Pu(t){t.classList.add("btn",t.getAttribute("b-att-variant")==="outline"?"btn-outline-secondary":"btn-light"),t.setAttribute("aria-pressed",t.getAttribute("aria-pressed")||"false");let e=()=>{let s=t.getAttribute("aria-pressed")!=="true";t.setAttribute("aria-pressed",String(s)),t.setAttribute("b-att-state",s?"on":"off"),t.dispatchEvent(new CustomEvent("baseui:change",{bubbles:!0,detail:{pressed:s}}))};return t.addEventListener("click",e),{destroy:()=>t.removeEventListener("click",e)}}d.register("toggle",{type:"owl",mount:Pu});S();function Mu(t){let e=[...t.querySelectorAll("[b-att-value], button")],s=t.getAttribute("b-att-multiple")==="true";t.classList.add("btn-group"),t.setAttribute("role",s?"group":"radiogroup"),e.forEach(a=>{a.classList.add("btn","btn-outline-secondary"),a.setAttribute("aria-pressed",a.getAttribute("aria-pressed")||"false")});let o=a=>{let n=a.target.closest("button, [b-att-value]");if(!n||!t.contains(n))return;s||e.forEach(u=>u.setAttribute("aria-pressed","false")),n.setAttribute("aria-pressed",String(n.getAttribute("aria-pressed")!=="true"));let l=e.filter(u=>u.getAttribute("aria-pressed")==="true").map(u=>u.getAttribute("b-att-value")||u.textContent.trim());t.dispatchEvent(new CustomEvent("baseui:change",{bubbles:!0,detail:{value:s?l:l[0]}}))};return t.addEventListener("click",o),{destroy:()=>t.removeEventListener("click",o)}}d.register("toggle-group",{type:"owl",mount:Mu});S();var hn={lead:"lead",muted:"text-body-secondary",code:"b-code",kbd:"b-kbd",h1:"h1",h2:"h2",h3:"h3",h4:"h4",blockquote:"blockquote",small:"small",list:"b-list"};function _u(t){let e=hn[t.getAttribute("b-att-variant")||"body"];return t.classList.add("b-typography"),e&&t.classList.add(e),{destroy:()=>t.classList.remove("b-typography",...Object.values(hn))}}d.register("typography",{type:"static",mount:_u});w();sa(Wi);Yi(ta);Qi();var pC=d;export{go as Accordion,yo as AccordionContent,vo as AccordionItem,ke as AccordionTrigger,ct as Alert,ps as AlertAction,At as AlertDescription,Ps as AlertDialog,ve as AlertDialogAction,ge as AlertDialogCancel,Ms as AlertDialogContent,Fs as AlertDialogDescription,zs as AlertDialogFooter,_s as AlertDialogHeader,Ds as AlertDialogMedia,js as AlertDialogTitle,fe as AlertDialogTrigger,ls as AlertTitle,xt as ApiDoc,wt as ApiDocGroup,An as App,pr as AspectRatio,Jo as Attachment,Ke as AttachmentAction,er as AttachmentActions,Yo as AttachmentContent,tr as AttachmentDescription,or as AttachmentDropzone,sr as AttachmentGroup,Xo as AttachmentMedia,Qo as AttachmentTitle,Ve as AttachmentTrigger,rr as Avatar,Q as Badge,d as BaseUI,Wi as BaseUIComponents,La as BaseUITheme,ts as BlockViewer,Wt as Breadcrumb,Ne as BreadcrumbEllipsis,Vt as BreadcrumbItem,Zt as BreadcrumbLink,Kt as BreadcrumbList,Gt as BreadcrumbPage,ht as BreadcrumbSeparator,ur as Bubble,x as Button,hr as ButtonGroup,mr as ButtonGroupSeparator,fr as ButtonGroupText,Fe as Calendar,us as Card,bs as CardBody,fs as CardDescription,hs as CardFooter,ds as CardHeader,ms as CardTitle,Ko as Carousel,We as CarouselNext,He as CarouselPrevious,Vo as CarouselSlide,Wo as Chart,_t as Checkbox,nt as ClipboardButton,de as CodeEditor,xo as Collapsible,wo as CollapsibleContent,Le as CollapsibleTrigger,Fo as Combobox,Ho as Command,c as Component,bo as ContextMenu,mo as ContextMenuContent,fo as ContextMenuItem,ho as ContextMenuTrigger,je as DataTable,jo as DatePicker,It as Dialog,be as DialogClose,pt as DialogContent,qt as DialogDescription,Rt as DialogFooter,Tt as DialogHeader,$t as DialogTitle,gs as DialogTrigger,dr as Direction,Hs as Drawer,xe as DrawerClose,Ws as DrawerContent,Gs as DrawerDescription,Vs as DrawerFooter,Ks as DrawerHeader,Zs as DrawerTitle,ye as DrawerTrigger,zt as DropdownMenu,Ee as DropdownMenuCheckboxItem,Dt as DropdownMenuContent,no as DropdownMenuGroup,jt as DropdownMenuItem,co as DropdownMenuLabel,lo as DropdownMenuRadioGroup,Ce as DropdownMenuRadioItem,po as DropdownMenuSeparator,uo as DropdownMenuShortcut,Ft as DropdownMenuSub,Ht as DropdownMenuSubContent,dt as DropdownMenuSubTrigger,ut as DropdownMenuTrigger,vs as Empty,As as EmptyContent,Ss as EmptyDescription,ys as EmptyHeader,xs as EmptyMedia,ws as EmptyTitle,En as EventBus,ee as Field,yr as FieldContent,oe as FieldDescription,re as FieldError,te as FieldGroup,se as FieldLabel,vr as FieldLegend,wr as FieldSeparator,gr as FieldSet,xr as FieldTitle,os as Form,ro as HoverCard,ao as HoverCardContent,io as HoverCardTrigger,R as Icon,kt as Input,Bs as InputOtp,br as Item,Et as Kbd,Sr as Label,yt as Markdown,Qe as MarkdownTree,Vr as MarkdownTreeNode,ks as Marker,ko as Menubar,ir as Message,ar as MessageScroller,Mt as NativeSelect,Eo as NavigationMenu,Co as NavigationMenuItem,Cn as OwlError,So as Pagination,Ao as PaginationItem,so as Popover,oo as PopoverContent,Ae as PopoverTrigger,lr as Progress,Lr as Pwa,Tr as PwaBody,ss as PwaClose,Nr as PwaContent,Ir as PwaDescription,$r as PwaFooter,Or as PwaHeader,Rr as PwaSteps,Br as PwaTitle,es as PwaTrigger,nr as Questionnaire,Ge as QuestionnaireNext,Ze as QuestionnairePrevious,cr as QuestionnaireStep,Ls as RadioGroup,Ns as RadioGroupItem,Zo as Resizable,Go as ScrollArea,Ts as Select,Rs as SelectContent,$s as SelectItem,me as SelectTrigger,Es as Separator,Js as Sheet,Se as SheetClose,Xs as SheetContent,eo as SheetDescription,Qs as SheetFooter,Ys as SheetHeader,to as SheetTitle,we as SheetTrigger,Ue as Shell,Me as ShellContent,zo as ShellHeader,_o as ShellMain,Mo as ShellNav,Pe as ShellSidebar,Po as ShellSidebarHeader,_e as ShellUserMenu,ft as Sidebar,Ie as SidebarClose,Jt as SidebarContent,No as SidebarFooter,Xt as SidebarGroup,Te as SidebarGroupAction,Re as SidebarGroupCollapsible,To as SidebarGroupContent,Yt as SidebarGroupLabel,Lo as SidebarHeader,Bo as SidebarInput,Oo as SidebarInset,gt as SidebarMenu,$e as SidebarMenuAction,$o as SidebarMenuBadge,mt as SidebarMenuButton,Qt as SidebarMenuItem,qo as SidebarMenuSkeleton,Ro as SidebarMenuSub,qe as SidebarMenuSubButton,Uo as SidebarMenuSubItem,jr as SidebarProvider,Be as SidebarRail,Io as SidebarSeparator,Oe as SidebarTrigger,Ut as Skeleton,Os as Slider,Ct as Spinner,he as Switch,Bt as TabContent,lt as TabTrigger,Do as Table,Lt as Tabs,Nt as TabsContainer,Ot as TabsList,qr as TextEditor,Pt as Textarea,vt as ThemeButton,bt as Toast,Je as Toggle,Er as ToggleGroup,Xe as ToggleGroupItem,at as Tooltip,Cs as Typography,kn as __info__,Ln as batched,Nn as blockDom,h as cn,as as createNamedIcon,ie as createThemeController,pC as default,Fi as findMarkdownTreeNode,On as htmlEscape,Ca as iconComponentName,ce as loadFile,Zu as loadTemplate,Bn as markRaw,wi as markup,H as mergeStyle,is as mount,Ii as normalizeTheme,In as onError,T as onMounted,P as onPatched,Tn as onRendered,le as onWillDestroy,Rn as onWillPatch,$n as onWillRender,ot as onWillStart,q as onWillUnmount,j as onWillUpdateProps,Ku as rawMount,Vu as rawXml,qn as reactive,sa as registerGlobalComponents,Un as status,Pn as toRaw,L as useChildSubEnv,Mn as useComponent,Y as useEffect,_n as useEnv,rs as useExternalListener,A as useRef,y as useState,zn as useSubEnv,Dn as validate,jn as validateType,Fn as whenReady,ra as xml};
|