1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3446],{58074:function(e,t,r){r.d(t,{a:function(){return s},h:function(){return n},i:function(){return d},p:function(){return h}});let{min:a,max:l,floor:i,round:u}=Math;function n(e,t,r){let a=e,l=t,u=r;a=a/360*6,l/=100,u/=100;let n=i(a),s=a-n,o=u*(1-l),c=u*(1-s*l),h=u*(1-(1-s)*l),d=n%6,p=[u,c,o,o,h,u][d],v=[h,u,u,c,o,o][d],f=[o,o,h,u,u,c][d];return[255*p,255*v,255*f]}function s(e,t,r){return n(e,t,r).map(e=>u(e).toString(16).padStart(2,"0"))}function o(e,t,r){let i,u,n=e,s=t,o=r;n/=255,s/=255,o/=255;let c=a(n,s,o),h=l(n,s,o),d=h-c;if(0===d)i=u=0;else{u=d/h;let e=((h-n)/6+d/2)/d,t=((h-s)/6+d/2)/d,r=((h-o)/6+d/2)/d;n===h?i=r-t:s===h?i=1/3+e-r:o===h&&(i=2/3+t-e),i<0?i+=1:i>1&&(i-=1)}return[360*i,100*u,100*h]}function c(e){return e.map(e=>{let t=Number(e);return Number.isNaN(e)?void 0:t})}function h(e){for(let[t,r]of Object.entries({rgba:/^rgba?\D+([\d.]+)(%?)\D+([\d.]+)(%?)\D+([\d.]+)(%?)\D*?(([\d.]+)(%?)|$)/i,hsla:/^hsla?\D+([\d.]+)\D+([\d.]+)\D+([\d.]+)\D*?(([\d.]+)(%?)|$)/i,hsva:/^hsva?\D+([\d.]+)\D+([\d.]+)\D+([\d.]+)\D*?(([\d.]+)(%?)|$)/i,hexa:/^#?(([\da-f]{3,4})|([\da-f]{6})|([\da-f]{8}))$/i})){let a=r.exec(e);if(a)switch(t){case"rgba":{let e=c(a),r=e[1],l=e[3],i=e[5],u=e[8];if(r="%"===a[2]?r/100*255:r,l="%"===a[4]?l/100*255:l,i="%"===a[6]?i/100*255:i,u="%"===a[9]?u/100:u,r>255||l>255||i>255||u<0||u>1)break;return{values:[...o(r,l,i),u],a:u,colorType:t}}case"hexa":{let[,e]=a;(4===e.length||3===e.length)&&(e=e.split("").map(e=>e+e).join(""));let r=e.slice(0,6),l=e.slice(6);return l=l?Number.parseInt(l,16)/255:void 0,{values:[...function(e){let t=e.match(/.{2}/g),r=t.map(e=>Number.parseInt(e,16));return o(r[0],r[1],r[2])}(r),l],a:l,colorType:t}}case"hsla":{let e=c(a),r=e[1],l=e[2],i=e[3],u=e[5];if(u="%"===a[6]?u/100:u,r>360||l>100||i>100||u<0||u>1)break;return{values:[...function(e,t,r){let a=t,l=r;a/=100,l/=100,a*=l<.5?l:1-l;let i=2*a/(l+a)*100,u=(l+a)*100;return[e,Number.isNaN(i)?0:i,u]}(r,l,i),u],a:u,colorType:t}}case"hsva":{let e=c(a),r=e[1],l=e[2],i=e[3],u=e[5];if(u="%"===a[6]?u/100:u,r>360||l>100||i>100||u<0||u>1)break;return{values:[r,l,i,u],a:u,colorType:t}}}}return{values:null,colorType:null}}function d(e){if(e.startsWith("var(")){if("undefined"!=typeof document){let t=document.createElement("div");t.style.color=e,document.body.appendChild(t);let r=getComputedStyle(t).color;document.body.removeChild(t);let a=r.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*[\d.]+)?\)/);if(a){let e=Number.parseInt(a[1],10),t=Number.parseInt(a[2],10),r=Number.parseInt(a[3],10);return(299*e+587*t+114*r)/1e3>165.75}}return!1}if(e.startsWith("#")){let t=e.slice(1),r=Number.parseInt(t.slice(0,2),16),a=Number.parseInt(t.slice(2,4),16),l=Number.parseInt(t.slice(4,6),16);return(299*r+587*a+114*l)/1e3>165.75}if(e.startsWith("rgb")){let t=e.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*[\d.]+)?\)/);if(t){let e=Number.parseInt(t[1],10),r=Number.parseInt(t[2],10),a=Number.parseInt(t[3],10);return(299*e+587*r+114*a)/1e3>165.75}}return!1}},68742:function(e,t,r){let a;function l(e){return new Proxy(e=>e,{apply:(e,t,r)=>Reflect.apply(null!=a?a:e,t,r)})(e)}function i(e,t){var r,a;return(null===(a=null===(r=null==e?void 0:e.tagName)||void 0===r?void 0:r.toLowerCase)||void 0===a?void 0:a.call(r))===l(t)}r.d(t,{g:function(){return l},i:function(){return i}})},83446:function(e,t,r){r.r(t),r.d(t,{market_color_picker:function(){return u}});var a=r(54982),l=r(58074),i=r(68742);let u=class{constructor(e){(0,a.r)(this,e),this.marketColorPickerValueChange=(0,a.c)(this,"marketColorPickerValueChange",7),this.value=void 0,this.inputValue=void 0}gradientValueChange(e){let{detail:t}=e,{defaultPrevented:r}=this.marketColorPickerValueChange.emit({value:t.value,prevValue:this.value});!r&&(this.value=t.value,this.inputValue=t.value,this.swatchList&&(this.swatchList.value=this.value),this.colorInput&&(this.colorInput.value=this.inputValue))}swatchValueChange(e){let{detail:t}=e,{defaultPrevented:r}=this.marketColorPickerValueChange.emit({value:t.value,prevValue:this.value});!r&&(this.inputValue=this.formatInputValue(t.value),this.value=t.value,this.gradientPicker&&(this.gradientPicker.value=this.value),this.colorInput&&(this.colorInput.value=this.inputValue))}inputValueChange(e){let{detail:t}=e,{defaultPrevented:r}=this.marketColorPickerValueChange.emit({value:t.value,prevValue:this.value});!r&&(this.value=t.value,this.gradientPicker&&(this.gradientPicker.value=this.value),this.swatchList&&(this.swatchList.value=this.value))}formatInputValue(e){let t=(0,l.p)(e);return t.colorType&&"hexa"!==t.colorType?`#${(0,l.a)(t.values[0],t.values[1],t.values[2]).join("")}`:e}setSubcomponentValues(){this.gradientPicker=this.el.querySelector((0,i.g)("market-color-picker-gradient")),this.swatchList=this.el.querySelector((0,i.g)("market-color-swatch-list")),this.colorInput=this.el.querySelector((0,i.g)("market-color-picker-input")),this.gradientPicker&&(this.gradientPicker.value=this.value),this.swatchList&&(this.swatchList.value=this.value),this.colorInput&&(this.colorInput.value=this.inputValue)}
1handleSlotChange(){this.setSubcomponentValues()}componentWillLoad(){this.inputValue=this.formatInputValue(this.value)}componentDidLoad(){this.setSubcomponentValues()}render(){return(0,a.h)(a.H,{key:"3420d4396bc964350cdcc5c73f72d2a501f71cb7",class:"market-color-picker"},(0,a.h)("slot",{key:"a7c5fbf559e2d19fecec18d10b445ebd35e7b67c",onSlotchange:()=>this.handleSlotChange()}))}get el(){return(0,a.g)(this)}};u.style=":host{display:flex;flex-direction:column;gap:var(--color-picker-vertical-spacing)}"}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.