1 line
78 KiB
JSON
1 line
78 KiB
JSON
{"ast":null,"code":"import _asyncToGenerator from \"D:/MobileDev/WRB/WrenchBoard2023a/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js\";\n\n/*!\n * (C) Ionic http://ionicframework.com - MIT License\n */\nimport { r as registerInstance, e as createEvent, h, H as Host, i as getElement } from './index-1a99aeb7.js';\nimport { b as getIonMode } from './ionic-global-04e268e7.js';\nimport { f as focusElement, k as findItemLabel, d as getAriaLabel, e as renderHiddenInput } from './helpers-4d272360.js';\nimport { c as popoverController, b as actionSheetController, a as alertController, s as safeCall } from './overlays-f469834d.js';\nimport { h as hostContext, g as getClassMap } from './theme-7670341c.js';\nimport './hardware-back-button-490df115.js';\n\nconst watchForOptions = (containerEl, tagName, onChange) => {\n if (typeof MutationObserver === 'undefined') {\n return;\n }\n\n const mutation = new MutationObserver(mutationList => {\n onChange(getSelectedOption(mutationList, tagName));\n });\n mutation.observe(containerEl, {\n childList: true,\n subtree: true\n });\n return mutation;\n};\n\nconst getSelectedOption = (mutationList, tagName) => {\n let newOption;\n mutationList.forEach(mut => {\n // eslint-disable-next-line @typescript-eslint/prefer-for-of\n for (let i = 0; i < mut.addedNodes.length; i++) {\n newOption = findCheckedOption(mut.addedNodes[i], tagName) || newOption;\n }\n });\n return newOption;\n};\n\nconst findCheckedOption = (el, tagName) => {\n if (el.nodeType !== 1) {\n return undefined;\n }\n\n const options = el.tagName === tagName.toUpperCase() ? [el] : Array.from(el.querySelectorAll(tagName));\n return options.find(o => o.value === el.value);\n};\n\nconst selectIosCss = \":host{--placeholder-color:currentColor;--placeholder-opacity:0.33;padding-left:var(--padding-start);padding-right:var(--padding-end);padding-top:var(--padding-top);padding-bottom:var(--padding-bottom);display:-ms-flexbox;display:flex;position:relative;-ms-flex-align:center;align-items:center;font-family:var(--ion-font-family, inherit);overflow:hidden;z-index:2}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){:host{padding-left:unset;padding-right:unset;-webkit-padding-start:var(--padding-start);padding-inline-start:var(--padding-start);-webkit-padding-end:var(--padding-end);padding-inline-end:var(--padding-end)}}:host(.in-item){position:static;max-width:45%}:host(.select-disabled){opacity:0.4;pointer-events:none}:host(.ion-focused) button{border:2px solid #5e9ed6}.select-placeholder{color:var(--placeholder-color);opacity:var(--placeholder-opacity)}label{left:0;top:0;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;position:absolute;width:100%;height:100%;border:0;background:transparent;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;outline:none;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;opacity:0}[dir=rtl] label,:host-context([dir=rtl]) label{left:unset;right:unset;right:0}label::-moz-focus-inner{border:0}button{position:absolute;top:0;left:0;right:0;bottom:0;width:100%;height:100%;margin:0;padding:0;border:0;outline:0;clip:rect(0 0 0 0);opacity:0;overflow:hidden;-webkit-appearance:none;-moz-appearance:none}.select-icon{position:relative}.select-text{-ms-flex:1;flex:1;min-width:16px;font-size:inherit;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.select-icon-inner{left:5px;top:50%;margin-top:-2px;position:absolute;width:0;height:0;border-top:5px solid;border-right:5px solid transparent;border-left:5px solid transparent;color:currentColor;pointer-events:none}[dir=rtl] .select-icon-inner,:host-context([dir=rtl]) .select-icon-inner{left:unset;right:unset;right:5px}:host{--padding-top:10px;--padding-end:10px;--padding-bottom:10px;--padding-start:20px}.select-icon{width:12px;height:18px;opacity:0.33}\";\nconst selectMdCss = \":host{--placeholder-color:currentColor;--placeholder-opacity:0.33;padding-left:var(--padding-start);padding-right:var(--padding-end);padding-top:var(--padding-top);padding-bottom:var(--padding-bottom);display:-ms-flexbox;display:flex;position:relative;-ms-flex-align:center;align-items:center;font-family:var(--ion-font-family, inherit);overflow:hidden;z-index:2}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){:host{padding-left:unset;padding-right:unset;-webkit-padding-start:var(--padding-start);padding-inline-start:var(--padding-start);-webkit-padding-end:var(--padding-end);padding-inline-end:var(--padding-end)}}:host(.in-item){position:static;max-width:45%}:host(.select-disabled){opacity:0.4;pointer-events:none}:host(.ion-focused) button{border:2px solid #5e9ed6}.select-placeholder{color:var(--placeholder-color);opacity:var(--placeholder-opacity)}label{left:0;top:0;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;position:absolute;width:100%;height:100%;border:0;background:transparent;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;outline:none;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;opacity:0}[dir=rtl] label,:host-context([dir=rtl]) label{left:unset;right:unset;right:0}label::-moz-focus-inner{border:0}button{position:absolute;top:0;left:0;right:0;bottom:0;width:100%;height:100%;margin:0;padding:0;border:0;outline:0;clip:rect(0 0 0 0);opacity:0;overflow:hidden;-webkit-appearance:none;-moz-appearance:none}.select-icon{position:relative}.select-text{-ms-flex:1;flex:1;min-width:16px;font-size:inherit;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.select-icon-inner{left:5px;top:50%;margin-top:-2px;position:absolute;width:0;height:0;border-top:5px solid;border-right:5px solid transparent;border-left:5px solid transparent;color:currentColor;pointer-events:none}[dir=rtl] .select-icon-inner,:host-context([dir=rtl]) .select-icon-inner{left:unset;right:unset;right:5px}:host{--padding-top:10px;--padding-end:0;--padding-bottom:10px;--padding-start:16px}.select-icon{width:19px;height:19px;-webkit-transition:-webkit-transform 0.15s cubic-bezier(0.4, 0, 0.2, 1);transition:-webkit-transform 0.15s cubic-bezier(0.4, 0, 0.2, 1);transition:transform 0.15s cubic-bezier(0.4, 0, 0.2, 1);transition:transform 0.15s cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 0.15s cubic-bezier(0.4, 0, 0.2, 1);opacity:0.55}:host-context(.item-label-stacked) .select-icon,:host-context(.item-label-floating:not(.item-fill-outline)) .select-icon,:host-context(.item-label-floating.item-fill-outline){-webkit-transform:translate3d(0, -9px, 0);transform:translate3d(0, -9px, 0)}:host-context(.item-has-focus) .select-icon{-webkit-transform:rotate(180deg);transform:rotate(180deg)}:host-context(.item-has-focus.item-label-stacked) .select-icon,:host-context(.item-has-focus.item-label-floating:not(.item-fill-outline)) .select-icon{-webkit-transform:translate3d(0, -9px, 0) rotate(180deg);transform:translate3d(0, -9px, 0) rotate(180deg)}:host-context(ion-item.ion-focused) .select-icon,:host-context(.item-has-focus) .select-icon{color:var(--highlight-color-focused);opacity:1}\";\nconst Select = class {\n constructor(hostRef) {\n registerInstance(this, hostRef);\n this.ionChange = createEvent(this, \"ionChange\", 7);\n this.ionCancel = createEvent(this, \"ionCancel\", 7);\n this.ionDismiss = createEvent(this, \"ionDismiss\", 7);\n this.ionFocus = createEvent(this, \"ionFocus\", 7);\n this.ionBlur = createEvent(this, \"ionBlur\", 7);\n this.ionStyle = createEvent(this, \"ionStyle\", 7);\n this.inputId = `ion-sel-${selectIds++}`;\n this.didInit = false;\n this.isExpanded = false;\n /**\n * If `true`, the user cannot interact with the select.\n */\n\n this.disabled = false;\n /**\n * The text to display on the cancel button.\n */\n\n this.cancelText = 'Cancel';\n /**\n * The text to display on the ok button.\n */\n\n this.okText = 'OK';\n /**\n * The name of the control, which is submitted with the form data.\n */\n\n this.name = this.inputId;\n /**\n * If `true`, the select can accept multiple values.\n */\n\n this.multiple = false;\n /**\n * The interface the select should use: `action-sheet`, `popover` or `alert`.\n */\n\n this.interface = 'alert';\n /**\n * Any additional options that the `alert`, `action-sheet` or `popover` interface\n * can take. See the [ion-alert docs](./alert), the\n * [ion-action-sheet docs](./action-sheet) and the\n * [ion-popover docs](./popover) for the\n * create options for each interface.\n *\n * Note: `interfaceOptions` will not override `inputs` or `buttons` with the `alert` interface.\n */\n\n this.interfaceOptions = {};\n\n this.onClick = ev => {\n this.setFocus();\n this.open(ev);\n };\n\n this.onFocus = () => {\n this.ionFocus.emit();\n };\n\n this.onBlur = () => {\n this.ionBlur.emit();\n };\n }\n\n styleChanged() {\n this.emitStyle();\n }\n\n valueChanged() {\n this.emitStyle(); // TODO: FW-1160 - Remove the `didInit` property when ionChange behavior is changed in v7.\n\n if (this.didInit) {\n this.ionChange.emit({\n value: this.value\n });\n }\n }\n\n connectedCallback() {\n var _this = this;\n\n return _asyncToGenerator(function* () {\n _this.updateOverlayOptions();\n\n _this.emitStyle();\n\n _this.mutationO = watchForOptions(_this.el, 'ion-select-option', /*#__PURE__*/_asyncToGenerator(function* () {\n _this.updateOverlayOptions();\n }));\n })();\n }\n\n disconnectedCallback() {\n if (this.mutationO) {\n this.mutationO.disconnect();\n this.mutationO = undefined;\n }\n }\n\n componentDidLoad() {\n this.didInit = true;\n }\n /**\n * Open the select overlay. The overlay is either an alert, action sheet, or popover,\n * depending on the `interface` property on the `ion-select`.\n *\n * @param event The user interface event that called the open.\n */\n\n\n open(event) {\n var _this2 = this;\n\n return _asyncToGenerator(function* () {\n if (_this2.disabled || _this2.isExpanded) {\n return undefined;\n }\n\n _this2.isExpanded = true;\n const overlay = _this2.overlay = yield _this2.createOverlay(event);\n overlay.onDidDismiss().then(() => {\n _this2.overlay = undefined;\n _this2.isExpanded = false;\n\n _this2.ionDismiss.emit();\n\n _this2.setFocus();\n });\n yield overlay.present(); // focus selected option for popovers\n\n if (_this2.interface === 'popover') {\n let indexOfSelected = _this2.childOpts.map(o => o.value).indexOf(_this2.value);\n\n indexOfSelected = indexOfSelected > -1 ? indexOfSelected : 0; // default to first option if nothing selected\n\n const selectedEl = overlay.querySelector(`.select-interface-option:nth-child(${indexOfSelected + 1})`);\n\n if (selectedEl) {\n focusElement(selectedEl);\n }\n }\n\n return overlay;\n })();\n }\n\n createOverlay(ev) {\n let selectInterface = this.interface;\n\n if (selectInterface === 'action-sheet' && this.multiple) {\n console.warn(`Select interface cannot be \"${selectInterface}\" with a multi-value select. Using the \"alert\" interface instead.`);\n selectInterface = 'alert';\n }\n\n if (selectInterface === 'popover' && !ev) {\n console.warn(`Select interface cannot be a \"${selectInterface}\" without passing an event. Using the \"alert\" interface instead.`);\n selectInterface = 'alert';\n }\n\n if (selectInterface === 'action-sheet') {\n return this.openActionSheet();\n }\n\n if (selectInterface === 'popover') {\n return this.openPopover(ev);\n }\n\n return this.openAlert();\n }\n\n updateOverlayOptions() {\n const overlay = this.overlay;\n\n if (!overlay) {\n return;\n }\n\n const childOpts = this.childOpts;\n const value = this.value;\n\n switch (this.interface) {\n case 'action-sheet':\n overlay.buttons = this.createActionSheetButtons(childOpts, value);\n break;\n\n case 'popover':\n const popover = overlay.querySelector('ion-select-popover');\n\n if (popover) {\n popover.options = this.createPopoverOptions(childOpts, value);\n }\n\n break;\n\n case 'alert':\n const inputType = this.multiple ? 'checkbox' : 'radio';\n overlay.inputs = this.createAlertInputs(childOpts, inputType, value);\n break;\n }\n }\n\n createActionSheetButtons(data, selectValue) {\n const actionSheetButtons = data.map(option => {\n const value = getOptionValue(option); // Remove hydrated before copying over classes\n\n const copyClasses = Array.from(option.classList).filter(cls => cls !== 'hydrated').join(' ');\n const optClass = `${OPTION_CLASS} ${copyClasses}`;\n return {\n role: isOptionSelected(selectValue, value, this.compareWith) ? 'selected' : '',\n text: option.textContent,\n cssClass: optClass,\n handler: () => {\n this.value = value;\n }\n };\n }); // Add \"cancel\" button\n\n actionSheetButtons.push({\n text: this.cancelText,\n role: 'cancel',\n handler: () => {\n this.ionCancel.emit();\n }\n });\n return actionSheetButtons;\n }\n\n createAlertInputs(data, inputType, selectValue) {\n const alertInputs = data.map(option => {\n const value = getOptionValue(option); // Remove hydrated before copying over classes\n\n const copyClasses = Array.from(option.classList).filter(cls => cls !== 'hydrated').join(' ');\n const optClass = `${OPTION_CLASS} ${copyClasses}`;\n return {\n type: inputType,\n cssClass: optClass,\n label: option.textContent || '',\n value,\n checked: isOptionSelected(selectValue, value, this.compareWith),\n disabled: option.disabled\n };\n });\n return alertInputs;\n }\n\n createPopoverOptions(data, selectValue) {\n const popoverOptions = data.map(option => {\n const value = getOptionValue(option); // Remove hydrated before copying over classes\n\n const copyClasses = Array.from(option.classList).filter(cls => cls !== 'hydrated').join(' ');\n const optClass = `${OPTION_CLASS} ${copyClasses}`;\n return {\n text: option.textContent || '',\n cssClass: optClass,\n value,\n checked: isOptionSelected(selectValue, value, this.compareWith),\n disabled: option.disabled,\n handler: selected => {\n this.value = selected;\n\n if (!this.multiple) {\n this.close();\n }\n }\n };\n });\n return popoverOptions;\n }\n\n openPopover(ev) {\n var _this3 = this;\n\n return _asyncToGenerator(function* () {\n const interfaceOptions = _this3.interfaceOptions;\n const mode = getIonMode(_this3);\n const showBackdrop = mode === 'md' ? false : true;\n const multiple = _this3.multiple;\n const value = _this3.value;\n let event = ev;\n let size = 'auto';\n\n const item = _this3.el.closest('ion-item'); // If the select is inside of an item containing a floating\n // or stacked label then the popover should take up the\n // full width of the item when it presents\n\n\n if (item && (item.classList.contains('item-label-floating') || item.classList.contains('item-label-stacked'))) {\n event = Object.assign(Object.assign({}, ev), {\n detail: {\n ionShadowTarget: item\n }\n });\n size = 'cover';\n }\n\n const popoverOpts = Object.assign(Object.assign({\n mode,\n event,\n alignment: 'center',\n size,\n showBackdrop\n }, interfaceOptions), {\n component: 'ion-select-popover',\n cssClass: ['select-popover', interfaceOptions.cssClass],\n componentProps: {\n header: interfaceOptions.header,\n subHeader: interfaceOptions.subHeader,\n message: interfaceOptions.message,\n multiple,\n value,\n options: _this3.createPopoverOptions(_this3.childOpts, value)\n }\n });\n return popoverController.create(popoverOpts);\n })();\n }\n\n openActionSheet() {\n var _this4 = this;\n\n return _asyncToGenerator(function* () {\n const mode = getIonMode(_this4);\n const interfaceOptions = _this4.interfaceOptions;\n const actionSheetOpts = Object.assign(Object.assign({\n mode\n }, interfaceOptions), {\n buttons: _this4.createActionSheetButtons(_this4.childOpts, _this4.value),\n cssClass: ['select-action-sheet', interfaceOptions.cssClass]\n });\n return actionSheetController.create(actionSheetOpts);\n })();\n }\n\n openAlert() {\n var _this5 = this;\n\n return _asyncToGenerator(function* () {\n const label = _this5.getLabel();\n\n const labelText = label ? label.textContent : null;\n const interfaceOptions = _this5.interfaceOptions;\n const inputType = _this5.multiple ? 'checkbox' : 'radio';\n const mode = getIonMode(_this5);\n const alertOpts = Object.assign(Object.assign({\n mode\n }, interfaceOptions), {\n header: interfaceOptions.header ? interfaceOptions.header : labelText,\n inputs: _this5.createAlertInputs(_this5.childOpts, inputType, _this5.value),\n buttons: [{\n text: _this5.cancelText,\n role: 'cancel',\n handler: () => {\n _this5.ionCancel.emit();\n }\n }, {\n text: _this5.okText,\n handler: selectedValues => {\n _this5.value = selectedValues;\n }\n }],\n cssClass: ['select-alert', interfaceOptions.cssClass, _this5.multiple ? 'multiple-select-alert' : 'single-select-alert']\n });\n return alertController.create(alertOpts);\n })();\n }\n /**\n * Close the select interface.\n */\n\n\n close() {\n // TODO check !this.overlay || !this.isFocus()\n if (!this.overlay) {\n return Promise.resolve(false);\n }\n\n return this.overlay.dismiss();\n }\n\n getLabel() {\n return findItemLabel(this.el);\n }\n\n hasValue() {\n return this.getText() !== '';\n }\n\n get childOpts() {\n return Array.from(this.el.querySelectorAll('ion-select-option'));\n }\n\n getText() {\n const selectedText = this.selectedText;\n\n if (selectedText != null && selectedText !== '') {\n return selectedText;\n }\n\n return generateText(this.childOpts, this.value, this.compareWith);\n }\n\n setFocus() {\n if (this.focusEl) {\n this.focusEl.focus();\n }\n }\n\n emitStyle() {\n this.ionStyle.emit({\n interactive: true,\n 'interactive-disabled': this.disabled,\n select: true,\n 'select-disabled': this.disabled,\n 'has-placeholder': this.placeholder !== undefined,\n 'has-value': this.hasValue(),\n 'has-focus': this.isExpanded\n });\n }\n\n render() {\n const {\n disabled,\n el,\n inputId,\n isExpanded,\n name,\n placeholder,\n value\n } = this;\n const mode = getIonMode(this);\n const {\n labelText,\n labelId\n } = getAriaLabel(el, inputId);\n renderHiddenInput(true, el, name, parseValue(value), disabled);\n const displayValue = this.getText();\n let addPlaceholderClass = false;\n let selectText = displayValue;\n\n if (selectText === '' && placeholder !== undefined) {\n selectText = placeholder;\n addPlaceholderClass = true;\n }\n\n const selectTextClasses = {\n 'select-text': true,\n 'select-placeholder': addPlaceholderClass\n };\n const textPart = addPlaceholderClass ? 'placeholder' : 'text'; // If there is a label then we need to concatenate it with the\n // current value (or placeholder) and a comma so it separates\n // nicely when the screen reader announces it, otherwise just\n // announce the value / placeholder\n\n const displayLabel = labelText !== undefined ? selectText !== '' ? `${selectText}, ${labelText}` : labelText : selectText;\n return h(Host, {\n onClick: this.onClick,\n role: \"button\",\n \"aria-haspopup\": \"listbox\",\n \"aria-disabled\": disabled ? 'true' : null,\n \"aria-label\": displayLabel,\n class: {\n [mode]: true,\n 'in-item': hostContext('ion-item', el),\n 'select-disabled': disabled,\n 'select-expanded': isExpanded\n }\n }, h(\"div\", {\n \"aria-hidden\": \"true\",\n class: selectTextClasses,\n part: textPart\n }, selectText), h(\"div\", {\n class: \"select-icon\",\n role: \"presentation\",\n part: \"icon\"\n }, h(\"div\", {\n class: \"select-icon-inner\"\n })), h(\"label\", {\n id: labelId\n }, displayLabel), h(\"button\", {\n type: \"button\",\n disabled: disabled,\n id: inputId,\n \"aria-labelledby\": labelId,\n \"aria-haspopup\": \"listbox\",\n \"aria-expanded\": `${isExpanded}`,\n onFocus: this.onFocus,\n onBlur: this.onBlur,\n ref: focusEl => this.focusEl = focusEl\n }));\n }\n\n get el() {\n return getElement(this);\n }\n\n static get watchers() {\n return {\n \"disabled\": [\"styleChanged\"],\n \"placeholder\": [\"styleChanged\"],\n \"isExpanded\": [\"styleChanged\"],\n \"value\": [\"valueChanged\"]\n };\n }\n\n};\n\nconst isOptionSelected = (currentValue, compareValue, compareWith) => {\n if (currentValue === undefined) {\n return false;\n }\n\n if (Array.isArray(currentValue)) {\n return currentValue.some(val => compareOptions(val, compareValue, compareWith));\n } else {\n return compareOptions(currentValue, compareValue, compareWith);\n }\n};\n\nconst getOptionValue = el => {\n const value = el.value;\n return value === undefined ? el.textContent || '' : value;\n};\n\nconst parseValue = value => {\n if (value == null) {\n return undefined;\n }\n\n if (Array.isArray(value)) {\n return value.join(',');\n }\n\n return value.toString();\n};\n\nconst compareOptions = (currentValue, compareValue, compareWith) => {\n if (typeof compareWith === 'function') {\n return compareWith(currentValue, compareValue);\n } else if (typeof compareWith === 'string') {\n return currentValue[compareWith] === compareValue[compareWith];\n } else {\n return Array.isArray(compareValue) ? compareValue.includes(currentValue) : currentValue === compareValue;\n }\n};\n\nconst generateText = (opts, value, compareWith) => {\n if (value === undefined) {\n return '';\n }\n\n if (Array.isArray(value)) {\n return value.map(v => textForValue(opts, v, compareWith)).filter(opt => opt !== null).join(', ');\n } else {\n return textForValue(opts, value, compareWith) || '';\n }\n};\n\nconst textForValue = (opts, value, compareWith) => {\n const selectOpt = opts.find(opt => {\n return compareOptions(value, getOptionValue(opt), compareWith);\n });\n return selectOpt ? selectOpt.textContent : null;\n};\n\nlet selectIds = 0;\nconst OPTION_CLASS = 'select-interface-option';\nSelect.style = {\n ios: selectIosCss,\n md: selectMdCss\n};\nconst selectOptionCss = \":host{display:none}\";\nconst SelectOption = class {\n constructor(hostRef) {\n registerInstance(this, hostRef);\n this.inputId = `ion-selopt-${selectOptionIds++}`;\n /**\n * If `true`, the user cannot interact with the select option. This property does not apply when `interface=\"action-sheet\"` as `ion-action-sheet` does not allow for disabled buttons.\n */\n\n this.disabled = false;\n }\n\n render() {\n return h(Host, {\n role: \"option\",\n id: this.inputId,\n class: getIonMode(this)\n });\n }\n\n get el() {\n return getElement(this);\n }\n\n};\nlet selectOptionIds = 0;\nSelectOption.style = selectOptionCss;\nconst selectPopoverIosCss = \".sc-ion-select-popover-ios-h ion-list.sc-ion-select-popover-ios{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0}ion-list-header.sc-ion-select-popover-ios,ion-label.sc-ion-select-popover-ios{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0}\";\nconst selectPopoverMdCss = \".sc-ion-select-popover-md-h ion-list.sc-ion-select-popover-md{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0}ion-list-header.sc-ion-select-popover-md,ion-label.sc-ion-select-popover-md{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0}ion-list.sc-ion-select-popover-md ion-radio.sc-ion-select-popover-md{opacity:0}ion-item.sc-ion-select-popover-md{--inner-border-width:0}.item-radio-checked.sc-ion-select-popover-md{--background:rgba(var(--ion-color-primary-rgb, 56, 128, 255), 0.08);--background-focused:var(--ion-color-primary, #3880ff);--background-focused-opacity:0.2;--background-hover:var(--ion-color-primary, #3880ff);--background-hover-opacity:0.12}.item-checkbox-checked.sc-ion-select-popover-md{--background-activated:var(--ion-item-color, var(--ion-text-color, #000));--background-focused:var(--ion-item-color, var(--ion-text-color, #000));--background-hover:var(--ion-item-color, var(--ion-text-color, #000));--color:var(--ion-color-primary, #3880ff)}\";\nconst SelectPopover = class {\n constructor(hostRef) {\n registerInstance(this, hostRef);\n /**\n * An array of options for the popover\n */\n\n this.options = [];\n }\n\n onSelect(ev) {\n this.setChecked(ev);\n this.callOptionHandler(ev);\n }\n\n findOptionFromEvent(ev) {\n const {\n options\n } = this;\n return options.find(o => o.value === ev.target.value);\n }\n /**\n * When an option is selected we need to get the value(s)\n * of the selected option(s) and return it in the option\n * handler\n */\n\n\n callOptionHandler(ev) {\n const option = this.findOptionFromEvent(ev);\n const values = this.getValues(ev);\n\n if (option === null || option === void 0 ? void 0 : option.handler) {\n safeCall(option.handler, values);\n }\n }\n /**\n * This is required when selecting a radio that is already\n * selected because it will not trigger the ionChange event\n * but we still want to close the popover\n */\n\n\n rbClick(ev) {\n this.callOptionHandler(ev);\n }\n\n setChecked(ev) {\n const {\n multiple\n } = this;\n const option = this.findOptionFromEvent(ev); // this is a popover with checkboxes (multiple value select)\n // we need to set the checked value for this option\n\n if (multiple && option) {\n option.checked = ev.detail.checked;\n }\n }\n\n getValues(ev) {\n const {\n multiple,\n options\n } = this;\n\n if (multiple) {\n // this is a popover with checkboxes (multiple value select)\n // return an array of all the checked values\n return options.filter(o => o.checked).map(o => o.value);\n } // this is a popover with radio buttons (single value select)\n // return the value that was clicked, otherwise undefined\n\n\n const option = this.findOptionFromEvent(ev);\n return option ? option.value : undefined;\n }\n\n renderOptions(options) {\n const {\n multiple\n } = this;\n\n switch (multiple) {\n case true:\n return this.renderCheckboxOptions(options);\n\n default:\n return this.renderRadioOptions(options);\n }\n }\n\n renderCheckboxOptions(options) {\n return options.map(option => h(\"ion-item\", {\n class: getClassMap(option.cssClass)\n }, h(\"ion-checkbox\", {\n slot: \"start\",\n value: option.value,\n disabled: option.disabled,\n checked: option.checked\n }), h(\"ion-label\", null, option.text)));\n }\n\n renderRadioOptions(options) {\n const checked = options.filter(o => o.checked).map(o => o.value)[0];\n return h(\"ion-radio-group\", {\n value: checked\n }, options.map(option => h(\"ion-item\", {\n class: getClassMap(option.cssClass)\n }, h(\"ion-label\", null, option.text), h(\"ion-radio\", {\n value: option.value,\n disabled: option.disabled,\n onClick: ev => this.rbClick(ev)\n }))));\n }\n\n render() {\n const {\n header,\n message,\n options,\n subHeader\n } = this;\n const hasSubHeaderOrMessage = subHeader !== undefined || message !== undefined;\n return h(Host, {\n class: getIonMode(this)\n }, h(\"ion-list\", null, header !== undefined && h(\"ion-list-header\", null, header), hasSubHeaderOrMessage && h(\"ion-item\", null, h(\"ion-label\", {\n class: \"ion-text-wrap\"\n }, subHeader !== undefined && h(\"h3\", null, subHeader), message !== undefined && h(\"p\", null, message))), this.renderOptions(options)));\n }\n\n};\nSelectPopover.style = {\n ios: selectPopoverIosCss,\n md: selectPopoverMdCss\n};\nexport { Select as ion_select, SelectOption as ion_select_option, SelectPopover as ion_select_popover };","map":{"version":3,"names":["r","registerInstance","e","createEvent","h","H","Host","i","getElement","b","getIonMode","f","focusElement","k","findItemLabel","d","getAriaLabel","renderHiddenInput","c","popoverController","actionSheetController","a","alertController","s","safeCall","hostContext","g","getClassMap","watchForOptions","containerEl","tagName","onChange","MutationObserver","mutation","mutationList","getSelectedOption","observe","childList","subtree","newOption","forEach","mut","addedNodes","length","findCheckedOption","el","nodeType","undefined","options","toUpperCase","Array","from","querySelectorAll","find","o","value","selectIosCss","selectMdCss","Select","constructor","hostRef","ionChange","ionCancel","ionDismiss","ionFocus","ionBlur","ionStyle","inputId","selectIds","didInit","isExpanded","disabled","cancelText","okText","name","multiple","interface","interfaceOptions","onClick","ev","setFocus","open","onFocus","emit","onBlur","styleChanged","emitStyle","valueChanged","connectedCallback","updateOverlayOptions","mutationO","disconnectedCallback","disconnect","componentDidLoad","event","overlay","createOverlay","onDidDismiss","then","present","indexOfSelected","childOpts","map","indexOf","selectedEl","querySelector","selectInterface","console","warn","openActionSheet","openPopover","openAlert","buttons","createActionSheetButtons","popover","createPopoverOptions","inputType","inputs","createAlertInputs","data","selectValue","actionSheetButtons","option","getOptionValue","copyClasses","classList","filter","cls","join","optClass","OPTION_CLASS","role","isOptionSelected","compareWith","text","textContent","cssClass","handler","push","alertInputs","type","label","checked","popoverOptions","selected","close","mode","showBackdrop","size","item","closest","contains","Object","assign","detail","ionShadowTarget","popoverOpts","alignment","component","componentProps","header","subHeader","message","create","actionSheetOpts","getLabel","labelText","alertOpts","selectedValues","Promise","resolve","dismiss","hasValue","getText","selectedText","generateText","focusEl","focus","interactive","select","placeholder","render","labelId","parseValue","displayValue","addPlaceholderClass","selectText","selectTextClasses","textPart","displayLabel","class","part","id","ref","watchers","currentValue","compareValue","isArray","some","val","compareOptions","toString","includes","opts","v","textForValue","opt","selectOpt","style","ios","md","selectOptionCss","SelectOption","selectOptionIds","selectPopoverIosCss","selectPopoverMdCss","SelectPopover","onSelect","setChecked","callOptionHandler","findOptionFromEvent","target","values","getValues","rbClick","renderOptions","renderCheckboxOptions","renderRadioOptions","slot","hasSubHeaderOrMessage","ion_select","ion_select_option","ion_select_popover"],"sources":["D:/MobileDev/WRB/WrenchBoard2023a/node_modules/@ionic/core/dist/esm/ion-select_3.entry.js"],"sourcesContent":["/*!\n * (C) Ionic http://ionicframework.com - MIT License\n */\nimport { r as registerInstance, e as createEvent, h, H as Host, i as getElement } from './index-1a99aeb7.js';\nimport { b as getIonMode } from './ionic-global-04e268e7.js';\nimport { f as focusElement, k as findItemLabel, d as getAriaLabel, e as renderHiddenInput } from './helpers-4d272360.js';\nimport { c as popoverController, b as actionSheetController, a as alertController, s as safeCall } from './overlays-f469834d.js';\nimport { h as hostContext, g as getClassMap } from './theme-7670341c.js';\nimport './hardware-back-button-490df115.js';\n\nconst watchForOptions = (containerEl, tagName, onChange) => {\n if (typeof MutationObserver === 'undefined') {\n return;\n }\n const mutation = new MutationObserver((mutationList) => {\n onChange(getSelectedOption(mutationList, tagName));\n });\n mutation.observe(containerEl, {\n childList: true,\n subtree: true,\n });\n return mutation;\n};\nconst getSelectedOption = (mutationList, tagName) => {\n let newOption;\n mutationList.forEach((mut) => {\n // eslint-disable-next-line @typescript-eslint/prefer-for-of\n for (let i = 0; i < mut.addedNodes.length; i++) {\n newOption = findCheckedOption(mut.addedNodes[i], tagName) || newOption;\n }\n });\n return newOption;\n};\nconst findCheckedOption = (el, tagName) => {\n if (el.nodeType !== 1) {\n return undefined;\n }\n const options = el.tagName === tagName.toUpperCase() ? [el] : Array.from(el.querySelectorAll(tagName));\n return options.find((o) => o.value === el.value);\n};\n\nconst selectIosCss = \":host{--placeholder-color:currentColor;--placeholder-opacity:0.33;padding-left:var(--padding-start);padding-right:var(--padding-end);padding-top:var(--padding-top);padding-bottom:var(--padding-bottom);display:-ms-flexbox;display:flex;position:relative;-ms-flex-align:center;align-items:center;font-family:var(--ion-font-family, inherit);overflow:hidden;z-index:2}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){:host{padding-left:unset;padding-right:unset;-webkit-padding-start:var(--padding-start);padding-inline-start:var(--padding-start);-webkit-padding-end:var(--padding-end);padding-inline-end:var(--padding-end)}}:host(.in-item){position:static;max-width:45%}:host(.select-disabled){opacity:0.4;pointer-events:none}:host(.ion-focused) button{border:2px solid #5e9ed6}.select-placeholder{color:var(--placeholder-color);opacity:var(--placeholder-opacity)}label{left:0;top:0;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;position:absolute;width:100%;height:100%;border:0;background:transparent;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;outline:none;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;opacity:0}[dir=rtl] label,:host-context([dir=rtl]) label{left:unset;right:unset;right:0}label::-moz-focus-inner{border:0}button{position:absolute;top:0;left:0;right:0;bottom:0;width:100%;height:100%;margin:0;padding:0;border:0;outline:0;clip:rect(0 0 0 0);opacity:0;overflow:hidden;-webkit-appearance:none;-moz-appearance:none}.select-icon{position:relative}.select-text{-ms-flex:1;flex:1;min-width:16px;font-size:inherit;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.select-icon-inner{left:5px;top:50%;margin-top:-2px;position:absolute;width:0;height:0;border-top:5px solid;border-right:5px solid transparent;border-left:5px solid transparent;color:currentColor;pointer-events:none}[dir=rtl] .select-icon-inner,:host-context([dir=rtl]) .select-icon-inner{left:unset;right:unset;right:5px}:host{--padding-top:10px;--padding-end:10px;--padding-bottom:10px;--padding-start:20px}.select-icon{width:12px;height:18px;opacity:0.33}\";\n\nconst selectMdCss = \":host{--placeholder-color:currentColor;--placeholder-opacity:0.33;padding-left:var(--padding-start);padding-right:var(--padding-end);padding-top:var(--padding-top);padding-bottom:var(--padding-bottom);display:-ms-flexbox;display:flex;position:relative;-ms-flex-align:center;align-items:center;font-family:var(--ion-font-family, inherit);overflow:hidden;z-index:2}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){:host{padding-left:unset;padding-right:unset;-webkit-padding-start:var(--padding-start);padding-inline-start:var(--padding-start);-webkit-padding-end:var(--padding-end);padding-inline-end:var(--padding-end)}}:host(.in-item){position:static;max-width:45%}:host(.select-disabled){opacity:0.4;pointer-events:none}:host(.ion-focused) button{border:2px solid #5e9ed6}.select-placeholder{color:var(--placeholder-color);opacity:var(--placeholder-opacity)}label{left:0;top:0;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;position:absolute;width:100%;height:100%;border:0;background:transparent;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;outline:none;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;opacity:0}[dir=rtl] label,:host-context([dir=rtl]) label{left:unset;right:unset;right:0}label::-moz-focus-inner{border:0}button{position:absolute;top:0;left:0;right:0;bottom:0;width:100%;height:100%;margin:0;padding:0;border:0;outline:0;clip:rect(0 0 0 0);opacity:0;overflow:hidden;-webkit-appearance:none;-moz-appearance:none}.select-icon{position:relative}.select-text{-ms-flex:1;flex:1;min-width:16px;font-size:inherit;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.select-icon-inner{left:5px;top:50%;margin-top:-2px;position:absolute;width:0;height:0;border-top:5px solid;border-right:5px solid transparent;border-left:5px solid transparent;color:currentColor;pointer-events:none}[dir=rtl] .select-icon-inner,:host-context([dir=rtl]) .select-icon-inner{left:unset;right:unset;right:5px}:host{--padding-top:10px;--padding-end:0;--padding-bottom:10px;--padding-start:16px}.select-icon{width:19px;height:19px;-webkit-transition:-webkit-transform 0.15s cubic-bezier(0.4, 0, 0.2, 1);transition:-webkit-transform 0.15s cubic-bezier(0.4, 0, 0.2, 1);transition:transform 0.15s cubic-bezier(0.4, 0, 0.2, 1);transition:transform 0.15s cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 0.15s cubic-bezier(0.4, 0, 0.2, 1);opacity:0.55}:host-context(.item-label-stacked) .select-icon,:host-context(.item-label-floating:not(.item-fill-outline)) .select-icon,:host-context(.item-label-floating.item-fill-outline){-webkit-transform:translate3d(0, -9px, 0);transform:translate3d(0, -9px, 0)}:host-context(.item-has-focus) .select-icon{-webkit-transform:rotate(180deg);transform:rotate(180deg)}:host-context(.item-has-focus.item-label-stacked) .select-icon,:host-context(.item-has-focus.item-label-floating:not(.item-fill-outline)) .select-icon{-webkit-transform:translate3d(0, -9px, 0) rotate(180deg);transform:translate3d(0, -9px, 0) rotate(180deg)}:host-context(ion-item.ion-focused) .select-icon,:host-context(.item-has-focus) .select-icon{color:var(--highlight-color-focused);opacity:1}\";\n\nconst Select = class {\n constructor(hostRef) {\n registerInstance(this, hostRef);\n this.ionChange = createEvent(this, \"ionChange\", 7);\n this.ionCancel = createEvent(this, \"ionCancel\", 7);\n this.ionDismiss = createEvent(this, \"ionDismiss\", 7);\n this.ionFocus = createEvent(this, \"ionFocus\", 7);\n this.ionBlur = createEvent(this, \"ionBlur\", 7);\n this.ionStyle = createEvent(this, \"ionStyle\", 7);\n this.inputId = `ion-sel-${selectIds++}`;\n this.didInit = false;\n this.isExpanded = false;\n /**\n * If `true`, the user cannot interact with the select.\n */\n this.disabled = false;\n /**\n * The text to display on the cancel button.\n */\n this.cancelText = 'Cancel';\n /**\n * The text to display on the ok button.\n */\n this.okText = 'OK';\n /**\n * The name of the control, which is submitted with the form data.\n */\n this.name = this.inputId;\n /**\n * If `true`, the select can accept multiple values.\n */\n this.multiple = false;\n /**\n * The interface the select should use: `action-sheet`, `popover` or `alert`.\n */\n this.interface = 'alert';\n /**\n * Any additional options that the `alert`, `action-sheet` or `popover` interface\n * can take. See the [ion-alert docs](./alert), the\n * [ion-action-sheet docs](./action-sheet) and the\n * [ion-popover docs](./popover) for the\n * create options for each interface.\n *\n * Note: `interfaceOptions` will not override `inputs` or `buttons` with the `alert` interface.\n */\n this.interfaceOptions = {};\n this.onClick = (ev) => {\n this.setFocus();\n this.open(ev);\n };\n this.onFocus = () => {\n this.ionFocus.emit();\n };\n this.onBlur = () => {\n this.ionBlur.emit();\n };\n }\n styleChanged() {\n this.emitStyle();\n }\n valueChanged() {\n this.emitStyle();\n // TODO: FW-1160 - Remove the `didInit` property when ionChange behavior is changed in v7.\n if (this.didInit) {\n this.ionChange.emit({\n value: this.value,\n });\n }\n }\n async connectedCallback() {\n this.updateOverlayOptions();\n this.emitStyle();\n this.mutationO = watchForOptions(this.el, 'ion-select-option', async () => {\n this.updateOverlayOptions();\n });\n }\n disconnectedCallback() {\n if (this.mutationO) {\n this.mutationO.disconnect();\n this.mutationO = undefined;\n }\n }\n componentDidLoad() {\n this.didInit = true;\n }\n /**\n * Open the select overlay. The overlay is either an alert, action sheet, or popover,\n * depending on the `interface` property on the `ion-select`.\n *\n * @param event The user interface event that called the open.\n */\n async open(event) {\n if (this.disabled || this.isExpanded) {\n return undefined;\n }\n this.isExpanded = true;\n const overlay = (this.overlay = await this.createOverlay(event));\n overlay.onDidDismiss().then(() => {\n this.overlay = undefined;\n this.isExpanded = false;\n this.ionDismiss.emit();\n this.setFocus();\n });\n await overlay.present();\n // focus selected option for popovers\n if (this.interface === 'popover') {\n let indexOfSelected = this.childOpts.map((o) => o.value).indexOf(this.value);\n indexOfSelected = indexOfSelected > -1 ? indexOfSelected : 0; // default to first option if nothing selected\n const selectedEl = overlay.querySelector(`.select-interface-option:nth-child(${indexOfSelected + 1})`);\n if (selectedEl) {\n focusElement(selectedEl);\n }\n }\n return overlay;\n }\n createOverlay(ev) {\n let selectInterface = this.interface;\n if (selectInterface === 'action-sheet' && this.multiple) {\n console.warn(`Select interface cannot be \"${selectInterface}\" with a multi-value select. Using the \"alert\" interface instead.`);\n selectInterface = 'alert';\n }\n if (selectInterface === 'popover' && !ev) {\n console.warn(`Select interface cannot be a \"${selectInterface}\" without passing an event. Using the \"alert\" interface instead.`);\n selectInterface = 'alert';\n }\n if (selectInterface === 'action-sheet') {\n return this.openActionSheet();\n }\n if (selectInterface === 'popover') {\n return this.openPopover(ev);\n }\n return this.openAlert();\n }\n updateOverlayOptions() {\n const overlay = this.overlay;\n if (!overlay) {\n return;\n }\n const childOpts = this.childOpts;\n const value = this.value;\n switch (this.interface) {\n case 'action-sheet':\n overlay.buttons = this.createActionSheetButtons(childOpts, value);\n break;\n case 'popover':\n const popover = overlay.querySelector('ion-select-popover');\n if (popover) {\n popover.options = this.createPopoverOptions(childOpts, value);\n }\n break;\n case 'alert':\n const inputType = this.multiple ? 'checkbox' : 'radio';\n overlay.inputs = this.createAlertInputs(childOpts, inputType, value);\n break;\n }\n }\n createActionSheetButtons(data, selectValue) {\n const actionSheetButtons = data.map((option) => {\n const value = getOptionValue(option);\n // Remove hydrated before copying over classes\n const copyClasses = Array.from(option.classList)\n .filter((cls) => cls !== 'hydrated')\n .join(' ');\n const optClass = `${OPTION_CLASS} ${copyClasses}`;\n return {\n role: isOptionSelected(selectValue, value, this.compareWith) ? 'selected' : '',\n text: option.textContent,\n cssClass: optClass,\n handler: () => {\n this.value = value;\n },\n };\n });\n // Add \"cancel\" button\n actionSheetButtons.push({\n text: this.cancelText,\n role: 'cancel',\n handler: () => {\n this.ionCancel.emit();\n },\n });\n return actionSheetButtons;\n }\n createAlertInputs(data, inputType, selectValue) {\n const alertInputs = data.map((option) => {\n const value = getOptionValue(option);\n // Remove hydrated before copying over classes\n const copyClasses = Array.from(option.classList)\n .filter((cls) => cls !== 'hydrated')\n .join(' ');\n const optClass = `${OPTION_CLASS} ${copyClasses}`;\n return {\n type: inputType,\n cssClass: optClass,\n label: option.textContent || '',\n value,\n checked: isOptionSelected(selectValue, value, this.compareWith),\n disabled: option.disabled,\n };\n });\n return alertInputs;\n }\n createPopoverOptions(data, selectValue) {\n const popoverOptions = data.map((option) => {\n const value = getOptionValue(option);\n // Remove hydrated before copying over classes\n const copyClasses = Array.from(option.classList)\n .filter((cls) => cls !== 'hydrated')\n .join(' ');\n const optClass = `${OPTION_CLASS} ${copyClasses}`;\n return {\n text: option.textContent || '',\n cssClass: optClass,\n value,\n checked: isOptionSelected(selectValue, value, this.compareWith),\n disabled: option.disabled,\n handler: (selected) => {\n this.value = selected;\n if (!this.multiple) {\n this.close();\n }\n },\n };\n });\n return popoverOptions;\n }\n async openPopover(ev) {\n const interfaceOptions = this.interfaceOptions;\n const mode = getIonMode(this);\n const showBackdrop = mode === 'md' ? false : true;\n const multiple = this.multiple;\n const value = this.value;\n let event = ev;\n let size = 'auto';\n const item = this.el.closest('ion-item');\n // If the select is inside of an item containing a floating\n // or stacked label then the popover should take up the\n // full width of the item when it presents\n if (item && (item.classList.contains('item-label-floating') || item.classList.contains('item-label-stacked'))) {\n event = Object.assign(Object.assign({}, ev), { detail: {\n ionShadowTarget: item,\n } });\n size = 'cover';\n }\n const popoverOpts = Object.assign(Object.assign({ mode,\n event, alignment: 'center', size,\n showBackdrop }, interfaceOptions), { component: 'ion-select-popover', cssClass: ['select-popover', interfaceOptions.cssClass], componentProps: {\n header: interfaceOptions.header,\n subHeader: interfaceOptions.subHeader,\n message: interfaceOptions.message,\n multiple,\n value,\n options: this.createPopoverOptions(this.childOpts, value),\n } });\n return popoverController.create(popoverOpts);\n }\n async openActionSheet() {\n const mode = getIonMode(this);\n const interfaceOptions = this.interfaceOptions;\n const actionSheetOpts = Object.assign(Object.assign({ mode }, interfaceOptions), { buttons: this.createActionSheetButtons(this.childOpts, this.value), cssClass: ['select-action-sheet', interfaceOptions.cssClass] });\n return actionSheetController.create(actionSheetOpts);\n }\n async openAlert() {\n const label = this.getLabel();\n const labelText = label ? label.textContent : null;\n const interfaceOptions = this.interfaceOptions;\n const inputType = this.multiple ? 'checkbox' : 'radio';\n const mode = getIonMode(this);\n const alertOpts = Object.assign(Object.assign({ mode }, interfaceOptions), { header: interfaceOptions.header ? interfaceOptions.header : labelText, inputs: this.createAlertInputs(this.childOpts, inputType, this.value), buttons: [\n {\n text: this.cancelText,\n role: 'cancel',\n handler: () => {\n this.ionCancel.emit();\n },\n },\n {\n text: this.okText,\n handler: (selectedValues) => {\n this.value = selectedValues;\n },\n },\n ], cssClass: [\n 'select-alert',\n interfaceOptions.cssClass,\n this.multiple ? 'multiple-select-alert' : 'single-select-alert',\n ] });\n return alertController.create(alertOpts);\n }\n /**\n * Close the select interface.\n */\n close() {\n // TODO check !this.overlay || !this.isFocus()\n if (!this.overlay) {\n return Promise.resolve(false);\n }\n return this.overlay.dismiss();\n }\n getLabel() {\n return findItemLabel(this.el);\n }\n hasValue() {\n return this.getText() !== '';\n }\n get childOpts() {\n return Array.from(this.el.querySelectorAll('ion-select-option'));\n }\n getText() {\n const selectedText = this.selectedText;\n if (selectedText != null && selectedText !== '') {\n return selectedText;\n }\n return generateText(this.childOpts, this.value, this.compareWith);\n }\n setFocus() {\n if (this.focusEl) {\n this.focusEl.focus();\n }\n }\n emitStyle() {\n this.ionStyle.emit({\n interactive: true,\n 'interactive-disabled': this.disabled,\n select: true,\n 'select-disabled': this.disabled,\n 'has-placeholder': this.placeholder !== undefined,\n 'has-value': this.hasValue(),\n 'has-focus': this.isExpanded,\n });\n }\n render() {\n const { disabled, el, inputId, isExpanded, name, placeholder, value } = this;\n const mode = getIonMode(this);\n const { labelText, labelId } = getAriaLabel(el, inputId);\n renderHiddenInput(true, el, name, parseValue(value), disabled);\n const displayValue = this.getText();\n let addPlaceholderClass = false;\n let selectText = displayValue;\n if (selectText === '' && placeholder !== undefined) {\n selectText = placeholder;\n addPlaceholderClass = true;\n }\n const selectTextClasses = {\n 'select-text': true,\n 'select-placeholder': addPlaceholderClass,\n };\n const textPart = addPlaceholderClass ? 'placeholder' : 'text';\n // If there is a label then we need to concatenate it with the\n // current value (or placeholder) and a comma so it separates\n // nicely when the screen reader announces it, otherwise just\n // announce the value / placeholder\n const displayLabel = labelText !== undefined ? (selectText !== '' ? `${selectText}, ${labelText}` : labelText) : selectText;\n return (h(Host, { onClick: this.onClick, role: \"button\", \"aria-haspopup\": \"listbox\", \"aria-disabled\": disabled ? 'true' : null, \"aria-label\": displayLabel, class: {\n [mode]: true,\n 'in-item': hostContext('ion-item', el),\n 'select-disabled': disabled,\n 'select-expanded': isExpanded,\n } }, h(\"div\", { \"aria-hidden\": \"true\", class: selectTextClasses, part: textPart }, selectText), h(\"div\", { class: \"select-icon\", role: \"presentation\", part: \"icon\" }, h(\"div\", { class: \"select-icon-inner\" })), h(\"label\", { id: labelId }, displayLabel), h(\"button\", { type: \"button\", disabled: disabled, id: inputId, \"aria-labelledby\": labelId, \"aria-haspopup\": \"listbox\", \"aria-expanded\": `${isExpanded}`, onFocus: this.onFocus, onBlur: this.onBlur, ref: (focusEl) => (this.focusEl = focusEl) })));\n }\n get el() { return getElement(this); }\n static get watchers() { return {\n \"disabled\": [\"styleChanged\"],\n \"placeholder\": [\"styleChanged\"],\n \"isExpanded\": [\"styleChanged\"],\n \"value\": [\"valueChanged\"]\n }; }\n};\nconst isOptionSelected = (currentValue, compareValue, compareWith) => {\n if (currentValue === undefined) {\n return false;\n }\n if (Array.isArray(currentValue)) {\n return currentValue.some((val) => compareOptions(val, compareValue, compareWith));\n }\n else {\n return compareOptions(currentValue, compareValue, compareWith);\n }\n};\nconst getOptionValue = (el) => {\n const value = el.value;\n return value === undefined ? el.textContent || '' : value;\n};\nconst parseValue = (value) => {\n if (value == null) {\n return undefined;\n }\n if (Array.isArray(value)) {\n return value.join(',');\n }\n return value.toString();\n};\nconst compareOptions = (currentValue, compareValue, compareWith) => {\n if (typeof compareWith === 'function') {\n return compareWith(currentValue, compareValue);\n }\n else if (typeof compareWith === 'string') {\n return currentValue[compareWith] === compareValue[compareWith];\n }\n else {\n return Array.isArray(compareValue) ? compareValue.includes(currentValue) : currentValue === compareValue;\n }\n};\nconst generateText = (opts, value, compareWith) => {\n if (value === undefined) {\n return '';\n }\n if (Array.isArray(value)) {\n return value\n .map((v) => textForValue(opts, v, compareWith))\n .filter((opt) => opt !== null)\n .join(', ');\n }\n else {\n return textForValue(opts, value, compareWith) || '';\n }\n};\nconst textForValue = (opts, value, compareWith) => {\n const selectOpt = opts.find((opt) => {\n return compareOptions(value, getOptionValue(opt), compareWith);\n });\n return selectOpt ? selectOpt.textContent : null;\n};\nlet selectIds = 0;\nconst OPTION_CLASS = 'select-interface-option';\nSelect.style = {\n ios: selectIosCss,\n md: selectMdCss\n};\n\nconst selectOptionCss = \":host{display:none}\";\n\nconst SelectOption = class {\n constructor(hostRef) {\n registerInstance(this, hostRef);\n this.inputId = `ion-selopt-${selectOptionIds++}`;\n /**\n * If `true`, the user cannot interact with the select option. This property does not apply when `interface=\"action-sheet\"` as `ion-action-sheet` does not allow for disabled buttons.\n */\n this.disabled = false;\n }\n render() {\n return h(Host, { role: \"option\", id: this.inputId, class: getIonMode(this) });\n }\n get el() { return getElement(this); }\n};\nlet selectOptionIds = 0;\nSelectOption.style = selectOptionCss;\n\nconst selectPopoverIosCss = \".sc-ion-select-popover-ios-h ion-list.sc-ion-select-popover-ios{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0}ion-list-header.sc-ion-select-popover-ios,ion-label.sc-ion-select-popover-ios{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0}\";\n\nconst selectPopoverMdCss = \".sc-ion-select-popover-md-h ion-list.sc-ion-select-popover-md{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0}ion-list-header.sc-ion-select-popover-md,ion-label.sc-ion-select-popover-md{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0}ion-list.sc-ion-select-popover-md ion-radio.sc-ion-select-popover-md{opacity:0}ion-item.sc-ion-select-popover-md{--inner-border-width:0}.item-radio-checked.sc-ion-select-popover-md{--background:rgba(var(--ion-color-primary-rgb, 56, 128, 255), 0.08);--background-focused:var(--ion-color-primary, #3880ff);--background-focused-opacity:0.2;--background-hover:var(--ion-color-primary, #3880ff);--background-hover-opacity:0.12}.item-checkbox-checked.sc-ion-select-popover-md{--background-activated:var(--ion-item-color, var(--ion-text-color, #000));--background-focused:var(--ion-item-color, var(--ion-text-color, #000));--background-hover:var(--ion-item-color, var(--ion-text-color, #000));--color:var(--ion-color-primary, #3880ff)}\";\n\nconst SelectPopover = class {\n constructor(hostRef) {\n registerInstance(this, hostRef);\n /**\n * An array of options for the popover\n */\n this.options = [];\n }\n onSelect(ev) {\n this.setChecked(ev);\n this.callOptionHandler(ev);\n }\n findOptionFromEvent(ev) {\n const { options } = this;\n return options.find((o) => o.value === ev.target.value);\n }\n /**\n * When an option is selected we need to get the value(s)\n * of the selected option(s) and return it in the option\n * handler\n */\n callOptionHandler(ev) {\n const option = this.findOptionFromEvent(ev);\n const values = this.getValues(ev);\n if (option === null || option === void 0 ? void 0 : option.handler) {\n safeCall(option.handler, values);\n }\n }\n /**\n * This is required when selecting a radio that is already\n * selected because it will not trigger the ionChange event\n * but we still want to close the popover\n */\n rbClick(ev) {\n this.callOptionHandler(ev);\n }\n setChecked(ev) {\n const { multiple } = this;\n const option = this.findOptionFromEvent(ev);\n // this is a popover with checkboxes (multiple value select)\n // we need to set the checked value for this option\n if (multiple && option) {\n option.checked = ev.detail.checked;\n }\n }\n getValues(ev) {\n const { multiple, options } = this;\n if (multiple) {\n // this is a popover with checkboxes (multiple value select)\n // return an array of all the checked values\n return options.filter((o) => o.checked).map((o) => o.value);\n }\n // this is a popover with radio buttons (single value select)\n // return the value that was clicked, otherwise undefined\n const option = this.findOptionFromEvent(ev);\n return option ? option.value : undefined;\n }\n renderOptions(options) {\n const { multiple } = this;\n switch (multiple) {\n case true:\n return this.renderCheckboxOptions(options);\n default:\n return this.renderRadioOptions(options);\n }\n }\n renderCheckboxOptions(options) {\n return options.map((option) => (h(\"ion-item\", { class: getClassMap(option.cssClass) }, h(\"ion-checkbox\", { slot: \"start\", value: option.value, disabled: option.disabled, checked: option.checked }), h(\"ion-label\", null, option.text))));\n }\n renderRadioOptions(options) {\n const checked = options.filter((o) => o.checked).map((o) => o.value)[0];\n return (h(\"ion-radio-group\", { value: checked }, options.map((option) => (h(\"ion-item\", { class: getClassMap(option.cssClass) }, h(\"ion-label\", null, option.text), h(\"ion-radio\", { value: option.value, disabled: option.disabled, onClick: (ev) => this.rbClick(ev) }))))));\n }\n render() {\n const { header, message, options, subHeader } = this;\n const hasSubHeaderOrMessage = subHeader !== undefined || message !== undefined;\n return (h(Host, { class: getIonMode(this) }, h(\"ion-list\", null, header !== undefined && h(\"ion-list-header\", null, header), hasSubHeaderOrMessage && (h(\"ion-item\", null, h(\"ion-label\", { class: \"ion-text-wrap\" }, subHeader !== undefined && h(\"h3\", null, subHeader), message !== undefined && h(\"p\", null, message)))), this.renderOptions(options))));\n }\n};\nSelectPopover.style = {\n ios: selectPopoverIosCss,\n md: selectPopoverMdCss\n};\n\nexport { Select as ion_select, SelectOption as ion_select_option, SelectPopover as ion_select_popover };\n"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,CAAC,IAAIC,gBAAd,EAAgCC,CAAC,IAAIC,WAArC,EAAkDC,CAAlD,EAAqDC,CAAC,IAAIC,IAA1D,EAAgEC,CAAC,IAAIC,UAArE,QAAuF,qBAAvF;AACA,SAASC,CAAC,IAAIC,UAAd,QAAgC,4BAAhC;AACA,SAASC,CAAC,IAAIC,YAAd,EAA4BC,CAAC,IAAIC,aAAjC,EAAgDC,CAAC,IAAIC,YAArD,EAAmEd,CAAC,IAAIe,iBAAxE,QAAiG,uBAAjG;AACA,SAASC,CAAC,IAAIC,iBAAd,EAAiCV,CAAC,IAAIW,qBAAtC,EAA6DC,CAAC,IAAIC,eAAlE,EAAmFC,CAAC,IAAIC,QAAxF,QAAwG,wBAAxG;AACA,SAASpB,CAAC,IAAIqB,WAAd,EAA2BC,CAAC,IAAIC,WAAhC,QAAmD,qBAAnD;AACA,OAAO,oCAAP;;AAEA,MAAMC,eAAe,GAAG,CAACC,WAAD,EAAcC,OAAd,EAAuBC,QAAvB,KAAoC;EAC1D,IAAI,OAAOC,gBAAP,KAA4B,WAAhC,EAA6C;IAC3C;EACD;;EACD,MAAMC,QAAQ,GAAG,IAAID,gBAAJ,CAAsBE,YAAD,IAAkB;IACtDH,QAAQ,CAACI,iBAAiB,CAACD,YAAD,EAAeJ,OAAf,CAAlB,CAAR;EACD,CAFgB,CAAjB;EAGAG,QAAQ,CAACG,OAAT,CAAiBP,WAAjB,EAA8B;IAC5BQ,SAAS,EAAE,IADiB;IAE5BC,OAAO,EAAE;EAFmB,CAA9B;EAIA,OAAOL,QAAP;AACD,CAZD;;AAaA,MAAME,iBAAiB,GAAG,CAACD,YAAD,EAAeJ,OAAf,KAA2B;EACnD,IAAIS,SAAJ;EACAL,YAAY,CAACM,OAAb,CAAsBC,GA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