UNPKG

buefy

Version:

Lightweight UI components for Vue.js (v3) based on Bulma

3 lines (2 loc) 47 kB
/*! Buefy v3.0.1 | MIT License | github.com/buefy/buefy */ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("vue")):"function"==typeof define&&define.amd?define(["exports","vue"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).Timepicker={},e.Vue)}(this,(function(e,t){"use strict";let i,s="mdi",n=null,o="on",l=!0,a=!0,r=!0,d=!0,c=!0,u=!0,h=null,m=!0,p=!0;var f=Object.getOwnPropertySymbols,g=Object.prototype.hasOwnProperty,y=Object.prototype.propertyIsEnumerable,b=t.defineComponent({inheritAttrs:!1,props:{compatFallthrough:{type:Boolean,default:()=>d}},computed:{rootAttrs(){return this.compatFallthrough?{class:this.$attrs.class,style:this.$attrs.style,id:this.$attrs.id}:{}},fallthroughAttrs(){if(this.compatFallthrough){const e=this.$attrs,{style:t,class:i,id:s}=e;return((e,t)=>{var i={};for(var s in e)g.call(e,s)&&t.indexOf(s)<0&&(i[s]=e[s]);if(null!=e&&f)for(var s of f(e))t.indexOf(s)<0&&y.call(e,s)&&(i[s]=e[s]);return i})(e,["style","class","id"])}return this.$attrs}}});const v={Android:function(){return"undefined"!=typeof window&&window.navigator.userAgent.match(/Android/i)},BlackBerry:function(){return"undefined"!=typeof window&&window.navigator.userAgent.match(/BlackBerry/i)},iOS:function(){return"undefined"!=typeof window&&(window.navigator.userAgent.match(/iPhone|iPad|iPod/i)||"MacIntel"===window.navigator.platform&&window.navigator.maxTouchPoints>1)},Opera:function(){return"undefined"!=typeof window&&window.navigator.userAgent.match(/Opera Mini/i)},Windows:function(){return"undefined"!=typeof window&&window.navigator.userAgent.match(/IEMobile/i)},any:function(){return v.Android()||v.BlackBerry()||v.iOS()||v.Opera()||v.Windows()}};var k=t.defineComponent({name:"BFieldBody",inject:{parent:{from:"BField",default:null}},props:{message:{type:[String,Array]},type:{type:[String,Object]}},render(){let e=!0,i="function"==typeof this.$slots.default?this.$slots.default():this.$slots.default;return null!=i&&1===i.length&&i[0].type===t.Fragment&&(i=i[0].children),t.h("div",{class:"field-body"},{default:()=>null!=i&&i.map((i=>{if(i.type===t.Comment||i.type===t.Text)return i;let s;e&&(s=this.message,e=!1);const n=this.parent;return t.h(n?n.$.type:t.resolveComponent("b-field"),{type:this.type,message:s},(()=>i))}))})}});const S=t.defineComponent({name:"BField",components:{BFieldBody:k},provide(){return{BField:this}},inject:{parent:{from:"BField",default:!1}},props:{type:{type:[String,Object],default:void 0},label:String,labelFor:String,message:{type:[String,Array,Object],default:void 0},grouped:Boolean,groupMultiline:Boolean,position:String,expanded:Boolean,horizontal:Boolean,addons:{type:Boolean,default:!0},customClass:String,labelPosition:{type:String,default:()=>h}},data(){return{newType:this.type,newMessage:this.message,fieldLabelSize:null,numberInputClasses:[],_isField:!0}},computed:{rootClasses(){return[{"is-expanded":this.expanded,"is-horizontal":this.horizontal,"is-floating-in-label":this.hasLabel&&!this.horizontal&&"inside"===this.labelPosition,"is-floating-label":this.hasLabel&&!this.horizontal&&"on-border"===this.labelPosition},this.numberInputClasses]},innerFieldClasses(){return[this.fieldType(),this.newPosition,{"is-grouped-multiline":this.groupMultiline}]},hasInnerField(){return this.grouped||this.groupMultiline||this.hasAddons()},newPosition(){if(void 0===this.position)return;const e=this.position.split("-");if(e.length<1)return;const t=this.grouped?"is-grouped-":"has-addons-";return this.position?t+e[1]:void 0},formattedMessage(){const e=this.parent;if(e&&e.hasInnerField)return"";if("string"==typeof this.newMessage)return[this.newMessage];const t=[];if(Array.isArray(this.newMessage))this.newMessage.forEach((e=>{if("string"==typeof e)t.push(e);else for(const i in e)e[i]&&t.push(i)}));else for(const e in this.newMessage)this.newMessage[e]&&t.push(e);return t.filter((e=>!!e))},hasLabel(){return this.label||this.$slots.label},hasMessage(){const e=this.parent;return(!e||!e.hasInnerField)&&this.newMessage||this.$slots.message}},watch:{type(e){this.newType=e},message(e){JSON.stringify(e)!==JSON.stringify(this.newMessage)&&(this.newMessage=e)},newMessage(e){const t=this.parent;t&&t.hasInnerField&&(t.type||(t.newType=this.newType),t.message||(t.newMessage=e))}},methods:{fieldType(){return this.grouped?"is-grouped":this.hasAddons()?"has-addons":void 0},hasAddons(){let e=0;return this.$slots.default&&(e=this.$slots.default().reduce(((e,i)=>{return(s=i).type!==t.Comment&&s.type!==t.Text&&s.type!==t.Static?e+1:e;var s}),0)),e>1&&this.addons&&!this.horizontal},wrapNumberinput({controlsPosition:e,size:t}){const i=["has-numberinput"];e&&i.push(`has-numberinput-${e}`),t&&i.push(`has-numberinput-${t}`),this.numberInputClasses=i}},mounted(){if(this.horizontal){this.$el.querySelectorAll(".input, .select, .button, .textarea, .b-slider").length>0&&(this.fieldLabelSize="is-normal")}}});var w=(e,t)=>{const i=e.__vccOpts||e;for(const[e,s]of t)i[e]=s;return i};const B=["for"],C=["for"],T={key:3,class:"field-body"};var V=w(S,[["render",function(e,i,s,n,o,l){const a=t.resolveComponent("b-field-body"),r=t.resolveComponent("b-field");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["field",e.rootClasses])},[e.horizontal?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["field-label",[e.customClass,e.fieldLabelSize]])},[e.hasLabel?(t.openBlock(),t.createElementBlock("label",{key:0,for:e.labelFor,class:t.normalizeClass([e.customClass,"label"])},[e.$slots.label?t.renderSlot(e.$slots,"label",{key:0}):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode(t.toDisplayString(e.label),1)],64))],10,B)):t.createCommentVNode("v-if",!0)],2)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[e.hasLabel?(t.openBlock(),t.createElementBlock("label",{key:0,for:e.labelFor,class:t.normalizeClass([e.customClass,"label"])},[e.$slots.label?t.renderSlot(e.$slots,"label",{key:0}):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode(t.toDisplayString(e.label),1)],64))],10,C)):t.createCommentVNode("v-if",!0)],64)),e.horizontal?(t.openBlock(),t.createBlock(a,{key:2,message:e.newMessage?e.formattedMessage:"",type:e.newType},{default:t.withCtx((()=>[t.renderSlot(e.$slots,"default")])),_:3},8,["message","type"])):e.hasInnerField?(t.openBlock(),t.createElementBlock("div",T,[t.createVNode(r,{addons:!1,type:e.type,class:t.normalizeClass(e.innerFieldClasses)},{default:t.withCtx((()=>[t.renderSlot(e.$slots,"default")])),_:3},8,["type","class"])])):t.renderSlot(e.$slots,"default",{key:4}),e.hasMessage&&!e.horizontal?(t.openBlock(),t.createElementBlock("p",{key:5,class:t.normalizeClass(["help",e.newType])},[e.$slots.message?t.renderSlot(e.$slots,"message",{key:0,messages:e.formattedMessage}):(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:1},t.renderList(e.formattedMessage,((i,s)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createTextVNode(t.toDisplayString(i)+" ",1),s+1<e.formattedMessage.length?(t.openBlock(),t.createElementBlock("br",{key:s})):t.createCommentVNode("v-if",!0)],64)))),256))],2)):t.createCommentVNode("v-if",!0)],2)}]]);const x=t.defineComponent({props:{size:String,expanded:Boolean,loading:Boolean,rounded:Boolean,icon:String,iconPack:String,maxlength:[Number,String],useHtml5Validation:{type:Boolean,default:()=>c},validationMessage:String,locale:{type:[String,Array],default:()=>i},statusIcon:{type:Boolean,default:()=>p}},emits:{blur:e=>!0,focus:e=>!0},data(){return{isValid:!0,isFocused:!1,newIconPack:this.iconPack||s,_elementRef:""}},computed:{parentField(){let e=this.$parent;for(let t=0;t<3;t++)e&&!e.$data._isField&&(e=e.$parent);return e},statusType(){const{newType:e}=this.parentField||{};if(e){if("string"==typeof e)return e;for(const t in e)if(e[t])return t}},statusMessage(){if(this.parentField)return this.parentField.newMessage||this.parentField.$slots.message},iconSize(){switch(this.size){case"is-small":return this.size;case"is-medium":return;case"is-large":return"mdi"===this.newIconPack?"is-medium":""}}},methods:{focus(){const e=this.getElement();void 0!==e&&this.$nextTick((()=>{e&&e.focus()}))},onBlur(e){this.isFocused=!1,this.$emit("blur",e),this.checkHtml5Validity()},onFocus(e){this.isFocused=!0,this.$emit("focus",e)},getElement(){let e=this.$refs[this.$data._elementRef];for(;null!=e&&"object"==typeof e&&"$refs"in e;){const t=e;e=t.$refs[t.$data._elementRef]}return e},setInvalid(){const e=this.validationMessage||this.getElement().validationMessage;this.setValidity("is-danger",e)},setValidity(e,t){this.$nextTick((()=>{this.parentField&&(this.parentField.type||(this.parentField.newType=e),this.parentField.message||(this.parentField.newMessage=t))}))},checkHtml5Validity(){if(!this.useHtml5Validation)return!1;const e=this.getElement();return null!=e&&(e.checkValidity()?(this.setValidity(null,null),this.isValid=!0):(this.setInvalid(),this.isValid=!1),this.isValid)}}}),M=(e,t=!1)=>e?t?e.querySelectorAll('*[tabindex="-1"]'):e.querySelectorAll('a[href]:not([tabindex="-1"]),\n area[href],\n input:not([disabled]),\n select:not([disabled]),\n textarea:not([disabled]),\n button:not([disabled]),\n iframe,\n object,\n embed,\n *[tabindex]:not([tabindex="-1"]),\n *[contenteditable]'):null;let F;const $={beforeMount:(e,{value:t=!0})=>{if(t){let t=M(e),i=M(e,!0);t&&t.length>0&&(F=s=>{t=M(e),i=M(e,!0);const n=t[0],o=t[t.length-1];s.target===n&&s.shiftKey&&"Tab"===s.key?(s.preventDefault(),o.focus()):(s.target===o||Array.from(i).indexOf(s.target)>=0)&&!s.shiftKey&&"Tab"===s.key&&(s.preventDefault(),n.focus())},e.addEventListener("keydown",F))}},unmounted:e=>{e.removeEventListener("keydown",F)}},I=["escape","outside"],E=Symbol("bdropdown");var O=t.defineComponent({name:"BDropdown",directives:{trapFocus:$},provide(){return{[E]:this}},props:{modelValue:{type:[String,Number,Boolean,Object,Array,Function],default:null},disabled:Boolean,inline:Boolean,scrollable:Boolean,maxHeight:{type:[String,Number],default:200},position:{type:String,validator:e=>["is-top-right","is-top-left","is-bottom-left","is-bottom-right"].indexOf(e)>-1},triggers:{type:Array,default:()=>["click"]},mobileModal:{type:Boolean,default:()=>u},ariaRole:{type:String,validator:e=>["menu","list","dialog"].indexOf(e)>-1,default:null},animation:{type:String,default:"fade"},multiple:Boolean,trapFocus:{type:Boolean,default:()=>m},closeOnClick:{type:Boolean,default:!0},canClose:{type:[Array,Boolean],default:!0},expanded:Boolean,appendToBody:Boolean,appendToBodyCopyParent:Boolean,triggerTabindex:{type:Number,default:0}},emits:{"active-change":e=>!0,change:e=>!0,"update:modelValue":e=>!0},data(){return{selected:this.modelValue,style:{},isActive:!1,isHoverable:!1,maybeTap:!1,isTouchEnabled:!1,_bodyEl:void 0,timeOutID:void 0,timeOutID2:void 0}},computed:{rootClasses(){return[this.position,{"is-disabled":this.disabled,"is-hoverable":this.hoverable,"is-inline":this.inline,"is-active":this.isActive||this.inline,"is-mobile-modal":this.isMobileModal,"is-expanded":this.expanded,"is-touch-enabled":this.isTouchEnabled}]},isMobileModal(){return this.mobileModal&&!this.inline},cancelOptions(){return"boolean"==typeof this.canClose?this.canClose?I:[]:this.canClose},contentStyle(){var e,t;return{maxHeight:this.scrollable&&null!=(t=this.maxHeight,e=void 0===t?null:isNaN(+t)?`${t}`:t+"px")?e:void 0,overflow:this.scrollable?"auto":void 0}},hoverable(){return this.triggers.indexOf("hover")>=0}},watch:{modelValue(e){this.selected=e},isActive(e){this.$emit("active-change",e),e||(this.timeOutID=setTimeout((()=>{this.isActive||(this.isTouchEnabled=!1)}),250)),this.handleScroll(),this.appendToBody&&this.$nextTick((()=>{this.updateAppendToBody()}))},isHoverable(e){this.hoverable&&this.$emit("active-change",e)}},methods:{handleScroll(){"undefined"!=typeof window&&this.isMobileModal&&(this.isActive?document.documentElement.classList.add("is-clipped-touch"):document.documentElement.classList.remove("is-clipped-touch"))},selectItem(e){if(this.multiple){if(this.selected){const t=this.selected;-1===t.indexOf(e)?this.selected=[...t,e]:this.selected=t.filter((t=>t!==e))}else this.selected=[e];this.$emit("change",this.selected)}else this.selected!==e&&(this.selected=e,this.$emit("change",this.selected));this.$emit("update:modelValue",this.selected),this.multiple||(this.isActive=!this.closeOnClick,this.hoverable&&this.closeOnClick&&(this.isHoverable=!1))},isInWhiteList(e){if(e===this.$refs.dropdownMenu)return!0;if(e===this.$refs.trigger)return!0;if(null!=this.$refs.dropdownMenu){const t=this.$refs.dropdownMenu.querySelectorAll("*");for(const i of t)if(e===i)return!0}if(null!=this.$refs.trigger){const t=this.$refs.trigger.querySelectorAll("*");for(const i of t)if(e===i)return!0}return!1},clickedOutside(e){if(this.cancelOptions.indexOf("outside")<0)return;if(this.inline)return;const t=null!=(i=this).$root&&"shadowRoot"in i.$root.$options?e.composedPath()[0]:e.target;var i;this.isInWhiteList(t)||(this.isActive=!1)},keyPress({key:e}){if(this.isActive&&("Escape"===e||"Esc"===e)){if(this.cancelOptions.indexOf("escape")<0)return;this.isActive=!1}},onClick(){-1===this.triggers.indexOf("hover")&&(this.triggers.indexOf("click")<0||this.toggle())},onContextMenu(){this.triggers.indexOf("contextmenu")<0||this.toggle()},onHover(){this.triggers.indexOf("hover")<0||this.isTouchEnabled||(this.isHoverable=!0)},onTouchStart(){this.maybeTap=!0},onTouchMove(){this.maybeTap=!1},onTouchEnd(e){-1!==this.triggers.indexOf("hover")&&this.maybeTap&&(e.preventDefault(),this.maybeTap=!1,this.isTouchEnabled=!0,this.toggle())},onFocus(){this.triggers.indexOf("focus")<0||this.toggle()},toggle(){this.disabled||(this.isActive?this.isActive=!this.isActive:this.timeOutID2=setTimeout((()=>{const e=!this.isActive;this.isActive=e})))},updateAppendToBody(){const e=this.$refs.dropdown,t=this.$refs.dropdownMenu,i=this.$refs.trigger;if(t&&i){const s=this.$data._bodyEl.children[0];if(s.classList.forEach((e=>s.classList.remove(e))),s.classList.add("dropdown"),s.classList.add("dropdown-menu-animation"),this.rootClasses.forEach((e=>{if(e&&"object"==typeof e)for(const t in e)e[t]&&s.classList.add(t)})),this.appendToBodyCopyParent){const e=this.$refs.dropdown.parentNode,t=this.$data._bodyEl;t.classList.forEach((e=>t.classList.remove(e))),e.classList.forEach((e=>{t.classList.add(e)}))}const n=i.getBoundingClientRect();let o=n.top+window.scrollY,l=n.left+window.scrollX;!this.position||this.position.indexOf("bottom")>=0?o+=i.clientHeight:o-=t.clientHeight,this.position&&this.position.indexOf("left")>=0&&(l-=t.clientWidth-i.clientWidth),this.style={position:"absolute",top:`${o}px`,left:`${l}px`,zIndex:"99",width:this.expanded?`${e.offsetWidth}px`:void 0}}}},mounted(){this.appendToBody&&(this.$data._bodyEl=function(e){const t=document.createElement("div");t.style.position="absolute",t.style.left="0px",t.style.top="0px",t.style.width="100%";const i=document.createElement("div");return t.appendChild(i),i.appendChild(e),document.body.appendChild(t),t}(this.$refs.dropdownMenu),this.updateAppendToBody())},created(){"undefined"!=typeof window&&(document.addEventListener("click",this.clickedOutside),document.addEventListener("keyup",this.keyPress))},beforeUnmount(){var e;"undefined"!=typeof window&&(document.removeEventListener("click",this.clickedOutside),document.removeEventListener("keyup",this.keyPress)),this.appendToBody&&(void 0!==(e=this.$data._bodyEl).remove?e.remove():void 0!==e.parentNode&&null!==e.parentNode&&e.parentNode.removeChild(e)),clearTimeout(this.timeOutID),clearTimeout(this.timeOutID2)}});const P=["tabindex"],z=["aria-hidden"],N=["aria-hidden"],A=["role","aria-modal"];var H=w(O,[["render",function(e,i,s,n,o,l){const a=t.resolveDirective("trap-focus");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["dropdown dropdown-menu-animation",e.rootClasses]),ref:"dropdown",onMouseleave:i[7]||(i[7]=t=>e.isHoverable=!1)},[e.inline?t.createCommentVNode("v-if",!0):(t.openBlock(),t.createElementBlock("div",{key:0,tabindex:e.disabled?void 0:e.triggerTabindex,ref:"trigger",class:"dropdown-trigger",onClick:i[0]||(i[0]=(...t)=>e.onClick&&e.onClick(...t)),onContextmenu:i[1]||(i[1]=t.withModifiers(((...t)=>e.onContextMenu&&e.onContextMenu(...t)),["prevent"])),onMouseenter:i[2]||(i[2]=(...t)=>e.onHover&&e.onHover(...t)),onFocusCapture:i[3]||(i[3]=(...t)=>e.onFocus&&e.onFocus(...t)),onTouchstart:i[4]||(i[4]=(...t)=>e.onTouchStart&&e.onTouchStart(...t)),onTouchmove:i[5]||(i[5]=(...t)=>e.onTouchMove&&e.onTouchMove(...t)),onTouchend:i[6]||(i[6]=(...t)=>e.onTouchEnd&&e.onTouchEnd(...t)),"aria-haspopup":"true"},[t.renderSlot(e.$slots,"trigger",{active:e.isActive})],40,P)),t.createVNode(t.Transition,{name:e.animation},{default:t.withCtx((()=>[e.isMobileModal?t.withDirectives((t.openBlock(),t.createElementBlock("div",{key:0,class:"background","aria-hidden":!e.isActive},null,8,z)),[[t.vShow,e.isActive]]):t.createCommentVNode("v-if",!0)])),_:1},8,["name"]),t.createVNode(t.Transition,{name:e.animation,persisted:""},{default:t.withCtx((()=>[t.withDirectives((t.openBlock(),t.createElementBlock("div",{ref:"dropdownMenu",class:"dropdown-menu",style:t.normalizeStyle(e.style),"aria-hidden":!e.isActive},[t.createElementVNode("div",{class:"dropdown-content",role:e.ariaRole,"aria-modal":!e.inline,style:t.normalizeStyle(e.contentStyle)},[t.renderSlot(e.$slots,"default")],12,A)],12,N)),[[t.vShow,!e.disabled&&(e.isActive||e.isHoverable)||e.inline],[a,e.trapFocus]])])),_:3},8,["name"])],34)}]]),D=t.defineComponent({name:"BDropdownItem",inject:{parent:{from:E,default:void 0}},props:{value:{type:[String,Number,Boolean,Object,Array,Function],default:null},separator:Boolean,disabled:Boolean,custom:Boolean,focusable:{type:Boolean,default:!0},paddingless:Boolean,hasLink:Boolean,ariaRole:{type:String,default:""}},emits:{click:()=>!0},computed:{anchorClasses(){return{"is-disabled":this.parent.disabled||this.disabled,"is-paddingless":this.paddingless,"is-active":this.isActive}},itemClasses(){return{"dropdown-item":!this.hasLink,"is-disabled":this.disabled,"is-paddingless":this.paddingless,"is-active":this.isActive,"has-link":this.hasLink}},ariaRoleItem(){return"menuitem"===this.ariaRole||"listitem"===this.ariaRole?this.ariaRole:void 0},isClickable(){return!(this.parent.disabled||this.separator||this.disabled||this.custom)},isActive(){return null!==this.parent.selected&&(this.parent.multiple?this.parent.selected.indexOf(this.value)>=0:this.value===this.parent.selected)},isFocusable(){return!this.hasLink&&this.focusable}},methods:{selectItem(){this.isClickable&&(this.parent.selectItem(this.value),this.$emit("click"))}}});const L={key:0,class:"dropdown-divider"},R=["role","tabindex"],_=["role","tabindex"];var U=w(D,[["render",function(e,i,s,n,o,l){return e.separator?(t.openBlock(),t.createElementBlock("hr",L)):e.custom||e.hasLink?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(e.itemClasses),onClick:i[1]||(i[1]=(...t)=>e.selectItem&&e.selectItem(...t)),role:e.ariaRoleItem,tabindex:e.isFocusable?0:void 0},[t.renderSlot(e.$slots,"default")],10,_)):(t.openBlock(),t.createElementBlock("a",{key:1,class:t.normalizeClass(["dropdown-item",e.anchorClasses]),onClick:i[0]||(i[0]=(...t)=>e.selectItem&&e.selectItem(...t)),role:e.ariaRoleItem,tabindex:e.isFocusable?0:void 0},[t.renderSlot(e.$slots,"default")],10,R))}]]);const j={sizes:{default:"mdi-24px","is-small":null,"is-medium":"mdi-36px","is-large":"mdi-48px"},iconPrefix:"mdi-"},q=()=>{const e="fa-";return{sizes:{default:null,"is-small":null,"is-medium":e+"lg","is-large":e+"2x"},iconPrefix:e,internalIcons:{information:"info-circle",alert:"exclamation-triangle","alert-circle":"exclamation-circle","chevron-right":"angle-right","chevron-left":"angle-left","chevron-down":"angle-down","eye-off":"eye-slash","menu-down":"caret-down","menu-up":"caret-up","close-circle":"times-circle"}}};var W=w(t.defineComponent({name:"BIcon",props:{type:[String,Object],component:String,pack:String,icon:{type:String,required:!0},size:String,customSize:String,customClass:String,both:Boolean},computed:{iconConfig(){return{mdi:j,fa:q(),fas:q(),far:q(),fad:q(),fab:q(),fal:q(),"fa-solid":q(),"fa-regular":q(),"fa-light":q(),"fa-thin":q(),"fa-duotone":q(),"fa-brands":q()}[this.newPack]},iconPrefix(){return this.iconConfig&&this.iconConfig.iconPrefix?this.iconConfig.iconPrefix:""},newIcon(){return`${this.iconPrefix}${this.getEquivalentIconOf(this.icon)}`},newPack(){return this.pack||s},newType(){if(!this.type)return;let e=[];if("string"==typeof this.type)e=this.type.split("-");else for(const t in this.type)if(this.type[t]){e=t.split("-");break}if(e.length<=1)return;const[,...t]=e;return`has-text-${t.join("-")}`},newCustomSize(){return this.customSize||this.customSizeByPack},customSizeByPack(){if(this.iconConfig&&this.iconConfig.sizes){if(this.size&&void 0!==this.iconConfig.sizes[this.size])return this.iconConfig.sizes[this.size];if(this.iconConfig.sizes.default)return this.iconConfig.sizes.default}return null},useIconComponent(){return this.component||n}},methods:{getEquivalentIconOf(e){if(!this.both)return e;if(null==this.iconConfig)return e;const t=this.iconConfig;return t&&t.internalIcons&&t.internalIcons[e]?t.internalIcons[e]:e}}}),[["render",function(e,i,s,n,o,l){return t.openBlock(),t.createElementBlock("span",{class:t.normalizeClass(["icon",[e.newType,e.size]])},[e.useIconComponent?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.useIconComponent),{key:1,icon:[e.newPack,e.newIcon],size:e.newCustomSize,class:t.normalizeClass([e.customClass])},null,8,["icon","size","class"])):(t.openBlock(),t.createElementBlock("i",{key:0,class:t.normalizeClass([e.newPack,e.newIcon,e.newCustomSize,e.customClass])},null,2))],2)}]]),K=t.defineComponent({name:"BInput",components:{BIcon:W},mixins:[b,x],props:{modelValue:{type:[Number,String]},type:{type:String,default:"text"},lazy:{type:Boolean,default:!1},passwordReveal:Boolean,iconClickable:Boolean,hasCounter:{type:Boolean,default:()=>r},customClass:{type:String,default:""},iconRight:String,iconRightClickable:Boolean,iconRightType:String,autocomplete:String},emits:{"icon-click":e=>!0,"icon-right-click":e=>!0,"update:modelValue":e=>!0},data(){return{newValue:this.modelValue,newType:this.type,newAutocomplete:this.autocomplete||o,isPasswordVisible:!1,_elementRef:"textarea"===this.type?"textarea":"input"}},computed:{computedValue:{get(){return this.newValue},set(e){this.newValue=e,this.$emit("update:modelValue",e)}},rootClasses(){return[this.iconPosition,this.size,{"is-expanded":this.expanded,"is-loading":this.loading,"is-clearfix":!this.hasMessage}]},inputClasses(){return[this.statusType,this.size,{"is-rounded":this.rounded}]},hasIconRight(){return this.passwordReveal||this.loading||this.statusIcon&&this.statusTypeIcon||this.iconRight},rightIcon(){return this.passwordReveal?this.passwordVisibleIcon:this.iconRight?this.iconRight:this.statusTypeIcon},rightIconType(){return this.passwordReveal?"is-primary":this.iconRight?this.iconRightType||void 0:this.statusType},iconPosition(){let e="";return this.icon&&(e+="has-icons-left "),this.hasIconRight&&(e+="has-icons-right"),e},statusTypeIcon(){switch(this.statusType){case"is-success":return"check";case"is-danger":return"alert-circle";case"is-info":return"information";case"is-warning":return"alert";default:return}},hasMessage(){return!!this.statusMessage},passwordVisibleIcon(){return this.isPasswordVisible?"eye-off":"eye"},valueLength(){return"string"==typeof this.computedValue?Array.from(this.computedValue).length:"number"==typeof this.computedValue?this.computedValue.toString().length:0}},watch:{modelValue(e){const t=this.computedValue!=e;this.newValue=e,t&&this.$nextTick((()=>{!this.isValid&&this.checkHtml5Validity()}))},type(e){this.newType=e}},methods:{togglePasswordVisibility(){this.isPasswordVisible=!this.isPasswordVisible,this.newType=this.isPasswordVisible?"text":"password",this.$nextTick((()=>{this.focus()}))},iconClick(e,t){this.$emit(e,t),this.$nextTick((()=>{this.focus()}))},rightIconClick(e){this.passwordReveal?this.togglePasswordVisibility():this.iconRightClickable&&this.iconClick("icon-right-click",e)},onInput(){this.lazy||this.revalidate()},onChange(){this.lazy&&this.revalidate()},revalidate(){!this.isValid&&this.checkHtml5Validity()}}});const J=["type","autocomplete","maxlength"],X=["maxlength"],Y=["type","autocomplete","maxlength"],G=["maxlength"];var Q=w(K,[["render",function(e,i,s,n,o,l){const a=t.resolveComponent("b-icon");return t.openBlock(),t.createElementBlock("div",t.mergeProps({class:["control",e.rootClasses]},e.rootAttrs),[e.lazy?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},["textarea"!==e.type?t.withDirectives((t.openBlock(),t.createElementBlock("input",t.mergeProps({key:0,ref:"input",class:["input",[e.inputClasses,e.customClass]],type:e.newType,autocomplete:e.newAutocomplete,maxlength:e.maxlength,"onUpdate:modelValue":i[0]||(i[0]=t=>e.computedValue=t)},e.fallthroughAttrs,{onInput:i[1]||(i[1]=(...t)=>e.onInput&&e.onInput(...t)),onChange:i[2]||(i[2]=(...t)=>e.onChange&&e.onChange(...t)),onBlur:i[3]||(i[3]=(...t)=>e.onBlur&&e.onBlur(...t)),onFocus:i[4]||(i[4]=(...t)=>e.onFocus&&e.onFocus(...t))}),null,16,J)),[[t.vModelDynamic,e.computedValue,void 0,{lazy:!0}]]):t.withDirectives((t.openBlock(),t.createElementBlock("textarea",t.mergeProps({key:1,ref:"textarea",class:["textarea",[e.inputClasses,e.customClass]],maxlength:e.maxlength,"onUpdate:modelValue":i[5]||(i[5]=t=>e.computedValue=t)},e.fallthroughAttrs,{onInput:i[6]||(i[6]=(...t)=>e.onInput&&e.onInput(...t)),onChange:i[7]||(i[7]=(...t)=>e.onChange&&e.onChange(...t)),onBlur:i[8]||(i[8]=(...t)=>e.onBlur&&e.onBlur(...t)),onFocus:i[9]||(i[9]=(...t)=>e.onFocus&&e.onFocus(...t))}),null,16,X)),[[t.vModelText,e.computedValue,void 0,{lazy:!0}]])],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},["textarea"!==e.type?t.withDirectives((t.openBlock(),t.createElementBlock("input",t.mergeProps({key:0,ref:"input",class:["input",[e.inputClasses,e.customClass]],type:e.newType,autocomplete:e.newAutocomplete,maxlength:e.maxlength,"onUpdate:modelValue":i[10]||(i[10]=t=>e.computedValue=t)},e.fallthroughAttrs,{onInput:i[11]||(i[11]=(...t)=>e.onInput&&e.onInput(...t)),onChange:i[12]||(i[12]=(...t)=>e.onChange&&e.onChange(...t)),onBlur:i[13]||(i[13]=(...t)=>e.onBlur&&e.onBlur(...t)),onFocus:i[14]||(i[14]=(...t)=>e.onFocus&&e.onFocus(...t))}),null,16,Y)),[[t.vModelDynamic,e.computedValue]]):t.withDirectives((t.openBlock(),t.createElementBlock("textarea",t.mergeProps({key:1,ref:"textarea",class:["textarea",[e.inputClasses,e.customClass]],maxlength:e.maxlength,"onUpdate:modelValue":i[15]||(i[15]=t=>e.computedValue=t)},e.fallthroughAttrs,{onInput:i[16]||(i[16]=(...t)=>e.onInput&&e.onInput(...t)),onChange:i[17]||(i[17]=(...t)=>e.onChange&&e.onChange(...t)),onBlur:i[18]||(i[18]=(...t)=>e.onBlur&&e.onBlur(...t)),onFocus:i[19]||(i[19]=(...t)=>e.onFocus&&e.onFocus(...t))}),null,16,G)),[[t.vModelText,e.computedValue]])],64)),e.icon?(t.openBlock(),t.createBlock(a,{key:2,class:t.normalizeClass(["is-left",{"is-clickable":e.iconClickable}]),icon:e.icon,pack:e.iconPack,size:e.iconSize,onClick:i[20]||(i[20]=t=>e.iconClick("icon-click",t))},null,8,["class","icon","pack","size"])):t.createCommentVNode("v-if",!0),!e.loading&&e.hasIconRight&&e.rightIcon?(t.openBlock(),t.createBlock(a,{key:3,class:t.normalizeClass(["is-right",{"is-clickable":e.passwordReveal||e.iconRightClickable}]),icon:e.rightIcon,pack:e.iconPack,size:e.iconSize,type:e.rightIconType,both:"",onClick:e.rightIconClick},null,8,["class","icon","pack","size","type","onClick"])):t.createCommentVNode("v-if",!0),e.maxlength&&e.hasCounter&&"number"!==e.type?(t.openBlock(),t.createElementBlock("small",{key:4,class:t.normalizeClass(["help counter",{"is-invisible":!e.isFocused}])},t.toDisplayString(e.valueLength)+" / "+t.toDisplayString(e.maxlength),3)):t.createCommentVNode("v-if",!0)],16)}]]);const Z="AM",ee="PM",te="24",ie="12",se=(e,t)=>{if(e){let i=null;if(t.computedValue&&!isNaN(t.computedValue.valueOf())?i=new Date(t.computedValue):(i=t.timeCreator(),i.setMilliseconds(0)),t.dtf.formatToParts&&"function"==typeof t.dtf.formatToParts){const s=function(e,t){const i=t.match(e),s=e.toString().match(/<(.+?)>/g);if(null==s)throw new RangeError("pattern must contain at least one group");return s.map((e=>e.match(/<(.+)>/)[1])).reduce(((e,t,s)=>(i&&i.length>s?e[t]=i[s+1]:e[t]=null,e)),{})}(t.dtf.formatToParts(i).map((e=>"literal"===e.type?e.value.replace(/ /g,"\\s?"):"dayPeriod"===e.type?`((?!=<${e.type}>)(${t.amString}|${t.pmString}|${Z}|${ee}|${Z.toLowerCase()}|${ee.toLowerCase()})?)`:`((?!=<${e.type}>)\\d+)`)).join(""),e);if(s.hour=s.hour?parseInt(s.hour+"",10):null,s.minute=s.minute?parseInt(s.minute+"",10):null,s.second=s.second?parseInt(s.second+"",10):null,s.hour&&s.hour>=0&&s.hour<24&&s.minute&&s.minute>=0&&s.minute<59){const e=s.dayPeriod;return e&&(e.toLowerCase()===t.pmString.toLowerCase()||e.toLowerCase()===ee.toLowerCase())&&s.hour<12&&(s.hour+=12),i.setHours(s.hour),i.setMinutes(s.minute),i.setSeconds(s.second||0),i}}let s=!1;if(t.hourFormat===ie){const i=e.split(" ");e=i[0],s=i[1]===t.amString||i[1]===Z}const n=e.split(":");let o=parseInt(n[0],10);const l=parseInt(n[1],10),a=t.enableSeconds?parseInt(n[2],10):0;return isNaN(o)||o<0||o>23||t.hourFormat===ie&&(o<1||o>12)||isNaN(l)||l<0||l>59?null:(i.setSeconds(a),i.setMinutes(l),t.hourFormat===ie&&(s&&12===o?o=0:s||12===o||(o+=12)),i.setHours(o),new Date(i.getTime()))}return null};var ne=t.defineComponent({mixins:[b,x],props:{modelValue:[Date,null],inline:Boolean,minTime:[Date,null],maxTime:[Date,null],placeholder:String,editable:Boolean,disabled:Boolean,hourFormat:{type:String,validator:e=>e===te||e===ie},incrementHours:{type:Number,default:1},incrementMinutes:{type:Number,default:1},incrementSeconds:{type:Number,default:1},timeFormatter:{type:Function,default:(e,t)=>((e,t)=>t.dtf.format(e))(e,t)},timeParser:{type:Function,default:(e,t)=>se(e,t)},mobileNative:{type:Boolean,default:()=>l},mobileModal:{type:Boolean,default:()=>a},timeCreator:{type:Function,default:()=>new Date},position:String,unselectableTimes:Array,openOnFocus:Boolean,enableSeconds:Boolean,defaultMinutes:Number,defaultSeconds:Number,focusable:{type:Boolean,default:!0},tzOffset:{type:Number,default:0},appendToBody:Boolean,resetOnMeridianChange:{type:Boolean,default:!1}},emits:{"update:modelValue":e=>!0},data(){return{dateSelected:this.modelValue,hoursSelected:null,minutesSelected:null,secondsSelected:null,meridienSelected:null,_elementRef:"input",AM:Z,PM:ee,HOUR_FORMAT_24:te,HOUR_FORMAT_12:ie}},computed:{computedValue:{get(){return this.dateSelected},set(e){this.dateSelected=e,this.$emit("update:modelValue",this.dateSelected)}},localeOptions(){return new Intl.DateTimeFormat(this.locale,{hour:"numeric",minute:"numeric",second:this.enableSeconds?"numeric":void 0}).resolvedOptions()},dtf(){return new Intl.DateTimeFormat(this.locale,{hour:this.localeOptions.hour||"numeric",minute:this.localeOptions.minute||"numeric",second:this.enableSeconds?this.localeOptions.second||"numeric":void 0,hourCycle:this.isHourFormat24?"h23":"h12"})},newHourFormat(){return this.hourFormat||(this.localeOptions.hour12?ie:te)},sampleTime(){const e=this.timeCreator();return e.setHours(10),e.setSeconds(0),e.setMinutes(0),e.setMilliseconds(0),e},hourLiteral(){if(this.dtf.formatToParts&&"function"==typeof this.dtf.formatToParts){const e=this.sampleTime,t=this.dtf.formatToParts(e),i=t.find(((e,i)=>i>0&&"hour"===t[i-1].type));if(i)return i.value}return":"},minuteLiteral(){if(this.dtf.formatToParts&&"function"==typeof this.dtf.formatToParts){const e=this.sampleTime,t=this.dtf.formatToParts(e),i=t.find(((e,i)=>i>0&&"minute"===t[i-1].type));if(i)return i.value}return":"},secondLiteral(){if(this.dtf.formatToParts&&"function"==typeof this.dtf.formatToParts){const e=this.sampleTime,t=this.dtf.formatToParts(e),i=t.find(((e,i)=>i>0&&"second"===t[i-1].type));if(i)return i.value}},amString(){if(this.dtf.formatToParts&&"function"==typeof this.dtf.formatToParts){const e=this.sampleTime;e.setHours(10);const t=this.dtf.formatToParts(e).find((e=>"dayPeriod"===e.type));if(t)return t.value}return Z},pmString(){if(this.dtf.formatToParts&&"function"==typeof this.dtf.formatToParts){const e=this.sampleTime;e.setHours(20);const t=this.dtf.formatToParts(e).find((e=>"dayPeriod"===e.type));if(t)return t.value}return ee},hours(){if(!this.incrementHours||this.incrementHours<1)throw new Error("Hour increment cannot be null or less than 1.");const e=[],t=this.isHourFormat24?24:12;for(let i=0;i<t;i+=this.incrementHours){let t=i,s=t;this.isHourFormat24||(t=i+1,s=t,this.meridienSelected===this.amString?12===t&&(t=0):this.meridienSelected===this.pmString&&12!==t&&(t+=12)),e.push({label:this.formatNumber(s),value:t})}return e},minutes(){if(!this.incrementMinutes||this.incrementMinutes<1)throw new Error("Minute increment cannot be null or less than 1.");const e=[];for(let t=0;t<60;t+=this.incrementMinutes)e.push({label:this.formatNumber(t,!0),value:t});return e},seconds(){if(!this.incrementSeconds||this.incrementSeconds<1)throw new Error("Second increment cannot be null or less than 1.");const e=[];for(let t=0;t<60;t+=this.incrementSeconds)e.push({label:this.formatNumber(t,!0),value:t});return e},meridiens(){return[this.amString,this.pmString]},isMobile(){return this.mobileNative&&v.any()},isHourFormat24(){return this.newHourFormat===te},disabledOrUndefined(){return this.disabled||void 0}},watch:{hourFormat(){null!==this.hoursSelected&&(this.meridienSelected=this.hoursSelected>=12?this.pmString:this.amString)},locale(){this.modelValue||(this.meridienSelected=this.amString)},modelValue:{handler(e){this.updateInternalState(e),!this.isValid&&this.$refs.input.checkHtml5Validity()},immediate:!0}},methods:{onMeridienChange(e){null!==this.hoursSelected&&this.resetOnMeridianChange?(this.hoursSelected=null,this.minutesSelected=null,this.secondsSelected=null,this.computedValue=null):null!==this.hoursSelected&&(e===this.pmString?this.hoursSelected+=12:e===this.amString&&(this.hoursSelected-=12)),this.updateDateSelected(this.hoursSelected,this.minutesSelected,this.enableSeconds?this.secondsSelected:0,e)},onHoursChange(e){this.minutesSelected||void 0===this.defaultMinutes||(this.minutesSelected=this.defaultMinutes),this.secondsSelected||void 0===this.defaultSeconds||(this.secondsSelected=this.defaultSeconds),this.updateDateSelected(parseInt(`${e}`,10),this.minutesSelected,this.enableSeconds?this.secondsSelected:0,this.meridienSelected)},onMinutesChange(e){!this.secondsSelected&&this.defaultSeconds&&(this.secondsSelected=this.defaultSeconds),this.updateDateSelected(this.hoursSelected,parseInt(`${e}`,10),this.enableSeconds?this.secondsSelected:0,this.meridienSelected)},onSecondsChange(e){this.updateDateSelected(this.hoursSelected,this.minutesSelected,parseInt(`${e}`,10),this.meridienSelected)},updateDateSelected(e,t,i,s){if(null!=e&&null!=t&&(!this.isHourFormat24&&null!==s||this.isHourFormat24)){let s=null;this.computedValue&&!isNaN(this.computedValue.valueOf())?s=new Date(this.computedValue):(s=this.timeCreator(),s.setMilliseconds(0)),s.setHours(e),s.setMinutes(t),s.setSeconds(i),isNaN(s.getTime())||(this.computedValue=new Date(s.getTime()))}},updateInternalState(e){e?(this.hoursSelected=e.getHours(),this.minutesSelected=e.getMinutes(),this.secondsSelected=e.getSeconds(),this.meridienSelected=e.getHours()>=12?this.pmString:this.amString):(this.hoursSelected=null,this.minutesSelected=null,this.secondsSelected=null,this.meridienSelected=this.amString),this.dateSelected=e},isHourDisabled(e){let t=!1;if(this.minTime){const i=this.minTime.getHours(),s=this.minutes.every((t=>this.isMinuteDisabledForHour(e,t.value)));t=e<i||s}if(this.maxTime&&!t){const i=this.maxTime.getHours();t=e>i}if(this.unselectableTimes&&!t){t=this.unselectableTimes.filter((t=>this.enableSeconds&&null!==this.secondsSelected?t.getHours()===e&&t.getMinutes()===this.minutesSelected&&t.getSeconds()===this.secondsSelected:null!==this.minutesSelected&&(t.getHours()===e&&t.getMinutes()===this.minutesSelected))).length>0||this.minutes.every((t=>this.unselectableTimes.filter((i=>i.getHours()===e&&i.getMinutes()===t.value)).length>0))}return t},isMinuteDisabledForHour(e,t){let i=!1;if(this.minTime){const s=this.minTime.getHours(),n=this.minTime.getMinutes();i=e===s&&t<n}if(this.maxTime&&!i){const s=this.maxTime.getHours(),n=this.maxTime.getMinutes();i=e===s&&t>n}return i},isMinuteDisabled(e){let t=!1;if(null!==this.hoursSelected&&(t=!!this.isHourDisabled(this.hoursSelected)||this.isMinuteDisabledForHour(this.hoursSelected,e),this.unselectableTimes&&!t)){t=this.unselectableTimes.filter((t=>this.enableSeconds&&null!==this.secondsSelected?t.getHours()===this.hoursSelected&&t.getMinutes()===e&&t.getSeconds()===this.secondsSelected:t.getHours()===this.hoursSelected&&t.getMinutes()===e)).length>0}return t},isSecondDisabled(e){let t=!1;if(null!==this.minutesSelected){if(this.isMinuteDisabled(this.minutesSelected))t=!0;else{if(this.minTime){const i=this.minTime.getHours(),s=this.minTime.getMinutes(),n=this.minTime.getSeconds();t=this.hoursSelected===i&&this.minutesSelected===s&&e<n}if(this.maxTime&&!t){const i=this.maxTime.getHours(),s=this.maxTime.getMinutes(),n=this.maxTime.getSeconds();t=this.hoursSelected===i&&this.minutesSelected===s&&e>n}}if(this.unselectableTimes&&!t){t=this.unselectableTimes.filter((t=>t.getHours()===this.hoursSelected&&t.getMinutes()===this.minutesSelected&&t.getSeconds()===e)).length>0}}return t},onChange(e){const t=this.timeParser(e,this);this.updateInternalState(t),t&&!isNaN(t.valueOf())?this.computedValue=t:(this.computedValue=null,this.$refs.input.newValue=this.computedValue)},toggle(e){this.$refs.dropdown&&(this.$refs.dropdown.isActive="boolean"==typeof e?e:!this.$refs.dropdown.isActive)},close(){this.toggle(!1)},handleOnFocus(){this.onFocus(),this.openOnFocus&&this.toggle(!0)},formatHHMMSS(e){const t=new Date(e);if(e&&!isNaN(t.valueOf())){const e=t.getHours(),i=t.getMinutes(),s=t.getSeconds();return this.formatNumber(e,!0)+":"+this.formatNumber(i,!0)+":"+this.formatNumber(s,!0)}return""},onChangeNativePicker(e){const t=e.target.value;if(t){let e=null;this.computedValue&&!isNaN(this.computedValue.valueOf())?e=new Date(this.computedValue):(e=new Date,e.setMilliseconds(0));const i=t.split(":");e.setHours(parseInt(i[0],10)),e.setMinutes(parseInt(i[1],10)),e.setSeconds(i[2]?parseInt(i[2],10):0),this.computedValue=new Date(e.getTime())}else this.computedValue=null},formatNumber(e,t){return this.isHourFormat24||t?this.pad(e):`${e}`},pad:e=>(e<10?"0":"")+e,formatValue(e){return e&&!isNaN(e.valueOf())?this.timeFormatter(e,this):null},keyPress({key:e}){this.$refs.dropdown&&this.$refs.dropdown.isActive&&("Escape"===e||"Esc"===e)&&this.toggle(!1)},onActiveChange(e){e||this.onBlur()}},created(){"undefined"!=typeof window&&document.addEventListener("keyup",this.keyPress)},beforeUnmounted(){"undefined"!=typeof window&&document.removeEventListener("keyup",this.keyPress)}}),oe=t.defineComponent({name:"BSelect",components:{BIcon:W},mixins:[b,x],props:{modelValue:{type:[String,Number,Boolean,Object,Array,Function,Date,null],default:null},placeholder:String,multiple:Boolean,nativeSize:[String,Number]},emits:{blur:e=>!0,focus:e=>!0,"update:modelValue":e=>!0},data(){return{selected:this.modelValue,_elementRef:"select"}},computed:{computedValue:{get(){return this.selected},set(e){this.selected=e,this.$emit("update:modelValue",e),!this.isValid&&this.checkHtml5Validity()}},spanClasses(){return[this.size,this.statusType,{"is-fullwidth":this.expanded,"is-loading":this.loading,"is-multiple":this.multiple,"is-rounded":this.rounded,"is-empty":null===this.selected}]}},watch:{modelValue(e){this.selected=e,!this.isValid&&this.checkHtml5Validity()}}});const le=["multiple","size"],ae={key:0,value:null,disabled:"",hidden:""};var re=w(oe,[["render",function(e,i,s,n,o,l){const a=t.resolveComponent("b-icon");return t.openBlock(),t.createElementBlock("div",t.mergeProps({class:["control",{"is-expanded":e.expanded,"has-icons-left":e.icon}]},e.rootAttrs),[t.createElementVNode("span",{class:t.normalizeClass(["select",e.spanClasses])},[t.withDirectives(t.createElementVNode("select",t.mergeProps({"onUpdate:modelValue":i[0]||(i[0]=t=>e.computedValue=t),ref:"select",multiple:e.multiple,size:e.nativeSize},e.fallthroughAttrs,{onBlur:i[1]||(i[1]=(...t)=>e.onBlur&&e.onBlur(...t)),onFocus:i[2]||(i[2]=t=>e.$emit("focus",t))}),[e.placeholder?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[null==e.computedValue?(t.openBlock(),t.createElementBlock("option",ae,t.toDisplayString(e.placeholder),1)):t.createCommentVNode("v-if",!0)],64)):t.createCommentVNode("v-if",!0),t.renderSlot(e.$slots,"default")],16,le),[[t.vModelSelect,e.computedValue]])],2),e.icon?(t.openBlock(),t.createBlock(a,{key:0,class:"is-left",icon:e.icon,pack:e.iconPack,size:e.iconSize},null,8,["icon","pack","size"])):t.createCommentVNode("v-if",!0)],16)}]]),de=t.defineComponent({name:"BTimepicker",components:{BInput:Q,BField:V,BSelect:re,BDropdown:H,BDropdownItem:U},mixins:[ne],data:()=>({_isTimepicker:!0}),computed:{nativeStep(){return this.enableSeconds?"1":void 0}}});const ce=["value","disabled"],ue={class:"control is-colon"},he=["value","disabled"],me={class:"control is-colon"},pe=["value","disabled"],fe={class:"control is-colon"},ge=["value"],ye={key:0,class:"timepicker-footer"};var be=w(de,[["render",function(e,i,s,n,o,l){const a=t.resolveComponent("b-input"),r=t.resolveComponent("b-select"),d=t.resolveComponent("b-field"),c=t.resolveComponent("b-dropdown-item"),u=t.resolveComponent("b-dropdown");return t.openBlock(),t.createElementBlock("div",t.mergeProps({class:["timepicker control",[e.size,{"is-expanded":e.expanded}]]},e.rootAttrs),[!e.isMobile||e.inline?(t.openBlock(),t.createBlock(u,{key:0,ref:"dropdown",position:e.position,disabled:e.disabledOrUndefined,inline:e.inline,"mobile-modal":e.mobileModal,"append-to-body":e.appendToBody,"append-to-body-copy-parent":"",onActiveChange:e.onActiveChange},t.createSlots({default:t.withCtx((()=>[t.createVNode(c,{disabled:e.disabledOrUndefined,focusable:e.focusable,custom:""},{default:t.withCtx((()=>[t.createVNode(d,{grouped:"",position:"is-centered"},{default:t.withCtx((()=>[t.createVNode(r,{modelValue:e.hoursSelected,"onUpdate:modelValue":i[2]||(i[2]=t=>e.hoursSelected=t),onChange:i[3]||(i[3]=t=>e.onHoursChange(t.target.value)),disabled:e.disabledOrUndefined,placeholder:"00"},{default:t.withCtx((()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.hours,(i=>(t.openBlock(),t.createElementBlock("option",{value:i.value,key:i.value,disabled:e.isHourDisabled(i.value)||void 0},t.toDisplayString(i.label),9,ce)))),128))])),_:1},8,["modelValue","disabled"]),t.createElementVNode("span",ue,t.toDisplayString(e.hourLiteral),1),t.createVNode(r,{modelValue:e.minutesSelected,"onUpdate:modelValue":i[4]||(i[4]=t=>e.minutesSelected=t),onChange:i[5]||(i[5]=t=>e.onMinutesChange(t.target.value)),disabled:e.disabledOrUndefined,placeholder:"00"},{default:t.withCtx((()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.minutes,(i=>(t.openBlock(),t.createElementBlock("option",{value:i.value,key:i.value,disabled:e.isMinuteDisabled(i.value)||void 0},t.toDisplayString(i.label),9,he)))),128))])),_:1},8,["modelValue","disabled"]),e.enableSeconds?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createElementVNode("span",me,t.toDisplayString(e.minuteLiteral),1),t.createVNode(r,{modelValue:e.secondsSelected,"onUpdate:modelValue":i[6]||(i[6]=t=>e.secondsSelected=t),onChange:i[7]||(i[7]=t=>e.onSecondsChange(t.target.value)),disabled:e.disabledOrUndefined,placeholder:"00"},{default:t.withCtx((()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.seconds,(i=>(t.openBlock(),t.createElementBlock("option",{value:i.value,key:i.value,disabled:e.isSecondDisabled(i.value)||void 0},t.toDisplayString(i.label),9,pe)))),128))])),_:1},8,["modelValue","disabled"]),t.createElementVNode("span",fe,t.toDisplayString(e.secondLiteral),1)],64)):t.createCommentVNode("v-if",!0),e.isHourFormat24?t.createCommentVNode("v-if",!0):(t.openBlock(),t.createBlock(r,{key:1,modelValue:e.meridienSelected,"onUpdate:modelValue":i[8]||(i[8]=t=>e.meridienSelected=t),onChange:i[9]||(i[9]=t=>e.onMeridienChange(t.target.value)),disabled:e.disabledOrUndefined},{default:t.withCtx((()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.meridiens,(e=>(t.openBlock(),t.createElementBlock("option",{value:e,key:e},t.toDisplayString(e),9,ge)))),128))])),_:1},8,["modelValue","disabled"]))])),_:1}),void 0!==e.$slots.default?(t.openBlock(),t.createElementBlock("footer",ye,[t.renderSlot(e.$slots,"default")])):t.createCommentVNode("v-if",!0)])),_:3},8,["disabled","focusable"])])),_:2},[e.inline?void 0:{name:"trigger",fn:t.withCtx((()=>[t.renderSlot(e.$slots,"trigger",{},(()=>[t.createVNode(a,t.mergeProps({ref:"input",autocomplete:"off","model-value":e.formatValue(e.computedValue),placeholder:e.placeholder,size:e.size,icon:e.icon,"icon-pack":e.iconPack,loading:e.loading,disabled:e.disabledOrUndefined,readonly:!e.editable||void 0,rounded:e.rounded},e.fallthroughAttrs,{"use-html5-validation":e.useHtml5Validation,onKeyup:i[0]||(i[0]=t.withKeys((t=>e.toggle(!0)),["enter"])),onChange:i[1]||(i[1]=t=>e.onChange(t.target.value)),onFocus:e.handleOnFocus}),null,16,["model-value","placeholder","size","icon","icon-pack","loading","disabled","readonly","rounded","use-html5-validation","onFocus"])]))])),key:"0"}]),1032,["position","disabled","inline","mobile-modal","append-to-body","onActiveChange"])):(t.openBlock(),t.createBlock(a,t.mergeProps({key:1,ref:"input",type:"time",step:e.nativeStep,autocomplete:"off","model-value":e.formatHHMMSS(e.computedValue),placeholder:e.placeholder,size:e.size,icon:e.icon,"icon-pack":e.iconPack,rounded:e.rounded,loading:e.loading,max:e.formatHHMMSS(e.maxTime),min:e.formatHHMMSS(e.minTime),disabled:e.disabledOrUndefined,readonly:!1},e.fallthroughAttrs,{"use-html5-validation":e.useHtml5Validation,onChange:i[10]||(i[10]=t=>e.onChange(t.target.value)),onFocus:e.handleOnFocus,onBlur:i[11]||(i[11]=t=>e.onBlur()&&e.checkHtml5Validity())}),null,16,["step","model-value","placeholder","size","icon","icon-pack","rounded","loading","max","min","disabled","use-html5-validation","onFocus"]))],16)}]]);const ve={install(e){((e,t)=>{const i=t.name;if(null==i)throw new Error("Buefy.registerComponent: missing component name");e.component(i,t)})(e,be)}};e.BTimepicker=be,e.default=ve,Object.defineProperty(e,"__esModule",{value:!0})}));