UNPKG

vue-material-adapter

Version:

Vue 3 wrapper arround Material Components for the Web

1 lines 136 kB
define(["exports","vue","@material/form-field/foundation.js","@material/banner/index.js","@material/dom/focus-trap.js","@material/dom/events.js","@material/dom/ponyfill.js","@material/ripple/index.js","@material/ripple/util.js","@material/animation/index.js","@material/checkbox/foundation.js","@material/chips/action/index.js","@material/chips/chip-set/index.js","@material/dom/announce.js","@material/chips/chip/foundation.js","@material/circular-progress/foundation.js","@material/data-table/index.js","@material/dialog/foundation.js","@material/dialog/util.js","@material/drawer/dismissible/foundation.js","@material/drawer/modal/foundation.js","@material/drawer/util.js","@material/list/foundation.js","@material/floating-label/foundation.js","@material/icon-button/foundation.js","@material/line-ripple/foundation.js","@material/linear-progress/foundation.js","@material/list/index.js","@material/animation/util.js","@material/menu-surface/foundation.js","@material/menu/foundation.js","@material/notched-outline/foundation.js","@material/radio/foundation.js","@material/segmented-button/segment/index.js","@material/segmented-button/index.js","@material/select/foundation.js","@material/select/helper-text/foundation.js","@material/select/icon/foundation.js","@material/slider","@material/snackbar/foundation.js","@material/switch/index.js","@material/tab-bar/foundation.js","@material/tab-indicator/fading-foundation.js","@material/tab-indicator/foundation.js","@material/tab-indicator/sliding-foundation.js","@material/tab-scroller/foundation.js","@material/tab-scroller/util.js","@material/tab/foundation.js","@material/textfield/character-counter/foundation.js","@material/textfield/helper-text/foundation.js","@material/textfield/icon/foundation.js","@material/textfield/foundation.js","@material/tooltip","@material/top-app-bar/fixed/foundation.js","@material/top-app-bar/short/foundation.js","@material/top-app-bar/standard/foundation.js"],function(T,t,Pe,Xt,se,H,D,Gt,Yt,He,jt,qe,Qt,Zt,Jt,en,N,Ue,tn,We,nn,on,ln,an,ze,sn,rn,L,cn,Ke,Xe,Ge,dn,mn,un,Ye,pn,je,q,Qe,Ze,Je,hn,gn,fn,bn,Cn,yn,En,Sn,et,wn,z,An,_n,tt){"use strict";function kn(e){return e&&e.__esModule?e:{default:e}}function re(e){if(e&&e.__esModule)return e;var o=Object.create(null);return e&&Object.keys(e).forEach(function(n){if(n!=="default"){var l=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(o,n,l.get?l:{enumerable:!0,get:function(){return e[n]}})}}),o.default=e,Object.freeze(o)}var ie=re(tn),In=re(on),xn=re(Cn),nt=kn(yn);function V(e){return{version:"__VERSION__",install:o=>{for(const[n,l]of Object.entries(e)){const s=n.replace(/([\da-z])([A-Z])/g,"$1-$2").toLowerCase(),[i,...a]=s.split("-"),r=["mdc",...a].join("-"),g=["mcw",...a].join("-");o._context.components[g]||(o.component(g,l),o.component(r,l))}},components:e}}function O(e,o,n,l=!1){if(e){o=o.toLowerCase();const s=typeof CustomEvent=="function"?new CustomEvent(o,{detail:n,bubbles:l}):Bn(o,l,n);e.dispatchEvent(s)}}const Bn=(e,o,n)=>document.createEvent("CustomEvent").initCustomEvent(e,o,!1,n),K={name:"custom-link",props:{tag:String,to:[String,Object]},setup(e,{slots:o,attrs:n}){return()=>{var l;const{to:s,href:i,tag:a}=e,r=t.resolveDynamicComponent("router-link");if(s&&r){const b=a!=null?a:"a";return t.h(r,{custom:!0,...n,to:s},{default:u=>{var S;return t.h(b,{...n,onClick:C=>{C.__itemId=n.itemId,u.navigate(C)}},(S=o.default)==null?void 0:S.call(o))}})}const g=i?"a":a!=null?a:"a",m=i?"button":g==="button"?void 0:"button",c=(l=o.default)==null?void 0:l.call(o);return t.h(g,{...n,role:m},{default:()=>c})}}};var ce={props:{activate:Function,deactivate:Function,alignEnd:Boolean,forId:String},inheritAttrs:!1,setup(e,{slots:o,attrs:n}){const l=t.ref();let s;const i=!!o.label,a=t.computed(()=>({"mdc-form-field":i,"mdc-form-field--align-end":i&&e.alignEnd}));return t.onMounted(()=>{e.hasLabel&&(s=new Pe.MDCFormFieldFoundation({registerInteractionHandler:(r,g)=>{l.value.addEventListener(r,g)},deregisterInteractionHandler:(r,g)=>{l.value.removeEventListener(r,g)},activateInputRipple:()=>{e==null||e.activate()},deactivateInputRipple:()=>{e==null||e.deactivate()}}),s.init())}),t.onBeforeUnmount(()=>{s==null||s.destroy()}),()=>{var r,g;const m={};if(n.class)for(const c of n.class.split(" "))m[c]=1;return i?t.h("div",{class:{...a.value,...m}},[(r=o.default)==null?void 0:r.call(o),t.h("label",{for:e.forId,ref:l},[(g=o.label)==null?void 0:g.call(o)])]):o.default()}}},Q={inheritAttrs:!1,props:{isTouch:Boolean},setup(e,{slots:o}){return()=>e.isTouch?t.h("div",{class:"mdc-touch-target-wrapper"},[o.default()]):o.default()}},vn=Object.freeze({__proto__:null,BasePlugin:V,emitCustomEvent:O,CustomLink:K,formFieldWrapper:ce,touchWrapper:Q}),de={inheritAttrs:!1,props:{fixed:Boolean},setup(){return{}}};const Tn={key:0,class:"mdc-banner__fixed"};function Vn(e,o,n,l,s,i){return n.fixed?(t.openBlock(),t.createElementBlock("div",Tn,[t.renderSlot(e.$slots,"default",t.normalizeProps(t.guardReactiveProps(e.$attrs)))])):t.renderSlot(e.$slots,"default",t.normalizeProps(t.mergeProps({key:1},e.$attrs)))}de.render=Vn,de.__file="src/banner/banner-content.vue";const Nn=(e,o)=>new se.FocusTrap(e,o);var me={name:"mcw-banner",props:{centered:Boolean,modelValue:Boolean,text:String,primaryAction:String,secondaryAction:String,mobile:Boolean,fixed:Boolean,disableAutoClose:Boolean,icon:{type:String,default:()=>""}},components:{bannerContent:de},setup(e,{emit:o}){const n=t.reactive({classes:{"mdc-banner--centered":e.centered,"mdc-banner--mobile-stacked":e.mobile},styles:{},root:void 0,contentEl:void 0,primaryActionEl:void 0});let l,s;const i=c=>{c?l.open():l.close(c)},a=c=>{l.close(c)},r=c=>{c==1?l.handleSecondaryActionClick(e.disableAutoClose):l.handlePrimaryActionClick(e.disableAutoClose)},g={addClass:c=>{n.classes={...n.classes,[c]:!0},n.root.classList.add(c)},getContentHeight:()=>n.contentEl.offsetHeight,notifyClosed:c=>{o("mdcbanner:closed",{reason:c})},notifyClosing:c=>{o("update:modelValue",!1),o("mdcbanner:closing",{reason:c})},notifyOpened:()=>o("mdcbanner:opened",{}),notifyOpening:()=>{o("mdcbanner:opening",{})},notifyActionClicked:c=>{o("mdcbanner:actionclicked",{action:c})},releaseFocus:()=>{s.releaseFocus()},removeClass:c=>{const{[c]:b,...u}=n.classes;n.classes=u},setStyleProperty:(c,b)=>n.styles={...n.styles,[c]:b},trapFocus:()=>{s.trapFocus()}},m=t.computed(()=>!!e.icon);return t.watch(()=>e.modelValue,c=>{i(c)}),t.onMounted(()=>{s=Nn(n.root,{initialFocusEl:n.primaryActionEl}),l=new Xt.MDCBannerFoundation(g),l.init()}),t.onBeforeUnmount(()=>{l==null||l.destroy()}),{...t.toRefs(n),onContentClick:r,haveIcon:m,close:a}}};const Ln={class:"mdc-banner__content",role:"alertdialog","aria-live":"assertive",ref:"contentEl"},$n={class:"mdc-banner__graphic-text-wrapper"},Rn={key:0,class:"mdc-banner__graphic",role:"img",alt:""},On={class:"material-icons mdc-banner__icon"},Dn={class:"mdc-banner__text"},Mn={class:"mdc-banner__actions"},Fn=t.createElementVNode("div",{class:"mdc-button__ripple"},null,-1),Pn={class:"mdc-button__label"},Hn=t.createElementVNode("div",{class:"mdc-button__ripple"},null,-1),qn={class:"mdc-button__label"};function Un(e,o,n,l,s,i){const a=t.resolveComponent("banner-content");return t.openBlock(),t.createElementBlock("div",{ref:"root",class:t.normalizeClass(["mdc-banner",e.classes]),role:"banner",style:t.normalizeStyle(e.styles)},[t.createVNode(a,{fixed:e.fixed},{default:t.withCtx(()=>[t.createElementVNode("div",Ln,[t.createElementVNode("div",$n,[e.haveIcon?(t.openBlock(),t.createElementBlock("div",Rn,[t.createElementVNode("i",On,t.toDisplayString(e.icon),1)])):t.createCommentVNode("v-if",!0),t.createElementVNode("div",Dn,t.toDisplayString(e.text),1)]),t.createElementVNode("div",Mn,[e.secondaryAction?(t.openBlock(),t.createElementBlock("button",{key:0,type:"button",class:"mdc-button mdc-banner__secondary-action",onClick:o[0]||(o[0]=t.withModifiers(r=>e.onContentClick(1),["stop"]))},[Fn,t.createElementVNode("div",Pn,t.toDisplayString(e.secondaryAction),1)])):t.createCommentVNode("v-if",!0),t.createElementVNode("button",{type:"button",class:"mdc-button mdc-banner__primary-action",ref:"primaryActionEl",onClick:o[1]||(o[1]=t.withModifiers(r=>e.onContentClick(0),["stop"]))},[Hn,t.createElementVNode("div",qn,t.toDisplayString(e.primaryAction),1)],512)])],512)]),_:1},8,["fixed"])],6)}me.render=Un,me.__file="src/banner/banner.vue";var ot=V({mcwBanner:me});class lt extends Gt.MDCRippleFoundation{constructor(o,n,{unbounded:l=!1,...s}={}){var i;const a=(i=o.$el)!=null?i:o;super({addClass:r=>{n?n.classes={...n.classes,[r]:!0}:a.classList.add(r)},browserSupportsCssVars:()=>Yt.supportsCssVariables(window),computeBoundingRect:()=>a.getBoundingClientRect(),containsEventTarget:r=>a.contains(r),deregisterDocumentInteractionHandler:(r,g)=>document.documentElement.removeEventListener(r,g,H.applyPassive()),deregisterInteractionHandler:(r,g)=>a.removeEventListener(r,g,H.applyPassive()),deregisterResizeHandler:r=>window.removeEventListener("resize",r),getWindowPageOffset:()=>({x:window.pageXOffset,y:window.pageYOffset}),isSurfaceActive:()=>D.matches(a,":active"),isSurfaceDisabled:()=>!1,isUnbounded:()=>this.unbounded_,registerDocumentInteractionHandler:(r,g)=>document.documentElement.addEventListener(r,g,H.applyPassive()),registerInteractionHandler:(r,g)=>{a.addEventListener(r,g,H.applyPassive())},registerResizeHandler:r=>window.addEventListener("resize",r),removeClass:r=>{if(n){const{[r]:g,...m}=n.classes;n.classes=m}else a.classList.remove(r)},updateCssVariable:(r,g)=>{n?n.styles={...n.styles,[r]:g}:a.style.setProperty(r,g)},...s}),this.unbounded_=l}get unbounded(){return this.unbounded_}set unbounded(o){this.unbounded_=Boolean(o),this.setUnbounded(this.unbounded_)}}function F(e,o){const n=t.ref(),l=t.shallowReactive({classes:{},styles:{}}),s=()=>{var a;return(a=n.value)==null?void 0:a.activate()},i=()=>{var a;return(a=n.value)==null?void 0:a.deactivate()};return t.onMounted(()=>{n.value=new lt(e.value,l,o),n.value.init()}),t.onBeforeUnmount(()=>{n.value.destroy()}),{...t.toRefs(l),activate:s,deactivate:i}}var Z=t.defineComponent({name:"mcw-button",props:{raised:Boolean,unelevated:Boolean,outlined:Boolean,icon:String,trailingIcon:String,isTouch:Boolean},components:{CustomLink:K},setup(e,{slots:o}){const n=t.ref(),{classes:l,styles:s}=F(n),i=t.computed(()=>{var g;return(g=o.icon)!=null?g:e.icon}),a=t.computed(()=>{var g;return(g=o.trailingIcon)!=null?g:e.trailingIcon}),r=t.computed(()=>({...l.value,"mdc-button":!0,"mdc-button--raised":e.raised,"mdc-button--unelevated":e.unelevated&&!e.raised,"mdc-button--outlined":e.outlined,"mdc-button--icon-leading":i.value,"mdc-button--icon-trailing":a.value}));return{styles:s,classes:r,root:n,haveIcon:i,haveTrailingIcon:a}}});const Wn=t.createElementVNode("div",{class:"mdc-button__ripple"},null,-1),zn={key:0,class:"mdc-button__touch"},Kn=t.createElementVNode("span",{class:"mdc-button__focus-ring"},null,-1),Xn={class:"material-icons mdc-button__icon","aria-hidden":"true"},Gn={class:"mdc-button__label"},Yn={class:"material-icons mdc-button__icon","aria-hidden":"true"};function jn(e,o,n,l,s,i){const a=t.resolveComponent("custom-link");return t.openBlock(),t.createBlock(a,{ref:"root",class:t.normalizeClass(e.classes),style:t.normalizeStyle(e.styles),tag:"button"},{default:t.withCtx(()=>[Wn,e.isTouch?(t.openBlock(),t.createElementBlock("span",zn)):t.createCommentVNode("v-if",!0),Kn,e.haveIcon?t.renderSlot(e.$slots,"icon",{key:1},()=>[t.createElementVNode("i",Xn,t.toDisplayString(e.icon),1)]):t.createCommentVNode("v-if",!0),t.createElementVNode("span",Gn,[t.renderSlot(e.$slots,"default")]),e.haveTrailingIcon?t.renderSlot(e.$slots,"trailingIcon",{key:2},()=>[t.createElementVNode("i",Yn,t.toDisplayString(e.trailingIcon),1)]):t.createCommentVNode("v-if",!0)]),_:3},8,["class","style"])}Z.render=jn,Z.__file="src/button/button.vue";var at=V({mcwButton:Z}),Qn={name:"mcw-card-action-buttons",setup(e,{slots:o}){return()=>{var n;return t.h("div",{class:["mdc-card__action-buttons"]},[(n=o.default)==null?void 0:n.call(o)])}}},Zn={name:"mcw-card-action-icons",setup(e,{slots:o}){return()=>{var n;return t.h("div",{class:["mdc-card__action-icons"]},[(n=o.default)==null?void 0:n.call(o)])}}},Jn={name:"mcw-card-actions",props:{fullBleed:Boolean},setup(e,{slots:o}){return()=>{var n;return t.h("section",{class:[{"mdc-card__actions":1,"mdc-card__actions--full-bleed":e.fullBleed}]},(n=o.default)==null?void 0:n.call(o))}}},eo={name:"mcw-card-media",props:{src:String,square:{type:Boolean,default(){return!1}},wide:{type:Boolean,default(){return!1}},contentClass:String},setup(e,{slots:o}){return()=>{var n;const l=[],s=(n=o.default)==null?void 0:n.call(o);return s&&l.push(t.h("div",{class:["mdc-card__media-content",e.contentClass]},s)),t.h("section",{class:{"mdc-card__media":1,"mdc-card__media--square":e.square,"mdc-card__media--16-9":e.wide&&!e.square},style:{backgroundImage:`url(${e.src})`}},l)}}},to={name:"mcw-card-primary-action",setup(e,{slots:o}){const n=t.ref(),{classes:l,styles:s}=F(n),i=t.computed(()=>({...l.value,"mdc-card__primary-action":1}));return()=>t.h(K,{ref:n,class:i.value,style:s,tabindex:"0"},()=>[o.default(),t.h("div",{class:"mdc-card__ripple"})])}},no={name:"mcw-card",props:{outlined:Boolean},setup(e,{attrs:o,slots:n}){return()=>{var l;const{outlined:s}=e;return t.h("div",{class:[{"mdc-card":1,"mdc-card--outlined":s}],...o},(l=n.default)==null?void 0:l.call(n))}}},st=V({mcwCard:no,mcwCardPrimaryAction:to,mcwCardMedia:eo,mcwCardActions:Jn,mcwCardActionButtons:Qn,mcwCardActionIcons:Zn}),oo={props:{activate:Function,deactivate:Function,alignEnd:Boolean,checkboxId:String},inheritAttrs:!1,setup(e,{slots:o}){const n=t.ref();let l;const s=!!o.label,i=t.computed(()=>({"mdc-form-field":s,"mdc-form-field--align-end":s&&e.alignEnd}));return t.onMounted(()=>{e.hasLabel&&(l=new Pe.MDCFormFieldFoundation({registerInteractionHandler:(a,r)=>{n.value.addEventListener(a,r)},deregisterInteractionHandler:(a,r)=>{n.value.removeEventListener(a,r)},activateInputRipple:()=>{e==null||e.activate()},deactivateInputRipple:()=>{e==null||e.deactivate()}}),l.init())}),t.onBeforeUnmount(()=>{l==null||l.destroy()}),()=>{var a,r;return s?t.h("div",{class:{"mdc-checkbox-wrapper":1,...i.value}},[(a=o.default)==null?void 0:a.call(o),t.h("label",{for:e.checkboxId,ref:n},[(r=o.label)==null?void 0:r.call(o)])]):o.default()}}};const rt=["checked","indeterminate"];let lo=0;var ue={name:"mcw-checkbox",props:{modelValue:{type:[Boolean,Array],default:()=>!1},indeterminate:{type:Boolean,default:()=>!1},disabled:Boolean,label:String,alignEnd:Boolean,value:{type:[String,Number],default(){return"on"}},name:String},inheritAttrs:!1,setup(e,{emit:o,slots:n}){const l=t.reactive({classes:{"mdc-checkbox":1},control:void 0,labelEl:void 0,root:void 0});let s;const i=`__mcw-checkbox-${lo++}`,{classes:a,styles:r,activate:g,deactivate:m}=F(t.toRef(l,"root"),{isUnbounded:()=>!0,isSurfaceActive:()=>D.matches(l.control,":active"),registerInteractionHandler:(d,h)=>{l.control.addEventListener(d,h,H.applyPassive())},deregisterInteractionHandler:(d,h)=>{l.control.removeEventListener(d,h,H.applyPassive())},computeBoundingRect:()=>l.root.getBoundingClientRect()}),c=t.computed(()=>({...a.value,...l.classes})),b=t.computed(()=>!!(e.label||n.default)),u=({target:{indeterminate:d,checked:h}})=>{if(o("update:indeterminate",d),Array.isArray(e.modelValue)){const p=e.modelValue.indexOf(e.value);h?p<0&&o("update:modelValue",[...e.modelValue,e.value]):p>-1&&o("update:modelValue",[...e.modelValue.slice(0,p),...e.modelValue.slice(p+1)])}else O(l.root,"mdccheckbox:change",{},!0),o("update:modelValue",h)},S=()=>l.control.checked,C={addClass:d=>l.classes={...l.classes,[d]:!0},forceLayout:()=>l.root.offsetWidth,hasNativeControl:()=>!0,isAttachedToDOM:()=>!0,isChecked:()=>l.control.checked,isIndeterminate:()=>l.control.indeterminate,removeClass:d=>{const{[d]:h,...p}=l.classes;l.classes=p},removeNativeControlAttr:d=>{l.control.removeAttribute(d)},setNativeControlAttr:(d,h)=>{l.control.setAttribute(d,h)},setNativeControlDisabled:d=>l.control.disabled=d},y=()=>s.handleAnimationEnd(),f=d=>{l.control.checked=Array.isArray(d)?d.includes(e.value):d},E=d=>{l.control&&(l.control.indeterminate=d)},x=()=>{const d=l.control,h=Object.getPrototypeOf(d);for(const p of rt){const A=Object.getOwnPropertyDescriptor(h,p);if(it(A)){const $={get:A.get,set:M=>{A.set.call(d,M),s.handleChange()},configurable:A.configurable,enumerable:A.enumerable};Object.defineProperty(d,p,$)}}},v=()=>{const d=l.control,h=Object.getPrototypeOf(d);for(const p of rt){const A=Object.getOwnPropertyDescriptor(h,p);it(A)&&Object.defineProperty(d,p,A)}};t.watch(()=>e.disabled,(d,h)=>{d!=h&&(s==null||s.setDisabled(d))}),t.watch(()=>e.modelValue,(d,h)=>{d!=h&&f(d)}),t.watch(()=>e.indeterminate,(d,h)=>{d!=h&&E(d)});const B={setIndeterminate:E,isChecked:S,setChecked:f,isIndeterminate:()=>l.control.indeterminate};return t.onMounted(()=>{s=new jt.MDCCheckboxFoundation(C),l.root.addEventListener(He.getCorrectEventName(window,"animationend"),y),l.root.__checkboxHelpers=B,x(),s.init(),f(e.modelValue),s.setDisabled(e.disabled),E(e.indeterminate)}),t.onBeforeUnmount(()=>{l.root.removeEventListener(He.getCorrectEventName(window,"animationend"),y),v(),s.destroy()}),{...t.toRefs(l),rootClasses:c,onChange:u,styles:r,hasLabel:b,setChecked:f,setIndeterminate:E,isChecked:S,checkboxId:i,activate:g,deactivate:m}},components:{checkboxContent:oo}};function it(e){return!!e&&typeof e.set=="function"}const ao=["id","name","value"],so=t.createElementVNode("div",{class:"mdc-checkbox__background"},[t.createElementVNode("svg",{class:"mdc-checkbox__checkmark",viewBox:"0 0 24 24"},[t.createElementVNode("path",{class:"mdc-checkbox__checkmark-path",fill:"none",d:"M1.73,12.91 8.1,19.28 22.79,4.59"})]),t.createElementVNode("div",{class:"mdc-checkbox__mixedmark"})],-1),ro=t.createElementVNode("div",{class:"mdc-checkbox__ripple"},null,-1),io=t.createElementVNode("div",{class:"mdc-checkbox__focus-ring"},null,-1);function co(e,o,n,l,s,i){const a=t.resolveComponent("checkbox-content");return t.openBlock(),t.createBlock(a,{activate:e.activate,deactivate:e.deactivate,checkboxId:e.checkboxId},t.createSlots({default:t.withCtx(()=>[t.createElementVNode("div",t.mergeProps({ref:"root",class:e.rootClasses,style:e.styles},e.$attrs),[t.createElementVNode("input",{id:e.checkboxId,ref:"control",name:e.name,value:e.value,type:"checkbox",class:"mdc-checkbox__native-control",onChange:o[0]||(o[0]=(...r)=>e.onChange&&e.onChange(...r))},null,40,ao),so,ro,io],16)]),_:2},[e.hasLabel?{name:"label",fn:t.withCtx(()=>[t.renderSlot(e.$slots,"default",{},()=>[t.createTextVNode(t.toDisplayString(e.label),1)])]),key:"0"}:void 0]),1032,["activate","deactivate","checkboxId"])}ue.render=co,ue.__file="src/checkbox/checkbox.vue";var ct=V({mcwCheckbox:ue}),pe={props:{primary:{type:Boolean},trailingAction:{type:Boolean},icon:{type:String},presentational:{type:Boolean}},setup(e){const o=t.reactive({rippleEl:void 0,root:void 0}),{classes:n,styles:l}=F(t.toRef(o,"root"),{unbounded:!0,computeBoundingRect:()=>o.rippleEl.getBoundingClientRect()}),s=t.inject("registerAction"),i=t.inject("mcwChipSet"),a=t.computed(()=>({...n.value,...o.classes,"mdc-evolution-chip__action--presentational":e.presentational}));let r;const g=i.role==="listbox",m={emitEvent:(B,d)=>{O(o.root,B,d,!0)},focus:()=>{o.root.focus()},getAttribute:B=>o.root.getAttribute(B),getElementID:()=>o.root.id,removeAttribute:B=>{o.root.removeAttribute(B)},setAttribute:(B,d)=>{o.root.setAttribute(B,d)}},c=B=>{r.setDisabled(B)},b=()=>r.isDisabled(),u=B=>{r.setFocus(B)},S=()=>r.isFocusable(),C=B=>{r.setSelected(B)},y=()=>r.isSelected(),f=()=>r.isSelectable(),E=()=>r.actionType(),x=()=>{r.handleClick()},v=B=>r.handleKeydown(B);return t.onMounted(()=>{r=e.primary?new qe.MDCChipPrimaryActionFoundation(m):new qe.MDCChipTrailingActionFoundation(m),r.init(),s(t.getCurrentInstance().ctx)}),{...t.toRefs(o),classes:a,styles:l,setDisabled:c,isDisabled:b,setFocus:u,isFocusable:S,setSelected:C,isSelected:y,isSelectable:f,actionType:E,isFilter:g,handleClick:x,handleKeydown:v}}};const mo={ref:"rippleEl",class:"mdc-evolution-chip__ripple mdc-evolution-chip__ripple--primary"},uo={class:"mdc-evolution-chip__graphic"},po={key:0,class:"mdc-evolution-chip__icon mdc-evolution-chip__icon--primary material-icons"},ho=t.createElementVNode("span",{class:"mdc-evolution-chip__checkmark"},[t.createElementVNode("svg",{class:"mdc-evolution-chip__checkmark-svg",viewBox:"-2 -3 30 30"},[t.createElementVNode("path",{class:"mdc-evolution-chip__checkmark-path",fill:"none",stroke:"black",d:"M1.73,12.91 8.1,19.28 22.79,4.59"})])],-1),go=t.createElementVNode("span",{class:"mdc-evolution-chip__text-label"},"Chip label",-1),fo={ref:"rippleEl",class:"mdc-evolution-chip__ripple mdc-evolution-chip__ripple--primary"},bo={key:0,class:"mdc-evolution-chip__graphic"},Co={class:"mdc-evolution-chip__icon mdc-evolution-chip__icon--primary material-icons"},yo={class:"mdc-evolution-chip__text-label"},Eo={ref:"rippleEl",class:"mdc-evolution-chip__ripple mdc-evolution-chip__ripple--trailing"},So={class:"mdc-evolution-chip__icon mdc-evolution-chip__icon--trailing material-icons"};function wo(e,o,n,l,s,i){return e.primary?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[e.isFilter?(t.openBlock(),t.createElementBlock("span",{key:0,ref:"root",class:"mdc-evolution-chip__action mdc-evolution-chip__action--primary",role:"option","aria-selected":"false",tabindex:"0",onClick:o[0]||(o[0]=(...a)=>e.handleClick&&e.handleClick(...a)),onKeydown:o[1]||(o[1]=(...a)=>e.handleKeydown&&e.handleKeydown(...a))},[t.createElementVNode("span",mo,null,512),t.createElementVNode("span",uo,[e.icon?(t.openBlock(),t.createElementBlock("span",po,t.toDisplayString(e.icon),1)):t.createCommentVNode("v-if",!0),t.createCommentVNode(" optional "),ho]),go],544)):(t.openBlock(),t.createElementBlock("button",{key:1,ref:"root",class:t.normalizeClass(["mdc-evolution-chip__action mdc-evolution-chip__action--primary",e.classes]),style:t.normalizeStyle(e.styles),type:"button",tabindex:"0"},[t.createElementVNode("span",fo,null,512),e.icon?(t.openBlock(),t.createElementBlock("span",bo,[t.createElementVNode("span",Co,t.toDisplayString(e.icon),1)])):t.createCommentVNode("v-if",!0),t.createElementVNode("span",yo,[t.renderSlot(e.$slots,"default")])],6))],64)):(t.openBlock(),t.createElementBlock("button",{key:1,ref:"root",class:"mdc-evolution-chip__action mdc-evolution-chip__action--trailing",type:"button",tabindex:"-1","data-mdc-deletable":"true",onClick:o[2]||(o[2]=(...a)=>e.handleClick&&e.handleClick(...a)),onKeydown:o[3]||(o[3]=(...a)=>e.handleKeydown&&e.handleKeydown(...a))},[t.createElementVNode("span",Eo,null,512),t.createElementVNode("span",So,[t.renderSlot(e.$slots,"default")])],544))}pe.render=wo,pe.__file="src/chips/chip-action.vue";var he={name:"mcw-chip-checkmark",setup(){const e=t.ref(0),o=t.ref();return t.onMounted(()=>e.value=o.value.getBoundingClientRect().height),{width:e,root:o}}};const Ao={ref:"root",class:"mdc-chip__checkmark"},_o=t.createElementVNode("svg",{class:"mdc-chip__checkmark-svg",viewBox:"-2 -3 30 30"},[t.createElementVNode("path",{class:"mdc-chip__checkmark-path",fill:"none",stroke:"black",d:"M1.73,12.91 8.1,19.28 22.79,4.59"})],-1),ko=[_o];function Io(e,o,n,l,s,i){return t.openBlock(),t.createElementBlock("span",Ao,ko,512)}he.render=Io,he.__file="src/chips/chip-checkmark.vue";var ge={name:"mcw-chip-set",props:{multiSelectable:{type:Boolean},orientation:{type:String,default:()=>"horizontal"},overflow:{type:Boolean},role:{type:String,default:()=>"grid"}},setup(e){const o=t.reactive({classes:{"mdc-evolution-chip-set--overflow":e.overflow},myListeners:{},attrs:{},root:void 0});let n;const l=[];e.role=="listbox"&&(o.attrs["aria-orientation"]=e.orientation,e.multiSelectable&&(o.attrs["aria-multiselectable"]="true")),t.provide("registerChip",c=>{l.push(c)});const s=c=>c>-1&&c<l.length,i={announceMessage:c=>{Zt.announce(c)},emitEvent:(c,b)=>{O(o.root,c,b,!0)},getAttribute:c=>o.root.getAttribute(c),getChipActionsAtIndex:c=>s(c)?l[c].getActions():[],getChipCount:()=>l.length,getChipIdAtIndex:c=>s(c)?l[c].getElementID():"",getChipIndexById:c=>l.findIndex(b=>b.getElementID()===c),isChipFocusableAtIndex:(c,b)=>s(c)?l[c].isActionFocusable(b):!1,isChipSelectableAtIndex:(c,b)=>s(c)?l[c].isActionSelectable(b):!1,isChipSelectedAtIndex:(c,b)=>s(c)?l.value[c].isActionSelected(b):!1,removeChipAtIndex:c=>{!s(c)||(l[c].remove(),l.splice(c,1))},setChipFocusAtIndex:(c,b,u)=>{!s(c)||l[c].setActionFocus(b,u)},setChipSelectedAtIndex:(c,b,u)=>{!s(c)||l[c].setActionSelected(b,u)},startChipAnimationAtIndex:(c,b)=>{!s(c)||l[c].startAnimation(b)}};t.provide("mcwChipSet",{role:e.role,singleSelection:!e.multiSelectable});const a=c=>{n.handleChipAnimation(c)},r=c=>{n.handleChipInteraction(c)},g=c=>n.handleChipNavigation(c),m=c=>{!s(c)||(l[c].remove(),l.splice(c,1))};return t.onMounted(()=>{n=new Qt.MDCChipSetFoundation(i),n.init()}),t.onBeforeUnmount(()=>{n.destroy()}),{...t.toRefs(o),handleChipAnimation:a,handleChipInteraction:r,handleChipNavigation:g,removeChip:m}}};const xo=["role"],Bo={class:"mdc-evolution-chip-set__chips",role:"presentation"};function vo(e,o,n,l,s,i){return t.openBlock(),t.createElementBlock("span",t.mergeProps({ref:"root",class:["mdc-evolution-chip-set",e.classes],role:e.role,"onMdcchip:animation":o[0]||(o[0]=(...a)=>e.handleChipAnimation&&e.handleChipAnimation(...a)),"onMdcchip:interaction":o[1]||(o[1]=(...a)=>e.handleChipInteraction&&e.handleChipInteraction(...a)),"onMdcchip:navigation":o[2]||(o[2]=(...a)=>e.handleChipNavigation&&e.handleChipNavigation(...a))},e.attrs),[t.createElementVNode("span",Bo,[t.renderSlot(e.$slots,"default")])],16,xo)}ge.render=vo,ge.__file="src/chips/chip-set.vue";let To=0;var fe={name:"mcw-chip",props:{leadingIcon:[String],trailingIcon:[String],avatar:{type:Boolean},shouldRemoveOnTrailingIconClick:{type:Boolean,default(){return!0}},disabled:{type:Boolean},selected:{type:Boolean},presentational:{type:Boolean}},setup(e,{slots:o}){const n=t.reactive({classes:{"mdc-evolution-chip--disabled":e.disabled,"mdc-evolution-chip--selected":e.selected},leadingClasses:{"mdc-chip__icon":1,"mdc-chip__icon--leading":1,"material-icons":1},styles:{},myListeners:{},root:void 0,checkmarkEl:void 0,trailingAction:void 0}),l=t.inject("registerChip"),s=t.inject("mcwChipSet"),i=To++;let a;const r=new Map;t.provide("registerAction",k=>{r.set(k.actionType(),k)});const g={addClass:k=>n.classes={...n.classes,[k]:!0},emitEvent:(k,w)=>{O(n.root,k,w,!0)},getActions:()=>{const k=[];for(const[w]of r)k.push(w);return k},getAttribute:k=>n.root.getAttribute(k),getElementID:()=>n.root.id,getOffsetWidth:()=>n.root.offsetWidth,hasClass:k=>n.root.classList.contains(k),isActionSelectable:k=>{const w=r.get(k);return w?w.isSelectable():!1},isActionSelected:k=>{const w=r.get(k);return w?w.isSelected():!1},isActionFocusable:k=>{const w=r.get(k);return w?w.isFocusable():!1},isActionDisabled:k=>{const w=r.get(k);return w?w.isDisabled():!1},isRTL:()=>window.getComputedStyle(n.root).getPropertyValue("direction")==="rtl",removeClass:k=>{const{[k]:w,...R}=n.classes;n.classes=R},setActionDisabled:(k,w)=>{const R=r.get(k);R&&R.setDisabled(w)},setActionFocus:(k,w)=>{const R=r.get(k);R&&R.setFocus(w)},setActionSelected:(k,w)=>{const R=r.get(k);R&&R.setSelected(w)},setStyleProperty:(k,w)=>n.styles={...n.styles,[k]:w}},m=t.computed(()=>{const k=o["leading-icon"];return k&&k[0]||!!e.leadingIcon}),c=t.computed(()=>{const k=o["trailing-icon"];return k&&k[0]||!!e.trailingIcon}),b=t.computed(()=>({...n.classes,"mdc-evolution-chip--with-trailing-action":c.value,"mdc-evolution-chip--with-primary-graphic":m.value||s.role==="listbox","mdc-evolution-chip--with-primary-icon":m.value,"mdc-evolution-chip--selectable":s.role==="listbox","mdc-evolution-chip--filter":s.role==="listbox","mdc-evolution-chip--with-avatar":e.avatar})),u=()=>{n.root.parentNode!==null&&n.root.remove()},S=()=>a.getActions(),C=()=>a.getElementID(),y=()=>a.isDisabled(),f=k=>{a.setDisabled(k)},E=k=>a.isActionFocusable(k),x=k=>a.isActionSelectable(k),v=k=>a.isActionSelected(k),B=(k,w)=>{a.setActionFocus(k,w)},d=(k,w)=>{a.setActionSelected(k,w)},h=k=>{a.startAnimation(k)};l(t.getCurrentInstance().ctx);const p=k=>{a.handleActionInteraction(k)},A=k=>{a.handleActionNavigation(k)},$=k=>{a.handleAnimationEnd(k)},M=k=>{a.handleTransitionEnd(k)};return t.onMounted(()=>{a=new Jt.MDCChipFoundation(g),a.init()}),t.onBeforeUnmount(()=>{a.destroy()}),{...t.toRefs(n),classes:b,id:i,remove:u,getActions:S,getElementID:C,isDisabled:y,setDisabled:f,isActionFocusable:E,isActionSelectable:x,isActionSelected:v,setActionFocus:B,setActionSelected:d,startAnimation:h,hasleadingIcon:m,hasTrailingAction:c,handleAnimationEnd:$,handleActionInteraction:p,handleActionNavigation:A,handleTransitionEnd:M}}};const Vo={class:"mdc-evolotion-chip__cell mdc-evolution-chip__cell--primary",role:"gridcell"},No={key:0,class:"mdc-evolution-chip__cell mdc-evolution-chip__cell--trailing",role:"gridcell"};function Lo(e,o,n,l,s,i){const a=t.resolveComponent("mcw-chip-action");return t.openBlock(),t.createElementBlock("span",{ref:"root",class:t.normalizeClass(["mdc-evolution-chip",e.classes]),role:"row","onMdcchipaction:interaction":o[0]||(o[0]=(...r)=>e.handleActionInteraction&&e.handleActionInteraction(...r)),"onMdcchipaction:navigation":o[1]||(o[1]=(...r)=>e.handleActionNavigation&&e.handleActionNavigation(...r)),onAnimationend:o[2]||(o[2]=(...r)=>e.handleAnimationEnd&&e.handleAnimationEnd(...r)),onTransitionend:o[3]||(o[3]=(...r)=>e.handleTransitionEnd&&e.handleTransitionEnd(...r))},[t.createElementVNode("span",Vo,[t.createVNode(a,{primary:"",icon:e.leadingIcon,presentational:e.presentational},{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default")]),_:3},8,["icon","presentational"])]),e.hasTrailingAction?(t.openBlock(),t.createElementBlock("span",No,[t.createVNode(a,{"trailing-action":""},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.trailingIcon),1)]),_:1})])):t.createCommentVNode("v-if",!0)],34)}fe.render=Lo,fe.__file="src/chips/chip.vue";var dt=V({mcwChip:fe,mcwChipSet:ge,mcwChipCheckmark:he,mcwChipAction:pe}),be={name:"mcw-circular-progress",props:{open:{type:Boolean,default:!0},indeterminate:Boolean,medium:Boolean,progress:{type:[Number,String],validator(e){return Number(e)>=0&&Number(e)<=1}},tag:{type:String,default:"div"},label:{type:String},fourColor:Boolean},setup(e){const o=t.reactive({classes:{"mdc-circular-progress":1,"mdc-circular-progress--medium":e.medium,"mdc-circular-progress--large":!e.medium},rootAttrs:e.medium?{style:{width:"36px",height:"36px"}}:{style:{width:"48px",height:"48px"}},circleAttrs:Ce(e.medium,!1),trackAttrs:$o(e.medium),indeterminateAttrs:Ce(e.medium,!0),viewbox:e.medium?"0 0 36 36":"0 0 48 48",root:void 0});let n;const l={addClass:r=>{o.classes={...o.classes,[r]:!0}},getDeterminateCircleAttribute:r=>o.circleAttrs[r],hasClass:r=>o.root.classList.contains(r),removeClass:r=>{const{[r]:g,...m}=o.classes;o.classes=m},removeAttribute:r=>{const{[r]:g,...m}=o.rootAttrs;o.rootAttrs=m},setAttribute:(r,g)=>{o.rootAttrs={...o.rootAttrs,[r]:g}},setDeterminateCircleAttribute:(r,g)=>o.circleAttrs={...o.circleAttrs,[r]:g}},s=t.computed(()=>({role:"progressbar","aria-valuemin":"0","aria-valuemax":"1","aria-label":e.label,...o.rootAttrs}));t.watch(()=>e.open,r=>{r?n.open():n.close()}),t.watch(()=>e.progress,r=>{n.setProgress(Number(r))}),t.watch(()=>e.indeterminate,r=>{n.setDeterminate(!r)});const i=r=>e.fourColor?`mdc-circular-progress__color-${r}`:void 0,a=Array.from({length:e.fourColor?4:1},(r,g)=>g+1);return t.onMounted(()=>{n=new en.MDCCircularProgressFoundation(l),n.init(),n.setProgress(Number(e.progress)),n.setDeterminate(!e.indeterminate),e.open?n.open():n.close()}),t.onBeforeUnmount(()=>n.destroy()),{...t.toRefs(o),rootAttributes:s,colors:a,colorClass:i}}};function Ce(e=!1,o=!0){return e?{cx:"16",cy:"16",r:"12.5","stroke-dasharray":"78.54","stroke-dashoffset":o?"39.27":"78.54","stroke-width":"3"}:{cx:"24",cy:"24",r:"18","stroke-dasharray":"113.097","stroke-dashoffset":o?"56.549":"113.097","stroke-width":"4"}}function $o(e=!1){const{["stroke-dasharray"]:o,["stroke-dashoffset"]:n,...l}=Ce(e);return l}const Ro={class:"mdc-circular-progress__determinate-container"},Oo=["viewBox"],Do={class:"mdc-circular-progress__indeterminate-container"},Mo={class:"mdc-circular-progress__circle-clipper mdc-circular-progress__circle-left"},Fo=["viewBox"],Po={class:"mdc-circular-progress__gap-patch"},Ho=["viewBox"],qo={class:"mdc-circular-progress__circle-clipper mdc-circular-progress__circle-right"},Uo=["viewBox"];function Wo(e,o,n,l,s,i){return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createCommentVNode("must be no space between divs"),t.createCommentVNode(" prettier-ignore "),t.createElementVNode("div",t.mergeProps({ref:"root",class:e.classes,role:"progressbar"},e.rootAttributes),[t.createElementVNode("div",Ro,[(t.openBlock(),t.createElementBlock("svg",{class:"mdc-circular-progress__determinate-circle-graphic",viewBox:e.viewbox,xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("circle",t.mergeProps({class:"mdc-circular-progress__determinate-track"},e.trackAttrs),null,16),t.createElementVNode("circle",t.mergeProps({class:"mdc-circular-progress__determinate-circle"},e.circleAttrs),null,16)],8,Oo))]),t.createElementVNode("div",Do,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.colors,a=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["mdc-circular-progress__spinner-layer",e.colorClass(a)]),key:a},[t.createElementVNode("div",Mo,[(t.openBlock(),t.createElementBlock("svg",{class:"mdc-circular-progress__indeterminate-circle-graphic",viewBox:e.viewbox,xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("circle",t.normalizeProps(t.guardReactiveProps(e.indeterminateAttrs)),null,16)],8,Fo)),t.createCommentVNode("must be no space between divs")]),t.createElementVNode("div",Po,[(t.openBlock(),t.createElementBlock("svg",{class:"mdc-circular-progress__indeterminate-circle-graphic",viewBox:e.viewbox,xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("circle",t.normalizeProps(t.guardReactiveProps(e.indeterminateAttrs)),null,16)],8,Ho))]),t.createElementVNode("div",qo,[(t.openBlock(),t.createElementBlock("svg",{class:"mdc-circular-progress__indeterminate-circle-graphic",viewBox:e.viewbox,xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("circle",t.normalizeProps(t.guardReactiveProps(e.indeterminateAttrs)),null,16)],8,Uo))])],2))),128))])],16)],2112)}be.render=Wo,be.__file="src/circular-progress/circular-progress.vue";var mt=V({mcwCircularProgress:be});const zo=e=>{switch(e){case N.SortValue.ASCENDING:return N.messages.SORTED_IN_ASCENDING;case N.SortValue.DESCENDING:return N.messages.SORTED_IN_DESCENDING;default:return""}};var Ko={name:"mcw-data-table",props:{sticky:{type:Boolean}},setup(e,{emit:o,expose:n,slots:l}){const s=t.reactive({classes:{"mdc-data-table":!0,"mdc-data-table--sticky-header":e.sticky}}),i=t.ref();let a,r,g=[],m,c;const b=()=>a.getRows(),u=()=>a.layout(),S=h=>b()[h],C=()=>a.getSelectedRowIds(),y=()=>[...i.value.querySelectorAll(N.selectors.HEADER_CELL)],f=h=>S(h).getAttribute(N.dataAttributes.ROW_ID),E={addClass:h=>s.classes={...s.classes,[h]:!0},removeClass:h=>{const{[h]:p,...A}=s.classes;s.classes=A},getHeaderCellElements:()=>y(),getHeaderCellCount:()=>y().length,getAttributeByHeaderCellIndex:(h,p)=>y()[h].getAttribute(p),setAttributeByHeaderCellIndex:(h,p,A)=>y()[h].setAttribute(p,A),setClassNameByHeaderCellIndex:(h,p)=>y()[h].classList.add(p),removeClassNameByHeaderCellIndex:(h,p)=>y()[h].classList.remove(p),notifySortAction:h=>{o("mdc-data-table:sorted",{data:h},!0)},getTableContainerHeight:()=>{const h=i.value.querySelector`.${N.cssClasses.CONTAINER}`;if(!h)throw new Error("MDCDataTable: Table container element not found.");return h.getBoundingClientRect().height},getTableHeaderHeight:()=>{const h=i.value.querySelector(N.selectors.HEADER_ROW);if(!h)throw new Error("MDCDataTable: Table header element not found.");return h.getBoundingClientRect().height},setProgressIndicatorStyles:h=>{const p=i.value.querySelector(N.selectors.PROGRESS_INDICATOR);if(!p)throw new Error("MDCDataTable: Progress indicator element not found.");Object.assign(p.style,h)},addClassAtRowIndex:(h,p)=>b()[h].classList.add(p),getRowCount:()=>b().length,getRowElements:()=>[...i.value.querySelectorAll(N.selectors.ROW)],getRowIdAtIndex:h=>b()[h].getAttribute(N.dataAttributes.ROW_ID),getRowIndexByChildElement:h=>b().indexOf(D.closest(h,N.selectors.ROW)),getSelectedRowCount:()=>i.value.querySelectorAll(N.selectors.ROW_SELECTED).length,isCheckboxAtRowIndexChecked:h=>g[h].isChecked(),isHeaderRowCheckboxChecked:()=>c.isChecked(),isRowsSelectable:()=>!!i.value.querySelector(N.selectors.ROW_CHECKBOX),notifyRowSelectionChanged:h=>{o("mdcdatatable:rowselectionchanged",{row:S(h.rowIndex),rowId:f(h.rowIndex),rowIndex:h.rowIndex,selected:h.selected})},notifySelectedAll:()=>o("mdcdatatable:selectedall",{}),notifyUnselectedAll:()=>o("mdcdatatable:unselectedall",{}),registerHeaderRowCheckbox:()=>{c=i.value.querySelector(N.selectors.HEADER_ROW_CHECKBOX).__checkboxHelpers},registerRowCheckboxes:()=>{g=[];for(const h of b()){const p=h.querySelector(N.selectors.ROW_CHECKBOX).__checkboxHelpers;g.push(p)}},removeClassAtRowIndex:(h,p)=>b()[h].classList.remove(p),setAttributeAtRowIndex:(h,p,A)=>b()[h].setAttribute(p,A),setHeaderRowCheckboxChecked:h=>c.setChecked(h),setHeaderRowCheckboxIndeterminate:h=>c.setIndeterminate(h),setRowCheckboxCheckedAtIndex:(h,p)=>g[h].setChecked(p),setSortStatusLabelByHeaderCellIndex:(h,p)=>{const A=y()[h].querySelector(N.selectors.SORT_STATUS_LABEL);!A||(A.textContent=zo(p))}},x=h=>{const p=D.closest(h.target,N.selectors.HEADER_CELL_WITH_SORT);if(!p)return;const A=p.getAttribute(N.dataAttributes.COLUMN_ID),$=y().indexOf(p);$!==-1&&a.handleSortAction({columnId:A,columnIndex:$,headerCell:p})},v=()=>a.handleHeaderRowCheckboxChange(),B=h=>a.handleRowCheckboxChange(h),d=h=>{const p=D.closest(h.target,N.selectors.ROW);!p||a.handleRowClick({rowId:Xo(p),row:p})};return t.onMounted(()=>{r=i.value.querySelector(`.${N.cssClasses.HEADER_ROW}`),r.addEventListener("mdccheckbox:change",v),r.addEventListener("click",x),m=i.value.querySelector(`.${N.cssClasses.CONTENT}`),m.addEventListener("click",d),m.addEventListener("mdccheckbox:change",B),a=new N.MDCDataTableFoundation(E),a.init(),u()}),t.onBeforeUnmount(()=>{r.removeEventListener("mdccheckbox:change",v),r.removeEventListener("click",x),m.removeEventListener("mdccheckbox:change",B),m.removeEventListener("click",d),a.destroy()}),n({getSelectedRowIds:C,layout:u}),()=>t.h("div",{ref:i,class:s.classes},[t.h("div",{class:"mdc-data-table__table-container"},[l.default()])])}};function Xo(e){return e.getAttribute(N.dataAttributes.ROW_ID)}var ut=V({mcwDataTable:Ko}),Go={name:"mcw-dialog-button",props:{action:String,isDefault:Boolean,isInitialFocus:Boolean},setup(e,{attrs:o,slots:n}){return()=>t.h(t.resolveComponent("mcw-button"),{...o,class:["mdc-button","mdc-dialog__button"],"data-mdc-dialog-action":e.action,"data-mdc-dialog-button-default":e.isDefault,"data-mdc-dialog-initial-focus":e.isInitialFocus},{default:()=>{var l;return(l=n.default)==null?void 0:l.call(n)}})}},Yo={name:"mcw-dialog-content",props:{tag:{type:String,default(){return"div"}}},setup(e,{slots:o}){return()=>{var n;return t.h(e.tag,{class:["mdc-dialog__content"]},(n=o.default)==null?void 0:n.call(o))}}},jo={name:"mcw-dialog-footer",props:{tag:{type:String,default(){return"div"}}},setup(e,{slots:o}){return()=>{var n;return t.h(e.tag,{class:["mdc-dialog__actions"]},(n=o.default)==null?void 0:n.call(o))}}},Qo={name:"mcw-dialog-title",props:{tag:{type:String,default(){return"h2"}}},setup(e,{slots:o}){return()=>{var n;return t.h(e.tag,{class:["mdc-dialog__title"]},(n=o.default)==null?void 0:n.call(o))}}};const{cssClasses:Zo,strings:U}=Ue.MDCDialogFoundation,pt=["resize","orientationchange"],ht=e=>e?e.querySelector(`[${U.INITIAL_FOCUS_ATTRIBUTE}="true"]`)||e.querySelector(`[${U.INITIAL_FOCUS_ATTRIBUTE}]`):void 0,Jo=(e,o)=>new se.FocusTrap(e,o);var ye={name:"mcw-dialog",components:{mcwButton:Z},props:{autoStackButtons:Boolean,escapeKeyAction:String,scrollable:Boolean,modelValue:Boolean,role:String,scrimClickAction:{type:String,default:"close"},tag:{type:String,default:"div"},ariaLabelledby:String,ariaDescribedby:String},setup(e,{emit:o}){const n=t.reactive({classes:{"mdc-dialog":1},styles:{},container:void 0,root:void 0});let l,s,i,a,r;const g=()=>{l.layout()},m=C=>{l.handleDocumentKeydown(C)},c=C=>{l.handleClick(C)},b=C=>{l.handleKeydown(C)},u=C=>{C?(n.container&&(a=ie.createFocusTrapInstance(n.root,Jo,ht(n.root)||void 0)),l.open()):l.close()},S={addClass:C=>n.classes={...n.classes,[C]:!0},removeClass:C=>{const{[C]:y,...f}=n.classes;n.classes=f},hasClass:C=>n.root.classList.contains(C),addBodyClass:C=>document.body.classList.add(C),removeBodyClass:C=>document.body.classList.remove(C),eventTargetMatches:(C,y)=>D.matches(C,y),trapFocus:()=>a==null?void 0:a.trapFocus(),releaseFocus:()=>a==null?void 0:a.releaseFocus(),getInitialFocusEl:()=>ht(n.root),isContentScrollable:()=>ie.isScrollable(s),areButtonsStacked:()=>ie.areTopsMisaligned(i),getActionFromEvent:C=>{const y=D.closest(C.target,`[${U.ACTION_ATTRIBUTE}]`);return y==null?void 0:y.getAttribute(U.ACTION_ATTRIBUTE)},clickDefaultButton:()=>{r&&!r.disabled&&r.click()},reverseButtons:()=>{const C=i;return C&&C.reverse().forEach(y=>{var f;return(f=y.parentElement)==null?void 0:f.appendChild(y)})},notifyOpening:()=>{o("mdcdialog:opening",{});for(const C of pt)window.addEventListener(C,g);document.addEventListener("keydown",m)},notifyOpened:()=>o("mdcdialog:opened",{}),notifyClosing:C=>{o("update:modelValue",!1),o("mdcdialog:closing",C?{action:C}:{});for(const y of pt)window.removeEventListener(y,g);document.removeEventListener("keydown",m)},notifyClosed:C=>{o("mdcdialog:closed",C?{action:C}:{})}};return t.watch(()=>e.modelValue,C=>{u(C)}),t.onMounted(()=>{const{modelValue:C,autoStackButtons:y,escapeKeyAction:f,scrimClickAction:E}=e;if(i=Array.prototype.slice.call(n.root.querySelectorAll(Zo.BUTTON)),r=n.root.querySelector(`[${U.BUTTON_DEFAULT_ATTRIBUTE}]`),!n.root.querySelector(U.CONTAINER_SELECTOR))throw new Error(`Dialog component requires a ${U.CONTAINER_SELECTOR} container element`);s=n.root.querySelector(U.CONTENT_SELECTOR),l=new Ue.MDCDialogFoundation(S),l.init(),y||l.setAutoStackButtons(y),typeof f=="string"&&l.setEscapeKeyAction(f),typeof E=="string"&&l.setScrimClickAction(E),u(C)}),t.onBeforeUnmount(()=>{l.destroy()}),{...t.toRefs(n),handleLayout:g,handleDocumentKeyDown:m,onKeydown:b,onClick:c}}};const el={ref:"container",class:"mdc-dialog__container"},tl=["aria-labelledby","aria-describedby"],nl=t.createElementVNode("div",{class:"mdc-dialog__scrim"},null,-1);function ol(e,o,n,l,s,i){return t.openBlock(),t.createElementBlock("div",{ref:"root",class:t.normalizeClass(e.classes),style:t.normalizeStyle(e.styles),onClick:o[0]||(o[0]=(...a)=>e.onClick&&e.onClick(...a)),onKeydown:o[1]||(o[1]=(...a)=>e.onKeydown&&e.onKeydown(...a))},[t.createElementVNode("div",el,[t.createElementVNode("div",{ref:"surface",class:"mdc-dialog__surface",role:"alertdialog","aria-modal":"true","aria-labelledby":e.ariaLabelledby,"aria-describedby":e.ariaDescribedby},[t.renderSlot(e.$slots,"default")],8,tl)],512),nl],38)}ye.render=ol,ye.__file="src/dialog/dialog.vue";var gt=V({mcwDialog:ye,mcwDialogTitle:Qo,mcwDialogFooter:jo,mcwDialogButton:Go,mcwDialogContent:Yo});const{strings:ft,cssClasses:ll}=We.MDCDismissibleDrawerFoundation,al=(e,o)=>new se.FocusTrap(e,o);var Ee={name:"mcw-drawer",props:{modelValue:Boolean,modal:Boolean,dismissible:Boolean,toolbarSpacer:Boolean},setup(e,{emit:o}){const n=t.reactive({classes:{"mdc-drawer":1,"mdc-drawer--modal":e.modal,"mdc-drawer--dismissible":e.dismissible&&!e.modal},drawer:void 0}),l=()=>r.open(),s=()=>r.close(),i=()=>r.isOpen()?r.close():r.open(),a=()=>r.isOpen();let r,g,m;const c=()=>r.handleScrimClick(),b=f=>r.handleKeydown(f),u=f=>r.handleTransitionEnd(f),S=f=>o("update:modelValue",f),C=()=>e.modal&&s(),y={addClass:f=>n.classes={...n.classes,[f]:!0},removeClass:f=>{const{[f]:E,...x}=n.classes;n.classes=x},hasClass:f=>!!n.classes[f],elementHasClass:(f,E)=>f.classList.contains(E),saveFocus:()=>{m=document.activeElement},restoreFocus:()=>{(m==null?void 0:m.focus)&&n.drawer.contains(document.activeElement)&&m.focus()},focusActiveNavigationItem:()=>{const f=n.drawer.querySelector(`.${ln.MDCListFoundation.cssClasses.LIST_ITEM_ACTIVATED_CLASS}`);f&&f.focus()},notifyClose:()=>{O(n.drawer,ft.CLOSE_EVENT,{},!0),o("update:modelValue",!1),o("close")},notifyOpen:()=>{O(n.drawer,ft.OPEN_EVENT,{},!0),o("update:modelValue",!0),o("open")},trapFocus:()=>g.trapFocus(),releaseFocus:()=>g.releaseFocus()};return t.watch(()=>e.modelValue,f=>{f?r==null||r.open():r==null||r.close()}),t.onMounted(()=>{const{DISMISSIBLE:f,MODAL:E}=ll;if(e.dismissible)r=new We.MDCDismissibleDrawerFoundation(y);else if(e.modal)r=new nn.MDCModalDrawerFoundation(y);else throw new Error(`mcwDrawer: Failed to instantiate component. Supported variants are ${f} and ${E}.`);r.init(),e.modal&&(g=In.createFocusTrapInstance(n.drawer,al))}),t.onBeforeUnmount(()=>{r.close(),r.destroy(),r=void 0}),{...t.toRefs(n),onChange:S,show:l,close:s,toggle:i,isOpen:a,onListAction:C,handleScrimClick:c,handleKeydown:b,handleTransitionEnd:u}}};const sl={class:"mdc-drawer__content"},rl={key:1,class:"drawer-wrapper"},il={class:"mdc-drawer__content"};function cl(e,o,n,l,s,i){const a=t.resolveComponent("mcw-list");return e.modal?(t.openBlock(),t.createElementBlock("div",rl,[t.createElementVNode("aside",{ref:"drawer",class:t.normalizeClass(e.classes),onKeydown:o[2]||(o[2]=(...r)=>e.handleKeydown&&e.handleKeydown(...r)),onTransitionend:o[3]||(o[3]=(...r)=>e.handleTransitionEnd&&e.handleTransitionEnd(...r))},[t.renderSlot(e.$slots,"header"),t.createElementVNode("div",il,[t.createVNode(a,{"wrap-focus":!0,tag:"nav","multi-selectable":!1,"selected-index":0,role:"menu","onMdclist:action":e.onListAction},{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default")]),_:3},8,["onMdclist:action"])])],34),e.modal?(t.openBlock(),t.createElementBlock("div",{key:0,class:"mdc-drawer-scrim",onClick:o[4]||(o[4]=(...r)=>e.handleScrimClick&&e.handleScrimClick(...r))})):t.createCommentVNode("v-if",!0)])):(t.openBlock(),t.createElementBlock("aside",{key:0,ref:"drawer",class:t.normalizeClass(e.classes),onKeydown:o[0]||(o[0]=(...r)=>e.handleKeydown&&e.handleKeydown(...r)),onTransitionend:o[1]||(o[1]=(...r)=>e.handleTransitionEnd&&e.handleTransitionEnd(...r))},[t.renderSlot(e.$slots,"header"),t.createElementVNode("div",sl,[t.createVNode(a,{"wrap-focus":!0,tag:"nav","onMdclist:action":e.onListAction,"multi-selectable":!1,"selected-index":0,role:"menu"},{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default")]),_:3},8,["onMdclist:action"])])],34))}Ee.render=cl,Ee.__file="src/drawer/drawer.vue";var bt=V({mcwDrawer:Ee}),Se={name:"mcw-fab",props:{icon:String,mini:Boolean,exited:Boolean,label:String,isTouch:Boolean},inheritAttrs:!1,components:{CustomLink:K,touchWrapper:Q},setup(e,{slots:o}){const n=t.ref(),l=t.reactive({classes:{"mdc-fab":1,"mdc-fab--mini":e.mini,"mdc-fab--extended":e.label||o.default,"mdc-fab--exited":e.exited}}),{classes:s,styles:i}=F(n),a=t.computed(()=>({...s.value,...l.classes}));return t.watch(()=>e.icon,r=>{l.classes={...l.classes,"material-icons":r}}),t.watch(()=>e.mini,r=>{l.classes={...l.classes,"mdc-fab--mini":r}}),t.watch(()=>e.exited,r=>{l.classes={...l.classes,"mdc-fab--exited":r}}),{...t.toRefs(l),classes:a,root:n,styles:i}}};const dl=t.createElementVNode("div",{class:"mdc-fab__ripple"},null,-1),ml=t.createElementVNode("div",{class:"mdc-fab__focus-ring"},null,-1),ul={class:"mdc-fab__icon material-icons"},pl={class:"mdc-fab__label"};function hl(e,o,n,l,s,i){const a=t.resolveComponent("custom-link"),r=t.resolveComponent("touch-wrapper");return t.openBlock(),t.createBlock(r,{isTouch:e.isTouch},{default:t.withCtx(()=>[t.createVNode(a,t.mergeProps({ref:"root",class:e.classes,style:e.styles,tag:"button"},e.$attrs),{default:t.withCtx(()=>[dl,ml,t.renderSlot(e.$slots,"icon",{},()=>[t.createElementVNode("span",ul,t.toDisplayString(e.icon),1)]),t.createElementVNode("span",pl,[t.renderSlot(e.$slots,"default",{},()=>[t.createTextVNode(t.toDisplayString(e.label),1)])])]),_:3},16,["class","style"])]),_:3},8,["isTouch"])}Se.render=hl,Se.__file="src/fab/fab.vue";var Ct=V({mcwFAB:Se}),X={name:"mcw-floating-label",props:{required:{type:Boolean}},setup(e,{slots:o,expose:n}){const l=t.reactive({labelClasses:{"mdc-floating-label":!0,"mdc-floating-label--required":e.required}});let s;const i=t.ref(),a={addClass:b=>l.labelClasses={...l.labelClasses,[b]:!0},removeClass:b=>{const{[b]:u,...S}=l.labelClasses;l.labelClasses=S},getWidth:()=>i.value.scrollWidth,registerInteractionHandler:(b,u)=>{i.value.addEventListener(b,u)},deregisterInteractionHandler:(b,u)=>{i.value.removeEventListener(b,u)}},r=()=>s.getWidth(),g=b=>s.setRequired(b),m=b=>{s.float(b)},c=b=>{s.shake(b)};return t.onMounted(()=>{s=new an.MDCFloatingLabelFoundation(a),s.init()}),t.onBeforeUnmount(()=>{s.destroy()}),n({getWidth:r,float:m,shake:c,setRequired:g}),()=>t.h("span",{ref:i,class:l.labelClasses},[o.default()])}},yt=V({mcwFloatingLabel:X}),we={name:"mcw-icon-button",inheritAttrs:!1,props:{modelValue:Boolean,disabled:Boolean,isTouch:Boolean},setup(e,{emit:o,attrs:n}){const l=t.reactive({classes:{"mdc-icon-button":1,"material-icons":1},root:void 0}),{CHANGE_EVENT:s}=ze.MDCIconButtonToggleFoundation.strings,{classes:i,styles:a}=F(t.toRef(l,"root"),{isUnbounded:()=>!0});let r;const g={addClass:u=>l.classes={...l.classes,[u]:!0},removeClass:u=>{const{[u]:S,...C}=l.classes;l.classes=C},hasClass:u=>Boolean(l.classes[u]),setAttr:(u,S)=>l.root.setAttribute(u,S),getAttr:u=>l.root.getAttribute(u),notifyChange:u=>{o(s,u),o("update:modelValue",u.isOn)}},m=t.computed(()=>({...i.value,...l.classes}))