-
Notifications
You must be signed in to change notification settings - Fork 0
/
3663.2535bec9.iframe.bundle.js
1 lines (1 loc) · 51.2 KB
/
3663.2535bec9.iframe.bundle.js
1
"use strict";(self.webpackChunkstorybook=self.webpackChunkstorybook||[]).push([[3663],{"../../packages/models/src/color/AdjustedColor.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{DE:()=>ColorAdjustment,N8:()=>parseAdjustedColor,Nt:()=>ColorAdjustmentType,gE:()=>AdjustedColor,m1:()=>defaultSchemeColorLookup,qO:()=>resolveAdjustedColor});var _sheetxl_common__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("../../packages/common/src/utils/CommonUtils.ts"),_ColorUtils__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("../../packages/models/src/color/ColorUtils.ts"),_ColorSpaces__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("../../packages/models/src/color/ColorSpaces.ts"),_PresetColors__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("../../packages/models/src/color/PresetColors.ts"),_SchemeColors__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("../../packages/models/src/color/SchemeColors.ts"),_IndexedColors__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("../../packages/models/src/color/IndexedColors.ts");let ColorAdjustmentType=function(ColorAdjustmentType){return ColorAdjustmentType.Alpha="alpha",ColorAdjustmentType.AlphaOff="alphaOff",ColorAdjustmentType.AlphaMod="alphaMod",ColorAdjustmentType.Hue="hue",ColorAdjustmentType.Sat="sat",ColorAdjustmentType.Lum="lum",ColorAdjustmentType.HueOff="hueOff",ColorAdjustmentType.SatOff="satOff",ColorAdjustmentType.LumOff="lumOff",ColorAdjustmentType.HueMod="hueMod",ColorAdjustmentType.SatMod="satMod",ColorAdjustmentType.LumMod="lumMod",ColorAdjustmentType.Red="red",ColorAdjustmentType.Green="green",ColorAdjustmentType.Blue="blue",ColorAdjustmentType.RedOff="redOff",ColorAdjustmentType.GreenOff="greenOff",ColorAdjustmentType.BlueOff="blueOff",ColorAdjustmentType.RedMod="redMod",ColorAdjustmentType.GreenMod="greenMod",ColorAdjustmentType.BlueMod="blueMod",ColorAdjustmentType.Shade="shade",ColorAdjustmentType.Tint="tint",ColorAdjustmentType.Gray="gray",ColorAdjustmentType.Comp="comp",ColorAdjustmentType.Inv="inv",ColorAdjustmentType.Gamma="gamma",ColorAdjustmentType.InvGamma="invGamma",ColorAdjustmentType}({});const adjustmentTypesMap=new Map,adjustmentTypeKeys=Object.keys(ColorAdjustmentType);for(let i=0;i<adjustmentTypeKeys.length;i++)adjustmentTypesMap.set(ColorAdjustmentType[adjustmentTypeKeys[i]].toLowerCase(),ColorAdjustmentType[adjustmentTypeKeys[i]]);class ColorAdjustment{constructor(type,amount){this._private={type,amount}}get type(){return this._private.type}get amount(){return this._private.amount}}const RGB2DRGBAlpha=rgbaColor=>rgbaColor?{drgb:[rgbaColor.red/255,rgbaColor.green/255,rgbaColor.blue/255],alpha:void 0!==rgbaColor.alpha?rgbaColor.alpha:1}:null,parseVal=function(val,schemeLookup,indexedColorLookup,_last){let baseColor=RGB2DRGBAlpha((val=>{let preset=_PresetColors__WEBPACK_IMPORTED_MODULE_0__.D8.valueOfOoxmlId(val);return preset?new _ColorSpaces__WEBPACK_IMPORTED_MODULE_1__.Sj(preset.rgbaColor.r,preset.rgbaColor.g,preset.rgbaColor.b,preset.rgbaColor.a):null})(val)),schemeKey=null,schemeColor=null;if(null===baseColor&&(0,_SchemeColors__WEBPACK_IMPORTED_MODULE_2__.Ay)(val)){if(!schemeLookup)throw new Error("a scheme val was used but a schemeLookup was not provided");schemeKey=val,schemeColor=schemeLookup(schemeKey),baseColor=RGB2DRGBAlpha(schemeColor)}if(null===baseColor){let parts=val.match(_ColorUtils__WEBPACK_IMPORTED_MODULE_3__.UG)||val.match(_ColorUtils__WEBPACK_IMPORTED_MODULE_3__.hs);if(parts){let input,alpha=1;4===parts.length?input=[parseInt(parts[1],16),parseInt(parts[2],16),parseInt(parts[3],16)]:(input=[parseInt(parts[2],16),parseInt(parts[3],16),parseInt(parts[4],16)],alpha=_ColorUtils__WEBPACK_IMPORTED_MODULE_3__.UJ(parseInt(parts[1],16)/255)),input=_ColorUtils__WEBPACK_IMPORTED_MODULE_3__.hN(input),input=_ColorUtils__WEBPACK_IMPORTED_MODULE_3__.FL(input),baseColor={drgb:input,alpha}}}if(null===baseColor){let parts=val.match(_ColorUtils__WEBPACK_IMPORTED_MODULE_3__.m0)||val.match(_ColorUtils__WEBPACK_IMPORTED_MODULE_3__.Zt);if(parts){let input=_ColorUtils__WEBPACK_IMPORTED_MODULE_3__.il(parts[1],parts[2],parts[3]);input=_ColorUtils__WEBPACK_IMPORTED_MODULE_3__.hN(input),input=_ColorUtils__WEBPACK_IMPORTED_MODULE_3__.FL(input),baseColor={drgb:input,alpha:parts[4]?_ColorUtils__WEBPACK_IMPORTED_MODULE_3__.UJ(parseFloat(parts[4])):1}}}if(null===baseColor){let parts=val.match(_ColorUtils__WEBPACK_IMPORTED_MODULE_3__.yD)||val.match(_ColorUtils__WEBPACK_IMPORTED_MODULE_3__.h2);if(parts){let input=_ColorUtils__WEBPACK_IMPORTED_MODULE_3__.il(parts[1],parts[2],parts[3]);input=_ColorUtils__WEBPACK_IMPORTED_MODULE_3__.hN(input,100),input=_ColorUtils__WEBPACK_IMPORTED_MODULE_3__.a$(input),input=_ColorUtils__WEBPACK_IMPORTED_MODULE_3__.FL(input),baseColor={drgb:input,alpha:parts[4]?_ColorUtils__WEBPACK_IMPORTED_MODULE_3__.UJ(parseFloat(parts[4])):1}}}if(null===baseColor){let parts=val.match(_ColorUtils__WEBPACK_IMPORTED_MODULE_3__.i8)||val.match(_ColorUtils__WEBPACK_IMPORTED_MODULE_3__.db);if(parts){let input=_ColorUtils__WEBPACK_IMPORTED_MODULE_3__.il(parts[1],parts[2],parts[3]);input=_ColorUtils__WEBPACK_IMPORTED_MODULE_3__.P7(input),input=_ColorUtils__WEBPACK_IMPORTED_MODULE_3__.FL(input),baseColor={drgb:input,alpha:parts[4]?_ColorUtils__WEBPACK_IMPORTED_MODULE_3__.UJ(parseFloat(parts[4])):1}}}if(null===baseColor){let parts=val.match(_ColorUtils__WEBPACK_IMPORTED_MODULE_3__.d9);if(parts){const index=parseInt(parts[1]);let rgba=indexedColorLookup?.(index)??(0,_IndexedColors__WEBPACK_IMPORTED_MODULE_4__.R)(index);rgba&&(baseColor={drgb:[rgba.red/255,rgba.green/255,rgba.blue/255],alpha:rgba.alpha})}}if(null===baseColor)throw new Error("Not a valid color format: "+val);return{drgbAlpha:baseColor,schemeKey,schemeColor}},REGEX_COLOR_INDEX_START=new RegExp("^(index[ ]?\\d+)","i"),REGEX_UNTIL_COMMA_OR_SPACE=new RegExp("\\s+\\s*(?![^()]*\\))|,\\s*(?![^()]*\\))"),REGEX_SPLIT_COMMA_OR_SPACE=new RegExp("\\s*[,]\\s*|\\s+"),parseAdjustedColor=(str,schemeLookup,indexedColorLookup,last=null)=>{let colorValue=null,parsedInput=str.toLowerCase().trim(),parts=parsedInput.match(REGEX_COLOR_INDEX_START);if(parts&&(colorValue=parts[1],colorValue=colorValue[0].toUpperCase()+colorValue.substring(1),parsedInput=parsedInput.substring(colorValue.length,parsedInput.length).trim()),!colorValue){const splitParts=parsedInput.split(REGEX_UNTIL_COMMA_OR_SPACE);splitParts&&(colorValue=splitParts[0],parsedInput=parsedInput.substring(colorValue.length,parsedInput.length).trim())}let retValue=null;try{if(!colorValue)throw new Error("no color key found");const adjustments=[],adjustmentsAsArray=parsedInput.split(REGEX_SPLIT_COMMA_OR_SPACE);for(let i=0;i<adjustmentsAsArray.length;i++){const adjustmentTypeAsString=adjustmentsAsArray[i];if(!adjustmentTypeAsString)continue;const adjustmentType=adjustmentTypesMap.get(adjustmentTypeAsString.toLowerCase());if(!adjustmentType){console.warn("Invalid adjustment type:"+adjustmentTypeAsString),i++;continue}let adjustmentValue=null;if(adjustmentType===ColorAdjustmentType.Gray||adjustmentType===ColorAdjustmentType.Comp||adjustmentType===ColorAdjustmentType.Inv||adjustmentType===ColorAdjustmentType.Gamma||adjustmentType===ColorAdjustmentType.InvGamma);else{i++;const adjustmentValueAsString=adjustmentsAsArray[i];if(adjustmentValue=parseFloat(adjustmentValueAsString),null==adjustmentValue){console.warn(`Invalid adjustment value: missing value for'${adjustmentTypeAsString}'`);continue}if(isNaN(adjustmentValue)){console.warn(`Invalid adjustment value: '${adjustmentValueAsString}' for'${adjustmentTypeAsString}'`);continue}}adjustments.push(new ColorAdjustment(adjustmentType,adjustmentValue))}retValue=new AdjustedColor(colorValue,adjustments,schemeLookup,indexedColorLookup,last)}catch(error){console.warn("Unable to parse string as an AdjustedColor",str,error),retValue=null}return retValue};class AdjustedColor{constructor(value,adjustments=null,schemeLookup,indexedColorLookup,last=null){let val=null,adjs=null;value instanceof AdjustedColor?(val=value.val,value.adjustments()&&(adjs=[...value.adjustments()]),adjustments&&(adjs=adjs||[],adjs=adjs.concat(adjustments))):(val=value,adjs=adjustments),this._private={val,adjs,schemeLookup,indexedColorLookup,parsedVal:parseVal(val,schemeLookup,indexedColorLookup),adjusted:null,resolved:null}}isImmutable(){return!0}isEqual(other){return other instanceof AdjustedColor&&this.toString().toLowerCase()===other.toString().toLowerCase()}get val(){return this._private.val}adjustments(){return this._private.adjs}_forceDark(rgba=!0){this._resolve();const rgb=this._private.resolved;let adj=[rgb.red,rgb.green,rgb.blue];adj=_ColorUtils__WEBPACK_IMPORTED_MODULE_3__.Nd(adj,180),adj=_ColorUtils__WEBPACK_IMPORTED_MODULE_3__.fJ(adj,!1);let lrgb=_ColorUtils__WEBPACK_IMPORTED_MODULE_3__.uw(adj);const hsl=_ColorUtils__WEBPACK_IMPORTED_MODULE_3__.jJ(lrgb);if(hsl[_ColorUtils__WEBPACK_IMPORTED_MODULE_3__.$0.LUMINANCE]=.95*hsl[_ColorUtils__WEBPACK_IMPORTED_MODULE_3__.$0.LUMINANCE],lrgb=_ColorUtils__WEBPACK_IMPORTED_MODULE_3__.P7(hsl),adj=_ColorUtils__WEBPACK_IMPORTED_MODULE_3__.a$(lrgb),adj=_ColorUtils__WEBPACK_IMPORTED_MODULE_3__.Y_(adj),adj=_ColorUtils__WEBPACK_IMPORTED_MODULE_3__.FL(adj,!1),rgba)return new _ColorSpaces__WEBPACK_IMPORTED_MODULE_1__.Sj(adj[0],adj[1],adj[2],rgb.alpha);const asHSL=_ColorUtils__WEBPACK_IMPORTED_MODULE_3__.jJ(_ColorUtils__WEBPACK_IMPORTED_MODULE_3__.uw(adj));return new _ColorSpaces__WEBPACK_IMPORTED_MODULE_1__.oe(asHSL[0],asHSL[1],asHSL[2],rgb.alpha)}asCSS(darkMode=!1,alpha=!0){const rgba=darkMode?this._forceDark():this.toRGBA();return 0===rgba.alpha?"none":rgba.toString(alpha)}toJSON(){let retValue={val:this._private.val};if(this._private.adjs&&this._private.adjs.length>0){retValue.adjs=[];for(let i=0;i<this._private.adjs.length;i++){let adjustment=this._private.adjs[i],jsonAdjust={},type=adjustment.type||Object.keys(adjustment)[0],amount=void 0!==adjustment.amount?adjustment.amount:adjustment[type];jsonAdjust[type]=void 0===amount||amount,retValue.adjs.push(jsonAdjust)}}return this._private.last&&(retValue.last=this._private.last),retValue}_resolve(){if(this._private.resolved){if(!this._private.parsedVal.schemeKey)return;let schemeColor=this._private.schemeLookup(this._private.parsedVal.schemeKey);if(schemeColor===this._private.parsedVal.schemeColor||schemeColor?.isEqual(this._private.parsedVal.schemeColor))return}const parsedVal=parseVal(this._private.val,this._private.schemeLookup,this._private.indexedColorLookup,this._private.last);let adjusted=((drgbAlpha,adjustments)=>{let drgb=[...drgbAlpha.drgb],alpha=void 0!==drgbAlpha.alpha?drgbAlpha.alpha:1;for(var i=0;adjustments&&i<adjustments.length;i++){let adjustment=adjustments[i],type=adjustment.type||Object.keys(adjustment)[0],amount=void 0!==adjustment.amount?adjustment.amount:adjustment[type];type===ColorAdjustmentType.Alpha?(alpha=amount/100,alpha=Math.max(0,Math.min(1,alpha))):type===ColorAdjustmentType.AlphaOff?(alpha+=amount/100,alpha=Math.max(0,Math.min(1,alpha))):type===ColorAdjustmentType.AlphaMod?(alpha*=amount/100,alpha=Math.max(0,Math.min(1,alpha))):type===ColorAdjustmentType.Hue?drgb=_ColorUtils__WEBPACK_IMPORTED_MODULE_3__.en(_ColorUtils__WEBPACK_IMPORTED_MODULE_3__.$0.HUE,drgb,amount):type===ColorAdjustmentType.Sat?drgb=_ColorUtils__WEBPACK_IMPORTED_MODULE_3__.en(_ColorUtils__WEBPACK_IMPORTED_MODULE_3__.$0.SATURATION,drgb,amount):type===ColorAdjustmentType.Lum?drgb=_ColorUtils__WEBPACK_IMPORTED_MODULE_3__.en(_ColorUtils__WEBPACK_IMPORTED_MODULE_3__.$0.LUMINANCE,drgb,amount):type===ColorAdjustmentType.HueOff?drgb=_ColorUtils__WEBPACK_IMPORTED_MODULE_3__.jG(_ColorUtils__WEBPACK_IMPORTED_MODULE_3__.$0.HUE,drgb,amount):type===ColorAdjustmentType.SatOff?drgb=_ColorUtils__WEBPACK_IMPORTED_MODULE_3__.jG(_ColorUtils__WEBPACK_IMPORTED_MODULE_3__.$0.SATURATION,drgb,amount):type===ColorAdjustmentType.LumOff?drgb=_ColorUtils__WEBPACK_IMPORTED_MODULE_3__.jG(_ColorUtils__WEBPACK_IMPORTED_MODULE_3__.$0.LUMINANCE,drgb,amount):type===ColorAdjustmentType.HueMod?drgb=_ColorUtils__WEBPACK_IMPORTED_MODULE_3__.cQ(_ColorUtils__WEBPACK_IMPORTED_MODULE_3__.$0.HUE,drgb,amount):type===ColorAdjustmentType.SatMod?drgb=_ColorUtils__WEBPACK_IMPORTED_MODULE_3__.cQ(_ColorUtils__WEBPACK_IMPORTED_MODULE_3__.$0.SATURATION,drgb,amount):type===ColorAdjustmentType.LumMod?drgb=_ColorUtils__WEBPACK_IMPORTED_MODULE_3__.cQ(_ColorUtils__WEBPACK_IMPORTED_MODULE_3__.$0.LUMINANCE,drgb,amount):type===ColorAdjustmentType.Red?drgb=_ColorUtils__WEBPACK_IMPORTED_MODULE_3__.Qk(_ColorUtils__WEBPACK_IMPORTED_MODULE_3__.fg.RED,drgb,amount,_ColorUtils__WEBPACK_IMPORTED_MODULE_3__.yw.SET):type===ColorAdjustmentType.Green?drgb=_ColorUtils__WEBPACK_IMPORTED_MODULE_3__.Qk(_ColorUtils__WEBPACK_IMPORTED_MODULE_3__.fg.GREEN,drgb,amount,_ColorUtils__WEBPACK_IMPORTED_MODULE_3__.yw.SET):type===ColorAdjustmentType.Blue?drgb=_ColorUtils__WEBPACK_IMPORTED_MODULE_3__.Qk(_ColorUtils__WEBPACK_IMPORTED_MODULE_3__.fg.BLUE,drgb,amount,_ColorUtils__WEBPACK_IMPORTED_MODULE_3__.yw.SET):type===ColorAdjustmentType.RedOff?drgb=_ColorUtils__WEBPACK_IMPORTED_MODULE_3__.Qk(_ColorUtils__WEBPACK_IMPORTED_MODULE_3__.fg.RED,drgb,amount,_ColorUtils__WEBPACK_IMPORTED_MODULE_3__.yw.OFF):type===ColorAdjustmentType.GreenOff?drgb=_ColorUtils__WEBPACK_IMPORTED_MODULE_3__.Qk(_ColorUtils__WEBPACK_IMPORTED_MODULE_3__.fg.GREEN,drgb,amount,_ColorUtils__WEBPACK_IMPORTED_MODULE_3__.yw.OFF):type===ColorAdjustmentType.BlueOff?drgb=_ColorUtils__WEBPACK_IMPORTED_MODULE_3__.Qk(_ColorUtils__WEBPACK_IMPORTED_MODULE_3__.fg.BLUE,drgb,amount,_ColorUtils__WEBPACK_IMPORTED_MODULE_3__.yw.OFF):type===ColorAdjustmentType.RedMod?drgb=_ColorUtils__WEBPACK_IMPORTED_MODULE_3__.Qk(_ColorUtils__WEBPACK_IMPORTED_MODULE_3__.fg.RED,drgb,amount,_ColorUtils__WEBPACK_IMPORTED_MODULE_3__.yw.MOD):type===ColorAdjustmentType.GreenMod?drgb=_ColorUtils__WEBPACK_IMPORTED_MODULE_3__.Qk(_ColorUtils__WEBPACK_IMPORTED_MODULE_3__.fg.GREEN,drgb,amount,_ColorUtils__WEBPACK_IMPORTED_MODULE_3__.yw.MOD):type===ColorAdjustmentType.BlueMod?drgb=_ColorUtils__WEBPACK_IMPORTED_MODULE_3__.Qk(_ColorUtils__WEBPACK_IMPORTED_MODULE_3__.fg.BLUE,drgb,amount,_ColorUtils__WEBPACK_IMPORTED_MODULE_3__.yw.MOD):type===ColorAdjustmentType.Shade?drgb=_ColorUtils__WEBPACK_IMPORTED_MODULE_3__.Kc(drgb,amount):type===ColorAdjustmentType.Tint?drgb=_ColorUtils__WEBPACK_IMPORTED_MODULE_3__.g6(drgb,amount):type===ColorAdjustmentType.Gray?drgb=_ColorUtils__WEBPACK_IMPORTED_MODULE_3__.s1(drgb):type===ColorAdjustmentType.Comp?drgb=_ColorUtils__WEBPACK_IMPORTED_MODULE_3__.ni(drgb):type===ColorAdjustmentType.Inv?drgb=_ColorUtils__WEBPACK_IMPORTED_MODULE_3__.fJ(drgb,amount):type===ColorAdjustmentType.Gamma?drgb=_ColorUtils__WEBPACK_IMPORTED_MODULE_3__.YL(drgb):type===ColorAdjustmentType.InvGamma?drgb=_ColorUtils__WEBPACK_IMPORTED_MODULE_3__.OL(drgb):console.warn("unknown adjustmentType: "+type)}return{drgb,alpha}})(parsedVal.drgbAlpha,this._private.adjs),drgb=_ColorUtils__WEBPACK_IMPORTED_MODULE_3__.wv(adjusted.drgb);drgb=_ColorUtils__WEBPACK_IMPORTED_MODULE_3__.Y_(drgb);let alpha=_ColorUtils__WEBPACK_IMPORTED_MODULE_3__.UJ(adjusted.alpha);this._private.adjusted=adjusted,this._private.parsedVal=parsedVal,this._private.resolved=new _ColorSpaces__WEBPACK_IMPORTED_MODULE_1__.Sj(drgb[0],drgb[1],drgb[2],alpha)}toRGBA(darkMode=!1){return this._resolve(),darkMode?this._forceDark():this._private.resolved}toHSLA(darkMode=!1){if(this._resolve(),darkMode)return this._forceDark(!1);let asHSL=_ColorUtils__WEBPACK_IMPORTED_MODULE_3__.jJ(this._private.adjusted.drgb);return new _ColorSpaces__WEBPACK_IMPORTED_MODULE_1__.oe(asHSL[0],asHSL[1],asHSL[2],_ColorUtils__WEBPACK_IMPORTED_MODULE_3__.UJ(this._private.adjusted.alpha??1))}toHex(darkMode=!1){this._resolve();const rgba=darkMode?this._forceDark():this._private.resolved;return new _ColorSpaces__WEBPACK_IMPORTED_MODULE_1__.Xj(rgba.red,rgba.green,rgba.blue,rgba.alpha??1)}toString(){let retValue=this._private.val;const adjs=this._private.adjs;for(let i=0;adjs&&i<adjs.length;i++){const adj=adjs[i];adj&&(retValue+=" "+adj.type,null!==adj.amount&&void 0!==adj.amount&&!0!==adj.amount&&(retValue+=" "+adj.amount),i<adjs.length-1&&(retValue+=","))}return retValue}}const resolveAdjustedColor=(valColor,schemeLookup,indexedColorLookup,last=null)=>{if("string"==typeof valColor)return parseAdjustedColor(valColor,schemeLookup,indexedColorLookup,last);if(valColor instanceof AdjustedColor)return valColor;let val,adjs;if(_sheetxl_common__WEBPACK_IMPORTED_MODULE_5__.Gv(valColor)){if(val=valColor.val,!val)return null;adjs=((json=null)=>{if(null===json)return null;if(!Array.isArray(json))throw new Error("ColorAdjustments must be an array: "+json);let retValue=[],jsonArr=json;for(let i=0;i<jsonArr.length;i++){let keys=Object.keys(jsonArr[i]);if(1!==keys.length)throw new Error("ColorAdjustments must be an array of objects all with one key: "+json);const adjustmentType=adjustmentTypesMap.get(keys[0].toLowerCase())??keys[0];let amount=jsonArr[i][adjustmentType];!0===amount&&(amount=void 0),!1!==amount&&retValue.push(new ColorAdjustment(adjustmentType,amount))}return retValue})(valColor.adjs),last=valColor.last??null}else if(!valColor)return null;return new AdjustedColor(val,adjs,schemeLookup,indexedColorLookup,last)},DEFAULT_COLORS={[_SchemeColors__WEBPACK_IMPORTED_MODULE_2__.jb.Bg1]:resolveAdjustedColor("window",null),[_SchemeColors__WEBPACK_IMPORTED_MODULE_2__.jb.Bg2]:resolveAdjustedColor("E7E6E6",null),[_SchemeColors__WEBPACK_IMPORTED_MODULE_2__.jb.Tx1]:resolveAdjustedColor("windowText",null),[_SchemeColors__WEBPACK_IMPORTED_MODULE_2__.jb.Tx2]:resolveAdjustedColor("44546A",null),[_SchemeColors__WEBPACK_IMPORTED_MODULE_2__.jb.Accent1]:resolveAdjustedColor("4472C4",null),[_SchemeColors__WEBPACK_IMPORTED_MODULE_2__.jb.Accent2]:resolveAdjustedColor("ED7D31",null),[_SchemeColors__WEBPACK_IMPORTED_MODULE_2__.jb.Accent3]:resolveAdjustedColor("A5A5A5",null),[_SchemeColors__WEBPACK_IMPORTED_MODULE_2__.jb.Accent4]:resolveAdjustedColor("FFC000",null),[_SchemeColors__WEBPACK_IMPORTED_MODULE_2__.jb.Accent5]:resolveAdjustedColor("5B9BD5",null),[_SchemeColors__WEBPACK_IMPORTED_MODULE_2__.jb.Accent6]:resolveAdjustedColor("70AD47",null),[_SchemeColors__WEBPACK_IMPORTED_MODULE_2__.jb.Hlink]:resolveAdjustedColor("0563C1",null),[_SchemeColors__WEBPACK_IMPORTED_MODULE_2__.jb.FolHlink]:resolveAdjustedColor("954F72",null)},defaultSchemeColorLookup=key=>{const adjustedColor=DEFAULT_COLORS[key];return adjustedColor?adjustedColor.toRGBA():null}},"../../packages/models/src/color/ColorSpaces.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{Sj:()=>RGBAColor,Xj:()=>HexColor,oe:()=>HSLAColor});var _ColorUtils__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("../../packages/models/src/color/ColorUtils.ts");class RGBAColor{constructor(red,green,blue,alpha=1){this._private={red,green,blue,alpha}}get red(){return this._private.red}get green(){return this._private.green}get blue(){return this._private.blue}get alpha(){return this._private.alpha??1}toString(alpha=!0){return alpha&&null!==this._private.alpha?`rgba(${this.red},${this.green},${this.blue},${this.alpha})`:`rgb(${this.red},${this.green},${this.blue})`}isEqual(other){return!!other&&(other.red===this.red&&(other.green===this.green&&(other.blue===this.blue&&other.alpha===this.alpha)))}isAlmostEqual(other){if(!other)return!1;return!(Math.abs(other.red-this.red)>1.5)&&(!(Math.abs(other.green-this.green)>1.5)&&(!(Math.abs(other.blue-this.blue)>1.5)&&!(Math.abs(other.alpha??1-this.alpha??1)>1.5)))}toJSON(){return{r:this.red,g:this.green,b:this.blue,a:this.alpha}}}class HSLAColor{constructor(hue,sat,lum,alpha){this._private={hue,sat,lum,alpha}}get hue(){return this._private.hue}get sat(){return this._private.sat}get lum(){return this._private.lum}get alpha(){return this._private.alpha??1}toString(alpha=!0){return alpha&&null!==this._private.alpha?`hsla(${this.hue},${this.sat},${this.lum},${this.alpha})`:`hsl(${this.hue},${this.sat},${this.lum})`}isEqual(other){return!!other&&(other.hue===this.hue&&(other.sat===this.sat&&(other.lum===this.lum&&other.alpha===this.alpha)))}isAlmostEqual(other){if(!other)return!1;return!(Math.abs(other.hue-this.hue)>1.5)&&(!(Math.abs(other.sat-this.sat)>1.5)&&(!(Math.abs(other.lum-this.lum)>1.5)&&!(Math.abs(other.alpha??1-this.alpha??1)>1.5)))}toJSON(){return{h:this.hue,s:this.sat,l:this.lum,a:this.alpha}}}class HexColor extends RGBAColor{toString(alpha=!0){return alpha&&null!==this._private.alpha?"#"+(0,_ColorUtils__WEBPACK_IMPORTED_MODULE_0__.Ob)(this.red,this.green,this.blue,this.alpha??1).toUpperCase():"#"+(0,_ColorUtils__WEBPACK_IMPORTED_MODULE_0__.Ob)(this.red,this.green,this.blue).toUpperCase()}}},"../../packages/models/src/color/ColorUtils.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{$0:()=>HSLComponent,FL:()=>clampRGB,Kc:()=>applyShade,Nd:()=>rotateHueCss,OL:()=>applyInverseGamma,Ob:()=>rgbToHex,P7:()=>HSL2RGB,Qk:()=>applyRGB,TD:()=>bwColor,UG:()=>REGEX_HEX,UJ:()=>clampAlpha,YL:()=>applyGamma,Y_:()=>roundRGB,Zt:()=>REGEX_RGBA,a$:()=>lin2srgb,cQ:()=>applyHSLMod,d9:()=>REGEX_INDEX,db:()=>REGEX_HSLA,en:()=>applyHSL,fJ:()=>applyInverse,fg:()=>RGBAComponent,g6:()=>applyTint,h2:()=>REGEX_LRGBA,hN:()=>divRGB,hs:()=>REGEX_HEXA,i8:()=>REGEX_HSL,il:()=>parseParts,jG:()=>applyHSLOff,jJ:()=>RGB2HSL,m0:()=>REGEX_RGB,ni:()=>applyComplement,s1:()=>applyGray,uw:()=>srgb2lin,wv:()=>multiplyRGB,yD:()=>REGEX_LRGB,yw:()=>ColorShiftType});var _sheetxl_common__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("../../packages/common/src/utils/CommonUtils.ts"),_primitives_Coordinates__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("../../packages/models/src/primitives/Coordinates.ts");const REGEX_RGB=new RegExp(`^rgb\\(${_primitives_Coordinates__WEBPACK_IMPORTED_MODULE_0__.rR},${_primitives_Coordinates__WEBPACK_IMPORTED_MODULE_0__.rR},${_primitives_Coordinates__WEBPACK_IMPORTED_MODULE_0__.rR}\\)$`),REGEX_RGBA=new RegExp(`^rgba\\(${_primitives_Coordinates__WEBPACK_IMPORTED_MODULE_0__.rR},${_primitives_Coordinates__WEBPACK_IMPORTED_MODULE_0__.rR},${_primitives_Coordinates__WEBPACK_IMPORTED_MODULE_0__.rR},${_primitives_Coordinates__WEBPACK_IMPORTED_MODULE_0__.rR}\\)$`),REGEX_LRGB=new RegExp(`^lrgb\\(${_primitives_Coordinates__WEBPACK_IMPORTED_MODULE_0__.rR},${_primitives_Coordinates__WEBPACK_IMPORTED_MODULE_0__.rR},${_primitives_Coordinates__WEBPACK_IMPORTED_MODULE_0__.rR}\\)$`),REGEX_LRGBA=new RegExp(`^lrgba\\(${_primitives_Coordinates__WEBPACK_IMPORTED_MODULE_0__.rR},${_primitives_Coordinates__WEBPACK_IMPORTED_MODULE_0__.rR},${_primitives_Coordinates__WEBPACK_IMPORTED_MODULE_0__.rR},${_primitives_Coordinates__WEBPACK_IMPORTED_MODULE_0__.rR}\\)$`),REGEX_HSL=new RegExp(`^hsl\\(${_primitives_Coordinates__WEBPACK_IMPORTED_MODULE_0__.rR},${_primitives_Coordinates__WEBPACK_IMPORTED_MODULE_0__.rR},${_primitives_Coordinates__WEBPACK_IMPORTED_MODULE_0__.rR}\\)$`),REGEX_HSLA=new RegExp(`^hsla\\(${_primitives_Coordinates__WEBPACK_IMPORTED_MODULE_0__.rR},${_primitives_Coordinates__WEBPACK_IMPORTED_MODULE_0__.rR},${_primitives_Coordinates__WEBPACK_IMPORTED_MODULE_0__.rR},${_primitives_Coordinates__WEBPACK_IMPORTED_MODULE_0__.rR}\\)$`),REGEX_INDEX=new RegExp("^index[ ]?(\\d+)$","i"),REGEX_HEX=/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,REGEX_HEXA=/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,parseParts=(partR,partG,partB)=>[parseFloat(partR),parseFloat(partG),parseFloat(partB)],bwColor=(r,g,b)=>.299*r+.587*g+.114*b>186?"#000000":"#FFFFFF",divRGB=(input,divisor=255)=>{const retValue=[...input];for(var i=0;i<input.length;i++)retValue[i]=input[i]/divisor;return retValue},multiplyRGB=(input,factor=255)=>{const retValue=[...input];for(var i=0;i<input.length;i++)retValue[i]=input[i]*factor;return retValue},roundRGB=(input,sigFigs=0)=>{const retValue=[...input];for(var i=0;i<input.length;i++)_sheetxl_common__WEBPACK_IMPORTED_MODULE_1__.k_(input[i],sigFigs+8)%1==.5?retValue[i]=Math.floor(input[i]):retValue[i]=_sheetxl_common__WEBPACK_IMPORTED_MODULE_1__.k_(input[i],sigFigs);return retValue},clampRGB=(rgb,linear=!0)=>{const retValue=[...rgb],upper=linear?1:255;for(var i=0;i<rgb.length;i++)retValue[i]=Math.max(0,Math.min(upper,rgb[i]));return retValue},clampAlpha=number=>Math.max(0,Math.min(1,number)),clampHue=hue=>((hue%=360)<0&&(hue-=360),hue),srgb2lin=rgb=>{const retValue=[...rgb];for(var i=0;i<rgb.length;i++)retValue[i]=srgbToLinear(rgb[i]);return retValue},lin2srgb=rgb=>{const retValue=[...rgb];for(var i=0;i<rgb.length;i++)retValue[i]=linearToSrgb(rgb[i]);return retValue},srgbToLinear=x=>x<.04045?x/12.92:Math.pow((x+.055)/1.055,2.4),linearToSrgb=x=>x<.0031308?12.92*x:1.055*Math.pow(x,1/2.4)-.055,HSL2RGB=hsl=>{let h=hsl[0],s=hsl[1],l=hsl[2];h%=360,h/=360,s/=100,l/=100;let q=l<.5?l*(1+s):l+s-s*l,p=2*l-q;return[Math.max(0,HUE2RGB(p,q,h+1/3)),Math.max(0,HUE2RGB(p,q,h)),Math.max(0,HUE2RGB(p,q,h-1/3))]},HUE2RGB=(p,q,h)=>(h<0&&(h+=1),h>1&&(h-=1),6*h<1?p+6*(q-p)*h:2*h<1?q:3*h<2?p+6*(q-p)*(2/3-h):p),RGB2HSL=rgb=>{let r=rgb[0],g=rgb[1],b=rgb[2],min=Math.min(r,Math.min(g,b)),max=Math.max(r,Math.max(g,b)),h=0;max===min?h=0:max===r?h=(60*(g-b)/(max-min)+360)%360:max===g?h=60*(b-r)/(max-min)+120:max===b&&(h=60*(r-g)/(max-min)+240);let l=(max+min)/2,s=0;return s=max===min?0:l<=.5?(max-min)/(max+min):(max-min)/(2-max-min),[h,100*s,100*l]};let HSLComponent=function(HSLComponent){return HSLComponent[HSLComponent.HUE=0]="HUE",HSLComponent[HSLComponent.SATURATION=1]="SATURATION",HSLComponent[HSLComponent.LUMINANCE=2]="LUMINANCE",HSLComponent}({}),RGBAComponent=function(RGBAComponent){return RGBAComponent[RGBAComponent.RED=0]="RED",RGBAComponent[RGBAComponent.GREEN=1]="GREEN",RGBAComponent[RGBAComponent.BLUE=2]="BLUE",RGBAComponent[RGBAComponent.ALPHA=3]="ALPHA",RGBAComponent}({}),ColorShiftType=function(ColorShiftType){return ColorShiftType[ColorShiftType.SET=0]="SET",ColorShiftType[ColorShiftType.OFF=1]="OFF",ColorShiftType[ColorShiftType.MOD=2]="MOD",ColorShiftType}({});const applyShade=(srgb,val)=>{let fVal=val/100;return((srgb,compTransform)=>{let lrgb=srgb2lin(srgb);for(let i=0;i<3;i++)lrgb[i]=compTransform(lrgb[i],lrgb);let retValue=lin2srgb(lrgb);return retValue=clampRGB(retValue),retValue})(srgb,((comp,_lrgb)=>comp*fVal))},applyTint=(srgb,val)=>{let lrgb=srgb2lin(srgb),fVal=val/100;for(var i=0;i<3;i++)lrgb[i]=lrgb[i]*fVal+(1-fVal);let retValue=lin2srgb(lrgb);return retValue=clampRGB(retValue),retValue},applyHSL=(space,srgb,val)=>{let hsl=RGB2HSL(srgb),fVal=val/1;space===HSLComponent.HUE&&(fVal=clampHue(val)),hsl[space]=fVal;let retValue=HSL2RGB(hsl);return retValue=clampRGB(retValue),retValue},applyHSLOff=(space,srgb,val)=>{let hsl=RGB2HSL(srgb);if(space===HSLComponent.HUE){let fVal=val/360;hsl[HSLComponent.HUE]=360*(hsl[HSLComponent.HUE]/360+fVal),hsl[HSLComponent.HUE]%=360,hsl[HSLComponent.HUE]<0&&(hsl[HSLComponent.HUE]-=360)}else{let fVal=val/.1;hsl[space]=.1*(hsl[space]/.1+fVal)}let retValue=HSL2RGB(hsl);return retValue=clampRGB(retValue),retValue},applyHSLMod=(space,srgb,val)=>{let hsl=RGB2HSL(srgb),fVal=val/100;hsl[space]=hsl[space]*fVal,space===HSLComponent.HUE&&(hsl[HSLComponent.HUE]=clampHue(hsl[HSLComponent.HUE]));let retValue=HSL2RGB(hsl);return retValue=clampRGB(retValue),retValue},applyRGB=(space,srgb,val,type)=>{let lrgb=srgb2lin(srgb),fVal=val/100;type===ColorShiftType.SET?lrgb[space]=fVal:type===ColorShiftType.OFF?lrgb[space]+=fVal:type===ColorShiftType.MOD&&(lrgb[space]*=fVal);let retValue=lin2srgb(lrgb);return retValue=clampRGB(retValue),retValue},applyGray=srgb=>{let lrgb=srgb2lin(srgb),gray=.213*lrgb[RGBAComponent.RED]+.715*lrgb[RGBAComponent.GREEN]+.072*lrgb[RGBAComponent.BLUE];for(let i=0;i<3;i++)lrgb[i]=gray;let retValue=lin2srgb(lrgb);return retValue=clampRGB(retValue),retValue},applyComplement=srgb=>{let hsl=RGB2HSL(srgb);hsl[HSLComponent.HUE]+=180,hsl[HSLComponent.HUE]%=360,hsl[HSLComponent.HUE]<0&&(hsl[HSLComponent.HUE]-=360);let retValue=HSL2RGB(hsl);return retValue=clampRGB(retValue),retValue},applyInverse=(rgb,linear=!0)=>{let retValue=linear?srgb2lin(rgb):[...rgb];const upper=linear?1:255;for(let i=0;i<3;i++)retValue[i]=upper-retValue[i];return linear&&(retValue=lin2srgb(retValue)),retValue=clampRGB(retValue,linear),retValue},applyGamma=srgb=>{let shift=[0,0,0];for(let i=0;i<3;i++)shift[i]=linearToSrgb(srgb[i]);return clampRGB(shift)},applyInverseGamma=srgb=>{let shift=[0,0,0];for(let i=0;i<3;i++)shift[i]=srgbToLinear(srgb[i]);return clampRGB(shift)},rgbToHex=(r,g,b,a=null)=>{const componentToHex=c=>{let hex=c.toString(16);return 1===hex.length?"0"+hex:hex};return(null===a?"":componentToHex(Math.round(255*a)))+componentToHex(Number(r)).toUpperCase()+componentToHex(Number(g)).toUpperCase()+componentToHex(Number(b)).toUpperCase()},lumR=.2126,lumG=.7152,lumB=.0722,rotateHueCss=(srgb,angle)=>{angle=(angle%360+360)%360;const matrix=[1,0,0,0,1,0,0,0,1],c=Math.cos(angle*Math.PI/180),s=Math.sin(angle*Math.PI/180);matrix[0]=lumR+.7874*c-lumR*s,matrix[1]=lumG-lumG*c-lumG*s,matrix[2]=lumB-lumB*c+.9278*s,matrix[3]=lumR-lumR*c+.143*s,matrix[4]=lumG+(1-lumG)*c+.14*s,matrix[5]=lumB-lumB*c-.283*s,matrix[6]=lumR-lumR*c-.7874*s,matrix[7]=lumG-lumG*c+lumG*s,matrix[8]=lumB+.9278*c+lumB*s;const clamp=num=>Math.round(Math.max(0,Math.min(255,num))),r=srgb[0],g=srgb[1],b=srgb[2];return[clamp(matrix[0]*r+matrix[1]*g+matrix[2]*b),clamp(matrix[3]*r+matrix[4]*g+matrix[5]*b),clamp(matrix[6]*r+matrix[7]*g+matrix[8]*b)]}},"../../packages/models/src/color/IndexedColors.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{R:()=>defaultIndexColor});var _ColorSpaces__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("../../packages/models/src/color/ColorSpaces.ts");const shorthandRegex=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,shortHandRegEx2=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,hexToRGB=function(hex){if(!hex)return null;hex=hex.replace(shorthandRegex,(function(m,r,g,b){return r+r+g+g+b+b}));let result=shortHandRegEx2.exec(hex);return result?new _ColorSpaces__WEBPACK_IMPORTED_MODULE_0__.Sj(parseInt(result[1],16),parseInt(result[2],16),parseInt(result[3],16)):null},INDEX_COLORS=["000000","FFFFFF","FF0000","00FF00","0000FF","FFFF00","FF00FF","00FFFF","000000","FFFFFF","FF0000","00FF00","0000FF","FFFF00","FF00FF","00FFFF","800000","008000","000080","808000","800080","008080","C0C0C0","808080","9999FF","993366","FFFFCC","CCFFFF","660066","FF8080","0066CC","CCCCFF","000080","FF00FF","FFFF00","00FFFF","800080","800000","008080","0000FF","00CCFF","CCFFFF","CCFFCC","FFFF99","99CCFF","FF99CC","CC99FF","FFCC99","3366FF","33CCCC","99CC00","FFCC00","FF9900","FF6600","666699","969696","003366","339966","003300","333300","993300","993366","333399","333333"],MAP_INDEXED_COLORS=new Map;for(let i=0;i<INDEX_COLORS.length;i++)MAP_INDEXED_COLORS.set(i,hexToRGB(INDEX_COLORS[i]));MAP_INDEXED_COLORS.set(-4105,null),MAP_INDEXED_COLORS.set(-4142,null),MAP_INDEXED_COLORS.set(64,hexToRGB("000000")),MAP_INDEXED_COLORS.set(65,hexToRGB("FFFFFF")),MAP_INDEXED_COLORS.set(81,hexToRGB("FFFFFF"));const defaultIndexColor=index=>MAP_INDEXED_COLORS.get(index)},"../../packages/models/src/color/PresetColors.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{D8:()=>DEFAULT_PRESET_COLOR_LOOKUP,xY:()=>PresetColor});let PresetColor=function(PresetColor){return PresetColor.ActiveBorder="activeBorder",PresetColor.ActiveCaption="activeCaption",PresetColor.CaptionText="captionText",PresetColor.AppWorkspace="appWorkspace",PresetColor.BtnFace="btnFace",PresetColor.BtnShadow="btnShadow",PresetColor.DkShadow3d="3dDkShadow",PresetColor.BtnHighlight="btnHighlight",PresetColor.Light3d="3dLight",PresetColor.BtnText="btnText",PresetColor.Background="background",PresetColor.GrayText="grayText",PresetColor.Highlight="highlight",PresetColor.HighlightText="highlightText",PresetColor.HotLight="hotLight",PresetColor.InactiveBorder="inactiveBorder",PresetColor.InactiveCaption="inactiveCaption",PresetColor.InactiveCaptionText="inactiveCaptionText",PresetColor.InfoBk="infoBk",PresetColor.InfoText="infoText",PresetColor.Menu="menu",PresetColor.MenuText="menuText",PresetColor.ScrollBar="scrollBar",PresetColor.Window="window",PresetColor.WindowFrame="windowFrame",PresetColor.WindowText="windowText",PresetColor.Transparent="transparent",PresetColor.AliceBlue="aliceBlue",PresetColor.AntiqueWhite="antiqueWhite",PresetColor.Aqua="aqua",PresetColor.Aquamarine="aquamarine",PresetColor.Azure="azure",PresetColor.Beige="beige",PresetColor.Bisque="bisque",PresetColor.Black="black",PresetColor.BlanchedAlmond="blanchedAlmond",PresetColor.Blue="blue",PresetColor.BlueViolet="blueViolet",PresetColor.Brown="brown",PresetColor.BurlyWood="burlyWood",PresetColor.CadetBlue="cadetBlue",PresetColor.Chartreuse="chartreuse",PresetColor.Chocolate="chocolate",PresetColor.Coral="coral",PresetColor.CornflowerBlue="cornflowerBlue",PresetColor.Cornsilk="cornsilk",PresetColor.Crimson="crimson",PresetColor.Cyan="cyan",PresetColor.DkBlue="dkBlue",PresetColor.DkCyan="dkCyan",PresetColor.DkGoldenrod="dkGoldenrod",PresetColor.DkGray="dkGray",PresetColor.DkGreen="dkGreen",PresetColor.DkKhaki="dkKhaki",PresetColor.DkMagenta="dkMagenta",PresetColor.DkOliveGreen="dkOliveGreen",PresetColor.DkOrange="dkOrange",PresetColor.DkOrchid="dkOrchid",PresetColor.DkRed="dkRed",PresetColor.DkSalmon="dkSalmon",PresetColor.DkSeaGreen="dkSeaGreen",PresetColor.DkSlateBlue="dkSlateBlue",PresetColor.DkSlateGray="dkSlateGray",PresetColor.DkTurquoise="dkTurquoise",PresetColor.DkViolet="dkViolet",PresetColor.DeepPink="deepPink",PresetColor.DeepSkyBlue="deepSkyBlue",PresetColor.DimGray="dimGray",PresetColor.DodgerBlue="dodgerBlue",PresetColor.Firebrick="firebrick",PresetColor.FloralWhite="floralWhite",PresetColor.ForestGreen="forestGreen",PresetColor.Fuchsia="fuchsia",PresetColor.Gainsboro="gainsboro",PresetColor.GhostWhite="ghostWhite",PresetColor.Gold="gold",PresetColor.Goldenrod="goldenrod",PresetColor.Gray="gray",PresetColor.Green="green",PresetColor.GreenYellow="greenYellow",PresetColor.Honeydew="honeydew",PresetColor.HotPink="hotPink",PresetColor.IndianRed="indianRed",PresetColor.Indigo="indigo",PresetColor.Ivory="ivory",PresetColor.Khaki="khaki",PresetColor.Lavender="lavender",PresetColor.LavenderBlush="lavenderBlush",PresetColor.LawnGreen="lawnGreen",PresetColor.LemonChiffon="lemonChiffon",PresetColor.LtBlue="ltBlue",PresetColor.LtCoral="ltCoral",PresetColor.LtCyan="ltCyan",PresetColor.LtGoldenrodYellow="ltGoldenrodYellow",PresetColor.LtGray="ltGray",PresetColor.LtGreen="ltGreen",PresetColor.LtPink="ltPink",PresetColor.LtSalmon="ltSalmon",PresetColor.LtSeaGreen="ltSeaGreen",PresetColor.LtSkyBlue="ltSkyBlue",PresetColor.LtSlateGray="ltSlateGray",PresetColor.LtSteelBlue="ltSteelBlue",PresetColor.LtYellow="ltYellow",PresetColor.Lime="lime",PresetColor.LimeGreen="limeGreen",PresetColor.Linen="linen",PresetColor.Magenta="magenta",PresetColor.Maroon="maroon",PresetColor.MedAquamarine="medAquamarine",PresetColor.MedBlue="medBlue",PresetColor.MedOrchid="medOrchid",PresetColor.MedPurple="medPurple",PresetColor.MedSeaGreen="medSeaGreen",PresetColor.MedSlateBlue="medSlateBlue",PresetColor.MedSpringGreen="medSpringGreen",PresetColor.MedTurquoise="medTurquoise",PresetColor.MedVioletRed="medVioletRed",PresetColor.MidnightBlue="midnightBlue",PresetColor.MintCream="mintCream",PresetColor.MistyRose="mistyRose",PresetColor.Moccasin="moccasin",PresetColor.NavajoWhite="navajoWhite",PresetColor.Navy="navy",PresetColor.OldLace="oldLace",PresetColor.Olive="olive",PresetColor.OliveDrab="oliveDrab",PresetColor.Orange="orange",PresetColor.OrangeRed="orangeRed",PresetColor.Orchid="orchid",PresetColor.PaleGoldenrod="paleGoldenrod",PresetColor.PaleGreen="paleGreen",PresetColor.PaleTurquoise="paleTurquoise",PresetColor.PaleVioletRed="paleVioletRed",PresetColor.PapayaWhip="papayaWhip",PresetColor.PeachPuff="peachPuff",PresetColor.Peru="peru",PresetColor.Pink="pink",PresetColor.Plum="plum",PresetColor.PowderBlue="powderBlue",PresetColor.Purple="purple",PresetColor.Red="red",PresetColor.RosyBrown="rosyBrown",PresetColor.RoyalBlue="royalBlue",PresetColor.SaddleBrown="saddleBrown",PresetColor.Salmon="salmon",PresetColor.SandyBrown="sandyBrown",PresetColor.SeaGreen="seaGreen",PresetColor.SeaShell="seaShell",PresetColor.Sienna="sienna",PresetColor.Silver="silver",PresetColor.SkyBlue="skyBlue",PresetColor.SlateBlue="slateBlue",PresetColor.SlateGray="slateGray",PresetColor.Snow="snow",PresetColor.SpringGreen="springGreen",PresetColor.SteelBlue="steelBlue",PresetColor.Tan="tan",PresetColor.Teal="teal",PresetColor.Thistle="thistle",PresetColor.Tomato="tomato",PresetColor.Turquoise="turquoise",PresetColor.Violet="violet",PresetColor.Wheat="wheat",PresetColor.White="white",PresetColor.WhiteSmoke="whiteSmoke",PresetColor.Yellow="yellow",PresetColor.YellowGreen="yellowGreen",PresetColor.ButtonFace="buttonFace",PresetColor.ButtonHighlight="buttonHighlight",PresetColor.ButtonShadow="buttonShadow",PresetColor.GradientActiveCaption="gradientActiveCaption",PresetColor.GradientInactiveCaption="gradientInactiveCaption",PresetColor.MenuBar="menuBar",PresetColor.MenuHighlight="menuHighlight",PresetColor}({});const PRESET_COLOR_DEFINITIONS=[[4290032820,1,PresetColor.ActiveBorder,"system"],[4288263377,2,PresetColor.ActiveCaption,"system"],[4278190080,3,PresetColor.CaptionText,"system"],[4289440683,4,PresetColor.AppWorkspace,"system"],[4293980400,5,PresetColor.BtnFace,"system"],[4285098345,6,PresetColor.BtnShadow,"system"],[4278190080,7,PresetColor.DkShadow3d,"system"],[4293125091,8,PresetColor.BtnHighlight,"system"],[4293125091,9,PresetColor.Light3d,"system"],[4278190080,10,PresetColor.BtnText,"system"],[4278190080,11,PresetColor.Background,"system"],[4285361517,12,PresetColor.GrayText,"system"],[4281571839,13,PresetColor.Highlight,"system"],[4294967295,14,PresetColor.HighlightText,"system"],[4278216396,15,PresetColor.HotLight,"system"],[4294244348,16,PresetColor.InactiveBorder,"system"],[4290760155,17,PresetColor.InactiveCaption,"system"],[4278190080,18,PresetColor.InactiveCaptionText,"system"],[4294967265,19,PresetColor.InfoBk,"system"],[4278190080,20,PresetColor.InfoText,"system"],[4293980400,21,PresetColor.Menu,"system"],[4278190080,22,PresetColor.MenuText,"system"],[4291348680,23,PresetColor.ScrollBar,"system"],[4294967295,24,PresetColor.Window,"system"],[4284769380,25,PresetColor.WindowFrame,"system"],[4278190080,26,PresetColor.WindowText,"system"],[16777215,27,PresetColor.Transparent],[4293982463,28,PresetColor.AliceBlue],[4294634455,29,PresetColor.AntiqueWhite],[4278255615,30,PresetColor.Aqua],[4286578644,31,PresetColor.Aquamarine],[4293984255,32,PresetColor.Azure],[4294309340,33,PresetColor.Beige],[4294960324,34,PresetColor.Bisque],[4278190080,35,PresetColor.Black],[4294962125,36,PresetColor.BlanchedAlmond],[4278190335,37,PresetColor.Blue],[4287245282,38,PresetColor.BlueViolet],[4289014314,39,PresetColor.Brown],[4292786311,40,PresetColor.BurlyWood],[4284456608,41,PresetColor.CadetBlue],[4286578432,42,PresetColor.Chartreuse],[4291979550,43,PresetColor.Chocolate],[4294934352,44,PresetColor.Coral],[4284782061,45,PresetColor.CornflowerBlue],[4294965468,46,PresetColor.Cornsilk],[4292613180,47,PresetColor.Crimson],[4278255615,48,PresetColor.Cyan],[4278190219,49,PresetColor.DkBlue],[4278225803,50,PresetColor.DkCyan],[4290283019,51,PresetColor.DkGoldenrod],[4289309097,52,PresetColor.DkGray],[4278215680,53,PresetColor.DkGreen],[4290623339,54,PresetColor.DkKhaki],[4287299723,55,PresetColor.DkMagenta],[4283788079,56,PresetColor.DkOliveGreen],[4294937600,57,PresetColor.DkOrange],[4288230092,58,PresetColor.DkOrchid],[4287299584,59,PresetColor.DkRed],[4293498490,60,PresetColor.DkSalmon],[4287609995,61,PresetColor.DkSeaGreen],[4282924427,62,PresetColor.DkSlateBlue],[4281290575,63,PresetColor.DkSlateGray],[4278243025,64,PresetColor.DkTurquoise],[4287889619,65,PresetColor.DkViolet],[4294907027,66,PresetColor.DeepPink],[4278239231,67,PresetColor.DeepSkyBlue],[4285098345,68,PresetColor.DimGray],[4280193279,69,PresetColor.DodgerBlue],[4289864226,70,PresetColor.Firebrick],[4294966e3,71,PresetColor.FloralWhite],[4280453922,72,PresetColor.ForestGreen],[4294902015,73,PresetColor.Fuchsia],[4292664540,74,PresetColor.Gainsboro],[4294506751,75,PresetColor.GhostWhite],[4294956800,76,PresetColor.Gold],[4292519200,77,PresetColor.Goldenrod],[4286611584,78,PresetColor.Gray],[4278222848,79,PresetColor.Green],[4289593135,80,PresetColor.GreenYellow],[4293984240,81,PresetColor.Honeydew],[4294928820,82,PresetColor.HotPink],[4291648604,83,PresetColor.IndianRed],[4283105410,84,PresetColor.Indigo],[4294967280,85,PresetColor.Ivory],[4293977740,86,PresetColor.Khaki],[4293322490,87,PresetColor.Lavender],[4294963445,88,PresetColor.LavenderBlush],[4286381056,89,PresetColor.LawnGreen],[4294965965,90,PresetColor.LemonChiffon],[4289583334,91,PresetColor.LtBlue],[4293951616,92,PresetColor.LtCoral],[4292935679,93,PresetColor.LtCyan],[4294638200,94,PresetColor.LtGoldenrodYellow],[4292072403,95,PresetColor.LtGray],[4287688336,96,PresetColor.LtGreen],[4294948545,97,PresetColor.LtPink],[4294942842,98,PresetColor.LtSalmon],[4280332970,99,PresetColor.LtSeaGreen],[4287090426,100,PresetColor.LtSkyBlue],[4286023833,101,PresetColor.LtSlateGray],[4289774814,102,PresetColor.LtSteelBlue],[4294967264,103,PresetColor.LtYellow],[4278255360,104,PresetColor.Lime],[4281519410,105,PresetColor.LimeGreen],[4294635750,106,PresetColor.Linen],[4294902015,107,PresetColor.Magenta],[4286578688,108,PresetColor.Maroon],[4284927402,109,PresetColor.MedAquamarine],[4278190285,110,PresetColor.MedBlue],[4290401747,111,PresetColor.MedOrchid],[4287852763,112,PresetColor.MedPurple],[4282168177,113,PresetColor.MedSeaGreen],[4286277870,114,PresetColor.MedSlateBlue],[4278254234,115,PresetColor.MedSpringGreen],[4282962380,116,PresetColor.MedTurquoise],[4291237253,117,PresetColor.MedVioletRed],[4279834992,118,PresetColor.MidnightBlue],[4294311930,119,PresetColor.MintCream],[4294960353,120,PresetColor.MistyRose],[4294960309,121,PresetColor.Moccasin],[4294958765,122,PresetColor.NavajoWhite],[4278190208,123,PresetColor.Navy],[4294833638,124,PresetColor.OldLace],[4286611456,125,PresetColor.Olive],[4285238819,126,PresetColor.OliveDrab],[4294944e3,127,PresetColor.Orange],[4294919424,128,PresetColor.OrangeRed],[4292505814,129,PresetColor.Orchid],[4293847210,130,PresetColor.PaleGoldenrod],[4288215960,131,PresetColor.PaleGreen],[4289720046,132,PresetColor.PaleTurquoise],[4292571283,133,PresetColor.PaleVioletRed],[4294963157,134,PresetColor.PapayaWhip],[4294957753,135,PresetColor.PeachPuff],[4291659071,136,PresetColor.Peru],[4294951115,137,PresetColor.Pink],[4292714717,138,PresetColor.Plum],[4289781990,139,PresetColor.PowderBlue],[4286578816,140,PresetColor.Purple],[4294901760,141,PresetColor.Red],[4290547599,142,PresetColor.RosyBrown],[4282477025,143,PresetColor.RoyalBlue],[4287317267,144,PresetColor.SaddleBrown],[4294606962,145,PresetColor.Salmon],[4294222944,146,PresetColor.SandyBrown],[4281240407,147,PresetColor.SeaGreen],[4294964718,148,PresetColor.SeaShell],[4288696877,149,PresetColor.Sienna],[4290822336,150,PresetColor.Silver],[4287090411,151,PresetColor.SkyBlue],[4285160141,152,PresetColor.SlateBlue],[4285563024,153,PresetColor.SlateGray],[4294966010,154,PresetColor.Snow],[4278255487,155,PresetColor.SpringGreen],[4282811060,156,PresetColor.SteelBlue],[4291998860,157,PresetColor.Tan],[4278222976,158,PresetColor.Teal],[4292394968,159,PresetColor.Thistle],[4294927175,160,PresetColor.Tomato],[4282441936,161,PresetColor.Turquoise],[4293821166,162,PresetColor.Violet],[4294303411,163,PresetColor.Wheat],[4294967295,164,PresetColor.White],[4294309365,165,PresetColor.WhiteSmoke],[4294967040,166,PresetColor.Yellow],[4288335154,167,PresetColor.YellowGreen],[4293980400,168,PresetColor.ButtonFace],[4294967295,169,PresetColor.ButtonHighlight],[4288716960,170,PresetColor.ButtonShadow],[4290367978,171,PresetColor.GradientActiveCaption],[4292338930,172,PresetColor.GradientInactiveCaption],[4293980400,173,PresetColor.MenuBar],[4281571839,174,PresetColor.MenuHighlight]];const DEFAULT_PRESET_COLOR_LOOKUP=new class PresetColorLookup{constructor(){this._lookupOoxmlId=new Map,this._lookupNativeId=new Map,this._lookupRGBA=new Map;for(let i=0;i<PRESET_COLOR_DEFINITIONS.length;i++){let definition=PRESET_COLOR_DEFINITIONS[i],rgba=definition[0],a=(rgba>>24&255)/255,r=rgba>>16&255,g=rgba>>8&255,b=255&rgba,presetColorMapping={nativeId:definition[1],ooxmlId:definition[2],rgbaColor:{r,g,b,a},system:definition.length>3};this._lookupOoxmlId.set(presetColorMapping.ooxmlId.toLowerCase(),presetColorMapping),this._lookupNativeId.set(presetColorMapping.nativeId,presetColorMapping),this._lookupRGBA.set(presetColorMapping.rgbaColor,presetColorMapping)}}valueOfOoxmlId(ooxmlId){return this._lookupOoxmlId.get(ooxmlId?ooxmlId.toLowerCase():"transparent")}valueOfNativeId(nativeId){return this._lookupNativeId.get(nativeId||27)}valueOfRGB(rgba){let key=rgba;return void 0===rgba.a&&(key={...rgba},key.a=1),this._lookupRGBA.get(key)}}},"../../packages/models/src/color/SchemeColors.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{Ay:()=>__WEBPACK_DEFAULT_EXPORT__,gF:()=>findSchemaDefinition,jb:()=>SchemeColor});let SchemeColor=function(SchemeColor){return SchemeColor.Bg1="bg1",SchemeColor.Bg2="bg2",SchemeColor.Tx1="tx1",SchemeColor.Tx2="tx2",SchemeColor.Accent1="accent1",SchemeColor.Accent2="accent2",SchemeColor.Accent3="accent3",SchemeColor.Accent4="accent4",SchemeColor.Accent5="accent5",SchemeColor.Accent6="accent6",SchemeColor.Hlink="hlink",SchemeColor.FolHlink="folHlink",SchemeColor}({});const SCHEME_COLOR_DEFINITIONS=[{schemeColor:"dk1",description:"Text/Background - Dark 1"},{schemeColor:"lt1",description:"Text/Background - Light 1"},{schemeColor:"dk2",description:"Text/Background - Dark 2"},{schemeColor:"lt2",description:"Text/Background - Light 2"},{schemeColor:"accent1",description:"Accent 1"},{schemeColor:"accent2",description:"Accent 2"},{schemeColor:"accent3",description:"Accent 3"},{schemeColor:"accent4",description:"Accent 4"},{schemeColor:"accent5",description:"Accent 5"},{schemeColor:"accent6",description:"Accent 6"},{schemeColor:"hlink",description:"Hyperlink"},{schemeColor:"folHlink",description:"Followed Hyperlink"},{schemeColor:"tx1",description:"First Text Color"},{schemeColor:"tx2",description:"Second Text Color"},{schemeColor:"bg1",description:"First Background Color"},{schemeColor:"bg2",description:"Second Background Color"}],SCHEME_COLOR_MAP=new Map;for(let i=0;i<SCHEME_COLOR_DEFINITIONS.length;i++)SCHEME_COLOR_MAP.set(SCHEME_COLOR_DEFINITIONS[i].schemeColor.toLowerCase(),SCHEME_COLOR_DEFINITIONS[i]);const findSchemaDefinition=function(schemeColor){return SCHEME_COLOR_MAP.get(schemeColor.toLowerCase())??null},__WEBPACK_DEFAULT_EXPORT__=findSchemaDefinition},"../../packages/models/src/dagm/PropertyPersister.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});const __WEBPACK_DEFAULT_EXPORT__=class PropertyPersister{constructor(path){path&&(this._pathParts=path.split("."))}load(property,json){if(!this._pathParts){let retValue=json[property.persistKey];if(void 0===retValue)return;return this.fromJSON(retValue,property.persistKey)}let node=json;for(let i=0;i<this._pathParts.length;i++){if(null===node)return null;if(void 0===node||void 0===node[this._pathParts[i]])return;node=node[this._pathParts[i]]}if(void 0!==node)return this.fromJSON(node,property.persistKey)}save(property,json,value){if(!this._pathParts)return void(void 0===value?delete json[property.persistKey]:json[property.persistKey]=this.toJSON(value));let node=json;for(let i=0;i<this._pathParts.length-1;i++)void 0===node[this._pathParts[i]]&&(node[this._pathParts[i]]={}),node=node[this._pathParts[i]];void 0===value?delete node[this._pathParts[this._pathParts.length-1]]:node[this._pathParts[this._pathParts.length-1]]=this.toJSON(value)}toJSON(value){return value}fromJSON(jsonValue,_persistKey){return jsonValue}}},"../../packages/models/src/primitives/Coordinates.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{iI:()=>ImmutableRectangle,rR:()=>REGEX_FLOAT_STR,sV:()=>ManualLayoutPersister,uh:()=>manualLayoutSetter,w_:()=>FLOAT_SEP_STR});var _sheetxl_common__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("../../packages/common/src/utils/CommonUtils.ts"),_dagm_PropertyPersister__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("../../packages/models/src/dagm/PropertyPersister.js");const FLOAT_SEP_STR=".",REGEX_FLOAT_STR=`\\s*([-]?[0-9e]*[${FLOAT_SEP_STR}]?[0-9]+)`,REGEX_COORDINATES=new RegExp(`^${REGEX_FLOAT_STR},${REGEX_FLOAT_STR},${REGEX_FLOAT_STR},${REGEX_FLOAT_STR}$`),REGEX_COORDINATES_RECT=new RegExp(`^rect(${REGEX_FLOAT_STR},${REGEX_FLOAT_STR},${REGEX_FLOAT_STR},${REGEX_FLOAT_STR})$`);new RegExp(`^inset(${REGEX_FLOAT_STR},${REGEX_FLOAT_STR},${REGEX_FLOAT_STR},${REGEX_FLOAT_STR})$`);class ImmutableRectangle{constructor(json){if(this._private={json},"string"==typeof json){let parts=json.match(REGEX_COORDINATES_RECT)||json.match(REGEX_COORDINATES);if(!parts)throw new Error("invalid rect format: "+json);this._private.x=parseFloat(parts[1]),this._private.y=parseFloat(parts[2]),this._private.width=parseFloat(parts[3]),this._private.height=parseFloat(parts[4])}else this._private.x=parseFloat(json.x||0),this._private.y=parseFloat(json.y||0),this._private.width=parseFloat(json.width||json.w||0),this._private.height=parseFloat(json.height||json.h||0)}toJSON(){return this.toString()}get x(){return this._private.x}get y(){return this._private.y}get width(){return this._private.width}get height(){return this._private.height}toString(){return _sheetxl_common__WEBPACK_IMPORTED_MODULE_0__.k_(this.x,4)+","+_sheetxl_common__WEBPACK_IMPORTED_MODULE_0__.k_(this.y,4)+","+_sheetxl_common__WEBPACK_IMPORTED_MODULE_0__.k_(this.width,4)+","+_sheetxl_common__WEBPACK_IMPORTED_MODULE_0__.k_(this.height,4)}}class ManualLayout{constructor(json){if(this._private={json,resolved:{}},"string"==typeof json){let parts=json.match(REGEX_COORDINATES_RECT)||json.match(REGEX_COORDINATES);if(!parts)throw new Error("invalid string layout format: "+json);this._private.resolved.x=_sheetxl_common__WEBPACK_IMPORTED_MODULE_0__.k_(parseFloat(parts[1]),4),this._private.resolved.y=_sheetxl_common__WEBPACK_IMPORTED_MODULE_0__.k_(parseFloat(parts[2]),4),this._private.resolved.w=_sheetxl_common__WEBPACK_IMPORTED_MODULE_0__.k_(parseFloat(parts[3]),4),this._private.resolved.height=_sheetxl_common__WEBPACK_IMPORTED_MODULE_0__.k_(parseFloat(parts[4]),4)}else void 0!==json.x&&(this._private.resolved.x=_sheetxl_common__WEBPACK_IMPORTED_MODULE_0__.k_(json.x,4)),void 0!==json.y&&(this._private.resolved.y=_sheetxl_common__WEBPACK_IMPORTED_MODULE_0__.k_(json.y,4)),void 0!==json.w&&(this._private.resolved.w=_sheetxl_common__WEBPACK_IMPORTED_MODULE_0__.k_(json.w,4)),void 0!==json.h&&(this._private.resolved.h=_sheetxl_common__WEBPACK_IMPORTED_MODULE_0__.k_(json.h,4)),void 0!==json.width&&(this._private.resolved.w=_sheetxl_common__WEBPACK_IMPORTED_MODULE_0__.k_(json.width,4)),void 0!==json.height&&(this._private.resolved.h=_sheetxl_common__WEBPACK_IMPORTED_MODULE_0__.k_(json.height,4)),void 0!==json.xMode&&(this._private.resolved.xMode=json.xMode),void 0!==json.yMode&&(this._private.resolved.yMode=json.yMode),void 0!==json.wMode&&(this._private.resolved.wMode=json.wMode),void 0!==json.hMode&&(this._private.resolved.hMode=json.hMode)}toJSON(){return this._private.resolved}get x(){return this._private.resolved.x}get y(){return this._private.resolved.y}get w(){return this._private.resolved.w}get h(){return this._private.resolved.h}get width(){return this._private.resolved.w}get height(){return this._private.resolved.h}get xMode(){return this._private.resolved.xMode}get yMode(){return this._private.resolved.yMode}get wMode(){return this._private.resolved.wMode}get hMode(){return this._private.resolved.hMode}toString(){return JSON.stringify(this._private.resolved)}}const manualLayoutSetter=function(value){return void 0===value?value:new ManualLayout(value)};class ManualLayoutPersister extends _dagm_PropertyPersister__WEBPACK_IMPORTED_MODULE_1__.A{toJSON(value){return value&&value.toJSON?value.toJSON():value}fromJSON(jsonValue){return new ManualLayout(jsonValue)}}}}]);