@thebase/ui 1.1.7 → 1.2.1
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 +70 -1
- package/README.md +22 -4
- package/bin/create-baseui-app.mjs +28 -2
- package/dist/baseui.apidoc.esm.js +64 -64
- package/dist/baseui.apidoc.min.js +64 -64
- package/dist/baseui.esm.js +42 -61
- package/dist/baseui.i18n.esm.js +2 -0
- package/dist/baseui.i18n.min.js +2 -0
- package/dist/baseui.icons.esm.js +1 -1
- package/dist/baseui.min.css +2 -2
- package/dist/baseui.min.js +61 -61
- package/dist/baseui.pwa.esm.js +71 -9
- package/dist/baseui.registry.json +13 -9
- package/dist/baseui.templates.xml +311 -311
- package/dist/baseui.vite.esm.js +116 -0
- package/dist/runtime/lazy/apidoc.logic.js +20 -0
- 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 +80 -1
- package/dist/themes/baseui-dark.min.css +1 -0
- package/dist/themes/baseui-light.css +81 -1
- package/dist/themes/baseui-light.min.css +1 -0
- package/dist/types/i18n.d.ts +25 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/pwa.d.ts +1 -45
- package/dist/types/vite.d.ts +4 -0
- package/docs/analytics.md +3 -3
- package/docs/base-ui-skill.md +54 -0
- package/docs/blocks.md +1 -1
- package/docs/components/accordion.md +4 -4
- package/docs/components/apidoc.md +1 -1
- package/docs/components/block-viewer.md +1 -1
- package/docs/components/breadcrumb.md +1 -1
- package/docs/components/button.md +1 -1
- package/docs/components/code-editor.md +1 -1
- package/docs/components/data-table.md +2 -2
- package/docs/components/dialog.md +5 -5
- package/docs/components/form.md +29 -29
- package/docs/components/input.md +1 -1
- package/docs/components/markdown.md +1 -1
- package/docs/components/pwa.md +1 -1
- package/docs/components/shell.md +2 -2
- package/docs/components/sidebar.md +16 -16
- package/docs/components/text-editor.md +1 -1
- package/docs/components/theme-button.md +1 -1
- package/docs/components/toast.md +10 -10
- package/docs/components/typography.md +21 -2
- package/docs/i18n.md +119 -0
- package/docs/icons.md +1 -1
- package/docs/installation.md +3 -2
- package/docs/owl-components.md +1 -1
- package/docs/registry.md +1 -0
- package/docs/runtime-api.md +5 -3
- package/docs/theming.md +33 -3
- package/docs/usage-guide.md +23 -6
- package/package.json +13 -1
package/dist/baseui.min.js
CHANGED
|
@@ -7,71 +7,71 @@
|
|
|
7
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
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
9
|
|
|
10
|
-
var BaseUIBundle=(()=>{var pc=Object.create;var Hs=Object.defineProperty;var uc=Object.getOwnPropertyDescriptor;var dc=Object.getOwnPropertyNames;var hc=Object.getPrototypeOf,bc=Object.prototype.hasOwnProperty;var mc=(e,o,r)=>o in e?Hs(e,o,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[o]=r;var on=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(o,r)=>(typeof require<"u"?require:o)[r]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var le=(e,o,r)=>()=>{if(r)throw r[0];try{return e&&(o=e(e=0)),o}catch(s){throw r=[s],s}};var Dn=(e,o)=>{for(var r in o)Hs(e,r,{get:o[r],enumerable:!0})},Ca=(e,o,r,s)=>{if(o&&typeof o=="object"||typeof o=="function")for(let n of dc(o))!bc.call(e,n)&&n!==r&&Hs(e,n,{get:()=>o[n],enumerable:!(s=uc(o,n))||s.enumerable});return e};var rn=(e,o,r)=>(r=e!=null?pc(hc(e)):{},Ca(o||!e||!e.__esModule?Hs(r,"default",{value:e,enumerable:!0}):r,e)),fc=e=>Ca(Hs({},"__esModule",{value:!0}),e);var a=(e,o,r)=>mc(e,typeof o!="symbol"?o+"":o,r);function Ic(e){return typeof e=="string"?document.querySelector(e):e instanceof Element?e:null}function $n(e,o,r={}){e.dispatchEvent(new CustomEvent(o,{bubbles:!0,detail:r}))}function yc(e,o={}){return e.hasAttribute("b-icon")?"icon":o.name||e.getAttribute("b-ui")}function vc(e,o){return o===document||o===e||o.contains(e)}function wc(e,o={}){return!o.allowBootstrapControl&&e.matches(xc)}function Aa(e){return b.version=e,b}function ka(){if(typeof MutationObserver>"u")return;let e=new MutationObserver(o=>{for(let r of o)for(let s of r.addedNodes)s instanceof Element&&b.mountAll(s)});return e.observe(document.documentElement,{childList:!0,subtree:!0}),e}function La(){typeof document>"u"||(document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>{b.mountAll(),ka()},{once:!0}):(b.mountAll(),ka()))}var gc,Fn,js,sn,xc,zn,b,A=le(()=>{gc="__BASEUI_VERSION__",Fn=new Map,js=new WeakMap,sn="[b-ui], [b-icon]",xc="[data-bs-toggle], [data-bs-target], [data-bs-dismiss]";zn=typeof window<"u"?window.thebase:void 0,b=zn?.register?zn:Object.assign(zn||{},{version:gc,register(e,o){if(!e||!o)throw new Error("BaseUI.register requires a name and component definition.");return Fn.set(e,o),this},component(e){return Fn.get(e)},mount(e,o={}){let r=Ic(e);if(!r||wc(r,o))return null;let s=yc(r,o),n=Fn.get(s);if(!n)return null;let c=js.get(r);if(c?.name===s)return c;c&&(c.destroy?.(),js.delete(r),$n(r,"baseui:destroyed",{name:c.name}));let p=n.mount?.(r,this,o)||{},u={name:s,element:r,destroy:p.destroy};return js.set(r,u),$n(r,"baseui:mounted",{name:s,instance:u}),u},mountAll(e=document){let o=e||document,r=[...o.querySelectorAll?.(sn)||[]];return o instanceof Element&&o.matches(sn)&&r.unshift(o),r.map(s=>this.mount(s)).filter(Boolean)},destroy(e=document){let o=e||document,r=[...o.querySelectorAll?.(sn)||[]];o instanceof Element&&o.matches(sn)&&r.unshift(o);for(let s of r){let n=js.get(s);n&&vc(s,o)&&(n.destroy?.(),js.delete(s),$n(s,"baseui:destroyed",{name:n.name}))}},theme:{set(e){let o=document.documentElement;if(typeof e=="string"){o.setAttribute("b-theme",e),o.dataset.bsTheme=e;return}for(let[r,s]of Object.entries(e||{})){let n=r==="radius"||r==="--b-radius"?"--base-radius":r.startsWith("--")?r:`--b-${r}`;o.style.setProperty(n,s)}}}});typeof window<"u"&&(window.thebase=b,window.BaseUI=b)});function f(...e){let o=[];for(let r of e)if(r){if(typeof r=="string")o.push(r);else if(Array.isArray(r)){let s=f(...r);s&&o.push(s)}else if(typeof r=="object")for(let[s,n]of Object.entries(r))n&&o.push(s)}return o.join(" ")}function i(e){return{type:e,optional:!0}}function X(e,o,r){return e[o]??(r?e[r]:void 0)}function _(e){return e===!0||e==="open"||e==="on"||e==="active"}function K(...e){let o=[];for(let r of e)if(r){if(typeof r=="string"){let s=r.trim().replace(/;$/,"");s&&o.push(s)}else if(typeof r=="object")for(let[s,n]of Object.entries(r)){if(n==null||n==="")continue;let c=s.replace(/[A-Z]/g,p=>"-"+p.toLowerCase());o.push(`${c}:${n}`)}}return o.join(";")}function z(e){return e.state!==void 0?_(e.state):e.open!==void 0?e.open:e["default-open"]!==void 0?e["default-open"]:e.defaultOpen??!1}function oo(e){return e.state!==void 0||e.open!==void 0}var d,v=le(()=>{d={className:i(String),style:i([String,Object]),slots:i(Object)}});var R,Ba,Ta,qa,Oa,Ra,Pa,Na,Ma,pe,Ua,nn,Hn,Da,P,$,Fa,ue,$a,za,st,M,H,Ha,ja,_a,q,Wa,et,Va,ro,L,w,Ka,Ga,Xa,Za,an,jn=le(()=>{R=globalThis.owl;if(!R)throw new Error("BaseUI: load dist/baseui.min.js or dist/baseui.esm.js before this script (globalThis.owl is not set).");Ba=R.App,Ta=R.Component,qa=R.EventBus,Oa=R.OwlError,Ra=R.__info__,Pa=R.batched,Na=R.blockDom,Ma=R.htmlEscape,pe=R.loadFile,Ua=R.markRaw,nn=R.markup,Hn=R.mount,Da=R.onError,P=R.onMounted,$=R.onPatched,Fa=R.onRendered,ue=R.onWillDestroy,$a=R.onWillPatch,za=R.onWillRender,st=R.onWillStart,M=R.onWillUnmount,H=R.onWillUpdateProps,Ha=R.reactive,ja=R.status,_a=R.toRaw,q=R.useChildSubEnv,Wa=R.useComponent,et=R.useEffect,Va=R.useEnv,ro=R.useExternalListener,L=R.useRef,w=R.useState,Ka=R.useSubEnv,Ga=R.validate,Xa=R.validateType,Za=R.whenReady,an=R.xml});function _n(e){Object.assign(_s,e)}function Ac(e){let o=e.components;o?o!==_s&&Object.getPrototypeOf(o)===Object.prototype&&Object.setPrototypeOf(o,_s):e.components=Object.create(_s)}function Ja(e){return typeof e!="string"||!/\st-(att|attf|model)([.\s=-]|$)/.test(e)?e:e.replace(/<([A-Z][\w.:-]*)(\s[^<>]*?)?(\/?)>/g,(o,r,s="",n="")=>`<${r}${Lc(r,s)}${n}>`)}function Lc(e,o){let r=/\st-(att|attf|model|on)([.\s=-]|$)/.test(o),s=o.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,(n,c,p,u,h)=>`${c}${p}=${u}${qc(h)}${u}`);return s=s.replace(/(\s)t-model((?:\.[\w-]+)*)\s*=\s*(["'])(.*?)\3/g,(n,c,p,u,h)=>Oc(e,c,p,u,h,s)),r?Ec(s):s}function Ec(e){return e.replace(/(\s)([A-Za-z_][\w:.-]*)\s*=\s*(["'])(.*?)\3/g,(o,r,s,n,c)=>s.startsWith("t-")||s==="t-props"||Tc(c)?o:`${r}${s}=${n}${Bc(c)}${n}`)}function Bc(e){return`'${e.replace(/\\/g,"\\\\").replace(/'/g,"\\'")}'`}function Tc(e){let o=e.trim();return!o||/^(['"`[{(]|-?\d+(?:\.\d+)?$)/.test(o)||/[?.()[\]+*/]|=>|===|!==|&&|\|\|/.test(o)||/^(true|false|null|undefined)$/.test(o)}function qc(e){return`\`${e.replace(/`/g,"\\`").replace(/{{\s*([\s\S]*?)\s*}}|#\{\s*([\s\S]*?)\s*\}/g,(o,r,s)=>`\${${r||s}}`)}\``}function Oc(e,o,r,s,n,c){let p=/^(Checkbox|Switch)$/.test(e),u=Rc(e,r),h=p?"checked":"value",m=new RegExp(`\\s${h}\\s*=`).test(c)?"":`${o}${h}=${s}${n}${s}`,g=new RegExp(`\\s${u}\\s*=`).test(c)?"":`${o}${u}=${s}${Pc(n,r,p)}${s}`;return`${m}${g}`}function Rc(e,o){return o.includes(".lazy")?"onChange":/^(Input|Textarea)$/.test(e)?"onInput":"onChange"}function Pc(e,o,r){if(r)return`(value) => { ${e} = value; }`;let s="value";return o.includes(".trim")&&(s=`(typeof ${s} === 'string' ? ${s}.trim() : ${s})`),o.includes(".number")&&(s=`Number.isNaN(Number(${s})) ? ${s} : Number(${s})`),`(value) => { ${e} = ${s}; }`}function Wn(e,...o){return Array.isArray(e?.raw)?an({raw:e.raw.map(Ja)},...o):an(e,...o)}function so(e,o,r={}){let s=Ja(r.templates);return e.components={..._s,...e.components||{}},Hn(e,o,s===r.templates?r:{...r,templates:s})}async function Nc(e){let o=await(await fetch(e,{cache:"reload"})).text(),s=new DOMParser().parseFromString(o,"application/xml").querySelector("templates > t[t-name]");return s?s.innerHTML:o}var Cc,kc,_s,l,C=le(()=>{jn();jn();Cc=Hn,kc=an,_s={};l=class extends Ta{constructor(...o){super(...o),Ac(this.constructor)}}});function Dc(e){return typeof Image>"u"?Promise.resolve(!0):(Vn.has(e)||Vn.set(e,new Promise(o=>{let r=new Image;r.onload=()=>o(!0),r.onerror=()=>o(!1),r.src=e})),Vn.get(e))}function cn(e){return String(e||"").trim().replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase()}function Ws(e,o={}){let r=cn(e);if(!Uc.test(r))throw new Error(`BaseUI icon name is invalid: ${e}`);return`${String(o.baseUrl||b.icons.lucide.cdnBaseUrl).replace(/\/+$/,"")}/${r}.svg`}function j(e,o,r={}){let s=r.url||Ws(o,r),n=r.label??e.getAttribute("aria-label")??"";e.classList.add("bu-icon"),e.style.setProperty("--b-icon-url",`url("${s.replace(/"/g,"%22")}")`),(r.size||e.getAttribute("b-att-size"))&&e.style.setProperty("--b-icon-size",r.size||e.getAttribute("b-att-size")),n?(e.setAttribute("role","img"),e.setAttribute("aria-label",n)):e.setAttribute("aria-hidden","true");let c=r.fallback===!1?null:r.fallback||ln;return c&&!r.url&&cn(o)!==cn(c)&&Dc(s).then(p=>{if(p||!e.isConnected)return;let u=Ws(c,r);e.style.setProperty("--b-icon-url",`url("${u.replace(/"/g,"%22")}")`)}),e}var Qa,Mc,ln,Uc,Vn,lt=le(()=>{A();Qa="1.31.0",Mc=`https://cdn.jsdelivr.net/npm/lucide-static@${Qa}/icons`,ln="file",Uc=/^[a-z0-9][a-z0-9-]*$/,Vn=new Map;b.icons={...b.icons||{},lucide:{version:Qa,cdnBaseUrl:Mc,normalizeName:cn,url:Ws,render:j}}});var G,Z,qs=le(()=>{G={default:"btn-primary",secondary:"btn-secondary",destructive:"btn-danger",outline:"btn-outline-secondary",ghost:"btn-light",link:"btn-link"},Z={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 pn({variant:e="default",size:o,className:r}={}){return f("btn","bu-button","bu-clipboard-button",G[e]||G.default,Z[o],r)}async function Os(e){let o=String(e??"");if(globalThis.navigator?.clipboard?.writeText)try{await globalThis.navigator.clipboard.writeText(o);return}catch{}if(typeof document>"u")throw new Error("BaseUI ClipboardButton: no clipboard API available in this environment.");let r=document.createElement("textarea");r.value=o,r.setAttribute("readonly",""),r.style.position="fixed",r.style.opacity="0",r.style.pointerEvents="none",document.body.append(r),r.select(),r.setSelectionRange(0,o.length);let s;try{s=document.execCommand("copy")}catch{s=!1}if(r.remove(),!s)throw new Error("BaseUI ClipboardButton: clipboard copy is unavailable in this browser/context.")}var Kn,un=le(()=>{v();qs();Kn=["btn","bu-button","bu-clipboard-button",...Object.values(G),...Object.values(Z)]});var Li={};Dn(Li,{destroyBaseUiPreviews:()=>Ds,enhanceMarkdownDiagrams:()=>Zs,expandSelfClosingTags:()=>Yl,extractTagCaseMap:()=>Dl,mountMarkdownEditor:()=>Js,normalizeOwlPreviewMarkup:()=>ep,parseMarkdown:()=>Xs,primeBaseUiTemplates:()=>op,renderBaseUiBlocks:()=>Ai,renderMermaidBlocks:()=>Ci});function Ol(){return ea??(ea=import("./runtime/marked/marked.min.js").then(e=>{let o=e.marked||e.default?.marked||globalThis.marked;if(!o?.parse)throw new Error("BaseUI markdown: failed to load src/runtime/marked/marked.min.js");return o})),ea}function Rl(e){let o=e.closest("[data-bs-theme]")?.getAttribute("data-bs-theme")||document.documentElement.getAttribute("data-bs-theme");return(o?o==="dark":window.matchMedia?.("(prefers-color-scheme: dark)").matches)?"dark":"default"}function Pl(){return oa??(oa=import("./runtime/mermaid/mermaid.esm.min.mjs").then(e=>{let o=e.default||e;return o.initialize({startOnLoad:!1,securityLevel:"strict"}),o})),oa}function Nl(){return ra??(ra=import("./runtime/milkdown/milkdown-editor.js")),ra}async function Xs(e,o={}){return(await Ol()).parse(String(e??""),{gfm:!0,breaks:!1,...o})}function na(e,o,r,s=""){e.classList.add("bu-markdown-diagram-error"),e.replaceChildren();let n=document.createElement("p");if(n.className="bu-markdown-diagram-error-message",n.textContent=`Unable to render ${o} diagram: ${r?.message||r}`,e.append(n),s){let c=document.createElement("pre"),p=document.createElement("code");p.textContent=s,c.append(p),e.append(c)}}async function Ci(e){let o=[...e.querySelectorAll("pre > code.language-mermaid")];if(!o.length)return;let r;try{r=await Pl()}catch(s){o.forEach(n=>{let c=n.closest("pre");c.replaceChildren(),c.className="bu-markdown-diagram bu-markdown-mermaid",na(c,"mermaid",s,n.textContent)});return}r.initialize({startOnLoad:!1,securityLevel:"strict",theme:Rl(e)});for(let s of o){let n=s.textContent,c=s.closest("pre");c.replaceChildren(),c.className="bu-markdown-diagram bu-markdown-mermaid";try{let{svg:p}=await r.render(`bu-mermaid-${++ql}`,n);c.innerHTML=p}catch(p){na(c,"mermaid",p,n)}}}function Ml(e){let o=globalThis.thebase;if(!o?.mountAll)return;let r=document.createElement("div");r.setAttribute("b-ui","toast"),r.setAttribute("b-att-state","open"),r.setAttribute("b-att-delay","2000"),r.className="bu-markdown-bu-copy-toast",r.textContent=e,document.body.append(r),o.mountAll(r),r.addEventListener("baseui:close",()=>r.remove(),{once:!0})}function Ul(e){let o=document.createElement("div");o.className="bu-markdown-bu-code";let r=document.createElement("button");r.type="button",r.className="bu-markdown-bu-copy";let s=document.createElement("span");j(s,"copy",{label:"Copy code"}),r.append(s),r.addEventListener("click",async()=>{try{await Os(e),r.dispatchEvent(new CustomEvent("baseui:markdown-copy",{bubbles:!0,detail:{source:e}})),Ml("Copied to clipboard")}catch(p){r.dispatchEvent(new CustomEvent("baseui:markdown-copy-error",{bubbles:!0,detail:{error:p}}))}}),o.append(r);let n=document.createElement("pre"),c=document.createElement("code");c.className="bu-markdown-bu-code-lines";for(let p of e.replace(/\n$/,"").split(`
|
|
11
|
-
`)){let u=document.createElement("span");u.className="bu-markdown-bu-code-line",u.textContent=p,c.append(u)}return n.append(c),o.append(n),o}function yi(e){return e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}function Dl(e){let o=new Map;for(let r of e.matchAll(/<\/?([A-Z][A-Za-z0-9]*)\b/g))o.set(r[1].toLowerCase(),r[1]);return o}function Fl(e){return o=>{if(o.hasAttribute("b-ui"))return o;let r=globalThis.thebase,s=e.get(o.localName)||o.localName,n=yi(s),c=!!r?.component?.(n),p=F(o.getAttribute("className")||o.getAttribute("class"));if(!c){let u=`bu-${n}`;return o.className=p?`${u} ${p}`:u,o}o.setAttribute("b-ui",n),p&&(o.className=p);for(let u of[...o.attributes]){if(u.name==="class"||u.name==="className"||u.name==="b-ui"||/^on[A-Z]/.test(u.name))continue;let h=F(u.value);o.removeAttribute(u.name),!(h===""||h==="false")&&o.setAttribute(`b-att-${yi(u.name)}`,h==="true"?"true":h)}return o}}function F(e){if(!e)return"";let o=e.trim();return o.startsWith("'")&&o.endsWith("'")||o.startsWith('"')&&o.endsWith('"')?o.slice(1,-1):o}function Sn(e,o){for(;e.firstChild;)o.append(e.firstChild)}function it(e,o){return Sn(e,o),e.replaceWith(o),o}function $l(e){let o=document.createElement("div");o.setAttribute("b-field-group","");let r=F(e.getAttribute("className")||e.getAttribute("class"));return r&&(o.className=r),it(e,o)}function zl(e){let o=document.createElement("div");o.setAttribute("b-ui","field");let r=F(e.getAttribute("orientation")||""),s=F(e.getAttribute("className")||e.getAttribute("class"));return r&&o.setAttribute("b-att-orientation",r),s&&(o.className=s),it(e,o)}function Hl(e){let o=document.createElement("label");o.setAttribute("b-field-label","");let r=F(e.getAttribute("for")||""),s=F(e.getAttribute("className")||e.getAttribute("class"));return r&&o.setAttribute("for",r),s&&(o.className=s),it(e,o)}function vi(e,o,r){let s=document.createElement(o);s.setAttribute(r,"");let n=F(e.getAttribute("className")||e.getAttribute("class"));return n&&(s.className=n),it(e,s)}function jl(e){let o=e.getAttribute("type")||"",r=e.hasAttribute("variant")||e.hasAttribute("size")||e.hasAttribute("className")||e.hasAttribute("onClick")||e.hasAttribute("label")||o.trim().startsWith("'")||o.trim().startsWith('"');if(e.hasAttribute("b-ui")||!r)return e;let s=document.createElement("button");s.setAttribute("b-ui","button");let n=F(o||"button"),c=F(e.getAttribute("variant")||""),p=F(e.getAttribute("size")||""),u=F(e.getAttribute("className")||e.getAttribute("class")),h=F(e.getAttribute("label")||"");return s.type=n||"button",c&&s.setAttribute("b-att-variant",c),p&&s.setAttribute("b-att-size",p),u&&(s.className=u),h&&!e.childNodes.length&&(s.textContent=h),it(e,s)}function _l(e){if(e.hasAttribute("b-ui")||e.hasAttribute("b-icon"))return e;let o=F(e.getAttribute("name")||e.getAttribute("icon")||"");if(!o)return e;let r=document.createElement("span");r.setAttribute("b-ui","icon"),r.setAttribute("b-att-icon",o);let s=F(e.getAttribute("size")||""),n=F(e.getAttribute("label")||""),c=F(e.getAttribute("className")||e.getAttribute("class"));return s&&r.setAttribute("b-att-size",s),n&&r.setAttribute("b-att-label",n),c&&(r.className=c),it(e,r)}function Wl(e){if(e.hasAttribute("b-ui"))return e;let o=document.createElement("div");o.setAttribute("b-ui","alert");let r=F(e.getAttribute("variant")||""),s=F(e.getAttribute("className")||e.getAttribute("class"));return r&&o.setAttribute("b-att-variant",r),s&&(o.className=s),it(e,o)}function sa(e){return o=>{if(o.hasAttribute("b-ui"))return o;let r=document.createElement("div"),s=F(o.getAttribute("className")||o.getAttribute("class"));return r.className=s?`${e} ${s}`:e,it(o,r)}}function Vl(e){if(e.hasAttribute("b-ui"))return e;let o=document.createElement("div");o.setAttribute("b-ui","accordion"),F(e.getAttribute("multiple"))==="true"&&o.setAttribute("b-att-multiple","true");let r=F(e.getAttribute("className")||e.getAttribute("class"));return r&&(o.className=r),it(e,o)}function Kl(e){if(e.hasAttribute("b-accordion-item"))return e;let o=document.createElement("div");o.setAttribute("b-accordion-item",""),F(e.getAttribute("state"))==="open"&&o.setAttribute("b-att-state","open");let r=F(e.getAttribute("className")||e.getAttribute("class"));return r&&(o.className=r),it(e,o)}function Gl(e){if(e.hasAttribute("b-accordion-trigger"))return e;let o=document.createElement("button");o.type="button",o.setAttribute("b-accordion-trigger","");let r=F(e.getAttribute("className")||e.getAttribute("class"));r&&(o.className=r),Sn(e,o);let s=document.createElement("span");return s.setAttribute("b-icon","chevron-down"),s.className="bu-accordion-trigger-icon",o.append(s),e.replaceWith(o),o}function Xl(e){if(e.hasAttribute("b-accordion-panel"))return e;let o=document.createElement("div");o.setAttribute("b-accordion-panel","");let r=F(e.getAttribute("className")||e.getAttribute("class"));return r&&(o.className=r),it(e,o)}function Zl(e){return wi+=1,`${e}-${wi}`}function at(e,o,r){return s=>{if(s.hasAttribute("b-ui"))return s;let n=document.createElement(e);e==="button"&&(n.type="button"),r&&n.setAttribute(r,"");let c=F(s.getAttribute("className")||s.getAttribute("class"));return n.className=c?`${o} ${c}`:o,it(s,n)}}function Jl(){let e=document.createElement("button");e.type="button",e.className="btn bu-button btn-light btn-icon-sm bu-dialog-close bu-dialog-close-control",e.setAttribute("b-dialog-close",""),e.setAttribute("aria-label","Close");let o=document.createElement("span");o.setAttribute("b-ui","icon"),o.setAttribute("b-att-icon","x");let r=document.createElement("span");return r.className="visually-hidden",r.textContent="Close",e.append(o,r),e}function Si({tagPrefix:e,componentName:o,triggerTag:r,triggerClassName:s,panelClassName:n,closeButton:c}){return p=>{if(p.hasAttribute("b-ui"))return p;let u=p.querySelector(`:scope > ${e}trigger`),h=p.querySelector(`:scope > ${e}content`);if(!h)return p;let m=Zl(`bu-preview-${o}`),g=document.createElement(r);r==="button"&&(g.type="button"),g.className=s,g.setAttribute("b-att-trigger",`#${m}`),u&&Sn(u,g);let x=document.createElement("div");x.setAttribute("b-ui",o),x.id=m,x.setAttribute("b-att-trigger",`[b-att-trigger='#${m}']`);let y=document.createElement("div");y.className=n;let E=F(h.getAttribute("size")||"");return E&&y.setAttribute("data-size",E),Sn(h,y),c&&y.append(c()),x.append(y),p.before(g,x),p.remove(),x}}function Yl(e){return e.replace(/<([a-zA-Z][a-zA-Z0-9-]*)((?:"[^"]*"|'[^']*'|[^"'>])*?)\/>/g,(o,r,s)=>Ql.has(r.toLowerCase())?o:`<${r}${s}></${r}>`)}function tp(e){e.querySelectorAll("t[t-esc]").forEach(o=>{let s=o.getAttribute("t-esc")?.includes(".length")?"0":"";o.replaceWith(document.createTextNode(`${s}${o.textContent||""}`))})}function ep(e,o){tp(e);let r={fieldgroup:$l,field:zl,fieldlabel:Hl,fielddescription:n=>vi(n,"p","b-field-description"),fielderror:n=>vi(n,"p","b-field-error"),button:jl,icon:_l,alert:Wl,alerttitle:sa("bu-alert-title"),alertdescription:sa("bu-alert-description"),alertaction:sa("bu-alert-action"),accordion:Vl,accordionitem:Kl,accordiontrigger:Gl,accordioncontent:Xl,dialog:Si({tagPrefix:"dialog",componentName:"dialog",triggerTag:"span",triggerClassName:"bu-dialog-trigger",panelClassName:"bu-dialog-panel",closeButton:Jl}),dialogheader:at("div","bu-dialog-header"),dialogfooter:at("div","bu-dialog-footer"),dialogtitle:at("h2","bu-dialog-title"),dialogdescription:at("p","bu-dialog-description"),dialogclose:at("button","btn bu-button btn-outline-secondary bu-dialog-close","b-dialog-close"),alertdialog:Si({tagPrefix:"alertdialog",componentName:"alert-dialog",triggerTag:"button",triggerClassName:"btn bu-button btn-outline-secondary bu-alert-dialog-trigger",panelClassName:"bu-dialog-panel bu-alert-dialog-panel"}),alertdialogheader:at("div","bu-dialog-header bu-alert-dialog-header"),alertdialogfooter:at("div","bu-dialog-footer bu-alert-dialog-footer"),alertdialogmedia:at("div","bu-alert-dialog-media"),alertdialogtitle:at("h2","bu-dialog-title bu-alert-dialog-title"),alertdialogdescription:at("p","bu-dialog-description bu-alert-dialog-description"),alertdialogcancel:at("button","btn bu-button btn-outline-secondary bu-alert-dialog-cancel","b-alert-dialog-cancel"),alertdialogaction:at("button","btn bu-button btn-primary bu-alert-dialog-action","b-alert-dialog-action")},s=Fl(o);for(let n of[...e.querySelectorAll("*")]){let c=n.localName.toLowerCase();r[c]?r[c](n):o.has(c)&&s(n)}}function op(e){wn=Promise.resolve(e)}function rp(){return wn??(wn=pe("/dist/baseui.templates.xml")),wn}function Ds(e){let o=aa.get(e);if(o){aa.delete(e);for(let r of o)try{r.destroy()}catch{}}}function np(e){return new Set([...e.matchAll(sp)].map(o=>o[1]))}function cp(e){let o=new Set;for(let r of e.matchAll(ap))o.add(r[1]);for(let r of e.matchAll(ip))o.add(r[2]);return o}function lp(e){let o=Wn({raw:[e]}),r=np(e);class s extends l{setup(){this.state=w(Object.fromEntries([...r].map(c=>[c,""])))}}a(s,"template",o);for(let n of cp(e))s.prototype[n]=function(){};return s}function ki(e){e.querySelector("[data-slot='dropdown-menu'], .bu-dropdown-menu, [b-ui='dropdown-menu'], [b-dropdown-menu]")&&e.classList.add("bu-markdown-bu-preview-overlay")}async function pp(e,o){let[r,s]=await Promise.all([rp(),lp(o)]),n=await so(s,e,{templates:r});return ki(e),n}function up(e,o){let r=globalThis.thebase;if(!r?.mountAll)throw new Error("BaseUI runtime not found on the page \u2014 load dist/baseui.min.js before mounting Markdown.");e.innerHTML=o,ki(e),r.mountAll(e)}async function Ai(e){Ds(e);let o=[...e.querySelectorAll("pre > code.language-base-ui")];if(!o.length)return;let r=new Set;for(let s of o){let n=s.textContent,c=s.closest("pre");c.replaceChildren(),c.className="bu-markdown-live bu-markdown-baseui";let p=document.createElement("div");p.className="bu-markdown-bu-preview",c.append(p,Ul(n));try{/<[A-Z]/.test(n)?r.add(await pp(p,n)):up(p,n)}catch(u){na(c,"BaseUI component",u,n)}}r.size&&aa.set(e,r)}function dp(e){for(let o of e.querySelectorAll("li > input[type=checkbox]:not([aria-label])"))o.setAttribute("aria-label",o.parentElement.textContent.trim())}async function Zs(e,{mermaid:o=!0,baseUi:r=!0}={}){dp(e),o&&await Ci(e),r&&await Ai(e)}async function Js(e){return(await Nl()).createMilkdownMarkdownEditor(e)}var ea,oa,ra,ql,wi,Ql,wn,aa,sp,ap,ip,Cn=le(()=>{C();lt();un();ql=0;wi=0;Ql=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]);aa=new WeakMap;sp=/\bstate\.([A-Za-z_$][\w$]*)/g;ap=/\bthis\.([A-Za-z_$][\w$]*)\s*\(/g,ip=/\bt-on-[\w:-]+\s*=\s*(["'])([A-Za-z_$][\w$]*)\1/g});var th={};Dn(th,{Accordion:()=>dr,AccordionContent:()=>br,AccordionItem:()=>hr,AccordionTrigger:()=>Ae,Alert:()=>ut,AlertAction:()=>ao,AlertDescription:()=>At,AlertDialog:()=>Ro,AlertDialogAction:()=>xe,AlertDialogCancel:()=>ge,AlertDialogContent:()=>Po,AlertDialogDescription:()=>Fo,AlertDialogFooter:()=>Mo,AlertDialogHeader:()=>No,AlertDialogMedia:()=>Uo,AlertDialogTitle:()=>Do,AlertDialogTrigger:()=>fe,AlertTitle:()=>no,ApiDoc:()=>Ct,ApiDocGroup:()=>kt,App:()=>Ba,AspectRatio:()=>is,Attachment:()=>Kr,AttachmentAction:()=>_e,AttachmentActions:()=>Qr,AttachmentContent:()=>Xr,AttachmentDescription:()=>Jr,AttachmentDropzone:()=>ts,AttachmentGroup:()=>Yr,AttachmentMedia:()=>Gr,AttachmentTitle:()=>Zr,AttachmentTrigger:()=>We,Avatar:()=>es,Badge:()=>rt,BaseUI:()=>b,BaseUIComponents:()=>Nn,BaseUITheme:()=>ta,BlockViewer:()=>Je,Breadcrumb:()=>Gt,BreadcrumbEllipsis:()=>Ee,BreadcrumbItem:()=>Zt,BreadcrumbLink:()=>Jt,BreadcrumbList:()=>Xt,BreadcrumbPage:()=>Qt,BreadcrumbSeparator:()=>xt,Bubble:()=>cs,Button:()=>S,ButtonGroup:()=>us,ButtonGroupSeparator:()=>ds,ButtonGroupText:()=>hs,Calendar:()=>ze,Card:()=>lo,CardBody:()=>uo,CardDescription:()=>mo,CardFooter:()=>ho,CardHeader:()=>po,CardTitle:()=>bo,Carousel:()=>jr,CarouselNext:()=>je,CarouselPrevious:()=>He,CarouselSlide:()=>_r,Chart:()=>Hr,Checkbox:()=>Ht,ClipboardButton:()=>pt,CodeEditor:()=>de,Collapsible:()=>mr,CollapsibleContent:()=>fr,CollapsibleTrigger:()=>Le,Combobox:()=>$r,Command:()=>zr,Component:()=>l,ContextMenu:()=>cr,ContextMenuContent:()=>pr,ContextMenuItem:()=>ur,ContextMenuTrigger:()=>lr,DataTable:()=>$e,DatePicker:()=>Fr,Dialog:()=>Pt,DialogClose:()=>he,DialogContent:()=>bt,DialogDescription:()=>Dt,DialogFooter:()=>Mt,DialogHeader:()=>Nt,DialogTitle:()=>Ut,DialogTrigger:()=>fo,Direction:()=>ls,Drawer:()=>$o,DrawerClose:()=>ye,DrawerContent:()=>zo,DrawerDescription:()=>Wo,DrawerFooter:()=>jo,DrawerHeader:()=>Ho,DrawerTitle:()=>_o,DrawerTrigger:()=>Ie,DropdownMenu:()=>jt,DropdownMenuCheckboxItem:()=>Ce,DropdownMenuContent:()=>_t,DropdownMenuGroup:()=>rr,DropdownMenuItem:()=>Wt,DropdownMenuLabel:()=>sr,DropdownMenuRadioGroup:()=>nr,DropdownMenuRadioItem:()=>ke,DropdownMenuSeparator:()=>ar,DropdownMenuShortcut:()=>ir,DropdownMenuSub:()=>Vt,DropdownMenuSubContent:()=>Kt,DropdownMenuSubTrigger:()=>ft,DropdownMenuTrigger:()=>mt,Empty:()=>go,EmptyContent:()=>wo,EmptyDescription:()=>vo,EmptyHeader:()=>xo,EmptyMedia:()=>Io,EmptyTitle:()=>yo,EventBus:()=>qa,Field:()=>se,FieldContent:()=>fs,FieldDescription:()=>ae,FieldError:()=>ie,FieldGroup:()=>re,FieldLabel:()=>ne,FieldLegend:()=>ms,FieldSeparator:()=>xs,FieldSet:()=>bs,FieldTitle:()=>gs,Form:()=>to,HoverCard:()=>tr,HoverCardContent:()=>or,HoverCardTrigger:()=>er,Icon:()=>N,Input:()=>Bt,InputOtp:()=>Bo,Item:()=>ps,Kbd:()=>Lt,Label:()=>Is,Markdown:()=>St,MarkdownTree:()=>Ze,MarkdownTreeNode:()=>zs,Marker:()=>ko,Menubar:()=>vr,Message:()=>os,MessageScroller:()=>rs,NativeSelect:()=>zt,NavigationMenu:()=>Ir,NavigationMenuItem:()=>yr,OwlError:()=>Oa,Pagination:()=>gr,PaginationItem:()=>xr,Popover:()=>Qo,PopoverContent:()=>Yo,PopoverTrigger:()=>Se,Progress:()=>as,Pwa:()=>ws,PwaBody:()=>Ls,PwaClose:()=>Ye,PwaContent:()=>Ss,PwaDescription:()=>As,PwaFooter:()=>Bs,PwaHeader:()=>Cs,PwaSteps:()=>Es,PwaTitle:()=>ks,PwaTrigger:()=>Qe,Questionnaire:()=>ss,QuestionnaireNext:()=>Ke,QuestionnairePrevious:()=>Ve,QuestionnaireStep:()=>ns,RadioGroup:()=>Ao,RadioGroupItem:()=>Lo,Resizable:()=>Wr,ScrollArea:()=>Vr,Select:()=>To,SelectContent:()=>qo,SelectItem:()=>Oo,SelectTrigger:()=>me,Separator:()=>So,Sheet:()=>Vo,SheetClose:()=>we,SheetContent:()=>Ko,SheetDescription:()=>Jo,SheetFooter:()=>Xo,SheetHeader:()=>Go,SheetTitle:()=>Zo,SheetTrigger:()=>ve,Shell:()=>Me,ShellContent:()=>De,ShellHeader:()=>Nr,ShellMain:()=>Pr,ShellNav:()=>Rr,ShellSidebar:()=>Ue,ShellSidebarHeader:()=>Or,ShellUserMenu:()=>Fe,Sidebar:()=>yt,SidebarClose:()=>qe,SidebarContent:()=>Yt,SidebarFooter:()=>Sr,SidebarGroup:()=>te,SidebarGroupAction:()=>Oe,SidebarGroupCollapsible:()=>Re,SidebarGroupContent:()=>Lr,SidebarGroupLabel:()=>ee,SidebarHeader:()=>wr,SidebarInput:()=>kr,SidebarInset:()=>Cr,SidebarMenu:()=>vt,SidebarMenuAction:()=>Pe,SidebarMenuBadge:()=>Br,SidebarMenuButton:()=>It,SidebarMenuItem:()=>oe,SidebarMenuSkeleton:()=>Tr,SidebarMenuSub:()=>Er,SidebarMenuSubButton:()=>Ne,SidebarMenuSubItem:()=>qr,SidebarProvider:()=>Ms,SidebarRail:()=>Te,SidebarSeparator:()=>Ar,SidebarTrigger:()=>Be,Skeleton:()=>Ft,Slider:()=>Eo,Spinner:()=>Et,Switch:()=>be,TabContent:()=>Rt,TabTrigger:()=>ht,Table:()=>Mr,Tabs:()=>Tt,TabsContainer:()=>qt,TabsList:()=>Ot,TextEditor:()=>Ts,Textarea:()=>$t,ThemeButton:()=>wt,Toast:()=>gt,Toggle:()=>Ge,ToggleGroup:()=>ys,ToggleGroupItem:()=>Xe,Tooltip:()=>ct,Typography:()=>Co,__info__:()=>Ra,batched:()=>Pa,blockDom:()=>Na,cn:()=>f,createNamedIcon:()=>t,createThemeController:()=>ce,default:()=>lc,findMarkdownTreeNode:()=>qn,htmlEscape:()=>Ma,iconComponentName:()=>Yn,loadFile:()=>pe,loadTemplate:()=>Nc,markRaw:()=>Ua,markup:()=>nn,mergeStyle:()=>K,mount:()=>so,normalizeTheme:()=>yn,onError:()=>Da,onMounted:()=>P,onPatched:()=>$,onRendered:()=>Fa,onWillDestroy:()=>ue,onWillPatch:()=>$a,onWillRender:()=>za,onWillStart:()=>st,onWillUnmount:()=>M,onWillUpdateProps:()=>H,rawMount:()=>Cc,rawXml:()=>kc,reactive:()=>Ha,registerGlobalComponents:()=>_n,status:()=>ja,toRaw:()=>_a,useChildSubEnv:()=>q,useComponent:()=>Wa,useEffect:()=>et,useEnv:()=>Va,useExternalListener:()=>ro,useRef:()=>L,useState:()=>w,useSubEnv:()=>Ka,validate:()=>Ga,validateType:()=>Xa,whenReady:()=>Za,xml:()=>Wn});A();v();var Ea="1.1.7";C();var Nn={};Dn(Nn,{Accordion:()=>dr,AccordionContent:()=>br,AccordionItem:()=>hr,AccordionTrigger:()=>Ae,Alert:()=>ut,AlertAction:()=>ao,AlertDescription:()=>At,AlertDialog:()=>Ro,AlertDialogAction:()=>xe,AlertDialogCancel:()=>ge,AlertDialogContent:()=>Po,AlertDialogDescription:()=>Fo,AlertDialogFooter:()=>Mo,AlertDialogHeader:()=>No,AlertDialogMedia:()=>Uo,AlertDialogTitle:()=>Do,AlertDialogTrigger:()=>fe,AlertTitle:()=>no,ApiDoc:()=>Ct,ApiDocGroup:()=>kt,AspectRatio:()=>is,Attachment:()=>Kr,AttachmentAction:()=>_e,AttachmentActions:()=>Qr,AttachmentContent:()=>Xr,AttachmentDescription:()=>Jr,AttachmentDropzone:()=>ts,AttachmentGroup:()=>Yr,AttachmentMedia:()=>Gr,AttachmentTitle:()=>Zr,AttachmentTrigger:()=>We,Avatar:()=>es,Badge:()=>rt,BlockViewer:()=>Je,Breadcrumb:()=>Gt,BreadcrumbEllipsis:()=>Ee,BreadcrumbItem:()=>Zt,BreadcrumbLink:()=>Jt,BreadcrumbList:()=>Xt,BreadcrumbPage:()=>Qt,BreadcrumbSeparator:()=>xt,Bubble:()=>cs,Button:()=>S,ButtonGroup:()=>us,ButtonGroupSeparator:()=>ds,ButtonGroupText:()=>hs,Calendar:()=>ze,Card:()=>lo,CardBody:()=>uo,CardDescription:()=>mo,CardFooter:()=>ho,CardHeader:()=>po,CardTitle:()=>bo,Carousel:()=>jr,CarouselNext:()=>je,CarouselPrevious:()=>He,CarouselSlide:()=>_r,Chart:()=>Hr,Checkbox:()=>Ht,ClipboardButton:()=>pt,CodeEditor:()=>de,Collapsible:()=>mr,CollapsibleContent:()=>fr,CollapsibleTrigger:()=>Le,Combobox:()=>$r,Command:()=>zr,ContextMenu:()=>cr,ContextMenuContent:()=>pr,ContextMenuItem:()=>ur,ContextMenuTrigger:()=>lr,DataTable:()=>$e,DatePicker:()=>Fr,Dialog:()=>Pt,DialogClose:()=>he,DialogContent:()=>bt,DialogDescription:()=>Dt,DialogFooter:()=>Mt,DialogHeader:()=>Nt,DialogTitle:()=>Ut,DialogTrigger:()=>fo,Direction:()=>ls,Drawer:()=>$o,DrawerClose:()=>ye,DrawerContent:()=>zo,DrawerDescription:()=>Wo,DrawerFooter:()=>jo,DrawerHeader:()=>Ho,DrawerTitle:()=>_o,DrawerTrigger:()=>Ie,DropdownMenu:()=>jt,DropdownMenuCheckboxItem:()=>Ce,DropdownMenuContent:()=>_t,DropdownMenuGroup:()=>rr,DropdownMenuItem:()=>Wt,DropdownMenuLabel:()=>sr,DropdownMenuRadioGroup:()=>nr,DropdownMenuRadioItem:()=>ke,DropdownMenuSeparator:()=>ar,DropdownMenuShortcut:()=>ir,DropdownMenuSub:()=>Vt,DropdownMenuSubContent:()=>Kt,DropdownMenuSubTrigger:()=>ft,DropdownMenuTrigger:()=>mt,Empty:()=>go,EmptyContent:()=>wo,EmptyDescription:()=>vo,EmptyHeader:()=>xo,EmptyMedia:()=>Io,EmptyTitle:()=>yo,Field:()=>se,FieldContent:()=>fs,FieldDescription:()=>ae,FieldError:()=>ie,FieldGroup:()=>re,FieldLabel:()=>ne,FieldLegend:()=>ms,FieldSeparator:()=>xs,FieldSet:()=>bs,FieldTitle:()=>gs,Form:()=>to,HoverCard:()=>tr,HoverCardContent:()=>or,HoverCardTrigger:()=>er,Icon:()=>N,Input:()=>Bt,InputOtp:()=>Bo,Item:()=>ps,Kbd:()=>Lt,Label:()=>Is,Markdown:()=>St,MarkdownTree:()=>Ze,MarkdownTreeNode:()=>zs,Marker:()=>ko,Menubar:()=>vr,Message:()=>os,MessageScroller:()=>rs,NativeSelect:()=>zt,NavigationMenu:()=>Ir,NavigationMenuItem:()=>yr,Pagination:()=>gr,PaginationItem:()=>xr,Popover:()=>Qo,PopoverContent:()=>Yo,PopoverTrigger:()=>Se,Progress:()=>as,Pwa:()=>ws,PwaBody:()=>Ls,PwaClose:()=>Ye,PwaContent:()=>Ss,PwaDescription:()=>As,PwaFooter:()=>Bs,PwaHeader:()=>Cs,PwaSteps:()=>Es,PwaTitle:()=>ks,PwaTrigger:()=>Qe,Questionnaire:()=>ss,QuestionnaireNext:()=>Ke,QuestionnairePrevious:()=>Ve,QuestionnaireStep:()=>ns,RadioGroup:()=>Ao,RadioGroupItem:()=>Lo,Resizable:()=>Wr,ScrollArea:()=>Vr,Select:()=>To,SelectContent:()=>qo,SelectItem:()=>Oo,SelectTrigger:()=>me,Separator:()=>So,Sheet:()=>Vo,SheetClose:()=>we,SheetContent:()=>Ko,SheetDescription:()=>Jo,SheetFooter:()=>Xo,SheetHeader:()=>Go,SheetTitle:()=>Zo,SheetTrigger:()=>ve,Shell:()=>Me,ShellContent:()=>De,ShellHeader:()=>Nr,ShellMain:()=>Pr,ShellNav:()=>Rr,ShellSidebar:()=>Ue,ShellSidebarHeader:()=>Or,ShellUserMenu:()=>Fe,Sidebar:()=>yt,SidebarClose:()=>qe,SidebarContent:()=>Yt,SidebarFooter:()=>Sr,SidebarGroup:()=>te,SidebarGroupAction:()=>Oe,SidebarGroupCollapsible:()=>Re,SidebarGroupContent:()=>Lr,SidebarGroupLabel:()=>ee,SidebarHeader:()=>wr,SidebarInput:()=>kr,SidebarInset:()=>Cr,SidebarMenu:()=>vt,SidebarMenuAction:()=>Pe,SidebarMenuBadge:()=>Br,SidebarMenuButton:()=>It,SidebarMenuItem:()=>oe,SidebarMenuSkeleton:()=>Tr,SidebarMenuSub:()=>Er,SidebarMenuSubButton:()=>Ne,SidebarMenuSubItem:()=>qr,SidebarProvider:()=>Ms,SidebarRail:()=>Te,SidebarSeparator:()=>Ar,SidebarTrigger:()=>Be,Skeleton:()=>Ft,Slider:()=>Eo,Spinner:()=>Et,Switch:()=>be,TabContent:()=>Rt,TabTrigger:()=>ht,Table:()=>Mr,Tabs:()=>Tt,TabsContainer:()=>qt,TabsList:()=>Ot,TextEditor:()=>Ts,Textarea:()=>$t,ThemeButton:()=>wt,Toast:()=>gt,Toggle:()=>Ge,ToggleGroup:()=>ys,ToggleGroupItem:()=>Xe,Tooltip:()=>ct,Typography:()=>Co,createNamedIcon:()=>t,findMarkdownTreeNode:()=>qn,iconComponentName:()=>Yn});C();v();C();lt();v();var N=class extends l{setup(){this.state=w({failed:!1}),et(o=>{if(this.state.failed=!1,typeof Image>"u"||!o||o===ln)return;let r=new Image;return r.onerror=()=>{this.state.failed=!0},r.src=this.buildUrl(o),()=>{r.onload=null,r.onerror=null}},()=>[this.name])}buildUrl(o){return Ws(o,{baseUrl:X(this.props,"base-url","baseUrl")})}get name(){return X(this.props,"icon","name")}get url(){return this.buildUrl(this.state.failed?ln:this.name)}get style(){let o=[`--b-icon-url:url("${this.url.replace(/"/g,"%22")}")`];return this.props.size&&o.push(`--b-icon-size:${this.props.size}`),K(o.join(";"),this.props.style)}get classNames(){return f("bu-icon",this.props.className)}};a(N,"template","baseui.Icon"),a(N,"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 t(e){return class extends N{get name(){return X(this.props,"icon","name")||e}}}qs();var S=class extends l{setup(){this.rootRef=L("root"),this.props.getRef&&(P(()=>this.props.getRef(this.rootRef.el)),M(()=>this.props.getRef(null)))}get classNames(){return this.props.unstyled?f(this.props.className):f("btn","bu-button",G[this.props.variant]||G.default,Z[this.props.size],this.isIconOnly&&"bu-button-icon",this.props.className)}get iconPosition(){return X(this.props,"icon-position","iconPosition")==="end"?"end":"start"}get ariaLabel(){return X(this.props,"aria-label","ariaLabel")}get ariaPressed(){return X(this.props,"aria-pressed","ariaPressed")}get ariaInvalid(){let o=X(this.props,"aria-invalid","ariaInvalid");return o===!0?"true":o}get isIconOnly(){return!!(this.props.icon&&!this.props.label&&!this.props.slots?.default)}onClick(o){if(this.props.href&&this.props.disabled){o.preventDefault();return}this.props.onClick?.(o)}};a(S,"template","baseui.Button"),a(S,"components",{Icon:N}),a(S,"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),...d,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)});C();v();un();var pt=class extends l{setup(){this.state=w({copied:!1}),this.resetTimer=null,M(()=>window.clearTimeout(this.resetTimer))}get classNames(){return pn(this.props)}get resetDelay(){return X(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 X(this.props,"aria-label","ariaLabel")||this.label}get attrs(){return{"data-copied":this.state.copied?"true":void 0}}async onClick(o){if(this.props.disabled)return;let r=this.props.getValue?this.props.getValue():this.props.value??"";try{await Os(r),this.state.copied=!0,window.clearTimeout(this.resetTimer),this.resetTimer=window.setTimeout(()=>{this.state.copied=!1},this.resetDelay),this.props.onCopy?.({value:r,event:o})}catch(s){this.props.onCopyError?.({error:s,event:o})}}};a(pt,"template","baseui.ClipboardButton"),a(pt,"components",{Button:S}),a(pt,"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),...d,"aria-label":i(String),ariaLabel:i(String),onCopy:i(Function),onCopyError:i(Function)});C();v();C();function B(){let e=globalThis.bootstrap;if(!e)throw new Error("BaseUI: load dist/bootstrap.bundle.min.js before this script (globalThis.bootstrap is not set).");return e}v();var Ya={default:"bu-alert-default",destructive:"bu-alert-destructive",info:"bu-alert-default",success:"alert-success",warning:"alert-warning",danger:"bu-alert-destructive"},ut=class extends l{setup(){this.rootRef=L("root"),this.bootstrapAlert=null,this.props.dismissible&&(P(()=>{this.bootstrapAlert=new(B()).Alert(this.rootRef.el)}),M(()=>{this.bootstrapAlert?.dispose()}))}get classNames(){return f("alert","bu-alert",Ya[this.props.variant]||Ya.default,this.props.dismissible&&"alert-dismissible",this.props.dismissible&&"fade",this.props.dismissible&&"show",this.props.className)}};a(ut,"template","baseui.Alert"),a(ut,"components",{Button:S}),a(ut,"props",{variant:i(String),dismissible:i(Boolean),...d});var no=class extends l{};a(no,"template","baseui.AlertTitle"),a(no,"props",d);var At=class extends l{};a(At,"template","baseui.AlertDescription"),a(At,"props",d);var ao=class extends l{};a(ao,"template","baseui.AlertAction"),a(ao,"props",d);C();v();var io={primary:"bu-badge-primary",secondary:"bu-badge-secondary",success:"bu-badge-success",warning:"bu-badge-warning",danger:"bu-badge-danger",info:"bu-badge-info",muted:"bu-badge-muted"};var rt=class extends l{get classNames(){return f("badge",io[this.props.variant]||io.secondary,this.props.pill&&"rounded-pill",this.props.className)}};a(rt,"template","baseui.Badge"),a(rt,"props",{variant:i(String),pill:i(Boolean),label:i(String),...d});C();v();var Lt=class extends l{get classNames(){return f("bu-kbd",this.props.className)}};a(Lt,"template","baseui.Kbd"),a(Lt,"props",{...d});C();v();var Et=class extends l{get classNames(){return f("bu-spinner",this.props.type==="grow"?"spinner-grow":"spinner-border",this.props.className)}get label(){return this.props.label||"Loading"}};a(Et,"template","baseui.Spinner"),a(Et,"props",{type:i(String),label:i(String),className:i(String),style:i([String,Object])});var dt={line:["//"],block:["/*","*/"],quotes:`"'`},dn={line:["#"],quotes:`"'`},ti="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",Fc="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",ei="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",Vs={plaintext:{label:"Plain text",indent:" "},javascript:{label:"JavaScript",...dt,quotes:"\"'`",multiline:"`",indent:" ",keywords:ei,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",...dt,quotes:"\"'`",multiline:"`",indent:" ",keywords:`${ei} 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",...dt,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",...dt,indent:" ",keywords:ti,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++",...dt,indent:" ",keywords:`${ti} 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",...dt,indent:" ",keywords:Fc,builtins:"String System Object Integer Long Double Boolean List Map Set ArrayList HashMap Exception Override Math"},csharp:{label:"C#",...dt,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",...dt,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",...dt,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",...dt,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",...dn,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",...dn,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,...dn,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,...dn,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"}};Vs.xml={...Vs.html,label:"XML"};var $c={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"},zc={comment:"bu-code-comment",string:"bu-code-string",number:"bu-code-number",keyword:"bu-code-keyword",builtin:"bu-code-builtin",function:"bu-code-function",type:"bu-code-type",tag:"bu-code-tag",attr:"bu-code-attr",meta:"bu-code-meta",variable:"bu-code-variable",plain:""},Xn=/[A-Za-z_$]/,ai=/[A-Za-z0-9_$]/,ii=/[A-Za-z0-9_:-]/,Hc=/[0-9A-Za-z_.]/,oi=/[0-9]/,jc=/[A-Za-z0-9_-]/,ri=/^#[0-9a-fA-F]{3,8}\b/,_c=/^&#?\w+;/,Wc=/[A-Za-z/!?]/,Gn=new Map;function si(e,o){return new Set((e?o?e.toLowerCase():e:"").split(" ").filter(Boolean))}function Gs(e){let o=String(e??"").trim().toLowerCase(),r=$c[o]??o,s=r in Vs?r:"plaintext";if(!Gn.has(s)){let n=Vs[s];Gn.set(s,{id:s,...n,keywordSet:si(n.keywords,n.ci),builtinSet:si(n.builtins,n.ci)})}return Gn.get(s)}function ci(e){let o=String(e??"").split(/[?#]/)[0].split("/").pop();return o.includes(".")?o.split(".").pop().toLowerCase():""}var tb=Object.keys(Vs);function Ks(e,o,r){let s=o;for(;s<e.length&&r.test(e[s]);)s+=1;return s}function Vc(e,o,r){if(r.block&&e.startsWith(r.block[0],o)){let n=e.indexOf(r.block[1],o+r.block[0].length);return n===-1?e.length:n+r.block[1].length}if(!r.line?.some(n=>e.startsWith(n,o)))return-1;let s=e.indexOf(`
|
|
12
|
-
|
|
13
|
-
`)
|
|
14
|
-
`)){let
|
|
15
|
-
`).
|
|
10
|
+
var BaseUIBundle=(()=>{var bc=Object.create;var Dr=Object.defineProperty;var mc=Object.getOwnPropertyDescriptor;var fc=Object.getOwnPropertyNames;var gc=Object.getPrototypeOf,yc=Object.prototype.hasOwnProperty;var vc=(t,e,s)=>e in t?Dr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s;var ei=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,s)=>(typeof require<"u"?require:e)[s]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});var at=(t,e,s)=>()=>{if(s)throw s[0];try{return t&&(e=t(t=0)),e}catch(o){throw s=[o],o}};var si=(t,e)=>{for(var s in e)Dr(t,s,{get:e[s],enumerable:!0})},wn=(t,e,s,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of fc(e))!yc.call(t,r)&&r!==s&&Dr(t,r,{get:()=>e[r],enumerable:!(o=mc(e,r))||o.enumerable});return t};var oi=(t,e,s)=>(s=t!=null?bc(gc(t)):{},wn(e||!t||!t.__esModule?Dr(s,"default",{value:t,enumerable:!0}):s,t)),xc=t=>wn(Dr({},"__esModule",{value:!0}),t);var i=(t,e,s)=>vc(t,typeof e!="symbol"?e+"":e,s);function Ac(t){return typeof t=="string"?document.querySelector(t):t instanceof Element?t:null}function qi(t,e,s={}){t.dispatchEvent(new CustomEvent(e,{bubbles:!0,detail:s}))}function Ec(t,e={}){return t.hasAttribute("b-icon")?"icon":e.name||t.getAttribute("b-ui")}function Cc(t,e){return e===document||e===t||e.contains(t)}function Lc(t,e={}){return!e.allowBootstrapControl&&t.matches(Sc)}function An(t){return h.version=t,h}function Sn(){if(typeof MutationObserver>"u")return;let t=new MutationObserver(e=>{for(let s of e)for(let o of s.addedNodes)o instanceof Element&&h.mountAll(o)});return t.observe(document.documentElement,{childList:!0,subtree:!0}),t}function En(){typeof document>"u"||(document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>{h.mountAll(),Sn()},{once:!0}):(h.mountAll(),Sn()))}var wc,Ui,Fr,ri,Sc,Pi,h,C=at(()=>{wc="__BASEUI_VERSION__",Ui=new Map,Fr=new WeakMap,ri="[b-ui], [b-icon]",Sc="[data-bs-toggle], [data-bs-target], [data-bs-dismiss]";Pi=typeof window<"u"?window.thebase:void 0,h=Pi?.register?Pi:Object.assign(Pi||{},{version:wc,register(t,e){if(!t||!e)throw new Error("BaseUI.register requires a name and component definition.");return Ui.set(t,e),this},component(t){return Ui.get(t)},mount(t,e={}){let s=Ac(t);if(!s||Lc(s,e))return null;let o=Ec(s,e),r=Ui.get(o);if(!r)return null;let a=Fr.get(s);if(a?.name===o)return a;a&&(a.destroy?.(),Fr.delete(s),qi(s,"baseui:destroyed",{name:a.name}));let l=r.mount?.(s,this,e)||{},u={name:o,element:s,destroy:l.destroy};return Fr.set(s,u),qi(s,"baseui:mounted",{name:o,instance:u}),u},mountAll(t=document){let e=t||document,s=[...e.querySelectorAll?.(ri)||[]];return e instanceof Element&&e.matches(ri)&&s.unshift(e),s.map(o=>this.mount(o)).filter(Boolean)},destroy(t=document){let e=t||document,s=[...e.querySelectorAll?.(ri)||[]];e instanceof Element&&e.matches(ri)&&s.unshift(e);for(let o of s){let r=Fr.get(o);r&&Cc(o,e)&&(r.destroy?.(),Fr.delete(o),qi(o,"baseui:destroyed",{name:r.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 r=s==="radius"||s==="--b-radius"?"--base-radius":s.startsWith("--")?s:`--b-${s}`;e.style.setProperty(r,o)}}}});typeof window<"u"&&(window.thebase=h,window.BaseUI=h)});function m(...t){let e=[];for(let s of t)if(s){if(typeof s=="string")e.push(s);else if(Array.isArray(s)){let o=m(...s);o&&e.push(o)}else if(typeof s=="object")for(let[o,r]of Object.entries(s))r&&e.push(o)}return e.join(" ")}function n(t){return{type:t,optional:!0}}function G(t,e,s){return t[e]??(s?t[s]:void 0)}function F(t){return t===!0||t==="open"||t==="on"||t==="active"}function K(...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,r]of Object.entries(s)){if(r==null||r==="")continue;let a=o.replace(/[A-Z]/g,l=>"-"+l.toLowerCase());e.push(`${a}:${r}`)}}return e.join(";")}function j(t){return t.state!==void 0?F(t.state):t.open!==void 0?t.open:t["default-open"]!==void 0?t["default-open"]:t.defaultOpen??!1}function es(t){return t.state!==void 0||t.open!==void 0}var p,x=at(()=>{p={className:n(String),style:n([String,Object]),slots:n(Object)}});var I,Ln,kn,Nn,On,Tn,Bn,In,Rn,le,$n,ii,_i,Un,R,M,qn,ue,Pn,_n,ot,U,z,Mn,jn,zn,T,Dn,tt,Fn,ss,L,w,Hn,Wn,Kn,Vn,ni,Mi=at(()=>{I=globalThis.owl;if(!I)throw new Error("BaseUI: load dist/baseui.min.js or dist/baseui.esm.js before this script (globalThis.owl is not set).");Ln=I.App,kn=I.Component,Nn=I.EventBus,On=I.OwlError,Tn=I.__info__,Bn=I.batched,In=I.blockDom,Rn=I.htmlEscape,le=I.loadFile,$n=I.markRaw,ii=I.markup,_i=I.mount,Un=I.onError,R=I.onMounted,M=I.onPatched,qn=I.onRendered,ue=I.onWillDestroy,Pn=I.onWillPatch,_n=I.onWillRender,ot=I.onWillStart,U=I.onWillUnmount,z=I.onWillUpdateProps,Mn=I.reactive,jn=I.status,zn=I.toRaw,T=I.useChildSubEnv,Dn=I.useComponent,tt=I.useEffect,Fn=I.useEnv,ss=I.useExternalListener,L=I.useRef,w=I.useState,Hn=I.useSubEnv,Wn=I.validate,Kn=I.validateType,Vn=I.whenReady,ni=I.xml});function ji(t){Object.assign(Hr,t)}function Tc(t){let e=t.components;e?e!==Hr&&Object.getPrototypeOf(e)===Object.prototype&&Object.setPrototypeOf(e,Hr):t.components=Object.create(Hr)}function Gn(t){return typeof t!="string"||!/\st-(att|attf|model)([.\s=-]|$)/.test(t)?t:t.replace(/<([A-Z][\w.:-]*)(\s[^<>]*?)?(\/?)>/g,(e,s,o="",r="")=>`<${s}${Bc(s,o)}${r}>`)}function Bc(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,(r,a,l,u,d)=>`${a}${l}=${u}${Uc(d)}${u}`);return o=o.replace(/(\s)t-model((?:\.[\w-]+)*)\s*=\s*(["'])(.*?)\3/g,(r,a,l,u,d)=>qc(t,a,l,u,d,o)),s?Ic(o):o}function Ic(t){return t.replace(/(\s)([A-Za-z_][\w:.-]*)\s*=\s*(["'])(.*?)\3/g,(e,s,o,r,a)=>o.startsWith("t-")||o==="t-props"||$c(a)?e:`${s}${o}=${r}${Rc(a)}${r}`)}function Rc(t){return`'${t.replace(/\\/g,"\\\\").replace(/'/g,"\\'")}'`}function $c(t){let e=t.trim();return!e||/^(['"`[{(]|-?\d+(?:\.\d+)?$)/.test(e)||/[?.()[\]+*/]|=>|===|!==|&&|\|\|/.test(e)||/^(true|false|null|undefined)$/.test(e)}function Uc(t){return`\`${t.replace(/`/g,"\\`").replace(/{{\s*([\s\S]*?)\s*}}|#\{\s*([\s\S]*?)\s*\}/g,(e,s,o)=>`\${${s||o}}`)}\``}function qc(t,e,s,o,r,a){let l=/^(Checkbox|Switch)$/.test(t),u=Pc(t,s),d=l?"checked":"value",b=new RegExp(`\\s${d}\\s*=`).test(a)?"":`${e}${d}=${o}${r}${o}`,f=new RegExp(`\\s${u}\\s*=`).test(a)?"":`${e}${u}=${o}${_c(r,s,l)}${o}`;return`${b}${f}`}function Pc(t,e){return e.includes(".lazy")?"onChange":/^(Input|Textarea)$/.test(t)?"onInput":"onChange"}function _c(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 zi(t,...e){return Array.isArray(t?.raw)?ni({raw:t.raw.map(Gn)},...e):ni(t,...e)}function os(t,e,s={}){let o=Gn(s.templates);return t.components={...Hr,...t.components||{}},_i(t,e,o===s.templates?s:{...s,templates:o})}async function Mc(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 Nc,Oc,Hr,c,A=at(()=>{Mi();Mi();Nc=_i,Oc=ni,Hr={};c=class extends kn{constructor(...e){super(...e),Tc(this.constructor)}}});function Dc(t){return typeof Image>"u"?Promise.resolve(!0):(Di.has(t)||Di.set(t,new Promise(e=>{let s=new Image;s.onload=()=>e(!0),s.onerror=()=>e(!1),s.src=t})),Di.get(t))}function ai(t){return String(t||"").trim().replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase()}function Wr(t,e={}){let s=ai(t);if(!zc.test(s))throw new Error(`BaseUI icon name is invalid: ${t}`);return`${String(e.baseUrl||h.icons.lucide.cdnBaseUrl).replace(/\/+$/,"")}/${s}.svg`}function D(t,e,s={}){let o=s.url||Wr(e,s),r=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")),r?(t.setAttribute("role","img"),t.setAttribute("aria-label",r)):t.setAttribute("aria-hidden","true");let a=s.fallback===!1?null:s.fallback||ci;return a&&!s.url&&ai(e)!==ai(a)&&Dc(o).then(l=>{if(l||!t.isConnected)return;let u=Wr(a,s);t.style.setProperty("--b-icon-url",`url("${u.replace(/"/g,"%22")}")`)}),t}var Zn,jc,ci,zc,Di,lt=at(()=>{C();Zn="1.31.0",jc=`https://cdn.jsdelivr.net/npm/lucide-static@${Zn}/icons`,ci="file",zc=/^[a-z0-9][a-z0-9-]*$/,Di=new Map;h.icons={...h.icons||{},lucide:{version:Zn,cdnBaseUrl:jc,normalizeName:ai,url:Wr,render:D}}});var V,Z,Br=at(()=>{V={default:"btn-primary",secondary:"btn-secondary",destructive:"btn-danger",outline:"btn-outline-secondary",ghost:"btn-light",link:"btn-link"},Z={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 li({variant:t="default",size:e,className:s}={}){return m("btn","b-button","b-clipboard-button",V[t]||V.default,Z[e],s)}async function Ir(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 Fi,ui=at(()=>{x();Br();Fi=["btn","b-button","b-clipboard-button",...Object.values(V),...Object.values(Z)]});var Ea={};si(Ea,{destroyBaseUiPreviews:()=>_r,enhanceMarkdownDiagrams:()=>Jr,expandSelfClosingTags:()=>nu,extractTagCaseMap:()=>Wl,mountMarkdownEditor:()=>Yr,normalizeOwlPreviewMarkup:()=>cu,parseMarkdown:()=>Zr,primeBaseUiTemplates:()=>lu,renderBaseUiBlocks:()=>Aa,renderMermaidBlocks:()=>wa});function Ml(){return Yi??(Yi=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})),Yi}function jl(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 zl(){return Xi??(Xi=import("./runtime/mermaid/mermaid.esm.min.mjs").then(t=>{let e=t.default||t;return e.initialize({startOnLoad:!1,securityLevel:"strict"}),e})),Xi}function Dl(){return Qi??(Qi=import("./runtime/milkdown/milkdown-editor.js")),Qi}async function Zr(t,e={}){return(await Ml()).parse(String(t??""),{gfm:!0,breaks:!1,...e})}function en(t,e,s,o=""){t.classList.add("b-markdown-diagram-error"),t.replaceChildren();let r=document.createElement("p");if(r.className="b-markdown-diagram-error-message",r.textContent=`Unable to render ${e} diagram: ${s?.message||s}`,t.append(r),o){let a=document.createElement("pre"),l=document.createElement("code");l.textContent=o,a.append(l),t.append(a)}}async function wa(t){let e=[...t.querySelectorAll("pre > code.language-mermaid")];if(!e.length)return;let s;try{s=await zl()}catch(o){e.forEach(r=>{let a=r.closest("pre");a.replaceChildren(),a.className="b-markdown-diagram b-markdown-mermaid",en(a,"mermaid",o,r.textContent)});return}s.initialize({startOnLoad:!1,securityLevel:"strict",theme:jl(t)});for(let o of e){let r=o.textContent,a=o.closest("pre");a.replaceChildren(),a.className="b-markdown-diagram b-markdown-mermaid";try{let{svg:l}=await s.render(`b-mermaid-${++_l}`,r);a.innerHTML=l}catch(l){en(a,"mermaid",l,r)}}}function Fl(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 Hl(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");D(o,"copy",{label:"Copy code"}),s.append(o),s.addEventListener("click",async()=>{try{await Ir(t),s.dispatchEvent(new CustomEvent("baseui:markdown-copy",{bubbles:!0,detail:{source:t}})),Fl("Copied to clipboard")}catch(l){s.dispatchEvent(new CustomEvent("baseui:markdown-copy-error",{bubbles:!0,detail:{error:l}}))}}),e.append(s);let r=document.createElement("pre"),a=document.createElement("code");a.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,a.append(u)}return r.append(a),e.append(r),e}function ga(t){return t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}function Wl(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 Kl(t){return e=>{if(e.hasAttribute("b-ui"))return e;let s=globalThis.thebase,o=t.get(e.localName)||e.localName,r=ga(o),a=!!s?.component?.(r),l=_(e.getAttribute("className")||e.getAttribute("class"));if(!a){let u=`b-${r}`;return e.className=l?`${u} ${l}`:u,e}e.setAttribute("b-ui",r),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 d=_(u.value);e.removeAttribute(u.name),!(d===""||d==="false")&&e.setAttribute(`b-att-${ga(u.name)}`,d==="true"?"true":d)}return e}}function _(t){if(!t)return"";let e=t.trim();return e.startsWith("'")&&e.endsWith("'")||e.startsWith('"')&&e.endsWith('"')?e.slice(1,-1):e}function wi(t,e){for(;t.firstChild;)e.append(t.firstChild)}function nt(t,e){return wi(t,e),t.replaceWith(e),e}function Vl(t){let e=document.createElement("div");e.setAttribute("b-field-group","");let s=_(t.getAttribute("className")||t.getAttribute("class"));return s&&(e.className=s),nt(t,e)}function Gl(t){let e=document.createElement("div");e.setAttribute("b-ui","field");let s=_(t.getAttribute("orientation")||""),o=_(t.getAttribute("className")||t.getAttribute("class"));return s&&e.setAttribute("b-att-orientation",s),o&&(e.className=o),nt(t,e)}function Zl(t){let e=document.createElement("label");e.setAttribute("b-field-label","");let s=_(t.getAttribute("for")||""),o=_(t.getAttribute("className")||t.getAttribute("class"));return s&&e.setAttribute("for",s),o&&(e.className=o),nt(t,e)}function ya(t,e,s){let o=document.createElement(e);o.setAttribute(s,"");let r=_(t.getAttribute("className")||t.getAttribute("class"));return r&&(o.className=r),nt(t,o)}function Jl(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 r=_(e||"button"),a=_(t.getAttribute("variant")||""),l=_(t.getAttribute("size")||""),u=_(t.getAttribute("className")||t.getAttribute("class")),d=_(t.getAttribute("label")||"");return o.type=r||"button",a&&o.setAttribute("b-att-variant",a),l&&o.setAttribute("b-att-size",l),u&&(o.className=u),d&&!t.childNodes.length&&(o.textContent=d),nt(t,o)}function Yl(t){if(t.hasAttribute("b-ui")||t.hasAttribute("b-icon"))return t;let e=_(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=_(t.getAttribute("size")||""),r=_(t.getAttribute("label")||""),a=_(t.getAttribute("className")||t.getAttribute("class"));return o&&s.setAttribute("b-att-size",o),r&&s.setAttribute("b-att-label",r),a&&(s.className=a),nt(t,s)}function Xl(t){if(t.hasAttribute("b-ui"))return t;let e=document.createElement("div");e.setAttribute("b-ui","alert");let s=_(t.getAttribute("variant")||""),o=_(t.getAttribute("className")||t.getAttribute("class"));return s&&e.setAttribute("b-att-variant",s),o&&(e.className=o),nt(t,e)}function tn(t){return e=>{if(e.hasAttribute("b-ui"))return e;let s=document.createElement("div"),o=_(e.getAttribute("className")||e.getAttribute("class"));return s.className=o?`${t} ${o}`:t,nt(e,s)}}function Ql(t){if(t.hasAttribute("b-ui"))return t;let e=document.createElement("div");e.setAttribute("b-ui","accordion"),_(t.getAttribute("multiple"))==="true"&&e.setAttribute("b-att-multiple","true");let s=_(t.getAttribute("className")||t.getAttribute("class"));return s&&(e.className=s),nt(t,e)}function tu(t){if(t.hasAttribute("b-accordion-item"))return t;let e=document.createElement("div");e.setAttribute("b-accordion-item",""),_(t.getAttribute("state"))==="open"&&e.setAttribute("b-att-state","open");let s=_(t.getAttribute("className")||t.getAttribute("class"));return s&&(e.className=s),nt(t,e)}function eu(t){if(t.hasAttribute("b-accordion-trigger"))return t;let e=document.createElement("button");e.type="button",e.setAttribute("b-accordion-trigger","");let s=_(t.getAttribute("className")||t.getAttribute("class"));s&&(e.className=s),wi(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 su(t){if(t.hasAttribute("b-accordion-panel"))return t;let e=document.createElement("div");e.setAttribute("b-accordion-panel","");let s=_(t.getAttribute("className")||t.getAttribute("class"));return s&&(e.className=s),nt(t,e)}function ou(t){return va+=1,`${t}-${va}`}function it(t,e,s){return o=>{if(o.hasAttribute("b-ui"))return o;let r=document.createElement(t);t==="button"&&(r.type="button"),s&&r.setAttribute(s,"");let a=_(o.getAttribute("className")||o.getAttribute("class"));return r.className=a?`${e} ${a}`:e,nt(o,r)}}function ru(){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 xa({tagPrefix:t,componentName:e,triggerTag:s,triggerClassName:o,panelClassName:r,closeButton:a}){return l=>{if(l.hasAttribute("b-ui"))return l;let u=l.querySelector(`:scope > ${t}trigger`),d=l.querySelector(`:scope > ${t}content`);if(!d)return l;let b=ou(`b-preview-${e}`),f=document.createElement(s);s==="button"&&(f.type="button"),f.className=o,f.setAttribute("b-att-trigger",`#${b}`),u&&wi(u,f);let g=document.createElement("div");g.setAttribute("b-ui",e),g.id=b,g.setAttribute("b-att-trigger",`[b-att-trigger='#${b}']`);let v=document.createElement("div");v.className=r;let k=_(d.getAttribute("size")||"");return k&&v.setAttribute("data-size",k),wi(d,v),a&&v.append(a()),g.append(v),l.before(f,g),l.remove(),g}}function nu(t){return t.replace(/<([a-zA-Z][a-zA-Z0-9-]*)((?:"[^"]*"|'[^']*'|[^"'>])*?)\/>/g,(e,s,o)=>iu.has(s.toLowerCase())?e:`<${s}${o}></${s}>`)}function au(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 cu(t,e){au(t);let s={fieldgroup:Vl,field:Gl,fieldlabel:Zl,fielddescription:r=>ya(r,"p","b-field-description"),fielderror:r=>ya(r,"p","b-field-error"),button:Jl,icon:Yl,alert:Xl,alerttitle:tn("b-alert-title"),alertdescription:tn("b-alert-description"),alertaction:tn("b-alert-action"),accordion:Ql,accordionitem:tu,accordiontrigger:eu,accordioncontent:su,dialog:xa({tagPrefix:"dialog",componentName:"dialog",triggerTag:"span",triggerClassName:"b-dialog-trigger",panelClassName:"b-dialog-panel",closeButton:ru}),dialogheader:it("div","b-dialog-header"),dialogfooter:it("div","b-dialog-footer"),dialogtitle:it("h2","b-dialog-title"),dialogdescription:it("p","b-dialog-description"),dialogclose:it("button","btn b-button btn-outline-secondary b-dialog-close","b-dialog-close"),alertdialog:xa({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:it("div","b-dialog-header b-alert-dialog-header"),alertdialogfooter:it("div","b-dialog-footer b-alert-dialog-footer"),alertdialogmedia:it("div","b-alert-dialog-media"),alertdialogtitle:it("h2","b-dialog-title b-alert-dialog-title"),alertdialogdescription:it("p","b-dialog-description b-alert-dialog-description"),alertdialogcancel:it("button","btn b-button btn-outline-secondary b-alert-dialog-cancel","b-alert-dialog-cancel"),alertdialogaction:it("button","btn b-button btn-primary b-alert-dialog-action","b-alert-dialog-action")},o=Kl(e);for(let r of[...t.querySelectorAll("*")]){let a=r.localName.toLowerCase();s[a]?s[a](r):e.has(a)&&o(r)}}function lu(t){xi=Promise.resolve(t)}function uu(){return xi??(xi=le("/dist/baseui.templates.xml")),xi}function _r(t){let e=sn.get(t);if(e){sn.delete(t);for(let s of e)try{s.destroy()}catch{}}}function du(t){return new Set([...t.matchAll(pu)].map(e=>e[1]))}function mu(t){let e=new Set;for(let s of t.matchAll(hu))e.add(s[1]);for(let s of t.matchAll(bu))e.add(s[2]);return e}function fu(t){let e=zi({raw:[t]}),s=du(t);class o extends c{setup(){this.state=w(Object.fromEntries([...s].map(a=>[a,""])))}}i(o,"template",e);for(let r of mu(t))o.prototype[r]=function(){};return o}function Sa(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 gu(t,e){let[s,o]=await Promise.all([uu(),fu(e)]),r=await os(o,t,{templates:s});return Sa(t),r}function yu(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,Sa(t),s.mountAll(t)}async function Aa(t){_r(t);let e=[...t.querySelectorAll("pre > code.language-base-ui")];if(!e.length)return;let s=new Set;for(let o of e){let r=o.textContent,a=o.closest("pre");a.replaceChildren(),a.className="b-markdown-live b-markdown-baseui";let l=document.createElement("div");l.className="b-markdown-b-preview",a.append(l,Hl(r));try{/<[A-Z]/.test(r)?s.add(await gu(l,r)):yu(l,r)}catch(u){en(a,"BaseUI component",u,r)}}s.size&&sn.set(t,s)}function vu(t){for(let e of t.querySelectorAll("li > input[type=checkbox]:not([aria-label])"))e.setAttribute("aria-label",e.parentElement.textContent.trim())}async function Jr(t,{mermaid:e=!0,baseUi:s=!0}={}){vu(t),e&&await wa(t),s&&await Aa(t)}async function Yr(t){return(await Dl()).createMilkdownMarkdownEditor(t)}var Yi,Xi,Qi,_l,va,iu,xi,sn,pu,hu,bu,Si=at(()=>{A();lt();ui();_l=0;va=0;iu=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]);sn=new WeakMap;pu=/\bstate\.([A-Za-z_$][\w$]*)/g;hu=/\bthis\.([A-Za-z_$][\w$]*)\s*\(/g,bu=/\bt-on-[\w:-]+\s*=\s*(["'])([A-Za-z_$][\w$]*)\1/g});function Au(t,e,s){let o=String(t||"").trim();if(!o)return"";let r=o.replace(/\{([^}]+)\}/g,(a,l)=>{let u=s&&typeof s=="object"?s[l]:null;return u&&u.default!==void 0?String(u.default):`{${l}}`});try{return new URL(r,`${e}/`).href.replace(/\/$/,"")}catch{return r.replace(/\/$/,"")}}function H(t,e){if(t&&typeof t=="object"&&typeof t.$ref=="string"){let s=t.$ref.replace(/^#\//,"").split("/"),o=e;for(let r of s)o=o?.[decodeURIComponent(r.replace(/~1/g,"/").replace(/~0/g,"~"))];return o?{...o}:{}}return t}function hn(t,e){if(!Array.isArray(t?.allOf))return t;let s={...t,properties:{...t.properties},required:[...t.required||[]]};delete s.allOf;for(let o of t.allOf){let r=hn(H(o,e),e)||{};Object.assign(s.properties,r.properties),s.required.push(...r.required||[]),s.type||(s.type=r.type)}return s}function Eu(t,e){if(!t)return null;let s=H(t,e);return!s||typeof s!="object"?null:s}function dn(t){return t&&typeof t.$ref=="string"?t.$ref.split("/").pop():null}function Pa(t,e){if(!t||typeof t!="object")return null;for(let[s,o]of Object.entries(t)){let r=Eu(o,e);if(r){if(r.dataValue!==void 0)return{key:s,label:r.summary||s,value:r.dataValue,isAuto:!1};if(r.serializedValue!==void 0)return{key:s,label:r.summary||s,value:r.serializedValue,isAuto:!1};if(r.value!==void 0)return{key:s,label:r.summary||s,value:r.value,isAuto:!1};if(r.externalValue)return{key:s,label:r.summary||s,value:r.externalValue,isAuto:!1}}}return null}function bn(t){if(t){if(t.example!==void 0)return t.example;if(t.default!==void 0)return t.default;if(Array.isArray(t.enum)&&t.enum.length)return t.enum[0]}}function ln(t,e){if(!t)return null;let s=Pa(t.examples,e);if(s)return s;if(t.example!==void 0)return{label:"media example",value:t.example,isAuto:!1};let o=H(t.schema,e),r=bn(o);return r!==void 0?{label:"schema example",value:r,isAuto:!1}:null}function _a(t,e){let s=Pa(t.examples,e);if(s)return s;if(t.example!==void 0)return{label:"example",value:t.example,isAuto:!1};let o=H(t.schema,e),r=bn(o);return r!==void 0?{label:"schema example",value:r,isAuto:!1}:null}function Mr(t,e,s=new Set){if(!t)return null;let o=dn(t);if(o){if(s.has(o))return{};s=new Set(s).add(o)}let r=hn(H(t,e),e);if(!r)return null;let a=bn(r);if(a!==void 0)return a;if(r.type==="array"||r.items)return[Mr(r.items||{},e,s)];if(r.properties||r.type==="object"){let l={};for(let[u,d]of Object.entries(r.properties||{}))l[u]=Mr(d,e,s);return l}switch(r.type){case"integer":return r.minimum??0;case"number":return r.minimum??0;case"boolean":return!0;case"string":return r.format==="date-time"?new Date().toISOString():r.format==="date"?new Date().toISOString().slice(0,10):r.format==="byte"?"base64==":r.title||"string";default:return null}}function Qr(t,e,{depth:s=0,prefix:o="",seen:r=new Set,required:a=!1,selfRow:l=!0}={}){if(!t||s>4)return[];let u=dn(t);if(u){if(r.has(u))return[];r=new Set(r).add(u)}let d=hn(H(t,e),e),b=[],f=d.contentMediaType||d.contentEncoding?[d.contentMediaType,d.contentEncoding&&`encoding:${d.contentEncoding}`].filter(Boolean).join(", "):"",g=d.discriminator?.propertyName?`discriminator: ${d.discriminator.propertyName}`:"";if(Array.isArray(d.prefixItems))return l&&b.push({path:o||"items",type:"tuple",required:a,description:d.description||""}),d.prefixItems.forEach((v,k)=>{b.push(...Qr(v,e,{depth:s+1,prefix:`${o}[${k}]`,seen:r,required:!1}))}),d.items&&b.push(...Qr(d.items,e,{depth:s+1,prefix:`${o}[n]`,seen:r,required:!1})),b;if(d.type==="array"||d.items)return l&&b.push({path:o||"items",type:"array",required:a,description:d.description||""}),b.push(...Qr(d.items||{},e,{depth:s+1,prefix:`${o}[]`,seen:r,required:!1})),b;if(d.properties||d.type==="object"||d.patternProperties){let v=new Set(d.required||[]);for(let[k,y]of Object.entries(d.properties||{})){let E=H(y,e),O=o?`${o}.${k}`:k;b.push({path:O,type:E.type||(E.$ref?dn(y):"any")||"any",format:E.format||"",enum:E.enum,required:v.has(k),description:E.description||""}),(E.type==="object"||E.properties||E.type==="array"||E.items)&&b.push(...Qr(y,e,{depth:s+1,prefix:O,seen:r,required:v.has(k),selfRow:!1}))}for(let[k,y]of Object.entries(d.patternProperties||{})){let E=H(y,e);b.push({path:o?`${o}.<${k}>`:`<${k}>`,type:E.type||"any",format:E.format||"",required:!1,description:E.description||""})}return b}return b.push({path:o||"value",type:d.type||"any",format:d.format||"",enum:d.enum,required:a,description:[d.description,f,g].filter(Boolean).join(" \u2014 ")}),b}function Cu(t){let e=_a(t,this);return{name:t.name,in:t.in,required:!!t.required,type:t.type||t.schema?.type||"string",format:t.format||t.schema?.format||"",description:t.description||"",default:t.default??t.schema?.default,enum:t.enum||t.schema?.enum,example:e?e.value:void 0,exampleLabel:e?e.label:""}}function ku(t){if(t.type==="http")return{...t,type:String(t.scheme).toLowerCase()==="basic"?"basic":"bearer"};if(t.type==="openIdConnect")return{...t,type:"bearer",oauth2MetadataUrl:t.openIdConnectUrl};if(t.type!=="oauth2"||!t.flows)return t;let[e,s]=Object.entries(t.flows)[0]||[];return{...t,...s,flow:Lu[e]||e,scopes:s?.scopes||{}}}function Ma(t){let e=t.securityDefinitions||t.components?.securitySchemes||{};return Object.fromEntries(Object.entries(e).map(([s,o])=>[s,ku(H(o,t))]))}function Nu(t,e){let s=Ma(e),o=t.security||e.security||[],r=[];for(let a of o)for(let l of Object.keys(a)){let u=s[l];u&&r.push({key:l,...u})}return r}function un(t,e,s,o){let r={path:[],query:[],header:[],formData:[],body:null};for(let b of o.parameters||[]){let f=H(b,t);if(f.in==="body"){let g={schema:f.schema},v=ln(g,t);r.body={required:!!f.required,schema:f.schema,description:f.description||"",contentType:"application/json",example:v?v.value:Mr(f.schema,t),exampleLabel:v?v.label:"auto",exampleIsAuto:!v}}else r[f.in]&&r[f.in].push(Cu.call(t,f))}if(o.requestBody){let b=H(o.requestBody,t)||{},[f,g]=Object.entries(b.content||{})[0]||[];if(f&&g){let v=ln(g,t);r.body={required:!!b.required,schema:g.schema||null,description:b.description||"",contentType:f,encoding:g.encoding||null,itemSchema:g.itemSchema||null,example:v?v.value:Mr(g.schema,t),exampleLabel:v?v.label:"auto",exampleIsAuto:!v}}}let a=Object.entries(o.responses||{}).map(([b,f])=>{let g=H(f,t)||{},[v,k]=Object.entries(g.content||{})[0]||[],y=k?ln(k,t):null;return{status:b,summary:g.summary||"",description:g.description||"",contentType:v||"application/json",schema:k?.schema||g.schema||null,encoding:k?.encoding||null,headers:Ou(g.headers,t),links:Tu(g.links,t),example:y?y.value:k?.schema?Mr(k.schema,t):null,exampleLabel:y?y.label:"auto",exampleIsAuto:!y&&!!k?.schema}}).sort((b,f)=>{let g=qa(b.status),v=qa(f.status);return g-v}),l=Bu(o.callbacks,t),u=s.toUpperCase();return{id:(o.operationId||`${s}-${e}`).replace(/[^a-zA-Z0-9]+/g,"-").replace(/^-+|-+$/g,"").toLowerCase(),method:u,path:e,tag:o.tags&&o.tags[0]||"default",summary:o.summary||o.operationId||`${u} ${e}`,description:o.description||"",deprecated:!!o.deprecated,produces:o.produces||t.produces||["application/json"],consumes:o.consumes||t.consumes||(r.body?["application/json"]:[]),parameters:r,responses:a,callbacks:l,externalDocs:o.externalDocs||null,security:Nu(o,t)}}function Ou(t,e){return!t||typeof t!="object"?[]:Object.entries(t).map(([s,o])=>{let r=H(o,e)||{},a=_a({...r,in:"header"},e);return{name:s,required:!!r.required,deprecated:!!r.deprecated,type:r.schema?.type||"string",description:r.description||"",example:a?a.value:void 0}})}function Tu(t,e){return!t||typeof t!="object"?[]:Object.entries(t).map(([s,o])=>{let r=H(o,e)||{};return{name:s,operationId:r.operationId||"",operationRef:r.operationRef||"",description:r.description||"",parameters:r.parameters||{}}})}function Bu(t,e){if(!t||typeof t!="object")return[];let s=[];for(let[o,r]of Object.entries(t)){let a=H(r,e)||{};for(let[l,u]of Object.entries(a)){let d=H(u,e)||{};for(let b of pn)d[b]&&s.push({name:o,expression:l,method:b.toUpperCase(),summary:d[b].summary||"",description:d[b].description||""})}}return s}function qa(t){if(t==="default")return 999;let e=parseInt(t,10);return Number.isNaN(e)?998:e}async function ja(t,e=""){let s=await fetch(t);if(!s.ok)throw new Error(`Failed to fetch spec: HTTP ${s.status}`);return mn(await s.json(),e)}function mn(t,e=""){if(!t||typeof t!="object"||!t.paths&&!t.webhooks)throw new Error("Not an OpenAPI document (missing paths).");let s=t.schemes&&t.schemes.includes("https")?"https":t.schemes?.[0]||"https",o=t.host||location.host,r=t.basePath||"",a=`${s}://${o}${r}`.replace(/\/$/,""),l=e?[{name:"",url:e.replace(/\/$/,""),description:""}]:Array.isArray(t.servers)&&t.servers.length?t.servers.map(y=>({name:y?.name||"",url:Au(y?.url,a,y?.variables),description:String(y?.description||"").trim()})).filter(y=>y.url):[{name:"",url:a,description:""}],u=l[0]?.url||a,d=(t.tags||[]).map(y=>y.name),b=new Map((t.tags||[]).map(y=>[y.name,y])),f=[];for(let[y,E]of Object.entries(t.paths||{})){let O=H(E,t)||{};for(let P of pn)O[P]&&f.push(un(t,y,P,O[P]));for(let[P,B]of Object.entries(O.additionalOperations||{}))f.push(un(t,y,P.toLowerCase(),B))}let g=[];for(let[y,E]of Object.entries(t.webhooks||{})){let O=H(E,t)||{};for(let P of pn)O[P]&&g.push(un(t,y,P,O[P]))}let k=[...new Set([...d,...f.map(y=>y.tag)])].map(y=>{let E=b.get(y);return{id:y.replace(/[^a-zA-Z0-9]+/g,"-").toLowerCase(),name:y,summary:E?.summary||"",description:E?.description||"",parent:E?.parent||"",kind:E?.kind||"",items:f.filter(O=>O.tag===y)}}).filter(y=>y.items.length);return{spec:t,info:t.info||{},baseUrl:u,derivedBaseUrl:a,servers:l,securityDefinitions:Ma(t),groups:k,webhooks:g,resolveRef:y=>H(y,t),generateExample:y=>Mr(y,t),schemaRows:y=>Qr(y,t),findOperation:y=>f.find(E=>E.id===y)||g.find(E=>E.id===y),firstOperation:()=>f[0]}}var pn,Lu,za=at(()=>{pn=["get","post","put","patch","delete","options","head","trace","query"];Lu={authorizationCode:"accessCode",implicit:"implicit",password:"password",clientCredentials:"application"}});function Iu(t){let e=new URL(t.url);return(t.query||[]).forEach(([s,o])=>{s&&e.searchParams.set(s,String(o||""))}),e.toString()}function Ru(t,e){let s=[];return(t.headers||[]).forEach(([r,a])=>{r&&s.push([r,String(a??"")])}),e&&t.bodyText&&!$u(s,"Content-Type")&&s.push(["Content-Type",t.mimeType||"application/json"]),s}function $u(t,e){let s=e.toLowerCase();return t.some(function(o){return String(o[0]||"").toLowerCase()===s})}function Uu(t,e){return String(t||"").split(`
|
|
12
|
+
`).map(function(s){return e+s}).join(`
|
|
13
|
+
`)}function Q(t){return String(t).replace(/\\/g,"\\\\").replace(/'/g,"\\'")}function q(t){return String(t).replace(/\\/g,"\\\\").replace(/"/g,'\\"')}function qu(t){return String(t).replace(/\\/g,"\\\\").replace(/`/g,"\\`").replace(/\$\{/g,"\\${")}function Pu(t){return String(t).replace(/`/g,'` + "`" + `')}function _u(t){return String(t).replace(/\\/g,"\\\\").replace(/"""/g,'\\"\\"\\"')}function Ei(t){return String(t).replace(/\\/g,"\\\\").replace(/'/g,"\\'")}function Ci(t){return String(t).replace(/\\/g,"\\\\").replace(/'/g,"\\\\'")}function Li(t){return String(t).replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\r/g,"\\r").replace(/\n/g,"\\n")}function ki(t){return String(t).replace(/`/g,"``").replace(/"/g,'`"')}function Mu(t){return String(t).replace(/\]=\]/g,']==] .. "]=" .. [=[')}function ju(t,e){let s=e&&e.quote==="double"?'"':"'";return t.map(function(r){let a=s==='"'?q(r[0]):Q(r[0]),l=s==='"'?q(r[1]):Q(r[1]);return s+a+s+": "+s+l+s}).join(`,
|
|
14
|
+
`)}function zu(t,e,s){let o=["curl --request "+t.method];return s.forEach(function(r){o.push("--header '"+Q(r[0]+": "+r[1])+"'")}),t.bodyText&&o.push("--data '"+Q(t.bodyText)+"'"),o.push("'"+Q(e)+"'"),o.join(` \\
|
|
15
|
+
`)}function Da(t,e,s){let o=["const url = '"+Q(e)+"';","const options = {"," method: '"+Q(t.method)+"',"];return s.length&&(o.push(" headers: {"),o.push(Uu(ju(s)," ")),o.push(" },")),t.bodyText&&o.push(" body: `"+qu(t.bodyText)+"`,"),o.push("};","","const response = await fetch(url, options);","const data = await response.text();","console.log(response.status, data);"),o.join(`
|
|
16
|
+
`)}function Du(t,e,s){return Da(t,e,s)}function Fu(t,e,s){let o=["import requests","","url = '"+Q(e)+"'"];return s.length?(o.push("headers = {"),s.forEach(function(r){o.push(" '"+Q(r[0])+"': '"+Q(r[1])+"',")}),o.push("}")):o.push("headers = {}"),t.bodyText?(o.push("",'payload = """'+_u(t.bodyText)+'"""'),o.push("response = requests.request('"+Q(t.method)+"', url, headers=headers, data=payload)")):o.push("","response = requests.request('"+Q(t.method)+"', url, headers=headers)"),o.push("print(response.status_code)","print(response.text)"),o.join(`
|
|
17
|
+
`)}function Hu(t,e,s){let o=["package main","","import (",' "fmt"',' "io"',' "net/http"'];return t.bodyText&&o.push(' "strings"'),o.push(")","","func main() {"),t.bodyText?(o.push(" body := strings.NewReader(`"+Pu(t.bodyText)+"`)"),o.push(' req, err := http.NewRequest("'+t.method+'", "'+e+'", body)')):o.push(' req, err := http.NewRequest("'+t.method+'", "'+e+'", nil)'),o.push(" if err != nil {"," panic(err)"," }"),s.forEach(function(r){o.push(' req.Header.Set("'+q(r[0])+'", "'+q(r[1])+'")')}),o.push(""," res, err := http.DefaultClient.Do(req)"," if err != nil {"," panic(err)"," }"," defer res.Body.Close()",""," data, err := io.ReadAll(res.Body)"," if err != nil {"," panic(err)"," }",""," fmt.Println(res.StatusCode)"," fmt.Println(string(data))","}"),o.join(`
|
|
18
|
+
`)}function Wu(t,e,s){let o=["OkHttpClient client = new OkHttpClient();","","Request.Builder builder = new Request.Builder()",' .url("'+q(e)+'")'];return s.forEach(function(r){o.push(' .addHeader("'+q(r[0])+'", "'+q(r[1])+'")')}),t.bodyText?o.push(";","",'MediaType mediaType = MediaType.parse("'+q(t.mimeType||"application/json")+'");','RequestBody body = RequestBody.create("""'+q(t.bodyText)+'""", mediaType);','Request request = builder.method("'+t.method+'", body).build();'):o.push(";","",'Request request = builder.method("'+t.method+'", null).build();'),o.push("","try (Response response = client.newCall(request).execute()) {"," System.out.println(response.code());",' System.out.println(response.body() != null ? response.body().string() : "");',"}"),o.join(`
|
|
19
|
+
`)}function Ku(t,e,s){let r=["using var client = new HttpClient();","using var request = new HttpRequestMessage(HttpMethod."+(t.method.charAt(0)+t.method.slice(1).toLowerCase())+', "'+q(e)+'");'];return s.forEach(function(a){r.push('request.Headers.TryAddWithoutValidation("'+q(a[0])+'", "'+q(a[1])+'");')}),t.bodyText&&r.push('request.Content = new StringContent("""'+q(t.bodyText)+'""", Encoding.UTF8, "'+q(t.mimeType||"application/json")+'");'),r.push("","using var response = await client.SendAsync(request);","var body = await response.Content.ReadAsStringAsync();","Console.WriteLine((int)response.StatusCode);","Console.WriteLine(body);"),r.join(`
|
|
20
|
+
`)}function Vu(t,e,s){let o=["$ch = curl_init();","curl_setopt_array($ch, ["," CURLOPT_URL => '"+Ei(e)+"',"," CURLOPT_CUSTOMREQUEST => '"+Ei(t.method)+"',"," CURLOPT_RETURNTRANSFER => true,"];return s.length&&(o.push(" CURLOPT_HTTPHEADER => ["),s.forEach(function(r){o.push(" '"+Ei(r[0]+": "+r[1])+"',")}),o.push(" ],")),t.bodyText&&o.push(" CURLOPT_POSTFIELDS => '"+Ei(t.bodyText)+"',"),o.push("]);","","$response = curl_exec($ch);","echo curl_getinfo($ch, CURLINFO_RESPONSE_CODE) . PHP_EOL;","echo $response;","curl_close($ch);"),o.join(`
|
|
21
|
+
`)}function Gu(t,e,s){let o=t.method.charAt(0)+t.method.slice(1).toLowerCase(),r=['require "uri"','require "net/http"',"","uri = URI('"+Ci(e)+"')","http = Net::HTTP.new(uri.host, uri.port)",'http.use_ssl = uri.scheme == "https"',"","request = Net::HTTP::"+o+".new(uri)"];return s.forEach(function(a){r.push("request['"+Ci(a[0])+"'] = '"+Ci(a[1])+"'")}),t.bodyText&&r.push("request.body = '"+Ci(t.bodyText)+"'"),r.push("","response = http.request(request)","puts response.code","puts response.body"),r.join(`
|
|
22
|
+
`)}function Zu(t,e,s){let o=["#include <curl/curl.h>","","int main(void) {"," CURL *curl = curl_easy_init();"," if (!curl) return 1;",""," struct curl_slist *headers = NULL;"];return s.forEach(function(r){o.push(' headers = curl_slist_append(headers, "'+Li(r[0]+": "+r[1])+'");')}),o.push(' curl_easy_setopt(curl, CURLOPT_URL, "'+Li(e)+'");'),o.push(' curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "'+Li(t.method)+'");'),s.length&&o.push(" curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);"),t.bodyText&&o.push(' curl_easy_setopt(curl, CURLOPT_POSTFIELDS, "'+Li(t.bodyText)+'");'),o.push(""," curl_easy_perform(curl);"," curl_slist_free_all(headers);"," curl_easy_cleanup(curl);"," return 0;","}"),o.join(`
|
|
23
|
+
`)}function Ju(t,e,s){let o=['var request = URLRequest(url: URL(string: "'+q(e)+'")!)','request.httpMethod = "'+q(t.method)+'"'];return s.forEach(function(r){o.push('request.setValue("'+q(r[1])+'", forHTTPHeaderField: "'+q(r[0])+'")')}),t.bodyText&&o.push('request.httpBody = """',t.bodyText,'""".data(using: .utf8)'),o.push("","URLSession.shared.dataTask(with: request) { data, response, error in"," if let error = error {"," print(error)"," return"," }"," let status = (response as? HTTPURLResponse)?.statusCode ?? 0"," print(status)",' print(String(data: data ?? Data(), encoding: .utf8) ?? "")',"}.resume()"),o.join(`
|
|
24
|
+
`)}function Yu(t,e,s){let o=['NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"'+q(e)+'"]];','request.HTTPMethod = @"'+q(t.method)+'";'];return s.forEach(function(r){o.push('[request setValue:@"'+q(r[1])+'" forHTTPHeaderField:@"'+q(r[0])+'"];')}),t.bodyText&&o.push('request.HTTPBody = [@"'+q(t.bodyText)+'" dataUsingEncoding:NSUTF8StringEncoding];'),o.push("","NSURLSessionDataTask *task = [[NSURLSession sharedSession] dataTaskWithRequest:request"," completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {"," if (error) {",' NSLog(@"%@", error);'," return;"," }"," NSInteger status = [(NSHTTPURLResponse *)response statusCode];"," NSString *body = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];",' NSLog(@"%ld", (long)status);',' NSLog(@"%@", body);',"}];","[task resume];"),o.join(`
|
|
25
|
+
`)}function Xu(t,e,s){let o=["val client = OkHttpClient()"];return t.bodyText&&o.push('val body = """',t.bodyText,'""".trimIndent().toRequestBody("'+q(t.mimeType||"application/json")+'".toMediaType())'),o.push("val request = Request.Builder()",' .url("'+q(e)+'")'),s.forEach(function(r){o.push(' .addHeader("'+q(r[0])+'", "'+q(r[1])+'")')}),o.push(t.bodyText?' .method("'+t.method+'", body)':' .method("'+t.method+'", null)'," .build()","","client.newCall(request).execute().use { response ->"," println(response.code)"," println(response.body?.string().orEmpty())","}"),o.join(`
|
|
26
|
+
`)}function Qu(t,e,s){let o=["let client = reqwest::Client::new();","let response = client"," ."+t.method.toLowerCase()+'("'+q(e)+'")'];return s.forEach(function(r){o.push(' .header("'+q(r[0])+'", "'+q(r[1])+'")')}),t.bodyText&&o.push(' .body(r#"'+t.bodyText.replace(/"#/g,'"#""#')+'"#)'),o.push(" .send()"," .await?;","",'println!("{}", response.status());','println!("{}", response.text().await?);'),o.join(`
|
|
27
|
+
`)}function tp(t,e,s){let o=["$headers = @{"];return s.forEach(function(r){o.push(' "'+ki(r[0])+'" = "'+ki(r[1])+'"')}),o.push("}",""),t.bodyText&&o.push('$body = @"',t.bodyText,'"@',""),o.push("$response = Invoke-RestMethod -Method "+t.method+' -Uri "'+ki(e)+'" -Headers $headers'+(t.bodyText?' -Body $body -ContentType "'+ki(t.mimeType||"application/json")+'"':""),"$response | ConvertTo-Json -Depth 10"),o.join(`
|
|
28
|
+
`)}function ep(t,e,s){let o=["import 'package:http/http.dart' as http;","","final uri = Uri.parse('"+Q(e)+"');","final headers = <String, String>{"];return s.forEach(function(r){o.push(" '"+Q(r[0])+"': '"+Q(r[1])+"',")}),o.push("};",""),t.bodyText?o.push("final response = await http."+t.method.toLowerCase()+"(uri, headers: headers, body: '''"+t.bodyText.replace(/'''/g,"'' '")+"''');"):o.push("final response = await http."+t.method.toLowerCase()+"(uri, headers: headers);"),o.push("print('Status: ${response.statusCode}');","print(response.body);"),o.join(`
|
|
29
|
+
`)}function sp(t,e,s){let o=['local http = require("socket.http")','local ltn12 = require("ltn12")',"","local response_body = {}","local headers = {"];return s.forEach(function(r){o.push(' ["'+q(r[0])+'"] = "'+q(r[1])+'",')}),o.push("}",""),t.bodyText&&(o.push("local body = [==["+Mu(t.bodyText)+"]==]",""),o.push('headers["Content-Length"] = tostring(#body)')),o.push("local _, code = http.request{",' url = "'+q(e)+'",',' method = "'+q(t.method)+'",'," headers = headers,"),t.bodyText&&o.push(" source = ltn12.source.string(body),"),o.push(" sink = ltn12.sink.table(response_body),","}","",'print("Status: " .. tostring(code))',"print(table.concat(response_body))"),o.join(`
|
|
30
|
+
`)}async function Fa(t,e){let s=fn.find(function(a){return a.id===t});if(!s)throw new Error("Unknown language: "+t);let o=Ru(e,!0),r=Iu(e);return op[s.id](e,r,o)}var fn,op,Ha=at(()=>{fn=[{id:"curl",label:"CURL",icon:"img/bash-plain.svg"},{id:"csharp",label:"CSHARP",icon:"img/csharp-original.svg"},{id:"go",label:"GO",icon:"img/go-original-wordmark.svg"},{id:"node",label:"NODEJS",icon:"img/nodejs-original.svg"},{id:"ruby",label:"RUBY",icon:"img/ruby-plain.svg"},{id:"php",label:"PHP",icon:"img/php-original.svg"},{id:"javascript",label:"JAVASCRIPT",icon:"img/javascript-original.svg"},{id:"python",label:"PYTHON",icon:"img/python-original.svg"},{id:"java",label:"JAVA",icon:"img/java-original.svg"},{id:"c",label:"C",icon:"img/c-original.svg"},{id:"swift",label:"SWIFT",icon:"img/swift-original.svg"},{id:"objc",label:"OBJECTIVE-C",icon:"img/objectivec-plain.svg"},{id:"kotlin",label:"KOTLIN",icon:"img/kotlin-original.svg"},{id:"rust",label:"RUST",icon:"img/rust-original.svg"},{id:"powershell",label:"POWERSHELL",icon:"img/windows8-original.svg"},{id:"dart",label:"DART",icon:"img/dart-original.svg"},{id:"lua",label:"LUA",icon:"img/lua.svg"}];op={curl:zu,javascript:Da,node:Du,python:Fu,go:Hu,java:Wu,csharp:Ku,php:Vu,ruby:Gu,c:Zu,swift:Ju,objc:Yu,kotlin:Xu,rust:Qu,powershell:tp,dart:ep,lua:sp}});var Wa={};si(Wa,{LANGUAGES:()=>fn,buildOpenApiDoc:()=>mn,generateSnippet:()=>Fa,loadOpenApiDoc:()=>ja});var Ka=at(()=>{za();Ha()});var ch={};si(ch,{Accordion:()=>po,AccordionContent:()=>bo,AccordionItem:()=>ho,AccordionTrigger:()=>Ce,Alert:()=>pt,AlertAction:()=>ns,AlertDescription:()=>Lt,AlertDialog:()=>Is,AlertDialogAction:()=>ge,AlertDialogCancel:()=>fe,AlertDialogContent:()=>Rs,AlertDialogDescription:()=>_s,AlertDialogFooter:()=>Us,AlertDialogHeader:()=>$s,AlertDialogMedia:()=>qs,AlertDialogTitle:()=>Ps,AlertDialogTrigger:()=>me,AlertTitle:()=>is,ApiDoc:()=>Et,ApiDocGroup:()=>Ct,App:()=>Ln,AspectRatio:()=>ar,Attachment:()=>Vo,AttachmentAction:()=>Fe,AttachmentActions:()=>Xo,AttachmentContent:()=>Zo,AttachmentDescription:()=>Yo,AttachmentDropzone:()=>tr,AttachmentGroup:()=>Qo,AttachmentMedia:()=>Go,AttachmentTitle:()=>Jo,AttachmentTrigger:()=>He,Avatar:()=>er,Badge:()=>st,BaseUI:()=>h,BaseUIComponents:()=>Ii,BaseUITheme:()=>Ji,BlockViewer:()=>Je,Breadcrumb:()=>Gt,BreadcrumbEllipsis:()=>ke,BreadcrumbItem:()=>Jt,BreadcrumbLink:()=>Yt,BreadcrumbList:()=>Zt,BreadcrumbPage:()=>Xt,BreadcrumbSeparator:()=>yt,Bubble:()=>cr,Button:()=>S,ButtonGroup:()=>pr,ButtonGroupSeparator:()=>dr,ButtonGroupText:()=>hr,Calendar:()=>je,Card:()=>ls,CardBody:()=>ps,CardDescription:()=>bs,CardFooter:()=>ds,CardHeader:()=>us,CardTitle:()=>hs,Carousel:()=>Fo,CarouselNext:()=>De,CarouselPrevious:()=>ze,CarouselSlide:()=>Ho,Chart:()=>Do,Checkbox:()=>Dt,ClipboardButton:()=>ut,CodeEditor:()=>pe,Collapsible:()=>mo,CollapsibleContent:()=>fo,CollapsibleTrigger:()=>Le,Combobox:()=>jo,Command:()=>zo,Component:()=>c,ContextMenu:()=>ao,ContextMenuContent:()=>lo,ContextMenuItem:()=>uo,ContextMenuTrigger:()=>co,DataTable:()=>Me,DatePicker:()=>Mo,Dialog:()=>$t,DialogClose:()=>de,DialogContent:()=>bt,DialogDescription:()=>_t,DialogFooter:()=>qt,DialogHeader:()=>Ut,DialogTitle:()=>Pt,DialogTrigger:()=>ms,Direction:()=>lr,Drawer:()=>Ms,DrawerClose:()=>ve,DrawerContent:()=>js,DrawerDescription:()=>Hs,DrawerFooter:()=>Ds,DrawerHeader:()=>zs,DrawerTitle:()=>Fs,DrawerTrigger:()=>ye,DropdownMenu:()=>Ft,DropdownMenuCheckboxItem:()=>Ae,DropdownMenuContent:()=>Ht,DropdownMenuGroup:()=>so,DropdownMenuItem:()=>Wt,DropdownMenuLabel:()=>oo,DropdownMenuRadioGroup:()=>ro,DropdownMenuRadioItem:()=>Ee,DropdownMenuSeparator:()=>io,DropdownMenuShortcut:()=>no,DropdownMenuSub:()=>Kt,DropdownMenuSubContent:()=>Vt,DropdownMenuSubTrigger:()=>ft,DropdownMenuTrigger:()=>mt,Empty:()=>fs,EmptyContent:()=>ws,EmptyDescription:()=>xs,EmptyHeader:()=>gs,EmptyMedia:()=>ys,EmptyTitle:()=>vs,EventBus:()=>Nn,Field:()=>re,FieldContent:()=>fr,FieldDescription:()=>ne,FieldError:()=>ae,FieldGroup:()=>oe,FieldLabel:()=>ie,FieldLegend:()=>mr,FieldSeparator:()=>yr,FieldSet:()=>br,FieldTitle:()=>gr,Form:()=>Qe,HoverCard:()=>Qs,HoverCardContent:()=>eo,HoverCardTrigger:()=>to,Icon:()=>$,Input:()=>Ot,InputOtp:()=>Ns,Item:()=>ur,Kbd:()=>kt,Label:()=>vr,Markdown:()=>At,MarkdownTree:()=>Ze,MarkdownTreeNode:()=>zr,Marker:()=>Es,Menubar:()=>wo,Message:()=>sr,MessageScroller:()=>or,NativeSelect:()=>zt,NavigationMenu:()=>vo,NavigationMenuItem:()=>xo,OwlError:()=>On,Pagination:()=>go,PaginationItem:()=>yo,Popover:()=>Ys,PopoverContent:()=>Xs,PopoverTrigger:()=>Se,Progress:()=>nr,Pwa:()=>Sr,PwaBody:()=>kr,PwaClose:()=>Xe,PwaContent:()=>Ar,PwaDescription:()=>Lr,PwaFooter:()=>Or,PwaHeader:()=>Er,PwaSteps:()=>Nr,PwaTitle:()=>Cr,PwaTrigger:()=>Ye,Questionnaire:()=>rr,QuestionnaireNext:()=>Ke,QuestionnairePrevious:()=>We,QuestionnaireStep:()=>ir,RadioGroup:()=>Cs,RadioGroupItem:()=>Ls,Resizable:()=>Wo,ScrollArea:()=>Ko,Select:()=>Os,SelectContent:()=>Ts,SelectItem:()=>Bs,SelectTrigger:()=>be,Separator:()=>Ss,Sheet:()=>Ws,SheetClose:()=>we,SheetContent:()=>Ks,SheetDescription:()=>Js,SheetFooter:()=>Gs,SheetHeader:()=>Vs,SheetTitle:()=>Zs,SheetTrigger:()=>xe,Shell:()=>Ue,ShellContent:()=>Pe,ShellHeader:()=>Uo,ShellMain:()=>$o,ShellNav:()=>Ro,ShellSidebar:()=>qe,ShellSidebarHeader:()=>Io,ShellUserMenu:()=>_e,Sidebar:()=>xt,SidebarClose:()=>Te,SidebarContent:()=>Qt,SidebarFooter:()=>Ao,SidebarGroup:()=>te,SidebarGroupAction:()=>Be,SidebarGroupCollapsible:()=>Ie,SidebarGroupContent:()=>ko,SidebarGroupLabel:()=>ee,SidebarHeader:()=>So,SidebarInput:()=>Co,SidebarInset:()=>Eo,SidebarMenu:()=>wt,SidebarMenuAction:()=>Re,SidebarMenuBadge:()=>Oo,SidebarMenuButton:()=>vt,SidebarMenuItem:()=>se,SidebarMenuSkeleton:()=>To,SidebarMenuSub:()=>No,SidebarMenuSubButton:()=>$e,SidebarMenuSubItem:()=>Bo,SidebarProvider:()=>qr,SidebarRail:()=>Oe,SidebarSeparator:()=>Lo,SidebarTrigger:()=>Ne,Skeleton:()=>Mt,Slider:()=>ks,Spinner:()=>Nt,Switch:()=>he,TabContent:()=>Rt,TabTrigger:()=>ht,Table:()=>qo,Tabs:()=>Tt,TabsContainer:()=>Bt,TabsList:()=>It,TextEditor:()=>Tr,Textarea:()=>jt,ThemeButton:()=>St,Toast:()=>gt,Toggle:()=>Ve,ToggleGroup:()=>xr,ToggleGroupItem:()=>Ge,Tooltip:()=>ct,Typography:()=>As,__info__:()=>Tn,batched:()=>Bn,blockDom:()=>In,cn:()=>m,createNamedIcon:()=>rs,createThemeController:()=>ce,default:()=>hc,findMarkdownTreeNode:()=>Ni,htmlEscape:()=>Rn,iconComponentName:()=>Zi,loadFile:()=>le,loadTemplate:()=>Mc,markRaw:()=>$n,markup:()=>ii,mergeStyle:()=>K,mount:()=>os,normalizeTheme:()=>yi,onError:()=>Un,onMounted:()=>R,onPatched:()=>M,onRendered:()=>qn,onWillDestroy:()=>ue,onWillPatch:()=>Pn,onWillRender:()=>_n,onWillStart:()=>ot,onWillUnmount:()=>U,onWillUpdateProps:()=>z,rawMount:()=>Nc,rawXml:()=>Oc,reactive:()=>Mn,registerGlobalComponents:()=>ji,status:()=>jn,toRaw:()=>zn,useChildSubEnv:()=>T,useComponent:()=>Dn,useEffect:()=>tt,useEnv:()=>Fn,useExternalListener:()=>ss,useRef:()=>L,useState:()=>w,useSubEnv:()=>Hn,validate:()=>Wn,validateType:()=>Kn,whenReady:()=>Vn,xml:()=>zi});C();x();var Cn="1.2.1";A();var Ii={};si(Ii,{Accordion:()=>po,AccordionContent:()=>bo,AccordionItem:()=>ho,AccordionTrigger:()=>Ce,Alert:()=>pt,AlertAction:()=>ns,AlertDescription:()=>Lt,AlertDialog:()=>Is,AlertDialogAction:()=>ge,AlertDialogCancel:()=>fe,AlertDialogContent:()=>Rs,AlertDialogDescription:()=>_s,AlertDialogFooter:()=>Us,AlertDialogHeader:()=>$s,AlertDialogMedia:()=>qs,AlertDialogTitle:()=>Ps,AlertDialogTrigger:()=>me,AlertTitle:()=>is,ApiDoc:()=>Et,ApiDocGroup:()=>Ct,AspectRatio:()=>ar,Attachment:()=>Vo,AttachmentAction:()=>Fe,AttachmentActions:()=>Xo,AttachmentContent:()=>Zo,AttachmentDescription:()=>Yo,AttachmentDropzone:()=>tr,AttachmentGroup:()=>Qo,AttachmentMedia:()=>Go,AttachmentTitle:()=>Jo,AttachmentTrigger:()=>He,Avatar:()=>er,Badge:()=>st,BlockViewer:()=>Je,Breadcrumb:()=>Gt,BreadcrumbEllipsis:()=>ke,BreadcrumbItem:()=>Jt,BreadcrumbLink:()=>Yt,BreadcrumbList:()=>Zt,BreadcrumbPage:()=>Xt,BreadcrumbSeparator:()=>yt,Bubble:()=>cr,Button:()=>S,ButtonGroup:()=>pr,ButtonGroupSeparator:()=>dr,ButtonGroupText:()=>hr,Calendar:()=>je,Card:()=>ls,CardBody:()=>ps,CardDescription:()=>bs,CardFooter:()=>ds,CardHeader:()=>us,CardTitle:()=>hs,Carousel:()=>Fo,CarouselNext:()=>De,CarouselPrevious:()=>ze,CarouselSlide:()=>Ho,Chart:()=>Do,Checkbox:()=>Dt,ClipboardButton:()=>ut,CodeEditor:()=>pe,Collapsible:()=>mo,CollapsibleContent:()=>fo,CollapsibleTrigger:()=>Le,Combobox:()=>jo,Command:()=>zo,ContextMenu:()=>ao,ContextMenuContent:()=>lo,ContextMenuItem:()=>uo,ContextMenuTrigger:()=>co,DataTable:()=>Me,DatePicker:()=>Mo,Dialog:()=>$t,DialogClose:()=>de,DialogContent:()=>bt,DialogDescription:()=>_t,DialogFooter:()=>qt,DialogHeader:()=>Ut,DialogTitle:()=>Pt,DialogTrigger:()=>ms,Direction:()=>lr,Drawer:()=>Ms,DrawerClose:()=>ve,DrawerContent:()=>js,DrawerDescription:()=>Hs,DrawerFooter:()=>Ds,DrawerHeader:()=>zs,DrawerTitle:()=>Fs,DrawerTrigger:()=>ye,DropdownMenu:()=>Ft,DropdownMenuCheckboxItem:()=>Ae,DropdownMenuContent:()=>Ht,DropdownMenuGroup:()=>so,DropdownMenuItem:()=>Wt,DropdownMenuLabel:()=>oo,DropdownMenuRadioGroup:()=>ro,DropdownMenuRadioItem:()=>Ee,DropdownMenuSeparator:()=>io,DropdownMenuShortcut:()=>no,DropdownMenuSub:()=>Kt,DropdownMenuSubContent:()=>Vt,DropdownMenuSubTrigger:()=>ft,DropdownMenuTrigger:()=>mt,Empty:()=>fs,EmptyContent:()=>ws,EmptyDescription:()=>xs,EmptyHeader:()=>gs,EmptyMedia:()=>ys,EmptyTitle:()=>vs,Field:()=>re,FieldContent:()=>fr,FieldDescription:()=>ne,FieldError:()=>ae,FieldGroup:()=>oe,FieldLabel:()=>ie,FieldLegend:()=>mr,FieldSeparator:()=>yr,FieldSet:()=>br,FieldTitle:()=>gr,Form:()=>Qe,HoverCard:()=>Qs,HoverCardContent:()=>eo,HoverCardTrigger:()=>to,Icon:()=>$,Input:()=>Ot,InputOtp:()=>Ns,Item:()=>ur,Kbd:()=>kt,Label:()=>vr,Markdown:()=>At,MarkdownTree:()=>Ze,MarkdownTreeNode:()=>zr,Marker:()=>Es,Menubar:()=>wo,Message:()=>sr,MessageScroller:()=>or,NativeSelect:()=>zt,NavigationMenu:()=>vo,NavigationMenuItem:()=>xo,Pagination:()=>go,PaginationItem:()=>yo,Popover:()=>Ys,PopoverContent:()=>Xs,PopoverTrigger:()=>Se,Progress:()=>nr,Pwa:()=>Sr,PwaBody:()=>kr,PwaClose:()=>Xe,PwaContent:()=>Ar,PwaDescription:()=>Lr,PwaFooter:()=>Or,PwaHeader:()=>Er,PwaSteps:()=>Nr,PwaTitle:()=>Cr,PwaTrigger:()=>Ye,Questionnaire:()=>rr,QuestionnaireNext:()=>Ke,QuestionnairePrevious:()=>We,QuestionnaireStep:()=>ir,RadioGroup:()=>Cs,RadioGroupItem:()=>Ls,Resizable:()=>Wo,ScrollArea:()=>Ko,Select:()=>Os,SelectContent:()=>Ts,SelectItem:()=>Bs,SelectTrigger:()=>be,Separator:()=>Ss,Sheet:()=>Ws,SheetClose:()=>we,SheetContent:()=>Ks,SheetDescription:()=>Js,SheetFooter:()=>Gs,SheetHeader:()=>Vs,SheetTitle:()=>Zs,SheetTrigger:()=>xe,Shell:()=>Ue,ShellContent:()=>Pe,ShellHeader:()=>Uo,ShellMain:()=>$o,ShellNav:()=>Ro,ShellSidebar:()=>qe,ShellSidebarHeader:()=>Io,ShellUserMenu:()=>_e,Sidebar:()=>xt,SidebarClose:()=>Te,SidebarContent:()=>Qt,SidebarFooter:()=>Ao,SidebarGroup:()=>te,SidebarGroupAction:()=>Be,SidebarGroupCollapsible:()=>Ie,SidebarGroupContent:()=>ko,SidebarGroupLabel:()=>ee,SidebarHeader:()=>So,SidebarInput:()=>Co,SidebarInset:()=>Eo,SidebarMenu:()=>wt,SidebarMenuAction:()=>Re,SidebarMenuBadge:()=>Oo,SidebarMenuButton:()=>vt,SidebarMenuItem:()=>se,SidebarMenuSkeleton:()=>To,SidebarMenuSub:()=>No,SidebarMenuSubButton:()=>$e,SidebarMenuSubItem:()=>Bo,SidebarProvider:()=>qr,SidebarRail:()=>Oe,SidebarSeparator:()=>Lo,SidebarTrigger:()=>Ne,Skeleton:()=>Mt,Slider:()=>ks,Spinner:()=>Nt,Switch:()=>he,TabContent:()=>Rt,TabTrigger:()=>ht,Table:()=>qo,Tabs:()=>Tt,TabsContainer:()=>Bt,TabsList:()=>It,TextEditor:()=>Tr,Textarea:()=>jt,ThemeButton:()=>St,Toast:()=>gt,Toggle:()=>Ve,ToggleGroup:()=>xr,ToggleGroupItem:()=>Ge,Tooltip:()=>ct,Typography:()=>As,createNamedIcon:()=>rs,findMarkdownTreeNode:()=>Ni,iconComponentName:()=>Zi});A();x();A();lt();x();var $=class extends c{setup(){this.state=w({failed:!1}),tt(e=>{if(this.state.failed=!1,typeof Image>"u"||!e||e===ci)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 Wr(e,{baseUrl:G(this.props,"base-url","baseUrl")})}get name(){return G(this.props,"icon","name")}get url(){return this.buildUrl(this.state.failed?ci: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}`),K(e.join(";"),this.props.style)}get classNames(){return m("b-icon",this.props.className)}};i($,"template","baseui.Icon"),i($,"props",{icon:n(String),name:n(String),label:n(String),title:n(String),size:n(String),"base-url":n(String),baseUrl:n(String),className:n(String),style:n([String,Object])});function rs(t){return class extends ${get name(){return G(this.props,"icon","name")||t}}}Br();var S=class extends c{setup(){this.rootRef=L("root"),this.props.getRef&&(R(()=>this.props.getRef(this.rootRef.el)),U(()=>this.props.getRef(null)))}get classNames(){return this.props.unstyled?m(this.props.className):m("btn","b-button",V[this.props.variant]||V.default,Z[this.props.size],this.isIconOnly&&"b-button-icon",this.props.className)}get iconPosition(){return G(this.props,"icon-position","iconPosition")==="end"?"end":"start"}get ariaLabel(){return G(this.props,"aria-label","ariaLabel")}get ariaPressed(){return G(this.props,"aria-pressed","ariaPressed")}get ariaInvalid(){let e=G(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)}};i(S,"template","baseui.Button"),i(S,"components",{Icon:$}),i(S,"props",{variant:n(String),size:n(String),type:n(String),href:n(String),disabled:n(Boolean),label:n(String),icon:n(String),"icon-position":n(String),iconPosition:n(String),unstyled:n(Boolean),attrs:n(Object),getRef:n(Function),...p,id:n(String),title:n(String),"aria-label":n(String),ariaLabel:n(String),"aria-pressed":n(String),ariaPressed:n(String),"aria-invalid":n([String,Boolean]),ariaInvalid:n([String,Boolean]),onClick:n(Function)});A();x();ui();var ut=class extends c{setup(){this.state=w({copied:!1}),this.resetTimer=null,U(()=>window.clearTimeout(this.resetTimer))}get classNames(){return li(this.props)}get resetDelay(){return G(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 G(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 Ir(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})}}};i(ut,"template","baseui.ClipboardButton"),i(ut,"components",{Button:S}),i(ut,"props",{variant:n(String),size:n(String),value:n(String),getValue:n(Function),label:n(String),copiedLabel:n(String),icon:n(String),copiedIcon:n(String),"reset-delay":n(Number),resetDelay:n(Number),disabled:n(Boolean),...p,"aria-label":n(String),ariaLabel:n(String),onCopy:n(Function),onCopyError:n(Function)});A();x();A();function N(){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}x();var Jn={default:"b-alert-default",destructive:"b-alert-destructive",info:"b-alert-default",success:"alert-success",warning:"alert-warning",danger:"b-alert-destructive"},pt=class extends c{setup(){this.rootRef=L("root"),this.bootstrapAlert=null,this.props.dismissible&&(R(()=>{this.bootstrapAlert=new(N()).Alert(this.rootRef.el)}),U(()=>{this.bootstrapAlert?.dispose()}))}get classNames(){return m("alert","b-alert",Jn[this.props.variant]||Jn.default,this.props.dismissible&&"alert-dismissible",this.props.dismissible&&"fade",this.props.dismissible&&"show",this.props.className)}};i(pt,"template","baseui.Alert"),i(pt,"components",{Button:S}),i(pt,"props",{variant:n(String),dismissible:n(Boolean),...p});var is=class extends c{};i(is,"template","baseui.AlertTitle"),i(is,"props",p);var Lt=class extends c{};i(Lt,"template","baseui.AlertDescription"),i(Lt,"props",p);var ns=class extends c{};i(ns,"template","baseui.AlertAction"),i(ns,"props",p);A();x();var as={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 st=class extends c{get classNames(){return m("badge",as[this.props.variant]||as.secondary,this.props.pill&&"rounded-pill",this.props.className)}};i(st,"template","baseui.Badge"),i(st,"props",{variant:n(String),pill:n(Boolean),label:n(String),...p});A();x();var kt=class extends c{get classNames(){return m("b-kbd",this.props.className)}};i(kt,"template","baseui.Kbd"),i(kt,"props",{...p});A();x();var Nt=class extends c{get classNames(){return m("b-spinner",this.props.type==="grow"?"spinner-grow":"spinner-border",this.props.className)}get label(){return this.props.label||"Loading"}};i(Nt,"template","baseui.Spinner"),i(Nt,"props",{type:n(String),label:n(String),className:n(String),style:n([String,Object])});var dt={line:["//"],block:["/*","*/"],quotes:`"'`},pi={line:["#"],quotes:`"'`},Yn="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",Fc="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",Xn="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",Kr={plaintext:{label:"Plain text",indent:" "},javascript:{label:"JavaScript",...dt,quotes:"\"'`",multiline:"`",indent:" ",keywords:Xn,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",...dt,quotes:"\"'`",multiline:"`",indent:" ",keywords:`${Xn} 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",...dt,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",...dt,indent:" ",keywords:Yn,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++",...dt,indent:" ",keywords:`${Yn} 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",...dt,indent:" ",keywords:Fc,builtins:"String System Object Integer Long Double Boolean List Map Set ArrayList HashMap Exception Override Math"},csharp:{label:"C#",...dt,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",...dt,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",...dt,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",...dt,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",...pi,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",...pi,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,...pi,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,...pi,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"}};Kr.xml={...Kr.html,label:"XML"};var Hc={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"},Wc={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:""},Wi=/[A-Za-z_$]/,oa=/[A-Za-z0-9_$]/,ra=/[A-Za-z0-9_:-]/,Kc=/[0-9A-Za-z_.]/,Qn=/[0-9]/,Vc=/[A-Za-z0-9_-]/,ta=/^#[0-9a-fA-F]{3,8}\b/,Gc=/^&#?\w+;/,Zc=/[A-Za-z/!?]/,Hi=new Map;function ea(t,e){return new Set((t?e?t.toLowerCase():t:"").split(" ").filter(Boolean))}function Gr(t){let e=String(t??"").trim().toLowerCase(),s=Hc[e]??e,o=s in Kr?s:"plaintext";if(!Hi.has(o)){let r=Kr[o];Hi.set(o,{id:o,...r,keywordSet:ea(r.keywords,r.ci),builtinSet:ea(r.builtins,r.ci)})}return Hi.get(o)}function ia(t){let e=String(t??"").split(/[?#]/)[0].split("/").pop();return e.includes(".")?e.split(".").pop().toLowerCase():""}var cb=Object.keys(Kr);function Vr(t,e,s){let o=e;for(;o<t.length&&s.test(t[o]);)o+=1;return o}function Jc(t,e,s){if(s.block&&t.startsWith(s.block[0],e)){let r=t.indexOf(s.block[1],e+s.block[0].length);return r===-1?t.length:r+s.block[1].length}if(!s.line?.some(r=>t.startsWith(r,e)))return-1;let o=t.indexOf(`
|
|
31
|
+
`,e);return o===-1?t.length:o}function na(t,e,s){let o=t[e],r=s.multiline?.includes(o),a=e+1;for(;a<t.length&&t[a]!==o&&(r||t[a]!==`
|
|
32
|
+
`);)a+=t[a]==="\\"?2:1;return Math.min(t.length,t[a]===o?a+1:a)}function Yc(t,e){let s=e-1;for(;s>=0&&/\s/.test(t[s]);)s-=1;return t[s]}function sa(t,e,s,o){return!o.keys||!/^\s*:(?!:|\/\/)/.test(t.slice(s,s+8))?!1:o.keys!=="prop"||"{;".includes(Yc(t,e))}function Xc(t,e,s,o){let r=o.ci?t.slice(e,s).toLowerCase():t.slice(e,s);if(o.keywordSet.has(r))return"keyword";let a=t[e-1]==="."||t[e-1]===":";return o.builtinSet.has(r)&&!a?"builtin":o.plainWords?"plain":/^\s*\(/.test(t.slice(s,s+8))?"function":/^[A-Z][A-Za-z0-9_$]*[a-z]/.test(r)?"type":"plain"}function Qc(t,e,s,o){let r=t[e],a=/^(\/|\?)?>/.exec(t.slice(e,e+2));return a?(o.inTag=!1,["tag",e+a[0].length]):s.quotes.includes(r)?["string",na(t,e,s)]:Wi.test(r)?["attr",Vr(t,e+1,ra)]:["plain",e+1]}function tl(t,e,s){if(t[e]==="<"&&Zc.test(t[e+1]??""))return s.inTag=!0,["tag",Vr(t,e+2,ra)];let o=t[e]==="&"?Gc.exec(t.slice(e,e+12)):null;return o?["number",e+o[0].length]:["plain",e+1]}function el(t,e,s){let o=t[e];return!(o==="$"&&s.variables||o==="@"&&s.annotations)||!Wi.test(t[e+1]??"")?null:[o==="$"?"variable":"meta",Vr(t,e+2,oa)]}function sl(t,e,s,o,r){let a=t[e];if(r.inTag)return Qc(t,e,s,r);let l=Jc(t,e,s);if(l!==-1)return["comment",l];if(s.tags)return tl(t,e,r);if(s.quotes?.includes(a)){let v=na(t,e,s);return[sa(t,e,v,s)?"attr":"string",v]}if(s.hex&&a==="#"&&ta.test(t.slice(e,e+10)))return["number",e+ta.exec(t.slice(e,e+10))[0].length];if(Qn.test(a)||a==="."&&Qn.test(t[e+1]??""))return["number",Vr(t,e+1,Kc)];let u=el(t,e,s);if(u)return u;let d=s.dashed&&a==="-"&&/[A-Za-z-]/.test(t[e+1]??"");if(!Wi.test(a)&&!d)return["plain",e+1];let b=Vr(t,e+1,s.dashed?Vc:oa);if(sa(t,e,b,s))return["attr",b];let f=Xc(t,e,b,s);return[f==="plain"&&o.has(t.slice(e,b))&&t[e-1]!=="."?"builtin":f,b]}function di(t,e,s=[]){let o=Gr(e),r=new Set(s),a={inTag:!1},l=[],u=0;for(;u<t.length;){let[d,b]=sl(t,u,o,r,a),f=t.slice(u,b),g=l[l.length-1];d==="plain"&&g?.kind==="plain"?g.text+=f:l.push({kind:d,text:f,className:Wc[d]}),u=b}return l}function aa(t,e){return t.startsWith(" ")?1:/^ */.exec(t.slice(0,e.length))[0].length}var ol=new Set(["javascript","typescript","go","c","cpp","java","csharp","kotlin","swift","rust","php","css","lua","html","xml"]),rl=new Set("area base br col embed hr img input link meta source track wbr".split(" ")),il=/^[}\])]+/,nl=/\b(function|if|for|while|repeat)\b/g,al=/\b(end|until)\b/g,cl=/^(else|elseif)\b/,ll=/^(end|until)\b/;function cs(t,e){return(t.match(e)??[]).length}function ul(t,e){let s=new Uint8Array(t.length),o="",r=0;for(let{kind:a,text:l}of di(t,e)){let u=a==="comment"||a==="string";o+=u?l.replace(/[^\n]/g," "):l,u&&s.fill(1,r,r+l.length),r+=l.length}return{masked:o,inside:s}}function pl(t,e){let s=u=>!(e&&rl.has(u.toLowerCase())),o=[...t.matchAll(/<([A-Za-z][\w:.-]*)/g)].filter(u=>s(u[1])).length,r=[...t.matchAll(/<([A-Za-z][\w:.-]*)[^<>]*\/>/g)].filter(u=>s(u[1])).length,a=t.includes("<")?0:cs(t,/\/>/g);return{leading:cs(/^(?:<\/[^>]*>\s*)+/.exec(t)?.[0]??"",/<\//g),net:o-r-a-cs(t,/<\//g)}}function dl(t,e){let s=t.trim();if(e.tags)return pl(s,e.id==="html");let o=e.id==="lua",r=il.exec(s)?.[0].length??0,a=cs(s,/[{([]/g)-cs(s,/[})\]]/g);if(!o)return{leading:r,net:a};let l=cs(s,nl)+(/^do\b/.test(s)?1:0)-cs(s,al);return{leading:r||(cl.test(s)||ll.test(s)?1:0),net:a+l}}function hl(t,e){return(t.id==="c"||t.id==="cpp")&&e.startsWith("#")}function bl(t,e){let{masked:s,inside:o}=ul(t,e.id),r=[],a=0,l=0;for(let u of t.split(`
|
|
33
|
+
`)){let d=s.slice(l,l+u.length),b=l>0&&o[l-1]===1;l+=u.length+1;let f=u.trim(),{leading:g,net:v}=dl(d,e);b?r.push(u.trimEnd()):f?hl(e,f)?r.push(f):r.push(e.indent.repeat(Math.max(0,a-g))+f):r.push(""),a=Math.max(0,a+v)}return r}function ml(t){return t.split(`
|
|
34
|
+
`).map(e=>e.trimEnd())}function fl(t){return`${t.filter((s,o)=>s!==""||o>0&&t[o-1]!=="").join(`
|
|
16
35
|
`).replace(/^\n+|\n+$/g,"")}
|
|
17
|
-
`}function
|
|
18
|
-
`);return
|
|
19
|
-
`:
|
|
36
|
+
`}function ca(t,e){let s=Gr(e),o=String(t??"").replace(/\r\n?/g,`
|
|
37
|
+
`);return o.trim()?s.id==="json"?`${JSON.stringify(JSON.parse(o),null,2)}
|
|
38
|
+
`:fl(ol.has(s.id)?bl(o,s):ml(o)):""}var pe=class extends c{setup(){this.state=w({text:null,name:"",loading:!1,error:"",editing:!this.props.readonly}),this.fileInput=L("fileInput"),this.input=L("input"),this.controller=null,R(()=>this.syncInput()),M(()=>this.syncInput()),ot(()=>this.loadUrl(this.props.src)),z(e=>{if(e.readonly!==this.props.readonly&&(this.state.editing=!e.readonly),e.src!==this.props.src)return this.loadUrl(e.src)}),U(()=>this.controller?.abort()),this.tabReleased=!1}get classNames(){return m("b-code-editor",this.props.className)}get code(){return this.state.text??this.props.value??""}get codeLang(){return this.props.codeLang??ia(this.state.name||this.props.src)}get language(){return Gr(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 di(`${this.code}
|
|
20
39
|
`,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},(
|
|
22
|
-
`)}commit(
|
|
23
|
-
`).length-1,
|
|
24
|
-
`)+1).replaceAll(" "," ".repeat(4)).length,
|
|
25
|
-
`,
|
|
26
|
-
${
|
|
27
|
-
`,o.selectionStart-1)+1,s=pi(o.value.slice(r),this.language.indent);if(!s)return;let{selectionStart:n,selectionEnd:c}=o;o.setRangeText("",r,r+s,"preserve"),o.setSelectionRange(Math.max(r,n-s),Math.max(r,c-s))}};a(de,"template","baseui.CodeEditor"),a(de,"components",{Alert:ut,AlertDescription:At,Badge:rt,Button:S,ClipboardButton:pt,Kbd:Lt,Spinner:Et}),a(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),...d});C();v();var lo=class extends l{get tag(){return this.props.tag||"div"}};a(lo,"template","baseui.Card"),a(lo,"props",{...d,tag:i(String)});var po=class extends l{};a(po,"template","baseui.CardHeader"),a(po,"props",d);var uo=class extends l{};a(uo,"template","baseui.CardBody"),a(uo,"props",d);var ho=class extends l{};a(ho,"template","baseui.CardFooter"),a(ho,"props",d);var bo=class extends l{};a(bo,"template","baseui.CardTitle"),a(bo,"props",d);var mo=class extends l{};a(mo,"template","baseui.CardDescription"),a(mo,"props",d);v();C();v();var vb=t("a-arrow-down"),wb=t("a-arrow-up"),Sb=t("a-large-small"),Cb=t("accessibility"),kb=t("activity"),Ab=t("activity-square"),Lb=t("ad"),Eb=t("air-vent"),Bb=t("airplay"),Tb=t("alarm-check"),qb=t("alarm-clock"),Ob=t("alarm-clock-check"),Rb=t("alarm-clock-minus"),Pb=t("alarm-clock-off"),Nb=t("alarm-clock-plus"),Mb=t("alarm-minus"),Ub=t("alarm-plus"),Db=t("alarm-smoke"),Fb=t("album"),$b=t("alert-circle"),zb=t("alert-octagon"),Hb=t("alert-triangle"),jb=t("align-center"),_b=t("align-center-horizontal"),Wb=t("align-center-vertical"),Vb=t("align-end-horizontal"),Kb=t("align-end-vertical"),Gb=t("align-horizontal-distribute-center"),Xb=t("align-horizontal-distribute-end"),Zb=t("align-horizontal-distribute-start"),Jb=t("align-horizontal-justify-center"),Qb=t("align-horizontal-justify-end"),Yb=t("align-horizontal-justify-start"),tm=t("align-horizontal-space-around"),em=t("align-horizontal-space-between"),om=t("align-justify"),rm=t("align-left"),sm=t("align-right"),nm=t("align-start-horizontal"),am=t("align-start-vertical"),im=t("align-vertical-distribute-center"),cm=t("align-vertical-distribute-end"),lm=t("align-vertical-distribute-start"),pm=t("align-vertical-justify-center"),um=t("align-vertical-justify-end"),dm=t("align-vertical-justify-start"),hm=t("align-vertical-space-around"),bm=t("align-vertical-space-between"),mm=t("ambulance"),fm=t("ampersand"),gm=t("ampersands"),xm=t("amphora"),Im=t("anchor"),ym=t("angle"),vm=t("angry"),wm=t("annoyed"),Sm=t("antenna"),Cm=t("anvil"),km=t("aperture"),Am=t("app-window"),Lm=t("app-window-mac"),Em=t("apple"),Bm=t("archive"),Tm=t("archive-restore"),qm=t("archive-x"),Om=t("area-chart"),Rm=t("armchair"),Pm=t("arrow-big-down"),Nm=t("arrow-big-down-dash"),Mm=t("arrow-big-left"),Um=t("arrow-big-left-dash"),Dm=t("arrow-big-right"),Fm=t("arrow-big-right-dash"),$m=t("arrow-big-up"),zm=t("arrow-big-up-dash"),Hm=t("arrow-down"),jm=t("arrow-down-01"),_m=t("arrow-down-10"),Wm=t("arrow-down-a-z"),Vm=t("arrow-down-az"),Km=t("arrow-down-circle"),Gm=t("arrow-down-from-line"),Xm=t("arrow-down-left"),Zm=t("arrow-down-left-from-circle"),Jm=t("arrow-down-left-from-square"),Qm=t("arrow-down-left-square"),Ym=t("arrow-down-narrow-wide"),tf=t("arrow-down-right"),ef=t("arrow-down-right-from-circle"),of=t("arrow-down-right-from-square"),rf=t("arrow-down-right-square"),sf=t("arrow-down-square"),nf=t("arrow-down-to-dot"),af=t("arrow-down-to-line"),cf=t("arrow-down-up"),lf=t("arrow-down-wide-narrow"),pf=t("arrow-down-z-a"),uf=t("arrow-down-za"),df=t("arrow-left"),hf=t("arrow-left-circle"),bf=t("arrow-left-from-line"),mf=t("arrow-left-right"),ff=t("arrow-left-square"),gf=t("arrow-left-to-line"),xf=t("arrow-right"),If=t("arrow-right-circle"),yf=t("arrow-right-from-line"),vf=t("arrow-right-left"),wf=t("arrow-right-square"),Sf=t("arrow-right-to-line"),Cf=t("arrow-up"),kf=t("arrow-up-01"),Af=t("arrow-up-10"),Lf=t("arrow-up-a-z"),Ef=t("arrow-up-az"),Bf=t("arrow-up-circle"),Tf=t("arrow-up-down"),qf=t("arrow-up-from-dot"),Of=t("arrow-up-from-line"),Rf=t("arrow-up-left"),Pf=t("arrow-up-left-from-circle"),Nf=t("arrow-up-left-from-square"),Mf=t("arrow-up-left-square"),Uf=t("arrow-up-narrow-wide"),Df=t("arrow-up-right"),Ff=t("arrow-up-right-from-circle"),$f=t("arrow-up-right-from-square"),zf=t("arrow-up-right-square"),Hf=t("arrow-up-square"),jf=t("arrow-up-to-line"),_f=t("arrow-up-wide-narrow"),Wf=t("arrow-up-z-a"),Vf=t("arrow-up-za"),Kf=t("arrows-up-from-line"),Gf=t("asterisk"),Xf=t("asterisk-square"),Zf=t("astroid"),Jf=t("at-sign"),Qf=t("atom"),Yf=t("audio-lines"),tg=t("audio-lines-x"),eg=t("audio-waveform"),og=t("award"),rg=t("axe"),sg=t("axis-3-d"),ng=t("axis-3d"),ag=t("baby"),ig=t("backpack"),cg=t("badge"),lg=t("badge-alert"),pg=t("badge-cent"),ug=t("badge-check"),dg=t("badge-dollar-sign"),hg=t("badge-euro"),bg=t("badge-help"),mg=t("badge-indian-rupee"),fg=t("badge-info"),gg=t("badge-japanese-yen"),xg=t("badge-minus"),Ig=t("badge-percent"),yg=t("badge-plus"),vg=t("badge-pound-sterling"),wg=t("badge-question-mark"),Sg=t("badge-russian-ruble"),Cg=t("badge-swiss-franc"),kg=t("badge-turkish-lira"),Ag=t("badge-x"),Lg=t("baggage-claim"),Eg=t("balloon"),Bg=t("ban"),Tg=t("banana"),qg=t("bandage"),Og=t("banknote"),Rg=t("banknote-arrow-down"),Pg=t("banknote-arrow-up"),Ng=t("banknote-check"),Mg=t("banknote-x"),Ug=t("bar-chart"),Dg=t("bar-chart-2"),Fg=t("bar-chart-3"),$g=t("bar-chart-4"),zg=t("bar-chart-big"),Hg=t("bar-chart-horizontal"),jg=t("bar-chart-horizontal-big"),_g=t("barcode"),Wg=t("barrel"),Vg=t("baseline"),Kg=t("bath"),Gg=t("battery"),Xg=t("battery-charging"),Zg=t("battery-full"),Jg=t("battery-low"),Qg=t("battery-medium"),Yg=t("battery-plus"),tx=t("battery-warning"),ex=t("beaker"),ox=t("bean"),rx=t("bean-off"),sx=t("bed"),nx=t("bed-double"),ax=t("bed-single"),ix=t("beef"),cx=t("beef-off"),lx=t("beer"),px=t("beer-off"),ux=t("bell"),dx=t("bell-check"),hx=t("bell-dot"),bx=t("bell-electric"),mx=t("bell-minus"),fx=t("bell-off"),gx=t("bell-plus"),xx=t("bell-ring"),Ix=t("between-horizonal-end"),yx=t("between-horizonal-start"),vx=t("between-horizontal-end"),wx=t("between-horizontal-start"),Sx=t("between-vertical-end"),Cx=t("between-vertical-start"),kx=t("biceps-flexed"),Ax=t("bike"),Lx=t("binary"),Ex=t("binoculars"),Bx=t("biohazard"),Tx=t("bird"),qx=t("birdhouse"),Ox=t("bitcoin"),Rx=t("blend"),Px=t("blender"),Nx=t("blinds"),Mx=t("blocks"),Ux=t("bluetooth"),Dx=t("bluetooth-connected"),Fx=t("bluetooth-off"),$x=t("bluetooth-searching"),zx=t("bold"),Hx=t("bolt"),jx=t("bomb"),_x=t("bone"),Wx=t("bone-fracture"),Vx=t("book"),Kx=t("book-a"),Gx=t("book-alert"),Xx=t("book-audio"),Zx=t("book-check"),Jx=t("book-copy"),Qx=t("book-dashed"),Yx=t("book-down"),tI=t("book-headphones"),eI=t("book-heart"),oI=t("book-image"),rI=t("book-key"),sI=t("book-lock"),nI=t("book-marked"),aI=t("book-minus"),iI=t("book-open"),cI=t("book-open-check"),lI=t("book-open-text"),pI=t("book-plus"),uI=t("book-search"),dI=t("book-template"),hI=t("book-text"),bI=t("book-type"),mI=t("book-up"),fI=t("book-up-2"),gI=t("book-user"),xI=t("book-x"),II=t("bookmark"),yI=t("bookmark-check"),vI=t("bookmark-minus"),wI=t("bookmark-off"),SI=t("bookmark-plus"),CI=t("bookmark-x"),kI=t("boom-box"),AI=t("bot"),LI=t("bot-message-square"),EI=t("bot-off"),BI=t("bottle-wine"),TI=t("bow-arrow"),qI=t("box"),OI=t("box-select"),RI=t("boxes"),PI=t("braces"),NI=t("brackets"),MI=t("brain"),UI=t("brain-circuit"),DI=t("brain-cog"),FI=t("brick-wall"),$I=t("brick-wall-fire"),zI=t("brick-wall-shield"),HI=t("briefcase"),jI=t("briefcase-business"),_I=t("briefcase-conveyor-belt"),WI=t("briefcase-medical"),VI=t("bring-to-front"),KI=t("broccoli"),GI=t("broom"),XI=t("broom-sparkles"),ZI=t("brush"),JI=t("brush-cleaning"),QI=t("bubbles"),YI=t("bug"),ty=t("bug-off"),ey=t("bug-play"),oy=t("building"),ry=t("building-2"),sy=t("bus"),ny=t("bus-front"),ay=t("cable"),iy=t("cable-car"),cy=t("cake"),ly=t("cake-slice"),py=t("calculator"),uy=t("calendar"),dy=t("calendar-1"),hy=t("calendar-arrow-down"),by=t("calendar-arrow-up"),my=t("calendar-check"),fy=t("calendar-check-2"),gy=t("calendar-clock"),xy=t("calendar-cog"),Iy=t("calendar-days"),yy=t("calendar-fold"),vy=t("calendar-heart"),wy=t("calendar-minus"),Sy=t("calendar-minus-2"),Cy=t("calendar-off"),ky=t("calendar-plus"),Ay=t("calendar-plus-2"),Ly=t("calendar-range"),Ey=t("calendar-search"),By=t("calendar-sync"),Ty=t("calendar-x"),qy=t("calendar-x-2"),Oy=t("calendars"),Ry=t("camera"),Py=t("camera-off"),Ny=t("candlestick-chart"),My=t("candy"),Uy=t("candy-cane"),Dy=t("candy-off"),Fy=t("cannabis"),$y=t("cannabis-off"),zy=t("captions"),Hy=t("captions-off"),jy=t("car"),_y=t("car-front"),Wy=t("car-taxi-front"),Vy=t("caravan"),Ky=t("card-sim"),Gy=t("carrot"),Xy=t("case-lower"),Zy=t("case-sensitive"),Jy=t("case-upper"),Qy=t("cassette-tape"),Yy=t("cast"),tv=t("castle"),ev=t("cat"),ov=t("cctv"),rv=t("cctv-off"),sv=t("chart-area"),nv=t("chart-bar"),av=t("chart-bar-big"),iv=t("chart-bar-decreasing"),cv=t("chart-bar-increasing"),lv=t("chart-bar-stacked"),pv=t("chart-candlestick"),uv=t("chart-column"),dv=t("chart-column-big"),hv=t("chart-column-decreasing"),bv=t("chart-column-increasing"),mv=t("chart-column-stacked"),fv=t("chart-gantt"),gv=t("chart-line"),xv=t("chart-network"),Iv=t("chart-no-axes-column"),yv=t("chart-no-axes-column-decreasing"),vv=t("chart-no-axes-column-increasing"),wv=t("chart-no-axes-combined"),Sv=t("chart-no-axes-gantt"),Cv=t("chart-pie"),kv=t("chart-scatter"),Av=t("chart-spline"),Lv=t("check"),Ev=t("check-check"),Bv=t("check-circle"),Tv=t("check-circle-2"),qv=t("check-line"),Ov=t("check-square"),Rv=t("check-square-2"),Pv=t("chef-hat"),Nv=t("cherry"),Mv=t("chess-bishop"),Uv=t("chess-king"),Dv=t("chess-knight"),Fv=t("chess-pawn"),$v=t("chess-queen"),zv=t("chess-rook"),Hv=t("chevron-down"),jv=t("chevron-down-circle"),_v=t("chevron-down-square"),Wv=t("chevron-first"),Vv=t("chevron-last"),Kv=t("chevron-left"),Gv=t("chevron-left-circle"),Xv=t("chevron-left-square"),Zv=t("chevron-right"),Jv=t("chevron-right-circle"),Qv=t("chevron-right-square"),Yv=t("chevron-up"),tw=t("chevron-up-circle"),ew=t("chevron-up-square"),ow=t("chevrons-down"),rw=t("chevrons-down-up"),sw=t("chevrons-left"),nw=t("chevrons-left-right"),aw=t("chevrons-left-right-ellipsis"),iw=t("chevrons-right"),cw=t("chevrons-right-left"),lw=t("chevrons-up"),pw=t("chevrons-up-down"),uw=t("church"),dw=t("cigarette"),hw=t("cigarette-off"),bw=t("circle"),mw=t("circle-alert"),fw=t("circle-arrow-down"),gw=t("circle-arrow-left"),xw=t("circle-arrow-out-down-left"),Iw=t("circle-arrow-out-down-right"),yw=t("circle-arrow-out-up-left"),vw=t("circle-arrow-out-up-right"),ww=t("circle-arrow-right"),Sw=t("circle-arrow-up"),Cw=t("circle-check"),kw=t("circle-check-big"),Aw=t("circle-chevron-down"),Lw=t("circle-chevron-left"),Ew=t("circle-chevron-right"),Bw=t("circle-chevron-up"),Tw=t("circle-dashed"),qw=t("circle-divide"),Ow=t("circle-dollar-sign"),Rw=t("circle-dot"),Pw=t("circle-dot-dashed"),Nw=t("circle-ellipsis"),Mw=t("circle-equal"),Uw=t("circle-euro"),Dw=t("circle-fading-arrow-up"),Fw=t("circle-fading-plus"),$w=t("circle-gauge"),zw=t("circle-help"),Hw=t("circle-minus"),jw=t("circle-off"),_w=t("circle-parking"),Ww=t("circle-parking-off"),Vw=t("circle-pause"),Kw=t("circle-percent"),Gw=t("circle-pile"),Xw=t("circle-play"),Zw=t("circle-plus"),Jw=t("circle-pound-sterling"),Qw=t("circle-power"),bn=t("circle-question-mark"),Yw=t("circle-slash"),tS=t("circle-slash-2"),eS=t("circle-slashed"),oS=t("circle-small"),rS=t("circle-star"),sS=t("circle-stop"),nS=t("circle-user"),aS=t("circle-user-round"),iS=t("circle-x"),cS=t("circuit-board"),lS=t("citrus"),pS=t("clapperboard"),uS=t("clipboard"),dS=t("clipboard-check"),hS=t("clipboard-clock"),bS=t("clipboard-copy"),mS=t("clipboard-edit"),fS=t("clipboard-list"),gS=t("clipboard-minus"),xS=t("clipboard-paste"),IS=t("clipboard-pen"),yS=t("clipboard-pen-line"),vS=t("clipboard-plus"),wS=t("clipboard-signature"),SS=t("clipboard-type"),CS=t("clipboard-x"),kS=t("clock"),AS=t("clock-1"),LS=t("clock-10"),ES=t("clock-11"),BS=t("clock-12"),TS=t("clock-2"),qS=t("clock-3"),OS=t("clock-4"),RS=t("clock-5"),PS=t("clock-6"),NS=t("clock-7"),MS=t("clock-8"),US=t("clock-9"),DS=t("clock-alert"),FS=t("clock-arrow-down"),$S=t("clock-arrow-left"),zS=t("clock-arrow-right"),HS=t("clock-arrow-up"),jS=t("clock-check"),_S=t("clock-fading"),WS=t("clock-plus"),VS=t("closed-caption"),KS=t("cloud"),GS=t("cloud-alert"),XS=t("cloud-backup"),ZS=t("cloud-check"),JS=t("cloud-cog"),QS=t("cloud-download"),YS=t("cloud-drizzle"),tC=t("cloud-fog"),eC=t("cloud-hail"),oC=t("cloud-lightning"),rC=t("cloud-moon"),sC=t("cloud-moon-rain"),nC=t("cloud-off"),aC=t("cloud-rain"),iC=t("cloud-rain-wind"),cC=t("cloud-snow"),lC=t("cloud-sun"),pC=t("cloud-sun-rain"),uC=t("cloud-sync"),dC=t("cloud-upload"),hC=t("cloudy"),bC=t("clover"),mC=t("club"),fC=t("code"),gC=t("code-2"),xC=t("code-square"),IC=t("code-xml"),yC=t("coffee"),vC=t("cog"),wC=t("coins"),SC=t("columns"),CC=t("columns-2"),kC=t("columns-3"),AC=t("columns-3-cog"),LC=t("columns-4"),EC=t("columns-settings"),BC=t("combine"),TC=t("command"),qC=t("compass"),OC=t("component"),RC=t("computer"),PC=t("concierge-bell"),NC=t("cone"),MC=t("construction"),UC=t("contact"),DC=t("contact-2"),FC=t("contact-round"),$C=t("container"),zC=t("contrast"),HC=t("cookie"),jC=t("cooking-pot"),_C=t("copy"),WC=t("copy-check"),VC=t("copy-minus"),KC=t("copy-plus"),GC=t("copy-slash"),XC=t("copy-x"),ZC=t("copyleft"),JC=t("copyright"),QC=t("corner-down-left"),YC=t("corner-down-right"),tk=t("corner-left-down"),ek=t("corner-left-up"),ok=t("corner-right-down"),rk=t("corner-right-up"),sk=t("corner-up-left"),nk=t("corner-up-right"),ak=t("cpu"),ik=t("creative-commons"),ck=t("credit-card"),lk=t("croissant"),pk=t("crop"),uk=t("cross"),dk=t("crosshair"),hk=t("crown"),bk=t("cuboid"),mk=t("cup-soda"),fk=t("curly-braces"),gk=t("currency"),xk=t("cylinder"),Ik=t("dam"),yk=t("database"),vk=t("database-arrow-down"),wk=t("database-arrow-up"),Sk=t("database-backup"),Ck=t("database-check"),kk=t("database-minus"),Ak=t("database-plus"),Lk=t("database-search"),Ek=t("database-x"),Bk=t("database-zap"),Tk=t("decimals-arrow-left"),qk=t("decimals-arrow-right"),Ok=t("delete"),Rk=t("dessert"),Pk=t("diameter"),Nk=t("diamond"),Mk=t("diamond-minus"),Uk=t("diamond-percent"),Dk=t("diamond-plus"),Fk=t("dice-1"),$k=t("dice-2"),zk=t("dice-3"),Hk=t("dice-4"),jk=t("dice-5"),_k=t("dice-6"),Wk=t("dices"),Vk=t("diff"),Kk=t("disc"),Gk=t("disc-2"),Xk=t("disc-3"),Zk=t("disc-album"),Jk=t("divide"),Qk=t("divide-circle"),Yk=t("divide-square"),tA=t("dna"),eA=t("dna-off"),oA=t("dock"),rA=t("dog"),sA=t("dollar-sign"),nA=t("donut"),aA=t("door-closed"),iA=t("door-closed-locked"),cA=t("door-open"),lA=t("dot"),pA=t("dot-square"),uA=t("download"),dA=t("download-cloud"),hA=t("drafting-compass"),bA=t("drama"),mA=t("drill"),fA=t("drone"),gA=t("droplet"),xA=t("droplet-off"),IA=t("droplets"),yA=t("drum"),vA=t("drumstick"),wA=t("dumbbell"),SA=t("ear"),CA=t("ear-off"),kA=t("earth"),AA=t("earth-lock"),LA=t("eclipse"),EA=t("edit"),BA=t("edit-2"),TA=t("edit-3"),qA=t("egg"),OA=t("egg-fried"),RA=t("egg-off"),PA=t("eject"),NA=t("ellipse"),MA=t("ellipsis"),UA=t("ellipsis-vertical"),DA=t("equal"),FA=t("equal-approximately"),$A=t("equal-not"),zA=t("equal-square"),HA=t("eraser"),jA=t("ethernet-port"),_A=t("euro"),WA=t("ev-charger"),VA=t("expand"),KA=t("external-link"),GA=t("eye"),XA=t("eye-closed"),ZA=t("eye-dashed"),JA=t("eye-off"),QA=t("face-angry"),YA=t("face-expressionless"),tL=t("face-grinning"),eL=t("face-neutral"),oL=t("face-slightly-frowning"),rL=t("face-slightly-smiling"),sL=t("face-slightly-smiling-plus"),nL=t("factory"),aL=t("fan"),iL=t("fast-forward"),cL=t("feather"),lL=t("fence"),pL=t("ferris-wheel"),uL=t("file"),dL=t("file-archive"),hL=t("file-audio"),bL=t("file-audio-2"),mL=t("file-axis-3-d"),fL=t("file-axis-3d"),gL=t("file-badge"),xL=t("file-badge-2"),IL=t("file-bar-chart"),yL=t("file-bar-chart-2"),vL=t("file-box"),wL=t("file-braces"),SL=t("file-braces-corner"),CL=t("file-chart-column"),kL=t("file-chart-column-increasing"),AL=t("file-chart-line"),LL=t("file-chart-pie"),EL=t("file-check"),BL=t("file-check-2"),TL=t("file-check-corner"),qL=t("file-clock"),OL=t("file-code"),RL=t("file-code-2"),PL=t("file-code-corner"),NL=t("file-cog"),ML=t("file-cog-2"),UL=t("file-diff"),DL=t("file-digit"),FL=t("file-down"),$L=t("file-edit"),zL=t("file-exclamation-point"),HL=t("file-headphone"),jL=t("file-heart"),_L=t("file-image"),WL=t("file-input"),VL=t("file-json"),KL=t("file-json-2"),GL=t("file-key"),XL=t("file-key-2"),ZL=t("file-line-chart"),JL=t("file-lock"),QL=t("file-lock-2"),YL=t("file-minus"),tE=t("file-minus-2"),eE=t("file-minus-corner"),oE=t("file-music"),rE=t("file-output"),sE=t("file-pen"),nE=t("file-pen-line"),aE=t("file-pie-chart"),iE=t("file-play"),cE=t("file-plus"),lE=t("file-plus-2"),pE=t("file-plus-corner"),uE=t("file-question"),dE=t("file-question-mark"),hE=t("file-scan"),bE=t("file-search"),mE=t("file-search-2"),fE=t("file-search-corner"),gE=t("file-signal"),xE=t("file-signature"),IE=t("file-sliders"),yE=t("file-spreadsheet"),vE=t("file-stack"),wE=t("file-symlink"),SE=t("file-terminal"),CE=t("file-text"),kE=t("file-type"),AE=t("file-type-2"),LE=t("file-type-corner"),EE=t("file-up"),BE=t("file-user"),TE=t("file-video"),qE=t("file-video-2"),OE=t("file-video-camera"),RE=t("file-volume"),PE=t("file-volume-2"),NE=t("file-warning"),ME=t("file-x"),UE=t("file-x-2"),DE=t("file-x-corner"),FE=t("files"),$E=t("film"),zE=t("filter"),HE=t("filter-x"),jE=t("fingerprint"),_E=t("fingerprint-pattern"),WE=t("fire-extinguisher"),VE=t("fish"),KE=t("fish-off"),GE=t("fish-symbol"),XE=t("fishing-hook"),ZE=t("fishing-rod"),JE=t("flag"),QE=t("flag-off"),YE=t("flag-triangle-left"),tB=t("flag-triangle-right"),eB=t("flame"),oB=t("flame-kindling"),rB=t("flashlight"),sB=t("flashlight-off"),nB=t("flask-conical"),aB=t("flask-conical-off"),iB=t("flask-round"),cB=t("flip-horizontal"),lB=t("flip-horizontal-2"),pB=t("flip-vertical"),uB=t("flip-vertical-2"),dB=t("flower"),hB=t("flower-2"),bB=t("focus"),mB=t("fold-horizontal"),fB=t("fold-vertical"),gB=t("folder"),xB=t("folder-archive"),IB=t("folder-bookmark"),yB=t("folder-check"),vB=t("folder-clock"),wB=t("folder-closed"),SB=t("folder-code"),CB=t("folder-cog"),kB=t("folder-cog-2"),AB=t("folder-dot"),LB=t("folder-down"),EB=t("folder-edit"),BB=t("folder-git"),TB=t("folder-git-2"),qB=t("folder-heart"),OB=t("folder-input"),RB=t("folder-kanban"),PB=t("folder-key"),NB=t("folder-lock"),MB=t("folder-minus"),UB=t("folder-open"),DB=t("folder-open-dot"),FB=t("folder-output"),$B=t("folder-pen"),zB=t("folder-plus"),HB=t("folder-root"),jB=t("folder-search"),_B=t("folder-search-2"),WB=t("folder-symlink"),VB=t("folder-sync"),KB=t("folder-tree"),GB=t("folder-up"),XB=t("folder-x"),ZB=t("folders"),JB=t("footprints"),QB=t("fork-knife"),YB=t("fork-knife-crossed"),tT=t("forklift"),eT=t("form"),oT=t("form-input"),rT=t("forward"),sT=t("frame"),nT=t("frown"),aT=t("fuel"),iT=t("fullscreen"),cT=t("function-square"),lT=t("funnel"),pT=t("funnel-plus"),uT=t("funnel-x"),dT=t("gallery-horizontal"),hT=t("gallery-horizontal-end"),bT=t("gallery-thumbnails"),mT=t("gallery-vertical"),fT=t("gallery-vertical-end"),gT=t("gamepad"),xT=t("gamepad-2"),IT=t("gamepad-directional"),yT=t("gantt-chart"),vT=t("gantt-chart-square"),wT=t("gauge"),ST=t("gauge-circle"),CT=t("gavel"),kT=t("gem"),AT=t("georgian-lari"),LT=t("ghost"),ET=t("gift"),BT=t("git-branch"),TT=t("git-branch-minus"),qT=t("git-branch-plus"),OT=t("git-commit"),RT=t("git-commit-horizontal"),PT=t("git-commit-vertical"),NT=t("git-compare"),MT=t("git-compare-arrows"),UT=t("git-fork"),DT=t("git-graph"),FT=t("git-merge"),$T=t("git-merge-conflict"),zT=t("git-pull-request"),HT=t("git-pull-request-arrow"),jT=t("git-pull-request-closed"),_T=t("git-pull-request-create"),WT=t("git-pull-request-create-arrow"),VT=t("git-pull-request-draft"),KT=t("glass-water"),GT=t("glasses"),XT=t("globe"),ZT=t("globe-2"),JT=t("globe-check"),QT=t("globe-lock"),YT=t("globe-off"),tq=t("globe-x"),eq=t("goal"),oq=t("gpu"),rq=t("grab"),sq=t("graduation-cap"),nq=t("grape"),aq=t("grid"),iq=t("grid-2-x-2"),cq=t("grid-2-x-2-check"),lq=t("grid-2-x-2-plus"),pq=t("grid-2-x-2-x"),uq=t("grid-2x2"),dq=t("grid-2x2-check"),hq=t("grid-2x2-plus"),bq=t("grid-2x2-x"),mq=t("grid-3-x-3"),fq=t("grid-3x2"),gq=t("grid-3x3"),xq=t("grip"),Iq=t("grip-horizontal"),yq=t("grip-vertical"),vq=t("group"),wq=t("guitar"),Sq=t("ham"),Cq=t("hamburger"),kq=t("hammer"),Aq=t("hand"),Lq=t("hand-coins"),Eq=t("hand-fist"),Bq=t("hand-grab"),Tq=t("hand-heart"),qq=t("hand-helping"),Oq=t("hand-metal"),Rq=t("hand-platter"),Pq=t("handbag"),Nq=t("handshake"),Mq=t("hard-drive"),Uq=t("hard-drive-download"),Dq=t("hard-drive-upload"),Fq=t("hard-hat"),$q=t("hash"),zq=t("hat-glasses"),Hq=t("haze"),jq=t("hd"),_q=t("hdmi-port"),Wq=t("heading"),Vq=t("heading-1"),Kq=t("heading-2"),Gq=t("heading-3"),Xq=t("heading-4"),Zq=t("heading-5"),Jq=t("heading-6"),Qq=t("headphone-off"),Yq=t("headphones"),tO=t("headset"),eO=t("heart"),oO=t("heart-crack"),rO=t("heart-handshake"),sO=t("heart-minus"),nO=t("heart-off"),aO=t("heart-plus"),iO=t("heart-pulse"),cO=t("heart-x"),lO=t("heater"),pO=t("helicopter"),uO=t("help-circle"),dO=t("helping-hand"),hO=t("hexagon"),bO=t("highlighter"),mO=t("history"),fO=t("home"),gO=t("hop"),xO=t("hop-off"),IO=t("hospital"),yO=t("hotel"),vO=t("hourglass"),wO=t("house"),SO=t("house-heart"),CO=t("house-plug"),kO=t("house-plus"),AO=t("house-wifi"),LO=t("ice-cream"),EO=t("ice-cream-2"),BO=t("ice-cream-bowl"),TO=t("ice-cream-cone"),qO=t("id-card"),OO=t("id-card-lanyard"),RO=t("image"),PO=t("image-down"),NO=t("image-minus"),MO=t("image-off"),UO=t("image-play"),DO=t("image-plus"),FO=t("image-up"),$O=t("image-upscale"),zO=t("images"),HO=t("import"),jO=t("inbox"),_O=t("indent"),WO=t("indent-decrease"),VO=t("indent-increase"),KO=t("indian-rupee"),GO=t("infinity"),XO=t("info"),ZO=t("inspect"),JO=t("inspection-panel"),QO=t("italic"),YO=t("iteration-ccw"),tR=t("iteration-cw"),eR=t("japanese-yen"),oR=t("joystick"),rR=t("kanban"),sR=t("kanban-square"),nR=t("kanban-square-dashed"),aR=t("kayak"),iR=t("key"),cR=t("key-round"),lR=t("key-square"),pR=t("keyboard"),uR=t("keyboard-music"),dR=t("keyboard-off"),hR=t("lamp"),bR=t("lamp-ceiling"),mR=t("lamp-desk"),fR=t("lamp-floor"),gR=t("lamp-wall-down"),xR=t("lamp-wall-up"),IR=t("land-plot"),yR=t("landmark"),vR=t("languages"),wR=t("laptop"),SR=t("laptop-2"),CR=t("laptop-minimal"),kR=t("laptop-minimal-check"),AR=t("lasso"),LR=t("lasso-select"),ER=t("laugh"),BR=t("layer-arrow-down"),TR=t("layer-arrow-up"),qR=t("layers"),OR=t("layers-2"),RR=t("layers-3"),PR=t("layers-arrow-down"),NR=t("layers-arrow-up"),MR=t("layers-minus"),UR=t("layers-plus"),DR=t("layout"),FR=t("layout-dashboard"),$R=t("layout-freeform"),zR=t("layout-grid"),HR=t("layout-list"),jR=t("layout-panel-left"),_R=t("layout-panel-top"),WR=t("layout-template"),VR=t("leaf"),KR=t("leafy-green"),GR=t("lectern"),XR=t("lens-concave"),ZR=t("lens-convex"),JR=t("letter-text"),QR=t("library"),YR=t("library-big"),tP=t("library-square"),eP=t("life-buoy"),oP=t("ligature"),rP=t("lightbulb"),sP=t("lightbulb-off"),nP=t("line-chart"),aP=t("line-dot-right-horizontal"),iP=t("line-squiggle"),cP=t("line-style"),lP=t("link"),pP=t("link-2"),uP=t("link-2-off"),dP=t("list"),hP=t("list-check"),bP=t("list-checks"),mP=t("list-chevrons-down-up"),fP=t("list-chevrons-up-down"),gP=t("list-collapse"),xP=t("list-end"),IP=t("list-filter"),yP=t("list-filter-plus"),vP=t("list-indent-decrease"),wP=t("list-indent-increase"),SP=t("list-minus"),CP=t("list-music"),kP=t("list-ordered"),AP=t("list-plus"),LP=t("list-restart"),EP=t("list-sort-ascending"),BP=t("list-sort-descending"),TP=t("list-start"),qP=t("list-todo"),OP=t("list-tree"),RP=t("list-video"),PP=t("list-x"),NP=t("loader"),MP=t("loader-2"),UP=t("loader-circle"),DP=t("loader-pinwheel"),FP=t("locate"),$P=t("locate-fixed"),zP=t("locate-off"),HP=t("location-edit"),jP=t("lock"),_P=t("lock-keyhole"),WP=t("lock-keyhole-open"),VP=t("lock-open"),KP=t("log-in"),GP=t("log-out"),XP=t("logs"),ZP=t("lollipop"),JP=t("luggage"),QP=t("m-square"),YP=t("magnet"),tN=t("mail"),eN=t("mail-badge"),oN=t("mail-check"),rN=t("mail-minus"),sN=t("mail-open"),nN=t("mail-plus"),aN=t("mail-question"),iN=t("mail-question-mark"),cN=t("mail-search"),lN=t("mail-warning"),pN=t("mail-x"),uN=t("mailbox"),dN=t("mails"),hN=t("map"),bN=t("map-minus"),mN=t("map-pin"),fN=t("map-pin-check"),gN=t("map-pin-check-inside"),xN=t("map-pin-house"),IN=t("map-pin-minus"),yN=t("map-pin-minus-inside"),vN=t("map-pin-off"),wN=t("map-pin-pen"),SN=t("map-pin-plus"),CN=t("map-pin-plus-inside"),kN=t("map-pin-search"),AN=t("map-pin-x"),LN=t("map-pin-x-inside"),EN=t("map-pinned"),BN=t("map-plus"),TN=t("mars"),qN=t("mars-stroke"),ON=t("martini"),RN=t("maximize"),PN=t("maximize-2"),NN=t("medal"),MN=t("megaphone"),UN=t("megaphone-off"),DN=t("meh"),FN=t("memory-stick"),$N=t("menu"),zN=t("menu-square"),HN=t("merge"),jN=t("message-circle"),_N=t("message-circle-check"),WN=t("message-circle-code"),VN=t("message-circle-dashed"),KN=t("message-circle-heart"),GN=t("message-circle-more"),XN=t("message-circle-off"),ZN=t("message-circle-plus"),JN=t("message-circle-question"),QN=t("message-circle-question-mark"),YN=t("message-circle-reply"),tM=t("message-circle-warning"),eM=t("message-circle-x"),oM=t("message-square"),rM=t("message-square-check"),sM=t("message-square-code"),nM=t("message-square-dashed"),aM=t("message-square-diff"),iM=t("message-square-dot"),cM=t("message-square-heart"),lM=t("message-square-lock"),pM=t("message-square-more"),uM=t("message-square-off"),dM=t("message-square-plus"),hM=t("message-square-quote"),bM=t("message-square-reply"),mM=t("message-square-share"),fM=t("message-square-text"),gM=t("message-square-warning"),xM=t("message-square-x"),IM=t("messages-square"),yM=t("metronome"),vM=t("mic"),wM=t("mic-2"),SM=t("mic-audio-lines"),CM=t("mic-off"),kM=t("mic-signal"),AM=t("mic-vocal"),LM=t("microchip"),EM=t("microscope"),BM=t("microwave"),TM=t("milestone"),qM=t("milk"),OM=t("milk-off"),RM=t("minimize"),PM=t("minimize-2"),NM=t("minus"),MM=t("minus-circle"),UM=t("minus-square"),DM=t("mirror-rectangular"),FM=t("mirror-round"),$M=t("monitor"),zM=t("monitor-check"),HM=t("monitor-cloud"),jM=t("monitor-cog"),_M=t("monitor-dot"),WM=t("monitor-down"),VM=t("monitor-off"),KM=t("monitor-pause"),GM=t("monitor-play"),XM=t("monitor-smartphone"),ZM=t("monitor-speaker"),JM=t("monitor-stop"),QM=t("monitor-up"),YM=t("monitor-x"),tU=t("moon"),eU=t("moon-star"),oU=t("more-horizontal"),rU=t("more-vertical"),sU=t("mosque"),nU=t("motorbike"),aU=t("mountain"),iU=t("mountain-snow"),cU=t("mouse"),lU=t("mouse-left"),pU=t("mouse-off"),uU=t("mouse-pointer"),dU=t("mouse-pointer-2"),hU=t("mouse-pointer-2-off"),bU=t("mouse-pointer-ban"),mU=t("mouse-pointer-click"),fU=t("mouse-pointer-square-dashed"),gU=t("mouse-right"),xU=t("move"),IU=t("move-3-d"),yU=t("move-3d"),vU=t("move-diagonal"),wU=t("move-diagonal-2"),SU=t("move-down"),CU=t("move-down-left"),kU=t("move-down-right"),AU=t("move-horizontal"),LU=t("move-left"),EU=t("move-right"),BU=t("move-up"),TU=t("move-up-left"),qU=t("move-up-right"),OU=t("move-vertical"),RU=t("music"),PU=t("music-2"),NU=t("music-3"),MU=t("music-4"),UU=t("navigation"),DU=t("navigation-2"),FU=t("navigation-2-off"),$U=t("navigation-off"),zU=t("network"),HU=t("newspaper"),jU=t("nfc"),_U=t("non-binary"),WU=t("notebook"),VU=t("notebook-pen"),KU=t("notebook-tabs"),GU=t("notebook-text"),XU=t("notepad-text"),ZU=t("notepad-text-dashed"),JU=t("nut"),QU=t("nut-off"),YU=t("octagon"),tD=t("octagon-alert"),eD=t("octagon-minus"),oD=t("octagon-pause"),rD=t("octagon-x"),sD=t("omega"),nD=t("option"),aD=t("orbit"),iD=t("origami"),cD=t("outdent"),lD=t("package"),pD=t("package-2"),uD=t("package-check"),dD=t("package-minus"),hD=t("package-open"),bD=t("package-plus"),mD=t("package-search"),fD=t("package-x"),gD=t("paint-bucket"),xD=t("paint-roller"),ID=t("paintbrush"),yD=t("paintbrush-2"),vD=t("paintbrush-vertical"),wD=t("palette"),SD=t("palmtree"),CD=t("panda"),kD=t("panel-bottom"),AD=t("panel-bottom-close"),LD=t("panel-bottom-dashed"),ED=t("panel-bottom-inactive"),BD=t("panel-bottom-open"),TD=t("panel-left"),qD=t("panel-left-close"),OD=t("panel-left-dashed"),RD=t("panel-left-inactive"),PD=t("panel-left-open"),ND=t("panel-left-right-dashed"),MD=t("panel-right"),UD=t("panel-right-close"),DD=t("panel-right-dashed"),FD=t("panel-right-inactive"),$D=t("panel-right-open"),zD=t("panel-top"),HD=t("panel-top-bottom-dashed"),jD=t("panel-top-close"),_D=t("panel-top-dashed"),WD=t("panel-top-inactive"),VD=t("panel-top-open"),KD=t("panels-left-bottom"),GD=t("panels-left-right"),XD=t("panels-right-bottom"),ZD=t("panels-top-bottom"),JD=t("panels-top-left"),QD=t("paper-bag"),YD=t("paperclip"),tF=t("parasol"),eF=t("parentheses"),oF=t("parking-circle"),rF=t("parking-circle-off"),sF=t("parking-meter"),nF=t("parking-square"),aF=t("parking-square-off"),iF=t("party-popper"),cF=t("pause"),lF=t("pause-circle"),pF=t("pause-octagon"),uF=t("paw-print"),dF=t("pc-case"),hF=t("pen"),bF=t("pen-box"),mF=t("pen-line"),fF=t("pen-off"),gF=t("pen-square"),xF=t("pen-tool"),IF=t("pencil"),yF=t("pencil-line"),vF=t("pencil-off"),wF=t("pencil-ruler"),SF=t("pencil-sparkles"),CF=t("pentagon"),kF=t("percent"),AF=t("percent-circle"),LF=t("percent-diamond"),EF=t("percent-square"),BF=t("person-standing"),TF=t("phi"),qF=t("philippine-peso"),OF=t("phone"),RF=t("phone-call"),PF=t("phone-forwarded"),NF=t("phone-incoming"),MF=t("phone-missed"),UF=t("phone-off"),DF=t("phone-outgoing"),FF=t("pi"),$F=t("pi-square"),zF=t("piano"),HF=t("pickaxe"),jF=t("picture-in-picture"),_F=t("picture-in-picture-2"),WF=t("pie-chart"),VF=t("piggy-bank"),KF=t("pilcrow"),GF=t("pilcrow-left"),XF=t("pilcrow-right"),ZF=t("pilcrow-square"),JF=t("pill"),QF=t("pill-bottle"),YF=t("pin"),t$=t("pin-off"),e$=t("pipette"),o$=t("pizza"),r$=t("plane"),s$=t("plane-landing"),n$=t("plane-takeoff"),a$=t("play"),i$=t("play-circle"),c$=t("play-off"),l$=t("play-square"),p$=t("plug"),u$=t("plug-2"),d$=t("plug-zap"),h$=t("plug-zap-2"),b$=t("plus"),m$=t("plus-circle"),f$=t("plus-square"),g$=t("pocket-knife"),x$=t("podcast"),I$=t("podium"),y$=t("pointer"),v$=t("pointer-off"),w$=t("popcorn"),S$=t("popsicle"),C$=t("pound-sterling"),k$=t("power"),A$=t("power-circle"),L$=t("power-off"),E$=t("power-square"),B$=t("presentation"),T$=t("printer"),q$=t("printer-check"),O$=t("printer-x"),R$=t("projector"),P$=t("proportions"),N$=t("puzzle"),M$=t("pyramid"),U$=t("qr-code"),D$=t("quote"),F$=t("rabbit"),$$=t("radar"),z$=t("radiation"),H$=t("radical"),j$=t("radio"),_$=t("radio-off"),W$=t("radio-receiver"),V$=t("radio-tower"),K$=t("radius"),G$=t("rainbow"),X$=t("rat"),Z$=t("ratio"),J$=t("receipt"),Q$=t("receipt-cent"),Y$=t("receipt-euro"),tz=t("receipt-indian-rupee"),ez=t("receipt-japanese-yen"),oz=t("receipt-pound-sterling"),rz=t("receipt-russian-ruble"),sz=t("receipt-swiss-franc"),nz=t("receipt-text"),az=t("receipt-turkish-lira"),iz=t("rectangle-circle"),cz=t("rectangle-ellipsis"),lz=t("rectangle-goggles"),pz=t("rectangle-horizontal"),uz=t("rectangle-vertical"),dz=t("recycle"),hz=t("redo"),bz=t("redo-2"),mz=t("redo-dot"),fz=t("refresh-ccw"),gz=t("refresh-ccw-dot"),xz=t("refresh-cw"),Iz=t("refresh-cw-off"),yz=t("refrigerator"),vz=t("regex"),wz=t("remove-formatting"),Sz=t("repeat"),Cz=t("repeat-1"),kz=t("repeat-2"),Az=t("repeat-off"),Lz=t("replace"),Ez=t("replace-all"),Bz=t("reply"),Tz=t("reply-all"),qz=t("rewind"),Oz=t("ribbon"),Rz=t("road"),Pz=t("rocket"),Nz=t("rocking-chair"),Mz=t("roller-coaster"),Uz=t("rose"),Dz=t("rotate-3-d"),Fz=t("rotate-3d"),$z=t("rotate-ccw"),zz=t("rotate-ccw-clock"),Hz=t("rotate-ccw-key"),jz=t("rotate-ccw-square"),_z=t("rotate-cw"),Wz=t("rotate-cw-fading-clock"),Vz=t("rotate-cw-square"),Kz=t("route"),Gz=t("route-off"),Xz=t("router"),Zz=t("rows"),Jz=t("rows-2"),Qz=t("rows-3"),Yz=t("rows-4"),t0=t("rss"),e0=t("ruler"),o0=t("ruler-dimension-line"),r0=t("russian-ruble"),s0=t("sailboat"),n0=t("salad"),a0=t("sandwich"),i0=t("satellite"),c0=t("satellite-dish"),l0=t("saudi-riyal"),p0=t("save"),u0=t("save-all"),d0=t("save-check"),h0=t("save-off"),b0=t("save-pen"),m0=t("save-plus"),f0=t("scale"),g0=t("scale-3-d"),x0=t("scale-3d"),I0=t("scaling"),y0=t("scan"),v0=t("scan-barcode"),w0=t("scan-box"),S0=t("scan-eye"),C0=t("scan-face"),k0=t("scan-heart"),A0=t("scan-line"),L0=t("scan-qr-code"),E0=t("scan-search"),B0=t("scan-square"),T0=t("scan-text"),q0=t("scatter-chart"),O0=t("school"),R0=t("school-2"),P0=t("scissors"),N0=t("scissors-line-dashed"),M0=t("scissors-square"),U0=t("scissors-square-dashed-bottom"),D0=t("scooter"),F0=t("screen-share"),$0=t("screen-share-off"),z0=t("scroll"),H0=t("scroll-text"),j0=t("search"),_0=t("search-alert"),W0=t("search-check"),V0=t("search-code"),K0=t("search-slash"),G0=t("search-x"),X0=t("section"),Z0=t("send"),J0=t("send-horizonal"),Q0=t("send-horizontal"),Y0=t("send-to-back"),t2=t("separator-horizontal"),e2=t("separator-vertical"),o2=t("server"),r2=t("server-cog"),s2=t("server-crash"),n2=t("server-off"),a2=t("server-plus"),i2=t("settings"),c2=t("settings-2"),l2=t("shapes"),p2=t("share"),u2=t("share-2"),d2=t("sheet"),h2=t("shell"),b2=t("shelving-unit"),m2=t("shield"),f2=t("shield-alert"),g2=t("shield-ban"),x2=t("shield-check"),I2=t("shield-close"),y2=t("shield-cog"),v2=t("shield-cog-corner"),w2=t("shield-ellipsis"),S2=t("shield-half"),C2=t("shield-keyhole"),k2=t("shield-lock"),A2=t("shield-minus"),L2=t("shield-off"),E2=t("shield-plus"),B2=t("shield-question"),T2=t("shield-question-mark"),q2=t("shield-user"),O2=t("shield-x"),R2=t("ship"),P2=t("ship-wheel"),N2=t("shirt"),M2=t("shopping-bag"),U2=t("shopping-basket"),D2=t("shopping-cart"),F2=t("shovel"),$2=t("shower-head"),z2=t("shredder"),H2=t("shrimp"),j2=t("shrink"),_2=t("shrub"),W2=t("shuffle"),V2=t("sidebar"),K2=t("sidebar-close"),G2=t("sidebar-open"),X2=t("sigma"),Z2=t("sigma-square"),J2=t("signal"),Q2=t("signal-high"),Y2=t("signal-low"),t1=t("signal-medium"),e1=t("signal-zero"),o1=t("signature"),r1=t("signpost"),s1=t("signpost-big"),n1=t("siren"),a1=t("skip-back"),i1=t("skip-forward"),c1=t("skull"),l1=t("slash"),p1=t("slash-square"),u1=t("slice"),d1=t("sliders"),h1=t("sliders-horizontal"),b1=t("sliders-vertical"),m1=t("smartphone"),f1=t("smartphone-charging"),g1=t("smartphone-nfc"),x1=t("smile"),I1=t("smile-plus"),y1=t("snail"),v1=t("snowflake"),w1=t("soap-dispenser-droplet"),S1=t("sofa"),C1=t("solar-panel"),k1=t("sort-asc"),A1=t("sort-desc"),L1=t("soup"),E1=t("space"),B1=t("spade"),T1=t("sparkle"),q1=t("sparkles"),O1=t("speaker"),R1=t("speech"),P1=t("spell-check"),N1=t("spell-check-2"),M1=t("spline"),U1=t("spline-pointer"),D1=t("split"),F1=t("split-square-horizontal"),$1=t("split-square-vertical"),z1=t("spool"),H1=t("sport-shoe"),j1=t("spotlight"),_1=t("spray-can"),W1=t("sprout"),V1=t("square"),K1=t("square-activity"),G1=t("square-arrow-down"),X1=t("square-arrow-down-left"),Z1=t("square-arrow-down-right"),J1=t("square-arrow-left"),Q1=t("square-arrow-out-down-left"),Y1=t("square-arrow-out-down-right"),tH=t("square-arrow-out-up-left"),eH=t("square-arrow-out-up-right"),oH=t("square-arrow-right"),rH=t("square-arrow-right-enter"),sH=t("square-arrow-right-exit"),nH=t("square-arrow-up"),aH=t("square-arrow-up-left"),iH=t("square-arrow-up-right"),cH=t("square-asterisk"),lH=t("square-bottom-dashed-scissors"),pH=t("square-centerline-dashed-horizontal"),uH=t("square-centerline-dashed-vertical"),dH=t("square-chart-gantt"),hH=t("square-check"),bH=t("square-check-big"),mH=t("square-chevron-down"),fH=t("square-chevron-left"),gH=t("square-chevron-right"),xH=t("square-chevron-up"),IH=t("square-code"),yH=t("square-dashed"),vH=t("square-dashed-bottom"),wH=t("square-dashed-bottom-code"),SH=t("square-dashed-kanban"),CH=t("square-dashed-mouse-pointer"),kH=t("square-dashed-text"),AH=t("square-dashed-top-solid"),LH=t("square-divide"),EH=t("square-dot"),BH=t("square-equal"),TH=t("square-function"),qH=t("square-gantt-chart"),OH=t("square-kanban"),RH=t("square-library"),PH=t("square-m"),NH=t("square-menu"),MH=t("square-minus"),UH=t("square-mouse-pointer"),DH=t("square-off"),FH=t("square-parking"),$H=t("square-parking-off"),zH=t("square-pause"),HH=t("square-pen"),jH=t("square-percent"),_H=t("square-pi"),WH=t("square-pilcrow"),VH=t("square-play"),KH=t("square-plus"),GH=t("square-power"),XH=t("square-radical"),ZH=t("square-round-corner"),JH=t("square-scissors"),QH=t("square-sigma"),YH=t("square-slash"),tj=t("square-split-horizontal"),ej=t("square-split-vertical"),oj=t("square-square"),rj=t("square-stack"),sj=t("square-star"),nj=t("square-stop"),aj=t("square-terminal"),ij=t("square-user"),cj=t("square-user-round"),lj=t("square-x"),pj=t("squares-exclude"),uj=t("squares-intersect"),dj=t("squares-subtract"),hj=t("squares-unite"),bj=t("squircle"),mj=t("squircle-dashed"),fj=t("squirrel"),gj=t("stamp"),xj=t("star"),Ij=t("star-check"),yj=t("star-half"),vj=t("star-minus"),wj=t("star-off"),Sj=t("star-plus"),Cj=t("star-x"),kj=t("stars"),Aj=t("step-back"),Lj=t("step-forward"),Ej=t("stethoscope"),Bj=t("sticker"),Tj=t("sticky-note"),qj=t("sticky-note-check"),Oj=t("sticky-note-minus"),Rj=t("sticky-note-off"),Pj=t("sticky-note-plus"),Nj=t("sticky-note-x"),Mj=t("sticky-notes"),Uj=t("stone"),Dj=t("stop-circle"),Fj=t("store"),$j=t("stretch-horizontal"),zj=t("stretch-vertical"),Hj=t("strikethrough"),jj=t("subscript"),_j=t("subtitles"),Wj=t("summary"),Vj=t("sun"),Kj=t("sun-dim"),Gj=t("sun-medium"),Xj=t("sun-moon"),Zj=t("sun-snow"),Jj=t("sunrise"),Qj=t("sunset"),Yj=t("superscript"),t_=t("swatch-book"),e_=t("swiss-franc"),o_=t("switch-camera"),r_=t("sword"),s_=t("swords"),n_=t("syringe"),a_=t("table"),i_=t("table-2"),c_=t("table-cells-merge"),l_=t("table-cells-split"),p_=t("table-columns-split"),u_=t("table-config"),d_=t("table-of-contents"),h_=t("table-properties"),b_=t("table-rows-split"),m_=t("tablet"),f_=t("tablet-smartphone"),g_=t("tablets"),x_=t("tag"),I_=t("tag-plus"),y_=t("tag-x"),v_=t("tags"),w_=t("tally-1"),S_=t("tally-2"),C_=t("tally-3"),k_=t("tally-4"),A_=t("tally-5"),L_=t("tangent"),E_=t("target"),B_=t("telescope"),T_=t("tent"),q_=t("tent-tree"),O_=t("terminal"),R_=t("terminal-square"),P_=t("test-tube"),N_=t("test-tube-2"),M_=t("test-tube-diagonal"),U_=t("test-tubes"),D_=t("text"),F_=t("text-align-center"),$_=t("text-align-end"),z_=t("text-align-justify"),H_=t("text-align-start"),j_=t("text-cursor"),__=t("text-cursor-input"),W_=t("text-initial"),V_=t("text-quote"),K_=t("text-search"),G_=t("text-select"),X_=t("text-selection"),Z_=t("text-wrap"),J_=t("theater"),Q_=t("thermometer"),Y_=t("thermometer-snowflake"),tW=t("thermometer-sun"),eW=t("thumbs-down"),oW=t("thumbs-up"),rW=t("ticket"),sW=t("ticket-check"),nW=t("ticket-minus"),aW=t("ticket-percent"),iW=t("ticket-plus"),cW=t("ticket-slash"),lW=t("ticket-x"),pW=t("tickets"),uW=t("tickets-plane"),dW=t("timeline"),hW=t("timer"),bW=t("timer-off"),mW=t("timer-reset"),fW=t("toggle-left"),gW=t("toggle-right"),xW=t("toilet"),IW=t("tool-case"),yW=t("toolbox"),vW=t("tornado"),wW=t("torus"),SW=t("touchpad"),CW=t("touchpad-off"),kW=t("towel-rack"),AW=t("tower-control"),LW=t("toy-brick"),EW=t("tractor"),BW=t("traffic-cone"),TW=t("train"),qW=t("train-front"),OW=t("train-front-tunnel"),RW=t("train-track"),PW=t("tram-front"),NW=t("transgender"),MW=t("trash"),UW=t("trash-2"),DW=t("tree-deciduous"),FW=t("tree-palm"),$W=t("tree-pine"),zW=t("trees"),HW=t("trending-down"),jW=t("trending-up"),_W=t("trending-up-down"),WW=t("triangle"),VW=t("triangle-alert"),KW=t("triangle-dashed"),GW=t("triangle-right"),XW=t("trophy"),ZW=t("truck"),JW=t("truck-electric"),QW=t("turkish-lira"),YW=t("turntable"),tV=t("turtle"),eV=t("tv"),oV=t("tv-2"),rV=t("tv-minimal"),sV=t("tv-minimal-play"),nV=t("type"),aV=t("type-outline"),iV=t("umbrella"),cV=t("umbrella-off"),lV=t("underline"),pV=t("undo"),uV=t("undo-2"),dV=t("undo-dot"),hV=t("unfold-horizontal"),bV=t("unfold-vertical"),mV=t("ungroup"),fV=t("university"),gV=t("unlink"),xV=t("unlink-2"),IV=t("unlock"),yV=t("unlock-keyhole"),vV=t("unplug"),wV=t("upload"),SV=t("upload-cloud"),CV=t("usb"),kV=t("user"),AV=t("user-2"),LV=t("user-check"),EV=t("user-check-2"),BV=t("user-circle"),TV=t("user-circle-2"),qV=t("user-cog"),OV=t("user-cog-2"),RV=t("user-key"),PV=t("user-lock"),NV=t("user-minus"),MV=t("user-minus-2"),UV=t("user-pen"),DV=t("user-plus"),FV=t("user-plus-2"),$V=t("user-round"),zV=t("user-round-arrow-left"),HV=t("user-round-check"),jV=t("user-round-cog"),_V=t("user-round-key"),WV=t("user-round-minus"),VV=t("user-round-pen"),KV=t("user-round-plus"),GV=t("user-round-search"),XV=t("user-round-x"),ZV=t("user-search"),JV=t("user-shield"),QV=t("user-square"),YV=t("user-square-2"),tK=t("user-star"),eK=t("user-x"),oK=t("user-x-2"),rK=t("users"),sK=t("users-2"),nK=t("users-round"),aK=t("utensils"),iK=t("utensils-crossed"),cK=t("utility-pole"),lK=t("van"),pK=t("variable"),uK=t("vault"),dK=t("vector-square"),hK=t("vegan"),bK=t("venetian-mask"),mK=t("venus"),fK=t("venus-and-mars"),gK=t("verified"),xK=t("vibrate"),IK=t("vibrate-off"),yK=t("video"),vK=t("video-off"),wK=t("videotape"),SK=t("view"),CK=t("voicemail"),kK=t("volleyball"),AK=t("volume"),LK=t("volume-1"),EK=t("volume-2"),BK=t("volume-off"),TK=t("volume-x"),qK=t("vote"),OK=t("wallet"),RK=t("wallet-2"),PK=t("wallet-cards"),NK=t("wallet-minimal"),MK=t("wallpaper"),UK=t("wand"),DK=t("wand-2"),FK=t("wand-sparkles"),$K=t("warehouse"),zK=t("washing-machine"),HK=t("watch"),jK=t("waves"),_K=t("waves-arrow-down"),WK=t("waves-arrow-up"),VK=t("waves-horizontal"),KK=t("waves-ladder"),GK=t("waves-vertical"),XK=t("waypoints"),ZK=t("webcam"),JK=t("webcam-off"),QK=t("webhook"),YK=t("webhook-off"),tG=t("weight"),eG=t("weight-tilde"),oG=t("wheat"),rG=t("wheat-off"),sG=t("whole-word"),nG=t("wifi"),aG=t("wifi-cog"),iG=t("wifi-high"),cG=t("wifi-low"),lG=t("wifi-off"),pG=t("wifi-pen"),uG=t("wifi-sync"),dG=t("wifi-zero"),hG=t("wind"),bG=t("wind-arrow-down"),mG=t("wine"),fG=t("wine-off"),gG=t("workflow"),xG=t("worm"),IG=t("wrap-text"),yG=t("wrench"),vG=t("wrench-off"),wG=t("x"),SG=t("x-circle"),CG=t("x-line-top"),kG=t("x-octagon"),AG=t("x-square"),LG=t("zap"),EG=t("zap-off"),BG=t("zodiac-aquarius"),TG=t("zodiac-aries"),qG=t("zodiac-cancer"),OG=t("zodiac-capricorn"),RG=t("zodiac-gemini"),PG=t("zodiac-leo"),NG=t("zodiac-libra"),MG=t("zodiac-ophiuchus"),UG=t("zodiac-pisces"),DG=t("zodiac-sagittarius"),FG=t("zodiac-scorpio"),$G=t("zodiac-taurus"),zG=t("zodiac-virgo"),HG=t("zoom-in"),jG=t("zoom-out");C();v();var ct=class extends l{setup(){this.state=w({open:_(this.props.state)}),this.triggerRef=L("trigger"),this.bufferRef=L("buffer"),this.bootstrapTooltip=null,this.lastContentHtml=null,this.onShown=()=>{this.state.open=!0},this.onHidden=()=>{this.state.open=!1},P(()=>{this.lastContentHtml=this.currentContentHtml();let o=this.triggerElement();this.bootstrapTooltip=new(B()).Tooltip(o,{title:this.lastContentHtml,html:!0,trigger:"hover focus"}),o.addEventListener("shown.bs.tooltip",this.onShown),o.addEventListener("hidden.bs.tooltip",this.onHidden),_(this.props.state)&&this.bootstrapTooltip.show()}),$(()=>{let o=this.currentContentHtml();o!==this.lastContentHtml&&(this.lastContentHtml=o,this.bootstrapTooltip?.setContent({".tooltip-inner":o}))}),M(()=>{let o=this.triggerElement();o?.removeEventListener("shown.bs.tooltip",this.onShown),o?.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()}};a(ct,"template","baseui.Tooltip"),a(ct,"props",{content:i(String),state:i(String),...d});var hl=0,nt={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)},J=class extends l{setup(){this.supportId=`bu-input-support-${hl++}`,this.box=L("box"),this.slotRefs={start:L("start"),end:L("end"),footer:L("footer")},P(()=>this.measureSlots()),$(()=>this.measureSlots())}get field(){return this.env.fieldProps?.()??{}}get label(){return this.props.label??this.field.label}get labelStyle(){let o=this.props.labelBackground??this.field.labelBackground;return o?`--bu-label-bg:${o}`: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 o=this.box.el;if(!o)return;let{start:r,end:s,footer:n}=this.slotRefs;o.style.setProperty("--bu-slot-start",`${r.el?.offsetWidth??0}px`),o.style.setProperty("--bu-slot-end",`${s.el?.offsetWidth??0}px`),o.style.setProperty("--bu-slot-footer",`${n.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&&"bu-outlined-control"}get describedBy(){return this.supportingText?this.supportId:void 0}get outlinedClassNames(){return f("bu-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")}};a(J,"components",{Icon:N,IconCircleQuestionMark:bn,Tooltip:ct});function mn({tag:e="input",type:o}={}){return e==="select"?"form-select":o==="checkbox"||o==="radio"?"form-check-input":"form-control"}var Bt=class extends J{get ariaLabel(){return this.props["aria-label"]??this.props.ariaLabel}get classNames(){return f("bu-input",mn({tag:"input",type:this.props.type}),this.controlClass,this.isInvalid&&"is-invalid",this.props.className)}onInput(o){this.props.onInput?.(o.target.value,o)}onChange(o){this.props.onChange?.(o.target.value,o)}};a(Bt,"template","baseui.Input"),a(Bt,"props",{...nt,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)});C();v();var Zn={default:"bu-tabs-list-default",line:"bu-tabs-list-line"};function fn(e,o,r,s="horizontal"){let n=s==="vertical",u=e===(n?"ArrowDown":"ArrowRight")?1:e===(n?"ArrowUp":"ArrowLeft")?-1:0;return!u||r===0?-1:(o+u+r)%r}var bl=0;function di(e){return String(e).replace(/[^a-zA-Z0-9_-]/g,"_")}var Tt=class extends l{setup(){this.tabsState=w({active:this.props.value??this.props.defaultValue??""}),this.instanceId=`t${++bl}`,q({tabs:this.tabsState,selectTab:o=>this.select(o),tabsId:this.instanceId,orientation:this.orientation}),H(o=>{o.value!==void 0&&(this.tabsState.active=o.value)})}get orientation(){return this.props.orientation==="vertical"?"vertical":"horizontal"}get classNames(){return f("bu-tabs",this.props.className)}select(o){this.props.value===void 0&&(this.tabsState.active=o),this.props.onChange?.(o)}};a(Tt,"template","baseui.Tabs"),a(Tt,"props",{value:i(String),defaultValue:i(String),orientation:i(String),onChange:i(Function),...d});var qt=class extends l{};a(qt,"template","baseui.TabsContainer"),a(qt,"props",{...d});var Ot=class extends l{setup(){this.listRef=L("list")}get classNames(){return f("bu-tabs-list",Zn[this.props.variant]||Zn.default,this.props.className)}onKeyDown(o){let r=[...this.listRef.el.querySelectorAll("[role='tab']")],s=r.indexOf(o.target),n=fn(o.key,s,r.length,this.env.orientation);n!==-1&&(o.preventDefault(),r[n].focus(),r[n].click())}};a(Ot,"template","baseui.TabsList"),a(Ot,"props",{variant:i(String),...d});var ht=class extends l{setup(){this.rootEl=null,this.tabInstance=null,this.onShown=()=>this.env.selectTab(this.props.value)}onRootRef(o){o?(this.rootEl=o,this.tabInstance=B().Tab.getOrCreateInstance(o),o.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`bu-tabs-panel-${this.env.tabsId}-${di(this.props.value)}`}get classNames(){return f("bu-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()}};a(ht,"template","baseui.TabTrigger"),a(ht,"components",{Button:S}),a(ht,"props",{value:{type:String},disabled:i(Boolean),...d});var Rt=class extends l{setup(){this.initialActive=this.isActive}get isActive(){return this.env.tabs.active===this.props.value}get panelId(){return`bu-tabs-panel-${this.env.tabsId}-${di(this.props.value)}`}};a(Rt,"template","baseui.TabContent"),a(Rt,"props",{value:{type:String},...d});C();v();C();v();function Q(e,o){H(r=>{oo(r)&&(e.open=z(r),e.open?o?.instance?.show():o?.instance?.hide())})}function Y(e,o,r){oo(e)||(o.open=r),e.onOpenChange?.(r)}function gn(e,o){let r=null;P(()=>{r=new(B()).Collapse(e.el,{toggle:!1})}),$(()=>{if(!r)return;let s=e.el.classList.contains("show");o()&&!s?r.show():!o()&&s&&r.hide()}),M(()=>r?.dispose())}var Pt=class extends l{setup(){this.dialogState=w({open:z(this.props)}),this.control={instance:null},q({dialog:this.dialogState,dialogControl:this.control,setDialogOpen:o=>this.setOpen(o)}),Q(this.dialogState,this.control)}setOpen(o){Y(this.props,this.dialogState,o)}};a(Pt,"template","baseui.Dialog"),a(Pt,"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 fo=class extends l{onClick(){this.env.dialogControl.instance?.show()}};a(fo,"template","baseui.DialogTrigger"),a(fo,"props",d);var bt=class extends l{setup(){this.rootRef=L("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},P(()=>{this.env.dialogControl.instance=B().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()}),M(()=>{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}};a(bt,"template","baseui.DialogContent"),a(bt,"components",{Button:S}),a(bt,"props",{...d,showCloseButton:i(Boolean),"show-close-button":i(Boolean)});var Nt=class extends l{};a(Nt,"template","baseui.DialogHeader"),a(Nt,"props",d);var Mt=class extends l{};a(Mt,"template","baseui.DialogFooter"),a(Mt,"props",d);var Ut=class extends l{};a(Ut,"template","baseui.DialogTitle"),a(Ut,"props",d);var Dt=class extends l{};a(Dt,"template","baseui.DialogDescription"),a(Dt,"props",d);var he=class extends l{};a(he,"template","baseui.DialogClose"),a(he,"components",{Button:S}),a(he,"props",d);C();v();var hi={default:"bu-empty-default",outline:"bu-empty-outline",background:"bu-empty-background"},ml={default:"bu-empty-media-default",icon:"bu-empty-media-icon"},go=class extends l{get classNames(){return f("bu-empty",hi[this.props.variant]||hi.default,this.props.className)}};a(go,"template","baseui.Empty"),a(go,"props",{variant:i(String),...d});var xo=class extends l{};a(xo,"template","baseui.EmptyHeader"),a(xo,"props",d);var Io=class extends l{get variant(){return this.props.variant==="icon"?"icon":"default"}get classNames(){return f("bu-empty-media",ml[this.variant],this.props.className)}};a(Io,"template","baseui.EmptyMedia"),a(Io,"props",{variant:i(String),...d});var yo=class extends l{};a(yo,"template","baseui.EmptyTitle"),a(yo,"props",d);var vo=class extends l{};a(vo,"template","baseui.EmptyDescription"),a(vo,"props",d);var wo=class extends l{};a(wo,"template","baseui.EmptyContent"),a(wo,"props",d);C();v();var So=class extends l{get vertical(){return this.props.orientation==="vertical"}get classNames(){return f("bu-separator",this.vertical?"bu-separator-vertical":"bu-separator-horizontal",this.props.className)}};a(So,"template","baseui.Separator"),a(So,"props",{orientation:i(String),className:i(String),style:i([String,Object])});C();v();var Ft=class extends l{get classNames(){return f("bu-skeleton",this.props.shape==="circle"?"bu-skeleton-circle":"bu-skeleton-block",this.props.className)}};a(Ft,"template","baseui.Skeleton"),a(Ft,"props",{shape:i(String),className:i(String),style:i([String,Object])});C();v();var fl={lead:"lead",muted:"text-body-secondary",code:"bu-code",kbd:"bu-kbd"},Co=class extends l{get classNames(){return f("bu-typography",fl[this.props.variant],this.props.className)}};a(Co,"template","baseui.Typography"),a(Co,"props",{variant:i(String),...d});C();v();var ko=class extends l{get classNames(){return f("bu-marker",this.props.className)}get variant(){return this.props.variant}};a(ko,"template","baseui.Marker"),a(ko,"props",{variant:i(String),...d});v();var $t=class extends J{get outlinedClassNames(){return f(super.outlinedClassNames,"is-anchored")}get classNames(){return f("form-control",this.controlClass,this.isInvalid&&"is-invalid",this.props.resize==="none"&&"bu-textarea-no-resize",this.props.className)}onInput(o){this.props.onInput?.(o.target.value,o)}onChange(o){this.props.onChange?.(o.target.value,o)}};a($t,"template","baseui.Textarea"),a($t,"props",{...nt,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 zt=class extends J{get ariaLabel(){return this.props["aria-label"]??this.props.ariaLabel}get classNames(){return f("bu-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(o){this.props.onChange?.(o.target.value,o)}};a(zt,"template","baseui.NativeSelect"),a(zt,"props",{...nt,value:i(String),size:i(String),...d,"aria-label":i(String),ariaLabel:i(String),id:i(String),onChange:i(Function)});C();v();var Ht=class extends l{onChange(o){this.props.onChange?.(o.target.checked,o)}};a(Ht,"template","baseui.Checkbox"),a(Ht,"props",{checked:i(Boolean),disabled:i(Boolean),...d,id:i(String),onChange:i(Function)});C();v();var Ao=class extends l{setup(){q({radioGroupValue:()=>this.props.value,radioGroupDisabled:()=>this.props.disabled,radioGroupName:()=>this.props.name||"bu-radio-group",selectRadio:o=>this.props.onChange?.(o)})}get classNames(){return f("bu-radio-group",this.props.className)}};a(Ao,"template","baseui.RadioGroup"),a(Ao,"props",{value:i(String),name:i(String),disabled:i(Boolean),...d,onChange:i(Function)});var Lo=class extends l{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)}};a(Lo,"template","baseui.RadioGroupItem"),a(Lo,"props",{value:{type:String},disabled:i(Boolean),...d});C();v();var be=class extends l{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(o){this.props.onChange?.(o.target.checked,o)}};a(be,"template","baseui.Switch"),a(be,"components",{IconCircleQuestionMark:bn,Tooltip:ct}),a(be,"props",{checked:i(Boolean),disabled:i(Boolean),supportingText:i(String),useTip:i(Number),...d,onChange:i(Function)});C();v();var Eo=class extends l{get classNames(){return f("bu-slider",this.props.className)}onInput(o){o.target.style.setProperty("--b-slider-value",`${o.target.value}%`),this.props.onChange?.(o.target.value,o)}};a(Eo,"template","baseui.Slider"),a(Eo,"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)});C();v();var Bo=class extends l{setup(){this.length=this.props.length||6;let o=(this.props.value||"").split("");this.state=w({digits:Array.from({length:this.length},(r,s)=>o[s]||"")}),this.rootRef=L("root")}get classNames(){return f("bu-input-otp",this.props.className)}get boxes(){return this.state.digits.map((o,r)=>({index:r,value:o}))}emit(){this.props.onChange?.(this.state.digits.join(""))}onInput(o,r){let s=r.target.value.slice(-1);this.state.digits[o]=s,s&&this.rootRef.el&&[...this.rootRef.el.querySelectorAll("input")][o+1]?.focus(),this.emit()}onPaste(o){let r=o.clipboardData.getData("text").trim();if(r){o.preventDefault();for(let s=0;s<this.length;s++)this.state.digits[s]=r[s]||"";this.emit()}}};a(Bo,"template","baseui.InputOtp"),a(Bo,"props",{length:i(Number),value:i(String),disabled:i(Boolean),className:i(String),style:i([String,Object]),onChange:i(Function)});C();C();function Rs(e,{defaultOpen:o=!1,onOpenChange:r}={}){let s=w({open:o}),n=h=>{s.open!==h&&(s.open=h,r?.(h))},c=()=>n(!s.open),p=h=>{e.el&&!e.el.contains(h.target)&&n(!1)},u=h=>{h.key==="Escape"&&n(!1)};return et(h=>{if(h)return document.addEventListener("click",p),document.addEventListener("keydown",u),()=>{document.removeEventListener("click",p),document.removeEventListener("keydown",u)}},()=>[s.open]),M(()=>{document.removeEventListener("click",p),document.removeEventListener("keydown",u)}),{state:s,setOpen:n,toggle:c}}v();var To=class extends J{setup(){super.setup(),this.rootRef=L("root");let{state:o,setOpen:r,toggle:s}=Rs(this.rootRef,{defaultOpen:_(this.props.state)});this.disclosure=o,q({select:this.disclosure,selectValue:()=>this.props.value,selectToggle:s,selectClose:()=>r(!1),selectChoose:n=>{this.props.onChange?.(n),r(!1)}})}get outlinedClassNames(){return f(super.outlinedClassNames,"is-anchored",this.props.value&&"is-floated")}get rootStyle(){return K(this.labelStyle,this.props.style)}get classNames(){return f("bu-select",this.isOutlined&&this.outlinedClassNames,this.props.className)}};a(To,"template","baseui.Select"),a(To,"props",{...nt,value:i(String),state:i(String),onChange:i(Function),...d});var me=class extends l{get attrs(){return{"aria-haspopup":"listbox","aria-expanded":this.env.select.open?"true":"false"}}onClick(){this.env.selectToggle()}};a(me,"template","baseui.SelectTrigger"),a(me,"components",{Button:S}),a(me,"props",d);var qo=class extends l{get open(){return this.env.select.open}};a(qo,"template","baseui.SelectContent"),a(qo,"props",d);var Oo=class extends l{get selected(){return this.env.selectValue()===this.props.value}onClick(){this.env.selectChoose(this.props.value)}};a(Oo,"template","baseui.SelectItem"),a(Oo,"props",{value:{type:String},...d});C();function Ps(e){return[...e.querySelectorAll("button, [href], input, select, textarea, [tabindex]:not([tabindex='-1'])")].filter(o=>!o.disabled&&!o.hidden)}function Jn(e,o){if(e.key!=="Tab")return;let r=Ps(o);if(!r.length){e.preventDefault();return}let s=r[0],n=r[r.length-1];e.shiftKey&&document.activeElement===s?(e.preventDefault(),n.focus()):!e.shiftKey&&document.activeElement===n&&(e.preventDefault(),s.focus())}function xn(e,{closeSelector:o,trapFocus:r=!1}={}){let s=e.getAttribute("b-att-trigger"),n=s?document.querySelector(s):null,c=[...e.querySelectorAll(o)],p=null,u=()=>Ps(e),h=()=>{p=document.activeElement,e.hidden=!1,e.setAttribute("b-att-state","open"),e.setAttribute("role","dialog"),e.setAttribute("aria-modal","true"),u()[0]?.focus(),e.dispatchEvent(new CustomEvent("baseui:open",{bubbles:!0}))},m=()=>{e.hidden=!0,e.setAttribute("b-att-state","closed"),p?.focus?.(),e.dispatchEvent(new CustomEvent("baseui:close",{bubbles:!0}))},g=y=>{if(y.key==="Escape"){m();return}!r||e.hidden||Jn(y,e)},x=y=>{y.target===e&&m()};return n?.addEventListener("click",h),c.forEach(y=>y.addEventListener("click",m)),e.addEventListener("keydown",g),e.addEventListener("click",x),(!e.getAttribute("b-att-state")||e.getAttribute("b-att-state")==="closed")&&(e.hidden=!0),{open:h,close:m,destroy:()=>{n?.removeEventListener("click",h),c.forEach(y=>y.removeEventListener("click",m)),e.removeEventListener("keydown",g),e.removeEventListener("click",x)}}}function Ns(e,o,r,s){let n=e.getAttribute("b-att-trigger"),c=n?document.querySelector(n):null,p=null,u=()=>{p=document.activeElement},h=()=>{e.setAttribute("b-att-state","open"),e.dispatchEvent(new CustomEvent("baseui:open",{bubbles:!0}))},m=()=>{e.setAttribute("b-att-state","closed"),e.dispatchEvent(new CustomEvent("baseui:close",{bubbles:!0})),p?.focus?.(),p=null},g=()=>o.show(),x=()=>o.hide();return e.addEventListener(`show.bs.${r}`,u),e.addEventListener(`shown.bs.${r}`,h),e.addEventListener(`hidden.bs.${r}`,m),c?.addEventListener("click",g),e.setAttribute("b-att-state","closed"),e[s]={open:g,close:x},{destroy:()=>{c?.removeEventListener("click",g),e.removeEventListener(`show.bs.${r}`,u),e.removeEventListener(`shown.bs.${r}`,h),e.removeEventListener(`hidden.bs.${r}`,m),o.dispose(),delete e[s]}}}v();var Ro=class extends l{setup(){this.alertDialogState=w({open:z(this.props)}),q({alertDialog:this.alertDialogState,setAlertDialogOpen:o=>this.setOpen(o)}),Q(this.alertDialogState)}setOpen(o){Y(this.props,this.alertDialogState,o)}};a(Ro,"template","baseui.AlertDialog"),a(Ro,"props",{open:i(Boolean),state:i(String),"default-open":i(Boolean),defaultOpen:i(Boolean),onOpenChange:i(Function),slots:i(Object)});var fe=class extends l{get attrs(){return{"data-slot":"alert-dialog-trigger"}}onClick(){this.env.setAlertDialogOpen(!0)}};a(fe,"template","baseui.AlertDialogTrigger"),a(fe,"components",{Button:S}),a(fe,"props",d);var Po=class extends l{get size(){return this.props.size==="sm"?"sm":"default"}setup(){this.rootRef=L("root"),et(o=>{if(!o)return;let r=document.activeElement;return Ps(this.rootRef.el)[0]?.focus(),()=>r?.focus?.()},()=>[this.env.alertDialog.open])}get open(){return this.env.alertDialog.open}onKeyDown(o){if(o.key==="Escape"){this.env.setAlertDialogOpen(!1);return}Jn(o,this.rootRef.el)}};a(Po,"template","baseui.AlertDialogContent"),a(Po,"props",{...d,size:i(String)});var No=class extends l{};a(No,"template","baseui.AlertDialogHeader"),a(No,"props",d);var Mo=class extends l{};a(Mo,"template","baseui.AlertDialogFooter"),a(Mo,"props",d);var Uo=class extends l{};a(Uo,"template","baseui.AlertDialogMedia"),a(Uo,"props",d);var Do=class extends l{};a(Do,"template","baseui.AlertDialogTitle"),a(Do,"props",d);var Fo=class extends l{};a(Fo,"template","baseui.AlertDialogDescription"),a(Fo,"props",d);var ge=class extends l{get attrs(){return{"data-slot":"alert-dialog-cancel"}}onClick(){this.env.setAlertDialogOpen(!1)}};a(ge,"template","baseui.AlertDialogCancel"),a(ge,"components",{Button:S}),a(ge,"props",d);var xe=class extends l{get attrs(){return{"data-slot":"alert-dialog-action"}}onClick(){this.props.onClick?.(),this.env.setAlertDialogOpen(!1)}};a(xe,"template","baseui.AlertDialogAction"),a(xe,"components",{Button:S}),a(xe,"props",{...d,onClick:i(Function)});C();v();var $o=class extends l{setup(){this.drawerState=w({open:z(this.props)}),this.control={instance:null},q({drawer:this.drawerState,drawerControl:this.control,setDrawerOpen:o=>this.setOpen(o)}),Q(this.drawerState,this.control)}setOpen(o){Y(this.props,this.drawerState,o)}};a($o,"template","baseui.Drawer"),a($o,"props",{open:i(Boolean),state:i(String),"default-open":i(Boolean),defaultOpen:i(Boolean),onOpenChange:i(Function),slots:i(Object)});var Ie=class extends l{onClick(){this.env.drawerControl.instance?.show()}};a(Ie,"template","baseui.DrawerTrigger"),a(Ie,"components",{Button:S}),a(Ie,"props",d);var zo=class extends l{setup(){this.rootRef=L("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},P(()=>{this.env.drawerControl.instance=B().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()}),M(()=>{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}};a(zo,"template","baseui.DrawerContent"),a(zo,"props",d);var Ho=class extends l{};a(Ho,"template","baseui.DrawerHeader"),a(Ho,"props",d);var jo=class extends l{};a(jo,"template","baseui.DrawerFooter"),a(jo,"props",d);var _o=class extends l{};a(_o,"template","baseui.DrawerTitle"),a(_o,"props",d);var Wo=class extends l{};a(Wo,"template","baseui.DrawerDescription"),a(Wo,"props",d);var ye=class extends l{get attrs(){return{"data-bs-dismiss":"offcanvas"}}};a(ye,"template","baseui.DrawerClose"),a(ye,"components",{Button:S}),a(ye,"props",d);C();v();var Vo=class extends l{setup(){this.sheetState=w({open:z(this.props),side:this.props.side}),this.control={instance:null},q({sheet:this.sheetState,sheetControl:this.control,setSheetOpen:o=>this.setOpen(o)}),Q(this.sheetState,this.control),H(o=>{this.sheetState.side=o.side})}setOpen(o){Y(this.props,this.sheetState,o)}};a(Vo,"template","baseui.Sheet"),a(Vo,"props",{open:i(Boolean),state:i(String),side:i(String),"default-open":i(Boolean),defaultOpen:i(Boolean),onOpenChange:i(Function),slots:i(Object)});var ve=class extends l{onClick(){this.env.sheetControl.instance?.show()}};a(ve,"template","baseui.SheetTrigger"),a(ve,"components",{Button:S}),a(ve,"props",d);var Ko=class extends l{setup(){this.rootRef=L("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},P(()=>{this.env.sheetControl.instance=B().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()}),M(()=>{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"}};a(Ko,"template","baseui.SheetContent"),a(Ko,"props",{...d,side:i(String)});var Go=class extends l{};a(Go,"template","baseui.SheetHeader"),a(Go,"props",d);var Xo=class extends l{};a(Xo,"template","baseui.SheetFooter"),a(Xo,"props",d);var Zo=class extends l{};a(Zo,"template","baseui.SheetTitle"),a(Zo,"props",d);var Jo=class extends l{};a(Jo,"template","baseui.SheetDescription"),a(Jo,"props",d);var we=class extends l{};a(we,"template","baseui.SheetClose"),a(we,"components",{Button:S}),a(we,"props",d);C();v();var Qo=class extends l{setup(){let o=w({open:_(this.props.state)});this.control={instance:null,bufferEl:null,lastContentHtml:null};let r=s=>{o.open!==s&&(o.open=s,this.props.onOpenChange?.(s))};q({popover:o,popoverControl:this.control,popoverSetOpen:r,popoverToggle:()=>this.control.instance?.toggle(),popoverClose:()=>this.control.instance?.hide()})}};a(Qo,"template","baseui.Popover"),a(Qo,"props",{state:i(String),onOpenChange:i(Function),...d});var Se=class extends l{setup(){this.rootRef={el:null},this.getRef=o=>{this.rootRef.el=o},this.onShown=()=>this.env.popoverSetOpen(!0),this.onHidden=()=>this.env.popoverSetOpen(!1),P(()=>{let o=this.env.popoverControl,r=o.bufferEl?.innerHTML??"";o.lastContentHtml=r,o.instance=new(B()).Popover(this.rootRef.el,{content:r,html:!0,trigger:"manual"}),this.rootRef.el.addEventListener("shown.bs.popover",this.onShown),this.rootRef.el.addEventListener("hidden.bs.popover",this.onHidden)}),M(()=>{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()}};a(Se,"template","baseui.PopoverTrigger"),a(Se,"components",{Button:S}),a(Se,"props",d);var Yo=class extends l{get style(){return K("display:none",this.props.style)}setup(){this.bufferRef=L("buffer"),P(()=>{this.env.popoverControl.bufferEl=this.bufferRef.el}),$(()=>{let o=this.env.popoverControl;o.bufferEl=this.bufferRef.el;let r=this.currentContentHtml();o.instance&&r!==o.lastContentHtml&&(o.lastContentHtml=r,o.instance.setContent({".popover-body":r}))})}currentContentHtml(){return this.props.content??this.bufferRef.el?.innerHTML??""}};a(Yo,"template","baseui.PopoverContent"),a(Yo,"props",{...d,content:i(String)});C();v();var tr=class extends l{setup(){this.state=w({open:!1}),q({hoverCard:this.state})}open(){this.state.open=!0}close(){this.state.open=!1}onKeyDown(o){o.key==="Escape"&&this.close()}};a(tr,"template","baseui.HoverCard"),a(tr,"props",{...d});var er=class extends l{};a(er,"template","baseui.HoverCardTrigger"),a(er,"props",d);var or=class extends l{get open(){return this.env.hoverCard.open}};a(or,"template","baseui.HoverCardContent"),a(or,"props",d);C();v();var Qn={...d,disabled:i(Boolean),inset:i(Boolean),onClick:i(Function),onSelect:i(Function),variant:i(String)},jt=class extends l{setup(){this.rootRef=L("root");let o=w({open:_(this.props.state)});this.control={instance:null};let r=c=>{o.open!==c&&(o.open=c,this.props.onOpenChange?.(c))};q({dropdownMenu:o,dropdownControl:this.control,dropdownSetOpen:r,dropdownToggle:()=>this.control.instance?.toggle(),dropdownClose:()=>this.control.instance?.hide()});let s=c=>{this.rootRef.el&&!this.rootRef.el.contains(c.target)&&this.control.instance?.hide()},n=c=>{c.key==="Escape"&&this.control.instance?.hide()};et(c=>{if(c)return document.addEventListener("click",s),document.addEventListener("keydown",n),()=>{document.removeEventListener("click",s),document.removeEventListener("keydown",n)}},()=>[o.open]),M(()=>{document.removeEventListener("click",s),document.removeEventListener("keydown",n)})}};a(jt,"template","baseui.DropdownMenu"),a(jt,"props",{state:i(String),onOpenChange:i(Function),...d});var mt=class extends l{setup(){this.rootRef={el:null},this.onShown=()=>this.env.dropdownSetOpen(!0),this.onHidden=()=>this.env.dropdownSetOpen(!1),this.getRef=o=>{o?(this.rootRef.el=o,this.env.dropdownControl.instance=B().Dropdown.getOrCreateInstance(o),o.addEventListener("shown.bs.dropdown",this.onShown),o.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 f("btn","bu-button","btn-outline-secondary","bu-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()}};a(mt,"template","baseui.DropdownMenuTrigger"),a(mt,"components",{Button:S}),a(mt,"props",d);var _t=class extends l{get open(){return this.env.dropdownMenu.open}get classNames(){return f("bu-dropdown-menu-content","dropdown-menu",this.open?"show":"",this.props.className)}};a(_t,"template","baseui.DropdownMenuContent"),a(_t,"props",{...d,align:i(String),alignOffset:i(Number),side:i(String),sideOffset:i(Number)});var rr=class extends l{};a(rr,"template","baseui.DropdownMenuGroup"),a(rr,"props",d);var sr=class extends l{};a(sr,"template","baseui.DropdownMenuLabel"),a(sr,"props",{...d,inset:i(Boolean)});var Wt=class extends l{get variant(){return this.props.variant||"default"}onClick(o){this.props.disabled||(this.props.onClick?.(o),this.props.onSelect?.(o),this.env.dropdownClose())}};a(Wt,"template","baseui.DropdownMenuItem"),a(Wt,"props",Qn);var Ce=class extends l{onClick(o){this.props.disabled||(this.props.onCheckedChange?.(!this.props.checked,o),this.props.onClick?.(o),this.props.onSelect?.(o))}};a(Ce,"template","baseui.DropdownMenuCheckboxItem"),a(Ce,"components",{Icon:N}),a(Ce,"props",{...Qn,checked:i(Boolean),onCheckedChange:i(Function)});var nr=class extends l{setup(){q({dropdownRadio:{value:this.props.value,onValueChange:this.props.onValueChange}})}};a(nr,"template","baseui.DropdownMenuRadioGroup"),a(nr,"props",{...d,value:i(String),onValueChange:i(Function)});var ke=class extends l{get checked(){return this.env.dropdownRadio?.value===this.props.value}onClick(o){this.props.disabled||(this.env.dropdownRadio?.onValueChange?.(this.props.value,o),this.props.onClick?.(o),this.props.onSelect?.(o))}};a(ke,"template","baseui.DropdownMenuRadioItem"),a(ke,"components",{Icon:N}),a(ke,"props",{...Qn,value:i(String)});var ar=class extends l{};a(ar,"template","baseui.DropdownMenuSeparator"),a(ar,"props",d);var ir=class extends l{};a(ir,"template","baseui.DropdownMenuShortcut"),a(ir,"props",d);var Vt=class extends l{setup(){this.rootRef=L("root");let{state:o,setOpen:r,toggle:s}=Rs(this.rootRef);q({dropdownSub:o,dropdownSubToggle:s,dropdownSubOpen:()=>r(!0),dropdownSubClose:()=>r(!1)})}};a(Vt,"template","baseui.DropdownMenuSub"),a(Vt,"props",d);var ft=class extends l{onMouseEnter(){this.props.disabled||this.env.dropdownSubOpen()}onClick(){this.props.disabled||this.env.dropdownSubToggle()}};a(ft,"template","baseui.DropdownMenuSubTrigger"),a(ft,"components",{Icon:N}),a(ft,"props",{...d,disabled:i(Boolean),inset:i(Boolean)});var Kt=class extends l{get open(){return this.env.dropdownSub.open}};a(Kt,"template","baseui.DropdownMenuSubContent"),a(Kt,"props",d);C();v();var cr=class extends l{setup(){this.state=w({open:!1,x:0,y:0});let o=()=>{this.state.open=!1};this.close=o,q({contextMenu:this.state,contextMenuOpenAt:(r,s)=>{this.state.open=!0,this.state.x=r,this.state.y=s},contextMenuClose:o}),document.addEventListener("click",o),M(()=>document.removeEventListener("click",o))}};a(cr,"template","baseui.ContextMenu"),a(cr,"props",{className:i(String),slots:i(Object)});var lr=class extends l{onContextMenu(o){o.preventDefault(),this.env.contextMenuOpenAt(o.clientX,o.clientY)}};a(lr,"template","baseui.ContextMenuTrigger"),a(lr,"props",d);var pr=class extends l{setup(){this.rootRef=L("root")}get open(){return this.env.contextMenu.open}get style(){return K(`left:${this.env.contextMenu.x}px;top:${this.env.contextMenu.y}px`,this.props.style)}};a(pr,"template","baseui.ContextMenuContent"),a(pr,"props",d);var ur=class extends l{onClick(){this.props.onClick?.(),this.env.contextMenuClose()}};a(ur,"template","baseui.ContextMenuItem"),a(ur,"props",{...d,onClick:i(Function)});C();v();var gl={"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 In(e){let o=gl[e];return o?["toast-container","position-fixed","p-3","pe-auto",...o]:null}var gt=class extends l{setup(){this.state=w({open:z(this.props)}),this.rootRef=L("root"),this.bootstrapToast=null,this.handleShown=()=>{this.state.open=!0},this.handleHidden=()=>{this.state.open=!1,this.props.onOpenChange?.(!1)},P(()=>{this.mountBootstrapToast(this.props.delay),this.state.open&&this.bootstrapToast.show()}),H(o=>{let r=oo(o)?z(o):this.state.open;o.delay!==this.props.delay?(this.bootstrapToast?.dispose(),this.mountBootstrapToast(o.delay),r&&this.bootstrapToast.show()):r!==this.state.open&&(r?this.bootstrapToast?.show():this.bootstrapToast?.hide())}),M(()=>{this.bootstrapToast?.dispose()})}mountBootstrapToast(o){let r=this.rootRef.el,s=o??3e3;this.bootstrapToast=new(B()).Toast(r,{autohide:s>0,delay:s||3e3}),r.addEventListener("shown.bs.toast",this.handleShown),r.addEventListener("hidden.bs.toast",this.handleHidden)}get classNames(){return f("toast","fade","bu-toast",In(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()}};a(gt,"template","baseui.Toast"),a(gt,"components",{Button:S}),a(gt,"props",{open:i(Boolean),state:i(String),variant:i(String),delay:i(Number),position:i(String),...d,onOpenChange:i(Function)});C();v();var dr=class extends l{setup(){this.state=w({open:new Set}),q({accordion:this.state,accordionToggle:o=>this.toggle(o)})}toggle(o){let r=!this.state.open.has(o);this.props.multiple||this.state.open.clear(),r?this.state.open.add(o):this.state.open.delete(o),this.props.onChange?.(r)}};a(dr,"template","baseui.Accordion"),a(dr,"props",{multiple:i(Boolean),onChange:i(Function),...d});var hr=class extends l{setup(){q({accordionItemState:this.props.state,accordionItemValue:this.props.value})}};a(hr,"template","baseui.AccordionItem"),a(hr,"props",{value:{type:String},state:i(String),...d});var Ae=class extends l{get open(){return this.env.accordionItemState!==void 0?_(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)}};a(Ae,"template","baseui.AccordionTrigger"),a(Ae,"components",{Icon:N,Button:S}),a(Ae,"props",d);var br=class extends l{setup(){this.rootRef=L("root"),this.initialOpen=this.open,gn(this.rootRef,()=>this.open)}get open(){return this.env.accordionItemState!==void 0?_(this.env.accordionItemState):this.env.accordion.open.has(this.env.accordionItemValue)}};a(br,"template","baseui.AccordionContent"),a(br,"props",d);C();v();var mr=class extends l{setup(){this.state=w({open:z(this.props)}),q({collapsible:this.state,collapsibleToggle:()=>this.toggle()}),Q(this.state)}toggle(){let o=!this.state.open;Y(this.props,this.state,o)}};a(mr,"template","baseui.Collapsible"),a(mr,"props",{open:i(Boolean),state:i(String),"default-open":i(Boolean),defaultOpen:i(Boolean),onOpenChange:i(Function),...d});var Le=class extends l{get attrs(){return{"aria-expanded":this.env.collapsible.open?"true":"false"}}onClick(){this.env.collapsibleToggle()}};a(Le,"template","baseui.CollapsibleTrigger"),a(Le,"components",{Button:S}),a(Le,"props",d);var fr=class extends l{setup(){this.rootRef=L("root"),this.initialOpen=this.open,gn(this.rootRef,()=>this.open)}get open(){return this.env.collapsible.open}};a(fr,"template","baseui.CollapsibleContent"),a(fr,"props",d);C();v();var Gt=class extends l{};a(Gt,"template","baseui.Breadcrumb"),a(Gt,"props",{...d});var Xt=class extends l{};a(Xt,"template","baseui.BreadcrumbList"),a(Xt,"props",{...d});var Zt=class extends l{get classNames(){return f("bu-breadcrumb-item",this.props.current&&"bu-breadcrumb-page",this.props.className)}};a(Zt,"template","baseui.BreadcrumbItem"),a(Zt,"props",{current:i(Boolean),...d});var Jt=class extends l{get classNames(){return f("bu-breadcrumb-link",this.props.className)}onClick(o){this.props.onClick?.(o)}};a(Jt,"template","baseui.BreadcrumbLink"),a(Jt,"props",{href:i(String),target:i(String),rel:i(String),...d,onClick:i(Function)});var Qt=class extends l{get classNames(){return f("bu-breadcrumb-page",this.props.className)}};a(Qt,"template","baseui.BreadcrumbPage"),a(Qt,"props",{...d});var xt=class extends l{get classNames(){return f("bu-breadcrumb-separator",this.props.className)}get hasCustomContent(){return!!this.props.slots?.default}};a(xt,"template","baseui.BreadcrumbSeparator"),a(xt,"components",{Icon:N}),a(xt,"props",{...d});var Ee=class extends l{get classNames(){return f("bu-breadcrumb-ellipsis",this.props.className)}get hasCustomContent(){return!!this.props.slots?.default}};a(Ee,"template","baseui.BreadcrumbEllipsis"),a(Ee,"components",{Icon:N}),a(Ee,"props",{...d});C();v();var gr=class extends l{get classNames(){return f("bu-pagination",this.props.className)}};a(gr,"template","baseui.Pagination"),a(gr,"props",{...d});var xr=class extends l{get classNames(){return f("page-item",this.props.current&&"active",this.props.disabled&&"disabled")}onClick(){this.props.disabled||this.props.onClick?.()}};a(xr,"template","baseui.PaginationItem"),a(xr,"props",{current:i(Boolean),disabled:i(Boolean),style:i([String,Object]),onClick:i(Function),slots:i(Object)});C();v();var Ir=class extends l{setup(){this.rootRef=L("root")}onKeyDown(o){let r=[...this.rootRef.el.querySelectorAll("a, button")].filter(c=>!c.disabled),s=r.indexOf(o.target),n=o.key==="ArrowRight"?1:o.key==="ArrowLeft"?-1:0;!n||s<0||(o.preventDefault(),r[(s+n+r.length)%r.length]?.focus())}};a(Ir,"template","baseui.NavigationMenu"),a(Ir,"props",{...d});var yr=class extends l{};a(yr,"template","baseui.NavigationMenuItem"),a(yr,"props",{href:i(String),...d});C();v();var vr=class extends l{get classNames(){return f("bu-menubar",this.props.className)}};a(vr,"template","baseui.Menubar"),a(vr,"props",{...d});C();v();var bi={...d,href:i(String)};function mi(e){globalThis.matchMedia?.("(max-width: 991.98px)").matches&&e.setSidebarOpen?.(!1)}var yt=class extends l{setup(){this.state=w({open:z(this.props)}),q({sidebar:this.state,setSidebarOpen:o=>this.setOpen(o)}),Q(this.state)}setOpen(o){Y(this.props,this.state,o)}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 f("bu-sidebar-root",this.props.className)}onKeyDown(o){o.key==="Escape"&&this.setOpen(!1)}};a(yt,"template","baseui.Sidebar"),a(yt,"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),...d});var Ms=class extends yt{};a(Ms,"template","baseui.Sidebar");var Be=class extends l{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)}};a(Be,"template","baseui.SidebarTrigger"),a(Be,"components",{Icon:N,Button:S}),a(Be,"props",{...d,icon:i(String),label:i(String)});var Yt=class extends l{get open(){return this.env.sidebar.open}};a(Yt,"template","baseui.SidebarContent"),a(Yt,"props",d);var wr=class extends l{};a(wr,"template","baseui.SidebarHeader"),a(wr,"props",d);var Sr=class extends l{};a(Sr,"template","baseui.SidebarFooter"),a(Sr,"props",d);var Cr=class extends l{};a(Cr,"template","baseui.SidebarInset"),a(Cr,"props",d);var Te=class extends l{onClick(){this.env.setSidebarOpen(!this.env.sidebar.open)}};a(Te,"template","baseui.SidebarRail"),a(Te,"components",{Button:S}),a(Te,"props",d);var kr=class extends l{};a(kr,"template","baseui.SidebarInput"),a(kr,"props",{className:i(String),style:i([String,Object]),placeholder:i(String),value:i(String),type:i(String)});var Ar=class extends l{};a(Ar,"template","baseui.SidebarSeparator"),a(Ar,"props",d);var qe=class extends l{onClick(){this.env.setSidebarOpen(!1)}};a(qe,"template","baseui.SidebarClose"),a(qe,"components",{Icon:N,Button:S}),a(qe,"props",{...d,icon:i(String),label:i(String)});var te=class extends l{};a(te,"template","baseui.SidebarGroup"),a(te,"props",{muted:i(Boolean),...d});var ee=class extends l{};a(ee,"template","baseui.SidebarGroupLabel"),a(ee,"props",bi);var Oe=class extends l{get ariaLabel(){return this.props["aria-label"]??this.props.ariaLabel}onClick(o){this.props.onClick?.(o)}};a(Oe,"template","baseui.SidebarGroupAction"),a(Oe,"components",{Button:S}),a(Oe,"props",{icon:i(String),"aria-label":i(String),ariaLabel:i(String),onClick:i(Function),...d});var Lr=class extends l{};a(Lr,"template","baseui.SidebarGroupContent"),a(Lr,"props",d);var Re=class extends l{setup(){let o=this.props["default-open"]!==void 0||this.props.defaultOpen!==void 0;this.state=w({open:oo(this.props)||o?z(this.props):!0}),Q(this.state)}get open(){return this.state.open}toggle(){let o=!this.state.open;Y(this.props,this.state,o)}};a(Re,"template","baseui.SidebarGroupCollapsible"),a(Re,"components",{Icon:N,Button:S}),a(Re,"props",{label:{type:String},open:i(Boolean),state:i(String),"default-open":i(Boolean),defaultOpen:i(Boolean),onOpenChange:i(Function),...d});var vt=class extends l{};a(vt,"template","baseui.SidebarMenu"),a(vt,"props",d);var oe=class extends l{};a(oe,"template","baseui.SidebarMenuItem"),a(oe,"props",d);var It=class extends l{get classNames(){return f("bu-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(o){this.props.onClick?.(o),mi(this.env)}};a(It,"template","baseui.SidebarMenuButton"),a(It,"components",{Icon:N,Button:S}),a(It,"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),...d});var Pe=class extends l{get ariaLabel(){return this.props["aria-label"]??this.props.ariaLabel}onClick(o){this.props.onClick?.(o)}};a(Pe,"template","baseui.SidebarMenuAction"),a(Pe,"components",{Button:S}),a(Pe,"props",{icon:i(String),"aria-label":i(String),ariaLabel:i(String),showOnHover:i(Boolean),onClick:i(Function),...d});var Er=class extends l{};a(Er,"template","baseui.SidebarMenuSub"),a(Er,"props",d);var Br=class extends l{};a(Br,"template","baseui.SidebarMenuBadge"),a(Br,"props",d);var Tr=class extends l{setup(){this.state=w({width:this.props.width||`${Math.floor(Math.random()*40)+50}%`})}get style(){return K(`--b-sidebar-skeleton-width:${this.state.width}`,this.props.style)}};a(Tr,"template","baseui.SidebarMenuSkeleton"),a(Tr,"props",{showIcon:i(Boolean),width:i(String),className:i(String),style:i([String,Object])});var qr=class extends l{};a(qr,"template","baseui.SidebarMenuSubItem"),a(qr,"props",d);var Ne=class extends l{get classNames(){return f("bu-sidebar-menu-sub-button",(this.props.active||this.props.isActive)&&"is-active",this.props.size&&`is-${this.props.size}`,this.props.className)}onClick(o){this.props.onClick?.(o),mi(this.env)}};a(Ne,"template","baseui.SidebarMenuSubButton"),a(Ne,"components",{Button:S}),a(Ne,"props",{...bi,active:i(Boolean),isActive:i(Boolean),size:i(String),onClick:i(Function)});C();v();var Me=class extends l{setup(){this.state=w({collapsed:this.props.collapsed??this.props.defaultCollapsed??!1,authState:this.props.authState??null}),q({shell:this.state,setShellCollapsed:o=>this.setCollapsed(o)}),H(o=>{o.collapsed!==void 0&&(this.state.collapsed=o.collapsed),this.state.authState=o.authState??null})}setCollapsed(o){this.props.collapsed===void 0&&(this.state.collapsed=o),this.props.onCollapsedChange?.(o)}dismissToast(){this.props.onToastOpenChange?.(!1)}runToastAction(){this.props.toast?.onAction?.()}};a(Me,"template","baseui.Shell"),a(Me,"components",{Sidebar:yt,Toast:gt,Button:S}),a(Me,"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),...d});var Ue=class extends l{};a(Ue,"template","baseui.ShellSidebar"),a(Ue,"components",{SidebarContent:Yt}),a(Ue,"props",d);var Or=class extends l{};a(Or,"template","baseui.ShellSidebarHeader"),a(Or,"props",d);var Rr=class extends l{};a(Rr,"template","baseui.ShellNav"),a(Rr,"props",d);var Pr=class extends l{};a(Pr,"template","baseui.ShellMain"),a(Pr,"props",d);var Nr=class extends l{};a(Nr,"template","baseui.ShellHeader"),a(Nr,"props",d);var De=class extends l{};a(De,"template","baseui.ShellContent"),a(De,"components",{Skeleton:Ft}),a(De,"props",{loading:i(Boolean),...d});var Fe=class extends l{get authState(){return this.env.shell.authState}logout(){this.authState?.onLogout?.()}};a(Fe,"template","baseui.ShellUserMenu"),a(Fe,"components",{Button:S}),a(Fe,"props",d);C();v();var Mr=class extends l{get classNames(){return f("table","bu-table",this.props.striped!==!1&&"table-striped",this.props.hover!==!1&&"table-hover",this.props.className)}};a(Mr,"template","baseui.Table"),a(Mr,"props",{striped:i(Boolean),hover:i(Boolean),responsive:i(Boolean),...d});C();v();var xl=[{key:"status",label:"Status",format:"capitalize"},{key:"email",label:"Email",sortable:!0,filterable:!0},{key:"amount",label:"Amount",align:"right",format:"currency"}],Il=[{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}],yl=[{label:"Copy payment ID"},{label:"View customer"},{label:"View payment details"}],Ur=4,Dr=8,vl=32,$e=class extends l{setup(){this.state=w({query:"",sortKey:null,sortDir:1,page:0,pageSize:this.initialPageSize,selectedKeys:[],hiddenColumns:this.columns.filter(o=>o.hidden||o.visible===!1).map(o=>o.key),columnsOpen:!1,actionRowKey:null,actionMenuStyle:null}),this.actionsMenuRef=L("actionsMenu"),this.actionsMenuTriggerEl=null,ro(window,"click",this.onWindowClick,!0),ro(window,"keydown",this.onWindowKeydown),ro(window,"resize",this.closeRowActions),ro(window,"scroll",this.closeRowActions,!0),$(()=>this.refreshActionsMenuPosition())}get columns(){return this.props.columns?.length?this.props.columns:xl}get rows(){return this.props.rows?.length?this.props.rows:Il}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?yl:[])}get variant(){return this.props.variant||"default"}get classNames(){return f("bu-data-table",`bu-data-table-${this.variant}`,this.props.className)}get viewportStyle(){let o=this.props["max-height"]??this.props.maxHeight;return o?`max-height: ${typeof o=="number"?`${o}px`:o};`:""}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(o=>!this.state.hiddenColumns.includes(o.key))}get visibleRows(){let o=this.state.query.toLowerCase(),r=this.columns.filter(c=>c.filterable===!0),s=(r.length?r:this.columns).map(c=>c.key),n=this.rows.filter(c=>!o||s.some(p=>String(c[p]).toLowerCase().includes(o)));return this.state.sortKey&&(n=[...n].sort((c,p)=>String(c[this.state.sortKey]).localeCompare(String(p[this.state.sortKey]))*this.state.sortDir)),n}get pageCount(){return Math.max(1,Math.ceil(this.visibleRows.length/this.state.pageSize))}get pageRows(){if(!this.hasPagination)return this.visibleRows;let r=Math.min(this.state.page,this.pageCount-1)*this.state.pageSize;return this.visibleRows.slice(r,r+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(o,r){return o.id??o.key??r}isSelected(o,r){return this.state.selectedKeys.includes(this.rowKey(o,r))}isColumnSortable(o){return this.hasSorting&&o.sortable===!0}onSearchInput(o){this.state.query=o.target.value,this.state.page=0}sortBy(o){let r=this.columns.find(s=>s.key===o);!r||!this.isColumnSortable(r)||(this.state.sortKey===o?this.state.sortDir=-this.state.sortDir:(this.state.sortKey=o,this.state.sortDir=1))}sortIcon(o){return this.state.sortKey!==o?"arrow-up-down":this.state.sortDir===1?"arrow-up":"arrow-down"}toggleColumn(o){this.state.hiddenColumns.includes(o)?this.state.hiddenColumns=this.state.hiddenColumns.filter(r=>r!==o):this.state.hiddenColumns=[...this.state.hiddenColumns,o]}toggleColumnsMenu(){this.state.columnsOpen=!this.state.columnsOpen}toggleRowActions(o,r,s){let n=this.rowKey(o,r);if(this.state.actionRowKey===n){this.closeRowActions();return}this.actionsMenuTriggerEl=s.currentTarget,this.state.actionRowKey=n,this.state.actionMenuStyle=this.estimateActionMenuStyle(s.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 o=this.pageRows.findIndex((r,s)=>this.rowKey(r,s)===this.state.actionRowKey);return o===-1?null:{row:this.pageRows[o],index:o}}estimateActionMenuStyle(o){let r=o.getBoundingClientRect(),s=this.rowActions.length*vl+Ur*2,n=window.innerHeight-r.bottom,p=n<s+Ur&&r.top>n?Math.max(Dr,r.top-Ur-s):r.bottom+Ur,u=Math.min(Math.max(Dr,r.right-160),window.innerWidth-160-Dr);return`position: fixed; top: ${Math.round(p)}px; left: ${Math.round(u)}px;`}refreshActionsMenuPosition(){if(this.state.actionRowKey===null||!this.actionsMenuTriggerEl)return;let o=this.actionsMenuRef.el;if(!o)return;let r=this.actionsMenuTriggerEl.getBoundingClientRect(),s=o.getBoundingClientRect(),n=window.innerHeight-r.bottom,c=r.top,u=n<s.height+Ur&&c>n?Math.max(Dr,r.top-Ur-s.height):Math.min(r.bottom+Ur,window.innerHeight-s.height-Dr),h=Math.min(Math.max(Dr,r.right-s.width),window.innerWidth-s.width-Dr),m=`position: fixed; top: ${Math.round(u)}px; left: ${Math.round(h)}px;`;this.state.actionMenuStyle!==m&&(this.state.actionMenuStyle=m)}onWindowClick(o){this.state.actionRowKey===null||this.actionsMenuRef.el?.contains(o.target)||this.actionsMenuTriggerEl?.contains(o.target)||this.closeRowActions()}onWindowKeydown(o){o.key==="Escape"&&this.closeRowActions()}setPage(o){this.state.page=Math.max(0,Math.min(o,this.pageCount-1))}setPageSize(o){this.state.pageSize=Number(o),this.state.page=0}optionValue(o){return`${o}`}toggleRow(o,r,s){let n=this.rowKey(o,r);this.state.selectedKeys=s?[...new Set([...this.state.selectedKeys,n])]:this.state.selectedKeys.filter(c=>c!==n),this.props.onSelectionChange?.(this.state.selectedKeys)}toggleAllVisible(o){let r=this.pageRows.map((s,n)=>this.rowKey(s,n));this.state.selectedKeys=o?[...new Set([...this.state.selectedKeys,...r])]:this.state.selectedKeys.filter(s=>!r.includes(s)),this.props.onSelectionChange?.(this.state.selectedKeys)}onAction(o,r,s){o.onSelect?.(r,s),this.props.onRowAction?.(o,r,s),this.closeRowActions()}columnLabel(o){return o.label??o.key}cellValue(o,r){let s=o[r.key];if(r.format==="currency"){let n=Number(s);return new Intl.NumberFormat("en-US",{style:"currency",currency:"USD"}).format(Number.isFinite(n)?n:0)}if(r.format==="capitalize"){let n=String(s??"");return n.charAt(0).toUpperCase()+n.slice(1)}return s??""}cellComponentProps(o,r){return r.componentProps?r.componentProps(o,r):{row:o,column:r,value:o[r.key]}}};a($e,"template","baseui.DataTable"),a($e,"components",{Button:S,Icon:N}),a($e,"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),...d,"max-height":i([String,Number]),maxHeight:i([String,Number])});C();v();var wl=new Intl.DateTimeFormat(void 0,{month:"long",year:"numeric"}),Sl=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],ze=class extends l{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 wl.format(new Date(this.year,this.month0,1))}get weekdays(){return Sl}get days(){let o=new Date(this.year,this.month0+1,0).getDate(),r=new Date(this.year,this.month0,1).getDay(),s=[];for(let n=0;n<r;n++)s.push(null);for(let n=1;n<=o;n++){let c=`${this.year}-${String(this.month0+1).padStart(2,"0")}-${String(n).padStart(2,"0")}`;s.push({day:n,value:c,selected:c===this.props.selected})}return s}onSelect(o){this.props.onChange?.(o)}};a(ze,"template","baseui.Calendar"),a(ze,"components",{Button:S}),a(ze,"props",{selected:i(String),month:i(Number),year:i(Number),className:i(String),style:i([String,Object]),onChange:i(Function)});v();var Fr=class extends J{get classNames(){return f("bu-date-picker","form-control",this.controlClass,this.isInvalid&&"is-invalid",this.props.className)}onInput(o){this.props.onChange?.(o.target.value,o)}};a(Fr,"template","baseui.DatePicker"),a(Fr,"props",{...nt,value:i(String),className:i(String),style:i([String,Object]),onChange:i(Function)});C();v();var $r=class extends J{setup(){super.setup(),this.rootRef=L("root");let{state:o}=Rs(this.rootRef);this.disclosure=o,this.state=w({query:this.selectedLabel})}get classNames(){return f("form-control",this.controlClass,this.isInvalid&&"is-invalid")}get selectedLabel(){return this.props.options.find(o=>o.value===this.props.value)?.label||""}get filteredOptions(){let o=this.state.query.toLowerCase();return this.props.options.filter(r=>r.label.toLowerCase().includes(o))}onInput(o){this.state.query=o.target.value,this.disclosure.open=!0}onFocus(){this.disclosure.open=!0}choose(o){this.state.query=o.label,this.disclosure.open=!1,this.props.onChange?.(o.value)}};a($r,"template","baseui.Combobox"),a($r,"props",{options:{type:Array},...nt,value:i(String),className:i(String),style:i([String,Object]),id:i(String),onChange:i(Function)});C();v();var zr=class extends l{setup(){this.state=w({query:""})}get filteredItems(){let o=this.state.query.toLowerCase();return this.props.items.filter(r=>r.label.toLowerCase().includes(o))}onInput(o){this.state.query=o.target.value}select(o){this.props.onSelect?.(o.value)}};a(zr,"template","baseui.Command"),a(zr,"props",{items:{type:Array},placeholder:i(String),className:i(String),style:i([String,Object]),onSelect:i(Function)});C();v();var Hr=class extends l{get classNames(){return f("bu-chart",this.props.type&&`bu-chart-${this.props.type}`,this.props.variant&&`bu-chart-${this.props.variant}`,this.props.className)}};a(Hr,"template","baseui.Chart"),a(Hr,"props",{config:i([String,Object]),label:i(String),type:i(String),value:i([String,Number]),variant:i(String),...d});C();v();var jr=class extends l{setup(){this.state=w({index:this.props.defaultIndex??0}),this.rootRef=L("root"),this.bootstrapCarousel=null,this.onSlid=o=>{this.state.index=o.to,this.props.onChange?.(this.state.index)},q({carousel:this.state,carouselInstance:()=>this.bootstrapCarousel}),P(()=>{this.bootstrapCarousel=new(B()).Carousel(this.rootRef.el,{interval:!1,wrap:!0,touch:!0}),this.rootRef.el.addEventListener("slid.bs.carousel",this.onSlid)}),M(()=>{this.rootRef.el.removeEventListener("slid.bs.carousel",this.onSlid),this.bootstrapCarousel?.dispose()})}};a(jr,"template","baseui.Carousel"),a(jr,"props",{slideCount:{type:Number},defaultIndex:i(Number),onChange:i(Function),...d});var _r=class extends l{setup(){this.rootRef=L("root"),this.initialActive=this.active,$(()=>{if(!this.rootRef.el)return;let o=this.rootRef.el.classList.contains("active");this.active&&!o?this.rootRef.el.classList.add("active"):!this.active&&o&&this.rootRef.el.classList.remove("active")})}get active(){return this.props.state!==void 0?_(this.props.state):this.env.carousel.index===this.props.index}};a(_r,"template","baseui.CarouselSlide"),a(_r,"props",{index:{type:Number},state:i(String),...d});var He=class extends l{onClick(){this.env.carouselInstance()?.prev()}};a(He,"template","baseui.CarouselPrevious"),a(He,"components",{Button:S}),a(He,"props",d);var je=class extends l{onClick(){this.env.carouselInstance()?.next()}};a(je,"template","baseui.CarouselNext"),a(je,"components",{Button:S}),a(je,"props",d);C();v();var Wr=class extends l{setup(){this.panelRef=L("panel"),this.state=w({width:null})}get panelStyle(){return this.state.width?`width:${this.state.width}px`:""}onPointerDown(o){let r=o.clientX,s=this.panelRef.el.getBoundingClientRect().width,n=this.props.min||160,c=this.props.max||720,p=h=>{this.state.width=Math.min(c,Math.max(n,s+h.clientX-r))},u=()=>{document.removeEventListener("pointermove",p),document.removeEventListener("pointerup",u),this.props.onChange?.(this.state.width)};document.addEventListener("pointermove",p),document.addEventListener("pointerup",u)}};a(Wr,"template","baseui.Resizable"),a(Wr,"props",{min:i(Number),max:i(Number),onChange:i(Function),...d});C();v();var Vr=class extends l{get classNames(){return f("bu-scroll-area",this.props.className)}};a(Vr,"template","baseui.ScrollArea"),a(Vr,"props",d);C();v();var fi={idle:"bu-attachment-idle",uploading:"bu-attachment-uploading",processing:"bu-attachment-processing",error:"bu-attachment-error",done:"bu-attachment-done"},gi={default:"bu-attachment-default",sm:"bu-attachment-sm",xs:"bu-attachment-xs"},Kr=class extends l{get state(){return fi[this.props.state]?this.props.state:"done"}get size(){return gi[this.props.size]?this.props.size:"default"}get orientation(){return this.props.orientation==="vertical"?"vertical":"horizontal"}get classNames(){return f("bu-attachment",fi[this.state],gi[this.size],`bu-attachment-${this.orientation}`,!this.hasContent&&"bu-attachment-picker",this.props.className)}get hasContent(){return!!this.props.slots?.default}onChange(o){this.props.onChange?.([...o.target.files])}};a(Kr,"template","baseui.Attachment"),a(Kr,"props",{state:i(String),size:i(String),orientation:i(String),multiple:i(Boolean),...d,onChange:i(Function)});var Gr=class extends l{get variant(){return this.props.variant==="image"?"image":"icon"}get classNames(){return f("bu-attachment-media",`bu-attachment-media-${this.variant}`,this.props.className)}};a(Gr,"template","baseui.AttachmentMedia"),a(Gr,"props",{variant:i(String),...d});var Xr=class extends l{};a(Xr,"template","baseui.AttachmentContent"),a(Xr,"props",d);var Zr=class extends l{};a(Zr,"template","baseui.AttachmentTitle"),a(Zr,"props",d);var Jr=class extends l{};a(Jr,"template","baseui.AttachmentDescription"),a(Jr,"props",d);var Qr=class extends l{};a(Qr,"template","baseui.AttachmentActions"),a(Qr,"props",d);var _e=class extends l{get variant(){return this.props.variant||"ghost"}get size(){return this.props.size||"icon-xs"}get className(){return f("bu-button-icon","bu-attachment-action",this.props.className)}get ariaLabel(){return this.props["aria-label"]??this.props.ariaLabel}onClick(o){this.props.onClick?.(o)}};a(_e,"template","baseui.AttachmentAction"),a(_e,"components",{Button:S}),a(_e,"props",{type:i(String),variant:i(String),size:i(String),disabled:i(Boolean),label:i(String),...d,"aria-label":i(String),ariaLabel:i(String),onClick:i(Function)});var We=class extends l{get classNames(){return f("bu-attachment-trigger",this.props.className)}get ariaLabel(){return this.props["aria-label"]??this.props.ariaLabel}onClick(o){this.props.onClick?.(o)}};a(We,"template","baseui.AttachmentTrigger"),a(We,"components",{Button:S}),a(We,"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 Yr=class extends l{get classNames(){return f("bu-attachment-group",this.props.className)}};a(Yr,"template","baseui.AttachmentGroup"),a(Yr,"props",{...d});var ts=class extends l{setup(){this.state=w({dragging:!1}),this.fileInput=L("fileInput")}get hasContent(){return!!this.props.slots?.default}get classNames(){return f("bu-attachment-dropzone",this.state.dragging&&"bu-attachment-dropzone-dragging",this.props.disabled&&"bu-attachment-dropzone-disabled",this.props.className)}openPicker(){this.props.disabled||this.fileInput.el?.click()}onInputChange(o){let r=Array.from(o.target.files??[]);o.target.value="",r.length&&this.props.onFilesSelected?.(r)}onDragOver(o){o.preventDefault(),!this.props.disabled&&(this.state.dragging=!0)}onDragLeave(){this.state.dragging=!1}onDrop(o){if(o.preventDefault(),this.state.dragging=!1,this.props.disabled)return;let r=Array.from(o.dataTransfer?.files??[]);r.length&&this.props.onFilesSelected?.(r)}};a(ts,"template","baseui.AttachmentDropzone"),a(ts,"props",{multiple:i(Boolean),disabled:i(Boolean),...d,onFilesSelected:i(Function)});C();v();var es=class extends l{setup(){this.state=w({errored:!1})}get showImage(){return!!this.props.src&&!this.state.errored}onError(){this.state.errored=!0}};a(es,"template","baseui.Avatar"),a(es,"props",{src:i(String),alt:i(String),title:i(String),...d});C();v();var os=class extends l{get classNames(){return f("bu-message",this.props.className)}get side(){return this.props.side||"incoming"}};a(os,"template","baseui.Message"),a(os,"props",{side:i(String),...d});C();v();var rs=class extends l{setup(){this.rootRef=L("root"),et(()=>{this.props.autoscroll!==!1&&this.rootRef.el&&(this.rootRef.el.scrollTop=this.rootRef.el.scrollHeight)})}};a(rs,"template","baseui.MessageScroller"),a(rs,"props",{autoscroll:i(Boolean),...d});C();v();var ss=class extends l{setup(){this.state=w({index:0}),q({questionnaire:this.state,questionnaireShow:o=>this.show(o)})}show(o){this.state.index=Math.min(this.props.stepCount-1,Math.max(0,o)),this.props.onChange?.(this.state.index)}};a(ss,"template","baseui.Questionnaire"),a(ss,"props",{stepCount:{type:Number},onChange:i(Function),...d});var ns=class extends l{get active(){return this.props.state!==void 0?_(this.props.state):this.env.questionnaire.index===this.props.index}};a(ns,"template","baseui.QuestionnaireStep"),a(ns,"props",{index:{type:Number},state:i(String),...d});var Ve=class extends l{get disabled(){return this.env.questionnaire.index===0}onClick(){this.env.questionnaireShow(this.env.questionnaire.index-1)}};a(Ve,"template","baseui.QuestionnairePrevious"),a(Ve,"components",{Button:S}),a(Ve,"props",d);var Ke=class extends l{onClick(){this.env.questionnaireShow(this.env.questionnaire.index+1)}};a(Ke,"template","baseui.QuestionnaireNext"),a(Ke,"components",{Button:S}),a(Ke,"props",{...d,stepCount:i(Number)});C();v();var as=class extends l{get max(){return this.props.max||100}get value(){return Math.min(this.max,Math.max(0,this.props.value||0))}get style(){return K(`--b-progress-value:${this.value/this.max*100}%`,this.props.style)}get classNames(){return f("bu-progress",this.props.className)}};a(as,"template","baseui.Progress"),a(as,"props",{value:i(Number),max:i(Number),className:i(String),style:i([String,Object])});C();v();var is=class extends l{get classNames(){return f("bu-aspect-ratio",this.props.className)}get style(){let o=this.props.ratio||`${this.props.width||16} / ${this.props.height||9}`;return K(`--b-aspect-ratio:${o}`,this.props.style)}};a(is,"template","baseui.AspectRatio"),a(is,"props",{ratio:i(String),width:i(Number),height:i(Number),...d});C();v();var cs=class extends l{get classNames(){return f("bu-bubble",this.props.className)}get side(){return this.props.side}};a(cs,"template","baseui.Bubble"),a(cs,"props",{side:i(String),...d});C();v();var ls=class extends l{get dir(){return this.props.dir==="rtl"?"rtl":"ltr"}};a(ls,"template","baseui.Direction"),a(ls,"props",{dir:i(String),...d});C();v();var ps=class extends l{get classNames(){return f("bu-item",this.props.className)}get variant(){return this.props.variant}};a(ps,"template","baseui.Item"),a(ps,"props",{variant:i(String),...d});C();v();var us=class extends l{get orientation(){return this.props.orientation==="vertical"?"vertical":"horizontal"}get classNames(){return f("bu-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"]}};a(us,"template","baseui.ButtonGroup"),a(us,"props",{orientation:i(String),size:i(String),"aria-label":i(String),"aria-labelledby":i(String),...d});var ds=class extends l{get orientation(){return this.props.orientation==="horizontal"?"horizontal":"vertical"}get classNames(){return f("bu-button-group-separator",`bu-button-group-separator-${this.orientation}`,this.props.className)}};a(ds,"template","baseui.ButtonGroupSeparator"),a(ds,"props",{orientation:i(String),className:i(String),style:i([String,Object])});var hs=class extends l{get classNames(){return f("bu-button-group-text",this.props.className)}};a(hs,"template","baseui.ButtonGroupText"),a(hs,"props",{...d});C();v();var bs=class extends l{get classNames(){return f("bu-field-set",this.props.className)}};a(bs,"template","baseui.FieldSet"),a(bs,"props",{...d});var ms=class extends l{get variant(){return this.props.variant||"legend"}get classNames(){return f("bu-field-legend",this.props.className)}};a(ms,"template","baseui.FieldLegend"),a(ms,"props",{variant:i(String),...d});var re=class extends l{get classNames(){return f("bu-field-group",this.props.className)}};a(re,"template","baseui.FieldGroup"),a(re,"props",{...d});var se=class extends l{setup(){q({fieldProps:()=>this.props})}get orientation(){return this.props.orientation||"vertical"}get classNames(){return f("bu-field",`bu-field-orientation-${this.orientation}`,this.props.className)}};a(se,"template","baseui.Field"),a(se,"props",{orientation:i(String),invalid:i(Boolean),label:i(String),labelBackground:i(String),description:i(String),useTip:i(Number),error:i(String),...d});var fs=class extends l{get classNames(){return f("bu-field-content",this.props.className)}};a(fs,"template","baseui.FieldContent"),a(fs,"props",{...d});var ne=class extends l{get classNames(){return f("bu-field-label",this.props.className)}};a(ne,"template","baseui.FieldLabel"),a(ne,"props",{for:i(String),...d});var gs=class extends l{get classNames(){return f("bu-field-title",this.props.className)}};a(gs,"template","baseui.FieldTitle"),a(gs,"props",{...d});var ae=class extends l{get classNames(){return f("bu-field-description",this.props.className)}};a(ae,"template","baseui.FieldDescription"),a(ae,"props",{...d});var xs=class extends l{get hasContent(){return!!this.props.slots?.default}get classNames(){return f("bu-field-separator",this.props.className)}};a(xs,"template","baseui.FieldSeparator"),a(xs,"props",{...d});var ie=class extends l{get classNames(){return f("bu-field-error",this.props.className)}};a(ie,"template","baseui.FieldError"),a(ie,"props",{message:i(String),...d});function Yn(e){return`Icon${String(e).split("-").filter(Boolean).map(r=>r[0].toUpperCase()+r.slice(1)).join("")}`}C();v();var Is=class extends l{get classNames(){return f("form-label","b-label","bu-label",this.props.className)}get state(){return this.props.state||(this.props.required?"required":void 0)}};a(Is,"template","baseui.Label"),a(Is,"props",{for:i(String),required:i(Boolean),state:i(String),...d});C();var Cl="bu-theme",kl="theme",Al="[b-theme-toggle]",Ll="[b-theme-label]";function yn(e){return e==="dark"?"dark":"light"}function El(e){return typeof globalThis.location>"u"?null:new URLSearchParams(globalThis.location.search).get(e)}function Bl(e,o=document.documentElement){let r=yn(e);return globalThis.thebase?.theme?.set?globalThis.thebase.theme.set(r):o&&(o.setAttribute("b-theme",r),o.setAttribute("data-bs-theme",r)),r}function xi(e,o,r){try{e.contentWindow?.BaseUI?.theme.set(o),e.contentDocument?.documentElement.setAttribute("b-theme",o),e.contentDocument?.documentElement.setAttribute("data-bs-theme",o)}catch{let s=new URL(e.getAttribute("src"),globalThis.location.href);s.searchParams.set(r,o),e.setAttribute("src",s.pathname+s.search+s.hash)}}function Tl(e){typeof document>"u"||typeof CustomEvent>"u"||document.dispatchEvent(new CustomEvent("baseui:theme-change",{detail:{theme:e}}))}function ce(e={}){let o=e.storageKey||Cl,r=e.queryKey||kl,s=e.toggleSelector??Al,n=e.labelSelector??Ll,c=e.root||(typeof document>"u"?null:document.documentElement);function p(){return El(r)}function u(){return yn(p()||globalThis.localStorage?.getItem(o)||c?.getAttribute("b-theme")||"light")}function h(E){typeof document>"u"||!s||document.querySelectorAll(s).forEach(I=>{I.setAttribute("aria-pressed",E==="dark"?"true":"false");let k=n?I.querySelector(n):null;k&&(k.textContent=E==="dark"?"Light theme":"Dark theme")})}function m(E){typeof document>"u"||document.querySelectorAll("iframe").forEach(I=>xi(I,E,r))}function g(E,I={}){let k=Bl(E,c);return!I.skipStorage&&!p()&&globalThis.localStorage?.setItem(o,k),h(k),m(k),Tl(k),k}function x(){return g(c?.getAttribute("b-theme")==="dark"?"light":"dark")}function y(){if(typeof document>"u")return u();let E=u();return g(E,{skipStorage:!!p()}),s&&document.addEventListener("click",I=>{I.target.closest?.(s)&&x()}),document.querySelectorAll("iframe").forEach(I=>{I.addEventListener("load",()=>xi(I,c?.getAttribute("b-theme")||E,r))}),E}return{current:u,set:g,toggle:x,syncFrames:m,init:y}}var ta=ce();typeof window<"u"&&(window.BaseUITheme=ta);v();v();qs();var Ii=["btn","bu-theme-button",...Object.values(G),...Object.values(Z)];function Us(e){let o=e==="dark";return{icon:o?"sun":"moon",label:o?"Switch to light theme":"Switch to dark theme",pressed:o?"true":"false"}}function vn({variant:e="outline",size:o,className:r}={}){return f("btn","bu-theme-button",G[e]||G.outline,Z[o],r)}var wt=class extends l{setup(){this.theme=ce({storageKey:X(this.props,"storage-key","storageKey")}),this.state=w({theme:this.theme.current()}),this.onThemeChange=o=>{this.state.theme=o.detail?.theme||this.theme.current()},P(()=>{this.state.theme=this.theme.set(this.theme.current(),{skipStorage:!0}),document.addEventListener("baseui:theme-change",this.onThemeChange)}),M(()=>document.removeEventListener("baseui:theme-change",this.onThemeChange))}get iconName(){return Us(this.state.theme).icon}get baseUrl(){return X(this.props,"base-url")}get label(){return Us(this.state.theme).label}get pressed(){return Us(this.state.theme).pressed}get classNames(){return vn(this.props)}get attrs(){return{"b-theme-button":""}}onClick(){let o=this.theme.toggle();this.state.theme=o,this.props.onChange?.(o)}};a(wt,"template","baseui.ThemeButton"),a(wt,"components",{Icon:N,Button:S}),a(wt,"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)});C();v();var Ge=class extends l{get classNames(){return f("bu-toggle","btn",this.props.variant==="outline"?"btn-outline-secondary":"btn-light",this.props.className)}get pressed(){return this.props.state!==void 0?_(this.props.state):!!this.props.pressed}onClick(){this.props.onChange?.(!this.pressed)}};a(Ge,"template","baseui.Toggle"),a(Ge,"components",{Button:S}),a(Ge,"props",{pressed:i(Boolean),state:i(String),variant:i(String),...d,onChange:i(Function)});C();v();var ys=class extends l{setup(){this.state=w({selected:new Set}),q({toggleGroup:this.state,toggleGroupSelect:o=>this.select(o)})}select(o){this.props.multiple?this.state.selected.has(o)?this.state.selected.delete(o):this.state.selected.add(o):this.state.selected=this.state.selected.has(o)?new Set:new Set([o]);let r=this.props.multiple?[...this.state.selected]:[...this.state.selected][0];this.props.onChange?.(r)}};a(ys,"template","baseui.ToggleGroup"),a(ys,"props",{multiple:i(Boolean),onChange:i(Function),...d});var Xe=class extends l{get pressed(){return this.env.toggleGroup.selected.has(this.props.value)}onClick(){this.env.toggleGroupSelect(this.props.value)}};a(Xe,"template","baseui.ToggleGroupItem"),a(Xe,"components",{Button:S}),a(Xe,"props",{value:{type:String},...d});C();v();C();v();Cn();function kn(e){let o=String(e??""),r=/^---\r?\n([\s\S]*?)\r?\n---[ \t]*\r?\n?/.exec(o);if(!r)return{data:{},content:o};let s={};for(let n of r[1].split(/\r?\n/)){let c=n.trim();if(!c||c.startsWith("#"))continue;let p=c.indexOf(":");if(p===-1)continue;let u=c.slice(0,p).trim();u&&(s[u]=hp(c.slice(p+1).trim()))}return{data:s,content:o.slice(r[0].length)}}function Ei(e){return e.length>=2&&(e[0]==='"'&&e.at(-1)==='"'||e[0]==="'"&&e.at(-1)==="'")?e.slice(1,-1):e}function hp(e){if(e==="")return"";if(e==="true")return!0;if(e==="false")return!1;if(/^-?\d+(\.\d+)?$/.test(e))return Number(e);if(e.startsWith("[")&&e.endsWith("]")){let o=e.slice(1,-1).trim();return o?o.split(",").map(r=>Ei(r.trim())):[]}return Ei(e)}var St=class extends l{setup(){this.rootRef=L("root"),this.editorRef=L("editor"),this.editorHandle=null,this.state=w({html:"",source:"",status:"loading",error:"",frontmatter:{}}),st(()=>this.load(this.props)),H(o=>{if(this.shouldReload(o))return this.load(o);this.shouldRestartEditor(o)&&this.destroyEditor()}),P(()=>this.afterRender()),$(()=>this.afterRender()),ue(()=>{this.destroyEditor(),this.rootRef.el&&Ds(this.rootRef.el)})}get classNames(){return f("bu-markdown",this.props.className)}get editorLabel(){return this.props.collaborative?"Collaborative Markdown editor":"Markdown editor"}shouldReload(o){return o.content!==this.props.content||o.src!==this.props.src}shouldRestartEditor(o){return o.editable!==this.props.editable||o.collaborative!==this.props.collaborative||o.room!==this.props.room||o.password!==this.props.password||o.signaling!==this.props.signaling}async load(o){this.destroyEditor(),this.state.status="loading",this.state.error="";let r=o.content??"";if(o.src)try{let s=await fetch(o.src);if(!s.ok)throw new Error(`${s.status} ${s.statusText}`);r=await s.text()}catch(s){this.state.status="error",this.state.error=s.message||String(s);return}try{this.state.source=r;let{data:s,content:n}=kn(r);this.state.frontmatter=s,this.state.html=nn(await Xs(n)),this.state.status="ready"}catch(s){this.state.status="error",this.state.error=s.message||String(s)}}get hasFrontmatterMeta(){let o=this.state.frontmatter;return!!(o.tags?.length||o.authors?.length)}enhance(){let o=this.rootRef.el;!o||this.state.status!=="ready"||Zs(o,{mermaid:this.props.mermaid!==!1,baseUi:this.props.baseUi!==!1})}afterRender(){this.props.editable?this.mountEditor():this.enhance()}async mountEditor(){let o=this.editorRef.el;if(!(!o||this.editorHandle||this.state.status!=="ready"))try{this.editorHandle=await Js({root:o,value:this.state.source,collaborative:!!this.props.collaborative,room:this.props.room||"bu-markdown",password:this.props.password,signaling:this.props.signaling,user:this.props.user,onChange:(r,s,n)=>{this.state.source=r,this.props.onChange?.(r,s,n)}})}catch(r){this.state.status="error",this.state.error=r.message||String(r)}}destroyEditor(){this.editorHandle?.destroy?.(),this.editorHandle=null}};a(St,"template","baseui.Markdown"),a(St,"components",{Badge:rt}),a(St,"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 la=["get","post","put","patch","delete","options","head","trace","query"];function bp(e,o,r){let s=String(e||"").trim();if(!s)return"";let n=s.replace(/\{([^}]+)\}/g,(c,p)=>{let u=r&&typeof r=="object"?r[p]:null;return u&&u.default!==void 0?String(u.default):`{${p}}`});try{return new URL(n,`${o}/`).href.replace(/\/$/,"")}catch{return n.replace(/\/$/,"")}}function W(e,o){if(e&&typeof e=="object"&&typeof e.$ref=="string"){let r=e.$ref.replace(/^#\//,"").split("/"),s=o;for(let n of r)s=s?.[decodeURIComponent(n.replace(/~1/g,"/").replace(/~0/g,"~"))];return s?{...s}:{}}return e}function ua(e,o){if(!Array.isArray(e?.allOf))return e;let r={...e,properties:{...e.properties},required:[...e.required||[]]};delete r.allOf;for(let s of e.allOf){let n=ua(W(s,o),o)||{};Object.assign(r.properties,n.properties),r.required.push(...n.required||[]),r.type||(r.type=n.type)}return r}function mp(e,o){if(!e)return null;let r=W(e,o);return!r||typeof r!="object"?null:r}function pa(e){return e&&typeof e.$ref=="string"?e.$ref.split("/").pop():null}function Ti(e,o){if(!e||typeof e!="object")return null;for(let[r,s]of Object.entries(e)){let n=mp(s,o);if(n){if(n.dataValue!==void 0)return{key:r,label:n.summary||r,value:n.dataValue,isAuto:!1};if(n.serializedValue!==void 0)return{key:r,label:n.summary||r,value:n.serializedValue,isAuto:!1};if(n.value!==void 0)return{key:r,label:n.summary||r,value:n.value,isAuto:!1};if(n.externalValue)return{key:r,label:n.summary||r,value:n.externalValue,isAuto:!1}}}return null}function da(e){if(e){if(e.example!==void 0)return e.example;if(e.default!==void 0)return e.default;if(Array.isArray(e.enum)&&e.enum.length)return e.enum[0]}}function ia(e,o){if(!e)return null;let r=Ti(e.examples,o);if(r)return r;if(e.example!==void 0)return{label:"media example",value:e.example,isAuto:!1};let s=W(e.schema,o),n=da(s);return n!==void 0?{label:"schema example",value:n,isAuto:!1}:null}function qi(e,o){let r=Ti(e.examples,o);if(r)return r;if(e.example!==void 0)return{label:"example",value:e.example,isAuto:!1};let s=W(e.schema,o),n=da(s);return n!==void 0?{label:"schema example",value:n,isAuto:!1}:null}function Fs(e,o,r=new Set){if(!e)return null;let s=pa(e);if(s){if(r.has(s))return{};r=new Set(r).add(s)}let n=ua(W(e,o),o);if(!n)return null;let c=da(n);if(c!==void 0)return c;if(n.type==="array"||n.items)return[Fs(n.items||{},o,r)];if(n.properties||n.type==="object"){let p={};for(let[u,h]of Object.entries(n.properties||{}))p[u]=Fs(h,o,r);return p}switch(n.type){case"integer":return n.minimum??0;case"number":return n.minimum??0;case"boolean":return!0;case"string":return n.format==="date-time"?new Date().toISOString():n.format==="date"?new Date().toISOString().slice(0,10):n.format==="byte"?"base64==":n.title||"string";default:return null}}function Qs(e,o,{depth:r=0,prefix:s="",seen:n=new Set,required:c=!1,selfRow:p=!0}={}){if(!e||r>4)return[];let u=pa(e);if(u){if(n.has(u))return[];n=new Set(n).add(u)}let h=ua(W(e,o),o),m=[],g=h.contentMediaType||h.contentEncoding?[h.contentMediaType,h.contentEncoding&&`encoding:${h.contentEncoding}`].filter(Boolean).join(", "):"",x=h.discriminator?.propertyName?`discriminator: ${h.discriminator.propertyName}`:"";if(Array.isArray(h.prefixItems))return p&&m.push({path:s||"items",type:"tuple",required:c,description:h.description||""}),h.prefixItems.forEach((y,E)=>{m.push(...Qs(y,o,{depth:r+1,prefix:`${s}[${E}]`,seen:n,required:!1}))}),h.items&&m.push(...Qs(h.items,o,{depth:r+1,prefix:`${s}[n]`,seen:n,required:!1})),m;if(h.type==="array"||h.items)return p&&m.push({path:s||"items",type:"array",required:c,description:h.description||""}),m.push(...Qs(h.items||{},o,{depth:r+1,prefix:`${s}[]`,seen:n,required:!1})),m;if(h.properties||h.type==="object"||h.patternProperties){let y=new Set(h.required||[]);for(let[E,I]of Object.entries(h.properties||{})){let k=W(I,o),T=s?`${s}.${E}`:E;m.push({path:T,type:k.type||(k.$ref?pa(I):"any")||"any",format:k.format||"",enum:k.enum,required:y.has(E),description:k.description||""}),(k.type==="object"||k.properties||k.type==="array"||k.items)&&m.push(...Qs(I,o,{depth:r+1,prefix:T,seen:n,required:y.has(E),selfRow:!1}))}for(let[E,I]of Object.entries(h.patternProperties||{})){let k=W(I,o);m.push({path:s?`${s}.<${E}>`:`<${E}>`,type:k.type||"any",format:k.format||"",required:!1,description:k.description||""})}return m}return m.push({path:s||"value",type:h.type||"any",format:h.format||"",enum:h.enum,required:c,description:[h.description,g,x].filter(Boolean).join(" \u2014 ")}),m}function fp(e){let o=qi(e,this);return{name:e.name,in:e.in,required:!!e.required,type:e.type||e.schema?.type||"string",format:e.format||e.schema?.format||"",description:e.description||"",default:e.default??e.schema?.default,enum:e.enum||e.schema?.enum,example:o?o.value:void 0,exampleLabel:o?o.label:""}}var gp={authorizationCode:"accessCode",implicit:"implicit",password:"password",clientCredentials:"application"};function xp(e){if(e.type==="http")return{...e,type:String(e.scheme).toLowerCase()==="basic"?"basic":"bearer"};if(e.type==="openIdConnect")return{...e,type:"bearer",oauth2MetadataUrl:e.openIdConnectUrl};if(e.type!=="oauth2"||!e.flows)return e;let[o,r]=Object.entries(e.flows)[0]||[];return{...e,...r,flow:gp[o]||o,scopes:r?.scopes||{}}}function Oi(e){let o=e.securityDefinitions||e.components?.securitySchemes||{};return Object.fromEntries(Object.entries(o).map(([r,s])=>[r,xp(W(s,e))]))}function Ip(e,o){let r=Oi(o),s=e.security||o.security||[],n=[];for(let c of s)for(let p of Object.keys(c)){let u=r[p];u&&n.push({key:p,...u})}return n}function ca(e,o,r,s){let n={path:[],query:[],header:[],formData:[],body:null};for(let m of s.parameters||[]){let g=W(m,e);if(g.in==="body"){let x={schema:g.schema},y=ia(x,e);n.body={required:!!g.required,schema:g.schema,description:g.description||"",contentType:"application/json",example:y?y.value:Fs(g.schema,e),exampleLabel:y?y.label:"auto",exampleIsAuto:!y}}else n[g.in]&&n[g.in].push(fp.call(e,g))}if(s.requestBody){let m=W(s.requestBody,e)||{},[g,x]=Object.entries(m.content||{})[0]||[];if(g&&x){let y=ia(x,e);n.body={required:!!m.required,schema:x.schema||null,description:m.description||"",contentType:g,encoding:x.encoding||null,itemSchema:x.itemSchema||null,example:y?y.value:Fs(x.schema,e),exampleLabel:y?y.label:"auto",exampleIsAuto:!y}}}let c=Object.entries(s.responses||{}).map(([m,g])=>{let x=W(g,e)||{},[y,E]=Object.entries(x.content||{})[0]||[],I=E?ia(E,e):null;return{status:m,summary:x.summary||"",description:x.description||"",contentType:y||"application/json",schema:E?.schema||x.schema||null,encoding:E?.encoding||null,headers:yp(x.headers,e),links:vp(x.links,e),example:I?I.value:E?.schema?Fs(E.schema,e):null,exampleLabel:I?I.label:"auto",exampleIsAuto:!I&&!!E?.schema}}).sort((m,g)=>{let x=Bi(m.status),y=Bi(g.status);return x-y}),p=wp(s.callbacks,e),u=r.toUpperCase();return{id:(s.operationId||`${r}-${o}`).replace(/[^a-zA-Z0-9]+/g,"-").replace(/^-+|-+$/g,"").toLowerCase(),method:u,path:o,tag:s.tags&&s.tags[0]||"default",summary:s.summary||s.operationId||`${u} ${o}`,description:s.description||"",deprecated:!!s.deprecated,produces:s.produces||e.produces||["application/json"],consumes:s.consumes||e.consumes||(n.body?["application/json"]:[]),parameters:n,responses:c,callbacks:p,externalDocs:s.externalDocs||null,security:Ip(s,e)}}function yp(e,o){return!e||typeof e!="object"?[]:Object.entries(e).map(([r,s])=>{let n=W(s,o)||{},c=qi({...n,in:"header"},o);return{name:r,required:!!n.required,deprecated:!!n.deprecated,type:n.schema?.type||"string",description:n.description||"",example:c?c.value:void 0}})}function vp(e,o){return!e||typeof e!="object"?[]:Object.entries(e).map(([r,s])=>{let n=W(s,o)||{};return{name:r,operationId:n.operationId||"",operationRef:n.operationRef||"",description:n.description||"",parameters:n.parameters||{}}})}function wp(e,o){if(!e||typeof e!="object")return[];let r=[];for(let[s,n]of Object.entries(e)){let c=W(n,o)||{};for(let[p,u]of Object.entries(c)){let h=W(u,o)||{};for(let m of la)h[m]&&r.push({name:s,expression:p,method:m.toUpperCase(),summary:h[m].summary||"",description:h[m].description||""})}}return r}function Bi(e){if(e==="default")return 999;let o=parseInt(e,10);return Number.isNaN(o)?998:o}async function ha(e,o=""){let r=await fetch(e);if(!r.ok)throw new Error(`Failed to fetch spec: HTTP ${r.status}`);return An(await r.json(),o)}function An(e,o=""){if(!e||typeof e!="object"||!e.paths&&!e.webhooks)throw new Error("Not an OpenAPI document (missing paths).");let r=e.schemes&&e.schemes.includes("https")?"https":e.schemes?.[0]||"https",s=e.host||location.host,n=e.basePath||"",c=`${r}://${s}${n}`.replace(/\/$/,""),p=o?[{name:"",url:o.replace(/\/$/,""),description:""}]:Array.isArray(e.servers)&&e.servers.length?e.servers.map(I=>({name:I?.name||"",url:bp(I?.url,c,I?.variables),description:String(I?.description||"").trim()})).filter(I=>I.url):[{name:"",url:c,description:""}],u=p[0]?.url||c,h=(e.tags||[]).map(I=>I.name),m=new Map((e.tags||[]).map(I=>[I.name,I])),g=[];for(let[I,k]of Object.entries(e.paths||{})){let T=W(k,e)||{};for(let D of la)T[D]&&g.push(ca(e,I,D,T[D]));for(let[D,O]of Object.entries(T.additionalOperations||{}))g.push(ca(e,I,D.toLowerCase(),O))}let x=[];for(let[I,k]of Object.entries(e.webhooks||{})){let T=W(k,e)||{};for(let D of la)T[D]&&x.push(ca(e,I,D,T[D]))}let E=[...new Set([...h,...g.map(I=>I.tag)])].map(I=>{let k=m.get(I);return{id:I.replace(/[^a-zA-Z0-9]+/g,"-").toLowerCase(),name:I,summary:k?.summary||"",description:k?.description||"",parent:k?.parent||"",kind:k?.kind||"",items:g.filter(T=>T.tag===I)}}).filter(I=>I.items.length);return{spec:e,info:e.info||{},baseUrl:u,derivedBaseUrl:c,servers:p,securityDefinitions:Oi(e),groups:E,webhooks:x,resolveRef:I=>W(I,e),generateExample:I=>Fs(I,e),schemaRows:I=>Qs(I,e),findOperation:I=>g.find(k=>k.id===I)||x.find(k=>k.id===I),firstOperation:()=>g[0]}}var Ys=[{id:"curl",label:"CURL",icon:"img/bash-plain.svg"},{id:"csharp",label:"CSHARP",icon:"img/csharp-original.svg"},{id:"go",label:"GO",icon:"img/go-original-wordmark.svg"},{id:"node",label:"NODEJS",icon:"img/nodejs-original.svg"},{id:"ruby",label:"RUBY",icon:"img/ruby-plain.svg"},{id:"php",label:"PHP",icon:"img/php-original.svg"},{id:"javascript",label:"JAVASCRIPT",icon:"img/javascript-original.svg"},{id:"python",label:"PYTHON",icon:"img/python-original.svg"},{id:"java",label:"JAVA",icon:"img/java-original.svg"},{id:"c",label:"C",icon:"img/c-original.svg"},{id:"swift",label:"SWIFT",icon:"img/swift-original.svg"},{id:"objc",label:"OBJECTIVE-C",icon:"img/objectivec-plain.svg"},{id:"kotlin",label:"KOTLIN",icon:"img/kotlin-original.svg"},{id:"rust",label:"RUST",icon:"img/rust-original.svg"},{id:"powershell",label:"POWERSHELL",icon:"img/windows8-original.svg"},{id:"dart",label:"DART",icon:"img/dart-original.svg"},{id:"lua",label:"LUA",icon:"img/lua.svg"}];function Sp(e){let o=new URL(e.url);return(e.query||[]).forEach(([r,s])=>{r&&o.searchParams.set(r,String(s||""))}),o.toString()}function Cp(e,o){let r=[];return(e.headers||[]).forEach(([n,c])=>{n&&r.push([n,String(c??"")])}),o&&e.bodyText&&!kp(r,"Content-Type")&&r.push(["Content-Type",e.mimeType||"application/json"]),r}function kp(e,o){let r=o.toLowerCase();return e.some(function(s){return String(s[0]||"").toLowerCase()===r})}function Ap(e,o){return String(e||"").split(`
|
|
28
|
-
`).
|
|
29
|
-
`)}function
|
|
30
|
-
`)}
|
|
31
|
-
|
|
32
|
-
`)}function
|
|
33
|
-
`)}function
|
|
34
|
-
`)}function Mp(e,o,r){let s=["OkHttpClient client = new OkHttpClient();","","Request.Builder builder = new Request.Builder()",' .url("'+U(o)+'")'];return r.forEach(function(n){s.push(' .addHeader("'+U(n[0])+'", "'+U(n[1])+'")')}),e.bodyText?s.push(";","",'MediaType mediaType = MediaType.parse("'+U(e.mimeType||"application/json")+'");','RequestBody body = RequestBody.create("""'+U(e.bodyText)+'""", mediaType);','Request request = builder.method("'+e.method+'", body).build();'):s.push(";","",'Request request = builder.method("'+e.method+'", null).build();'),s.push("","try (Response response = client.newCall(request).execute()) {"," System.out.println(response.code());",' System.out.println(response.body() != null ? response.body().string() : "");',"}"),s.join(`
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
`)}function $p(e,o,r){let s=["#include <curl/curl.h>","","int main(void) {"," CURL *curl = curl_easy_init();"," if (!curl) return 1;",""," struct curl_slist *headers = NULL;"];return r.forEach(function(n){s.push(' headers = curl_slist_append(headers, "'+Bn(n[0]+": "+n[1])+'");')}),s.push(' curl_easy_setopt(curl, CURLOPT_URL, "'+Bn(o)+'");'),s.push(' curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "'+Bn(e.method)+'");'),r.length&&s.push(" curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);"),e.bodyText&&s.push(' curl_easy_setopt(curl, CURLOPT_POSTFIELDS, "'+Bn(e.bodyText)+'");'),s.push(""," curl_easy_perform(curl);"," curl_slist_free_all(headers);"," curl_easy_cleanup(curl);"," return 0;","}"),s.join(`
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
`)}function _p(e,o,r){let s=["let client = reqwest::Client::new();","let response = client"," ."+e.method.toLowerCase()+'("'+U(o)+'")'];return r.forEach(function(n){s.push(' .header("'+U(n[0])+'", "'+U(n[1])+'")')}),e.bodyText&&s.push(' .body(r#"'+e.bodyText.replace(/"#/g,'"#""#')+'"#)'),s.push(" .send()"," .await?;","",'println!("{}", response.status());','println!("{}", response.text().await?);'),s.join(`
|
|
43
|
-
`)}function Wp(e,o,r){let s=["$headers = @{"];return r.forEach(function(n){s.push(' "'+Tn(n[0])+'" = "'+Tn(n[1])+'"')}),s.push("}",""),e.bodyText&&s.push('$body = @"',e.bodyText,'"@',""),s.push("$response = Invoke-RestMethod -Method "+e.method+' -Uri "'+Tn(o)+'" -Headers $headers'+(e.bodyText?' -Body $body -ContentType "'+Tn(e.mimeType||"application/json")+'"':""),"$response | ConvertTo-Json -Depth 10"),s.join(`
|
|
44
|
-
`)}function Vp(e,o,r){let s=["import 'package:http/http.dart' as http;","","final uri = Uri.parse('"+tt(o)+"');","final headers = <String, String>{"];return r.forEach(function(n){s.push(" '"+tt(n[0])+"': '"+tt(n[1])+"',")}),s.push("};",""),e.bodyText?s.push("final response = await http."+e.method.toLowerCase()+"(uri, headers: headers, body: '''"+e.bodyText.replace(/'''/g,"'' '")+"''');"):s.push("final response = await http."+e.method.toLowerCase()+"(uri, headers: headers);"),s.push("print('Status: ${response.statusCode}');","print(response.body);"),s.join(`
|
|
45
|
-
`)}function Kp(e,o,r){let s=['local http = require("socket.http")','local ltn12 = require("ltn12")',"","local response_body = {}","local headers = {"];return r.forEach(function(n){s.push(' ["'+U(n[0])+'"] = "'+U(n[1])+'",')}),s.push("}",""),e.bodyText&&(s.push("local body = [==["+Tp(e.bodyText)+"]==]",""),s.push('headers["Content-Length"] = tostring(#body)')),s.push("local _, code = http.request{",' url = "'+U(o)+'",',' method = "'+U(e.method)+'",'," headers = headers,"),e.bodyText&&s.push(" source = ltn12.source.string(body),"),s.push(" sink = ltn12.sink.table(response_body),","}","",'print("Status: " .. tostring(code))',"print(table.concat(response_body))"),s.join(`
|
|
46
|
-
`)}var Gp={curl:Op,javascript:Ri,node:Rp,python:Pp,go:Np,java:Mp,csharp:Up,php:Dp,ruby:Fp,c:$p,swift:zp,objc:Hp,kotlin:jp,rust:_p,powershell:Wp,dart:Vp,lua:Kp};async function ba(e,o){let r=Ys.find(function(c){return c.id===e});if(!r)throw new Error("Unknown language: "+e);let s=Cp(o,!0),n=Sp(o);return Gp[r.id](o,n,s)}var Pi={implicit:"Implicit",password:"Resource Owner Password Credentials",application:"Client Credentials",accessCode:"Authorization Code"},Xp=["POST","PUT","PATCH"];function vs(e){try{return sessionStorage.getItem(e)||""}catch{return""}}function tn(e,o){try{o?sessionStorage.setItem(e,o):sessionStorage.removeItem(e)}catch{}}function fa(){return!!(vs("apikey")||vs("oauthkey"))}function ma(e){return e.example!==void 0?String(e.example):e.default!==void 0?String(e.default):e.enum?.length?String(e.enum[0]):e.type==="integer"||e.type==="number"?e.format==="int64"?"10":"1":e.type==="boolean"?"true":e.required&&e.in==="path"?"string":""}function ga(e,o){let r=vs("apikey"),s=vs("oauthkey");for(let n of e.security)n.type==="apiKey"&&n.in==="header"?o.header[n.name]=r:n.type==="apiKey"&&n.in==="query"?o.query[n.name]=r:n.type==="basic"?o.header.Authorization=r?`Basic ${r}`:"":(n.type==="oauth2"||n.type==="bearer")&&(o.header.Authorization=s?`Bearer ${s}`:"")}function Ni(e,o){let r={baseUrl:o,path:{},query:{},header:{},bodyText:"",mimeType:e.consumes?.[0]||"application/json"};return e.parameters.path.forEach(s=>{r.path[s.name]=ma(s)}),e.parameters.query.forEach(s=>{r.query[s.name]=s.required?ma(s):""}),e.parameters.header.forEach(s=>{r.header[s.name]=s.required?ma(s):""}),e.produces?.length&&(r.header.Accept=e.produces.includes("application/json")?"application/json":e.produces[0]),e.parameters.body&&(r.mimeType=e.parameters.body.contentType||r.mimeType,r.bodyText=xa(e.parameters.body.example)),ga(e,r),r}function xa(e){return typeof e=="string"?e:JSON.stringify(e,null,2)??""}function Ia(e,o){let r=e.path;for(let[n,c]of Object.entries(o.path))r=r.replace(`{${n}}`,encodeURIComponent(c??""));let s=!!e.parameters.body&&Xp.includes(e.method);return{method:e.method,url:`${o.baseUrl}${r}`,query:Object.entries(o.query).filter(([,n])=>n!==""),headers:Object.entries(o.header).filter(([,n])=>n!==""),bodyText:s?o.bodyText:"",mimeType:o.mimeType}}function Mi(e){let o=e.query.length?`${e.url}?${new URLSearchParams(e.query)}`:e.url,r=Object.fromEntries(e.headers);return e.bodyText&&(r["Content-Type"]=r["Content-Type"]||e.mimeType),{url:o,headers:r,headerLines:Object.entries(r).map(([s,n])=>`${s}: ${n}`).join(`
|
|
47
|
-
`)}}async function Ui(e,o){let r=performance.now(),s=await fetch(o.url,{method:e.method,headers:o.headers,body:e.bodyText||void 0}),n=Math.round(performance.now()-r),c=await s.text();return{status:s.status,statusText:s.statusText,ms:n,headerLines:[...s.headers.entries()].map(([p,u])=>`${p}: ${u}`).join(`
|
|
48
|
-
`),bodyText:Zp(c)}}function Zp(e){try{return JSON.stringify(JSON.parse(e),null,2)}catch{return e}}function Di(e){let o=parseInt(e,10);return e==="default"||Number.isNaN(o)?"default":o<300?"2xx":o<400?"3xx":o<500?"4xx":"5xx"}function Fi(e,o,r){if(!e)return"";try{let s=new URL(o),n=new URL(r.derivedBaseUrl||r.baseUrl||o),c=new URL(e,`${s.href.replace(/\/$/,"")}/`);return c.host===n.host&&(c.protocol=s.protocol,c.username=s.username,c.password=s.password,c.host=s.host),c.href}catch{return String(e)}}function $i(){return Array.from(crypto.getRandomValues(new Uint8Array(16)),e=>e.toString(16).padStart(2,"0")).join("")}function zi({def:e,clientId:o,scopes:r,state:s,redirectUri:n,baseUrl:c,doc:p}){let u=new URL(Fi(e.authorizationUrl,c,p));return u.searchParams.set("response_type",e.flow==="implicit"?"token":"code"),o&&u.searchParams.set("client_id",o),u.searchParams.set("redirect_uri",n),r.length&&u.searchParams.set("scope",r.join(" ")),u.searchParams.set("state",s),u.toString()}async function Hi(e,o,r,s){if(!e)throw new Error("No tokenUrl defined for this scheme.");let n=new URLSearchParams;for(let[u,h]of Object.entries(o))h&&n.set(u,h);let c=await fetch(Fi(e,r,s),{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:n.toString()}),p=await c.json().catch(()=>({}));if(!c.ok||!p.access_token)throw new Error(p.error_description||p.error||`HTTP ${c.status}`);return p.access_token}function ji(e,o,r){let s={client_id:o.clientId,client_secret:o.clientSecret,scope:r.join(" ")};return e==="password"?{grant_type:"password",username:o.username,password:o.password,...s}:{grant_type:"client_credentials",...s}}var Jp=["curl","csharp","go","node","ruby","php"],Qp="(max-width: 1100px)";function _i(e){return e==="DELETE"?"DEL":e}function Yp(){let e=[...document.scripts].find(o=>/\/baseui(\.[\w-]+)*\.(min\.)?js(\?|$)/.test(o.src));return e?`${e.src.replace(/[?#].*$/,"").replace(/\/[^/]*$/,"")}/apidoc`:""}var kt=class extends l{get children(){return this.props.groups.filter(o=>o.parent===this.props.group.name)}methodLabel(o){return _i(o)}};a(kt,"template","baseui.ApiDocGroup"),a(kt,"props",{group:Object,groups:Array,current:String,href:Function,onSelect:Function});kt.components={ApiDocGroup:kt,Icon:N};var Ct=class extends l{setup(){this.rootRef=L("root"),this.mainRef=L("main"),this.doc=null,this.pendingOAuth=new Map,this.watchers=new Set,this.rowsCache=new WeakMap,this.overlayQuery=window.matchMedia(Qp),this.state=w({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:fa(),stored:{apikey:"",oauthkey:""},inputs:{apikey:"",oauthkey:""},oauth:{},oauthStatus:{}}),this.onHashChange=()=>this.setCurrent(this.routeId()),this.onViewportChange=()=>{this.state.sidebarOpen=!this.overlayQuery.matches},this.onDocumentClick=o=>this.closeSidebarOnOutsideClick(o),this.onOAuthMessage=o=>this.handleOAuthMessage(o),this.onThemeChange=()=>this.readSystemTheme(),st(()=>this.load(this.props)),H(o=>this.shouldReload(o)?this.load(o):void 0),P(()=>this.addListeners()),ue(()=>this.removeListeners())}get classNames(){return f("bu-apidoc",this.props.className)}get rootStyle(){return K(this.props.height?`--bu-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 o=this.props.languages;return o?.length?Ys.filter(r=>o.includes(r.id)):Ys}get currentLanguage(){return this.languages.find(o=>o.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 o=this.doc.groups.filter(r=>!r.parent);return this.doc.webhooks.length&&o.push({id:"webhooks",name:"Webhooks",items:this.doc.webhooks,kind:""}),o}get breadcrumb(){let o=this.op;if(!o)return[{label:"Home",id:"introduction",home:!0},{label:"Introduction"}];let r=this.doc.groups.find(s=>s.name===o.tag);return[{label:"Home",id:"introduction",home:!0},{label:this.title,id:"introduction"},{label:o.tag,id:r?r.items[0].id:"introduction"},{label:o.summary}]}get authSchemes(){return Object.entries(this.doc.securityDefinitions).map(([o,r])=>({key:o,def:r,scopes:Object.entries(r.scopes||{})}))}get serverOptions(){return this.doc.servers.length?this.doc.servers:[{url:this.doc.baseUrl,name:"",description:""}]}get tryItParams(){let{path:o,query:r,header:s}=this.op.parameters;return[...o.map(n=>({...n,group:"path"})),...r.map(n=>({...n,group:"query"})),...s.map(n=>({...n,group:"header"}))]}get selectedBaseUrl(){return this.draft?.baseUrl||this.doc.baseUrl}methodLabel(o){return _i(o)}statusClass(o){return Di(o)}formatExample(o){return xa(o)}serverLabel(o){let r=[o.name,o.description].filter(Boolean).join(" \u2014 ");return r?`${r} (${o.url})`:o.url}languageTone(o){return Jp.includes(o)?o:"default"}encodingEntries(o){return Object.entries(o)}oauthFlowLabel(o){return Pi[o]||o||"unknown"}schemaRows(o){return this.rowsCache.has(o)||this.rowsCache.set(o,this.doc.schemaRows(o)),this.rowsCache.get(o)}depth(o){return(o.match(/\./g)||[]).length}lineNumbers(o){return String(o||"").split(`
|
|
49
|
-
`).map((r,s)=>s+1)}iconUrl(o){let r=this.props.assetBase??this.assetBase??(this.assetBase=Yp());return r?`${r.replace(/\/$/,"")}/${o.icon}`:""}href(o){return this.props.hash?`#/${o}`:"#"}shouldReload(o){return o.src!==this.props.src||o.spec!==this.props.spec||o.serverUrl!==this.props.serverUrl}async load(o){this.state.status="loading";try{this.doc=o.spec?An(o.spec,o.serverUrl):await ha(o.src,o.serverUrl)}catch(r){this.state.status="error",this.state.error=r.message||String(r),o.onError?.(r);return}this.state.drafts={},this.state.current=this.routeId(o),this.ensureDraft(),this.state.status="ready",this.updateSnippet(),o.onLoad?.(this.doc)}routeId(o=this.props){let r=o.hash?location.hash.replace(/^#\//,""):o.operation;return r&&this.doc.findOperation(r)?r:"introduction"}go(o,r){this.props.hash||(o.preventDefault(),this.setCurrent(r)),this.overlayQuery.matches&&(this.state.sidebarOpen=!1)}setCurrent(o){let r=this.state;r.current=o,r.result=null,r.respTab=0,r.respView={},this.ensureDraft(),this.updateSnippet(),this.mainRef.el&&(this.mainRef.el.scrollTop=0),this.props.onNavigate?.(o)}ensureDraft(){let o=this.op;o&&!this.state.drafts[o.id]&&(this.state.drafts[o.id]=Ni(o,this.doc.baseUrl))}toggleSidebar(){this.state.sidebarOpen=!this.state.sidebarOpen}closeSidebarOnOutsideClick(o){!this.overlayQuery.matches||!this.state.sidebarOpen||o.target.closest?.(".sidebar-shell, .sidebar-toggle")||(this.state.sidebarOpen=!1)}selectResponse(o){this.state.respTab=Number(o)}setResponseView(o,r){this.state.respView[o]=r}setLanguage(o){this.state.lang=o,this.updateSnippet()}onBaseUrl(o){this.draft.baseUrl=o,this.updateSnippet()}onParam(o,r,s){this.draft[r][s]=o,this.updateSnippet()}onBody(o){this.draft.bodyText=o,this.updateSnippet()}async updateSnippet(){let o=this.op;if(!o||!this.tryItEnabled)return;let r=this.currentLanguage;try{this.state.snippet=await ba(r.id,Ia(o,this.draft))}catch(s){this.state.snippet=`// Could not generate ${r.label} snippet: ${s.message}`}}async send(){let o=this.op,r=Ia(o,this.draft),s=Mi(r),n={method:r.method,url:s.url,headerLines:s.headerLines,bodyText:r.bodyText};this.state.result={phase:"sending",sent:n};let c;try{c={phase:"done",sent:n,res:await Ui(r,s)}}catch(p){c={phase:"error",sent:n,message:p.message}}this.state.current===o.id&&(this.state.result=c)}clearResult(){this.state.result=null}collapseRequest(){this.rootRef.el.querySelectorAll(".tryit-card details").forEach((o,r)=>{r<3&&(o.open=!1)})}toggleTheme(){this.state.themeOverride=this.theme==="dark"?"light":"dark"}readSystemTheme(){let o=document.documentElement.getAttribute("data-bs-theme"),r=o?o==="dark":window.matchMedia("(prefers-color-scheme: dark)").matches;this.state.systemTheme=r?"dark":"light"}openAuth(){var r;let o=this.state;o.stored.apikey=vs("apikey"),o.stored.oauthkey=vs("oauthkey"),o.inputs.apikey=o.stored.apikey,o.inputs.oauthkey=o.stored.oauthkey;for(let{key:s,def:n}of this.authSchemes)(r=o.oauth)[s]??(r[s]={clientId:"",clientSecret:"",username:"",password:"",scopes:Object.keys(n.scopes||{})});o.authOpen=!0}closeAuth(){this.state.authOpen=!1}setAuthOpen(o){this.state.authOpen=o}setAuthInput(o,r){this.state.inputs[o]=r}setField(o,r,s){o[r]=s}saveAuth(){tn("apikey",this.state.inputs.apikey.trim()),tn("oauthkey",this.state.inputs.oauthkey.trim()),this.closeAuth(),this.applyAuthToAll()}clearAuth(o){tn(o,""),this.state.stored[o]="",this.state.inputs[o]="",this.applyAuthToAll()}applyAuthToAll(){for(let[o,r]of Object.entries(this.state.drafts))ga(this.doc.findOperation(o),r);this.state.authed=fa(),this.updateSnippet()}toggleScope(o,r){let s=this.state.oauth[o].scopes,n=s.indexOf(r);n<0?s.push(r):s.splice(n,1)}setOAuthStatus(o,r,s=!1){this.state.oauthStatus[o]={message:r,isError:s}}applyOAuthToken(o,r,s){tn("oauthkey",r),this.state.stored.oauthkey=r,this.state.inputs.oauthkey=r,Object.assign(this.state.oauth[o],{clientId:s.clientId,clientSecret:s.clientSecret}),this.applyAuthToAll(),this.setOAuthStatus(o,"Token acquired.")}async fetchToken(o,r,s){try{let n=await Hi(this.doc.securityDefinitions[o].tokenUrl,r,this.selectedBaseUrl,this.doc);this.applyOAuthToken(o,n,s)}catch(n){this.setOAuthStatus(o,`Token request failed: ${n.message}. This is usually a CORS restriction on the auth server.`,!0)}}startOAuth2Flow(o){let r=this.doc.securityDefinitions[o],s=this.state.oauth[o],n=[...s.scopes];if(r.flow==="implicit"||r.flow==="accessCode")return this.openOAuthPopup(o,r,s,n);if(r.flow==="password"||r.flow==="application")return this.setOAuthStatus(o,"Requesting token\u2026"),this.fetchToken(o,ji(r.flow,s,n),s);this.setOAuthStatus(o,`Unsupported OAuth2 flow: ${r.flow}`,!0)}openOAuthPopup(o,r,s,n){if(!r.authorizationUrl)return this.setOAuthStatus(o,"No authorizationUrl defined for this scheme.",!0);let c=$i(),p=zi({def:r,clientId:s.clientId,scopes:n,state:c,redirectUri:this.redirectUri,baseUrl:this.selectedBaseUrl,doc:this.doc}),u=window.open(p,`oauth2-authorize-${o}`,"width=560,height=680");if(!u)return this.setOAuthStatus(o,"Popup blocked \u2014 allow popups for this site and try again.",!0);this.pendingOAuth.set(c,{key:o,flow:r.flow,fields:{...s}}),this.setOAuthStatus(o,"Waiting for authorization in the popup\u2026"),this.watchPopup(u,c,o)}watchPopup(o,r,s){let n=setInterval(()=>{o.closed&&(clearInterval(n),this.watchers.delete(n),this.pendingOAuth.delete(r)&&this.setOAuthStatus(s,"Authorization window was closed before completing.",!0))},500);this.watchers.add(n)}get redirectUri(){return this.props.oauthRedirectUri||new URL("oauth2-redirect.html",document.baseURI).href}handleOAuthMessage(o){let r=o.data;if(o.origin!==window.location.origin||r?.source!=="oauth2-redirect")return;let s=this.pendingOAuth.get(r.state);if(!s)return;this.pendingOAuth.delete(r.state);let{key:n,flow:c,fields:p}=s;if(r.error)return this.setOAuthStatus(n,`Authorization failed: ${r.error}${r.errorDescription?" - "+r.errorDescription:""}`,!0);if(c==="implicit")return r.accessToken?this.applyOAuthToken(n,r.accessToken,p):this.setOAuthStatus(n,"Authorization server did not return an access token.",!0);if(!r.code)return this.setOAuthStatus(n,"Authorization server did not return a code.",!0);this.setOAuthStatus(n,"Exchanging code for token\u2026"),this.fetchToken(n,{grant_type:"authorization_code",code:r.code,redirect_uri:this.redirectUri,client_id:p.clientId,client_secret:p.clientSecret},p)}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)}};a(Ct,"template","baseui.ApiDoc"),a(Ct,"components",{ApiDocGroup:kt,Markdown:St,Badge:rt,Breadcrumb:Gt,BreadcrumbItem:Zt,BreadcrumbLink:Jt,BreadcrumbList:Xt,BreadcrumbPage:Qt,BreadcrumbSeparator:xt,Button:S,Checkbox:Ht,Dialog:Pt,DialogContent:bt,DialogDescription:Dt,DialogFooter:Mt,DialogHeader:Nt,DialogTitle:Ut,Icon:N,Input:Bt,NativeSelect:zt,TabContent:Rt,Tabs:Tt,TabsContainer:qt,TabsList:Ot,TabTrigger:ht,Textarea:$t}),a(Ct,"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])});C();v();function qn(e,o){if(!e)return null;if(e.type==="file"&&(e.path===o||e.meta?.slug===o))return e;for(let r of e.children||[]){let s=qn(r,o);if(s)return s}return null}function tu(e){return e.replace(/\.[^./]+$/,"").replace(/[_-]+/g," ").trim().split(/\s+/).map(r=>r.charAt(0).toUpperCase()+r.slice(1)).join(" ")}var $s=class $s extends l{get label(){let o=this.props.node.meta;return o?.sidebar_label||o?.title||tu(this.props.node.name)}get hasSubfolders(){return(this.props.node.children||[]).some(o=>o.type==="dir")}select(o){this.props.onSelect(o)}};a($s,"template","baseui.MarkdownTreeNode"),a($s,"components",{MarkdownTreeNode:$s,Icon:N,SidebarGroupLabel:ee,SidebarMenu:vt,SidebarMenuItem:oe,SidebarMenuButton:It,DropdownMenu:jt,DropdownMenuTrigger:mt,DropdownMenuContent:_t,DropdownMenuItem:Wt,DropdownMenuSub:Vt,DropdownMenuSubTrigger:ft,DropdownMenuSubContent:Kt}),a($s,"props",{node:{type:Object},activePath:i(String),onSelect:{type:Function},nested:i(Boolean)});var zs=$s,Ze=class extends l{setup(){this.state=w({tree:null,status:"loading",error:""}),st(()=>this.load())}async load(){this.state.status="loading",this.state.error="";try{let o=await fetch(this.props.src);if(!o.ok)throw new Error(`${o.status} ${o.statusText}`);this.state.tree=await o.json(),this.state.status="ready"}catch(o){this.state.status="error",this.state.error=o.message||String(o)}}};a(Ze,"template","baseui.MarkdownTree"),a(Ze,"components",{MarkdownTreeNode:zs,SidebarGroup:te,SidebarMenu:vt}),a(Ze,"props",{src:{type:String},activePath:i(String),onSelect:{type:Function},className:i(String),style:i([String,Object])});C();function Wi(e=document.querySelector("[b-block-code-template]")){let s=((e?.tagName==="SCRIPT"?e.textContent:e?.innerHTML)?.replace(/^\n/,"").replace(/\s+$/,"")||"").split(`
|
|
50
|
-
`),n=s.filter(p=>p.trim()).map(p=>p.match(/^\s*/)?.[0].length||0),c=n.length?Math.min(...n):0;return s.map(p=>p.slice(c)).join(`
|
|
51
|
-
`)}function Vi(e,o=0){let r=" ".repeat(o),s=[];for(let n of e.childNodes){if(n.nodeType===Node.TEXT_NODE){let u=n.textContent.trim();u&&s.push(`${r}${u}`);continue}if(n.nodeType!==Node.ELEMENT_NODE)continue;let c=[...n.attributes].map(u=>` ${u.name}="${u.value}"`).join("");if(![...n.childNodes].some(u=>u.nodeType===Node.ELEMENT_NODE||u.nodeType===Node.TEXT_NODE&&u.textContent.trim())){s.push(`${r}<${n.localName}${c}>${n.textContent.trim()}</${n.localName}>`);continue}s.push(`${r}<${n.localName}${c}>`),s.push(...Vi(n,o+1)),s.push(`${r}</${n.localName}>`)}return s}async function Ki(e){if(!e?.trim())return"";let{expandSelfClosingTags:o,extractTagCaseMap:r,normalizeOwlPreviewMarkup:s}=await Promise.resolve().then(()=>(Cn(),Li)),n=document.createElement("div");return n.innerHTML=o(e),s(n,r(e)),Vi(n).join(`
|
|
52
|
-
`)}function Gi(e){e.querySelectorAll('[b-block="dashboard-01"], [b-block^="sidebar-"]').forEach(o=>{let r=o.querySelector("[b-block-sidebar-toggle], button[aria-label='Toggle sidebar']"),s=o.querySelector("[b-block-sidebar]");!r||!s||(o.setAttribute("b-att-sidebar",o.getAttribute("b-att-sidebar")||"open"),r.setAttribute("b-block-sidebar-toggle",""),r.setAttribute("aria-expanded",o.getAttribute("b-att-sidebar")==="open"?"true":"false"),r.addEventListener("click",()=>{let n=o.getAttribute("b-att-sidebar")!=="open";o.setAttribute("b-att-sidebar",n?"open":"collapsed"),r.setAttribute("aria-expanded",n?"true":"false")}))}),e.querySelectorAll('[b-block^="sidebar-"] [b-block-subnav]').forEach(o=>{let r=o.previousElementSibling;r&&(r.setAttribute("b-block-subnav-toggle",""),r.setAttribute("aria-expanded","true"),o.setAttribute("b-att-state","open"),r.addEventListener("click",s=>{s.preventDefault();let n=o.getAttribute("b-att-state")!=="open";o.setAttribute("b-att-state",n?"open":"collapsed"),r.setAttribute("aria-expanded",n?"true":"false")}))})}v();var On=ce({storageKey:"bu-example-theme",toggleSelector:"",labelSelector:""}),eu=[{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"}],ou={desktop:"",tablet:"768px",mobile:"390px"},ru="/dist/icons/lucide";function su(){return document.querySelector("[b-block-code-template]")}function nu(e){return e.match(/<templates[^>]*>([\s\S]*)<\/templates>/)?.[1]||e}function au(e){for(let o of e.querySelectorAll?.("[b-block] [b-icon], [b-block] [b-ui='icon']")||[])!o.hasAttribute("b-icon-base-url")&&!o.hasAttribute("b-att-base-url")&&o.setAttribute("b-icon-base-url",ru)}var Je=class extends l{setup(){this.navItems=this.props.navItems||eu,this.previewFrame=L("previewFrame"),this.embedRoot=L("embedRoot"),this.code=Wi(),this.state=w({mode:"preview",viewport:"desktop",copyLabel:"Copy code",embed:new URLSearchParams(globalThis.location.search).get("embed")==="1",codeVariant:"owl",staticTemplate:"",staticTemplateStatus:"idle"}),P(()=>this.mountPreview()),$(()=>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(o){if(this.state.codeVariant=o,o==="template"&&this.state.staticTemplateStatus==="idle"){this.state.staticTemplateStatus="loading";let r=await Ki(this.code);this.state.staticTemplate=r,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 o=ou[this.state.viewport]||"";return o?`max-width:${o}`:""}setMode(o){this.state.mode=o}setViewport(o){this.state.viewport=o}async copyCode(){await globalThis.navigator?.clipboard?.writeText(this.activeCode),this.state.copyLabel="Copied"}mountPreview(){this.state.embed&&(document.body.className="m-0");let o=this.state.embed?this.embedRoot.el:this.previewFrame.el,r=su();if(!(!o||!r)){if(r.tagName==="SCRIPT"){this.mountOwlPreview(o,r);return}o.replaceChildren(r.content.cloneNode(!0)),this.mountStaticBaseUI(o),Gi(o)}}async mountOwlPreview(o,r){o.replaceChildren();class s extends l{setup(){this.state=w({collapsed:!1})}}a(s,"template","examples.SidebarBlock");let n=[await pe("/dist/baseui.templates.xml"),r.textContent].map(nu).join(`
|
|
53
|
-
`);await so(s,o,{templates:`<templates>${n}</templates>`}),On.set(On.current(),{skipStorage:!0})}mountStaticBaseUI(o=document){au(o),globalThis.thebase?.mountAll(o),On.set(On.current(),{skipStorage:!0})}};a(Je,"template","baseui.BlockViewer"),a(Je,"components",{Button:S,Icon:N,ThemeButton:wt}),a(Je,"props",{navItems:i(Array)});C();v();var ws=class extends l{setup(){this.pwaState=w({open:z(this.props)}),q({pwa:this.pwaState,setPwaOpen:o=>this.setOpen(o)}),Q(this.pwaState)}setOpen(o){Y(this.props,this.pwaState,o)}};a(ws,"template","baseui.Pwa"),a(ws,"props",{open:i(Boolean),"default-open":i(Boolean),defaultOpen:i(Boolean),onOpenChange:i(Function),slots:i(Object)});var Qe=class extends l{onClick(){this.env.setPwaOpen(!0)}};a(Qe,"template","baseui.PwaTrigger"),a(Qe,"components",{Button:S}),a(Qe,"props",d);var Ss=class extends l{setup(){this.rootRef=L("root"),et(o=>{if(!o)return;let r=document.activeElement;return Ps(this.rootRef.el)[0]?.focus(),()=>r?.focus?.()},()=>[this.env.pwa.open])}get open(){return this.env.pwa.open}onKeyDown(o){o.key==="Escape"&&this.env.setPwaOpen(!1)}onBackdropClick(o){o.target===this.rootRef.el&&this.env.setPwaOpen(!1)}};a(Ss,"template","baseui.PwaContent"),a(Ss,"props",d);var Cs=class extends l{};a(Cs,"template","baseui.PwaHeader"),a(Cs,"props",d);var ks=class extends l{};a(ks,"template","baseui.PwaTitle"),a(ks,"props",d);var As=class extends l{};a(As,"template","baseui.PwaDescription"),a(As,"props",d);var Ls=class extends l{};a(Ls,"template","baseui.PwaBody"),a(Ls,"props",d);var Es=class extends l{get steps(){return Array.isArray(this.props.steps)?this.props.steps:[]}};a(Es,"template","baseui.PwaSteps"),a(Es,"props",{...d,steps:i(Array)});var Bs=class extends l{};a(Bs,"template","baseui.PwaFooter"),a(Bs,"props",d);var Ye=class extends l{onClick(){this.env.setPwaOpen(!1)}};a(Ye,"template","baseui.PwaClose"),a(Ye,"components",{Button:S}),a(Ye,"props",d);C();v();var Xi="",Zi="";function Ji(e,o){return typeof e=="string"?e:o}function iu(e){return{title:e.submitted&&e.title.trim().length>0&&e.title.trim().length<5?"Bug title must be at least 5 characters.":"",description:e.submitted&&e.description.length>0&&e.description.length<20?"Description must be at least 20 characters.":""}}var to=class extends l{setup(){this.state=w({title:Ji(this.props.title,Xi),description:Ji(this.props.description,Zi),submitted:!1})}get classNames(){return f("bu-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 iu(this.state)}get titleInvalid(){return!!this.errors.title}get descriptionInvalid(){return!!this.errors.description}reset(){this.state.title=Xi,this.state.description=Zi,this.state.submitted=!1}submit(o){o.preventDefault(),this.state.submitted=!0,!this.titleInvalid&&!this.descriptionInvalid&&this.props.onSubmit?.({title:this.state.title.trim(),description:this.state.description})}};a(to,"template","baseui.Form"),a(to,"components",{Button:S,Field:se,FieldDescription:ae,FieldError:ie,FieldGroup:re,FieldLabel:ne}),a(to,"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)});C();v();var ya;function cu(){return ya??(ya=import("./runtime/milkdown/milkdown-text-editor.js")),ya}async function Rn(e){return(await cu()).createMilkdownTextEditor(e)}function Pn({collaborative:e,providerType:o,url:r}={}){return!!e||!!(o&&r)}var Ts=class extends l{setup(){this.editorRef=L("editor"),this.editorHandle=null,this.mountPromise=null,this.mountToken=0,this.isDestroyed=!1,this.state=w({content:"",status:"loading",error:""}),st(()=>this.load(this.props)),H(o=>{if(this.shouldReload(o))return this.load(o);this.shouldRestartEditor(o)&&this.destroyEditor()}),P(()=>this.mountEditor()),$(()=>this.mountEditor()),ue(()=>{this.isDestroyed=!0,this.destroyEditor()})}get classNames(){return f("bu-text-editor",this.props.className)}get isCollaborative(){return Pn({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(o){return o.content!==this.props.content||o.src!==this.props.src}shouldRestartEditor(o){return o.collaborative!==this.props.collaborative||o.provider!==this.props.provider||o.room!==this.props.room||o.url!==this.props.url||o.password!==this.props.password||o.signaling!==this.props.signaling}async load(o){this.destroyEditor(),this.state.status="loading",this.state.error="";let r=o.content??"";if(o.src)try{let s=await fetch(o.src);if(!s.ok)throw new Error(`${s.status} ${s.statusText}`);r=await s.text()}catch(s){this.state.status="error",this.state.error=s.message||String(s);return}this.state.content=r,this.state.status="ready"}async mountEditor(){let o=this.editorRef.el;if(this.isDestroyed||!o||this.editorHandle||this.mountPromise||this.state.status!=="ready")return;let r=++this.mountToken;return this.mountPromise=(async()=>{try{let s=await Rn({root:o,value:this.state.content,placeholder:this.props.placeholder,collaborative:this.isCollaborative,providerType:this.props.provider,room:this.props.room||"bu-text-editor",url:this.props.url,password:this.props.password,signaling:this.props.signaling,user:this.props.user,onChange:(n,c,p)=>{this.state.content=n,this.props.onChange?.(n,c,p)}});if(r!==this.mountToken){s.destroy?.();return}this.editorHandle=s}catch(s){r===this.mountToken&&(this.state.status="error",this.state.error=s.message||String(s))}finally{this.mountPromise=null,this.isDestroyed||this.mountEditor()}})(),this.mountPromise}destroyEditor(){this.mountToken++,this.editorHandle?.destroy?.(),this.editorHandle=null}};a(Ts,"template","baseui.TextEditor"),a(Ts,"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])});A();function lu(e){let{open:o,close:r,destroy:s}=xn(e,{closeSelector:"[b-alert-dialog-cancel], [b-alert-dialog-action], [b-alert-dialog-close]",trapFocus:!0});return e.setAttribute("role","alertdialog"),e.BaseUIAlertDialog={open:o,close:r},{destroy:()=>{s(),delete e.BaseUIAlertDialog}}}b.register("alert-dialog",{type:"owl",mount:lu});A();var va={default:"bu-alert-default",destructive:"bu-alert-destructive",info:"bu-alert-default",success:"alert-success",warning:"alert-warning",danger:"bu-alert-destructive"};function pu(e){e.classList.add("alert","bu-alert",va[e.getAttribute("b-att-variant")||"default"]||va.default),e.setAttribute("role",e.getAttribute("role")||"alert");let o=null;if(!!e.getAttribute("b-att-dismissible")){if(e.classList.add("alert-dismissible","fade","show"),!e.querySelector('[data-bs-dismiss="alert"]')){let s=document.createElement("button");s.type="button",s.className="btn-close",s.setAttribute("data-bs-dismiss","alert"),s.setAttribute("aria-label","Close"),e.appendChild(s)}o=new(B()).Alert(e)}return{destroy:()=>{o?.dispose(),e.classList.remove("alert","bu-alert","alert-dismissible","fade","show",...Object.values(va))}}}b.register("alert",{type:"static",mount:pu});C();A();function Qi(e,o){return e.getAttribute(o)!=="false"}function uu(e){let o=e.getAttribute("b-att-templates");if(o)return o;let r=[...document.scripts].find(s=>/\/baseui(\.[\w-]+)*\.(min\.)?js(\?|$)/.test(s.src));return r?r.src.replace(/[?#].*$/,"").replace(/[^/]*$/,"baseui.templates.xml"):"/dist/baseui.templates.xml"}function du(e){let o=(s,n)=>e.dispatchEvent(new CustomEvent(`baseui:${s}`,{bubbles:!0,detail:n})),r=e.getAttribute("b-att-languages");return{src:e.getAttribute("b-att-src")||void 0,title:e.getAttribute("b-att-title")||void 0,serverUrl:e.getAttribute("b-att-server-url")||void 0,theme:e.getAttribute("b-att-theme")||void 0,themeToggle:e.getAttribute("b-att-theme-toggle")==="true",hash:e.getAttribute("b-att-hash")==="true",operation:e.getAttribute("b-att-operation")||void 0,tryIt:Qi(e,"b-att-try-it"),authorize:Qi(e,"b-att-authorize"),languages:r?r.split(",").map(s=>s.trim()).filter(Boolean):void 0,language:e.getAttribute("b-att-language")||void 0,assetBase:e.getAttribute("b-att-asset-base")??void 0,oauthRedirectUri:e.getAttribute("b-att-oauth-redirect-uri")||void 0,height:e.getAttribute("b-att-height")||void 0,onLoad:s=>o("load",{info:s.info,operations:s.groups.flatMap(n=>n.items).length}),onError:s=>o("error",{error:s}),onNavigate:s=>o("navigate",{id:s})}}function hu(e){let o=du(e),r=pe(uu(e)).then(s=>so(Ct,e,{templates:s,props:o}));return{destroy:async()=>{(await r).destroy()}}}b.register("apidoc",{type:"owl",mount:hu});A();function bu(e){let o=[...e.querySelectorAll("[b-accordion-item]")],r=e.getAttribute("b-att-multiple")==="true",s=new Map,n=new Map,c=new Map,p=(u,h)=>{let m=u.querySelector("[b-accordion-trigger]");u.setAttribute("b-att-state",h?"open":"closed"),m?.setAttribute("aria-expanded",String(h)),e.dispatchEvent(new CustomEvent("baseui:change",{bubbles:!0,detail:{open:h}}))};return e.setAttribute("role","presentation"),o.forEach((u,h)=>{let m=u.querySelector("[b-accordion-trigger]"),g=u.querySelector("[b-accordion-panel]");if(!g)return;let x=g.id||`bu-accordion-panel-${h}`;g.id=x;let y=u.getAttribute("b-att-state")==="open";g.classList.add("collapse"),y&&g.classList.add("show");let E=new(B()).Collapse(g,{toggle:!1});c.set(u,E);let I=()=>p(u,!0),k=()=>p(u,!1);g.addEventListener("shown.bs.collapse",I),g.addEventListener("hidden.bs.collapse",k),n.set(u,{onShown:I,onHidden:k}),m?.setAttribute("aria-expanded",String(y)),m?.setAttribute("aria-controls",x);let T=()=>{let D=g.classList.contains("show");!r&&!D&&o.forEach(O=>{if(O===u)return;let V=c.get(O),ot=O.querySelector("[b-accordion-panel]");V&&ot?.classList.contains("show")&&V.hide()}),D?E.hide():E.show()};s.set(u,T),m?.addEventListener("click",T)}),{destroy:()=>{o.forEach(u=>{let h=u.querySelector("[b-accordion-trigger]"),m=u.querySelector("[b-accordion-panel]");h?.removeEventListener("click",s.get(u));let g=n.get(u);m&&g&&(m.removeEventListener("shown.bs.collapse",g.onShown),m.removeEventListener("hidden.bs.collapse",g.onHidden)),c.get(u)?.dispose()}),s.clear(),n.clear(),c.clear()}}}b.register("accordion",{type:"owl",mount:bu});A();function mu(e){let o=e.getAttribute("b-att-ratio")||`${e.getAttribute("b-att-width")||16} / ${e.getAttribute("b-att-height")||9}`;return e.classList.add("bu-aspect-ratio"),e.style.setProperty("--b-aspect-ratio",o),{destroy:()=>e.classList.remove("bu-aspect-ratio")}}b.register("aspect-ratio",{type:"static",mount:mu});A();qs();var fu=["idle","uploading","processing","error","done"],gu=["default","sm","xs"],xu=["content","title","description","actions"];function Yi(e,o){e.classList.add(`bu-attachment-${o}`),e.setAttribute("data-slot",`attachment-${o}`)}function Iu(e){let o=e.querySelector("input[type='file']"),r=e.querySelector("[b-attachment-list]"),s=fu.includes(e.getAttribute("b-att-state"))?e.getAttribute("b-att-state"):"done",n=gu.includes(e.getAttribute("b-att-size"))?e.getAttribute("b-att-size"):"default",c=e.getAttribute("b-att-orientation")==="vertical"?"vertical":"horizontal";e.classList.add("bu-attachment"),e.classList.add(`bu-attachment-${s}`,`bu-attachment-${n}`,`bu-attachment-${c}`),e.setAttribute("data-state",s),e.setAttribute("data-size",n),e.setAttribute("data-orientation",c),e.setAttribute("data-slot","attachment"),o&&e.classList.add("bu-attachment-picker"),e.querySelectorAll("[b-attachment-media]").forEach(u=>{let h=u.getAttribute("b-att-variant")==="image"?"image":"icon";Yi(u,"media"),u.classList.add(`bu-attachment-media-${h}`),u.setAttribute("data-variant",h)}),xu.forEach(u=>e.querySelectorAll(`[b-attachment-${u}]`).forEach(h=>Yi(h,u))),e.querySelectorAll("[b-attachment-action]").forEach(u=>{let h=G[u.getAttribute("b-att-variant")]||G.ghost,m=Z[u.getAttribute("b-att-size")]||Z["icon-xs"];u.classList.add("btn","bu-button",h,m,"bu-button-icon","bu-attachment-action"),u.setAttribute("data-slot","attachment-action"),!u.getAttribute("type")&&u.tagName==="BUTTON"&&u.setAttribute("type","button")}),e.querySelectorAll("[b-attachment-trigger]").forEach(u=>{u.classList.add("bu-attachment-trigger"),u.setAttribute("data-slot","attachment-trigger"),!u.getAttribute("type")&&u.tagName==="BUTTON"&&u.setAttribute("type","button")}),o?.classList.add("form-control");let p=()=>{r&&(r.innerHTML=[...o.files].map(u=>`<li>${u.name}</li>`).join("")),e.dispatchEvent(new CustomEvent("baseui:change",{bubbles:!0,detail:{files:[...o.files]}}))};return o?.addEventListener("change",p),{destroy:()=>o?.removeEventListener("change",p)}}function yu(e){return e.classList.add("bu-attachment-group"),e.setAttribute("data-slot","attachment-group"),{destroy:()=>e.classList.remove("bu-attachment-group")}}function vu(e){let o=e.querySelector("input[type='file']");e.classList.add("bu-attachment-dropzone"),e.setAttribute("data-slot","attachment-dropzone");let r=()=>o?.click(),s=h=>{h.preventDefault(),e.classList.add("bu-attachment-dropzone-dragging")},n=()=>e.classList.remove("bu-attachment-dropzone-dragging"),c=h=>{h.length&&e.dispatchEvent(new CustomEvent("baseui:change",{bubbles:!0,detail:{files:h}}))},p=h=>{h.preventDefault(),e.classList.remove("bu-attachment-dropzone-dragging"),c([...h.dataTransfer?.files??[]])},u=()=>{c([...o?.files??[]]),o&&(o.value="")};return e.addEventListener("click",r),e.addEventListener("dragover",s),e.addEventListener("dragleave",n),e.addEventListener("drop",p),o?.addEventListener("change",u),{destroy:()=>{e.removeEventListener("click",r),e.removeEventListener("dragover",s),e.removeEventListener("dragleave",n),e.removeEventListener("drop",p),o?.removeEventListener("change",u)}}}b.register("attachment",{type:"owl",mount:Iu});b.register("attachment-group",{type:"static",mount:yu});b.register("attachment-dropzone",{type:"static",mount:vu});A();function wu(e){e.classList.add("bu-avatar");let o=e.querySelector("img"),r=e.querySelector("[b-avatar-fallback]");if(o&&r){let s=()=>{o.hidden=!0,r.hidden=!1};return r.hidden=!!o.getAttribute("src"),o.addEventListener("error",s),{destroy:()=>o.removeEventListener("error",s)}}return{}}b.register("avatar",{type:"static",mount:wu});A();function Su(e){let o=io[e.getAttribute("b-att-variant")||"secondary"]||io.secondary;return e.classList.add("badge",o),e.getAttribute("b-att-pill")==="true"&&e.classList.add("rounded-pill"),{destroy:()=>e.classList.remove("badge","rounded-pill",...Object.values(io))}}b.register("badge",{type:"static",mount:Su});A();lt();function tc(e){return[...e.children].filter(o=>!o.matches("[b-breadcrumb-separator], .bu-breadcrumb-separator"))}function oc(e,o,r){return j(e,o,{size:r}),e}function Cu(){let e=document.createElement("li"),o=document.createElement("span");return e.setAttribute("b-breadcrumb-separator",""),e.setAttribute("data-slot","breadcrumb-separator"),e.setAttribute("role","presentation"),e.setAttribute("aria-hidden","true"),e.className="bu-breadcrumb-separator",o.className="bu-breadcrumb-separator-icon",e.append(oc(o,"chevron-right","var(--b3_5)")),e}function ku(e){e.classList.add("bu-breadcrumb-separator"),e.setAttribute("data-slot",e.getAttribute("data-slot")||"breadcrumb-separator"),e.setAttribute("role","presentation"),e.setAttribute("aria-hidden","true")}function Au(e){if(e.classList.add("bu-breadcrumb-ellipsis"),e.setAttribute("data-slot",e.getAttribute("data-slot")||"breadcrumb-ellipsis"),e.setAttribute("role","presentation"),e.setAttribute("aria-hidden","true"),!e.querySelector(".bu-icon")){let o=document.createElement("span");o.className="bu-breadcrumb-ellipsis-icon",e.prepend(oc(o,"ellipsis","var(--b4)"))}if(!e.querySelector(".visually-hidden")){let o=document.createElement("span");o.className="visually-hidden",o.textContent="More",e.append(o)}}function ec(e){e.classList.add("bu-breadcrumb-page"),e.setAttribute("data-slot",e.getAttribute("data-slot")||"breadcrumb-page"),e.setAttribute("role",e.getAttribute("role")||"link"),e.setAttribute("aria-disabled","true"),e.setAttribute("aria-current","page")}function Lu(e){let o=e.querySelector("ol, ul")||e;e.classList.add("bu-breadcrumb"),e.setAttribute("data-slot",e.getAttribute("data-slot")||"breadcrumb"),e.setAttribute("aria-label",e.getAttribute("aria-label")||"breadcrumb"),o.classList.add("breadcrumb","bu-breadcrumb-list"),o.setAttribute("data-slot",o.getAttribute("data-slot")||"breadcrumb-list");for(let s of o.querySelectorAll("[b-breadcrumb-separator], .bu-breadcrumb-separator"))ku(s);for(let s of o.querySelectorAll("[b-breadcrumb-ellipsis], .bu-breadcrumb-ellipsis"))Au(s);for(let s of o.querySelectorAll("[b-breadcrumb-page], .bu-breadcrumb-page"))ec(s);o.querySelector("[b-breadcrumb-separator], .bu-breadcrumb-separator")||tc(o).slice(0,-1).forEach(n=>n.after(Cu()));let r=tc(o);return r.forEach((s,n)=>{s.classList.add("bu-breadcrumb-item"),s.setAttribute("data-slot",s.getAttribute("data-slot")||"breadcrumb-item");for(let c of s.querySelectorAll("a"))c.classList.add("bu-breadcrumb-link"),c.setAttribute("data-slot",c.getAttribute("data-slot")||"breadcrumb-link");if(n===r.length-1){let c=s.querySelector("[b-breadcrumb-page], .bu-breadcrumb-page");c?ec(c):(s.classList.add("bu-breadcrumb-page"),s.setAttribute("aria-current",s.getAttribute("aria-current")||"page"))}}),{destroy:()=>{e.classList.remove("bu-breadcrumb"),o.classList.remove("breadcrumb","bu-breadcrumb-list");for(let s of o.querySelectorAll("[b-breadcrumb-separator]"))s.remove()}}}b.register("breadcrumb",{type:"owl",mount:Lu});A();function Eu(e){return e.classList.add("bu-bubble"),e.getAttribute("role")||e.setAttribute("role","listitem"),{destroy:()=>e.classList.remove("bu-bubble")}}b.register("bubble",{type:"static",mount:Eu});A();lt();qs();function Bu(e){return[...e.childNodes].filter(o=>o.nodeType===Node.TEXT_NODE&&o.textContent.trim()).map(o=>{let r=document.createElement("span");return r.textContent=o.textContent.trim(),o.replaceWith(r),r})}function Tu(e){let o=e.getAttribute("b-att-icon"),r=e.getAttribute("b-att-icon-position")==="end"?"end":"start",s=!!e.textContent.trim(),n=o&&s?Bu(e):[],c=null;return e.classList.add("btn","bu-button",G[e.getAttribute("b-att-variant")||"default"]||"btn-primary"),Z[e.getAttribute("b-att-size")]&&e.classList.add(Z[e.getAttribute("b-att-size")]),e.dataset.slot="button",o&&(c=document.createElement("span"),c.setAttribute("b-icon",o),c.dataset.icon=`inline-${r}`,j(c,o,{label:""}),e.insertBefore(c,r==="end"?null:e.firstChild),e.dataset.icon=`inline-${r}`,s||(e.dataset.iconOnly="true",e.classList.add("bu-button-icon"))),{destroy:()=>{c?.remove();for(let p of n)p.replaceWith(document.createTextNode(p.textContent));e.classList.remove("btn","bu-button","bu-button-icon",...Object.values(G),...Object.values(Z)),e.removeAttribute("data-slot"),e.removeAttribute("data-icon"),e.removeAttribute("data-icon-only")}}}b.register("button",{type:"static",mount:Tu});A();function qu(e){let o=e.getAttribute("b-att-orientation")==="vertical",r=e.getAttribute("b-att-size"),s=[...e.querySelectorAll("[b-button-group-separator]")],n=[...e.querySelectorAll("[b-button-group-text]")];return e.classList.add("bu-button-group",o?"btn-group-vertical":"btn-group"),(r==="sm"||r==="lg")&&e.classList.add(`btn-group-${r}`),e.setAttribute("role",e.getAttribute("role")||"group"),s.forEach(c=>{let p=c.getAttribute("b-att-orientation")==="horizontal"?"horizontal":"vertical";c.classList.add("bu-button-group-separator",`bu-button-group-separator-${p}`),c.setAttribute("data-orientation",p),c.setAttribute("role","separator")}),n.forEach(c=>{c.classList.add("bu-button-group-text")}),{destroy:()=>{e.classList.remove("bu-button-group","btn-group","btn-group-vertical","btn-group-sm","btn-group-lg")}}}b.register("button-group",{type:"static",mount:qu});A();var Ou=new Intl.DateTimeFormat(void 0,{month:"long",year:"numeric"});function Ru(e){let o=e.getAttribute("b-att-selected")?new Date(`${e.getAttribute("b-att-selected")}T00:00:00`):new Date,r=Number(e.getAttribute("b-att-month")??o.getMonth()+1)-1,s=Number(e.getAttribute("b-att-year")??o.getFullYear()),n=new Date(s,r,1),c=new Date(s,r+1,0).getDate(),p=n.getDay();e.classList.add("bu-calendar"),e.querySelector("[b-calendar-grid]")||(e.innerHTML=`
|
|
54
|
-
<div class="bu-calendar__header">${Ou.format(n)}</div>
|
|
55
|
-
<div class="bu-calendar__weekdays">${["Sun","Mon","Tue","Wed","Thu","Fri","Sat"].map(m=>`<span>${m}</span>`).join("")}</div>
|
|
56
|
-
<div b-calendar-grid class="bu-calendar__grid"></div>
|
|
57
|
-
`);let u=e.querySelector("[b-calendar-grid]");u.innerHTML="";for(let m=0;m<p;m+=1)u.append(document.createElement("span"));for(let m=1;m<=c;m+=1){let g=document.createElement("button"),x=`${s}-${String(r+1).padStart(2,"0")}-${String(m).padStart(2,"0")}`;g.type="button",g.textContent=String(m),g.setAttribute("b-att-value",x),g.setAttribute("aria-pressed",String(x===e.getAttribute("b-att-selected"))),u.append(g)}let h=m=>{let g=m.target.closest("button[b-att-value]");g&&(e.setAttribute("b-att-selected",g.getAttribute("b-att-value")),u.querySelectorAll("button").forEach(x=>x.setAttribute("aria-pressed",String(x===g))),e.dispatchEvent(new CustomEvent("baseui:change",{bubbles:!0,detail:{value:g.getAttribute("b-att-value")}})))};return u.addEventListener("click",h),{destroy:()=>u.removeEventListener("click",h)}}b.register("calendar",{type:"owl",mount:Ru});A();function Pu(e){return e.classList.add("card","bu-card"),e.querySelector("[b-card-header]")?.classList.add("card-header"),e.querySelector("[b-card-body]")?.classList.add("card-body"),e.querySelector("[b-card-footer]")?.classList.add("card-footer"),{destroy:()=>e.classList.remove("card","bu-card")}}b.register("card",{type:"static",mount:Pu});A();function Nu(e){let o=[...e.querySelectorAll("[b-carousel-slide]")],r=e.querySelector("[b-carousel-prev]"),s=e.querySelector("[b-carousel-next]");if(e.classList.add("carousel","slide"),o.length&&!o[0].parentElement.classList.contains("carousel-inner")){let m=document.createElement("div");m.classList.add("carousel-inner"),o[0].before(m),o.forEach(g=>m.appendChild(g))}let n=Math.max(0,o.findIndex(m=>m.getAttribute("b-att-state")==="active"));o.forEach((m,g)=>{m.classList.add("carousel-item"),g===n&&m.classList.add("active"),m.setAttribute("b-att-state",g===n?"active":"inactive")});let c=o.length?new(B()).Carousel(e,{interval:!1,wrap:!0,touch:!0}):null,p=m=>{o.forEach((g,x)=>{g.setAttribute("b-att-state",x===m.to?"active":"inactive")}),e.dispatchEvent(new CustomEvent("baseui:change",{bubbles:!0,detail:{index:m.to}}))};e.addEventListener("slid.bs.carousel",p);let u=()=>c?.prev(),h=()=>c?.next();return r?.addEventListener("click",u),s?.addEventListener("click",h),{destroy:()=>{r?.removeEventListener("click",u),s?.removeEventListener("click",h),e.removeEventListener("slid.bs.carousel",p),c?.dispose()}}}b.register("carousel",{type:"owl",mount:Nu});A();function rc(e,o,r=0){let s=Number(e.getAttribute(o));return Number.isFinite(s)?s:r}function Mu(e){let o=e.getAttribute("b-att-config")||e.querySelector("script[type='application/json']")?.textContent;if(!o)return null;try{return JSON.parse(o)}catch{return null}}function Uu(e,o){let r=globalThis.getComputedStyle(e),s=[1,2,3,4,5].map(p=>r.getPropertyValue(`--b-chart-${p}`).trim()),n=r.getPropertyValue("--b-muted-foreground").trim(),c=r.getPropertyValue("--b-chart-grid").trim()||r.getPropertyValue("--b-border").trim();return o.options={maintainAspectRatio:!1,plugins:{legend:{labels:{boxWidth:8,boxHeight:8,color:n,font:{size:12}}},tooltip:{titleFont:{size:12},bodyFont:{size:12},cornerRadius:10,padding:10},...o.options?.plugins||{}},scales:{x:{border:{display:!1},grid:{display:!1},ticks:{color:n,font:{size:12}}},y:{border:{display:!1},grid:{color:c},ticks:{color:n,font:{size:12}}},...o.options?.scales||{}},...o.options},o.data?.datasets?.forEach((p,u)=>{p.backgroundColor||(p.backgroundColor=s[u%s.length]),p.borderColor||(p.borderColor=s[u%s.length]),p.borderRadius??(p.borderRadius=4)}),o}function Du(e,o,r){if(e.querySelector("[b-chart-tooltip]"))return;let s=document.createElement("span");s.setAttribute("b-chart-tooltip",""),s.textContent=`${o}: ${r}`,e.append(s)}function Fu(e){e.classList.add("bu-chart"),e.setAttribute("role",e.getAttribute("role")||"figure");let o=e.querySelector("canvas"),r=null;if(o&&globalThis.Chart){let c=Mu(e);c&&(r=new globalThis.Chart(o,Uu(e,c)))}let s=[...e.querySelectorAll("[b-att-value]")],n=Math.max(1,...s.map(c=>rc(c,"b-att-value")));return s.forEach((c,p)=>{let u=rc(c,"b-att-value"),h=c.getAttribute("b-att-label")||c.textContent.trim()||`Series ${p+1}`,m=Math.max(0,Math.min(100,u/n*100));c.style.setProperty("--b-chart-value",`${m}%`),c.style.setProperty("--b-chart-index",String(p%5+1)),c.style.setProperty("--b-chart-color",`var(--b-chart-${p%5+1})`),c.setAttribute("role",c.getAttribute("role")||"listitem"),c.setAttribute("aria-label",c.getAttribute("aria-label")||`${h} ${u}`),Du(c,h,u)}),[...e.querySelectorAll("[b-chart-series], [b-chart-legend] > *")].forEach((c,p)=>{c.style.setProperty("--b-chart-color",c.style.getPropertyValue("--b-chart-color")||`var(--b-chart-${p%5+1})`)}),{destroy:()=>{r?.destroy?.(),e.classList.remove("bu-chart")}}}b.register("chart",{type:"static",mount:Fu});A();function Mn(e,o){let r=e.matches("input")?e:e.querySelector(`input[type='${o}']`),s=e.matches("input")?e.closest("label, .form-check"):e;return r?.classList.add("form-check-input"),s?.classList.add("form-check","bu-check"),{destroy:()=>{r?.classList.remove("form-check-input"),s?.classList.remove("form-check","bu-check")}}}b.register("checkbox",{type:"static",mount:e=>Mn(e,"checkbox")});A();lt();un();function $u(e){let o=e.getAttribute("b-att-value");if(o!==null)return o;let r=e.getAttribute("b-att-target");if(r){let s=document.querySelector(r);if(s)return s.textContent??""}return e.textContent??""}function zu(e){e.classList.remove(...Kn),e.className=`${e.className} ${pn({variant:e.getAttribute("b-att-variant")||"default",size:e.getAttribute("b-att-size")})}`.trim(),e.type=e.getAttribute("type")||"button";let o=e.querySelector("[b-clipboard-button-icon]");o||(o=document.createElement("span"),o.setAttribute("b-clipboard-button-icon",""),e.prepend(o));let r=e.getAttribute("b-att-icon")||"copy",s=e.getAttribute("b-att-copied-icon")||"check";j(o,r,{label:""});let n=null,c=async()=>{if(e.disabled)return;let p=$u(e);try{await Os(p),j(o,s,{label:""}),e.setAttribute("data-copied","true"),e.dispatchEvent(new CustomEvent("baseui:clipboard-copy",{bubbles:!0,detail:{value:p}})),window.clearTimeout(n),n=window.setTimeout(()=>{j(o,r,{label:""}),e.removeAttribute("data-copied")},Number(e.getAttribute("b-att-reset-delay"))||2e3)}catch(u){e.dispatchEvent(new CustomEvent("baseui:clipboard-copy-error",{bubbles:!0,detail:{error:u}}))}};return e.addEventListener("click",c),{destroy:()=>{e.removeEventListener("click",c),window.clearTimeout(n),o.remove(),e.classList.remove(...Kn),e.removeAttribute("data-copied")}}}b.register("clipboard-button",{type:"static",mount:zu});A();function Hu(e){let o=e.querySelector("[b-collapsible-trigger]"),r=e.querySelector("[b-collapsible-panel]"),s=m=>{e.setAttribute("b-att-state",m?"open":"closed"),o?.setAttribute("aria-expanded",String(m)),e.dispatchEvent(new CustomEvent("baseui:change",{bubbles:!0,detail:{open:m}}))};if(!r){let m=()=>s(e.getAttribute("b-att-state")!=="open");return o?.setAttribute("aria-expanded",String(e.getAttribute("b-att-state")==="open")),o?.addEventListener("click",m),{destroy:()=>o?.removeEventListener("click",m)}}let n=e.getAttribute("b-att-state")==="open";r.classList.add("collapse"),n&&r.classList.add("show");let c=new(B()).Collapse(r,{toggle:!1}),p=()=>s(!0),u=()=>s(!1);r.addEventListener("shown.bs.collapse",p),r.addEventListener("hidden.bs.collapse",u),o?.setAttribute("aria-expanded",String(n));let h=()=>{r.classList.contains("show")?c.hide():c.show()};return o?.addEventListener("click",h),{destroy:()=>{o?.removeEventListener("click",h),r.removeEventListener("shown.bs.collapse",p),r.removeEventListener("hidden.bs.collapse",u),c.dispose()}}}b.register("collapsible",{type:"owl",mount:Hu});A();function ju(e){let o=e.querySelector("input"),r=e.querySelector("[b-combobox-list]"),s=()=>[...r?.querySelectorAll("[b-att-value]")||[]];e.classList.add("bu-combobox"),o?.setAttribute("role","combobox"),o?.setAttribute("aria-expanded","false"),r?.setAttribute("role","listbox"),r&&(r.hidden=!0);let n=u=>{r&&(r.hidden=!u),o?.setAttribute("aria-expanded",String(u))},c=()=>{let u=o.value.toLowerCase();s().forEach(h=>{h.hidden=!h.textContent.toLowerCase().includes(u)}),n(!0)},p=u=>{let h=u.target.closest("[b-att-value]");h&&(o.value=h.textContent.trim(),e.setAttribute("b-att-value",h.getAttribute("b-att-value")),n(!1),e.dispatchEvent(new CustomEvent("baseui:change",{bubbles:!0,detail:{value:h.getAttribute("b-att-value")}})))};return o?.addEventListener("input",c),o?.addEventListener("focus",()=>n(!0)),r?.addEventListener("click",p),{destroy:()=>{o?.removeEventListener("input",c),r?.removeEventListener("click",p)}}}b.register("combobox",{type:"owl",mount:ju});A();function _u(e){let o=e.querySelector("input"),r=()=>[...e.querySelectorAll("[b-command-item]")];e.classList.add("bu-command"),e.setAttribute("role",e.getAttribute("role")||"dialog"),o?.classList.add("form-control");let s=()=>{let c=(o?.value||"").toLowerCase();r().forEach(p=>{p.hidden=!p.textContent.toLowerCase().includes(c)})},n=c=>{let p=c.target.closest("[b-command-item]");p&&e.dispatchEvent(new CustomEvent("baseui:select",{bubbles:!0,detail:{value:p.getAttribute("b-att-value")||p.textContent.trim()}}))};return o?.addEventListener("input",s),e.addEventListener("click",n),{destroy:()=>{o?.removeEventListener("input",s),e.removeEventListener("click",n)}}}b.register("command",{type:"owl",mount:_u});A();function Wu(e){let o=e.querySelector("[b-context-menu-content]");if(!o)return{};o.hidden=!0,o.setAttribute("role","menu");let r=c=>{c.preventDefault(),o.hidden=!1,o.style.left=`${c.clientX}px`,o.style.top=`${c.clientY}px`,e.dispatchEvent(new CustomEvent("baseui:open",{bubbles:!0}))},s=()=>{o.hidden=!0,e.dispatchEvent(new CustomEvent("baseui:close",{bubbles:!0}))},n=c=>{c.key==="Escape"&&s()};return e.addEventListener("contextmenu",r),document.addEventListener("click",s),e.addEventListener("keydown",n),{destroy:()=>{e.removeEventListener("contextmenu",r),document.removeEventListener("click",s),e.removeEventListener("keydown",n)}}}b.register("context-menu",{type:"owl",mount:Wu});A();lt();var sc=[["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 Vu(e){e.querySelector("table")||(e.innerHTML=`
|
|
58
|
-
<div class="bu-data-table__toolbar">
|
|
59
|
-
<input b-table-search type="search" class="form-control bu-data-table__search" placeholder="Filter emails...">
|
|
60
|
-
<div class="bu-data-table__columns"><button type="button" class="btn bu-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>
|
|
40
|
+
`).length}get lineLabel(){return`${this.lineCount} ${this.lineCount===1?"line":"lines"}`}get lineNumbers(){return Array.from({length:this.lineCount},(e,s)=>s+1).join(`
|
|
41
|
+
`)}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(ca(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),r=parseFloat(o.paddingTop)||0,a=parseFloat(o.lineHeight)||21,l=e.value.slice(0,e.selectionEnd),u=l.split(`
|
|
42
|
+
`).length-1,d=r+u*a;d-r<s.scrollTop?s.scrollTop=Math.max(0,d-r):d+a+r>s.scrollTop+s.clientHeight&&(s.scrollTop=d+a+r-s.clientHeight);let b=l.slice(l.lastIndexOf(`
|
|
43
|
+
`)+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)+b*f.measureText("0").width,v=s.querySelector(".b-code-editor-gutter")?.offsetWidth??0;g<s.scrollLeft+v?s.scrollLeft=Math.max(0,g-v-r):g+r>s.scrollLeft+s.clientWidth&&(s.scrollLeft=g+r-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 r=s.value.lastIndexOf(`
|
|
44
|
+
`,s.selectionStart-1)+1,a=/^[ \t]*/.exec(s.value.slice(r,s.selectionStart))[0];s.setRangeText(`
|
|
45
|
+
${a}`,s.selectionStart,s.selectionEnd,"end")}else return;this.commit(s.value)}outdentLine(e){let s=e.value.lastIndexOf(`
|
|
46
|
+
`,e.selectionStart-1)+1,o=aa(e.value.slice(s),this.language.indent);if(!o)return;let{selectionStart:r,selectionEnd:a}=e;e.setRangeText("",s,s+o,"preserve"),e.setSelectionRange(Math.max(s,r-o),Math.max(s,a-o))}};i(pe,"template","baseui.CodeEditor"),i(pe,"components",{Alert:pt,AlertDescription:Lt,Badge:st,Button:S,ClipboardButton:ut,Kbd:kt,Spinner:Nt}),i(pe,"props",{value:n(String),codeLang:n(String),src:n(String),upload:n(Boolean),format:n(Boolean),toggle:n(Boolean),onChange:n(Function),onLoad:n(Function),onError:n(Function),readonly:n(Boolean),title:n(String),globals:n(Array),hint:n(String),id:n(String),...p});A();x();var ls=class extends c{get tag(){return this.props.tag||"div"}};i(ls,"template","baseui.Card"),i(ls,"props",{...p,tag:n(String)});var us=class extends c{};i(us,"template","baseui.CardHeader"),i(us,"props",p);var ps=class extends c{};i(ps,"template","baseui.CardBody"),i(ps,"props",p);var ds=class extends c{};i(ds,"template","baseui.CardFooter"),i(ds,"props",p);var hs=class extends c{};i(hs,"template","baseui.CardTitle"),i(hs,"props",p);var bs=class extends c{};i(bs,"template","baseui.CardDescription"),i(bs,"props",p);x();A();x();A();x();var ct=class extends c{setup(){this.state=w({open:F(this.props.state)}),this.triggerRef=L("trigger"),this.bufferRef=L("buffer"),this.bootstrapTooltip=null,this.lastContentHtml=null,this.onShown=()=>{this.state.open=!0},this.onHidden=()=>{this.state.open=!1},R(()=>{this.lastContentHtml=this.currentContentHtml();let e=this.triggerElement();this.bootstrapTooltip=new(N()).Tooltip(e,{title:this.lastContentHtml,html:!0,trigger:"hover focus"}),e.addEventListener("shown.bs.tooltip",this.onShown),e.addEventListener("hidden.bs.tooltip",this.onHidden),F(this.props.state)&&this.bootstrapTooltip.show()}),M(()=>{let e=this.currentContentHtml();e!==this.lastContentHtml&&(this.lastContentHtml=e,this.bootstrapTooltip?.setContent({".tooltip-inner":e}))}),U(()=>{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()}};i(ct,"template","baseui.Tooltip"),i(ct,"props",{content:n(String),state:n(String),...p});var gl=rs("circle-question-mark"),yl=0,rt={label:n(String),labelBackground:n(String),supportingText:n(String),useTip:n(Number),errorText:n(String),leadingIcon:n(String),trailingIcon:n(String),maxLength:n(Number),invalid:n(Boolean),placeholder:n(String),disabled:n(Boolean),slots:n(Object)},J=class extends c{setup(){this.supportId=`b-input-support-${yl++}`,this.box=L("box"),this.slotRefs={start:L("start"),end:L("end"),footer:L("footer")},R(()=>this.measureSlots()),M(()=>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:r}=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",`${r.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 m("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")}};i(J,"components",{Icon:$,IconCircleQuestionMark:gl,Tooltip:ct});function hi({tag:t="input",type:e}={}){return t==="select"?"form-select":e==="checkbox"||e==="radio"?"form-check-input":"form-control"}var Ot=class extends J{get ariaLabel(){return this.props["aria-label"]??this.props.ariaLabel}get classNames(){return m("b-input",hi({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)}};i(Ot,"template","baseui.Input"),i(Ot,"props",{...rt,value:n(String),type:n(String),readonly:n(Boolean),className:n(String),style:n([String,Object]),id:n(String),list:n(String),autocomplete:n(String),"aria-label":n(String),ariaLabel:n(String),min:n([String,Number]),max:n([String,Number]),step:n([String,Number]),onInput:n(Function),onChange:n(Function)});A();x();var Ki={default:"b-tabs-list-default",line:"b-tabs-list-line"};function bi(t,e,s,o="horizontal"){let r=o==="vertical",u=t===(r?"ArrowDown":"ArrowRight")?1:t===(r?"ArrowUp":"ArrowLeft")?-1:0;return!u||s===0?-1:(e+u+s)%s}var vl=0;function la(t){return String(t).replace(/[^a-zA-Z0-9_-]/g,"_")}var Tt=class extends c{setup(){this.tabsState=w({active:this.props.value??this.props.defaultValue??""}),this.instanceId=`t${++vl}`,T({tabs:this.tabsState,selectTab:e=>this.select(e),tabsId:this.instanceId,orientation:this.orientation}),z(e=>{e.value!==void 0&&(this.tabsState.active=e.value)})}get orientation(){return this.props.orientation==="vertical"?"vertical":"horizontal"}get classNames(){return m("b-tabs",this.props.className)}select(e){this.props.value===void 0&&(this.tabsState.active=e),this.props.onChange?.(e)}};i(Tt,"template","baseui.Tabs"),i(Tt,"props",{value:n(String),defaultValue:n(String),orientation:n(String),onChange:n(Function),...p});var Bt=class extends c{};i(Bt,"template","baseui.TabsContainer"),i(Bt,"props",{...p});var It=class extends c{setup(){this.listRef=L("list")}get classNames(){return m("nav","b-tabs-list",Ki[this.props.variant]||Ki.default,this.props.className)}onKeyDown(e){let s=[...this.listRef.el.querySelectorAll("[role='tab']")],o=s.indexOf(e.target),r=bi(e.key,o,s.length,this.env.orientation);r!==-1&&(e.preventDefault(),s[r].focus(),s[r].click())}};i(It,"template","baseui.TabsList"),i(It,"props",{variant:n(String),...p});var ht=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=N().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}-${la(this.props.value)}`}get classNames(){return m("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()}};i(ht,"template","baseui.TabTrigger"),i(ht,"components",{Button:S}),i(ht,"props",{value:{type:String},disabled:n(Boolean),...p});var Rt=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}-${la(this.props.value)}`}};i(Rt,"template","baseui.TabContent"),i(Rt,"props",{value:{type:String},...p});A();x();A();x();function Y(t,e){z(s=>{es(s)&&(t.open=j(s),t.open?e?.instance?.show():e?.instance?.hide())})}function X(t,e,s){es(t)||(e.open=s),t.onOpenChange?.(s)}function mi(t,e){let s=null;R(()=>{s=new(N()).Collapse(t.el,{toggle:!1})}),M(()=>{if(!s)return;let o=t.el.classList.contains("show");e()&&!o?s.show():!e()&&o&&s.hide()}),U(()=>s?.dispose())}var $t=class extends c{setup(){this.dialogState=w({open:j(this.props)}),this.control={instance:null},T({dialog:this.dialogState,dialogControl:this.control,setDialogOpen:e=>this.setOpen(e)}),Y(this.dialogState,this.control)}setOpen(e){X(this.props,this.dialogState,e)}};i($t,"template","baseui.Dialog"),i($t,"props",{open:n(Boolean),state:n(String),"default-open":n(Boolean),defaultOpen:n(Boolean),onOpenChange:n(Function),style:n([String,Object]),slots:n(Object)});var ms=class extends c{onClick(){this.env.dialogControl.instance?.show()}};i(ms,"template","baseui.DialogTrigger"),i(ms,"props",p);var bt=class extends c{setup(){this.rootRef=L("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},R(()=>{this.env.dialogControl.instance=N().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()}),U(()=>{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}};i(bt,"template","baseui.DialogContent"),i(bt,"components",{Button:S}),i(bt,"props",{...p,showCloseButton:n(Boolean),"show-close-button":n(Boolean)});var Ut=class extends c{};i(Ut,"template","baseui.DialogHeader"),i(Ut,"props",p);var qt=class extends c{};i(qt,"template","baseui.DialogFooter"),i(qt,"props",p);var Pt=class extends c{};i(Pt,"template","baseui.DialogTitle"),i(Pt,"props",p);var _t=class extends c{};i(_t,"template","baseui.DialogDescription"),i(_t,"props",p);var de=class extends c{};i(de,"template","baseui.DialogClose"),i(de,"components",{Button:S}),i(de,"props",p);A();x();var ua={default:"b-empty-default",outline:"b-empty-outline",background:"b-empty-background"},xl={default:"b-empty-media-default",icon:"b-empty-media-icon"},fs=class extends c{get classNames(){return m("b-empty",ua[this.props.variant]||ua.default,this.props.className)}};i(fs,"template","baseui.Empty"),i(fs,"props",{variant:n(String),...p});var gs=class extends c{};i(gs,"template","baseui.EmptyHeader"),i(gs,"props",p);var ys=class extends c{get variant(){return this.props.variant==="icon"?"icon":"default"}get classNames(){return m("b-empty-media",xl[this.variant],this.props.className)}};i(ys,"template","baseui.EmptyMedia"),i(ys,"props",{variant:n(String),...p});var vs=class extends c{};i(vs,"template","baseui.EmptyTitle"),i(vs,"props",p);var xs=class extends c{};i(xs,"template","baseui.EmptyDescription"),i(xs,"props",p);var ws=class extends c{};i(ws,"template","baseui.EmptyContent"),i(ws,"props",p);A();x();var Ss=class extends c{get vertical(){return this.props.orientation==="vertical"}get classNames(){return m("b-separator",this.vertical?"b-separator-vertical":"b-separator-horizontal",this.props.className)}};i(Ss,"template","baseui.Separator"),i(Ss,"props",{orientation:n(String),className:n(String),style:n([String,Object])});A();x();var Mt=class extends c{get classNames(){return m("b-skeleton",this.props.shape==="circle"?"b-skeleton-circle":"b-skeleton-block",this.props.className)}};i(Mt,"template","baseui.Skeleton"),i(Mt,"props",{shape:n(String),className:n(String),style:n([String,Object])});A();x();var wl={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"},Sl={h1:"h1",h2:"h2",h3:"h3",h4:"h4",blockquote:"blockquote",small:"small",list:"ul"},As=class extends c{get tag(){return this.props.tag||Sl[this.props.variant]||"p"}get classNames(){return m("b-typography",wl[this.props.variant],this.props.className)}};i(As,"template","baseui.Typography"),i(As,"props",{variant:n(String),tag:n(String),...p});A();x();var Es=class extends c{get classNames(){return m("b-marker",this.props.className)}get variant(){return this.props.variant}};i(Es,"template","baseui.Marker"),i(Es,"props",{variant:n(String),...p});x();var jt=class extends J{get outlinedClassNames(){return m(super.outlinedClassNames,"is-anchored")}get classNames(){return m("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)}};i(jt,"template","baseui.Textarea"),i(jt,"props",{...rt,value:n(String),rows:n(Number),readonly:n(Boolean),resize:n(String),className:n(String),style:n([String,Object]),id:n(String),onInput:n(Function),onChange:n(Function)});x();var zt=class extends J{get ariaLabel(){return this.props["aria-label"]??this.props.ariaLabel}get classNames(){return m("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)}};i(zt,"template","baseui.NativeSelect"),i(zt,"props",{...rt,value:n(String),size:n(String),...p,"aria-label":n(String),ariaLabel:n(String),id:n(String),onChange:n(Function)});A();x();var Dt=class extends c{onChange(e){this.props.onChange?.(e.target.checked,e)}};i(Dt,"template","baseui.Checkbox"),i(Dt,"props",{checked:n(Boolean),disabled:n(Boolean),...p,id:n(String),onChange:n(Function)});A();x();var Cs=class extends c{setup(){T({radioGroupValue:()=>this.props.value,radioGroupDisabled:()=>this.props.disabled,radioGroupName:()=>this.props.name||"b-radio-group",selectRadio:e=>this.props.onChange?.(e)})}get classNames(){return m("b-radio-group",this.props.className)}};i(Cs,"template","baseui.RadioGroup"),i(Cs,"props",{value:n(String),name:n(String),disabled:n(Boolean),...p,onChange:n(Function)});var Ls=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)}};i(Ls,"template","baseui.RadioGroupItem"),i(Ls,"props",{value:{type:String},disabled:n(Boolean),...p});A();x();var Al=rs("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)}};i(he,"template","baseui.Switch"),i(he,"components",{IconCircleQuestionMark:Al,Tooltip:ct}),i(he,"props",{checked:n(Boolean),disabled:n(Boolean),supportingText:n(String),useTip:n(Number),...p,onChange:n(Function)});A();x();var ks=class extends c{get classNames(){return m("b-slider",this.props.className)}onInput(e){e.target.style.setProperty("--b-slider-value",`${e.target.value}%`),this.props.onChange?.(e.target.value,e)}};i(ks,"template","baseui.Slider"),i(ks,"props",{value:n([Number,String]),min:n([Number,String]),max:n([Number,String]),step:n([Number,String]),disabled:n(Boolean),className:n(String),style:n([String,Object]),onChange:n(Function)});A();x();var Ns=class extends c{setup(){this.length=this.props.length||6;let e=(this.props.value||"").split("");this.state=w({digits:Array.from({length:this.length},(s,o)=>e[o]||"")}),this.rootRef=L("root")}get classNames(){return m("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()}}};i(Ns,"template","baseui.InputOtp"),i(Ns,"props",{length:n(Number),value:n(String),disabled:n(Boolean),className:n(String),style:n([String,Object]),onChange:n(Function)});A();A();function Rr(t,{defaultOpen:e=!1,onOpenChange:s}={}){let o=w({open:e}),r=d=>{o.open!==d&&(o.open=d,s?.(d))},a=()=>r(!o.open),l=d=>{t.el&&!t.el.contains(d.target)&&r(!1)},u=d=>{d.key==="Escape"&&r(!1)};return tt(d=>{if(d)return document.addEventListener("click",l),document.addEventListener("keydown",u),()=>{document.removeEventListener("click",l),document.removeEventListener("keydown",u)}},()=>[o.open]),U(()=>{document.removeEventListener("click",l),document.removeEventListener("keydown",u)}),{state:o,setOpen:r,toggle:a}}x();var Os=class extends J{setup(){super.setup(),this.rootRef=L("root");let{state:e,setOpen:s,toggle:o}=Rr(this.rootRef,{defaultOpen:F(this.props.state)});this.disclosure=e,T({select:this.disclosure,selectValue:()=>this.props.value,selectToggle:o,selectClose:()=>s(!1),selectChoose:r=>{this.props.onChange?.(r),s(!1)}})}get outlinedClassNames(){return m(super.outlinedClassNames,"is-anchored",this.props.value&&"is-floated")}get rootStyle(){return K(this.labelStyle,this.props.style)}get classNames(){return m("b-select",this.isOutlined&&this.outlinedClassNames,this.props.className)}};i(Os,"template","baseui.Select"),i(Os,"props",{...rt,value:n(String),state:n(String),onChange:n(Function),...p});var be=class extends c{get attrs(){return{"aria-haspopup":"listbox","aria-expanded":this.env.select.open?"true":"false"}}onClick(){this.env.selectToggle()}};i(be,"template","baseui.SelectTrigger"),i(be,"components",{Button:S}),i(be,"props",p);var Ts=class extends c{get open(){return this.env.select.open}};i(Ts,"template","baseui.SelectContent"),i(Ts,"props",p);var Bs=class extends c{get selected(){return this.env.selectValue()===this.props.value}onClick(){this.env.selectChoose(this.props.value)}};i(Bs,"template","baseui.SelectItem"),i(Bs,"props",{value:{type:String},...p});A();function $r(t){return[...t.querySelectorAll("button, [href], input, select, textarea, [tabindex]:not([tabindex='-1'])")].filter(e=>!e.disabled&&!e.hidden)}function Vi(t,e){if(t.key!=="Tab")return;let s=$r(e);if(!s.length){t.preventDefault();return}let o=s[0],r=s[s.length-1];t.shiftKey&&document.activeElement===o?(t.preventDefault(),r.focus()):!t.shiftKey&&document.activeElement===r&&(t.preventDefault(),o.focus())}function fi(t,{closeSelector:e,trapFocus:s=!1}={}){let o=t.getAttribute("b-att-trigger"),r=o?document.querySelector(o):null,a=[...t.querySelectorAll(e)],l=null,u=()=>$r(t),d=()=>{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}))},b=()=>{t.hidden=!0,t.setAttribute("b-att-state","closed"),l?.focus?.(),t.dispatchEvent(new CustomEvent("baseui:close",{bubbles:!0}))},f=v=>{if(v.key==="Escape"){b();return}!s||t.hidden||Vi(v,t)},g=v=>{v.target===t&&b()};return r?.addEventListener("click",d),a.forEach(v=>v.addEventListener("click",b)),t.addEventListener("keydown",f),t.addEventListener("click",g),(!t.getAttribute("b-att-state")||t.getAttribute("b-att-state")==="closed")&&(t.hidden=!0),{open:d,close:b,destroy:()=>{r?.removeEventListener("click",d),a.forEach(v=>v.removeEventListener("click",b)),t.removeEventListener("keydown",f),t.removeEventListener("click",g)}}}function Ur(t,e,s,o){let r=t.getAttribute("b-att-trigger"),a=r?document.querySelector(r):null,l=null,u=()=>{l=document.activeElement},d=()=>{t.setAttribute("b-att-state","open"),t.dispatchEvent(new CustomEvent("baseui:open",{bubbles:!0}))},b=()=>{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}`,d),t.addEventListener(`hidden.bs.${s}`,b),a?.addEventListener("click",f),t.setAttribute("b-att-state","closed"),t[o]={open:f,close:g},{destroy:()=>{a?.removeEventListener("click",f),t.removeEventListener(`show.bs.${s}`,u),t.removeEventListener(`shown.bs.${s}`,d),t.removeEventListener(`hidden.bs.${s}`,b),e.dispose(),delete t[o]}}}x();var Is=class extends c{setup(){this.alertDialogState=w({open:j(this.props)}),T({alertDialog:this.alertDialogState,setAlertDialogOpen:e=>this.setOpen(e)}),Y(this.alertDialogState)}setOpen(e){X(this.props,this.alertDialogState,e)}};i(Is,"template","baseui.AlertDialog"),i(Is,"props",{open:n(Boolean),state:n(String),"default-open":n(Boolean),defaultOpen:n(Boolean),onOpenChange:n(Function),slots:n(Object)});var me=class extends c{get attrs(){return{"data-slot":"alert-dialog-trigger"}}onClick(){this.env.setAlertDialogOpen(!0)}};i(me,"template","baseui.AlertDialogTrigger"),i(me,"components",{Button:S}),i(me,"props",p);var Rs=class extends c{get size(){return this.props.size==="sm"?"sm":"default"}setup(){this.rootRef=L("root"),tt(e=>{if(!e)return;let s=document.activeElement;return $r(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}Vi(e,this.rootRef.el)}};i(Rs,"template","baseui.AlertDialogContent"),i(Rs,"props",{...p,size:n(String)});var $s=class extends c{};i($s,"template","baseui.AlertDialogHeader"),i($s,"props",p);var Us=class extends c{};i(Us,"template","baseui.AlertDialogFooter"),i(Us,"props",p);var qs=class extends c{};i(qs,"template","baseui.AlertDialogMedia"),i(qs,"props",p);var Ps=class extends c{};i(Ps,"template","baseui.AlertDialogTitle"),i(Ps,"props",p);var _s=class extends c{};i(_s,"template","baseui.AlertDialogDescription"),i(_s,"props",p);var fe=class extends c{get attrs(){return{"data-slot":"alert-dialog-cancel"}}onClick(){this.env.setAlertDialogOpen(!1)}};i(fe,"template","baseui.AlertDialogCancel"),i(fe,"components",{Button:S}),i(fe,"props",p);var ge=class extends c{get attrs(){return{"data-slot":"alert-dialog-action"}}onClick(){this.props.onClick?.(),this.env.setAlertDialogOpen(!1)}};i(ge,"template","baseui.AlertDialogAction"),i(ge,"components",{Button:S}),i(ge,"props",{...p,onClick:n(Function)});A();x();var Ms=class extends c{setup(){this.drawerState=w({open:j(this.props)}),this.control={instance:null},T({drawer:this.drawerState,drawerControl:this.control,setDrawerOpen:e=>this.setOpen(e)}),Y(this.drawerState,this.control)}setOpen(e){X(this.props,this.drawerState,e)}};i(Ms,"template","baseui.Drawer"),i(Ms,"props",{open:n(Boolean),state:n(String),"default-open":n(Boolean),defaultOpen:n(Boolean),onOpenChange:n(Function),slots:n(Object)});var ye=class extends c{onClick(){this.env.drawerControl.instance?.show()}};i(ye,"template","baseui.DrawerTrigger"),i(ye,"components",{Button:S}),i(ye,"props",p);var js=class extends c{setup(){this.rootRef=L("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},R(()=>{this.env.drawerControl.instance=N().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()}),U(()=>{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}};i(js,"template","baseui.DrawerContent"),i(js,"props",p);var zs=class extends c{};i(zs,"template","baseui.DrawerHeader"),i(zs,"props",p);var Ds=class extends c{};i(Ds,"template","baseui.DrawerFooter"),i(Ds,"props",p);var Fs=class extends c{};i(Fs,"template","baseui.DrawerTitle"),i(Fs,"props",p);var Hs=class extends c{};i(Hs,"template","baseui.DrawerDescription"),i(Hs,"props",p);var ve=class extends c{get attrs(){return{"data-bs-dismiss":"offcanvas"}}};i(ve,"template","baseui.DrawerClose"),i(ve,"components",{Button:S}),i(ve,"props",p);A();x();var Ws=class extends c{setup(){this.sheetState=w({open:j(this.props),side:this.props.side}),this.control={instance:null},T({sheet:this.sheetState,sheetControl:this.control,setSheetOpen:e=>this.setOpen(e)}),Y(this.sheetState,this.control),z(e=>{this.sheetState.side=e.side})}setOpen(e){X(this.props,this.sheetState,e)}};i(Ws,"template","baseui.Sheet"),i(Ws,"props",{open:n(Boolean),state:n(String),side:n(String),"default-open":n(Boolean),defaultOpen:n(Boolean),onOpenChange:n(Function),slots:n(Object)});var xe=class extends c{onClick(){this.env.sheetControl.instance?.show()}};i(xe,"template","baseui.SheetTrigger"),i(xe,"components",{Button:S}),i(xe,"props",p);var Ks=class extends c{setup(){this.rootRef=L("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},R(()=>{this.env.sheetControl.instance=N().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()}),U(()=>{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"}};i(Ks,"template","baseui.SheetContent"),i(Ks,"props",{...p,side:n(String)});var Vs=class extends c{};i(Vs,"template","baseui.SheetHeader"),i(Vs,"props",p);var Gs=class extends c{};i(Gs,"template","baseui.SheetFooter"),i(Gs,"props",p);var Zs=class extends c{};i(Zs,"template","baseui.SheetTitle"),i(Zs,"props",p);var Js=class extends c{};i(Js,"template","baseui.SheetDescription"),i(Js,"props",p);var we=class extends c{};i(we,"template","baseui.SheetClose"),i(we,"components",{Button:S}),i(we,"props",p);A();x();var Ys=class extends c{setup(){let e=w({open:F(this.props.state)});this.control={instance:null,bufferEl:null,lastContentHtml:null};let s=o=>{e.open!==o&&(e.open=o,this.props.onOpenChange?.(o))};T({popover:e,popoverControl:this.control,popoverSetOpen:s,popoverToggle:()=>this.control.instance?.toggle(),popoverClose:()=>this.control.instance?.hide()})}};i(Ys,"template","baseui.Popover"),i(Ys,"props",{state:n(String),onOpenChange:n(Function),...p});var Se=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),R(()=>{let e=this.env.popoverControl,s=e.bufferEl?.innerHTML??"";e.lastContentHtml=s,e.instance=new(N()).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)}),U(()=>{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()}};i(Se,"template","baseui.PopoverTrigger"),i(Se,"components",{Button:S}),i(Se,"props",p);var Xs=class extends c{get style(){return K("display:none",this.props.style)}setup(){this.bufferRef=L("buffer"),R(()=>{this.env.popoverControl.bufferEl=this.bufferRef.el}),M(()=>{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??""}};i(Xs,"template","baseui.PopoverContent"),i(Xs,"props",{...p,content:n(String)});A();x();var Qs=class extends c{setup(){this.state=w({open:!1}),T({hoverCard:this.state})}open(){this.state.open=!0}close(){this.state.open=!1}onKeyDown(e){e.key==="Escape"&&this.close()}};i(Qs,"template","baseui.HoverCard"),i(Qs,"props",{...p});var to=class extends c{};i(to,"template","baseui.HoverCardTrigger"),i(to,"props",p);var eo=class extends c{get open(){return this.env.hoverCard.open}};i(eo,"template","baseui.HoverCardContent"),i(eo,"props",p);A();x();var Gi={...p,disabled:n(Boolean),inset:n(Boolean),onClick:n(Function),onSelect:n(Function),variant:n(String)},Ft=class extends c{setup(){this.rootRef=L("root");let e=w({open:F(this.props.state)});this.control={instance:null};let s=a=>{e.open!==a&&(e.open=a,this.props.onOpenChange?.(a))};T({dropdownMenu:e,dropdownControl:this.control,dropdownSetOpen:s,dropdownToggle:()=>this.control.instance?.toggle(),dropdownClose:()=>this.control.instance?.hide()});let o=a=>{this.rootRef.el&&!this.rootRef.el.contains(a.target)&&this.control.instance?.hide()},r=a=>{a.key==="Escape"&&this.control.instance?.hide()};tt(a=>{if(a)return document.addEventListener("click",o),document.addEventListener("keydown",r),()=>{document.removeEventListener("click",o),document.removeEventListener("keydown",r)}},()=>[e.open]),U(()=>{document.removeEventListener("click",o),document.removeEventListener("keydown",r)})}};i(Ft,"template","baseui.DropdownMenu"),i(Ft,"props",{state:n(String),onOpenChange:n(Function),...p});var mt=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=N().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 m("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()}};i(mt,"template","baseui.DropdownMenuTrigger"),i(mt,"components",{Button:S}),i(mt,"props",p);var Ht=class extends c{get open(){return this.env.dropdownMenu.open}get classNames(){return m("b-dropdown-menu-content","dropdown-menu",this.open?"show":"",this.props.className)}};i(Ht,"template","baseui.DropdownMenuContent"),i(Ht,"props",{...p,align:n(String),alignOffset:n(Number),side:n(String),sideOffset:n(Number)});var so=class extends c{};i(so,"template","baseui.DropdownMenuGroup"),i(so,"props",p);var oo=class extends c{};i(oo,"template","baseui.DropdownMenuLabel"),i(oo,"props",{...p,inset:n(Boolean)});var Wt=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())}};i(Wt,"template","baseui.DropdownMenuItem"),i(Wt,"props",Gi);var Ae=class extends c{onClick(e){this.props.disabled||(this.props.onCheckedChange?.(!this.props.checked,e),this.props.onClick?.(e),this.props.onSelect?.(e))}};i(Ae,"template","baseui.DropdownMenuCheckboxItem"),i(Ae,"components",{Icon:$}),i(Ae,"props",{...Gi,checked:n(Boolean),onCheckedChange:n(Function)});var ro=class extends c{setup(){T({dropdownRadio:{value:this.props.value,onValueChange:this.props.onValueChange}})}};i(ro,"template","baseui.DropdownMenuRadioGroup"),i(ro,"props",{...p,value:n(String),onValueChange:n(Function)});var Ee=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))}};i(Ee,"template","baseui.DropdownMenuRadioItem"),i(Ee,"components",{Icon:$}),i(Ee,"props",{...Gi,value:n(String)});var io=class extends c{};i(io,"template","baseui.DropdownMenuSeparator"),i(io,"props",p);var no=class extends c{};i(no,"template","baseui.DropdownMenuShortcut"),i(no,"props",p);var Kt=class extends c{setup(){this.rootRef=L("root");let{state:e,setOpen:s,toggle:o}=Rr(this.rootRef);T({dropdownSub:e,dropdownSubToggle:o,dropdownSubOpen:()=>s(!0),dropdownSubClose:()=>s(!1)})}};i(Kt,"template","baseui.DropdownMenuSub"),i(Kt,"props",p);var ft=class extends c{onMouseEnter(){this.props.disabled||this.env.dropdownSubOpen()}onClick(){this.props.disabled||this.env.dropdownSubToggle()}};i(ft,"template","baseui.DropdownMenuSubTrigger"),i(ft,"components",{Icon:$}),i(ft,"props",{...p,disabled:n(Boolean),inset:n(Boolean)});var Vt=class extends c{get open(){return this.env.dropdownSub.open}};i(Vt,"template","baseui.DropdownMenuSubContent"),i(Vt,"props",p);A();x();var ao=class extends c{setup(){this.state=w({open:!1,x:0,y:0});let e=()=>{this.state.open=!1};this.close=e,T({contextMenu:this.state,contextMenuOpenAt:(s,o)=>{this.state.open=!0,this.state.x=s,this.state.y=o},contextMenuClose:e}),document.addEventListener("click",e),U(()=>document.removeEventListener("click",e))}};i(ao,"template","baseui.ContextMenu"),i(ao,"props",{className:n(String),slots:n(Object)});var co=class extends c{onContextMenu(e){e.preventDefault(),this.env.contextMenuOpenAt(e.clientX,e.clientY)}};i(co,"template","baseui.ContextMenuTrigger"),i(co,"props",p);var lo=class extends c{setup(){this.rootRef=L("root")}get open(){return this.env.contextMenu.open}get style(){return K(`left:${this.env.contextMenu.x}px;top:${this.env.contextMenu.y}px`,this.props.style)}};i(lo,"template","baseui.ContextMenuContent"),i(lo,"props",p);var uo=class extends c{onClick(){this.props.onClick?.(),this.env.contextMenuClose()}};i(uo,"template","baseui.ContextMenuItem"),i(uo,"props",{...p,onClick:n(Function)});A();x();var El={"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 gi(t){let e=El[t];return e?["toast-container","position-fixed","p-3","pe-auto",...e]:null}var gt=class extends c{setup(){this.state=w({open:j(this.props)}),this.rootRef=L("root"),this.bootstrapToast=null,this.handleShown=()=>{this.state.open=!0},this.handleHidden=()=>{this.state.open=!1,this.props.onOpenChange?.(!1)},R(()=>{this.mountBootstrapToast(this.props.delay),this.state.open&&this.bootstrapToast.show()}),z(e=>{let s=es(e)?j(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())}),U(()=>{this.bootstrapToast?.dispose()})}mountBootstrapToast(e){let s=this.rootRef.el,o=e??3e3;this.bootstrapToast=new(N()).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 m("toast","fade","b-toast",gi(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()}};i(gt,"template","baseui.Toast"),i(gt,"components",{Button:S}),i(gt,"props",{open:n(Boolean),state:n(String),variant:n(String),delay:n(Number),position:n(String),...p,onOpenChange:n(Function)});A();x();var po=class extends c{setup(){this.state=w({open:new Set}),T({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)}};i(po,"template","baseui.Accordion"),i(po,"props",{multiple:n(Boolean),onChange:n(Function),...p});var ho=class extends c{setup(){T({accordionItemState:this.props.state,accordionItemValue:this.props.value})}};i(ho,"template","baseui.AccordionItem"),i(ho,"props",{value:{type:String},state:n(String),...p});var Ce=class extends c{get open(){return this.env.accordionItemState!==void 0?F(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)}};i(Ce,"template","baseui.AccordionTrigger"),i(Ce,"components",{Icon:$,Button:S}),i(Ce,"props",p);var bo=class extends c{setup(){this.rootRef=L("root"),this.initialOpen=this.open,mi(this.rootRef,()=>this.open)}get open(){return this.env.accordionItemState!==void 0?F(this.env.accordionItemState):this.env.accordion.open.has(this.env.accordionItemValue)}};i(bo,"template","baseui.AccordionContent"),i(bo,"props",p);A();x();var mo=class extends c{setup(){this.state=w({open:j(this.props)}),T({collapsible:this.state,collapsibleToggle:()=>this.toggle()}),Y(this.state)}toggle(){let e=!this.state.open;X(this.props,this.state,e)}};i(mo,"template","baseui.Collapsible"),i(mo,"props",{open:n(Boolean),state:n(String),"default-open":n(Boolean),defaultOpen:n(Boolean),onOpenChange:n(Function),...p});var Le=class extends c{get attrs(){return{"aria-expanded":this.env.collapsible.open?"true":"false"}}onClick(){this.env.collapsibleToggle()}};i(Le,"template","baseui.CollapsibleTrigger"),i(Le,"components",{Button:S}),i(Le,"props",p);var fo=class extends c{setup(){this.rootRef=L("root"),this.initialOpen=this.open,mi(this.rootRef,()=>this.open)}get open(){return this.env.collapsible.open}};i(fo,"template","baseui.CollapsibleContent"),i(fo,"props",p);A();x();var Gt=class extends c{};i(Gt,"template","baseui.Breadcrumb"),i(Gt,"props",{...p});var Zt=class extends c{};i(Zt,"template","baseui.BreadcrumbList"),i(Zt,"props",{...p});var Jt=class extends c{get classNames(){return m("b-breadcrumb-item",this.props.current&&"b-breadcrumb-page",this.props.className)}};i(Jt,"template","baseui.BreadcrumbItem"),i(Jt,"props",{current:n(Boolean),...p});var Yt=class extends c{get classNames(){return m("b-breadcrumb-link",this.props.className)}onClick(e){this.props.onClick?.(e)}};i(Yt,"template","baseui.BreadcrumbLink"),i(Yt,"props",{href:n(String),target:n(String),rel:n(String),...p,onClick:n(Function)});var Xt=class extends c{get classNames(){return m("b-breadcrumb-page",this.props.className)}};i(Xt,"template","baseui.BreadcrumbPage"),i(Xt,"props",{...p});var yt=class extends c{get classNames(){return m("b-breadcrumb-separator",this.props.className)}get hasCustomContent(){return!!this.props.slots?.default}};i(yt,"template","baseui.BreadcrumbSeparator"),i(yt,"components",{Icon:$}),i(yt,"props",{...p});var ke=class extends c{get classNames(){return m("b-breadcrumb-ellipsis",this.props.className)}get hasCustomContent(){return!!this.props.slots?.default}};i(ke,"template","baseui.BreadcrumbEllipsis"),i(ke,"components",{Icon:$}),i(ke,"props",{...p});A();x();var go=class extends c{get classNames(){return m("b-pagination",this.props.className)}};i(go,"template","baseui.Pagination"),i(go,"props",{...p});var yo=class extends c{get classNames(){return m("page-item",this.props.current&&"active",this.props.disabled&&"disabled")}onClick(){this.props.disabled||this.props.onClick?.()}};i(yo,"template","baseui.PaginationItem"),i(yo,"props",{current:n(Boolean),disabled:n(Boolean),style:n([String,Object]),onClick:n(Function),slots:n(Object)});A();x();var vo=class extends c{setup(){this.rootRef=L("root")}onKeyDown(e){let s=[...this.rootRef.el.querySelectorAll("a, button")].filter(a=>!a.disabled),o=s.indexOf(e.target),r=e.key==="ArrowRight"?1:e.key==="ArrowLeft"?-1:0;!r||o<0||(e.preventDefault(),s[(o+r+s.length)%s.length]?.focus())}};i(vo,"template","baseui.NavigationMenu"),i(vo,"props",{...p});var xo=class extends c{};i(xo,"template","baseui.NavigationMenuItem"),i(xo,"props",{href:n(String),...p});A();x();var wo=class extends c{get classNames(){return m("b-menubar",this.props.className)}};i(wo,"template","baseui.Menubar"),i(wo,"props",{...p});A();x();var pa={...p,href:n(String)};function da(t){globalThis.matchMedia?.("(max-width: 991.98px)").matches&&t.setSidebarOpen?.(!1)}var xt=class extends c{setup(){this.state=w({open:j(this.props)}),T({sidebar:this.state,setSidebarOpen:e=>this.setOpen(e)}),Y(this.state)}setOpen(e){X(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 m("b-sidebar-root",this.props.className)}onKeyDown(e){e.key==="Escape"&&this.setOpen(!1)}};i(xt,"template","baseui.Sidebar"),i(xt,"props",{open:n(Boolean),state:n(String),"default-open":n(Boolean),defaultOpen:n(Boolean),onOpenChange:n(Function),side:n(String),variant:n(String),collapsible:n(String),...p});var qr=class extends xt{};i(qr,"template","baseui.Sidebar");var Ne=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)}};i(Ne,"template","baseui.SidebarTrigger"),i(Ne,"components",{Icon:$,Button:S}),i(Ne,"props",{...p,icon:n(String),label:n(String)});var Qt=class extends c{get open(){return this.env.sidebar.open}};i(Qt,"template","baseui.SidebarContent"),i(Qt,"props",p);var So=class extends c{};i(So,"template","baseui.SidebarHeader"),i(So,"props",p);var Ao=class extends c{};i(Ao,"template","baseui.SidebarFooter"),i(Ao,"props",p);var Eo=class extends c{};i(Eo,"template","baseui.SidebarInset"),i(Eo,"props",p);var Oe=class extends c{onClick(){this.env.setSidebarOpen(!this.env.sidebar.open)}};i(Oe,"template","baseui.SidebarRail"),i(Oe,"components",{Button:S}),i(Oe,"props",p);var Co=class extends c{};i(Co,"template","baseui.SidebarInput"),i(Co,"props",{className:n(String),style:n([String,Object]),placeholder:n(String),value:n(String),type:n(String)});var Lo=class extends c{};i(Lo,"template","baseui.SidebarSeparator"),i(Lo,"props",p);var Te=class extends c{onClick(){this.env.setSidebarOpen(!1)}};i(Te,"template","baseui.SidebarClose"),i(Te,"components",{Icon:$,Button:S}),i(Te,"props",{...p,icon:n(String),label:n(String)});var te=class extends c{};i(te,"template","baseui.SidebarGroup"),i(te,"props",{muted:n(Boolean),...p});var ee=class extends c{};i(ee,"template","baseui.SidebarGroupLabel"),i(ee,"props",pa);var Be=class extends c{get ariaLabel(){return this.props["aria-label"]??this.props.ariaLabel}onClick(e){this.props.onClick?.(e)}};i(Be,"template","baseui.SidebarGroupAction"),i(Be,"components",{Button:S}),i(Be,"props",{icon:n(String),"aria-label":n(String),ariaLabel:n(String),onClick:n(Function),...p});var ko=class extends c{};i(ko,"template","baseui.SidebarGroupContent"),i(ko,"props",p);var Ie=class extends c{setup(){let e=this.props["default-open"]!==void 0||this.props.defaultOpen!==void 0;this.state=w({open:es(this.props)||e?j(this.props):!0}),Y(this.state)}get open(){return this.state.open}toggle(){let e=!this.state.open;X(this.props,this.state,e)}};i(Ie,"template","baseui.SidebarGroupCollapsible"),i(Ie,"components",{Icon:$,Button:S}),i(Ie,"props",{label:{type:String},open:n(Boolean),state:n(String),"default-open":n(Boolean),defaultOpen:n(Boolean),onOpenChange:n(Function),...p});var wt=class extends c{};i(wt,"template","baseui.SidebarMenu"),i(wt,"props",p);var se=class extends c{};i(se,"template","baseui.SidebarMenuItem"),i(se,"props",p);var vt=class extends c{get classNames(){return m("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),da(this.env)}};i(vt,"template","baseui.SidebarMenuButton"),i(vt,"components",{Icon:$,Button:S}),i(vt,"props",{href:n(String),icon:n(String),active:n(Boolean),isActive:n(Boolean),variant:n(String),size:n(String),tooltip:n(String),disabled:n(Boolean),onClick:n(Function),...p});var Re=class extends c{get ariaLabel(){return this.props["aria-label"]??this.props.ariaLabel}onClick(e){this.props.onClick?.(e)}};i(Re,"template","baseui.SidebarMenuAction"),i(Re,"components",{Button:S}),i(Re,"props",{icon:n(String),"aria-label":n(String),ariaLabel:n(String),showOnHover:n(Boolean),onClick:n(Function),...p});var No=class extends c{};i(No,"template","baseui.SidebarMenuSub"),i(No,"props",p);var Oo=class extends c{};i(Oo,"template","baseui.SidebarMenuBadge"),i(Oo,"props",p);var To=class extends c{setup(){this.state=w({width:this.props.width||`${Math.floor(Math.random()*40)+50}%`})}get style(){return K(`--b-sidebar-skeleton-width:${this.state.width}`,this.props.style)}};i(To,"template","baseui.SidebarMenuSkeleton"),i(To,"props",{showIcon:n(Boolean),width:n(String),className:n(String),style:n([String,Object])});var Bo=class extends c{};i(Bo,"template","baseui.SidebarMenuSubItem"),i(Bo,"props",p);var $e=class extends c{get classNames(){return m("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),da(this.env)}};i($e,"template","baseui.SidebarMenuSubButton"),i($e,"components",{Button:S}),i($e,"props",{...pa,active:n(Boolean),isActive:n(Boolean),size:n(String),onClick:n(Function)});A();x();var Ue=class extends c{setup(){this.state=w({collapsed:this.props.collapsed??this.props.defaultCollapsed??!1,authState:this.props.authState??null}),T({shell:this.state,setShellCollapsed:e=>this.setCollapsed(e)}),z(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?.()}};i(Ue,"template","baseui.Shell"),i(Ue,"components",{Sidebar:xt,Toast:gt,Button:S}),i(Ue,"props",{open:n(Boolean),defaultOpen:n(Boolean),onOpenChange:n(Function),collapsed:n(Boolean),defaultCollapsed:n(Boolean),onCollapsedChange:n(Function),authState:n(Object),toast:n(Object),onToastOpenChange:n(Function),notificationPage:n(Function),pwa:n(Function),...p});var qe=class extends c{};i(qe,"template","baseui.ShellSidebar"),i(qe,"components",{SidebarContent:Qt}),i(qe,"props",p);var Io=class extends c{};i(Io,"template","baseui.ShellSidebarHeader"),i(Io,"props",p);var Ro=class extends c{};i(Ro,"template","baseui.ShellNav"),i(Ro,"props",p);var $o=class extends c{};i($o,"template","baseui.ShellMain"),i($o,"props",p);var Uo=class extends c{};i(Uo,"template","baseui.ShellHeader"),i(Uo,"props",p);var Pe=class extends c{};i(Pe,"template","baseui.ShellContent"),i(Pe,"components",{Skeleton:Mt}),i(Pe,"props",{loading:n(Boolean),...p});var _e=class extends c{get authState(){return this.env.shell.authState}logout(){this.authState?.onLogout?.()}};i(_e,"template","baseui.ShellUserMenu"),i(_e,"components",{Button:S}),i(_e,"props",p);A();x();var qo=class extends c{get classNames(){return m("table","b-table",this.props.striped!==!1&&"table-striped",this.props.hover!==!1&&"table-hover",this.props.className)}};i(qo,"template","baseui.Table"),i(qo,"props",{striped:n(Boolean),hover:n(Boolean),responsive:n(Boolean),...p});A();x();var Cl=[{key:"status",label:"Status",format:"capitalize"},{key:"email",label:"Email",sortable:!0,filterable:!0},{key:"amount",label:"Amount",align:"right",format:"currency"}],Ll=[{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}],kl=[{label:"Copy payment ID"},{label:"View customer"},{label:"View payment details"}],Po=4,_o=8,Nl=32,Me=class extends c{setup(){this.state=w({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=L("actionsMenu"),this.actionsMenuTriggerEl=null,ss(window,"click",this.onWindowClick,!0),ss(window,"keydown",this.onWindowKeydown),ss(window,"resize",this.closeRowActions),ss(window,"scroll",this.closeRowActions,!0),M(()=>this.refreshActionsMenuPosition())}get columns(){return this.props.columns?.length?this.props.columns:Cl}get rows(){return this.props.rows?.length?this.props.rows:Ll}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?kl:[])}get variant(){return this.props.variant||"default"}get classNames(){return m("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(a=>a.filterable===!0),o=(s.length?s:this.columns).map(a=>a.key),r=this.rows.filter(a=>!e||o.some(l=>String(a[l]).toLowerCase().includes(e)));return this.state.sortKey&&(r=[...r].sort((a,l)=>String(a[this.state.sortKey]).localeCompare(String(l[this.state.sortKey]))*this.state.sortDir)),r}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 r=this.rowKey(e,s);if(this.state.actionRowKey===r){this.closeRowActions();return}this.actionsMenuTriggerEl=o.currentTarget,this.state.actionRowKey=r,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*Nl+Po*2,r=window.innerHeight-s.bottom,l=r<o+Po&&s.top>r?Math.max(_o,s.top-Po-o):s.bottom+Po,u=Math.min(Math.max(_o,s.right-160),window.innerWidth-160-_o);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(),r=window.innerHeight-s.bottom,a=s.top,u=r<o.height+Po&&a>r?Math.max(_o,s.top-Po-o.height):Math.min(s.bottom+Po,window.innerHeight-o.height-_o),d=Math.min(Math.max(_o,s.right-o.width),window.innerWidth-o.width-_o),b=`position: fixed; top: ${Math.round(u)}px; left: ${Math.round(d)}px;`;this.state.actionMenuStyle!==b&&(this.state.actionMenuStyle=b)}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 r=this.rowKey(e,s);this.state.selectedKeys=o?[...new Set([...this.state.selectedKeys,r])]:this.state.selectedKeys.filter(a=>a!==r),this.props.onSelectionChange?.(this.state.selectedKeys)}toggleAllVisible(e){let s=this.pageRows.map((o,r)=>this.rowKey(o,r));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 r=Number(o);return new Intl.NumberFormat("en-US",{style:"currency",currency:"USD"}).format(Number.isFinite(r)?r:0)}if(s.format==="capitalize"){let r=String(o??"");return r.charAt(0).toUpperCase()+r.slice(1)}return o??""}cellComponentProps(e,s){return s.componentProps?s.componentProps(e,s):{row:e,column:s,value:e[s.key]}}};i(Me,"template","baseui.DataTable"),i(Me,"components",{Button:S,Icon:$}),i(Me,"props",{columns:n(Array),rows:n(Array),variant:n(String),searchable:n(Boolean),sortable:n(Boolean),pagination:n(Boolean),selectable:n(Boolean),"column-toggle":n(Boolean),columnToggle:n(Boolean),"row-actions":n(Array),rowActions:n(Array),"page-size":n(Number),pageSize:n(Number),"page-size-options":n(Array),pageSizeOptions:n(Array),"filter-placeholder":n(String),filterPlaceholder:n(String),"empty-label":n(String),emptyLabel:n(String),onRowAction:n(Function),onSelectionChange:n(Function),...p,"max-height":n([String,Number]),maxHeight:n([String,Number])});A();x();var Ol=new Intl.DateTimeFormat(void 0,{month:"long",year:"numeric"}),Tl=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],je=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 Ol.format(new Date(this.year,this.month0,1))}get weekdays(){return Tl}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 r=0;r<s;r++)o.push(null);for(let r=1;r<=e;r++){let a=`${this.year}-${String(this.month0+1).padStart(2,"0")}-${String(r).padStart(2,"0")}`;o.push({day:r,value:a,selected:a===this.props.selected})}return o}onSelect(e){this.props.onChange?.(e)}};i(je,"template","baseui.Calendar"),i(je,"components",{Button:S}),i(je,"props",{selected:n(String),month:n(Number),year:n(Number),className:n(String),style:n([String,Object]),onChange:n(Function)});x();var Mo=class extends J{get classNames(){return m("b-date-picker","form-control",this.controlClass,this.isInvalid&&"is-invalid",this.props.className)}onInput(e){this.props.onChange?.(e.target.value,e)}};i(Mo,"template","baseui.DatePicker"),i(Mo,"props",{...rt,value:n(String),className:n(String),style:n([String,Object]),onChange:n(Function)});A();x();var jo=class extends J{setup(){super.setup(),this.rootRef=L("root");let{state:e}=Rr(this.rootRef);this.disclosure=e,this.state=w({query:this.selectedLabel})}get classNames(){return m("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)}};i(jo,"template","baseui.Combobox"),i(jo,"props",{options:{type:Array},...rt,value:n(String),className:n(String),style:n([String,Object]),id:n(String),onChange:n(Function)});A();x();var zo=class extends c{setup(){this.state=w({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)}};i(zo,"template","baseui.Command"),i(zo,"props",{items:{type:Array},placeholder:n(String),className:n(String),style:n([String,Object]),onSelect:n(Function)});A();x();var Do=class extends c{get classNames(){return m("b-chart",this.props.type&&`b-chart-${this.props.type}`,this.props.variant&&`b-chart-${this.props.variant}`,this.props.className)}};i(Do,"template","baseui.Chart"),i(Do,"props",{config:n([String,Object]),label:n(String),type:n(String),value:n([String,Number]),variant:n(String),...p});A();x();var Fo=class extends c{setup(){this.state=w({index:this.props.defaultIndex??0}),this.rootRef=L("root"),this.bootstrapCarousel=null,this.onSlid=e=>{this.state.index=e.to,this.props.onChange?.(this.state.index)},T({carousel:this.state,carouselInstance:()=>this.bootstrapCarousel}),R(()=>{this.bootstrapCarousel=new(N()).Carousel(this.rootRef.el,{interval:!1,wrap:!0,touch:!0}),this.rootRef.el.addEventListener("slid.bs.carousel",this.onSlid)}),U(()=>{this.rootRef.el.removeEventListener("slid.bs.carousel",this.onSlid),this.bootstrapCarousel?.dispose()})}};i(Fo,"template","baseui.Carousel"),i(Fo,"props",{slideCount:{type:Number},defaultIndex:n(Number),onChange:n(Function),...p});var Ho=class extends c{setup(){this.rootRef=L("root"),this.initialActive=this.active,M(()=>{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?F(this.props.state):this.env.carousel.index===this.props.index}};i(Ho,"template","baseui.CarouselSlide"),i(Ho,"props",{index:{type:Number},state:n(String),...p});var ze=class extends c{onClick(){this.env.carouselInstance()?.prev()}};i(ze,"template","baseui.CarouselPrevious"),i(ze,"components",{Button:S}),i(ze,"props",p);var De=class extends c{onClick(){this.env.carouselInstance()?.next()}};i(De,"template","baseui.CarouselNext"),i(De,"components",{Button:S}),i(De,"props",p);A();x();var Wo=class extends c{setup(){this.panelRef=L("panel"),this.state=w({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,r=this.props.min||160,a=this.props.max||720,l=d=>{this.state.width=Math.min(a,Math.max(r,o+d.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)}};i(Wo,"template","baseui.Resizable"),i(Wo,"props",{min:n(Number),max:n(Number),onChange:n(Function),...p});A();x();var Ko=class extends c{get classNames(){return m("b-scroll-area",this.props.className)}};i(Ko,"template","baseui.ScrollArea"),i(Ko,"props",p);A();x();var ha={idle:"b-attachment-idle",uploading:"b-attachment-uploading",processing:"b-attachment-processing",error:"b-attachment-error",done:"b-attachment-done"},ba={default:"b-attachment-default",sm:"b-attachment-sm",xs:"b-attachment-xs"},Vo=class extends c{get state(){return ha[this.props.state]?this.props.state:"done"}get size(){return ba[this.props.size]?this.props.size:"default"}get orientation(){return this.props.orientation==="vertical"?"vertical":"horizontal"}get classNames(){return m("b-attachment",ha[this.state],ba[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])}};i(Vo,"template","baseui.Attachment"),i(Vo,"props",{state:n(String),size:n(String),orientation:n(String),multiple:n(Boolean),...p,onChange:n(Function)});var Go=class extends c{get variant(){return this.props.variant==="image"?"image":"icon"}get classNames(){return m("b-attachment-media",`b-attachment-media-${this.variant}`,this.props.className)}};i(Go,"template","baseui.AttachmentMedia"),i(Go,"props",{variant:n(String),...p});var Zo=class extends c{};i(Zo,"template","baseui.AttachmentContent"),i(Zo,"props",p);var Jo=class extends c{};i(Jo,"template","baseui.AttachmentTitle"),i(Jo,"props",p);var Yo=class extends c{};i(Yo,"template","baseui.AttachmentDescription"),i(Yo,"props",p);var Xo=class extends c{};i(Xo,"template","baseui.AttachmentActions"),i(Xo,"props",p);var Fe=class extends c{get variant(){return this.props.variant||"ghost"}get size(){return this.props.size||"icon-xs"}get className(){return m("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)}};i(Fe,"template","baseui.AttachmentAction"),i(Fe,"components",{Button:S}),i(Fe,"props",{type:n(String),variant:n(String),size:n(String),disabled:n(Boolean),label:n(String),...p,"aria-label":n(String),ariaLabel:n(String),onClick:n(Function)});var He=class extends c{get classNames(){return m("b-attachment-trigger",this.props.className)}get ariaLabel(){return this.props["aria-label"]??this.props.ariaLabel}onClick(e){this.props.onClick?.(e)}};i(He,"template","baseui.AttachmentTrigger"),i(He,"components",{Button:S}),i(He,"props",{href:n(String),target:n(String),rel:n(String),type:n(String),className:n(String),style:n([String,Object]),"aria-label":n(String),ariaLabel:n(String),onClick:n(Function)});var Qo=class extends c{get classNames(){return m("b-attachment-group",this.props.className)}};i(Qo,"template","baseui.AttachmentGroup"),i(Qo,"props",{...p});var tr=class extends c{setup(){this.state=w({dragging:!1}),this.fileInput=L("fileInput")}get hasContent(){return!!this.props.slots?.default}get classNames(){return m("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)}};i(tr,"template","baseui.AttachmentDropzone"),i(tr,"props",{multiple:n(Boolean),disabled:n(Boolean),...p,onFilesSelected:n(Function)});A();x();var er=class extends c{setup(){this.state=w({errored:!1})}get showImage(){return!!this.props.src&&!this.state.errored}onError(){this.state.errored=!0}};i(er,"template","baseui.Avatar"),i(er,"props",{src:n(String),alt:n(String),title:n(String),...p});A();x();var sr=class extends c{get classNames(){return m("b-message",this.props.className)}get side(){return this.props.side||"incoming"}};i(sr,"template","baseui.Message"),i(sr,"props",{side:n(String),...p});A();x();var or=class extends c{setup(){this.rootRef=L("root"),tt(()=>{this.props.autoscroll!==!1&&this.rootRef.el&&(this.rootRef.el.scrollTop=this.rootRef.el.scrollHeight)})}};i(or,"template","baseui.MessageScroller"),i(or,"props",{autoscroll:n(Boolean),...p});A();x();var rr=class extends c{setup(){this.state=w({index:0}),T({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)}};i(rr,"template","baseui.Questionnaire"),i(rr,"props",{stepCount:{type:Number},onChange:n(Function),...p});var ir=class extends c{get active(){return this.props.state!==void 0?F(this.props.state):this.env.questionnaire.index===this.props.index}};i(ir,"template","baseui.QuestionnaireStep"),i(ir,"props",{index:{type:Number},state:n(String),...p});var We=class extends c{get disabled(){return this.env.questionnaire.index===0}onClick(){this.env.questionnaireShow(this.env.questionnaire.index-1)}};i(We,"template","baseui.QuestionnairePrevious"),i(We,"components",{Button:S}),i(We,"props",p);var Ke=class extends c{onClick(){this.env.questionnaireShow(this.env.questionnaire.index+1)}};i(Ke,"template","baseui.QuestionnaireNext"),i(Ke,"components",{Button:S}),i(Ke,"props",{...p,stepCount:n(Number)});A();x();var nr=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 K(`--b-progress-value:${this.value/this.max*100}%`,this.props.style)}get classNames(){return m("progress b-progress",this.props.className)}};i(nr,"template","baseui.Progress"),i(nr,"props",{value:n(Number),max:n(Number),className:n(String),style:n([String,Object])});A();x();var ar=class extends c{get classNames(){return m("b-aspect-ratio",this.props.className)}get style(){let e=this.props.ratio||`${this.props.width||16} / ${this.props.height||9}`;return K(`--b-aspect-ratio:${e}`,this.props.style)}};i(ar,"template","baseui.AspectRatio"),i(ar,"props",{ratio:n(String),width:n(Number),height:n(Number),...p});A();x();var cr=class extends c{get classNames(){return m("b-bubble",this.props.className)}get side(){return this.props.side}};i(cr,"template","baseui.Bubble"),i(cr,"props",{side:n(String),...p});A();x();var lr=class extends c{get dir(){return this.props.dir==="rtl"?"rtl":"ltr"}};i(lr,"template","baseui.Direction"),i(lr,"props",{dir:n(String),...p});A();x();var ur=class extends c{get classNames(){return m("b-item",this.props.className)}get variant(){return this.props.variant}};i(ur,"template","baseui.Item"),i(ur,"props",{variant:n(String),...p});A();x();var pr=class extends c{get orientation(){return this.props.orientation==="vertical"?"vertical":"horizontal"}get classNames(){return m("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"]}};i(pr,"template","baseui.ButtonGroup"),i(pr,"props",{orientation:n(String),size:n(String),"aria-label":n(String),"aria-labelledby":n(String),...p});var dr=class extends c{get orientation(){return this.props.orientation==="horizontal"?"horizontal":"vertical"}get classNames(){return m("b-button-group-separator",`b-button-group-separator-${this.orientation}`,this.props.className)}};i(dr,"template","baseui.ButtonGroupSeparator"),i(dr,"props",{orientation:n(String),className:n(String),style:n([String,Object])});var hr=class extends c{get classNames(){return m("b-button-group-text",this.props.className)}};i(hr,"template","baseui.ButtonGroupText"),i(hr,"props",{...p});A();x();var br=class extends c{get classNames(){return m("b-field-set",this.props.className)}};i(br,"template","baseui.FieldSet"),i(br,"props",{...p});var mr=class extends c{get variant(){return this.props.variant||"legend"}get classNames(){return m("b-field-legend",this.props.className)}};i(mr,"template","baseui.FieldLegend"),i(mr,"props",{variant:n(String),...p});var oe=class extends c{get classNames(){return m("b-field-group",this.props.className)}};i(oe,"template","baseui.FieldGroup"),i(oe,"props",{...p});var re=class extends c{setup(){T({fieldProps:()=>this.props})}get orientation(){return this.props.orientation||"vertical"}get classNames(){return m("b-field",`b-field-orientation-${this.orientation}`,this.props.className)}};i(re,"template","baseui.Field"),i(re,"props",{orientation:n(String),invalid:n(Boolean),label:n(String),labelBackground:n(String),description:n(String),useTip:n(Number),error:n(String),...p});var fr=class extends c{get classNames(){return m("b-field-content",this.props.className)}};i(fr,"template","baseui.FieldContent"),i(fr,"props",{...p});var ie=class extends c{get classNames(){return m("b-field-label",this.props.className)}};i(ie,"template","baseui.FieldLabel"),i(ie,"props",{for:n(String),...p});var gr=class extends c{get classNames(){return m("b-field-title",this.props.className)}};i(gr,"template","baseui.FieldTitle"),i(gr,"props",{...p});var ne=class extends c{get classNames(){return m("b-field-description",this.props.className)}};i(ne,"template","baseui.FieldDescription"),i(ne,"props",{...p});var yr=class extends c{get hasContent(){return!!this.props.slots?.default}get classNames(){return m("b-field-separator",this.props.className)}};i(yr,"template","baseui.FieldSeparator"),i(yr,"props",{...p});var ae=class extends c{get classNames(){return m("b-field-error",this.props.className)}};i(ae,"template","baseui.FieldError"),i(ae,"props",{message:n(String),...p});function Zi(t){return`Icon${String(t).split("-").filter(Boolean).map(s=>s[0].toUpperCase()+s.slice(1)).join("")}`}A();x();var vr=class extends c{get classNames(){return m("form-label","b-label","b-label",this.props.className)}get state(){return this.props.state||(this.props.required?"required":void 0)}};i(vr,"template","baseui.Label"),i(vr,"props",{for:n(String),required:n(Boolean),state:n(String),...p});A();var Bl="b-theme",Il="theme",Rl="[b-theme-toggle]",$l="[b-theme-label]";function yi(t){return t==="dark"?"dark":"light"}function Ul(t){return typeof globalThis.location>"u"?null:new URLSearchParams(globalThis.location.search).get(t)}function ql(t,e=document.documentElement){let s=yi(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 ma(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 Pl(t){typeof document>"u"||typeof CustomEvent>"u"||document.dispatchEvent(new CustomEvent("baseui:theme-change",{detail:{theme:t}}))}function ce(t={}){let e=t.storageKey||Bl,s=t.queryKey||Il,o=t.toggleSelector??Rl,r=t.labelSelector??$l,a=t.root||(typeof document>"u"?null:document.documentElement);function l(){return Ul(s)}function u(){return yi(l()||globalThis.localStorage?.getItem(e)||a?.getAttribute("b-theme")||"light")}function d(k){typeof document>"u"||!o||document.querySelectorAll(o).forEach(y=>{y.setAttribute("aria-pressed",k==="dark"?"true":"false");let E=r?y.querySelector(r):null;E&&(E.textContent=k==="dark"?"Light theme":"Dark theme")})}function b(k){typeof document>"u"||document.querySelectorAll("iframe").forEach(y=>ma(y,k,s))}function f(k,y={}){let E=ql(k,a);return!y.skipStorage&&!l()&&globalThis.localStorage?.setItem(e,E),d(E),b(E),Pl(E),E}function g(){return f(a?.getAttribute("b-theme")==="dark"?"light":"dark")}function v(){if(typeof document>"u")return u();let k=u();return f(k,{skipStorage:!!l()}),o&&document.addEventListener("click",y=>{y.target.closest?.(o)&&g()}),document.querySelectorAll("iframe").forEach(y=>{y.addEventListener("load",()=>ma(y,a?.getAttribute("b-theme")||k,s))}),k}return{current:u,set:f,toggle:g,syncFrames:b,init:v}}var Ji=ce();typeof window<"u"&&(window.BaseUITheme=Ji);x();x();Br();var fa=["btn","b-theme-button",...Object.values(V),...Object.values(Z)];function Pr(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 vi({variant:t="outline",size:e,className:s}={}){return m("btn","b-theme-button",V[t]||V.outline,Z[e],s)}var St=class extends c{setup(){this.theme=ce({storageKey:G(this.props,"storage-key","storageKey")}),this.state=w({theme:this.theme.current()}),this.onThemeChange=e=>{this.state.theme=e.detail?.theme||this.theme.current()},R(()=>{this.state.theme=this.theme.set(this.theme.current(),{skipStorage:!0}),document.addEventListener("baseui:theme-change",this.onThemeChange)}),U(()=>document.removeEventListener("baseui:theme-change",this.onThemeChange))}get iconName(){return Pr(this.state.theme).icon}get baseUrl(){return G(this.props,"base-url")}get label(){return Pr(this.state.theme).label}get pressed(){return Pr(this.state.theme).pressed}get classNames(){return vi(this.props)}get attrs(){return{"b-theme-button":""}}onClick(){let e=this.theme.toggle();this.state.theme=e,this.props.onChange?.(e)}};i(St,"template","baseui.ThemeButton"),i(St,"components",{Icon:$,Button:S}),i(St,"props",{variant:n(String),size:n(String),"base-url":n(String),"storage-key":n(String),storageKey:n(String),className:n(String),style:n([String,Object]),onChange:n(Function)});A();x();var Ve=class extends c{get classNames(){return m("b-toggle","btn",this.props.variant==="outline"?"btn-outline-secondary":"btn-light",this.props.className)}get pressed(){return this.props.state!==void 0?F(this.props.state):!!this.props.pressed}onClick(){this.props.onChange?.(!this.pressed)}};i(Ve,"template","baseui.Toggle"),i(Ve,"components",{Button:S}),i(Ve,"props",{pressed:n(Boolean),state:n(String),variant:n(String),...p,onChange:n(Function)});A();x();var xr=class extends c{setup(){this.state=w({selected:new Set}),T({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)}};i(xr,"template","baseui.ToggleGroup"),i(xr,"props",{multiple:n(Boolean),onChange:n(Function),...p});var Ge=class extends c{get pressed(){return this.env.toggleGroup.selected.has(this.props.value)}onClick(){this.env.toggleGroupSelect(this.props.value)}};i(Ge,"template","baseui.ToggleGroupItem"),i(Ge,"components",{Button:S}),i(Ge,"props",{value:{type:String},...p});A();x();A();x();Si();function Ai(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 r of s[1].split(/\r?\n/)){let a=r.trim();if(!a||a.startsWith("#"))continue;let l=a.indexOf(":");if(l===-1)continue;let u=a.slice(0,l).trim();u&&(o[u]=xu(a.slice(l+1).trim()))}return{data:o,content:e.slice(s[0].length)}}function Ca(t){return t.length>=2&&(t[0]==='"'&&t.at(-1)==='"'||t[0]==="'"&&t.at(-1)==="'")?t.slice(1,-1):t}function xu(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=>Ca(s.trim())):[]}return Ca(t)}var At=class extends c{setup(){this.rootRef=L("root"),this.editorRef=L("editor"),this.editorHandle=null,this.state=w({html:"",source:"",status:"loading",error:"",frontmatter:{}}),ot(()=>this.load(this.props)),z(e=>{if(this.shouldReload(e))return this.load(e);this.shouldRestartEditor(e)&&this.destroyEditor()}),R(()=>this.afterRender()),M(()=>this.afterRender()),ue(()=>{this.destroyEditor(),this.rootRef.el&&_r(this.rootRef.el)})}get classNames(){return m("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:r}=Ai(s);this.state.frontmatter=o,this.state.html=ii(await Zr(r)),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"||Jr(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 Yr({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,r)=>{this.state.source=s,this.props.onChange?.(s,o,r)}})}catch(s){this.state.status="error",this.state.error=s.message||String(s)}}destroyEditor(){this.editorHandle?.destroy?.(),this.editorHandle=null}};i(At,"template","baseui.Markdown"),i(At,"components",{Badge:st}),i(At,"props",{content:n(String),src:n(String),mermaid:n(Boolean),baseUi:n(Boolean),editable:n(Boolean),collaborative:n(Boolean),room:n(String),password:n(String),signaling:n(Array),user:n(Object),onChange:n(Function),className:n(String),style:n([String,Object])});var La={implicit:"Implicit",password:"Resource Owner Password Credentials",application:"Client Credentials",accessCode:"Authorization Code"},wu=["POST","PUT","PATCH"];function wr(t){try{return sessionStorage.getItem(t)||""}catch{return""}}function Xr(t,e){try{e?sessionStorage.setItem(t,e):sessionStorage.removeItem(t)}catch{}}function rn(){return!!(wr("apikey")||wr("oauthkey"))}function on(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 nn(t,e){let s=wr("apikey"),o=wr("oauthkey");for(let r of t.security)r.type==="apiKey"&&r.in==="header"?e.header[r.name]=s:r.type==="apiKey"&&r.in==="query"?e.query[r.name]=s:r.type==="basic"?e.header.Authorization=s?`Basic ${s}`:"":(r.type==="oauth2"||r.type==="bearer")&&(e.header.Authorization=o?`Bearer ${o}`:"")}function ka(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]=on(o)}),t.parameters.query.forEach(o=>{s.query[o.name]=o.required?on(o):""}),t.parameters.header.forEach(o=>{s.header[o.name]=o.required?on(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=an(t.parameters.body.example)),nn(t,s),s}function an(t){return typeof t=="string"?t:JSON.stringify(t,null,2)??""}function cn(t,e){let s=t.path;for(let[r,a]of Object.entries(e.path))s=s.replace(`{${r}}`,encodeURIComponent(a??""));let o=!!t.parameters.body&&wu.includes(t.method);return{method:t.method,url:`${e.baseUrl}${s}`,query:Object.entries(e.query).filter(([,r])=>r!==""),headers:Object.entries(e.header).filter(([,r])=>r!==""),bodyText:o?e.bodyText:"",mimeType:e.mimeType}}function Na(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,r])=>`${o}: ${r}`).join(`
|
|
47
|
+
`)}}async function Oa(t,e){let s=performance.now(),o=await fetch(e.url,{method:t.method,headers:e.headers,body:t.bodyText||void 0}),r=Math.round(performance.now()-s),a=await o.text();return{status:o.status,statusText:o.statusText,ms:r,headerLines:[...o.headers.entries()].map(([l,u])=>`${l}: ${u}`).join(`
|
|
48
|
+
`),bodyText:Su(a)}}function Su(t){try{return JSON.stringify(JSON.parse(t),null,2)}catch{return t}}function Ta(t){let e=parseInt(t,10);return t==="default"||Number.isNaN(e)?"default":e<300?"2xx":e<400?"3xx":e<500?"4xx":"5xx"}function Ba(t,e,s){if(!t)return"";try{let o=new URL(e),r=new URL(s.derivedBaseUrl||s.baseUrl||e),a=new URL(t,`${o.href.replace(/\/$/,"")}/`);return a.host===r.host&&(a.protocol=o.protocol,a.username=o.username,a.password=o.password,a.host=o.host),a.href}catch{return String(t)}}function Ia(){return Array.from(crypto.getRandomValues(new Uint8Array(16)),t=>t.toString(16).padStart(2,"0")).join("")}function Ra({def:t,clientId:e,scopes:s,state:o,redirectUri:r,baseUrl:a,doc:l}){let u=new URL(Ba(t.authorizationUrl,a,l));return u.searchParams.set("response_type",t.flow==="implicit"?"token":"code"),e&&u.searchParams.set("client_id",e),u.searchParams.set("redirect_uri",r),s.length&&u.searchParams.set("scope",s.join(" ")),u.searchParams.set("state",o),u.toString()}async function $a(t,e,s,o){if(!t)throw new Error("No tokenUrl defined for this scheme.");let r=new URLSearchParams;for(let[u,d]of Object.entries(e))d&&r.set(u,d);let a=await fetch(Ba(t,s,o),{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:r.toString()}),l=await a.json().catch(()=>({}));if(!a.ok||!l.access_token)throw new Error(l.error_description||l.error||`HTTP ${a.status}`);return l.access_token}function Ua(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 Va;function rp(){return Va??(Va=Promise.resolve().then(()=>(Ka(),Wa)))}var ip=["curl","csharp","go","node","ruby","php"],np="(max-width: 1100px)";function Ga(t){return t==="DELETE"?"DEL":t}function ap(){let t=[...document.scripts].find(e=>/\/baseui(\.[\w-]+)*\.(min\.)?js(\?|$)/.test(e.src));return t?`${t.src.replace(/[?#].*$/,"").replace(/\/[^/]*$/,"")}/apidoc`:""}var Ct=class extends c{get children(){return this.props.groups.filter(e=>e.parent===this.props.group.name)}methodLabel(e){return Ga(e)}};i(Ct,"template","baseui.ApiDocGroup"),i(Ct,"props",{group:Object,groups:Array,current:String,href:Function,onSelect:Function});Ct.components={ApiDocGroup:Ct,Icon:$};var Et=class extends c{setup(){this.rootRef=L("root"),this.mainRef=L("main"),this.doc=null,this.pendingOAuth=new Map,this.watchers=new Set,this.rowsCache=new WeakMap,this.overlayQuery=window.matchMedia(np),this.state=w({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:rn(),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)),z(e=>this.shouldReload(e)?this.load(e):void 0),R(()=>this.addListeners()),ue(()=>this.removeListeners())}get classNames(){return m("b-apidoc",this.props.className)}get rootStyle(){return K(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(r=>({...r,group:"path"})),...s.map(r=>({...r,group:"query"})),...o.map(r=>({...r,group:"header"}))]}get selectedBaseUrl(){return this.draft?.baseUrl||this.doc.baseUrl}methodLabel(e){return Ga(e)}statusClass(e){return Ta(e)}formatExample(e){return an(e)}serverLabel(e){let s=[e.name,e.description].filter(Boolean).join(" \u2014 ");return s?`${s} (${e.url})`:e.url}languageTone(e){return ip.includes(e)?e:"default"}encodingEntries(e){return Object.entries(e)}oauthFlowLabel(e){return La[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(`
|
|
49
|
+
`).map((s,o)=>o+1)}iconUrl(e){let s=this.props.assetBase??this.assetBase??(this.assetBase=ap());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 rp(),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]=ka(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,cn(e,this.draft))}catch(o){this.state.snippet=`// Could not generate ${s.label} snippet: ${o.message}`}}async send(){let e=this.op,s=cn(e,this.draft),o=Na(s),r={method:s.method,url:o.url,headerLines:o.headerLines,bodyText:s.bodyText};this.state.result={phase:"sending",sent:r};let a;try{a={phase:"done",sent:r,res:await Oa(s,o)}}catch(l){a={phase:"error",sent:r,message:l.message}}this.state.current===e.id&&(this.state.result=a)}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=wr("apikey"),e.stored.oauthkey=wr("oauthkey"),e.inputs.apikey=e.stored.apikey,e.inputs.oauthkey=e.stored.oauthkey;for(let{key:o,def:r}of this.authSchemes)(s=e.oauth)[o]??(s[o]={clientId:"",clientSecret:"",username:"",password:"",scopes:Object.keys(r.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(){Xr("apikey",this.state.inputs.apikey.trim()),Xr("oauthkey",this.state.inputs.oauthkey.trim()),this.closeAuth(),this.applyAuthToAll()}clearAuth(e){Xr(e,""),this.state.stored[e]="",this.state.inputs[e]="",this.applyAuthToAll()}applyAuthToAll(){for(let[e,s]of Object.entries(this.state.drafts))nn(this.doc.findOperation(e),s);this.state.authed=rn(),this.updateSnippet()}toggleScope(e,s){let o=this.state.oauth[e].scopes,r=o.indexOf(s);r<0?o.push(s):o.splice(r,1)}setOAuthStatus(e,s,o=!1){this.state.oauthStatus[e]={message:s,isError:o}}applyOAuthToken(e,s,o){Xr("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 r=await $a(this.doc.securityDefinitions[e].tokenUrl,s,this.selectedBaseUrl,this.doc);this.applyOAuthToken(e,r,o)}catch(r){this.setOAuthStatus(e,`Token request failed: ${r.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],r=[...o.scopes];if(s.flow==="implicit"||s.flow==="accessCode")return this.openOAuthPopup(e,s,o,r);if(s.flow==="password"||s.flow==="application")return this.setOAuthStatus(e,"Requesting token\u2026"),this.fetchToken(e,Ua(s.flow,o,r),o);this.setOAuthStatus(e,`Unsupported OAuth2 flow: ${s.flow}`,!0)}openOAuthPopup(e,s,o,r){if(!s.authorizationUrl)return this.setOAuthStatus(e,"No authorizationUrl defined for this scheme.",!0);let a=Ia(),l=Ra({def:s,clientId:o.clientId,scopes:r,state:a,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(a,{key:e,flow:s.flow,fields:{...o}}),this.setOAuthStatus(e,"Waiting for authorization in the popup\u2026"),this.watchPopup(u,a,e)}watchPopup(e,s,o){let r=setInterval(()=>{e.closed&&(clearInterval(r),this.watchers.delete(r),this.pendingOAuth.delete(s)&&this.setOAuthStatus(o,"Authorization window was closed before completing.",!0))},500);this.watchers.add(r)}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:r,flow:a,fields:l}=o;if(s.error)return this.setOAuthStatus(r,`Authorization failed: ${s.error}${s.errorDescription?" - "+s.errorDescription:""}`,!0);if(a==="implicit")return s.accessToken?this.applyOAuthToken(r,s.accessToken,l):this.setOAuthStatus(r,"Authorization server did not return an access token.",!0);if(!s.code)return this.setOAuthStatus(r,"Authorization server did not return a code.",!0);this.setOAuthStatus(r,"Exchanging code for token\u2026"),this.fetchToken(r,{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)}};i(Et,"template","baseui.ApiDoc"),i(Et,"components",{ApiDocGroup:Ct,Markdown:At,Badge:st,Breadcrumb:Gt,BreadcrumbItem:Jt,BreadcrumbLink:Yt,BreadcrumbList:Zt,BreadcrumbPage:Xt,BreadcrumbSeparator:yt,Button:S,Checkbox:Dt,Dialog:$t,DialogContent:bt,DialogDescription:_t,DialogFooter:qt,DialogHeader:Ut,DialogTitle:Pt,Icon:$,Input:Ot,NativeSelect:zt,TabContent:Rt,Tabs:Tt,TabsContainer:Bt,TabsList:It,TabTrigger:ht,Textarea:jt}),i(Et,"props",{src:n(String),spec:n(Object),title:n(String),serverUrl:n(String),theme:n(String),themeToggle:n(Boolean),hash:n(Boolean),operation:n(String),tryIt:n(Boolean),authorize:n(Boolean),languages:n(Array),language:n(String),assetBase:n(String),oauthRedirectUri:n(String),height:n(String),onLoad:n(Function),onError:n(Function),onNavigate:n(Function),className:n(String),style:n([String,Object])});A();x();function Ni(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=Ni(s,e);if(o)return o}return null}function cp(t){return t.replace(/\.[^./]+$/,"").replace(/[_-]+/g," ").trim().split(/\s+/).map(s=>s.charAt(0).toUpperCase()+s.slice(1)).join(" ")}var jr=class jr extends c{get label(){let e=this.props.node.meta;return e?.sidebar_label||e?.title||cp(this.props.node.name)}get hasSubfolders(){return(this.props.node.children||[]).some(e=>e.type==="dir")}select(e){this.props.onSelect(e)}};i(jr,"template","baseui.MarkdownTreeNode"),i(jr,"components",{MarkdownTreeNode:jr,Icon:$,SidebarGroupLabel:ee,SidebarMenu:wt,SidebarMenuItem:se,SidebarMenuButton:vt,DropdownMenu:Ft,DropdownMenuTrigger:mt,DropdownMenuContent:Ht,DropdownMenuItem:Wt,DropdownMenuSub:Kt,DropdownMenuSubTrigger:ft,DropdownMenuSubContent:Vt}),i(jr,"props",{node:{type:Object},activePath:n(String),onSelect:{type:Function},nested:n(Boolean)});var zr=jr,Ze=class extends c{setup(){this.state=w({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)}}};i(Ze,"template","baseui.MarkdownTree"),i(Ze,"components",{MarkdownTreeNode:zr,SidebarGroup:te,SidebarMenu:wt}),i(Ze,"props",{src:{type:String},activePath:n(String),onSelect:{type:Function},className:n(String),style:n([String,Object])});A();function Za(t=document.querySelector("[b-block-code-template]")){let o=((t?.tagName==="SCRIPT"?t.textContent:t?.innerHTML)?.replace(/^\n/,"").replace(/\s+$/,"")||"").split(`
|
|
50
|
+
`),r=o.filter(l=>l.trim()).map(l=>l.match(/^\s*/)?.[0].length||0),a=r.length?Math.min(...r):0;return o.map(l=>l.slice(a)).join(`
|
|
51
|
+
`)}function Ja(t,e=0){let s=" ".repeat(e),o=[];for(let r of t.childNodes){if(r.nodeType===Node.TEXT_NODE){let u=r.textContent.trim();u&&o.push(`${s}${u}`);continue}if(r.nodeType!==Node.ELEMENT_NODE)continue;let a=[...r.attributes].map(u=>` ${u.name}="${u.value}"`).join("");if(![...r.childNodes].some(u=>u.nodeType===Node.ELEMENT_NODE||u.nodeType===Node.TEXT_NODE&&u.textContent.trim())){o.push(`${s}<${r.localName}${a}>${r.textContent.trim()}</${r.localName}>`);continue}o.push(`${s}<${r.localName}${a}>`),o.push(...Ja(r,e+1)),o.push(`${s}</${r.localName}>`)}return o}async function Ya(t){if(!t?.trim())return"";let{expandSelfClosingTags:e,extractTagCaseMap:s,normalizeOwlPreviewMarkup:o}=await Promise.resolve().then(()=>(Si(),Ea)),r=document.createElement("div");return r.innerHTML=e(t),o(r,s(t)),Ja(r).join(`
|
|
52
|
+
`)}function Xa(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 r=e.getAttribute("b-att-sidebar")!=="open";e.setAttribute("b-att-sidebar",r?"open":"collapsed"),s.setAttribute("aria-expanded",r?"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 r=e.getAttribute("b-att-state")!=="open";e.setAttribute("b-att-state",r?"open":"collapsed"),s.setAttribute("aria-expanded",r?"true":"false")}))})}x();var Oi=ce({storageKey:"b-example-theme",toggleSelector:"",labelSelector:""}),lp=[{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"}],up={desktop:"",tablet:"768px",mobile:"390px"},pp="/dist/icons/lucide";function dp(){return document.querySelector("[b-block-code-template]")}function hp(t){return t.match(/<templates[^>]*>([\s\S]*)<\/templates>/)?.[1]||t}function bp(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",pp)}var Je=class extends c{setup(){this.navItems=this.props.navItems||lp,this.previewFrame=L("previewFrame"),this.embedRoot=L("embedRoot"),this.code=Za(),this.state=w({mode:"preview",viewport:"desktop",copyLabel:"Copy code",embed:new URLSearchParams(globalThis.location.search).get("embed")==="1",codeVariant:"owl",staticTemplate:"",staticTemplateStatus:"idle"}),R(()=>this.mountPreview()),M(()=>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=up[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=dp();if(!(!e||!s)){if(s.tagName==="SCRIPT"){this.mountOwlPreview(e,s);return}e.replaceChildren(s.content.cloneNode(!0)),this.mountStaticBaseUI(e),Xa(e)}}async mountOwlPreview(e,s){e.replaceChildren();class o extends c{setup(){this.state=w({collapsed:!1})}}i(o,"template","examples.SidebarBlock");let r=[await le("/dist/baseui.templates.xml"),s.textContent].map(hp).join(`
|
|
53
|
+
`);await os(o,e,{templates:`<templates>${r}</templates>`}),Oi.set(Oi.current(),{skipStorage:!0})}mountStaticBaseUI(e=document){bp(e),globalThis.thebase?.mountAll(e),Oi.set(Oi.current(),{skipStorage:!0})}};i(Je,"template","baseui.BlockViewer"),i(Je,"components",{Button:S,Icon:$,ThemeButton:St}),i(Je,"props",{navItems:n(Array)});A();x();var Sr=class extends c{setup(){this.pwaState=w({open:j(this.props)}),T({pwa:this.pwaState,setPwaOpen:e=>this.setOpen(e)}),Y(this.pwaState)}setOpen(e){X(this.props,this.pwaState,e)}};i(Sr,"template","baseui.Pwa"),i(Sr,"props",{open:n(Boolean),"default-open":n(Boolean),defaultOpen:n(Boolean),onOpenChange:n(Function),slots:n(Object)});var Ye=class extends c{onClick(){this.env.setPwaOpen(!0)}};i(Ye,"template","baseui.PwaTrigger"),i(Ye,"components",{Button:S}),i(Ye,"props",p);var Ar=class extends c{setup(){this.rootRef=L("root"),tt(e=>{if(!e)return;let s=document.activeElement;return $r(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)}};i(Ar,"template","baseui.PwaContent"),i(Ar,"props",p);var Er=class extends c{};i(Er,"template","baseui.PwaHeader"),i(Er,"props",p);var Cr=class extends c{};i(Cr,"template","baseui.PwaTitle"),i(Cr,"props",p);var Lr=class extends c{};i(Lr,"template","baseui.PwaDescription"),i(Lr,"props",p);var kr=class extends c{};i(kr,"template","baseui.PwaBody"),i(kr,"props",p);var Nr=class extends c{get steps(){return Array.isArray(this.props.steps)?this.props.steps:[]}};i(Nr,"template","baseui.PwaSteps"),i(Nr,"props",{...p,steps:n(Array)});var Or=class extends c{};i(Or,"template","baseui.PwaFooter"),i(Or,"props",p);var Xe=class extends c{onClick(){this.env.setPwaOpen(!1)}};i(Xe,"template","baseui.PwaClose"),i(Xe,"components",{Button:S}),i(Xe,"props",p);A();x();var Qa="",tc="";function ec(t,e){return typeof t=="string"?t:e}function mp(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 Qe=class extends c{setup(){this.state=w({title:ec(this.props.title,Qa),description:ec(this.props.description,tc),submitted:!1})}get classNames(){return m("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 mp(this.state)}get titleInvalid(){return!!this.errors.title}get descriptionInvalid(){return!!this.errors.description}reset(){this.state.title=Qa,this.state.description=tc,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})}};i(Qe,"template","baseui.Form"),i(Qe,"components",{Button:S,Field:re,FieldDescription:ne,FieldError:ae,FieldGroup:oe,FieldLabel:ie}),i(Qe,"props",{title:n(String),description:n(String),titlePlaceholder:n(String),descriptionPlaceholder:n(String),maxDescriptionLength:n(Number),className:n(String),style:n([String,Object]),onSubmit:n(Function)});A();x();var gn;function fp(){return gn??(gn=import("./runtime/milkdown/milkdown-text-editor.js")),gn}async function Ti(t){return(await fp()).createMilkdownTextEditor(t)}function Bi({collaborative:t,providerType:e,url:s}={}){return!!t||!!(e&&s)}var Tr=class extends c{setup(){this.editorRef=L("editor"),this.editorHandle=null,this.mountPromise=null,this.mountToken=0,this.isDestroyed=!1,this.state=w({content:"",status:"loading",error:""}),ot(()=>this.load(this.props)),z(e=>{if(this.shouldReload(e))return this.load(e);this.shouldRestartEditor(e)&&this.destroyEditor()}),R(()=>this.mountEditor()),M(()=>this.mountEditor()),ue(()=>{this.isDestroyed=!0,this.destroyEditor()})}get classNames(){return m("b-text-editor",this.props.className)}get isCollaborative(){return Bi({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 Ti({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:(r,a,l)=>{this.state.content=r,this.props.onChange?.(r,a,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}};i(Tr,"template","baseui.TextEditor"),i(Tr,"props",{content:n(String),src:n(String),placeholder:n(String),collaborative:n(Boolean),provider:n(String),room:n(String),url:n(String),password:n(String),signaling:n(Array),user:n(Object),onChange:n(Function),className:n(String),style:n([String,Object])});C();function gp(t){let{open:e,close:s,destroy:o}=fi(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}}}h.register("alert-dialog",{type:"owl",mount:gp});C();var yn={default:"b-alert-default",destructive:"b-alert-destructive",info:"b-alert-default",success:"alert-success",warning:"alert-warning",danger:"b-alert-destructive"};function yp(t){t.classList.add("alert","b-alert",yn[t.getAttribute("b-att-variant")||"default"]||yn.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(N()).Alert(t)}return{destroy:()=>{e?.dispose(),t.classList.remove("alert","b-alert","alert-dismissible","fade","show",...Object.values(yn))}}}h.register("alert",{type:"static",mount:yp});A();C();function sc(t,e){return t.getAttribute(e)!=="false"}function vp(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 xp(t){let e=(o,r)=>t.dispatchEvent(new CustomEvent(`baseui:${o}`,{bubbles:!0,detail:r})),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:sc(t,"b-att-try-it"),authorize:sc(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(r=>r.items).length}),onError:o=>e("error",{error:o}),onNavigate:o=>e("navigate",{id:o})}}function wp(t){let e=xp(t),s=le(vp(t)).then(o=>os(Et,t,{templates:o,props:e}));return{destroy:async()=>{(await s).destroy()}}}h.register("apidoc",{type:"owl",mount:wp});C();function Sp(t){let e=[...t.querySelectorAll("[b-accordion-item]")],s=t.getAttribute("b-att-multiple")==="true",o=new Map,r=new Map,a=new Map,l=(u,d)=>{let b=u.querySelector("[b-accordion-trigger]");u.setAttribute("b-att-state",d?"open":"closed"),b?.setAttribute("aria-expanded",String(d)),t.dispatchEvent(new CustomEvent("baseui:change",{bubbles:!0,detail:{open:d}}))};return t.setAttribute("role","presentation"),t.classList.add("accordion"),e.forEach((u,d)=>{let b=u.querySelector("[b-accordion-trigger]"),f=u.querySelector("[b-accordion-panel]");if(!f)return;u.classList.add("accordion-item"),b?.classList.add("accordion-button"),f.classList.add("accordion-collapse");let g=f.id||`b-accordion-panel-${d}`;f.id=g;let v=u.getAttribute("b-att-state")==="open";f.classList.add("collapse"),v&&f.classList.add("show");let k=new(N()).Collapse(f,{toggle:!1});a.set(u,k);let y=()=>l(u,!0),E=()=>l(u,!1);f.addEventListener("shown.bs.collapse",y),f.addEventListener("hidden.bs.collapse",E),r.set(u,{onShown:y,onHidden:E}),b?.setAttribute("aria-expanded",String(v)),b?.setAttribute("aria-controls",g);let O=()=>{let P=f.classList.contains("show");!s&&!P&&e.forEach(B=>{if(B===u)return;let W=a.get(B),et=B.querySelector("[b-accordion-panel]");W&&et?.classList.contains("show")&&W.hide()}),P?k.hide():k.show()};o.set(u,O),b?.addEventListener("click",O)}),{destroy:()=>{e.forEach(u=>{let d=u.querySelector("[b-accordion-trigger]"),b=u.querySelector("[b-accordion-panel]");d?.removeEventListener("click",o.get(u));let f=r.get(u);b&&f&&(b.removeEventListener("shown.bs.collapse",f.onShown),b.removeEventListener("hidden.bs.collapse",f.onHidden)),a.get(u)?.dispose()}),o.clear(),r.clear(),a.clear()}}}h.register("accordion",{type:"owl",mount:Sp});C();function Ap(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")}}h.register("aspect-ratio",{type:"static",mount:Ap});C();Br();var Ep=["idle","uploading","processing","error","done"],Cp=["default","sm","xs"],Lp=["content","title","description","actions"];function oc(t,e){t.classList.add(`b-attachment-${e}`),t.setAttribute("data-slot",`attachment-${e}`)}function kp(t){let e=t.querySelector("input[type='file']"),s=t.querySelector("[b-attachment-list]"),o=Ep.includes(t.getAttribute("b-att-state"))?t.getAttribute("b-att-state"):"done",r=Cp.includes(t.getAttribute("b-att-size"))?t.getAttribute("b-att-size"):"default",a=t.getAttribute("b-att-orientation")==="vertical"?"vertical":"horizontal";t.classList.add("b-attachment"),t.classList.add(`b-attachment-${o}`,`b-attachment-${r}`,`b-attachment-${a}`),t.setAttribute("data-state",o),t.setAttribute("data-size",r),t.setAttribute("data-orientation",a),t.setAttribute("data-slot","attachment"),e&&t.classList.add("b-attachment-picker"),t.querySelectorAll("[b-attachment-media]").forEach(u=>{let d=u.getAttribute("b-att-variant")==="image"?"image":"icon";oc(u,"media"),u.classList.add(`b-attachment-media-${d}`),u.setAttribute("data-variant",d)}),Lp.forEach(u=>t.querySelectorAll(`[b-attachment-${u}]`).forEach(d=>oc(d,u))),t.querySelectorAll("[b-attachment-action]").forEach(u=>{let d=V[u.getAttribute("b-att-variant")]||V.ghost,b=Z[u.getAttribute("b-att-size")]||Z["icon-xs"];u.classList.add("btn","b-button",d,b,"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 Np(t){return t.classList.add("b-attachment-group"),t.setAttribute("data-slot","attachment-group"),{destroy:()=>t.classList.remove("b-attachment-group")}}function Op(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=d=>{d.preventDefault(),t.classList.add("b-attachment-dropzone-dragging")},r=()=>t.classList.remove("b-attachment-dropzone-dragging"),a=d=>{d.length&&t.dispatchEvent(new CustomEvent("baseui:change",{bubbles:!0,detail:{files:d}}))},l=d=>{d.preventDefault(),t.classList.remove("b-attachment-dropzone-dragging"),a([...d.dataTransfer?.files??[]])},u=()=>{a([...e?.files??[]]),e&&(e.value="")};return t.addEventListener("click",s),t.addEventListener("dragover",o),t.addEventListener("dragleave",r),t.addEventListener("drop",l),e?.addEventListener("change",u),{destroy:()=>{t.removeEventListener("click",s),t.removeEventListener("dragover",o),t.removeEventListener("dragleave",r),t.removeEventListener("drop",l),e?.removeEventListener("change",u)}}}h.register("attachment",{type:"owl",mount:kp});h.register("attachment-group",{type:"static",mount:Np});h.register("attachment-dropzone",{type:"static",mount:Op});C();function Tp(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{}}h.register("avatar",{type:"static",mount:Tp});C();function Bp(t){let e=as[t.getAttribute("b-att-variant")||"secondary"]||as.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(as))}}h.register("badge",{type:"static",mount:Bp});C();lt();function rc(t){return[...t.children].filter(e=>!e.matches("[b-breadcrumb-separator], .b-breadcrumb-separator"))}function nc(t,e,s){return D(t,e,{size:s}),t}function Ip(){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(nc(e,"chevron-right","var(--b3_5)")),t}function Rp(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 $p(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(nc(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 ic(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 Up(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"))Rp(o);for(let o of e.querySelectorAll("[b-breadcrumb-ellipsis], .b-breadcrumb-ellipsis"))$p(o);for(let o of e.querySelectorAll("[b-breadcrumb-page], .b-breadcrumb-page"))ic(o);e.querySelector("[b-breadcrumb-separator], .b-breadcrumb-separator")||rc(e).slice(0,-1).forEach(r=>r.after(Ip()));let s=rc(e);return s.forEach((o,r)=>{o.classList.add("b-breadcrumb-item"),o.setAttribute("data-slot",o.getAttribute("data-slot")||"breadcrumb-item");for(let a of o.querySelectorAll("a"))a.classList.add("b-breadcrumb-link"),a.setAttribute("data-slot",a.getAttribute("data-slot")||"breadcrumb-link");if(r===s.length-1){let a=o.querySelector("[b-breadcrumb-page], .b-breadcrumb-page");a?ic(a):(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()}}}h.register("breadcrumb",{type:"owl",mount:Up});C();function qp(t){return t.classList.add("b-bubble"),t.getAttribute("role")||t.setAttribute("role","listitem"),{destroy:()=>t.classList.remove("b-bubble")}}h.register("bubble",{type:"static",mount:qp});C();lt();Br();function Pp(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 _p(t){let e=t.getAttribute("b-att-icon"),s=t.getAttribute("b-att-icon-position")==="end"?"end":"start",o=!!t.textContent.trim(),r=e&&o?Pp(t):[],a=null;return t.classList.add("btn","b-button",V[t.getAttribute("b-att-variant")||"default"]||"btn-primary"),Z[t.getAttribute("b-att-size")]&&t.classList.add(Z[t.getAttribute("b-att-size")]),t.dataset.slot="button",e&&(a=document.createElement("span"),a.setAttribute("b-icon",e),a.dataset.icon=`inline-${s}`,D(a,e,{label:""}),t.insertBefore(a,s==="end"?null:t.firstChild),t.dataset.icon=`inline-${s}`,o||(t.dataset.iconOnly="true",t.classList.add("b-button-icon"))),{destroy:()=>{a?.remove();for(let l of r)l.replaceWith(document.createTextNode(l.textContent));t.classList.remove("btn","b-button","b-button-icon",...Object.values(V),...Object.values(Z)),t.removeAttribute("data-slot"),t.removeAttribute("data-icon"),t.removeAttribute("data-icon-only")}}}h.register("button",{type:"static",mount:_p});C();function Mp(t){let e=t.getAttribute("b-att-orientation")==="vertical",s=t.getAttribute("b-att-size"),o=[...t.querySelectorAll("[b-button-group-separator]")],r=[...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(a=>{let l=a.getAttribute("b-att-orientation")==="horizontal"?"horizontal":"vertical";a.classList.add("b-button-group-separator",`b-button-group-separator-${l}`),a.setAttribute("data-orientation",l),a.setAttribute("role","separator")}),r.forEach(a=>{a.classList.add("b-button-group-text")}),{destroy:()=>{t.classList.remove("b-button-group","btn-group","btn-group-vertical","btn-group-sm","btn-group-lg")}}}h.register("button-group",{type:"static",mount:Mp});C();var jp=new Intl.DateTimeFormat(void 0,{month:"long",year:"numeric"});function zp(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()),r=new Date(o,s,1),a=new Date(o,s+1,0).getDate(),l=r.getDay();t.classList.add("b-calendar"),t.querySelector("[b-calendar-grid]")||(t.innerHTML=`
|
|
54
|
+
<div class="b-calendar__header">${jp.format(r)}</div>
|
|
55
|
+
<div class="b-calendar__weekdays">${["Sun","Mon","Tue","Wed","Thu","Fri","Sat"].map(b=>`<span>${b}</span>`).join("")}</div>
|
|
56
|
+
<div b-calendar-grid class="b-calendar__grid"></div>
|
|
57
|
+
`);let u=t.querySelector("[b-calendar-grid]");u.innerHTML="";for(let b=0;b<l;b+=1)u.append(document.createElement("span"));for(let b=1;b<=a;b+=1){let f=document.createElement("button"),g=`${o}-${String(s+1).padStart(2,"0")}-${String(b).padStart(2,"0")}`;f.type="button",f.textContent=String(b),f.setAttribute("b-att-value",g),f.setAttribute("aria-pressed",String(g===t.getAttribute("b-att-selected"))),u.append(f)}let d=b=>{let f=b.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",d),{destroy:()=>u.removeEventListener("click",d)}}h.register("calendar",{type:"owl",mount:zp});C();function Dp(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")}}h.register("card",{type:"static",mount:Dp});C();function Fp(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 b=document.createElement("div");b.classList.add("carousel-inner"),e[0].before(b),e.forEach(f=>b.appendChild(f))}let r=Math.max(0,e.findIndex(b=>b.getAttribute("b-att-state")==="active"));e.forEach((b,f)=>{b.classList.add("carousel-item"),f===r&&b.classList.add("active"),b.setAttribute("b-att-state",f===r?"active":"inactive")});let a=e.length?new(N()).Carousel(t,{interval:!1,wrap:!0,touch:!0}):null,l=b=>{e.forEach((f,g)=>{f.setAttribute("b-att-state",g===b.to?"active":"inactive")}),t.dispatchEvent(new CustomEvent("baseui:change",{bubbles:!0,detail:{index:b.to}}))};t.addEventListener("slid.bs.carousel",l);let u=()=>a?.prev(),d=()=>a?.next();return s?.addEventListener("click",u),o?.addEventListener("click",d),{destroy:()=>{s?.removeEventListener("click",u),o?.removeEventListener("click",d),t.removeEventListener("slid.bs.carousel",l),a?.dispose()}}}h.register("carousel",{type:"owl",mount:Fp});C();function ac(t,e,s=0){let o=Number(t.getAttribute(e));return Number.isFinite(o)?o:s}function Hp(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 Wp(t,e){let s=globalThis.getComputedStyle(t),o=[1,2,3,4,5].map(l=>s.getPropertyValue(`--b-chart-${l}`).trim()),r=s.getPropertyValue("--b-muted-foreground").trim(),a=s.getPropertyValue("--b-chart-grid").trim()||s.getPropertyValue("--b-border").trim();return e.options={maintainAspectRatio:!1,plugins:{legend:{labels:{boxWidth:8,boxHeight:8,color:r,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:r,font:{size:12}}},y:{border:{display:!1},grid:{color:a},ticks:{color:r,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 Kp(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 Vp(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 a=Hp(t);a&&(s=new globalThis.Chart(e,Wp(t,a)))}let o=[...t.querySelectorAll("[b-att-value]")],r=Math.max(1,...o.map(a=>ac(a,"b-att-value")));return o.forEach((a,l)=>{let u=ac(a,"b-att-value"),d=a.getAttribute("b-att-label")||a.textContent.trim()||`Series ${l+1}`,b=Math.max(0,Math.min(100,u/r*100));a.style.setProperty("--b-chart-value",`${b}%`),a.style.setProperty("--b-chart-index",String(l%5+1)),a.style.setProperty("--b-chart-color",`var(--b-chart-${l%5+1})`),a.setAttribute("role",a.getAttribute("role")||"listitem"),a.setAttribute("aria-label",a.getAttribute("aria-label")||`${d} ${u}`),Kp(a,d,u)}),[...t.querySelectorAll("[b-chart-series], [b-chart-legend] > *")].forEach((a,l)=>{a.style.setProperty("--b-chart-color",a.style.getPropertyValue("--b-chart-color")||`var(--b-chart-${l%5+1})`)}),{destroy:()=>{s?.destroy?.(),t.classList.remove("b-chart")}}}h.register("chart",{type:"static",mount:Vp});C();function Ri(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")}}}h.register("checkbox",{type:"static",mount:t=>Ri(t,"checkbox")});C();lt();ui();function Gp(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 Zp(t){t.classList.remove(...Fi),t.className=`${t.className} ${li({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";D(e,s,{label:""});let r=null,a=async()=>{if(t.disabled)return;let l=Gp(t);try{await Ir(l),D(e,o,{label:""}),t.setAttribute("data-copied","true"),t.dispatchEvent(new CustomEvent("baseui:clipboard-copy",{bubbles:!0,detail:{value:l}})),window.clearTimeout(r),r=window.setTimeout(()=>{D(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",a),{destroy:()=>{t.removeEventListener("click",a),window.clearTimeout(r),e.remove(),t.classList.remove(...Fi),t.removeAttribute("data-copied")}}}h.register("clipboard-button",{type:"static",mount:Zp});C();function Jp(t){let e=t.querySelector("[b-collapsible-trigger]"),s=t.querySelector("[b-collapsible-panel]"),o=b=>{t.setAttribute("b-att-state",b?"open":"closed"),e?.setAttribute("aria-expanded",String(b)),t.dispatchEvent(new CustomEvent("baseui:change",{bubbles:!0,detail:{open:b}}))};if(!s){let b=()=>o(t.getAttribute("b-att-state")!=="open");return e?.setAttribute("aria-expanded",String(t.getAttribute("b-att-state")==="open")),e?.addEventListener("click",b),{destroy:()=>e?.removeEventListener("click",b)}}let r=t.getAttribute("b-att-state")==="open";s.classList.add("collapse"),r&&s.classList.add("show");let a=new(N()).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(r));let d=()=>{s.classList.contains("show")?a.hide():a.show()};return e?.addEventListener("click",d),{destroy:()=>{e?.removeEventListener("click",d),s.removeEventListener("shown.bs.collapse",l),s.removeEventListener("hidden.bs.collapse",u),a.dispose()}}}h.register("collapsible",{type:"owl",mount:Jp});C();function Yp(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 r=u=>{s&&(s.hidden=!u),e?.setAttribute("aria-expanded",String(u))},a=()=>{let u=e.value.toLowerCase();o().forEach(d=>{d.hidden=!d.textContent.toLowerCase().includes(u)}),r(!0)},l=u=>{let d=u.target.closest("[b-att-value]");d&&(e.value=d.textContent.trim(),t.setAttribute("b-att-value",d.getAttribute("b-att-value")),r(!1),t.dispatchEvent(new CustomEvent("baseui:change",{bubbles:!0,detail:{value:d.getAttribute("b-att-value")}})))};return e?.addEventListener("input",a),e?.addEventListener("focus",()=>r(!0)),s?.addEventListener("click",l),{destroy:()=>{e?.removeEventListener("input",a),s?.removeEventListener("click",l)}}}h.register("combobox",{type:"owl",mount:Yp});C();function Xp(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 a=(e?.value||"").toLowerCase();s().forEach(l=>{l.hidden=!l.textContent.toLowerCase().includes(a)})},r=a=>{let l=a.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",r),{destroy:()=>{e?.removeEventListener("input",o),t.removeEventListener("click",r)}}}h.register("command",{type:"owl",mount:Xp});C();function Qp(t){let e=t.querySelector("[b-context-menu-content]");if(!e)return{};e.hidden=!0,e.setAttribute("role","menu");let s=a=>{a.preventDefault(),e.hidden=!1,e.style.left=`${a.clientX}px`,e.style.top=`${a.clientY}px`,t.dispatchEvent(new CustomEvent("baseui:open",{bubbles:!0}))},o=()=>{e.hidden=!0,t.dispatchEvent(new CustomEvent("baseui:close",{bubbles:!0}))},r=a=>{a.key==="Escape"&&o()};return t.addEventListener("contextmenu",s),document.addEventListener("click",o),t.addEventListener("keydown",r),{destroy:()=>{t.removeEventListener("contextmenu",s),document.removeEventListener("click",o),t.removeEventListener("keydown",r)}}}h.register("context-menu",{type:"owl",mount:Qp});C();lt();var cc=[["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 td(t){t.querySelector("table")||(t.innerHTML=`
|
|
58
|
+
<div class="b-data-table__toolbar">
|
|
59
|
+
<input b-table-search type="search" class="form-control b-data-table__search" placeholder="Filter emails...">
|
|
60
|
+
<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>
|
|
61
61
|
</div>
|
|
62
|
-
<div class="
|
|
63
|
-
<table class="table
|
|
64
|
-
<thead><tr><th class="
|
|
65
|
-
<tbody>${
|
|
62
|
+
<div class="b-data-table__viewport">
|
|
63
|
+
<table class="table b-data-table__table">
|
|
64
|
+
<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>
|
|
65
|
+
<tbody>${cc.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>
|
|
66
66
|
</table>
|
|
67
67
|
</div>
|
|
68
|
-
<div class="
|
|
69
|
-
${
|
|
70
|
-
<div class="
|
|
71
|
-
<div class="
|
|
72
|
-
<div class="
|
|
73
|
-
<div class="
|
|
68
|
+
<div class="b-data-table__cards">
|
|
69
|
+
${cc.map(e=>`<div class="b-data-table__card" data-row-key="${e[0]}">
|
|
70
|
+
<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>
|
|
71
|
+
<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>
|
|
72
|
+
<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>
|
|
73
|
+
<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>
|
|
74
74
|
</div>`).join("")}
|
|
75
75
|
</div>
|
|
76
|
-
<div class="
|
|
77
|
-
`)}function Ku(e){Vu(e),e.querySelectorAll("[b-icon]").forEach(k=>j(k,k.getAttribute("b-icon"),{label:""}));let o=e.querySelector("table")||e,r=e.querySelector("[b-table-search]"),s=e.querySelector(".bu-data-table__selection-summary"),n=e.getAttribute("b-att-variant");e.classList.add("bu-data-table"),n&&e.classList.add(`bu-data-table-${n}`),o.classList.add("table");let c=e.querySelector(".bu-data-table__cards"),p=()=>[...o.querySelectorAll("tbody tr")],u=k=>c?.querySelector(`[data-row-key="${k.dataset.rowKey}"]`),h=()=>[...o.querySelectorAll("tbody input[type='checkbox']")],m=()=>{s&&(s.textContent=`${h().filter(k=>k.checked).length} of ${p().filter(k=>!k.hidden).length} row(s) selected.`)},g=()=>{let k=(r?.value||"").toLowerCase();p().forEach(T=>{let O=!(T.cells[2]||T.cells[1]||T.cells[0]).textContent.toLowerCase().includes(k);T.hidden=O;let V=u(T);V&&(V.hidden=O)}),m()},x=(k,T)=>{let D=o.tBodies[0];p().sort((O,V)=>O.cells[k].textContent.localeCompare(V.cells[k].textContent)*T).forEach(O=>{D.append(O);let V=u(O);V&&c.append(V)})},y=k=>{let T=k.target.closest("th");if(!T)return;let D=T.getAttribute("b-att-sort")==="asc"?-1:1;o.querySelectorAll("th").forEach(O=>O.removeAttribute("b-att-sort")),T.setAttribute("b-att-sort",D===1?"asc":"desc"),x([...T.parentElement.children].indexOf(T),D)},E=(k,T)=>{let O=u(k)?.querySelector("input[type='checkbox']");O&&O.checked!==T&&(O.checked=T)},I=k=>{let T=k.target;if(T?.matches("input[type='checkbox']")){let D=T.closest("tr"),O=T.closest(".bu-data-table__card");if(D)E(D,T.checked);else if(O){let ot=p().find(en=>en.dataset.rowKey===O.dataset.rowKey)?.querySelector("input[type='checkbox']");ot&&ot.checked!==T.checked&&(ot.checked=T.checked)}}m()};return r?.addEventListener("input",g),o.tHead?.addEventListener("click",y),o.addEventListener("change",I),c?.addEventListener("change",I),m(),{destroy:()=>{r?.removeEventListener("input",g),o.tHead?.removeEventListener("click",y),o.removeEventListener("change",I),c?.removeEventListener("change",I)}}}b.register("data-table",{type:"owl",mount:Ku});A();function Gu(e){let o=e.matches("input")?e:e.querySelector("input[type='date'], input");e.classList.add("bu-date-picker"),o?.classList.add("form-control"),o?.setAttribute("type",o.getAttribute("type")||"date");let r=()=>{e.setAttribute("b-att-value",o.value),e.dispatchEvent(new CustomEvent("baseui:change",{bubbles:!0,detail:{value:o.value}}))};return o?.addEventListener("input",r),{destroy:()=>o?.removeEventListener("input",r)}}b.register("date-picker",{type:"owl",mount:Gu});A();function Xu(e){let o=e.querySelector("[b-dialog-panel]");if(e.classList.add("modal","fade","bu-dialog-backdrop"),e.setAttribute("tabindex","-1"),e.setAttribute("aria-hidden","true"),o){let n=document.createElement("div");n.className="modal-dialog modal-dialog-centered",o.replaceWith(n),n.append(o),o.classList.add("modal-content")}[...e.querySelectorAll("[b-dialog-close]")].forEach(n=>n.setAttribute("data-bs-dismiss","modal"));let s=B().Modal.getOrCreateInstance(e,{backdrop:!0,keyboard:!0,focus:!0});return Ns(e,s,"modal","BaseUIDialog")}b.register("dialog",{type:"owl",mount:Xu});A();function Zu(e){let o=e.getAttribute("b-att-dir")||e.getAttribute("dir")||"ltr";return e.setAttribute("dir",o==="rtl"?"rtl":"ltr"),{}}b.register("direction",{type:"static",mount:Zu});A();function Ju(e){e.classList.add("offcanvas","offcanvas-bottom","bu-drawer-overlay"),e.setAttribute("tabindex","-1"),[...e.querySelectorAll("[b-drawer-close]")].forEach(s=>s.setAttribute("data-bs-dismiss","offcanvas"));let r=B().Offcanvas.getOrCreateInstance(e,{backdrop:!0,keyboard:!0,scroll:!1});return Ns(e,r,"offcanvas","BaseUIDrawer")}b.register("drawer",{type:"owl",mount:Ju});A();lt();var ac="a, button, [role='menuitem'], [role='menuitemcheckbox'], [role='menuitemradio']";function nc(e,o){e?.classList.add(o)}function Qu(e,o){if(!o||e.querySelector("[b-dropdown-indicator], [data-slot$='indicator']"))return;let r=document.createElement("span");r.setAttribute("b-dropdown-indicator",""),r.append(j(document.createElement("span"),"check")),e.prepend(r)}function Yu(e){e.setAttribute("data-slot",e.getAttribute("data-slot")||"dropdown-menu-content"),e.querySelectorAll("[b-dropdown-group]").forEach(o=>{o.setAttribute("data-slot","dropdown-menu-group"),o.setAttribute("role",o.getAttribute("role")||"group")}),e.querySelectorAll("[b-dropdown-label]").forEach(o=>{o.setAttribute("data-slot","dropdown-menu-label")}),e.querySelectorAll("[b-dropdown-separator]").forEach(o=>{o.setAttribute("data-slot","dropdown-menu-separator"),o.setAttribute("role",o.getAttribute("role")||"separator")}),e.querySelectorAll("[b-dropdown-shortcut]").forEach(o=>{o.setAttribute("data-slot","dropdown-menu-shortcut")}),e.querySelectorAll("[b-dropdown-checkbox-item], [b-dropdown-radio-item]").forEach(o=>{let r=o.hasAttribute("b-dropdown-radio-item");o.setAttribute("role",r?"menuitemradio":"menuitemcheckbox"),o.setAttribute("data-slot",r?"dropdown-menu-radio-item":"dropdown-menu-checkbox-item"),o.setAttribute("aria-checked",o.hasAttribute("checked")||o.getAttribute("aria-checked")==="true"?"true":"false"),Qu(o,o.getAttribute("aria-checked")==="true")}),e.querySelectorAll(ac).forEach(o=>{o.setAttribute("role",o.getAttribute("role")||"menuitem"),o.setAttribute("tabindex",o.getAttribute("tabindex")||"0"),o.setAttribute("data-slot",o.getAttribute("data-slot")||"dropdown-menu-item")})}function td(e){let o=[];return e.querySelectorAll("[b-dropdown-sub]").forEach(r=>{let s=r.querySelector("[b-dropdown-sub-trigger]"),n=r.querySelector("[b-dropdown-sub-content]");if(!s||!n)return;if(nc(s,"bu-dropdown-menu-sub-trigger"),nc(n,"bu-dropdown-menu-sub-content"),s.setAttribute("data-slot","dropdown-menu-sub-trigger"),s.setAttribute("role","menuitem"),s.setAttribute("aria-haspopup","menu"),n.setAttribute("data-slot","dropdown-menu-sub-content"),n.setAttribute("role","menu"),n.hidden=!0,!s.querySelector(".bu-dropdown-menu-sub-trigger-icon")){let m=j(document.createElement("span"),"chevron-right");m.classList.add("bu-dropdown-menu-sub-trigger-icon"),s.append(m)}let c=m=>{n.hidden=!m,s.setAttribute("data-state",m?"open":"closed"),s.setAttribute("aria-expanded",String(m))},p=()=>c(!0),u=()=>c(!1),h=m=>{m.preventDefault(),c(n.hidden)};r.addEventListener("mouseenter",p),r.addEventListener("mouseleave",u),s.addEventListener("focus",p),s.addEventListener("click",h),o.push(()=>{r.removeEventListener("mouseenter",p),r.removeEventListener("mouseleave",u),s.removeEventListener("focus",p),s.removeEventListener("click",h)})}),()=>o.forEach(r=>r())}function ed(e){let o=e.querySelector("[b-dropdown-trigger]"),r=e.querySelector("[b-dropdown-menu]");if(!o||!r)return{destroy:()=>{}};e.classList.add("dropdown"),r.classList.add("dropdown-menu"),o.setAttribute("aria-haspopup","menu"),r.setAttribute("role","menu");let s=B().Dropdown.getOrCreateInstance(o),n=y=>{e.setAttribute("b-att-state",y?"open":"closed"),o.setAttribute("aria-expanded",String(y)),e.dispatchEvent(new CustomEvent(y?"baseui:open":"baseui:close",{bubbles:!0}))},c=()=>n(!0),p=()=>n(!1);o.addEventListener("shown.bs.dropdown",c),o.addEventListener("hidden.bs.dropdown",p);let u=()=>s.toggle();o.addEventListener("click",u);let h=y=>{y.key==="Escape"?(s.hide(),o.focus()):y.key==="ArrowDown"&&!r.classList.contains("show")&&(y.preventDefault(),s.show(),[...r.querySelectorAll("a, button, [tabindex]:not([tabindex='-1'])")][0]?.focus())};e.addEventListener("keydown",h);let m=y=>{e.contains(y.target)||s.hide()};document.addEventListener("click",m),Yu(r);let g=td(r),x=y=>{let E=y.target.closest(ac);!E||E.closest("[b-dropdown-sub]")||s.hide()};return r.addEventListener("click",x),{destroy:()=>{g(),r.removeEventListener("click",x),document.removeEventListener("click",m),e.removeEventListener("keydown",h),o.removeEventListener("click",u),o.removeEventListener("shown.bs.dropdown",c),o.removeEventListener("hidden.bs.dropdown",p),s.dispose()}}}b.register("dropdown-menu",{type:"owl",mount:ed});A();var wa={default:"bu-empty-default",outline:"bu-empty-outline",background:"bu-empty-background"};function od(e){let o=e.getAttribute("b-att-variant")||"default",r=[...e.querySelectorAll("[b-empty-media]")];return e.setAttribute("role",e.getAttribute("role")||"status"),e.classList.add("bu-empty",wa[o]||wa.default),e.querySelectorAll("[b-empty-header]").forEach(s=>s.classList.add("bu-empty-header")),e.querySelectorAll("[b-empty-title]").forEach(s=>s.classList.add("bu-empty-title")),e.querySelectorAll("[b-empty-description]").forEach(s=>s.classList.add("bu-empty-description")),e.querySelectorAll("[b-empty-content]").forEach(s=>s.classList.add("bu-empty-content")),r.forEach(s=>{let n=s.getAttribute("b-att-variant")==="icon"?"icon":"default";s.classList.add("bu-empty-media",`bu-empty-media-${n}`),s.setAttribute("data-variant",n)}),{destroy:()=>{e.classList.remove("bu-empty",...Object.values(wa))}}}b.register("empty",{type:"owl",mount:od});A();function Un(e,o){e?.classList.add(...o.filter(Boolean))}function eo(e,o,r,s){e.querySelectorAll(o).forEach(n=>{n.setAttribute("data-slot",r),Un(n,[s])})}function rd(e){return e.querySelector("input, textarea, select, [role='checkbox'], [role='radio'], [role='switch']")}function sd(e,o){return o.id?o.id:`${e?.id||"bu-field"}-error`}function nd(e){let o=e.getAttribute("b-att-slot")||e.getAttribute("data-slot")||"field",r=[];if(o==="field-set")e.setAttribute("data-slot","field-set"),Un(e,["bu-field-set"]),r.push("bu-field-set");else if(o==="field-group")e.setAttribute("data-slot","field-group"),Un(e,["bu-field-group"]),r.push("bu-field-group");else{let c=e.getAttribute("b-att-orientation")||e.getAttribute("data-orientation")||"vertical";e.setAttribute("role",e.getAttribute("role")||"group"),e.setAttribute("data-slot","field"),e.setAttribute("data-orientation",c),Un(e,["bu-field",`bu-field-orientation-${c}`]),r.push("bu-field",`bu-field-orientation-${c}`)}eo(e,"legend[b-field-legend], [b-field-legend]","field-legend","bu-field-legend"),eo(e,"[b-field-group]","field-group","bu-field-group"),eo(e,"[b-field-content]","field-content","bu-field-content"),eo(e,"label[b-field-label], [b-field-label], [b-label]","field-label","bu-field-label"),eo(e,"[b-field-title]","field-label","bu-field-title"),eo(e,"[b-field-description]","field-description","bu-field-description"),eo(e,"[b-field-separator]","field-separator","bu-field-separator"),eo(e,"[b-field-error], [b-error]","field-error","bu-field-error"),e.querySelectorAll("[b-field-separator]").forEach(c=>{if(!c.querySelector(".bu-field-separator-line")){let p=document.createElement("span");p.className="bu-field-separator-line",p.setAttribute("aria-hidden","true"),c.prepend(p)}c.textContent.trim()&&c.setAttribute("data-content","true")});let s=rd(e),n=e.querySelector("[b-field-error], [b-error], [data-slot='field-error']");if(s&&n){n.setAttribute("role",n.getAttribute("role")||"alert");let c=sd(s,n);n.id=c,s.setAttribute("aria-describedby",c),s.setAttribute("aria-invalid","true"),e.setAttribute("data-invalid","true")}return{destroy:()=>e.classList.remove(...r)}}b.register("field",{type:"static",mount:nd});A();function ad(e){e.classList.add("bu-form"),e.setAttribute("data-slot","form"),e.setAttribute("novalidate","");let o=e.querySelector("[name='title']"),r=e.querySelector("[name='description']"),s=e.querySelector("[b-form-counter], .bu-form-counter-text"),n=Number(r?.getAttribute("maxlength")||100),c=()=>{s&&r&&(s.textContent=`${r.value.length}/${n} characters`)},p=()=>{o&&(o.value=""),r&&(r.value=""),c()},u=e.querySelector("[b-form-reset]");return u?.addEventListener("click",p),r?.addEventListener("input",c),c(),{destroy(){u?.removeEventListener("click",p),r?.removeEventListener("input",c)}}}b.register("form",{type:"static",mount:ad});A();function id(e){let o=e.querySelector("[b-hover-card-trigger]"),r=e.querySelector("[b-hover-card-content]");if(!o||!r)return{};let s=()=>{r.hidden=!1,o.setAttribute("aria-expanded","true")},n=()=>{r.hidden=!0,o.setAttribute("aria-expanded","false")},c=p=>{p.key==="Escape"&&n()};return o.setAttribute("aria-haspopup","dialog"),r.setAttribute("role","dialog"),n(),e.addEventListener("mouseenter",s),e.addEventListener("mouseleave",n),e.addEventListener("focusin",s),e.addEventListener("focusout",n),e.addEventListener("keydown",c),{destroy:()=>{e.removeEventListener("mouseenter",s),e.removeEventListener("mouseleave",n),e.removeEventListener("focusin",s),e.removeEventListener("focusout",n),e.removeEventListener("keydown",c)}}}b.register("hover-card",{type:"owl",mount:id});A();lt();function cd(e){let o=e.getAttribute("b-icon")||e.getAttribute("b-att-icon")||e.getAttribute("aria-label");return o?(j(e,o,{baseUrl:e.getAttribute("b-icon-base-url")||e.getAttribute("b-att-base-url"),label:e.getAttribute("b-att-label")??e.getAttribute("aria-label")??"",size:e.getAttribute("b-icon-size")||e.getAttribute("b-att-size")}),{destroy:()=>{e.classList.remove("bu-icon"),e.style.removeProperty("--b-icon-url"),e.style.removeProperty("--b-icon-size"),!e.getAttribute("b-att-label")&&!e.getAttribute("aria-label")&&e.removeAttribute("aria-hidden")}}):{}}b.register("icon",{type:"static",mount:cd});A();function ld(e){let o=mn({tag:e.tagName.toLowerCase(),type:e.getAttribute("type")});return e.classList.add(o),{destroy:()=>e.classList.remove(o)}}b.register("input",{type:"static",mount:ld});A();function pd(e){let o=[...e.querySelectorAll("input")];e.classList.add("bu-input-otp"),o.forEach(c=>{c.classList.add("form-control"),c.inputMode=c.inputMode||"numeric",c.maxLength=c.maxLength>0?c.maxLength:1});let r=()=>{let c=o.map(p=>p.value).join("");e.setAttribute("b-att-value",c),e.dispatchEvent(new CustomEvent("baseui:change",{bubbles:!0,detail:{value:c}}))},s=c=>{let p=o.indexOf(c.target);c.target.value&&o[p+1]&&o[p+1].focus(),r()},n=c=>{let p=c.clipboardData.getData("text").trim();p&&(c.preventDefault(),o.forEach((u,h)=>{u.value=p[h]||""}),r())};return o.forEach(c=>c.addEventListener("input",s)),e.addEventListener("paste",n),{destroy:()=>{o.forEach(c=>c.removeEventListener("input",s)),e.removeEventListener("paste",n)}}}b.register("input-otp",{type:"owl",mount:pd});A();function ud(e){return e.classList.add("bu-item"),{destroy:()=>e.classList.remove("bu-item")}}b.register("item",{type:"static",mount:ud});A();function dd(e){return e.classList.add("bu-kbd"),{destroy:()=>e.classList.remove("bu-kbd")}}b.register("kbd",{type:"static",mount:dd});A();function hd(e){return e.classList.add("form-label","b-label","bu-label"),e.getAttribute("b-att-required")==="true"&&e.setAttribute("b-att-state","required"),{destroy:()=>e.classList.remove("form-label","b-label","bu-label")}}b.register("label",{type:"static",mount:hd});A();function bd(e){return e.classList.add("bu-marker"),{destroy:()=>e.classList.remove("bu-marker")}}b.register("marker",{type:"static",mount:bd});A();Cn();function md(e){let o=e.querySelector("script[type='text/markdown'], template");return o?o.tagName==="TEMPLATE"?o.content.textContent:o.textContent:e.getAttribute("b-att-content")||e.textContent||""}function fd(e){return String(e||"").split(",").map(o=>o.trim()).filter(Boolean)}function gd(e){e.classList.add("bu-markdown");let o=e.getAttribute("b-att-src"),r=e.getAttribute("b-att-mermaid")!=="false",s=e.getAttribute("b-att-base-ui")!=="false",n=e.getAttribute("b-att-editable")==="true",c=e.getAttribute("b-att-collaborative")==="true",p=e.getAttribute("b-att-room")||"bu-markdown",u=e.getAttribute("b-att-password")||void 0,h=fd(e.getAttribute("b-att-signaling")),m=!1,g=null;function x(E){m||(e.setAttribute("data-status","error"),e.textContent=`Unable to render Markdown: ${E?.message||E}`,e.dispatchEvent(new CustomEvent("baseui:markdown-error",{bubbles:!0,detail:{error:E}})))}async function y(){let E=md(e);e.setAttribute("data-status","loading");let I=E;if(o)try{let O=await fetch(o);if(!O.ok)throw new Error(`${O.status} ${O.statusText}`);I=await O.text()}catch(O){x(O);return}if(n){e.replaceChildren(),e.classList.add("bu-markdown-editable"),e.setAttribute("data-status","ready");let O=document.createElement("div");O.className="bu-markdown-editor",O.setAttribute("data-slot","markdown-editor"),O.setAttribute("role","group"),O.setAttribute("aria-label",c?"Collaborative Markdown editor":"Markdown editor"),e.append(O);try{if(g=await Js({root:O,value:I,collaborative:c,room:p,password:u,signaling:h,onChange:(V,ot)=>{e.dispatchEvent(new CustomEvent("baseui:markdown-change",{bubbles:!0,detail:{markdown:V,previousMarkdown:ot}}))}}),m){g?.destroy?.(),g=null;return}}catch(V){x(V);return}e.dispatchEvent(new CustomEvent("baseui:markdown-editor-ready",{bubbles:!0,detail:{collaborative:c,room:p}}));return}let{data:k,content:T}=kn(I),D;try{D=await Xs(T)}catch(O){x(O);return}m||(e.innerHTML=D,e.setAttribute("data-status","ready"),await Zs(e,{mermaid:r,baseUi:s}),m||e.dispatchEvent(new CustomEvent("baseui:markdown-render",{bubbles:!0,detail:{html:D,frontmatter:k}})))}return y(),{destroy:()=>{m=!0,g?.destroy?.(),g=null,Ds(e),e.classList.remove("bu-markdown"),e.classList.remove("bu-markdown-editable"),e.removeAttribute("data-status")}}}b.register("markdown",{type:"static",mount:gd});A();function xd(e){return e.classList.add("bu-message"),e.setAttribute("b-att-side",e.getAttribute("b-att-side")||"incoming"),e.setAttribute("role",e.getAttribute("role")||"listitem"),{}}b.register("message",{type:"static",mount:xd});A();function Id(e){e.classList.add("bu-message-scroller");let o=()=>{e.getAttribute("b-att-autoscroll")!=="false"&&(e.scrollTop=e.scrollHeight)},r=new window.MutationObserver(o);return r.observe(e,{childList:!0,subtree:!0}),window.requestAnimationFrame(o),{destroy:()=>r.disconnect()}}b.register("message-scroller",{type:"owl",mount:Id});A();function yd(e){e.setAttribute("role","menubar"),e.classList.add("bu-menubar");for(let o of e.querySelectorAll("a, button"))o.setAttribute("role","menuitem");return{destroy:()=>e.classList.remove("bu-menubar")}}b.register("menubar",{type:"static",mount:yd});A();function vd(e){return e.classList.add("form-select"),(e.getAttribute("b-att-size")==="sm"||e.getAttribute("b-att-size")==="lg")&&e.classList.add(`form-select-${e.getAttribute("b-att-size")}`),{destroy:()=>e.classList.remove("form-select","form-select-sm","form-select-lg")}}b.register("native-select",{type:"static",mount:vd});A();function wd(e){let o=[...e.querySelectorAll("a, button")].filter(s=>!s.disabled),r=s=>{let n=o.indexOf(s.target),c=s.key==="ArrowRight"?1:s.key==="ArrowLeft"?-1:0;!c||n<0||(s.preventDefault(),o[(n+c+o.length)%o.length]?.focus())};return e.setAttribute("role",e.getAttribute("role")||"menubar"),o.forEach(s=>s.setAttribute("role","menuitem")),e.addEventListener("keydown",r),{destroy:()=>e.removeEventListener("keydown",r)}}b.register("navigation-menu",{type:"owl",mount:wd});A();function Sd(e){let o=e.querySelector("ol, ul")||e,r=[...o.children];return e.classList.add("bu-pagination"),o.classList.add("pagination"),r.forEach(s=>{let n=s.querySelector("a, button");s.classList.add("page-item"),n?.classList.add("page-link"),n?.getAttribute("aria-current")==="page"&&s.classList.add("active"),(n?.hasAttribute("disabled")||n?.getAttribute("aria-disabled")==="true")&&s.classList.add("disabled")}),e.setAttribute("aria-label",e.getAttribute("aria-label")||"Pagination"),{destroy:()=>{e.classList.remove("bu-pagination"),o.classList.remove("pagination")}}}b.register("pagination",{type:"owl",mount:Sd});A();function Cd(e){let o=e.querySelector("[b-popover-trigger]")||e,r=e.querySelector("[b-popover-content]"),s=r?r.innerHTML:"";r?.remove(),o.setAttribute("aria-haspopup","dialog");let n=new(B()).Popover(o,{content:s,html:!0,trigger:"click"}),c=()=>{e.setAttribute("b-att-state","open"),o.setAttribute("aria-expanded","true"),e.dispatchEvent(new CustomEvent("baseui:open",{bubbles:!0}))},p=()=>{e.setAttribute("b-att-state","closed"),o.setAttribute("aria-expanded","false"),e.dispatchEvent(new CustomEvent("baseui:close",{bubbles:!0}))};return o.addEventListener("shown.bs.popover",c),o.addEventListener("hidden.bs.popover",p),e.setAttribute("b-att-state","closed"),o.setAttribute("aria-expanded","false"),{destroy:()=>{o.removeEventListener("shown.bs.popover",c),o.removeEventListener("hidden.bs.popover",p),n.dispose()}}}b.register("popover",{type:"owl",mount:Cd});A();function kd(e){let o=Number(e.getAttribute("b-att-max")||e.getAttribute("aria-valuemax")||100),r=Math.min(o,Math.max(0,Number(e.getAttribute("b-att-value")||e.getAttribute("aria-valuenow")||0)));if(e.classList.add("bu-progress"),e.setAttribute("role","progressbar"),e.setAttribute("aria-valuemin","0"),e.setAttribute("aria-valuemax",String(o)),e.setAttribute("aria-valuenow",String(r)),e.style.setProperty("--b-progress-value",`${r/o*100}%`),!e.querySelector("[b-progress-indicator]")){let s=document.createElement("span");s.setAttribute("b-progress-indicator",""),e.append(s)}return{destroy:()=>e.classList.remove("bu-progress")}}b.register("progress",{type:"static",mount:kd});A();function Ad(e){let{open:o,close:r,destroy:s}=xn(e,{closeSelector:"[b-pwa-close]"});return e.BaseUIPwa={open:o,close:r},{destroy:()=>{s(),delete e.BaseUIPwa}}}b.register("pwa",{type:"owl",mount:Ad});A();function Ld(e){let o=[...e.querySelectorAll("[b-question]")],r=e.querySelector("[b-question-prev]"),s=e.querySelector("[b-question-next]"),n=0,c=h=>{n=Math.min(o.length-1,Math.max(0,h)),o.forEach((m,g)=>{m.hidden=g!==n,m.setAttribute("b-att-state",g===n?"active":"inactive")}),r&&(r.disabled=n===0),s&&(s.disabled=n===o.length-1),e.dispatchEvent(new CustomEvent("baseui:change",{bubbles:!0,detail:{index:n}}))},p=()=>c(n-1),u=()=>c(n+1);return r?.addEventListener("click",p),s?.addEventListener("click",u),o.length&&c(0),{destroy:()=>{r?.removeEventListener("click",p),s?.removeEventListener("click",u)}}}b.register("questionnaire",{type:"owl",mount:Ld});A();b.register("radio-group",{type:"static",mount:e=>Mn(e,"radio")});A();function Ed(e){let o=e.querySelector("[b-resizable-panel]")||e,r=e.querySelector("[b-resizable-handle]");if(!r)return{};let s=Number(e.getAttribute("b-att-min")||160),n=Number(e.getAttribute("b-att-max")||720),c=p=>{let u=p.clientX,h=o.getBoundingClientRect().width,m=x=>{o.style.width=`${Math.min(n,Math.max(s,h+x.clientX-u))}px`},g=()=>{document.removeEventListener("pointermove",m),document.removeEventListener("pointerup",g),e.dispatchEvent(new CustomEvent("baseui:change",{bubbles:!0,detail:{width:o.style.width}}))};document.addEventListener("pointermove",m),document.addEventListener("pointerup",g)};return r.addEventListener("pointerdown",c),{destroy:()=>r.removeEventListener("pointerdown",c)}}b.register("resizable",{type:"owl",mount:Ed});A();function Bd(e){return e.classList.add("bu-scroll-area"),e.tabIndex=e.tabIndex>=0?e.tabIndex:0,e.setAttribute("role",e.getAttribute("role")||"region"),{}}b.register("scroll-area",{type:"static",mount:Bd});A();function Td(e){let o=e.getAttribute("b-att-orientation")==="vertical";return e.classList.add("bu-separator",o?"bu-separator-vertical":"bu-separator-horizontal"),e.setAttribute("role",e.getAttribute("role")||"separator"),e.setAttribute("aria-orientation",o?"vertical":"horizontal"),{destroy:()=>e.classList.remove("bu-separator","bu-separator-vertical","bu-separator-horizontal")}}b.register("separator",{type:"static",mount:Td});A();function ic(e,{triggerSelector:o,panelSelector:r,ariaHaspopup:s,panelRole:n,onKeyDown:c}={}){let p=e.querySelector(o),u=e.querySelector(r),h=y=>{!u||!p||(u.hidden=!y,e.setAttribute("b-att-state",y?"open":"closed"),p.setAttribute("aria-expanded",String(y)),e.dispatchEvent(new CustomEvent(y?"baseui:open":"baseui:close",{bubbles:!0})))},m=()=>h(u?.hidden!==!1),g=y=>{y.key==="Escape"&&(h(!1),p?.focus()),c?.(y,{setOpen:h,panel:u,trigger:p})},x=y=>{e.contains(y.target)||h(!1)};return p?.setAttribute("aria-haspopup",s),u?.setAttribute("role",n),u&&(u.hidden=!0),p?.addEventListener("click",m),e.addEventListener("keydown",g),document.addEventListener("click",x),{trigger:p,panel:u,setOpen:h,destroy:()=>{p?.removeEventListener("click",m),e.removeEventListener("keydown",g),document.removeEventListener("click",x)}}}function qd(e){let{setOpen:o,destroy:r}=ic(e,{triggerSelector:"[b-select-trigger]",panelSelector:"[b-select-content]",ariaHaspopup:"listbox",panelRole:"listbox"}),s=e.querySelector("[b-select-trigger]"),n=e.querySelector("[b-select-value]"),c=p=>{let u=p.target.closest("[b-select-item]");if(!(!u||!e.contains(u))){for(let h of e.querySelectorAll("[b-select-item]"))h.setAttribute("aria-selected",String(h===u));n&&(n.textContent=u.textContent.trim()),e.setAttribute("b-att-value",u.getAttribute("b-att-value")||u.textContent.trim()),e.dispatchEvent(new CustomEvent("baseui:change",{bubbles:!0,detail:{value:e.getAttribute("b-att-value")}})),o(!1),s?.focus()}};for(let p of e.querySelectorAll("[b-select-item]"))p.setAttribute("role","option");return e.addEventListener("click",c),{destroy:()=>{e.removeEventListener("click",c),r()}}}b.register("select",{type:"owl",mount:qd});A();function Od(e){let o=[...e.querySelectorAll("[b-shell-collapse-trigger]")],r=n=>{e.setAttribute("b-att-collapsed",n?"true":"false"),e.dispatchEvent(new CustomEvent(n?"baseui:collapse":"baseui:expand",{bubbles:!0}))},s=()=>r(e.getAttribute("b-att-collapsed")!=="true");return o.forEach(n=>n.addEventListener("click",s)),r(e.getAttribute("b-att-collapsed")==="true"),e.BaseUIShell={collapse:()=>r(!0),expand:()=>r(!1),toggle:s},{destroy:()=>{o.forEach(n=>n.removeEventListener("click",s)),delete e.BaseUIShell}}}b.register("shell",{type:"owl",mount:Od});A();function Rd(e){let o=e.getAttribute("b-att-side")==="left"?"offcanvas-start":"offcanvas-end";e.classList.add("offcanvas",o,"bu-sheet-overlay"),e.setAttribute("tabindex","-1"),[...e.querySelectorAll("[b-sheet-close]")].forEach(n=>n.setAttribute("data-bs-dismiss","offcanvas"));let s=B().Offcanvas.getOrCreateInstance(e,{backdrop:!0,keyboard:!0,scroll:!1});return Ns(e,s,"offcanvas","BaseUISheet")}b.register("sheet",{type:"owl",mount:Rd});A();var Pd={"[b-sidebar-header]":["bu-sidebar-header","sidebar-header","header"],"[b-sidebar-content]":["bu-sidebar-content","sidebar-content","content"],"[b-sidebar-footer]":["bu-sidebar-footer","sidebar-footer","footer"],"[b-sidebar-group]":["bu-sidebar-group","sidebar-group","group"],"[b-sidebar-group-label]":["bu-sidebar-group-label","sidebar-group-label","group-label"],"[b-sidebar-group-action]":["bu-sidebar-group-action","sidebar-group-action","group-action"],"[b-sidebar-group-content]":["bu-sidebar-group-content","sidebar-group-content","group-content"],"[b-sidebar-menu]":["bu-sidebar-menu","sidebar-menu","menu"],"[b-sidebar-menu-item]":["bu-sidebar-menu-item","sidebar-menu-item","menu-item"],"[b-sidebar-menu-button]":["bu-sidebar-menu-button","sidebar-menu-button","menu-button"],"[b-sidebar-menu-action]":["bu-sidebar-menu-action","sidebar-menu-action","menu-action"],"[b-sidebar-menu-badge]":["bu-sidebar-menu-badge","sidebar-menu-badge","menu-badge"],"[b-sidebar-menu-sub]":["bu-sidebar-menu-sub","sidebar-menu-sub","menu-sub"],"[b-sidebar-menu-sub-item]":["bu-sidebar-menu-sub-item","sidebar-menu-sub-item","menu-sub-item"],"[b-sidebar-menu-sub-button]":["bu-sidebar-menu-sub-button","sidebar-menu-sub-button","menu-sub-button"],"[b-sidebar-separator]":["bu-sidebar-separator","sidebar-separator","separator"]};function Nd(e){let o=[];for(let[r,[s,n,c]]of Object.entries(Pd))for(let p of e.querySelectorAll(r))p.classList.add(s),p.dataset.slot=n,p.dataset.sidebar=c,(p.hasAttribute("b-att-active")||p.getAttribute("aria-current")==="page")&&(p.classList.add("is-active"),p.dataset.active="true"),o.push([p,s]);return o}function Md(e){let o=e.getAttribute("b-att-trigger")?document.querySelector(e.getAttribute("b-att-trigger")):null,r=[...e.querySelectorAll("[b-sidebar-close]")],s=Nd(e),n=h=>{e.setAttribute("b-att-state",h?"open":"closed"),e.classList.toggle("is-open",h),e.dataset.state=h?"expanded":"collapsed",e.dispatchEvent(new CustomEvent(h?"baseui:open":"baseui:close",{bubbles:!0}))},c=()=>n(!0),p=()=>n(!1),u=h=>{h.key==="Escape"&&p()};return o?.addEventListener("click",c),r.forEach(h=>h.addEventListener("click",p)),e.addEventListener("keydown",u),e.dataset.sidebar="sidebar",e.dataset.slot="sidebar",n(e.getAttribute("b-att-state")==="open"),e.BaseUISidebar={open:c,close:p},{destroy:()=>{o?.removeEventListener("click",c),r.forEach(h=>h.removeEventListener("click",p)),e.removeEventListener("keydown",u);for(let[h,m]of s)h.classList.remove(m,"is-active"),h.removeAttribute("data-slot"),h.removeAttribute("data-sidebar"),h.removeAttribute("data-active");e.removeAttribute("data-sidebar"),e.removeAttribute("data-slot"),e.removeAttribute("data-state"),delete e.BaseUISidebar}}}b.register("sidebar",{type:"owl",mount:Md});A();function Ud(e){e.classList.add("bu-slider");let o=()=>{e.style.setProperty("--b-slider-value",`${e.value}%`),e.dispatchEvent(new CustomEvent("baseui:change",{bubbles:!0,detail:{value:e.value}}))};return o(),e.addEventListener("input",o),{destroy:()=>{e.removeEventListener("input",o),e.classList.remove("bu-slider")}}}b.register("slider",{type:"static",mount:Ud});A();function Dd(e){let o=e.getAttribute("b-att-shape")==="circle"?"bu-skeleton-circle":"bu-skeleton-block";return e.classList.add("bu-skeleton",o),e.setAttribute("aria-hidden",e.getAttribute("aria-hidden")||"true"),{destroy:()=>e.classList.remove("bu-skeleton","bu-skeleton-circle","bu-skeleton-block")}}b.register("skeleton",{type:"static",mount:Dd});A();function Fd(e){let o=e.getAttribute("b-att-type")==="grow",r=e.getAttribute("b-att-label")||"Loading";if(e.classList.add(o?"spinner-grow":"spinner-border"),e.setAttribute("role",e.getAttribute("role")||"status"),!e.querySelector(".visually-hidden")){let s=document.createElement("span");s.className="visually-hidden",s.textContent=r,e.append(s)}return{destroy:()=>e.classList.remove("spinner-border","spinner-grow")}}b.register("spinner",{type:"static",mount:Fd});A();function $d(e){let o=e.matches("input")?e:e.querySelector("input[type='checkbox']"),r=e.matches("input")?e.closest("label, .form-check"):e;return o?.classList.add("form-check-input"),o?.setAttribute("role",o.getAttribute("role")||"switch"),r?.classList.add("form-check","form-switch","bu-switch"),{destroy:()=>{o?.classList.remove("form-check-input"),r?.classList.remove("form-check","form-switch","bu-switch")}}}b.register("switch",{type:"static",mount:$d});A();function zd(e){if(e.classList.add("table","bu-table"),e.getAttribute("b-att-striped")!=="false"&&e.classList.add("table-striped"),e.getAttribute("b-att-hover")!=="false"&&e.classList.add("table-hover"),e.getAttribute("b-att-responsive")==="true"&&!e.parentElement?.classList.contains("table-responsive")){let o=document.createElement("div");return o.className="table-responsive",e.before(o),o.append(e),{destroy:()=>{o.before(e),o.remove(),e.classList.remove("table","bu-table","table-striped","table-hover")}}}return{destroy:()=>e.classList.remove("table","bu-table","table-striped","table-hover")}}b.register("table",{type:"static",mount:zd});A();function Hd(e){e.classList.add("bu-tabs-host");let o=[...e.querySelectorAll("[b-tab]")],r=[...e.querySelectorAll("[b-panel]")],s=new Map(r.map(x=>[x.getAttribute("b-panel"),x])),n=new Map,c=new Map,p=new Map,u=new Map,h=o[0]?.parentElement;h&&!h.hasAttribute("role")&&h.setAttribute("role","tablist");let m=e.getAttribute("b-att-value")||o[0]?.getAttribute("b-tab")||"",g=x=>{e.setAttribute("b-att-value",x),o.forEach(y=>{y.tabIndex=y.getAttribute("b-tab")===x?0:-1}),e.dispatchEvent(new CustomEvent("baseui:change",{bubbles:!0,detail:{value:x}}))};return o.forEach((x,y)=>{let E=x.getAttribute("b-tab"),I=s.get(E),k=E===m;if(x.setAttribute("role","tab"),x.tabIndex=k?0:-1,k&&x.classList.add("active"),I){let ot=I.id||`bu-tabs-panel-${E}`;I.id=ot,I.setAttribute("role","tabpanel"),I.classList.add("tab-pane","fade"),k&&I.classList.add("show","active"),x.setAttribute("data-bs-target",`#${ot}`)}let T=B().Tab.getOrCreateInstance(x);n.set(x,T);let D=()=>T.show();x.addEventListener("click",D),c.set(x,D);let O=()=>g(E);x.addEventListener("shown.bs.tab",O),u.set(x,O);let V=ot=>{let en=fn(ot.key,y,o.length);if(en===-1)return;ot.preventDefault();let Sa=o[en];Sa.focus(),n.get(Sa)?.show()};x.addEventListener("keydown",V),p.set(x,V)}),m&&e.setAttribute("b-att-value",m),{destroy:()=>{o.forEach(x=>{x.removeEventListener("click",c.get(x)),x.removeEventListener("keydown",p.get(x)),x.removeEventListener("shown.bs.tab",u.get(x)),n.get(x)?.dispose()}),c.clear(),p.clear(),u.clear(),n.clear()}}}b.register("tabs",{type:"owl",mount:Hd});A();function jd(e){return e.classList.add("form-control"),e.getAttribute("b-att-resize")==="none"&&e.classList.add("bu-textarea-no-resize"),{destroy:()=>e.classList.remove("form-control","bu-textarea-no-resize")}}b.register("textarea",{type:"static",mount:jd});A();function _d(e){let o=e.querySelector("template, script[type='text/html']");return o?o.tagName==="TEMPLATE"?o.innerHTML:o.textContent:e.getAttribute("b-att-content")||e.innerHTML||""}function Wd(e){return String(e||"").split(",").map(o=>o.trim()).filter(Boolean)}function Vd(e){e.classList.add("bu-text-editor");let o=e.getAttribute("b-att-src"),r=e.getAttribute("b-att-provider")||void 0,s=e.getAttribute("b-att-room")||"bu-text-editor",n=e.getAttribute("b-att-url")||void 0,c=Pn({collaborative:e.getAttribute("b-att-collaborative")==="true",providerType:r,url:n}),p=e.getAttribute("b-att-password")||void 0,u=Wd(e.getAttribute("b-att-signaling")),h=e.getAttribute("b-att-placeholder")||void 0,m=!1,g=null;function x(E){m||(e.setAttribute("data-status","error"),e.textContent=`Unable to mount text editor: ${E?.message||E}`,e.dispatchEvent(new CustomEvent("baseui:text-editor-error",{bubbles:!0,detail:{error:E}})))}async function y(){e.setAttribute("data-status","loading");let E=_d(e);if(o)try{let k=await fetch(o);if(!k.ok)throw new Error(`${k.status} ${k.statusText}`);E=await k.text()}catch(k){x(k);return}e.replaceChildren();let I=document.createElement("div");I.className="bu-text-editor-shell",I.setAttribute("data-slot","text-editor-shell"),I.setAttribute("role","group"),I.setAttribute("aria-label",c?"Collaborative rich text editor":"Rich text editor"),e.append(I);try{if(g=await Rn({root:I,value:E,placeholder:h,collaborative:c,providerType:r,room:s,url:n,password:p,signaling:u,onChange:(k,T)=>{e.dispatchEvent(new CustomEvent("baseui:text-editor-change",{bubbles:!0,detail:{html:k,previousHtml:T}}))}}),m){g?.destroy?.(),g=null;return}}catch(k){x(k);return}e.setAttribute("data-status","ready"),e.dispatchEvent(new CustomEvent("baseui:text-editor-ready",{bubbles:!0,detail:{collaborative:c,room:s}}))}return y(),{destroy:()=>{m=!0,g?.destroy?.(),g=null,e.classList.remove("bu-text-editor"),e.removeAttribute("data-status")}}}b.register("text-editor",{type:"static",mount:Vd});lt();A();function Kd(e,o){let r=Us(o);e.classList.remove(...Ii),e.className=`${e.className} ${vn({variant:e.getAttribute("b-att-variant")||"outline",size:e.getAttribute("b-att-size")})}`.trim(),e.type=e.getAttribute("type")||"button",e.setAttribute("aria-label",r.label),e.setAttribute("title",r.label),e.setAttribute("aria-pressed",r.pressed);let s=e.querySelector("[b-theme-button-icon]");s||(s=document.createElement("span"),s.setAttribute("b-theme-button-icon",""),e.prepend(s)),s.setAttribute("b-icon",r.icon),j(s,r.icon,{baseUrl:e.getAttribute("b-icon-base-url")||e.getAttribute("b-att-base-url")});let n=e.querySelector("[b-theme-button-label]");n||(n=document.createElement("span"),n.className="visually-hidden",n.setAttribute("b-theme-button-label",""),e.append(n)),n.textContent=r.label}function Gd(e){let o=ce({storageKey:e.getAttribute("b-att-storage-key")||void 0,toggleSelector:"[b-theme-toggle]",labelSelector:"[b-theme-label]"}),r=(c=o.current())=>Kd(e,c),s=()=>r(o.toggle()),n=c=>r(c.detail?.theme);return r(o.set(o.current(),{skipStorage:!0})),e.addEventListener("click",s),document.addEventListener("baseui:theme-change",n),{destroy:()=>{e.removeEventListener("click",s),document.removeEventListener("baseui:theme-change",n)}}}b.register("theme-button",{type:"static",mount:Gd});A();v();function Xd(e){let o=[...e.querySelectorAll("[b-toast-close]")],r=e.getAttribute("b-att-delay"),s=r===null?3e3:Number(r),n=In(e.getAttribute("b-att-position"));e.className=f(e.className,"toast","fade",n),e.setAttribute("role",e.getAttribute("b-att-variant")==="danger"?"alert":"status"),o.forEach(g=>g.setAttribute("data-bs-dismiss","toast"));let c=new(B()).Toast(e,{autohide:s>0,delay:s||3e3}),p=()=>{e.setAttribute("b-att-state","open"),e.dispatchEvent(new CustomEvent("baseui:open",{bubbles:!0}))},u=()=>{e.setAttribute("b-att-state","closed"),e.dispatchEvent(new CustomEvent("baseui:close",{bubbles:!0}))};e.addEventListener("shown.bs.toast",p),e.addEventListener("hidden.bs.toast",u);let h=()=>c.show(),m=()=>c.hide();return e.getAttribute("b-att-state")==="open"&&h(),e.BaseUIToast={show:h,hide:m},{destroy:()=>{e.removeEventListener("shown.bs.toast",p),e.removeEventListener("hidden.bs.toast",u),c.dispose(),delete e.BaseUIToast}}}b.register("toast",{type:"owl",mount:Xd});A();function Zd(e){let o=e.querySelector("[b-tooltip-trigger]")||e,r=e.querySelector("[b-tooltip-content]");!r&&e.getAttribute("b-att-content")&&(r=document.createElement("span"),r.setAttribute("b-tooltip-content",""),r.textContent=e.getAttribute("b-att-content"),e.appendChild(r));let s=r?r.innerHTML:"";r?.remove();let n=new(B()).Tooltip(o,{title:s,html:!0,trigger:"hover focus"}),c=()=>e.setAttribute("b-att-state","open"),p=()=>e.setAttribute("b-att-state","closed");return o.addEventListener("shown.bs.tooltip",c),o.addEventListener("hidden.bs.tooltip",p),e.setAttribute("b-att-state","closed"),{destroy:()=>{o.removeEventListener("shown.bs.tooltip",c),o.removeEventListener("hidden.bs.tooltip",p),n.dispose()}}}b.register("tooltip",{type:"owl",mount:Zd});A();function Jd(e){e.classList.add("btn",e.getAttribute("b-att-variant")==="outline"?"btn-outline-secondary":"btn-light"),e.setAttribute("aria-pressed",e.getAttribute("aria-pressed")||"false");let o=()=>{let r=e.getAttribute("aria-pressed")!=="true";e.setAttribute("aria-pressed",String(r)),e.setAttribute("b-att-state",r?"on":"off"),e.dispatchEvent(new CustomEvent("baseui:change",{bubbles:!0,detail:{pressed:r}}))};return e.addEventListener("click",o),{destroy:()=>e.removeEventListener("click",o)}}b.register("toggle",{type:"owl",mount:Jd});A();function Qd(e){let o=[...e.querySelectorAll("[b-att-value], button")],r=e.getAttribute("b-att-multiple")==="true";e.classList.add("btn-group"),e.setAttribute("role",r?"group":"radiogroup"),o.forEach(n=>{n.classList.add("btn","btn-outline-secondary"),n.setAttribute("aria-pressed",n.getAttribute("aria-pressed")||"false")});let s=n=>{let c=n.target.closest("button, [b-att-value]");if(!c||!e.contains(c))return;r||o.forEach(u=>u.setAttribute("aria-pressed","false")),c.setAttribute("aria-pressed",String(c.getAttribute("aria-pressed")!=="true"));let p=o.filter(u=>u.getAttribute("aria-pressed")==="true").map(u=>u.getAttribute("b-att-value")||u.textContent.trim());e.dispatchEvent(new CustomEvent("baseui:change",{bubbles:!0,detail:{value:r?p:p[0]}}))};return e.addEventListener("click",s),{destroy:()=>e.removeEventListener("click",s)}}b.register("toggle-group",{type:"owl",mount:Qd});A();var cc={lead:"lead",muted:"text-body-secondary",code:"bu-code",kbd:"bu-kbd"};function Yd(e){let o=cc[e.getAttribute("b-att-variant")||"body"];return e.classList.add("bu-typography"),o&&e.classList.add(o),{destroy:()=>e.classList.remove("bu-typography",...Object.values(cc))}}b.register("typography",{type:"static",mount:Yd});C();_n(Nn);Aa(Ea);La();var lc=b;return fc(th);})();
|
|
76
|
+
<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>
|
|
77
|
+
`)}function ed(t){td(t),t.querySelectorAll("[b-icon]").forEach(E=>D(E,E.getAttribute("b-icon"),{label:""}));let e=t.querySelector("table")||t,s=t.querySelector("[b-table-search]"),o=t.querySelector(".b-data-table__selection-summary"),r=t.getAttribute("b-att-variant");t.classList.add("b-data-table"),r&&t.classList.add(`b-data-table-${r}`),e.classList.add("table");let a=t.querySelector(".b-data-table__cards"),l=()=>[...e.querySelectorAll("tbody tr")],u=E=>a?.querySelector(`[data-row-key="${E.dataset.rowKey}"]`),d=()=>[...e.querySelectorAll("tbody input[type='checkbox']")],b=()=>{o&&(o.textContent=`${d().filter(E=>E.checked).length} of ${l().filter(E=>!E.hidden).length} row(s) selected.`)},f=()=>{let E=(s?.value||"").toLowerCase();l().forEach(O=>{let B=!(O.cells[2]||O.cells[1]||O.cells[0]).textContent.toLowerCase().includes(E);O.hidden=B;let W=u(O);W&&(W.hidden=B)}),b()},g=(E,O)=>{let P=e.tBodies[0];l().sort((B,W)=>B.cells[E].textContent.localeCompare(W.cells[E].textContent)*O).forEach(B=>{P.append(B);let W=u(B);W&&a.append(W)})},v=E=>{let O=E.target.closest("th");if(!O)return;let P=O.getAttribute("b-att-sort")==="asc"?-1:1;e.querySelectorAll("th").forEach(B=>B.removeAttribute("b-att-sort")),O.setAttribute("b-att-sort",P===1?"asc":"desc"),g([...O.parentElement.children].indexOf(O),P)},k=(E,O)=>{let B=u(E)?.querySelector("input[type='checkbox']");B&&B.checked!==O&&(B.checked=O)},y=E=>{let O=E.target;if(O?.matches("input[type='checkbox']")){let P=O.closest("tr"),B=O.closest(".b-data-table__card");if(P)k(P,O.checked);else if(B){let et=l().find(ti=>ti.dataset.rowKey===B.dataset.rowKey)?.querySelector("input[type='checkbox']");et&&et.checked!==O.checked&&(et.checked=O.checked)}}b()};return s?.addEventListener("input",f),e.tHead?.addEventListener("click",v),e.addEventListener("change",y),a?.addEventListener("change",y),b(),{destroy:()=>{s?.removeEventListener("input",f),e.tHead?.removeEventListener("click",v),e.removeEventListener("change",y),a?.removeEventListener("change",y)}}}h.register("data-table",{type:"owl",mount:ed});C();function sd(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)}}h.register("date-picker",{type:"owl",mount:sd});C();function od(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 r=document.createElement("div");r.className="modal-dialog modal-dialog-centered",e.replaceWith(r),r.append(e),e.classList.add("modal-content")}[...t.querySelectorAll("[b-dialog-close]")].forEach(r=>r.setAttribute("data-bs-dismiss","modal"));let o=N().Modal.getOrCreateInstance(t,{backdrop:!0,keyboard:!0,focus:!0});return Ur(t,o,"modal","BaseUIDialog")}h.register("dialog",{type:"owl",mount:od});C();function rd(t){let e=t.getAttribute("b-att-dir")||t.getAttribute("dir")||"ltr";return t.setAttribute("dir",e==="rtl"?"rtl":"ltr"),{}}h.register("direction",{type:"static",mount:rd});C();function id(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=N().Offcanvas.getOrCreateInstance(t,{backdrop:!0,keyboard:!0,scroll:!1});return Ur(t,s,"offcanvas","BaseUIDrawer")}h.register("drawer",{type:"owl",mount:id});C();lt();var uc="a, button, [role='menuitem'], [role='menuitemcheckbox'], [role='menuitemradio']";function lc(t,e){t?.classList.add(e)}function nd(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(D(document.createElement("span"),"check")),t.prepend(s)}function ad(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"),nd(e,e.getAttribute("aria-checked")==="true")}),t.querySelectorAll(uc).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 cd(t){let e=[];return t.querySelectorAll("[b-dropdown-sub]").forEach(s=>{let o=s.querySelector("[b-dropdown-sub-trigger]"),r=s.querySelector("[b-dropdown-sub-content]");if(!o||!r)return;if(lc(o,"b-dropdown-menu-sub-trigger"),lc(r,"b-dropdown-menu-sub-content"),o.setAttribute("data-slot","dropdown-menu-sub-trigger"),o.setAttribute("role","menuitem"),o.setAttribute("aria-haspopup","menu"),r.setAttribute("data-slot","dropdown-menu-sub-content"),r.setAttribute("role","menu"),r.hidden=!0,!o.querySelector(".b-dropdown-menu-sub-trigger-icon")){let b=D(document.createElement("span"),"chevron-right");b.classList.add("b-dropdown-menu-sub-trigger-icon"),o.append(b)}let a=b=>{r.hidden=!b,o.setAttribute("data-state",b?"open":"closed"),o.setAttribute("aria-expanded",String(b))},l=()=>a(!0),u=()=>a(!1),d=b=>{b.preventDefault(),a(r.hidden)};s.addEventListener("mouseenter",l),s.addEventListener("mouseleave",u),o.addEventListener("focus",l),o.addEventListener("click",d),e.push(()=>{s.removeEventListener("mouseenter",l),s.removeEventListener("mouseleave",u),o.removeEventListener("focus",l),o.removeEventListener("click",d)})}),()=>e.forEach(s=>s())}function ld(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=N().Dropdown.getOrCreateInstance(e),r=v=>{t.setAttribute("b-att-state",v?"open":"closed"),e.setAttribute("aria-expanded",String(v)),t.dispatchEvent(new CustomEvent(v?"baseui:open":"baseui:close",{bubbles:!0}))},a=()=>r(!0),l=()=>r(!1);e.addEventListener("shown.bs.dropdown",a),e.addEventListener("hidden.bs.dropdown",l);let u=()=>o.toggle();e.addEventListener("click",u);let d=v=>{v.key==="Escape"?(o.hide(),e.focus()):v.key==="ArrowDown"&&!s.classList.contains("show")&&(v.preventDefault(),o.show(),[...s.querySelectorAll("a, button, [tabindex]:not([tabindex='-1'])")][0]?.focus())};t.addEventListener("keydown",d);let b=v=>{t.contains(v.target)||o.hide()};document.addEventListener("click",b),ad(s);let f=cd(s),g=v=>{let k=v.target.closest(uc);!k||k.closest("[b-dropdown-sub]")||o.hide()};return s.addEventListener("click",g),{destroy:()=>{f(),s.removeEventListener("click",g),document.removeEventListener("click",b),t.removeEventListener("keydown",d),e.removeEventListener("click",u),e.removeEventListener("shown.bs.dropdown",a),e.removeEventListener("hidden.bs.dropdown",l),o.dispose()}}}h.register("dropdown-menu",{type:"owl",mount:ld});C();var vn={default:"b-empty-default",outline:"b-empty-outline",background:"b-empty-background"};function ud(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",vn[e]||vn.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 r=o.getAttribute("b-att-variant")==="icon"?"icon":"default";o.classList.add("b-empty-media",`b-empty-media-${r}`),o.setAttribute("data-variant",r)}),{destroy:()=>{t.classList.remove("b-empty",...Object.values(vn))}}}h.register("empty",{type:"owl",mount:ud});C();function $i(t,e){t?.classList.add(...e.filter(Boolean))}function ts(t,e,s,o){t.querySelectorAll(e).forEach(r=>{r.setAttribute("data-slot",s),$i(r,[o])})}function pd(t){return t.querySelector("input, textarea, select, [role='checkbox'], [role='radio'], [role='switch']")}function dd(t,e){return e.id?e.id:`${t?.id||"b-field"}-error`}function hd(t){let e=t.getAttribute("b-att-slot")||t.getAttribute("data-slot")||"field",s=[];if(e==="field-set")t.setAttribute("data-slot","field-set"),$i(t,["b-field-set"]),s.push("b-field-set");else if(e==="field-group")t.setAttribute("data-slot","field-group"),$i(t,["b-field-group"]),s.push("b-field-group");else{let a=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",a),$i(t,["b-field",`b-field-orientation-${a}`]),s.push("b-field",`b-field-orientation-${a}`)}ts(t,"legend[b-field-legend], [b-field-legend]","field-legend","b-field-legend"),ts(t,"[b-field-group]","field-group","b-field-group"),ts(t,"[b-field-content]","field-content","b-field-content"),ts(t,"label[b-field-label], [b-field-label], [b-label]","field-label","b-field-label"),ts(t,"[b-field-title]","field-label","b-field-title"),ts(t,"[b-field-description]","field-description","b-field-description"),ts(t,"[b-field-separator]","field-separator","b-field-separator"),ts(t,"[b-field-error], [b-error]","field-error","b-field-error"),t.querySelectorAll("[b-field-separator]").forEach(a=>{if(!a.querySelector(".b-field-separator-line")){let l=document.createElement("span");l.className="b-field-separator-line",l.setAttribute("aria-hidden","true"),a.prepend(l)}a.textContent.trim()&&a.setAttribute("data-content","true")});let o=pd(t),r=t.querySelector("[b-field-error], [b-error], [data-slot='field-error']");if(o&&r){r.setAttribute("role",r.getAttribute("role")||"alert");let a=dd(o,r);r.id=a,o.setAttribute("aria-describedby",a),o.setAttribute("aria-invalid","true"),t.setAttribute("data-invalid","true")}return{destroy:()=>t.classList.remove(...s)}}h.register("field",{type:"static",mount:hd});C();function bd(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"),r=Number(s?.getAttribute("maxlength")||100),a=()=>{o&&s&&(o.textContent=`${s.value.length}/${r} characters`)},l=()=>{e&&(e.value=""),s&&(s.value=""),a()},u=t.querySelector("[b-form-reset]");return u?.addEventListener("click",l),s?.addEventListener("input",a),a(),{destroy(){u?.removeEventListener("click",l),s?.removeEventListener("input",a)}}}h.register("form",{type:"static",mount:bd});C();function md(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")},r=()=>{s.hidden=!0,e.setAttribute("aria-expanded","false")},a=l=>{l.key==="Escape"&&r()};return e.setAttribute("aria-haspopup","dialog"),s.setAttribute("role","dialog"),r(),t.addEventListener("mouseenter",o),t.addEventListener("mouseleave",r),t.addEventListener("focusin",o),t.addEventListener("focusout",r),t.addEventListener("keydown",a),{destroy:()=>{t.removeEventListener("mouseenter",o),t.removeEventListener("mouseleave",r),t.removeEventListener("focusin",o),t.removeEventListener("focusout",r),t.removeEventListener("keydown",a)}}}h.register("hover-card",{type:"owl",mount:md});C();lt();function fd(t){let e=t.getAttribute("b-icon")||t.getAttribute("b-att-icon")||t.getAttribute("aria-label");return e?(D(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")}}):{}}h.register("icon",{type:"static",mount:fd});C();function gd(t){let e=hi({tag:t.tagName.toLowerCase(),type:t.getAttribute("type")});return t.classList.add(e),{destroy:()=>t.classList.remove(e)}}h.register("input",{type:"static",mount:gd});C();function yd(t){let e=[...t.querySelectorAll("input")];t.classList.add("b-input-otp"),e.forEach(a=>{a.classList.add("form-control"),a.inputMode=a.inputMode||"numeric",a.maxLength=a.maxLength>0?a.maxLength:1});let s=()=>{let a=e.map(l=>l.value).join("");t.setAttribute("b-att-value",a),t.dispatchEvent(new CustomEvent("baseui:change",{bubbles:!0,detail:{value:a}}))},o=a=>{let l=e.indexOf(a.target);a.target.value&&e[l+1]&&e[l+1].focus(),s()},r=a=>{let l=a.clipboardData.getData("text").trim();l&&(a.preventDefault(),e.forEach((u,d)=>{u.value=l[d]||""}),s())};return e.forEach(a=>a.addEventListener("input",o)),t.addEventListener("paste",r),{destroy:()=>{e.forEach(a=>a.removeEventListener("input",o)),t.removeEventListener("paste",r)}}}h.register("input-otp",{type:"owl",mount:yd});C();function vd(t){return t.classList.add("b-item"),{destroy:()=>t.classList.remove("b-item")}}h.register("item",{type:"static",mount:vd});C();function xd(t){return t.classList.add("b-kbd"),{destroy:()=>t.classList.remove("b-kbd")}}h.register("kbd",{type:"static",mount:xd});C();function wd(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")}}h.register("label",{type:"static",mount:wd});C();function Sd(t){return t.classList.add("b-marker"),{destroy:()=>t.classList.remove("b-marker")}}h.register("marker",{type:"static",mount:Sd});C();Si();function Ad(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 Ed(t){return String(t||"").split(",").map(e=>e.trim()).filter(Boolean)}function Cd(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",r=t.getAttribute("b-att-editable")==="true",a=t.getAttribute("b-att-collaborative")==="true",l=t.getAttribute("b-att-room")||"b-markdown",u=t.getAttribute("b-att-password")||void 0,d=Ed(t.getAttribute("b-att-signaling")),b=!1,f=null;function g(k){b||(t.setAttribute("data-status","error"),t.textContent=`Unable to render Markdown: ${k?.message||k}`,t.dispatchEvent(new CustomEvent("baseui:markdown-error",{bubbles:!0,detail:{error:k}})))}async function v(){let k=Ad(t);t.setAttribute("data-status","loading");let y=k;if(e)try{let B=await fetch(e);if(!B.ok)throw new Error(`${B.status} ${B.statusText}`);y=await B.text()}catch(B){g(B);return}if(r){t.replaceChildren(),t.classList.add("b-markdown-editable"),t.setAttribute("data-status","ready");let B=document.createElement("div");B.className="b-markdown-editor",B.setAttribute("data-slot","markdown-editor"),B.setAttribute("role","group"),B.setAttribute("aria-label",a?"Collaborative Markdown editor":"Markdown editor"),t.append(B);try{if(f=await Yr({root:B,value:y,collaborative:a,room:l,password:u,signaling:d,onChange:(W,et)=>{t.dispatchEvent(new CustomEvent("baseui:markdown-change",{bubbles:!0,detail:{markdown:W,previousMarkdown:et}}))}}),b){f?.destroy?.(),f=null;return}}catch(W){g(W);return}t.dispatchEvent(new CustomEvent("baseui:markdown-editor-ready",{bubbles:!0,detail:{collaborative:a,room:l}}));return}let{data:E,content:O}=Ai(y),P;try{P=await Zr(O)}catch(B){g(B);return}b||(t.innerHTML=P,t.setAttribute("data-status","ready"),await Jr(t,{mermaid:s,baseUi:o}),b||t.dispatchEvent(new CustomEvent("baseui:markdown-render",{bubbles:!0,detail:{html:P,frontmatter:E}})))}return v(),{destroy:()=>{b=!0,f?.destroy?.(),f=null,_r(t),t.classList.remove("b-markdown"),t.classList.remove("b-markdown-editable"),t.removeAttribute("data-status")}}}h.register("markdown",{type:"static",mount:Cd});C();function Ld(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"),{}}h.register("message",{type:"static",mount:Ld});C();function kd(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()}}h.register("message-scroller",{type:"owl",mount:kd});C();function Nd(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")}}h.register("menubar",{type:"static",mount:Nd});C();function Od(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")}}h.register("native-select",{type:"static",mount:Od});C();function Td(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 r=e.indexOf(o.target),a=o.key==="ArrowRight"?1:o.key==="ArrowLeft"?-1:0;!a||r<0||(o.preventDefault(),e[(r+a+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)}}h.register("navigation-menu",{type:"owl",mount:Td});C();function Bd(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 r=o.querySelector("a, button");o.classList.add("page-item"),r?.classList.add("page-link"),r?.getAttribute("aria-current")==="page"&&o.classList.add("active"),(r?.hasAttribute("disabled")||r?.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")}}}h.register("pagination",{type:"owl",mount:Bd});C();function Id(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 r=new(N()).Popover(e,{content:o,html:!0,trigger:"click"}),a=()=>{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",a),e.addEventListener("hidden.bs.popover",l),t.setAttribute("b-att-state","closed"),e.setAttribute("aria-expanded","false"),{destroy:()=>{e.removeEventListener("shown.bs.popover",a),e.removeEventListener("hidden.bs.popover",l),r.dispose()}}}h.register("popover",{type:"owl",mount:Id});C();function Rd(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")}}h.register("progress",{type:"static",mount:Rd});C();function $d(t){let{open:e,close:s,destroy:o}=fi(t,{closeSelector:"[b-pwa-close]"});return t.BaseUIPwa={open:e,close:s},{destroy:()=>{o(),delete t.BaseUIPwa}}}h.register("pwa",{type:"owl",mount:$d});C();function Ud(t){let e=[...t.querySelectorAll("[b-question]")],s=t.querySelector("[b-question-prev]"),o=t.querySelector("[b-question-next]"),r=0,a=d=>{r=Math.min(e.length-1,Math.max(0,d)),e.forEach((b,f)=>{b.hidden=f!==r,b.setAttribute("b-att-state",f===r?"active":"inactive")}),s&&(s.disabled=r===0),o&&(o.disabled=r===e.length-1),t.dispatchEvent(new CustomEvent("baseui:change",{bubbles:!0,detail:{index:r}}))},l=()=>a(r-1),u=()=>a(r+1);return s?.addEventListener("click",l),o?.addEventListener("click",u),e.length&&a(0),{destroy:()=>{s?.removeEventListener("click",l),o?.removeEventListener("click",u)}}}h.register("questionnaire",{type:"owl",mount:Ud});C();h.register("radio-group",{type:"static",mount:t=>Ri(t,"radio")});C();function qd(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),r=Number(t.getAttribute("b-att-max")||720),a=l=>{let u=l.clientX,d=e.getBoundingClientRect().width,b=g=>{e.style.width=`${Math.min(r,Math.max(o,d+g.clientX-u))}px`},f=()=>{document.removeEventListener("pointermove",b),document.removeEventListener("pointerup",f),t.dispatchEvent(new CustomEvent("baseui:change",{bubbles:!0,detail:{width:e.style.width}}))};document.addEventListener("pointermove",b),document.addEventListener("pointerup",f)};return s.addEventListener("pointerdown",a),{destroy:()=>s.removeEventListener("pointerdown",a)}}h.register("resizable",{type:"owl",mount:qd});C();function Pd(t){return t.classList.add("b-scroll-area"),t.tabIndex=t.tabIndex>=0?t.tabIndex:0,t.setAttribute("role",t.getAttribute("role")||"region"),{}}h.register("scroll-area",{type:"static",mount:Pd});C();function _d(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")}}h.register("separator",{type:"static",mount:_d});C();function pc(t,{triggerSelector:e,panelSelector:s,ariaHaspopup:o,panelRole:r,onKeyDown:a}={}){let l=t.querySelector(e),u=t.querySelector(s),d=v=>{!u||!l||(u.hidden=!v,t.setAttribute("b-att-state",v?"open":"closed"),l.setAttribute("aria-expanded",String(v)),t.dispatchEvent(new CustomEvent(v?"baseui:open":"baseui:close",{bubbles:!0})))},b=()=>d(u?.hidden!==!1),f=v=>{v.key==="Escape"&&(d(!1),l?.focus()),a?.(v,{setOpen:d,panel:u,trigger:l})},g=v=>{t.contains(v.target)||d(!1)};return l?.setAttribute("aria-haspopup",o),u?.setAttribute("role",r),u&&(u.hidden=!0),l?.addEventListener("click",b),t.addEventListener("keydown",f),document.addEventListener("click",g),{trigger:l,panel:u,setOpen:d,destroy:()=>{l?.removeEventListener("click",b),t.removeEventListener("keydown",f),document.removeEventListener("click",g)}}}function Md(t){let{setOpen:e,destroy:s}=pc(t,{triggerSelector:"[b-select-trigger]",panelSelector:"[b-select-content]",ariaHaspopup:"listbox",panelRole:"listbox"}),o=t.querySelector("[b-select-trigger]"),r=t.querySelector("[b-select-value]"),a=l=>{let u=l.target.closest("[b-select-item]");if(!(!u||!t.contains(u))){for(let d of t.querySelectorAll("[b-select-item]"))d.setAttribute("aria-selected",String(d===u));r&&(r.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",a),{destroy:()=>{t.removeEventListener("click",a),s()}}}h.register("select",{type:"owl",mount:Md});C();function jd(t){let e=[...t.querySelectorAll("[b-shell-collapse-trigger]")],s=r=>{t.setAttribute("b-att-collapsed",r?"true":"false"),t.dispatchEvent(new CustomEvent(r?"baseui:collapse":"baseui:expand",{bubbles:!0}))},o=()=>s(t.getAttribute("b-att-collapsed")!=="true");return e.forEach(r=>r.addEventListener("click",o)),s(t.getAttribute("b-att-collapsed")==="true"),t.BaseUIShell={collapse:()=>s(!0),expand:()=>s(!1),toggle:o},{destroy:()=>{e.forEach(r=>r.removeEventListener("click",o)),delete t.BaseUIShell}}}h.register("shell",{type:"owl",mount:jd});C();function zd(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(r=>r.setAttribute("data-bs-dismiss","offcanvas"));let o=N().Offcanvas.getOrCreateInstance(t,{backdrop:!0,keyboard:!0,scroll:!1});return Ur(t,o,"offcanvas","BaseUISheet")}h.register("sheet",{type:"owl",mount:zd});C();var Dd={"[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 Fd(t){let e=[];for(let[s,[o,r,a]]of Object.entries(Dd))for(let l of t.querySelectorAll(s))l.classList.add(o),l.dataset.slot=r,l.dataset.sidebar=a,(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 Hd(t){let e=t.getAttribute("b-att-trigger")?document.querySelector(t.getAttribute("b-att-trigger")):null,s=[...t.querySelectorAll("[b-sidebar-close]")],o=Fd(t),r=d=>{t.setAttribute("b-att-state",d?"open":"closed"),t.classList.toggle("is-open",d),t.dataset.state=d?"expanded":"collapsed",t.dispatchEvent(new CustomEvent(d?"baseui:open":"baseui:close",{bubbles:!0}))},a=()=>r(!0),l=()=>r(!1),u=d=>{d.key==="Escape"&&l()};return e?.addEventListener("click",a),s.forEach(d=>d.addEventListener("click",l)),t.addEventListener("keydown",u),t.dataset.sidebar="sidebar",t.dataset.slot="sidebar",r(t.getAttribute("b-att-state")==="open"),t.BaseUISidebar={open:a,close:l},{destroy:()=>{e?.removeEventListener("click",a),s.forEach(d=>d.removeEventListener("click",l)),t.removeEventListener("keydown",u);for(let[d,b]of o)d.classList.remove(b,"is-active"),d.removeAttribute("data-slot"),d.removeAttribute("data-sidebar"),d.removeAttribute("data-active");t.removeAttribute("data-sidebar"),t.removeAttribute("data-slot"),t.removeAttribute("data-state"),delete t.BaseUISidebar}}}h.register("sidebar",{type:"owl",mount:Hd});C();function Wd(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")}}}h.register("slider",{type:"static",mount:Wd});C();function Kd(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")}}h.register("skeleton",{type:"static",mount:Kd});C();function Vd(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")}}h.register("spinner",{type:"static",mount:Vd});C();function Gd(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")}}}h.register("switch",{type:"static",mount:Gd});C();function Zd(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")}}h.register("table",{type:"static",mount:Zd});C();function Jd(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])),r=new Map,a=new Map,l=new Map,u=new Map,d=e[0]?.parentElement;d&&!d.hasAttribute("role")&&d.setAttribute("role","tablist"),d?.classList.add("nav");let b=t.getAttribute("b-att-value")||e[0]?.getAttribute("b-tab")||"",f=g=>{t.setAttribute("b-att-value",g),e.forEach(v=>{v.tabIndex=v.getAttribute("b-tab")===g?0:-1}),t.dispatchEvent(new CustomEvent("baseui:change",{bubbles:!0,detail:{value:g}}))};return e.forEach((g,v)=>{let k=g.getAttribute("b-tab"),y=o.get(k),E=k===b;if(g.setAttribute("role","tab"),g.classList.add("nav-link"),g.tabIndex=E?0:-1,E&&g.classList.add("active"),y){let et=y.id||`b-tabs-panel-${k}`;y.id=et,y.setAttribute("role","tabpanel"),y.classList.add("tab-pane","fade"),E&&y.classList.add("show","active"),g.setAttribute("data-bs-target",`#${et}`)}let O=N().Tab.getOrCreateInstance(g);r.set(g,O);let P=()=>O.show();g.addEventListener("click",P),a.set(g,P);let B=()=>f(k);g.addEventListener("shown.bs.tab",B),u.set(g,B);let W=et=>{let ti=bi(et.key,v,e.length);if(ti===-1)return;et.preventDefault();let xn=e[ti];xn.focus(),r.get(xn)?.show()};g.addEventListener("keydown",W),l.set(g,W)}),b&&t.setAttribute("b-att-value",b),{destroy:()=>{e.forEach(g=>{g.removeEventListener("click",a.get(g)),g.removeEventListener("keydown",l.get(g)),g.removeEventListener("shown.bs.tab",u.get(g)),r.get(g)?.dispose()}),a.clear(),l.clear(),u.clear(),r.clear()}}}h.register("tabs",{type:"owl",mount:Jd});C();function Yd(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")}}h.register("textarea",{type:"static",mount:Yd});C();function Xd(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 Qd(t){return String(t||"").split(",").map(e=>e.trim()).filter(Boolean)}function th(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",r=t.getAttribute("b-att-url")||void 0,a=Bi({collaborative:t.getAttribute("b-att-collaborative")==="true",providerType:s,url:r}),l=t.getAttribute("b-att-password")||void 0,u=Qd(t.getAttribute("b-att-signaling")),d=t.getAttribute("b-att-placeholder")||void 0,b=!1,f=null;function g(k){b||(t.setAttribute("data-status","error"),t.textContent=`Unable to mount text editor: ${k?.message||k}`,t.dispatchEvent(new CustomEvent("baseui:text-editor-error",{bubbles:!0,detail:{error:k}})))}async function v(){t.setAttribute("data-status","loading");let k=Xd(t);if(e)try{let E=await fetch(e);if(!E.ok)throw new Error(`${E.status} ${E.statusText}`);k=await E.text()}catch(E){g(E);return}t.replaceChildren();let y=document.createElement("div");y.className="b-text-editor-shell",y.setAttribute("data-slot","text-editor-shell"),y.setAttribute("role","group"),y.setAttribute("aria-label",a?"Collaborative rich text editor":"Rich text editor"),t.append(y);try{if(f=await Ti({root:y,value:k,placeholder:d,collaborative:a,providerType:s,room:o,url:r,password:l,signaling:u,onChange:(E,O)=>{t.dispatchEvent(new CustomEvent("baseui:text-editor-change",{bubbles:!0,detail:{html:E,previousHtml:O}}))}}),b){f?.destroy?.(),f=null;return}}catch(E){g(E);return}t.setAttribute("data-status","ready"),t.dispatchEvent(new CustomEvent("baseui:text-editor-ready",{bubbles:!0,detail:{collaborative:a,room:o}}))}return v(),{destroy:()=>{b=!0,f?.destroy?.(),f=null,t.classList.remove("b-text-editor"),t.removeAttribute("data-status")}}}h.register("text-editor",{type:"static",mount:th});lt();C();function eh(t,e){let s=Pr(e);t.classList.remove(...fa),t.className=`${t.className} ${vi({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),D(o,s.icon,{baseUrl:t.getAttribute("b-icon-base-url")||t.getAttribute("b-att-base-url")});let r=t.querySelector("[b-theme-button-label]");r||(r=document.createElement("span"),r.className="visually-hidden",r.setAttribute("b-theme-button-label",""),t.append(r)),r.textContent=s.label}function sh(t){let e=ce({storageKey:t.getAttribute("b-att-storage-key")||void 0,toggleSelector:"[b-theme-toggle]",labelSelector:"[b-theme-label]"}),s=(a=e.current())=>eh(t,a),o=()=>s(e.toggle()),r=a=>s(a.detail?.theme);return s(e.set(e.current(),{skipStorage:!0})),t.addEventListener("click",o),document.addEventListener("baseui:theme-change",r),{destroy:()=>{t.removeEventListener("click",o),document.removeEventListener("baseui:theme-change",r)}}}h.register("theme-button",{type:"static",mount:sh});C();x();function oh(t){let e=[...t.querySelectorAll("[b-toast-close]")],s=t.getAttribute("b-att-delay"),o=s===null?3e3:Number(s),r=gi(t.getAttribute("b-att-position"));t.className=m(t.className,"toast","fade",r),t.setAttribute("role",t.getAttribute("b-att-variant")==="danger"?"alert":"status"),e.forEach(f=>f.setAttribute("data-bs-dismiss","toast"));let a=new(N()).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 d=()=>a.show(),b=()=>a.hide();return t.getAttribute("b-att-state")==="open"&&d(),t.BaseUIToast={show:d,hide:b},{destroy:()=>{t.removeEventListener("shown.bs.toast",l),t.removeEventListener("hidden.bs.toast",u),a.dispose(),delete t.BaseUIToast}}}h.register("toast",{type:"owl",mount:oh});C();function rh(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 r=new(N()).Tooltip(e,{title:o,html:!0,trigger:"hover focus"}),a=()=>t.setAttribute("b-att-state","open"),l=()=>t.setAttribute("b-att-state","closed");return e.addEventListener("shown.bs.tooltip",a),e.addEventListener("hidden.bs.tooltip",l),t.setAttribute("b-att-state","closed"),{destroy:()=>{e.removeEventListener("shown.bs.tooltip",a),e.removeEventListener("hidden.bs.tooltip",l),r.dispose()}}}h.register("tooltip",{type:"owl",mount:rh});C();function ih(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)}}h.register("toggle",{type:"owl",mount:ih});C();function nh(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(r=>{r.classList.add("btn","btn-outline-secondary"),r.setAttribute("aria-pressed",r.getAttribute("aria-pressed")||"false")});let o=r=>{let a=r.target.closest("button, [b-att-value]");if(!a||!t.contains(a))return;s||e.forEach(u=>u.setAttribute("aria-pressed","false")),a.setAttribute("aria-pressed",String(a.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)}}h.register("toggle-group",{type:"owl",mount:nh});C();var dc={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 ah(t){let e=dc[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(dc))}}h.register("typography",{type:"static",mount:ah});A();ji(Ii);An(Cn);En();var hc=h;return xc(ch);})();
|