-
Notifications
You must be signed in to change notification settings - Fork 0
/
11-es5.js.map
1 lines (1 loc) · 126 KB
/
11-es5.js.map
1
{"version":3,"sources":["webpack:///node_modules/@ionic/core/dist/esm/ion-datetime_3.entry.js"],"names":["getDateValue","date","format","getValue","getValueFromFormat","undefined","FORMAT_A","FORMAT_a","ampm","defaultDate","parseDate","Date","toISOString","renderDatetime","template","value","locale","tokens","hasText","FORMAT_KEYS","forEach","index","indexOf","f","token","text","renderTextFormat","k","push","replace","i","length","FORMAT_DDDD","FORMAT_DDD","year","month","day","getDay","dayNames","DAY_NAMES","dayShortNames","DAY_SHORT_NAMES","e","hour","toUpperCase","FORMAT_YY","FORMAT_MM","FORMAT_DD","FORMAT_HH","FORMAT_mm","FORMAT_ss","twoDigit","FORMAT_YYYY","fourDigit","FORMAT_MMMM","monthNames","MONTH_NAMES","FORMAT_MMM","monthShortNames","MONTH_SHORT_NAMES","FORMAT_hh","FORMAT_h","toString","dateValueRange","min","max","opts","Error","FORMAT_M","FORMAT_D","FORMAT_H","FORMAT_m","FORMAT_s","dateSortValue","minute","parseInt","dateDataSortValue","data","daysInMonth","isLeapYear","ISO_8601_REGEXP","TIME_REGEXP","val","parse","exec","unshift","tzOffset","second","millisecond","getDateTime","dateString","timeZone","localDateTime","UTC","getFullYear","getMonth","getDate","getHours","getMinutes","getSeconds","getMilliseconds","getTime","getTimezoneOffset","localDate","utcDateTime","toLocaleString","tzDateTime","updateDate","existingData","newData","displayTimezone","dateTime","Number","isNaN","Object","assign","keys","key","console","warn","hasOwnProperty","parseTemplate","formats","charAt","words","split","filter","w","word","VALID_AMPM_PREFIX","convertFormatToKey","convertDataToISO","rtn","threeDigit","Math","floor","abs","convertToArrayOfStrings","input","type","values","Array","isArray","map","trim","convertToArrayOfNumbers","num","isFinite","slice","datetimeIosCss","datetimeMdCss","Datetime","hostRef","ionCancel","ionChange","ionFocus","ionBlur","ionStyle","inputId","datetimeIds","datetimeMin","datetimeMax","datetimeValue","isExpanded","name","disabled","readonly","displayFormat","cancelText","doneText","onClick","setFocus","open","onFocus","emit","onBlur","emitStyle","updateDatetimeValue","pickerOptions","generatePickerOptions","create","picker","onDidDismiss","then","event","detail","colSelectedIndex","selectedIndex","colOptions","options","changeData","columns","generateColumns","present","placeholder","hasValue","mode","buttons","role","handler","pickerFormat","DEFAULT_FORMAT","calcMinMax","self","optValue","findIndex","opt","find","column","validateColumns","divyColumns","today","minCompareVal","maxCompareVal","yearCol","c","selectedYear","col","yearOpt","selectedMonth","validateColumn","numDaysInMonth","selectedDay","selectedHour","todaysYear","yearValues","years","error","lowerBounds","upperBounds","lb","ub","indexMin","indexMax","buttonEl","focus","el","labelId","label","addPlaceholderClass","datetimeText","datetimeTextPart","id","part","ref","btnEl","columnsWidth","width","option","align","optionsWidth","columnWidth","style","ios","md","iosEnterAnimation","baseEl","baseAnimation","backdropAnimation","wrapperAnimation","addElement","querySelector","fromTo","beforeStyles","afterClearStyles","easing","duration","addAnimation","iosLeaveAnimation","pickerIosCss","pickerMdCss","Picker","didPresent","willPresent","willDismiss","didDismiss","presented","keyboardClose","showBackdrop","backdropDismiss","animated","onBackdropTap","dismiss","dispatchCancelHandler","ev","cancelButton","b","callButtonHandler","durationTimeout","setTimeout","clearTimeout","Promise","resolve","button","shouldDismiss","getSelected","selected","selectedColumn","columnIndex","tabindex","cssClass","zIndex","overlayIndex","onIonBackdropTap","onIonPickerWillDismiss","visible","tappable","buttonWrapperClass","buttonClick","buttonClass","pickerColumnIosCss","pickerColumnMdCss","PickerColumnCmp","ionPickerColChange","optHeight","rotateFactor","scaleFactor","velocity","y","noAnimate","refresh","pickerRotateFactor","pickerScaleFactor","gesture","createGesture","gestureName","gesturePriority","threshold","passive","onStart","onMove","onEnd","enable","tmrId","colEl","optsEl","firstElementChild","clientHeight","cancelAnimationFrame","rafId","destroy","update","emitColChange","saveY","translateY","translateZ","indexForY","durationStr","scaleStr","children","optOffset","transform","rotateX","transitionDuration","classList","add","PICKER_OPT_SELECTED","remove","prevSelected","lastIndex","DECELERATION_FRICTION","minY","maxY","notLockedIn","round","requestAnimationFrame","decelerate","currentPos","cancelable","preventDefault","stopPropagation","deltaY","pow","bounceFrom","MAX_PICKER_SPEED","velocityY","target","closest","hasAttribute","setSelected","getAttribute","TRANSITION_DURATION","isScrollingUp","optHeightFraction","forceRefresh","Button","prefix","prefixWidth","maxWidth","o","suffix","suffixWidth"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;;;AAAA;AAAA;AAAA;AAAA;;;AAAA;AAAA;AAAA;AAAA;;;AAAA;AAAA;AAAA;AAAA;;;AAAA;AAAA;AAAA;AAAA;;;AAAA;AAAA;AAAA;AAAA;;;AAAA;AAAA;AAAA;AAAA;;;AAAA;AAAA;AAAA;AAAA;;;AAAA;AAAA;AAAA;AAAA;;;AAAA;AAAA;AAAA;AAAA;;;AAAA;AAAA;AAAA;AAAA;;;AAAA;AAAA;AAAA;AASA;;;;;;;AAKA,UAAMA,YAAY,GAAG,SAAfA,YAAe,CAACC,IAAD,EAAOC,MAAP,EAAkB;AACrC,YAAMC,QAAQ,GAAGC,kBAAkB,CAACH,IAAD,EAAOC,MAAP,CAAnC;;AACA,YAAIC,QAAQ,KAAKE,SAAjB,EAA4B;AAC1B,cAAIH,MAAM,KAAKI,QAAX,IAAuBJ,MAAM,KAAKK,QAAtC,EAAgD;AAC9CN,gBAAI,CAACO,IAAL,GAAYL,QAAZ;AACD;;AACD,iBAAOA,QAAP;AACD;;AACD,YAAMM,WAAW,GAAGC,SAAS,CAAC,IAAIC,IAAJ,GAAWC,WAAX,EAAD,CAA7B;AACA,eAAOR,kBAAkB,CAACK,WAAD,EAAcP,MAAd,CAAzB;AACD,OAVD;;AAWA,UAAMW,cAAc,GAAG,SAAjBA,cAAiB,CAACC,QAAD,EAAWC,KAAX,EAAkBC,MAAlB,EAA6B;AAClD,YAAID,KAAK,KAAKV,SAAd,EAAyB;AACvB,iBAAOA,SAAP;AACD;;AACD,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EAAE;AAAEL,qBAAK,EAAE9B,GAAG,CAAC8K;AAAb;AAAjC,aAAT,EAAwE9K,GAAG,CAAC6K,MAA5E,CAPzX,CAAR;AAQD;AAhTkB;AAAA;AAAA,8BAiTV;AAAE,mBAAO,6DAAW,IAAX,CAAP;AAA0B;AAjTlB;AAAA;AAAA,8BAkTG;AAAE,mBAAO;AAC7B,qBAAO,CAAC,YAAD;AADsB,aAAP;AAEpB;AApTe;;AAAA;AAAA,SAArB;;AAsTA,UAAMlC,mBAAmB,GAAG,qBAA5B;AACA,UAAMI,qBAAqB,GAAG,IAA9B;AACA,UAAMc,gBAAgB,GAAG,EAAzB;AACA,UAAMO,mBAAmB,GAAG,GAA5B;AACArE,qBAAe,CAAC5D,KAAhB,GAAwB;AACtBC,WAAG,EAAEyD,kBADiB;AAEtBxD,UAAE,EAAEyD;AAFkB,OAAxB","file":"11-es5.js","sourcesContent":["import { r as registerInstance, e as createEvent, h, H as Host, i as getElement } from './index-e806d1f6.js';\nimport { b as getIonMode } from './ionic-global-9d5c8ee3.js';\nimport { a as addEventListener, h as clamp, f as findItemLabel, d as renderHiddenInput } from './helpers-90f46169.js';\nimport { c as createAnimation } from './animation-54fe0237.js';\nimport './hardware-back-button-4a6b37fb.js';\nimport { p as pickerController, B as BACKDROP, i as isCancel, e as prepareOverlay, d as present, f as dismiss, g as eventMethod, s as safeCall } from './overlays-12c20431.js';\nimport { b as hapticSelectionChanged, h as hapticSelectionEnd, a as hapticSelectionStart } from './haptic-27b3f981.js';\nimport { h as hostContext, g as getClassMap } from './theme-ff3fc52f.js';\n\n/**\n * Gets a date value given a format\n * Defaults to the current date if\n * no date given\n */\nconst getDateValue = (date, format) => {\n const getValue = getValueFromFormat(date, format);\n if (getValue !== undefined) {\n if (format === FORMAT_A || format === FORMAT_a) {\n date.ampm = getValue;\n }\n return getValue;\n }\n const defaultDate = parseDate(new Date().toISOString());\n return getValueFromFormat(defaultDate, format);\n};\nconst renderDatetime = (template, value, locale) => {\n if (value === undefined) {\n return undefined;\n }\n const tokens = [];\n let hasText = false;\n FORMAT_KEYS.forEach((format, index) => {\n if (template.indexOf(format.f) > -1) {\n const token = '{' + index + '}';\n const text = renderTextFormat(format.f, value[format.k], value, locale);\n if (!hasText && text !== undefined && value[format.k] != null) {\n hasText = true;\n }\n tokens.push(token, text || '');\n template = template.replace(format.f, token);\n }\n });\n if (!hasText) {\n return undefined;\n }\n for (let i = 0; i < tokens.length; i += 2) {\n template = template.replace(tokens[i], tokens[i + 1]);\n }\n return template;\n};\nconst renderTextFormat = (format, value, date, locale) => {\n if ((format === FORMAT_DDDD || format === FORMAT_DDD)) {\n try {\n value = (new Date(date.year, date.month - 1, date.day)).getDay();\n if (format === FORMAT_DDDD) {\n return (locale.dayNames ? locale.dayNames : DAY_NAMES)[value];\n }\n return (locale.dayShortNames ? locale.dayShortNames : DAY_SHORT_NAMES)[value];\n }\n catch (e) {\n // ignore\n }\n return undefined;\n }\n if (format === FORMAT_A) {\n return date !== undefined && date.hour !== undefined\n ? (date.hour < 12 ? 'AM' : 'PM')\n : value ? value.toUpperCase() : '';\n }\n if (format === FORMAT_a) {\n return date !== undefined && date.hour !== undefined\n ? (date.hour < 12 ? 'am' : 'pm')\n : value || '';\n }\n if (value == null) {\n return '';\n }\n if (format === FORMAT_YY || format === FORMAT_MM ||\n format === FORMAT_DD || format === FORMAT_HH ||\n format === FORMAT_mm || format === FORMAT_ss) {\n return twoDigit(value);\n }\n if (format === FORMAT_YYYY) {\n return fourDigit(value);\n }\n if (format === FORMAT_MMMM) {\n return (locale.monthNames ? locale.monthNames : MONTH_NAMES)[value - 1];\n }\n if (format === FORMAT_MMM) {\n return (locale.monthShortNames ? locale.monthShortNames : MONTH_SHORT_NAMES)[value - 1];\n }\n if (format === FORMAT_hh || format === FORMAT_h) {\n if (value === 0) {\n return '12';\n }\n if (value > 12) {\n value -= 12;\n }\n if (format === FORMAT_hh && value < 10) {\n return ('0' + value);\n }\n }\n return value.toString();\n};\nconst dateValueRange = (format, min, max) => {\n const opts = [];\n if (format === FORMAT_YYYY || format === FORMAT_YY) {\n // year\n if (max.year === undefined || min.year === undefined) {\n throw new Error('min and max year is undefined');\n }\n for (let i = max.year; i >= min.year; i--) {\n opts.push(i);\n }\n }\n else if (format === FORMAT_MMMM || format === FORMAT_MMM ||\n format === FORMAT_MM || format === FORMAT_M ||\n format === FORMAT_hh || format === FORMAT_h) {\n // month or 12-hour\n for (let i = 1; i < 13; i++) {\n opts.push(i);\n }\n }\n else if (format === FORMAT_DDDD || format === FORMAT_DDD ||\n format === FORMAT_DD || format === FORMAT_D) {\n // day\n for (let i = 1; i < 32; i++) {\n opts.push(i);\n }\n }\n else if (format === FORMAT_HH || format === FORMAT_H) {\n // 24-hour\n for (let i = 0; i < 24; i++) {\n opts.push(i);\n }\n }\n else if (format === FORMAT_mm || format === FORMAT_m) {\n // minutes\n for (let i = 0; i < 60; i++) {\n opts.push(i);\n }\n }\n else if (format === FORMAT_ss || format === FORMAT_s) {\n // seconds\n for (let i = 0; i < 60; i++) {\n opts.push(i);\n }\n }\n else if (format === FORMAT_A || format === FORMAT_a) {\n // AM/PM\n opts.push('am', 'pm');\n }\n return opts;\n};\nconst dateSortValue = (year, month, day, hour = 0, minute = 0) => {\n return parseInt(`1${fourDigit(year)}${twoDigit(month)}${twoDigit(day)}${twoDigit(hour)}${twoDigit(minute)}`, 10);\n};\nconst dateDataSortValue = (data) => {\n return dateSortValue(data.year, data.month, data.day, data.hour, data.minute);\n};\nconst daysInMonth = (month, year) => {\n return (month === 4 || month === 6 || month === 9 || month === 11) ? 30 : (month === 2) ? isLeapYear(year) ? 29 : 28 : 31;\n};\nconst isLeapYear = (year) => {\n return (year % 4 === 0 && year % 100 !== 0) || (year % 400 === 0);\n};\nconst ISO_8601_REGEXP = /^(\\d{4}|[+\\-]\\d{6})(?:-(\\d{2})(?:-(\\d{2}))?)?(?:T(\\d{2}):(\\d{2})(?::(\\d{2})(?:\\.(\\d{3}))?)?(?:(Z)|([+\\-])(\\d{2})(?::(\\d{2}))?)?)?$/;\nconst TIME_REGEXP = /^((\\d{2}):(\\d{2})(?::(\\d{2})(?:\\.(\\d{3}))?)?(?:(Z)|([+\\-])(\\d{2})(?::(\\d{2}))?)?)?$/;\nconst parseDate = (val) => {\n // manually parse IS0 cuz Date.parse cannot be trusted\n // ISO 8601 format: 1994-12-15T13:47:20Z\n let parse = null;\n if (val != null && val !== '') {\n // try parsing for just time first, HH:MM\n parse = TIME_REGEXP.exec(val);\n if (parse) {\n // adjust the array so it fits nicely with the datetime parse\n parse.unshift(undefined, undefined);\n parse[2] = parse[3] = undefined;\n }\n else {\n // try parsing for full ISO datetime\n parse = ISO_8601_REGEXP.exec(val);\n }\n }\n if (parse === null) {\n // wasn't able to parse the ISO datetime\n return undefined;\n }\n // ensure all the parse values exist with at least 0\n for (let i = 1; i < 8; i++) {\n parse[i] = parse[i] !== undefined ? parseInt(parse[i], 10) : undefined;\n }\n let tzOffset = 0;\n if (parse[9] && parse[10]) {\n // hours\n tzOffset = parseInt(parse[10], 10) * 60;\n if (parse[11]) {\n // minutes\n tzOffset += parseInt(parse[11], 10);\n }\n if (parse[9] === '-') {\n // + or -\n tzOffset *= -1;\n }\n }\n return {\n year: parse[1],\n month: parse[2],\n day: parse[3],\n hour: parse[4],\n minute: parse[5],\n second: parse[6],\n millisecond: parse[7],\n tzOffset,\n };\n};\n/**\n * Converts a valid UTC datetime string to JS Date time object.\n * By default uses the users local timezone, but an optional\n * timezone can be provided.\n * Note: This is not meant for time strings\n * such as \"01:47\"\n */\nconst getDateTime = (dateString = '', timeZone = '') => {\n /**\n * If user passed in undefined\n * or null, convert it to the\n * empty string since the rest\n * of this functions expects\n * a string\n */\n if (dateString === undefined || dateString === null) {\n dateString = '';\n }\n /**\n * Ensures that YYYY-MM-DD, YYYY-MM,\n * YYYY-DD, YYYY, etc does not get affected\n * by timezones and stays on the day/month\n * that the user provided\n */\n if (dateString.length === 10 ||\n dateString.length === 7 ||\n dateString.length === 4) {\n dateString += ' ';\n }\n const date = (typeof dateString === 'string' && dateString.length > 0) ? new Date(dateString) : new Date();\n const localDateTime = new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds()));\n if (timeZone && timeZone.length > 0) {\n return new Date(date.getTime() - getTimezoneOffset(localDateTime, timeZone));\n }\n return localDateTime;\n};\nconst getTimezoneOffset = (localDate, timeZone) => {\n const utcDateTime = new Date(localDate.toLocaleString('en-US', { timeZone: 'utc' }));\n const tzDateTime = new Date(localDate.toLocaleString('en-US', { timeZone }));\n return utcDateTime.getTime() - tzDateTime.getTime();\n};\nconst updateDate = (existingData, newData, displayTimezone) => {\n if (!newData || typeof newData === 'string') {\n const dateTime = getDateTime(newData, displayTimezone);\n if (!Number.isNaN(dateTime.getTime())) {\n newData = dateTime.toISOString();\n }\n }\n if (newData && newData !== '') {\n if (typeof newData === 'string') {\n // new date is a string, and hopefully in the ISO format\n // convert it to our DatetimeData if a valid ISO\n newData = parseDate(newData);\n if (newData) {\n // successfully parsed the ISO string to our DatetimeData\n Object.assign(existingData, newData);\n return true;\n }\n }\n else if ((newData.year || newData.hour || newData.month || newData.day || newData.minute || newData.second)) {\n // newData is from the datetime picker's selected values\n // update the existing datetimeValue with the new values\n if (newData.ampm !== undefined && newData.hour !== undefined) {\n // change the value of the hour based on whether or not it is am or pm\n // if the meridiem is pm and equal to 12, it remains 12\n // otherwise we add 12 to the hour value\n // if the meridiem is am and equal to 12, we change it to 0\n // otherwise we use its current hour value\n // for example: 8 pm becomes 20, 12 am becomes 0, 4 am becomes 4\n newData.hour.value = (newData.ampm.value === 'pm')\n ? (newData.hour.value === 12 ? 12 : newData.hour.value + 12)\n : (newData.hour.value === 12 ? 0 : newData.hour.value);\n }\n // merge new values from the picker's selection\n // to the existing DatetimeData values\n for (const key of Object.keys(newData)) {\n existingData[key] = newData[key].value;\n }\n return true;\n }\n else if (newData.ampm) {\n // Even though in the picker column hour values are between 1 and 12, the hour value is actually normalized\n // to [0, 23] interval. Because of this when changing between AM and PM we have to update the hour so it points\n // to the correct HH hour\n newData.hour = {\n value: newData.hour\n ? newData.hour.value\n : (newData.ampm.value === 'pm'\n ? (existingData.hour < 12 ? existingData.hour + 12 : existingData.hour)\n : (existingData.hour >= 12 ? existingData.hour - 12 : existingData.hour))\n };\n existingData['hour'] = newData['hour'].value;\n existingData['ampm'] = newData['ampm'].value;\n return true;\n }\n // eww, invalid data\n console.warn(`Error parsing date: \"${newData}\". Please provide a valid ISO 8601 datetime format: https://www.w3.org/TR/NOTE-datetime`);\n }\n else {\n // blank data, clear everything out\n for (const k in existingData) {\n if (existingData.hasOwnProperty(k)) {\n delete existingData[k];\n }\n }\n }\n return false;\n};\nconst parseTemplate = (template) => {\n const formats = [];\n template = template.replace(/[^\\w\\s]/gi, ' ');\n FORMAT_KEYS.forEach(format => {\n if (format.f.length > 1 && template.indexOf(format.f) > -1 && template.indexOf(format.f + format.f.charAt(0)) < 0) {\n template = template.replace(format.f, ' ' + format.f + ' ');\n }\n });\n const words = template.split(' ').filter(w => w.length > 0);\n words.forEach((word, i) => {\n FORMAT_KEYS.forEach(format => {\n if (word === format.f) {\n if (word === FORMAT_A || word === FORMAT_a) {\n // this format is an am/pm format, so it's an \"a\" or \"A\"\n if ((formats.indexOf(FORMAT_h) < 0 && formats.indexOf(FORMAT_hh) < 0) ||\n VALID_AMPM_PREFIX.indexOf(words[i - 1]) === -1) {\n // template does not already have a 12-hour format\n // or this am/pm format doesn't have a hour, minute, or second format immediately before it\n // so do not treat this word \"a\" or \"A\" as the am/pm format\n return;\n }\n }\n formats.push(word);\n }\n });\n });\n return formats;\n};\nconst getValueFromFormat = (date, format) => {\n if (format === FORMAT_A || format === FORMAT_a) {\n return (date.hour < 12 ? 'am' : 'pm');\n }\n if (format === FORMAT_hh || format === FORMAT_h) {\n return (date.hour > 12 ? date.hour - 12 : (date.hour === 0 ? 12 : date.hour));\n }\n return date[convertFormatToKey(format)];\n};\nconst convertFormatToKey = (format) => {\n for (const k in FORMAT_KEYS) {\n if (FORMAT_KEYS[k].f === format) {\n return FORMAT_KEYS[k].k;\n }\n }\n return undefined;\n};\nconst convertDataToISO = (data) => {\n // https://www.w3.org/TR/NOTE-datetime\n let rtn = '';\n if (data.year !== undefined) {\n // YYYY\n rtn = fourDigit(data.year);\n if (data.month !== undefined) {\n // YYYY-MM\n rtn += '-' + twoDigit(data.month);\n if (data.day !== undefined) {\n // YYYY-MM-DD\n rtn += '-' + twoDigit(data.day);\n if (data.hour !== undefined) {\n // YYYY-MM-DDTHH:mm:SS\n rtn += `T${twoDigit(data.hour)}:${twoDigit(data.minute)}:${twoDigit(data.second)}`;\n if (data.millisecond > 0) {\n // YYYY-MM-DDTHH:mm:SS.SSS\n rtn += '.' + threeDigit(data.millisecond);\n }\n if (data.tzOffset === undefined) {\n // YYYY-MM-DDTHH:mm:SSZ\n rtn += 'Z';\n }\n else {\n // YYYY-MM-DDTHH:mm:SS+/-HH:mm\n rtn += (data.tzOffset > 0 ? '+' : '-') + twoDigit(Math.floor(Math.abs(data.tzOffset / 60))) + ':' + twoDigit(data.tzOffset % 60);\n }\n }\n }\n }\n }\n else if (data.hour !== undefined) {\n // HH:mm\n rtn = twoDigit(data.hour) + ':' + twoDigit(data.minute);\n if (data.second !== undefined) {\n // HH:mm:SS\n rtn += ':' + twoDigit(data.second);\n if (data.millisecond !== undefined) {\n // HH:mm:SS.SSS\n rtn += '.' + threeDigit(data.millisecond);\n }\n }\n }\n return rtn;\n};\n/**\n * Use to convert a string of comma separated strings or\n * an array of strings, and clean up any user input\n */\nconst convertToArrayOfStrings = (input, type) => {\n if (input == null) {\n return undefined;\n }\n if (typeof input === 'string') {\n // convert the string to an array of strings\n // auto remove any [] characters\n input = input.replace(/\\[|\\]/g, '').split(',');\n }\n let values;\n if (Array.isArray(input)) {\n // trim up each string value\n values = input.map(val => val.toString().trim());\n }\n if (values === undefined || values.length === 0) {\n console.warn(`Invalid \"${type}Names\". Must be an array of strings, or a comma separated string.`);\n }\n return values;\n};\n/**\n * Use to convert a string of comma separated numbers or\n * an array of numbers, and clean up any user input\n */\nconst convertToArrayOfNumbers = (input, type) => {\n if (typeof input === 'string') {\n // convert the string to an array of strings\n // auto remove any whitespace and [] characters\n input = input.replace(/\\[|\\]|\\s/g, '').split(',');\n }\n let values;\n if (Array.isArray(input)) {\n // ensure each value is an actual number in the returned array\n values = input\n .map((num) => parseInt(num, 10))\n .filter(isFinite);\n }\n else {\n values = [input];\n }\n if (values.length === 0) {\n console.warn(`Invalid \"${type}Values\". Must be an array of numbers, or a comma separated string of numbers.`);\n }\n return values;\n};\nconst twoDigit = (val) => {\n return ('0' + (val !== undefined ? Math.abs(val) : '0')).slice(-2);\n};\nconst threeDigit = (val) => {\n return ('00' + (val !== undefined ? Math.abs(val) : '0')).slice(-3);\n};\nconst fourDigit = (val) => {\n return ('000' + (val !== undefined ? Math.abs(val) : '0')).slice(-4);\n};\nconst FORMAT_YYYY = 'YYYY';\nconst FORMAT_YY = 'YY';\nconst FORMAT_MMMM = 'MMMM';\nconst FORMAT_MMM = 'MMM';\nconst FORMAT_MM = 'MM';\nconst FORMAT_M = 'M';\nconst FORMAT_DDDD = 'DDDD';\nconst FORMAT_DDD = 'DDD';\nconst FORMAT_DD = 'DD';\nconst FORMAT_D = 'D';\nconst FORMAT_HH = 'HH';\nconst FORMAT_H = 'H';\nconst FORMAT_hh = 'hh';\nconst FORMAT_h = 'h';\nconst FORMAT_mm = 'mm';\nconst FORMAT_m = 'm';\nconst FORMAT_ss = 'ss';\nconst FORMAT_s = 's';\nconst FORMAT_A = 'A';\nconst FORMAT_a = 'a';\nconst FORMAT_KEYS = [\n { f: FORMAT_YYYY, k: 'year' },\n { f: FORMAT_MMMM, k: 'month' },\n { f: FORMAT_DDDD, k: 'day' },\n { f: FORMAT_MMM, k: 'month' },\n { f: FORMAT_DDD, k: 'day' },\n { f: FORMAT_YY, k: 'year' },\n { f: FORMAT_MM, k: 'month' },\n { f: FORMAT_DD, k: 'day' },\n { f: FORMAT_HH, k: 'hour' },\n { f: FORMAT_hh, k: 'hour' },\n { f: FORMAT_mm, k: 'minute' },\n { f: FORMAT_ss, k: 'second' },\n { f: FORMAT_M, k: 'month' },\n { f: FORMAT_D, k: 'day' },\n { f: FORMAT_H, k: 'hour' },\n { f: FORMAT_h, k: 'hour' },\n { f: FORMAT_m, k: 'minute' },\n { f: FORMAT_s, k: 'second' },\n { f: FORMAT_A, k: 'ampm' },\n { f: FORMAT_a, k: 'ampm' },\n];\nconst DAY_NAMES = [\n 'Sunday',\n 'Monday',\n 'Tuesday',\n 'Wednesday',\n 'Thursday',\n 'Friday',\n 'Saturday',\n];\nconst DAY_SHORT_NAMES = [\n 'Sun',\n 'Mon',\n 'Tue',\n 'Wed',\n 'Thu',\n 'Fri',\n 'Sat',\n];\nconst MONTH_NAMES = [\n 'January',\n 'February',\n 'March',\n 'April',\n 'May',\n 'June',\n 'July',\n 'August',\n 'September',\n 'October',\n 'November',\n 'December',\n];\nconst MONTH_SHORT_NAMES = [\n 'Jan',\n 'Feb',\n 'Mar',\n 'Apr',\n 'May',\n 'Jun',\n 'Jul',\n 'Aug',\n 'Sep',\n 'Oct',\n 'Nov',\n 'Dec',\n];\nconst VALID_AMPM_PREFIX = [\n FORMAT_hh, FORMAT_h, FORMAT_mm, FORMAT_m, FORMAT_ss, FORMAT_s\n];\n\nconst datetimeIosCss = \":host{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;min-width:16px;min-height:1.2em;font-family:var(--ion-font-family, inherit);text-overflow:ellipsis;white-space:nowrap;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}:host(.datetime-placeholder){color:var(--placeholder-color)}:host(.datetime-disabled){opacity:0.3;pointer-events:none}:host(.datetime-readonly){pointer-events:none}button{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}[dir=rtl] button,:host-context([dir=rtl]) button{left:unset;right:unset;right:0}button::-moz-focus-inner{border:0}.datetime-text{font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;text-decoration:inherit;text-indent:inherit;text-overflow:inherit;text-transform:inherit;text-align:inherit;white-space:inherit;color:inherit;-ms-flex:1;flex:1;min-height:inherit;direction:ltr;overflow:inherit}[dir=rtl] .datetime-text,:host-context([dir=rtl]) .datetime-text{direction:rtl}:host{--placeholder-color:var(--ion-color-step-400, #999999);--padding-top:10px;--padding-end:10px;--padding-bottom:10px;--padding-start:20px}\";\n\nconst datetimeMdCss = \":host{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;min-width:16px;min-height:1.2em;font-family:var(--ion-font-family, inherit);text-overflow:ellipsis;white-space:nowrap;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}:host(.datetime-placeholder){color:var(--placeholder-color)}:host(.datetime-disabled){opacity:0.3;pointer-events:none}:host(.datetime-readonly){pointer-events:none}button{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}[dir=rtl] button,:host-context([dir=rtl]) button{left:unset;right:unset;right:0}button::-moz-focus-inner{border:0}.datetime-text{font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;text-decoration:inherit;text-indent:inherit;text-overflow:inherit;text-transform:inherit;text-align:inherit;white-space:inherit;color:inherit;-ms-flex:1;flex:1;min-height:inherit;direction:ltr;overflow:inherit}[dir=rtl] .datetime-text,:host-context([dir=rtl]) .datetime-text{direction:rtl}:host{--placeholder-color:var(--ion-placeholder-color, var(--ion-color-step-400, #999999));--padding-top:10px;--padding-end:0;--padding-bottom:11px;--padding-start:16px}\";\n\nconst Datetime = class {\n constructor(hostRef) {\n registerInstance(this, hostRef);\n this.ionCancel = createEvent(this, \"ionCancel\", 7);\n this.ionChange = createEvent(this, \"ionChange\", 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-dt-${datetimeIds++}`;\n this.locale = {};\n this.datetimeMin = {};\n this.datetimeMax = {};\n this.datetimeValue = {};\n this.isExpanded = false;\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 user cannot interact with the datetime.\n */\n this.disabled = false;\n /**\n * If `true`, the datetime appears normal but is not interactive.\n */\n this.readonly = false;\n /**\n * The display format of the date and time as text that shows\n * within the item. When the `pickerFormat` input is not used, then the\n * `displayFormat` is used for both display the formatted text, and determining\n * the datetime picker's columns. See the `pickerFormat` input description for\n * more info. Defaults to `MMM D, YYYY`.\n */\n this.displayFormat = 'MMM D, YYYY';\n /**\n * The text to display on the picker's cancel button.\n */\n this.cancelText = 'Cancel';\n /**\n * The text to display on the picker's \"Done\" button.\n */\n this.doneText = 'Done';\n this.onClick = () => {\n this.setFocus();\n this.open();\n };\n this.onFocus = () => {\n this.ionFocus.emit();\n };\n this.onBlur = () => {\n this.ionBlur.emit();\n };\n }\n disabledChanged() {\n this.emitStyle();\n }\n /**\n * Update the datetime value when the value changes\n */\n valueChanged() {\n this.updateDatetimeValue(this.value);\n this.emitStyle();\n this.ionChange.emit({\n value: this.value\n });\n }\n componentWillLoad() {\n // first see if locale names were provided in the inputs\n // then check to see if they're in the config\n // if neither were provided then it will use default English names\n this.locale = {\n // this.locale[type] = convertToArrayOfStrings((this[type] ? this[type] : this.config.get(type), type);\n monthNames: convertToArrayOfStrings(this.monthNames, 'monthNames'),\n monthShortNames: convertToArrayOfStrings(this.monthShortNames, 'monthShortNames'),\n dayNames: convertToArrayOfStrings(this.dayNames, 'dayNames'),\n dayShortNames: convertToArrayOfStrings(this.dayShortNames, 'dayShortNames')\n };\n this.updateDatetimeValue(this.value);\n this.emitStyle();\n }\n /**\n * Opens the datetime overlay.\n */\n async open() {\n if (this.disabled || this.isExpanded) {\n return;\n }\n const pickerOptions = this.generatePickerOptions();\n const picker = await pickerController.create(pickerOptions);\n this.isExpanded = true;\n picker.onDidDismiss().then(() => {\n this.isExpanded = false;\n this.setFocus();\n });\n addEventListener(picker, 'ionPickerColChange', async (event) => {\n const data = event.detail;\n const colSelectedIndex = data.selectedIndex;\n const colOptions = data.options;\n const changeData = {};\n changeData[data.name] = {\n value: colOptions[colSelectedIndex].value\n };\n if (data.name !== 'ampm' && this.datetimeValue.ampm !== undefined) {\n changeData['ampm'] = {\n value: this.datetimeValue.ampm\n };\n }\n this.updateDatetimeValue(changeData);\n picker.columns = this.generateColumns();\n });\n await picker.present();\n }\n emitStyle() {\n this.ionStyle.emit({\n 'interactive': true,\n 'datetime': true,\n 'has-placeholder': this.placeholder != null,\n 'has-value': this.hasValue(),\n 'interactive-disabled': this.disabled,\n });\n }\n updateDatetimeValue(value) {\n updateDate(this.datetimeValue, value, this.displayTimezone);\n }\n generatePickerOptions() {\n const mode = getIonMode(this);\n this.locale = {\n monthNames: convertToArrayOfStrings(this.monthNames, 'monthNames'),\n monthShortNames: convertToArrayOfStrings(this.monthShortNames, 'monthShortNames'),\n dayNames: convertToArrayOfStrings(this.dayNames, 'dayNames'),\n dayShortNames: convertToArrayOfStrings(this.dayShortNames, 'dayShortNames')\n };\n const pickerOptions = Object.assign(Object.assign({ mode }, this.pickerOptions), { columns: this.generateColumns() });\n // If the user has not passed in picker buttons,\n // add a cancel and ok button to the picker\n const buttons = pickerOptions.buttons;\n if (!buttons || buttons.length === 0) {\n pickerOptions.buttons = [\n {\n text: this.cancelText,\n role: 'cancel',\n handler: () => {\n this.updateDatetimeValue(this.value);\n this.ionCancel.emit();\n }\n },\n {\n text: this.doneText,\n handler: (data) => {\n this.updateDatetimeValue(data);\n /**\n * Prevent convertDataToISO from doing any\n * kind of transformation based on timezone\n * This cancels out any change it attempts to make\n *\n * Important: Take the timezone offset based on\n * the date that is currently selected, otherwise\n * there can be 1 hr difference when dealing w/ DST\n */\n const date = new Date(convertDataToISO(this.datetimeValue));\n // If a custom display timezone is provided, use that tzOffset value instead\n this.datetimeValue.tzOffset = (this.displayTimezone !== undefined && this.displayTimezone.length > 0)\n ? ((getTimezoneOffset(date, this.displayTimezone)) / 1000 / 60) * -1\n : date.getTimezoneOffset() * -1;\n this.value = convertDataToISO(this.datetimeValue);\n }\n }\n ];\n }\n return pickerOptions;\n }\n generateColumns() {\n // if a picker format wasn't provided, then fallback\n // to use the display format\n let template = this.pickerFormat || this.displayFormat || DEFAULT_FORMAT;\n if (template.length === 0) {\n return [];\n }\n // make sure we've got up to date sizing information\n this.calcMinMax();\n // does not support selecting by day name\n // automatically remove any day name formats\n template = template.replace('DDDD', '{~}').replace('DDD', '{~}');\n if (template.indexOf('D') === -1) {\n // there is not a day in the template\n // replace the day name with a numeric one if it exists\n template = template.replace('{~}', 'D');\n }\n // make sure no day name replacer is left in the string\n template = template.replace(/{~}/g, '');\n // parse apart the given template into an array of \"formats\"\n const columns = parseTemplate(template).map((format) => {\n // loop through each format in the template\n // create a new picker column to build up with data\n const key = convertFormatToKey(format);\n let values;\n // check if they have exact values to use for this date part\n // otherwise use the default date part values\n const self = this;\n values = self[key + 'Values']\n ? convertToArrayOfNumbers(self[key + 'Values'], key)\n : dateValueRange(format, this.datetimeMin, this.datetimeMax);\n const colOptions = values.map(val => {\n return {\n value: val,\n text: renderTextFormat(format, val, undefined, this.locale),\n };\n });\n // cool, we've loaded up the columns with options\n // preselect the option for this column\n const optValue = getDateValue(this.datetimeValue, format);\n const selectedIndex = colOptions.findIndex(opt => opt.value === optValue);\n return {\n name: key,\n selectedIndex: selectedIndex >= 0 ? selectedIndex : 0,\n options: colOptions\n };\n });\n // Normalize min/max\n const min = this.datetimeMin;\n const max = this.datetimeMax;\n ['month', 'day', 'hour', 'minute']\n .filter(name => !columns.find(column => column.name === name))\n .forEach(name => {\n min[name] = 0;\n max[name] = 0;\n });\n return this.validateColumns(divyColumns(columns));\n }\n validateColumns(columns) {\n const today = new Date();\n const minCompareVal = dateDataSortValue(this.datetimeMin);\n const maxCompareVal = dateDataSortValue(this.datetimeMax);\n const yearCol = columns.find(c => c.name === 'year');\n let selectedYear = today.getFullYear();\n if (yearCol) {\n // default to the first value if the current year doesn't exist in the options\n if (!yearCol.options.find(col => col.value === today.getFullYear())) {\n selectedYear = yearCol.options[0].value;\n }\n const selectedIndex = yearCol.selectedIndex;\n if (selectedIndex !== undefined) {\n const yearOpt = yearCol.options[selectedIndex];\n if (yearOpt) {\n // they have a selected year value\n selectedYear = yearOpt.value;\n }\n }\n }\n const selectedMonth = this.validateColumn(columns, 'month', 1, minCompareVal, maxCompareVal, [selectedYear, 0, 0, 0, 0], [selectedYear, 12, 31, 23, 59]);\n const numDaysInMonth = daysInMonth(selectedMonth, selectedYear);\n const selectedDay = this.validateColumn(columns, 'day', 2, minCompareVal, maxCompareVal, [selectedYear, selectedMonth, 0, 0, 0], [selectedYear, selectedMonth, numDaysInMonth, 23, 59]);\n const selectedHour = this.validateColumn(columns, 'hour', 3, minCompareVal, maxCompareVal, [selectedYear, selectedMonth, selectedDay, 0, 0], [selectedYear, selectedMonth, selectedDay, 23, 59]);\n this.validateColumn(columns, 'minute', 4, minCompareVal, maxCompareVal, [selectedYear, selectedMonth, selectedDay, selectedHour, 0], [selectedYear, selectedMonth, selectedDay, selectedHour, 59]);\n return columns;\n }\n calcMinMax() {\n const todaysYear = new Date().getFullYear();\n if (this.yearValues !== undefined) {\n const years = convertToArrayOfNumbers(this.yearValues, 'year');\n if (this.min === undefined) {\n this.min = Math.min(...years).toString();\n }\n if (this.max === undefined) {\n this.max = Math.max(...years).toString();\n }\n }\n else {\n if (this.min === undefined) {\n this.min = (todaysYear - 100).toString();\n }\n if (this.max === undefined) {\n this.max = todaysYear.toString();\n }\n }\n const min = this.datetimeMin = parseDate(this.min);\n const max = this.datetimeMax = parseDate(this.max);\n min.year = min.year || todaysYear;\n max.year = max.year || todaysYear;\n min.month = min.month || 1;\n max.month = max.month || 12;\n min.day = min.day || 1;\n max.day = max.day || 31;\n min.hour = min.hour || 0;\n max.hour = max.hour === undefined ? 23 : max.hour;\n min.minute = min.minute || 0;\n max.minute = max.minute === undefined ? 59 : max.minute;\n min.second = min.second || 0;\n max.second = max.second === undefined ? 59 : max.second;\n // Ensure min/max constraints\n if (min.year > max.year) {\n console.error('min.year > max.year');\n min.year = max.year - 100;\n }\n if (min.year === max.year) {\n if (min.month > max.month) {\n console.error('min.month > max.month');\n min.month = 1;\n }\n else if (min.month === max.month && min.day > max.day) {\n console.error('min.day > max.day');\n min.day = 1;\n }\n }\n }\n validateColumn(columns, name, index, min, max, lowerBounds, upperBounds) {\n const column = columns.find(c => c.name === name);\n if (!column) {\n return 0;\n }\n const lb = lowerBounds.slice();\n const ub = upperBounds.slice();\n const options = column.options;\n let indexMin = options.length - 1;\n let indexMax = 0;\n for (let i = 0; i < options.length; i++) {\n const opts = options[i];\n const value = opts.value;\n lb[index] = opts.value;\n ub[index] = opts.value;\n const disabled = opts.disabled = (value < lowerBounds[index] ||\n value > upperBounds[index] ||\n dateSortValue(ub[0], ub[1], ub[2], ub[3], ub[4]) < min ||\n dateSortValue(lb[0], lb[1], lb[2], lb[3], lb[4]) > max);\n if (!disabled) {\n indexMin = Math.min(indexMin, i);\n indexMax = Math.max(indexMax, i);\n }\n }\n const selectedIndex = column.selectedIndex = clamp(indexMin, column.selectedIndex, indexMax);\n const opt = column.options[selectedIndex];\n if (opt) {\n return opt.value;\n }\n return 0;\n }\n get text() {\n // create the text of the formatted data\n const template = this.displayFormat || this.pickerFormat || DEFAULT_FORMAT;\n if (this.value === undefined ||\n this.value === null ||\n this.value.length === 0) {\n return;\n }\n return renderDatetime(template, this.datetimeValue, this.locale);\n }\n hasValue() {\n return this.text !== undefined;\n }\n setFocus() {\n if (this.buttonEl) {\n this.buttonEl.focus();\n }\n }\n render() {\n const { inputId, text, disabled, readonly, isExpanded, el, placeholder } = this;\n const mode = getIonMode(this);\n const labelId = inputId + '-lbl';\n const label = findItemLabel(el);\n const addPlaceholderClass = (text === undefined && placeholder != null) ? true : false;\n // If selected text has been passed in, use that first\n // otherwise use the placeholder\n const datetimeText = text === undefined\n ? (placeholder != null ? placeholder : '')\n : text;\n const datetimeTextPart = text === undefined\n ? (placeholder != null ? 'placeholder' : undefined)\n : 'text';\n if (label) {\n label.id = labelId;\n }\n renderHiddenInput(true, el, this.name, this.value, this.disabled);\n return (h(Host, { onClick: this.onClick, \"aria-disabled\": disabled ? 'true' : null, \"aria-expanded\": `${isExpanded}`, \"aria-haspopup\": \"true\", \"aria-labelledby\": labelId, class: {\n [mode]: true,\n 'datetime-disabled': disabled,\n 'datetime-readonly': readonly,\n 'datetime-placeholder': addPlaceholderClass,\n 'in-item': hostContext('ion-item', el)\n } }, h(\"div\", { class: \"datetime-text\", part: datetimeTextPart }, datetimeText), h(\"button\", { type: \"button\", onFocus: this.onFocus, onBlur: this.onBlur, disabled: this.disabled, ref: btnEl => this.buttonEl = btnEl })));\n }\n get el() { return getElement(this); }\n static get watchers() { return {\n \"disabled\": [\"disabledChanged\"],\n \"value\": [\"valueChanged\"]\n }; }\n};\nconst divyColumns = (columns) => {\n const columnsWidth = [];\n let col;\n let width;\n for (let i = 0; i < columns.length; i++) {\n col = columns[i];\n columnsWidth.push(0);\n for (const option of col.options) {\n width = option.text.length;\n if (width > columnsWidth[i]) {\n columnsWidth[i] = width;\n }\n }\n }\n if (columnsWidth.length === 2) {\n width = Math.max(columnsWidth[0], columnsWidth[1]);\n columns[0].align = 'right';\n columns[1].align = 'left';\n columns[0].optionsWidth = columns[1].optionsWidth = `${width * 17}px`;\n }\n else if (columnsWidth.length === 3) {\n width = Math.max(columnsWidth[0], columnsWidth[2]);\n columns[0].align = 'right';\n columns[1].columnWidth = `${columnsWidth[1] * 17}px`;\n columns[0].optionsWidth = columns[2].optionsWidth = `${width * 17}px`;\n columns[2].align = 'left';\n }\n return columns;\n};\nconst DEFAULT_FORMAT = 'MMM D, YYYY';\nlet datetimeIds = 0;\nDatetime.style = {\n ios: datetimeIosCss,\n md: datetimeMdCss\n};\n\n/**\n * iOS Picker Enter Animation\n */\nconst iosEnterAnimation = (baseEl) => {\n const baseAnimation = createAnimation();\n const backdropAnimation = createAnimation();\n const wrapperAnimation = createAnimation();\n backdropAnimation\n .addElement(baseEl.querySelector('ion-backdrop'))\n .fromTo('opacity', 0.01, 'var(--backdrop-opacity)')\n .beforeStyles({\n 'pointer-events': 'none'\n })\n .afterClearStyles(['pointer-events']);\n wrapperAnimation\n .addElement(baseEl.querySelector('.picker-wrapper'))\n .fromTo('transform', 'translateY(100%)', 'translateY(0%)');\n return baseAnimation\n .addElement(baseEl)\n .easing('cubic-bezier(.36,.66,.04,1)')\n .duration(400)\n .addAnimation([backdropAnimation, wrapperAnimation]);\n};\n\n/**\n * iOS Picker Leave Animation\n */\nconst iosLeaveAnimation = (baseEl) => {\n const baseAnimation = createAnimation();\n const backdropAnimation = createAnimation();\n const wrapperAnimation = createAnimation();\n backdropAnimation\n .addElement(baseEl.querySelector('ion-backdrop'))\n .fromTo('opacity', 'var(--backdrop-opacity)', 0.01);\n wrapperAnimation\n .addElement(baseEl.querySelector('.picker-wrapper'))\n .fromTo('transform', 'translateY(0%)', 'translateY(100%)');\n return baseAnimation\n .addElement(baseEl)\n .easing('cubic-bezier(.36,.66,.04,1)')\n .duration(400)\n .addAnimation([backdropAnimation, wrapperAnimation]);\n};\n\nconst pickerIosCss = \".sc-ion-picker-ios-h{--border-radius:0;--border-style:solid;--min-width:auto;--width:100%;--max-width:500px;--min-height:auto;--max-height:auto;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;left:0;top:0;display:block;position:absolute;width:100%;height:100%;outline:none;font-family:var(--ion-font-family, inherit);contain:strict;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:1001}[dir=rtl].sc-ion-picker-ios-h,[dir=rtl] .sc-ion-picker-ios-h{left:unset;right:unset;right:0}.overlay-hidden.sc-ion-picker-ios-h{display:none}.picker-wrapper.sc-ion-picker-ios{border-radius:var(--border-radius);left:0;right:0;bottom:0;margin-left:auto;margin-right:auto;margin-top:auto;margin-bottom:auto;-webkit-transform:translate3d(0, 100%, 0);transform:translate3d(0, 100%, 0);display:-ms-flexbox;display:flex;position:absolute;-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);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);background:var(--background);contain:strict;overflow:hidden;z-index:10}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){.picker-wrapper.sc-ion-picker-ios{margin-left:unset;margin-right:unset;-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto}}.picker-toolbar.sc-ion-picker-ios{width:100%;background:transparent;contain:strict;z-index:1}.picker-button.sc-ion-picker-ios{border:0;font-family:inherit}.picker-button.sc-ion-picker-ios:active,.picker-button.sc-ion-picker-ios:focus{outline:none}.picker-columns.sc-ion-picker-ios{display:-ms-flexbox;display:flex;position:relative;-ms-flex-pack:center;justify-content:center;margin-bottom:var(--ion-safe-area-bottom, 0);contain:strict;direction:ltr;overflow:hidden}.picker-above-highlight.sc-ion-picker-ios,.picker-below-highlight.sc-ion-picker-ios{display:none;pointer-events:none}.sc-ion-picker-ios-h{--background:var(--ion-background-color, #fff);--border-width:1px 0 0;--border-color:var(--ion-item-border-color, var(--ion-border-color, var(--ion-color-step-250, #c8c7cc)));--height:260px;--backdrop-opacity:var(--ion-backdrop-opacity, 0.26);color:var(--ion-item-color, var(--ion-text-color, #000))}.picker-toolbar.sc-ion-picker-ios{display:-ms-flexbox;display:flex;height:44px;border-bottom:0.55px solid var(--border-color)}.picker-toolbar-button.sc-ion-picker-ios{-ms-flex:1;flex:1;text-align:end}.picker-toolbar-button.sc-ion-picker-ios:last-child .picker-button.sc-ion-picker-ios{font-weight:600}.picker-toolbar-button.sc-ion-picker-ios:first-child{font-weight:normal;text-align:start}.picker-button.sc-ion-picker-ios,.picker-button.ion-activated.sc-ion-picker-ios{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;padding-left:1em;padding-right:1em;padding-top:0;padding-bottom:0;height:44px;background:transparent;color:var(--ion-color-primary, #3880ff);font-size:16px}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){.picker-button.sc-ion-picker-ios,.picker-button.ion-activated.sc-ion-picker-ios{padding-left:unset;padding-right:unset;-webkit-padding-start:1em;padding-inline-start:1em;-webkit-padding-end:1em;padding-inline-end:1em}}.picker-columns.sc-ion-picker-ios{height:215px;-webkit-perspective:1000px;perspective:1000px}.picker-above-highlight.sc-ion-picker-ios{left:0;top:0;-webkit-transform:translate3d(0, 0, 90px);transform:translate3d(0, 0, 90px);display:block;position:absolute;width:100%;height:81px;border-bottom:1px solid var(--border-color);background:-webkit-gradient(linear, left top, left bottom, color-stop(20%, var(--background, var(--ion-background-color, #fff))), to(rgba(var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255)), 0.8)));background:linear-gradient(to bottom, var(--background, var(--ion-background-color, #fff)) 20%, rgba(var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255)), 0.8) 100%);z-index:10}[dir=rtl].sc-ion-picker-ios .picker-above-highlight.sc-ion-picker-ios,[dir=rtl].sc-ion-picker-ios-h .picker-above-highlight.sc-ion-picker-ios,[dir=rtl] .sc-ion-picker-ios-h .picker-above-highlight.sc-ion-picker-ios{left:unset;right:unset;right:0}.picker-below-highlight.sc-ion-picker-ios{left:0;top:115px;-webkit-transform:translate3d(0, 0, 90px);transform:translate3d(0, 0, 90px);display:block;position:absolute;width:100%;height:119px;border-top:1px solid var(--border-color);background:-webkit-gradient(linear, left bottom, left top, color-stop(30%, var(--background, var(--ion-background-color, #fff))), to(rgba(var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255)), 0.8)));background:linear-gradient(to top, var(--background, var(--ion-background-color, #fff)) 30%, rgba(var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255)), 0.8) 100%);z-index:11}[dir=rtl].sc-ion-picker-ios .picker-below-highlight.sc-ion-picker-ios,[dir=rtl].sc-ion-picker-ios-h .picker-below-highlight.sc-ion-picker-ios,[dir=rtl] .sc-ion-picker-ios-h .picker-below-highlight.sc-ion-picker-ios{left:unset;right:unset;right:0}\";\n\nconst pickerMdCss = \".sc-ion-picker-md-h{--border-radius:0;--border-style:solid;--min-width:auto;--width:100%;--max-width:500px;--min-height:auto;--max-height:auto;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;left:0;top:0;display:block;position:absolute;width:100%;height:100%;outline:none;font-family:var(--ion-font-family, inherit);contain:strict;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:1001}[dir=rtl].sc-ion-picker-md-h,[dir=rtl] .sc-ion-picker-md-h{left:unset;right:unset;right:0}.overlay-hidden.sc-ion-picker-md-h{display:none}.picker-wrapper.sc-ion-picker-md{border-radius:var(--border-radius);left:0;right:0;bottom:0;margin-left:auto;margin-right:auto;margin-top:auto;margin-bottom:auto;-webkit-transform:translate3d(0, 100%, 0);transform:translate3d(0, 100%, 0);display:-ms-flexbox;display:flex;position:absolute;-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);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);background:var(--background);contain:strict;overflow:hidden;z-index:10}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){.picker-wrapper.sc-ion-picker-md{margin-left:unset;margin-right:unset;-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto}}.picker-toolbar.sc-ion-picker-md{width:100%;background:transparent;contain:strict;z-index:1}.picker-button.sc-ion-picker-md{border:0;font-family:inherit}.picker-button.sc-ion-picker-md:active,.picker-button.sc-ion-picker-md:focus{outline:none}.picker-columns.sc-ion-picker-md{display:-ms-flexbox;display:flex;position:relative;-ms-flex-pack:center;justify-content:center;margin-bottom:var(--ion-safe-area-bottom, 0);contain:strict;direction:ltr;overflow:hidden}.picker-above-highlight.sc-ion-picker-md,.picker-below-highlight.sc-ion-picker-md{display:none;pointer-events:none}.sc-ion-picker-md-h{--background:var(--ion-background-color, #fff);--border-width:0.55px 0 0;--border-color:var(--ion-item-border-color, var(--ion-border-color, var(--ion-color-step-150, rgba(0, 0, 0, 0.13))));--height:260px;--backdrop-opacity:var(--ion-backdrop-opacity, 0.26);color:var(--ion-item-color, var(--ion-text-color, #000))}.picker-toolbar.sc-ion-picker-md{display:-ms-flexbox;display:flex;-ms-flex-pack:end;justify-content:flex-end;height:44px}.picker-button.sc-ion-picker-md,.picker-button.ion-activated.sc-ion-picker-md{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;padding-left:1.1em;padding-right:1.1em;padding-top:0;padding-bottom:0;height:44px;background:transparent;color:var(--ion-color-primary, #3880ff);font-size:14px;font-weight:500;text-transform:uppercase;-webkit-box-shadow:none;box-shadow:none}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){.picker-button.sc-ion-picker-md,.picker-button.ion-activated.sc-ion-picker-md{padding-left:unset;padding-right:unset;-webkit-padding-start:1.1em;padding-inline-start:1.1em;-webkit-padding-end:1.1em;padding-inline-end:1.1em}}.picker-columns.sc-ion-picker-md{height:216px;-webkit-perspective:1800px;perspective:1800px}.picker-above-highlight.sc-ion-picker-md{left:0;top:0;-webkit-transform:translate3d(0, 0, 90px);transform:translate3d(0, 0, 90px);position:absolute;width:100%;height:81px;border-bottom:1px solid var(--ion-item-border-color, var(--ion-border-color, var(--ion-color-step-150, rgba(0, 0, 0, 0.13))));background:-webkit-gradient(linear, left top, left bottom, color-stop(20%, var(--ion-background-color, #fff)), to(rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.8)));background:linear-gradient(to bottom, var(--ion-background-color, #fff) 20%, rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.8) 100%);z-index:10}[dir=rtl].sc-ion-picker-md .picker-above-highlight.sc-ion-picker-md,[dir=rtl].sc-ion-picker-md-h .picker-above-highlight.sc-ion-picker-md,[dir=rtl] .sc-ion-picker-md-h .picker-above-highlight.sc-ion-picker-md{left:unset;right:unset;right:0}.picker-below-highlight.sc-ion-picker-md{left:0;top:115px;-webkit-transform:translate3d(0, 0, 90px);transform:translate3d(0, 0, 90px);position:absolute;width:100%;height:119px;border-top:1px solid var(--ion-item-border-color, var(--ion-border-color, var(--ion-color-step-150, rgba(0, 0, 0, 0.13))));background:-webkit-gradient(linear, left bottom, left top, color-stop(30%, var(--ion-background-color, #fff)), to(rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.8)));background:linear-gradient(to top, var(--ion-background-color, #fff) 30%, rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.8) 100%);z-index:11}[dir=rtl].sc-ion-picker-md .picker-below-highlight.sc-ion-picker-md,[dir=rtl].sc-ion-picker-md-h .picker-below-highlight.sc-ion-picker-md,[dir=rtl] .sc-ion-picker-md-h .picker-below-highlight.sc-ion-picker-md{left:unset;right:unset;right:0}\";\n\nconst Picker = class {\n constructor(hostRef) {\n registerInstance(this, hostRef);\n this.didPresent = createEvent(this, \"ionPickerDidPresent\", 7);\n this.willPresent = createEvent(this, \"ionPickerWillPresent\", 7);\n this.willDismiss = createEvent(this, \"ionPickerWillDismiss\", 7);\n this.didDismiss = createEvent(this, \"ionPickerDidDismiss\", 7);\n this.presented = false;\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 displayed at the top of the picker.\n */\n this.buttons = [];\n /**\n * Array of columns to be displayed in the picker.\n */\n this.columns = [];\n /**\n * Number of milliseconds to wait before dismissing the picker.\n */\n this.duration = 0;\n /**\n * If `true`, a backdrop will be displayed behind the picker.\n */\n this.showBackdrop = true;\n /**\n * If `true`, the picker will be dismissed when the backdrop is clicked.\n */\n this.backdropDismiss = true;\n /**\n * If `true`, the picker 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.buttons.find(b => b.role === 'cancel');\n this.callButtonHandler(cancelButton);\n }\n };\n }\n connectedCallback() {\n prepareOverlay(this.el);\n }\n /**\n * Present the picker overlay after it has been created.\n */\n async present() {\n await present(this, 'pickerEnter', iosEnterAnimation, iosEnterAnimation, undefined);\n if (this.duration > 0) {\n this.durationTimeout = setTimeout(() => this.dismiss(), this.duration);\n }\n }\n /**\n * Dismiss the picker 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 picker.\n * This can be useful in a button handler for determining which button was\n * clicked to dismiss the picker.\n * Some examples include: ``\"cancel\"`, `\"destructive\"`, \"selected\"`, and `\"backdrop\"`.\n */\n dismiss(data, role) {\n if (this.durationTimeout) {\n clearTimeout(this.durationTimeout);\n }\n return dismiss(this, data, role, 'pickerLeave', iosLeaveAnimation, iosLeaveAnimation);\n }\n /**\n * Returns a promise that resolves when the picker did dismiss.\n */\n onDidDismiss() {\n return eventMethod(this.el, 'ionPickerDidDismiss');\n }\n /**\n * Returns a promise that resolves when the picker will dismiss.\n */\n onWillDismiss() {\n return eventMethod(this.el, 'ionPickerWillDismiss');\n }\n /**\n * Get the column that matches the specified name.\n *\n * @param name The name of the column.\n */\n getColumn(name) {\n return Promise.resolve(this.columns.find(column => column.name === name));\n }\n async buttonClick(button) {\n const role = button.role;\n if (isCancel(role)) {\n return this.dismiss(undefined, role);\n }\n const shouldDismiss = await this.callButtonHandler(button);\n if (shouldDismiss) {\n return this.dismiss(this.getSelected(), button.role);\n }\n return Promise.resolve();\n }\n async callButtonHandler(button) {\n if (button) {\n // a handler has been provided, execute it\n // pass the handler the values from the inputs\n const rtn = await safeCall(button.handler, this.getSelected());\n if (rtn === false) {\n // if the return value of the handler is false then do not dismiss\n return false;\n }\n }\n return true;\n }\n getSelected() {\n const selected = {};\n this.columns.forEach((col, index) => {\n const selectedColumn = col.selectedIndex !== undefined\n ? col.options[col.selectedIndex]\n : undefined;\n selected[col.name] = {\n text: selectedColumn ? selectedColumn.text : undefined,\n value: selectedColumn ? selectedColumn.value : undefined,\n columnIndex: index\n };\n });\n return selected;\n }\n render() {\n const mode = getIonMode(this);\n return (h(Host, { \"aria-modal\": \"true\", tabindex: \"-1\", class: Object.assign({ [mode]: true,\n // Used internally for styling\n [`picker-${mode}`]: true }, getClassMap(this.cssClass)), style: {\n zIndex: `${20000 + this.overlayIndex}`\n }, onIonBackdropTap: this.onBackdropTap, onIonPickerWillDismiss: this.dispatchCancelHandler }, h(\"ion-backdrop\", { visible: this.showBackdrop, tappable: this.backdropDismiss }), h(\"div\", { tabindex: \"0\" }), h(\"div\", { class: \"picker-wrapper ion-overlay-wrapper\", role: \"dialog\" }, h(\"div\", { class: \"picker-toolbar\" }, this.buttons.map(b => (h(\"div\", { class: buttonWrapperClass(b) }, h(\"button\", { type: \"button\", onClick: () => this.buttonClick(b), class: buttonClass(b) }, b.text))))), h(\"div\", { class: \"picker-columns\" }, h(\"div\", { class: \"picker-above-highlight\" }), this.presented && this.columns.map(c => h(\"ion-picker-column\", { col: c })), h(\"div\", { class: \"picker-below-highlight\" }))), h(\"div\", { tabindex: \"0\" })));\n }\n get el() { return getElement(this); }\n};\nconst buttonWrapperClass = (button) => {\n return {\n [`picker-toolbar-${button.role}`]: button.role !== undefined,\n 'picker-toolbar-button': true\n };\n};\nconst buttonClass = (button) => {\n return Object.assign({ 'picker-button': true, 'ion-activatable': true }, getClassMap(button.cssClass));\n};\nPicker.style = {\n ios: pickerIosCss,\n md: pickerMdCss\n};\n\nconst pickerColumnIosCss = \".picker-col{display:-ms-flexbox;display:flex;position:relative;-ms-flex:1;flex:1;-ms-flex-pack:center;justify-content:center;height:100%;-webkit-box-sizing:content-box;box-sizing:content-box;contain:content}.picker-opts{position:relative;-ms-flex:1;flex:1;max-width:100%}.picker-opt{left:0;top:0;display:block;position:absolute;width:100%;border:0;text-align:center;text-overflow:ellipsis;white-space:nowrap;contain:strict;overflow:hidden;will-change:transform}[dir=rtl] .picker-opt,:host-context([dir=rtl]) .picker-opt{left:unset;right:unset;right:0}.picker-opt.picker-opt-disabled{pointer-events:none}.picker-opt-disabled{opacity:0}.picker-opts-left{-ms-flex-pack:start;justify-content:flex-start}.picker-opts-right{-ms-flex-pack:end;justify-content:flex-end}.picker-opt:active,.picker-opt:focus{outline:none}.picker-prefix{position:relative;-ms-flex:1;flex:1;text-align:end;white-space:nowrap}.picker-suffix{position:relative;-ms-flex:1;flex:1;text-align:start;white-space:nowrap}.picker-col{padding-left:4px;padding-right:4px;padding-top:0;padding-bottom:0;-webkit-transform-style:preserve-3d;transform-style:preserve-3d}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){.picker-col{padding-left:unset;padding-right:unset;-webkit-padding-start:4px;padding-inline-start:4px;-webkit-padding-end:4px;padding-inline-end:4px}}.picker-prefix,.picker-suffix,.picker-opts{top:77px;-webkit-transform-style:preserve-3d;transform-style:preserve-3d;color:inherit;font-size:20px;line-height:42px;pointer-events:none}.picker-opt{padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;-webkit-transform-origin:center center;transform-origin:center center;height:46px;-webkit-transform-style:preserve-3d;transform-style:preserve-3d;-webkit-transition-timing-function:ease-out;transition-timing-function:ease-out;background:transparent;color:inherit;font-size:20px;line-height:42px;-webkit-backface-visibility:hidden;backface-visibility:hidden;pointer-events:auto}[dir=rtl] .picker-opt,:host-context([dir=rtl]) .picker-opt{-webkit-transform-origin:calc(100% - center) center;transform-origin:calc(100% - center) center}\";\n\nconst pickerColumnMdCss = \".picker-col{display:-ms-flexbox;display:flex;position:relative;-ms-flex:1;flex:1;-ms-flex-pack:center;justify-content:center;height:100%;-webkit-box-sizing:content-box;box-sizing:content-box;contain:content}.picker-opts{position:relative;-ms-flex:1;flex:1;max-width:100%}.picker-opt{left:0;top:0;display:block;position:absolute;width:100%;border:0;text-align:center;text-overflow:ellipsis;white-space:nowrap;contain:strict;overflow:hidden;will-change:transform}[dir=rtl] .picker-opt,:host-context([dir=rtl]) .picker-opt{left:unset;right:unset;right:0}.picker-opt.picker-opt-disabled{pointer-events:none}.picker-opt-disabled{opacity:0}.picker-opts-left{-ms-flex-pack:start;justify-content:flex-start}.picker-opts-right{-ms-flex-pack:end;justify-content:flex-end}.picker-opt:active,.picker-opt:focus{outline:none}.picker-prefix{position:relative;-ms-flex:1;flex:1;text-align:end;white-space:nowrap}.picker-suffix{position:relative;-ms-flex:1;flex:1;text-align:start;white-space:nowrap}.picker-col{padding-left:8px;padding-right:8px;padding-top:0;padding-bottom:0;-webkit-transform-style:preserve-3d;transform-style:preserve-3d}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){.picker-col{padding-left:unset;padding-right:unset;-webkit-padding-start:8px;padding-inline-start:8px;-webkit-padding-end:8px;padding-inline-end:8px}}.picker-prefix,.picker-suffix,.picker-opts{top:77px;-webkit-transform-style:preserve-3d;transform-style:preserve-3d;color:inherit;font-size:22px;line-height:42px;pointer-events:none}.picker-opt{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;height:43px;-webkit-transition-timing-function:ease-out;transition-timing-function:ease-out;background:transparent;color:inherit;font-size:22px;line-height:42px;-webkit-backface-visibility:hidden;backface-visibility:hidden;pointer-events:auto}.picker-prefix,.picker-suffix,.picker-opt.picker-opt-selected{color:var(--ion-color-primary, #3880ff)}\";\n\nconst PickerColumnCmp = class {\n constructor(hostRef) {\n registerInstance(this, hostRef);\n this.ionPickerColChange = createEvent(this, \"ionPickerColChange\", 7);\n this.optHeight = 0;\n this.rotateFactor = 0;\n this.scaleFactor = 1;\n this.velocity = 0;\n this.y = 0;\n this.noAnimate = true;\n }\n colChanged() {\n this.refresh();\n }\n async connectedCallback() {\n let pickerRotateFactor = 0;\n let pickerScaleFactor = 0.81;\n const mode = getIonMode(this);\n if (mode === 'ios') {\n pickerRotateFactor = -0.46;\n pickerScaleFactor = 1;\n }\n this.rotateFactor = pickerRotateFactor;\n this.scaleFactor = pickerScaleFactor;\n this.gesture = (await import('./index-f49d994d.js')).createGesture({\n el: this.el,\n gestureName: 'picker-swipe',\n gesturePriority: 100,\n threshold: 0,\n passive: false,\n onStart: ev => this.onStart(ev),\n onMove: ev => this.onMove(ev),\n onEnd: ev => this.onEnd(ev),\n });\n this.gesture.enable();\n this.tmrId = setTimeout(() => {\n this.noAnimate = false;\n this.refresh(true);\n }, 250);\n }\n componentDidLoad() {\n const colEl = this.optsEl;\n if (colEl) {\n // DOM READ\n // We perfom a DOM read over a rendered item, this needs to happen after the first render\n this.optHeight = (colEl.firstElementChild ? colEl.firstElementChild.clientHeight : 0);\n }\n this.refresh();\n }\n disconnectedCallback() {\n cancelAnimationFrame(this.rafId);\n clearTimeout(this.tmrId);\n if (this.gesture) {\n this.gesture.destroy();\n this.gesture = undefined;\n }\n }\n emitColChange() {\n this.ionPickerColChange.emit(this.col);\n }\n setSelected(selectedIndex, duration) {\n // if there is a selected index, then figure out it's y position\n // if there isn't a selected index, then just use the top y position\n const y = (selectedIndex > -1) ? -(selectedIndex * this.optHeight) : 0;\n this.velocity = 0;\n // set what y position we're at\n cancelAnimationFrame(this.rafId);\n this.update(y, duration, true);\n this.emitColChange();\n }\n update(y, duration, saveY) {\n if (!this.optsEl) {\n return;\n }\n // ensure we've got a good round number :)\n let translateY = 0;\n let translateZ = 0;\n const { col, rotateFactor } = this;\n const selectedIndex = col.selectedIndex = this.indexForY(-y);\n const durationStr = (duration === 0) ? '' : duration + 'ms';\n const scaleStr = `scale(${this.scaleFactor})`;\n const children = this.optsEl.children;\n for (let i = 0; i < children.length; i++) {\n const button = children[i];\n const opt = col.options[i];\n const optOffset = (i * this.optHeight) + y;\n let transform = '';\n if (rotateFactor !== 0) {\n const rotateX = optOffset * rotateFactor;\n if (Math.abs(rotateX) <= 90) {\n translateY = 0;\n translateZ = 90;\n transform = `rotateX(${rotateX}deg) `;\n }\n else {\n translateY = -9999;\n }\n }\n else {\n translateZ = 0;\n translateY = optOffset;\n }\n const selected = selectedIndex === i;\n transform += `translate3d(0px,${translateY}px,${translateZ}px) `;\n if (this.scaleFactor !== 1 && !selected) {\n transform += scaleStr;\n }\n // Update transition duration\n if (this.noAnimate) {\n opt.duration = 0;\n button.style.transitionDuration = '';\n }\n else if (duration !== opt.duration) {\n opt.duration = duration;\n button.style.transitionDuration = durationStr;\n }\n // Update transform\n if (transform !== opt.transform) {\n opt.transform = transform;\n button.style.transform = transform;\n }\n // Update selected item\n if (selected !== opt.selected) {\n opt.selected = selected;\n if (selected) {\n button.classList.add(PICKER_OPT_SELECTED);\n }\n else {\n button.classList.remove(PICKER_OPT_SELECTED);\n }\n }\n }\n this.col.prevSelected = selectedIndex;\n if (saveY) {\n this.y = y;\n }\n if (this.lastIndex !== selectedIndex) {\n // have not set a last index yet\n hapticSelectionChanged();\n this.lastIndex = selectedIndex;\n }\n }\n decelerate() {\n if (this.velocity !== 0) {\n // still decelerating\n this.velocity *= DECELERATION_FRICTION;\n // do not let it go slower than a velocity of 1\n this.velocity = (this.velocity > 0)\n ? Math.max(this.velocity, 1)\n : Math.min(this.velocity, -1);\n let y = this.y + this.velocity;\n if (y > this.minY) {\n // whoops, it's trying to scroll up farther than the options we have!\n y = this.minY;\n this.velocity = 0;\n }\n else if (y < this.maxY) {\n // gahh, it's trying to scroll down farther than we can!\n y = this.maxY;\n this.velocity = 0;\n }\n this.update(y, 0, true);\n const notLockedIn = (Math.round(y) % this.optHeight !== 0) || (Math.abs(this.velocity) > 1);\n if (notLockedIn) {\n // isn't locked in yet, keep decelerating until it is\n this.rafId = requestAnimationFrame(() => this.decelerate());\n }\n else {\n this.velocity = 0;\n this.emitColChange();\n hapticSelectionEnd();\n }\n }\n else if (this.y % this.optHeight !== 0) {\n // needs to still get locked into a position so options line up\n const currentPos = Math.abs(this.y % this.optHeight);\n // create a velocity in the direction it needs to scroll\n this.velocity = (currentPos > (this.optHeight / 2) ? 1 : -1);\n this.decelerate();\n }\n }\n indexForY(y) {\n return Math.min(Math.max(Math.abs(Math.round(y / this.optHeight)), 0), this.col.options.length - 1);\n }\n // TODO should this check disabled?\n onStart(detail) {\n // We have to prevent default in order to block scrolling under the picker\n // but we DO NOT have to stop propagation, since we still want\n // some \"click\" events to capture\n if (detail.event.cancelable) {\n detail.event.preventDefault();\n }\n detail.event.stopPropagation();\n hapticSelectionStart();\n // reset everything\n cancelAnimationFrame(this.rafId);\n const options = this.col.options;\n let minY = (options.length - 1);\n let maxY = 0;\n for (let i = 0; i < options.length; i++) {\n if (!options[i].disabled) {\n minY = Math.min(minY, i);\n maxY = Math.max(maxY, i);\n }\n }\n this.minY = -(minY * this.optHeight);\n this.maxY = -(maxY * this.optHeight);\n }\n onMove(detail) {\n if (detail.event.cancelable) {\n detail.event.preventDefault();\n }\n detail.event.stopPropagation();\n // update the scroll position relative to pointer start position\n let y = this.y + detail.deltaY;\n if (y > this.minY) {\n // scrolling up higher than scroll area\n y = Math.pow(y, 0.8);\n this.bounceFrom = y;\n }\n else if (y < this.maxY) {\n // scrolling down below scroll area\n y += Math.pow(this.maxY - y, 0.9);\n this.bounceFrom = y;\n }\n else {\n this.bounceFrom = 0;\n }\n this.update(y, 0, false);\n }\n onEnd(detail) {\n if (this.bounceFrom > 0) {\n // bounce back up\n this.update(this.minY, 100, true);\n this.emitColChange();\n return;\n }\n else if (this.bounceFrom < 0) {\n // bounce back down\n this.update(this.maxY, 100, true);\n this.emitColChange();\n return;\n }\n this.velocity = clamp(-MAX_PICKER_SPEED, detail.velocityY * 23, MAX_PICKER_SPEED);\n if (this.velocity === 0 && detail.deltaY === 0) {\n const opt = detail.event.target.closest('.picker-opt');\n if (opt && opt.hasAttribute('opt-index')) {\n this.setSelected(parseInt(opt.getAttribute('opt-index'), 10), TRANSITION_DURATION);\n }\n }\n else {\n this.y += detail.deltaY;\n if (Math.abs(detail.velocityY) < 0.05) {\n const isScrollingUp = detail.deltaY > 0;\n const optHeightFraction = (Math.abs(this.y) % this.optHeight) / this.optHeight;\n if (isScrollingUp && optHeightFraction > 0.5) {\n this.velocity = Math.abs(this.velocity) * -1;\n }\n else if (!isScrollingUp && optHeightFraction <= 0.5) {\n this.velocity = Math.abs(this.velocity);\n }\n }\n this.decelerate();\n }\n }\n refresh(forceRefresh) {\n let min = this.col.options.length - 1;\n let max = 0;\n const options = this.col.options;\n for (let i = 0; i < options.length; i++) {\n if (!options[i].disabled) {\n min = Math.min(min, i);\n max = Math.max(max, i);\n }\n }\n /**\n * Only update selected value if column has a\n * velocity of 0. If it does not, then the\n * column is animating might land on\n * a value different than the value at\n * selectedIndex\n */\n if (this.velocity !== 0) {\n return;\n }\n const selectedIndex = clamp(min, this.col.selectedIndex || 0, max);\n if (this.col.prevSelected !== selectedIndex || forceRefresh) {\n const y = (selectedIndex * this.optHeight) * -1;\n this.velocity = 0;\n this.update(y, TRANSITION_DURATION, true);\n }\n }\n render() {\n const col = this.col;\n const Button = 'button';\n const mode = getIonMode(this);\n return (h(Host, { class: {\n [mode]: true,\n 'picker-col': true,\n 'picker-opts-left': this.col.align === 'left',\n 'picker-opts-right': this.col.align === 'right'\n }, style: {\n 'max-width': this.col.columnWidth\n } }, col.prefix && (h(\"div\", { class: \"picker-prefix\", style: { width: col.prefixWidth } }, col.prefix)), h(\"div\", { class: \"picker-opts\", style: { maxWidth: col.optionsWidth }, ref: el => this.optsEl = el }, col.options.map((o, index) => h(Button, { type: \"button\", class: { 'picker-opt': true, 'picker-opt-disabled': !!o.disabled }, \"opt-index\": index }, o.text))), col.suffix && (h(\"div\", { class: \"picker-suffix\", style: { width: col.suffixWidth } }, col.suffix))));\n }\n get el() { return getElement(this); }\n static get watchers() { return {\n \"col\": [\"colChanged\"]\n }; }\n};\nconst PICKER_OPT_SELECTED = 'picker-opt-selected';\nconst DECELERATION_FRICTION = 0.97;\nconst MAX_PICKER_SPEED = 90;\nconst TRANSITION_DURATION = 150;\nPickerColumnCmp.style = {\n ios: pickerColumnIosCss,\n md: pickerColumnMdCss\n};\n\nexport { Datetime as ion_datetime, Picker as ion_picker, PickerColumnCmp as ion_picker_column };\n"]}