2 lines
20 KiB
JavaScript
2 lines
20 KiB
JavaScript
|
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.Pickr=e():t.Pickr=e()}(window,function(){return function(t){var e={};function o(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,o),i.l=!0,i.exports}return o.m=t,o.c=e,o.d=function(t,e,n){o.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},o.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.t=function(t,e){if(1&e&&(t=o(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)o.d(n,i,function(e){return t[e]}.bind(null,i));return n},o.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(e,"a",e),e},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.p="dist/",o(o.s=1)}([function(t,e,o){},function(t,e,o){"use strict";o.r(e);o(0);function n(t,e,o){return e in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}const i=r.bind(null,"addEventListener"),s=r.bind(null,"removeEventListener");function r(t,e,o,i){let s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};return e instanceof HTMLCollection||e instanceof NodeList?e=Array.from(e):Array.isArray(e)||(e=[e]),Array.isArray(o)||(o=[o]),e.forEach(e=>o.forEach(o=>e[t](o,i,function(t){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{},i=Object.keys(o);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(o).filter(function(t){return Object.getOwnPropertyDescriptor(o,t).enumerable}))),i.forEach(function(e){n(t,e,o[e])})}return t}({capture:!1},s)))),Array.prototype.slice.call(arguments,1)}function a(t){const e=document.createElement("div");return e.innerHTML=t.trim(),e.firstElementChild}function c(t,e){const o=t.getAttribute(e);return t.removeAttribute(e),o}function l(t){return function t(e){let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=c(e,"data-con"),i=c(e,"data-key");i&&(o[i]=e);const s=Array.from(e.children),r=n?o[n]={}:o;for(let e of s){const o=c(e,"data-arr");o?(r[o]||(r[o]=[])).push(e):t(e,r)}return o}(a(t))}function p(t){let e=t.path||t.composedPath&&t.composedPath();if(e)return e;let o=t.target.parentElement;for(e=[t.target,o];o=o.parentElement;)e.push(o);return e.push(document,window),e}function h(t){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const o=t=>t>="0"&&t<="9"||"-"===t||"."===t;function n(n){const i=t.value,s=t.selectionStart;let r=s,a="";for(let t=s-1;t>0&&o(i[t]);t--)a=i[t]+a,r--;for(let t=s,e=i.length;t<e&&o(i[t]);t++)a+=i[t];if(a.length>0&&!isNaN(a)&&isFinite(a)){const o=n.deltaY<0?1:-1,s=n.ctrlKey?5*o:o;let c=Number(a)+s;!e&&c<0&&(c=0);const l=i.substr(0,r)+c+i.substring(r+a.length,i.length),p=r+String(c).length;t.value=l,t.focus(),t.setSelectionRange(p,p)}n.preventDefault(),t.dispatchEvent(new Event("input"))}i(t,"focus",()=>i(window,"wheel",n)),i(t,"blur",()=>s(window,"wheel",n))}function u(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var o=[],n=!0,i=!1,s=void 0;try{for(var r,a=t[Symbol.iterator]();!(n=(r=a.next()).done)&&(o.push(r.value),!e||o.length!==e);n=!0);}catch(t){i=!0,s=t}finally{try{n||null==a.return||a.return()}finally{if(i)throw s}}return o}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}const d=Math.min,f=Math.max;function v(t,e,o){t=t/360*6,e/=100,o/=100;let n=Math.floor(t),i=t-n,s=o*(1-e),r=o*(1-i*e),a=o*(1-(1-i)*e),c=n%6;return[255*[o,r,s,s,a,o][c],255*[a,o,o,r,s,s][c],255*[s,s,a,o,o,r][c]]}function y(t,e,o){let n,i,s;const r=d(t/=255,e/=255,o/=255),a=f(t,e,o),c=a-r;if(0===c)n=i=0;else{i=c/a;let s=((a-t)/6+c/2)/c,r=((a-e)/6+c/2)/c,l=((a-o)/6+c/2)/c;t===a?n=l-r
|
||
|
//# sourceMappingURL=pickr.min.js.map
|