UNPKG

@progress/kendo-ui

Version:

This package is part of the [Kendo UI for jQuery](http://www.telerik.com/kendo-ui) suite.

1 lines 2.8 kB
module.exports=function(n){function t(o){if(r[o])return r[o].exports;var e=r[o]={exports:{},id:o,loaded:!1};return n[o].call(e.exports,e,e.exports,t),e.loaded=!0,e.exports}var r={};return t.m=n,t.c=r,t.p="",t(0)}({0:function(n,t,r){r(28),n.exports=r(28)},3:function(n,t){n.exports=function(){throw Error("define cannot be used indirect")}},20:function(n,t){n.exports=require("../kendo.core")},28:function(n,t,r){var o,e,u;!function(i,define){e=[r(20)],o=i,u="function"==typeof o?o.apply(t,e):o,!(void 0!==u&&(n.exports=u))}(function(){return function(n,t){function r(n,t){var r=Math.max(n,t),o=Math.min(n,t);return(r+.05)/(o+.05)}function o(n,t){return r(e(u(n,t)),e(u(t,{r:0,g:0,b:0,a:1})))}function e(n){var t=[n.r,n.g,n.b].map(function(n){return n/=255,n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4)});return.2126*t[0]+.7152*t[1]+.0722*t[2]}function u(n,t){var r=i(n.r,0,255),o=i(n.g,0,255),e=i(n.b,0,255),u=i(n.a,0,1),a=i(t.r,0,255),f=i(t.g,0,255),c=i(t.b,0,255);return{r:Math.round((1-u)*a+u*r),g:Math.round((1-u)*f+u*o),b:Math.round((1-u)*c+u*e)}}function i(n,t,r){return!a(n)||isNaN(n)?t:n<=t?t:n>=r?r:n}function a(n){return null!==n&&n!==t}function f(n,t,r){var e=function(u,i,a,f,c){var s=(a+f)/2,d=v({},t,{s:i/n.width,v:1-s/n.height}),h=o(w(l(d)).toBytes(),w(r).toBytes());return a+.5>f?h<u+1&&h>u-1?s:null:c(h,u)?e(u,i,a,f-(f-a)/2,c):e(u,i,a+(f-a)/2,f,c)},u=function(n,t){return n>t},i=function(n,t){return n<t},a=function(t,r,o){var a,f,c=[];for(a=0;a<=n.width;a+=n.width/r)f=e(t,a,0,n.height,o?i:u),null!==f&&c.push([a,f]);return c},f=s(d(h)),p=c(a(x,k,!1),f)+c(a(x,k,!0),f)+c(a(M,k,!1),f)+c(a(M,k,!0),f);return'<svg xmlns="http://www.w3.org/2000/svg" style="position: absolute; overflow: visible; pointer-events: none; left: 0px; top: 0px; z-index: 3;" >'+p+"</svg>"}function c(n,t){var r,o;return 0===n.length?"":(r=function(n,r,o,e){return 0===o?kendo.format("M {0},{1}",r[0],r[1]):kendo.format("{0} {1}",n,t(r,o,e))},o=n.reduce(r,""),kendo.format('<path d="{0}" fill="none" stroke="white" stroke-width="1"/>',o))}function s(n){return function(t,r,o){var e=n(o[r-1],o[r-2],t),u=n(t,o[r-1],o[r+1],!0);return kendo.format("C {0},{1} {2},{3} {4},{5}",e[0],e[1],u[0],u[1],t[0],t[1])}}function d(n){return function(t,r,o,e){var u=r||t,i=o||t,a=.1,f=n(u,i),c=f.angle+(e?Math.PI:0),s=f.length*a,d=t[0]+Math.cos(c)*s,h=t[1]+Math.sin(c)*s;return[d,h]}}function h(n,t){var r=t[0]-n[0],o=t[1]-n[1];return{length:Math.sqrt(Math.pow(r,2)+Math.pow(o,2)),angle:Math.atan2(o,r)}}function l(n){var t=i(n.h,0,359.9),r=i(n.s,0,1),o=i(n.v,0,1),e=i(n.a,0,1);return g.fromHSV(t,r,o,e).toCssRgba()}var p=kendo.ui.colorpicker,v=n.extend,g=kendo.Color,w=kendo.parseColor,x=4.5,M=7,k=16;v(p,{contrastToolUtils:{getContrastFromTwoRGBAs:o,renderSvgCurveLine:f}})}(window.kendo.jQuery),window.kendo},r(3))}});