UNPKG

material-components-vue

Version:
2 lines 37.5 kB
/*! For license information please see dialog.min.js.LICENSE */ !function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n=e();for(var i in n)("object"==typeof exports?exports:t)[i]=n[i]}}(window,function(){return function(t){var e={};function n(i){if(e[i])return e[i].exports;var o=e[i]={i:i,l:!1,exports:{}};return t[i].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(i,o,function(e){return t[e]}.bind(null,o));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=72)}({0:function(t,e,n){"use strict";n.d(e,"b",function(){return o}),n.d(e,"a",function(){return a}),n.d(e,"e",function(){return r}),n.d(e,"c",function(){return s}),n.d(e,"d",function(){return c});var i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function o(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var a=function(){return(a=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};function r(t){var e="function"==typeof Symbol&&t[Symbol.iterator],n=0;return e?e.call(t):{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}}}function s(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var i,o,a=n.call(t),r=[];try{for(;(void 0===e||0<e--)&&!(i=a.next()).done;)r.push(i.value)}catch(t){o={error:t}}finally{try{i&&!i.done&&(n=a.return)&&n.call(a)}finally{if(o)throw o.error}}return r}function c(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(s(arguments[e]));return t}},1:function(t,e,n){"use strict";var i={inheritAttrs:!1},o=["primary","secondary","background","surface","on-primary","on-secondary","on-surface","primary-bg","secondary-bg","text-primary-on-light","text-secondary-on-light","text-hint-on-light","text-disabled-on-light","text-icon-on-light","text-primary-on-dark","text-secondary-on-dark","text-hint-on-dark","text-disabled-on-dark","text-icon-on-dark"],a={props:{theming:{type:String,default:""}},mounted:function(){-1<o.indexOf(this.theming)&&this.$el.classList.add("mdc-theme--"+this.theming)}};n.d(e,"a",function(){return i}),n.d(e,"b",function(){return a})},10:function(t,e,n){"use strict";var i=n(0),o=n(2),a={BG_FOCUSED:"mdc-ripple-upgraded--background-focused",FG_ACTIVATION:"mdc-ripple-upgraded--foreground-activation",FG_DEACTIVATION:"mdc-ripple-upgraded--foreground-deactivation",ROOT:"mdc-ripple-upgraded",UNBOUNDED:"mdc-ripple-upgraded--unbounded"},r={VAR_FG_SCALE:"--mdc-ripple-fg-scale",VAR_FG_SIZE:"--mdc-ripple-fg-size",VAR_FG_TRANSLATE_END:"--mdc-ripple-fg-translate-end",VAR_FG_TRANSLATE_START:"--mdc-ripple-fg-translate-start",VAR_LEFT:"--mdc-ripple-left",VAR_TOP:"--mdc-ripple-top"},s={DEACTIVATION_TIMEOUT_MS:225,FG_DEACTIVATION_MS:150,INITIAL_ORIGIN_SCALE:.6,PADDING:10,TAP_DELAY_MS:300},c=n(6);n.d(e,"a",function(){return f});var u=["touchstart","pointerdown","mousedown","keydown"],d=["touchend","pointerup","mouseup","contextmenu"],l=[],f=function(t){function e(n){var o=t.call(this,i.a({},e.defaultAdapter,n))||this;return o.activationAnimationHasEnded_=!1,o.activationTimer_=0,o.fgDeactivationRemovalTimer_=0,o.fgScale_="0",o.frame_={width:0,height:0},o.initialSize_=0,o.layoutFrame_=0,o.maxRadius_=0,o.unboundedCoords_={left:0,top:0},o.activationState_=o.defaultActivationState_(),o.activationTimerCallback_=function(){o.activationAnimationHasEnded_=!0,o.runDeactivationUXLogicIfReady_()},o.activateHandler_=function(t){return o.activate_(t)},o.deactivateHandler_=function(){return o.deactivate_()},o.focusHandler_=function(){return o.handleFocus()},o.blurHandler_=function(){return o.handleBlur()},o.resizeHandler_=function(){return o.layout()},o}return i.b(e,t),Object.defineProperty(e,"cssClasses",{get:function(){return a},enumerable:!0,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return r},enumerable:!0,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return s},enumerable:!0,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},browserSupportsCssVars:function(){return!0},computeBoundingRect:function(){return{top:0,right:0,bottom:0,left:0,width:0,height:0}},containsEventTarget:function(){return!0},deregisterDocumentInteractionHandler:function(){},deregisterInteractionHandler:function(){},deregisterResizeHandler:function(){},getWindowPageOffset:function(){return{x:0,y:0}},isSurfaceActive:function(){return!0},isSurfaceDisabled:function(){return!0},isUnbounded:function(){return!0},registerDocumentInteractionHandler:function(){},registerInteractionHandler:function(){},registerResizeHandler:function(){},removeClass:function(){},updateCssVariable:function(){}}},enumerable:!0,configurable:!0}),e.prototype.init=function(){var t=this,n=this.supportsPressRipple_();if(this.registerRootHandlers_(n),n){var i=e.cssClasses,o=i.ROOT,a=i.UNBOUNDED;requestAnimationFrame(function(){t.adapter_.addClass(o),t.adapter_.isUnbounded()&&(t.adapter_.addClass(a),t.layoutInternal_())})}},e.prototype.destroy=function(){var t=this;if(this.supportsPressRipple_()){this.activationTimer_&&(clearTimeout(this.activationTimer_),this.activationTimer_=0,this.adapter_.removeClass(e.cssClasses.FG_ACTIVATION)),this.fgDeactivationRemovalTimer_&&(clearTimeout(this.fgDeactivationRemovalTimer_),this.fgDeactivationRemovalTimer_=0,this.adapter_.removeClass(e.cssClasses.FG_DEACTIVATION));var n=e.cssClasses,i=n.ROOT,o=n.UNBOUNDED;requestAnimationFrame(function(){t.adapter_.removeClass(i),t.adapter_.removeClass(o),t.removeCssVars_()})}this.deregisterRootHandlers_(),this.deregisterDeactivationHandlers_()},e.prototype.activate=function(t){this.activate_(t)},e.prototype.deactivate=function(){this.deactivate_()},e.prototype.layout=function(){var t=this;this.layoutFrame_&&cancelAnimationFrame(this.layoutFrame_),this.layoutFrame_=requestAnimationFrame(function(){t.layoutInternal_(),t.layoutFrame_=0})},e.prototype.setUnbounded=function(t){var n=e.cssClasses.UNBOUNDED;t?this.adapter_.addClass(n):this.adapter_.removeClass(n)},e.prototype.handleFocus=function(){var t=this;requestAnimationFrame(function(){return t.adapter_.addClass(e.cssClasses.BG_FOCUSED)})},e.prototype.handleBlur=function(){var t=this;requestAnimationFrame(function(){return t.adapter_.removeClass(e.cssClasses.BG_FOCUSED)})},e.prototype.supportsPressRipple_=function(){return this.adapter_.browserSupportsCssVars()},e.prototype.defaultActivationState_=function(){return{activationEvent:void 0,hasDeactivationUXRun:!1,isActivated:!1,isProgrammatic:!1,wasActivatedByPointer:!1,wasElementMadeActive:!1}},e.prototype.registerRootHandlers_=function(t){var e=this;t&&(u.forEach(function(t){e.adapter_.registerInteractionHandler(t,e.activateHandler_)}),this.adapter_.isUnbounded()&&this.adapter_.registerResizeHandler(this.resizeHandler_)),this.adapter_.registerInteractionHandler("focus",this.focusHandler_),this.adapter_.registerInteractionHandler("blur",this.blurHandler_)},e.prototype.registerDeactivationHandlers_=function(t){var e=this;"keydown"===t.type?this.adapter_.registerInteractionHandler("keyup",this.deactivateHandler_):d.forEach(function(t){e.adapter_.registerDocumentInteractionHandler(t,e.deactivateHandler_)})},e.prototype.deregisterRootHandlers_=function(){var t=this;u.forEach(function(e){t.adapter_.deregisterInteractionHandler(e,t.activateHandler_)}),this.adapter_.deregisterInteractionHandler("focus",this.focusHandler_),this.adapter_.deregisterInteractionHandler("blur",this.blurHandler_),this.adapter_.isUnbounded()&&this.adapter_.deregisterResizeHandler(this.resizeHandler_)},e.prototype.deregisterDeactivationHandlers_=function(){var t=this;this.adapter_.deregisterInteractionHandler("keyup",this.deactivateHandler_),d.forEach(function(e){t.adapter_.deregisterDocumentInteractionHandler(e,t.deactivateHandler_)})},e.prototype.removeCssVars_=function(){var t=this,n=e.strings;Object.keys(n).forEach(function(e){0===e.indexOf("VAR_")&&t.adapter_.updateCssVariable(n[e],null)})},e.prototype.activate_=function(t){var e=this;if(!this.adapter_.isSurfaceDisabled()){var n=this.activationState_;if(!n.isActivated){var i=this.previousActivationEvent_;i&&void 0!==t&&i.type!==t.type||(n.isActivated=!0,n.isProgrammatic=void 0===t,n.activationEvent=t,n.wasActivatedByPointer=!n.isProgrammatic&&void 0!==t&&("mousedown"===t.type||"touchstart"===t.type||"pointerdown"===t.type),void 0!==t&&0<l.length&&l.some(function(t){return e.adapter_.containsEventTarget(t)})?this.resetActivationState_():(void 0!==t&&(l.push(t.target),this.registerDeactivationHandlers_(t)),n.wasElementMadeActive=this.checkElementMadeActive_(t),n.wasElementMadeActive&&this.animateActivation_(),requestAnimationFrame(function(){l=[],n.wasElementMadeActive||void 0===t||" "!==t.key&&32!==t.keyCode||(n.wasElementMadeActive=e.checkElementMadeActive_(t),n.wasElementMadeActive&&e.animateActivation_()),n.wasElementMadeActive||(e.activationState_=e.defaultActivationState_())})))}}},e.prototype.checkElementMadeActive_=function(t){return void 0===t||"keydown"!==t.type||this.adapter_.isSurfaceActive()},e.prototype.animateActivation_=function(){var t=this,n=e.strings,i=n.VAR_FG_TRANSLATE_START,o=n.VAR_FG_TRANSLATE_END,a=e.cssClasses,r=a.FG_DEACTIVATION,s=a.FG_ACTIVATION,c=e.numbers.DEACTIVATION_TIMEOUT_MS;this.layoutInternal_();var u="",d="";if(!this.adapter_.isUnbounded()){var l=this.getFgTranslationCoordinates_(),f=l.startPoint,p=l.endPoint;u=f.x+"px, "+f.y+"px",d=p.x+"px, "+p.y+"px"}this.adapter_.updateCssVariable(i,u),this.adapter_.updateCssVariable(o,d),clearTimeout(this.activationTimer_),clearTimeout(this.fgDeactivationRemovalTimer_),this.rmBoundedActivationClasses_(),this.adapter_.removeClass(r),this.adapter_.computeBoundingRect(),this.adapter_.addClass(s),this.activationTimer_=setTimeout(function(){return t.activationTimerCallback_()},c)},e.prototype.getFgTranslationCoordinates_=function(){var t,e=this.activationState_,n=e.activationEvent;return{startPoint:t={x:(t=e.wasActivatedByPointer?Object(c.b)(n,this.adapter_.getWindowPageOffset(),this.adapter_.computeBoundingRect()):{x:this.frame_.width/2,y:this.frame_.height/2}).x-this.initialSize_/2,y:t.y-this.initialSize_/2},endPoint:{x:this.frame_.width/2-this.initialSize_/2,y:this.frame_.height/2-this.initialSize_/2}}},e.prototype.runDeactivationUXLogicIfReady_=function(){var t=this,n=e.cssClasses.FG_DEACTIVATION,i=this.activationState_,o=i.hasDeactivationUXRun,a=i.isActivated;(o||!a)&&this.activationAnimationHasEnded_&&(this.rmBoundedActivationClasses_(),this.adapter_.addClass(n),this.fgDeactivationRemovalTimer_=setTimeout(function(){t.adapter_.removeClass(n)},s.FG_DEACTIVATION_MS))},e.prototype.rmBoundedActivationClasses_=function(){var t=e.cssClasses.FG_ACTIVATION;this.adapter_.removeClass(t),this.activationAnimationHasEnded_=!1,this.adapter_.computeBoundingRect()},e.prototype.resetActivationState_=function(){var t=this;this.previousActivationEvent_=this.activationState_.activationEvent,this.activationState_=this.defaultActivationState_(),setTimeout(function(){return t.previousActivationEvent_=void 0},e.numbers.TAP_DELAY_MS)},e.prototype.deactivate_=function(){var t=this,e=this.activationState_;if(e.isActivated){var n=i.a({},e);e.isProgrammatic?(requestAnimationFrame(function(){return t.animateDeactivation_(n)}),this.resetActivationState_()):(this.deregisterDeactivationHandlers_(),requestAnimationFrame(function(){t.activationState_.hasDeactivationUXRun=!0,t.animateDeactivation_(n),t.resetActivationState_()}))}},e.prototype.animateDeactivation_=function(t){var e=t.wasActivatedByPointer,n=t.wasElementMadeActive;(e||n)&&this.runDeactivationUXLogicIfReady_()},e.prototype.layoutInternal_=function(){this.frame_=this.adapter_.computeBoundingRect();var t=Math.max(this.frame_.height,this.frame_.width);this.maxRadius_=this.adapter_.isUnbounded()?t:Math.sqrt(Math.pow(this.frame_.width,2)+Math.pow(this.frame_.height,2))+e.numbers.PADDING,this.initialSize_=Math.floor(t*e.numbers.INITIAL_ORIGIN_SCALE),this.fgScale_=""+this.maxRadius_/this.initialSize_,this.updateLayoutCssVars_()},e.prototype.updateLayoutCssVars_=function(){var t=e.strings,n=t.VAR_FG_SIZE,i=t.VAR_LEFT,o=t.VAR_TOP,a=t.VAR_FG_SCALE;this.adapter_.updateCssVariable(n,this.initialSize_+"px"),this.adapter_.updateCssVariable(a,this.fgScale_),this.adapter_.isUnbounded()&&(this.unboundedCoords_={left:Math.round(this.frame_.width/2-this.initialSize_/2),top:Math.round(this.frame_.height/2-this.initialSize_/2)},this.adapter_.updateCssVariable(i,this.unboundedCoords_.left+"px"),this.adapter_.updateCssVariable(o,this.unboundedCoords_.top+"px"))},e}(o.a)},12:function(t,e,n){"use strict";n.d(e,"a",function(){return c});var i=n(0),o=n(5),a=n(8),r=n(10),s=n(6),c=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.disabled=!1,e}return i.b(e,t),e.attachTo=function(t,n){void 0===n&&(n={isUnbounded:void 0});var i=new e(t);return void 0!==n.isUnbounded&&(i.unbounded=n.isUnbounded),i},e.createAdapter=function(t){return{addClass:function(e){return t.root_.classList.add(e)},browserSupportsCssVars:function(){return s.c(window)},computeBoundingRect:function(){return t.root_.getBoundingClientRect()},containsEventTarget:function(e){return t.root_.contains(e)},deregisterDocumentInteractionHandler:function(t,e){return document.documentElement.removeEventListener(t,e,s.a())},deregisterInteractionHandler:function(e,n){return t.root_.removeEventListener(e,n,s.a())},deregisterResizeHandler:function(t){return window.removeEventListener("resize",t)},getWindowPageOffset:function(){return{x:window.pageXOffset,y:window.pageYOffset}},isSurfaceActive:function(){return Object(a.b)(t.root_,":active")},isSurfaceDisabled:function(){return Boolean(t.disabled)},isUnbounded:function(){return Boolean(t.unbounded)},registerDocumentInteractionHandler:function(t,e){return document.documentElement.addEventListener(t,e,s.a())},registerInteractionHandler:function(e,n){return t.root_.addEventListener(e,n,s.a())},registerResizeHandler:function(t){return window.addEventListener("resize",t)},removeClass:function(e){return t.root_.classList.remove(e)},updateCssVariable:function(e,n){return t.root_.style.setProperty(e,n)}}},Object.defineProperty(e.prototype,"unbounded",{get:function(){return Boolean(this.unbounded_)},set:function(t){this.unbounded_=Boolean(t),this.setUnbounded_()},enumerable:!0,configurable:!0}),e.prototype.activate=function(){this.foundation_.activate()},e.prototype.deactivate=function(){this.foundation_.deactivate()},e.prototype.layout=function(){this.foundation_.layout()},e.prototype.getDefaultFoundation=function(){return new r.a(e.createAdapter(this))},e.prototype.initialSyncWithDOM=function(){var t=this.root_;this.unbounded="mdcRippleIsUnbounded"in t.dataset},e.prototype.setUnbounded_=function(){this.foundation_.setUnbounded(Boolean(this.unbounded_))},e}(o.a)},18:function(t,e,n){var i,o=n(24),a=n(25),r=(i=[],{activateTrap:function(t){if(0<i.length){var e=i[i.length-1];e!==t&&e.pause()}var n=i.indexOf(t);-1===n||i.splice(n,1),i.push(t)},deactivateTrap:function(t){var e=i.indexOf(t);-1!==e&&i.splice(e,1),0<i.length&&i[i.length-1].unpause()}});function s(t){return setTimeout(t,0)}t.exports=function(t,e){var n=document,i="string"==typeof t?n.querySelector(t):t,c=a({returnFocusOnDeactivate:!0,escapeDeactivates:!0},e),u={firstTabbableNode:null,lastTabbableNode:null,nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1},d={activate:function(t){if(!u.active){b(),u.active=!0,u.paused=!1,u.nodeFocusedBeforeActivation=n.activeElement;var e=t&&t.onActivate?t.onActivate:c.onActivate;return e&&e(),f(),d}},deactivate:l,pause:function(){!u.paused&&u.active&&(u.paused=!0,p())},unpause:function(){u.paused&&u.active&&(u.paused=!1,b(),f())}};return d;function l(t){if(u.active){p(),u.active=!1,u.paused=!1,r.deactivateTrap(d);var e=t&&void 0!==t.onDeactivate?t.onDeactivate:c.onDeactivate;return e&&e(),(t&&void 0!==t.returnFocus?t.returnFocus:c.returnFocusOnDeactivate)&&s(function(){E(u.nodeFocusedBeforeActivation)}),d}}function f(){if(u.active)return r.activateTrap(d),s(function(){E(h())}),n.addEventListener("focusin",v,!0),n.addEventListener("mousedown",m,{capture:!0,passive:!1}),n.addEventListener("touchstart",m,{capture:!0,passive:!1}),n.addEventListener("click",g,{capture:!0,passive:!1}),n.addEventListener("keydown",y,{capture:!0,passive:!1}),d}function p(){if(u.active)return n.removeEventListener("focusin",v,!0),n.removeEventListener("mousedown",m,!0),n.removeEventListener("touchstart",m,!0),n.removeEventListener("click",g,!0),n.removeEventListener("keydown",y,!0),d}function _(t){var e=c[t],i=e;if(!e)return null;if("string"==typeof e&&!(i=n.querySelector(e)))throw new Error("`"+t+"` refers to no known node");if("function"==typeof e&&!(i=e()))throw new Error("`"+t+"` did not return a node");return i}function h(){var t;if(!(t=null!==_("initialFocus")?_("initialFocus"):i.contains(n.activeElement)?n.activeElement:u.firstTabbableNode||_("fallbackFocus")))throw new Error("You can't have a focus-trap without at least one focusable element");return t}function m(t){i.contains(t.target)||(c.clickOutsideDeactivates?l({returnFocus:!o.isFocusable(t.target)}):t.preventDefault())}function v(t){i.contains(t.target)||t.target instanceof Document||(t.stopImmediatePropagation(),E(u.mostRecentlyFocusedNode||h()))}function y(t){if(!1!==c.escapeDeactivates&&("Escape"===(e=t).key||"Esc"===e.key||27===e.keyCode))return t.preventDefault(),void l();var e;if("Tab"!==(n=t).key&&9!==n.keyCode)var n;else!function(t){if(b(),t.shiftKey&&t.target===u.firstTabbableNode)return t.preventDefault(),E(u.lastTabbableNode);t.shiftKey||t.target!==u.lastTabbableNode||(t.preventDefault(),E(u.firstTabbableNode))}(t)}function g(t){c.clickOutsideDeactivates||i.contains(t.target)||(t.preventDefault(),t.stopImmediatePropagation())}function b(){var t=o(i);u.firstTabbableNode=t[0]||h(),u.lastTabbableNode=t[t.length-1]||h()}function E(t){var e;t!==n.activeElement&&(t&&t.focus?(t.focus(),u.mostRecentlyFocusedNode=t,(e=t).tagName&&"input"===e.tagName.toLowerCase()&&"function"==typeof e.select&&t.select()):E(h()))}}},2:function(t,e,n){"use strict";n.d(e,"a",function(){return i});var i=function(){function t(t){void 0===t&&(t={}),this.adapter_=t}return Object.defineProperty(t,"cssClasses",{get:function(){return{}},enumerable:!0,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return{}},enumerable:!0,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return{}},enumerable:!0,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{}},enumerable:!0,configurable:!0}),t.prototype.init=function(){},t.prototype.destroy=function(){},t}()},24:function(t,e){var n=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'],i=n.join(","),o="undefined"==typeof Element?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector;function a(t,e){e=e||{};var n,a,s,c=[],l=[],f=t.querySelectorAll(i);for(e.includeContainer&&o.call(t,i)&&(f=Array.prototype.slice.apply(f)).unshift(t),n=0;n<f.length;n++)r(a=f[n])&&(0===(s=u(a))?c.push(a):l.push({documentOrder:n,tabIndex:s,node:a}));return l.sort(d).map(function(t){return t.node}).concat(c)}function r(t){return!(!s(t)||l(n=e=t)&&"radio"===n.type&&!function(t){if(!t.name)return!0;var e=function(t){for(var e=0;e<t.length;e++)if(t[e].checked)return t[e]}(t.ownerDocument.querySelectorAll('input[type="radio"][name="'+t.name+'"]'));return!e||e===t}(e)||u(t)<0);var e,n}function s(t){return!(t.disabled||l(n=t)&&"hidden"===n.type||null===(e=t).offsetParent||"hidden"===getComputedStyle(e).visibility);var e,n}a.isTabbable=function(t){if(!t)throw new Error("No node provided");return!1!==o.call(t,i)&&r(t)},a.isFocusable=function(t){if(!t)throw new Error("No node provided");return!1!==o.call(t,c)&&s(t)};var c=n.concat("iframe").join(",");function u(t){var e=parseInt(t.getAttribute("tabindex"),10);return isNaN(e)?"true"===t.contentEditable?0:t.tabIndex:e}function d(t,e){return t.tabIndex===e.tabIndex?t.documentOrder-e.documentOrder:t.tabIndex-e.tabIndex}function l(t){return"INPUT"===t.tagName}t.exports=a},25:function(t,e){t.exports=function(){for(var t={},e=0;e<arguments.length;e++){var i=arguments[e];for(var o in i)n.call(i,o)&&(t[o]=i[o])}return t};var n=Object.prototype.hasOwnProperty},31:function(t,e,n){},4:function(t,e,n){"use strict";function i(t,e,n,i,o,a,r,s){var c,u="function"==typeof t?t.options:t;if(e&&(u.render=e,u.staticRenderFns=n,u._compiled=!0),i&&(u.functional=!0),a&&(u._scopeId="data-v-"+a),r?(c=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),o&&o.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(r)},u._ssrRegister=c):o&&(c=s?function(){o.call(this,this.$root.$options.shadowRoot)}:o),c)if(u.functional){u._injectStyles=c;var d=u.render;u.render=function(t,e){return c.call(e),d(t,e)}}else{var l=u.beforeCreate;u.beforeCreate=l?[].concat(l,c):[c]}return{exports:t,options:u}}n.d(e,"a",function(){return i})},5:function(t,e,n){"use strict";n.d(e,"a",function(){return a});var i=n(0),o=n(2),a=function(){function t(t,e){for(var n=[],o=2;o<arguments.length;o++)n[o-2]=arguments[o];this.root_=t,this.initialize.apply(this,i.d(n)),this.foundation_=void 0===e?this.getDefaultFoundation():e,this.foundation_.init(),this.initialSyncWithDOM()}return t.attachTo=function(e){return new t(e,new o.a({}))},t.prototype.initialize=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e]},t.prototype.getDefaultFoundation=function(){throw new Error("Subclasses must override getDefaultFoundation to return a properly configured foundation class")},t.prototype.initialSyncWithDOM=function(){},t.prototype.destroy=function(){this.foundation_.destroy()},t.prototype.listen=function(t,e){this.root_.addEventListener(t,e)},t.prototype.unlisten=function(t,e){this.root_.removeEventListener(t,e)},t.prototype.emit=function(t,e,n){var i;void 0===n&&(n=!1),"function"==typeof CustomEvent?i=new CustomEvent(t,{bubbles:n,detail:e}):(i=document.createEvent("CustomEvent")).initCustomEvent(t,n,!1,e),this.root_.dispatchEvent(i)},t}()},6:function(t,e,n){"use strict";var i,o;function a(t,e){void 0===e&&(e=!1);var n,o=t.CSS;if("boolean"==typeof i&&!e)return i;if(!o||"function"!=typeof o.supports)return!1;var a=o.supports("--css-vars","yes"),r=o.supports("(--css-vars: yes)")&&o.supports("color","#00000000");return n=!(!a&&!r||function(t){var e=t.document,n=e.createElement("div");n.className="mdc-ripple-surface--test-edge-var-bug",e.body.appendChild(n);var i=t.getComputedStyle(n),o=null!==i&&"solid"===i.borderTopStyle;return n.parentNode&&n.parentNode.removeChild(n),o}(t)),e||(i=n),n}function r(t,e){if(void 0===t&&(t=window),void 0===e&&(e=!1),void 0===o||e){var n=!1;try{t.document.addEventListener("test",function(){},{get passive(){return n=!0}})}catch(t){}o=n}return!!o&&{passive:!0}}function s(t,e,n){if(!t)return{x:0,y:0};var i,o,a=e.x,r=e.y,s=a+n.left,c=r+n.top;if("touchstart"===t.type){var u=t;i=u.changedTouches[0].pageX-s,o=u.changedTouches[0].pageY-c}else{var d=t;i=d.pageX-s,o=d.pageY-c}return{x:i,y:o}}n.d(e,"c",function(){return a}),n.d(e,"a",function(){return r}),n.d(e,"b",function(){return s})},7:function(t,e,n){"use strict";function i(t){"undefined"!=typeof window&&window.Vue&&window.Vue.use(t)}n.d(e,"a",function(){return i})},72:function(t,e,n){"use strict";n.r(e);var i=n(0),o=n(5),a=n(8),r=n(12),s=n(2),c={CLOSING:"mdc-dialog--closing",OPEN:"mdc-dialog--open",OPENING:"mdc-dialog--opening",SCROLLABLE:"mdc-dialog--scrollable",SCROLL_LOCK:"mdc-dialog-scroll-lock",STACKED:"mdc-dialog--stacked"},u={ACTION_ATTRIBUTE:"data-mdc-dialog-action",BUTTON_SELECTOR:".mdc-dialog__button",CLOSED_EVENT:"MDCDialog:closed",CLOSE_ACTION:"close",CLOSING_EVENT:"MDCDialog:closing",CONTAINER_SELECTOR:".mdc-dialog__container",CONTENT_SELECTOR:".mdc-dialog__content",DEFAULT_BUTTON_SELECTOR:".mdc-dialog__button--default",DESTROY_ACTION:"destroy",OPENED_EVENT:"MDCDialog:opened",OPENING_EVENT:"MDCDialog:opening",SCRIM_SELECTOR:".mdc-dialog__scrim",SUPPRESS_DEFAULT_PRESS_SELECTOR:["textarea",".mdc-menu .mdc-list-item"].join(", "),SURFACE_SELECTOR:".mdc-dialog__surface"},d={DIALOG_ANIMATION_CLOSE_TIME_MS:75,DIALOG_ANIMATION_OPEN_TIME_MS:150},l=function(t){function e(n){var o=t.call(this,i.a({},e.defaultAdapter,n))||this;return o.isOpen_=!1,o.animationFrame_=0,o.animationTimer_=0,o.layoutFrame_=0,o.escapeKeyAction_=u.CLOSE_ACTION,o.scrimClickAction_=u.CLOSE_ACTION,o.autoStackButtons_=!0,o.areButtonsStacked_=!1,o}return i.b(e,t),Object.defineProperty(e,"cssClasses",{get:function(){return c},enumerable:!0,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return u},enumerable:!0,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return d},enumerable:!0,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addBodyClass:function(){},addClass:function(){},areButtonsStacked:function(){return!1},clickDefaultButton:function(){},eventTargetMatches:function(){return!1},getActionFromEvent:function(){return""},hasClass:function(){return!1},isContentScrollable:function(){return!1},notifyClosed:function(){},notifyClosing:function(){},notifyOpened:function(){},notifyOpening:function(){},releaseFocus:function(){},removeBodyClass:function(){},removeClass:function(){},reverseButtons:function(){},trapFocus:function(){}}},enumerable:!0,configurable:!0}),e.prototype.init=function(){this.adapter_.hasClass(c.STACKED)&&this.setAutoStackButtons(!1)},e.prototype.destroy=function(){this.isOpen_&&this.close(u.DESTROY_ACTION),this.animationTimer_&&(clearTimeout(this.animationTimer_),this.handleAnimationTimerEnd_()),this.layoutFrame_&&(cancelAnimationFrame(this.layoutFrame_),this.layoutFrame_=0)},e.prototype.open=function(){var t=this;this.isOpen_=!0,this.adapter_.notifyOpening(),this.adapter_.addClass(c.OPENING),this.runNextAnimationFrame_(function(){t.adapter_.addClass(c.OPEN),t.adapter_.addBodyClass(c.SCROLL_LOCK),t.layout(),t.animationTimer_=setTimeout(function(){t.handleAnimationTimerEnd_(),t.adapter_.trapFocus(),t.adapter_.notifyOpened()},d.DIALOG_ANIMATION_OPEN_TIME_MS)})},e.prototype.close=function(t){var e=this;void 0===t&&(t=""),this.isOpen_&&(this.isOpen_=!1,this.adapter_.notifyClosing(t),this.adapter_.addClass(c.CLOSING),this.adapter_.removeClass(c.OPEN),this.adapter_.removeBodyClass(c.SCROLL_LOCK),cancelAnimationFrame(this.animationFrame_),this.animationFrame_=0,clearTimeout(this.animationTimer_),this.animationTimer_=setTimeout(function(){e.adapter_.releaseFocus(),e.handleAnimationTimerEnd_(),e.adapter_.notifyClosed(t)},d.DIALOG_ANIMATION_CLOSE_TIME_MS))},e.prototype.isOpen=function(){return this.isOpen_},e.prototype.getEscapeKeyAction=function(){return this.escapeKeyAction_},e.prototype.setEscapeKeyAction=function(t){this.escapeKeyAction_=t},e.prototype.getScrimClickAction=function(){return this.scrimClickAction_},e.prototype.setScrimClickAction=function(t){this.scrimClickAction_=t},e.prototype.getAutoStackButtons=function(){return this.autoStackButtons_},e.prototype.setAutoStackButtons=function(t){this.autoStackButtons_=t},e.prototype.layout=function(){var t=this;this.layoutFrame_&&cancelAnimationFrame(this.layoutFrame_),this.layoutFrame_=requestAnimationFrame(function(){t.layoutInternal_(),t.layoutFrame_=0})},e.prototype.handleInteraction=function(t){var e="click"===t.type,n="Enter"===t.key||13===t.keyCode,i="Space"===t.key||32===t.keyCode,o=this.adapter_.eventTargetMatches(t.target,u.SCRIM_SELECTOR),a=!this.adapter_.eventTargetMatches(t.target,u.SUPPRESS_DEFAULT_PRESS_SELECTOR);if(e&&o&&""!==this.scrimClickAction_)this.close(this.scrimClickAction_);else if(e||i||n){var r=this.adapter_.getActionFromEvent(t);r?this.close(r):n&&a&&this.adapter_.clickDefaultButton()}},e.prototype.handleDocumentKeydown=function(t){("Escape"===t.key||27===t.keyCode)&&""!==this.escapeKeyAction_&&this.close(this.escapeKeyAction_)},e.prototype.layoutInternal_=function(){this.autoStackButtons_&&this.detectStackedButtons_(),this.detectScrollableContent_()},e.prototype.handleAnimationTimerEnd_=function(){this.animationTimer_=0,this.adapter_.removeClass(c.OPENING),this.adapter_.removeClass(c.CLOSING)},e.prototype.runNextAnimationFrame_=function(t){var e=this;cancelAnimationFrame(this.animationFrame_),this.animationFrame_=requestAnimationFrame(function(){e.animationFrame_=0,clearTimeout(e.animationTimer_),e.animationTimer_=setTimeout(t,0)})},e.prototype.detectStackedButtons_=function(){this.adapter_.removeClass(c.STACKED);var t=this.adapter_.areButtonsStacked();t&&this.adapter_.addClass(c.STACKED),t!==this.areButtonsStacked_&&(this.adapter_.reverseButtons(),this.areButtonsStacked_=t)},e.prototype.detectScrollableContent_=function(){this.adapter_.removeClass(c.SCROLLABLE),this.adapter_.isContentScrollable()&&this.adapter_.addClass(c.SCROLLABLE)},e}(s.a),f=n(18),p=n.n(f),_=l.strings,h=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i.b(e,t),Object.defineProperty(e.prototype,"isOpen",{get:function(){return this.foundation_.isOpen()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"escapeKeyAction",{get:function(){return this.foundation_.getEscapeKeyAction()},set:function(t){this.foundation_.setEscapeKeyAction(t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"scrimClickAction",{get:function(){return this.foundation_.getScrimClickAction()},set:function(t){this.foundation_.setScrimClickAction(t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"autoStackButtons",{get:function(){return this.foundation_.getAutoStackButtons()},set:function(t){this.foundation_.setAutoStackButtons(t)},enumerable:!0,configurable:!0}),e.attachTo=function(t){return new e(t)},e.prototype.initialize=function(t,e){var n,o,a=this.root_.querySelector(_.CONTAINER_SELECTOR);if(!a)throw new Error("Dialog component requires a "+_.CONTAINER_SELECTOR+" container element");this.container_=a,this.content_=this.root_.querySelector(_.CONTENT_SELECTOR),this.buttons_=[].slice.call(this.root_.querySelectorAll(_.BUTTON_SELECTOR)),this.defaultButton_=this.root_.querySelector(_.DEFAULT_BUTTON_SELECTOR),this.focusTrapFactory_=t,this.initialFocusEl_=e,this.buttonRipples_=[];try{for(var s=i.e(this.buttons_),c=s.next();!c.done;c=s.next()){var u=c.value;this.buttonRipples_.push(new r.a(u))}}catch(t){n={error:t}}finally{try{c&&!c.done&&(o=s.return)&&o.call(s)}finally{if(n)throw n.error}}},e.prototype.initialSyncWithDOM=function(){var t,e,n,i=this;this.focusTrap_=(t=this.container_,e=this.focusTrapFactory_,n=this.initialFocusEl_,void 0===e&&(e=p.a),e(t,{clickOutsideDeactivates:!0,escapeDeactivates:!1,initialFocus:n})),this.handleInteraction_=this.foundation_.handleInteraction.bind(this.foundation_),this.handleDocumentKeydown_=this.foundation_.handleDocumentKeydown.bind(this.foundation_),this.handleLayout_=this.layout.bind(this);var o=["resize","orientationchange"];this.handleOpening_=function(){o.forEach(function(t){return window.addEventListener(t,i.handleLayout_)}),document.addEventListener("keydown",i.handleDocumentKeydown_)},this.handleClosing_=function(){o.forEach(function(t){return window.removeEventListener(t,i.handleLayout_)}),document.removeEventListener("keydown",i.handleDocumentKeydown_)},this.listen("click",this.handleInteraction_),this.listen("keydown",this.handleInteraction_),this.listen(_.OPENING_EVENT,this.handleOpening_),this.listen(_.CLOSING_EVENT,this.handleClosing_)},e.prototype.destroy=function(){this.unlisten("click",this.handleInteraction_),this.unlisten("keydown",this.handleInteraction_),this.unlisten(_.OPENING_EVENT,this.handleOpening_),this.unlisten(_.CLOSING_EVENT,this.handleClosing_),this.handleClosing_(),this.buttonRipples_.forEach(function(t){return t.destroy()}),t.prototype.destroy.call(this)},e.prototype.layout=function(){this.foundation_.layout()},e.prototype.open=function(){this.foundation_.open()},e.prototype.close=function(t){void 0===t&&(t=""),this.foundation_.close(t)},e.prototype.getDefaultFoundation=function(){var t=this;return new l({addBodyClass:function(t){return document.body.classList.add(t)},addClass:function(e){return t.root_.classList.add(e)},areButtonsStacked:function(){return e=t.buttons_,n=new Set,[].forEach.call(e,function(t){return n.add(t.offsetTop)}),1<n.size;var e,n},clickDefaultButton:function(){return t.defaultButton_&&t.defaultButton_.click()},eventTargetMatches:function(t,e){return!!t&&Object(a.b)(t,e)},getActionFromEvent:function(t){if(!t.target)return"";var e=Object(a.a)(t.target,"["+_.ACTION_ATTRIBUTE+"]");return e&&e.getAttribute(_.ACTION_ATTRIBUTE)},hasClass:function(e){return t.root_.classList.contains(e)},isContentScrollable:function(){return!!(e=t.content_)&&e.scrollHeight>e.offsetHeight;var e},notifyClosed:function(e){return t.emit(_.CLOSED_EVENT,e?{action:e}:{})},notifyClosing:function(e){return t.emit(_.CLOSING_EVENT,e?{action:e}:{})},notifyOpened:function(){return t.emit(_.OPENED_EVENT,{})},notifyOpening:function(){return t.emit(_.OPENING_EVENT,{})},releaseFocus:function(){return t.focusTrap_.deactivate()},removeBodyClass:function(t){return document.body.classList.remove(t)},removeClass:function(e){return t.root_.classList.remove(e)},reverseButtons:function(){t.buttons_.reverse(),t.buttons_.forEach(function(t){t.parentElement.appendChild(t)})},trapFocus:function(){return t.focusTrap_.activate()}})},e}(o.a),m=n(1),v={mixins:[m.a,m.b],model:{prop:"open",event:"change"},props:{scrollable:{type:Boolean,default:!1},open:{type:Boolean,default:!1},stacked:{type:Boolean,default:!0}},data:function(){return{mdcDialog:void 0,slotObserver:void 0}},computed:{bodyClasses:function(){return{"mdc-dialog__body--scrollable":this.scrollable}},model:{get:function(){return this.open},set:function(t){this.$emit("change",t)}}},watch:{open:function(){this.open&&this.mdcDialog.open()},stacked:function(){this.stacked||(this.mdcDialog.autoStackButtons=!1)}},mounted:function(){var t=this;this.mdcDialog=h.attachTo(this.$el),this.slotObserver=new MutationObserver(function(){return t.updateSlots()}),this.slotObserver.observe(this.$el,{childList:!0,subtree:!0}),this.updateSlots()},beforeDestroy:function(){this.slotObserver.disconnect(),this.mdcDialog.destroy()},methods:{onClosed:function(t){this.model=!1,this.$emit("closed",t.detail)},updateSlots:function(){this.$slots.cancelButton&&this.$slots.cancelButton.map(function(t){"BUTTON"===t.elm.tagName.toUpperCase()||t.elm.classList.contains("mdc-dialog__button")||t.elm.classList.add("mdc-dialog__button"),t.elm.hasAttribute("data-mdc-dialog-action")||t.elm.setAttribute("data-mdc-dialog-action","close")}),this.$slots.acceptButton&&this.$slots.acceptButton.map(function(t){"BUTTON"!==t.elm.tagName.toUpperCase()&&(t.elm.classList.contains("mdc-dialog__button")||t.elm.classList.add("mdc-dialog__button"),t.elm.classList.contains("mdc-dialog__button--default")||t.elm.classList.add("mdc-dialog__button--default")),t.elm.hasAttribute("data-mdc-dialog-action")||t.elm.setAttribute("data-mdc-dialog-action","accept")})}}},y=n(4),g=Object(y.a)(v,function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"mdc-dialog",attrs:{"aria-describedby":"my-dialog-content","aria-labelledby":"my-dialog-title","aria-modal":"true",role:"alertdialog"},on:{"MDCDialog:closed":t.onClosed}},[n("div",{staticClass:"mdc-dialog__container"},[n("div",{staticClass:"mdc-dialog__surface"},[t.$slots.header?n("h2",{staticClass:"mdc-dialog__title",attrs:{id:"my-dialog-title"}},[t._t("header")],2):t._e(),t._v(" "),t.$slots.body?n("div",{staticClass:"mdc-dialog__content",class:t.bodyClasses,attrs:{id:"my-dialog-content"}},[t._t("body")],2):t._e(),t._v(" "),t.$slots.acceptButton||t.$slots.cancelButton||t.$slots.dialogButton?n("footer",{staticClass:"mdc-dialog__actions"},[t._t("cancelButton"),t._v(" "),t._t("acceptButton"),t._v(" "),t._t("dialogButton")],2):t._e()])]),t._v(" "),n("div",{staticClass:"mdc-dialog__scrim"})])},[],!1,null,null,null).exports,b=(n(31),n(7)),E={install:function(t){t.component("m-dialog",g)}};e.default=E,Object(b.a)(E)},8:function(t,e,n){"use strict";function i(t,e){if(t.closest)return t.closest(e);for(var n=t;n;){if(o(n,e))return n;n=n.parentElement}return null}function o(t,e){return(t.matches||t.webkitMatchesSelector||t.msMatchesSelector).call(t,e)}n.d(e,"a",function(){return i}),n.d(e,"b",function(){return o})}})});