-
Notifications
You must be signed in to change notification settings - Fork 0
/
3-es2015.js.map
1 lines (1 loc) · 33.8 KB
/
3-es2015.js.map
1
{"version":3,"sources":["./node_modules/@ionic/core/dist/esm/ion-alert-md.entry.js"],"names":[],"mappings":";;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA6H;AAC/F;AACC;AACgC;AACyF;AACjG;AACM;;AAE7D;AACA;AACA;AACA;AACA,0BAA0B,gEAAe;AACzC,8BAA8B,gEAAe;AAC7C,6BAA6B,gEAAe;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,sDAAsD;AAC/D,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,0BAA0B,gEAAe;AACzC,8BAA8B,gEAAe;AAC7C,6BAA6B,gEAAe;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,kDAAkD;AAC3D,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,0BAA0B,gEAAe;AACzC,8BAA8B,gEAAe;AAC7C,6BAA6B,gEAAe;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,sDAAsD;AAC/D,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,0BAA0B,gEAAe;AACzC,8BAA8B,gEAAe;AAC7C,6BAA6B,gEAAe;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,QAAQ,2DAAgB;AACxB;AACA;AACA;AACA,oBAAoB,2DAAU;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,uDAAQ;AAC5C;AACA;AACA;AACA,gBAAgB,+DAAQ;AACxB;AACA;AACA;AACA;AACA,QAAQ,+DAAc;AACtB,0BAA0B,2DAAW;AACrC,2BAA2B,2DAAW;AACtC,2BAA2B,2DAAW;AACtC,0BAA0B,2DAAW;AACrC;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D,4CAA4C;AACtG;AACA;AACA;AACA;AACA,+BAA+B,MAAM;AACrC;AACA;AACA;AACA;AACA;AACA,uCAAuC,kBAAkB,GAAG,MAAM;AAClE;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+DAAO;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+DAAO;AACtB;AACA;AACA;AACA;AACA;AACA,eAAe,+DAAW;AAC1B;AACA;AACA;AACA;AACA;AACA,eAAe,+DAAW;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,+DAAQ;AAChB;AACA;AACA;AACA;AACA,QAAQ,+DAAQ;AAChB;AACA;AACA;AACA;AACA;AACA,YAAY,+DAAQ;AACpB,iCAAiC,SAAS;AAC1C;AACA;AACA;AACA,+CAA+C,SAAS;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,+DAAQ;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,2DAAU;AAC/B;AACA;AACA;AACA,gBAAgB,2DAAC,SAAS,+DAA+D,mBAAmB,2DAAC,YAAY,oEAAoE,UAAU;AACvM;AACA;AACA;AACA;AACA;AACA,aAAa,EAAE,EAAE,2DAAC,SAAS,8BAA8B,EAAE,2DAAC,SAAS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sC,kBAAkB,mBAAmB,iBAAiB,oBAAoB,WAAW,OAAO,wCAAwC,eAAe,uBAAuB,mBAAmB,gBAAgB,6FAA6F,sCAAsC,mBAAmB,oBAAoB,2BAA2B,0BAA0B,yBAAyB,yBAAyB,qCAAqC,UAAU,MAAM,kBAAkB,kBAAkB,WAAW,YAAY,iBAAiB,mBAAmB,+CAA+C,eAAe,oMAAoM,WAAW,YAAY,WAAW,yEAAyE,8CAA8C,kDAAkD,0EAA0E,SAAS,MAAM,kBAAkB,UAAU,YAAY,gCAAgC,wBAAwB,iBAAiB,mBAAmB,oBAAoB,mBAAmB,oDAAoD,mTAAmT,WAAW,YAAY,UAAU,oCAAoC,iBAAiB,kBAAkB,gBAAgB,mBAAmB,8BAA8B,sBAAsB,2BAA2B,uBAAuB,kBAAkB,yBAAyB,6FAA6F,oCAAoC,mBAAmB,oBAAoB,0BAA0B,yBAAyB,wBAAwB,wBAAwB,8BAA8B,kBAAkB,cAAc,iBAAiB,aAAa,gBAAgB,kBAAkB,mBAAmB,iBAAiB,oBAAoB,kBAAkB,6BAA6B,uCAAuC,gBAAgB,eAAe,yBAAyB,gBAAgB,6FAA6F,8BAA8B,kBAAkB,mBAAmB,uBAAuB,sBAAsB,uBAAuB,sBAAsB,mBAAmB,oBAAoB,2BAA2B,0BAA0B,yBAAyB,yBAAyB,oCAAoC,kBAAkB,yBAAyB,EAAE;AAC7lX;AACA;AACA,0BAA0B,uEAAuE,EAAE,4DAAW;AAC9G;;AAE8B","file":"3-es2015.js","sourcesContent":["import { r as registerInstance, c as getIonMode, d as createEvent, h, H as Host, e as getElement } from './core-80bde1aa.js';\nimport './config-3c7f3790.js';\nimport './helpers-46f4a262.js';\nimport { c as createAnimation } from './animation-0084d55f.js';\nimport { B as BACKDROP, i as isCancel, d as prepareOverlay, e as present, f as dismiss, g as eventMethod, s as safeCall } from './overlays-992cb809.js';\nimport { g as getClassMap } from './theme-18cbe2cc.js';\nimport { s as sanitizeDOMString } from './index-3476b023.js';\n\n/**\r\n * iOS Alert Enter Animation\r\n */\r\nconst iosEnterAnimation = (baseEl) => {\r\n const baseAnimation = createAnimation();\r\n const backdropAnimation = createAnimation();\r\n const wrapperAnimation = createAnimation();\r\n backdropAnimation\r\n .addElement(baseEl.querySelector('ion-backdrop'))\r\n .fromTo('opacity', 0.01, 'var(--backdrop-opacity)');\r\n wrapperAnimation\r\n .addElement(baseEl.querySelector('.alert-wrapper'))\r\n .keyframes([\r\n { offset: 0, opacity: '0.01', transform: 'scale(1.1)' },\r\n { offset: 1, opacity: '1', transform: 'scale(1)' }\r\n ]);\r\n return baseAnimation\r\n .addElement(baseEl)\r\n .easing('ease-in-out')\r\n .duration(200)\r\n .addAnimation([backdropAnimation, wrapperAnimation]);\r\n};\n\n/**\r\n * iOS Alert Leave Animation\r\n */\r\nconst iosLeaveAnimation = (baseEl) => {\r\n const baseAnimation = createAnimation();\r\n const backdropAnimation = createAnimation();\r\n const wrapperAnimation = createAnimation();\r\n backdropAnimation\r\n .addElement(baseEl.querySelector('ion-backdrop'))\r\n .fromTo('opacity', 'var(--backdrop-opacity)', 0);\r\n wrapperAnimation\r\n .addElement(baseEl.querySelector('.alert-wrapper'))\r\n .keyframes([\r\n { offset: 0, opacity: 0.99, transform: 'scale(1)' },\r\n { offset: 1, opacity: 0, transform: 'scale(0.9)' }\r\n ]);\r\n return baseAnimation\r\n .addElement(baseEl)\r\n .easing('ease-in-out')\r\n .duration(200)\r\n .addAnimation([backdropAnimation, wrapperAnimation]);\r\n};\n\n/**\r\n * Md Alert Enter Animation\r\n */\r\nconst mdEnterAnimation = (baseEl) => {\r\n const baseAnimation = createAnimation();\r\n const backdropAnimation = createAnimation();\r\n const wrapperAnimation = createAnimation();\r\n backdropAnimation\r\n .addElement(baseEl.querySelector('ion-backdrop'))\r\n .fromTo('opacity', 0.01, 'var(--backdrop-opacity)');\r\n wrapperAnimation\r\n .addElement(baseEl.querySelector('.alert-wrapper'))\r\n .keyframes([\r\n { offset: 0, opacity: '0.01', transform: 'scale(0.9)' },\r\n { offset: 1, opacity: '1', transform: 'scale(1)' }\r\n ]);\r\n return baseAnimation\r\n .addElement(baseEl)\r\n .easing('ease-in-out')\r\n .duration(150)\r\n .addAnimation([backdropAnimation, wrapperAnimation]);\r\n};\n\n/**\r\n * Md Alert Leave Animation\r\n */\r\nconst mdLeaveAnimation = (baseEl) => {\r\n const baseAnimation = createAnimation();\r\n const backdropAnimation = createAnimation();\r\n const wrapperAnimation = createAnimation();\r\n backdropAnimation\r\n .addElement(baseEl.querySelector('ion-backdrop'))\r\n .fromTo('opacity', 'var(--backdrop-opacity)', 0);\r\n wrapperAnimation\r\n .addElement(baseEl.querySelector('.alert-wrapper'))\r\n .fromTo('opacity', 0.99, 0);\r\n return baseAnimation\r\n .addElement(baseEl)\r\n .easing('ease-in-out')\r\n .duration(150)\r\n .addAnimation([backdropAnimation, wrapperAnimation]);\r\n};\n\nconst Alert = class {\n constructor(hostRef) {\n registerInstance(this, hostRef);\n this.processedInputs = [];\n this.processedButtons = [];\n this.presented = false;\n this.mode = getIonMode(this);\n /**\n * If `true`, the keyboard will be automatically dismissed when the overlay is presented.\n */\n this.keyboardClose = true;\n /**\n * Array of buttons to be added to the alert.\n */\n this.buttons = [];\n /**\n * Array of input to show in the alert.\n */\n this.inputs = [];\n /**\n * If `true`, the alert will be dismissed when the backdrop is clicked.\n */\n this.backdropDismiss = true;\n /**\n * If `true`, the alert will be translucent.\n * Only applies when the mode is `\"ios\"` and the device supports\n * [`backdrop-filter`](https://developer.mozilla.org/en-US/docs/Web/CSS/backdrop-filter#Browser_compatibility).\n */\n this.translucent = false;\n /**\n * If `true`, the alert will animate.\n */\n this.animated = true;\n this.onBackdropTap = () => {\n this.dismiss(undefined, BACKDROP);\n };\n this.dispatchCancelHandler = (ev) => {\n const role = ev.detail.role;\n if (isCancel(role)) {\n const cancelButton = this.processedButtons.find(b => b.role === 'cancel');\n this.callButtonHandler(cancelButton);\n }\n };\n prepareOverlay(this.el);\n this.didPresent = createEvent(this, \"ionAlertDidPresent\", 7);\n this.willPresent = createEvent(this, \"ionAlertWillPresent\", 7);\n this.willDismiss = createEvent(this, \"ionAlertWillDismiss\", 7);\n this.didDismiss = createEvent(this, \"ionAlertDidDismiss\", 7);\n }\n buttonsChanged() {\n const buttons = this.buttons;\n this.processedButtons = buttons.map(btn => {\n return (typeof btn === 'string')\n ? { text: btn, role: btn.toLowerCase() === 'cancel' ? 'cancel' : undefined }\n : btn;\n });\n }\n inputsChanged() {\n const inputs = this.inputs;\n // An alert can be created with several different inputs. Radios,\n // checkboxes and inputs are all accepted, but they cannot be mixed.\n const inputTypes = new Set(inputs.map(i => i.type));\n if (inputTypes.has('checkbox') && inputTypes.has('radio')) {\n console.warn(`Alert cannot mix input types: ${(Array.from(inputTypes.values()).join('/'))}. Please see alert docs for more info.`);\n }\n this.inputType = inputTypes.values().next().value;\n this.processedInputs = inputs.map((i, index) => ({\n type: i.type || 'text',\n name: i.name || `${index}`,\n placeholder: i.placeholder || '',\n value: i.value,\n label: i.label,\n checked: !!i.checked,\n disabled: !!i.disabled,\n id: i.id || `alert-input-${this.overlayIndex}-${index}`,\n handler: i.handler,\n min: i.min,\n max: i.max\n }));\n }\n componentWillLoad() {\n this.inputsChanged();\n this.buttonsChanged();\n }\n /**\n * Present the alert overlay after it has been created.\n */\n present() {\n return present(this, 'alertEnter', iosEnterAnimation, mdEnterAnimation);\n }\n /**\n * Dismiss the alert overlay after it has been presented.\n *\n * @param data Any data to emit in the dismiss events.\n * @param role The role of the element that is dismissing the alert.\n * This can be useful in a button handler for determining which button was\n * clicked to dismiss the alert.\n * Some examples include: ``\"cancel\"`, `\"destructive\"`, \"selected\"`, and `\"backdrop\"`.\n */\n dismiss(data, role) {\n return dismiss(this, data, role, 'alertLeave', iosLeaveAnimation, mdLeaveAnimation);\n }\n /**\n * Returns a promise that resolves when the alert did dismiss.\n */\n onDidDismiss() {\n return eventMethod(this.el, 'ionAlertDidDismiss');\n }\n /**\n * Returns a promise that resolves when the alert will dismiss.\n */\n onWillDismiss() {\n return eventMethod(this.el, 'ionAlertWillDismiss');\n }\n rbClick(selectedInput) {\n for (const input of this.processedInputs) {\n input.checked = input === selectedInput;\n }\n this.activeId = selectedInput.id;\n safeCall(selectedInput.handler, selectedInput);\n this.el.forceUpdate();\n }\n cbClick(selectedInput) {\n selectedInput.checked = !selectedInput.checked;\n safeCall(selectedInput.handler, selectedInput);\n this.el.forceUpdate();\n }\n buttonClick(button) {\n const role = button.role;\n const values = this.getValues();\n if (isCancel(role)) {\n return this.dismiss({ values }, role);\n }\n const returnData = this.callButtonHandler(button, values);\n if (returnData !== false) {\n return this.dismiss(Object.assign({ values }, returnData), button.role);\n }\n return Promise.resolve(false);\n }\n callButtonHandler(button, data) {\n if (button && button.handler) {\n // a handler has been provided, execute it\n // pass the handler the values from the inputs\n const returnData = safeCall(button.handler, data);\n if (returnData === false) {\n // if the return value of the handler is false then do not dismiss\n return false;\n }\n if (typeof returnData === 'object') {\n return returnData;\n }\n }\n return {};\n }\n getValues() {\n if (this.processedInputs.length === 0) {\n // this is an alert without any options/inputs at all\n return undefined;\n }\n if (this.inputType === 'radio') {\n // this is an alert with radio buttons (single value select)\n // return the one value which is checked, otherwise undefined\n const checkedInput = this.processedInputs.find(i => !!i.checked);\n return checkedInput ? checkedInput.value : undefined;\n }\n if (this.inputType === 'checkbox') {\n // this is an alert with checkboxes (multiple value select)\n // return an array of all the checked values\n return this.processedInputs.filter(i => i.checked).map(i => i.value);\n }\n // this is an alert with text inputs\n // return an object of all the values with the input name as the key\n const values = {};\n this.processedInputs.forEach(i => {\n values[i.name] = i.value || '';\n });\n return values;\n }\n renderAlertInputs(labelledBy) {\n switch (this.inputType) {\n case 'checkbox': return this.renderCheckbox(labelledBy);\n case 'radio': return this.renderRadio(labelledBy);\n default: return this.renderInput(labelledBy);\n }\n }\n renderCheckbox(labelledby) {\n const inputs = this.processedInputs;\n const mode = getIonMode(this);\n if (inputs.length === 0) {\n return null;\n }\n return (h(\"div\", { class: \"alert-checkbox-group\", \"aria-labelledby\": labelledby }, inputs.map(i => (h(\"button\", { type: \"button\", onClick: () => this.cbClick(i), \"aria-checked\": `${i.checked}`, id: i.id, disabled: i.disabled, tabIndex: 0, role: \"checkbox\", class: {\n 'alert-tappable': true,\n 'alert-checkbox': true,\n 'alert-checkbox-button': true,\n 'ion-focusable': true,\n 'alert-checkbox-button-disabled': i.disabled || false\n } }, h(\"div\", { class: \"alert-button-inner\" }, h(\"div\", { class: \"alert-checkbox-icon\" }, h(\"div\", { class: \"alert-checkbox-inner\" })), h(\"div\", { class: \"alert-checkbox-label\" }, i.label)), mode === 'md' && h(\"ion-ripple-effect\", null))))));\n }\n renderRadio(labelledby) {\n const inputs = this.processedInputs;\n if (inputs.length === 0) {\n return null;\n }\n return (h(\"div\", { class: \"alert-radio-group\", role: \"radiogroup\", \"aria-labelledby\": labelledby, \"aria-activedescendant\": this.activeId }, inputs.map(i => (h(\"button\", { type: \"button\", onClick: () => this.rbClick(i), \"aria-checked\": `${i.checked}`, disabled: i.disabled, id: i.id, tabIndex: 0, class: {\n 'alert-radio-button': true,\n 'alert-tappable': true,\n 'alert-radio': true,\n 'ion-focusable': true,\n 'alert-radio-button-disabled': i.disabled || false\n }, role: \"radio\" }, h(\"div\", { class: \"alert-button-inner\" }, h(\"div\", { class: \"alert-radio-icon\" }, h(\"div\", { class: \"alert-radio-inner\" })), h(\"div\", { class: \"alert-radio-label\" }, i.label)))))));\n }\n renderInput(labelledby) {\n const inputs = this.processedInputs;\n if (inputs.length === 0) {\n return null;\n }\n return (h(\"div\", { class: \"alert-input-group\", \"aria-labelledby\": labelledby }, inputs.map(i => {\n if (i.type === 'textarea') {\n return (h(\"div\", { class: \"alert-input-wrapper\" }, h(\"textarea\", { placeholder: i.placeholder, value: i.value, onInput: e => i.value = e.target.value, id: i.id, disabled: i.disabled, tabIndex: 0, class: {\n 'alert-input': true,\n 'alert-input-disabled': i.disabled || false\n } })));\n }\n else {\n return (h(\"div\", { class: \"alert-input-wrapper\" }, h(\"input\", { placeholder: i.placeholder, value: i.value, type: i.type, min: i.min, max: i.max, onInput: e => i.value = e.target.value, id: i.id, disabled: i.disabled, tabIndex: 0, class: {\n 'alert-input': true,\n 'alert-input-disabled': i.disabled || false\n } })));\n }\n })));\n }\n renderAlertButtons() {\n const buttons = this.processedButtons;\n const mode = getIonMode(this);\n const alertButtonGroupClass = {\n 'alert-button-group': true,\n 'alert-button-group-vertical': buttons.length > 2\n };\n return (h(\"div\", { class: alertButtonGroupClass }, buttons.map(button => h(\"button\", { type: \"button\", class: buttonClass(button), tabIndex: 0, onClick: () => this.buttonClick(button) }, h(\"span\", { class: \"alert-button-inner\" }, button.text), mode === 'md' && h(\"ion-ripple-effect\", null)))));\n }\n render() {\n const { overlayIndex, header, subHeader } = this;\n const mode = getIonMode(this);\n const hdrId = `alert-${overlayIndex}-hdr`;\n const subHdrId = `alert-${overlayIndex}-sub-hdr`;\n const msgId = `alert-${overlayIndex}-msg`;\n let labelledById;\n if (header !== undefined) {\n labelledById = hdrId;\n }\n else if (subHeader !== undefined) {\n labelledById = subHdrId;\n }\n return (h(Host, { role: \"dialog\", \"aria-modal\": \"true\", style: {\n zIndex: `${20000 + overlayIndex}`,\n }, class: Object.assign(Object.assign({}, getClassMap(this.cssClass)), { [mode]: true, 'alert-translucent': this.translucent }), onIonAlertWillDismiss: this.dispatchCancelHandler, onIonBackdropTap: this.onBackdropTap }, h(\"ion-backdrop\", { tappable: this.backdropDismiss }), h(\"div\", { class: \"alert-wrapper\" }, h(\"div\", { class: \"alert-head\" }, header && h(\"h2\", { id: hdrId, class: \"alert-title\" }, header), subHeader && h(\"h2\", { id: subHdrId, class: \"alert-sub-title\" }, subHeader)), h(\"div\", { id: msgId, class: \"alert-message\", innerHTML: sanitizeDOMString(this.message) }), this.renderAlertInputs(labelledById), this.renderAlertButtons())));\n }\n get el() { return getElement(this); }\n static get watchers() { return {\n \"buttons\": [\"buttonsChanged\"],\n \"inputs\": [\"inputsChanged\"]\n }; }\n static get style() { return \".sc-ion-alert-md-h{--min-width:250px;--width:auto;--min-height:auto;--height:auto;--max-height:90%;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;left:0;right:0;top:0;bottom:0;display:-ms-flexbox;display:flex;position:fixed;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;font-family:var(--ion-font-family,inherit);contain:strict;-ms-touch-action:none;touch-action:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:1001}.overlay-hidden.sc-ion-alert-md-h{display:none}.alert-top.sc-ion-alert-md-h{padding-top:50px;-ms-flex-align:start;align-items:flex-start}.alert-wrapper.sc-ion-alert-md{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;width:var(--width);min-width:var(--min-width);max-width:var(--max-width);height:var(--height);min-height:var(--min-height);max-height:var(--max-height);background:var(--background);contain:content;opacity:0;z-index:10}.alert-title.sc-ion-alert-md{margin-top:0}.alert-sub-title.sc-ion-alert-md, .alert-title.sc-ion-alert-md{margin-left:0;margin-right:0;margin-bottom:0;padding-left:0;padding-right:0;padding-top:0;padding-bottom:0}.alert-sub-title.sc-ion-alert-md{margin-top:5px;font-weight:400}.alert-message.sc-ion-alert-md{-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-overflow-scrolling:touch;overflow-y:auto;overscroll-behavior-y:contain}.alert-checkbox-group.sc-ion-alert-md::-webkit-scrollbar, .alert-message.sc-ion-alert-md::-webkit-scrollbar, .alert-radio-group.sc-ion-alert-md::-webkit-scrollbar{display:none}.alert-input.sc-ion-alert-md{padding-left:0;padding-right:0;padding-top:10px;padding-bottom:10px;width:100%;border:0;background:inherit;font:inherit;-webkit-box-sizing:border-box;box-sizing:border-box}.alert-button-group.sc-ion-alert-md{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;width:100%}.alert-button-group-vertical.sc-ion-alert-md{-ms-flex-direction:column;flex-direction:column;-ms-flex-wrap:nowrap;flex-wrap:nowrap}.alert-button.sc-ion-alert-md{margin-right:0;display:block;border:0;font-size:14px;line-height:20px;z-index:0}.alert-button.ion-focused.sc-ion-alert-md, .alert-tappable.ion-focused.sc-ion-alert-md{background:var(--ion-color-step-100,#e6e6e6)}.alert-button-inner.sc-ion-alert-md{display:-ms-flexbox;display:flex;-ms-flex-flow:row nowrap;flex-flow:row nowrap;-ms-flex-negative:0;flex-shrink:0;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:100%;height:100%}.alert-checkbox-button-disabled.sc-ion-alert-md .alert-button-inner.sc-ion-alert-md, .alert-input-disabled.sc-ion-alert-md, .alert-radio-button-disabled.sc-ion-alert-md .alert-button-inner.sc-ion-alert-md{cursor:default;opacity:.5;pointer-events:none}.alert-tappable.sc-ion-alert-md{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;display:-ms-flexbox;display:flex;width:100%;border:0;background:transparent;font-size:inherit;line-height:normal;text-align:start;-webkit-appearance:none;-moz-appearance:none;appearance:none;contain:strict}.alert-button.sc-ion-alert-md, .alert-checkbox.sc-ion-alert-md, .alert-input.sc-ion-alert-md, .alert-radio.sc-ion-alert-md{outline:none}.alert-checkbox-icon.sc-ion-alert-md, .alert-checkbox-inner.sc-ion-alert-md, .alert-radio-icon.sc-ion-alert-md{-webkit-box-sizing:border-box;box-sizing:border-box}textarea.alert-input.sc-ion-alert-md{min-height:37px;resize:none}.sc-ion-alert-md-h{--background:var(--ion-overlay-background-color,var(--ion-background-color,#fff));--max-width:280px;--backdrop-opacity:var(--ion-backdrop-opacity,0.32);font-size:14px}.alert-wrapper.sc-ion-alert-md{border-radius:4px;-webkit-box-shadow:0 11px 15px -7px rgba(0,0,0,.2),0 24px 38px 3px rgba(0,0,0,.14),0 9px 46px 8px rgba(0,0,0,.12);box-shadow:0 11px 15px -7px rgba(0,0,0,.2),0 24px 38px 3px rgba(0,0,0,.14),0 9px 46px 8px rgba(0,0,0,.12)}.alert-head.sc-ion-alert-md{padding-left:23px;padding-right:23px;padding-top:20px;padding-bottom:15px;text-align:start}\\@supports ((-webkit-margin-start:0) or (margin-inline-start:0)) or (-webkit-margin-start:0){.alert-head.sc-ion-alert-md{padding-left:unset;padding-right:unset;-webkit-padding-start:23px;padding-inline-start:23px;-webkit-padding-end:23px;padding-inline-end:23px}}.alert-title.sc-ion-alert-md{font-size:20px;font-weight:500}.alert-sub-title.sc-ion-alert-md, .alert-title.sc-ion-alert-md{color:var(--ion-text-color,#000)}.alert-sub-title.sc-ion-alert-md{font-size:16px}.alert-input-group.sc-ion-alert-md, .alert-message.sc-ion-alert-md{padding-left:24px;padding-right:24px;padding-top:20px;padding-bottom:20px;color:var(--ion-color-step-550,#737373)}\\@supports ((-webkit-margin-start:0) or (margin-inline-start:0)) or (-webkit-margin-start:0){.alert-input-group.sc-ion-alert-md, .alert-message.sc-ion-alert-md{padding-left:unset;padding-right:unset;-webkit-padding-start:24px;padding-inline-start:24px;-webkit-padding-end:24px;padding-inline-end:24px}}.alert-message.sc-ion-alert-md{max-height:240px;font-size:16px}.alert-message.sc-ion-alert-md:empty{padding-left:0;padding-right:0;padding-top:0;padding-bottom:0}.alert-head.sc-ion-alert-md + .alert-message.sc-ion-alert-md{padding-top:0}.alert-input.sc-ion-alert-md{margin-left:0;margin-right:0;margin-top:5px;margin-bottom:5px;border-bottom:1px solid var(--ion-color-step-150,#d9d9d9);color:var(--ion-text-color,#000)}.alert-input.sc-ion-alert-md::-webkit-input-placeholder{color:var(--ion-placeholder-color,var(--ion-color-step-400,#999));font-family:inherit;font-weight:inherit}.alert-input.sc-ion-alert-md::-moz-placeholder{color:var(--ion-placeholder-color,var(--ion-color-step-400,#999));font-family:inherit;font-weight:inherit}.alert-input.sc-ion-alert-md:-ms-input-placeholder{color:var(--ion-placeholder-color,var(--ion-color-step-400,#999));font-family:inherit;font-weight:inherit}.alert-input.sc-ion-alert-md::-ms-input-placeholder{color:var(--ion-placeholder-color,var(--ion-color-step-400,#999));font-family:inherit;font-weight:inherit}.alert-input.sc-ion-alert-md::placeholder{color:var(--ion-placeholder-color,var(--ion-color-step-400,#999));font-family:inherit;font-weight:inherit}.alert-input.sc-ion-alert-md::-ms-clear{display:none}.alert-input.sc-ion-alert-md:focus{margin-bottom:4px;border-bottom:2px solid var(--ion-color-primary,#3880ff)}.alert-checkbox-group.sc-ion-alert-md, .alert-radio-group.sc-ion-alert-md{position:relative;max-height:240px;border-top:1px solid var(--ion-color-step-150,#d9d9d9);border-bottom:1px solid var(--ion-color-step-150,#d9d9d9);overflow:auto}.alert-tappable.sc-ion-alert-md{position:relative;height:48px;overflow:hidden}.alert-radio-label.sc-ion-alert-md{padding-left:52px;padding-right:26px;padding-top:13px;padding-bottom:13px;-ms-flex:1;flex:1;color:var(--ion-color-step-850,#262626);font-size:16px;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}\\@supports ((-webkit-margin-start:0) or (margin-inline-start:0)) or (-webkit-margin-start:0){.alert-radio-label.sc-ion-alert-md{padding-left:unset;padding-right:unset;-webkit-padding-start:52px;padding-inline-start:52px;-webkit-padding-end:26px;padding-inline-end:26px}}.alert-radio-icon.sc-ion-alert-md{left:26px;top:0;border-radius:50%;display:block;position:relative;width:20px;height:20px;border-width:2px;border-style:solid;border-color:var(--ion-color-step-550,#737373)}[dir=rtl].sc-ion-alert-md-h .alert-radio-icon.sc-ion-alert-md, [dir=rtl] .sc-ion-alert-md-h .alert-radio-icon.sc-ion-alert-md, [dir=rtl].sc-ion-alert-md .alert-radio-icon.sc-ion-alert-md{left:unset;right:unset;right:26px}.alert-radio-inner.sc-ion-alert-md{left:3px;top:3px;border-radius:50%;position:absolute;width:10px;height:10px;-webkit-transform:scale3d(0,0,0);transform:scale3d(0,0,0);-webkit-transition:-webkit-transform .28s cubic-bezier(.4,0,.2,1);transition:-webkit-transform .28s cubic-bezier(.4,0,.2,1);transition:transform .28s cubic-bezier(.4,0,.2,1);transition:transform .28s cubic-bezier(.4,0,.2,1),-webkit-transform .28s cubic-bezier(.4,0,.2,1);background-color:var(--ion-color-primary,#3880ff)}[dir=rtl].sc-ion-alert-md-h .alert-radio-inner.sc-ion-alert-md, [dir=rtl] .sc-ion-alert-md-h .alert-radio-inner.sc-ion-alert-md, [dir=rtl].sc-ion-alert-md .alert-radio-inner.sc-ion-alert-md{left:unset;right:unset;right:3px}[aria-checked=true].sc-ion-alert-md .alert-radio-label.sc-ion-alert-md{color:var(--ion-color-step-850,#262626)}[aria-checked=true].sc-ion-alert-md .alert-radio-icon.sc-ion-alert-md{border-color:var(--ion-color-primary,#3880ff)}[aria-checked=true].sc-ion-alert-md .alert-radio-inner.sc-ion-alert-md{-webkit-transform:scaleX(1);transform:scaleX(1)}.alert-checkbox-label.sc-ion-alert-md{padding-left:53px;padding-right:26px;padding-top:13px;padding-bottom:13px;-ms-flex:1;flex:1;color:var(--ion-color-step-850,#262626);font-size:16px;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}\\@supports ((-webkit-margin-start:0) or (margin-inline-start:0)) or (-webkit-margin-start:0){.alert-checkbox-label.sc-ion-alert-md{padding-left:unset;padding-right:unset;-webkit-padding-start:53px;padding-inline-start:53px;-webkit-padding-end:26px;padding-inline-end:26px}}.alert-checkbox-icon.sc-ion-alert-md{left:26px;top:0;border-radius:2px;position:relative;width:16px;height:16px;border-width:2px;border-style:solid;border-color:var(--ion-color-step-550,#737373);contain:strict}[dir=rtl].sc-ion-alert-md-h .alert-checkbox-icon.sc-ion-alert-md, [dir=rtl] .sc-ion-alert-md-h .alert-checkbox-icon.sc-ion-alert-md, [dir=rtl].sc-ion-alert-md .alert-checkbox-icon.sc-ion-alert-md{left:unset;right:unset;right:26px}[aria-checked=true].sc-ion-alert-md .alert-checkbox-icon.sc-ion-alert-md{border-color:var(--ion-color-primary,#3880ff);background-color:var(--ion-color-primary,#3880ff)}[aria-checked=true].sc-ion-alert-md .alert-checkbox-inner.sc-ion-alert-md{left:3px;top:0;position:absolute;width:6px;height:10px;-webkit-transform:rotate(45deg);transform:rotate(45deg);border-width:2px;border-top-width:0;border-left-width:0;border-style:solid;border-color:var(--ion-color-primary-contrast,#fff)}[dir=rtl].sc-ion-alert-md-h [aria-checked=true].sc-ion-alert-md .alert-checkbox-inner.sc-ion-alert-md, [dir=rtl] .sc-ion-alert-md-h [aria-checked=true].sc-ion-alert-md .alert-checkbox-inner.sc-ion-alert-md, [dir=rtl].sc-ion-alert-md [aria-checked=true].sc-ion-alert-md .alert-checkbox-inner.sc-ion-alert-md{left:unset;right:unset;right:3px}.alert-button-group.sc-ion-alert-md{padding-left:8px;padding-right:8px;padding-top:8px;padding-bottom:8px;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-wrap:wrap-reverse;flex-wrap:wrap-reverse;-ms-flex-pack:end;justify-content:flex-end}\\@supports ((-webkit-margin-start:0) or (margin-inline-start:0)) or (-webkit-margin-start:0){.alert-button-group.sc-ion-alert-md{padding-left:unset;padding-right:unset;-webkit-padding-start:8px;padding-inline-start:8px;-webkit-padding-end:8px;padding-inline-end:8px}}.alert-button.sc-ion-alert-md{border-radius:2px;margin-left:0;margin-right:8px;margin-top:0;margin-bottom:0;padding-left:10px;padding-right:10px;padding-top:10px;padding-bottom:10px;position:relative;background-color:transparent;color:var(--ion-color-primary,#3880ff);font-weight:500;text-align:end;text-transform:uppercase;overflow:hidden}\\@supports ((-webkit-margin-start:0) or (margin-inline-start:0)) or (-webkit-margin-start:0){.alert-button.sc-ion-alert-md{margin-left:unset;margin-right:unset;-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:8px;margin-inline-end:8px;padding-left:unset;padding-right:unset;-webkit-padding-start:10px;padding-inline-start:10px;-webkit-padding-end:10px;padding-inline-end:10px}}.alert-button-inner.sc-ion-alert-md{-ms-flex-pack:end;justify-content:flex-end}\"; }\n};\nconst buttonClass = (button) => {\n return Object.assign({ 'alert-button': true, 'ion-focusable': true, 'ion-activatable': true }, getClassMap(button.cssClass));\n};\n\nexport { Alert as ion_alert };\n"],"sourceRoot":"webpack:///"}