@bagelink/vue 1.9.138 → 1.9.140
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/dist/index.cjs +1 -1
- package/dist/index.mjs +2 -2
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/components/Avatar.vue +1 -1
package/dist/index.cjs
CHANGED
|
@@ -7,7 +7,7 @@ ${t.event.url}`),`https://calendar.google.com/calendar/render?${b.toString()}`})
|
|
|
7
7
|
<div class="gap-025 flex">
|
|
8
8
|
<p class="bold txt18">${E(T.value)}</p>
|
|
9
9
|
<p>|</p>
|
|
10
|
-
<p class="bold txt18">${C(T.percentage)}</p></div>`}return(T,B)=>{const P=n.resolveDirective("tooltip");return n.openBlock(),n.createElementBlock("div",{ref_key:"chartRef",ref:i,class:"h-100p flex column flex-stretch"},[n.createElementVNode("div",x1,[n.createElementVNode("div",T1,[n.createVNode(n.unref(Te),{name:e.icon,size:"1.2",color:e.color,class:"line-height-0"},null,8,["name","color"]),n.createElementVNode("p",N1,n.toDisplayString(e.title),1)]),e.percentageChange!==0?(n.openBlock(),n.createElementBlock("div",D1,[n.createVNode(n.unref(Te),{class:n.normalizeClass(["line-height-1",e.percentageChange>0?"color-success":"color-danger"]),name:e.percentageChange>0?"trending_up":"trending_down",size:"1"},null,8,["name","class"]),n.createElementVNode("span",{class:n.normalizeClass(["txt12 bold",e.percentageChange>0?"color-success":"color-danger"])},n.toDisplayString(Math.abs(e.percentageChange))+"% ",3)])):n.createCommentVNode("",!0)]),n.createElementVNode("div",{class:n.normalizeClass(["chart-container flex space-between gap-1 flex-wrap flex-grow",{"with-legend":e.showLegend,"with-connectors":e.showConnectorLines}])},[(n.openBlock(),n.createElementBlock("svg",{width:h.value.width,height:h.value.height,class:"chart-svg mx-auto flex-shrink-0",style:n.normalizeStyle(e.showConnectorLines?"overflow: visible;":"")},[n.createElementVNode("g",{transform:`translate(${m.value.x}, ${m.value.y})`},[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(_.value.filter(k=>k.visible),(k,S)=>n.withDirectives((n.openBlock(),n.createElementBlock("path",{key:S,d:k.path,fill:k.color,class:"pie-segment",stroke:"white","stroke-width":"2"},null,8,V1)),[[P,{content:A(k),html:!0}]])),128)),e.donut&&(e.showCenterTotal||e.centerValue!==void 0)?(n.openBlock(),n.createElementBlock("g",L1,[n.createElementVNode("text",M1,n.toDisplayString(e.centerLabel),1),n.createElementVNode("text",P1,n.toDisplayString(E(y.value)),1)])):n.createCommentVNode("",!0),e.showConnectorLines?(n.openBlock(),n.createElementBlock("g",I1,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(_.value.filter(k=>k.visible),(k,S)=>(n.openBlock(),n.createElementBlock("g",{key:`line-${S}`},[n.createElementVNode("polyline",{points:`${v(k).innerX},${v(k).innerY} ${v(k).outerX},${v(k).outerY} ${v(k).labelX},${v(k).labelY}`,stroke:"#333","stroke-width":"1.5",fill:"none"},null,8,O1)]))),128))])):n.createCommentVNode("",!0),e.showLabelsOnChart?(n.openBlock(),n.createElementBlock("g",R1,[e.showConnectorLines?n.createCommentVNode("",!0):(n.openBlock(),n.createElementBlock("g",F1,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(_.value.filter(k=>k.visible),(k,S)=>(n.openBlock(),n.createElementBlock("text",{key:`label-${S}`,x:b(k).x,y:b(k).y-5,"text-anchor":"middle","dominant-baseline":"middle",class:"chart-label txt12 pointer-events-none",fill:e.labelColor},n.toDisplayString(k.label),9,z1))),128)),(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(_.value.filter(k=>k.visible),(k,S)=>(n.openBlock(),n.createElementBlock("text",{key:`value-${S}`,x:b(k).x,y:b(k).y+12,"text-anchor":"middle","dominant-baseline":"middle",class:"chart-value txt16 mt-1 line-height-2 bold pointer-events-none",fill:e.labelColor},n.toDisplayString(E(k.value)),9,U1))),128))])),e.showConnectorLines?(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(_.value.filter(k=>k.visible),(k,S)=>(n.openBlock(),n.createElementBlock("text",{key:`label-line-${S}`,x:v(k).labelX,y:v(k).labelY-8,"text-anchor":v(k).textAnchor,"dominant-baseline":"middle",class:"chart-label txt12 bold",fill:e.labelColor},n.toDisplayString(k.label),9,H1))),128)),(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(_.value.filter(k=>k.visible),(k,S)=>(n.openBlock(),n.createElementBlock("text",{key:`value-line-${S}`,x:v(k).labelX,y:v(k).labelY+2,"text-anchor":v(k).textAnchor,"dominant-baseline":"middle",class:"chart-value txt11",fill:"#666"},n.toDisplayString(E(k.value)),9,j1))),128)),(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(_.value.filter(k=>k.visible),(k,S)=>(n.openBlock(),n.createElementBlock("text",{key:`percentage-${S}`,x:v(k).labelX,y:v(k).labelY+15,"text-anchor":v(k).textAnchor,"dominant-baseline":"middle",class:"chart-percentage txt10 pointer-events-none",fill:"#999"}," ("+n.toDisplayString(C(k.percentage))+") ",9,W1))),128))],64)):n.createCommentVNode("",!0)])):n.createCommentVNode("",!0)],8,B1)],12,A1)),e.showLegend?(n.openBlock(),n.createElementBlock("div",q1,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(_.value,(k,S)=>(n.openBlock(),n.createElementBlock("div",{key:S,class:"gap-1 flex align-items-center txt14 justify-content-start"},[n.createElementVNode("div",{class:"legend-color flex-shrink-0 radius-05",style:n.normalizeStyle({backgroundColor:k.color})},null,4),k.label?(n.openBlock(),n.createElementBlock("span",G1,n.toDisplayString(k.label),1)):n.createCommentVNode("",!0),n.createElementVNode("span",Y1,n.toDisplayString(E(k.value)),1),n.createElementVNode("span",X1,"("+n.toDisplayString(C(k.percentage))+")",1)]))),128))])):n.createCommentVNode("",!0)],2)],512)}}}),J1=Ve(K1,[["__scopeId","data-v-0458a5f9"]]),Z1={key:0},Q1=["src","alt","width","height"],eb=["src","alt","width","height"],tb=n.defineComponent({__name:"Image",props:{src:{},pathKey:{},alt:{},width:{},height:{},caption:{},modelValue:{}},setup(e){const t=e,o=n.ref(void 0),r=n.ref(!1);function a(){if(!((t.src===void 0||t.src==="")&&(t.pathKey===void 0||t.pathKey==="")&&(t.modelValue===void 0||t.modelValue==="")))return Hn(t.src??t.pathKey??t.modelValue)}async function l(u){if("caches"in window)try{const f=await(await window.caches.open("img-cache")).match(u);if(f)return URL.createObjectURL(await f.blob())}catch(d){console.warn("Cache access error:",d)}}async function i(u,d){if("caches"in window)try{await(await window.caches.open("img-cache")).put(u,new Response(d))}catch(f){console.warn("Cache write error:",f)}}async function s(u){await ol("https://cdnjs.cloudflare.com/ajax/libs/heic2any/0.0.1/index.min.js");const f=await(await fetch(Pu(u))).blob(),p=await window.heic2any({blob:f});return await i(u,p),URL.createObjectURL(p)}async function c(){var d;r.value=!1;const u=a();if(u===void 0||u===""){o.value=void 0;return}try{if(((d=u.split(".").pop())==null?void 0:d.toLowerCase().split("?")[0])==="heic"){const p=await l(u);if(p!==void 0&&p!==""){o.value=p;return}o.value=await s(u)}else o.value=u}catch(f){console.error("Image loading error:",f),r.value=!0,o.value=void 0}}return n.watch(()=>[t.src,t.pathKey,t.modelValue],c,{immediate:!0}),(u,d)=>e.caption?(n.openBlock(),n.createElementBlock("figcaption",Z1,[o.value?(n.openBlock(),n.createElementBlock("img",n.mergeProps({key:0,src:o.value},u.$attrs,{alt:e.alt,width:n.unref(Sn)(e.width),height:n.unref(Sn)(e.height)}),null,16,Q1)):(n.openBlock(),n.createBlock(n.unref(mi),{key:1,class:"img-web-kit",width:n.unref(Sn)(e.width),height:n.unref(Sn)(e.height)},null,8,["width","height"]))])):o.value?(n.openBlock(),n.createElementBlock("img",n.mergeProps({key:1,src:o.value},u.$attrs,{alt:e.alt,width:n.unref(Sn)(e.width),height:n.unref(Sn)(e.height)}),null,16,eb)):r.value?(n.openBlock(),n.createElementBlock("div",{key:2,class:"flex-center error-image",style:n.normalizeStyle({width:n.unref(Sn)(e.width),height:n.unref(Sn)(e.height)})},[n.createVNode(n.unref(Te),{name:"broken_image"})],4)):(n.openBlock(),n.createBlock(n.unref(mi),{key:3,class:"img-web-kit",width:n.unref(Sn)(e.width),height:n.unref(Sn)(e.height)},null,8,["width","height"]))}}),Vr=Ve(tb,[["__scopeId","data-v-1844be98"]]),nb=n.defineComponent({__name:"Avatar",props:{fallback:{},src:{},name:{},icon:{},alt:{},size:{default:50}},setup(e){return(t,o)=>(n.openBlock(),n.createElementBlock("div",{class:"round overflow-hidden txt-center p-0 avatar flex justify-content-center",style:n.normalizeStyle({width:`${e.size}px`,height:`${e.size}px`})},[e.src?(n.openBlock(),n.createBlock(Vr,{key:0,src:e.src,alt:e.alt||e.name},null,8,["src","alt"])):e.icon?(n.openBlock(),n.createBlock(n.unref(Te),{key:1,icon:e.icon,size:e.size},null,8,["icon","size"])):(n.openBlock(),n.createElementBlock("p",{key:2,style:n.normalizeStyle({"line-height":`${e.size}px`,"font-size":`calc(1.5rem * ${e.size} / 50)`})},n.toDisplayString((e.fallback||n.unref(Fh)(e.name||"")).toUpperCase()),5))],4))}}),th=Ve(nb,[["__scopeId","data-v-a0136363"]]),ob=n.defineComponent({__name:"Badge",props:{color:{},text:{},icon:{},iconEnd:{}},setup(e){const t=e,o=n.computed(()=>{const r=t.color;return r?`pair-${r}`:"pair-primary"});return(r,a)=>(n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(["bgl_badge",o.value])},[e.icon?(n.openBlock(),n.createBlock(n.unref(Te),{key:0,class:"inline line-height-1",size:"0.5",icon:e.icon},null,8,["icon"])):n.createCommentVNode("",!0),n.createTextVNode(" "+n.toDisplayString(e.text)+" ",1),e.iconEnd?(n.openBlock(),n.createBlock(n.unref(Te),{key:1,class:"inline line-height-1",size:"0.5",icon:e.iconEnd},null,8,["icon"])):n.createCommentVNode("",!0)],2))}}),rb=Ve(ob,[["__scopeId","data-v-4c9b64ba"]]);function Eu(e){return n.getCurrentScope()?(n.onScopeDispose(e),!0):!1}const nh=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const ab=e=>e!=null,lb=Object.prototype.toString,ib=e=>lb.call(e)==="[object Object]",Rd=()=>+Date.now(),dn=()=>{},sb=cb();function cb(){var e,t;return nh&&((e=window==null?void 0:window.navigator)==null?void 0:e.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((t=window==null?void 0:window.navigator)==null?void 0:t.maxTouchPoints)>2&&/iPad|Macintosh/.test(window==null?void 0:window.navigator.userAgent))}function Cu(e,t){function o(...r){return new Promise((a,l)=>{Promise.resolve(e(()=>t.apply(this,r),{fn:t,thisArg:this,args:r})).then(a).catch(l)})}return o}const ub=e=>e();function oh(e,t={}){let o,r,a=dn;const l=c=>{clearTimeout(c),a(),a=dn};let i;return c=>{const u=n.toValue(e),d=n.toValue(t.maxWait);return o&&l(o),u<=0||d!==void 0&&d<=0?(r&&(l(r),r=void 0),Promise.resolve(c())):new Promise((f,p)=>{a=t.rejectOnCancel?p:f,i=c,d&&!r&&(r=setTimeout(()=>{o&&l(o),r=void 0,f(i())},d)),o=setTimeout(()=>{r&&l(r),r=void 0,f(c())},u)})}}function db(...e){let t=0,o,r=!0,a=dn,l,i,s,c,u;!n.isRef(e[0])&&typeof e[0]=="object"?{delay:i,trailing:s=!0,leading:c=!0,rejectOnCancel:u=!1}=e[0]:[i,s=!0,c=!0,u=!1]=e;const d=()=>{o&&(clearTimeout(o),o=void 0,a(),a=dn)};return p=>{const h=n.toValue(i),m=Date.now()-t,g=()=>l=p();return d(),h<=0?(t=Date.now(),g()):(m>h&&(c||!r)?(t=Date.now(),g()):s&&(l=new Promise((b,v)=>{a=u?v:b,o=setTimeout(()=>{t=Date.now(),r=!0,b(g()),d()},Math.max(0,h-m))})),!c&&!o&&(o=setTimeout(()=>r=!0,h)),r=!1,l)}}function Fd(e,t=!1,o="Timeout"){return new Promise((r,a)=>{setTimeout(t?()=>a(o):r,e)})}function ga(e){return Array.isArray(e)?e:[e]}function fb(e){return n.getCurrentInstance()}function er(e,t=200,o={}){return Cu(oh(t,o),e)}function mb(e,t,o={}){const{eventFilter:r=ub,...a}=o;return n.watch(e,Cu(r,t),a)}function pb(e,t=!0,o){fb()?n.onMounted(e,o):t?e():n.nextTick(e)}function _c(e,t=!1){function o(f,{flush:p="sync",deep:h=!1,timeout:m,throwOnTimeout:g}={}){let b=null;const y=[new Promise(_=>{b=n.watch(e,$=>{f($)!==t&&(b?b():n.nextTick(()=>b==null?void 0:b()),_($))},{flush:p,deep:h,immediate:!0})})];return m!=null&&y.push(Fd(m,g).then(()=>n.toValue(e)).finally(()=>b==null?void 0:b())),Promise.race(y)}function r(f,p){if(!n.isRef(f))return o($=>$===f,p);const{flush:h="sync",deep:m=!1,timeout:g,throwOnTimeout:b}=p??{};let v=null;const _=[new Promise($=>{v=n.watch([e,f],([w,E])=>{t!==(w===E)&&(v?v():n.nextTick(()=>v==null?void 0:v()),$(w))},{flush:h,deep:m,immediate:!0})})];return g!=null&&_.push(Fd(g,b).then(()=>n.toValue(e)).finally(()=>(v==null||v(),n.toValue(e)))),Promise.race(_)}function a(f){return o(p=>!!p,f)}function l(f){return r(null,f)}function i(f){return r(void 0,f)}function s(f){return o(Number.isNaN,f)}function c(f,p){return o(h=>{const m=Array.from(h);return m.includes(f)||m.includes(n.toValue(f))},p)}function u(f){return d(1,f)}function d(f=1,p){let h=-1;return o(()=>(h+=1,h>=f),p)}return Array.isArray(n.toValue(e))?{toMatch:o,toContains:c,changed:u,changedTimes:d,get not(){return _c(e,!t)}}:{toMatch:o,toBe:r,toBeTruthy:a,toBeNull:l,toBeNaN:s,toBeUndefined:i,changed:u,changedTimes:d,get not(){return _c(e,!t)}}}function rh(e){return _c(e)}function hb(e,t,o={}){const{debounce:r=0,maxWait:a=void 0,...l}=o;return mb(e,t,{...l,eventFilter:oh(r,{maxWait:a})})}function gb(e,t,o){return n.watch(e,t,{...o,immediate:!0})}const Wr=nh?window:void 0;function Qt(e){var t;const o=n.toValue(e);return(t=o==null?void 0:o.$el)!=null?t:o}function Er(...e){const t=[],o=()=>{t.forEach(s=>s()),t.length=0},r=(s,c,u,d)=>(s.addEventListener(c,u,d),()=>s.removeEventListener(c,u,d)),a=n.computed(()=>{const s=ga(n.toValue(e[0])).filter(c=>c!=null);return s.every(c=>typeof c!="string")?s:void 0}),l=gb(()=>{var s,c;return[(c=(s=a.value)==null?void 0:s.map(u=>Qt(u)))!=null?c:[Wr].filter(u=>u!=null),ga(n.toValue(a.value?e[1]:e[0])),ga(n.unref(a.value?e[2]:e[1])),n.toValue(a.value?e[3]:e[2])]},([s,c,u,d])=>{if(o(),!(s!=null&&s.length)||!(c!=null&&c.length)||!(u!=null&&u.length))return;const f=ib(d)?{...d}:d;t.push(...s.flatMap(p=>c.flatMap(h=>u.map(m=>r(p,h,m,f)))))},{flush:"post"}),i=()=>{l(),o()};return Eu(o),i}let zd=!1;function vb(e,t,o={}){const{window:r=Wr,ignore:a=[],capture:l=!0,detectIframe:i=!1,controls:s=!1}=o;if(!r)return s?{stop:dn,cancel:dn,trigger:dn}:dn;if(sb&&!zd){zd=!0;const b={passive:!0};Array.from(r.document.body.children).forEach(v=>v.addEventListener("click",dn,b)),r.document.documentElement.addEventListener("click",dn,b)}let c=!0;const u=b=>n.toValue(a).some(v=>{if(typeof v=="string")return Array.from(r.document.querySelectorAll(v)).some(y=>y===b.target||b.composedPath().includes(y));{const y=Qt(v);return y&&(b.target===y||b.composedPath().includes(y))}});function d(b){const v=n.toValue(b);return v&&v.$.subTree.shapeFlag===16}function f(b,v){const y=n.toValue(b),_=y.$.subTree&&y.$.subTree.children;return _==null||!Array.isArray(_)?!1:_.some($=>$.el===v.target||v.composedPath().includes($.el))}const p=b=>{const v=Qt(e);if(b.target!=null&&!(!(v instanceof Element)&&d(e)&&f(e,b))&&!(!v||v===b.target||b.composedPath().includes(v))){if("detail"in b&&b.detail===0&&(c=!u(b)),!c){c=!0;return}t(b)}};let h=!1;const m=[Er(r,"click",b=>{h||(h=!0,setTimeout(()=>{h=!1},0),p(b))},{passive:!0,capture:l}),Er(r,"pointerdown",b=>{const v=Qt(e);c=!u(b)&&!!(v&&!b.composedPath().includes(v))},{passive:!0}),i&&Er(r,"blur",b=>{setTimeout(()=>{var v;const y=Qt(e);((v=r.document.activeElement)==null?void 0:v.tagName)==="IFRAME"&&!(y!=null&&y.contains(r.document.activeElement))&&t(b)},0)},{passive:!0})].filter(Boolean),g=()=>m.forEach(b=>b());return s?{stop:g,cancel:()=>{c=!1},trigger:b=>{c=!0,p(b),c=!1}}:g}function yb(){const e=n.shallowRef(!1),t=n.getCurrentInstance();return t&&n.onMounted(()=>{e.value=!0},t),e}function ah(e){const t=yb();return n.computed(()=>(t.value,!!e()))}function lh(e,t,o={}){const{window:r=Wr,...a}=o;let l;const i=ah(()=>r&&"ResizeObserver"in r),s=()=>{l&&(l.disconnect(),l=void 0)},c=n.computed(()=>{const f=n.toValue(e);return Array.isArray(f)?f.map(p=>Qt(p)):[Qt(f)]}),u=n.watch(c,f=>{if(s(),i.value&&r){l=new ResizeObserver(t);for(const p of f)p&&l.observe(p,a)}},{immediate:!0,flush:"post"}),d=()=>{s(),u()};return Eu(d),{isSupported:i,stop:d}}function bb(e,t={width:0,height:0},o={}){const{window:r=Wr,box:a="content-box"}=o,l=n.computed(()=>{var f,p;return(p=(f=Qt(e))==null?void 0:f.namespaceURI)==null?void 0:p.includes("svg")}),i=n.shallowRef(t.width),s=n.shallowRef(t.height),{stop:c}=lh(e,([f])=>{const p=a==="border-box"?f.borderBoxSize:a==="content-box"?f.contentBoxSize:f.devicePixelContentBoxSize;if(r&&l.value){const h=Qt(e);if(h){const m=h.getBoundingClientRect();i.value=m.width,s.value=m.height}}else if(p){const h=ga(p);i.value=h.reduce((m,{inlineSize:g})=>m+g,0),s.value=h.reduce((m,{blockSize:g})=>m+g,0)}else i.value=f.contentRect.width,s.value=f.contentRect.height},o);pb(()=>{const f=Qt(e);f&&(i.value="offsetWidth"in f?f.offsetWidth:t.width,s.value="offsetHeight"in f?f.offsetHeight:t.height)});const u=n.watch(()=>Qt(e),f=>{i.value=f?t.width:0,s.value=f?t.height:0});function d(){c(),u()}return{width:i,height:s,stop:d}}function ih(e,t,o={}){const{root:r,rootMargin:a="0px",threshold:l=0,window:i=Wr,immediate:s=!0}=o,c=ah(()=>i&&"IntersectionObserver"in i),u=n.computed(()=>{const m=n.toValue(e);return ga(m).map(Qt).filter(ab)});let d=dn;const f=n.shallowRef(s),p=c.value?n.watch(()=>[u.value,Qt(r),f.value],([m,g])=>{if(d(),!f.value||!m.length)return;const b=new IntersectionObserver(t,{root:Qt(g),rootMargin:a,threshold:l});m.forEach(v=>v&&b.observe(v)),d=()=>{b.disconnect(),d=dn}},{immediate:s,flush:"post"}):dn,h=()=>{d(),p(),f.value=!1};return Eu(h),{isSupported:c,isActive:f,pause(){d(),f.value=!1},resume(){f.value=!0},stop:h}}const _b=["mousemove","mousedown","resize","keydown","touchstart","wheel"],wb=6e4;function $b(e=wb,t={}){const{initialState:o=!1,listenForVisibilityChange:r=!0,events:a=_b,window:l=Wr,eventFilter:i=db(50)}=t,s=n.shallowRef(o),c=n.shallowRef(Rd());let u;const d=()=>{s.value=!1,clearTimeout(u),u=setTimeout(()=>s.value=!0,e)},f=Cu(i,()=>{c.value=Rd(),d()});if(l){const p=l.document,h={passive:!0};for(const m of a)Er(l,m,f,h);r&&Er(p,"visibilitychange",()=>{p.hidden||f()},h),o||d()}return{idle:s,lastActive:c,reset:d}}function kb(e,t){const{containerStyle:o,wrapperProps:r,scrollTo:a,calculateRange:l,currentList:i,containerRef:s}="itemHeight"in t?Sb(t,e):Cb(t,e);return{list:i,scrollTo:a,containerProps:{ref:s,onScroll:()=>{l()},style:o},wrapperProps:r}}function sh(e){const t=n.shallowRef(null),o=bb(t),r=n.ref([]),a=n.shallowRef(e);return{state:n.ref({start:0,end:10}),source:a,currentList:r,size:o,containerRef:t}}function ch(e,t,o){return r=>{if(typeof o=="number")return Math.ceil(r/o);const{start:a=0}=e.value;let l=0,i=0;for(let s=a;s<t.value.length;s++){const c=o(s);if(l+=c,i=s,l>r)break}return i-a}}function uh(e,t){return o=>{if(typeof t=="number")return Math.floor(o/t)+1;let r=0,a=0;for(let l=0;l<e.value.length;l++){const i=t(l);if(r+=i,r>=o){a=l;break}}return a+1}}function dh(e,t,o,r,{containerRef:a,state:l,currentList:i,source:s}){return()=>{const c=a.value;if(c){const u=o(e==="vertical"?c.scrollTop:c.scrollLeft),d=r(e==="vertical"?c.clientHeight:c.clientWidth),f=u-t,p=u+d+t;l.value={start:f<0?0:f,end:p>s.value.length?s.value.length:p},i.value=s.value.slice(l.value.start,l.value.end).map((h,m)=>({data:h,index:m+l.value.start}))}}}function fh(e,t){return o=>typeof e=="number"?o*e:t.value.slice(0,o).reduce((a,l,i)=>a+e(i),0)}function mh(e,t,o,r){n.watch([e.width,e.height,()=>n.toValue(t),o],()=>{r()})}function ph(e,t){return n.computed(()=>typeof e=="number"?t.value.length*e:t.value.reduce((o,r,a)=>o+e(a),0))}const Eb={horizontal:"scrollLeft",vertical:"scrollTop"};function hh(e,t,o,r){return a=>{r.value&&(r.value[Eb[e]]=o(a),t())}}function Cb(e,t){const o=sh(t),{state:r,source:a,currentList:l,size:i,containerRef:s}=o,c={overflowX:"auto"},{itemWidth:u,overscan:d=5}=e,f=ch(r,a,u),p=uh(a,u),h=dh("horizontal",d,p,f,o),m=fh(u,a),g=n.computed(()=>m(r.value.start)),b=ph(u,a);mh(i,t,s,h);const v=hh("horizontal",h,m,s),y=n.computed(()=>({style:{height:"100%",width:`${b.value-g.value}px`,marginLeft:`${g.value}px`,display:"flex"}}));return{scrollTo:v,calculateRange:h,wrapperProps:y,containerStyle:c,currentList:l,containerRef:s}}function Sb(e,t){const o=sh(t),{state:r,source:a,currentList:l,size:i,containerRef:s}=o,c={overflowY:"auto"},{itemHeight:u,overscan:d=5}=e,f=ch(r,a,u),p=uh(a,u),h=dh("vertical",d,p,f,o),m=fh(u,a),g=n.computed(()=>m(r.value.start)),b=ph(u,a);mh(i,t,s,h);const v=hh("vertical",h,m,s),y=n.computed(()=>({style:{width:"100%",height:`${b.value-g.value}px`,marginTop:`${g.value}px`}}));return{calculateRange:h,scrollTo:v,containerStyle:c,wrapperProps:y,currentList:l,containerRef:s}}const xb=["src"],Tb=["autoplay","muted","loop","controls","playsinline"],Nb=["src","type"],Db=n.defineComponent({__name:"BglVideo",props:{src:{},autoplay:{type:[Boolean,String]},mute:{type:Boolean},aspectRatio:{},controls:{type:Boolean},loop:{type:Boolean},status:{},playsinline:{type:Boolean}},setup(e,{expose:t}){const o=e,r=n.computed(()=>{var p,h,m;return((m=(h=(p=o.src)==null?void 0:p.split(".").pop())==null?void 0:h.split("?").shift())==null?void 0:m.toLowerCase())??"mp4"}),a=n.ref(),l=n.computed(()=>{var p;return((p=o.src)==null?void 0:p.includes("youtube.com/shorts/"))??!1}),i=n.computed(()=>{var p;return l.value?"9/16":((p=o.aspectRatio)==null?void 0:p.replace(":","/"))??"16/9"}),s=n.ref();function c(){var p;(p=s.value)==null||p.play()}function u(){var p;(p=s.value)==null||p.pause()}o.autoplay==="visible"&&ih(a,([{isIntersecting:p}])=>{p?c():u()},{threshold:.3}),n.watch(()=>o.status,p=>{p==="play"&&c(),p==="pause"&&u()}),t({play:c,pause:u});const d=n.computed(()=>{if(/youtube\.com|youtu\.be/.test(o.src??""))return"YouTube";if(/(?:player\.)?vimeo\.com/.test(o.src??""))return"Vimeo"}),f=n.computed(()=>{var p,h,m,g,b,v,y;if(d.value==="YouTube"){let _="";((p=o.src)==null?void 0:p.includes("youtube.com/shorts/"))===!0?_=((h=o.src.split("/shorts/")[1])==null?void 0:h.split("?")[0])??"":_=((b=(g=(m=o.src)==null?void 0:m.split(/v=|youtu\.be\//)[1])==null?void 0:g.split("&"))==null?void 0:b[0])??"";const $=new URLSearchParams({autoplay:o.autoplay===!0||o.autoplay==="visible"?"1":"0",controls:"0",showinfo:"0",modestbranding:"1"});return`https://www.youtube.com/embed/${_}?${$}`}if(d.value==="Vimeo"){const _=/player\.vimeo\.com\/video\/(\d+)/,$=/vimeo\.com\/(?:channels\/(?:\w+\/)?|groups\/([^/]*)\/videos\/|album\/(\d+)\/video\/)?(\d+)(?:$|\/|\?)/,w=((v=o.src)==null?void 0:v.match(_))??null,E=((y=o.src)==null?void 0:y.match($))??null,C=(w==null?void 0:w[1])??(E==null?void 0:E[3]);return console.log(C,{playerMatch:w,regularMatch:E}),`https://player.vimeo.com/video/${C}`}return o.src});return(p,h)=>(n.openBlock(),n.createElementBlock("div",{ref_key:"videoContainer",ref:a,class:n.normalizeClass(["bgl_vid",{vid_empty:!e.src,vid_short:l.value}])},[d.value?(n.openBlock(),n.createElementBlock("iframe",{key:0,src:f.value,style:n.normalizeStyle({aspectRatio:i.value}),frameborder:"0",title:"Video",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",referrerpolicy:"strict-origin-when-cross-origin",allowfullscreen:""},null,12,xb)):e.src?(n.openBlock(),n.createElementBlock("video",{key:1,ref_key:"video",ref:s,autoplay:e.autoplay===!0,muted:e.mute,loop:e.loop,style:n.normalizeStyle({aspectRatio:i.value}),controls:e.controls,playsinline:e.playsinline},[n.createElementVNode("source",{src:e.src,type:`video/${r.value}`},null,8,Nb)],12,Tb)):n.createCommentVNode("",!0)],2))}}),Su=Ve(Db,[["__scopeId","data-v-e3e85fb3"]]),Ab=n.defineComponent({__name:"CalendarPopover",props:{event:{},targetElement:{},position:{},show:{type:Boolean},hasEventContentSlot:{type:Boolean}},emits:["close","eventClick"],setup(e,{emit:t}){const o=e,r=t,{scrollY:a,scrollX:l,innerHeight:i,innerWidth:s}=fl(),c=n.ref(),u=n.computed(()=>{if(o.position){let{top:h,left:m}=o.position;return h-=80,h=Math.max(a.value+10,Math.min(h,i.value+a.value-150-10)),m=Math.max(l.value+10,Math.min(m,s.value+l.value-400-10)),{top:h,left:m,width:400,height:150}}if(o.targetElement&&o.show){const m=o.targetElement.getBoundingClientRect();let g=m.top+a.value+m.height/2-150/2,b=m.left+l.value+m.width+10;return g=Math.max(a.value+10,Math.min(g,i.value+a.value-150-10)),b+400>s.value+l.value&&(b=m.left+l.value-400+m.width-10),b<l.value&&(b=m.right+l.value+10),{top:g,left:b,width:400,height:150}}return{top:0,left:0,width:400,height:150}});function d(){r("close")}return(f,p)=>{const h=n.resolveDirective("click-outside");return e.show&&e.event?n.withDirectives((n.openBlock(),n.createBlock(n.unref(en),{key:0,ref_key:"popoverRef",ref:c,thin:"",class:"custom-popover",style:n.normalizeStyle({top:`${u.value.top}px`,left:`${u.value.left}px`,maxWidth:`${u.value.width}px`})},{default:n.withCtx(()=>[n.renderSlot(f.$slots,"eventContent",{event:e.event,close:d},void 0,!0)]),_:3},8,["style"])),[[h,d]]):n.createCommentVNode("",!0)}}}),Bb=Ve(Ab,[["__scopeId","data-v-83810b56"]]),Vb={class:"agenda-view"},Lb=["data-date","onClick"],Mb={class:"event-content"},Pb={class:"event-time"},Ib={class:"event-details"},Ob={class:"event-title"},Rb=n.defineComponent({__name:"AgendaView",props:{events:{},startDate:{}},emits:["eventClick","dateChange","openPopover"],setup(e,{emit:t}){const o=e,r=t,a=n.useSlots(),l=n.ref(null),i=n.ref(null),s=n.computed(()=>{const d=[],f=new Date().toDateString(),h=[...o.events].sort((m,g)=>new Date(m.start_time).getTime()-new Date(g.start_time).getTime()).reduce((m,g)=>{const b=new Date(g.start_time).toDateString();return m[b]||(m[b]=[]),m[b].push(g),m},{});return Object.entries(h).forEach(([m,g])=>{const b=new Date(m),v=b.toDateString()===f;g.forEach(y=>{const _=(new Date(y.end_time).getTime()-new Date(y.start_time).getTime())/6e4,$=Math.min(_/30*60,200);d.push({...y,dayLabel:b.toLocaleDateString("en-US",{weekday:"long",month:"long",day:"numeric"}),isToday:v,height:$})})}),d});function c(){if(!l.value)return;const d=l.value,f=d.querySelectorAll(".event");let p=null,h=0;if(f.forEach(m=>{const g=m.getBoundingClientRect(),b=d.getBoundingClientRect(),v=Math.max(g.top,b.top),y=Math.min(g.bottom,b.bottom),$=Math.max(0,y-v)/g.height;$>h&&(h=$,p=m)}),p){const m=p,g=m.dataset.date||m.getAttribute("data-date");if(g){const b=new Date(g);(!i.value||b.toDateString()!==i.value.toDateString())&&(i.value=b,r("dateChange",b))}}}function u(d,f){if(!a.eventContent){r("eventClick",d);return}if(f){const p=f.currentTarget.getBoundingClientRect(),h={top:p.top+window.scrollY+p.height/2,left:p.left+window.scrollX+p.width+10};r("openPopover",d,h)}else r("openPopover",d)}return n.onMounted(()=>{l.value&&l.value.addEventListener("scroll",c)}),n.onUnmounted(()=>{l.value&&l.value.removeEventListener("scroll",c)}),(d,f)=>(n.openBlock(),n.createElementBlock("div",Vb,[f[0]||(f[0]=n.createElementVNode("div",{class:"agenda-header"},[n.createElementVNode("div",{class:"time-column"}," Time "),n.createElementVNode("div",{class:"event-column"}," Event ")],-1)),n.createElementVNode("div",{ref_key:"containerRef",ref:l,class:"agenda-content"},[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(s.value,p=>(n.openBlock(),n.createElementBlock("div",{key:p.id,class:"event",style:n.normalizeStyle({backgroundColor:p.color||"var(--bgl-primary)"}),"data-date":p.start_time,onClick:n.withModifiers(h=>u(p,h),["stop"])},[n.createElementVNode("div",Mb,[n.createElementVNode("div",Pb,n.toDisplayString(n.unref(Tt)(p.start_time,{format:"HH:mm"})),1),n.createElementVNode("div",Ib,[n.createElementVNode("div",Ob,n.toDisplayString(p.title),1),n.createElementVNode("div",{class:n.normalizeClass(["event-day",{today:p.isToday}])},n.toDisplayString(p.dayLabel),3)])])],12,Lb))),128))],512)]))}}),Fb=Ve(Rb,[["__scopeId","data-v-177b4748"]]),zb={class:"w-100p overflow-hidden m_overflow h-100p grid"},Ub={class:"border-bottom me-1 txt-center p-05 dayGrid"},Hb={class:"overflow h-100p pe-05"},jb={class:"time-column"},Wb={class:"events-column"},qb=["onClick"],Gb={class:"event-content"},Yb={class:"white-space ellipsis-1"},Xb={class:"event-time opacity-8"},Kb={class:"color-primary txt-12 p-025"},ea=60,ta=60,Jb=n.defineComponent({__name:"DayView",props:{events:{},startDate:{}},emits:["eventClick","eventCreate","openPopover"],setup(e,{emit:t}){const o=e,r=t,a=n.useSlots(),l={start:0,end:24},i=n.ref({isDragging:!1,start:null,end:null,startTime:null,endTime:null}),s=n.ref(0),c=n.ref(!1),u=n.ref(null),d=n.computed(()=>{const y=[];for(let _=l.start;_<l.end;_++)for(let $=0;$<60;$+=ta)y.push({hour:_,minute:$,time:`${_.toString().padStart(2,"0")}:${$.toString().padStart(2,"0")}`});return y}),f=n.computed(()=>o.events.filter(y=>new Date(y.start_time).toDateString()===o.startDate.toDateString()).map(y=>{const _=new Date(y.start_time),$=new Date(y.end_time),w=_.getHours()*60+_.getMinutes(),E=$.getHours()*60+$.getMinutes(),C=w/ta*ea,A=Math.max((E-w)/ta*ea,30);return{...y,top:C,height:A}}));function p(){const y=new Date;c.value=y.toDateString()===o.startDate.toDateString();const _=y.getHours()*60+y.getMinutes();s.value=_/ta*ea}function h(y){y.target.closest(".time-slot")&&(i.value.isDragging=!0,i.value.start={x:y.clientX,y:y.clientY},i.value.startTime=b(y.clientY),document.addEventListener("mousemove",m),document.addEventListener("mouseup",g))}function m(y){i.value.isDragging&&(i.value.end={x:y.clientX,y:y.clientY},i.value.endTime=b(y.clientY))}function g(){if(!i.value.isDragging||!i.value.startTime||!i.value.endTime)return;let y=new Date(i.value.startTime),_=new Date(i.value.endTime);_<y&&([y,_]=[_,y]),r("eventCreate",{start_time:y,end_time:_}),i.value={isDragging:!1,start:null,end:null,startTime:null,endTime:null},document.removeEventListener("mousemove",m),document.removeEventListener("mouseup",g)}function b(y){var T;const _=(T=document.querySelector(".time-slots"))==null?void 0:T.getBoundingClientRect();if(!_)return new Date;const $=y-_.top,w=ta,E=$/ea,C=Math.floor(E*w),A=new Date(o.startDate);return A.setHours(Math.floor(C/60)),A.setMinutes(C%60),A.setSeconds(0),A.setMilliseconds(0),A}function v(y,_){if(!a.eventContent){r("eventClick",y);return}if(_){const $=_.currentTarget.getBoundingClientRect(),w={top:$.top+window.scrollY+$.height/2,left:$.left+window.scrollX+$.width+10};r("openPopover",y,w)}else r("openPopover",y)}return n.onMounted(()=>{document.addEventListener("mousedown",h),p(),u.value=setInterval(p,6e4)}),n.onUnmounted(()=>{document.removeEventListener("mousedown",h),document.removeEventListener("mousemove",m),document.removeEventListener("mouseup",g),u.value&&clearInterval(u.value)}),(y,_)=>(n.openBlock(),n.createElementBlock("div",zb,[n.createElementVNode("div",Ub,[_[0]||(_[0]=n.createElementVNode("div",null,null,-1)),n.createElementVNode("div",null,n.toDisplayString(n.unref(Tt)(e.startDate)),1)]),n.createElementVNode("div",Hb,[n.createElementVNode("div",{class:"time-slots dayGrid border-end relative",onMousedown:h},[n.createElementVNode("div",jb,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(d.value,$=>(n.openBlock(),n.createElementBlock("div",{key:$.time,class:"time-slot txt-light txt-12 color-gray bg-gray-light border-start",style:n.normalizeStyle({height:`${ea}px`})},n.toDisplayString($.time),5))),128))]),n.createElementVNode("div",Wb,[c.value?(n.openBlock(),n.createElementBlock("div",{key:0,class:"absolute end w-100p z-2 flex pointer-events-none",style:n.normalizeStyle({top:`${s.value}px`})},[..._[1]||(_[1]=[n.createElementVNode("div",{class:"current-time-dot h-10px aspect-ratio-1 round bg-primary"},null,-1),n.createElementVNode("div",{class:"current-time-line w-100p bg-primary"},null,-1)])],4)):n.createCommentVNode("",!0),(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(f.value,$=>(n.openBlock(),n.createElementBlock("div",{key:$.id,class:"event absolute radius-05 overflow-hidden pointer transition z-1",style:n.normalizeStyle({top:`${$.top}px`,height:`${$.height}px`,backgroundColor:$.color||"var(--bgl-primary)"}),onClick:n.withModifiers(w=>v($,w),["stop"])},[n.createElementVNode("div",Gb,[n.createElementVNode("div",Yb,n.toDisplayString($.title),1),n.createElementVNode("div",Xb,n.toDisplayString(n.unref(Tt)(new Date($.start_time),{format:"HH:mm"}))+" - "+n.toDisplayString(n.unref(Tt)(new Date($.end_time),{format:"HH:mm"})),1)])],12,qb))),128))]),i.value.isDragging&&i.value.start&&i.value.end?(n.openBlock(),n.createElementBlock("div",{key:0,class:"drag-preview absolute bg-primary-tint pointer-events-none z-1",style:n.normalizeStyle({top:`${Math.min(i.value.start.y,i.value.end.y)}px`,height:`${Math.abs(i.value.end.y-i.value.start.y)}px`,left:"10px",right:"10px"})},[n.createElementVNode("div",Kb,n.toDisplayString(i.value.startTime?n.unref(Tt)(i.value.startTime,{format:"HH:mm"}):"")+" - "+n.toDisplayString(i.value.endTime?n.unref(Tt)(i.value.endTime,{format:"HH:mm"}):""),1)],4)):n.createCommentVNode("",!0)],32)]),_[2]||(_[2]=n.createElementVNode("div",{class:"border-bottom me-1"},null,-1))]))}}),Zb=Ve(Jb,[["__scopeId","data-v-439da8fc"]]),Qb={class:"month-view"},e_={class:"month-header"},t_={class:"month-grid"},n_={class:"day-number"},o_={class:"day-events"},r_={key:0,class:"event-dot"},a_=["onClick"],l_={class:"event-title"},i_={class:"event-time"},s_=n.defineComponent({__name:"MonthView",props:{events:{},startDate:{}},emits:["eventClick","openPopover"],setup(e,{emit:t}){const o=e,r=t,a=n.useSlots(),l=n.computed(()=>window.innerWidth<768),i=n.computed(()=>["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]),s=n.computed(()=>{const u=o.startDate.getFullYear(),d=o.startDate.getMonth(),f=new Date(u,d,1),h=new Date(u,d+1,0).getDate(),m=f.getDay(),g=new Date().toDateString(),b=[],v=new Date(u,d,0).getDate();for(let _=m-1;_>=0;_--){const $=new Date(u,d-1,v-_);b.push({date:$,events:[],isToday:!1,isCurrentMonth:!1})}for(let _=1;_<=h;_++){const $=new Date(u,d,_),w=o.events.filter(E=>{const C=new Date(E.start_time);return C.getDate()===_&&C.getMonth()===d&&C.getFullYear()===u});b.push({date:$,events:w,isToday:$.toDateString()===g,isCurrentMonth:!0})}const y=42-b.length;for(let _=1;_<=y;_++){const $=new Date(u,d+1,_);b.push({date:$,events:[],isToday:!1,isCurrentMonth:!1})}return b});function c(u,d){if(!a.eventContent){r("eventClick",u);return}if(d){const f=d.currentTarget.getBoundingClientRect(),p={top:f.top+window.scrollY+f.height/2,left:f.left+window.scrollX+f.width+10};r("openPopover",u,p)}else r("openPopover",u)}return(u,d)=>(n.openBlock(),n.createElementBlock("div",Qb,[n.createElementVNode("div",e_,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(i.value,f=>(n.openBlock(),n.createElementBlock("div",{key:f,class:"weekday"},n.toDisplayString(f),1))),128))]),n.createElementVNode("div",t_,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(s.value,f=>(n.openBlock(),n.createElementBlock("div",{key:f.date.toISOString(),class:n.normalizeClass(["day-cell",{"current-month":f.isCurrentMonth,today:f.isToday,"other-month":!f.isCurrentMonth}])},[n.createElementVNode("div",n_,n.toDisplayString(n.unref(Tt)(f.date,{format:"DD"})),1),n.createElementVNode("div",o_,[l.value?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[f.events.length>0?(n.openBlock(),n.createElementBlock("div",r_)):n.createCommentVNode("",!0)],64)):(n.openBlock(!0),n.createElementBlock(n.Fragment,{key:1},n.renderList(f.events,p=>(n.openBlock(),n.createElementBlock("div",{key:p.id,class:"event-item",style:n.normalizeStyle({backgroundColor:p.color||"var(--bgl-primary)"}),onClick:n.withModifiers(h=>c(p,h),["stop"])},[n.createElementVNode("div",l_,n.toDisplayString(p.title),1),n.createElementVNode("div",i_,n.toDisplayString(n.unref(Tt)(p.start_time,"HH:mm")),1)],12,a_))),128))])],2))),128))])]))}}),c_=Ve(s_,[["__scopeId","data-v-0406529e"]]),u_={class:"w-100p overflow-hidden m_overflow h-100p grid"},d_=["onMousedown"],f_=["onClick"],m_={class:"overflow-hidden color-white p-025 txt12 h-100p"},p_={class:"white-space ellipsis-1"},h_={class:"txt10 opacity-8 user-select-none"},g_={class:"color-primary txt-12 p-025"},$o=60,Fo=60,v_=n.defineComponent({__name:"WeekView",props:{events:{default:()=>[]},startDate:{default:()=>new Date},weekStart:{default:"Sunday"}},emits:["eventClick","eventCreate","openPopover"],setup(e,{emit:t}){const o=e,r=t,a=n.useSlots(),l={start:0,end:24},i=n.computed(()=>!!a.eventCreate||r.hasOwnProperty("eventCreate")),s=n.ref({isDragging:!1,startDay:-1,endDay:-1,start:void 0,end:void 0,startTime:void 0,endTime:void 0}),c=n.ref(0),u=n.ref(!1),d=n.ref(),f=n.ref(),p=n.ref(),h=n.ref([]),m=n.ref(),g=n.ref(),b=n.computed(()=>{const k=[],S=new Date(o.startDate),V=o.weekStart==="Sunday"?0:1,D=S.getDay();S.setDate(S.getDate()-D+V),S.setHours(0,0,0,0);for(let L=0;L<7;L++){const I=new Date(S);I.setDate(S.getDate()+L),k.push(I)}return k}),v=n.computed(()=>{const k=[];for(let S=l.start;S<l.end;S++)for(let V=0;V<60;V+=Fo)k.push({hour:S,minute:V,time:`${S.toString().padStart(2,"0")}:${V.toString().padStart(2,"0")}`});return k}),y=n.computed(()=>{if(!s.value.isDragging||!s.value.startTime||!s.value.endTime)return null;const k=s.value.startTime.getHours()*60+s.value.startTime.getMinutes(),S=s.value.endTime.getHours()*60+s.value.endTime.getMinutes(),V=k/Fo*$o,D=Math.max((S-k)/Fo*$o,30);return{top:V,height:D}}),_=n.computed(()=>{const k=[],S={};return o.events.forEach(V=>{const D=new Date(V.start_time),L=new Date(V.end_time),I=b.value.findIndex(H=>H.getDate()===D.getDate()&&H.getMonth()===D.getMonth()&&H.getFullYear()===D.getFullYear());if(I===-1)return;const M=D.getHours()*60+D.getMinutes(),te=L.getHours()*60+L.getMinutes(),ee=M/Fo*$o,O=Math.max((te-M)/Fo*$o,30),z={...V,top:ee,height:O,left:0,width:100,overlappingEvents:0,position:0};S[I]||(S[I]=[]),S[I].push(z)}),Object.entries(S).forEach(([V,D])=>{D.sort((M,te)=>new Date(M.start_time).getTime()-new Date(te.start_time).getTime());const L=[];let I=[];D.forEach(M=>{I.length===0?I=[M]:I.some(ee=>{const O=new Date(M.start_time).getTime(),z=new Date(M.end_time).getTime(),H=new Date(ee.start_time).getTime(),Z=new Date(ee.end_time).getTime();return!(z<=H||O>=Z)})?I.push(M):(I.length>0&&L.push([...I]),I=[M])}),I.length>0&&L.push(I),L.forEach(M=>{if(M.length>1){const O=(100-2*(M.length-1))/M.length;M.forEach((z,H)=>{z.overlappingEvents=M.length,z.position=H,z.width=O,z.left=H*(O+2)})}k.push(...M)})}),k});function $(k,S){if(!i.value||!p.value||!m.value)return;let V=-1;for(let M=0;M<h.value.length;M++){const te=h.value[M];if(!te)continue;const ee=te.getBoundingClientRect();if(k.clientX>=ee.left&&k.clientX<=ee.right){V=M;break}}if(V===-1)return;const D=h.value[V].getBoundingClientRect(),L=m.value.getBoundingClientRect();s.value.isDragging=!0,s.value.startDay=V,s.value.endDay=V,s.value.start={x:D.left-L.left,y:k.clientY-L.top},s.value.end={x:D.right-L.left,y:k.clientY-L.top};const I=C(k.clientY,S);s.value.startTime=I,document.addEventListener("mousemove",w),document.addEventListener("mouseup",E)}function w(k){if(!i.value||!s.value.isDragging||!s.value.start||!h.value.length||!p.value||!m.value)return;let S=-1;for(let V=0;V<h.value.length;V++){const D=h.value[V];if(!D)continue;const L=D.getBoundingClientRect();if(k.clientX>=L.left&&k.clientX<=L.right){S=V;break}}if(S!==-1&&(s.value.endDay=S,s.value.end={x:s.value.start.x,y:k.clientY-m.value.getBoundingClientRect().top},S>=0&&S<b.value.length)){const V=new Date(b.value[s.value.startDay]);V.setHours(0,0,0,0);const D=C(k.clientY,V);s.value.endTime=D}}function E(){if(!i.value||!s.value.isDragging||!s.value.startTime||!s.value.endTime)return;let k=new Date(s.value.startTime),S=new Date(s.value.endTime);S<k&&([k,S]=[S,k]),r("eventCreate",{start_time:k,end_time:S}),s.value={isDragging:!1,startDay:-1,endDay:-1,start:void 0,end:void 0,startTime:void 0,endTime:void 0},document.removeEventListener("mousemove",w),document.removeEventListener("mouseup",E)}function C(k,S){if(!m.value)return new Date(S);const V=m.value.getBoundingClientRect(),D=k-V.top,L=Fo,I=D/$o,M=Math.floor(I*L),te=new Date(S);te.setHours(Math.floor(M/60));const ee=Math.round(M%60/5)*5;return te.setMinutes(ee),te.setSeconds(0),te.setMilliseconds(0),te}function A(){const k=new Date;u.value=b.value.some(V=>V.getDate()===k.getDate()&&V.getMonth()===k.getMonth()&&V.getFullYear()===k.getFullYear());const S=k.getHours()*60+k.getMinutes();c.value=S/Fo*$o}function T(k,S){if(!a.eventContent){r("eventClick",k);return}if(S){const V=S.currentTarget.getBoundingClientRect(),D={top:V.top+window.scrollY+V.height/2,left:V.left+window.scrollX+V.width+10};r("openPopover",k,D)}else r("openPopover",k)}function B(k,S){for(;h.value.length<=S;)h.value.push(null);k?h.value[S]=k instanceof Element?k:k.$el:h.value[S]=null}function P(k){g.value&&(g.value.scrollTop=k*$o)}return n.onMounted(()=>{A(),d.value=setInterval(A,6e4),n.nextTick(()=>{P(6)})}),n.onUnmounted(()=>{document.removeEventListener("mousemove",w),document.removeEventListener("mouseup",E),d.value&&clearInterval(d.value)}),(k,S)=>{var V;return n.openBlock(),n.createElementBlock("div",u_,[n.createElementVNode("div",{ref_key:"calendarGrid",ref:p,class:"weekGrid border-bottom me-1"},[S[1]||(S[1]=n.createElementVNode("div",null,null,-1)),(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(b.value,D=>(n.openBlock(),n.createElementBlock("div",{key:D.toISOString(),class:"day-header p-05 txt-center m_txt12"},[n.createTextVNode(n.toDisplayString(n.unref(Tt)(D,{format:"DDD"}))+" ",1),n.createElementVNode("span",{class:n.normalizeClass(["txt-12 round p-025",{"color-gray":D.toDateString()!==new Date().toDateString(),"bg-primary color-white":D.toDateString()===new Date().toDateString()}])},n.toDisplayString(n.unref(Tt)(D,{format:"DD"})),3)]))),128))],512),n.createElementVNode("div",{ref_key:"scrollableContainer",ref:g,class:"overflow h-100p pe-05"},[n.createElementVNode("div",{ref_key:"dayColumnsContainer",ref:m,class:"weekGrid border-end relative"},[n.createElementVNode("div",{ref_key:"timeSlotsContainer",ref:f},[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(v.value,D=>(n.openBlock(),n.createElementBlock("div",{key:D.time,class:"txt-light txt-12 color-gray flex justify-content-center bg-gray-light border-start",style:n.normalizeStyle({height:`${$o}px`})},n.toDisplayString(D.time),5))),128))],512),u.value?(n.openBlock(),n.createElementBlock("div",{key:0,class:"absolute end w-100p z-2 flex pointer-events-none ps-4-5",style:n.normalizeStyle({top:`${c.value}px`})},[...S[2]||(S[2]=[n.createElementVNode("div",{class:"current-time-dot h-10px aspect-ratio-1 round bg-primary"},null,-1),n.createElementVNode("div",{class:"current-time-line w-100p bg-primary"},null,-1)])],4)):n.createCommentVNode("",!0),(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(b.value,(D,L)=>(n.openBlock(),n.createElementBlock("div",{key:D.toISOString(),ref_for:!0,ref:I=>B(I,L),class:"day-column top bottom border-start relative",onMousedown:I=>$(I,D)},[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(_.value.filter(I=>new Date(I.start_time).toDateString()===D.toDateString()),I=>(n.openBlock(),n.createElementBlock("div",{key:I.id,class:"event absolute radius-05 overflow-hidden pointer transition z-1 opacity-8 border",style:n.normalizeStyle({top:`${I.top}px`,height:`${I.height}px`,left:`${I.left}%`,width:`${I.width}%`,backgroundColor:I.color||"var(--bgl-primary)"}),onMousedown:S[0]||(S[0]=n.withModifiers(()=>{},["stop"])),onClick:n.withModifiers(M=>T(I,M),["stop"])},[n.createElementVNode("div",m_,[n.createElementVNode("div",p_,n.toDisplayString(I.title),1),n.createElementVNode("div",h_,n.toDisplayString(n.unref(Tt)(I.start_time,{format:"HH:mm"}))+" - "+n.toDisplayString(n.unref(Tt)(I.end_time,{format:"HH:mm"})),1)])],44,f_))),128))],40,d_))),128)),i.value&&s.value.isDragging&&s.value.start&&s.value.end&&y.value?(n.openBlock(),n.createElementBlock("div",{key:1,class:"drag-preview absolute bg-primary-tint pointer-events-none overflow-hidden opacity-7 z-1",style:n.normalizeStyle({left:`${s.value.start.x}px`,top:`${y.value.top}px`,width:`${((V=h.value[s.value.startDay])==null?void 0:V.offsetWidth)||100}px`,height:`${y.value.height}px`})},[n.createElementVNode("div",g_,n.toDisplayString(s.value.startTime?n.unref(Tt)(s.value.startTime,{format:"HH:mm"}):"")+" - "+n.toDisplayString(s.value.endTime?n.unref(Tt)(s.value.endTime,{format:"HH:mm"}):""),1)],4)):n.createCommentVNode("",!0)],512)],512),S[3]||(S[3]=n.createElementVNode("div",{class:"border-bottom me-1"},null,-1))])}}}),y_=Ve(v_,[["__scopeId","data-v-383c5921"]]),b_={class:"calendar"},__={class:"flex m_block m_pb-1"},w_={class:"txt-light my-0 m_pb-1"},$_={class:"ms-auto flex gap-025"},k_=n.defineComponent({__name:"Index",props:{events:{default:()=>[]},startDate:{default:()=>new Date},view:{default:"Week"},weekStart:{default:"Sunday"}},emits:["eventClick","eventCreate","eventUpdate","eventDelete","dateChange","viewChange","ready"],setup(e,{expose:t,emit:o}){const r=e,a=o,l=n.ref(new Date(r.startDate)),i=n.ref(r.view),s=n.ref(),c=n.ref(!1),u=n.ref(),d={Week:y_,Month:c_,Day:Zb,Agenda:Fb},f=n.computed(()=>{const w=new Date(l.value);let E=new Date(l.value);const C=r.weekStart==="Sunday"?0:1;switch(i.value){case"Week":w.setDate(w.getDate()-w.getDay()+C),E.setDate(w.getDate()+6);break;case"Month":case"Agenda":w.setDate(-6),E=new Date(w.getFullYear(),w.getMonth()+2,7);break;case"Day":E.setDate(E.getDate()+1);break;default:console.error(`Invalid view: ${i.value}`)}return{start:w,end:E}}),p=n.computed(()=>({visibleDateRange:f.value,currentDate:l.value,currentView:i.value}));function h(w){console.log("handleDateChange",w),l.value=new Date(w),a("dateChange",p.value)}function m(w){i.value=w,a("viewChange",p.value)}function g(w){a("eventClick",w)}function b(w){a("eventCreate",w)}function v(w){a("eventUpdate",w)}function y(w){a("eventDelete",w)}function _(w,E){s.value=w,u.value=E,c.value=!0}function $(){c.value=!1,s.value=void 0,u.value=void 0}return t({visibleDateRange:f,currentView:i,currentDate:l,openPopover:_,closePopover:$}),n.onMounted(()=>{a("ready",p.value)}),(w,E)=>(n.openBlock(),n.createElementBlock("div",b_,[n.createElementVNode("div",__,[n.createElementVNode("h3",w_,[n.createElementVNode("b",null,n.toDisplayString(n.unref(Tt)(l.value,"MMMM")),1),n.createTextVNode(" "+n.toDisplayString(n.unref(Tt)(l.value,"YYYY")),1)]),n.createElementVNode("div",$_,[n.createVNode(n.unref(on),{thin:"",value:i.value,iconEnd:"keyboard_arrow_down",color:"gray"},{default:n.withCtx(()=>[(n.openBlock(),n.createElementBlock(n.Fragment,null,n.renderList(d,(C,A)=>n.createVNode(n.unref(Wn),{key:A,thin:"",title:A,onClick:T=>m(A)},null,8,["title","onClick"])),64))]),_:1},8,["value"]),n.createVNode(n.unref(ne),{icon:"calendar",thin:"",color:"gray",value:"Today",onClick:E[0]||(E[0]=C=>h(new Date))}),n.createVNode(n.unref(ne),{icon:"chevron_left",color:"gray",thin:"",onClick:E[1]||(E[1]=C=>h(n.unref(ku)(l.value,{[i.value]:-1})))}),n.createVNode(n.unref(ne),{icon:"chevron_right",color:"gray",thin:"",onClick:E[2]||(E[2]=C=>h(n.unref(ku)(l.value,{[i.value]:1})))})])]),(n.openBlock(),n.createBlock(n.resolveDynamicComponent(d[i.value]),{events:e.events,"start-date":l.value,"week-start":e.weekStart,onEventClick:g,onEventCreate:b,onEventUpdate:v,onEventDelete:y,onDateChange:h,onOpenPopover:_},{eventContent:n.withCtx(({event:C,close:A})=>[n.renderSlot(w.$slots,"eventContent",{event:C,close:A},void 0,!0)]),_:3},40,["events","start-date","week-start"])),n.createVNode(Bb,{event:s.value,position:u.value,show:c.value,"has-event-content-slot":!!w.$slots.eventContent,onClose:$,onEventClick:g},{eventContent:n.withCtx(({event:C,close:A})=>[n.renderSlot(w.$slots,"eventContent",{event:C,close:A},void 0,!0)]),_:3},8,["event","position","show","has-event-content-slot"])]))}}),E_=Ve(k_,[["__scopeId","data-v-56cb2fe4"]]),C_={key:0,class:"card_label"},en=n.defineComponent({__name:"Card",props:{label:{},thin:{type:Boolean},outline:{type:Boolean},h100:{type:Boolean},to:{},href:{},overflowX:{type:Boolean},overflowY:{type:Boolean},frame:{type:Boolean},bg:{}},setup(e){const t=e,o=n.computed(()=>{const a={};return t.href!==void 0&&t.href!==""?a.href=t.href:t.to!==void 0&&t.to!==""&&(a.to=t.to),a}),r=n.computed(()=>t.href!==void 0&&t.href!==""?"a":t.to!==void 0&&t.to!==""?"router-link":"div");return(a,l)=>{const i=n.resolveDirective("ripple");return n.withDirectives((n.openBlock(),n.createBlock(n.resolveDynamicComponent(r.value),n.mergeProps(o.value,{class:["bgl_card",{thin:e.thin,border:e.outline,"h-100":e.h100,[e.bg||""]:e.bg,"overflow-x":e.overflowX,"overflow-y":e.overflowY,card_frame:e.frame}]}),{default:n.withCtx(()=>[e.label?(n.openBlock(),n.createElementBlock("span",C_,n.toDisplayString(e.label),1)):n.createCommentVNode("",!0),n.renderSlot(a.$slots,"default")]),_:3},16,["class"])),[[i,!!e.to]])}}}),S_=["dir"],x_={key:0,class:"dots"},T_=["onClick"],na=1,Ud=100,N_=n.defineComponent({__name:"Carousel",props:{autoHeight:{type:Boolean,default:!1},allowScroll:{type:Boolean,default:!0},freeDrag:{type:Boolean,default:!0},items:{type:Number,default:4},index:{type:Number,default:0},rtl:{type:Boolean,default:!1},autoplay:{type:Boolean,default:!1},autoPlaySpeed:{type:Number,default:4e3},dots:{type:Boolean,default:!1}},emits:["update:index"],setup(e,{expose:t,emit:o}){const r=e,a=o,l={TOUCH:150,MOBILE:420,DESKTOP:840,MAX_DURATION:300,BASE_DURATION:150,DURATION_PER_PANEL:50},i={DRAG:20,TOUCH:5,SWIPE_PERCENT:.1,VELOCITY:.15,WHEEL_PERCENT:.3},s=n.ref(),c=n.computed(()=>!!s.value),u=n.ref(r.items),d=n.ref(r.index),f=n.ref(0),p=n.ref("auto"),h=n.ref(!1),m=n.ref(!1),g=n.ref(0),b=n.ref(0),v=n.ref(0),y=n.ref(0),_=n.ref(0),$=n.ref(0);let w,E;const C=n.ref([]);function A(){if(C.value.length<2)return 0;const de=Date.now(),Se=C.value.filter(R=>de-R.time<Ud);if(Se.length<2)return 0;const[$e]=Se,ae=Se[Se.length-1],we=ae.time-$e.time;return we===0?0:(ae.position-$e.position)/we}function T(){if(!s.value)return 0;const{transform:de}=s.value.style,Se=de?Number.parseInt(de.replace(/[^-\d.]/g,""),10):0;return r.rtl?-Se:Se}function B(de){if(!s.value)return;const Se=r.rtl?-de:de;s.value.style.transform=`translateX(${Se}px)`}function P(de){return de<.5?2*de*de:-1+(4-2*de)*de}function k(de,Se,$e){const ae=performance.now();function we(R){if(!c.value)return;const q=R-ae,fe=Math.min(q/$e,1),be=de+(Se-de)*P(fe);B(be),fe<1&&requestAnimationFrame(we)}requestAnimationFrame(we)}function S(de,Se=!1){if(M(),!c.value||!s.value||de<0||de>=f.value)return;const $e=s.value.offsetWidth,ae=$e*na/100,we=(u.value-1)*ae,R=($e-we)/u.value,q=de*ae,fe=-(R*de+q),be=T(),Oe=Se?l.TOUCH:window.innerWidth<600?l.MOBILE:l.DESKTOP;k(be,fe,Oe),d.value=de,I()}function V(){if(!c.value)return;M();const de=r.rtl?(d.value-1+f.value)%f.value:(d.value+1)%f.value;S(de)}function D(){if(!c.value)return;M();const de=r.rtl?(d.value+1)%f.value:(d.value-1+f.value)%f.value;S(de)}function L(){if(!(!c.value||!s.value))try{const de=s.value.children[d.value];if(!de||!(de instanceof HTMLElement))return;const $e=Array.from(de.children).reduce((ae,we)=>ae+we.clientHeight,0);p.value=`${$e}px`}catch(de){console.error("Error calculating height:",de)}}function I(){r.autoHeight&&setTimeout(L,200)}function M(){!c.value||!s.value||(f.value=s.value.children.length)}function te(){r.index!==d.value&&a("update:index",d.value)}function ee(){if(!c.value||!s.value)return;u.value=window.innerWidth<600?1:window.innerWidth<991?Math.min(r.items,2):r.items;const de=s.value.offsetWidth,Se=de*na/100,$e=(u.value-1)*Se,ae=(de-$e)/u.value,we=d.value*Se,R=-(ae*d.value+we);B(R),I()}function O(){E&&clearInterval(E)}function z(de){h.value&&(de.preventDefault(),de.stopPropagation())}async function H(){if(await n.nextTick(),!c.value||!s.value)return;Array.from(s.value.querySelectorAll("img, a")).forEach($e=>{$e.setAttribute("draggable","false"),$e.removeEventListener("click",z,!0),$e.addEventListener("click",z,!0)}),Array.from(s.value.children).forEach($e=>{const ae=$e;ae.setAttribute("draggable","false"),ae.removeEventListener("click",z,!0),ae.addEventListener("click",z,!0)})}function Z(de){de.stopPropagation(),!(de.button!==0||!r.freeDrag||!c.value)&&(O(),g.value=de.pageX,v.value=T(),m.value=!0,h.value=!1,document.addEventListener("mousemove",ie),document.addEventListener("mouseup",pe))}function ie(de){if(!c.value||!s.value||!m.value)return;const $e=de.pageX-g.value;if(Math.abs($e)>i.DRAG&&(h.value=!0),h.value){const ae=v.value+(r.rtl?-$e:$e),we=0,R=s.value.offsetWidth,q=R*na/100,fe=(u.value-1)*q,Oe=-((R-fe)/u.value*(f.value-1)+q*(f.value-1)),Ye=Math.max(Oe,Math.min(we,ae));B(Ye)}}function pe(){if(m.value=!1,document.removeEventListener("mousemove",ie),document.removeEventListener("mouseup",pe),!c.value||!s.value)return;const de=T(),Se=s.value.offsetWidth/u.value,$e=-de/Se,ae=de-v.value,we=Math.abs(ae)/Se;let R=$e;if(we>i.SWIPE_PERCENT){const q=ae>0?-1:1;R=Math.floor($e)+(q<0?0:1)}else R=Math.round($e);R=Math.max(0,Math.min(R,f.value-1)),S(R,!0),h.value&&setTimeout(()=>{h.value=!1},10)}const he=n.ref(!1),Ce=n.ref(!1);function Le(de){if(!r.freeDrag||!c.value)return;const Se=de.target,$e=Se.matches('button, a, input, select, textarea, [role="button"]')||Se.closest('button, a, input, select, textarea, [role="button"]');if($e===!1||$e===null){O();const[ae]=de.touches;g.value=ae.pageX,b.value=ae.pageY,y.value=ae.pageX,_.value=Date.now(),v.value=T(),C.value=[{time:_.value,position:y.value}],m.value=!0,he.value=!1,s.value&&(s.value.style.transition="none")}}function Ee(de){if(!c.value||!s.value||!m.value)return;const[Se]=de.touches,$e=Se.pageX,ae=Se.pageY,we=$e-g.value,R=ae-b.value;if(!he.value){if((Math.abs(we)>5||Math.abs(R)>5)&&(Ce.value=Math.abs(we)>Math.abs(R),he.value=!0,!Ce.value)){m.value=!1;return}return}if(!Ce.value)return;const q=Date.now();C.value.push({time:q,position:$e}),y.value=$e;const fe=q-Ud;if(C.value=C.value.filter(be=>be.time>=fe),Math.abs(we)>i.TOUCH&&(h.value=!0,de.preventDefault()),h.value){const be=s.value.offsetWidth,Oe=be*na/100,Ye=(u.value-1)*Oe,Y=(be-Ye)/u.value*f.value+Oe*(f.value-1);let oe=v.value+(r.rtl?-we:we);if(oe>0)oe*=.5;else if(oe<-Y+be){const _e=-Y+be-oe;oe=-Y+be-_e*.5}B(oe)}}function Je(){if(!c.value||!s.value||!m.value||!Ce.value){m.value=!1,he.value=!1;return}const de=s.value.offsetWidth,Se=de*na/100,$e=(u.value-1)*Se,ae=(de-$e)/u.value,we=ae+Se,R=T();let q=R;if(R>0)q=0;else{const ge=-(ae*(f.value-1)+Se*(f.value-1));R<ge&&(q=ge)}const fe=Math.abs(q/we),be=y.value-g.value,Oe=Math.abs(be)/we,Ye=A();let Q=fe,Y=0;Math.abs(Ye)>i.VELOCITY&&(Y=Ye<0?1:-1);const oe=window.innerWidth<600;if(Oe>i.SWIPE_PERCENT||Math.abs(Ye)>i.VELOCITY){const ge=Oe>i.SWIPE_PERCENT?be>0?-1:1:Y,Be=r.rtl?-ge:ge;oe?Q=d.value+Be:Q=Math.round(fe)+Be}else Q=oe?d.value:Math.round(fe);Q=Math.max(0,Math.min(Q,f.value-1)),d.value=Q;const _e=Math.abs(Q-fe),Ae=Math.min(Math.abs(Ye)*1e3,1),Ie=Math.min(l.BASE_DURATION*(1-Ae*.5)+_e*l.DURATION_PER_PANEL,l.MAX_DURATION);s.value.style.transition=`transform ${Ie}ms cubic-bezier(0.4, 0, 0.2, 1)`;const et=Q*Se,se=-(ae*Q+et);B(se),setTimeout(()=>{s.value&&(s.value.style.transition="none")},Ie),C.value=[],h.value=!1,he.value=!1}function st(de){if(!r.allowScroll||!c.value||!s.value||m.value||h.value||!(Math.abs(de.deltaX)>Math.abs(de.deltaY)))return;O(),w&&clearTimeout(w),$.value+=r.rtl?-de.deltaX:de.deltaX,w=setTimeout(()=>{$.value=0},50);const ae=s.value.offsetWidth/u.value*i.WHEEL_PERCENT;if(Math.abs($.value)>ae){const we=$.value>0?1:-1,R=Math.max(0,Math.min(d.value+we,f.value-1));R!==d.value&&(S(R,!0),$.value=0)}}return n.onMounted(()=>{window.addEventListener("resize",ee),I(),ee(),M(),H(),s.value&&(f.value=s.value.children.length),r.autoplay&&(E=setInterval(V,r.autoPlaySpeed))}),n.onUnmounted(()=>{c.value&&s.value&&Array.from(s.value.children).forEach(de=>{de.removeEventListener("click",z)}),window.removeEventListener("resize",ee),document.removeEventListener("mousemove",ie),document.removeEventListener("mouseup",pe),O(),w&&clearTimeout(w)}),n.watch(()=>r.index,de=>{S(de)}),n.watch(()=>d.value,te),t({goToSlide:S,next:V,prev:D,countSlides:M,clearAutoplay:O}),(de,Se)=>(n.openBlock(),n.createElementBlock("div",{class:"BglCarousel",dir:e.rtl?"rtl":"ltr"},[n.createElementVNode("div",{ref_key:"bglSlider",ref:s,class:n.normalizeClass(["bgl-slider",{dragging:h.value,clicking:m.value,[`slides-${u.value}`]:!0,grab:e.freeDrag&&f.value>1,autoHeight:e.autoHeight}]),style:n.normalizeStyle({"--item-count":u.value,height:p.value}),onMousedown:Z,onMouseover:O,onFocusin:O,onTouchstart:Le,onTouchmove:Ee,onTouchend:Je,onWheel:st},[n.renderSlot(de.$slots,"default",{},void 0,!0)],38),r.dots&&f.value>1?(n.openBlock(),n.createElementBlock("div",x_,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(f.value,$e=>(n.openBlock(),n.createElementBlock("span",{key:$e,class:n.normalizeClass(["dot",{current:d.value===$e-1}]),onClick:ae=>S($e-1)},null,10,T_))),128))])):n.createCommentVNode("",!0),n.createElementVNode("div",{class:n.normalizeClass(["navigation-buttons",{rtl:e.rtl}])},[n.createElementVNode("span",{class:"prev",onClick:D},[n.renderSlot(de.$slots,"prev",{index:d.value,prev:D},void 0,!0)]),n.createElementVNode("span",{class:"next",onClick:V},[n.renderSlot(de.$slots,"next",{index:d.value,next:V},void 0,!0)])],2)],8,S_))}}),D_=Ve(N_,[["__scopeId","data-v-c26fcda3"]]),A_=new Set(["div","span","p"]),B_=new Set(["img","iframe"]);function Ai(e){const{mode:t="form",getFormData:o,onUpdateModelValue:r,includeUnset:a=!1}=e;function l(u,d=0){if(u==null)return"";if(typeof u!="object")return String(u);if(Array.isArray(u))return u.map(m=>l(m,d+1)).join(", ");const f=d>0?" ".repeat(d):"",p=" ".repeat(d+1),h=Object.entries(u);return h.length===0?"{}":d>0?`{
|
|
10
|
+
<p class="bold txt18">${C(T.percentage)}</p></div>`}return(T,B)=>{const P=n.resolveDirective("tooltip");return n.openBlock(),n.createElementBlock("div",{ref_key:"chartRef",ref:i,class:"h-100p flex column flex-stretch"},[n.createElementVNode("div",x1,[n.createElementVNode("div",T1,[n.createVNode(n.unref(Te),{name:e.icon,size:"1.2",color:e.color,class:"line-height-0"},null,8,["name","color"]),n.createElementVNode("p",N1,n.toDisplayString(e.title),1)]),e.percentageChange!==0?(n.openBlock(),n.createElementBlock("div",D1,[n.createVNode(n.unref(Te),{class:n.normalizeClass(["line-height-1",e.percentageChange>0?"color-success":"color-danger"]),name:e.percentageChange>0?"trending_up":"trending_down",size:"1"},null,8,["name","class"]),n.createElementVNode("span",{class:n.normalizeClass(["txt12 bold",e.percentageChange>0?"color-success":"color-danger"])},n.toDisplayString(Math.abs(e.percentageChange))+"% ",3)])):n.createCommentVNode("",!0)]),n.createElementVNode("div",{class:n.normalizeClass(["chart-container flex space-between gap-1 flex-wrap flex-grow",{"with-legend":e.showLegend,"with-connectors":e.showConnectorLines}])},[(n.openBlock(),n.createElementBlock("svg",{width:h.value.width,height:h.value.height,class:"chart-svg mx-auto flex-shrink-0",style:n.normalizeStyle(e.showConnectorLines?"overflow: visible;":"")},[n.createElementVNode("g",{transform:`translate(${m.value.x}, ${m.value.y})`},[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(_.value.filter(k=>k.visible),(k,S)=>n.withDirectives((n.openBlock(),n.createElementBlock("path",{key:S,d:k.path,fill:k.color,class:"pie-segment",stroke:"white","stroke-width":"2"},null,8,V1)),[[P,{content:A(k),html:!0}]])),128)),e.donut&&(e.showCenterTotal||e.centerValue!==void 0)?(n.openBlock(),n.createElementBlock("g",L1,[n.createElementVNode("text",M1,n.toDisplayString(e.centerLabel),1),n.createElementVNode("text",P1,n.toDisplayString(E(y.value)),1)])):n.createCommentVNode("",!0),e.showConnectorLines?(n.openBlock(),n.createElementBlock("g",I1,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(_.value.filter(k=>k.visible),(k,S)=>(n.openBlock(),n.createElementBlock("g",{key:`line-${S}`},[n.createElementVNode("polyline",{points:`${v(k).innerX},${v(k).innerY} ${v(k).outerX},${v(k).outerY} ${v(k).labelX},${v(k).labelY}`,stroke:"#333","stroke-width":"1.5",fill:"none"},null,8,O1)]))),128))])):n.createCommentVNode("",!0),e.showLabelsOnChart?(n.openBlock(),n.createElementBlock("g",R1,[e.showConnectorLines?n.createCommentVNode("",!0):(n.openBlock(),n.createElementBlock("g",F1,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(_.value.filter(k=>k.visible),(k,S)=>(n.openBlock(),n.createElementBlock("text",{key:`label-${S}`,x:b(k).x,y:b(k).y-5,"text-anchor":"middle","dominant-baseline":"middle",class:"chart-label txt12 pointer-events-none",fill:e.labelColor},n.toDisplayString(k.label),9,z1))),128)),(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(_.value.filter(k=>k.visible),(k,S)=>(n.openBlock(),n.createElementBlock("text",{key:`value-${S}`,x:b(k).x,y:b(k).y+12,"text-anchor":"middle","dominant-baseline":"middle",class:"chart-value txt16 mt-1 line-height-2 bold pointer-events-none",fill:e.labelColor},n.toDisplayString(E(k.value)),9,U1))),128))])),e.showConnectorLines?(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(_.value.filter(k=>k.visible),(k,S)=>(n.openBlock(),n.createElementBlock("text",{key:`label-line-${S}`,x:v(k).labelX,y:v(k).labelY-8,"text-anchor":v(k).textAnchor,"dominant-baseline":"middle",class:"chart-label txt12 bold",fill:e.labelColor},n.toDisplayString(k.label),9,H1))),128)),(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(_.value.filter(k=>k.visible),(k,S)=>(n.openBlock(),n.createElementBlock("text",{key:`value-line-${S}`,x:v(k).labelX,y:v(k).labelY+2,"text-anchor":v(k).textAnchor,"dominant-baseline":"middle",class:"chart-value txt11",fill:"#666"},n.toDisplayString(E(k.value)),9,j1))),128)),(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(_.value.filter(k=>k.visible),(k,S)=>(n.openBlock(),n.createElementBlock("text",{key:`percentage-${S}`,x:v(k).labelX,y:v(k).labelY+15,"text-anchor":v(k).textAnchor,"dominant-baseline":"middle",class:"chart-percentage txt10 pointer-events-none",fill:"#999"}," ("+n.toDisplayString(C(k.percentage))+") ",9,W1))),128))],64)):n.createCommentVNode("",!0)])):n.createCommentVNode("",!0)],8,B1)],12,A1)),e.showLegend?(n.openBlock(),n.createElementBlock("div",q1,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(_.value,(k,S)=>(n.openBlock(),n.createElementBlock("div",{key:S,class:"gap-1 flex align-items-center txt14 justify-content-start"},[n.createElementVNode("div",{class:"legend-color flex-shrink-0 radius-05",style:n.normalizeStyle({backgroundColor:k.color})},null,4),k.label?(n.openBlock(),n.createElementBlock("span",G1,n.toDisplayString(k.label),1)):n.createCommentVNode("",!0),n.createElementVNode("span",Y1,n.toDisplayString(E(k.value)),1),n.createElementVNode("span",X1,"("+n.toDisplayString(C(k.percentage))+")",1)]))),128))])):n.createCommentVNode("",!0)],2)],512)}}}),J1=Ve(K1,[["__scopeId","data-v-0458a5f9"]]),Z1={key:0},Q1=["src","alt","width","height"],eb=["src","alt","width","height"],tb=n.defineComponent({__name:"Image",props:{src:{},pathKey:{},alt:{},width:{},height:{},caption:{},modelValue:{}},setup(e){const t=e,o=n.ref(void 0),r=n.ref(!1);function a(){if(!((t.src===void 0||t.src==="")&&(t.pathKey===void 0||t.pathKey==="")&&(t.modelValue===void 0||t.modelValue==="")))return Hn(t.src??t.pathKey??t.modelValue)}async function l(u){if("caches"in window)try{const f=await(await window.caches.open("img-cache")).match(u);if(f)return URL.createObjectURL(await f.blob())}catch(d){console.warn("Cache access error:",d)}}async function i(u,d){if("caches"in window)try{await(await window.caches.open("img-cache")).put(u,new Response(d))}catch(f){console.warn("Cache write error:",f)}}async function s(u){await ol("https://cdnjs.cloudflare.com/ajax/libs/heic2any/0.0.1/index.min.js");const f=await(await fetch(Pu(u))).blob(),p=await window.heic2any({blob:f});return await i(u,p),URL.createObjectURL(p)}async function c(){var d;r.value=!1;const u=a();if(u===void 0||u===""){o.value=void 0;return}try{if(((d=u.split(".").pop())==null?void 0:d.toLowerCase().split("?")[0])==="heic"){const p=await l(u);if(p!==void 0&&p!==""){o.value=p;return}o.value=await s(u)}else o.value=u}catch(f){console.error("Image loading error:",f),r.value=!0,o.value=void 0}}return n.watch(()=>[t.src,t.pathKey,t.modelValue],c,{immediate:!0}),(u,d)=>e.caption?(n.openBlock(),n.createElementBlock("figcaption",Z1,[o.value?(n.openBlock(),n.createElementBlock("img",n.mergeProps({key:0,src:o.value},u.$attrs,{alt:e.alt,width:n.unref(Sn)(e.width),height:n.unref(Sn)(e.height)}),null,16,Q1)):(n.openBlock(),n.createBlock(n.unref(mi),{key:1,class:"img-web-kit",width:n.unref(Sn)(e.width),height:n.unref(Sn)(e.height)},null,8,["width","height"]))])):o.value?(n.openBlock(),n.createElementBlock("img",n.mergeProps({key:1,src:o.value},u.$attrs,{alt:e.alt,width:n.unref(Sn)(e.width),height:n.unref(Sn)(e.height)}),null,16,eb)):r.value?(n.openBlock(),n.createElementBlock("div",{key:2,class:"flex-center error-image",style:n.normalizeStyle({width:n.unref(Sn)(e.width),height:n.unref(Sn)(e.height)})},[n.createVNode(n.unref(Te),{name:"broken_image"})],4)):(n.openBlock(),n.createBlock(n.unref(mi),{key:3,class:"img-web-kit",width:n.unref(Sn)(e.width),height:n.unref(Sn)(e.height)},null,8,["width","height"]))}}),Vr=Ve(tb,[["__scopeId","data-v-1844be98"]]),nb=n.defineComponent({__name:"Avatar",props:{fallback:{},src:{},name:{},icon:{},alt:{},size:{default:50}},setup(e){return(t,o)=>(n.openBlock(),n.createElementBlock("div",{class:"round overflow-hidden txt-center p-0 avatar flex justify-content-center",style:n.normalizeStyle({width:`${e.size}px`,height:`${e.size}px`})},[e.src?(n.openBlock(),n.createBlock(Vr,{key:0,src:e.src,alt:e.alt||e.name},null,8,["src","alt"])):e.icon?(n.openBlock(),n.createBlock(n.unref(Te),{key:1,icon:e.icon,size:e.size/40},null,8,["icon","size"])):(n.openBlock(),n.createElementBlock("p",{key:2,style:n.normalizeStyle({"line-height":`${e.size}px`,"font-size":`calc(1.5rem * ${e.size} / 50)`})},n.toDisplayString((e.fallback||n.unref(Fh)(e.name||"")).toUpperCase()),5))],4))}}),th=Ve(nb,[["__scopeId","data-v-7ae379be"]]),ob=n.defineComponent({__name:"Badge",props:{color:{},text:{},icon:{},iconEnd:{}},setup(e){const t=e,o=n.computed(()=>{const r=t.color;return r?`pair-${r}`:"pair-primary"});return(r,a)=>(n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(["bgl_badge",o.value])},[e.icon?(n.openBlock(),n.createBlock(n.unref(Te),{key:0,class:"inline line-height-1",size:"0.5",icon:e.icon},null,8,["icon"])):n.createCommentVNode("",!0),n.createTextVNode(" "+n.toDisplayString(e.text)+" ",1),e.iconEnd?(n.openBlock(),n.createBlock(n.unref(Te),{key:1,class:"inline line-height-1",size:"0.5",icon:e.iconEnd},null,8,["icon"])):n.createCommentVNode("",!0)],2))}}),rb=Ve(ob,[["__scopeId","data-v-4c9b64ba"]]);function Eu(e){return n.getCurrentScope()?(n.onScopeDispose(e),!0):!1}const nh=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const ab=e=>e!=null,lb=Object.prototype.toString,ib=e=>lb.call(e)==="[object Object]",Rd=()=>+Date.now(),dn=()=>{},sb=cb();function cb(){var e,t;return nh&&((e=window==null?void 0:window.navigator)==null?void 0:e.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((t=window==null?void 0:window.navigator)==null?void 0:t.maxTouchPoints)>2&&/iPad|Macintosh/.test(window==null?void 0:window.navigator.userAgent))}function Cu(e,t){function o(...r){return new Promise((a,l)=>{Promise.resolve(e(()=>t.apply(this,r),{fn:t,thisArg:this,args:r})).then(a).catch(l)})}return o}const ub=e=>e();function oh(e,t={}){let o,r,a=dn;const l=c=>{clearTimeout(c),a(),a=dn};let i;return c=>{const u=n.toValue(e),d=n.toValue(t.maxWait);return o&&l(o),u<=0||d!==void 0&&d<=0?(r&&(l(r),r=void 0),Promise.resolve(c())):new Promise((f,p)=>{a=t.rejectOnCancel?p:f,i=c,d&&!r&&(r=setTimeout(()=>{o&&l(o),r=void 0,f(i())},d)),o=setTimeout(()=>{r&&l(r),r=void 0,f(c())},u)})}}function db(...e){let t=0,o,r=!0,a=dn,l,i,s,c,u;!n.isRef(e[0])&&typeof e[0]=="object"?{delay:i,trailing:s=!0,leading:c=!0,rejectOnCancel:u=!1}=e[0]:[i,s=!0,c=!0,u=!1]=e;const d=()=>{o&&(clearTimeout(o),o=void 0,a(),a=dn)};return p=>{const h=n.toValue(i),m=Date.now()-t,g=()=>l=p();return d(),h<=0?(t=Date.now(),g()):(m>h&&(c||!r)?(t=Date.now(),g()):s&&(l=new Promise((b,v)=>{a=u?v:b,o=setTimeout(()=>{t=Date.now(),r=!0,b(g()),d()},Math.max(0,h-m))})),!c&&!o&&(o=setTimeout(()=>r=!0,h)),r=!1,l)}}function Fd(e,t=!1,o="Timeout"){return new Promise((r,a)=>{setTimeout(t?()=>a(o):r,e)})}function ga(e){return Array.isArray(e)?e:[e]}function fb(e){return n.getCurrentInstance()}function er(e,t=200,o={}){return Cu(oh(t,o),e)}function mb(e,t,o={}){const{eventFilter:r=ub,...a}=o;return n.watch(e,Cu(r,t),a)}function pb(e,t=!0,o){fb()?n.onMounted(e,o):t?e():n.nextTick(e)}function _c(e,t=!1){function o(f,{flush:p="sync",deep:h=!1,timeout:m,throwOnTimeout:g}={}){let b=null;const y=[new Promise(_=>{b=n.watch(e,$=>{f($)!==t&&(b?b():n.nextTick(()=>b==null?void 0:b()),_($))},{flush:p,deep:h,immediate:!0})})];return m!=null&&y.push(Fd(m,g).then(()=>n.toValue(e)).finally(()=>b==null?void 0:b())),Promise.race(y)}function r(f,p){if(!n.isRef(f))return o($=>$===f,p);const{flush:h="sync",deep:m=!1,timeout:g,throwOnTimeout:b}=p??{};let v=null;const _=[new Promise($=>{v=n.watch([e,f],([w,E])=>{t!==(w===E)&&(v?v():n.nextTick(()=>v==null?void 0:v()),$(w))},{flush:h,deep:m,immediate:!0})})];return g!=null&&_.push(Fd(g,b).then(()=>n.toValue(e)).finally(()=>(v==null||v(),n.toValue(e)))),Promise.race(_)}function a(f){return o(p=>!!p,f)}function l(f){return r(null,f)}function i(f){return r(void 0,f)}function s(f){return o(Number.isNaN,f)}function c(f,p){return o(h=>{const m=Array.from(h);return m.includes(f)||m.includes(n.toValue(f))},p)}function u(f){return d(1,f)}function d(f=1,p){let h=-1;return o(()=>(h+=1,h>=f),p)}return Array.isArray(n.toValue(e))?{toMatch:o,toContains:c,changed:u,changedTimes:d,get not(){return _c(e,!t)}}:{toMatch:o,toBe:r,toBeTruthy:a,toBeNull:l,toBeNaN:s,toBeUndefined:i,changed:u,changedTimes:d,get not(){return _c(e,!t)}}}function rh(e){return _c(e)}function hb(e,t,o={}){const{debounce:r=0,maxWait:a=void 0,...l}=o;return mb(e,t,{...l,eventFilter:oh(r,{maxWait:a})})}function gb(e,t,o){return n.watch(e,t,{...o,immediate:!0})}const Wr=nh?window:void 0;function Qt(e){var t;const o=n.toValue(e);return(t=o==null?void 0:o.$el)!=null?t:o}function Er(...e){const t=[],o=()=>{t.forEach(s=>s()),t.length=0},r=(s,c,u,d)=>(s.addEventListener(c,u,d),()=>s.removeEventListener(c,u,d)),a=n.computed(()=>{const s=ga(n.toValue(e[0])).filter(c=>c!=null);return s.every(c=>typeof c!="string")?s:void 0}),l=gb(()=>{var s,c;return[(c=(s=a.value)==null?void 0:s.map(u=>Qt(u)))!=null?c:[Wr].filter(u=>u!=null),ga(n.toValue(a.value?e[1]:e[0])),ga(n.unref(a.value?e[2]:e[1])),n.toValue(a.value?e[3]:e[2])]},([s,c,u,d])=>{if(o(),!(s!=null&&s.length)||!(c!=null&&c.length)||!(u!=null&&u.length))return;const f=ib(d)?{...d}:d;t.push(...s.flatMap(p=>c.flatMap(h=>u.map(m=>r(p,h,m,f)))))},{flush:"post"}),i=()=>{l(),o()};return Eu(o),i}let zd=!1;function vb(e,t,o={}){const{window:r=Wr,ignore:a=[],capture:l=!0,detectIframe:i=!1,controls:s=!1}=o;if(!r)return s?{stop:dn,cancel:dn,trigger:dn}:dn;if(sb&&!zd){zd=!0;const b={passive:!0};Array.from(r.document.body.children).forEach(v=>v.addEventListener("click",dn,b)),r.document.documentElement.addEventListener("click",dn,b)}let c=!0;const u=b=>n.toValue(a).some(v=>{if(typeof v=="string")return Array.from(r.document.querySelectorAll(v)).some(y=>y===b.target||b.composedPath().includes(y));{const y=Qt(v);return y&&(b.target===y||b.composedPath().includes(y))}});function d(b){const v=n.toValue(b);return v&&v.$.subTree.shapeFlag===16}function f(b,v){const y=n.toValue(b),_=y.$.subTree&&y.$.subTree.children;return _==null||!Array.isArray(_)?!1:_.some($=>$.el===v.target||v.composedPath().includes($.el))}const p=b=>{const v=Qt(e);if(b.target!=null&&!(!(v instanceof Element)&&d(e)&&f(e,b))&&!(!v||v===b.target||b.composedPath().includes(v))){if("detail"in b&&b.detail===0&&(c=!u(b)),!c){c=!0;return}t(b)}};let h=!1;const m=[Er(r,"click",b=>{h||(h=!0,setTimeout(()=>{h=!1},0),p(b))},{passive:!0,capture:l}),Er(r,"pointerdown",b=>{const v=Qt(e);c=!u(b)&&!!(v&&!b.composedPath().includes(v))},{passive:!0}),i&&Er(r,"blur",b=>{setTimeout(()=>{var v;const y=Qt(e);((v=r.document.activeElement)==null?void 0:v.tagName)==="IFRAME"&&!(y!=null&&y.contains(r.document.activeElement))&&t(b)},0)},{passive:!0})].filter(Boolean),g=()=>m.forEach(b=>b());return s?{stop:g,cancel:()=>{c=!1},trigger:b=>{c=!0,p(b),c=!1}}:g}function yb(){const e=n.shallowRef(!1),t=n.getCurrentInstance();return t&&n.onMounted(()=>{e.value=!0},t),e}function ah(e){const t=yb();return n.computed(()=>(t.value,!!e()))}function lh(e,t,o={}){const{window:r=Wr,...a}=o;let l;const i=ah(()=>r&&"ResizeObserver"in r),s=()=>{l&&(l.disconnect(),l=void 0)},c=n.computed(()=>{const f=n.toValue(e);return Array.isArray(f)?f.map(p=>Qt(p)):[Qt(f)]}),u=n.watch(c,f=>{if(s(),i.value&&r){l=new ResizeObserver(t);for(const p of f)p&&l.observe(p,a)}},{immediate:!0,flush:"post"}),d=()=>{s(),u()};return Eu(d),{isSupported:i,stop:d}}function bb(e,t={width:0,height:0},o={}){const{window:r=Wr,box:a="content-box"}=o,l=n.computed(()=>{var f,p;return(p=(f=Qt(e))==null?void 0:f.namespaceURI)==null?void 0:p.includes("svg")}),i=n.shallowRef(t.width),s=n.shallowRef(t.height),{stop:c}=lh(e,([f])=>{const p=a==="border-box"?f.borderBoxSize:a==="content-box"?f.contentBoxSize:f.devicePixelContentBoxSize;if(r&&l.value){const h=Qt(e);if(h){const m=h.getBoundingClientRect();i.value=m.width,s.value=m.height}}else if(p){const h=ga(p);i.value=h.reduce((m,{inlineSize:g})=>m+g,0),s.value=h.reduce((m,{blockSize:g})=>m+g,0)}else i.value=f.contentRect.width,s.value=f.contentRect.height},o);pb(()=>{const f=Qt(e);f&&(i.value="offsetWidth"in f?f.offsetWidth:t.width,s.value="offsetHeight"in f?f.offsetHeight:t.height)});const u=n.watch(()=>Qt(e),f=>{i.value=f?t.width:0,s.value=f?t.height:0});function d(){c(),u()}return{width:i,height:s,stop:d}}function ih(e,t,o={}){const{root:r,rootMargin:a="0px",threshold:l=0,window:i=Wr,immediate:s=!0}=o,c=ah(()=>i&&"IntersectionObserver"in i),u=n.computed(()=>{const m=n.toValue(e);return ga(m).map(Qt).filter(ab)});let d=dn;const f=n.shallowRef(s),p=c.value?n.watch(()=>[u.value,Qt(r),f.value],([m,g])=>{if(d(),!f.value||!m.length)return;const b=new IntersectionObserver(t,{root:Qt(g),rootMargin:a,threshold:l});m.forEach(v=>v&&b.observe(v)),d=()=>{b.disconnect(),d=dn}},{immediate:s,flush:"post"}):dn,h=()=>{d(),p(),f.value=!1};return Eu(h),{isSupported:c,isActive:f,pause(){d(),f.value=!1},resume(){f.value=!0},stop:h}}const _b=["mousemove","mousedown","resize","keydown","touchstart","wheel"],wb=6e4;function $b(e=wb,t={}){const{initialState:o=!1,listenForVisibilityChange:r=!0,events:a=_b,window:l=Wr,eventFilter:i=db(50)}=t,s=n.shallowRef(o),c=n.shallowRef(Rd());let u;const d=()=>{s.value=!1,clearTimeout(u),u=setTimeout(()=>s.value=!0,e)},f=Cu(i,()=>{c.value=Rd(),d()});if(l){const p=l.document,h={passive:!0};for(const m of a)Er(l,m,f,h);r&&Er(p,"visibilitychange",()=>{p.hidden||f()},h),o||d()}return{idle:s,lastActive:c,reset:d}}function kb(e,t){const{containerStyle:o,wrapperProps:r,scrollTo:a,calculateRange:l,currentList:i,containerRef:s}="itemHeight"in t?Sb(t,e):Cb(t,e);return{list:i,scrollTo:a,containerProps:{ref:s,onScroll:()=>{l()},style:o},wrapperProps:r}}function sh(e){const t=n.shallowRef(null),o=bb(t),r=n.ref([]),a=n.shallowRef(e);return{state:n.ref({start:0,end:10}),source:a,currentList:r,size:o,containerRef:t}}function ch(e,t,o){return r=>{if(typeof o=="number")return Math.ceil(r/o);const{start:a=0}=e.value;let l=0,i=0;for(let s=a;s<t.value.length;s++){const c=o(s);if(l+=c,i=s,l>r)break}return i-a}}function uh(e,t){return o=>{if(typeof t=="number")return Math.floor(o/t)+1;let r=0,a=0;for(let l=0;l<e.value.length;l++){const i=t(l);if(r+=i,r>=o){a=l;break}}return a+1}}function dh(e,t,o,r,{containerRef:a,state:l,currentList:i,source:s}){return()=>{const c=a.value;if(c){const u=o(e==="vertical"?c.scrollTop:c.scrollLeft),d=r(e==="vertical"?c.clientHeight:c.clientWidth),f=u-t,p=u+d+t;l.value={start:f<0?0:f,end:p>s.value.length?s.value.length:p},i.value=s.value.slice(l.value.start,l.value.end).map((h,m)=>({data:h,index:m+l.value.start}))}}}function fh(e,t){return o=>typeof e=="number"?o*e:t.value.slice(0,o).reduce((a,l,i)=>a+e(i),0)}function mh(e,t,o,r){n.watch([e.width,e.height,()=>n.toValue(t),o],()=>{r()})}function ph(e,t){return n.computed(()=>typeof e=="number"?t.value.length*e:t.value.reduce((o,r,a)=>o+e(a),0))}const Eb={horizontal:"scrollLeft",vertical:"scrollTop"};function hh(e,t,o,r){return a=>{r.value&&(r.value[Eb[e]]=o(a),t())}}function Cb(e,t){const o=sh(t),{state:r,source:a,currentList:l,size:i,containerRef:s}=o,c={overflowX:"auto"},{itemWidth:u,overscan:d=5}=e,f=ch(r,a,u),p=uh(a,u),h=dh("horizontal",d,p,f,o),m=fh(u,a),g=n.computed(()=>m(r.value.start)),b=ph(u,a);mh(i,t,s,h);const v=hh("horizontal",h,m,s),y=n.computed(()=>({style:{height:"100%",width:`${b.value-g.value}px`,marginLeft:`${g.value}px`,display:"flex"}}));return{scrollTo:v,calculateRange:h,wrapperProps:y,containerStyle:c,currentList:l,containerRef:s}}function Sb(e,t){const o=sh(t),{state:r,source:a,currentList:l,size:i,containerRef:s}=o,c={overflowY:"auto"},{itemHeight:u,overscan:d=5}=e,f=ch(r,a,u),p=uh(a,u),h=dh("vertical",d,p,f,o),m=fh(u,a),g=n.computed(()=>m(r.value.start)),b=ph(u,a);mh(i,t,s,h);const v=hh("vertical",h,m,s),y=n.computed(()=>({style:{width:"100%",height:`${b.value-g.value}px`,marginTop:`${g.value}px`}}));return{calculateRange:h,scrollTo:v,containerStyle:c,wrapperProps:y,currentList:l,containerRef:s}}const xb=["src"],Tb=["autoplay","muted","loop","controls","playsinline"],Nb=["src","type"],Db=n.defineComponent({__name:"BglVideo",props:{src:{},autoplay:{type:[Boolean,String]},mute:{type:Boolean},aspectRatio:{},controls:{type:Boolean},loop:{type:Boolean},status:{},playsinline:{type:Boolean}},setup(e,{expose:t}){const o=e,r=n.computed(()=>{var p,h,m;return((m=(h=(p=o.src)==null?void 0:p.split(".").pop())==null?void 0:h.split("?").shift())==null?void 0:m.toLowerCase())??"mp4"}),a=n.ref(),l=n.computed(()=>{var p;return((p=o.src)==null?void 0:p.includes("youtube.com/shorts/"))??!1}),i=n.computed(()=>{var p;return l.value?"9/16":((p=o.aspectRatio)==null?void 0:p.replace(":","/"))??"16/9"}),s=n.ref();function c(){var p;(p=s.value)==null||p.play()}function u(){var p;(p=s.value)==null||p.pause()}o.autoplay==="visible"&&ih(a,([{isIntersecting:p}])=>{p?c():u()},{threshold:.3}),n.watch(()=>o.status,p=>{p==="play"&&c(),p==="pause"&&u()}),t({play:c,pause:u});const d=n.computed(()=>{if(/youtube\.com|youtu\.be/.test(o.src??""))return"YouTube";if(/(?:player\.)?vimeo\.com/.test(o.src??""))return"Vimeo"}),f=n.computed(()=>{var p,h,m,g,b,v,y;if(d.value==="YouTube"){let _="";((p=o.src)==null?void 0:p.includes("youtube.com/shorts/"))===!0?_=((h=o.src.split("/shorts/")[1])==null?void 0:h.split("?")[0])??"":_=((b=(g=(m=o.src)==null?void 0:m.split(/v=|youtu\.be\//)[1])==null?void 0:g.split("&"))==null?void 0:b[0])??"";const $=new URLSearchParams({autoplay:o.autoplay===!0||o.autoplay==="visible"?"1":"0",controls:"0",showinfo:"0",modestbranding:"1"});return`https://www.youtube.com/embed/${_}?${$}`}if(d.value==="Vimeo"){const _=/player\.vimeo\.com\/video\/(\d+)/,$=/vimeo\.com\/(?:channels\/(?:\w+\/)?|groups\/([^/]*)\/videos\/|album\/(\d+)\/video\/)?(\d+)(?:$|\/|\?)/,w=((v=o.src)==null?void 0:v.match(_))??null,E=((y=o.src)==null?void 0:y.match($))??null,C=(w==null?void 0:w[1])??(E==null?void 0:E[3]);return console.log(C,{playerMatch:w,regularMatch:E}),`https://player.vimeo.com/video/${C}`}return o.src});return(p,h)=>(n.openBlock(),n.createElementBlock("div",{ref_key:"videoContainer",ref:a,class:n.normalizeClass(["bgl_vid",{vid_empty:!e.src,vid_short:l.value}])},[d.value?(n.openBlock(),n.createElementBlock("iframe",{key:0,src:f.value,style:n.normalizeStyle({aspectRatio:i.value}),frameborder:"0",title:"Video",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",referrerpolicy:"strict-origin-when-cross-origin",allowfullscreen:""},null,12,xb)):e.src?(n.openBlock(),n.createElementBlock("video",{key:1,ref_key:"video",ref:s,autoplay:e.autoplay===!0,muted:e.mute,loop:e.loop,style:n.normalizeStyle({aspectRatio:i.value}),controls:e.controls,playsinline:e.playsinline},[n.createElementVNode("source",{src:e.src,type:`video/${r.value}`},null,8,Nb)],12,Tb)):n.createCommentVNode("",!0)],2))}}),Su=Ve(Db,[["__scopeId","data-v-e3e85fb3"]]),Ab=n.defineComponent({__name:"CalendarPopover",props:{event:{},targetElement:{},position:{},show:{type:Boolean},hasEventContentSlot:{type:Boolean}},emits:["close","eventClick"],setup(e,{emit:t}){const o=e,r=t,{scrollY:a,scrollX:l,innerHeight:i,innerWidth:s}=fl(),c=n.ref(),u=n.computed(()=>{if(o.position){let{top:h,left:m}=o.position;return h-=80,h=Math.max(a.value+10,Math.min(h,i.value+a.value-150-10)),m=Math.max(l.value+10,Math.min(m,s.value+l.value-400-10)),{top:h,left:m,width:400,height:150}}if(o.targetElement&&o.show){const m=o.targetElement.getBoundingClientRect();let g=m.top+a.value+m.height/2-150/2,b=m.left+l.value+m.width+10;return g=Math.max(a.value+10,Math.min(g,i.value+a.value-150-10)),b+400>s.value+l.value&&(b=m.left+l.value-400+m.width-10),b<l.value&&(b=m.right+l.value+10),{top:g,left:b,width:400,height:150}}return{top:0,left:0,width:400,height:150}});function d(){r("close")}return(f,p)=>{const h=n.resolveDirective("click-outside");return e.show&&e.event?n.withDirectives((n.openBlock(),n.createBlock(n.unref(en),{key:0,ref_key:"popoverRef",ref:c,thin:"",class:"custom-popover",style:n.normalizeStyle({top:`${u.value.top}px`,left:`${u.value.left}px`,maxWidth:`${u.value.width}px`})},{default:n.withCtx(()=>[n.renderSlot(f.$slots,"eventContent",{event:e.event,close:d},void 0,!0)]),_:3},8,["style"])),[[h,d]]):n.createCommentVNode("",!0)}}}),Bb=Ve(Ab,[["__scopeId","data-v-83810b56"]]),Vb={class:"agenda-view"},Lb=["data-date","onClick"],Mb={class:"event-content"},Pb={class:"event-time"},Ib={class:"event-details"},Ob={class:"event-title"},Rb=n.defineComponent({__name:"AgendaView",props:{events:{},startDate:{}},emits:["eventClick","dateChange","openPopover"],setup(e,{emit:t}){const o=e,r=t,a=n.useSlots(),l=n.ref(null),i=n.ref(null),s=n.computed(()=>{const d=[],f=new Date().toDateString(),h=[...o.events].sort((m,g)=>new Date(m.start_time).getTime()-new Date(g.start_time).getTime()).reduce((m,g)=>{const b=new Date(g.start_time).toDateString();return m[b]||(m[b]=[]),m[b].push(g),m},{});return Object.entries(h).forEach(([m,g])=>{const b=new Date(m),v=b.toDateString()===f;g.forEach(y=>{const _=(new Date(y.end_time).getTime()-new Date(y.start_time).getTime())/6e4,$=Math.min(_/30*60,200);d.push({...y,dayLabel:b.toLocaleDateString("en-US",{weekday:"long",month:"long",day:"numeric"}),isToday:v,height:$})})}),d});function c(){if(!l.value)return;const d=l.value,f=d.querySelectorAll(".event");let p=null,h=0;if(f.forEach(m=>{const g=m.getBoundingClientRect(),b=d.getBoundingClientRect(),v=Math.max(g.top,b.top),y=Math.min(g.bottom,b.bottom),$=Math.max(0,y-v)/g.height;$>h&&(h=$,p=m)}),p){const m=p,g=m.dataset.date||m.getAttribute("data-date");if(g){const b=new Date(g);(!i.value||b.toDateString()!==i.value.toDateString())&&(i.value=b,r("dateChange",b))}}}function u(d,f){if(!a.eventContent){r("eventClick",d);return}if(f){const p=f.currentTarget.getBoundingClientRect(),h={top:p.top+window.scrollY+p.height/2,left:p.left+window.scrollX+p.width+10};r("openPopover",d,h)}else r("openPopover",d)}return n.onMounted(()=>{l.value&&l.value.addEventListener("scroll",c)}),n.onUnmounted(()=>{l.value&&l.value.removeEventListener("scroll",c)}),(d,f)=>(n.openBlock(),n.createElementBlock("div",Vb,[f[0]||(f[0]=n.createElementVNode("div",{class:"agenda-header"},[n.createElementVNode("div",{class:"time-column"}," Time "),n.createElementVNode("div",{class:"event-column"}," Event ")],-1)),n.createElementVNode("div",{ref_key:"containerRef",ref:l,class:"agenda-content"},[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(s.value,p=>(n.openBlock(),n.createElementBlock("div",{key:p.id,class:"event",style:n.normalizeStyle({backgroundColor:p.color||"var(--bgl-primary)"}),"data-date":p.start_time,onClick:n.withModifiers(h=>u(p,h),["stop"])},[n.createElementVNode("div",Mb,[n.createElementVNode("div",Pb,n.toDisplayString(n.unref(Tt)(p.start_time,{format:"HH:mm"})),1),n.createElementVNode("div",Ib,[n.createElementVNode("div",Ob,n.toDisplayString(p.title),1),n.createElementVNode("div",{class:n.normalizeClass(["event-day",{today:p.isToday}])},n.toDisplayString(p.dayLabel),3)])])],12,Lb))),128))],512)]))}}),Fb=Ve(Rb,[["__scopeId","data-v-177b4748"]]),zb={class:"w-100p overflow-hidden m_overflow h-100p grid"},Ub={class:"border-bottom me-1 txt-center p-05 dayGrid"},Hb={class:"overflow h-100p pe-05"},jb={class:"time-column"},Wb={class:"events-column"},qb=["onClick"],Gb={class:"event-content"},Yb={class:"white-space ellipsis-1"},Xb={class:"event-time opacity-8"},Kb={class:"color-primary txt-12 p-025"},ea=60,ta=60,Jb=n.defineComponent({__name:"DayView",props:{events:{},startDate:{}},emits:["eventClick","eventCreate","openPopover"],setup(e,{emit:t}){const o=e,r=t,a=n.useSlots(),l={start:0,end:24},i=n.ref({isDragging:!1,start:null,end:null,startTime:null,endTime:null}),s=n.ref(0),c=n.ref(!1),u=n.ref(null),d=n.computed(()=>{const y=[];for(let _=l.start;_<l.end;_++)for(let $=0;$<60;$+=ta)y.push({hour:_,minute:$,time:`${_.toString().padStart(2,"0")}:${$.toString().padStart(2,"0")}`});return y}),f=n.computed(()=>o.events.filter(y=>new Date(y.start_time).toDateString()===o.startDate.toDateString()).map(y=>{const _=new Date(y.start_time),$=new Date(y.end_time),w=_.getHours()*60+_.getMinutes(),E=$.getHours()*60+$.getMinutes(),C=w/ta*ea,A=Math.max((E-w)/ta*ea,30);return{...y,top:C,height:A}}));function p(){const y=new Date;c.value=y.toDateString()===o.startDate.toDateString();const _=y.getHours()*60+y.getMinutes();s.value=_/ta*ea}function h(y){y.target.closest(".time-slot")&&(i.value.isDragging=!0,i.value.start={x:y.clientX,y:y.clientY},i.value.startTime=b(y.clientY),document.addEventListener("mousemove",m),document.addEventListener("mouseup",g))}function m(y){i.value.isDragging&&(i.value.end={x:y.clientX,y:y.clientY},i.value.endTime=b(y.clientY))}function g(){if(!i.value.isDragging||!i.value.startTime||!i.value.endTime)return;let y=new Date(i.value.startTime),_=new Date(i.value.endTime);_<y&&([y,_]=[_,y]),r("eventCreate",{start_time:y,end_time:_}),i.value={isDragging:!1,start:null,end:null,startTime:null,endTime:null},document.removeEventListener("mousemove",m),document.removeEventListener("mouseup",g)}function b(y){var T;const _=(T=document.querySelector(".time-slots"))==null?void 0:T.getBoundingClientRect();if(!_)return new Date;const $=y-_.top,w=ta,E=$/ea,C=Math.floor(E*w),A=new Date(o.startDate);return A.setHours(Math.floor(C/60)),A.setMinutes(C%60),A.setSeconds(0),A.setMilliseconds(0),A}function v(y,_){if(!a.eventContent){r("eventClick",y);return}if(_){const $=_.currentTarget.getBoundingClientRect(),w={top:$.top+window.scrollY+$.height/2,left:$.left+window.scrollX+$.width+10};r("openPopover",y,w)}else r("openPopover",y)}return n.onMounted(()=>{document.addEventListener("mousedown",h),p(),u.value=setInterval(p,6e4)}),n.onUnmounted(()=>{document.removeEventListener("mousedown",h),document.removeEventListener("mousemove",m),document.removeEventListener("mouseup",g),u.value&&clearInterval(u.value)}),(y,_)=>(n.openBlock(),n.createElementBlock("div",zb,[n.createElementVNode("div",Ub,[_[0]||(_[0]=n.createElementVNode("div",null,null,-1)),n.createElementVNode("div",null,n.toDisplayString(n.unref(Tt)(e.startDate)),1)]),n.createElementVNode("div",Hb,[n.createElementVNode("div",{class:"time-slots dayGrid border-end relative",onMousedown:h},[n.createElementVNode("div",jb,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(d.value,$=>(n.openBlock(),n.createElementBlock("div",{key:$.time,class:"time-slot txt-light txt-12 color-gray bg-gray-light border-start",style:n.normalizeStyle({height:`${ea}px`})},n.toDisplayString($.time),5))),128))]),n.createElementVNode("div",Wb,[c.value?(n.openBlock(),n.createElementBlock("div",{key:0,class:"absolute end w-100p z-2 flex pointer-events-none",style:n.normalizeStyle({top:`${s.value}px`})},[..._[1]||(_[1]=[n.createElementVNode("div",{class:"current-time-dot h-10px aspect-ratio-1 round bg-primary"},null,-1),n.createElementVNode("div",{class:"current-time-line w-100p bg-primary"},null,-1)])],4)):n.createCommentVNode("",!0),(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(f.value,$=>(n.openBlock(),n.createElementBlock("div",{key:$.id,class:"event absolute radius-05 overflow-hidden pointer transition z-1",style:n.normalizeStyle({top:`${$.top}px`,height:`${$.height}px`,backgroundColor:$.color||"var(--bgl-primary)"}),onClick:n.withModifiers(w=>v($,w),["stop"])},[n.createElementVNode("div",Gb,[n.createElementVNode("div",Yb,n.toDisplayString($.title),1),n.createElementVNode("div",Xb,n.toDisplayString(n.unref(Tt)(new Date($.start_time),{format:"HH:mm"}))+" - "+n.toDisplayString(n.unref(Tt)(new Date($.end_time),{format:"HH:mm"})),1)])],12,qb))),128))]),i.value.isDragging&&i.value.start&&i.value.end?(n.openBlock(),n.createElementBlock("div",{key:0,class:"drag-preview absolute bg-primary-tint pointer-events-none z-1",style:n.normalizeStyle({top:`${Math.min(i.value.start.y,i.value.end.y)}px`,height:`${Math.abs(i.value.end.y-i.value.start.y)}px`,left:"10px",right:"10px"})},[n.createElementVNode("div",Kb,n.toDisplayString(i.value.startTime?n.unref(Tt)(i.value.startTime,{format:"HH:mm"}):"")+" - "+n.toDisplayString(i.value.endTime?n.unref(Tt)(i.value.endTime,{format:"HH:mm"}):""),1)],4)):n.createCommentVNode("",!0)],32)]),_[2]||(_[2]=n.createElementVNode("div",{class:"border-bottom me-1"},null,-1))]))}}),Zb=Ve(Jb,[["__scopeId","data-v-439da8fc"]]),Qb={class:"month-view"},e_={class:"month-header"},t_={class:"month-grid"},n_={class:"day-number"},o_={class:"day-events"},r_={key:0,class:"event-dot"},a_=["onClick"],l_={class:"event-title"},i_={class:"event-time"},s_=n.defineComponent({__name:"MonthView",props:{events:{},startDate:{}},emits:["eventClick","openPopover"],setup(e,{emit:t}){const o=e,r=t,a=n.useSlots(),l=n.computed(()=>window.innerWidth<768),i=n.computed(()=>["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]),s=n.computed(()=>{const u=o.startDate.getFullYear(),d=o.startDate.getMonth(),f=new Date(u,d,1),h=new Date(u,d+1,0).getDate(),m=f.getDay(),g=new Date().toDateString(),b=[],v=new Date(u,d,0).getDate();for(let _=m-1;_>=0;_--){const $=new Date(u,d-1,v-_);b.push({date:$,events:[],isToday:!1,isCurrentMonth:!1})}for(let _=1;_<=h;_++){const $=new Date(u,d,_),w=o.events.filter(E=>{const C=new Date(E.start_time);return C.getDate()===_&&C.getMonth()===d&&C.getFullYear()===u});b.push({date:$,events:w,isToday:$.toDateString()===g,isCurrentMonth:!0})}const y=42-b.length;for(let _=1;_<=y;_++){const $=new Date(u,d+1,_);b.push({date:$,events:[],isToday:!1,isCurrentMonth:!1})}return b});function c(u,d){if(!a.eventContent){r("eventClick",u);return}if(d){const f=d.currentTarget.getBoundingClientRect(),p={top:f.top+window.scrollY+f.height/2,left:f.left+window.scrollX+f.width+10};r("openPopover",u,p)}else r("openPopover",u)}return(u,d)=>(n.openBlock(),n.createElementBlock("div",Qb,[n.createElementVNode("div",e_,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(i.value,f=>(n.openBlock(),n.createElementBlock("div",{key:f,class:"weekday"},n.toDisplayString(f),1))),128))]),n.createElementVNode("div",t_,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(s.value,f=>(n.openBlock(),n.createElementBlock("div",{key:f.date.toISOString(),class:n.normalizeClass(["day-cell",{"current-month":f.isCurrentMonth,today:f.isToday,"other-month":!f.isCurrentMonth}])},[n.createElementVNode("div",n_,n.toDisplayString(n.unref(Tt)(f.date,{format:"DD"})),1),n.createElementVNode("div",o_,[l.value?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[f.events.length>0?(n.openBlock(),n.createElementBlock("div",r_)):n.createCommentVNode("",!0)],64)):(n.openBlock(!0),n.createElementBlock(n.Fragment,{key:1},n.renderList(f.events,p=>(n.openBlock(),n.createElementBlock("div",{key:p.id,class:"event-item",style:n.normalizeStyle({backgroundColor:p.color||"var(--bgl-primary)"}),onClick:n.withModifiers(h=>c(p,h),["stop"])},[n.createElementVNode("div",l_,n.toDisplayString(p.title),1),n.createElementVNode("div",i_,n.toDisplayString(n.unref(Tt)(p.start_time,"HH:mm")),1)],12,a_))),128))])],2))),128))])]))}}),c_=Ve(s_,[["__scopeId","data-v-0406529e"]]),u_={class:"w-100p overflow-hidden m_overflow h-100p grid"},d_=["onMousedown"],f_=["onClick"],m_={class:"overflow-hidden color-white p-025 txt12 h-100p"},p_={class:"white-space ellipsis-1"},h_={class:"txt10 opacity-8 user-select-none"},g_={class:"color-primary txt-12 p-025"},$o=60,Fo=60,v_=n.defineComponent({__name:"WeekView",props:{events:{default:()=>[]},startDate:{default:()=>new Date},weekStart:{default:"Sunday"}},emits:["eventClick","eventCreate","openPopover"],setup(e,{emit:t}){const o=e,r=t,a=n.useSlots(),l={start:0,end:24},i=n.computed(()=>!!a.eventCreate||r.hasOwnProperty("eventCreate")),s=n.ref({isDragging:!1,startDay:-1,endDay:-1,start:void 0,end:void 0,startTime:void 0,endTime:void 0}),c=n.ref(0),u=n.ref(!1),d=n.ref(),f=n.ref(),p=n.ref(),h=n.ref([]),m=n.ref(),g=n.ref(),b=n.computed(()=>{const k=[],S=new Date(o.startDate),V=o.weekStart==="Sunday"?0:1,D=S.getDay();S.setDate(S.getDate()-D+V),S.setHours(0,0,0,0);for(let L=0;L<7;L++){const I=new Date(S);I.setDate(S.getDate()+L),k.push(I)}return k}),v=n.computed(()=>{const k=[];for(let S=l.start;S<l.end;S++)for(let V=0;V<60;V+=Fo)k.push({hour:S,minute:V,time:`${S.toString().padStart(2,"0")}:${V.toString().padStart(2,"0")}`});return k}),y=n.computed(()=>{if(!s.value.isDragging||!s.value.startTime||!s.value.endTime)return null;const k=s.value.startTime.getHours()*60+s.value.startTime.getMinutes(),S=s.value.endTime.getHours()*60+s.value.endTime.getMinutes(),V=k/Fo*$o,D=Math.max((S-k)/Fo*$o,30);return{top:V,height:D}}),_=n.computed(()=>{const k=[],S={};return o.events.forEach(V=>{const D=new Date(V.start_time),L=new Date(V.end_time),I=b.value.findIndex(H=>H.getDate()===D.getDate()&&H.getMonth()===D.getMonth()&&H.getFullYear()===D.getFullYear());if(I===-1)return;const M=D.getHours()*60+D.getMinutes(),te=L.getHours()*60+L.getMinutes(),ee=M/Fo*$o,O=Math.max((te-M)/Fo*$o,30),z={...V,top:ee,height:O,left:0,width:100,overlappingEvents:0,position:0};S[I]||(S[I]=[]),S[I].push(z)}),Object.entries(S).forEach(([V,D])=>{D.sort((M,te)=>new Date(M.start_time).getTime()-new Date(te.start_time).getTime());const L=[];let I=[];D.forEach(M=>{I.length===0?I=[M]:I.some(ee=>{const O=new Date(M.start_time).getTime(),z=new Date(M.end_time).getTime(),H=new Date(ee.start_time).getTime(),Z=new Date(ee.end_time).getTime();return!(z<=H||O>=Z)})?I.push(M):(I.length>0&&L.push([...I]),I=[M])}),I.length>0&&L.push(I),L.forEach(M=>{if(M.length>1){const O=(100-2*(M.length-1))/M.length;M.forEach((z,H)=>{z.overlappingEvents=M.length,z.position=H,z.width=O,z.left=H*(O+2)})}k.push(...M)})}),k});function $(k,S){if(!i.value||!p.value||!m.value)return;let V=-1;for(let M=0;M<h.value.length;M++){const te=h.value[M];if(!te)continue;const ee=te.getBoundingClientRect();if(k.clientX>=ee.left&&k.clientX<=ee.right){V=M;break}}if(V===-1)return;const D=h.value[V].getBoundingClientRect(),L=m.value.getBoundingClientRect();s.value.isDragging=!0,s.value.startDay=V,s.value.endDay=V,s.value.start={x:D.left-L.left,y:k.clientY-L.top},s.value.end={x:D.right-L.left,y:k.clientY-L.top};const I=C(k.clientY,S);s.value.startTime=I,document.addEventListener("mousemove",w),document.addEventListener("mouseup",E)}function w(k){if(!i.value||!s.value.isDragging||!s.value.start||!h.value.length||!p.value||!m.value)return;let S=-1;for(let V=0;V<h.value.length;V++){const D=h.value[V];if(!D)continue;const L=D.getBoundingClientRect();if(k.clientX>=L.left&&k.clientX<=L.right){S=V;break}}if(S!==-1&&(s.value.endDay=S,s.value.end={x:s.value.start.x,y:k.clientY-m.value.getBoundingClientRect().top},S>=0&&S<b.value.length)){const V=new Date(b.value[s.value.startDay]);V.setHours(0,0,0,0);const D=C(k.clientY,V);s.value.endTime=D}}function E(){if(!i.value||!s.value.isDragging||!s.value.startTime||!s.value.endTime)return;let k=new Date(s.value.startTime),S=new Date(s.value.endTime);S<k&&([k,S]=[S,k]),r("eventCreate",{start_time:k,end_time:S}),s.value={isDragging:!1,startDay:-1,endDay:-1,start:void 0,end:void 0,startTime:void 0,endTime:void 0},document.removeEventListener("mousemove",w),document.removeEventListener("mouseup",E)}function C(k,S){if(!m.value)return new Date(S);const V=m.value.getBoundingClientRect(),D=k-V.top,L=Fo,I=D/$o,M=Math.floor(I*L),te=new Date(S);te.setHours(Math.floor(M/60));const ee=Math.round(M%60/5)*5;return te.setMinutes(ee),te.setSeconds(0),te.setMilliseconds(0),te}function A(){const k=new Date;u.value=b.value.some(V=>V.getDate()===k.getDate()&&V.getMonth()===k.getMonth()&&V.getFullYear()===k.getFullYear());const S=k.getHours()*60+k.getMinutes();c.value=S/Fo*$o}function T(k,S){if(!a.eventContent){r("eventClick",k);return}if(S){const V=S.currentTarget.getBoundingClientRect(),D={top:V.top+window.scrollY+V.height/2,left:V.left+window.scrollX+V.width+10};r("openPopover",k,D)}else r("openPopover",k)}function B(k,S){for(;h.value.length<=S;)h.value.push(null);k?h.value[S]=k instanceof Element?k:k.$el:h.value[S]=null}function P(k){g.value&&(g.value.scrollTop=k*$o)}return n.onMounted(()=>{A(),d.value=setInterval(A,6e4),n.nextTick(()=>{P(6)})}),n.onUnmounted(()=>{document.removeEventListener("mousemove",w),document.removeEventListener("mouseup",E),d.value&&clearInterval(d.value)}),(k,S)=>{var V;return n.openBlock(),n.createElementBlock("div",u_,[n.createElementVNode("div",{ref_key:"calendarGrid",ref:p,class:"weekGrid border-bottom me-1"},[S[1]||(S[1]=n.createElementVNode("div",null,null,-1)),(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(b.value,D=>(n.openBlock(),n.createElementBlock("div",{key:D.toISOString(),class:"day-header p-05 txt-center m_txt12"},[n.createTextVNode(n.toDisplayString(n.unref(Tt)(D,{format:"DDD"}))+" ",1),n.createElementVNode("span",{class:n.normalizeClass(["txt-12 round p-025",{"color-gray":D.toDateString()!==new Date().toDateString(),"bg-primary color-white":D.toDateString()===new Date().toDateString()}])},n.toDisplayString(n.unref(Tt)(D,{format:"DD"})),3)]))),128))],512),n.createElementVNode("div",{ref_key:"scrollableContainer",ref:g,class:"overflow h-100p pe-05"},[n.createElementVNode("div",{ref_key:"dayColumnsContainer",ref:m,class:"weekGrid border-end relative"},[n.createElementVNode("div",{ref_key:"timeSlotsContainer",ref:f},[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(v.value,D=>(n.openBlock(),n.createElementBlock("div",{key:D.time,class:"txt-light txt-12 color-gray flex justify-content-center bg-gray-light border-start",style:n.normalizeStyle({height:`${$o}px`})},n.toDisplayString(D.time),5))),128))],512),u.value?(n.openBlock(),n.createElementBlock("div",{key:0,class:"absolute end w-100p z-2 flex pointer-events-none ps-4-5",style:n.normalizeStyle({top:`${c.value}px`})},[...S[2]||(S[2]=[n.createElementVNode("div",{class:"current-time-dot h-10px aspect-ratio-1 round bg-primary"},null,-1),n.createElementVNode("div",{class:"current-time-line w-100p bg-primary"},null,-1)])],4)):n.createCommentVNode("",!0),(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(b.value,(D,L)=>(n.openBlock(),n.createElementBlock("div",{key:D.toISOString(),ref_for:!0,ref:I=>B(I,L),class:"day-column top bottom border-start relative",onMousedown:I=>$(I,D)},[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(_.value.filter(I=>new Date(I.start_time).toDateString()===D.toDateString()),I=>(n.openBlock(),n.createElementBlock("div",{key:I.id,class:"event absolute radius-05 overflow-hidden pointer transition z-1 opacity-8 border",style:n.normalizeStyle({top:`${I.top}px`,height:`${I.height}px`,left:`${I.left}%`,width:`${I.width}%`,backgroundColor:I.color||"var(--bgl-primary)"}),onMousedown:S[0]||(S[0]=n.withModifiers(()=>{},["stop"])),onClick:n.withModifiers(M=>T(I,M),["stop"])},[n.createElementVNode("div",m_,[n.createElementVNode("div",p_,n.toDisplayString(I.title),1),n.createElementVNode("div",h_,n.toDisplayString(n.unref(Tt)(I.start_time,{format:"HH:mm"}))+" - "+n.toDisplayString(n.unref(Tt)(I.end_time,{format:"HH:mm"})),1)])],44,f_))),128))],40,d_))),128)),i.value&&s.value.isDragging&&s.value.start&&s.value.end&&y.value?(n.openBlock(),n.createElementBlock("div",{key:1,class:"drag-preview absolute bg-primary-tint pointer-events-none overflow-hidden opacity-7 z-1",style:n.normalizeStyle({left:`${s.value.start.x}px`,top:`${y.value.top}px`,width:`${((V=h.value[s.value.startDay])==null?void 0:V.offsetWidth)||100}px`,height:`${y.value.height}px`})},[n.createElementVNode("div",g_,n.toDisplayString(s.value.startTime?n.unref(Tt)(s.value.startTime,{format:"HH:mm"}):"")+" - "+n.toDisplayString(s.value.endTime?n.unref(Tt)(s.value.endTime,{format:"HH:mm"}):""),1)],4)):n.createCommentVNode("",!0)],512)],512),S[3]||(S[3]=n.createElementVNode("div",{class:"border-bottom me-1"},null,-1))])}}}),y_=Ve(v_,[["__scopeId","data-v-383c5921"]]),b_={class:"calendar"},__={class:"flex m_block m_pb-1"},w_={class:"txt-light my-0 m_pb-1"},$_={class:"ms-auto flex gap-025"},k_=n.defineComponent({__name:"Index",props:{events:{default:()=>[]},startDate:{default:()=>new Date},view:{default:"Week"},weekStart:{default:"Sunday"}},emits:["eventClick","eventCreate","eventUpdate","eventDelete","dateChange","viewChange","ready"],setup(e,{expose:t,emit:o}){const r=e,a=o,l=n.ref(new Date(r.startDate)),i=n.ref(r.view),s=n.ref(),c=n.ref(!1),u=n.ref(),d={Week:y_,Month:c_,Day:Zb,Agenda:Fb},f=n.computed(()=>{const w=new Date(l.value);let E=new Date(l.value);const C=r.weekStart==="Sunday"?0:1;switch(i.value){case"Week":w.setDate(w.getDate()-w.getDay()+C),E.setDate(w.getDate()+6);break;case"Month":case"Agenda":w.setDate(-6),E=new Date(w.getFullYear(),w.getMonth()+2,7);break;case"Day":E.setDate(E.getDate()+1);break;default:console.error(`Invalid view: ${i.value}`)}return{start:w,end:E}}),p=n.computed(()=>({visibleDateRange:f.value,currentDate:l.value,currentView:i.value}));function h(w){console.log("handleDateChange",w),l.value=new Date(w),a("dateChange",p.value)}function m(w){i.value=w,a("viewChange",p.value)}function g(w){a("eventClick",w)}function b(w){a("eventCreate",w)}function v(w){a("eventUpdate",w)}function y(w){a("eventDelete",w)}function _(w,E){s.value=w,u.value=E,c.value=!0}function $(){c.value=!1,s.value=void 0,u.value=void 0}return t({visibleDateRange:f,currentView:i,currentDate:l,openPopover:_,closePopover:$}),n.onMounted(()=>{a("ready",p.value)}),(w,E)=>(n.openBlock(),n.createElementBlock("div",b_,[n.createElementVNode("div",__,[n.createElementVNode("h3",w_,[n.createElementVNode("b",null,n.toDisplayString(n.unref(Tt)(l.value,"MMMM")),1),n.createTextVNode(" "+n.toDisplayString(n.unref(Tt)(l.value,"YYYY")),1)]),n.createElementVNode("div",$_,[n.createVNode(n.unref(on),{thin:"",value:i.value,iconEnd:"keyboard_arrow_down",color:"gray"},{default:n.withCtx(()=>[(n.openBlock(),n.createElementBlock(n.Fragment,null,n.renderList(d,(C,A)=>n.createVNode(n.unref(Wn),{key:A,thin:"",title:A,onClick:T=>m(A)},null,8,["title","onClick"])),64))]),_:1},8,["value"]),n.createVNode(n.unref(ne),{icon:"calendar",thin:"",color:"gray",value:"Today",onClick:E[0]||(E[0]=C=>h(new Date))}),n.createVNode(n.unref(ne),{icon:"chevron_left",color:"gray",thin:"",onClick:E[1]||(E[1]=C=>h(n.unref(ku)(l.value,{[i.value]:-1})))}),n.createVNode(n.unref(ne),{icon:"chevron_right",color:"gray",thin:"",onClick:E[2]||(E[2]=C=>h(n.unref(ku)(l.value,{[i.value]:1})))})])]),(n.openBlock(),n.createBlock(n.resolveDynamicComponent(d[i.value]),{events:e.events,"start-date":l.value,"week-start":e.weekStart,onEventClick:g,onEventCreate:b,onEventUpdate:v,onEventDelete:y,onDateChange:h,onOpenPopover:_},{eventContent:n.withCtx(({event:C,close:A})=>[n.renderSlot(w.$slots,"eventContent",{event:C,close:A},void 0,!0)]),_:3},40,["events","start-date","week-start"])),n.createVNode(Bb,{event:s.value,position:u.value,show:c.value,"has-event-content-slot":!!w.$slots.eventContent,onClose:$,onEventClick:g},{eventContent:n.withCtx(({event:C,close:A})=>[n.renderSlot(w.$slots,"eventContent",{event:C,close:A},void 0,!0)]),_:3},8,["event","position","show","has-event-content-slot"])]))}}),E_=Ve(k_,[["__scopeId","data-v-56cb2fe4"]]),C_={key:0,class:"card_label"},en=n.defineComponent({__name:"Card",props:{label:{},thin:{type:Boolean},outline:{type:Boolean},h100:{type:Boolean},to:{},href:{},overflowX:{type:Boolean},overflowY:{type:Boolean},frame:{type:Boolean},bg:{}},setup(e){const t=e,o=n.computed(()=>{const a={};return t.href!==void 0&&t.href!==""?a.href=t.href:t.to!==void 0&&t.to!==""&&(a.to=t.to),a}),r=n.computed(()=>t.href!==void 0&&t.href!==""?"a":t.to!==void 0&&t.to!==""?"router-link":"div");return(a,l)=>{const i=n.resolveDirective("ripple");return n.withDirectives((n.openBlock(),n.createBlock(n.resolveDynamicComponent(r.value),n.mergeProps(o.value,{class:["bgl_card",{thin:e.thin,border:e.outline,"h-100":e.h100,[e.bg||""]:e.bg,"overflow-x":e.overflowX,"overflow-y":e.overflowY,card_frame:e.frame}]}),{default:n.withCtx(()=>[e.label?(n.openBlock(),n.createElementBlock("span",C_,n.toDisplayString(e.label),1)):n.createCommentVNode("",!0),n.renderSlot(a.$slots,"default")]),_:3},16,["class"])),[[i,!!e.to]])}}}),S_=["dir"],x_={key:0,class:"dots"},T_=["onClick"],na=1,Ud=100,N_=n.defineComponent({__name:"Carousel",props:{autoHeight:{type:Boolean,default:!1},allowScroll:{type:Boolean,default:!0},freeDrag:{type:Boolean,default:!0},items:{type:Number,default:4},index:{type:Number,default:0},rtl:{type:Boolean,default:!1},autoplay:{type:Boolean,default:!1},autoPlaySpeed:{type:Number,default:4e3},dots:{type:Boolean,default:!1}},emits:["update:index"],setup(e,{expose:t,emit:o}){const r=e,a=o,l={TOUCH:150,MOBILE:420,DESKTOP:840,MAX_DURATION:300,BASE_DURATION:150,DURATION_PER_PANEL:50},i={DRAG:20,TOUCH:5,SWIPE_PERCENT:.1,VELOCITY:.15,WHEEL_PERCENT:.3},s=n.ref(),c=n.computed(()=>!!s.value),u=n.ref(r.items),d=n.ref(r.index),f=n.ref(0),p=n.ref("auto"),h=n.ref(!1),m=n.ref(!1),g=n.ref(0),b=n.ref(0),v=n.ref(0),y=n.ref(0),_=n.ref(0),$=n.ref(0);let w,E;const C=n.ref([]);function A(){if(C.value.length<2)return 0;const de=Date.now(),Se=C.value.filter(R=>de-R.time<Ud);if(Se.length<2)return 0;const[$e]=Se,ae=Se[Se.length-1],we=ae.time-$e.time;return we===0?0:(ae.position-$e.position)/we}function T(){if(!s.value)return 0;const{transform:de}=s.value.style,Se=de?Number.parseInt(de.replace(/[^-\d.]/g,""),10):0;return r.rtl?-Se:Se}function B(de){if(!s.value)return;const Se=r.rtl?-de:de;s.value.style.transform=`translateX(${Se}px)`}function P(de){return de<.5?2*de*de:-1+(4-2*de)*de}function k(de,Se,$e){const ae=performance.now();function we(R){if(!c.value)return;const q=R-ae,fe=Math.min(q/$e,1),be=de+(Se-de)*P(fe);B(be),fe<1&&requestAnimationFrame(we)}requestAnimationFrame(we)}function S(de,Se=!1){if(M(),!c.value||!s.value||de<0||de>=f.value)return;const $e=s.value.offsetWidth,ae=$e*na/100,we=(u.value-1)*ae,R=($e-we)/u.value,q=de*ae,fe=-(R*de+q),be=T(),Oe=Se?l.TOUCH:window.innerWidth<600?l.MOBILE:l.DESKTOP;k(be,fe,Oe),d.value=de,I()}function V(){if(!c.value)return;M();const de=r.rtl?(d.value-1+f.value)%f.value:(d.value+1)%f.value;S(de)}function D(){if(!c.value)return;M();const de=r.rtl?(d.value+1)%f.value:(d.value-1+f.value)%f.value;S(de)}function L(){if(!(!c.value||!s.value))try{const de=s.value.children[d.value];if(!de||!(de instanceof HTMLElement))return;const $e=Array.from(de.children).reduce((ae,we)=>ae+we.clientHeight,0);p.value=`${$e}px`}catch(de){console.error("Error calculating height:",de)}}function I(){r.autoHeight&&setTimeout(L,200)}function M(){!c.value||!s.value||(f.value=s.value.children.length)}function te(){r.index!==d.value&&a("update:index",d.value)}function ee(){if(!c.value||!s.value)return;u.value=window.innerWidth<600?1:window.innerWidth<991?Math.min(r.items,2):r.items;const de=s.value.offsetWidth,Se=de*na/100,$e=(u.value-1)*Se,ae=(de-$e)/u.value,we=d.value*Se,R=-(ae*d.value+we);B(R),I()}function O(){E&&clearInterval(E)}function z(de){h.value&&(de.preventDefault(),de.stopPropagation())}async function H(){if(await n.nextTick(),!c.value||!s.value)return;Array.from(s.value.querySelectorAll("img, a")).forEach($e=>{$e.setAttribute("draggable","false"),$e.removeEventListener("click",z,!0),$e.addEventListener("click",z,!0)}),Array.from(s.value.children).forEach($e=>{const ae=$e;ae.setAttribute("draggable","false"),ae.removeEventListener("click",z,!0),ae.addEventListener("click",z,!0)})}function Z(de){de.stopPropagation(),!(de.button!==0||!r.freeDrag||!c.value)&&(O(),g.value=de.pageX,v.value=T(),m.value=!0,h.value=!1,document.addEventListener("mousemove",ie),document.addEventListener("mouseup",pe))}function ie(de){if(!c.value||!s.value||!m.value)return;const $e=de.pageX-g.value;if(Math.abs($e)>i.DRAG&&(h.value=!0),h.value){const ae=v.value+(r.rtl?-$e:$e),we=0,R=s.value.offsetWidth,q=R*na/100,fe=(u.value-1)*q,Oe=-((R-fe)/u.value*(f.value-1)+q*(f.value-1)),Ye=Math.max(Oe,Math.min(we,ae));B(Ye)}}function pe(){if(m.value=!1,document.removeEventListener("mousemove",ie),document.removeEventListener("mouseup",pe),!c.value||!s.value)return;const de=T(),Se=s.value.offsetWidth/u.value,$e=-de/Se,ae=de-v.value,we=Math.abs(ae)/Se;let R=$e;if(we>i.SWIPE_PERCENT){const q=ae>0?-1:1;R=Math.floor($e)+(q<0?0:1)}else R=Math.round($e);R=Math.max(0,Math.min(R,f.value-1)),S(R,!0),h.value&&setTimeout(()=>{h.value=!1},10)}const he=n.ref(!1),Ce=n.ref(!1);function Le(de){if(!r.freeDrag||!c.value)return;const Se=de.target,$e=Se.matches('button, a, input, select, textarea, [role="button"]')||Se.closest('button, a, input, select, textarea, [role="button"]');if($e===!1||$e===null){O();const[ae]=de.touches;g.value=ae.pageX,b.value=ae.pageY,y.value=ae.pageX,_.value=Date.now(),v.value=T(),C.value=[{time:_.value,position:y.value}],m.value=!0,he.value=!1,s.value&&(s.value.style.transition="none")}}function Ee(de){if(!c.value||!s.value||!m.value)return;const[Se]=de.touches,$e=Se.pageX,ae=Se.pageY,we=$e-g.value,R=ae-b.value;if(!he.value){if((Math.abs(we)>5||Math.abs(R)>5)&&(Ce.value=Math.abs(we)>Math.abs(R),he.value=!0,!Ce.value)){m.value=!1;return}return}if(!Ce.value)return;const q=Date.now();C.value.push({time:q,position:$e}),y.value=$e;const fe=q-Ud;if(C.value=C.value.filter(be=>be.time>=fe),Math.abs(we)>i.TOUCH&&(h.value=!0,de.preventDefault()),h.value){const be=s.value.offsetWidth,Oe=be*na/100,Ye=(u.value-1)*Oe,Y=(be-Ye)/u.value*f.value+Oe*(f.value-1);let oe=v.value+(r.rtl?-we:we);if(oe>0)oe*=.5;else if(oe<-Y+be){const _e=-Y+be-oe;oe=-Y+be-_e*.5}B(oe)}}function Je(){if(!c.value||!s.value||!m.value||!Ce.value){m.value=!1,he.value=!1;return}const de=s.value.offsetWidth,Se=de*na/100,$e=(u.value-1)*Se,ae=(de-$e)/u.value,we=ae+Se,R=T();let q=R;if(R>0)q=0;else{const ge=-(ae*(f.value-1)+Se*(f.value-1));R<ge&&(q=ge)}const fe=Math.abs(q/we),be=y.value-g.value,Oe=Math.abs(be)/we,Ye=A();let Q=fe,Y=0;Math.abs(Ye)>i.VELOCITY&&(Y=Ye<0?1:-1);const oe=window.innerWidth<600;if(Oe>i.SWIPE_PERCENT||Math.abs(Ye)>i.VELOCITY){const ge=Oe>i.SWIPE_PERCENT?be>0?-1:1:Y,Be=r.rtl?-ge:ge;oe?Q=d.value+Be:Q=Math.round(fe)+Be}else Q=oe?d.value:Math.round(fe);Q=Math.max(0,Math.min(Q,f.value-1)),d.value=Q;const _e=Math.abs(Q-fe),Ae=Math.min(Math.abs(Ye)*1e3,1),Ie=Math.min(l.BASE_DURATION*(1-Ae*.5)+_e*l.DURATION_PER_PANEL,l.MAX_DURATION);s.value.style.transition=`transform ${Ie}ms cubic-bezier(0.4, 0, 0.2, 1)`;const et=Q*Se,se=-(ae*Q+et);B(se),setTimeout(()=>{s.value&&(s.value.style.transition="none")},Ie),C.value=[],h.value=!1,he.value=!1}function st(de){if(!r.allowScroll||!c.value||!s.value||m.value||h.value||!(Math.abs(de.deltaX)>Math.abs(de.deltaY)))return;O(),w&&clearTimeout(w),$.value+=r.rtl?-de.deltaX:de.deltaX,w=setTimeout(()=>{$.value=0},50);const ae=s.value.offsetWidth/u.value*i.WHEEL_PERCENT;if(Math.abs($.value)>ae){const we=$.value>0?1:-1,R=Math.max(0,Math.min(d.value+we,f.value-1));R!==d.value&&(S(R,!0),$.value=0)}}return n.onMounted(()=>{window.addEventListener("resize",ee),I(),ee(),M(),H(),s.value&&(f.value=s.value.children.length),r.autoplay&&(E=setInterval(V,r.autoPlaySpeed))}),n.onUnmounted(()=>{c.value&&s.value&&Array.from(s.value.children).forEach(de=>{de.removeEventListener("click",z)}),window.removeEventListener("resize",ee),document.removeEventListener("mousemove",ie),document.removeEventListener("mouseup",pe),O(),w&&clearTimeout(w)}),n.watch(()=>r.index,de=>{S(de)}),n.watch(()=>d.value,te),t({goToSlide:S,next:V,prev:D,countSlides:M,clearAutoplay:O}),(de,Se)=>(n.openBlock(),n.createElementBlock("div",{class:"BglCarousel",dir:e.rtl?"rtl":"ltr"},[n.createElementVNode("div",{ref_key:"bglSlider",ref:s,class:n.normalizeClass(["bgl-slider",{dragging:h.value,clicking:m.value,[`slides-${u.value}`]:!0,grab:e.freeDrag&&f.value>1,autoHeight:e.autoHeight}]),style:n.normalizeStyle({"--item-count":u.value,height:p.value}),onMousedown:Z,onMouseover:O,onFocusin:O,onTouchstart:Le,onTouchmove:Ee,onTouchend:Je,onWheel:st},[n.renderSlot(de.$slots,"default",{},void 0,!0)],38),r.dots&&f.value>1?(n.openBlock(),n.createElementBlock("div",x_,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(f.value,$e=>(n.openBlock(),n.createElementBlock("span",{key:$e,class:n.normalizeClass(["dot",{current:d.value===$e-1}]),onClick:ae=>S($e-1)},null,10,T_))),128))])):n.createCommentVNode("",!0),n.createElementVNode("div",{class:n.normalizeClass(["navigation-buttons",{rtl:e.rtl}])},[n.createElementVNode("span",{class:"prev",onClick:D},[n.renderSlot(de.$slots,"prev",{index:d.value,prev:D},void 0,!0)]),n.createElementVNode("span",{class:"next",onClick:V},[n.renderSlot(de.$slots,"next",{index:d.value,next:V},void 0,!0)])],2)],8,S_))}}),D_=Ve(N_,[["__scopeId","data-v-c26fcda3"]]),A_=new Set(["div","span","p"]),B_=new Set(["img","iframe"]);function Ai(e){const{mode:t="form",getFormData:o,onUpdateModelValue:r,includeUnset:a=!1}=e;function l(u,d=0){if(u==null)return"";if(typeof u!="object")return String(u);if(Array.isArray(u))return u.map(m=>l(m,d+1)).join(", ");const f=d>0?" ".repeat(d):"",p=" ".repeat(d+1),h=Object.entries(u);return h.length===0?"{}":d>0?`{
|
|
11
11
|
${h.map(([m,g])=>`${p}${m}: ${l(g,d+1)}`).join(`,
|
|
12
12
|
`)}
|
|
13
13
|
${f}}`:h.map(([m,g])=>{const b=typeof g=="object"&&g!==null?l(g,d+1):String(g);return`${m}: ${b}`}).join(`
|
package/dist/index.mjs
CHANGED
|
@@ -1391,14 +1391,14 @@ ${t.event.url}`), `https://calendar.google.com/calendar/render?${b.toString()}`;
|
|
|
1391
1391
|
}, null, 8, ["src", "alt"])) : e.icon ? (_(), re($(qe), {
|
|
1392
1392
|
key: 1,
|
|
1393
1393
|
icon: e.icon,
|
|
1394
|
-
size: e.size
|
|
1394
|
+
size: e.size / 40
|
|
1395
1395
|
}, null, 8, ["icon", "size"])) : (_(), A("p", {
|
|
1396
1396
|
key: 2,
|
|
1397
1397
|
style: je({ "line-height": `${e.size}px`, "font-size": `calc(1.5rem * ${e.size} / 50)` })
|
|
1398
1398
|
}, le((e.fallback || $(T2)(e.name || "")).toUpperCase()), 5))
|
|
1399
1399
|
], 4));
|
|
1400
1400
|
}
|
|
1401
|
-
}), fy = /* @__PURE__ */ Ke(dy, [["__scopeId", "data-v-
|
|
1401
|
+
}), fy = /* @__PURE__ */ Ke(dy, [["__scopeId", "data-v-7ae379be"]]), hy = /* @__PURE__ */ Te({
|
|
1402
1402
|
__name: "Badge",
|
|
1403
1403
|
props: {
|
|
1404
1404
|
color: {},
|