text: {"version":3,"file":"colorpicker.min.js","sources":["colorpicker.js"],"names":["BX","namespace","ColorPicker","options","type","isPlainObject","this","popupWindow","popupOptions","angle","autoHide","closeByEsc","noAllPaddings","layout","preview","customColor","defaultColor","actions","customColorInput","customColorTextBox","mergeEx","bindElement","colors","selectedColor","allowCustomColor","colorPreview","onColorSelected","setOptions","prototype","open","popup","getPopupWindow","setContent","getPopupContent","show","close","isArray","setColors","setBindElement","isFunction","setSelectedColor","setDefaultColor","isBoolean","popupId","util","getRandomString","PopupWindow","forEach","colorRow","row","color","getFullColorCode","push","length","getColors","getDefaultColors","container","create","props","className","events","click","handleContainerClick","bind","palette","handleBoxClick","mouseover","isPreviewVisible","handleBoxOver","appendChild","isNotEmptyString","toLowerCase","box","attrs","data-color","style","backgroundColor","getSelectedColor","classList","add","getActions","singleAction","isCustomColorAllowed","getDefaultColor","children","text","message","handleCustomColorClick","maxlength","keypress","handleCustomInputKeyPress","keyup","handleCustomInputKeyUp","paste","handleCustomInputPaste","applyEditMode","handleDefaultActionClick","isValidColor","event","isEditMode","target","textValue","trim","value","resetEditMode","resetError","switchToEditMode","stopPropagation","isDomNode","dataset","applyColor","previewColor","key","match","ctrlKey","metaKey","preventDefault","keyCode","clipboardData","window","getData","replace","focusCustomInput","remove","contains","highlightError","focus"],"mappings":"CAAC,WAED,YAEAA,IAAGC,UAAU,iBAebD,IAAGE,YAAc,SAASC,GAEzBA,EAAUH,GAAGI,KAAKC,cAAcF,GAAWA,IAG3CG,MAAKC,YAAc,IAEnBD,MAAKE,cACJC,MAAO,KACPC,SAAU,KACVC,WAAY,KACZC,cAAe,KAGhBN,MAAKO,QACJC,QAAS,KACTC,YAAa,KACbC,aAAc,KACdC,QAAS,KACTC,iBAAkB,KAClBC,mBAAoB,KAGrB,IAAInB,GAAGI,KAAKC,cAAcF,EAAQK,cAClC,CACCR,GAAGoB,QAAQd,KAAKE,aAAcL,EAAQK,cAGvCF,KAAKe,YAAc,IACnBf,MAAKgB,SACLhB,MA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