'use strict';Object.defineProperty(exports,'__esModule',{value:true});var chunkYXTI4MTI_cjs=require('../chunk-YXTI4MTI.cjs'),chunkTRRLWCL6_cjs=require('../chunk-TRRLWCL6.cjs');require('../chunk-PI5KJ3ZM.cjs');var chunkINDSIUQQ_cjs=require('../chunk-INDSIUQQ.cjs');require('../chunk-3V4MONNR.cjs');var chunkYISEJCI6_cjs=require('../chunk-YISEJCI6.cjs');var $=(r,o,e)=>chunkTRRLWCL6_cjs.a(...chunkYXTI4MTI_cjs.c(r,o,e)),A=(r,o,e)=>{let[n,t,m]=chunkYXTI4MTI_cjs.b(r,o,e);return [chunkINDSIUQQ_cjs.b(n),chunkINDSIUQQ_cjs.b(t),chunkINDSIUQQ_cjs.b(m)]},S=(r,o,e,n)=>{chunkYXTI4MTI_cjs.a(r,o,e,n),r[0]=chunkINDSIUQQ_cjs.b(r[0]),r[1]=chunkINDSIUQQ_cjs.b(r[1]),r[2]=chunkINDSIUQQ_cjs.b(r[2]);},E=(r,o,e)=>A(...chunkYXTI4MTI_cjs.s(r,o,e)),q=(r,o,e,n)=>{chunkYXTI4MTI_cjs.t(r,o,e,n),S(r,r[0],r[1],r[2]);},I=Math.PI/180,R=(r,o,e)=>A(...chunkYXTI4MTI_cjs.A(r,o,e)),M=(r,o,e,n)=>{chunkYXTI4MTI_cjs.B(r,o,e,n),S(r,r[0],r[1],r[2]);},z=(r,o,e)=>{let n=e*I;return R(r,o*Math.cos(n),o*Math.sin(n))},H=(r,o,e,n)=>{let t=n*I;M(r,o,e*Math.cos(t),e*Math.sin(t));},J=r=>chunkYXTI4MTI_cjs.q(r,chunkYXTI4MTI_cjs.g),v=(r,o,e)=>{r.toGamutP3=n=>{let t=chunkYXTI4MTI_cjs.r(n,chunkYXTI4MTI_cjs.g,$);if(t===null)return new r(n);let[m,a,u]=t.linear,[k,F,G]=chunkYXTI4MTI_cjs.c(m,a,u);return r._makeFromLinearSrgb(k,F,G,t.alpha)},r.prototype.toP3=function(n=4){let{r:t,g:m,b:a,alpha:u}=chunkYXTI4MTI_cjs.d(this._rawRgb());return {r:chunkYISEJCI6_cjs.b(t,n),g:chunkYISEJCI6_cjs.b(m,n),b:chunkYISEJCI6_cjs.b(a,n),alpha:u,colorSpace:"display-p3"}},r.prototype.toP3String=function(n=4){let{r:t,g:m,b:a,alpha:u}=this.toP3(n);return u<1?`color(display-p3 ${t} ${m} ${a} / ${u})`:`color(display-p3 ${t} ${m} ${a})`},o.push(chunkYXTI4MTI_cjs.f,chunkYXTI4MTI_cjs.e),e.push([chunkYXTI4MTI_cjs.f,"p3"],[chunkYXTI4MTI_cjs.e,"p3"]);},K=v;exports.default=K;exports.inGamutP3=J;exports.labToP3Channels=R;exports.labToP3ChannelsInto=M;exports.lchToP3Channels=z;exports.lchToP3ChannelsInto=H;exports.linearToP3Channels=A;exports.linearToP3ChannelsInto=S;exports.oklchToP3Channels=E;exports.oklchToP3ChannelsInto=q;//# sourceMappingURL=p3.cjs.map
//# sourceMappingURL=p3.cjs.map