text: (function(global,factory){typeof exports==="object"&&typeof module!=="undefined"?factory(exports,require("@angular/core"),require("@angular/common")):typeof define==="function"&&define.amd?define(["exports","@angular/core","@angular/common"],factory):factory((global.zef=global.zef||{},global.zef.ngxColorPicker={}),global.ng.core,global.ng.common)})(this,function(exports,core,common){"use strict";var ColorFormats={HEX:0,RGBA:1,HSLA:2};ColorFormats[ColorFormats.HEX]="HEX";ColorFormats[ColorFormats.RGBA]="RGBA";ColorFormats[ColorFormats.HSLA]="HSLA";var Cmyk=function(){function Cmyk(c,m,y,k){this.c=c;this.m=m;this.y=y;this.k=k}return Cmyk}();var Hsla=function(){function Hsla(h,s,l,a){this.h=h;this.s=s;this.l=l;this.a=a}return Hsla}();var Hsva=function(){function Hsva(h,s,v,a){this.h=h;this.s=s;this.v=v;this.a=a}return Hsva}();var Rgba=function(){function Rgba(r,g,b,a){this.r=r;this.g=g;this.b=b;this.a=a}return Rgba}();function detectIE(){var ua="";if(typeof navigator!=="undefined"){ua=navigator.userAgent.toLowerCase()}var msie=ua.indexOf("msie ");if(msie>0){return parseInt(ua.substring(msie+5,ua.indexOf(".",msie)),10)}return false}var TextDirective=function(){function TextDirective(){this.newValue=new core.EventEmitter}TextDirective.prototype.inputChange=function(event){var value=event.target.value;if(this.rg===undefined){this.newValue.emit(value)}else{var numeric=parseFloat(value);if(!isNaN(numeric)&&numeric>=0&&numeric<=this.rg){this.newValue.emit({v:numeric,rg:this.rg})}}};TextDirective.decorators=[{type:core.Directive,args:[{selector:"[text]"}]}];TextDirective.propDecorators={rg:[{type:core.Input}],text:[{type:core.Input}],newValue:[{type:core.Output}],inputChange:[{type:core.HostListener,args:["input",["$event"]]}]};return TextDirective}();var SliderDirective=function(){function SliderDirective(elRef){var _this=this;this.elRef=elRef;this.dragEnd=new core.EventEmitter;this.dragStart=new core.EventEmitter;this.newValue=new core.EventEmitter;this.listenerMove=function(event){return _this.move(event)};this.listenerStop=function(){return _this.stop()}}SliderDirective.prototype.mouseDown=function(event){this.start(event)};SliderDirective.prototype.touchStart=function(event){this.start(event)};SliderDirective.prototype.move=function(event){event.preventDefault();this.setCursor(event)};SliderDirective.prototype.start=function(event){this.setCursor(event);document.addEventListener("mouseup",this.listenerStop);document.addEventListener("touchend",this.listenerStop);document.addEventListener("mousemove",this.listenerMove);document.addEventListener("touchmove",this.listenerMove);this.dragStart.emit()};SliderDirective.prototype.stop=function(){document.removeEventListener("mouseup",this.listenerStop);document.removeEventListener("touchend",this.listenerStop);document.removeEventListener("mousemove",this.listenerMove);document.removeEventListener("touchmove",this.listenerMove);this.dragEnd.emit()};SliderDirective.prototype.getX=function(event){var position=this.elRef.nativeElement.getBoundingClientRect();var pageX=event.pageX!==undefined?event.pageX:event.touches[0].pageX;return pageX-position.left-window.pageXOffset};SliderDirective.prototype.getY=function(event){var position=this.elRef.nativeElement.getBoundingClientRect();var pageY=event.pageY!==undefined?event.pageY:event.touches[0].pageY;return pageY-position.top-window.pageYOffset};SliderDirective.prototype.setCursor=function(event){var width=this.elRef.nativeElement.offsetWidth;var height=this.elRef.nativeElement.offsetHeight;var x=Math.max(0,Math.min(this.getX(event),width));var y=Math.max(0,Math.min(this.getY(event),height));if(this.rgX!==undefined&&this.rgY!==undefined){this.newValue.emit({s:x/width,v:1-y/height,rgX:this.rgX,rgY:this.rgY})}else if(this.rgX===undefined&&this.rgY!==undefined){this.newValue.emit({v:y/height,rgY:this.rgY})}else if(this.rgX!==undefined&&this.rgY===undefined){this.newValue.emit({v:x/width,rgX:this.rgX})}};SliderDirective.decorators=[{type:core.Directive,args:[{selector:"[slider]"}]}];SliderDirective.ctorParameters=function(){return[{type:core.ElementRef}]};SliderDirective.propDecorators={rgX:[{type:core.Input}],rgY:[{type:core.Input}],slider:[{type:core.Input}],dragEnd:[{type:core.Output}],dragStart:[{type:core.Output}],newValue:[{type:core.Output}],mouseDown:[{type:core.HostListener,args:["mousedown",["$event"]]}],touchStart:[{type:core.HostListener,args:["touchstart",["$event"]]}]};return SliderDirective}();var SliderPosition=function(){function SliderPosition(h,s,v,a){this.h=h;this.s=s;this.v=v;this.a=a}return SliderPosition}();var SliderDimension=function(){function SliderDimension(h,s,v,a){this.h=h;this.s=s;this.v=v;this.a=a}return SliderDimension}();var ColorPickerService=function(){function ColorPickerService(){this.active=null}ColorPickerService.prototype.setActive=function(active){if(this.active&&this.active!==active&&this.active.cpDialogDisplay!=="inline"){this.active.closeDialog()}this.active=active};ColorPickerService.prototype.hsva2hsla=function(hsva){var h=hsva.h;var s=hsva.s;var v=hsva.v;var a=hsva.a;if(v===0){return new Hsla(h,0,0,a)}else if(s===0&&v===1){return new Hsla(h,1,1,a)}else{var l=v*(2-s)/2;return new Hsla(h,v*s/(1-Math.abs(2*l-1)),l,a)}};ColorPickerService.prototype.hsla2hsva=function(hsla){var h=Math.min(hsla.h,1);var s=Math.min(hsla.s,1);var l=Math.min(hsla.l,1);var a=Math.min(hsla.a,1);if(l===0){return new Hsva(h,0,0,a)}else{var v=l+s*(1-Math.abs(2*l-1))/2;return new Hsva(h,2*(v-l)/v,v,a)}};ColorPickerService.prototype.hsvaToRgba=function(hsva){var r;var g;var b;var h=hsva.h;var s=hsva.s;var v=hsva.v;var a=hsva.a;var i=Math.floor(h*6);var f=h*6-i;var p=v*(1-s);var q=v*(1-f*s);var t=v*(1-(1-f)*s);switch(i%6){case 0:r=v,g=t,b=p;break;case 1:r=q,g=v,b=p;break;case 2:r=p,g=v,b=t;break;case 3:r=p,g=q,b=v;break;case 4:r=t,g=p,b=v;break;case 5:r=v,g=p,b=q;break;default:r=0,g=0,b=0}return new Rgba(r,g,b,a)};ColorPickerService.prototype.rgbaToCmyk=function(rgba){var k=1-Math.max(rgba.r,rgba.g,rgba.b);if(k===1){return new Cmyk(0,0,0,1)}else{var c=(1-rgba.r-k)/(1-k);var m=(1-rgba.g-k)/(1-k);var y=(1-rgba.b-k)/(1-k);return new Cmyk(c,m,y,k)}};ColorPickerService.prototype.rgbaToHsva=function(rgba){var h;var s;var r=Math.min(rgba.r,1);var g=Math.min(rgba.g,1);var b=Math.min(rgba.b,1);var a=Math.min(rgba.a,1);var max=Math.max(r,g,b);var min=Math.min(r,g,b);var v=max;var d=max-min;s=max===0?0:d/max;if(max===min){h=0}else{switch(max){case r:h=(g-b)/d+(g<b?6:0);break;case g:h=(b-r)/d+2;break;case b:h=(r-g)/d+4;break;default:h=0}h/=6}return new Hsva(h,s,v,a)};ColorPickerService.prototype.rgbaToHex=function(rgba,allowHex8){var hex="#"+(1<<24|rgba.r<<16|rgba.g<<8|rgba.b).toString(16).substr(1);if(allowHex8){hex+=(1<<8|Math.round(rgba.a*255)).toString(16).substr(1)}return hex};ColorPickerService.prototype.denormalizeRGBA=function(rgba){return new Rgba(Math.round(rgba.r*255),Math.round(rgba.g*255),Math.round(rgba.b*255),rgba.a)};ColorPickerService.prototype.stringToHsva=function(colorString,allowHex8){if(colorString===void 0){colorString=""}if(allowHex8===void 0){allowHex8=false}var hsva=null;colorString=(colorString||"").toLowerCase();var stringParsers=[{re:/(rgb)a?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*%?,\s*(\d{1,3})\s*%?(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,parse:function(execResult){return new Rgba(parseInt(execResult[2],10)/255,parseInt(execResult[3],10)/255,parseInt(execResult[4],10)/255,isNaN(parseFloat(execResult[5]))?1:parseFloat(execResult[5]))}},{re:/(hsl)a?\(\s*(\d{1,3})\s*,\s*(\d{1,3})%\s*,\s*(\d{1,3})%\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,parse:function(execResult){return new Hsla(parseInt(execResult[2],10)/360,parseInt(execResult[3],10)/100,parseInt(execResult[4],10)/100,isNaN(parseFloat(execResult[5]))?1:parseFloat(execResult[5]))}}];if(allowHex8){stringParsers.push({re:/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})?$/,parse:function(execResult){return new Rgba(parseInt(execResult[1],16)/255,parseInt(execResult[2],16)/255,parseInt(execResult[3],16)/255,parseInt(execResult[4]||"FF",16)/255)}})}else{stringParsers.push({re:/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})$/,parse:function(execResult){return new Rgba(parseInt(execResult[1],16)/255,parseInt(execResult[2],16)/255,parseInt(execResult[3],16)/255,1)}})}stringParsers.push({re:/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])$/,parse:function(execResult){return new Rgba(parseInt(execResult[1]+execResult[1],16)/255,parseInt(execResult[2]+execResult[2],16)/255,parseInt(execResult[3]+execResult[3],16)/255,1)}});for(var key in stringParsers){if(stringParsers.hasOwnProperty(key)){var parser=stringParsers[key];var match=parser.re.exec(colorString);var color=match&&parser.parse(match);if(color){if(color instanceof Rgba){hsva=this.rgbaToHsva(color)}else if(color instanceof Hsla){hsva=this.hsla2hsva(color)}return hsva}}}return hsva};ColorPickerService.prototype.outputFormat=function(hsva,outputFormat,alphaChannel){switch(outputFormat){case"hsla":var hsla=this.hsva2hsla(hsva);var hslaText=new Hsla(Math.round(hsla.h*360),Math.round(hsla.s*100),Math.round(hsla.l*100),Math.round(hsla.a*100)/100);if(hsva.a<1||alphaChannel==="always"){return"hsla("+hslaText.h+","+hslaText.s+"%,"+hslaText.l+"%,"+hslaText.a+")"}else{return"hsl("+hslaText.h+","+hslaText.s+"%,"+hslaText.l+"%)"}case"rgba":var rgba=this.denormalizeRGBA(this.hsvaToRgba(hsva));if(hsva.a<1||alphaChannel==="always"){return"rgba("+rgba.r+","+rgba.g+","+rgba.b+","+Math.round(rgba.a*100)/100+")"}else{return"rgb("+rgba.r+","+rgba.g+","+rgba.b+")"}default:var allowHex8=alphaChannel==="always"||alphaChannel==="forced";return this.rgbaToHex(this.denormalizeRGBA(this.hsvaToRgba(hsva)),allowHex8)}};ColorPickerService.decorators=[{type:core.Injectable}];ColorPickerService.ctorParameters=function(){return[]};return ColorPickerService}();var ColorPickerComponent=function(){function ColorPickerComponent(elRef,cdRef,service){this.elRef=elRef;this.cdRef=cdRef;this.service=service;this.isIE10=false;this.dialogArrowSize=10;this.dialogArrowOffset=15;this.dialogInputFields=[ColorFormats.HEX,ColorFormats.RGBA,ColorFormats.HSLA];this.useRootViewContainer=false}ColorPickerComponent.prototype.handleEsc=function(event){if(this.show&&this.cpDialogDisplay==="popup"){this.onCancelColor(event)}};ColorPickerComponent.prototype.handleEnter=function(event){if(this.show&&this.cpDialogDisplay==="popup"){this.onAcceptColor(event)}};ColorPickerComponent.prototype.ngOnInit=function(){var _this=this;this.slider=new SliderPosition(0,0,0,0);var hueWidth=this.hueSlider.nativeElement.offsetWidth||140;var alphaWidth=this.alphaSlider.nativeElement.offsetWidth||140;this.sliderDimMax=new SliderDimension(hueWidth,this.cpWidth,130,alphaWidth);if(this.cpOutputFormat==="rgba"){this.format=ColorFormats.RGBA}else if(this.cpOutputFormat==="hsla"){this.format=ColorFormats.HSLA}else{this.format=ColorFormats.HEX}if(this.cpOutputFormat==="auto"){this.cpOutputFormat=this.cpAlphaChannel!=="disabled"?"rgba":"hex"}this.listenerMouseDown=function(event){_this.onMouseDown(event)};this.listenerResize=function(){_this.onResize()};this.openDialog(this.initialColor,false)};ColorPickerComponent.prototype.ngOnDestroy=function(){this.closeDialog()};ColorPickerComponent.prototype.ngAfterViewInit=function(){if(this.cpWidth!==230){var hueWidth=this.hueSlider.nativeElement.offsetWidth||140;var alphaWidth=this.alphaSlider.nativeElement.offsetWidth||140;this.sliderDimMax=new SliderDimension(hueWidth,this.cpWidth,130,alphaWidth);this.updateColorPicker(false);this.cdRef.detectChanges()}};ColorPickerComponent.prototype.openDialog=function(color,emit){if(emit===void 0){emit=true}this.service.setActive(this);if(!this.width){this.cpWidth=this.directiveElementRef.nativeElement.offsetWidth}if(!this.height){this.height=320}this.setInitialColor(color);this.setColorFromString(color,emit);this.openColorPicker()};ColorPickerComponent.prototype.closeDialog=function(){this.closeColorPicker()};ColorPickerComponent.prototype.setupDialog=function(instance,elementRef,color,cpWidth,cpHeight,cpDialogDisplay,cpFallbackColor,cpAlphaChannel,cpOutputFormat,cpDisableInput,cpIgnoredElements,cpSaveClickOutside,cpUseRootViewContainer,cpPosition,cpPositionOffset,cpPositionRelativeToArrow,cpPresetLabel,cpPresetColors,cpMaxPresetColorsLength,cpPresetEmptyMessage,cpPresetEmptyMessageClass,cpOKButton,cpOKButtonClass,cpOKButtonText,cpCancelButton,cpCancelButtonClass,cpCancelButtonText,cpAddColorButton,cpAddColorButtonClass,cpAddColorButtonText,cpRemoveColorButtonClass){this.setInitialColor(color);this.isIE10=detectIE()===10;this.directiveInstance=instance;this.directiveElementRef=elementRef;this.cpDisableInput=cpDisableInput;this.cpAlphaChannel=cpAlphaChannel;this.cpOutputFormat=cpOutputFormat;this.cpDialogDisplay=cpDialogDisplay;this.cpIgnoredElements=cpIgnoredElements;this.cpSaveClickOutside=cpSaveClickOutside;this.useRootViewContainer=cpUseRootViewContainer;this.width=this.cpWidth=parseInt(cpWidth,10);this.height=this.cpHeight=parseInt(cpHeight,10);this.cpPosition=cpPosition;this.cpPositionOffset=parseInt(cpPositionOffset,10);this.cpOKButton=cpOKButton;this.cpOKButtonText=cpOKButtonText;this.cpOKButtonClass=cpOKButtonClass;this.cpCancelButton=cpCancelButton;this.cpCancelButtonText=cpCancelButtonText;this.cpCancelButtonClass=cpCancelButtonClass;this.fallbackColor=cpFallbackColor||"#fff";this.setPresetConfig(cpPresetLabel,cpPresetColors);this.cpMaxPresetColorsLength=cpMaxPresetColorsLength;this.cpPresetEmptyMessage=cpPresetEmptyMessage;this.cpPresetEmptyMessageClass=cpPresetEmptyMessageClass;this.cpAddColorButton=cpAddColorButton;this.cpAddColorButtonText=cpAddColorButtonText;this.cpAddColorButtonClass=cpAddColorButtonClass;this.cpRemoveColorButtonClass=cpRemoveColorButtonClass;if(!cpPositionRelativeToArrow){this.dialogArrowOffset=0}if(cpDialogDisplay==="inline"){this.dialogArrowSize=0;this.dialogArrowOffset=0}if(cpOutputFormat==="hex"&&cpAlphaChannel!=="always"&&cpAlphaChannel!=="forced"){this.cpAlphaChannel="disabled"}};ColorPickerComponent.prototype.setInitialColor=function(color){this.initialColor=color};ColorPickerComponent.prototype.setPresetConfig=function(cpPresetLabel,cpPresetColors){this.cpPresetLabel=cpPresetLabel;this.cpPresetColors=cpPresetColors};ColorPickerComponent.prototype.setColorFromString=function(value,emit,update){if(emit===void 0){emit=true}if(update===void 0){update=true}var hsva;if(this.cpAlphaChannel==="always"||this.cpAlphaChannel==="forced"){hsva=this.service.stringToHsva(value,true);if(!hsva&&!this.hsva){hsva=this.service.stringToHsva(value,false)}}else{hsva=this.service.stringToHsva(value,false)}if(!hsva&&!this.hsva){hsva=this.service.stringToHsva(this.fallbackColor,false)}if(hsva){this.hsva=hsva;this.sliderH=this.hsva.h;this.updateColorPicker(emit,update)}};ColorPickerComponent.prototype.onResize=function(){if(this.position==="fixed"){this.setDialogPosition()}else if(this.cpDialogDisplay!=="inline"){this.closeColorPicker()}};ColorPickerComponent.prototype.onDragEnd=function(slider){this.directiveInstance.sliderDragEnd({slider:slider,color:this.outputColor})};ColorPickerComponent.prototype.onDragStart=function(slider){this.directiveInstance.sliderDragStart({slider:slider,color:this.outputColor})};ColorPickerComponent.prototype.onMouseDown=function(event){if(!this.isIE10&&this.cpDialogDisplay==="popup"&&event.target!==this.directiveElementRef.nativeElement&&!this.isDescendant(this.elRef.nativeElement,event.target)&&!this.isDescendant(this.directiveElementRef.nativeElement,event.target)&&this.cpIgnoredElements.filter(function(item){return item===event.target}).length===0){if(!this.cpSaveClickOutside){this.setColorFromString(this.initialColor,false);this.directiveInstance.colorChanged(this.initialColor)}this.closeColorPicker()}};ColorPickerComponent.prototype.onAcceptColor=function(event){event.stopPropagation();if(this.cpDialogDisplay==="popup"){this.closeColorPicker()}if(this.outputColor){this.directiveInstance.colorSelected(this.outputColor)}};ColorPickerComponent.prototype.onCancelColor=function(event){event.stopPropagation();this.setColorFromString(this.initialColor,true);if(this.cpDialogDisplay==="popup"){this.directiveInstance.colorChanged(this.initialColor,true);this.closeColorPicker()}this.directiveInstance.colorCanceled()};ColorPickerComponent.prototype.onFormatToggle=function(){var nextFormat=(this.dialogInputFields.indexOf(this.format)+1)%this.dialogInputFields.length;this.format=this.dialogInputFields[nextFormat]};ColorPickerComponent.prototype.onColorChange=function(value){this.hsva.s=value.s/value.rgX;this.hsva.v=value.v/value.rgY;this.updateColorPicker();this.directiveInstance.sliderChanged({slider:"lightness",value:this.hsva.v,color:this.outputColor});this.directiveInstance.sliderChanged({slider:"saturation",value:this.hsva.s,color:this.outputColor})};ColorPickerComponent.prototype.onHueChange=function(value){this.hsva.h=value.v/value.rgX;this.sliderH=this.hsva.h;this.updateColorPicker();this.directiveInstance.sliderChanged({slider:"hue",value:this.hsva.h,color:this.outputColor})};ColorPickerComponent.prototype.onAlphaChange=function(value){this.hsva.a=value.v/value.rgX;this.updateColorPicker();this.directiveInstance.sliderChanged({slider:"alpha",value:this.hsva.a,color:this.outputColor})};ColorPickerComponent.prototype.onHexInput=function(value){if(value===null){this.updateColorPicker()}else{if(value&&value[0]!=="#"){value="#"+value}var validHex=/^#([a-f0-9]{3}|[a-f0-9]{6})$/gi;if(this.cpAlphaChannel==="always"){validHex=/^#([a-f0-9]{3}|[a-f0-9]{6}|[a-f0-9]{8})$/gi}if(validHex.test(value)){if(value.length<5){value="#"+value.substring(1).split("").map(function(c){return c+c}).join("")}if(this.cpAlphaChannel==="forced"){value+=Math.round(this.hsva.a*255).toString(16)}this.setColorFromString(value,true,false);this.directiveInstance.inputChanged({input:"hex",value:value,color:this.outputColor})}}};ColorPickerComponent.prototype.onRedInput=function(value){var rgba=this.service.hsvaToRgba(this.hsva);rgba.r=value.v/value.rg;this.hsva=this.service.rgbaToHsva(rgba);this.sliderH=this.hsva.h;this.updateColorPicker();this.directiveInstance.inputChanged({input:"red",value:rgba.r,color:this.outputColor})};ColorPickerComponent.prototype.onBlueInput=function(value){var rgba=this.service.hsvaToRgba(this.hsva);rgba.b=value.v/value.rg;this.hsva=this.service.rgbaToHsva(rgba);this.sliderH=this.hsva.h;this.updateColorPicker();this.directiveInstance.inputChanged({input:"blue",value:rgba.b,color:this.outputColor})};ColorPickerComponent.prototype.onGreenInput=function(value){var rgba=this.service.hsvaToRgba(this.hsva);rgba.g=value.v/value.rg;this.hsva=this.service.rgbaToHsva(rgba);this.sliderH=this.hsva.h;this.updateColorPicker();this.directiveInstance.inputChanged({input:"green",value:rgba.g,color:this.outputColor})};ColorPickerComponent.prototype.onAlphaInput=function(value){this.hsva.a=value.v/value.rg;this.updateColorPicker();this.directiveInstance.inputChanged({input:"alpha",value:this.hsva.a,color:this.outputColor})};ColorPickerComponent.prototype.onHueInput=function(value){this.hsva.h=value.v/value.rg;this.sliderH=this.hsva.h;this.updateColorPicker();this.directiveInstance.inputChanged({input:"hue",value:this.hsva.h,color:this.outputColor})};ColorPickerComponent.prototype.onLightnessInput=function(value){var hsla=this.service.hsva2hsla(this.hsva);hsla.l=value.v/value.rg;this.hsva=this.service.hsla2hsva(hsla);this.sliderH=this.hsva.h;this.updateColorPicker();this.directiveInstance.inputChanged({input:"lightness",value:hsla.l,color:this.outputColor})};ColorPickerComponent.prototype.onSaturationInput=function(value){var hsla=this.service.hsva2hsla(this.hsva);hsla.s=value.v/value.rg;this.hsva=this.service.hsla2hsva(hsla);this.sliderH=this.hsva.h;this.updateColorPicker();this.directiveInstance.inputChanged({input:"saturation",value:hsla.s,color:this.outputColor})};ColorPickerComponent.prototype.onAddPresetColor=function(event,value){event.stopPropagation();if(!this.cpPresetColors.filter(function(color){return color===value}).length){this.cpPresetColors=this.cpPresetColors.concat(value);this.directiveInstance.presetColorsChanged(this.cpPresetColors)}};ColorPickerComponent.prototype.onRemovePresetColor=function(event,value){event.stopPropagation();this.cpPresetColors=this.cpPresetColors.filter(function(color){return color!==value});this.directiveInstance.presetColorsChanged(this.cpPresetColors)};ColorPickerComponent.prototype.openColorPicker=function(){var _this=this;if(!this.show){this.show=true;this.hidden=true;setTimeout(function(){_this.hidden=false;_this.setDialogPosition();_this.cdRef.detectChanges()},0);this.directiveInstance.stateChanged(true);if(!this.isIE10){document.addEventListener("mousedown",this.listenerMouseDown)}window.addEventListener("resize",this.listenerResize)}};ColorPickerComponent.prototype.closeColorPicker=function(){if(this.show){this.show=false;this.directiveInstance.stateChanged(false);if(!this.isIE10){document.removeEventListener("mousedown",this.listenerMouseDown)}window.removeEventListener("resize",this.listenerResize);if(!this.cdRef["destroyed"]){this.cdRef.detectChanges()}}};ColorPickerComponent.prototype.updateColorPicker=function(emit,update){if(emit===void 0){emit=true}if(update===void 0){update=true}if(this.sliderDimMax){var lastOutput=this.outputColor;var hsla=this.service.hsva2hsla(this.hsva);var rgba=this.service.denormalizeRGBA(this.service.hsvaToRgba(this.hsva));var hue=this.service.denormalizeRGBA(this.service.hsvaToRgba(new Hsva(this.sliderH||this.hsva.h,1,1,1)));if(update){this.hslaText=new Hsla(Math.round(hsla.h*360),Math.round(hsla.s*100),Math.round(hsla.l*100),Math.round(hsla.a*100)/100);this.rgbaText=new Rgba(rgba.r,rgba.g,rgba.b,Math.round(rgba.a*100)/100);var allowHex8=this.cpAlphaChannel==="always";this.hexText=this.service.rgbaToHex(rgba,allowHex8);this.hexAlpha=this.rgbaText.a}this.hueSliderColor="rgb("+hue.r+","+hue.g+","+hue.b+")";this.alphaSliderColor="rgb("+rgba.r+","+rgba.g+","+rgba.b+")";this.outputColor=this.service.outputFormat(this.hsva,this.cpOutputFormat,this.cpAlphaChannel);this.selectedColor=this.service.outputFormat(this.hsva,"rgba",null);this.slider=new SliderPosition((this.sliderH||this.hsva.h)*this.sliderDimMax.h-8,this.hsva.s*this.sliderDimMax.s-8,(1-this.hsva.v)*this.sliderDimMax.v-8,this.hsva.a*this.sliderDimMax.a-8);if(emit&&lastOutput!==this.outputColor){this.directiveInstance.colorChanged(this.outputColor)}}};ColorPickerComponent.prototype.setDialogPosition=function(){if(this.cpDialogDisplay==="inline"){this.position="relative"}else{var position="static";var transform="";var style=void 0;var parentNode=null;var transformNode=null;var node=this.directiveElementRef.nativeElement.parentNode;var dialogHeight=this.dialogElement.nativeElement.offsetHeight;while(node!==null&&node.tagName!=="HTML"){style=window.getComputedStyle(node);position=style.getPropertyValue("position");transform=style.getPropertyValue("transform");if(position!=="static"&&parentNode===null){parentNode=node}if(transform&&transform!=="none"&&transformNode===null){transformNode=node}if(position==="fixed"){parentNode=transformNode;break}node=node.parentNode}var boxDirective=this.createDialogBox(this.directiveElementRef.nativeElement,position!=="fixed");if(this.useRootViewContainer||position==="fixed"&&(!parentNode||parentNode instanceof HTMLUnknownElement)){this.top=boxDirective.top;this.left=boxDirective.left}else{if(parentNode===null){parentNode=node}var boxParent=this.createDialogBox(parentNode,position!=="fixed");this.top=boxDirective.top-boxParent.top;this.left=boxDirective.left-boxParent.left}if(position==="fixed"){this.position="fixed"}if(this.cpPosition==="left"){this.top+=boxDirective.height*this.cpPositionOffset/100-this.dialogArrowOffset;this.left-=this.cpWidth+this.dialogArrowSize-2}else if(this.cpPosition==="top"){this.arrowTop=dialogHeight-1;this.top-=dialogHeight+this.dialogArrowSize;this.left+=this.cpPositionOffset/100*boxDirective.width-this.dialogArrowOffset}else if(this.cpPosition==="bottom"){this.top+=boxDirective.height+this.dialogArrowSize;this.left+=this.cpPositionOffset/100*boxDirective.width-this.dialogArrowOffset}else{this.top+=boxDirective.height*this.cpPositionOffset/100-this.dialogArrowOffset;this.left+=boxDirective.width+this.dialogArrowSize-2}}};ColorPickerComponent.prototype.isDescendant=function(parent,child){var node=child.parentNode;while(node!==null){if(node===parent){return true}node=node.parentNode}return false};ColorPickerComponent.prototype.createDialogBox=function(element,offset){return{top:element.getBoundingClientRect().top+(offset?window.pageYOffset:0),left:element.getBoundingClientRect().left+(offset?window.pageXOffset:0),width:element.offsetWidth,height:element.offsetHeight}};ColorPickerComponent.decorators=[{type:core.Component,args:[{selector:"color-picker",template:'<div #dialogPopup class="color-picker" [style.visibility]="hidden || !show ? \'hidden\' : \'visible\'" [style.top.px]="top" [style.left.px]="left" [style.position]="position" [style.height.px]="cpHeight" [style.width.px]="cpWidth">\n  <div *ngIf="cpDialogDisplay==\'popup\'" class="arrow arrow-{{cpPosition}}" [style.top.px]="arrowTop"></div>\n\n  <div class="saturation-lightness" [slider] [rgX]="1" [rgY]="1" [style.background-color]="hueSliderColor" (newValue)="onColorChange($event)" (dragStart)="onDragStart(\'saturation-lightness\')" (dragEnd)="onDragEnd(\'saturation-lightness\')">\n    <div class="cursor" [style.top.px]="slider.v" [style.left.px]="slider.s"></div>\n  </div>\n\n  <div class="hue-alpha box">\n    <div class="left">\n      <div class="selected-color-background"></div>\n\n      <div class="selected-color" [style.background-color]="selectedColor"></div>\n\n      <button *ngIf="cpAddColorButton" class="{{cpAddColorButtonClass}}" [disabled]="cpPresetColors && cpPresetColors.length >= cpMaxPresetColorsLength" (click)="onAddPresetColor($event, selectedColor)">\n        {{cpAddColorButtonText}}\n      </button>\n    </div>\n\n    <div class="right">\n      <div *ngIf="cpAlphaChannel===\'disabled\'" style="height: 16px;"></div>\n\n      <div #hueSlider class="hue" [slider] [rgX]="1" (newValue)="onHueChange($event)" (dragStart)="onDragStart(\'hue\')" (dragEnd)="onDragEnd(\'hue\')">\n        <div class="cursor" [style.left.px]="slider.h"></div>\n      </div>\n\n      <div #alphaSlider class="alpha" [slider] [rgX]="1" [style.display]="cpAlphaChannel === \'disabled\' ? \'none\' : \'block\'" [style.background-color]="alphaSliderColor" (newValue)="onAlphaChange($event)" (dragStart)="onDragStart(\'alpha\')" (dragEnd)="onDragEnd(\'alpha\')">\n        <div class="cursor" [style.left.px]="slider.a"></div>\n      </div>\n    </div>\n  </div>\n\n  <div *ngIf="!cpDisableInput" class="hsla-text" [style.display]="format !== 2 ? \'none\' : \'block\'">\n    <div class="box">\n      <input type="number" pattern="[0-9]*" min="0" max="360" [text] [rg]="360" [value]="hslaText?.h" (keyup.enter)="onAcceptColor($event)" (newValue)="onHueInput($event)"/>\n      <input type="number" pattern="[0-9]*" min="0" max="100" [text] [rg]="100" [value]="hslaText?.s" (keyup.enter)="onAcceptColor($event)" (newValue)="onSaturationInput($event)"/>\n      <input type="number" pattern="[0-9]*" min="0" max="100" [text] [rg]="100" [value]="hslaText?.l" (keyup.enter)="onAcceptColor($event)" (newValue)="onLightnessInput($event)"/>\n      <input *ngIf="cpAlphaChannel!==\'disabled\'" type="number" pattern="[0-9]+([\\.,][0-9]{1,2})?" min="0" max="1" step="0.1" [text] [rg]="1" [value]="hslaText?.a" (keyup.enter)="onAcceptColor($event)" (newValue)="onAlphaInput($event)"/>\n    </div>\n\n    <div class="box">\n      <div>H</div><div>S</div><div>L</div><div *ngIf="cpAlphaChannel!==\'disabled\'">A</div>\n    </div>\n  </div>\n\n  <div *ngIf="!cpDisableInput" [style.display]="format !== 1 ? \'none\' : \'block\'" class="rgba-text">\n    <div class="box">\n      <input type="number" pattern="[0-9]*" min="0" max="255" [text] [rg]="255" [value]="rgbaText?.r" (keyup.enter)="onAcceptColor($event)" (newValue)="onRedInput($event)"/>\n      <input type="number" pattern="[0-9]*" min="0" max="255" [text] [rg]="255" [value]="rgbaText?.g" (keyup.enter)="onAcceptColor($event)" (newValue)="onGreenInput($event)"/>\n      <input type="number" pattern="[0-9]*" min="0" max="255" [text] [rg]="255" [value]="rgbaText?.b" (keyup.enter)="onAcceptColor($event)" (newValue)="onBlueInput($event)"/>\n      <input *ngIf="cpAlphaChannel!==\'disabled\'" type="number" pattern="[0-9]+([\\.,][0-9]{1,2})?" min="0" max="1" step="0.1" [text] [rg]="1" [value]="rgbaText?.a" (keyup.enter)="onAcceptColor($event)" (newValue)="onAlphaInput($event)"/>\n    </div>\n\n    <div class="box">\n      <div>R</div><div>G</div><div>B</div><div *ngIf="cpAlphaChannel!==\'disabled\'" >A</div>\n    </div>\n  </div>\n\n  <div *ngIf="!cpDisableInput" class="hex-text" [class.hex-alpha]="cpAlphaChannel===\'forced\'" [style.display]="format !== 0 ? \'none\' : \'block\'">\n    <div class="box">\n      <input [text] [value]="hexText" (blur)="onHexInput(null)" (keyup.enter)="onAcceptColor($event)" (newValue)="onHexInput($event)"/>\n      <input *ngIf="cpAlphaChannel===\'forced\'" type="number" pattern="[0-9]+([\\.,][0-9]{1,2})?" min="0" max="1" step="0.1" [text] [rg]="1" [value]="hexAlpha" (keyup.enter)="onAcceptColor($event)" (newValue)="onAlphaInput($event)"/>\n    </div>\n\n    <div class="box">\n      <div>Hex</div>\n      <div *ngIf="cpAlphaChannel===\'forced\'">A</div>\n    </div>\n  </div>\n\n  <div *ngIf="!cpDisableInput" class="type-policy" (click)="onFormatToggle()"></div>\n\n  <div *ngIf="cpPresetColors?.length || cpAddColorButton" class="preset-area">\n    <hr>\n\n    <div class="preset-label">{{cpPresetLabel}}</div>\n\n    <div *ngIf="cpPresetColors?.length">\n      <div *ngFor="let color of cpPresetColors" class="preset-color" [style.backgroundColor]="color" (click)="setColorFromString(color)">\n        <span *ngIf="cpAddColorButton" class="{{cpRemoveColorButtonClass}}" (click)="onRemovePresetColor($event, color)"></span>\n      </div>\n    </div>\n\n    <div *ngIf="!cpPresetColors?.length && cpAddColorButton" class="{{cpPresetEmptyMessageClass}}">{{cpPresetEmptyMessage}}</div>\n  </div>\n\n  <div *ngIf="cpOKButton || cpCancelButton" class="button-area">\n    <button *ngIf="cpCancelButton" type="button" class="{{cpCancelButtonClass}}" (click)="onCancelColor($event)">{{cpCancelButtonText}}</button>\n\n    <button *ngIf="cpOKButton" type="button" class="{{cpOKButtonClass}}" (click)="onAcceptColor($event)">{{cpOKButtonText}}</button>\n  </div>\n</div>\n',encapsulation:core.ViewEncapsulation.None,styles:[".color-picker {\n  position: absolute;\n  z-index: 100000;\n\n  width: 230px;\n  height: auto;\n  border: #777 solid 1px;\n\n  cursor: default;\n\n  -webkit-user-select: none;\n  -khtml-user-select: none;\n  -moz-user-select: none;\n  -ms-user-select: none;\n\n  user-select: none;\n  background-color: #fff;\n}\n\n.color-picker * {\n  -webkit-box-sizing: border-box;\n  -moz-box-sizing: border-box;\n\n  box-sizing: border-box;\n  margin: 0;\n\n  font-size: 11px;\n}\n\n.color-picker input {\n  width: 0;\n  height: 26px;\n  min-width: 0;\n\n  font-size: 13px;\n  text-align: center;\n  color: #000;\n}\n\n.color-picker input:invalid,\n.color-picker input:-moz-ui-invalid,\n.color-picker input:-moz-submit-invalid {\n  box-shadow: none;\n}\n\n.color-picker input::-webkit-inner-spin-button,\n.color-picker input::-webkit-outer-spin-button {\n  margin: 0;\n\n  -webkit-appearance: none;\n}\n\n.color-picker .arrow {\n  position: absolute;\n  z-index: 999999;\n\n  width: 0;\n  height: 0;\n  border-style: solid;\n}\n\n.color-picker .arrow.arrow-top {\n  left: 8px;\n\n  border-width: 10px 5px;\n  border-color: #777 rgba(0, 0, 0, 0) rgba(0, 0, 0, 0) rgba(0, 0, 0, 0);\n}\n\n.color-picker .arrow.arrow-left {\n  top: 8px;\n  left: 100%;\n\n  border-width: 5px 10px;\n  border-color: rgba(0, 0, 0, 0) rgba(0, 0, 0, 0) rgba(0, 0, 0, 0) #777;\n}\n\n.color-picker .arrow.arrow-right {\n  top: 8px;\n  left: -20px;\n\n  border-width: 5px 10px;\n  border-color: rgba(0, 0, 0, 0) #777 rgba(0, 0, 0, 0) rgba(0, 0, 0, 0);\n}\n\n.color-picker .arrow.arrow-bottom {\n  top: -20px;\n  left: 8px;\n\n  border-width: 10px 5px;\n  border-color: rgba(0, 0, 0, 0) rgba(0, 0, 0, 0) #777 rgba(0, 0, 0, 0);\n}\n\n.color-picker .cursor {\n  position: relative;\n\n  width: 16px;\n  height: 16px;\n  border: #222 solid 2px;\n  border-radius: 50%;\n\n  cursor: default;\n}\n\n.color-picker .box {\n  display: flex;\n  padding: 4px 8px;\n}\n\n.color-picker .left {\n  position: relative;\n\n  padding: 16px 8px;\n}\n\n.color-picker .right {\n  -webkit-flex: 1 1 auto;\n  -ms-flex: 1 1 auto;\n\n  flex: 1 1 auto;\n\n  padding: 12px 8px;\n}\n\n.color-picker .button-area {\n  padding: 0 16px 16px;\n\n  text-align: right;\n}\n\n.color-picker .preset-area {\n  padding: 4px 15px;\n}\n\n.color-picker .preset-area .preset-label {\n  overflow: hidden;\n  width: 100%;\n  padding: 4px;\n\n  font-size: 11px;\n  white-space: nowrap;\n  text-align: left;\n  text-overflow: ellipsis;\n  color: #555;\n}\n\n.color-picker .preset-area .preset-color {\n  position: relative;\n\n  display: inline-block;\n  width: 18px;\n  height: 18px;\n  margin: 4px 6px 8px;\n  border: #a9a9a9 solid 1px;\n  border-radius: 25%;\n\n  cursor: pointer;\n}\n\n.color-picker .preset-area .preset-empty-message {\n  min-height: 18px;\n  margin-top: 4px;\n  margin-bottom: 8px;\n\n  font-style: italic;\n  text-align: center;\n}\n\n.color-picker .hex-text {\n  width: 100%;\n  padding: 4px 8px;\n\n  font-size: 11px;\n}\n\n.color-picker .hex-text .box {\n  padding: 0 24px 8px 8px;\n}\n\n.color-picker .hex-text .box div {\n  float: left;\n\n  -webkit-flex: 1 1 auto;\n  -ms-flex: 1 1 auto;\n\n  flex: 1 1 auto;\n\n  text-align: center;\n  color: #555;\n  clear: left;\n}\n\n.color-picker .hex-text .box input {\n  -webkit-flex: 1 1 auto;\n  -ms-flex: 1 1 auto;\n\n  flex: 1 1 auto;\n  padding: 1px;\n  border: #a9a9a9 solid 1px;\n}\n\n.color-picker .hex-alpha .box div:first-child,\n.color-picker .hex-alpha .box input:first-child {\n  flex-grow: 3;\n  margin-right: 8px;\n}\n\n.color-picker .hsla-text,\n.color-picker .rgba-text {\n  width: 100%;\n  padding: 4px 8px;\n\n  font-size: 11px;\n}\n\n.color-picker .hsla-text .box,\n.color-picker .rgba-text .box {\n  padding: 0 24px 8px 8px;\n}\n\n.color-picker .hsla-text .box div,\n.color-picker .rgba-text .box div {\n  -webkit-flex: 1 1 auto;\n  -ms-flex: 1 1 auto;\n\n  flex: 1 1 auto;\n  margin-right: 8px;\n\n  text-align: center;\n  color: #555;\n}\n\n.color-picker .hsla-text .box div:last-child,\n.color-picker .rgba-text .box div:last-child {\n  margin-right: 0;\n}\n\n.color-picker .hsla-text .box input,\n.color-picker .rgba-text .box input {\n  float: left;\n\n  -webkit-flex: 1;\n  -ms-flex: 1;\n\n  flex: 1;\n  padding: 1px;\n  margin: 0 8px 0 0;\n  border: #a9a9a9 solid 1px;\n}\n\n.color-picker .hsla-text .box input:last-child,\n.color-picker .rgba-text .box input:last-child {\n  margin-right: 0;\n}\n\n.color-picker .hue-alpha {\n  margin-bottom: 3px;\n}\n\n.color-picker .hue {\n  direction: ltr;\n\n  width: 100%;\n  height: 16px;\n  margin-bottom: 16px;\n  border: none;\n\n  cursor: pointer;\n  background-size: 100% 100%;\n  background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAAAQCAYAAAD06IYnAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4AIWDwkUFWbCCAAAAFxJREFUaN7t0kEKg0AQAME2x83/n2qu5qCgD1iDhCoYdpnbQC9bbY1qVO/jvc6k3ad91s7/7F1/csgPrujuQ17BDYSFsBAWwgJhISyEBcJCWAgLhIWwEBYIi2f7Ar/1TCgFH2X9AAAAAElFTkSuQmCC');\n}\n\n.color-picker .alpha {\n  direction: ltr;\n\n  width: 100%;\n  height: 16px;\n  border: none;\n\n  cursor: pointer;\n  background-size: 100% 100%;\n  background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAAAQCAYAAAD06IYnAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4AIWDwYQlZMa3gAAAWVJREFUaN7tmEGO6jAQRCsOArHgBpyAJYGjcGocxAm4A2IHpmoWE0eBH+ezmFlNvU06shJ3W6VEelWMUQAIIF9f6qZpimsA1LYtS2uF51/u27YVAFZVRUkEoGHdPV/sIcbIEIIkUdI/9Xa7neyv61+SWFUVAVCSct00TWn2fv6u3+Ecfd3tXzy/0+nEUu+SPjo/kqzrmiQpScN6v98XewfA8/lMkiLJ2WxGSUopcT6fM6U0NX9/frfbjev1WtfrlZfLhYfDQQHG/AIOlnGwjINlHCxjHCzjYJm/TJWdCwquJXseFFzGwDNNeiKMOJTO8xQdDQaeB29+K9efeLaBo9J7vdvtJj1RjFFjfiv7qv95tjx/7leSQgh93e1ffMeIp6O+YQjho/N791t1XVOSSI7N//K+4/GoxWLBx+PB5/Op5XLJ+/3OlJJWqxU3m83ovv5iGf8KjYNlHCxjHCzjYBkHy5gf5gusvQU7U37jTAAAAABJRU5ErkJggg==');\n}\n\n.color-picker .type-policy {\n  position: absolute;\n  top: 218px;\n  right: 12px;\n\n  width: 16px;\n  height: 24px;\n\n  background-size: 8px 16px;\n  background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAAgCAYAAAAffCjxAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAACewAAAnsB01CO3AAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAIASURBVEiJ7ZY9axRRFIafsxMStrLQJpAgpBFhi+C9w1YSo00I6RZ/g9vZpBf/QOr4GyRgkSKNSrAadsZqQGwCkuAWyRZJsySwvhZ7N/vhzrgbLH3Ld8597jlzz50zJokyxXH8DqDVar0qi6v8BbItqSGpEcfxdlmsFWXkvX8AfAVWg3UKPEnT9GKujMzsAFgZsVaCN1VTQd77XUnrgE1kv+6935268WRpzrnHZvYRWC7YvC3pRZZl3wozqtVqiyH9IgjAspkd1Gq1xUJQtVrdB9ZKIAOthdg/Qc65LUk7wNIMoCVJO865rYFhkqjX6/d7vV4GPJwBMqofURS5JEk6FYBer/eeYb/Mo9WwFnPOvQbeAvfuAAK4BN4sAJtAG/gJIElmNuiJyba3EGNmZiPeZuEVmVell/Y/6N+CzDn3AXhEOOo7Hv/3BeAz8IzQkMPnJbuPx1wC+yYJ7/0nYIP5S/0FHKdp+rwCEEXRS/rf5Hl1Gtb2M0iSpCOpCZzPATmX1EySpHMLAsiy7MjMDoHrGSDXZnaYZdnRwBh7J91utwmczAA6CbG3GgPleX4jqUH/a1CktqRGnuc3hSCAMB32gKspkCtgb3KCQMmkjeP4WNJThrNNZval1WptTIsv7JtQ4tmIdRa8qSoEpWl6YWZNoAN0zKxZNPehpLSBZv2t+Q0CJ9lLnARQLAAAAABJRU5ErkJggg==');\n  background-repeat: no-repeat;\n  background-position: center;\n}\n\n.color-picker .selected-color {\n  position: absolute;\n  top: 16px;\n  left: 8px;\n\n  width: 40px;\n  height: 40px;\n  border: 1px solid #a9a9a9;\n  border-radius: 50%;\n}\n\n.color-picker .selected-color-background {\n  width: 40px;\n  height: 40px;\n  border-radius: 50%;\n\n  background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAAh0lEQVRYR+2W0QlAMQgD60zdfwOdqa8TmI/wQMr5K0I5bZLIzLOa2nt37VVVbd+dDx5obgCC3KBLwJ2ff4PnVidkf+ucIhw80HQaCLo3DMH3CRK3iFsmAWVl6hPNDwt8EvNE5q+YuEXcMgkonVM6SdyCoEvAnZ8v1Hjx817MilmxSUB5rdLJDycZgUAZUch/AAAAAElFTkSuQmCC');\n}\n\n.color-picker .saturation-lightness {\n  direction: ltr;\n\n  width: 100%;\n  height: 130px;\n  border: none;\n\n  cursor: pointer;\n  background-size: 100% 100%;\n  background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAOYAAACCCAYAAABSD7T3AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4AIWDwksPWR6lgAAIABJREFUeNrtnVuT47gRrAHN+P//Or/61Y5wONZ7mZ1u3XAeLMjJZGZVgdKsfc5xR3S0RIIUW+CHzCpc2McYo7XGv3ex7UiZd57rjyzzv+v+33X/R/+3r/f7vR386Y+TvKNcf/wdhTLPcv9qU2wZd74uth0t1821jkIZLPcsI/6nWa4XvutquU0Z85mnx80S/ZzgpnLnOtHNt7/ofx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7f4rfRnQDLRViG13i0vqBQrYVqBbADZT0ZpiHoSzvQpopKIFS3sE1HfBWlHXd0H7LnArqvougMtljHBgZnh3Eoz/BKjLML4Z2Aq0+hEJr9jaVUBbvNzCIUiroC7AWmmFw4o5AK3MtB5VypZMSFgs05JyGVwlwBqsEGAAa2ZU1CjUexXGsE4rKriilBvFzOKKo3AuAroE6QFQU3u8YpNXwS5k+1TZt5UrwouN4KiUEw+k3ZWDp1RXHNRqXb21Ts39945yZSg3VnZFNQ9CF3XeZyr5DgBXKiwCMa2MxeTDYXgP1Fsf9QNKZc0k81RJk3r6EQ3rCmBVyLL75EjZ1pIVDHoFtiOAHoB0BdTVylqBsKKKS+AeBXJVLY+CXASuGvO/Auq7GuEjDfGKg1oKa1z/dmmi9I9SUGNhl0AtfulHAawoYrnSkmNXAVuGEhrEVXvUF+A5Ct2PqNOjDetyna4CmeUolmeXLN4Aq7C5Sj10Q7yjgl+t6CNxSRHmI5X+CpwreYB3Qfdqna4q21KdBuc4GoZsn49ZOOiVinwHqK9WzjvgeweEh2AU5+vtxZ9Cd9Wqkh49V18E5oj6vVyn0RStAyGIO5edXRKd5B0VGVXq2yr3xYp+5Ut+C4QJ4P1N339pQMjRejj4vb/Dcr6rQc3O/0rjmtZpeYCBiCHfCemRbNhbK/pNUPc3wfKy5f2D7OlL3/uPhve/oU4T0F8f+VNM2vyoiv0jK+KHQfdHq+0bncz4oz73/+Y6LbKw1o/5B7eOf1Rl/0du9B9tn/9bvrf/j+v0h6ttn2tp/r/4819y4/zv5391uvzzfwDifz6phT1MPgAAAABJRU5ErkJggg==');\n}\n\n.color-picker .cp-add-color-button-class {\n  position: absolute;\n\n  display: inline;\n  padding: 0;\n  margin: 3px -3px;\n  border: 0;\n\n  cursor: pointer;\n  background: transparent;\n}\n\n.color-picker .cp-add-color-button-class:hover {\n  text-decoration: underline;\n}\n\n.color-picker .cp-add-color-button-class:disabled {\n  cursor: not-allowed;\n  color: #999;\n}\n\n.color-picker .cp-add-color-button-class:disabled:hover {\n  text-decoration: none;\n}\n\n.color-picker .cp-remove-color-button-class {\n  position: absolute;\n  top: -5px;\n  right: -5px;\n\n  display: block;\n  width: 10px;\n  height: 10px;\n  border-radius: 50%;\n\n  cursor: pointer;\n  text-align: center;\n  background: #fff;\n\n  box-shadow: 1px 1px 5px #333;\n}\n\n.color-picker .cp-remove-color-button-class::before {\n  content: 'x';\n\n  position: relative;\n  bottom: 3.5px;\n\n  display: inline-block;\n\n  font-size: 10px;\n}\n"]}]}];ColorPickerComponent.ctorParameters=function(){return[{type:core.ElementRef},{type:core.ChangeDetectorRef},{type:ColorPickerService}]};ColorPickerComponent.propDecorators={hueSlider:[{type:core.ViewChild,args:["hueSlider"]}],alphaSlider:[{type:core.ViewChild,args:["alphaSlider"]}],dialogElement:[{type:core.ViewChild,args:["dialogPopup"]}],handleEsc:[{type:core.HostListener,args:["document:keyup.esc",["$event"]]}],handleEnter:[{type:core.HostListener,args:["document:keyup.enter",["$event"]]}]};return ColorPickerComponent}();var ColorPickerDirective=function(){function ColorPickerDirective(injector,cfr,appRef,vcRef,elRef,_service){this.injector=injector;this.cfr=cfr;this.appRef=appRef;this.vcRef=vcRef;this.elRef=elRef;this._service=_service;this.dialogCreated=false;this.ignoreChanges=false;this.cpWidth="230px";this.cpHeight="auto";this.cpToggle=false;this.cpDisabled=false;this.cpIgnoredElements=[];this.cpDisableInput=false;this.cpOutputFormat="auto";this.cpAlphaChannel="enabled";this.cpFallbackColor="#fff";this.cpDialogDisplay="popup";this.cpSaveClickOutside=true;this.cpUseRootViewContainer=false;this.cpPosition="right";this.cpPositionOffset="0%";this.cpPositionRelativeToArrow=false;this.cpOKButton=false;this.cpOKButtonText="OK";this.cpOKButtonClass="cp-ok-button-class";this.cpCancelButton=false;this.cpCancelButtonText="Cancel";this.cpCancelButtonClass="cp-cancel-button-class";this.cpPresetLabel="Preset colors";this.cpMaxPresetColorsLength=6;this.cpPresetEmptyMessage="No colors added";this.cpPresetEmptyMessageClass="preset-empty-message";this.cpAddColorButton=false;this.cpAddColorButtonText="Add color";this.cpAddColorButtonClass="cp-add-color-button-class";this.cpRemoveColorButtonClass="cp-remove-color-button-class";this.cpInputChange=new core.EventEmitter(true);this.cpToggleChange=new core.EventEmitter(true);this.cpSliderChange=new core.EventEmitter(true);this.cpSliderDragEnd=new core.EventEmitter(true);this.cpSliderDragStart=new core.EventEmitter(true);this.colorPickerOpen=new core.EventEmitter(true);this.colorPickerClose=new core.EventEmitter(true);this.colorPickerCancel=new core.EventEmitter(true);this.colorPickerSelect=new core.EventEmitter(true);this.colorPickerChange=new core.EventEmitter(false);this.cpPresetColorsChange=new core.EventEmitter(true)}ColorPickerDirective.prototype.handleClick=function(event){this.inputFocus(event)};ColorPickerDirective.prototype.handleFocus=function(event){this.inputFocus(event)};ColorPickerDirective.prototype.handleInput=function(event){this.inputChange(event)};ColorPickerDirective.prototype.ngOnDestroy=function(){if(this.cmpRef!==undefined){this.cmpRef.destroy()}};ColorPickerDirective.prototype.ngOnChanges=function(changes){if(changes.cpToggle&&!this.cpDisabled){if(changes.cpToggle.currentValue){this.openDialog()}else if(!changes.cpToggle.currentValue){this.closeDialog()}}if(changes.colorPicker){if(this.dialog&&!this.ignoreChanges){if(this.cpDialogDisplay==="inline"){this.dialog.setInitialColor(changes.colorPicker.currentValue)}this.dialog.setColorFromString(changes.colorPicker.currentValue,false);if(this.cpUseRootViewContainer&&this.cpDialogDisplay!=="inline"){this.cmpRef.changeDetectorRef.detectChanges()}}this.ignoreChanges=false}if(changes.cpPresetLabel||changes.cpPresetColors){if(this.dialog){this.dialog.setPresetConfig(this.cpPresetLabel,this.cpPresetColors)}}};ColorPickerDirective.prototype.openDialog=function(){if(!this.dialogCreated){var vcRef=this.vcRef;this.dialogCreated=true;if(this.cpUseRootViewContainer&&this.cpDialogDisplay!=="inline"){var classOfRootComponent=this.appRef.componentTypes[0];var appInstance=this.injector.get(classOfRootComponent);vcRef=appInstance.vcRef||appInstance.viewContainerRef||this.vcRef;if(vcRef===this.vcRef){console.warn("You are using cpUseRootViewContainer, "+"but the root component is not exposing viewContainerRef!"+"Please expose it by adding 'public vcRef: ViewContainerRef' to the constructor.")}}var compFactory=this.cfr.resolveComponentFactory(ColorPickerComponent);var injector=core.ReflectiveInjector.fromResolvedProviders([],vcRef.parentInjector);this.cmpRef=vcRef.createComponent(compFactory,0,injector,[]);this.cmpRef.instance.setupDialog(this,this.elRef,this.colorPicker,this.cpWidth,this.cpHeight,this.cpDialogDisplay,this.cpFallbackColor,this.cpAlphaChannel,this.cpOutputFormat,this.cpDisableInput,this.cpIgnoredElements,this.cpSaveClickOutside,this.cpUseRootViewContainer,this.cpPosition,this.cpPositionOffset,this.cpPositionRelativeToArrow,this.cpPresetLabel,this.cpPresetColors,this.cpMaxPresetColorsLength,this.cpPresetEmptyMessage,this.cpPresetEmptyMessageClass,this.cpOKButton,this.cpOKButtonClass,this.cpOKButtonText,this.cpCancelButton,this.cpCancelButtonClass,this.cpCancelButtonText,this.cpAddColorButton,this.cpAddColorButtonClass,this.cpAddColorButtonText,this.cpRemoveColorButtonClass);this.dialog=this.cmpRef.instance;if(this.vcRef!==vcRef){this.cmpRef.changeDetectorRef.detectChanges()}}else if(this.dialog){this.dialog.openDialog(this.colorPicker)}};ColorPickerDirective.prototype.closeDialog=function(){if(this.dialog&&this.cpDialogDisplay==="popup"){this.dialog.closeDialog()}};ColorPickerDirective.prototype.stateChanged=function(state){this.cpToggleChange.emit(state);if(state){this.colorPickerOpen.emit(this.colorPicker)}else{this.colorPickerClose.emit(this.colorPicker)}};ColorPickerDirective.prototype.colorChanged=function(value,ignore){if(ignore===void 0){ignore=true}this.ignoreChanges=ignore;this.colorPickerChange.emit(value)};ColorPickerDirective.prototype.colorCanceled=function(){this.colorPickerCancel.emit()};ColorPickerDirective.prototype.colorSelected=function(value){this.colorPickerSelect.emit(value)};ColorPickerDirective.prototype.inputFocus=function(event){var element=this.elRef.nativeElement;var ignored=this.cpIgnoredElements.filter(function(item){return item===element});if(!this.cpDisabled&&!ignored.length){if(typeof document!=="undefined"&&element===document.activeElement){this.openDialog()}else if(!this.dialog||!this.dialog.show){this.openDialog()}else{this.closeDialog()}}};ColorPickerDirective.prototype.inputChange=function(event){if(this.dialog){this.dialog.setColorFromString(event.target.value,true)}else{this.colorPicker=event.target.value;this.colorPickerChange.emit(this.colorPicker)}};ColorPickerDirective.prototype.inputChanged=function(event){this.cpInputChange.emit(event)};ColorPickerDirective.prototype.sliderChanged=function(event){this.cpSliderChange.emit(event)};ColorPickerDirective.prototype.sliderDragEnd=function(event){this.cpSliderDragEnd.emit(event)};ColorPickerDirective.prototype.sliderDragStart=function(event){this.cpSliderDragStart.emit(event)};ColorPickerDirective.prototype.presetColorsChanged=function(value){this.cpPresetColorsChange.emit(value)};ColorPickerDirective.decorators=[{type:core.Directive,args:[{selector:"[colorPicker]",exportAs:"ngxColorPicker"}]}];ColorPickerDirective.ctorParameters=function(){return[{type:core.Injector},{type:core.ComponentFactoryResolver},{type:core.ApplicationRef},{type:core.ViewContainerRef},{type:core.ElementRef},{type:ColorPickerService}]};ColorPickerDirective.propDecorators={colorPicker:[{type:core.Input}],cpWidth:[{type:core.Input}],cpHeight:[{type:core.Input}],cpToggle:[{type:core.Input}],cpDisabled:[{type:core.Input}],cpIgnoredElements:[{type:core.Input}],cpDisableInput:[{type:core.Input}],cpOutputFormat:[{type:core.Input}],cpAlphaChannel:[{type:core.Input}],cpFallbackColor:[{type:core.Input}],cpDialogDisplay:[{type:core.Input}],cpSaveClickOutside:[{type:core.Input}],cpUseRootViewContainer:[{type:core.Input}],cpPosition:[{type:core.Input}],cpPositionOffset:[{type:core.Input}],cpPositionRelativeToArrow:[{type:core.Input}],cpOKButton:[{type:core.Input}],cpOKButtonText:[{type:core.Input}],cpOKButtonClass:[{type:core.Input}],cpCancelButton:[{type:core.Input}],cpCancelButtonText:[{type:core.Input}],cpCancelButtonClass:[{type:core.Input}],cpPresetLabel:[{type:core.Input}],cpPresetColors:[{type:core.Input}],cpMaxPresetColorsLength:[{type:core.Input}],cpPresetEmptyMessage:[{type:core.Input}],cpPresetEmptyMessageClass:[{type:core.Input}],cpAddColorButton:[{type:core.Input}],cpAddColorButtonText:[{type:core.Input}],cpAddColorButtonClass:[{type:core.Input}],cpRemoveColorButtonClass:[{type:core.Input}],cpInputChange:[{type:core.Output}],cpToggleChange:[{type:core.Output}],cpSliderChange:[{type:core.Output}],cpSliderDragEnd:[{type:core.Output}],cpSliderDragStart:[{type:core.Output}],colorPickerOpen:[{type:core.Output}],colorPickerClose:[{type:core.Output}],colorPickerCancel:[{type:core.Output}],colorPickerSelect:[{type:core.Output}],colorPickerChange:[{type:core.Output}],cpPresetColorsChange:[{type:core.Output}],handleClick:[{type:core.HostListener,args:["click",["$event"]]}],handleFocus:[{type:core.HostListener,args:["focus",["$event"]]}],handleInput:[{type:core.HostListener,args:["input",["$event"]]}]};return ColorPickerDirective}();var ColorPickerModule=function(){function ColorPickerModule(){}ColorPickerModule.decorators=[{type:core.NgModule,args:[{imports:[common.CommonModule],exports:[ColorPickerDirective],providers:[ColorPickerService],declarations:[ColorPickerComponent,ColorPickerDirective,TextDirective,SliderDirective],entryComponents:[ColorPickerComponent]}]}];return ColorPickerModule}();exports.Cmyk=Cmyk;exports.Hsla=Hsla;exports.Hsva=Hsva;exports.Rgba=Rgba;exports.TextDirective=TextDirective;exports.SliderDirective=SliderDirective;exports.ColorPickerComponent=ColorPickerComponent;exports.ColorPickerDirective=ColorPickerDirective;exports.ColorPickerModule=ColorPickerModule;exports.ColorPickerService=ColorPickerService;Object.defineProperty(exports,"__esModule",{value:true})});