{"version":3,"sources":["webpack:///./node_modules/@ionic/core/dist/esm-es5/theme-18cbe2cc.js","webpack:///./node_modules/@ionic/core/dist/esm-es5/ion-range-ios.entry.js"],"names":["hostContext","selector","el","closest","createColorClasses","color","_a","length","undefined","getClassMap","classes","map","Array","isArray","split","filter","c","trim","forEach","SCHEME","openURL","url","ev","direction","router","this","test","document","querySelector","preventDefault","push","Range","class_1","prototype","debounceChanged","ionChange","debounce","minChanged","noUpdate","updateRatio","maxChanged","disabledChanged","gesture","setDisabled","disabled","emitStyle","valueChanged","value","ensureValueInBounds","emit","connectedCallback","disconnectedCallback","destroy","componentDidLoad","rangeSlider","_this","_b","label","sent","createGesture","gestureName","gesturePriority","threshold","onStart","onMove","onEnd","getValue","dualKnobs","lower","upper","ionStyle","detail","rect","getBoundingClientRect","currentX","ratio","left","width","dir","pressedKnob","Math","abs","ratioA","ratioB","setFocus","update","snaps","valueToRatio","ratioToValue","min","max","step","updateValue","Object","defineProperty","get","enumerable","configurable","valA","valB","knob","shadowRoot","knobEl","focus","render","_c","handleKeyboard","pin","ratioLower","ratioUpper","mode","barEnd","isRTL","start","end","barStyle","ticks","tick","active","name","JSON","stringify","onFocusin","onFocus","onFocusout","onBlur","class","assign","ref","rangeEl","style","role","renderKnob","pressed","hostRef","hasFocus","clampBounds","isIncrease","ionBlur","ionFocus","onKeyDown","key","stopPropagation","tabindex","round"],"mappings":"+FAAA,gJACIA,EAAc,SAAUC,EAAUC,GAClC,OAAgC,OAAzBA,EAAGC,QAAQF,CAAQ,CAC9B,EAIIG,EAAqB,SAAUC,GAC/B,IAAIC,EACJ,MAAyB,UAAjB,OAAOD,GAAqC,EAAfA,EAAME,SAAeD,EAAK,CACvD,YAAa,EACjB,GACG,aAAeD,GAAS,GAC3BC,GAAME,MACd,EAWIC,EAAc,SAAUC,GACxB,IAAIC,EAAM,GAEV,OAZgBH,UADSE,EAYZA,IAVGE,MAAMC,QAAQH,CAAO,EAAIA,EAAUA,EAAQI,MAAM,GAAG,G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ChC,EAAGwC,QAvBCA,EAAQ,IACNjB,GAAiB,IAARtC,EAAc,IACtBuD,GAqBgBC,KAAM,SAAUY,SAAUnG,EAAW,CAAC,EAAI,EAAG,gBAAiB6C,EAAK,gBAAiBC,EAAK,gBAAiB9C,EAAW,OAAS,KAAM,gBAAiBG,CAAM,EAAG4D,GAAO,YAAE,MAAO,CAAEmB,MAAO,YAAaK,KAAM,cAAe,EAAGnD,KAAKgE,MAAMjG,CAAK,CAAC,EAAG,YAAE,MAAO,CAAE+E,MAAO,aAAcK,KAAM,cAAe,CAAC,CAAE,CACvU,EACI3C,EAAe,SAAUb,EAAOc,EAAKC,EAAKC,GACtC5C,GAAS2C,EAAMD,EAInB,OAHW,EAAPE,IACA5C,EAAQiC,KAAKgE,MAAMjG,EAAQ4C,CAAI,EAAIA,EAAOF,GAEvC,YAAMA,EAAK1C,EAAO2C,CAAG,CAChC,EACIH,EAAe,SAAUxC,EAAO0C,EAAKC,GACrC,OAAO,YAAM,GAAI3C,EAAQ0C,IAAQC,EAAMD,GAAM,CAAC,CAClD,C","file":"js/chunk-23d04875.9b11919d.js","sourcesContent":["import { __awaiter, __generator } from \"tslib\";\nvar hostContext = function (selector, el) {\n return el.closest(selector) !== null;\n};\n/**\n * Create the mode and color classes for the component based on the classes passed in\n */\nvar createColorClasses = function (color) {\n var _a;\n return (typeof color === 'string' && color.length > 0) ? (_a = {\n 'ion-color': true\n },\n _a[\"ion-color-\" + color] = true,\n _a) : undefined;\n};\nvar getClassList = function (classes) {\n if (classes !== undefined) {\n var array = Array.isArray(classes) ? classes : classes.split(' ');\n return array\n .filter(function (c) { return c != null; })\n .map(function (c) { return c.trim(); })\n .filter(function (c) { return c !== ''; });\n }\n return [];\n};\nvar getClassMap = function (classes) {\n var map = {};\n getClassList(classes).forEach(function (c) { return map[c] = true; });\n return map;\n};\nvar SCHEME = /^[a-z][a-z0-9+\\-.]*:/;\nvar openURL = function (url, ev, direction) { return __awaiter(void 0, void 0, void 0, function () {\n var router;\n return __generator(this, function (_a) {\n if (url != null && url[0] !== '#' && !SCHEME.test(url)) {\n router = document.querySelector('ion-router');\n if (router) {\n if (ev != null) {\n ev.preventDefault();\n }\n return [2 /*return*/, router.push(url, direction)];\n }\n }\n return [2 /*return*/, false];\n });\n}); };\nexport { createColorClasses as c, getClassMap as g, hostContext as h, openURL as o };\n","import { __awaiter, __generator } from \"tslib\";\nimport { r as registerInstance, d as createEvent, c as getIonMode, h, H as Host, e as getElement } from './core-feeeff0d.js';\nimport './config-3c7f3790.js';\nimport { c as clamp, d as debounceEvent, a as renderHiddenInput } from './helpers-46f4a262.js';\nimport { c as createColorClasses, h as hostContext } from './theme-18cbe2cc.js';\nvar Range = /** @class */ (function () {\n function class_1(hostRef) {\n var _this = this;\n registerInstance(this, hostRef);\n this.noUpdate = false;\n this.hasFocus = false;\n this.ratioA = 0;\n this.ratioB = 0;\n /**\n * How long, in milliseconds, to wait to trigger the\n * `ionChange` event after each change in the range value.\n */\n this.debounce = 0;\n /**\n * The name of the control, which is submitted with the form data.\n */\n this.name = '';\n /**\n * Show two knobs.\n */\n this.dualKnobs = false;\n /**\n * Minimum integer value of the range.\n */\n this.min = 0;\n /**\n * Maximum integer value of the range.\n */\n this.max = 100;\n /**\n * If `true`, a pin with integer value is shown when the knob\n * is pressed.\n */\n this.pin = false;\n /**\n * If `true`, the knob snaps to tick marks evenly spaced based\n * on the step property value.\n */\n this.snaps = false;\n /**\n * Specifies the value granularity.\n */\n this.step = 1;\n /**\n * If `true`, tick marks are displayed based on the step value.\n * Only applies when `snaps` is `true`.\n */\n this.ticks = true;\n /**\n * If `true`, the user cannot interact with the range.\n */\n this.disabled = false;\n /**\n * the value of the range.\n */\n this.value = 0;\n this.clampBounds = function (value) {\n return clamp(_this.min, value, _this.max);\n };\n this.ensureValueInBounds = function (value) {\n if (_this.dualKnobs) {\n return {\n lower: _this.clampBounds(value.lower),\n upper: _this.clampBounds(value.upper)\n };\n }\n else {\n return _this.clampBounds(value);\n }\n };\n this.handleKeyboard = function (knob, isIncrease) {\n var step = _this.step;\n step = step > 0 ? step : 1;\n step = step / (_this.max - _this.min);\n if (!isIncrease) {\n step *= -1;\n }\n if (knob === 'A') {\n _this.ratioA = clamp(0, _this.ratioA + step, 1);\n }\n else {\n _this.ratioB = clamp(0, _this.ratioB + step, 1);\n }\n _this.updateValue();\n };\n this.onBlur = function () {\n if (_this.hasFocus) {\n _this.hasFocus = false;\n _this.ionBlur.emit();\n _this.emitStyle();\n }\n };\n this.onFocus = function () {\n if (!_this.hasFocus) {\n _this.hasFocus = true;\n _this.ionFocus.emit();\n _this.emitStyle();\n }\n };\n this.ionChange = createEvent(this, \"ionChange\", 7);\n this.ionStyle = createEvent(this, \"ionStyle\", 7);\n this.ionFocus = createEvent(this, \"ionFocus\", 7);\n this.ionBlur = createEvent(this, \"ionBlur\", 7);\n }\n class_1.prototype.debounceChanged = function () {\n this.ionChange = debounceEvent(this.ionChange, this.debounce);\n };\n class_1.prototype.minChanged = function () {\n if (!this.noUpdate) {\n this.updateRatio();\n }\n };\n class_1.prototype.maxChanged = function () {\n if (!this.noUpdate) {\n this.updateRatio();\n }\n };\n class_1.prototype.disabledChanged = function () {\n if (this.gesture) {\n this.gesture.setDisabled(this.disabled);\n }\n this.emitStyle();\n };\n class_1.prototype.valueChanged = function (value) {\n if (!this.noUpdate) {\n this.updateRatio();\n }\n value = this.ensureValueInBounds(value);\n this.ionChange.emit({ value: value });\n };\n class_1.prototype.connectedCallback = function () {\n this.updateRatio();\n this.debounceChanged();\n this.disabledChanged();\n };\n class_1.prototype.disconnectedCallback = function () {\n if (this.gesture) {\n this.gesture.destroy();\n this.gesture = undefined;\n }\n };\n class_1.prototype.componentDidLoad = function () {\n return __awaiter(this, void 0, void 0, function () {\n var rangeSlider, _a;\n var _this = this;\n return __generator(this, function (_b) {\n switch (_b.label) {\n case 0:\n rangeSlider = this.rangeSlider;\n if (!rangeSlider) return [3 /*break*/, 2];\n _a = this;\n return [4 /*yield*/, import('./index-624eea58.js')];\n case 1:\n _a.gesture = (_b.sent()).createGesture({\n el: rangeSlider,\n gestureName: 'range',\n gesturePriority: 100,\n threshold: 0,\n onStart: function (ev) { return _this.onStart(ev); },\n onMove: function (ev) { return _this.onMove(ev); },\n onEnd: function (ev) { return _this.onEnd(ev); },\n });\n this.gesture.setDisabled(this.disabled);\n _b.label = 2;\n case 2: return [2 /*return*/];\n }\n });\n });\n };\n class_1.prototype.getValue = function () {\n var value = this.value || 0;\n if (this.dualKnobs) {\n if (typeof value === 'object') {\n return value;\n }\n return {\n lower: 0,\n upper: value\n };\n }\n else {\n if (typeof value === 'object') {\n return value.upper;\n }\n return value;\n }\n };\n class_1.prototype.emitStyle = function () {\n this.ionStyle.emit({\n 'interactive': true,\n 'interactive-disabled': this.disabled\n });\n };\n class_1.prototype.onStart = function (detail) {\n var rect = this.rect = this.rangeSlider.getBoundingClientRect();\n var currentX = detail.currentX;\n // figure out which knob they started closer to\n var ratio = clamp(0, (currentX - rect.left) / rect.width, 1);\n if (document.dir === 'rtl') {\n ratio = 1 - ratio;\n }\n this.pressedKnob =\n !this.dualKnobs ||\n Math.abs(this.ratioA - ratio) < Math.abs(this.ratioB - ratio)\n ? 'A'\n : 'B';\n this.setFocus(this.pressedKnob);\n // update the active knob's position\n this.update(currentX);\n };\n class_1.prototype.onMove = function (detail) {\n this.update(detail.currentX);\n };\n class_1.prototype.onEnd = function (detail) {\n this.update(detail.currentX);\n this.pressedKnob = undefined;\n };\n class_1.prototype.update = function (currentX) {\n // figure out where the pointer is currently at\n // update the knob being interacted with\n var rect = this.rect;\n var ratio = clamp(0, (currentX - rect.left) / rect.width, 1);\n if (document.dir === 'rtl') {\n ratio = 1 - ratio;\n }\n if (this.snaps) {\n // snaps the ratio to the current value\n ratio = valueToRatio(ratioToValue(ratio, this.min, this.max, this.step), this.min, this.max);\n }\n // update which knob is pressed\n if (this.pressedKnob === 'A') {\n this.ratioA = ratio;\n }\n else {\n this.ratioB = ratio;\n }\n // Update input value\n this.updateValue();\n };\n Object.defineProperty(class_1.prototype, \"valA\", {\n get: function () {\n return ratioToValue(this.ratioA, this.min, this.max, this.step);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(class_1.prototype, \"valB\", {\n get: function () {\n return ratioToValue(this.ratioB, this.min, this.max, this.step);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(class_1.prototype, \"ratioLower\", {\n get: function () {\n if (this.dualKnobs) {\n return Math.min(this.ratioA, this.ratioB);\n }\n return 0;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(class_1.prototype, \"ratioUpper\", {\n get: function () {\n if (this.dualKnobs) {\n return Math.max(this.ratioA, this.ratioB);\n }\n return this.ratioA;\n },\n enumerable: true,\n configurable: true\n });\n class_1.prototype.updateRatio = function () {\n var value = this.getValue();\n var _a = this, min = _a.min, max = _a.max;\n if (this.dualKnobs) {\n this.ratioA = valueToRatio(value.lower, min, max);\n this.ratioB = valueToRatio(value.upper, min, max);\n }\n else {\n this.ratioA = valueToRatio(value, min, max);\n }\n };\n class_1.prototype.updateValue = function () {\n this.noUpdate = true;\n var _a = this, valA = _a.valA, valB = _a.valB;\n this.value = !this.dualKnobs\n ? valA\n : {\n lower: Math.min(valA, valB),\n upper: Math.max(valA, valB)\n };\n this.noUpdate = false;\n };\n class_1.prototype.setFocus = function (knob) {\n if (this.el.shadowRoot) {\n var knobEl = this.el.shadowRoot.querySelector(knob === 'A' ? '.range-knob-a' : '.range-knob-b');\n if (knobEl) {\n knobEl.focus();\n }\n }\n };\n class_1.prototype.render = function () {\n var _a, _b;\n var _this = this;\n var _c = this, min = _c.min, max = _c.max, step = _c.step, el = _c.el, handleKeyboard = _c.handleKeyboard, pressedKnob = _c.pressedKnob, disabled = _c.disabled, pin = _c.pin, ratioLower = _c.ratioLower, ratioUpper = _c.ratioUpper;\n var mode = getIonMode(this);\n var barStart = ratioLower * 100 + \"%\";\n var barEnd = 100 - ratioUpper * 100 + \"%\";\n var doc = document;\n var isRTL = doc.dir === 'rtl';\n var start = isRTL ? 'right' : 'left';\n var end = isRTL ? 'left' : 'right';\n var tickStyle = function (tick) {\n var _a;\n return _a = {},\n _a[start] = tick[start],\n _a;\n };\n var barStyle = (_a = {},\n _a[start] = barStart,\n _a[end] = barEnd,\n _a);\n var ticks = [];\n if (this.snaps && this.ticks) {\n for (var value = min; value <= max; value += step) {\n var ratio = valueToRatio(value, min, max);\n var tick = {\n ratio: ratio,\n active: ratio >= ratioLower && ratio <= ratioUpper,\n };\n tick[start] = ratio * 100 + \"%\";\n ticks.push(tick);\n }\n }\n renderHiddenInput(true, el, this.name, JSON.stringify(this.getValue()), disabled);\n return (h(Host, { onFocusin: this.onFocus, onFocusout: this.onBlur, class: Object.assign(Object.assign({}, createColorClasses(this.color)), (_b = {}, _b[mode] = true, _b['in-item'] = hostContext('ion-item', el), _b['range-disabled'] = disabled, _b['range-pressed'] = pressedKnob !== undefined, _b['range-has-pin'] = pin, _b)) }, h(\"slot\", { name: \"start\" }), h(\"div\", { class: \"range-slider\", ref: function (rangeEl) { return _this.rangeSlider = rangeEl; } }, ticks.map(function (tick) { return (h(\"div\", { style: tickStyle(tick), role: \"presentation\", class: {\n 'range-tick': true,\n 'range-tick-active': tick.active\n } })); }), h(\"div\", { class: \"range-bar\", role: \"presentation\" }), h(\"div\", { class: \"range-bar range-bar-active\", role: \"presentation\", style: barStyle }), renderKnob(isRTL, {\n knob: 'A',\n pressed: pressedKnob === 'A',\n value: this.valA,\n ratio: this.ratioA,\n pin: pin,\n disabled: disabled,\n handleKeyboard: handleKeyboard,\n min: min,\n max: max\n }), this.dualKnobs && renderKnob(isRTL, {\n knob: 'B',\n pressed: pressedKnob === 'B',\n value: this.valB,\n ratio: this.ratioB,\n pin: pin,\n disabled: disabled,\n handleKeyboard: handleKeyboard,\n min: min,\n max: max\n })), h(\"slot\", { name: \"end\" })));\n };\n Object.defineProperty(class_1.prototype, \"el\", {\n get: function () { return getElement(this); },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(class_1, \"watchers\", {\n get: function () {\n return {\n \"debounce\": [\"debounceChanged\"],\n \"min\": [\"minChanged\"],\n \"max\": [\"maxChanged\"],\n \"disabled\": [\"disabledChanged\"],\n \"value\": [\"valueChanged\"]\n };\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(class_1, \"style\", {\n get: function () { return \":host{--knob-handle-size:calc(var(--knob-size) * 2);display:-ms-flexbox;display:flex;position:relative;-ms-flex:3;flex:3;-ms-flex-align:center;align-items:center;font-family:var(--ion-font-family,inherit);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:2}:host(.range-disabled){pointer-events:none}::slotted(ion-label){-ms-flex:initial;flex:initial}::slotted(ion-icon[slot]){font-size:24px}.range-slider{position:relative;-ms-flex:1;flex:1;width:100%;height:var(--height);contain:size layout style;cursor:-webkit-grab;cursor:grab;-ms-touch-action:pan-y;touch-action:pan-y}:host(.range-pressed) .range-slider{cursor:-webkit-grabbing;cursor:grabbing}.range-pin{position:absolute;background:var(--ion-color-base);color:var(--ion-color-contrast);-webkit-box-sizing:border-box;box-sizing:border-box}.range-knob-handle{left:0;top:calc((var(--height) - var(--knob-handle-size)) / 2);margin-left:calc(0px - var(--knob-handle-size) / 2);position:absolute;width:var(--knob-handle-size);height:var(--knob-handle-size);text-align:center}:host-context([dir=rtl]) .range-knob-handle,[dir=rtl] .range-knob-handle{right:unset;right:0}\\@supports ((-webkit-margin-start:0) or (margin-inline-start:0)) or (-webkit-margin-start:0){.range-knob-handle{margin-left:unset;-webkit-margin-start:calc(0px - var(--knob-handle-size) / 2);margin-inline-start:calc(0px - var(--knob-handle-size) / 2)}}:host-context([dir=rtl]) .range-knob-handle,[dir=rtl] .range-knob-handle{left:unset}.range-knob-handle:active,.range-knob-handle:focus{outline:none}.range-bar{border-radius:var(--bar-border-radius);left:0;top:calc((var(--height) - var(--bar-height)) / 2);position:absolute;width:100%;height:var(--bar-height);background:var(--bar-background);pointer-events:none}:host-context([dir=rtl]) .range-bar,[dir=rtl] .range-bar{right:unset;right:0;left:unset}.range-knob{border-radius:var(--knob-border-radius);left:calc(50% - var(--knob-size) / 2);top:calc(50% - var(--knob-size) / 2);position:absolute;width:var(--knob-size);height:var(--knob-size);background:var(--knob-background);-webkit-box-shadow:var(--knob-box-shadow);box-shadow:var(--knob-box-shadow);z-index:2;pointer-events:none}:host-context([dir=rtl]) .range-knob,[dir=rtl] .range-knob{right:unset;right:calc(50% - var(--knob-size) / 2);left:unset}:host(.range-pressed) .range-bar-active{will-change:left,right}:host(.in-item){width:100%}:host(.in-item) ::slotted(ion-label){-ms-flex-item-align:center;align-self:center}:host{--knob-border-radius:50%;--knob-background:#fff;--knob-box-shadow:0 3px 1px rgba(0,0,0,0.1),0 4px 8px rgba(0,0,0,0.13),0 0 0 1px rgba(0,0,0,0.02);--knob-size:28px;--bar-height:2px;--bar-background:rgba(var(--ion-text-color-rgb,0,0,0),0.1);--bar-background-active:var(--ion-color-primary,#3880ff);--bar-border-radius:0;--height:42px;padding-left:16px;padding-right:16px;padding-top:8px;padding-bottom:8px}\\@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:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px}}:host(.ion-color) .range-bar-active,:host(.ion-color) .range-tick-active{background:var(--ion-color-base)}::slotted([slot=start]){margin-left:0;margin-right:16px;margin-top:0;margin-bottom:0}\\@supports ((-webkit-margin-start:0) or (margin-inline-start:0)) or (-webkit-margin-start:0){::slotted([slot=start]){margin-left:unset;margin-right:unset;-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:16px;margin-inline-end:16px}}::slotted([slot=end]){margin-left:16px;margin-right:0;margin-top:0;margin-bottom:0}\\@supports ((-webkit-margin-start:0) or (margin-inline-start:0)) or (-webkit-margin-start:0){::slotted([slot=end]){margin-left:unset;margin-right:unset;-webkit-margin-start:16px;margin-inline-start:16px;-webkit-margin-end:0;margin-inline-end:0}}:host(.range-has-pin){padding-top:20px}.range-bar-active{bottom:0;width:auto;background:var(--bar-background-active)}.range-tick{margin-left:-1px;border-radius:0;position:absolute;top:18px;width:2px;height:8px;background:rgba(var(--ion-text-color-rgb,0,0,0),.1);pointer-events:none}\\@supports ((-webkit-margin-start:0) or (margin-inline-start:0)) or (-webkit-margin-start:0){.range-tick{margin-left:unset;-webkit-margin-start:-1px;margin-inline-start:-1px}}.range-tick-active{background:var(--bar-background-active)}.range-pin{-webkit-transform:translate3d(0,28px,0) scale(.01);transform:translate3d(0,28px,0) scale(.01);padding-left:8px;padding-right:8px;padding-top:8px;padding-bottom:8px;display:inline-block;position:relative;top:-20px;min-width:28px;-webkit-transition:-webkit-transform .12s ease;transition:-webkit-transform .12s ease;transition:transform .12s ease;transition:transform .12s ease,-webkit-transform .12s ease;background:transparent;color:var(--ion-text-color,#000);font-size:12px;text-align:center}\\@supports ((-webkit-margin-start:0) or (margin-inline-start:0)) or (-webkit-margin-start:0){.range-pin{padding-left:unset;padding-right:unset;-webkit-padding-start:8px;padding-inline-start:8px;-webkit-padding-end:8px;padding-inline-end:8px}}.range-knob-pressed .range-pin{-webkit-transform:translateZ(0) scale(1);transform:translateZ(0) scale(1)}:host(.range-disabled){opacity:.5}\"; },\n enumerable: true,\n configurable: true\n });\n return class_1;\n}());\nvar renderKnob = function (isRTL, _a) {\n var knob = _a.knob, value = _a.value, ratio = _a.ratio, min = _a.min, max = _a.max, disabled = _a.disabled, pressed = _a.pressed, pin = _a.pin, handleKeyboard = _a.handleKeyboard;\n var start = isRTL ? 'right' : 'left';\n var knobStyle = function () {\n var style = {};\n style[start] = ratio * 100 + \"%\";\n return style;\n };\n return (h(\"div\", { onKeyDown: function (ev) {\n var key = ev.key;\n if (key === 'ArrowLeft' || key === 'ArrowDown') {\n handleKeyboard(knob, false);\n ev.preventDefault();\n ev.stopPropagation();\n }\n else if (key === 'ArrowRight' || key === 'ArrowUp') {\n handleKeyboard(knob, true);\n ev.preventDefault();\n ev.stopPropagation();\n }\n }, class: {\n 'range-knob-handle': true,\n 'range-knob-a': knob === 'A',\n 'range-knob-b': knob === 'B',\n 'range-knob-pressed': pressed,\n 'range-knob-min': value === min,\n 'range-knob-max': value === max\n }, style: knobStyle(), role: \"slider\", tabindex: disabled ? -1 : 0, \"aria-valuemin\": min, \"aria-valuemax\": max, \"aria-disabled\": disabled ? 'true' : null, \"aria-valuenow\": value }, pin && h(\"div\", { class: \"range-pin\", role: \"presentation\" }, Math.round(value)), h(\"div\", { class: \"range-knob\", role: \"presentation\" })));\n};\nvar ratioToValue = function (ratio, min, max, step) {\n var value = (max - min) * ratio;\n if (step > 0) {\n value = Math.round(value / step) * step + min;\n }\n return clamp(min, value, max);\n};\nvar valueToRatio = function (value, min, max) {\n return clamp(0, (value - min) / (max - min), 1);\n};\nexport { Range as ion_range };\n"],"sourceRoot":""}