hisonvue 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +248 -0
- package/dist/HAccordion-CPtgQUK0.js +1 -0
- package/dist/HAccordion-ll-4cIAw.mjs +262 -0
- package/dist/HBaggie-D6omQoFh.js +1 -0
- package/dist/HBaggie-D_7mEiuV.mjs +283 -0
- package/dist/HBanner-DmcMOFqS.mjs +420 -0
- package/dist/HBanner-Io4SdGGs.js +1 -0
- package/dist/HButton-DAVuDmOQ.js +1 -0
- package/dist/HButton-DAriO81x.mjs +256 -0
- package/dist/HCalendar-DKwGatUk.js +2 -0
- package/dist/HCalendar-w18iIB90.mjs +3387 -0
- package/dist/HCaption-6CbSqRA7.js +1 -0
- package/dist/HCaption-DwsXHDNK.mjs +275 -0
- package/dist/HChart-C86JXUyW.js +1 -0
- package/dist/HChart-CcArHFr0.mjs +179 -0
- package/dist/HDrawer-DG1O42iF.mjs +439 -0
- package/dist/HDrawer-U5VC_okK.js +1 -0
- package/dist/HDropdown-Bs7AfefJ.mjs +393 -0
- package/dist/HDropdown-D4RAGmjE.js +1 -0
- package/dist/HFileset-BGuP9O4l.mjs +578 -0
- package/dist/HFileset-CuPR6Hwf.js +2 -0
- package/dist/HGap-BPAdnOQz.js +1 -0
- package/dist/HGap-DzGrfWVt.mjs +233 -0
- package/dist/HGrid-BiIhVCv_.mjs +345 -0
- package/dist/HGrid-C3EV_pgM.js +1 -0
- package/dist/HImagebox-D_DKeCrO.mjs +654 -0
- package/dist/HImagebox-t_UdFjQO.js +2 -0
- package/dist/HInput-BEyJqYkD.mjs +1103 -0
- package/dist/HInput-DMGLY473.js +1 -0
- package/dist/HInputGroup-D37WTYoI.mjs +281 -0
- package/dist/HInputGroup-Dcfr23sZ.js +1 -0
- package/dist/HLabel-B2FOqSiS.mjs +369 -0
- package/dist/HLabel-Dm48mSwn.js +1 -0
- package/dist/HLayout-BbCEm_aO.mjs +196 -0
- package/dist/HLayout-C1e4BZ_K.js +1 -0
- package/dist/HList-CAeYb-hz.mjs +419 -0
- package/dist/HList-eNXmMf27.js +1 -0
- package/dist/HModal-BDBEEpKm.mjs +778 -0
- package/dist/HModal-GODLq3wH.js +1 -0
- package/dist/HNote-CWnUjt3_.mjs +934 -0
- package/dist/HNote-D_Xwu9oL.js +1 -0
- package/dist/HPagination-Db_L9wv-.js +1 -0
- package/dist/HPagination-e5e2a5GS.mjs +496 -0
- package/dist/HParagraph-BRuSeOMU.js +1 -0
- package/dist/HParagraph-DYuB-qjY.mjs +463 -0
- package/dist/HPopup-Brp1FVpm.mjs +431 -0
- package/dist/HPopup-ChkoI3xm.js +1 -0
- package/dist/HSpinner-DDtU9PL_.js +1 -0
- package/dist/HSpinner-DOq2k5kT.mjs +281 -0
- package/dist/HTable-DGFnzD4u.js +1 -0
- package/dist/HTable-GCDP5O_J.mjs +620 -0
- package/dist/_plugin-vue_export-helper-BHFhmbuH.js +1 -0
- package/dist/_plugin-vue_export-helper-CHgC5LLL.mjs +9 -0
- package/dist/ar.es-CKau4tBl.js +5 -0
- package/dist/ar.es-XxSuE68c.mjs +57 -0
- package/dist/bg.es-BJ7fu6yy.mjs +57 -0
- package/dist/bg.es-Melqx1M5.js +5 -0
- package/dist/bn.es-CYlBkxc5.mjs +57 -0
- package/dist/bn.es-ClbAZ4WP.js +5 -0
- package/dist/bs.es-KjOcbE96.js +5 -0
- package/dist/bs.es-yMnaKmdi.mjs +57 -0
- package/dist/ca.es-BaGTENcW.js +5 -0
- package/dist/ca.es-DIhlxmQc.mjs +67 -0
- package/dist/cs.es-BN8oxRXQ.mjs +57 -0
- package/dist/cs.es-ChOlHqBr.js +5 -0
- package/dist/da.es-DJB5lAli.mjs +57 -0
- package/dist/da.es-DOFXbf8-.js +5 -0
- package/dist/de.es-DwE82Kaw.js +5 -0
- package/dist/de.es-glb8GeJh.mjs +57 -0
- package/dist/drag-and-drop.es-4ttM1tRs.js +5 -0
- package/dist/drag-and-drop.es-Ckzp6XEn.mjs +183 -0
- package/dist/el.es-CNrCgzYI.js +5 -0
- package/dist/el.es-_bBZf22h.mjs +76 -0
- package/dist/en.es-CV9nmQGr.mjs +57 -0
- package/dist/en.es-CgL601qd.js +5 -0
- package/dist/es.es-CZjcWK54.mjs +57 -0
- package/dist/es.es-IdFGKY7Q.js +5 -0
- package/dist/et.es-BygWmV3P.js +5 -0
- package/dist/et.es-CjvQAzNF.mjs +57 -0
- package/dist/fa.es-DW_0SmsT.js +5 -0
- package/dist/fa.es-DykeFwDA.mjs +57 -0
- package/dist/fi.es-Bl7Pp7AO.mjs +57 -0
- package/dist/fi.es-pgfJlZ8i.js +5 -0
- package/dist/fr.es-CNKVhFfO.mjs +57 -0
- package/dist/fr.es-OENguFuM.js +5 -0
- package/dist/he.es-bixEnAeH.js +5 -0
- package/dist/he.es-nF4GFhjH.mjs +57 -0
- package/dist/hisonvue.cjs.js +1 -0
- package/dist/hisonvue.css +1 -0
- package/dist/hisonvue.d.ts +19934 -0
- package/dist/hisonvue.es.js +114 -0
- package/dist/hr.es-CkRAP94O.js +5 -0
- package/dist/hr.es-QFfz660j.mjs +57 -0
- package/dist/hu.es-Ck2rE01V.mjs +57 -0
- package/dist/hu.es-DG6HeiQJ.js +5 -0
- package/dist/id.es-D4tPi6wP.js +5 -0
- package/dist/id.es-Je7FEUJ5.mjs +57 -0
- package/dist/index-BmKMHsSZ.js +153 -0
- package/dist/index-DUh7pai4.mjs +19976 -0
- package/dist/is.es-CDFqLYCV.js +5 -0
- package/dist/is.es-bzprHvXI.mjs +57 -0
- package/dist/it.es-BHgrw_C6.js +5 -0
- package/dist/it.es-CJtfqmNS.mjs +57 -0
- package/dist/ja.es-BaiGjqZ6.mjs +57 -0
- package/dist/ja.es-D-lxWwyb.js +5 -0
- package/dist/ka.es-CnnB6q4A.js +5 -0
- package/dist/ka.es-x9QJo_dl.mjs +57 -0
- package/dist/ko.es-6c447eTS.mjs +57 -0
- package/dist/ko.es-b18aaB3V.js +5 -0
- package/dist/lt.es-2twYdvmJ.mjs +57 -0
- package/dist/lt.es-BY9UQ6wZ.js +5 -0
- package/dist/mn.es-BLQRG1uu.mjs +57 -0
- package/dist/mn.es-YFS7gSdf.js +5 -0
- package/dist/nl.es-BEx-4hnj.js +5 -0
- package/dist/nl.es-bB1qWR_S.mjs +57 -0
- package/dist/no.es-BQnRWlWR.js +5 -0
- package/dist/no.es-CWDVXpTf.mjs +57 -0
- package/dist/pl.es-CKCsZ_02.js +5 -0
- package/dist/pl.es-Dzct23w9.mjs +57 -0
- package/dist/pt-br.es-BeBuiitI.mjs +57 -0
- package/dist/pt-br.es-oH7qh6Fd.js +5 -0
- package/dist/pt-pt.es-BeBuiitI.mjs +57 -0
- package/dist/pt-pt.es-DLk5I0ej.js +5 -0
- package/dist/ro.es-DfMVJ30M.mjs +57 -0
- package/dist/ro.es-DgTen1Dh.js +5 -0
- package/dist/ru.es-Bv9UvrBe.mjs +67 -0
- package/dist/ru.es-jGIQfREl.js +5 -0
- package/dist/scrollManager-BGnq4wyt.mjs +14 -0
- package/dist/scrollManager-CEEWQwoK.js +1 -0
- package/dist/setButtonCssEvent-B9WTs2X7.js +1 -0
- package/dist/setButtonCssEvent-dBs1GcAh.mjs +70 -0
- package/dist/sk.es-CUOTpLuL.mjs +57 -0
- package/dist/sk.es-D2bhVb26.js +5 -0
- package/dist/sl.es-DeIGgZbR.mjs +57 -0
- package/dist/sl.es-TV8Uraa1.js +5 -0
- package/dist/sq.es-CQJJrZHv.mjs +67 -0
- package/dist/sq.es-Cc65zxbr.js +5 -0
- package/dist/sr.es-CKS0AkiW.mjs +57 -0
- package/dist/sr.es-D5VNA_GW.js +5 -0
- package/dist/sv.es-ChHQRrAe.mjs +57 -0
- package/dist/sv.es-dBeK_DZs.js +5 -0
- package/dist/tr.es-B3v90gVv.mjs +57 -0
- package/dist/tr.es-BUz4S13G.js +5 -0
- package/dist/uk.es-B8uaeLcK.js +5 -0
- package/dist/uk.es-CiR4NnbN.mjs +67 -0
- package/dist/vi.es-2OFMtbQI.js +5 -0
- package/dist/vi.es-DFDi5l7p.mjs +67 -0
- package/dist/zh-cn.es-9cbEAuAi.mjs +67 -0
- package/dist/zh-cn.es-fDHCbCIg.js +5 -0
- package/dist/zh-hk.es-COzeh5F8.js +5 -0
- package/dist/zh-hk.es-z0tio4jE.mjs +67 -0
- package/nuxt/module.mjs +39 -0
- package/nuxt/plugin.mjs +21 -0
- package/package.json +53 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("./index-BmKMHsSZ.js"),ne=require("./HButton-DAVuDmOQ.js"),oe=require("./_plugin-vue_export-helper-BHFhmbuH.js"),ae={id:{type:String,required:!1},class:{type:[String,Array,Object],required:!1},style:{type:[String,Object,Array],required:!1},visible:{type:Boolean,default:!0},backgroundType:{type:String,default:o.BackgroundType.transparent,validator:n=>o.BACKGROUND_TYPE_VALUES.includes(n)},border:{type:Boolean,default:!1},initialIndex:{type:Number,default:0},transitionMs:{type:Number,default:600},navButtonStyle:{type:String,default:"chevron",validator:n=>n==="chevron"||n==="triangle"},showNavButtons:{type:Boolean,default:!0},showIndicators:{type:Boolean,default:!0},indicatorsPosition:{type:String,default:"bottom",validator:n=>n==="bottom"||n==="overlay"},indicatorClickable:{type:Boolean,default:!0},autoIntervalMs:{type:Number,default:0},autoDirection:{type:String,default:"next",validator:n=>n==="next"||n==="prev"},loop:{type:Boolean,default:!0},pauseOnHover:{type:Boolean,default:!0}},se=e.defineComponent({name:"HBanner",components:{HButton:ne.default},props:ae,emits:["mounted","responsive-change","change","next","prev","autoplay-start","autoplay-stop"],setup(n,{emit:a}){const u=n.id?n.id:o.getUUID(),A=`hbanner:${u}`,z=o.useDevice(),g=e.useSlots(),l=e.ref(null),s=e.ref(null),d=e.ref(n.visible),j=e.computed(()=>d.value?"":"hison-display-none"),k=e.ref(n.border??!1),G=e.computed(()=>k.value?"hison-border":""),B=e.ref(n.backgroundType),K=e.computed(()=>{switch(B.value){case o.BackgroundType.empty:return"hison-bg-empty";case o.BackgroundType.transparent:return"hison-bg-transparent";default:return"hison-bg-filled"}}),w=e.ref(n.navButtonStyle),N=e.ref(n.showNavButtons),S=e.ref(n.showIndicators),I=e.ref(n.indicatorsPosition),Y=e.computed(()=>I.value==="overlay"?"hison-banner-indicators-overlay":"hison-banner-indicators-bottom"),M=e.ref(n.indicatorClickable),T=e.ref(n.autoIntervalMs),E=e.ref(n.autoDirection),c=e.ref(n.loop),m=e.ref(n.pauseOnHover),P=e.ref(n.transitionMs);let h;const r=e.ref(0),f=e.ref(n.initialIndex??0),F=e.computed(()=>{var i;return((i=g.default)==null?void 0:i.call(g))??[]}),v=e.computed(()=>F.value.length),b=e.ref([]),O=()=>{b.value=o.extractResponsiveClasses(o.toClassString(n.class)||"",z.value),o.getIndexSpecificClassNameFromClassList(b.value,"col")===-1&&b.value.push("hison-col-12"),o.addComponentNameToClass(b.value,"size",o.hisonCloser.componentStyle.size),o.addComponentNameToClass(b.value,"color","primary")},J=e.computed(()=>{const t=[];return t.push(...o.extractPrefixedClasses(o.toClassString(n.class)||"","size")),t.push(...o.extractPrefixedClasses(o.toClassString(n.class)||"","color")),t}),R=e.computed(()=>!c.value&&r.value<=0),U=e.computed(()=>!c.value&&r.value>=Math.max(0,v.value-1)),Q=e.computed(()=>({display:"flex",flexDirection:"row",width:"100%",transform:`translateX(${-r.value*100}%)`,transition:`transform ${Math.max(0,P.value)}ms ease`})),L=t=>{if(v.value<=0)return 0;if(c.value){const i=v.value;return(t%i+i)%i}return Math.min(Math.max(0,t),v.value-1)},y=t=>{const i=r.value,q=L(t);i!==q&&(r.value=q,a("change",q,l.value))},D=()=>{if(!c.value&&R.value)return;const t=L(r.value-1);r.value=t,a("prev",t,l.value),a("change",t,l.value)},H=()=>{if(!c.value&&U.value)return;const t=L(r.value+1);r.value=t,a("next",t,l.value),a("change",t,l.value)},V=()=>{h&&(window.clearInterval(h),h=void 0,a("autoplay-stop",l.value))},p=()=>{V();const t=Number(T.value);!Number.isFinite(t)||t<100||v.value<=1||(h=window.setInterval(()=>{E.value==="prev"?D():H()},t),a("autoplay-start",l.value))},W=()=>{m.value&&V()},Z=()=>{m.value&&p()},$=e.ref(null),C=e.ref(0),_=t=>{!t.touches||t.touches.length!==1||($.value=t.touches[0].clientX,C.value=0)},ee=t=>{$.value==null||!t.touches||t.touches.length!==1||(C.value=t.touches[0].clientX-$.value)},te=()=>{Math.abs(C.value)>40&&(C.value>0?D():H()),$.value=null,C.value=0},X=()=>{o.hisonCloser.component.bannerList[u]&&o.hisonCloser.component.bannerList[u].isHisonvueComponent&&console.warn(`[Hisonvue] The banner ID is at risk of being duplicated. ${u}`),o.registerReloadable(A,()=>{x(),e.nextTick(X)}),O(),l.value={isHisonvueComponent:!0,getId:()=>u,getType:()=>"banner",isVisible:()=>d.value,setVisible:t=>{d.value=t},isBorder:()=>k.value,setBorder:t=>{k.value=t},getBackgroundType:()=>B.value,setBackgroundType:t=>{B.value=t},getCurrentIndex:()=>r.value,setCurrentIndex:t=>{y(t)},getInitialIndex:()=>f.value,setInitialIndex:t=>{f.value=Number.isFinite(t)?Math.max(0,Math.trunc(t)):0,y(f.value)},getSlideCount:()=>v.value,next:()=>{H()},prev:()=>{D()},goTo:t=>{y(t)},getNavButtonStyle:()=>w.value,setNavButtonStyle:t=>{w.value=t},isShowNavButtons:()=>N.value,setShowNavButtons:t=>{N.value=t},isShowIndicators:()=>S.value,setShowIndicators:t=>{S.value=t},getIndicatorsPosition:()=>I.value,setIndicatorsPosition:t=>{I.value=t},isIndicatorClickable:()=>M.value,setIndicatorClickable:t=>{M.value=t},getAutoInterval:()=>T.value,setAutoInterval:t=>{T.value=Number(t),h&&p()},getAutoDirection:()=>E.value,setAutoDirection:t=>{E.value=t},isLoop:()=>c.value,setLoop:t=>{c.value=t},isPauseOnHover:()=>m.value,setPauseOnHover:t=>{m.value=t},startAuto:()=>{p()},stopAuto:()=>{V()},getTransitionMs:()=>P.value,setTransitionMs:t=>{P.value=Math.max(0,Number(t)||0)},reload:()=>o.reloadHisonComponent(A)},o.hisonCloser.component.bannerList[u]=l.value,a("mounted",l.value),r.value=L(f.value),p()},x=()=>{V(),delete o.hisonCloser.component.bannerList[u]};return e.onMounted(X),e.onBeforeUnmount(x),e.watch(z,t=>{O(),a("responsive-change",t)}),e.watch(()=>n.visible,t=>d.value=t),e.watch(()=>n.border,t=>k.value=!!t),e.watch(()=>n.backgroundType,t=>B.value=t),e.watch(()=>n.navButtonStyle,t=>w.value=t),e.watch(()=>n.showNavButtons,t=>N.value=t),e.watch(()=>n.showIndicators,t=>S.value=t),e.watch(()=>n.indicatorsPosition,t=>{I.value=t}),e.watch(()=>n.indicatorClickable,t=>M.value=t),e.watch(()=>n.transitionMs,t=>P.value=t),e.watch(()=>n.autoIntervalMs,t=>{T.value=t,h&&p()}),e.watch(()=>n.autoDirection,t=>E.value=t),e.watch(()=>n.loop,t=>c.value=t),e.watch(()=>n.pauseOnHover,t=>m.value=t),e.watch(()=>n.initialIndex,t=>{const i=Number.isFinite(t)?Math.max(0,Math.trunc(t)):0;f.value=i,y(i)}),e.watch(()=>n.class,()=>{O()}),{id:u,props:n,bannerMethods:e.computed(()=>e.unref(l)),visibleClass:j,borderClass:G,backgroundTypeClass:K,responsiveClassList:b,buttonClassList:J,slideNodes:F,slideCount:v,currentIndex:r,navButtonStyle:w,showNavButtons:N,showIndicators:S,indicatorsPositionClass:Y,indicatorClickable:M,isPrevDisabled:R,isNextDisabled:U,trackStyle:Q,trackRef:s,goPrev:D,goNext:H,goTo:y,onMouseEnter:W,onMouseLeave:Z,onTouchStart:_,onTouchMove:ee,onTouchEnd:te}}}),le={class:"hison-banner-viewport"},re={key:0,class:"hison-banner-nav"},ie={class:"hison-banner-nav-prev"},ue={key:0},ce={key:1},de={class:"hison-banner-nav-next"},ve={key:0},he={key:1},be=["title","onClick"];function me(n,a,u,A,z,g){const l=e.resolveComponent("HButton");return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["hison-wrapper",...n.responsiveClassList,n.visibleClass])},[e.createElementVNode("div",{class:e.normalizeClass(["hison-banner",n.borderClass,n.backgroundTypeClass]),style:e.normalizeStyle(n.props.style),onMouseenter:a[0]||(a[0]=(...s)=>n.onMouseEnter&&n.onMouseEnter(...s)),onMouseleave:a[1]||(a[1]=(...s)=>n.onMouseLeave&&n.onMouseLeave(...s)),onTouchstartPassive:a[2]||(a[2]=(...s)=>n.onTouchStart&&n.onTouchStart(...s)),onTouchmove:a[3]||(a[3]=e.withModifiers((...s)=>n.onTouchMove&&n.onTouchMove(...s),["prevent"])),onTouchendPassive:a[4]||(a[4]=(...s)=>n.onTouchEnd&&n.onTouchEnd(...s))},[e.createElementVNode("div",le,[e.createElementVNode("div",{ref:"trackRef",class:"hison-banner-track",style:e.normalizeStyle(n.trackStyle)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.slideNodes,(s,d)=>(e.openBlock(),e.createElementBlock("div",{key:d,class:"hison-banner-slide"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(s)))]))),128))],4)]),n.showNavButtons&&n.slideCount>1?(e.openBlock(),e.createElementBlock("div",re,[e.createElementVNode("div",ie,[e.renderSlot(n.$slots,"prev-button",{prev:n.goPrev,disabled:n.isPrevDisabled},()=>[e.createVNode(l,{id:`hison_banner_prev_button_${n.id}`,disable:n.isPrevDisabled,class:e.normalizeClass(["hison-col-12",...n.buttonClassList]),"background-type":"transparent",border:!1,onClick:n.goPrev},{icon:e.withCtx(()=>[n.navButtonStyle==="chevron"?(e.openBlock(),e.createElementBlock("span",ue,"〈")):n.navButtonStyle==="triangle"?(e.openBlock(),e.createElementBlock("span",ce,"◀")):e.createCommentVNode("",!0)]),_:1},8,["id","disable","class","onClick"])])]),e.createElementVNode("div",de,[e.renderSlot(n.$slots,"next-button",{next:n.goNext,disabled:n.isNextDisabled},()=>[e.createVNode(l,{id:`hison_banner_next_button_${n.id}`,disable:n.isNextDisabled,class:e.normalizeClass(["hison-col-12",...n.buttonClassList]),"background-type":"transparent",border:!1,onClick:n.goNext},{icon:e.withCtx(()=>[n.navButtonStyle==="chevron"?(e.openBlock(),e.createElementBlock("span",ve,"〉")):n.navButtonStyle==="triangle"?(e.openBlock(),e.createElementBlock("span",he,"▶")):e.createCommentVNode("",!0)]),_:1},8,["id","disable","class","onClick"])])])])):e.createCommentVNode("",!0),n.showIndicators&&n.slideCount>0?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["hison-banner-indicators",[n.indicatorsPositionClass]])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.slideCount,s=>(e.openBlock(),e.createElementBlock("button",{key:s,class:e.normalizeClass(["hison-banner-indicator",{active:n.currentIndex===s-1,"no-pointer":!n.indicatorClickable}]),title:`Go to ${s}`,type:"button",onClick:d=>n.indicatorClickable?n.goTo(s-1):null}," ● ",10,be))),128))],2)):e.createCommentVNode("",!0)],38)],2)}const fe=oe._export_sfc(se,[["render",me]]);exports.default=fe;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),A=require("./setButtonCssEvent-B9WTs2X7.js"),o=require("./index-BmKMHsSZ.js"),F=require("./_plugin-vue_export-helper-BHFhmbuH.js"),G={id:{type:String,required:!1},class:{type:[String,Array,Object],required:!1},style:{type:[String,Object,Array],required:!1},visible:{type:Boolean,default:!0},disable:{type:Boolean,default:!1},title:{type:String,required:!1},text:{type:String,required:!1},clickInterval:{type:Number,default:0},border:{type:Boolean,default:!0},backgroundType:{type:String,default:o.BackgroundType.filled,validator:e=>o.BACKGROUND_TYPE_VALUES.includes(e)},tabIndex:{type:[Number,String],default:null,validator:e=>e===null||e===""||!isNaN(+e)&&isFinite(+e)}},K=t.defineComponent({name:"HButton",props:G,inheritAttrs:!1,emits:["mounted","responsive-change","click","mousedown","mouseup","mouseover","mouseout"],setup(e,{emit:a}){var L;const r=t.ref(null),c=t.ref(null),i=e.id?e.id:o.getUUID(),h=`hbutton:${i}`,s=o.useDevice(),u=t.useSlots(),k=t.ref(!1),v=t.ref(e.clickInterval||0),T=t.ref(0),f=t.ref(e.visible),b=t.ref(e.disable),m=t.ref(e.title||""),q=t.computed(()=>f.value?"":"hison-display-none"),E=t.computed(()=>b.value?"hison-disable":""),y=t.ref(e.border??!1),H=t.computed(()=>y.value?"hison-border":""),g=t.ref(e.backgroundType||o.BackgroundType.filled),O=t.computed(()=>{switch(g.value){case o.BackgroundType.empty:return"hison-bg-empty";case o.BackgroundType.transparent:return"hison-bg-transparent";default:return"hison-bg-filled"}}),d=t.ref(e.text||""),N=t.ref(!1),p=t.ref(e.tabIndex!==null&&e.tabIndex!==""?Number(e.tabIndex):null),R=n=>!n||!n.length?!1:n.some(l=>l.type===t.Comment?!1:l.type===t.Text?!/^\s*$/.test(String(l.children??"")):!0),I=((L=u.default)==null?void 0:L.call(u))??[],V=I.length>0&&I.every(n=>n.type===t.Text);if(!u.label&&V){const n=I.map(l=>String(l.children??"")).join("").trim();d.value=n,N.value=!0}const z=t.computed(()=>{var n;return((n=u.default)==null?void 0:n.call(u))??[]}),P=t.computed(()=>R(z.value)),C=t.computed(()=>u.label?!0:N.value?!1:P.value),U=t.computed(()=>{if(!!u.icon&&!C.value&&!d.value)return e.title||"button"}),B=t.ref([]),w=()=>{B.value=o.extractResponsiveClasses(o.toClassString(e.class)||"",s.value),o.addComponentNameToClass(B.value,"size",o.hisonCloser.componentStyle.size),o.addComponentNameToClass(B.value,"color","primary")},j=async n=>{const l=Date.now();if(!k.value&&!(v.value>0&&l-T.value<v.value)){T.value=l,k.value=!0;try{const M=a("click",n,c.value),x=Array.isArray(M)?M:[];await Promise.all(x.filter(S=>S&&typeof S.then=="function").map(S=>S))}finally{k.value=!1}}},$=()=>{o.hisonCloser.component.buttonList[i]&&o.hisonCloser.component.buttonList[i].isHisonvueComponent&&console.warn(`[Hisonvue] The button ID is at risk of being duplicated. ${i}`),o.registerReloadable(h,()=>{D(),t.nextTick($)}),r.value&&A.addButtonCssEvent(r.value),w(),c.value={isHisonvueComponent:!0,getId:()=>i,getType:()=>"button",getText:()=>C.value?"":d.value,getTitle:()=>m.value,isVisible:()=>f.value,isDisable:()=>b.value,setText:n=>{C.value||(d.value=n)},setTitle:n=>{m.value=n},setVisible:n=>{f.value=n},setDisable:n=>{b.value=n},isBorder:()=>y.value,setBorder:n=>{y.value=n},getBackgroundType:()=>g.value,setBackgroundType:n=>{g.value=n},unlock:()=>{k.value=!1},getClickInterval:()=>v.value,setClickInterval:n=>{v.value=n,T.value=0},getTabIndex:()=>p.value,setTabIndex:n=>{p.value=n!=null?Number(n):null},focus:()=>{var n;(n=r.value)==null||n.focus()},reload:()=>o.reloadHisonComponent(h)},o.hisonCloser.component.buttonList[i]=c.value,a("mounted",c.value)},D=()=>{o.unregisterReloadable(h),delete o.hisonCloser.component.buttonList[i],r.value&&A.removeButtonCssEvent(r.value)};return t.onMounted($),t.onBeforeUnmount(D),t.watch(s,()=>{w(),a("responsive-change",s.value)}),t.watch(()=>e.visible,n=>{const l=!!n;l!==f.value&&(f.value=l)}),t.watch(()=>e.disable,n=>{const l=!!n;l!==b.value&&(b.value=l)}),t.watch(()=>e.title,n=>{const l=n??"";l!==m.value&&(m.value=l)}),t.watch(()=>e.border,n=>{const l=!!n;l!==y.value&&(y.value=l)}),t.watch(()=>e.backgroundType,n=>{n&&n!==g.value&&(g.value=n)}),t.watch(()=>e.text,n=>{if(!C.value){const l=n??"";l!==d.value&&(d.value=l)}}),t.watch(()=>e.tabIndex,n=>{const l=n===null||n===""?null:Number(n);l!==p.value&&(p.value=l)}),t.watch(()=>e.clickInterval,n=>{const l=Number(n)||0;l!==v.value&&(v.value=l,T.value=0)}),t.watch(()=>e.class,()=>{w()}),{buttonRef:r,buttonMethods:t.computed(()=>t.unref(c)),props:e,visibleClass:q,disable:b,disableClass:E,borderClass:H,backgroundTypeClass:O,title:m,responsiveClassList:B,hasLabelSlot:C,computedAriaLabel:U,internalText:d,tabIndex:p,onClick:j}}}),Y=["disabled","title","tabindex","aria-label"],J={key:2,class:"hison-button-text"};function Q(e,a,r,c,i,h){return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["hison-wrapper",...e.responsiveClassList,e.visibleClass])},[t.createElementVNode("button",{ref:"buttonRef",class:t.normalizeClass(["hison-button",e.disableClass,e.borderClass,e.backgroundTypeClass]),style:t.normalizeStyle(e.props.style),disabled:e.disable,title:e.title||void 0,tabindex:e.tabIndex??void 0,onClick:a[0]||(a[0]=(...s)=>e.onClick&&e.onClick(...s)),onMousedown:a[1]||(a[1]=s=>e.$emit("mousedown",s,e.buttonMethods)),onMouseup:a[2]||(a[2]=s=>e.$emit("mouseup",s,e.buttonMethods)),onMouseover:a[3]||(a[3]=s=>e.$emit("mouseover",s,e.buttonMethods)),onMouseout:a[4]||(a[4]=s=>e.$emit("mouseout",s,e.buttonMethods)),"aria-label":e.computedAriaLabel},[e.$slots.icon?t.renderSlot(e.$slots,"icon",{key:0}):t.createCommentVNode("",!0),e.hasLabelSlot?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[e.$slots.label?t.renderSlot(e.$slots,"label",{key:0}):t.renderSlot(e.$slots,"default",{key:1})],64)):(t.openBlock(),t.createElementBlock("span",J,t.toDisplayString(e.internalText),1))],46,Y)],2)}const W=F._export_sfc(K,[["render",Q]]);exports.default=W;
|
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
import { defineComponent as Z, ref as a, useSlots as _, computed as i, Text as U, onMounted as ee, onBeforeUnmount as te, watch as o, unref as le, Comment as ne, nextTick as ae, createElementBlock as A, openBlock as M, normalizeClass as V, createElementVNode as se, normalizeStyle as oe, renderSlot as w, createCommentVNode as ue, Fragment as ie, toDisplayString as re } from "vue";
|
|
2
|
+
import { a as de, r as ve } from "./setButtonCssEvent-dBs1GcAh.mjs";
|
|
3
|
+
import { B as be, f as N, g as ce, u as fe, e as me, t as ye, b as z, h, r as ge, c as Ce, d as ke } from "./index-DUh7pai4.mjs";
|
|
4
|
+
import { _ as pe } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
|
|
5
|
+
const he = {
|
|
6
|
+
/**
|
|
7
|
+
* Unique identifier for the button.
|
|
8
|
+
* - You can later retrieve its methods via `hison.component.getButton(id)`
|
|
9
|
+
* - ⚠️ Duplicate `id` values will throw an error at mount time
|
|
10
|
+
*/
|
|
11
|
+
id: { type: String, required: !1 },
|
|
12
|
+
/**
|
|
13
|
+
* Custom class applied to the button (string / array / object all supported).
|
|
14
|
+
* - Works with responsive classes like `hison-col-*`, `hison-size-*`, etc.
|
|
15
|
+
*/
|
|
16
|
+
class: {
|
|
17
|
+
type: [String, Array, Object],
|
|
18
|
+
required: !1
|
|
19
|
+
},
|
|
20
|
+
/**
|
|
21
|
+
* Inline style for the button (string, object, or an array of objects).
|
|
22
|
+
*/
|
|
23
|
+
style: {
|
|
24
|
+
type: [String, Object, Array],
|
|
25
|
+
required: !1
|
|
26
|
+
},
|
|
27
|
+
/**
|
|
28
|
+
* Controls visibility of the button.
|
|
29
|
+
* - Boolean only. Use `:visible="false"` (with a colon).
|
|
30
|
+
*/
|
|
31
|
+
visible: { type: Boolean, default: !0 },
|
|
32
|
+
/**
|
|
33
|
+
* Whether the button is disabled.
|
|
34
|
+
* - Boolean only. Use `:disable="true"` (with a colon).
|
|
35
|
+
*/
|
|
36
|
+
disable: { type: Boolean, default: !1 },
|
|
37
|
+
/**
|
|
38
|
+
* Tooltip text shown on hover (maps to `title` attribute).
|
|
39
|
+
*/
|
|
40
|
+
title: { type: String, required: !1 },
|
|
41
|
+
/**
|
|
42
|
+
* Text content of the button (alternative to default slot).
|
|
43
|
+
*/
|
|
44
|
+
text: { type: String, required: !1 },
|
|
45
|
+
/**
|
|
46
|
+
* Minimum interval (ms) between button clicks.
|
|
47
|
+
* - 0 disables the limit.
|
|
48
|
+
*/
|
|
49
|
+
clickInterval: { type: Number, default: 0 },
|
|
50
|
+
/**
|
|
51
|
+
* Whether to show border (rendered as subtle box-shadow).
|
|
52
|
+
* - Default: true (border)
|
|
53
|
+
*/
|
|
54
|
+
border: { type: Boolean, default: !0 },
|
|
55
|
+
/**
|
|
56
|
+
* Button background type.
|
|
57
|
+
* - 'filled' | 'empty' | 'transparent'
|
|
58
|
+
*/
|
|
59
|
+
backgroundType: {
|
|
60
|
+
type: String,
|
|
61
|
+
default: N.filled,
|
|
62
|
+
validator: (e) => be.includes(e)
|
|
63
|
+
},
|
|
64
|
+
/**
|
|
65
|
+
* Controls keyboard focus order of the element.
|
|
66
|
+
* - `0` enables natural tab navigation, positive numbers set custom order.
|
|
67
|
+
* - `null` or `''` removes tabindex (not focusable).
|
|
68
|
+
*/
|
|
69
|
+
tabIndex: {
|
|
70
|
+
type: [Number, String],
|
|
71
|
+
default: null,
|
|
72
|
+
validator: (e) => e === null || e === "" || !isNaN(+e) && isFinite(+e)
|
|
73
|
+
}
|
|
74
|
+
}, Te = Z({
|
|
75
|
+
name: "HButton",
|
|
76
|
+
props: he,
|
|
77
|
+
inheritAttrs: !1,
|
|
78
|
+
emits: ["mounted", "responsive-change", "click", "mousedown", "mouseup", "mouseover", "mouseout"],
|
|
79
|
+
setup(e, { emit: n }) {
|
|
80
|
+
var O;
|
|
81
|
+
const d = a(null), b = a(null), r = e.id ? e.id : ce(), T = `hbutton:${r}`, s = fe(), u = _(), I = a(!1), c = a(e.clickInterval || 0), S = a(0), m = a(e.visible), f = a(e.disable), y = a(e.title || ""), P = i(() => m.value ? "" : "hison-display-none"), j = i(() => f.value ? "hison-disable" : ""), g = a(e.border ?? !1), F = i(() => g.value ? "hison-border" : ""), C = a(e.backgroundType || N.filled), G = i(() => {
|
|
82
|
+
switch (C.value) {
|
|
83
|
+
case N.empty:
|
|
84
|
+
return "hison-bg-empty";
|
|
85
|
+
case N.transparent:
|
|
86
|
+
return "hison-bg-transparent";
|
|
87
|
+
default:
|
|
88
|
+
return "hison-bg-filled";
|
|
89
|
+
}
|
|
90
|
+
}), v = a(e.text || ""), R = a(!1), k = a(
|
|
91
|
+
e.tabIndex !== null && e.tabIndex !== "" ? Number(e.tabIndex) : null
|
|
92
|
+
), K = (t) => !t || !t.length ? !1 : t.some((l) => l.type === ne ? !1 : l.type === U ? !/^\s*$/.test(String(l.children ?? "")) : !0), D = ((O = u.default) == null ? void 0 : O.call(u)) ?? [], Y = D.length > 0 && D.every((t) => t.type === U);
|
|
93
|
+
if (!u.label && Y) {
|
|
94
|
+
const t = D.map((l) => String(l.children ?? "")).join("").trim();
|
|
95
|
+
v.value = t, R.value = !0;
|
|
96
|
+
}
|
|
97
|
+
const x = i(() => {
|
|
98
|
+
var t;
|
|
99
|
+
return ((t = u.default) == null ? void 0 : t.call(u)) ?? [];
|
|
100
|
+
}), J = i(() => K(x.value)), p = i(() => u.label ? !0 : R.value ? !1 : J.value), Q = i(() => {
|
|
101
|
+
if (!!u.icon && !p.value && !v.value) return e.title || "button";
|
|
102
|
+
}), B = a([]), L = () => {
|
|
103
|
+
B.value = me(ye(e.class) || "", s.value), z(B.value, "size", h.componentStyle.size), z(B.value, "color", "primary");
|
|
104
|
+
}, W = async (t) => {
|
|
105
|
+
const l = Date.now();
|
|
106
|
+
if (!I.value && !(c.value > 0 && l - S.value < c.value)) {
|
|
107
|
+
S.value = l, I.value = !0;
|
|
108
|
+
try {
|
|
109
|
+
const q = n("click", t, b.value), X = Array.isArray(q) ? q : [];
|
|
110
|
+
await Promise.all(
|
|
111
|
+
X.filter(($) => $ && typeof $.then == "function").map(($) => $)
|
|
112
|
+
);
|
|
113
|
+
} finally {
|
|
114
|
+
I.value = !1;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}, E = () => {
|
|
118
|
+
h.component.buttonList[r] && h.component.buttonList[r].isHisonvueComponent && console.warn(`[Hisonvue] The button ID is at risk of being duplicated. ${r}`), ge(T, () => {
|
|
119
|
+
H(), ae(E);
|
|
120
|
+
}), d.value && de(d.value), L(), b.value = {
|
|
121
|
+
isHisonvueComponent: !0,
|
|
122
|
+
getId: () => r,
|
|
123
|
+
getType: () => "button",
|
|
124
|
+
getText: () => p.value ? "" : v.value,
|
|
125
|
+
getTitle: () => y.value,
|
|
126
|
+
isVisible: () => m.value,
|
|
127
|
+
isDisable: () => f.value,
|
|
128
|
+
setText: (t) => {
|
|
129
|
+
p.value || (v.value = t);
|
|
130
|
+
},
|
|
131
|
+
setTitle: (t) => {
|
|
132
|
+
y.value = t;
|
|
133
|
+
},
|
|
134
|
+
setVisible: (t) => {
|
|
135
|
+
m.value = t;
|
|
136
|
+
},
|
|
137
|
+
setDisable: (t) => {
|
|
138
|
+
f.value = t;
|
|
139
|
+
},
|
|
140
|
+
isBorder: () => g.value,
|
|
141
|
+
setBorder: (t) => {
|
|
142
|
+
g.value = t;
|
|
143
|
+
},
|
|
144
|
+
getBackgroundType: () => C.value,
|
|
145
|
+
setBackgroundType: (t) => {
|
|
146
|
+
C.value = t;
|
|
147
|
+
},
|
|
148
|
+
unlock: () => {
|
|
149
|
+
I.value = !1;
|
|
150
|
+
},
|
|
151
|
+
getClickInterval: () => c.value,
|
|
152
|
+
setClickInterval: (t) => {
|
|
153
|
+
c.value = t, S.value = 0;
|
|
154
|
+
},
|
|
155
|
+
getTabIndex: () => k.value,
|
|
156
|
+
setTabIndex: (t) => {
|
|
157
|
+
k.value = t != null ? Number(t) : null;
|
|
158
|
+
},
|
|
159
|
+
focus: () => {
|
|
160
|
+
var t;
|
|
161
|
+
(t = d.value) == null || t.focus();
|
|
162
|
+
},
|
|
163
|
+
reload: () => Ce(T)
|
|
164
|
+
}, h.component.buttonList[r] = b.value, n("mounted", b.value);
|
|
165
|
+
}, H = () => {
|
|
166
|
+
ke(T), delete h.component.buttonList[r], d.value && ve(d.value);
|
|
167
|
+
};
|
|
168
|
+
return ee(E), te(H), o(s, () => {
|
|
169
|
+
L(), n("responsive-change", s.value);
|
|
170
|
+
}), o(() => e.visible, (t) => {
|
|
171
|
+
const l = !!t;
|
|
172
|
+
l !== m.value && (m.value = l);
|
|
173
|
+
}), o(() => e.disable, (t) => {
|
|
174
|
+
const l = !!t;
|
|
175
|
+
l !== f.value && (f.value = l);
|
|
176
|
+
}), o(() => e.title, (t) => {
|
|
177
|
+
const l = t ?? "";
|
|
178
|
+
l !== y.value && (y.value = l);
|
|
179
|
+
}), o(() => e.border, (t) => {
|
|
180
|
+
const l = !!t;
|
|
181
|
+
l !== g.value && (g.value = l);
|
|
182
|
+
}), o(() => e.backgroundType, (t) => {
|
|
183
|
+
t && t !== C.value && (C.value = t);
|
|
184
|
+
}), o(() => e.text, (t) => {
|
|
185
|
+
if (!p.value) {
|
|
186
|
+
const l = t ?? "";
|
|
187
|
+
l !== v.value && (v.value = l);
|
|
188
|
+
}
|
|
189
|
+
}), o(() => e.tabIndex, (t) => {
|
|
190
|
+
const l = t === null || t === "" ? null : Number(t);
|
|
191
|
+
l !== k.value && (k.value = l);
|
|
192
|
+
}), o(() => e.clickInterval, (t) => {
|
|
193
|
+
const l = Number(t) || 0;
|
|
194
|
+
l !== c.value && (c.value = l, S.value = 0);
|
|
195
|
+
}), o(() => e.class, () => {
|
|
196
|
+
L();
|
|
197
|
+
}), {
|
|
198
|
+
buttonRef: d,
|
|
199
|
+
buttonMethods: i(() => le(b)),
|
|
200
|
+
props: e,
|
|
201
|
+
visibleClass: P,
|
|
202
|
+
disable: f,
|
|
203
|
+
disableClass: j,
|
|
204
|
+
borderClass: F,
|
|
205
|
+
backgroundTypeClass: G,
|
|
206
|
+
title: y,
|
|
207
|
+
responsiveClassList: B,
|
|
208
|
+
hasLabelSlot: p,
|
|
209
|
+
computedAriaLabel: Q,
|
|
210
|
+
internalText: v,
|
|
211
|
+
tabIndex: k,
|
|
212
|
+
onClick: W
|
|
213
|
+
};
|
|
214
|
+
}
|
|
215
|
+
}), Ie = ["disabled", "title", "tabindex", "aria-label"], Se = {
|
|
216
|
+
key: 2,
|
|
217
|
+
class: "hison-button-text"
|
|
218
|
+
};
|
|
219
|
+
function Be(e, n, d, b, r, T) {
|
|
220
|
+
return M(), A("div", {
|
|
221
|
+
class: V([
|
|
222
|
+
"hison-wrapper",
|
|
223
|
+
...e.responsiveClassList,
|
|
224
|
+
e.visibleClass
|
|
225
|
+
])
|
|
226
|
+
}, [
|
|
227
|
+
se("button", {
|
|
228
|
+
ref: "buttonRef",
|
|
229
|
+
class: V([
|
|
230
|
+
"hison-button",
|
|
231
|
+
e.disableClass,
|
|
232
|
+
e.borderClass,
|
|
233
|
+
e.backgroundTypeClass
|
|
234
|
+
]),
|
|
235
|
+
style: oe(e.props.style),
|
|
236
|
+
disabled: e.disable,
|
|
237
|
+
title: e.title || void 0,
|
|
238
|
+
tabindex: e.tabIndex ?? void 0,
|
|
239
|
+
onClick: n[0] || (n[0] = (...s) => e.onClick && e.onClick(...s)),
|
|
240
|
+
onMousedown: n[1] || (n[1] = (s) => e.$emit("mousedown", s, e.buttonMethods)),
|
|
241
|
+
onMouseup: n[2] || (n[2] = (s) => e.$emit("mouseup", s, e.buttonMethods)),
|
|
242
|
+
onMouseover: n[3] || (n[3] = (s) => e.$emit("mouseover", s, e.buttonMethods)),
|
|
243
|
+
onMouseout: n[4] || (n[4] = (s) => e.$emit("mouseout", s, e.buttonMethods)),
|
|
244
|
+
"aria-label": e.computedAriaLabel
|
|
245
|
+
}, [
|
|
246
|
+
e.$slots.icon ? w(e.$slots, "icon", { key: 0 }) : ue("", !0),
|
|
247
|
+
e.hasLabelSlot ? (M(), A(ie, { key: 1 }, [
|
|
248
|
+
e.$slots.label ? w(e.$slots, "label", { key: 0 }) : w(e.$slots, "default", { key: 1 })
|
|
249
|
+
], 64)) : (M(), A("span", Se, re(e.internalText), 1))
|
|
250
|
+
], 46, Ie)
|
|
251
|
+
], 2);
|
|
252
|
+
}
|
|
253
|
+
const Ae = /* @__PURE__ */ pe(Te, [["render", Be]]);
|
|
254
|
+
export {
|
|
255
|
+
Ae as default
|
|
256
|
+
};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("vue"),v=require("./index-BmKMHsSZ.js"),Ne=require("./_plugin-vue_export-helper-BHFhmbuH.js");var Fe=Object.defineProperty,Pe=(t,e,l)=>e in t?Fe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:l}):t[e]=l,N=(t,e,l)=>Pe(t,typeof e!="symbol"?e+"":e,l);const Le=(t,e,l)=>{const a=t[e];return a?typeof a=="function"?a():Promise.resolve(a):new Promise((o,s)=>{(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(s.bind(null,new Error("Unknown variable dynamic import: "+e+(e.split("/").length!==l?". Note that variables only represent file names one level deep.":""))))})};let oe,ke,Ce,B,ue={},R={};class je{constructor(e,l=!1){N(this,"texts",{}),N(this,"dateToMinutes",a=>a.getHours()*60+a.getMinutes()),B=this,this._texts=e,!l&&Date&&!Date.prototype.addDays&&this._initDatePrototypes()}_initDatePrototypes(){Date.prototype.addDays=function(e){return B.addDays(this,e)},Date.prototype.subtractDays=function(e){return B.subtractDays(this,e)},Date.prototype.addHours=function(e){return B.addHours(this,e)},Date.prototype.subtractHours=function(e){return B.subtractHours(this,e)},Date.prototype.addMinutes=function(e){return B.addMinutes(this,e)},Date.prototype.subtractMinutes=function(e){return B.subtractMinutes(this,e)},Date.prototype.getWeek=function(){return B.getWeek(this)},Date.prototype.isToday=function(){return B.isToday(this)},Date.prototype.isLeapYear=function(){return B.isLeapYear(this)},Date.prototype.format=function(e="YYYY-MM-DD"){return B.formatDate(this,e)},Date.prototype.formatTime=function(e="HH:mm"){return B.formatTime(this,e)}}removePrototypes(){delete Date.prototype.addDays,delete Date.prototype.subtractDays,delete Date.prototype.addHours,delete Date.prototype.subtractHours,delete Date.prototype.addMinutes,delete Date.prototype.subtractMinutes,delete Date.prototype.getWeek,delete Date.prototype.isToday,delete Date.prototype.isLeapYear,delete Date.prototype.format,delete Date.prototype.formatTime}updateTexts(e){this._texts=e}_todayFormatted(){return ke!==new Date().getDate()&&(oe=new Date,ke=oe.getDate(),Ce=`${oe.getFullYear()}-${oe.getMonth()}-${oe.getDate()}`),Ce}addDays(e,l){const a=new Date(e.valueOf());return a.setDate(a.getDate()+l),a}subtractDays(e,l){const a=new Date(e.valueOf());return a.setDate(a.getDate()-l),a}addHours(e,l){const a=new Date(e.valueOf());return a.setHours(a.getHours()+l),a}subtractHours(e,l){const a=new Date(e.valueOf());return a.setHours(a.getHours()-l),a}addMinutes(e,l){const a=new Date(e.valueOf());return a.setMinutes(a.getMinutes()+l),a}subtractMinutes(e,l){const a=new Date(e.valueOf());return a.setMinutes(a.getMinutes()-l),a}getWeek(e){const l=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate())),a=l.getUTCDay()||7;l.setUTCDate(l.getUTCDate()+4-a);const o=new Date(Date.UTC(l.getUTCFullYear(),0,1));return Math.ceil(((l-o)/864e5+1)/7)}isToday(e){return`${e.getFullYear()}-${e.getMonth()}-${e.getDate()}`===this._todayFormatted()}isLeapYear(e){const l=e.getFullYear();return!(l%400)||l%100&&!(l%4)}getPreviousFirstDayOfWeek(e=null,l){const a=e&&new Date(e.valueOf())||new Date,o=l?7:6;return a.setDate(a.getDate()-(a.getDay()+o)%7),a}stringToDate(e){return e instanceof Date?e:(e.length===10&&(e+=" 00:00"),new Date(e.replace(/-/g,"/")))}countDays(e,l){typeof e=="string"&&(e=e.replace(/-/g,"/")),typeof l=="string"&&(l=l.replace(/-/g,"/")),e=new Date(e).setHours(0,0,0,0),l=new Date(l).setHours(0,0,1,0);const a=(new Date(l).getTimezoneOffset()-new Date(e).getTimezoneOffset())*60*1e3;return Math.ceil((l-e-a)/(24*3600*1e3))}datesInSameTimeStep(e,l,a){return Math.abs(e.getTime()-l.getTime())<=a*60*1e3}formatDate(e,l="YYYY-MM-DD",a=null){if(a||(a=this._texts),l||(l="YYYY-MM-DD"),l==="YYYY-MM-DD")return this.formatDateLite(e);ue={},R={};const o={YYYY:()=>this._hydrateDateObject(e,a).YYYY,YY:()=>this._hydrateDateObject(e,a).YY(),M:()=>this._hydrateDateObject(e,a).M,MM:()=>this._hydrateDateObject(e,a).MM(),MMM:()=>this._hydrateDateObject(e,a).MMM(),MMMM:()=>this._hydrateDateObject(e,a).MMMM(),MMMMG:()=>this._hydrateDateObject(e,a).MMMMG(),D:()=>this._hydrateDateObject(e,a).D,DD:()=>this._hydrateDateObject(e,a).DD(),S:()=>this._hydrateDateObject(e,a).S(),d:()=>this._hydrateDateObject(e,a).d,dd:()=>this._hydrateDateObject(e,a).dd(),ddd:()=>this._hydrateDateObject(e,a).ddd(),dddd:()=>this._hydrateDateObject(e,a).dddd(),HH:()=>this._hydrateTimeObject(e,a).HH,H:()=>this._hydrateTimeObject(e,a).H,hh:()=>this._hydrateTimeObject(e,a).hh,h:()=>this._hydrateTimeObject(e,a).h,am:()=>this._hydrateTimeObject(e,a).am,AM:()=>this._hydrateTimeObject(e,a).AM,mm:()=>this._hydrateTimeObject(e,a).mm,m:()=>this._hydrateTimeObject(e,a).m};return l.replace(/(\{[a-zA-Z]+\}|[a-zA-Z]+)/g,(s,u)=>{const r=o[u.replace(/\{|\}/g,"")];return r!==void 0?r():u})}formatDateLite(e){const l=e.getMonth()+1,a=e.getDate();return`${e.getFullYear()}-${l<10?"0":""}${l}-${a<10?"0":""}${a}`}formatTime(e,l="HH:mm",a=null,o=!1){let s=!1;if(o){const[m,c,h]=[e.getHours(),e.getMinutes(),e.getSeconds()];m+c+h===141&&(s=!0)}if(e instanceof Date&&l==="HH:mm")return s?"24:00":this.formatTimeLite(e);R={},a||(a=this._texts);const u=this._hydrateTimeObject(e,a),r=l.replace(/(\{[a-zA-Z]+\}|[a-zA-Z]+)/g,(m,c)=>{const h=u[c.replace(/\{|\}/g,"")];return h!==void 0?h:c});return s?r.replace("23:59","24:00"):r}formatTimeLite(e){const l=e.getHours(),a=e.getMinutes();return`${(l<10?"0":"")+l}:${(a<10?"0":"")+a}`}_nth(e){if(e>3&&e<21)return"th";switch(e%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}}_hydrateDateObject(e,l){if(ue.D)return ue;const a=e.getFullYear(),o=e.getMonth()+1,s=e.getDate(),r=(e.getDay()-1+7)%7;return ue={YYYY:a,YY:()=>a.toString().substring(2),M:o,MM:()=>(o<10?"0":"")+o,MMM:()=>l.months[o-1].substring(0,3),MMMM:()=>l.months[o-1],MMMMG:()=>(l.monthsGenitive||l.months)[o-1],D:s,DD:()=>(s<10?"0":"")+s,S:()=>this._nth(s),d:r+1,dd:()=>l.weekDays[r][0],ddd:()=>l.weekDays[r].substr(0,3),dddd:()=>l.weekDays[r]},ue}_hydrateTimeObject(e,l){if(R.am)return R;let a,o;e instanceof Date?(a=e.getHours(),o=e.getMinutes()):(a=Math.floor(e/60),o=Math.floor(e%60));const s=a%12?a%12:12,u=(l||{am:"am",pm:"pm"})[a===24||a<12?"am":"pm"];return R={H:a,h:s,HH:(a<10?"0":"")+a,hh:(s<10?"0":"")+s,am:u,AM:u.toUpperCase(),m:o,mm:(o<10?"0":"")+o},R}}const xe=24*60;class ze{constructor(e){N(this,"_vuecal",null),N(this,"selectCell",(l=!1,a,o)=>{this._vuecal.$emit("cell-click",o?{date:a,split:o}:a),this._vuecal.clickToNavigate||l?this._vuecal.switchToNarrowerView():this._vuecal.dblclickToNavigate&&"ontouchstart"in window&&(this._vuecal.domEvents.dblTapACell.taps++,setTimeout(()=>this._vuecal.domEvents.dblTapACell.taps=0,this._vuecal.domEvents.dblTapACell.timeout),this._vuecal.domEvents.dblTapACell.taps>=2&&(this._vuecal.domEvents.dblTapACell.taps=0,this._vuecal.switchToNarrowerView(),this._vuecal.$emit("cell-dblclick",o?{date:a,split:o}:a)))}),N(this,"keyPressEnterCell",(l,a)=>{this._vuecal.$emit("cell-keypress-enter",a?{date:l,split:a}:l),this._vuecal.switchToNarrowerView()}),N(this,"getPosition",l=>{const{left:a,top:o}=this._vuecal.cellsEl.getBoundingClientRect(),{clientX:s,clientY:u}="ontouchstart"in window&&l.touches?l.touches[0]:l;return{x:s-a,y:u-o}}),N(this,"minutesAtCursor",l=>{let a=0,o={x:0,y:0};const{timeStep:s,timeCellHeight:u,timeFrom:r}=this._vuecal.$props;return typeof l=="number"?a=l:typeof l=="object"&&(o=this.getPosition(l),a=Math.round(o.y*s/parseInt(u)+r)),{minutes:Math.max(Math.min(a,xe),0),cursorCoords:o}}),this._vuecal=e}}const Ye=2,me=24*60;let p,k,ye;class Ie{constructor(e,l){N(this,"_vuecal",null),N(this,"eventDefaults",{_eid:null,start:"",startTimeMinutes:0,end:"",endTimeMinutes:0,title:"",content:"",background:!1,allDay:!1,segments:null,repeat:null,daysCount:1,deletable:!0,deleting:!1,titleEditable:!0,resizable:!0,resizing:!1,draggable:!0,dragging:!1,draggingStatic:!1,focused:!1,class:""}),this._vuecal=e,p=l}createAnEvent(e,l,a){if(typeof e=="string"&&(e=p.stringToDate(e)),!(e instanceof Date))return!1;const o=p.dateToMinutes(e);l=l*1||Ye*60;const s=o+l,u=p.addMinutes(new Date(e),l);a.end&&(typeof a.end=="string"&&(a.end=p.stringToDate(a.end)),a.endTimeMinutes=p.dateToMinutes(a.end));const r={...this.eventDefaults,_eid:`${this._vuecal._.uid}_${this._vuecal.eventIdIncrement++}`,start:e,startTimeMinutes:o,end:u,endTimeMinutes:s,segments:null,...a};if(!(typeof this._vuecal.onEventCreate=="function"&&!this._vuecal.onEventCreate(r,()=>this.deleteAnEvent(r))))return r.startDateF!==r.endDateF&&(r.daysCount=p.countDays(r.start,r.end)),this._vuecal.mutableEvents.push(r),this._vuecal.addEventsToView([r]),this._vuecal.emitWithEvent("event-create",r),this._vuecal.$emit("event-change",{event:this._vuecal.cleanupEvent(r),originalEvent:null}),r}addEventSegment(e){e.segments||(e.segments={},e.segments[p.formatDateLite(e.start)]={start:e.start,startTimeMinutes:e.startTimeMinutes,endTimeMinutes:me,isFirstDay:!0,isLastDay:!1});const l=e.segments[p.formatDateLite(e.end)];l&&(l.isLastDay=!1,l.endTimeMinutes=me);const a=p.addDays(e.end,1),o=p.formatDateLite(a);return a.setHours(0,0,0,0),e.segments[o]={start:a,startTimeMinutes:0,endTimeMinutes:e.endTimeMinutes,isFirstDay:!1,isLastDay:!0},e.end=p.addMinutes(a,e.endTimeMinutes),e.daysCount=Object.keys(e.segments).length,o}removeEventSegment(e){let l=Object.keys(e.segments).length;if(l<=1)return p.formatDateLite(e.end);delete e.segments[p.formatDateLite(e.end)],l--;const a=p.subtractDays(e.end,1),o=p.formatDateLite(a),s=e.segments[o];return l?s&&(s.isLastDay=!0,s.endTimeMinutes=e.endTimeMinutes):e.segments=null,e.daysCount=l||1,e.end=a,o}createEventSegments(e,l,a){const o=l.getTime(),s=a.getTime();let u=e.start.getTime(),r=e.end.getTime(),m=!1,c,h,y;for(!e.end.getHours()&&!e.end.getMinutes()&&(r-=1e3),e.segments={},e.repeat?(c=o,h=Math.min(s,e.repeat.until?p.stringToDate(e.repeat.until).getTime():s)):(c=Math.max(o,u),h=Math.min(s,r));c<=h;){let w=!1;const T=p.addDays(new Date(c),1).setHours(0,0,0,0);let g,_,E,D;if(e.repeat){const M=new Date(c),C=p.formatDateLite(M);(m||e.occurrences&&e.occurrences[C])&&(m||(u=e.occurrences[C].start,y=new Date(u).setHours(0,0,0,0),r=e.occurrences[C].end),m=!0,w=!0),g=c===y,_=C===p.formatDateLite(new Date(r)),E=new Date(g?u:c),D=p.formatDateLite(E),_&&(m=!1)}else w=!0,g=c===u,_=h===r&&T>h,E=g?e.start:new Date(c),D=p.formatDateLite(g?e.start:E);w&&(e.segments[D]={start:E,startTimeMinutes:g?e.startTimeMinutes:0,endTimeMinutes:_?e.endTimeMinutes:me,isFirstDay:g,isLastDay:_}),c=T}return e}deleteAnEvent(e){this._vuecal.emitWithEvent("event-delete",e),this._vuecal.mutableEvents=this._vuecal.mutableEvents.filter(l=>l._eid!==e._eid),this._vuecal.view.events=this._vuecal.view.events.filter(l=>l._eid!==e._eid)}checkCellOverlappingEvents(e,l){ye=e.slice(0),k={},e.forEach(o=>{ye.shift(),k[o._eid]||(k[o._eid]={overlaps:[],start:o.start,position:0}),k[o._eid].position=0,ye.forEach(s=>{k[s._eid]||(k[s._eid]={overlaps:[],start:s.start,position:0});const u=this.eventInRange(s,o.start,o.end),r=l.overlapsPerTimeStep?p.datesInSameTimeStep(o.start,s.start,l.timeStep):1;if(!o.background&&!o.allDay&&!s.background&&!s.allDay&&u&&r)k[o._eid].overlaps.push(s._eid),k[o._eid].overlaps=[...new Set(k[o._eid].overlaps)],k[s._eid].overlaps.push(o._eid),k[s._eid].overlaps=[...new Set(k[s._eid].overlaps)],k[s._eid].position++;else{let m,c;(m=(k[o._eid]||{overlaps:[]}).overlaps.indexOf(s._eid))>-1&&k[o._eid].overlaps.splice(m,1),(c=(k[s._eid]||{overlaps:[]}).overlaps.indexOf(o._eid))>-1&&k[s._eid].overlaps.splice(c,1),k[s._eid].position--}})});let a=0;for(const o in k){const s=k[o],u=s.overlaps.map(r=>({id:r,start:k[r].start}));u.push({id:o,start:s.start}),u.sort((r,m)=>r.start<m.start?-1:r.start>m.start?1:r.id>m.id?-1:1),s.position=u.findIndex(r=>r.id===o),a=Math.max(this.getOverlapsStreak(s,k),a)}return[k,a]}getOverlapsStreak(e,l={}){let a=e.overlaps.length+1,o=[];return e.overlaps.forEach(s=>{o.includes(s)||e.overlaps.filter(r=>r!==s).forEach(r=>{l[r].overlaps.includes(s)||o.push(r)})}),o=[...new Set(o)],a-=o.length,a}eventInRange(e,l,a){if(e.allDay||!this._vuecal.time){const u=new Date(e.start).setHours(0,0,0,0);return new Date(e.end).setHours(23,59,0,0)>=new Date(l).setHours(0,0,0,0)&&u<=new Date(a).setHours(0,0,0,0)}const o=e.start.getTime(),s=e.end.getTime();return o<a.getTime()&&s>l.getTime()}}const qe={class:"vuecal__flex vuecal__weekdays-headings"},Re=["onClick"],Ue={class:"vuecal__flex weekday-label",grow:""},Ke={class:"full"},Ge={class:"small"},Xe={class:"xsmall"},Je={key:0},Ze={key:0,class:"vuecal__flex vuecal__split-days-headers",grow:""};function Qe(t,e,l,a,o,s){return i.openBlock(),i.createElementBlock("div",qe,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(s.headings,(u,r)=>(i.openBlock(),i.createElementBlock(i.Fragment,{key:r},[u.hide?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("div",{key:0,class:i.normalizeClass(["vuecal__flex vuecal__heading",{today:u.today,clickable:s.cellHeadingsClickable}]),style:i.normalizeStyle(s.weekdayCellStyles),onClick:m=>s.view.id==="week"&&s.selectCell(u.date,m),onDblclick:e[0]||(e[0]=m=>s.view.id==="week"&&s.vuecal.dblclickToNavigate&&l.switchToNarrowerView())},[i.createVNode(i.Transition,{name:`slide-fade--${l.transitionDirection}`,appear:s.vuecal.transitions},{default:i.withCtx(()=>[(i.openBlock(),i.createElementBlock("div",{class:"vuecal__flex",column:"",key:s.vuecal.transitions?`${r}-${u.dayOfMonth}`:!1},[i.createElementVNode("div",Ue,[i.renderSlot(t.$slots,"weekday-heading",{heading:s.cleanupHeading(u),view:s.view},()=>[i.createElementVNode("span",Ke,i.toDisplayString(u.full),1),i.createElementVNode("span",Ge,i.toDisplayString(u.small),1),i.createElementVNode("span",Xe,i.toDisplayString(u.xsmall),1),u.dayOfMonth?(i.openBlock(),i.createElementBlock("span",Je," "+i.toDisplayString(u.dayOfMonth),1)):i.createCommentVNode("",!0)])]),s.vuecal.hasSplits&&s.vuecal.stickySplitLabels?(i.openBlock(),i.createElementBlock("div",Ze,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(s.vuecal.daySplits,(m,c)=>(i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(["day-split-header",m.class||!1]),key:c},[i.renderSlot(t.$slots,"split-label",{split:m,view:s.view},()=>[i.createTextVNode(i.toDisplayString(m.label),1)])],2))),128))])):i.createCommentVNode("",!0)]))]),_:2},1032,["name","appear"])],46,Re))],64))),128))])}const U=(t,e)=>{const l=t.__vccOpts||t;for(const[a,o]of e)l[a]=o;return l},$e={inject:["vuecal","utils","view"],props:{transitionDirection:{type:String,default:"right"},weekDays:{type:Array,default:()=>[]},switchToNarrowerView:{type:Function,default:()=>{}}},methods:{selectCell(t,e){t.getTime()!==this.view.selectedDate.getTime()&&(this.view.selectedDate=t),this.utils.cell.selectCell(!1,t,e)},cleanupHeading:t=>({label:t.full,date:t.date,...t.today?{today:t.today}:{}})},computed:{headings(){if(!["month","week"].includes(this.view.id))return[];let t=!1;return this.weekDays.map((l,a)=>{const o=this.utils.date.addDays(this.view.startDate,this.vuecal.startWeekOnSunday&&this.vuecal.hideWeekends?a-1:a);return{hide:l.hide,full:l.label,small:l.short||l.label.substr(0,3),xsmall:l.short||l.label.substr(0,1),...this.view.id==="week"?{dayOfMonth:o.getDate(),date:o,today:!t&&this.utils.date.isToday(o)&&!t++}:{}}})},cellWidth(){return 100/(7-this.weekDays.reduce((t,e)=>t+e.hide,0))},weekdayCellStyles(){return{...this.vuecal.hideWeekdays.length?{width:`${this.cellWidth}%`}:{}}},cellHeadingsClickable(){return this.view.id==="week"&&(this.vuecal.clickToNavigate||this.vuecal.dblclickToNavigate)}}},Se=U($e,[["render",Qe]]),et={class:"vuecal__header"},tt={key:0,class:"vuecal__flex vuecal__menu",role:"tablist","aria-label":"Calendar views navigation"},it=["onDragenter","onDragleave","onClick","aria-label"],st={key:1,class:"vuecal__title-bar"},lt=["aria-label"],at={class:"vuecal__flex vuecal__title",grow:""},nt=["aria-label"],rt={key:0,class:"vuecal__flex vuecal__split-days-headers"};function ot(t,e,l,a,o,s){const u=i.resolveComponent("weekdays-headings");return i.openBlock(),i.createElementBlock("div",et,[l.options.hideViewSelector?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("div",tt,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(l.viewProps.views,(r,m)=>(i.openBlock(),i.createElementBlock(i.Fragment,{key:m},[r.enabled?(i.openBlock(),i.createElementBlock("button",{key:0,class:i.normalizeClass(["vuecal__view-btn",{"vuecal__view-btn--active":s.view.id===m,"vuecal__view-btn--highlighted":t.highlightedControl===m}]),type:"button",onDragenter:c=>l.editEvents.drag&&s.dnd&&s.dnd.viewSelectorDragEnter(c,m,t.$data),onDragleave:c=>l.editEvents.drag&&s.dnd&&s.dnd.viewSelectorDragLeave(c,m,t.$data),onClick:c=>s.switchView(m,null,!0),"aria-label":`${r.label} view`},i.toDisplayString(r.label),43,it)):i.createCommentVNode("",!0)],64))),128))])),l.options.hideTitleBar?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("div",st,[i.createElementVNode("button",{class:i.normalizeClass(["vuecal__arrow vuecal__arrow--prev",{"vuecal__arrow--highlighted":t.highlightedControl==="previous"}]),type:"button",onClick:e[0]||(e[0]=(...r)=>s.previous&&s.previous(...r)),onDragenter:e[1]||(e[1]=r=>l.editEvents.drag&&s.dnd&&s.dnd.viewSelectorDragEnter(r,"previous",t.$data)),onDragleave:e[2]||(e[2]=r=>l.editEvents.drag&&s.dnd&&s.dnd.viewSelectorDragLeave(r,"previous",t.$data)),"aria-label":`Previous ${s.view.id}`},[i.renderSlot(t.$slots,"arrow-prev")],42,lt),i.createElementVNode("div",at,[i.createVNode(i.Transition,{name:l.options.transitions?`slide-fade--${s.transitionDirection}`:""},{default:i.withCtx(()=>[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(s.broaderView?"button":"span"),{type:!!s.broaderView&&"button",key:`${s.view.id}${s.view.startDate.toString()}`,onClick:e[3]||(e[3]=r=>!!s.broaderView&&s.switchToBroaderView()),"aria-label":!!s.broaderView&&`Go to ${s.broaderView} view`},{default:i.withCtx(()=>[i.renderSlot(t.$slots,"title")]),_:3},8,["type","aria-label"]))]),_:3},8,["name"])]),l.options.todayButton?(i.openBlock(),i.createElementBlock("button",{key:0,class:i.normalizeClass(["vuecal__today-btn",{"vuecal__today-btn--highlighted":t.highlightedControl==="today"}]),type:"button",onClick:e[4]||(e[4]=(...r)=>s.goToToday&&s.goToToday(...r)),onDragenter:e[5]||(e[5]=r=>l.editEvents.drag&&s.dnd&&s.dnd.viewSelectorDragEnter(r,"today",t.$data)),onDragleave:e[6]||(e[6]=r=>l.editEvents.drag&&s.dnd&&s.dnd.viewSelectorDragLeave(r,"today",t.$data)),"aria-label":"Today"},[i.renderSlot(t.$slots,"today-button")],34)):i.createCommentVNode("",!0),i.createElementVNode("button",{class:i.normalizeClass(["vuecal__arrow vuecal__arrow--next",{"vuecal__arrow--highlighted":t.highlightedControl==="next"}]),type:"button",onClick:e[7]||(e[7]=(...r)=>s.next&&s.next(...r)),onDragenter:e[8]||(e[8]=r=>l.editEvents.drag&&s.dnd&&s.dnd.viewSelectorDragEnter(r,"next",t.$data)),onDragleave:e[9]||(e[9]=r=>l.editEvents.drag&&s.dnd&&s.dnd.viewSelectorDragLeave(r,"next",t.$data)),"aria-label":`Next ${s.view.id}`},[i.renderSlot(t.$slots,"arrow-next")],42,nt)])),l.viewProps.weekDaysInHeader?(i.openBlock(),i.createBlock(u,{key:2,"week-days":l.weekDays,"transition-direction":s.transitionDirection,"switch-to-narrower-view":l.switchToNarrowerView},i.createSlots({_:2},[t.$slots["weekday-heading"]?{name:"weekday-heading",fn:i.withCtx(({heading:r,view:m})=>[i.renderSlot(t.$slots,"weekday-heading",{heading:r,view:m})]),key:"0"}:void 0,t.$slots["split-label"]?{name:"split-label",fn:i.withCtx(({split:r})=>[i.renderSlot(t.$slots,"split-label",{split:r,view:s.view})]),key:"1"}:void 0]),1032,["week-days","transition-direction","switch-to-narrower-view"])):i.createCommentVNode("",!0),i.createVNode(i.Transition,{name:`slide-fade--${s.transitionDirection}`},{default:i.withCtx(()=>[s.showDaySplits?(i.openBlock(),i.createElementBlock("div",rt,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(l.daySplits,(r,m)=>(i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(["day-split-header",r.class||!1]),key:m},[i.renderSlot(t.$slots,"split-label",{split:r,view:s.view.id},()=>[i.createTextVNode(i.toDisplayString(r.label),1)])],2))),128))])):i.createCommentVNode("",!0)]),_:3},8,["name"])])}const ut={inject:["vuecal","previous","next","switchView","updateSelectedDate","modules","view"],components:{WeekdaysHeadings:Se},props:{options:{type:Object,default:()=>({})},editEvents:{type:Object,required:!0},hasSplits:{type:[Boolean,Number],default:!1},daySplits:{type:Array,default:()=>[]},viewProps:{type:Object,default:()=>({})},weekDays:{type:Array,default:()=>[]},switchToNarrowerView:{type:Function,default:()=>{}}},data:()=>({highlightedControl:null}),methods:{goToToday(){this.updateSelectedDate(new Date(new Date().setHours(0,0,0,0)))},switchToBroaderView(){this.transitionDirection="left",this.broaderView&&this.switchView(this.broaderView)}},computed:{transitionDirection:{get(){return this.vuecal.transitionDirection},set(t){this.vuecal.transitionDirection=t}},broaderView(){const{enabledViews:t}=this.vuecal;return t[t.indexOf(this.view.id)-1]},showDaySplits(){return this.view.id==="day"&&this.hasSplits&&this.options.stickySplitLabels&&!this.options.minSplitWidth},dnd(){return this.modules.dnd}}},dt=U(ut,[["render",ot]]),ct=["draggable"];function ht(t,e,l,a,o,s){return i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(["vuecal__event",s.eventClasses]),style:i.normalizeStyle(s.eventStyles),tabindex:"0",onFocus:e[4]||(e[4]=(...u)=>s.focusEvent&&s.focusEvent(...u)),onKeypress:e[5]||(e[5]=i.withKeys(i.withModifiers((...u)=>s.onEnterKeypress&&s.onEnterKeypress(...u),["stop"]),["enter"])),onMouseenter:e[6]||(e[6]=(...u)=>s.onMouseEnter&&s.onMouseEnter(...u)),onMouseleave:e[7]||(e[7]=(...u)=>s.onMouseLeave&&s.onMouseLeave(...u)),onTouchstart:e[8]||(e[8]=i.withModifiers((...u)=>s.onTouchStart&&s.onTouchStart(...u),["stop"])),onMousedown:e[9]||(e[9]=u=>s.onMouseDown(u)),onMouseup:e[10]||(e[10]=(...u)=>s.onMouseUp&&s.onMouseUp(...u)),onTouchend:e[11]||(e[11]=(...u)=>s.onMouseUp&&s.onMouseUp(...u)),onTouchmove:e[12]||(e[12]=(...u)=>s.onTouchMove&&s.onTouchMove(...u)),onDblclick:e[13]||(e[13]=(...u)=>s.onDblClick&&s.onDblClick(...u)),draggable:s.draggable,onDragstart:e[14]||(e[14]=u=>s.draggable&&s.onDragStart(u)),onDragend:e[15]||(e[15]=u=>s.draggable&&s.onDragEnd())},[s.vuecal.editEvents.delete&&l.event.deletable?(i.openBlock(),i.createElementBlock("div",{key:0,class:"vuecal__event-delete",onClick:e[0]||(e[0]=i.withModifiers((...u)=>s.deleteEvent&&s.deleteEvent(...u),["stop"])),onTouchstart:e[1]||(e[1]=i.withModifiers((...u)=>s.touchDeleteEvent&&s.touchDeleteEvent(...u),["stop"]))},i.toDisplayString(s.vuecal.texts.deleteEvent),33)):i.createCommentVNode("",!0),i.renderSlot(t.$slots,"event",{event:l.event,view:s.view.id}),s.resizable?(i.openBlock(),i.createElementBlock("div",{key:1,class:"vuecal__event-resize-handle",contenteditable:"false",onMousedown:e[2]||(e[2]=i.withModifiers((...u)=>s.onResizeHandleMouseDown&&s.onResizeHandleMouseDown(...u),["stop","prevent"])),onTouchstart:e[3]||(e[3]=i.withModifiers((...u)=>s.onResizeHandleMouseDown&&s.onResizeHandleMouseDown(...u),["stop","prevent"]))},null,32)):i.createCommentVNode("",!0)],46,ct)}const vt={inject:["vuecal","utils","modules","view","domEvents","editEvents"],props:{cellFormattedDate:{type:String,default:""},event:{type:Object,default:()=>({})},cellEvents:{type:Array,default:()=>[]},overlaps:{type:Array,default:()=>[]},eventPosition:{type:Number,default:0},overlapsStreak:{type:Number,default:0},allDay:{type:Boolean,default:!1}},data:()=>({touch:{dragThreshold:30,startX:0,startY:0,dragged:!1}}),methods:{onMouseDown(t,e=!1){if("ontouchstart"in window&&!e)return!1;const{clickHoldAnEvent:l,focusAnEvent:a,resizeAnEvent:o,dragAnEvent:s}=this.domEvents;if(a._eid===this.event._eid&&l._eid===this.event._eid)return!0;this.focusEvent(),l._eid=null,this.vuecal.editEvents.delete&&this.event.deletable&&(l.timeoutId=setTimeout(()=>{!o._eid&&!s._eid&&(l._eid=this.event._eid,this.event.deleting=!0)},l.timeout))},onMouseUp(t){this.domEvents.focusAnEvent._eid===this.event._eid&&!this.touch.dragged&&(this.domEvents.focusAnEvent.mousedUp=!0),this.touch.dragged=!1},onMouseEnter(t){t.preventDefault(),this.vuecal.emitWithEvent("event-mouse-enter",this.event)},onMouseLeave(t){t.preventDefault(),this.vuecal.emitWithEvent("event-mouse-leave",this.event)},onTouchMove(t){if(typeof this.vuecal.onEventClick!="function")return;const{clientX:e,clientY:l}=t.touches[0],{startX:a,startY:o,dragThreshold:s}=this.touch;(Math.abs(e-a)>s||Math.abs(l-o)>s)&&(this.touch.dragged=!0)},onTouchStart(t){this.touch.startX=t.touches[0].clientX,this.touch.startY=t.touches[0].clientY,this.onMouseDown(t,!0)},onEnterKeypress(t){if(typeof this.vuecal.onEventClick=="function")return this.vuecal.onEventClick(this.event,t)},onDblClick(t){if(typeof this.vuecal.onEventDblclick=="function")return this.vuecal.onEventDblclick(this.event,t)},onDragStart(t){this.dnd&&this.dnd.eventDragStart(t,this.event)},onDragEnd(){this.dnd&&this.dnd.eventDragEnd(this.event)},onResizeHandleMouseDown(){this.focusEvent(),this.domEvents.dragAnEvent._eid=null,this.domEvents.resizeAnEvent=Object.assign(this.domEvents.resizeAnEvent,{_eid:this.event._eid,start:(this.segment||this.event).start,split:this.event.split||null,segment:!!this.segment&&this.utils.date.formatDateLite(this.segment.start),originalEnd:new Date((this.segment||this.event).end),originalEndTimeMinutes:this.event.endTimeMinutes}),this.event.resizing=!0},deleteEvent(t=!1){if("ontouchstart"in window&&!t)return!1;this.utils.event.deleteAnEvent(this.event)},touchDeleteEvent(t){this.deleteEvent(!0)},cancelDeleteEvent(){this.event.deleting=!1},focusEvent(){const{focusAnEvent:t}=this.domEvents,e=t._eid;if(e!==this.event._eid){if(e){const l=this.view.events.find(a=>a._eid===e);l&&(l.focused=!1)}this.vuecal.cancelDelete(),this.vuecal.emitWithEvent("event-focus",this.event),t._eid=this.event._eid,this.event.focused=!0}}},computed:{eventDimensions(){const{startTimeMinutes:t,endTimeMinutes:e}=this.segment||this.event;let l=t-this.vuecal.timeFrom;const a=Math.max(Math.round(l*this.vuecal.timeCellHeight/this.vuecal.timeStep),0);l=Math.min(e,this.vuecal.timeTo)-this.vuecal.timeFrom;const o=Math.round(l*this.vuecal.timeCellHeight/this.vuecal.timeStep),s=Math.max(o-a,5);return{top:a,height:s}},eventStyles(){if(this.event.allDay||!this.vuecal.time||!this.event.endTimeMinutes||this.view.id==="month"||this.allDay)return{};let t=100/Math.min(this.overlaps.length+1,this.overlapsStreak),e=100/(this.overlaps.length+1)*this.eventPosition;this.vuecal.minEventWidth&&t<this.vuecal.minEventWidth&&(t=this.vuecal.minEventWidth,e=(100-this.vuecal.minEventWidth)/this.overlaps.length*this.eventPosition);const{top:l,height:a}=this.eventDimensions;return{top:`${l}px`,height:`${a}px`,width:`${t}%`,left:this.event.left&&`${this.event.left}px`||`${e}%`}},eventClasses(){const{isFirstDay:t,isLastDay:e}=this.segment||{};return{[this.event.class]:!!this.event.class,"vuecal__event--focus":this.event.focused,"vuecal__event--resizing":this.event.resizing,"vuecal__event--background":this.event.background,"vuecal__event--deletable":this.event.deleting,"vuecal__event--all-day":this.event.allDay,"vuecal__event--dragging":!this.event.draggingStatic&&this.event.dragging,"vuecal__event--static":this.event.dragging&&this.event.draggingStatic,"vuecal__event--multiple-days":!!this.segment,"event-start":this.segment&&t&&!e,"event-middle":this.segment&&!t&&!e,"event-end":this.segment&&e&&!t}},segment(){return this.event.segments&&this.event.segments[this.cellFormattedDate]||null},draggable(){const{draggable:t,background:e,daysCount:l}=this.event;return this.vuecal.editEvents.drag&&t&&!e&&l===1},resizable(){const{editEvents:t,time:e}=this.vuecal;return t.resize&&this.event.resizable&&e&&!this.allDay&&(!this.segment||this.segment&&this.segment.isLastDay)&&this.view.id!=="month"},dnd(){return this.modules.dnd}}},mt=U(vt,[["render",ht]]),yt=["data-split","aria-label","onTouchstart","onMousedown","onDragover","onDrop"],ft={key:0,class:"cell-time-labels"},wt=["innerHTML"],gt={key:2,class:"vuecal__cell-events"},Dt=["title"];function pt(t,e,l,a,o,s){const u=i.resolveComponent("event");return i.openBlock(),i.createBlock(i.TransitionGroup,{class:i.normalizeClass(["vuecal__cell",s.cellClasses]),name:`slide-fade--${s.transitionDirection}`,tag:"div",appear:l.options.transitions,style:i.normalizeStyle(s.cellStyles)},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(s.splitsCount?s.splits:1,(r,m)=>(i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(["vuecal__flex vuecal__cell-content",s.splitsCount&&s.splitClasses(r)]),key:l.options.transitions?`${s.view.id}-${l.data.content}-${m}`:m,"data-split":s.splitsCount?r.id:!1,column:"",tabindex:"0","aria-label":l.data.content,onFocus:e[0]||(e[0]=c=>s.onCellFocus(c)),onKeypress:e[1]||(e[1]=i.withKeys(c=>s.onCellkeyPressEnter(c),["enter"])),onTouchstart:c=>!s.isDisabled&&s.onCellTouchStart(c,s.splitsCount?r.id:null),onMousedown:c=>!s.isDisabled&&s.onCellMouseDown(c,s.splitsCount?r.id:null),onClick:e[2]||(e[2]=c=>!s.isDisabled&&s.onCellClick(c)),onDblclick:e[3]||(e[3]=c=>!s.isDisabled&&s.onCellDblClick(c)),onContextmenu:e[4]||(e[4]=c=>!s.isDisabled&&l.options.cellContextmenu&&s.onCellContextMenu(c)),onDragenter:e[5]||(e[5]=c=>!s.isDisabled&&l.editEvents.drag&&s.dnd&&s.dnd.cellDragEnter(c,t.$data,l.data.startDate)),onDragover:c=>!s.isDisabled&&l.editEvents.drag&&s.dnd&&s.dnd.cellDragOver(c,t.$data,l.data.startDate,s.splitsCount?r.id:null),onDragleave:e[6]||(e[6]=c=>!s.isDisabled&&l.editEvents.drag&&s.dnd&&s.dnd.cellDragLeave(c,t.$data,l.data.startDate)),onDrop:c=>!s.isDisabled&&l.editEvents.drag&&s.dnd&&s.dnd.cellDragDrop(c,t.$data,l.data.startDate,s.splitsCount?r.id:null)},[l.options.showTimeInCells&&l.options.time&&s.isWeekOrDayView&&!l.allDay?(i.openBlock(),i.createElementBlock("div",ft,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(s.vuecal.timeCells,(c,h)=>(i.openBlock(),i.createElementBlock("span",{class:"cell-time-label",key:h},i.toDisplayString(c.label),1))),128))])):i.createCommentVNode("",!0),s.isWeekOrDayView&&!l.allDay&&s.specialHours.length?(i.openBlock(!0),i.createElementBlock(i.Fragment,{key:1},i.renderList(s.specialHours,(c,h)=>(i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(["vuecal__special-hours",`vuecal__special-hours--day${c.day} ${c.class}`]),style:i.normalizeStyle(`height: ${c.height}px;top: ${c.top}px`)},[c.label?(i.openBlock(),i.createElementBlock("div",{key:0,class:"special-hours-label",innerHTML:c.label},null,8,wt)):i.createCommentVNode("",!0)],6))),256)):i.createCommentVNode("",!0),i.renderSlot(t.$slots,"cell-content",{events:s.events,selectCell:c=>s.selectCell(c,!0),split:s.splitsCount?r:!1}),s.eventsCount&&(s.isWeekOrDayView||s.view.id==="month"&&l.options.eventsOnMonthView)?(i.openBlock(),i.createElementBlock("div",gt,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(s.splitsCount?r.events:s.events,(c,h)=>(i.openBlock(),i.createBlock(u,{key:h,"cell-formatted-date":l.data.formattedDate,event:c,"all-day":l.allDay,"cell-events":s.splitsCount?r.events:s.events,overlaps:((s.splitsCount?r.overlaps[c._eid]:t.cellOverlaps[c._eid])||[]).overlaps,"event-position":((s.splitsCount?r.overlaps[c._eid]:t.cellOverlaps[c._eid])||[]).position,"overlaps-streak":s.splitsCount?r.overlapsStreak:t.cellOverlapsStreak},{event:i.withCtx(({event:y,view:w})=>[i.renderSlot(t.$slots,"event",{view:w,event:y})]),_:2},1032,["cell-formatted-date","event","all-day","cell-events","overlaps","event-position","overlaps-streak"]))),128))])):i.createCommentVNode("",!0)],42,yt))),128)),s.timelineVisible?(i.openBlock(),i.createElementBlock("div",{class:"vuecal__now-line",style:i.normalizeStyle(`top: ${s.todaysTimePosition}px`),key:l.options.transitions?`${s.view.id}-now-line`:"now-line",title:s.utils.date.formatTime(s.vuecal.now)},null,12,Dt)):i.createCommentVNode("",!0)]),_:3},8,["class","name","appear","style"])}const kt={inject:["vuecal","utils","modules","view","domEvents"],components:{Event:mt},props:{options:{type:Object,default:()=>({})},editEvents:{type:Object,required:!0},data:{type:Object,required:!0},cellSplits:{type:Array,default:()=>[]},minTimestamp:{type:[Number,null],default:null},maxTimestamp:{type:[Number,null],default:null},cellWidth:{type:[Number,Boolean],default:!1},allDay:{type:Boolean,default:!1}},data:()=>({cellOverlaps:{},cellOverlapsStreak:1,timeAtCursor:null,highlighted:!1,highlightedSplit:null}),methods:{getSplitAtCursor({target:t}){let l=t.classList.contains("vuecal__cell-split")?t:this.vuecal.findAncestor(t,"vuecal__cell-split");return l&&(l=l.attributes["data-split"].value,parseInt(l).toString()===l.toString()&&(l=parseInt(l))),l||null},splitClasses(t){return{"vuecal__cell-split":!0,"vuecal__cell-split--highlighted":this.highlightedSplit===t.id,[t.class]:!!t.class}},checkCellOverlappingEvents(){this.options.time&&this.eventsCount&&!this.splitsCount&&(this.eventsCount===1?(this.cellOverlaps=[],this.cellOverlapsStreak=1):[this.cellOverlaps,this.cellOverlapsStreak]=this.utils.event.checkCellOverlappingEvents(this.events,this.options))},isDOMElementAnEvent(t){return this.vuecal.isDOMElementAnEvent(t)},selectCell(t,e=!1){const l=this.splitsCount?this.getSplitAtCursor(t):null;this.utils.cell.selectCell(e,this.timeAtCursor,l),this.timeAtCursor=null},onCellkeyPressEnter(t){this.isSelected||this.onCellFocus(t);const e=this.splitsCount?this.getSplitAtCursor(t):null;this.utils.cell.keyPressEnterCell(this.timeAtCursor,e),this.timeAtCursor=null},onCellFocus(t){if(!this.isSelected&&!this.isDisabled){this.isSelected=this.data.startDate;const e=this.splitsCount?this.getSplitAtCursor(t):null,l=this.timeAtCursor||this.data.startDate;this.vuecal.$emit("cell-focus",e?{date:l,split:e}:l)}},onCellMouseDown(t,e=null,l=!1){if("ontouchstart"in window&&!l)return!1;this.isSelected||this.onCellFocus(t);const{clickHoldACell:a,focusAnEvent:o}=this.domEvents;this.domEvents.cancelClickEventCreation=!1,a.eventCreated=!1,this.timeAtCursor=new Date(this.data.startDate);const{minutes:s,cursorCoords:{y:u}}=this.vuecal.minutesAtCursor(t);this.timeAtCursor.setMinutes(s);const r=this.isDOMElementAnEvent(t.target);!r&&o._eid&&((this.view.events.find(m=>m._eid===o._eid)||{}).focused=!1),this.editEvents.create&&!r&&this.setUpEventCreation(t,u)},setUpEventCreation(t,e){if(this.options.dragToCreateEvent&&["week","day"].includes(this.view.id)){const{dragCreateAnEvent:l}=this.domEvents;if(l.startCursorY=e,l.split=this.splitsCount?this.getSplitAtCursor(t):null,l.start=this.timeAtCursor,this.options.snapToTime){let a=this.timeAtCursor.getHours()*60+this.timeAtCursor.getMinutes();const o=a+this.options.snapToTime/2;a=o-o%this.options.snapToTime,l.start.setHours(0,a,0,0)}}else this.options.cellClickHold&&["month","week","day"].includes(this.view.id)&&this.setUpCellHoldTimer(t)},setUpCellHoldTimer(t){const{clickHoldACell:e}=this.domEvents;e.cellId=`${this.vuecal._.uid}_${this.data.formattedDate}`,e.split=this.splitsCount?this.getSplitAtCursor(t):null,e.timeoutId=setTimeout(()=>{if(e.cellId&&!this.domEvents.cancelClickEventCreation){const{_eid:l}=this.utils.event.createAnEvent(this.timeAtCursor,null,e.split?{split:e.split}:{});e.eventCreated=l}},e.timeout)},onCellTouchStart(t,e=null){this.onCellMouseDown(t,e,!0)},onCellClick(t){this.isDOMElementAnEvent(t.target)||this.selectCell(t)},onCellDblClick(t){const e=new Date(this.data.startDate);e.setMinutes(this.vuecal.minutesAtCursor(t).minutes);const l=this.splitsCount?this.getSplitAtCursor(t):null;this.vuecal.$emit("cell-dblclick",l?{date:e,split:l}:e),this.options.dblclickToNavigate&&this.vuecal.switchToNarrowerView()},onCellContextMenu(t){t.stopPropagation(),t.preventDefault();const e=new Date(this.data.startDate),{cursorCoords:l,minutes:a}=this.vuecal.minutesAtCursor(t);e.setMinutes(a);const o=this.splitsCount?this.getSplitAtCursor(t):null;this.vuecal.$emit("cell-contextmenu",{date:e,...l,...o||{},e:t})}},computed:{dnd(){return this.modules.dnd},nowInMinutes(){return this.utils.date.dateToMinutes(this.vuecal.now)},isBeforeMinDate(){return this.minTimestamp!==null&&this.minTimestamp>this.data.endDate.getTime()},isAfterMaxDate(){return this.maxTimestamp&&this.maxTimestamp<this.data.startDate.getTime()},isDisabled(){const{disableDays:t}=this.options,{isYearsOrYearView:e}=this.vuecal;return t.length&&t.includes(this.data.formattedDate)&&!e?!0:this.isBeforeMinDate||this.isAfterMaxDate},isSelected:{get(){let t=!1;const{selectedDate:e}=this.view;return this.view.id==="years"?t=e.getFullYear()===this.data.startDate.getFullYear():this.view.id==="year"?t=e.getFullYear()===this.data.startDate.getFullYear()&&e.getMonth()===this.data.startDate.getMonth():t=e.getTime()===this.data.startDate.getTime(),t},set(t){this.view.selectedDate=t,this.vuecal.$emit("update:selected-date",this.view.selectedDate)}},isWeekOrDayView(){return["week","day"].includes(this.view.id)},transitionDirection(){return this.vuecal.transitionDirection},specialHours(){return this.data.specialHours.map(t=>{let{from:e,to:l}=t;return e=Math.max(e,this.options.timeFrom),l=Math.min(l,this.options.timeTo),{...t,height:(l-e)*this.timeScale,top:(e-this.options.timeFrom)*this.timeScale}})},events(){const{startDate:t,endDate:e}=this.data;let l=[];if(!(["years","year"].includes(this.view.id)&&!this.options.eventsCountOnYearView)){if(l=this.view.events.slice(0),this.view.id==="month"&&l.push(...this.view.outOfScopeEvents),l=l.filter(a=>this.utils.event.eventInRange(a,t,e)),this.options.showAllDayEvents&&this.view.id!=="month"&&(l=l.filter(a=>!!a.allDay===this.allDay)),this.options.time&&this.isWeekOrDayView&&!this.allDay){const{timeFrom:a,timeTo:o}=this.options;l=l.filter(s=>{const u=s.daysCount>1&&s.segments[this.data.formattedDate]||{},r=s.daysCount===1&&s.startTimeMinutes<o&&s.endTimeMinutes>a,m=s.daysCount>1&&u.startTimeMinutes<o&&u.endTimeMinutes>a;return s.allDay||r||m||!1})}this.options.time&&this.isWeekOrDayView&&!(this.options.showAllDayEvents&&this.allDay)&&l.sort((a,o)=>a.start<o.start?-1:1),this.cellSplits.length||this.$nextTick(this.checkCellOverlappingEvents)}return l},eventsCount(){return this.events.length},splits(){return this.cellSplits.map((t,e)=>{const l=this.events.filter(s=>s.split===t.id),[a,o]=this.utils.event.checkCellOverlappingEvents(l.filter(s=>!s.background&&!s.allDay),this.options);return{...t,overlaps:a,overlapsStreak:o,events:l}})},splitsCount(){return this.splits.length},cellClasses(){return{[this.data.class]:!!this.data.class,"vuecal__cell--current":this.data.current,"vuecal__cell--today":this.data.today,"vuecal__cell--out-of-scope":this.data.outOfScope,"vuecal__cell--before-min":this.isDisabled&&this.isBeforeMinDate,"vuecal__cell--after-max":this.isDisabled&&this.isAfterMaxDate,"vuecal__cell--disabled":this.isDisabled,"vuecal__cell--selected":this.isSelected,"vuecal__cell--highlighted":this.highlighted,"vuecal__cell--has-splits":this.splitsCount,"vuecal__cell--has-events":this.eventsCount}},cellStyles(){return{...this.cellWidth?{width:`${this.cellWidth}%`}:{}}},timelineVisible(){const{time:t,timeTo:e}=this.options;return this.data.today&&this.isWeekOrDayView&&t&&!this.allDay&&this.nowInMinutes<=e},todaysTimePosition(){if(!this.data.today||!this.options.time)return;const t=this.nowInMinutes-this.options.timeFrom;return Math.round(t*this.timeScale)},timeScale(){return this.options.timeCellHeight/this.options.timeStep}}},_e=U(kt,[["render",pt]]),Ct={key:0,class:"vuecal__all-day-text",style:{width:"3em"}};function bt(t,e,l,a,o,s){const u=i.resolveComponent("vuecal-cell");return i.openBlock(),i.createElementBlock("div",{class:"vuecal__flex vuecal__all-day",style:i.normalizeStyle(l.cellOrSplitMinWidth&&{height:l.height})},[l.cellOrSplitMinWidth?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("div",Ct,[i.createElementVNode("span",null,i.toDisplayString(l.label),1)])),i.createElementVNode("div",{class:i.normalizeClass(["vuecal__flex vuecal__cells",`${s.view.id}-view`]),grow:"",style:i.normalizeStyle(l.cellOrSplitMinWidth?`min-width: ${l.cellOrSplitMinWidth}px`:"")},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(l.cells,(r,m)=>(i.openBlock(),i.createBlock(u,{key:m,options:l.options,"edit-events":s.editEvents,data:r,"all-day":!0,"cell-width":l.options.hideWeekdays.length&&(s.vuecal.isWeekView||s.vuecal.isMonthView)&&s.vuecal.cellWidth,"min-timestamp":l.options.minTimestamp,"max-timestamp":l.options.maxTimestamp,"cell-splits":l.daySplits},{event:i.withCtx(({event:c,view:h})=>[i.renderSlot(t.$slots,"event",{view:h,event:c})]),_:2},1032,["options","edit-events","data","cell-width","min-timestamp","max-timestamp","cell-splits"]))),128))],6)],4)}const Tt={inject:["vuecal","view","editEvents"],components:{"vuecal-cell":_e},props:{options:{type:Object,required:!0},cells:{type:Array,required:!0},label:{type:String,required:!0},daySplits:{type:Array,default:()=>[]},shortEvents:{type:Boolean,default:!0},height:{type:String,default:""},cellOrSplitMinWidth:{type:Number,default:null}},computed:{hasCellOrSplitWidth(){return!!(this.options.minCellWidth||this.daySplits.length&&this.options.minSplitWidth)}}},Et=U(Tt,[["render",bt]]),St=["lang"],_t={class:"default"},Mt={key:0,class:"vuecal__flex vuecal__body",grow:""},Vt=["onBlur","innerHTML"],Bt=["innerHTML"],Ot=["innerHTML"],Ht={class:"vuecal__flex",row:"",grow:""},Wt={key:0,class:"vuecal__time-column"},At={class:"vuecal__time-cell-label"},Nt={key:1,class:"vuecal__flex vuecal__week-numbers",column:""},Ft=["wrap","column"],Pt=["onBlur","innerHTML"],Lt=["innerHTML"],jt=["innerHTML"],xt=["wrap"],zt=["innerHTML"],Yt=["innerHTML"],It={key:2,class:"vuecal__cell-events-count"},qt={key:3,class:"vuecal__no-event"},Rt=["onBlur","innerHTML"],Ut=["innerHTML"],Kt={key:2,class:"vuecal__event-time"},Gt={key:0},Xt={key:1,class:"days-to-end"},Jt=["innerHTML"],Zt={key:0,class:"vuecal__scrollbar-check"};function Qt(t,e,l,a,o,s){const u=i.resolveComponent("vuecal-header"),r=i.resolveComponent("all-day-bar"),m=i.resolveComponent("weekdays-headings"),c=i.resolveComponent("vuecal-cell");return i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(["vuecal__flex vuecal",s.cssClasses]),column:"",ref:"vuecal",lang:l.locale},[i.createVNode(u,{options:t.$props,"edit-events":s.editEvents,"view-props":{views:s.views,weekDaysInHeader:s.weekDaysInHeader},"week-days":s.weekDays,"has-splits":s.hasSplits,"day-splits":s.daySplits,"switch-to-narrower-view":s.switchToNarrowerView},i.createSlots({"arrow-prev":i.withCtx(()=>[i.renderSlot(t.$slots,"arrow-prev",{},()=>[e[0]||(e[0]=i.createTextVNode(" ")),e[1]||(e[1]=i.createElementVNode("i",{class:"angle"},null,-1)),e[2]||(e[2]=i.createTextVNode(" "))])]),"arrow-next":i.withCtx(()=>[i.renderSlot(t.$slots,"arrow-next",{},()=>[e[3]||(e[3]=i.createTextVNode(" ")),e[4]||(e[4]=i.createElementVNode("i",{class:"angle"},null,-1)),e[5]||(e[5]=i.createTextVNode(" "))])]),"today-button":i.withCtx(()=>[i.renderSlot(t.$slots,"today-button",{},()=>[i.createElementVNode("span",_t,i.toDisplayString(o.texts.today),1)])]),title:i.withCtx(()=>[i.renderSlot(t.$slots,"title",{title:s.viewTitle,view:o.view},()=>[i.createTextVNode(i.toDisplayString(s.viewTitle),1)])]),_:2},[t.$slots["weekday-heading"]?{name:"weekday-heading",fn:i.withCtx(({heading:h,view:y})=>[i.renderSlot(t.$slots,"weekday-heading",{heading:h,view:y})]),key:"0"}:void 0,t.$slots["split-label"]?{name:"split-label",fn:i.withCtx(({split:h})=>[i.renderSlot(t.$slots,"split-label",{split:h,view:o.view.id})]),key:"1"}:void 0]),1032,["options","edit-events","view-props","week-days","has-splits","day-splits","switch-to-narrower-view"]),l.hideBody?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("div",Mt,[i.createVNode(i.Transition,{name:`slide-fade--${o.transitionDirection}`,appear:l.transitions},{default:i.withCtx(()=>[(i.openBlock(),i.createElementBlock("div",{class:"vuecal__flex",style:{"min-width":"100%"},key:l.transitions?o.view.id:!1,column:""},[l.showAllDayEvents&&s.hasTimeColumn&&(!s.cellOrSplitMinWidth||s.isDayView&&!l.minSplitWidth)?(i.openBlock(),i.createBlock(r,i.normalizeProps(i.mergeProps({key:0},s.allDayBar)),{event:i.withCtx(({event:h,view:y})=>[i.renderSlot(t.$slots,"event",{view:y,event:h},()=>[s.editEvents.title&&h.titleEditable?(i.openBlock(),i.createElementBlock("div",{key:0,class:"vuecal__event-title vuecal__event-title--edit",contenteditable:"",onBlur:w=>s.onEventTitleBlur(w,h),innerHTML:h.title},null,40,Vt)):h.title?(i.openBlock(),i.createElementBlock("div",{key:1,class:"vuecal__event-title",innerHTML:h.title},null,8,Bt)):i.createCommentVNode("",!0),h.content&&!s.hasShortEvents&&!s.isShortMonthView?(i.openBlock(),i.createElementBlock("div",{key:2,class:"vuecal__event-content",innerHTML:h.content},null,8,Ot)):i.createCommentVNode("",!0)])]),_:3},16)):i.createCommentVNode("",!0),i.createElementVNode("div",{class:i.normalizeClass(["vuecal__bg",{vuecal__flex:!s.hasTimeColumn}]),column:""},[i.createElementVNode("div",Ht,[s.hasTimeColumn?(i.openBlock(),i.createElementBlock("div",Wt,[l.showAllDayEvents&&s.cellOrSplitMinWidth&&!(s.isDayView&&!l.minSplitWidth)?(i.openBlock(),i.createElementBlock("div",{key:0,class:"vuecal__all-day-text",style:i.normalizeStyle({height:s.allDayBar.height})},[i.createElementVNode("span",null,i.toDisplayString(o.texts.allDay),1)],4)):i.createCommentVNode("",!0),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(s.timeCells,(h,y)=>(i.openBlock(),i.createElementBlock("div",{class:"vuecal__time-cell",key:y,style:i.normalizeStyle(`height: ${l.timeCellHeight}px`)},[i.renderSlot(t.$slots,"time-cell",{hours:h.hours,minutes:h.minutes},()=>[e[6]||(e[6]=i.createElementVNode("span",{class:"vuecal__time-cell-line"},null,-1)),i.createElementVNode("span",At,i.toDisplayString(h.label),1)])],4))),128))])):i.createCommentVNode("",!0),l.showWeekNumbers&&s.isMonthView?(i.openBlock(),i.createElementBlock("div",Nt,[(i.openBlock(),i.createElementBlock(i.Fragment,null,i.renderList(6,h=>i.createElementVNode("div",{class:"vuecal__flex vuecal__week-number-cell",key:h,grow:""},[i.renderSlot(t.$slots,"week-number-cell",{week:s.getWeekNumber(h-1)},()=>[i.createTextVNode(i.toDisplayString(s.getWeekNumber(h-1)),1)])])),64))])):i.createCommentVNode("",!0),i.createElementVNode("div",{class:i.normalizeClass(["vuecal__flex vuecal__cells",`${o.view.id}-view`]),grow:"",wrap:!s.cellOrSplitMinWidth||!s.isWeekView,column:!!s.cellOrSplitMinWidth},[s.cellOrSplitMinWidth&&s.isWeekView?(i.openBlock(),i.createBlock(m,{key:0,"transition-direction":o.transitionDirection,"week-days":s.weekDays,"switch-to-narrower-view":s.switchToNarrowerView,style:i.normalizeStyle(s.cellOrSplitMinWidth?`min-width: ${s.cellOrSplitMinWidth}px`:"")},i.createSlots({_:2},[t.$slots["weekday-heading"]?{name:"weekday-heading",fn:i.withCtx(({heading:h,view:y})=>[i.renderSlot(t.$slots,"weekday-heading",{heading:h,view:y})]),key:"0"}:void 0,t.$slots["split-label"]?{name:"split-label",fn:i.withCtx(({split:h})=>[i.renderSlot(t.$slots,"split-label",{split:h,view:o.view.id})]),key:"1"}:void 0]),1032,["transition-direction","week-days","switch-to-narrower-view","style"])):s.hasSplits&&l.stickySplitLabels&&l.minSplitWidth?(i.openBlock(),i.createElementBlock("div",{key:1,class:"vuecal__flex vuecal__split-days-headers",style:i.normalizeStyle(s.cellOrSplitMinWidth?`min-width: ${s.cellOrSplitMinWidth}px`:"")},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(s.daySplits,(h,y)=>(i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(["day-split-header",h.class||!1]),key:y},[i.renderSlot(t.$slots,"split-label",{split:h,view:o.view.id},()=>[i.createTextVNode(i.toDisplayString(h.label),1)])],2))),128))],4)):i.createCommentVNode("",!0),l.showAllDayEvents&&s.hasTimeColumn&&(s.isWeekView&&s.cellOrSplitMinWidth||s.isDayView&&s.hasSplits&&l.minSplitWidth)?(i.openBlock(),i.createBlock(r,i.normalizeProps(i.mergeProps({key:2},s.allDayBar)),{event:i.withCtx(({event:h,view:y})=>[i.renderSlot(t.$slots,"event",{view:y,event:h},()=>[s.editEvents.title&&h.titleEditable?(i.openBlock(),i.createElementBlock("div",{key:0,class:"vuecal__event-title vuecal__event-title--edit",contenteditable:"",onBlur:w=>s.onEventTitleBlur(w,h),innerHTML:h.title},null,40,Pt)):h.title?(i.openBlock(),i.createElementBlock("div",{key:1,class:"vuecal__event-title",innerHTML:h.title},null,8,Lt)):i.createCommentVNode("",!0),h.content&&!s.hasShortEvents&&!s.isShortMonthView?(i.openBlock(),i.createElementBlock("div",{key:2,class:"vuecal__event-content",innerHTML:h.content},null,8,jt)):i.createCommentVNode("",!0)])]),_:3},16)):i.createCommentVNode("",!0),i.createElementVNode("div",{class:"vuecal__flex",ref:h=>o.cellsEl=h,grow:"",wrap:!s.cellOrSplitMinWidth||!s.isWeekView,style:i.normalizeStyle(s.cellOrSplitMinWidth?`min-width: ${s.cellOrSplitMinWidth}px`:"")},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(s.viewCells,(h,y)=>(i.openBlock(),i.createBlock(c,{key:y,options:t.$props,"edit-events":s.editEvents,data:h,"cell-width":l.hideWeekdays.length&&(s.isWeekView||s.isMonthView)&&s.cellWidth,"min-timestamp":s.minTimestamp,"max-timestamp":s.maxTimestamp,"cell-splits":s.hasSplits&&s.daySplits||[]},{"cell-content":i.withCtx(({events:w,split:T,selectCell:g})=>[i.renderSlot(t.$slots,"cell-content",{cell:h,view:o.view,goNarrower:g,events:w},()=>[T&&!l.stickySplitLabels?(i.openBlock(),i.createElementBlock("div",{key:0,class:"split-label",innerHTML:T.label},null,8,zt)):i.createCommentVNode("",!0),h.content?(i.openBlock(),i.createElementBlock("div",{key:1,class:"vuecal__cell-date",innerHTML:h.content},null,8,Yt)):i.createCommentVNode("",!0),(s.isMonthView&&!l.eventsOnMonthView||s.isYearsOrYearView&&l.eventsCountOnYearView)&&w.length?(i.openBlock(),i.createElementBlock("div",It,[i.renderSlot(t.$slots,"events-count",{view:o.view,events:w},()=>[i.createTextVNode(i.toDisplayString(w.length),1)])])):i.createCommentVNode("",!0),!s.cellOrSplitHasEvents(w,T)&&s.isWeekOrDayView?(i.openBlock(),i.createElementBlock("div",qt,[i.renderSlot(t.$slots,"no-event",{},()=>[i.createTextVNode(i.toDisplayString(o.texts.noEvent),1)])])):i.createCommentVNode("",!0)])]),event:i.withCtx(({event:w,view:T})=>[i.renderSlot(t.$slots,"event",{view:T,event:w},()=>[s.editEvents.title&&w.titleEditable?(i.openBlock(),i.createElementBlock("div",{key:0,class:"vuecal__event-title vuecal__event-title--edit",contenteditable:"",onBlur:g=>s.onEventTitleBlur(g,w),innerHTML:w.title},null,40,Rt)):w.title?(i.openBlock(),i.createElementBlock("div",{key:1,class:"vuecal__event-title",innerHTML:w.title},null,8,Ut)):i.createCommentVNode("",!0),l.time&&!w.allDay&&!(s.isMonthView&&(w.allDay||l.showAllDayEvents==="short"))&&!s.isShortMonthView?(i.openBlock(),i.createElementBlock("div",Kt,[i.createTextVNode(i.toDisplayString(o.utils.date.formatTime(w.start,s.TimeFormat)),1),w.endTimeMinutes?(i.openBlock(),i.createElementBlock("span",Gt," - "+i.toDisplayString(o.utils.date.formatTime(w.end,s.TimeFormat,null,!0)),1)):i.createCommentVNode("",!0),w.daysCount>1&&(w.segments[h.formattedDate]||{}).isFirstDay?(i.openBlock(),i.createElementBlock("small",Xt," +"+i.toDisplayString(w.daysCount-1)+i.toDisplayString((o.texts.day[0]||"").toLowerCase()),1)):i.createCommentVNode("",!0)])):i.createCommentVNode("",!0),w.content&&!(s.isMonthView&&w.allDay&&l.showAllDayEvents==="short")&&!s.isShortMonthView?(i.openBlock(),i.createElementBlock("div",{key:3,class:"vuecal__event-content",innerHTML:w.content},null,8,Jt)):i.createCommentVNode("",!0)])]),"no-event":i.withCtx(()=>[i.renderSlot(t.$slots,"no-event",{},()=>[i.createTextVNode(i.toDisplayString(o.texts.noEvent),1)])]),_:2},1032,["options","edit-events","data","cell-width","min-timestamp","max-timestamp","cell-splits"]))),128))],12,xt)],10,Ft)])],2)]))]),_:3},8,["name","appear"]),o.ready?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("div",Zt,e[7]||(e[7]=[i.createElementVNode("div",null,null,-1)])))]))],10,St)}const de=24*60,ce={weekDays:Array(7).fill(""),weekDaysShort:[],months:Array(12).fill(""),years:"",year:"",month:"",week:"",day:"",today:"",noEvent:"",allDay:"",deleteEvent:"",createEvent:"",dateFormat:"dddd MMMM D, YYYY",am:"am",pm:"pm"},be=["years","year","month","week","day"],Te=new je(ce),$t={name:"vue-cal",components:{"vuecal-cell":_e,"vuecal-header":dt,WeekdaysHeadings:Se,AllDayBar:Et},provide(){return{vuecal:this,utils:this.utils,modules:this.modules,previous:this.previous,next:this.next,switchView:this.switchView,updateSelectedDate:this.updateSelectedDate,editEvents:this.editEvents,view:this.view,domEvents:this.domEvents}},props:{activeView:{type:String,default:"week"},allDayBarHeight:{type:[String,Number],default:"25px"},cellClickHold:{type:Boolean,default:!0},cellContextmenu:{type:Boolean,default:!1},clickToNavigate:{type:Boolean,default:!1},dblclickToNavigate:{type:Boolean,default:!0},disableDatePrototypes:{type:Boolean,default:!1},disableDays:{type:Array,default:()=>[]},disableViews:{type:Array,default:()=>[]},dragToCreateEvent:{type:Boolean,default:!0},dragToCreateThreshold:{type:Number,default:15},editableEvents:{type:[Boolean,Object],default:!1},events:{type:Array,default:()=>[]},eventsCountOnYearView:{type:Boolean,default:!1},eventsOnMonthView:{type:[Boolean,String],default:!1},hideBody:{type:Boolean,default:!1},hideTitleBar:{type:Boolean,default:!1},hideViewSelector:{type:Boolean,default:!1},hideWeekdays:{type:Array,default:()=>[]},hideWeekends:{type:Boolean,default:!1},locale:{type:[String,Object],default:"en"},maxDate:{type:[String,Date],default:""},minCellWidth:{type:Number,default:0},minDate:{type:[String,Date],default:""},minEventWidth:{type:Number,default:0},minSplitWidth:{type:Number,default:0},onEventClick:{type:[Function,null],default:null},onEventCreate:{type:[Function,null],default:null},onEventDblclick:{type:[Function,null],default:null},overlapsPerTimeStep:{type:Boolean,default:!1},resizeX:{type:Boolean,default:!1},selectedDate:{type:[String,Date],default:""},showAllDayEvents:{type:[Boolean,String],default:!1},showTimeInCells:{type:Boolean,default:!1},showWeekNumbers:{type:[Boolean,String],default:!1},snapToTime:{type:Number,default:0},small:{type:Boolean,default:!1},specialHours:{type:Object,default:()=>({})},splitDays:{type:Array,default:()=>[]},startWeekOnSunday:{type:Boolean,default:!1},stickySplitLabels:{type:Boolean,default:!1},time:{type:Boolean,default:!0},timeCellHeight:{type:Number,default:40},timeFormat:{type:String,default:""},timeFrom:{type:Number,default:0},timeStep:{type:Number,default:60},timeTo:{type:Number,default:de},todayButton:{type:Boolean,default:!1},transitions:{type:Boolean,default:!0},twelveHour:{type:Boolean,default:!1},watchRealTime:{type:Boolean,default:!1},xsmall:{type:Boolean,default:!1}},data(){return{ready:!1,texts:{...ce},utils:{date:(this.disableDatePrototypes?Te.removePrototypes():!1)||Te,cell:null,event:null},modules:{dnd:null},cellsEl:null,view:{id:"",title:"",startDate:null,endDate:null,firstCellDate:null,lastCellDate:null,selectedDate:null,events:[]},eventIdIncrement:1,now:new Date,timeTickerIds:[null,null],domEvents:{resizeAnEvent:{_eid:null,start:null,split:null,segment:null,originalEndTimeMinutes:0,originalEnd:null,end:null,startCell:null,endCell:null},dragAnEvent:{_eid:null},dragCreateAnEvent:{startCursorY:null,start:null,split:null,event:null},focusAnEvent:{_eid:null,mousedUp:!1},clickHoldAnEvent:{_eid:null,timeout:1200,timeoutId:null},dblTapACell:{taps:0,timeout:500},clickHoldACell:{cellId:null,split:null,timeout:1200,timeoutId:null,eventCreated:!1},cancelClickEventCreation:!1},mutableEvents:[],transitionDirection:"right"}},methods:{async loadLocale(t){if(typeof this.locale=="object"){this.texts=Object.assign({},ce,t),this.utils.date.updateTexts(this.texts);return}const e=await Le(Object.assign({"./i18n/ar.json":()=>Promise.resolve().then(()=>require("./ar.es-CKau4tBl.js")),"./i18n/bg.json":()=>Promise.resolve().then(()=>require("./bg.es-Melqx1M5.js")),"./i18n/bn.json":()=>Promise.resolve().then(()=>require("./bn.es-ClbAZ4WP.js")),"./i18n/bs.json":()=>Promise.resolve().then(()=>require("./bs.es-KjOcbE96.js")),"./i18n/ca.json":()=>Promise.resolve().then(()=>require("./ca.es-BaGTENcW.js")),"./i18n/cs.json":()=>Promise.resolve().then(()=>require("./cs.es-ChOlHqBr.js")),"./i18n/da.json":()=>Promise.resolve().then(()=>require("./da.es-DOFXbf8-.js")),"./i18n/de.json":()=>Promise.resolve().then(()=>require("./de.es-DwE82Kaw.js")),"./i18n/el.json":()=>Promise.resolve().then(()=>require("./el.es-CNrCgzYI.js")),"./i18n/en.json":()=>Promise.resolve().then(()=>require("./en.es-CgL601qd.js")),"./i18n/es.json":()=>Promise.resolve().then(()=>require("./es.es-IdFGKY7Q.js")),"./i18n/et.json":()=>Promise.resolve().then(()=>require("./et.es-BygWmV3P.js")),"./i18n/fa.json":()=>Promise.resolve().then(()=>require("./fa.es-DW_0SmsT.js")),"./i18n/fi.json":()=>Promise.resolve().then(()=>require("./fi.es-pgfJlZ8i.js")),"./i18n/fr.json":()=>Promise.resolve().then(()=>require("./fr.es-OENguFuM.js")),"./i18n/he.json":()=>Promise.resolve().then(()=>require("./he.es-bixEnAeH.js")),"./i18n/hr.json":()=>Promise.resolve().then(()=>require("./hr.es-CkRAP94O.js")),"./i18n/hu.json":()=>Promise.resolve().then(()=>require("./hu.es-DG6HeiQJ.js")),"./i18n/id.json":()=>Promise.resolve().then(()=>require("./id.es-D4tPi6wP.js")),"./i18n/is.json":()=>Promise.resolve().then(()=>require("./is.es-CDFqLYCV.js")),"./i18n/it.json":()=>Promise.resolve().then(()=>require("./it.es-BHgrw_C6.js")),"./i18n/ja.json":()=>Promise.resolve().then(()=>require("./ja.es-D-lxWwyb.js")),"./i18n/ka.json":()=>Promise.resolve().then(()=>require("./ka.es-CnnB6q4A.js")),"./i18n/ko.json":()=>Promise.resolve().then(()=>require("./ko.es-b18aaB3V.js")),"./i18n/lt.json":()=>Promise.resolve().then(()=>require("./lt.es-BY9UQ6wZ.js")),"./i18n/mn.json":()=>Promise.resolve().then(()=>require("./mn.es-YFS7gSdf.js")),"./i18n/nl.json":()=>Promise.resolve().then(()=>require("./nl.es-BEx-4hnj.js")),"./i18n/no.json":()=>Promise.resolve().then(()=>require("./no.es-BQnRWlWR.js")),"./i18n/pl.json":()=>Promise.resolve().then(()=>require("./pl.es-CKCsZ_02.js")),"./i18n/pt-br.json":()=>Promise.resolve().then(()=>require("./pt-br.es-oH7qh6Fd.js")),"./i18n/pt-pt.json":()=>Promise.resolve().then(()=>require("./pt-pt.es-DLk5I0ej.js")),"./i18n/ro.json":()=>Promise.resolve().then(()=>require("./ro.es-DgTen1Dh.js")),"./i18n/ru.json":()=>Promise.resolve().then(()=>require("./ru.es-jGIQfREl.js")),"./i18n/sk.json":()=>Promise.resolve().then(()=>require("./sk.es-D2bhVb26.js")),"./i18n/sl.json":()=>Promise.resolve().then(()=>require("./sl.es-TV8Uraa1.js")),"./i18n/sq.json":()=>Promise.resolve().then(()=>require("./sq.es-Cc65zxbr.js")),"./i18n/sr.json":()=>Promise.resolve().then(()=>require("./sr.es-D5VNA_GW.js")),"./i18n/sv.json":()=>Promise.resolve().then(()=>require("./sv.es-dBeK_DZs.js")),"./i18n/tr.json":()=>Promise.resolve().then(()=>require("./tr.es-BUz4S13G.js")),"./i18n/uk.json":()=>Promise.resolve().then(()=>require("./uk.es-B8uaeLcK.js")),"./i18n/vi.json":()=>Promise.resolve().then(()=>require("./vi.es-2OFMtbQI.js")),"./i18n/zh-cn.json":()=>Promise.resolve().then(()=>require("./zh-cn.es-fDHCbCIg.js")),"./i18n/zh-hk.json":()=>Promise.resolve().then(()=>require("./zh-hk.es-COzeh5F8.js"))}),`./i18n/${t}.json`,3);this.texts=Object.assign({},ce,e),this.utils.date.updateTexts(this.texts)},loadDragAndDrop(){Promise.resolve().then(()=>require("./drag-and-drop.es-4ttM1tRs.js")).then(t=>{const{DragAndDrop:e}=t;this.modules.dnd=new e(this)}).catch(()=>console.warn("Vue Cal: Missing drag & drop module."))},validateView(t){return be.includes(t)||(console.error(`Vue Cal: invalid active-view parameter provided: "${t}".
|
|
2
|
+
A valid view must be one of: ${be.join(", ")}.`),t="week"),this.enabledViews.includes(t)||(console.warn(`Vue Cal: the provided active-view "${t}" is disabled. Using the "${this.enabledViews[0]}" view instead.`),t=this.enabledViews[0]),t},switchToNarrowerView(t=null){this.transitionDirection="right";const e=this.enabledViews[this.enabledViews.indexOf(this.view.id)+1];e&&this.switchView(e,t)},switchView(t,e=null,l=!1){t=this.validateView(t);const a=this.utils.date,o=this.view.startDate&&this.view.startDate.getTime();if(this.transitions&&l){if(this.view.id===t)return;const r=this.enabledViews;this.transitionDirection=r.indexOf(this.view.id)>r.indexOf(t)?"left":"right"}const s=this.view.id;switch(this.view.events=[],this.view.id=t,this.view.firstCellDate=null,this.view.lastCellDate=null,e||(e=this.view.selectedDate||this.view.startDate),t){case"years":{this.view.startDate=new Date(Math.floor(e.getFullYear()/25)*25||2e3,0,1),this.view.endDate=new Date(this.view.startDate.getFullYear()+25,0,1),this.view.endDate.setSeconds(-1);break}case"year":{this.view.startDate=new Date(e.getFullYear(),0,1),this.view.endDate=new Date(e.getFullYear()+1,0,1),this.view.endDate.setSeconds(-1);break}case"month":{this.view.startDate=new Date(e.getFullYear(),e.getMonth(),1),this.view.endDate=new Date(e.getFullYear(),e.getMonth()+1,1),this.view.endDate.setSeconds(-1);let r=new Date(this.view.startDate);if(r.getDay()!==(this.startWeekOnSunday?0:1)&&(r=a.getPreviousFirstDayOfWeek(r,this.startWeekOnSunday)),this.view.firstCellDate=r,this.view.lastCellDate=a.addDays(r,41),this.view.lastCellDate.setHours(23,59,59,0),this.hideWeekends){if([0,6].includes(this.view.firstCellDate.getDay())){const m=this.view.firstCellDate.getDay()===6&&!this.startWeekOnSunday?2:1;this.view.firstCellDate=a.addDays(this.view.firstCellDate,m)}if([0,6].includes(this.view.startDate.getDay())){const m=this.view.startDate.getDay()===6?2:1;this.view.startDate=a.addDays(this.view.startDate,m)}if([0,6].includes(this.view.lastCellDate.getDay())){const m=this.view.lastCellDate.getDay()===0&&!this.startWeekOnSunday?2:1;this.view.lastCellDate=a.subtractDays(this.view.lastCellDate,m)}if([0,6].includes(this.view.endDate.getDay())){const m=this.view.endDate.getDay()===0?2:1;this.view.endDate=a.subtractDays(this.view.endDate,m)}}break}case"week":{e=a.getPreviousFirstDayOfWeek(e,this.startWeekOnSunday);const r=this.hideWeekends?5:7;this.view.startDate=this.hideWeekends&&this.startWeekOnSunday?a.addDays(e,1):e,this.view.startDate.setHours(0,0,0,0),this.view.endDate=a.addDays(e,r),this.view.endDate.setSeconds(-1);break}case"day":{this.view.startDate=e,this.view.startDate.setHours(0,0,0,0),this.view.endDate=new Date(e),this.view.endDate.setHours(23,59,59,0);break}}this.addEventsToView();const u=this.view.startDate&&this.view.startDate.getTime();if(!(s===t&&u===o)&&(this.$emit("update:activeView",t),this.ready)){const r=this.view.startDate,m={view:t,startDate:r,endDate:this.view.endDate,...this.isMonthView?{firstCellDate:this.view.firstCellDate,lastCellDate:this.view.lastCellDate,outOfScopeEvents:this.view.outOfScopeEvents.map(this.cleanupEvent)}:{},events:this.view.events.map(this.cleanupEvent),...this.isWeekView?{week:a.getWeek(this.startWeekOnSunday?a.addDays(r,1):r)}:{}};this.$emit("view-change",m)}},previous(){this.previousNext(!1)},next(){this.previousNext()},previousNext(t=!0){const e=this.utils.date;this.transitionDirection=t?"right":"left";const l=t?1:-1;let a=null;const{startDate:o,id:s}=this.view;switch(s){case"years":a=new Date(o.getFullYear()+25*l,0,1);break;case"year":a=new Date(o.getFullYear()+1*l,1,1);break;case"month":a=new Date(o.getFullYear(),o.getMonth()+1*l,1);break;case"week":a=e[t?"addDays":"subtractDays"](e.getPreviousFirstDayOfWeek(o,this.startWeekOnSunday),7);break;case"day":a=e[t?"addDays":"subtractDays"](o,1);const u=a.getDay(),r=this.startWeekOnSunday?u:(u||7)-1;if(this.weekDays[r].hide){const c=this.weekDays.map((y,w)=>({...y,i:w}));let h=0;t?([...c.slice(r),...c].find(y=>(h++,!y.hide)).i,h--):[...c,...c.slice(0,r)].reverse().find(y=>(h++,!y.hide)).i,a=e[t?"addDays":"subtractDays"](a,h)}break}a&&this.switchView(s,a)},addEventsToView(t=[]){const e=this.utils.event,{startDate:l,endDate:a,firstCellDate:o,lastCellDate:s}=this.view;if(t.length||(this.view.events=[]),t=t.length?t:[...this.mutableEvents],!t||this.isYearsOrYearView&&!this.eventsCountOnYearView)return;let u=t.filter(r=>e.eventInRange(r,l,a));!this.isYearsOrYearView&&!(this.isMonthView&&!this.eventsOnMonthView)&&(u=u.map(r=>r.daysCount>1?e.createEventSegments(r,o||l,s||a):r)),this.view.events.push(...u),this.isMonthView&&(this.view.outOfScopeEvents=[],t.forEach(r=>{(e.eventInRange(r,o,l)||e.eventInRange(r,a,s))&&(this.view.events.some(m=>m._eid===r._eid)||this.view.outOfScopeEvents.push(r))}))},findAncestor(t,e){for(;(t=t.parentElement)&&!t.classList.contains(e););return t},isDOMElementAnEvent(t){return t.classList.contains("vuecal__event")||this.findAncestor(t,"vuecal__event")},onMouseMove(t){const{resizeAnEvent:e,dragAnEvent:l,dragCreateAnEvent:a}=this.domEvents;e._eid===null&&l._eid===null&&!a.start||(t.preventDefault(),e._eid?this.eventResizing(t):this.dragToCreateEvent&&a.start&&this.eventDragCreation(t))},onMouseUp(t){const{focusAnEvent:e,resizeAnEvent:l,clickHoldAnEvent:a,clickHoldACell:o,dragCreateAnEvent:s}=this.domEvents,{_eid:u}=a,{_eid:r}=l;let m=!1;const{event:c,start:h}=s,y=this.isDOMElementAnEvent(t.target),w=e.mousedUp;if(e.mousedUp=!1,y&&(this.domEvents.cancelClickEventCreation=!0),o.eventCreated)return;if(r){const{originalEnd:g,originalEndTimeMinutes:_,endTimeMinutes:E}=l,D=this.view.events.find(M=>M._eid===l._eid);if(m=E&&E!==_,D&&D.end.getTime()!==g.getTime()){const M=this.mutableEvents.find(F=>F._eid===l._eid);M.endTimeMinutes=D.endTimeMinutes,M.end=D.end;const C=this.cleanupEvent(D),O={...this.cleanupEvent(D),end:g,endTimeMinutes:D.originalEndTimeMinutes};this.$emit("event-duration-change",{event:C,oldDate:l.originalEnd,originalEvent:O}),this.$emit("event-change",{event:C,originalEvent:O})}D&&(D.resizing=!1),l._eid=null,l.start=null,l.split=null,l.segment=null,l.originalEndTimeMinutes=null,l.originalEnd=null,l.endTimeMinutes=null,l.startCell=null,l.endCell=null}else h&&(c&&(this.emitWithEvent("event-drag-create",c),s.event.resizing=!1),s.start=null,s.split=null,s.event=null);!y&&!r&&this.unfocusEvent(),a.timeoutId&&!u&&(clearTimeout(a.timeoutId),a.timeoutId=null),o.timeoutId&&(clearTimeout(o.timeoutId),o.timeoutId=null);const T=typeof this.onEventClick=="function";if(w&&!m&&!u&&!c&&T){let g=this.view.events.find(_=>_._eid===e._eid);return!g&&this.isMonthView&&(g=this.view.outOfScopeEvents.find(_=>_._eid===e._eid)),g&&this.onEventClick(g,t)}},onKeyUp(t){t.keyCode===27&&this.cancelDelete()},eventResizing(t){const{resizeAnEvent:e}=this.domEvents,l=this.view.events.find(c=>c._eid===e._eid)||{segments:{}},{minutes:a,cursorCoords:o}=this.minutesAtCursor(t),s=l.segments&&l.segments[e.segment],{date:u,event:r}=this.utils,m=Math.max(a,this.timeFrom+1,(s||l).startTimeMinutes+1);if(l.endTimeMinutes=e.endTimeMinutes=m,this.snapToTime){const c=l.endTimeMinutes+this.snapToTime/2;l.endTimeMinutes=c-c%this.snapToTime}if(s&&(s.endTimeMinutes=l.endTimeMinutes),l.end.setHours(0,l.endTimeMinutes,l.endTimeMinutes===de?-1:0,0),this.resizeX&&this.isWeekView){l.daysCount=u.countDays(l.start,l.end);const c=this.cellsEl,h=c.offsetWidth/c.childElementCount,y=Math.floor(o.x/h);if(e.startCell===null&&(e.startCell=y-(l.daysCount-1)),e.endCell!==y){e.endCell=y;const w=u.addDays(l.start,y-e.startCell),T=Math.max(u.countDays(l.start,w),1);if(T!==l.daysCount){let g=null;T>l.daysCount?g=r.addEventSegment(l):g=r.removeEventSegment(l),e.segment=g,l.endTimeMinutes+=.001}}}this.$emit("event-resizing",{_eid:l._eid,end:l.end,endTimeMinutes:l.endTimeMinutes})},eventDragCreation(t){const{dragCreateAnEvent:e}=this.domEvents,{start:l,startCursorY:a,split:o}=e,s=new Date(l),{minutes:u,cursorCoords:{y:r}}=this.minutesAtCursor(t);if(!(!e.event&&Math.abs(a-r)<this.dragToCreateThreshold))if(e.event){if(s.setHours(0,u,u===de?-1:0,0),this.snapToTime){let h=s.getHours()*60+s.getMinutes();const y=h+this.snapToTime/2;h=y-y%this.snapToTime,s.setHours(0,h,0,0)}const m=l<s,{event:c}=e;c.start=m?l:s,c.end=m?s:l,c.startTimeMinutes=c.start.getHours()*60+c.start.getMinutes(),c.endTimeMinutes=c.end.getHours()*60+c.end.getMinutes()}else{if(e.event=this.utils.event.createAnEvent(l,1,{split:o}),!e.event){e.start=null,e.split=null,e.event=null;return}e.event.resizing=!0}},unfocusEvent(){const{focusAnEvent:t,clickHoldAnEvent:e}=this.domEvents,l=this.view.events.find(a=>a._eid===(t._eid||e._eid));t._eid=null,e._eid=null,l&&(l.focused=!1,l.deleting=!1)},cancelDelete(){const{clickHoldAnEvent:t}=this.domEvents;if(t._eid){const e=this.view.events.find(l=>l._eid===t._eid);e&&(e.deleting=!1),t._eid=null,t.timeoutId=null}},onEventTitleBlur(t,e){if(e.title===t.target.innerHTML)return;const l=e.title;e.title=t.target.innerHTML;const a=this.cleanupEvent(e);this.$emit("event-title-change",{event:a,oldTitle:l}),this.$emit("event-change",{event:a,originalEvent:{...a,title:l}})},updateMutableEvents(){const t=this.utils.date;this.mutableEvents=[],this.events.forEach(e=>{const l=typeof e.start=="string"?t.stringToDate(e.start):e.start,a=t.formatDateLite(l),o=t.dateToMinutes(l);let s=null;typeof e.end=="string"&&e.end.includes("24:00")?(s=new Date(e.end.replace(" 24:00","")),s.setHours(23,59,59,0)):s=typeof e.end=="string"?t.stringToDate(e.end):e.end;let u=t.formatDateLite(s),r=t.dateToMinutes(s);(!r||r===de)&&(!this.time||typeof e.end=="string"&&e.end.length===10?s.setHours(23,59,59,0):s.setSeconds(s.getSeconds()-1),u=t.formatDateLite(s),r=de);const m=a!==u;e=Object.assign({...this.utils.event.eventDefaults},e,{_eid:`${this._.uid}_${this.eventIdIncrement++}`,segments:m?{}:null,start:l,startTimeMinutes:o,end:s,endTimeMinutes:r,daysCount:m?t.countDays(l,s):1,class:e.class}),this.mutableEvents.push(e)})},minutesAtCursor(t){return this.utils.cell.minutesAtCursor(t)},createEvent(t,e,l={}){return this.utils.event.createAnEvent(t,e,l)},cleanupEvent(t){return t={...t},["segments","deletable","deleting","titleEditable","resizable","resizing","draggable","dragging","draggingStatic","focused"].forEach(l=>{l in t&&delete t[l]}),t.repeat||delete t.repeat,t},emitWithEvent(t,e){this.$emit(t,this.cleanupEvent(e))},updateSelectedDate(t){if(t&&typeof t=="string"?t=this.utils.date.stringToDate(t):t=new Date(t),t&&t instanceof Date){const{selectedDate:e}=this.view;e&&(this.transitionDirection=e.getTime()>t.getTime()?"left":"right"),t.setHours(0,0,0,0),(!e||e.getTime()!==t.getTime())&&(this.view.selectedDate=t),this.switchView(this.view.id)}this.$emit("update:selected-date",this.view.selectedDate)},getWeekNumber(t){const e=this.utils.date,a=this.firstCellDateWeekNumber+t,o=this.startWeekOnSunday?1:0;return a>52?e.getWeek(e.addDays(this.view.firstCellDate,7*t+o)):a},timeTick(){this.now=new Date,this.timeTickerIds[1]=setTimeout(this.timeTick,60*1e3)},updateDateTexts(){this.utils.date.updateTexts(this.texts)},alignWithScrollbar(){if(document.getElementById("vuecal-align-with-scrollbar"))return;const t=this.$refs.vuecal.getElementsByClassName("vuecal__scrollbar-check")[0],e=t.offsetWidth-t.children[0].offsetWidth;if(e){const l=document.createElement("style");l.id="vuecal-align-with-scrollbar",l.type="text/css",l.innerHTML=`.vuecal--view-with-time .vuecal__weekdays-headings,.vuecal--view-with-time .vuecal__all-day {padding-right: ${e}px}`,document.head.appendChild(l)}},cellOrSplitHasEvents(t,e=null){return t.length&&(!e&&t.length||e&&t.some(l=>l.split===e.id))}},created(){this.utils.cell=new ze(this),this.utils.event=new Ie(this,this.utils.date),this.loadLocale(this.locale),this.editEvents.drag&&this.loadDragAndDrop(),this.updateMutableEvents(this.events),this.view.id=this.currentView,this.selectedDate?this.updateSelectedDate(this.selectedDate):(this.view.selectedDate=new Date,this.switchView(this.currentView)),this.time&&this.watchRealTime&&(this.timeTickerIds[0]=setTimeout(this.timeTick,(60-this.now.getSeconds())*1e3))},mounted(){const t=this.utils.date,e="ontouchstart"in window,{resize:l,drag:a,create:o,delete:s,title:u}=this.editEvents,r=this.onEventClick&&typeof this.onEventClick=="function";(l||a||o||s||u||r)&&window.addEventListener(e?"touchend":"mouseup",this.onMouseUp),(l||a||o&&this.dragToCreateEvent)&&window.addEventListener(e?"touchmove":"mousemove",this.onMouseMove,{passive:!1}),u&&window.addEventListener("keyup",this.onKeyUp),e&&(this.$refs.vuecal.oncontextmenu=function(h){h.preventDefault(),h.stopPropagation()}),this.hideBody||this.alignWithScrollbar();const m=this.view.startDate,c={view:this.view.id,startDate:m,endDate:this.view.endDate,...this.isMonthView?{firstCellDate:this.view.firstCellDate,lastCellDate:this.view.lastCellDate}:{},events:this.view.events.map(this.cleanupEvent),...this.isWeekView?{week:t.getWeek(this.startWeekOnSunday?t.addDays(m,1):m)}:{}};this.$emit("ready",c),this.ready=!0},beforeUnmount(){const t="ontouchstart"in window;window.removeEventListener(t?"touchmove":"mousemove",this.onMouseMove,{passive:!1}),window.removeEventListener(t?"touchend":"mouseup",this.onMouseUp),window.removeEventListener("keyup",this.onKeyUp),this.timeTickerIds[0]&&clearTimeout(this.timeTickerIds[0]),this.timeTickerIds[1]&&clearTimeout(this.timeTickerIds[1]),this.timeTickerIds=[null,null]},computed:{editEvents(){return this.editableEvents&&typeof this.editableEvents=="object"?{title:!!this.editableEvents.title,drag:!!this.editableEvents.drag,resize:!!this.editableEvents.resize,create:!!this.editableEvents.create,delete:!!this.editableEvents.delete}:{title:!!this.editableEvents,drag:!!this.editableEvents,resize:!!this.editableEvents,create:!!this.editableEvents,delete:!!this.editableEvents}},views(){return{years:{label:this.texts.years,enabled:!this.disableViews.includes("years")},year:{label:this.texts.year,enabled:!this.disableViews.includes("year")},month:{label:this.texts.month,enabled:!this.disableViews.includes("month")},week:{label:this.texts.week,enabled:!this.disableViews.includes("week")},day:{label:this.texts.day,enabled:!this.disableViews.includes("day")}}},currentView(){return this.validateView(this.activeView)},enabledViews(){return Object.keys(this.views).filter(t=>this.views[t].enabled)},hasTimeColumn(){return this.time&&this.isWeekOrDayView},isShortMonthView(){return this.isMonthView&&this.eventsOnMonthView==="short"},firstCellDateWeekNumber(){const t=this.utils.date,e=this.view.firstCellDate;return t.getWeek(this.startWeekOnSunday?t.addDays(e,1):e)},timeCells(){const t=[];for(let e=this.timeFrom,l=this.timeTo;e<l;e+=this.timeStep)t.push({hours:Math.floor(e/60),minutes:e%60,label:this.utils.date.formatTime(e,this.TimeFormat),value:e});return t},TimeFormat(){return this.timeFormat||(this.twelveHour?"h:mm{am}":"HH:mm")},daySplits(){return(this.splitDays.filter(t=>!t.hide)||[]).map((t,e)=>({...t,id:t.id||e+1}))},hasSplits(){return this.daySplits.length&&this.isWeekOrDayView},hasShortEvents(){return this.showAllDayEvents==="short"},cellOrSplitMinWidth(){let t=null;return this.hasSplits&&this.minSplitWidth?t=this.visibleDaysCount*this.minSplitWidth*this.daySplits.length:this.minCellWidth&&this.isWeekView&&(t=this.visibleDaysCount*this.minCellWidth),t},allDayBar(){let t=this.allDayBarHeight||null;return t&&!isNaN(t)&&(t+="px"),{cells:this.viewCells,options:this.$props,label:this.texts.allDay,shortEvents:this.hasShortEvents,daySplits:this.hasSplits&&this.daySplits||[],cellOrSplitMinWidth:this.cellOrSplitMinWidth,height:t}},minTimestamp(){let t=null;return this.minDate&&typeof this.minDate=="string"?t=this.utils.date.stringToDate(this.minDate):this.minDate&&this.minDate instanceof Date&&(t=this.minDate),t?t.getTime():null},maxTimestamp(){let t=null;return this.maxDate&&typeof this.maxDate=="string"?t=this.utils.date.stringToDate(this.maxDate):this.maxDate&&this.maxDate instanceof Date&&(t=this.maxDate),t?t.getTime():null},weekDays(){let{weekDays:t,weekDaysShort:e=[]}=this.texts;return t=t.slice(0).map((l,a)=>({label:l,...e.length?{short:e[a]}:{},hide:this.hideWeekends&&a>=5||this.hideWeekdays.length&&this.hideWeekdays.includes(a+1)})),this.startWeekOnSunday&&t.unshift(t.pop()),t},weekDaysInHeader(){return this.isMonthView||this.isWeekView&&!this.minCellWidth&&!(this.hasSplits&&this.minSplitWidth)},months(){return this.texts.months.map(t=>({label:t}))},specialDayHours(){return!this.specialHours||!Object.keys(this.specialHours).length?{}:Array(7).fill("").map((t,e)=>{let l=this.specialHours[e+1]||[];return Array.isArray(l)||(l=[l]),t=[],l.forEach(({from:a,to:o,class:s,label:u},r)=>{t[r]={day:e+1,from:[null,void 0].includes(a)?null:a*1,to:[null,void 0].includes(o)?null:o*1,class:s||"",label:u||""}}),t})},viewTitle(){const t=this.utils.date;let e="";const l=this.view.startDate,a=l.getFullYear(),o=l.getMonth();switch(this.view.id){case"years":{e=this.texts.years;break}case"year":{e=a;break}case"month":{e=`${this.months[o].label} ${a}`;break}case"week":{const s=this.view.endDate,u=l.getFullYear();let r=this.texts.months[l.getMonth()];this.xsmall&&(r=r.substring(0,3));let m=`${r} ${u}`;if(s.getMonth()!==l.getMonth()){const c=s.getFullYear();let h=this.texts.months[s.getMonth()];this.xsmall&&(h=h.substring(0,3)),u===c?m=`${r} - ${h} ${u}`:this.small?m=`${r.substring(0,3)} ${u} - ${h.substring(0,3)} ${c}`:m=`${r} ${u} - ${h} ${c}`}e=`${this.texts.week} ${t.getWeek(this.startWeekOnSunday?t.addDays(l,1):l)} (${m})`;break}case"day":{e=this.utils.date.formatDate(l,this.texts.dateFormat,this.texts);break}}return e},viewCells(){const t=this.utils.date;let e=[],l=null,a=!1;this.watchRealTime||(this.now=new Date);const o=this.now;switch(this.view.id){case"years":{l=this.view.startDate.getFullYear(),e=Array.apply(null,Array(25)).map((s,u)=>{const r=new Date(l+u,0,1),m=new Date(l+u+1,0,1);return m.setSeconds(-1),{startDate:r,formattedDate:t.formatDateLite(r),endDate:m,content:l+u,current:l+u===o.getFullYear()}});break}case"year":{l=this.view.startDate.getFullYear(),e=Array.apply(null,Array(12)).map((s,u)=>{const r=new Date(l,u,1),m=new Date(l,u+1,1);return m.setSeconds(-1),{startDate:r,formattedDate:t.formatDateLite(r),endDate:m,content:this.xsmall?this.months[u].label.substr(0,3):this.months[u].label,current:u===o.getMonth()&&l===o.getFullYear()}});break}case"month":{const s=this.view.startDate.getMonth(),u=new Date(this.view.firstCellDate);a=!1,e=Array.apply(null,Array(42)).map((r,m)=>{const c=t.addDays(u,m),h=new Date(c);h.setHours(23,59,59,0);const y=!a&&t.isToday(c)&&!a++;return{startDate:c,formattedDate:t.formatDateLite(c),endDate:h,content:c.getDate(),today:y,outOfScope:c.getMonth()!==s,class:`vuecal__cell--day${c.getDay()||7}`}}),(this.hideWeekends||this.hideWeekdays.length)&&(e=e.filter(r=>{const m=r.startDate.getDay()||7;return!(this.hideWeekends&&m>=6||this.hideWeekdays.length&&this.hideWeekdays.includes(m))}));break}case"week":{a=!1;const s=this.view.startDate,u=this.weekDays;e=u.map((r,m)=>{const c=t.addDays(s,this.startWeekOnSunday&&this.hideWeekends?m-1:m),h=new Date(c);h.setHours(23,59,59,0);const y=(c.getDay()||7)-1;return{startDate:c,formattedDate:t.formatDateLite(c),endDate:h,today:!a&&t.isToday(c)&&!a++,specialHours:this.specialDayHours[y]||[]}}).filter((r,m)=>!u[m].hide);break}case"day":{const s=this.view.startDate,u=new Date(this.view.startDate);u.setHours(23,59,59,0);const r=(s.getDay()||7)-1;e=[{startDate:s,formattedDate:t.formatDateLite(s),endDate:u,today:t.isToday(s),specialHours:this.specialDayHours[r]||[]}];break}}return e},visibleDaysCount(){return this.isDayView?1:7-this.weekDays.reduce((t,e)=>t+e.hide,0)},cellWidth(){return 100/this.visibleDaysCount},cssClasses(){const{resizeAnEvent:t,dragAnEvent:e,dragCreateAnEvent:l}=this.domEvents;return{[`vuecal--${this.view.id}-view`]:!0,[`vuecal--${this.locale}`]:this.locale,"vuecal--no-time":!this.time,"vuecal--view-with-time":this.hasTimeColumn,"vuecal--week-numbers":this.showWeekNumbers&&this.isMonthView,"vuecal--twelve-hour":this.twelveHour,"vuecal--click-to-navigate":this.clickToNavigate,"vuecal--hide-weekends":this.hideWeekends,"vuecal--split-days":this.hasSplits,"vuecal--sticky-split-labels":this.hasSplits&&this.stickySplitLabels,"vuecal--overflow-x":this.minCellWidth&&this.isWeekView||this.hasSplits&&this.minSplitWidth,"vuecal--small":this.small,"vuecal--xsmall":this.xsmall,"vuecal--resizing-event":t._eid,"vuecal--drag-creating-event":l.event,"vuecal--dragging-event":e._eid,"vuecal--events-on-month-view":this.eventsOnMonthView,"vuecal--short-events":this.isMonthView&&this.eventsOnMonthView==="short","vuecal--has-touch":typeof window<"u"&&"ontouchstart"in window}},isYearsOrYearView(){return["years","year"].includes(this.view.id)},isYearsView(){return this.view.id==="years"},isYearView(){return this.view.id==="year"},isMonthView(){return this.view.id==="month"},isWeekOrDayView(){return["week","day"].includes(this.view.id)},isWeekView(){return this.view.id==="week"},isDayView(){return this.view.id==="day"}},watch:{events:{handler(t,e){this.updateMutableEvents(t),this.addEventsToView()},deep:!0},locale(t){this.loadLocale(t)},selectedDate(t){this.updateSelectedDate(t)},activeView(t){this.switchView(t)}}},Ee=U($t,[["render",Qt]]),ei={id:{type:String,required:!1},class:{type:[String,Array,Object],required:!1},style:{type:[String,Object,Array],required:!1},visible:{type:Boolean,default:!0},disable:{type:Boolean,default:!1},selectedDate:{type:[String,Date],default:()=>new Date},events:{type:Array,default:()=>[]},weekendColor:{type:String,required:!1},weekendDays:{type:Array,required:!1,validator:t=>Array.isArray(t)&&t.every(e=>Number.isInteger(e)&&e>=0&&e<=6)},showTodayColor:{type:Boolean,default:!0},selectedColor:{type:String,required:!1},specialTime:{type:Object,required:!1},dateCellMinHeight:{type:Number,required:!1},dateCellMaxHeight:{type:Number,required:!1},disableDays:{type:Array,required:!1,default:void 0},eventsOnMonthView:{type:[String,Boolean],default:!1},hideWeekdays:{type:Array,required:!1,validator:t=>Array.isArray(t)&&t.every(e=>Number.isInteger(e)&&e>=0&&e<=6)},hideWeekends:{type:Boolean,default:!1},locale:{type:String,default:"en"},maxDate:{type:[String,Date],required:!1},minDate:{type:[String,Date],required:!1},startWeekOnSunday:{type:Boolean,default:!1},time:{type:Boolean,default:!0},timeCellHeight:{type:Number,required:!1},timeFormat:{type:String,required:!1,validator:t=>t==null||v.H_CALENDAR_TIME_FORMAT_VALUES.includes(t)},timeFrom:{type:Number,required:!1,validator:t=>t==null||Number.isFinite(t)&&t>=0&&t<=1440},timeStep:{type:Number,required:!1,validator:t=>t==null||Number.isFinite(t)&&t>0&&t<=1440},timeTo:{type:Number,required:!1,validator:t=>t==null||Number.isFinite(t)&&t>=0&&t<=1440},hideTitleBar:{type:Boolean,default:!1},twelveHour:{type:Boolean,default:!1},activeView:{type:String,required:!1,validator:t=>t==null||v.H_CALENDAR_VIEW_VALUES.includes(t)},disableViews:{type:Array,required:!1,validator:t=>t==null||Array.isArray(t)&&t.every(e=>v.H_CALENDAR_VIEW_VALUES.includes(e))}},ti=i.defineComponent({name:"HCalendar",components:{VueCal:Ee},props:ei,emits:["responsive-change","cell-click","view-change","mounted"],setup(t,{emit:e,attrs:l}){const a=t.id||v.getUUID(),o=`hcalendar:${a}`,s=i.ref(null),u=i.ref(null),r=v.useDevice(),m=i.useSlots(),c=i.computed(()=>Object.keys(m)),h=i.ref(t.visible),y=i.ref(t.disable),w=i.computed(()=>h.value?"":"hison-display-none"),T=i.computed(()=>y.value?"hison-disable-calendar":""),g=i.ref(v.hison.utils.getJSDateObject(t.selectedDate)??new Date),_=g.value,E=i.ref(t.events??[]),D=i.ref(t.weekendColor?v.normalizeToRgba(t.weekendColor):void 0),M=i.ref(t.weekendDays),C=i.ref(t.selectedColor?v.normalizeToRgba(t.selectedColor):void 0),O=i.ref(t.showTodayColor),F=i.ref(t.specialTime??{}),I=i.ref(t.dateCellMinHeight),L=i.ref(t.dateCellMaxHeight),K=i.ref(t.disableDays),G=i.ref(t.eventsOnMonthView),X=i.ref(t.hideWeekdays),J=i.ref(t.hideWeekends),Z=i.ref(t.locale),H=i.ref(y.value?"100-01-01":t.maxDate),j=i.ref(t.minDate),q=i.ref(t.startWeekOnSunday),Q=i.ref(t.time),$=i.ref(t.timeCellHeight),ee=i.ref(t.timeFormat),te=i.ref(t.timeFrom),ie=i.ref(t.timeStep),se=i.ref(t.timeTo),le=i.ref(t.hideTitleBar),ae=i.ref(t.twelveHour),he=i.ref(t.activeView),ne=i.ref(t.disableViews),W=i.ref([]),x=()=>{var n;if(W.value=v.extractResponsiveClasses(v.toClassString(t.class)||"",r.value),v.getIndexSpecificClassNameFromClassList(W.value,"col")===-1&&W.value.push("hison-col-12"),v.addComponentNameToClass(W.value,"size",v.hisonCloser.componentStyle.size),v.addComponentNameToClass(W.value,"color","primary"),(n=s.value)!=null&&n.$el){const d=s.value.$el;let f=v.getSpecificClassValueFromClassList(W.value,"color");const b=v.getSpecificClassValueFromClassList(W.value,"size");switch((!f||!v.getRGBAFromColorText(f))&&(f="primary"),d.style.setProperty("--vuecal-filled-back-color",v.hisonCloser.componentStyle.componentColor[`${f}`].buttonColor),d.style.setProperty("--vuecal-filled-font-color",v.hisonCloser.componentStyle.componentColor[`${f}`].filledTextColor),v.hisonCloser.componentStyle.invertColor?(d.style.setProperty("--vuecal-empty-back-color",v.hisonCloser.componentStyle.emptyInvertColor),d.style.setProperty("--vuecal-empty-font-color",v.hisonCloser.componentStyle.emptyTextInvertColor),d.style.setProperty("--vuecal-empty-disabled-color",v.applyOpacityToRgba(v.hisonCloser.componentStyle.emptyTextInvertColor,.3)),d.style.setProperty("--vuecal-empty-out-of-scope-font-color",v.applyOpacityToRgba(v.hisonCloser.componentStyle.emptyTextInvertColor,.5)),d.style.setProperty("--vuecal-selected-back-color",C.value?v.getInvertColor(C.value):v.applyOpacityToRgba(v.hisonCloser.componentStyle.componentColor[`${f}`].buttonColor,.5)),d.style.setProperty("--vuecal-weekend-back-color",D.value?v.getInvertColor(D.value):null),d.style.setProperty("--vuecal-today-back-color",O.value?v.applyOpacityToRgba(v.hisonCloser.componentStyle.componentColor[`${f}`].buttonColor,.3):v.hisonCloser.componentStyle.emptyInvertColor)):(d.style.setProperty("--vuecal-empty-back-color",v.hisonCloser.componentStyle.emptyColor),d.style.setProperty("--vuecal-empty-font-color",v.hisonCloser.componentStyle.emptyTextColor),d.style.setProperty("--vuecal-empty-disabled-color",v.applyOpacityToRgba(v.hisonCloser.componentStyle.emptyTextColor,.3)),d.style.setProperty("--vuecal-empty-out-of-scope-font-color",v.applyOpacityToRgba(v.hisonCloser.componentStyle.emptyTextColor,.5)),d.style.setProperty("--vuecal-selected-back-color",C.value?C.value:v.applyOpacityToRgba(v.hisonCloser.componentStyle.componentColor[`${f}`].buttonColor,.5)),d.style.setProperty("--vuecal-weekend-back-color",D.value?D.value:null),d.style.setProperty("--vuecal-today-back-color",O.value?v.applyOpacityToRgba(v.hisonCloser.componentStyle.componentColor[`${f}`].buttonColor,.3):v.hisonCloser.componentStyle.emptyColor)),b){case v.Size.xl:d.style.setProperty("--vuecal-header-font-size","0.9em"),d.style.setProperty("--vuecal-title-button-font-size","1em"),d.style.setProperty("--vuecal-body-font-size","0.9em"),d.style.setProperty("--vuecal-no-event-font-size","0.8em");break;case v.Size.l:d.style.setProperty("--vuecal-header-font-size","0.75em"),d.style.setProperty("--vuecal-title-button-font-size","1em"),d.style.setProperty("--vuecal-body-font-size","0.9em"),d.style.setProperty("--vuecal-no-event-font-size","0.8em");break;case v.Size.m:d.style.setProperty("--vuecal-header-font-size","0.7em"),d.style.setProperty("--vuecal-title-button-font-size","0.6em"),d.style.setProperty("--vuecal-body-font-size","0.8em"),d.style.setProperty("--vuecal-no-event-font-size","0.7em");break;case v.Size.s:d.style.setProperty("--vuecal-header-font-size","0.6em"),d.style.setProperty("--vuecal-title-button-font-size","0.5em"),d.style.setProperty("--vuecal-body-font-size","0.8em"),d.style.setProperty("--vuecal-no-event-font-size","0.7em");break}d.style.setProperty("--calendar-clickable-cursor",y.value?"not-allowed":null)}},Me=n=>{const d=/pm/i.test(n),f=/am/i.test(n),b=n.replace(/[^\d:]/g,"").trim();let S=0,A=0;if(b.includes(":")){const[V,Y]=b.split(":");S=parseInt(V,10),A=parseInt(Y,10)}else{const V=parseInt(b,10);V<=12&&(f||d)||V<=23?S=V:A=V}return d&&S<12&&(S+=12),f&&S===12&&(S=0),S*60+A},P=n=>{if(!s.value)return;const d=s.value.$el,f=n??v.hison.utils.getJSDateObject(g.value);if(F.value&&f){const b=f.getDay(),S=F.value[b],A=d.querySelectorAll(".vuecal__time-cell");A.length>0&&S&&Array.isArray(S)?A.forEach(V=>{const Y=V.querySelector(".vuecal__time-cell-label");if(Y){const Oe=Y.textContent,De=Me(Oe);let ve="";S.some(({from:He,to:We,className:Ae})=>{const pe=He<=De&&De<=We;return pe&&(ve=Ae??""),pe})&&V.classList.add(ve||"special_time")}}):A.forEach(V=>{V.classList.forEach(Y=>{Y!=="vuecal__time-cell"&&V.classList.remove(Y)})})}},z=n=>{if(n===v.HCalendarView.month||n===v.HCalendarView.week){const d=s.value.$el,f=M.value?M.value:q.value?[0,6]:[5,6],b=d.querySelectorAll(".vuecal__heading");b.length>0&&b.forEach((S,A)=>{f.includes(A)?S.classList.add("weekend"):S.classList.remove("weekend")})}},re=n=>{const d=s.value.$el;d.style.setProperty("--vuecal-cell-content-min_heihgt",n==="month"&&I.value?I.value+"px":null),d.style.setProperty("--vuecal-cell-content-max_heihgt",n==="month"&&L.value?L.value+"px":null),d.style.setProperty("--vuecal-cell-content-overflow",n==="month"&&L.value?"auto":null)},fe=n=>{if(!s.value)return;const d=n??s.value.view.id;D.value&&i.nextTick(()=>z(d)),re(d)},Ve=n=>{fe(n.view),n.view===v.HCalendarView.day?P(n.startDate):n.view===v.HCalendarView.week&&P(),he.value=n.view,e("view-change",n)},Be=n=>{var f;const d=n instanceof Date?n:n.date;y.value?(g.value=_,(f=s.value)==null||f.updateSelectedDate(_)):(g.value=d,e("cell-click",d))},we=()=>{v.hisonCloser.component.calendarList[a]&&v.hisonCloser.component.calendarList[a].isHisonvueComponent&&console.warn(`[Hisonvue] The calendar ID is at risk of being duplicated. ${a}`),v.registerReloadable(o,()=>{ge(),i.nextTick(we)}),s.value&&(x(),P(),fe(),u.value={isHisonvueComponent:!0,getId:()=>a,getType:()=>"calendar",isDisable:()=>y.value,setDisable:n=>{y.value=n,y.value?H.value="100-01-01":H.value=t.maxDate},isVisible:()=>h.value,setVisible:n=>{h.value=n},getSelectedDate:(n,d)=>n?g.value:v.hison.utils.getDateWithFormat(g.value,d??v.hison.getDatetimeFormat()),setSelectedDate:n=>{const d=v.hison.utils.getJSDateObject(n);d&&(g.value=d)},getEvents:()=>E.value,setEvents:n=>{E.value=n},getSpecialTime:()=>F.value,setSpecialTime:n=>{F.value=n},getWeekendColor:()=>D.value,setWeekendColor:n=>{if(D.value=v.normalizeToRgba(n),!s.value)return;const d=s.value.$el;d&&(v.hisonCloser.componentStyle.invertColor?d.style.setProperty("--vuecal-weekend-back-color",D.value?v.getInvertColor(D.value):null):d.style.setProperty("--vuecal-weekend-back-color",D.value?D.value:null),z(s.value.view.id))},getWeekendDays:()=>M.value,setWeekendDays:n=>{M.value=n,z(s.value.view.id)},isShowTodayColor:()=>O.value,setShowTodayColor:n=>{if(O.value=n,!s.value)return;const d=s.value.$el;if(!d)return;let f=v.getSpecificClassValueFromClassList(W.value,"color");(!f||!v.getRGBAFromColorText(f))&&(f="primary"),v.hisonCloser.componentStyle.invertColor?d.style.setProperty("--vuecal-today-back-color",O.value?v.applyOpacityToRgba(v.hisonCloser.componentStyle.componentColor[`${f}`].buttonColor,.3):v.hisonCloser.componentStyle.emptyInvertColor):d.style.setProperty("--vuecal-today-back-color",O.value?v.applyOpacityToRgba(v.hisonCloser.componentStyle.componentColor[`${f}`].buttonColor,.3):v.hisonCloser.componentStyle.emptyColor)},getSelectedColor:()=>C.value,setSelectedColor:n=>{if(C.value=v.normalizeToRgba(n),!s.value)return;const d=s.value.$el;if(!d)return;let f=v.getSpecificClassValueFromClassList(W.value,"color");v.hisonCloser.componentStyle.invertColor?d.style.setProperty("--vuecal-selected-back-color",C.value?v.getInvertColor(C.value):v.applyOpacityToRgba(v.hisonCloser.componentStyle.componentColor[`${f}`].buttonColor,.5)):d.style.setProperty("--vuecal-selected-back-color",C.value?C.value:v.applyOpacityToRgba(v.hisonCloser.componentStyle.componentColor[`${f}`].buttonColor,.5))},getDateCellMinHeight:()=>I.value,setDateCellMinHeight:n=>{I.value=n,re(s.value.view.id)},getDateCellMaxHeight:()=>L.value,setDateCellMaxHeight:n=>{L.value=n,re(s.value.view.id)},getDisableDays:()=>K.value,setDisableDays:n=>{K.value=n},getEventsOnMonthView:()=>G.value,setEventsOnMonthView:n=>{G.value=n},getHideWeekdays:()=>X.value,setHideWeekdays:n=>{X.value=n},getHideWeekends:()=>J.value,setHideWeekends:n=>{J.value=n},getLocale:()=>Z.value,setLocale:n=>{Z.value=n},getMaxDate:n=>{if(H.value)return n?y.value?new Date(100,0,1):v.hison.utils.getJSDateObject(H.value):y.value?"100-01-01":v.hison.utils.getDateWithFormat(H.value,v.hison.getDateFormat())},setMaxDate:n=>{H.value=n},getMinDate:n=>{if(j.value)return n?v.hison.utils.getJSDateObject(j.value):v.hison.utils.getDateWithFormat(j.value,v.hison.getDateFormat())},setMinDate:n=>{j.value=n},isStartWeekOnSunday:()=>q.value,setStartWeekOnSunday:n=>{q.value=n,z(s.value.view.id)},isShowTimeCell:()=>Q.value,setShowTimeCell:n=>{Q.value=n},getTimeCellHeight:()=>$.value,setTimeCellHeight:n=>{$.value=n},getTimeFormat:()=>ee.value,setTimeFormat:n=>{ee.value=n},getTimeFrom:()=>te.value,setTimeFrom:n=>{te.value=n},getTimeStep:()=>ie.value,setTimeStep:n=>{ie.value=n},getTimeTo:()=>se.value,setTimeTo:n=>{se.value=n},isHideTitleBar:()=>le.value,setHideTitleBar:n=>{le.value=n},isTwelveHour:()=>ae.value,setTwelveHour:n=>{ae.value=n},getActiveView:()=>s.value.view.id,setActiveView:n=>{s.value.switchView(n)},getDisableViews:()=>ne.value,setDisableViews:n=>{if(ne.value=n,n.includes(s.value.view.id)){const d=["years","year","month","week","day"].filter(f=>!n.includes(f));s.value.switchView(d[0])}},reload:()=>v.reloadHisonComponent(o)},v.hisonCloser.component.calendarList[a]=u.value,e("mounted",u.value))},ge=()=>{v.unregisterReloadable(o),delete v.hisonCloser.component.calendarList[a]};return i.onMounted(we),i.onBeforeUnmount(ge),i.watch(r,n=>{x(),e("responsive-change",n)}),i.watch(()=>g.value,()=>{P()}),i.watch(()=>t.selectedDate,n=>{g.value=v.hison.utils.getJSDateObject(n)??new Date,P()}),i.watch(()=>t.events,n=>{E.value=n}),i.watch(()=>t.visible,n=>{n!==h.value&&(h.value=!!n)}),i.watch(()=>t.disable,n=>{const d=!!n;d!==y.value&&(y.value=d,H.value=d?"100-01-01":t.maxDate,x())}),i.watch(()=>g.value,()=>P()),i.watch(()=>t.selectedDate,n=>{const d=v.hison.utils.getJSDateObject(n)??new Date;+d!=+g.value&&(g.value=d,P())}),i.watch(()=>t.events,n=>{n!==E.value&&(E.value=n??[])}),i.watch(()=>t.weekendColor,n=>{var f,b;const d=n?v.normalizeToRgba(n):void 0;d!==D.value&&(D.value=d,x(),(b=(f=s.value)==null?void 0:f.view)!=null&&b.id&&z(s.value.view.id))}),i.watch(()=>t.weekendDays,n=>{var d,f;n&&n!==M.value&&(M.value=n,(f=(d=s.value)==null?void 0:d.view)!=null&&f.id&&z(s.value.view.id))}),i.watch(()=>t.selectedColor,n=>{const d=n?v.normalizeToRgba(n):void 0;d!==C.value&&(C.value=d,x())}),i.watch(()=>t.showTodayColor,n=>{const d=!!n;d!==O.value&&(O.value=d,x())}),i.watch(()=>t.specialTime,n=>{n!==F.value&&(F.value=n??{},P())}),i.watch(()=>t.dateCellMinHeight,n=>{var d,f;n!==I.value&&(I.value=n,re(((f=(d=s.value)==null?void 0:d.view)==null?void 0:f.id)||v.HCalendarView.month))}),i.watch(()=>t.dateCellMaxHeight,n=>{var d,f;n!==L.value&&(L.value=n,re(((f=(d=s.value)==null?void 0:d.view)==null?void 0:f.id)||v.HCalendarView.month))}),i.watch(()=>t.disableDays,n=>{n!==K.value&&(K.value=n)}),i.watch(()=>t.eventsOnMonthView,n=>{n!==G.value&&(G.value=n)}),i.watch(()=>t.hideWeekdays,n=>{n!==X.value&&(X.value=n)}),i.watch(()=>t.hideWeekends,n=>{const d=!!n;d!==J.value&&(J.value=d)}),i.watch(()=>t.locale,n=>{n&&n!==Z.value&&(Z.value=n)}),i.watch(()=>t.maxDate,n=>{!y.value&&n!==H.value&&(H.value=n)}),i.watch(()=>t.minDate,n=>{n!==j.value&&(j.value=n)}),i.watch(()=>t.startWeekOnSunday,n=>{var f,b;const d=!!n;d!==q.value&&(q.value=d,(b=(f=s.value)==null?void 0:f.view)!=null&&b.id&&z(s.value.view.id))}),i.watch(()=>t.time,n=>{const d=!!n;d!==Q.value&&(Q.value=d)}),i.watch(()=>t.timeCellHeight,n=>{n!==$.value&&($.value=n)}),i.watch(()=>t.timeFormat,n=>{n&&n!==ee.value&&(ee.value=n)}),i.watch(()=>t.timeFrom,n=>{const d=Number(n);(n==null||Number.isFinite(d)&&d>=0&&d<=1440)&&n!==te.value&&(te.value=n)}),i.watch(()=>t.timeStep,n=>{const d=Number(n);(n==null||Number.isFinite(d)&&d>0&&d<=1440)&&n!==ie.value&&(ie.value=n)}),i.watch(()=>t.timeTo,n=>{const d=Number(n);(n==null||Number.isFinite(d)&&d>=0&&d<=1440)&&n!==se.value&&(se.value=n)}),i.watch(()=>t.hideTitleBar,n=>{const d=!!n;d!==le.value&&(le.value=d)}),i.watch(()=>t.twelveHour,n=>{const d=!!n;d!==ae.value&&(ae.value=d)}),i.watch(()=>t.activeView,n=>{var d,f,b;n&&n!==((f=(d=s.value)==null?void 0:d.view)==null?void 0:f.id)&&(he.value=n,(b=s.value)==null||b.switchView(n))}),i.watch(()=>t.disableViews,n=>{if(n!==ne.value&&(ne.value=n,s.value&&Array.isArray(n)&&n.includes(s.value.view.id))){const d=["years","year","month","week","day"].find(f=>!n.includes(f));d&&s.value.switchView(d)}}),i.watch(()=>t.class,()=>x()),{VueCal:Ee,attrs:l,props:t,calendarRef:s,visibleClass:w,disableClass:T,responsiveClassList:W,slotNames:c,selectedDate:g,events:E,disableDays:K,eventsOnMonthView:G,hideWeekdays:X,hideWeekends:J,locale:Z,maxDate:H,minDate:j,startWeekOnSunday:q,time:Q,timeCellHeight:$,timeFormat:ee,timeFrom:te,timeStep:ie,timeTo:se,hideTitleBar:le,twelveHour:ae,activeView:he,disableViews:ne,onViewChange:Ve,onCellClick:Be}}});function ii(t,e,l,a,o,s){return i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(["hison-calendar","hison-wrapper",...t.responsiveClassList,t.visibleClass,t.disableClass]),style:i.normalizeStyle(t.props.style)},[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(t.VueCal),i.mergeProps({ref:"calendarRef"},t.attrs,{"selected-date":t.selectedDate,events:t.events,"dblclick-to-create":!1,"editable-events":!1,"disable-days":t.disableDays,"events-on-month-view":t.eventsOnMonthView,"hide-weekdays":t.hideWeekdays,"hide-weekends":t.hideWeekends,locale:t.locale,"max-date":t.maxDate,"min-date":t.minDate,"start-week-on-sunday":t.startWeekOnSunday,time:t.time,"time-cell-height":t.timeCellHeight,"time-format":t.timeFormat,"time-from":t.timeFrom,"time-step":t.timeStep,"time-to":t.timeTo,"hide-title-bar":t.hideTitleBar,"twelve-hour":t.twelveHour,"active-view":t.activeView,"disable-views":t.disableViews,onViewChange:t.onViewChange,onCellClick:t.onCellClick}),i.createSlots({_:2},[i.renderList(t.slotNames,u=>({name:u,fn:i.withCtx(r=>[i.renderSlot(t.$slots,u,i.normalizeProps(i.guardReactiveProps(r)),void 0,!0)])}))]),1040,["selected-date","events","disable-days","events-on-month-view","hide-weekdays","hide-weekends","locale","max-date","min-date","start-week-on-sunday","time","time-cell-height","time-format","time-from","time-step","time-to","hide-title-bar","twelve-hour","active-view","disable-views","onViewChange","onCellClick"]))],6)}const si=Ne._export_sfc(ti,[["render",ii],["__scopeId","data-v-4c9eb363"]]);exports.default=si;
|