(window.webpackJsonp=window.webpackJsonp||[]).push([[89],{kZqf:function(t,e,o){"use strict";o.r(e),o.d(e,"IonToggle",function(){return r});var i=o("cBjU"),n=o("hH+q"),a=o("GGff"),s=o("+/n5"),r=function(){function t(){this.inputId="ion-tg-"+l++,this.pivotX=0,this.activated=!1,this.keyFocus=!1,this.name=this.inputId,this.checked=!1,this.disabled=!1,this.value="on"}return t.prototype.checkedChanged=function(t){this.ionChange.emit({checked:t,value:this.value})},t.prototype.emitStyle=function(){this.ionStyle.emit({"interactive-disabled":this.disabled})},t.prototype.componentWillLoad=function(){this.ionStyle=Object(a.c)(this.ionStyle),this.emitStyle()},t.prototype.componentDidLoad=function(){var t=this.nativeInput.closest("ion-item");if(t){var e=t.querySelector("ion-label");e&&(e.id=this.inputId+"-lbl",this.nativeInput.setAttribute("aria-labelledby",e.id))}},t.prototype.onDragStart=function(t){return this.pivotX=t.currentX,this.activated=!0,t.event.preventDefault(),!0},t.prototype.onDragMove=function(t){var e=t.currentX;c(this.checked,e-this.pivotX,-15)&&(this.checked=!this.checked,this.pivotX=e,Object(n.d)())},t.prototype.onDragEnd=function(t){c(this.checked,t.currentX-this.pivotX,4)&&(this.checked=!this.checked,Object(n.d)()),this.activated=!1,this.nativeInput.focus()},t.prototype.onChange=function(){this.checked=!this.checked},t.prototype.onKeyUp=function(){this.keyFocus=!0},t.prototype.onFocus=function(){this.ionFocus.emit()},t.prototype.onBlur=function(){this.keyFocus=!1,this.ionBlur.emit()},t.prototype.hostData=function(){return{class:Object.assign({},Object(s.b)(this.color),{"in-item":Object(s.f)(".item",this.el),"toggle-activated":this.activated,"toggle-checked":this.checked,"toggle-disabled":this.disabled,"toggle-key":this.keyFocus,interactive:!0})}},t.prototype.render=function(){var t=this;return Object(a.d)(this.el,this.name,this.value,this.disabled),[Object(i.b)("ion-gesture",{onStart:this.onDragStart.bind(this),onMove:this.onDragMove.bind(this),onEnd:this.onDragEnd.bind(this),gestureName:"toggle",passive:!1,gesturePriority:30,direction:"x",threshold:0,attachTo:"parent",disabled:this.disabled,tabIndex:-1},Object(i.b)("div",{class:"toggle-icon"},Object(i.b)("div",{class:"toggle-inner"}))),Object(i.b)("input",{type:"checkbox",onChange:this.onChange.bind(this),onFocus:this.onFocus.bind(this),onBlur:this.onBlur.bind(this),onKeyUp:this.onKeyUp.bind(this),checked:this.checked,id:this.inputId,name:this.name,value:this.value,disabled:this.disabled,ref:function(e){return t.nativeInput=e}}),Object(i.b)("slot",null)]},Object.defineProperty(t,"is",{get:function(){return"ion-toggle"},enumerable:!0,configurable:!0}),Object.defineProperty(t,"encapsulation",{get:function(){return"shadow"},enumerable:!0,configurable:!0}),Object.defineProperty(t,"properties",{get:function(){return{activated:{state:!0},checked:{type:Boolean,attr:"checked",mutable:!0,watchCallbacks:["checkedChanged"]},color:{type:String,attr:"color"},disabled:{type:Boolean,attr:"disabled",watchCallbacks:["emitStyle"]},el:{elementRef:!0},keyFocus:{state:!0},mode:{type:String,attr:"mode"},name:{type:String,attr:"name"},value:{type:String,attr:"value"}}},enumerable:!0,configurable:!0}),Object.defineProperty(t,"events",{get:function(){return[{name:"ionChange",method:"ionChange",bubbles:!0,cancelable:!0,composed:!0},{name:"ionFocus",method:"ionFocus",bubbles:!0,cancelable:!0,composed:!0},{name:"ionBlur",method:"ionBlur",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'[data-ion-toggle-ios-host]{--ion-color-base:var(--ion-color-primary, #3880ff);--ion-color-base-rgb:var(--ion-color-primary-rgb, 56, 128, 255);-webkit-box-sizing:content-box!important;box-sizing:content-box!important;display:inline-block;contain:content;-ms-touch-action:none;touch-action:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;--checked-background:var(--ion-color-base);--checked-knob:var(--ion-color-base);-webkit-box-sizing:content-box;box-sizing:content-box;position:relative;width:51px;height:32px;contain:strict}.toggle-key[data-ion-toggle-ios-host]   input[data-ion-toggle-ios]{border:2px solid #5e9ed6}[data-ion-toggle-ios-host]:focus{outline:0}ion-gesture[data-ion-toggle-ios]{display:block;width:100%;height:100%;visibility:inherit}input[data-ion-toggle-ios]{left:0;top:0;margin:0;position:absolute;width:100%;height:100%;border:0;background:0 0;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;outline:0;pointer-events:none}.toggle-icon[data-ion-toggle-ios]{border-radius:16px;display:block;position:relative;width:100%;height:100%;-webkit-transition:background-color .3s;transition:background-color .3s;background-color:var(--ion-background-color-step-50,#f2f2f2);overflow:hidden;pointer-events:none}.toggle-icon[data-ion-toggle-ios]::before{left:2px;right:2px;top:2px;bottom:2px;border-radius:16px;position:absolute;-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1);-webkit-transition:-webkit-transform .3s;transition:-webkit-transform .3s;transition:transform .3s;transition:transform .3s,-webkit-transform .3s;background-color:var(--ion-item-background-color,var(--ion-background-color,#fff));content:""}.toggle-inner[data-ion-toggle-ios]{left:2px;top:2px;border-radius:14px;position:absolute;width:28px;height:28px;-webkit-transition:width 120ms ease-in-out 80ms,left 110ms ease-in-out 80ms,right 110ms ease-in-out 80ms,-webkit-transform .3s;transition:width 120ms ease-in-out 80ms,left 110ms ease-in-out 80ms,right 110ms ease-in-out 80ms,-webkit-transform .3s;transition:transform .3s,width 120ms ease-in-out 80ms,left 110ms ease-in-out 80ms,right 110ms ease-in-out 80ms;transition:transform .3s,width 120ms ease-in-out 80ms,left 110ms ease-in-out 80ms,right 110ms ease-in-out 80ms,-webkit-transform .3s;background-color:var(--ion-item-background-color,var(--ion-background-color,#fff));-webkit-box-shadow:0 3px 12px rgba(0,0,0,.16),0 3px 1px rgba(0,0,0,.1);box-shadow:0 3px 12px rgba(0,0,0,.16),0 3px 1px rgba(0,0,0,.1);will-change:transform;contain:strict}.toggle-checked[data-ion-toggle-ios-host]   .toggle-icon[data-ion-toggle-ios]{background-color:var(--checked-knob)}.toggle-activated[data-ion-toggle-ios-host]   .toggle-icon[data-ion-toggle-ios]::before, .toggle-checked[data-ion-toggle-ios-host]   .toggle-icon[data-ion-toggle-ios]::before{-webkit-transform:scale3d(0,0,0);transform:scale3d(0,0,0)}.toggle-checked[data-ion-toggle-ios-host]   .toggle-inner[data-ion-toggle-ios]{-webkit-transform:translate3d(19px,0,0);transform:translate3d(19px,0,0)}.toggle-activated.toggle-checked[data-ion-toggle-ios-host]   .toggle-inner[data-ion-toggle-ios]::before{-webkit-transform:scale3d(0,0,0);transform:scale3d(0,0,0)}.toggle-activated[data-ion-toggle-ios-host]   .toggle-inner[data-ion-toggle-ios]{width:34px}.toggle-activated.toggle-checked[data-ion-toggle-ios-host]   .toggle-inner[data-ion-toggle-ios]{left:-4px}.toggle-disabled[data-ion-toggle-ios-host]{opacity:.3;pointer-events:none}.in-item[slot][data-ion-toggle-ios-host]{margin:0;padding:6px 8px 5px 16px}.in-item[slot=start][data-ion-toggle-ios-host]{padding:6px 16px 5px 0}'},enumerable:!0,configurable:!0}),Object.defineProperty(t,"styleMode",{get:function(){return"ios"},enumerable:!0,configurable:!0}),t}();function c(t,e,o){var i="rtl"===document.dir;return t?!i&&o>e||i&&-o<e:!i&&-o<e||i&&o>e}var l=0}}]);