@mlightcad/common 1.4.5 → 1.4.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/common.js CHANGED
@@ -499,7 +499,7 @@ class w {
499
499
  return this.getNameByColor(t);
500
500
  }
501
501
  }
502
- class _ {
502
+ class B {
503
503
  /**
504
504
  * Constructs a new AcCmColor.
505
505
  * @param method Initial color method (defaults to `ByColor`)
@@ -671,6 +671,25 @@ class _ {
671
671
  get isByACI() {
672
672
  return this._colorMethod === i.ByACI;
673
673
  }
674
+ /**
675
+ * Returns true if the color method is ByACI and ACI value is 7
676
+ *
677
+ * Notes:
678
+ * In AutoCAD, ACI Color 7 (Color Index 7) is officially named "Black" or "White" depending on
679
+ * the context, but it is functionally defined as the "Contrasting Color" or "Auto-Contrast Color."
680
+ * Here is the technical explanation of its behavior:
681
+ * - If the background is dark: Color 7 displays as White.
682
+ * - If the background is light: Color 7 displays as Black.
683
+ */
684
+ get isForeground() {
685
+ return this._colorMethod === i.ByACI && this._value === 7;
686
+ }
687
+ /**
688
+ * Sets the color to ACI value 7.
689
+ */
690
+ setForeground() {
691
+ return this._colorMethod = i.ByACI, this._value = 7, this;
692
+ }
674
693
  // ---------------------------------------------------------------------
675
694
  // Layer / Block helpers
676
695
  // ---------------------------------------------------------------------
@@ -740,7 +759,7 @@ class _ {
740
759
  * @returns A new AcCmColor instance with the same method and value
741
760
  */
742
761
  clone() {
743
- const e = new _();
762
+ const e = new B();
744
763
  return e._colorMethod = this._colorMethod, e._value = this._value, e;
745
764
  }
746
765
  /**
@@ -793,34 +812,34 @@ class _ {
793
812
  if (!e) return;
794
813
  const t = e.trim();
795
814
  if (/^bylayer$/i.test(t))
796
- return new _(i.ByLayer);
815
+ return new B(i.ByLayer);
797
816
  if (/^byblock$/i.test(t))
798
- return new _(i.ByBlock);
817
+ return new B(i.ByBlock);
799
818
  const s = t.match(
800
819
  /^rgb\s*:\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})$/i
801
820
  );
802
821
  if (s) {
803
- const n = Number(s[1]), l = Number(s[2]), c = Number(s[3]), v = new _(i.ByColor);
822
+ const n = Number(s[1]), l = Number(s[2]), c = Number(s[3]), v = new B(i.ByColor);
804
823
  return v.setRGB(n, l, c), v;
805
824
  }
806
825
  if (/^\d{1,3},\d{1,3},\d{1,3}$/.test(t)) {
807
- const [n, l, c] = t.split(",").map(Number), v = new _(i.ByColor);
826
+ const [n, l, c] = t.split(",").map(Number), v = new B(i.ByColor);
808
827
  return v.setRGB(n, l, c), v;
809
828
  }
810
829
  if (/^\d+$/.test(t)) {
811
830
  const n = parseInt(t, 10);
812
- return new _(i.ByACI, n);
831
+ return new B(i.ByACI, n);
813
832
  }
814
833
  if (/^book\$/i.test(t)) {
815
834
  const n = t.substring(t.indexOf("$") + 1), l = w.getColorByName(n);
816
835
  if (l != null)
817
- return new _(i.ByColor, l);
836
+ return new B(i.ByColor, l);
818
837
  console.warn("Unknown color book entry:", e);
819
838
  return;
820
839
  }
821
840
  const o = w.getColorByName(t);
822
841
  if (o != null)
823
- return new _(i.ByColor, o);
842
+ return new B(i.ByColor, o);
824
843
  console.warn("Unknown color name:", e);
825
844
  }
826
845
  }
@@ -1045,7 +1064,7 @@ class ie {
1045
1064
  }
1046
1065
  }
1047
1066
  }
1048
- class $ {
1067
+ class F {
1049
1068
  constructor() {
1050
1069
  this.listeners = [];
1051
1070
  }
@@ -1079,10 +1098,10 @@ class $ {
1079
1098
  s.call(null, e, ...t);
1080
1099
  }
1081
1100
  }
1082
- function A(r) {
1101
+ function C(r) {
1083
1102
  return r === null || typeof r != "object" ? r : Array.isArray(r) ? [...r] : { ...r };
1084
1103
  }
1085
- function D(r) {
1104
+ function $(r) {
1086
1105
  if (r === null || typeof r != "object")
1087
1106
  return r;
1088
1107
  if (r instanceof Date)
@@ -1090,10 +1109,10 @@ function D(r) {
1090
1109
  if (r instanceof RegExp)
1091
1110
  return new RegExp(r.source, r.flags);
1092
1111
  if (Array.isArray(r))
1093
- return r.map(D);
1112
+ return r.map($);
1094
1113
  const e = {};
1095
1114
  for (const t in r)
1096
- Object.prototype.hasOwnProperty.call(r, t) && (e[t] = D(r[t]));
1115
+ Object.prototype.hasOwnProperty.call(r, t) && (e[t] = $(r[t]));
1097
1116
  return e;
1098
1117
  }
1099
1118
  function Y(r, ...e) {
@@ -1146,7 +1165,7 @@ var X = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : ty
1146
1165
  function Q(r) {
1147
1166
  return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
1148
1167
  }
1149
- var F = { exports: {} };
1168
+ var D = { exports: {} };
1150
1169
  (function(r) {
1151
1170
  (function(e, t) {
1152
1171
  r.exports ? r.exports = t() : e.log = t();
@@ -1219,9 +1238,9 @@ var F = { exports: {} };
1219
1238
  }
1220
1239
  if (typeof u === t)
1221
1240
  try {
1222
- var g = window.document.cookie, O = encodeURIComponent(p), U = g.indexOf(O + "=");
1241
+ var g = window.document.cookie, A = encodeURIComponent(p), U = g.indexOf(A + "=");
1223
1242
  U !== -1 && (u = /^([^;]+)/.exec(
1224
- g.slice(U + O.length + 1)
1243
+ g.slice(U + A.length + 1)
1225
1244
  )[1]);
1226
1245
  } catch {
1227
1246
  }
@@ -1291,18 +1310,18 @@ var F = { exports: {} };
1291
1310
  return n;
1292
1311
  }, l.default = l, l;
1293
1312
  });
1294
- })(F);
1295
- var q = F.exports;
1313
+ })(D);
1314
+ var q = D.exports;
1296
1315
  const ee = /* @__PURE__ */ Q(q), te = /* @__PURE__ */ W({
1297
1316
  __proto__: null,
1298
1317
  default: ee
1299
- }, [q]), le = !0, C = te;
1300
- C.setLevel("debug");
1318
+ }, [q]), le = !0, O = te;
1319
+ O.setLevel("debug");
1301
1320
  const ae = (r) => {
1302
1321
  try {
1303
- C.setLevel(r);
1322
+ O.setLevel(r);
1304
1323
  } catch (e) {
1305
- C.setLevel("error"), C.error(e);
1324
+ O.setLevel("error"), O.error(e);
1306
1325
  }
1307
1326
  };
1308
1327
  class V {
@@ -1314,8 +1333,8 @@ class V {
1314
1333
  */
1315
1334
  constructor(e, t) {
1316
1335
  this.events = {
1317
- attrChanged: new $(),
1318
- modelChanged: new $()
1336
+ attrChanged: new F(),
1337
+ modelChanged: new F()
1319
1338
  }, this._changing = !1, this._previousAttributes = {}, this._pending = !1;
1320
1339
  const s = e || {};
1321
1340
  t && Y(s, t), this.attributes = s, this.changed = {};
@@ -1354,7 +1373,7 @@ class V {
1354
1373
  let o;
1355
1374
  typeof e == "object" ? (o = e, s = t) : (o = {}, o[e] = t), s || (s = {});
1356
1375
  const n = s.unset, l = s.silent, c = [], v = this._changing;
1357
- this._changing = !0, v || (this._previousAttributes = A(this.attributes), this.changed = {});
1376
+ this._changing = !0, v || (this._previousAttributes = C(this.attributes), this.changed = {});
1358
1377
  const b = this.attributes, m = this.changed, x = this._previousAttributes;
1359
1378
  for (const f in o)
1360
1379
  t = o[f], I(b[f], t) || c.push(f), I(x[f], t) ? delete m[f] : m[f] = t, n ? delete b[f] : b[f] = t;
@@ -1395,7 +1414,7 @@ class V {
1395
1414
  * the model, determining if there *would be* a change.
1396
1415
  */
1397
1416
  changedAttributes(e) {
1398
- if (!e) return this.hasChanged() ? A(this.changed) : {};
1417
+ if (!e) return this.hasChanged() ? C(this.changed) : {};
1399
1418
  const t = this._changing ? this._previousAttributes : this.attributes, s = {};
1400
1419
  for (const o in e) {
1401
1420
  const n = e[o];
@@ -1413,13 +1432,13 @@ class V {
1413
1432
  * Get all of the attributes of the model at the time of the previous `"change"` event.
1414
1433
  */
1415
1434
  previousAttributes() {
1416
- return A(this._previousAttributes);
1435
+ return C(this._previousAttributes);
1417
1436
  }
1418
1437
  /**
1419
1438
  * Create a new model with identical attributes to this one.
1420
1439
  */
1421
1440
  clone() {
1422
- const e = A(this.attributes);
1441
+ const e = C(this.attributes);
1423
1442
  return new V(e);
1424
1443
  }
1425
1444
  }
@@ -1512,7 +1531,7 @@ class he {
1512
1531
  }
1513
1532
  }
1514
1533
  var y = /* @__PURE__ */ ((r) => (r[r.ByLayer = 0] = "ByLayer", r[r.ByBlock = 1] = "ByBlock", r[r.ByAlpha = 2] = "ByAlpha", r[r.ErrorValue = 3] = "ErrorValue", r))(y || {});
1515
- class B {
1534
+ class _ {
1516
1535
  /**
1517
1536
  * Creates a new transparency object.
1518
1537
  *
@@ -1521,7 +1540,7 @@ class B {
1521
1540
  * Must be between 0 and 255.
1522
1541
  */
1523
1542
  constructor(e) {
1524
- e !== void 0 ? (this._method = y.ByAlpha, this._alpha = B.clampAlpha(e)) : (this._method = y.ByLayer, this._alpha = 255);
1543
+ e !== void 0 ? (this._method = y.ByAlpha, this._alpha = _.clampAlpha(e)) : (this._method = y.ByLayer, this._alpha = 255);
1525
1544
  }
1526
1545
  /** Gets the current transparency method */
1527
1546
  get method() {
@@ -1549,7 +1568,7 @@ class B {
1549
1568
  * @param alpha 0–255 alpha, clamped internally if out of range
1550
1569
  */
1551
1570
  set alpha(e) {
1552
- this._alpha = B.clampAlpha(e), this._method = y.ByAlpha;
1571
+ this._alpha = _.clampAlpha(e), this._method = y.ByAlpha;
1553
1572
  }
1554
1573
  /**
1555
1574
  * Gets the AutoCAD-style transparency percentage.
@@ -1664,7 +1683,7 @@ class B {
1664
1683
  * @returns A new `AcCmTransparency` instance with identical state.
1665
1684
  */
1666
1685
  clone() {
1667
- const e = new B();
1686
+ const e = new _();
1668
1687
  return e._method = this._method, e._alpha = this._alpha, e;
1669
1688
  }
1670
1689
  /**
@@ -1730,17 +1749,17 @@ class B {
1730
1749
  static fromString(e) {
1731
1750
  const t = e.trim();
1732
1751
  if (/^bylayer$/i.test(t)) {
1733
- const n = new B();
1752
+ const n = new _();
1734
1753
  return n._method = y.ByLayer, n;
1735
1754
  }
1736
1755
  if (/^byblock$/i.test(t)) {
1737
- const n = new B();
1756
+ const n = new _();
1738
1757
  return n._method = y.ByBlock, n;
1739
1758
  }
1740
1759
  const s = Number(t);
1741
1760
  if (Number.isInteger(s) && s >= 0 && s <= 255)
1742
- return new B(s);
1743
- const o = new B();
1761
+ return new _(s);
1762
+ const o = new _();
1744
1763
  return o._method = y.ErrorValue, o;
1745
1764
  }
1746
1765
  /**
@@ -1749,8 +1768,8 @@ class B {
1749
1768
  * @param value 32-bit stored transparency representation
1750
1769
  */
1751
1770
  static deserialize(e) {
1752
- const t = e >>> 24 & 255, s = e & 255, o = Object.values(y)[t] ?? y.ErrorValue, n = new B();
1753
- return n._method = o, n._alpha = B.clampAlpha(s), n;
1771
+ const t = e >>> 24 & 255, s = e & 255, o = Object.values(y)[t] ?? y.ErrorValue, n = new _();
1772
+ return n._method = o, n._alpha = _.clampAlpha(s), n;
1754
1773
  }
1755
1774
  }
1756
1775
  class ue {
@@ -2003,30 +2022,30 @@ class de {
2003
2022
  }
2004
2023
  }
2005
2024
  export {
2006
- _ as AcCmColor,
2025
+ B as AcCmColor,
2007
2026
  i as AcCmColorMethod,
2008
2027
  w as AcCmColorUtil,
2009
2028
  oe as AcCmEntityColor,
2010
2029
  ne as AcCmErrors,
2011
2030
  ie as AcCmEventDispatcher,
2012
- $ as AcCmEventManager,
2031
+ F as AcCmEventManager,
2013
2032
  de as AcCmLoader,
2014
2033
  re as AcCmLoadingManager,
2015
2034
  V as AcCmObject,
2016
2035
  M as AcCmPerformanceCollector,
2017
2036
  ue as AcCmTask,
2018
2037
  ce as AcCmTaskScheduler,
2019
- B as AcCmTransparency,
2038
+ _ as AcCmTransparency,
2020
2039
  y as AcCmTransparencyMethod,
2021
2040
  he as AcTrStringUtil,
2022
2041
  le as DEBUG_MODE,
2023
2042
  se as DefaultLoadingManager,
2024
- A as clone,
2025
- D as deepClone,
2043
+ C as clone,
2044
+ $ as deepClone,
2026
2045
  Y as defaults,
2027
2046
  Z as has,
2028
2047
  J as isEmpty,
2029
2048
  I as isEqual,
2030
- C as log,
2049
+ O as log,
2031
2050
  ae as setLogLevel
2032
2051
  };
@@ -1 +1 @@
1
- (function(h,C){typeof exports=="object"&&typeof module<"u"?C(exports):typeof define=="function"&&define.amd?define(["exports"],C):(h=typeof globalThis<"u"?globalThis:h||self,C(h.common={}))})(this,function(h){"use strict";function C(r,e){for(var t=0;t<e.length;t++){const n=e[t];if(typeof n!="string"&&!Array.isArray(n)){for(const o in n)if(o!=="default"&&!(o in r)){const s=Object.getOwnPropertyDescriptor(n,o);s&&Object.defineProperty(r,o,s.get?s:{enumerable:!0,get:()=>n[o]})}}}return Object.freeze(Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}))}var i=(r=>(r[r.ByColor=1]="ByColor",r[r.ByACI=2]="ByACI",r[r.ByLayer=3]="ByLayer",r[r.ByBlock=4]="ByBlock",r[r.None=0]="None",r))(i||{});const D={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},S=[0,16711680,16776960,65280,65535,255,16711935,16777215,8421504,12632256,16711680,16744319,13369344,13395558,10027008,10046540,8323072,8339263,4980736,4990502,16727808,16752511,13382400,13401958,10036736,10051404,8331008,8343359,4985600,4992806,16744192,16760703,13395456,13408614,10046464,10056268,8339200,8347455,4990464,4995366,16760576,16768895,13408512,13415014,10056192,10061132,8347392,8351551,4995328,4997670,16776960,16777087,13421568,13421670,10000384,10000460,8355584,8355647,5000192,5000230,12582656,14679935,10079232,11717734,7510016,8755276,6258432,7307071,3755008,4344870,8388352,12582783,6736896,10079334,5019648,7510092,4161280,6258495,2509824,3755046,4194048,10485631,3394560,8375398,2529280,6264908,2064128,5209919,1264640,3099686,65280,8388479,52224,6736998,38912,5019724,32512,4161343,19456,2509862,65343,8388511,52275,6737023,38950,5019743,32543,4161359,19475,2509871,65407,8388543,52326,6737049,38988,5019762,32575,4161375,19494,2509881,65471,8388575,52377,6737074,39026,5019781,32607,4161391,19513,2509890,65535,8388607,52428,6737100,39064,5019800,32639,4161407,19532,2509900,49151,8380415,39372,6730444,29336,5014936,24447,4157311,14668,2507340,32767,8372223,26316,6724044,19608,5010072,16255,4153215,9804,2505036,16383,8364031,13260,6717388,9880,5005208,8063,4149119,4940,2502476,255,8355839,204,6710988,152,5000344,127,4145023,76,2500172,4129023,10452991,3342540,8349388,2490520,6245528,2031743,5193599,1245260,3089996,8323327,12550143,6684876,10053324,4980888,7490712,4128895,6242175,2490444,3745356,12517631,14647295,10027212,11691724,7471256,8735896,6226047,7290751,3735628,4335180,16711935,16744447,13369548,13395660,9961624,9981080,8323199,8339327,4980812,4990540,16711871,16744415,13369497,13395634,9961586,9981061,8323167,8339311,4980793,4990530,16711807,16744383,13369446,13395609,9961548,9981042,8323135,8339295,4980774,4990521,16711743,16744351,13369395,13395583,9961510,9981023,8323103,8339279,4980755,4990511,3355443,5987163,8684676,11382189,14079702,16777215,0];class b{static getColorByIndex(e){return S[e]}static getIndexByColor(e){const t=S.length-1;for(let n=1;n<t;++n)if(S[n]===e)return n}static getColorByName(e){return D[e.toLowerCase()]}static getNameByColor(e){for(const[t,n]of Object.entries(D))if(n===e)return t}static getNameByIndex(e){const t=this.getColorByIndex(e);return this.getNameByColor(t)}}class B{constructor(e=i.ByLayer,t){this._colorMethod=e,this._colorMethod==i.ByColor&&t==null?this._value=16777215:this._colorMethod==i.ByACI?t==null?this._value=8:t===0?this._colorMethod=i.ByBlock:t===256?this._colorMethod=i.ByLayer:this._value=Math.max(0,Math.min(t,256)):this._value=t}get colorMethod(){return this._colorMethod}set colorMethod(e){this._colorMethod=e}get red(){const e=this.RGB;return e!=null?e>>16&255:void 0}get green(){const e=this.RGB;return e!=null?e>>8&255:void 0}get blue(){const e=this.RGB;return e!=null?e&255:void 0}get RGB(){switch(this._colorMethod){case i.ByColor:case i.ByBlock:case i.ByLayer:return this._value;case i.ByACI:return this._value?b.getColorByIndex(this._value):this._value;default:return}}setRGB(e,t,n){const o=Math.max(0,Math.min(255,Math.round(e))),s=Math.max(0,Math.min(255,Math.round(t))),l=Math.max(0,Math.min(255,Math.round(n)));return this._value=o<<16|s<<8|l,this._colorMethod=i.ByColor,this}setRGBValue(e){return e==null||!Number.isFinite(e)?(console.warn("Invalid RGB value:",e),this):(this._value=e&16777215,this._colorMethod=i.ByColor,this)}setRGBFromCss(e){if(!e)return this;const t=e.trim().toLowerCase();if(t.startsWith("#")){let s=0,l=0,d=0;if(t.length===7)s=parseInt(t.substr(1,2),16),l=parseInt(t.substr(3,2),16),d=parseInt(t.substr(5,2),16);else if(t.length===4)s=parseInt(t[1]+t[1],16),l=parseInt(t[2]+t[2],16),d=parseInt(t[3]+t[3],16);else return console.warn("Invalid hex color:",e),this;return this.setRGB(s,l,d)}const n=t.match(/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)/);if(n){const s=parseInt(n[1],10),l=parseInt(n[2],10),d=parseInt(n[3],10);return this.setRGB(s,l,d)}const o=b.getColorByName(e);return o!==void 0?this.setRGBValue(o):(console.warn("Unknown CSS color string:",e),this)}setScalar(e){return this.setRGB(e,e,e)}get hexColor(){const e=this.RGB;return e==null?void 0:"0x"+e.toString(16).padStart(6,"0").toUpperCase()}get cssColor(){const e=this.RGB;if(e!=null)return`rgb(${e>>16&255},${e>>8&255},${e&255})`}get colorIndex(){return this._colorMethod===i.ByACI?this._value:this._colorMethod===i.ByLayer?256:this._colorMethod===i.ByBlock?0:void 0}set colorIndex(e){if(e==null)return;const t=Math.max(0,Math.min(256,Math.round(e)));t===0?(this._colorMethod=i.ByBlock,this._value=void 0):t===256?(this._colorMethod=i.ByLayer,this._value=void 0):(this._colorMethod=i.ByACI,this._value=t)}get isByColor(){return this._colorMethod===i.ByColor}get isByACI(){return this._colorMethod===i.ByACI}get isByLayer(){return this._colorMethod===i.ByLayer}setByLayer(e){return this._colorMethod=i.ByLayer,e==null?this._value=256:this._value=e,this}get isByBlock(){return this._colorMethod===i.ByBlock}setByBlock(e){return this._colorMethod=i.ByBlock,e==null?this._value=0:this._value=e,this}get colorName(){switch(this._colorMethod){case i.ByLayer:return"ByLayer";case i.ByBlock:return"ByBlock";case i.ByColor:return this._value?b.getNameByColor(this._value):"";case i.ByACI:return this._value?b.getNameByIndex(this._value):"";default:return}}set colorName(e){if(!e)return;const t=b.getColorByName(e);t!==void 0?(this._value=t,this._colorMethod=i.ByColor):console.warn("Unknown color name:",e)}clone(){const e=new B;return e._colorMethod=this._colorMethod,e._value=this._value,e}copy(e){return this._colorMethod=e._colorMethod,this._value=e._value,this}equals(e){return this._colorMethod===e._colorMethod&&this._value===e._value}toString(){switch(this._colorMethod){case i.ByLayer:return"ByLayer";case i.ByBlock:return"ByBlock";case i.ByACI:return this._value!==void 0?String(this._value):"";case i.ByColor:return this._value?`${this.red},${this.green},${this.blue}`:"";default:return""}}static fromString(e){if(!e)return;const t=e.trim();if(/^bylayer$/i.test(t))return new B(i.ByLayer);if(/^byblock$/i.test(t))return new B(i.ByBlock);const n=t.match(/^rgb\s*:\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})$/i);if(n){const s=Number(n[1]),l=Number(n[2]),d=Number(n[3]),_=new B(i.ByColor);return _.setRGB(s,l,d),_}if(/^\d{1,3},\d{1,3},\d{1,3}$/.test(t)){const[s,l,d]=t.split(",").map(Number),_=new B(i.ByColor);return _.setRGB(s,l,d),_}if(/^\d+$/.test(t)){const s=parseInt(t,10);return new B(i.ByACI,s)}if(/^book\$/i.test(t)){const s=t.substring(t.indexOf("$")+1),l=b.getColorByName(s);if(l!=null)return new B(i.ByColor,l);console.warn("Unknown color book entry:",e);return}const o=b.getColorByName(t);if(o!=null)return new B(i.ByColor,o);console.warn("Unknown color name:",e)}}class J{constructor(e=i.ByColor,t=0){this._colorMethod=e,this._value=t}get colorMethd(){return this._colorMethod}get red(){return this._value>>16&255}set red(e){this._colorMethod=i.ByColor,this._value=this._value&65535|(e&255)<<16}get green(){return this._value>>8&255}set green(e){this._colorMethod=i.ByColor,this._value=this._value&16711935|(e&255)<<8}get blue(){return this._value&255}set blue(e){this._colorMethod=i.ByColor,this._value=this._value&16776960|e&255}setRGB(e,t,n){this._colorMethod=i.ByColor,this._value=(e&255)<<16|(t&255)<<8|n&255}get colorIndex(){return this._value}set colorIndex(e){this._colorMethod=i.ByACI,this._value=e}get layerIndex(){return this._value}set layerIndex(e){this._colorMethod=i.ByLayer,this._value=e}isByColor(){return this._colorMethod===i.ByColor}isByLayer(){return this._colorMethod===i.ByLayer}isByBlock(){return this._colorMethod===i.ByBlock}isByACI(){return this._colorMethod===i.ByACI}isNone(){return this._colorMethod===i.None}get rawValue(){return this._value}set rawValue(e){this._value=e}}const X={get ILLEGAL_PARAMETERS(){return new ReferenceError("Illegal Parameters")},get ZERO_DIVISION(){return new Error("Zero division")},get UNRESOLVED_BOUNDARY_CONFLICT(){return new Error("Unresolved boundary conflict in boolean operation")},get INFINITE_LOOP(){return new Error("Infinite loop")},get CANNOT_INVOKE_ABSTRACT_METHOD(){return new Error("Abstract method cannot be invoked")},get OPERATION_IS_NOT_SUPPORTED(){return new Error("Operation is not supported")},get NOT_IMPLEMENTED(){return new Error("Not implemented yet")}};class Q{constructor(){this._listeners={}}addEventListener(e,t){this._listeners===void 0&&(this._listeners={});const n=this._listeners;n[e]===void 0&&(n[e]=[]),n[e].indexOf(t)===-1&&n[e].push(t)}hasEventListener(e,t){if(this._listeners===void 0)return!1;const n=this._listeners;return n[e]!==void 0&&n[e].indexOf(t)!==-1}removeEventListener(e,t){if(this._listeners===void 0)return;const o=this._listeners[e];if(o!==void 0){const s=o.indexOf(t);s!==-1&&o.splice(s,1)}}dispatchEvent(e){if(this._listeners===void 0)return;const n=this._listeners[e.type];if(n!==void 0){e.target=this;const o=n.slice(0);for(let s=0,l=o.length;s<l;s++)o[s].call(this,e)}}}class T{constructor(){this.listeners=[]}addEventListener(e){this.listeners.push(e)}removeEventListener(e){this.listeners=this.listeners.filter(t=>t!==e)}replaceEventListener(e){this.removeEventListener(e),this.addEventListener(e)}dispatch(e,...t){for(const n of this.listeners)n.call(null,e,...t)}}function I(r){return r===null||typeof r!="object"?r:Array.isArray(r)?[...r]:{...r}}function P(r){if(r===null||typeof r!="object")return r;if(r instanceof Date)return new Date(r.getTime());if(r instanceof RegExp)return new RegExp(r.source,r.flags);if(Array.isArray(r))return r.map(P);const e={};for(const t in r)Object.prototype.hasOwnProperty.call(r,t)&&(e[t]=P(r[t]));return e}function $(r,...e){for(const t of e)if(t)for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&r[n]===void 0&&(r[n]=t[n]);return r}function j(r,e){return r!=null&&Object.prototype.hasOwnProperty.call(r,e)}function q(r){return r==null?!0:Array.isArray(r)||typeof r=="string"?r.length===0:r instanceof Map||r instanceof Set?r.size===0:typeof r=="object"?Object.keys(r).length===0:!1}function L(r,e){if(r===e)return!0;if(r==null||e==null)return r===e;if(typeof r!=typeof e)return!1;if(typeof r!="object")return r===e;if(Array.isArray(r)!==Array.isArray(e))return!1;if(Array.isArray(r)){if(r.length!==e.length)return!1;for(let o=0;o<r.length;o++)if(!L(r[o],e[o]))return!1;return!0}const t=Object.keys(r),n=Object.keys(e);if(t.length!==n.length)return!1;for(const o of t)if(!Object.prototype.hasOwnProperty.call(e,o)||!L(r[o],e[o]))return!1;return!0}var ee=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function te(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var F={exports:{}};(function(r){(function(e,t){r.exports?r.exports=t():e.log=t()})(ee,function(){var e=function(){},t="undefined",n=typeof window!==t&&typeof window.navigator!==t&&/Trident\/|MSIE /.test(window.navigator.userAgent),o=["trace","debug","info","warn","error"],s={},l=null;function d(u,g){var a=u[g];if(typeof a.bind=="function")return a.bind(u);try{return Function.prototype.bind.call(a,u)}catch{return function(){return Function.prototype.apply.apply(a,[u,arguments])}}}function _(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function k(u){return u==="debug"&&(u="log"),typeof console===t?!1:u==="trace"&&n?_:console[u]!==void 0?d(console,u):console.log!==void 0?d(console,"log"):e}function w(){for(var u=this.getLevel(),g=0;g<o.length;g++){var a=o[g];this[a]=g<u?e:this.methodFactory(a,u,this.name)}if(this.log=this.debug,typeof console===t&&u<this.levels.SILENT)return"No console available for logging"}function x(u){return function(){typeof console!==t&&(w.call(this),this[u].apply(this,arguments))}}function p(u,g,a){return k(u)||x.apply(this,arguments)}function K(u,g){var a=this,N,G,E,m="loglevel";typeof u=="string"?m+=":"+u:typeof u=="symbol"&&(m=void 0);function ue(c){var f=(o[c]||"silent").toUpperCase();if(!(typeof window===t||!m)){try{window.localStorage[m]=f;return}catch{}try{window.document.cookie=encodeURIComponent(m)+"="+f+";"}catch{}}}function W(){var c;if(!(typeof window===t||!m)){try{c=window.localStorage[m]}catch{}if(typeof c===t)try{var f=window.document.cookie,R=encodeURIComponent(m),Z=f.indexOf(R+"=");Z!==-1&&(c=/^([^;]+)/.exec(f.slice(Z+R.length+1))[1])}catch{}return a.levels[c]===void 0&&(c=void 0),c}}function ce(){if(!(typeof window===t||!m)){try{window.localStorage.removeItem(m)}catch{}try{window.document.cookie=encodeURIComponent(m)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch{}}}function O(c){var f=c;if(typeof f=="string"&&a.levels[f.toUpperCase()]!==void 0&&(f=a.levels[f.toUpperCase()]),typeof f=="number"&&f>=0&&f<=a.levels.SILENT)return f;throw new TypeError("log.setLevel() called with invalid level: "+c)}a.name=u,a.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},a.methodFactory=g||p,a.getLevel=function(){return E??G??N},a.setLevel=function(c,f){return E=O(c),f!==!1&&ue(E),w.call(a)},a.setDefaultLevel=function(c){G=O(c),W()||a.setLevel(c,!1)},a.resetLevel=function(){E=null,ce(),w.call(a)},a.enableAll=function(c){a.setLevel(a.levels.TRACE,c)},a.disableAll=function(c){a.setLevel(a.levels.SILENT,c)},a.rebuild=function(){if(l!==a&&(N=O(l.getLevel())),w.call(a),l===a)for(var c in s)s[c].rebuild()},N=O(l?l.getLevel():"WARN");var Y=W();Y!=null&&(E=O(Y)),w.call(a)}l=new K,l.getLogger=function(g){if(typeof g!="symbol"&&typeof g!="string"||g==="")throw new TypeError("You must supply a name when creating a logger.");var a=s[g];return a||(a=s[g]=new K(g,l.methodFactory)),a};var he=typeof window!==t?window.log:void 0;return l.noConflict=function(){return typeof window!==t&&window.log===l&&(window.log=he),l},l.getLoggers=function(){return s},l.default=l,l})})(F);var V=F.exports;const re=C({__proto__:null,default:te(V)},[V]),ne=!0,A=re;A.setLevel("debug");const oe=r=>{try{A.setLevel(r)}catch(e){A.setLevel("error"),A.error(e)}};class U{constructor(e,t){this.events={attrChanged:new T,modelChanged:new T},this._changing=!1,this._previousAttributes={},this._pending=!1;const n=e||{};t&&$(n,t),this.attributes=n,this.changed={}}get(e){return this.attributes[e]}set(e,t,n){if(e==null)return this;let o;typeof e=="object"?(o=e,n=t):(o={},o[e]=t),n||(n={});const s=n.unset,l=n.silent,d=[],_=this._changing;this._changing=!0,_||(this._previousAttributes=I(this.attributes),this.changed={});const k=this.attributes,w=this.changed,x=this._previousAttributes;for(const p in o)t=o[p],L(k[p],t)||d.push(p),L(x[p],t)?delete w[p]:w[p]=t,s?delete k[p]:k[p]=t;if(!l){d.length&&(this._pending=n);for(let p=0;p<d.length;p++)this.events.attrChanged.dispatch({object:this,attrName:d[p],attrValue:k[d[p]],options:n})}if(_)return this;if(!l)for(;this._pending;)n=this._pending,this._pending=!1,this.events.modelChanged.dispatch({object:this,options:n});return this._pending=!1,this._changing=!1,this}has(e){return this.get(e)!=null}hasChanged(e){return e==null?!q(this.changed):j(this.changed,e)}changedAttributes(e){if(!e)return this.hasChanged()?I(this.changed):{};const t=this._changing?this._previousAttributes:this.attributes,n={};for(const o in e){const s=e[o];L(t[o],s)||(n[o]=s)}return n}previous(e){return e==null||!this._previousAttributes?null:this._previousAttributes[e]}previousAttributes(){return I(this._previousAttributes)}clone(){const e=I(this.attributes);return new U(e)}}class M{constructor(){this.entries=new Map}static getInstance(){return M.instance||(M.instance=new M),M.instance}collect(e){this.entries.set(e.name,e)}printAll(){for(const[e,t]of this.entries)console.log(`${e}:`),console.log(t.format())}clear(){this.entries.clear()}getAll(){return Array.from(this.entries.values())}getEntry(e){return this.entries.get(e)}remove(e){return this.entries.delete(e)}}class se{static formatBytes(e,t=2){if(e===0)return"0 B";const n=1024,o=Math.max(0,t),s=["B","KB","MB","GB","TB"],l=Math.floor(Math.log(e)/Math.log(n)),d=e/Math.pow(n,l);return`${parseFloat(d.toFixed(o))} ${s[l]}`}}var y=(r=>(r[r.ByLayer=0]="ByLayer",r[r.ByBlock=1]="ByBlock",r[r.ByAlpha=2]="ByAlpha",r[r.ErrorValue=3]="ErrorValue",r))(y||{});class v{constructor(e){e!==void 0?(this._method=y.ByAlpha,this._alpha=v.clampAlpha(e)):(this._method=y.ByLayer,this._alpha=255)}get method(){return this._method}set method(e){this._method=e}get alpha(){return this._alpha}set alpha(e){this._alpha=v.clampAlpha(e),this._method=y.ByAlpha}get percentage(){if(this._method===y.ByAlpha)return Math.round((1-this._alpha/255)*100)}set percentage(e){const t=Math.max(0,Math.min(100,e)),n=Math.round(255*(1-t/100));this.alpha=n}static clampAlpha(e){return Math.max(0,Math.min(255,Math.floor(e)))}get isByAlpha(){return this._method===y.ByAlpha}get isByBlock(){return this._method===y.ByBlock}get isByLayer(){return this._method===y.ByLayer}get isClear(){return this.isByAlpha&&this._alpha===0}get isSolid(){return this.isByAlpha&&this._alpha===255}get isInvalid(){return this._method===y.ErrorValue}serialize(){return this._method<<24|this._alpha}clone(){const e=new v;return e._method=this._method,e._alpha=this._alpha,e}equals(e){return this._method===e._method&&this._alpha===e._alpha}toString(){return this.isByLayer?"ByLayer":this.isByBlock?"ByBlock":this._alpha.toString()}static fromString(e){const t=e.trim();if(/^bylayer$/i.test(t)){const s=new v;return s._method=y.ByLayer,s}if(/^byblock$/i.test(t)){const s=new v;return s._method=y.ByBlock,s}const n=Number(t);if(Number.isInteger(n)&&n>=0&&n<=255)return new v(n);const o=new v;return o._method=y.ErrorValue,o}static deserialize(e){const t=e>>>24&255,n=e&255,o=Object.values(y)[t]??y.ErrorValue,s=new v;return s._method=o,s._alpha=v.clampAlpha(n),s}}class ie{constructor(e){this.name=e}run(e){throw new Error("run() must be implemented by subclass")}}class le{constructor(){this.tasks=[],this.onProgress=()=>{},this.onComplete=()=>{},this.onError=()=>!1}scheduleTask(e){return new Promise((t,n)=>{const o=()=>{Promise.resolve(e()).then(t).catch(n)};typeof window<"u"&&typeof window.requestAnimationFrame=="function"?window.requestAnimationFrame(o):setTimeout(o,0)})}addTask(e){this.tasks.push(e)}setProgressCallback(e){this.onProgress=e}setCompleteCallback(e){this.onComplete=e}setErrorCallback(e){this.onError=e}async run(e){const t=this.tasks.length;let n=e;for(let o=0;o<t;o++){const s=this.tasks[o];try{n=await this.scheduleTask(async()=>{const l=await s.run(n);return this.onProgress((o+1)/t,s),l})}catch(l){if(this.onError({error:l,taskIndex:o,task:s}))return Promise.reject(l)}}this.onComplete(n)}}class z{constructor(e,t,n){this.isLoading=!1,this.itemsLoaded=0,this.itemsTotal=0,this.urlModifier=void 0,this.handlers=[],this.onStart=void 0,this.onLoad=e,this.onProgress=t,this.onError=n}itemStart(e){this.itemsTotal++,this.isLoading===!1&&this.onStart!==void 0&&this.onStart(e,this.itemsLoaded,this.itemsTotal),this.isLoading=!0}itemEnd(e){this.itemsLoaded++,this.onProgress!==void 0&&this.onProgress(e,this.itemsLoaded,this.itemsTotal),this.itemsLoaded===this.itemsTotal&&(this.isLoading=!1,this.onLoad!==void 0&&this.onLoad())}itemError(e){this.onError!==void 0&&this.onError(e)}resolveURL(e){return this.urlModifier?this.urlModifier(e):e}setURLModifier(e){return this.urlModifier=e,this}addHandler(e,t){return this.handlers.push(e,t),this}removeHandler(e){const t=this.handlers.indexOf(e);return t!==-1&&this.handlers.splice(t,2),this}getHandler(e){for(let t=0,n=this.handlers.length;t<n;t+=2){const o=this.handlers[t],s=this.handlers[t+1];if(o.global&&(o.lastIndex=0),o.test(e))return s}return null}}const H=new z;class ae{constructor(e){this.manager=e!==void 0?e:H,this.crossOrigin="anonymous",this.withCredentials=!1,this.path="",this.resourcePath="",this.requestHeader={}}loadAsync(e,t){return new Promise((n,o)=>{this.load(e,n,t,o)})}parse(e){}setCrossOrigin(e){return this.crossOrigin=e,this}setWithCredentials(e){return this.withCredentials=e,this}setPath(e){return this.path=e,this}setResourcePath(e){return this.resourcePath=e,this}setRequestHeader(e){return this.requestHeader=e,this}}h.AcCmColor=B,h.AcCmColorMethod=i,h.AcCmColorUtil=b,h.AcCmEntityColor=J,h.AcCmErrors=X,h.AcCmEventDispatcher=Q,h.AcCmEventManager=T,h.AcCmLoader=ae,h.AcCmLoadingManager=z,h.AcCmObject=U,h.AcCmPerformanceCollector=M,h.AcCmTask=ie,h.AcCmTaskScheduler=le,h.AcCmTransparency=v,h.AcCmTransparencyMethod=y,h.AcTrStringUtil=se,h.DEBUG_MODE=ne,h.DefaultLoadingManager=H,h.clone=I,h.deepClone=P,h.defaults=$,h.has=j,h.isEmpty=q,h.isEqual=L,h.log=A,h.setLogLevel=oe,Object.defineProperty(h,Symbol.toStringTag,{value:"Module"})});
1
+ (function(h,C){typeof exports=="object"&&typeof module<"u"?C(exports):typeof define=="function"&&define.amd?define(["exports"],C):(h=typeof globalThis<"u"?globalThis:h||self,C(h.common={}))})(this,function(h){"use strict";function C(r,e){for(var t=0;t<e.length;t++){const o=e[t];if(typeof o!="string"&&!Array.isArray(o)){for(const n in o)if(n!=="default"&&!(n in r)){const i=Object.getOwnPropertyDescriptor(o,n);i&&Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:()=>o[n]})}}}return Object.freeze(Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}))}var s=(r=>(r[r.ByColor=1]="ByColor",r[r.ByACI=2]="ByACI",r[r.ByLayer=3]="ByLayer",r[r.ByBlock=4]="ByBlock",r[r.None=0]="None",r))(s||{});const D={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},S=[0,16711680,16776960,65280,65535,255,16711935,16777215,8421504,12632256,16711680,16744319,13369344,13395558,10027008,10046540,8323072,8339263,4980736,4990502,16727808,16752511,13382400,13401958,10036736,10051404,8331008,8343359,4985600,4992806,16744192,16760703,13395456,13408614,10046464,10056268,8339200,8347455,4990464,4995366,16760576,16768895,13408512,13415014,10056192,10061132,8347392,8351551,4995328,4997670,16776960,16777087,13421568,13421670,10000384,10000460,8355584,8355647,5000192,5000230,12582656,14679935,10079232,11717734,7510016,8755276,6258432,7307071,3755008,4344870,8388352,12582783,6736896,10079334,5019648,7510092,4161280,6258495,2509824,3755046,4194048,10485631,3394560,8375398,2529280,6264908,2064128,5209919,1264640,3099686,65280,8388479,52224,6736998,38912,5019724,32512,4161343,19456,2509862,65343,8388511,52275,6737023,38950,5019743,32543,4161359,19475,2509871,65407,8388543,52326,6737049,38988,5019762,32575,4161375,19494,2509881,65471,8388575,52377,6737074,39026,5019781,32607,4161391,19513,2509890,65535,8388607,52428,6737100,39064,5019800,32639,4161407,19532,2509900,49151,8380415,39372,6730444,29336,5014936,24447,4157311,14668,2507340,32767,8372223,26316,6724044,19608,5010072,16255,4153215,9804,2505036,16383,8364031,13260,6717388,9880,5005208,8063,4149119,4940,2502476,255,8355839,204,6710988,152,5000344,127,4145023,76,2500172,4129023,10452991,3342540,8349388,2490520,6245528,2031743,5193599,1245260,3089996,8323327,12550143,6684876,10053324,4980888,7490712,4128895,6242175,2490444,3745356,12517631,14647295,10027212,11691724,7471256,8735896,6226047,7290751,3735628,4335180,16711935,16744447,13369548,13395660,9961624,9981080,8323199,8339327,4980812,4990540,16711871,16744415,13369497,13395634,9961586,9981061,8323167,8339311,4980793,4990530,16711807,16744383,13369446,13395609,9961548,9981042,8323135,8339295,4980774,4990521,16711743,16744351,13369395,13395583,9961510,9981023,8323103,8339279,4980755,4990511,3355443,5987163,8684676,11382189,14079702,16777215,0];class b{static getColorByIndex(e){return S[e]}static getIndexByColor(e){const t=S.length-1;for(let o=1;o<t;++o)if(S[o]===e)return o}static getColorByName(e){return D[e.toLowerCase()]}static getNameByColor(e){for(const[t,o]of Object.entries(D))if(o===e)return t}static getNameByIndex(e){const t=this.getColorByIndex(e);return this.getNameByColor(t)}}class _{constructor(e=s.ByLayer,t){this._colorMethod=e,this._colorMethod==s.ByColor&&t==null?this._value=16777215:this._colorMethod==s.ByACI?t==null?this._value=8:t===0?this._colorMethod=s.ByBlock:t===256?this._colorMethod=s.ByLayer:this._value=Math.max(0,Math.min(t,256)):this._value=t}get colorMethod(){return this._colorMethod}set colorMethod(e){this._colorMethod=e}get red(){const e=this.RGB;return e!=null?e>>16&255:void 0}get green(){const e=this.RGB;return e!=null?e>>8&255:void 0}get blue(){const e=this.RGB;return e!=null?e&255:void 0}get RGB(){switch(this._colorMethod){case s.ByColor:case s.ByBlock:case s.ByLayer:return this._value;case s.ByACI:return this._value?b.getColorByIndex(this._value):this._value;default:return}}setRGB(e,t,o){const n=Math.max(0,Math.min(255,Math.round(e))),i=Math.max(0,Math.min(255,Math.round(t))),l=Math.max(0,Math.min(255,Math.round(o)));return this._value=n<<16|i<<8|l,this._colorMethod=s.ByColor,this}setRGBValue(e){return e==null||!Number.isFinite(e)?(console.warn("Invalid RGB value:",e),this):(this._value=e&16777215,this._colorMethod=s.ByColor,this)}setRGBFromCss(e){if(!e)return this;const t=e.trim().toLowerCase();if(t.startsWith("#")){let i=0,l=0,d=0;if(t.length===7)i=parseInt(t.substr(1,2),16),l=parseInt(t.substr(3,2),16),d=parseInt(t.substr(5,2),16);else if(t.length===4)i=parseInt(t[1]+t[1],16),l=parseInt(t[2]+t[2],16),d=parseInt(t[3]+t[3],16);else return console.warn("Invalid hex color:",e),this;return this.setRGB(i,l,d)}const o=t.match(/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)/);if(o){const i=parseInt(o[1],10),l=parseInt(o[2],10),d=parseInt(o[3],10);return this.setRGB(i,l,d)}const n=b.getColorByName(e);return n!==void 0?this.setRGBValue(n):(console.warn("Unknown CSS color string:",e),this)}setScalar(e){return this.setRGB(e,e,e)}get hexColor(){const e=this.RGB;return e==null?void 0:"0x"+e.toString(16).padStart(6,"0").toUpperCase()}get cssColor(){const e=this.RGB;if(e!=null)return`rgb(${e>>16&255},${e>>8&255},${e&255})`}get colorIndex(){return this._colorMethod===s.ByACI?this._value:this._colorMethod===s.ByLayer?256:this._colorMethod===s.ByBlock?0:void 0}set colorIndex(e){if(e==null)return;const t=Math.max(0,Math.min(256,Math.round(e)));t===0?(this._colorMethod=s.ByBlock,this._value=void 0):t===256?(this._colorMethod=s.ByLayer,this._value=void 0):(this._colorMethod=s.ByACI,this._value=t)}get isByColor(){return this._colorMethod===s.ByColor}get isByACI(){return this._colorMethod===s.ByACI}get isForeground(){return this._colorMethod===s.ByACI&&this._value===7}setForeground(){return this._colorMethod=s.ByACI,this._value=7,this}get isByLayer(){return this._colorMethod===s.ByLayer}setByLayer(e){return this._colorMethod=s.ByLayer,e==null?this._value=256:this._value=e,this}get isByBlock(){return this._colorMethod===s.ByBlock}setByBlock(e){return this._colorMethod=s.ByBlock,e==null?this._value=0:this._value=e,this}get colorName(){switch(this._colorMethod){case s.ByLayer:return"ByLayer";case s.ByBlock:return"ByBlock";case s.ByColor:return this._value?b.getNameByColor(this._value):"";case s.ByACI:return this._value?b.getNameByIndex(this._value):"";default:return}}set colorName(e){if(!e)return;const t=b.getColorByName(e);t!==void 0?(this._value=t,this._colorMethod=s.ByColor):console.warn("Unknown color name:",e)}clone(){const e=new _;return e._colorMethod=this._colorMethod,e._value=this._value,e}copy(e){return this._colorMethod=e._colorMethod,this._value=e._value,this}equals(e){return this._colorMethod===e._colorMethod&&this._value===e._value}toString(){switch(this._colorMethod){case s.ByLayer:return"ByLayer";case s.ByBlock:return"ByBlock";case s.ByACI:return this._value!==void 0?String(this._value):"";case s.ByColor:return this._value?`${this.red},${this.green},${this.blue}`:"";default:return""}}static fromString(e){if(!e)return;const t=e.trim();if(/^bylayer$/i.test(t))return new _(s.ByLayer);if(/^byblock$/i.test(t))return new _(s.ByBlock);const o=t.match(/^rgb\s*:\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})$/i);if(o){const i=Number(o[1]),l=Number(o[2]),d=Number(o[3]),B=new _(s.ByColor);return B.setRGB(i,l,d),B}if(/^\d{1,3},\d{1,3},\d{1,3}$/.test(t)){const[i,l,d]=t.split(",").map(Number),B=new _(s.ByColor);return B.setRGB(i,l,d),B}if(/^\d+$/.test(t)){const i=parseInt(t,10);return new _(s.ByACI,i)}if(/^book\$/i.test(t)){const i=t.substring(t.indexOf("$")+1),l=b.getColorByName(i);if(l!=null)return new _(s.ByColor,l);console.warn("Unknown color book entry:",e);return}const n=b.getColorByName(t);if(n!=null)return new _(s.ByColor,n);console.warn("Unknown color name:",e)}}class J{constructor(e=s.ByColor,t=0){this._colorMethod=e,this._value=t}get colorMethd(){return this._colorMethod}get red(){return this._value>>16&255}set red(e){this._colorMethod=s.ByColor,this._value=this._value&65535|(e&255)<<16}get green(){return this._value>>8&255}set green(e){this._colorMethod=s.ByColor,this._value=this._value&16711935|(e&255)<<8}get blue(){return this._value&255}set blue(e){this._colorMethod=s.ByColor,this._value=this._value&16776960|e&255}setRGB(e,t,o){this._colorMethod=s.ByColor,this._value=(e&255)<<16|(t&255)<<8|o&255}get colorIndex(){return this._value}set colorIndex(e){this._colorMethod=s.ByACI,this._value=e}get layerIndex(){return this._value}set layerIndex(e){this._colorMethod=s.ByLayer,this._value=e}isByColor(){return this._colorMethod===s.ByColor}isByLayer(){return this._colorMethod===s.ByLayer}isByBlock(){return this._colorMethod===s.ByBlock}isByACI(){return this._colorMethod===s.ByACI}isNone(){return this._colorMethod===s.None}get rawValue(){return this._value}set rawValue(e){this._value=e}}const X={get ILLEGAL_PARAMETERS(){return new ReferenceError("Illegal Parameters")},get ZERO_DIVISION(){return new Error("Zero division")},get UNRESOLVED_BOUNDARY_CONFLICT(){return new Error("Unresolved boundary conflict in boolean operation")},get INFINITE_LOOP(){return new Error("Infinite loop")},get CANNOT_INVOKE_ABSTRACT_METHOD(){return new Error("Abstract method cannot be invoked")},get OPERATION_IS_NOT_SUPPORTED(){return new Error("Operation is not supported")},get NOT_IMPLEMENTED(){return new Error("Not implemented yet")}};class Q{constructor(){this._listeners={}}addEventListener(e,t){this._listeners===void 0&&(this._listeners={});const o=this._listeners;o[e]===void 0&&(o[e]=[]),o[e].indexOf(t)===-1&&o[e].push(t)}hasEventListener(e,t){if(this._listeners===void 0)return!1;const o=this._listeners;return o[e]!==void 0&&o[e].indexOf(t)!==-1}removeEventListener(e,t){if(this._listeners===void 0)return;const n=this._listeners[e];if(n!==void 0){const i=n.indexOf(t);i!==-1&&n.splice(i,1)}}dispatchEvent(e){if(this._listeners===void 0)return;const o=this._listeners[e.type];if(o!==void 0){e.target=this;const n=o.slice(0);for(let i=0,l=n.length;i<l;i++)n[i].call(this,e)}}}class T{constructor(){this.listeners=[]}addEventListener(e){this.listeners.push(e)}removeEventListener(e){this.listeners=this.listeners.filter(t=>t!==e)}replaceEventListener(e){this.removeEventListener(e),this.addEventListener(e)}dispatch(e,...t){for(const o of this.listeners)o.call(null,e,...t)}}function I(r){return r===null||typeof r!="object"?r:Array.isArray(r)?[...r]:{...r}}function P(r){if(r===null||typeof r!="object")return r;if(r instanceof Date)return new Date(r.getTime());if(r instanceof RegExp)return new RegExp(r.source,r.flags);if(Array.isArray(r))return r.map(P);const e={};for(const t in r)Object.prototype.hasOwnProperty.call(r,t)&&(e[t]=P(r[t]));return e}function F(r,...e){for(const t of e)if(t)for(const o in t)Object.prototype.hasOwnProperty.call(t,o)&&r[o]===void 0&&(r[o]=t[o]);return r}function $(r,e){return r!=null&&Object.prototype.hasOwnProperty.call(r,e)}function j(r){return r==null?!0:Array.isArray(r)||typeof r=="string"?r.length===0:r instanceof Map||r instanceof Set?r.size===0:typeof r=="object"?Object.keys(r).length===0:!1}function L(r,e){if(r===e)return!0;if(r==null||e==null)return r===e;if(typeof r!=typeof e)return!1;if(typeof r!="object")return r===e;if(Array.isArray(r)!==Array.isArray(e))return!1;if(Array.isArray(r)){if(r.length!==e.length)return!1;for(let n=0;n<r.length;n++)if(!L(r[n],e[n]))return!1;return!0}const t=Object.keys(r),o=Object.keys(e);if(t.length!==o.length)return!1;for(const n of t)if(!Object.prototype.hasOwnProperty.call(e,n)||!L(r[n],e[n]))return!1;return!0}var ee=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function te(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var q={exports:{}};(function(r){(function(e,t){r.exports?r.exports=t():e.log=t()})(ee,function(){var e=function(){},t="undefined",o=typeof window!==t&&typeof window.navigator!==t&&/Trident\/|MSIE /.test(window.navigator.userAgent),n=["trace","debug","info","warn","error"],i={},l=null;function d(u,g){var a=u[g];if(typeof a.bind=="function")return a.bind(u);try{return Function.prototype.bind.call(a,u)}catch{return function(){return Function.prototype.apply.apply(a,[u,arguments])}}}function B(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function k(u){return u==="debug"&&(u="log"),typeof console===t?!1:u==="trace"&&o?B:console[u]!==void 0?d(console,u):console.log!==void 0?d(console,"log"):e}function w(){for(var u=this.getLevel(),g=0;g<n.length;g++){var a=n[g];this[a]=g<u?e:this.methodFactory(a,u,this.name)}if(this.log=this.debug,typeof console===t&&u<this.levels.SILENT)return"No console available for logging"}function x(u){return function(){typeof console!==t&&(w.call(this),this[u].apply(this,arguments))}}function p(u,g,a){return k(u)||x.apply(this,arguments)}function K(u,g){var a=this,N,G,E,m="loglevel";typeof u=="string"?m+=":"+u:typeof u=="symbol"&&(m=void 0);function ue(c){var f=(n[c]||"silent").toUpperCase();if(!(typeof window===t||!m)){try{window.localStorage[m]=f;return}catch{}try{window.document.cookie=encodeURIComponent(m)+"="+f+";"}catch{}}}function W(){var c;if(!(typeof window===t||!m)){try{c=window.localStorage[m]}catch{}if(typeof c===t)try{var f=window.document.cookie,R=encodeURIComponent(m),Z=f.indexOf(R+"=");Z!==-1&&(c=/^([^;]+)/.exec(f.slice(Z+R.length+1))[1])}catch{}return a.levels[c]===void 0&&(c=void 0),c}}function ce(){if(!(typeof window===t||!m)){try{window.localStorage.removeItem(m)}catch{}try{window.document.cookie=encodeURIComponent(m)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch{}}}function O(c){var f=c;if(typeof f=="string"&&a.levels[f.toUpperCase()]!==void 0&&(f=a.levels[f.toUpperCase()]),typeof f=="number"&&f>=0&&f<=a.levels.SILENT)return f;throw new TypeError("log.setLevel() called with invalid level: "+c)}a.name=u,a.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},a.methodFactory=g||p,a.getLevel=function(){return E??G??N},a.setLevel=function(c,f){return E=O(c),f!==!1&&ue(E),w.call(a)},a.setDefaultLevel=function(c){G=O(c),W()||a.setLevel(c,!1)},a.resetLevel=function(){E=null,ce(),w.call(a)},a.enableAll=function(c){a.setLevel(a.levels.TRACE,c)},a.disableAll=function(c){a.setLevel(a.levels.SILENT,c)},a.rebuild=function(){if(l!==a&&(N=O(l.getLevel())),w.call(a),l===a)for(var c in i)i[c].rebuild()},N=O(l?l.getLevel():"WARN");var Y=W();Y!=null&&(E=O(Y)),w.call(a)}l=new K,l.getLogger=function(g){if(typeof g!="symbol"&&typeof g!="string"||g==="")throw new TypeError("You must supply a name when creating a logger.");var a=i[g];return a||(a=i[g]=new K(g,l.methodFactory)),a};var he=typeof window!==t?window.log:void 0;return l.noConflict=function(){return typeof window!==t&&window.log===l&&(window.log=he),l},l.getLoggers=function(){return i},l.default=l,l})})(q);var V=q.exports;const re=C({__proto__:null,default:te(V)},[V]),oe=!0,A=re;A.setLevel("debug");const ne=r=>{try{A.setLevel(r)}catch(e){A.setLevel("error"),A.error(e)}};class U{constructor(e,t){this.events={attrChanged:new T,modelChanged:new T},this._changing=!1,this._previousAttributes={},this._pending=!1;const o=e||{};t&&F(o,t),this.attributes=o,this.changed={}}get(e){return this.attributes[e]}set(e,t,o){if(e==null)return this;let n;typeof e=="object"?(n=e,o=t):(n={},n[e]=t),o||(o={});const i=o.unset,l=o.silent,d=[],B=this._changing;this._changing=!0,B||(this._previousAttributes=I(this.attributes),this.changed={});const k=this.attributes,w=this.changed,x=this._previousAttributes;for(const p in n)t=n[p],L(k[p],t)||d.push(p),L(x[p],t)?delete w[p]:w[p]=t,i?delete k[p]:k[p]=t;if(!l){d.length&&(this._pending=o);for(let p=0;p<d.length;p++)this.events.attrChanged.dispatch({object:this,attrName:d[p],attrValue:k[d[p]],options:o})}if(B)return this;if(!l)for(;this._pending;)o=this._pending,this._pending=!1,this.events.modelChanged.dispatch({object:this,options:o});return this._pending=!1,this._changing=!1,this}has(e){return this.get(e)!=null}hasChanged(e){return e==null?!j(this.changed):$(this.changed,e)}changedAttributes(e){if(!e)return this.hasChanged()?I(this.changed):{};const t=this._changing?this._previousAttributes:this.attributes,o={};for(const n in e){const i=e[n];L(t[n],i)||(o[n]=i)}return o}previous(e){return e==null||!this._previousAttributes?null:this._previousAttributes[e]}previousAttributes(){return I(this._previousAttributes)}clone(){const e=I(this.attributes);return new U(e)}}class M{constructor(){this.entries=new Map}static getInstance(){return M.instance||(M.instance=new M),M.instance}collect(e){this.entries.set(e.name,e)}printAll(){for(const[e,t]of this.entries)console.log(`${e}:`),console.log(t.format())}clear(){this.entries.clear()}getAll(){return Array.from(this.entries.values())}getEntry(e){return this.entries.get(e)}remove(e){return this.entries.delete(e)}}class se{static formatBytes(e,t=2){if(e===0)return"0 B";const o=1024,n=Math.max(0,t),i=["B","KB","MB","GB","TB"],l=Math.floor(Math.log(e)/Math.log(o)),d=e/Math.pow(o,l);return`${parseFloat(d.toFixed(n))} ${i[l]}`}}var y=(r=>(r[r.ByLayer=0]="ByLayer",r[r.ByBlock=1]="ByBlock",r[r.ByAlpha=2]="ByAlpha",r[r.ErrorValue=3]="ErrorValue",r))(y||{});class v{constructor(e){e!==void 0?(this._method=y.ByAlpha,this._alpha=v.clampAlpha(e)):(this._method=y.ByLayer,this._alpha=255)}get method(){return this._method}set method(e){this._method=e}get alpha(){return this._alpha}set alpha(e){this._alpha=v.clampAlpha(e),this._method=y.ByAlpha}get percentage(){if(this._method===y.ByAlpha)return Math.round((1-this._alpha/255)*100)}set percentage(e){const t=Math.max(0,Math.min(100,e)),o=Math.round(255*(1-t/100));this.alpha=o}static clampAlpha(e){return Math.max(0,Math.min(255,Math.floor(e)))}get isByAlpha(){return this._method===y.ByAlpha}get isByBlock(){return this._method===y.ByBlock}get isByLayer(){return this._method===y.ByLayer}get isClear(){return this.isByAlpha&&this._alpha===0}get isSolid(){return this.isByAlpha&&this._alpha===255}get isInvalid(){return this._method===y.ErrorValue}serialize(){return this._method<<24|this._alpha}clone(){const e=new v;return e._method=this._method,e._alpha=this._alpha,e}equals(e){return this._method===e._method&&this._alpha===e._alpha}toString(){return this.isByLayer?"ByLayer":this.isByBlock?"ByBlock":this._alpha.toString()}static fromString(e){const t=e.trim();if(/^bylayer$/i.test(t)){const i=new v;return i._method=y.ByLayer,i}if(/^byblock$/i.test(t)){const i=new v;return i._method=y.ByBlock,i}const o=Number(t);if(Number.isInteger(o)&&o>=0&&o<=255)return new v(o);const n=new v;return n._method=y.ErrorValue,n}static deserialize(e){const t=e>>>24&255,o=e&255,n=Object.values(y)[t]??y.ErrorValue,i=new v;return i._method=n,i._alpha=v.clampAlpha(o),i}}class ie{constructor(e){this.name=e}run(e){throw new Error("run() must be implemented by subclass")}}class le{constructor(){this.tasks=[],this.onProgress=()=>{},this.onComplete=()=>{},this.onError=()=>!1}scheduleTask(e){return new Promise((t,o)=>{const n=()=>{Promise.resolve(e()).then(t).catch(o)};typeof window<"u"&&typeof window.requestAnimationFrame=="function"?window.requestAnimationFrame(n):setTimeout(n,0)})}addTask(e){this.tasks.push(e)}setProgressCallback(e){this.onProgress=e}setCompleteCallback(e){this.onComplete=e}setErrorCallback(e){this.onError=e}async run(e){const t=this.tasks.length;let o=e;for(let n=0;n<t;n++){const i=this.tasks[n];try{o=await this.scheduleTask(async()=>{const l=await i.run(o);return this.onProgress((n+1)/t,i),l})}catch(l){if(this.onError({error:l,taskIndex:n,task:i}))return Promise.reject(l)}}this.onComplete(o)}}class z{constructor(e,t,o){this.isLoading=!1,this.itemsLoaded=0,this.itemsTotal=0,this.urlModifier=void 0,this.handlers=[],this.onStart=void 0,this.onLoad=e,this.onProgress=t,this.onError=o}itemStart(e){this.itemsTotal++,this.isLoading===!1&&this.onStart!==void 0&&this.onStart(e,this.itemsLoaded,this.itemsTotal),this.isLoading=!0}itemEnd(e){this.itemsLoaded++,this.onProgress!==void 0&&this.onProgress(e,this.itemsLoaded,this.itemsTotal),this.itemsLoaded===this.itemsTotal&&(this.isLoading=!1,this.onLoad!==void 0&&this.onLoad())}itemError(e){this.onError!==void 0&&this.onError(e)}resolveURL(e){return this.urlModifier?this.urlModifier(e):e}setURLModifier(e){return this.urlModifier=e,this}addHandler(e,t){return this.handlers.push(e,t),this}removeHandler(e){const t=this.handlers.indexOf(e);return t!==-1&&this.handlers.splice(t,2),this}getHandler(e){for(let t=0,o=this.handlers.length;t<o;t+=2){const n=this.handlers[t],i=this.handlers[t+1];if(n.global&&(n.lastIndex=0),n.test(e))return i}return null}}const H=new z;class ae{constructor(e){this.manager=e!==void 0?e:H,this.crossOrigin="anonymous",this.withCredentials=!1,this.path="",this.resourcePath="",this.requestHeader={}}loadAsync(e,t){return new Promise((o,n)=>{this.load(e,o,t,n)})}parse(e){}setCrossOrigin(e){return this.crossOrigin=e,this}setWithCredentials(e){return this.withCredentials=e,this}setPath(e){return this.path=e,this}setResourcePath(e){return this.resourcePath=e,this}setRequestHeader(e){return this.requestHeader=e,this}}h.AcCmColor=_,h.AcCmColorMethod=s,h.AcCmColorUtil=b,h.AcCmEntityColor=J,h.AcCmErrors=X,h.AcCmEventDispatcher=Q,h.AcCmEventManager=T,h.AcCmLoader=ae,h.AcCmLoadingManager=z,h.AcCmObject=U,h.AcCmPerformanceCollector=M,h.AcCmTask=ie,h.AcCmTaskScheduler=le,h.AcCmTransparency=v,h.AcCmTransparencyMethod=y,h.AcTrStringUtil=se,h.DEBUG_MODE=oe,h.DefaultLoadingManager=H,h.clone=I,h.deepClone=P,h.defaults=F,h.has=$,h.isEmpty=j,h.isEqual=L,h.log=A,h.setLogLevel=ne,Object.defineProperty(h,Symbol.toStringTag,{value:"Module"})});
@@ -109,6 +109,21 @@ export declare class AcCmColor {
109
109
  * Returns true if the color method is ByACI.
110
110
  */
111
111
  get isByACI(): boolean;
112
+ /**
113
+ * Returns true if the color method is ByACI and ACI value is 7
114
+ *
115
+ * Notes:
116
+ * In AutoCAD, ACI Color 7 (Color Index 7) is officially named "Black" or "White" depending on
117
+ * the context, but it is functionally defined as the "Contrasting Color" or "Auto-Contrast Color."
118
+ * Here is the technical explanation of its behavior:
119
+ * - If the background is dark: Color 7 displays as White.
120
+ * - If the background is light: Color 7 displays as Black.
121
+ */
122
+ get isForeground(): boolean;
123
+ /**
124
+ * Sets the color to ACI value 7.
125
+ */
126
+ setForeground(): this;
112
127
  /** Returns true if the color method is ByLayer. */
113
128
  get isByLayer(): boolean;
114
129
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"AcCmColor.d.ts","sourceRoot":"","sources":["../src/AcCmColor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAGnD;;;;;;GAMG;AACH,qBAAa,SAAS;IACpB,sDAAsD;IACtD,OAAO,CAAC,YAAY,CAAiB;IAErC;;;;;;OAMG;IACH,OAAO,CAAC,MAAM,CAAC,CAAQ;IAEvB;;;;OAIG;gBAED,MAAM,GAAE,eAAyC,EACjD,KAAK,CAAC,EAAE,MAAM;IAwBhB,qCAAqC;IACrC,IAAI,WAAW,IAAI,eAAe,CAEjC;IAED;;;;OAIG;IACH,IAAI,WAAW,CAAC,MAAM,EAAE,eAAe,EAEtC;IAMD,sCAAsC;IACtC,IAAI,GAAG,IAAI,MAAM,GAAG,SAAS,CAG5B;IAED,wCAAwC;IACxC,IAAI,KAAK,IAAI,MAAM,GAAG,SAAS,CAG9B;IAED,uCAAuC;IACvC,IAAI,IAAI,IAAI,MAAM,GAAG,SAAS,CAG7B;IAED;;;;;;OAMG;IACH,IAAI,GAAG,IAAI,MAAM,GAAG,SAAS,CAa5B;IAED;;;;;;;OAOG;IACH,MAAM,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM;IAStC;;;;OAIG;IACH,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI;IAU5C;;;;;;;;;;;;OAYG;IACH,aAAa,CAAC,SAAS,EAAE,MAAM;IA4C/B;;;;;OAKG;IACH,SAAS,CAAC,MAAM,EAAE,MAAM;IAIxB;;OAEG;IACH,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OAAO,CAEvB;IAED;;;OAGG;IACH,UAAU,CAAC,KAAK,CAAC,EAAE,MAAM;IAUzB,mDAAmD;IACnD,IAAI,SAAS,IAAI,OAAO,CAEvB;IAED;;;OAGG;IACH,UAAU,CAAC,KAAK,CAAC,EAAE,MAAM;IAczB;;;;;OAKG;IACH,IAAI,SAAS,IAAI,MAAM,GAAG,SAAS,CAalC;IAED;;;;;;OAMG;IACH,IAAI,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,EASrC;IAMD;;;;OAIG;IACH,KAAK,IAAI,SAAS;IAOlB;;;;;OAKG;IACH,IAAI,CAAC,KAAK,EAAE,SAAS;IAMrB;;;;;OAKG;IACH,MAAM,CAAC,KAAK,EAAE,SAAS;IAUvB;;;;;;;OAOG;IACH,QAAQ,IAAI,MAAM;IAiBlB;;OAEG;IACH,MAAM,CAAC,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS;CA8EvD"}
package/lib/AcCmColor.js CHANGED
@@ -310,6 +310,31 @@ var AcCmColor = /** @class */ (function () {
310
310
  enumerable: false,
311
311
  configurable: true
312
312
  });
313
+ Object.defineProperty(AcCmColor.prototype, "isForeground", {
314
+ /**
315
+ * Returns true if the color method is ByACI and ACI value is 7
316
+ *
317
+ * Notes:
318
+ * In AutoCAD, ACI Color 7 (Color Index 7) is officially named "Black" or "White" depending on
319
+ * the context, but it is functionally defined as the "Contrasting Color" or "Auto-Contrast Color."
320
+ * Here is the technical explanation of its behavior:
321
+ * - If the background is dark: Color 7 displays as White.
322
+ * - If the background is light: Color 7 displays as Black.
323
+ */
324
+ get: function () {
325
+ return this._colorMethod === AcCmColorMethod.ByACI && this._value === 7;
326
+ },
327
+ enumerable: false,
328
+ configurable: true
329
+ });
330
+ /**
331
+ * Sets the color to ACI value 7.
332
+ */
333
+ AcCmColor.prototype.setForeground = function () {
334
+ this._colorMethod = AcCmColorMethod.ByACI;
335
+ this._value = 7;
336
+ return this;
337
+ };
313
338
  Object.defineProperty(AcCmColor.prototype, "isByLayer", {
314
339
  // ---------------------------------------------------------------------
315
340
  // Layer / Block helpers
@@ -1 +1 @@
1
- {"version":3,"file":"AcCmColor.js","sourceRoot":"","sources":["../src/AcCmColor.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAE/C;;;;;;GAMG;AACH;IAaE;;;;OAIG;IACH,mBACE,MAAiD,EACjD,KAAc;QADd,uBAAA,EAAA,SAA0B,eAAe,CAAC,OAAO;QAGjD,IAAI,CAAC,YAAY,GAAG,MAAM,CAAA;QAC1B,IAAI,IAAI,CAAC,YAAY,IAAI,eAAe,CAAC,OAAO,IAAI,KAAK,IAAI,IAAI,EAAE,CAAC;YAClE,IAAI,CAAC,MAAM,GAAG,QAAQ,CAAA;QACxB,CAAC;aAAM,IAAI,IAAI,CAAC,YAAY,IAAI,eAAe,CAAC,KAAK,EAAE,CAAC;YACtD,IAAI,KAAK,IAAI,IAAI,EAAE,CAAC;gBAClB,IAAI,CAAC,MAAM,GAAG,CAAC,CAAA;YACjB,CAAC;iBAAM,IAAI,KAAK,KAAK,CAAC,EAAE,CAAC;gBACvB,IAAI,CAAC,YAAY,GAAG,eAAe,CAAC,OAAO,CAAA;YAC7C,CAAC;iBAAM,IAAI,KAAK,KAAK,GAAG,EAAE,CAAC;gBACzB,IAAI,CAAC,YAAY,GAAG,eAAe,CAAC,OAAO,CAAA;YAC7C,CAAC;iBAAM,CAAC;gBACN,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,CAAA;YACjD,CAAC;QACH,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,MAAM,GAAG,KAAK,CAAA;QACrB,CAAC;IACH,CAAC;IAOD,sBAAI,kCAAW;Q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