This repository was archived by the owner on Feb 12, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path145.6f62c0133ecff63f1e50.js
More file actions
1 lines (1 loc) · 29.1 KB
/
145.6f62c0133ecff63f1e50.js
File metadata and controls
1 lines (1 loc) · 29.1 KB
1
(window.webpackJsonp=window.webpackJsonp||[]).push([[145],{"7p1y":function(t,e,i){"use strict";i.r(e),i.d(e,"IonDatetime",function(){return B}),i.d(e,"IonPicker",function(){return Z}),i.d(e,"IonPickerColumn",function(){return R}),i.d(e,"IonPickerController",function(){return Q});var n=i("B5Ai"),o=i("cBjU"),r=i("k5vO"),a=i("HHlg"),s=i("6Fnk");function c(t,e,i,n){if(t!==D&&t!==j){if(t===F)return void 0!==i&&void 0!==i.hour?i.hour<12?"AM":"PM":e?e.toUpperCase():"";if(t===T)return void 0!==i&&void 0!==i.hour?i.hour<12?"am":"pm":e||"";if(null==e)return"";if(t===x||t===O||t===S||t===P||t===Y||t===A)return y(e);if(t===k)return g(e);if(t===w)return(n.monthNames?n.monthNames:V)[e-1];if(t===M)return(n.monthShortNames?n.monthShortNames:H)[e-1];if(t===C||t===I){if(0===e)return"12";if(e>12&&(e-=12),t===C&&e<10)return"0"+e}return e.toString()}try{return e=new Date(i.year,i.month-1,i.day).getDay(),t===D?(n.dayNames?n.dayNames:E)[e]:(n.dayShortNames?n.dayShortNames:z)[e]}catch(t){}}function l(t,e,i,n,o){return void 0===n&&(n=0),void 0===o&&(o=0),parseInt("1"+g(t)+y(e)+y(i)+y(n)+y(o),10)}function d(t){return l(t.year,t.month,t.day,t.hour,t.minute)}i("cHb+");var u=/^(\d{4}|[+\-]\d{6})(?:-(\d{2})(?:-(\d{2}))?)?(?:T(\d{2}):(\d{2})(?::(\d{2})(?:\.(\d{3}))?)?(?:(Z)|([+\-])(\d{2})(?::(\d{2}))?)?)?$/,p=/^((\d{2}):(\d{2})(?::(\d{2})(?:\.(\d{3}))?)?(?:(Z)|([+\-])(\d{2})(?::(\d{2}))?)?)?$/;function h(t){var e=null;if(null!=t&&((e=p.exec(t))?(e.unshift(void 0,void 0),e[2]=e[3]=void 0):e=u.exec(t)),null!==e){for(var i=1;i<8;i++)e[i]=void 0!==e[i]?parseInt(e[i],10):void 0;var n=0;return e[9]&&e[10]&&(n=60*parseInt(e[10],10),e[11]&&(n+=parseInt(e[11],10)),"-"===e[9]&&(n*=-1)),{year:e[1],month:e[2],day:e[3],hour:e[4],minute:e[5],second:e[6],millisecond:e[7],tzOffset:n}}}function m(t){for(var e in N)if(N[e].f===t)return N[e].k}function f(t,e){var i;if(null!=t)return"string"==typeof t&&(t=t.replace(/\[|\]/g,"").split(",")),Array.isArray(t)&&(i=t.map(function(t){return t.toString().trim()})),void 0!==i&&0!==i.length||console.warn('Invalid "'+e+'Names". Must be an array of strings, or a comma separated string.'),i}function b(t,e){var i;return"string"==typeof t&&(t=t.replace(/\[|\]|\s/g,"").split(",")),0===(i=Array.isArray(t)?t.map(function(t){return parseInt(t,10)}).filter(isFinite):[t]).length&&console.warn('Invalid "'+e+'Values". Must be an array of numbers, or a comma separated string of numbers.'),i}function y(t){return("0"+(void 0!==t?Math.abs(t):"0")).slice(-2)}function v(t){return("00"+(void 0!==t?Math.abs(t):"0")).slice(-3)}function g(t){return("000"+(void 0!==t?Math.abs(t):"0")).slice(-4)}var k="YYYY",x="YY",w="MMMM",M="MMM",O="MM",D="DDDD",j="DDD",S="DD",P="HH",C="hh",I="h",Y="mm",A="ss",F="A",T="a",N=[{f:k,k:"year"},{f:w,k:"month"},{f:D,k:"day"},{f:M,k:"month"},{f:j,k:"day"},{f:x,k:"year"},{f:O,k:"month"},{f:S,k:"day"},{f:P,k:"hour"},{f:C,k:"hour"},{f:Y,k:"minute"},{f:A,k:"second"},{f:"M",k:"month"},{f:"D",k:"day"},{f:"H",k:"hour"},{f:I,k:"hour"},{f:"m",k:"minute"},{f:"s",k:"second"},{f:F,k:"ampm"},{f:T,k:"ampm"}],E=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],z=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],V=["January","February","March","April","May","June","July","August","September","October","November","December"],H=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],W=[C,I,Y,"m",A,"s"],B=function(){function t(){this.inputId="ion-dt-"+L++,this.labelId=this.inputId+"-lbl",this.locale={},this.datetimeMin={},this.datetimeMax={},this.datetimeValue={},this.name=this.inputId,this.disabled=!1,this.displayFormat="MMM D, YYYY",this.cancelText="Cancel",this.doneText="Done"}return t.prototype.disabledChanged=function(){this.emitStyle()},t.prototype.valueChanged=function(){this.updateDatetimeValue(this.value),this.emitStyle(),this.ionChange.emit({value:this.value})},t.prototype.componentWillLoad=function(){this.locale={monthNames:f(this.monthNames,"monthNames"),monthShortNames:f(this.monthShortNames,"monthShortNames"),dayNames:f(this.dayNames,"dayNames"),dayShortNames:f(this.dayShortNames,"dayShortNames")},this.updateDatetimeValue(this.value),this.emitStyle()},t.prototype.open=function(){return n.a(this,void 0,void 0,function(){var t,e,i;return n.c(this,function(n){switch(n.label){case 0:return this.disabled?[2]:(t=this.generatePickerOptions(),i=this,[4,this.pickerCtrl.create(t)]);case 1:return e=i.picker=n.sent(),[4,this.validate()];case 2:return n.sent(),[4,e.present()];case 3:return n.sent(),[2]}})})},t.prototype.emitStyle=function(){this.ionStyle.emit({interactive:!0,datetime:!0,"has-value":this.hasValue(),"interactive-disabled":this.disabled})},t.prototype.updateDatetimeValue=function(t){(function(t,e){if(e&&""!==e){if("string"==typeof e){if(e=h(e))return Object.assign(t,e),!0}else if(e.year||e.hour||e.month||e.day||e.minute||e.second){e.ampm&&e.hour&&(e.hour.value="pm"===e.ampm.value?12===e.hour.value?12:e.hour.value+12:12===e.hour.value?0:e.hour.value);for(var i=0,n=Object.keys(e);i<n.length;i++){var o=n[i];t[o]=e[o].value}return!0}console.warn('Error parsing date: "'+e+'". Please provide a valid ISO 8601 datetime format: https://www.w3.org/TR/NOTE-datetime')}else for(var r in t)t.hasOwnProperty(r)&&delete t[r]})(this.datetimeValue,t),this.updateText()},t.prototype.generatePickerOptions=function(){var t=this,e=Object.assign({},this.pickerOptions,{columns:this.generateColumns()}),i=e.buttons;return i&&0!==i.length||(e.buttons=[{text:this.cancelText,role:"cancel",handler:function(){t.ionCancel.emit()}},{text:this.doneText,handler:function(e){t.updateDatetimeValue(e),t.value=function(t){var e="";return void 0!==t.year?(e=g(t.year),void 0!==t.month&&(e+="-"+y(t.month),void 0!==t.day&&(e+="-"+y(t.day),void 0!==t.hour&&(e+="T"+y(t.hour)+":"+y(t.minute)+":"+y(t.second),t.millisecond>0&&(e+="."+v(t.millisecond)),e+=void 0===t.tzOffset?"Z":(t.tzOffset>0?"+":"-")+y(Math.floor(Math.abs(t.tzOffset/60)))+":"+y(t.tzOffset%60))))):void 0!==t.hour&&(e=y(t.hour)+":"+y(t.minute),void 0!==t.second&&(e+=":"+y(t.second),void 0!==t.millisecond&&(e+="."+v(t.millisecond)))),e}(t.datetimeValue)}}]),e},t.prototype.generateColumns=function(){var t=this,e=this.pickerFormat||this.displayFormat||q;if(0===e.length)return[];this.calcMinMax(),-1===(e=e.replace("DDDD","{~}").replace("DDD","{~}")).indexOf("D")&&(e=e.replace("{~}","D"));var i=function(t){var e=[];t=t.replace(/[^\w\s]/gi," "),N.forEach(function(e){e.f.length>1&&t.indexOf(e.f)>-1&&t.indexOf(e.f+e.f.charAt(0))<0&&(t=t.replace(e.f," "+e.f+" "))});var i=t.split(" ").filter(function(t){return t.length>0});return i.forEach(function(t,n){N.forEach(function(o){if(t===o.f){if((t===F||t===T)&&(e.indexOf(I)<0&&e.indexOf(C)<0||-1===W.indexOf(i[n-1])))return;e.push(t)}})}),e}(e=e.replace(/{~}/g,"")).map(function(e){var i=m(e),n=(t[i+"Values"]?b(t[i+"Values"],i):function(t,e,i){var n=[];if(t===k||t===x){if(void 0===i.year||void 0===e.year)throw new Error("min and max year is undefined");for(var o=i.year;o>=e.year;o--)n.push(o)}else if(t===w||t===M||t===O||"M"===t||t===C||t===I)for(o=1;o<13;o++)n.push(o);else if(t===D||t===j||t===S||"D"===t)for(o=1;o<32;o++)n.push(o);else if(t===P||"H"===t)for(o=0;o<24;o++)n.push(o);else if(t===Y||"m"===t)for(o=0;o<60;o++)n.push(o);else if(t===A||"s"===t)for(o=0;o<60;o++)n.push(o);else t!==F&&t!==T||n.push("am","pm");return n}(e,t.datetimeMin,t.datetimeMax)).map(function(i){return{value:i,text:c(e,i,void 0,t.locale)}}),o=function(t,e){return e===F||e===T?t.hour<12?"am":"pm":e===C||e===I?t.hour>12?t.hour-12:t.hour:t[m(e)]}(t.datetimeValue,e),r=n.findIndex(function(t){return t.value===o});return{name:i,selectedIndex:r>=0?r:0,options:n}}),n=this.datetimeMin,o=this.datetimeMax;return["month","day","hour","minute"].filter(function(t){return!i.find(function(e){return e.name===t})}).forEach(function(t){n[t]=0,o[t]=0}),function(t){for(var e,i,n=[],o=0;o<t.length;o++){e=t[o],n.push(0);for(var r=0,a=e.options;r<a.length;r++)(i=a[r].text.length)>n[o]&&(n[o]=i)}return 2===n.length?(i=Math.max(n[0],n[1]),t[0].align="right",t[1].align="left",t[0].optionsWidth=t[1].optionsWidth=17*i+"px"):3===n.length&&(i=Math.max(n[0],n[2]),t[0].align="right",t[1].columnWidth=17*n[1]+"px",t[0].optionsWidth=t[2].optionsWidth=17*i+"px",t[2].align="left"),t}(i)},t.prototype.validate=function(){return n.a(this,void 0,void 0,function(){var t,e,i,o,r,a,s,c,l,u;return n.c(this,function(n){switch(n.label){case 0:return t=new Date,e=d(this.datetimeMin),i=d(this.datetimeMax),[4,this.picker.getColumn("year")];case 1:return o=n.sent(),r=t.getFullYear(),o&&(o.options.find(function(e){return e.value===t.getFullYear()})||(r=o.options[0].value),void 0!==(a=o.selectedIndex)&&(s=o.options[a])&&(r=s.value)),[4,this.validateColumn("month",1,e,i,[r,0,0,0,0],[r,12,31,23,59])];case 2:return c=n.sent(),[4,this.validateColumn("day",2,e,i,[r,c,0,0,0],[r,c,4===c||6===c||9===c||11===c?30:2===c?r%4==0&&r%100!=0||r%400==0?29:28:31,23,59])];case 3:return l=n.sent(),[4,this.validateColumn("hour",3,e,i,[r,c,l,0,0],[r,c,l,23,59])];case 4:return u=n.sent(),[4,this.validateColumn("minute",4,e,i,[r,c,l,u,0],[r,c,l,u,59])];case 5:return n.sent(),[2]}})})},t.prototype.calcMinMax=function(t){var e=(t||new Date).getFullYear();if(void 0!==this.yearValues){var i=b(this.yearValues,"year");void 0===this.min&&(this.min=Math.min.apply(Math,i)),void 0===this.max&&(this.max=Math.max.apply(Math,i))}else void 0===this.min&&(this.min=(e-100).toString()),void 0===this.max&&(this.max=e.toString());var n=this.datetimeMin=h(this.min),o=this.datetimeMax=h(this.max);n.year=n.year||e,o.year=o.year||e,n.month=n.month||1,o.month=o.month||12,n.day=n.day||1,o.day=o.day||31,n.hour=n.hour||0,o.hour=o.hour||23,n.minute=n.minute||0,o.minute=o.minute||59,n.second=n.second||0,o.second=o.second||59,n.year>o.year&&(console.error("min.year > max.year"),n.year=o.year-100),n.year===o.year&&(n.month>o.month?(console.error("min.month > max.month"),n.month=1):n.month===o.month&&n.day>o.day&&(console.error("min.day > max.day"),n.day=1))},t.prototype.validateColumn=function(t,e,i,o,a,s){return n.a(this,void 0,void 0,function(){var c,d,u,p,h,m,f,b,y,v,g;return n.c(this,function(n){switch(n.label){case 0:return[4,this.picker.getColumn(t)];case 1:if(!(c=n.sent()))return[2,0];for(d=a.slice(),u=s.slice(),h=(p=c.options).length-1,m=0,f=0;f<p.length;f++)y=(b=p[f]).value,d[e]=b.value,u[e]=b.value,(b.disabled=y<a[e]||y>s[e]||l(u[0],u[1],u[2],u[3],u[4])<i||l(d[0],d[1],d[2],d[3],d[4])>o)||(h=Math.min(h,f),m=Math.max(m,f));return v=c.selectedIndex=Object(r.g)(h,c.selectedIndex,m),(g=c.options[v])?[2,g.value]:[2,0]}})})},t.prototype.updateText=function(){this.text=function(t,e,i){if(void 0!==e){var n=[],o=!1;if(N.forEach(function(r,a){if(t.indexOf(r.f)>-1){var s="{"+a+"}",l=c(r.f,e[r.k],e,i);o||void 0===l||null==e[r.k]||(o=!0),n.push(s,l||""),t=t.replace(r.f,s)}}),o){for(var r=0;r<n.length;r+=2)t=t.replace(n[r],n[r+1]);return t}}}(this.displayFormat||this.pickerFormat||q,this.datetimeValue,this.locale)},t.prototype.hasValue=function(){return Object.keys(this.datetimeValue).length>0},t.prototype.hostData=function(){return{class:{"datetime-disabled":this.disabled,"datetime-placeholder":null==this.text&&null!=this.placeholder,"in-item":Object(a.j)("ion-item",this.el)}}},t.prototype.render=function(){var t=this.text;return null==t&&(t=null!=this.placeholder?this.placeholder:""),Object(r.d)(this.el,this.name,this.value,this.disabled),[Object(o.b)("div",{class:"datetime-text"},t),Object(o.b)("button",{type:"button","aria-haspopup":"true","aria-labelledby":this.labelId,"aria-disabled":this.disabled?"true":null,onClick:this.open.bind(this),class:"datetime-cover"}),Object(o.b)("slot",null)]},Object.defineProperty(t,"is",{get:function(){return"ion-datetime"},enumerable:!0,configurable:!0}),Object.defineProperty(t,"encapsulation",{get:function(){return"shadow"},enumerable:!0,configurable:!0}),Object.defineProperty(t,"properties",{get:function(){return{cancelText:{type:String,attr:"cancel-text"},dayNames:{type:String,attr:"day-names"},dayShortNames:{type:String,attr:"day-short-names"},dayValues:{type:"Any",attr:"day-values"},disabled:{type:Boolean,attr:"disabled",watchCallbacks:["disabledChanged"]},displayFormat:{type:String,attr:"display-format"},doneText:{type:String,attr:"done-text"},el:{elementRef:!0},hourValues:{type:"Any",attr:"hour-values"},max:{type:String,attr:"max",mutable:!0},min:{type:String,attr:"min",mutable:!0},minuteValues:{type:"Any",attr:"minute-values"},mode:{type:String,attr:"mode"},monthNames:{type:String,attr:"month-names"},monthShortNames:{type:String,attr:"month-short-names"},monthValues:{type:"Any",attr:"month-values"},name:{type:String,attr:"name"},open:{method:!0},pickerCtrl:{connect:"ion-picker-controller"},pickerFormat:{type:String,attr:"picker-format"},pickerOptions:{type:"Any",attr:"picker-options"},placeholder:{type:String,attr:"placeholder"},text:{state:!0},value:{type:String,attr:"value",mutable:!0,watchCallbacks:["valueChanged"]},yearValues:{type:"Any",attr:"year-values"}}},enumerable:!0,configurable:!0}),Object.defineProperty(t,"events",{get:function(){return[{name:"ionCancel",method:"ionCancel",bubbles:!0,cancelable:!0,composed:!0},{name:"ionChange",method:"ionChange",bubbles:!0,cancelable:!0,composed:!0},{name:"ionStyle",method:"ionStyle",bubbles:!0,cancelable:!0,composed:!0}]},enumerable:!0,configurable:!0}),Object.defineProperty(t,"style",{get:function(){return":host{padding:var(--padding-top) var(--padding-end) var(--padding-bottom) var(--padding-start);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}:host(.in-item){position:static}:host(.datetime-placeholder){color:var(--placeholder-color)}:host(.datetime-disabled){opacity:.3}.datetime-cover{left:0;top:0;margin:0;position:absolute;width:100%;height:100%;border:0;background:transparent;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;outline:none}.datetime-text{font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;text-decoration:inherit;text-overflow:inherit;text-transform:inherit;text-align:inherit;white-space:inherit;color:inherit;-ms-flex:1;flex:1;min-height:inherit;overflow:inherit}:host{--placeholder-color:var(--ion-text-color-step-600,#999);--padding-top:10px;--padding-end:8px;--padding-bottom:10px;--padding-start:16px}"},enumerable:!0,configurable:!0}),Object.defineProperty(t,"styleMode",{get:function(){return"ios"},enumerable:!0,configurable:!0}),t}(),L=0,q="MMM D, YYYY";function J(t,e){var i=new t,n=new t;n.addElement(e.querySelector("ion-backdrop"));var o=new t;return o.addElement(e.querySelector(".picker-wrapper")),n.fromTo("opacity",.01,.26),o.fromTo("translateY","100%","0%"),Promise.resolve(i.addElement(e).easing("cubic-bezier(.36,.66,.04,1)").duration(400).add(n).add(o))}function U(t,e){var i=new t,n=new t;n.addElement(e.querySelector("ion-backdrop"));var o=new t;return o.addElement(e.querySelector(".picker-wrapper")),n.fromTo("opacity",.26,.01),o.fromTo("translateY","0%","100%"),Promise.resolve(i.addElement(e).easing("cubic-bezier(.36,.66,.04,1)").duration(400).add(n).add(o))}var Z=function(){function t(){this.presented=!1,this.keyboardClose=!0,this.buttons=[],this.columns=[],this.duration=0,this.showBackdrop=!0,this.backdropDismiss=!0,this.animated=!0}return t.prototype.componentDidLoad=function(){this.ionPickerDidLoad.emit()},t.prototype.componentDidUnload=function(){this.ionPickerDidUnload.emit()},t.prototype.onBackdropTap=function(){var t=this.buttons.find(function(t){return"cancel"===t.role});t?this.buttonClick(t):this.dismiss()},t.prototype.present=function(){return n.a(this,void 0,void 0,function(){var t=this;return n.c(this,function(e){switch(e.label){case 0:return[4,Object(s.e)(this,"pickerEnter",J,J,void 0)];case 1:return e.sent(),this.duration>0&&(this.durationTimeout=setTimeout(function(){return t.dismiss()},this.duration)),[2]}})})},t.prototype.dismiss=function(t,e){return this.durationTimeout&&clearTimeout(this.durationTimeout),Object(s.b)(this,t,e,"pickerLeave",U,U)},t.prototype.onDidDismiss=function(){return Object(s.c)(this.el,"ionPickerDidDismiss")},t.prototype.onWillDismiss=function(){return Object(s.c)(this.el,"ionPickerWillDismiss")},t.prototype.getColumn=function(t){return Promise.resolve(this.columns.find(function(e){return e.name===t}))},t.prototype.buttonClick=function(t){var e=!0;return t.handler&&!1===t.handler(this.getSelected())&&(e=!1),e?this.dismiss():Promise.resolve(!1)},t.prototype.getSelected=function(){var t={};return this.columns.forEach(function(e,i){var n=void 0!==e.selectedIndex?e.options[e.selectedIndex]:void 0;t[e.name]={text:n?n.text:void 0,value:n?n.value:void 0,columnIndex:i}}),t},t.prototype.hostData=function(){return{class:Object.assign({},Object(a.k)(this.mode,"picker"),Object(a.g)(this.cssClass)),style:{zIndex:2e4+this.overlayIndex}}},t.prototype.render=function(){var t=this;return[Object(o.b)("ion-backdrop",{visible:this.showBackdrop,tappable:this.backdropDismiss}),Object(o.b)("div",{class:"picker-wrapper",role:"dialog"},Object(o.b)("div",{class:"picker-toolbar"},this.buttons.map(function(e){return Object(o.b)("div",{class:function(t){var e;return(e={})["picker-toolbar-"+t.role]=void 0!==t.role,e["picker-toolbar-button"]=!0,e}(e)},Object(o.b)("button",{type:"button","ion-activatable":!0,onClick:function(){return t.buttonClick(e)},class:function(t){return Object.assign({"picker-button":!0},Object(a.g)(t.cssClass))}(e)},e.text))})),Object(o.b)("div",{class:"picker-columns"},Object(o.b)("div",{class:"picker-above-highlight"}),this.columns.map(function(t){return Object(o.b)("ion-picker-column",{col:t})}),Object(o.b)("div",{class:"picker-below-highlight"})))]},Object.defineProperty(t,"is",{get:function(){return"ion-picker"},enumerable:!0,configurable:!0}),Object.defineProperty(t,"properties",{get:function(){return{animated:{type:Boolean,attr:"animated"},animationCtrl:{connect:"ion-animation-controller"},backdropDismiss:{type:Boolean,attr:"backdrop-dismiss"},buttons:{type:"Any",attr:"buttons"},columns:{type:"Any",attr:"columns"},config:{context:"config"},cssClass:{type:String,attr:"css-class"},dismiss:{method:!0},duration:{type:Number,attr:"duration"},el:{elementRef:!0},enterAnimation:{type:"Any",attr:"enter-animation"},getColumn:{method:!0},keyboardClose:{type:Boolean,attr:"keyboard-close"},leaveAnimation:{type:"Any",attr:"leave-animation"},mode:{type:String,attr:"mode"},onDidDismiss:{method:!0},onWillDismiss:{method:!0},overlayIndex:{type:Number,attr:"overlay-index"},present:{method:!0},showBackdrop:{type:Boolean,attr:"show-backdrop"}}},enumerable:!0,configurable:!0}),Object.defineProperty(t,"events",{get:function(){return[{name:"ionPickerDidLoad",method:"ionPickerDidLoad",bubbles:!0,cancelable:!0,composed:!0},{name:"ionPickerDidPresent",method:"didPresent",bubbles:!0,cancelable:!0,composed:!0},{name:"ionPickerWillPresent",method:"willPresent",bubbles:!0,cancelable:!0,composed:!0},{name:"ionPickerWillDismiss",method:"willDismiss",bubbles:!0,cancelable:!0,composed:!0},{name:"ionPickerDidDismiss",method:"didDismiss",bubbles:!0,cancelable:!0,composed:!0},{name:"ionPickerDidUnload",method:"ionPickerDidUnload",bubbles:!0,cancelable:!0,composed:!0}]},enumerable:!0,configurable:!0}),Object.defineProperty(t,"listeners",{get:function(){return[{name:"ionBackdropTap",method:"onBackdropTap"}]},enumerable:!0,configurable:!0}),Object.defineProperty(t,"style",{get:function(){return"ion-picker{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;left:0;top:0;display:block;position:absolute;width:100%;height:100%;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:1000}.picker-toolbar{width:100%;contain:strict;z-index:1}.picker-wrapper{left:0;right:0;bottom:0;margin:auto;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0);position:absolute;-ms-flex-direction:column;flex-direction:column;width:100%;max-width:500px;z-index:10}.picker-columns,.picker-wrapper{display:-ms-flexbox;display:flex;contain:strict;overflow:hidden}.picker-columns{-ms-flex-pack:center;margin-bottom:var(--ion-safe-area-bottom,0)}.picker-col,.picker-columns{position:relative;justify-content:center}.picker-col{display:-ms-flexbox;display:flex;-ms-flex:1;flex:1;-ms-flex-pack: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-prefix{text-align:end}.picker-prefix,.picker-suffix{position:relative;-ms-flex:2;flex:2;min-width:45%;max-width:50%;white-space:nowrap}.picker-suffix{text-align:start}.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}.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-above-highlight,.picker-below-highlight{display:none;pointer-events:none}.picker-button{border:0;font-family:inherit}.picker-button:active,.picker-button:focus,.picker-opt:active,.picker-opt:focus{outline:none}.picker-ios .picker-wrapper{height:260px;border-top:1px solid var(--ion-item-border-color,var(--ion-border-color,#c8c7cc));background:var(--ion-background-color,#fff)}.picker-ios .picker-toolbar{display:-ms-flexbox;display:flex;height:44px;border-bottom:.55px solid var(--ion-item-border-color,var(--ion-border-color,#c8c7cc));background:var(--ion-background-color,#fff)}.picker-ios .picker-toolbar-button{-ms-flex:1;flex:1;text-align:end}.picker-ios .picker-toolbar-button:last-child .picker-button{font-weight:600}.picker-ios .picker-toolbar-button:first-child{font-weight:400;text-align:start}.picker-ios .picker-button,.picker-ios .picker-button.activated{margin:0;padding:0 1em;height:44px;background:transparent;color:var(--ion-color-primary,#3880ff);font-size:16px}.picker-columns{height:215px;-webkit-perspective:1000px;perspective:1000px}.picker-ios .picker-col{padding:0 4px;-webkit-transform-style:preserve-3d;transform-style:preserve-3d}.picker-ios .picker-opts,.picker-ios .picker-prefix,.picker-ios .picker-suffix{top:77px;pointer-events:none}.picker-ios .picker-opt,.picker-ios .picker-opts,.picker-ios .picker-prefix,.picker-ios .picker-suffix{-webkit-transform-style:preserve-3d;transform-style:preserve-3d;color:var(--ion-item-color,var(--ion-text-color,#000));font-size:20px;line-height:42px}.picker-ios .picker-opt{padding:0;margin:0;-webkit-transform-origin:center center;transform-origin:center center;height:46px;-webkit-transition-timing-function:ease-out;transition-timing-function:ease-out;background:transparent;-webkit-backface-visibility:hidden;backface-visibility:hidden;pointer-events:auto}.picker-ios .picker-above-highlight{top:0;height:81px;border-bottom:1px solid var(--ion-item-border-color,var(--ion-border-color,#c8c7cc));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),.8)));background:linear-gradient(180deg,var(--ion-background-color,#fff) 20%,rgba(var(--ion-background-color-rgb,255,255,255),.8));z-index:10}.picker-ios .picker-above-highlight,.picker-ios .picker-below-highlight{left:0;-webkit-transform:translateZ(90px);transform:translateZ(90px);display:block;position:absolute;width:100%}.picker-ios .picker-below-highlight{top:115px;height:119px;border-top:1px solid var(--ion-item-border-color,var(--ion-border-color,#c8c7cc));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),.8)));background:linear-gradient(0deg,var(--ion-background-color,#fff) 30%,rgba(var(--ion-background-color-rgb,255,255,255),.8));z-index:11}"},enumerable:!0,configurable:!0}),Object.defineProperty(t,"styleMode",{get:function(){return"ios"},enumerable:!0,configurable:!0}),t}(),R=function(){function t(){this.optHeight=0,this.rotateFactor=0,this.scaleFactor=1,this.velocity=0,this.y=0,this.noAnimate=!0}return t.prototype.componentWillLoad=function(){var t=0,e=.81;"ios"===this.mode&&(t=-.46,e=1),this.rotateFactor=t,this.scaleFactor=e},t.prototype.componentDidLoad=function(){return n.a(this,void 0,void 0,function(){var t,e,o=this;return n.c(this,function(n){switch(n.label){case 0:return(t=this.optsEl)&&(this.optHeight=t.firstElementChild?t.firstElementChild.clientHeight:0),this.refresh(),e=this,[4,i.e(0).then(i.bind(null,"2jMD"))];case 1:return e.gesture=n.sent().createGesture({el:this.el,queue:this.queue,gestureName:"picker-swipe",gesturePriority:100,threshold:0,onStart:function(t){return o.onStart(t)},onMove:function(t){return o.onMove(t)},onEnd:function(t){return o.onEnd(t)}}),this.gesture.setDisabled(!1),this.tmrId=setTimeout(function(){o.noAnimate=!1,o.refresh(!0)},250),[2]}})})},t.prototype.componentDidUnload=function(){cancelAnimationFrame(this.rafId),clearTimeout(this.tmrId)},t.prototype.setSelected=function(t,e){var i=t>-1?-t*this.optHeight:0;this.velocity=0,cancelAnimationFrame(this.rafId),this.update(i,e,!0)},t.prototype.update=function(t,e,i){if(this.optsEl){for(var n=0,o=0,r=this.col,s=this.rotateFactor,c=r.selectedIndex=this.indexForY(-t),l=0===e?null:e+"ms",d="scale("+this.scaleFactor+")",u=this.optsEl.children,p=0;p<u.length;p++){var h=u[p],m=r.options[p],f=p*this.optHeight+t,b="";if(0!==s){var y=f*s;Math.abs(y)<=90?(n=0,o=90,b="rotateX("+y+"deg) "):n=-9999}else o=0,n=f;var v=c===p;b+="translate3d(0px,"+n+"px,"+o+"px) ",1===this.scaleFactor||v||(b+=d),this.noAnimate?(m.duration=0,h.style.transitionDuration=""):e!==m.duration&&(m.duration=e,h.style.transitionDuration=l),b!==m.transform&&(m.transform=b,h.style.transform=b),v!==m.selected&&(m.selected=v,v?h.classList.add($):h.classList.remove($))}this.col.prevSelected=c,i&&(this.y=t),this.lastIndex!==c&&(Object(a.c)(),this.lastIndex=c)}},t.prototype.decelerate=function(){var t=this;if(0!==this.velocity){this.velocity*=G,this.velocity=this.velocity>0?Math.max(this.velocity,1):Math.min(this.velocity,-1);var e=this.y+this.velocity;e>this.minY?(e=this.minY,this.velocity=0):e<this.maxY&&(e=this.maxY,this.velocity=0),this.update(e,0,!0),(Math.round(e)%this.optHeight!=0||Math.abs(this.velocity)>1)&&(this.rafId=requestAnimationFrame(function(){return t.decelerate()}))}else if(this.y%this.optHeight!=0){var i=Math.abs(this.y%this.optHeight);this.velocity=i>this.optHeight/2?1:-1,this.decelerate()}},t.prototype.indexForY=function(t){return Math.min(Math.max(Math.abs(Math.round(t/this.optHeight)),0),this.col.options.length-1)},t.prototype.onStart=function(t){t.event.preventDefault(),t.event.stopPropagation(),cancelAnimationFrame(this.rafId);for(var e=this.col.options,i=e.length-1,n=0,o=0;o<e.length;o++)e[o].disabled||(i=Math.min(i,o),n=Math.max(n,o));this.minY=-i*this.optHeight,this.maxY=-n*this.optHeight},t.prototype.onMove=function(t){t.event.preventDefault(),t.event.stopPropagation();var e=this.y+t.deltaY;e>this.minY?(e=Math.pow(e,.8),this.bounceFrom=e):e<this.maxY?(e+=Math.pow(this.maxY-e,.9),this.bounceFrom=e):this.bounceFrom=0,this.update(e,0,!1)},t.prototype.onEnd=function(t){if(this.bounceFrom>0)this.update(this.minY,100,!0);else if(this.bounceFrom<0)this.update(this.maxY,100,!0);else if(this.velocity=Object(r.g)(-X,23*t.velocityY,X),0===this.velocity&&0===t.deltaY){var e=t.event.target.closest(".picker-opt");e&&e.hasAttribute("opt-index")&&this.setSelected(parseInt(e.getAttribute("opt-index"),10),K)}else this.y+=t.deltaY,this.decelerate()},t.prototype.refresh=function(t){for(var e=this.col.options.length-1,i=0,n=this.col.options,o=0;o<n.length;o++)n[o].disabled||(e=Math.min(e,o),i=Math.max(i,o));var a=Object(r.g)(e,this.col.selectedIndex||0,i);if(this.col.prevSelected!==a||t){var s=a*this.optHeight*-1;this.velocity=0,this.update(s,K,!0)}},t.prototype.hostData=function(){return{class:{"picker-col":!0,"picker-opts-left":"left"===this.col.align,"picker-opts-right":"right"===this.col.align},style:{"max-width":this.col.columnWidth}}},t.prototype.render=function(){var t=this,e=this.col;return[e.prefix&&Object(o.b)("div",{class:"picker-prefix",style:{width:e.prefixWidth}},e.prefix),Object(o.b)("div",{class:"picker-opts",style:{maxWidth:e.optionsWidth},ref:function(e){return t.optsEl=e}},e.options.map(function(t,e){return Object(o.b)("button",{type:"button",class:{"picker-opt":!0,"picker-opt-disabled":!!t.disabled},"opt-index":e},t.text)})),e.suffix&&Object(o.b)("div",{class:"picker-suffix",style:{width:e.suffixWidth}},e.suffix)]},Object.defineProperty(t,"is",{get:function(){return"ion-picker-column"},enumerable:!0,configurable:!0}),Object.defineProperty(t,"properties",{get:function(){return{col:{type:"Any",attr:"col"},el:{elementRef:!0},queue:{context:"queue"}}},enumerable:!0,configurable:!0}),t}(),$="picker-opt-selected",G=.97,X=90,K=150,Q=function(){function t(){}return t.prototype.create=function(t){return Object(s.f)(this.doc.createElement("ion-picker"),t)},t.prototype.dismiss=function(t,e,i){return Object(s.g)(this.doc,t,e,"ion-picker",i)},t.prototype.getTop=function(){return n.a(this,void 0,void 0,function(){return n.c(this,function(t){return[2,Object(s.h)(this.doc,"ion-picker")]})})},Object.defineProperty(t,"is",{get:function(){return"ion-picker-controller"},enumerable:!0,configurable:!0}),Object.defineProperty(t,"properties",{get:function(){return{create:{method:!0},dismiss:{method:!0},doc:{context:"document"},getTop:{method:!0}}},enumerable:!0,configurable:!0}),t}()}}]);