@sheetxl/sdk 0.8.0-beta.15 → 0.8.0-beta.17
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/LICENSE.md +8 -7
- package/browser/esm/{DDQtExVGSoCzAf6-.mjs → B-Q1-7RgSnA75J32.mjs} +506 -502
- package/browser/esm/{Cl3jq6y4Idilod82.mjs → BI6NwRrdLCbPdz6f.mjs} +3 -3
- package/browser/esm/{Blo0Hwg2ojXt99Dl.mjs → BWNQcQyx8wt6huOq.mjs} +2 -2
- package/browser/esm/{Do8TQqQvnFXRlFu-.mjs → BY_-BTa5h6HnnZ1W.mjs} +3 -3
- package/browser/esm/{D4ZCoKyNCJvDQAkx.mjs → BlkstmZEklk6Y1QD.mjs} +23 -22
- package/browser/esm/{DpaqR081c-Q7WemN.mjs → BuKA3E-Ev8Dp5W2I.mjs} +2 -2
- package/browser/esm/{Bbrhl946_QbCz5WS.mjs → Byp_bvP9G-tN6hcz.mjs} +588 -587
- package/browser/esm/{CMSeF5rGzeuMUydM.mjs → C0o6WpBojS7XhV5m.mjs} +3 -3
- package/browser/esm/CAjITJT3eLst9Rhi.mjs +686 -0
- package/browser/esm/{CZ_ZPliIkoh8BViV.mjs → CFywn1iiD35nNNUP.mjs} +10 -10
- package/browser/esm/{DJNLo8Rd_5UQP0U5.mjs → CHByUyHFA3ESf7DX.mjs} +2 -2
- package/browser/esm/CLT3qGy_brDIwbYd.mjs +2017 -0
- package/browser/esm/{Blo0jHze0bQxnKh4.mjs → CVV4xqwD8gIjYj1E.mjs} +78 -78
- package/browser/esm/{FHp0QfwZMIfP0Sry.mjs → CWkaF7gYWCkW7vDA.mjs} +2 -2
- package/browser/esm/{CNM5d4p0Y7In0rTf.mjs → DCs7bk-yx0UhCvQ4.mjs} +3 -3
- package/browser/esm/{BsGN0Tk0jVc2n0hy.mjs → DDNerAeet8uDYKhf.mjs} +3 -3
- package/browser/esm/{D6OqcO9IWPaY211T.mjs → DGUOlgm1_WFmf_xO.mjs} +2 -2
- package/browser/esm/{Dp4OIVjjAVhpD815.mjs → DJTEQZiR9IFTuN_4.mjs} +3 -3
- package/browser/esm/{KgTozk3nvOZzEG27.mjs → DJrnSjYjFxJvpQiH.mjs} +2 -2
- package/browser/esm/{D0KMmRjGOQUs7Ls-.mjs → DTXsi--x2wgqgwtf.mjs} +3 -3
- package/browser/esm/{CPUobTehcKZllBDS.mjs → DUB6Oj_aiV3f8s5_.mjs} +51 -49
- package/browser/esm/{Bw66vzKThXKvXvPI.mjs → DW3kFc5t4Wnh5E9S.mjs} +2 -2
- package/browser/esm/{BzG0p8RdGDWHttVr.mjs → DkmqFp_-iUIy_l3D.mjs} +4 -4
- package/browser/esm/{zjEXdQiQruTkUyf5.mjs → Dlk1kRgkiBIpUxd9.mjs} +22 -22
- package/browser/esm/{tm7XJ-Zd_04xWKG6.mjs → DnMFW_oKYQxRjP1l.mjs} +2 -2
- package/browser/esm/{DA4S5eqog20pG7b2.mjs → DrmOaEx6CQ91zBsP.mjs} +29 -29
- package/browser/esm/{D8PxKK6OrmancpLT.mjs → DsWDvmky7CgzX_7W.mjs} +3 -3
- package/browser/esm/{DMbcmIZ-G2fbWn8v.mjs → Dx_dZ7jrw5Hxeoot.mjs} +2 -2
- package/browser/esm/{BN1MW1nuBndrzryn.mjs → Dy0TAi9WafVT8eke.mjs} +3 -3
- package/browser/esm/{L7SKr6r1tmMwFx6Q.mjs → JmmPE8Vsj85wdV8H.mjs} +2 -2
- package/browser/esm/{CIab4UYcHQQKTHeD.mjs → O970I8lbI7okqG7N.mjs} +404 -404
- package/browser/esm/{DwH4H_p6gTAcpQ17.mjs → WR3-xqcK1gF3ewAR.mjs} +4 -4
- package/browser/esm/XHhDDWrJiZJgWxPM.mjs +165 -0
- package/browser/esm/{KsfZhE6ocmYobGjY.mjs → YwDdO4YwcIE4OB0D.mjs} +2 -2
- package/browser/esm/aYpwVCDSwMUuz147.mjs +527 -0
- package/browser/esm/{BGPT-k25jo0UhtT5.mjs → gQzj95vSMXdKhpWf.mjs} +29032 -24101
- package/browser/esm/index.mjs +886 -578
- package/browser/esm/{CxhXbk-5XhaK8UNs.mjs → jotvQFBWO2jXAhWx.mjs} +2 -2
- package/browser/esm/{CWyzk_3eDCR9bKq6.mjs → mufbL88lyIKJEWyP.mjs} +1528 -1433
- package/browser/esm/{BVsG6Vpvb1ZzpURJ.mjs → qNv1x-Ny9TPbvZzj.mjs} +2 -2
- package/browser/esm/{XrasOsWQ-64jwMn1.mjs → taTjDyUIIxq2eClH.mjs} +4 -4
- package/browser/esm/{CqzKBrmmV-fWRoK7.mjs → yudASWe8CWXYcGt3.mjs} +22 -22
- package/licenses/dependencies.txt +69 -69
- package/node/esm/{CjwmkzMtjj6OMJbO.mjs → -q1xF3_2jmk3QHIY.mjs} +487 -483
- package/node/esm/{DDIiQZTdeY4vdK8_.mjs → 7ZwdVIsOdcziHpMD.mjs} +189 -189
- package/node/esm/{C7h7SvhWNwQ9TfGh.mjs → B6BQYUDRxbRnzca4.mjs} +4 -4
- package/node/esm/{DjsOfZn5vYpB7L6U.mjs → B8MYgBe4XICBSROW.mjs} +52 -50
- package/node/esm/{B8KEX44VZTFTTKb3.mjs → BBUVvO9Ma1RzbKux.mjs} +3 -3
- package/node/esm/{D9RwzPR5s2mWrbCQ.mjs → BQko-9y6mf2oQK7u.mjs} +2 -2
- package/node/esm/{BNiG1ISiMjs-G2mE.mjs → BSlFO0_8UZ38gfeE.mjs} +22 -22
- package/node/esm/{DUft-qpAS4MMANwG.mjs → Bgy7uWJVGwkN7AlD.mjs} +3 -3
- package/node/esm/{DyIASfKKPuNl5Xx-.mjs → BhosJbKOPgbJSZMY.mjs} +2 -2
- package/node/esm/BoLecFnIxhYKGor-.mjs +2040 -0
- package/node/esm/{WBHD7ECKG6HZ5UpY.mjs → BwyoLlHutolJw7OW.mjs} +2 -2
- package/node/esm/{Dh8o-woVpmUL50BD.mjs → CDgUHRW6vSASfqNr.mjs} +2 -2
- package/node/esm/{BZ0IRjh2hYuI86xW.mjs → CHS84ZGEoH6aeHsZ.mjs} +31 -30
- package/node/esm/{BRnNpoS8VpkAhdVk.mjs → CIlH2fSEpdYBZwUA.mjs} +2 -2
- package/node/esm/{BlzPuXtKvF3Qfr0p.mjs → CIxb44vA81H9lRip.mjs} +2 -2
- package/node/esm/{Cx9nQSsuyqhayyBS.mjs → Cb1-r2RCxcJZB6fM.mjs} +32675 -27215
- package/node/esm/{DKdFasYVvjAitASZ.mjs → CjCqcGyCYGkaMQI9.mjs} +2 -2
- package/node/esm/{D7ia4o3y5Wvl__9Y.mjs → ClJJC8tBpgsqHwdn.mjs} +2 -2
- package/node/esm/{C-JEySqMuKdpcKe0.mjs → Cle-_21jebWv_-D4.mjs} +3 -3
- package/node/esm/{j8DqCwPgfIPICFtf.mjs → D51xu0rubo34Ppeg.mjs} +1005 -1004
- package/node/esm/{Ddd1y3TP0kqnnSs7.mjs → DCSJKgcCQzOV-dMJ.mjs} +3 -3
- package/node/esm/{ZtF9EuipL7Z9Iwfs.mjs → DCaLNIs-_4Y6hJ8S.mjs} +2 -2
- package/node/esm/DTkV7IK2_ODMJAP5.mjs +115 -0
- package/node/esm/DfbVTAhNutxM74E8.mjs +169 -0
- package/node/esm/{DVejVdSBXzAFQbqo.mjs → DfrxGbxxowFmm3SF.mjs} +2 -2
- package/node/esm/{DW3u4bBJIUaHZ6m-.mjs → DgsBYF3xbjgx9Mzp.mjs} +2 -2
- package/node/esm/{CHBlLTJaoPUVxA2J.mjs → DxnBYzOueAKEqaQT.mjs} +22 -22
- package/node/esm/M3jahkTgfUxGyeZv.mjs +530 -0
- package/node/esm/{-afI0SRg_vgXtea7.mjs → NnrDjio_xwTBs05n.mjs} +3 -3
- package/node/esm/{BqvqbFsPQB0gEvwF.mjs → OCrS6pBT6lGRu82d.mjs} +1762 -1674
- package/node/esm/XhDjStxKy-dd3WKa.mjs +199 -0
- package/node/esm/{D9zb5xVRehABdbXL.mjs → Yo7_havHbr9VL8R4.mjs} +2 -2
- package/node/esm/{MtRwC1PMkOEb1Nty.mjs → btVWSwUwMjM0J5fS.mjs} +3 -3
- package/node/esm/{DQqXPS05dvF0F-gh.mjs → cRz94rkuvDrA8mr9.mjs} +2 -2
- package/node/esm/{BfXLtDqsXXYeZ6LX.mjs → fwfAgq8qIADcHmY4.mjs} +78 -78
- package/node/esm/index.mjs +913 -598
- package/node/esm/{OnkJkCGFDjamqIUQ.mjs → jqBKdf9DG54xqpaw.mjs} +3 -3
- package/node/esm/{C6b4rM62pIWIywlM.mjs → nxxwAZZF8NsdErJW.mjs} +2 -2
- package/node/esm/{B07QPde9GloqsW8e.mjs → oGGVbqahqfK45-Uz.mjs} +4 -4
- package/node/esm/{BlHlBRvKGt-4CS0A.mjs → zh6vcRzFqdV1aYh5.mjs} +2 -2
- package/package.json +7 -7
- package/resources/locales/de/model.msg.json +82 -1
- package/resources/locales/en/model.msg.json +80 -1
- package/types/scripting-api.json +9967 -9497
- package/types/scripting-enums.json +27 -0
- package/types/scripting.d.ts +2282 -166
- package/types/src/.generated/wasm/sdk.d.ts +332 -0
- package/types/src/calculation/Calculation.d.ts +8 -0
- package/types/src/calculation/ICalculation.d.ts +51 -0
- package/types/src/calculation/compiler/Types.d.ts +5 -0
- package/types/src/calculation/executor/CalcExecutorUtils.d.ts +1 -1
- package/types/src/calculation/formula/FormulaBlock.d.ts +2 -0
- package/types/src/calculation/formula/IFormulaBlock.d.ts +18 -0
- package/types/src/calculation/grid/CalcGrid.d.ts +5 -1
- package/types/src/calculation/grid/CalcGridBackend.d.ts +36 -1
- package/types/src/calculation/grid/CalcGridProxy.d.ts +2 -0
- package/types/src/calculation/grid/CalcGridUtils.d.ts +4 -2
- package/types/src/calculation/grid/FormulaHost.d.ts +3 -1
- package/types/src/calculation/grid/ICalcGrid.d.ts +88 -0
- package/types/src/calculation/grid/_CalcRequest.d.ts +9 -0
- package/types/src/calculation/spatial/FormulaSpatialValue.d.ts +2 -0
- package/types/src/calculation/spatial/SpillEntry.d.ts +55 -4
- package/types/src/calculation/state/CalcNode.d.ts +6 -3
- package/types/src/calculation/state/CalculationContext.d.ts +4 -2
- package/types/src/calculation/state/_PivotView.d.ts +22 -0
- package/types/src/cell/ICell.d.ts +1 -21
- package/types/src/cellRange/ICellRange.d.ts +18 -2
- package/types/src/collections/MixedTypedArrayList.d.ts +16 -2
- package/types/src/condition/BuiltInOperators/AbstractOperator.d.ts +10 -0
- package/types/src/condition/BuiltInOperators/GreaterThanEqualToOperator.d.ts +3 -0
- package/types/src/condition/BuiltInOperators/GreaterThanOperator.d.ts +3 -0
- package/types/src/condition/BuiltInOperators/LessThanEqualToOperator.d.ts +3 -0
- package/types/src/condition/BuiltInOperators/LessThanOperator.d.ts +3 -0
- package/types/src/condition/BuiltInOperators/MatchesOperator.d.ts +10 -0
- package/types/src/condition/BuiltInOperators/TimePeriodOperator.d.ts +2 -0
- package/types/src/condition/BuiltInOperators/index.d.ts +2 -0
- package/types/src/condition/Condition.d.ts +1 -0
- package/types/src/condition/ICondition.d.ts +15 -0
- package/types/src/condition/_ConditionUtils.d.ts +14 -0
- package/types/src/conditionalFormat/ConditionalFormat.d.ts +2 -1
- package/types/src/conditionalFormat/IConditionalFormat.d.ts +4 -3
- package/types/src/license/LicenseDetails.d.ts +27 -0
- package/types/src/license/LicenseManager.d.ts +24 -7
- package/types/src/license/_Utils.d.ts +34 -3
- package/types/src/license/index.d.ts +1 -0
- package/types/src/license/runtime.browser.d.ts +32 -4
- package/types/src/license/runtime.node.d.ts +8 -5
- package/types/src/license/summary.d.ts +18 -0
- package/types/src/pivot/IPivotTable.d.ts +1549 -13
- package/types/src/pivot/IPivotTableCollection.d.ts +70 -4
- package/types/src/pivot/PivotCache.d.ts +95 -11
- package/types/src/pivot/PivotDataField.d.ts +73 -0
- package/types/src/pivot/PivotField.d.ts +142 -0
- package/types/src/pivot/PivotTable.d.ts +548 -14
- package/types/src/pivot/PivotTableCollection.d.ts +18 -3
- package/types/src/pivot/_PivotAreas.d.ts +48 -0
- package/types/src/pivot/_PivotControls.d.ts +140 -0
- package/types/src/pivot/_PivotEngine.d.ts +9 -0
- package/types/src/pivot/_PivotGroups.d.ts +25 -0
- package/types/src/pivot/_PivotItems.d.ts +167 -0
- package/types/src/pivot/_PivotStructure.d.ts +237 -0
- package/types/src/pivot/_PivotStylePreview.d.ts +21 -0
- package/types/src/pivot/_PivotUtils.d.ts +37 -0
- package/types/src/pivot/engine/PivotAdd.d.ts +37 -0
- package/types/src/pivot/engine/PivotData.d.ts +65 -0
- package/types/src/pivot/engine/PivotEdit.d.ts +45 -0
- package/types/src/pivot/engine/PivotFilters.d.ts +50 -0
- package/types/src/pivot/engine/PivotFormulas.d.ts +72 -0
- package/types/src/pivot/engine/PivotLayout.d.ts +133 -0
- package/types/src/pivot/engine/PivotMove.d.ts +24 -0
- package/types/src/pivot/engine/PivotRefresh.d.ts +87 -0
- package/types/src/pivot/engine/PivotSort.d.ts +26 -0
- package/types/src/pivot/engine/PivotViewBuilder.d.ts +22 -0
- package/types/src/pivot/engine/index.d.ts +15 -0
- package/types/src/pivot/index.d.ts +4 -0
- package/types/src/pivot/kernel/KernelPivot.d.ts +63 -0
- package/types/src/pivot/kernel/_KernelLeaves.d.ts +100 -0
- package/types/src/pivot/kernel/_PivotAxisTree.d.ts +71 -0
- package/types/src/primitives/Range.d.ts +12 -1
- package/types/src/sheet/IWorksheet.d.ts +35 -0
- package/types/src/sheet/SheetCell.d.ts +21 -14
- package/types/src/sheet/SheetRange.d.ts +3 -0
- package/types/src/sheet/Worksheet.d.ts +175 -7
- package/types/src/sheet/_PivotFootprint.d.ts +42 -0
- package/types/src/sheet/_SheetAutoFitUtils.d.ts +12 -1
- package/types/src/sheet/_SheetMutations.d.ts +47 -0
- package/types/src/sheet/_SheetStateTypes.d.ts +11 -0
- package/types/src/sheet/style/SheetCellStyle.d.ts +6 -0
- package/types/src/sheet/style/SheetPivotStyle.d.ts +83 -0
- package/types/src/sheet/style/_IndentUnit.d.ts +14 -0
- package/types/src/sheetHeader/SheetCellHeader.d.ts +1 -1
- package/types/src/slicer/ISlicer.d.ts +114 -34
- package/types/src/slicer/ITimeline.d.ts +61 -0
- package/types/src/slicer/Slicer.d.ts +76 -3
- package/types/src/slicer/_PivotSlicer.d.ts +51 -0
- package/types/src/slicer/index.d.ts +1 -0
- package/types/src/table/AnchoredTable.d.ts +11 -1
- package/types/src/table/ITable.d.ts +5 -6
- package/types/src/table/ITableStyle.d.ts +50 -34
- package/types/src/table/_BuiltInPivotStyles.d.ts +8 -0
- package/types/src/table/_BuiltInTableStyles.d.ts +0 -1
- package/types/src/type/ITypes.d.ts +5 -1
- package/types/src/workbook/IWorkbook.d.ts +8 -2
- package/types/src/workbook/Workbook.d.ts +72 -6
- package/browser/esm/BrHplg4RuI5jOmmr.mjs +0 -357
- package/browser/esm/eImPONkfn5DstmS8.mjs +0 -184
- package/node/esm/03AYPvCda2x9EOlY.mjs +0 -360
- package/node/esm/BmVQRGAijOHzgHmz.mjs +0 -199
- package/node/esm/Dk4KLs5GoRRuD8J4.mjs +0 -115
- package/types/src/pivot/_PivotXml.d.ts +0 -24
- package/types/src/primitives/Grouping.d.ts +0 -65
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/sdk - SDK - A high-performance, embeddable spreadsheet engine. - v0.8.0-beta.
|
|
2
|
+
* @license @sheetxl/sdk - SDK - A high-performance, embeddable spreadsheet engine. - v0.8.0-beta.17
|
|
3
3
|
*
|
|
4
4
|
* (C) 2026-present SheetXL Inc. & Michael T. Ford
|
|
5
|
-
* License:
|
|
5
|
+
* License: SheetXL EULA — https://www.sheetxl.com/eula
|
|
6
6
|
*/
|
|
7
|
-
import { n as e } from "./
|
|
8
|
-
import { t } from "./
|
|
7
|
+
import { n as e } from "./DnMFW_oKYQxRjP1l.mjs";
|
|
8
|
+
import { t } from "./CWkaF7gYWCkW7vDA.mjs";
|
|
9
9
|
import { CommonUtils as n, ExpectedError as r, TypedObject as i, defineLazyModule as a, loadResource as o, messageKey as s } from "@sheetxl/utils";
|
|
10
10
|
var c, l;
|
|
11
11
|
(l = c ||= {}).TabStop = class {}, l.HorizontalAlignment = {
|
|
@@ -550,7 +550,7 @@ function b(e, t) {
|
|
|
550
550
|
let n = t ? e + "\0" + v(t) : e, r = y.get(n);
|
|
551
551
|
return r || (r = _(e, t), y.set(n, r)), r;
|
|
552
552
|
}
|
|
553
|
-
var x, S = a("sdk:fonts-wasm", () => import("./
|
|
553
|
+
var x, S = a("sdk:fonts-wasm", () => import("./Dy0TAi9WafVT8eke.mjs"), { prefetch: !1 }), ee = async () => (await S.load()).wasm, te = /^\p{White_Space}$/u, C = (e) => Math.max(0, Math.floor(e + .5)) || 0, w = class e {
|
|
554
554
|
constructor(e, t) {
|
|
555
555
|
this._perEm = /* @__PURE__ */ new Map(), this._units = /* @__PURE__ */ new Map(), this._unitsPerEm = 0, this._hinting = null, this._measureMissing = null, this._native = null, this._nativePending = [], this.family = e.family, this.weight = e.weight, this.italic = e.italic, this._vertical = t;
|
|
556
556
|
}
|
|
@@ -3760,29 +3760,29 @@ function yi(e, t, n = !1, r = !1) {
|
|
|
3760
3760
|
};
|
|
3761
3761
|
}
|
|
3762
3762
|
var bi = (e, t, n = null, r = !1, i = !1) => {
|
|
3763
|
-
let a =
|
|
3764
|
-
|
|
3765
|
-
let
|
|
3766
|
-
for (let e = 0; e <
|
|
3767
|
-
if (!
|
|
3768
|
-
let t =
|
|
3769
|
-
|
|
3770
|
-
let n = ui(t,
|
|
3763
|
+
let a = n ?? e.getNow(), o = new Date(a).getFullYear(), { formats: s, compiled: c, monthByName: l, weekdaysAbbr: u, weekdaysWide: d, numericSep: f, wildcardSep: p } = fi(e.getLocale()), m = t.replaceAll(/^ +| +$/g, "").replaceAll(/ +/g, " ");
|
|
3764
|
+
m = m.replaceAll(/ *([-/]) */g, "$1");
|
|
3765
|
+
let h = m.replaceAll(p, li), g = m.replaceAll(f, "-"), _ = e.isDate1904();
|
|
3766
|
+
for (let e = 0; e < s.length; e++) {
|
|
3767
|
+
if (!s[e].excelOnly && !i) continue;
|
|
3768
|
+
let t = m;
|
|
3769
|
+
s[e].containsDot ? t = h : s[e].containsDash && (t = g);
|
|
3770
|
+
let n = ui(t, c[e], l);
|
|
3771
3771
|
if (!n) continue;
|
|
3772
|
-
let r = n.year ??
|
|
3773
|
-
|
|
3774
|
-
let
|
|
3775
|
-
if (
|
|
3776
|
-
let v = f ? zr(1900, 2, 29) - (
|
|
3777
|
-
if (
|
|
3778
|
-
if (
|
|
3779
|
-
let e = Xr(zr(r, n.month,
|
|
3780
|
-
if (!i.includes(
|
|
3772
|
+
let r = n.year ?? o;
|
|
3773
|
+
s[e].windowYear && n.year !== void 0 && (r = r <= 29 ? 2e3 + r : 1900 + r), s[e].todaysYear && (r = o);
|
|
3774
|
+
let a = n.day ?? 1, f = r === 1900 && n.month === 2 && a === 29, p = /* @__PURE__ */ new Date(0);
|
|
3775
|
+
if (p.setFullYear(r, n.month - 1, a), p.setHours(0, 0, 0, 0), !f && (p.getMonth() !== n.month - 1 || p.getDate() !== a)) continue;
|
|
3776
|
+
let v = f ? zr(1900, 2, 29) - (_ ? V : 0) : ai(p, _), y = +!_;
|
|
3777
|
+
if (s[e].windowYear || v >= y) {
|
|
3778
|
+
if (s[e].parseFormat.indexOf("EEE") > -1) {
|
|
3779
|
+
let e = Xr(zr(r, n.month, a)), i = t.toLowerCase();
|
|
3780
|
+
if (!i.includes(u[e].toLowerCase()) && !i.includes(d[e].toLowerCase())) return null;
|
|
3781
3781
|
}
|
|
3782
3782
|
return {
|
|
3783
3783
|
asSerialDate: v,
|
|
3784
|
-
asJSDate:
|
|
3785
|
-
numberFormat:
|
|
3784
|
+
asJSDate: p,
|
|
3785
|
+
numberFormat: s[e].numberFormat
|
|
3786
3786
|
};
|
|
3787
3787
|
}
|
|
3788
3788
|
}
|
|
@@ -3844,7 +3844,7 @@ var ji = Object.freeze({
|
|
|
3844
3844
|
format(e, t, n) {
|
|
3845
3845
|
let r = n?.date1904 ?? !1, i = n?.locale, a = e;
|
|
3846
3846
|
if (Ir[a] !== void 0 && (a = Ir[a]), typeof a == "number" && (a = Nr(a, i) ?? a), typeof t == "number") {
|
|
3847
|
-
let e =
|
|
3847
|
+
let e = Hi(a, t, {
|
|
3848
3848
|
date1904: r,
|
|
3849
3849
|
locale: i
|
|
3850
3850
|
});
|
|
@@ -3903,7 +3903,7 @@ var ji = Object.freeze({
|
|
|
3903
3903
|
let f = null;
|
|
3904
3904
|
if (n?.placeholders) {
|
|
3905
3905
|
let e = Dn(a, s, c);
|
|
3906
|
-
e != null && (f =
|
|
3906
|
+
e != null && (f = Wi(typeof e == "number" ? `color${e}` : String(e)));
|
|
3907
3907
|
}
|
|
3908
3908
|
return {
|
|
3909
3909
|
text: l,
|
|
@@ -3919,7 +3919,7 @@ var ji = Object.freeze({
|
|
|
3919
3919
|
return Oi(e);
|
|
3920
3920
|
}
|
|
3921
3921
|
isFractionFormat(e) {
|
|
3922
|
-
return
|
|
3922
|
+
return Qi(Fr(e));
|
|
3923
3923
|
}
|
|
3924
3924
|
adjustDecimalPlaces(e, t) {
|
|
3925
3925
|
return function(e, t) {
|
|
@@ -3929,7 +3929,7 @@ var ji = Object.freeze({
|
|
|
3929
3929
|
return t < 0 ? (n = n.substring(0, Math.max(0, r + t)), n === "." && (n = "")) : (n.startsWith(".") || (n += "."), n += i.repeat(t)), n;
|
|
3930
3930
|
}, i = (e, t) => {
|
|
3931
3931
|
if (e === "General") return t > 0 ? "0" + r("", t) : e;
|
|
3932
|
-
if (
|
|
3932
|
+
if (Qi(e)) return e;
|
|
3933
3933
|
let n = e, i = -1, a = -1, o = n.indexOf("E");
|
|
3934
3934
|
if (o >= 0 && (n = n.substring(0, o)), i = n.indexOf("."), i >= 0) {
|
|
3935
3935
|
n = n.substring(i, n.length);
|
|
@@ -4016,7 +4016,14 @@ function Ri(e, t, n) {
|
|
|
4016
4016
|
locale: n?.locale
|
|
4017
4017
|
});
|
|
4018
4018
|
}
|
|
4019
|
-
function zi(e, t, n) {
|
|
4019
|
+
function zi(e, t, n, r) {
|
|
4020
|
+
return Bi(t, n, {
|
|
4021
|
+
...r,
|
|
4022
|
+
date1904: e?.isDate1904() ?? !1,
|
|
4023
|
+
locale: e?.getLocale() ?? void 0
|
|
4024
|
+
});
|
|
4025
|
+
}
|
|
4026
|
+
function Bi(e, t, n) {
|
|
4020
4027
|
let r = !(!n || !n.onSpacingChar && !n.onRepeatChar && n.spacingCharacter === void 0), i = Pi().format(e, t, {
|
|
4021
4028
|
date1904: n?.date1904 ?? !1,
|
|
4022
4029
|
locale: n?.locale,
|
|
@@ -4036,14 +4043,14 @@ function zi(e, t, n) {
|
|
|
4036
4043
|
} else if (n.onSpacingChar) for (let e of a) n.onSpacingChar(e.offset, e.char);
|
|
4037
4044
|
return s;
|
|
4038
4045
|
}
|
|
4039
|
-
function
|
|
4040
|
-
return
|
|
4046
|
+
function Vi(e, t, n, r) {
|
|
4047
|
+
return Hi(t, n, {
|
|
4041
4048
|
...r,
|
|
4042
4049
|
date1904: e?.isDate1904() ?? !1,
|
|
4043
4050
|
locale: e?.getLocale() ?? void 0
|
|
4044
4051
|
});
|
|
4045
4052
|
}
|
|
4046
|
-
function
|
|
4053
|
+
function Hi(e, t, n) {
|
|
4047
4054
|
if (typeof t != "number" || t > 2958465 || t < 0) return null;
|
|
4048
4055
|
let r = ii(t, n?.date1904 ?? !1), i = n?.locale ?? "en-US", a = !1, o = e, s = -1;
|
|
4049
4056
|
if (o === "Short DateTime" && (o = 22), typeof o == "number") switch (o) {
|
|
@@ -4097,7 +4104,7 @@ function Vi(e, t, n) {
|
|
|
4097
4104
|
date: r
|
|
4098
4105
|
} : null;
|
|
4099
4106
|
}
|
|
4100
|
-
var
|
|
4107
|
+
var Ui = Object.freeze({
|
|
4101
4108
|
black: 0,
|
|
4102
4109
|
white: 1,
|
|
4103
4110
|
red: 2,
|
|
@@ -4107,66 +4114,60 @@ var Hi = Object.freeze({
|
|
|
4107
4114
|
magenta: 6,
|
|
4108
4115
|
cyan: 7
|
|
4109
4116
|
});
|
|
4110
|
-
function
|
|
4117
|
+
function Wi(e) {
|
|
4111
4118
|
let t = null;
|
|
4112
4119
|
if ((e = e.toLowerCase()).startsWith("color")) {
|
|
4113
4120
|
let n = parseInt(e.substring(5));
|
|
4114
4121
|
n >= 0 && n <= 56 && (t = `Index${n + 7}`);
|
|
4115
4122
|
}
|
|
4116
4123
|
if (!t) {
|
|
4117
|
-
let n =
|
|
4124
|
+
let n = Ui[e];
|
|
4118
4125
|
n !== void 0 && (t = kr(n).toString());
|
|
4119
4126
|
}
|
|
4120
4127
|
return t;
|
|
4121
4128
|
}
|
|
4122
|
-
var
|
|
4123
|
-
|
|
4124
|
-
op:
|
|
4129
|
+
var Gi = "=", Ki = "<>", qi = ">", Ji = "<", Yi = ">=", Xi = "<=", Zi = /* @__PURE__ */ new Map();
|
|
4130
|
+
Zi.set(Gi, (e, t) => e === t), Zi.set(Ki, (e, t) => e !== t), Zi.set(qi, (e, t) => e > t), Zi.set(Ji, (e, t) => e < t), Zi.set(Yi, (e, t) => e >= t), Zi.set(Xi, (e, t) => e <= t), Object.freeze({
|
|
4131
|
+
op: Yi,
|
|
4125
4132
|
comp: 0
|
|
4126
4133
|
}), Object.freeze({
|
|
4127
|
-
op:
|
|
4134
|
+
op: Ji,
|
|
4128
4135
|
comp: 0
|
|
4129
4136
|
}), Object.freeze({
|
|
4130
|
-
op:
|
|
4137
|
+
op: qi,
|
|
4131
4138
|
comp: 0
|
|
4132
4139
|
}), Object.freeze({
|
|
4133
|
-
op:
|
|
4140
|
+
op: Gi,
|
|
4134
4141
|
comp: 0
|
|
4135
4142
|
});
|
|
4136
|
-
function
|
|
4143
|
+
function Qi(e) {
|
|
4137
4144
|
return !(!e.match(/^([#0?]+)( ?)\/( ?)([#0?]+)/) && !e.match(/^# ([#0?]+)( ?)\/( ?)([#0?]+)/));
|
|
4138
4145
|
}
|
|
4139
|
-
function
|
|
4146
|
+
function $i(e) {
|
|
4140
4147
|
return !!e && (e === 49 || e === "@" || typeof e != "number" && (Pi().getFormatInfo(e)?.isText ?? !1));
|
|
4141
4148
|
}
|
|
4142
|
-
var
|
|
4149
|
+
var ea = {
|
|
4143
4150
|
Text: "text",
|
|
4144
4151
|
Repeat: "repeat",
|
|
4145
4152
|
Spacing: "spacing"
|
|
4146
|
-
},
|
|
4147
|
-
formatValue:
|
|
4148
|
-
return zi(t, n, {
|
|
4149
|
-
...r,
|
|
4150
|
-
date1904: e?.isDate1904() ?? !1,
|
|
4151
|
-
locale: e?.getLocale() ?? void 0
|
|
4152
|
-
});
|
|
4153
|
-
},
|
|
4153
|
+
}, ta = Object.freeze({
|
|
4154
|
+
formatValue: zi,
|
|
4154
4155
|
isFractionFormat: (e) => Pi().isFractionFormat(e),
|
|
4155
4156
|
adjustDecimalPlaces: (e, t) => Pi().adjustDecimalPlaces(e, t),
|
|
4156
4157
|
getFormatInfo: (e) => Pi().getFormatInfo(e),
|
|
4157
4158
|
getFormatDateInfo: (e) => Pi().getFormatDateInfo(e),
|
|
4158
4159
|
isValidFormat: (e) => Pi().isValidFormat(e)
|
|
4159
4160
|
});
|
|
4160
|
-
function
|
|
4161
|
+
function na(e) {
|
|
4161
4162
|
return e === 14 ? "Short Date" : e === 22 ? "Short DateTime" : Ar[e] ?? null;
|
|
4162
4163
|
}
|
|
4163
|
-
function
|
|
4164
|
+
function ra(e) {
|
|
4164
4165
|
if (typeof e == "number") return e;
|
|
4165
4166
|
let t = e, n = Ir[e];
|
|
4166
4167
|
return n && (t = n), typeof t == "number" ? t : (r = t, Lr.get(r) ?? t);
|
|
4167
4168
|
var r;
|
|
4168
4169
|
}
|
|
4169
|
-
var
|
|
4170
|
+
var ia = [
|
|
4170
4171
|
{
|
|
4171
4172
|
numberFormat: "General",
|
|
4172
4173
|
formatType: A.General,
|
|
@@ -4394,7 +4395,7 @@ var ra = [
|
|
|
4394
4395
|
numberFormat: "[h]:mm:ss",
|
|
4395
4396
|
formatType: A.Custom
|
|
4396
4397
|
}
|
|
4397
|
-
],
|
|
4398
|
+
], aa = [
|
|
4398
4399
|
{
|
|
4399
4400
|
numberFormat: "00000",
|
|
4400
4401
|
formatType: A.Special,
|
|
@@ -4412,56 +4413,56 @@ var ra = [
|
|
|
4412
4413
|
numberFormat: "000-00-0000",
|
|
4413
4414
|
formatType: A.Special
|
|
4414
4415
|
}
|
|
4415
|
-
],
|
|
4416
|
-
for (let e = 0; e < ra.length; e++) {
|
|
4417
|
-
let t = ra[e].numberFormat.toLowerCase();
|
|
4418
|
-
oa.set(t, ra[e]), ra[e].regMatch && sa.unshift(ra[e]);
|
|
4419
|
-
}
|
|
4416
|
+
], oa = [...ia, ...aa], sa = /* @__PURE__ */ new Map(), ca = [];
|
|
4420
4417
|
for (let e = 0; e < ia.length; e++) {
|
|
4421
4418
|
let t = ia[e].numberFormat.toLowerCase();
|
|
4422
|
-
|
|
4419
|
+
sa.set(t, ia[e]), ia[e].regMatch && ca.unshift(ia[e]);
|
|
4420
|
+
}
|
|
4421
|
+
for (let e = 0; e < aa.length; e++) {
|
|
4422
|
+
let t = aa[e].numberFormat.toLowerCase();
|
|
4423
|
+
sa.set(t, aa[e]);
|
|
4423
4424
|
}
|
|
4424
|
-
var
|
|
4425
|
-
|
|
4426
|
-
e.primary && (
|
|
4427
|
-
}),
|
|
4425
|
+
var la = [], ua = /* @__PURE__ */ new Map();
|
|
4426
|
+
sa.forEach(function(e, t, r) {
|
|
4427
|
+
e.primary && (la.push(e), ua.set(n.textToKey(e.formatType), e.numberFormat));
|
|
4428
|
+
}), la.sort(function(e, t) {
|
|
4428
4429
|
return e.primary - t.primary;
|
|
4429
4430
|
});
|
|
4430
|
-
var
|
|
4431
|
+
var da = sa.get(A.General.toLowerCase()), fa = class {
|
|
4431
4432
|
lookupStyle(e) {
|
|
4432
|
-
if (!e) return
|
|
4433
|
-
if (typeof e == "number" && (e =
|
|
4433
|
+
if (!e) return da;
|
|
4434
|
+
if (typeof e == "number" && (e = na(e)), !e.toLowerCase) return console.warn("Invalid numberFormat", e), da;
|
|
4434
4435
|
e = e.toLowerCase();
|
|
4435
|
-
let t =
|
|
4436
|
+
let t = sa.get(e);
|
|
4436
4437
|
if (t) return t;
|
|
4437
|
-
for (let n = 0; !t && n <
|
|
4438
|
+
for (let n = 0; !t && n < ca.length; n++) ca[n].regMatch && e.match(ca[n].regMatch) && (t = ca[n]);
|
|
4438
4439
|
return t || {
|
|
4439
4440
|
numberFormat: e,
|
|
4440
4441
|
formatType: A.Custom
|
|
4441
4442
|
};
|
|
4442
4443
|
}
|
|
4443
4444
|
lookupPrimary() {
|
|
4444
|
-
return
|
|
4445
|
+
return la;
|
|
4445
4446
|
}
|
|
4446
4447
|
lookupByType(e) {
|
|
4447
|
-
return
|
|
4448
|
+
return oa.filter((t) => t.formatType === e);
|
|
4448
4449
|
}
|
|
4449
4450
|
lookupDefault(e) {
|
|
4450
|
-
return
|
|
4451
|
-
}
|
|
4452
|
-
},
|
|
4453
|
-
CATEGORIES: () =>
|
|
4454
|
-
CURRENCY_SYMBOLS: () =>
|
|
4455
|
-
DATE_PRESETS: () =>
|
|
4456
|
-
FRACTION_PRESETS: () =>
|
|
4457
|
-
NEGATIVE_STYLES: () =>
|
|
4458
|
-
SPECIAL_PRESETS: () =>
|
|
4459
|
-
TIME_PRESETS: () =>
|
|
4460
|
-
build: () =>
|
|
4461
|
-
defaultCodeForCategory: () =>
|
|
4462
|
-
isParametricCategory: () =>
|
|
4463
|
-
parse: () =>
|
|
4464
|
-
}),
|
|
4451
|
+
return ua.get(n.textToKey(e));
|
|
4452
|
+
}
|
|
4453
|
+
}, pa = e({
|
|
4454
|
+
CATEGORIES: () => ha,
|
|
4455
|
+
CURRENCY_SYMBOLS: () => Sa,
|
|
4456
|
+
DATE_PRESETS: () => Ca,
|
|
4457
|
+
FRACTION_PRESETS: () => Ta,
|
|
4458
|
+
NEGATIVE_STYLES: () => xa,
|
|
4459
|
+
SPECIAL_PRESETS: () => Ea,
|
|
4460
|
+
TIME_PRESETS: () => wa,
|
|
4461
|
+
build: () => Aa,
|
|
4462
|
+
defaultCodeForCategory: () => Da,
|
|
4463
|
+
isParametricCategory: () => _a,
|
|
4464
|
+
parse: () => Pa
|
|
4465
|
+
}), ma = new fa(), ha = Object.freeze([
|
|
4465
4466
|
"General",
|
|
4466
4467
|
"Number",
|
|
4467
4468
|
"Currency",
|
|
@@ -4474,17 +4475,17 @@ var ua = oa.get(A.General.toLowerCase()), da = class {
|
|
|
4474
4475
|
"Text",
|
|
4475
4476
|
"Special",
|
|
4476
4477
|
"Custom"
|
|
4477
|
-
]),
|
|
4478
|
+
]), ga = /* @__PURE__ */ new Set([
|
|
4478
4479
|
"Number",
|
|
4479
4480
|
"Currency",
|
|
4480
4481
|
"Accounting",
|
|
4481
4482
|
"Percentage",
|
|
4482
4483
|
"Scientific"
|
|
4483
4484
|
]);
|
|
4484
|
-
function
|
|
4485
|
-
return
|
|
4485
|
+
function _a(e) {
|
|
4486
|
+
return ga.has(e);
|
|
4486
4487
|
}
|
|
4487
|
-
var
|
|
4488
|
+
var va, ya, H, ba, xa = Object.freeze([
|
|
4488
4489
|
{
|
|
4489
4490
|
key: "minus",
|
|
4490
4491
|
label: "Minus sign",
|
|
@@ -4509,7 +4510,7 @@ var _a, va, H, ya, ba = Object.freeze([
|
|
|
4509
4510
|
red: !0,
|
|
4510
4511
|
parens: !0
|
|
4511
4512
|
}
|
|
4512
|
-
]),
|
|
4513
|
+
]), Sa = Object.freeze([
|
|
4513
4514
|
"$",
|
|
4514
4515
|
"€",
|
|
4515
4516
|
"£",
|
|
@@ -4522,7 +4523,7 @@ var _a, va, H, ya, ba = Object.freeze([
|
|
|
4522
4523
|
"CHF",
|
|
4523
4524
|
"kr",
|
|
4524
4525
|
"฿"
|
|
4525
|
-
]),
|
|
4526
|
+
]), Ca = Object.freeze([
|
|
4526
4527
|
"Short Date",
|
|
4527
4528
|
"Long Date",
|
|
4528
4529
|
"m/d/yyyy",
|
|
@@ -4531,7 +4532,7 @@ var _a, va, H, ya, ba = Object.freeze([
|
|
|
4531
4532
|
"mmm-yy",
|
|
4532
4533
|
"mmmm d, yyyy",
|
|
4533
4534
|
"m/d/yy h:mm"
|
|
4534
|
-
]),
|
|
4535
|
+
]), wa = Object.freeze([
|
|
4535
4536
|
"h:mm AM/PM",
|
|
4536
4537
|
"h:mm:ss AM/PM",
|
|
4537
4538
|
"h:mm",
|
|
@@ -4540,7 +4541,7 @@ var _a, va, H, ya, ba = Object.freeze([
|
|
|
4540
4541
|
"[h]:mm:ss",
|
|
4541
4542
|
"mm:ss",
|
|
4542
4543
|
"mm:ss.0"
|
|
4543
|
-
]),
|
|
4544
|
+
]), Ta = Object.freeze([
|
|
4544
4545
|
"# ?/?",
|
|
4545
4546
|
"# ??/??",
|
|
4546
4547
|
"# ???/???",
|
|
@@ -4550,51 +4551,51 @@ var _a, va, H, ya, ba = Object.freeze([
|
|
|
4550
4551
|
"# ??/16",
|
|
4551
4552
|
"# ?/10",
|
|
4552
4553
|
"# ??/100"
|
|
4553
|
-
]),
|
|
4554
|
+
]), Ea = Object.freeze([
|
|
4554
4555
|
"00000",
|
|
4555
4556
|
"00000-0000",
|
|
4556
4557
|
"[<=9999999]###-####;(###) ###-####",
|
|
4557
4558
|
"000-00-0000"
|
|
4558
4559
|
]);
|
|
4559
|
-
function
|
|
4560
|
+
function Da(e) {
|
|
4560
4561
|
switch (e) {
|
|
4561
4562
|
case "General":
|
|
4562
4563
|
case "Custom": return "General";
|
|
4563
4564
|
case "Text": return "@";
|
|
4564
|
-
case "Number": return
|
|
4565
|
+
case "Number": return Aa({
|
|
4565
4566
|
category: "Number",
|
|
4566
4567
|
decimalPlaces: 2,
|
|
4567
4568
|
useSeparator: !1,
|
|
4568
4569
|
negativeStyle: 0
|
|
4569
4570
|
});
|
|
4570
|
-
case "Currency": return
|
|
4571
|
+
case "Currency": return Aa({
|
|
4571
4572
|
category: "Currency",
|
|
4572
4573
|
decimalPlaces: 2,
|
|
4573
4574
|
currencySymbol: "$",
|
|
4574
4575
|
negativeStyle: 0
|
|
4575
4576
|
});
|
|
4576
|
-
case "Accounting": return
|
|
4577
|
+
case "Accounting": return Aa({
|
|
4577
4578
|
category: "Accounting",
|
|
4578
4579
|
decimalPlaces: 2,
|
|
4579
4580
|
currencySymbol: "$"
|
|
4580
4581
|
});
|
|
4581
4582
|
case "Percentage": return "0.00%";
|
|
4582
4583
|
case "Scientific": return "0.00E+00";
|
|
4583
|
-
case "Date": return
|
|
4584
|
-
case "Time": return
|
|
4585
|
-
case "Fraction": return
|
|
4586
|
-
case "Special": return
|
|
4584
|
+
case "Date": return Ca[0];
|
|
4585
|
+
case "Time": return wa[0];
|
|
4586
|
+
case "Fraction": return Ta[0];
|
|
4587
|
+
case "Special": return Ea[0];
|
|
4587
4588
|
}
|
|
4588
4589
|
}
|
|
4589
|
-
function
|
|
4590
|
+
function Oa(e) {
|
|
4590
4591
|
let t = e ?? "$";
|
|
4591
4592
|
return t === "$" ? "$" : `"${t}"`;
|
|
4592
4593
|
}
|
|
4593
|
-
function
|
|
4594
|
-
let n =
|
|
4594
|
+
function ka(e, t) {
|
|
4595
|
+
let n = xa[t ?? 0] ?? xa[0];
|
|
4595
4596
|
return n.parens ? n.red ? `${e}_);[Red](${e})` : `${e}_);(${e})` : n.red ? `${e};[Red]${e}` : e;
|
|
4596
4597
|
}
|
|
4597
|
-
function
|
|
4598
|
+
function Aa(e) {
|
|
4598
4599
|
let { category: t, decimalPlaces: n, useSeparator: r, currencySymbol: i, negativeStyle: a, code: o } = e, s = function(e) {
|
|
4599
4600
|
let t = Math.max(0, Math.min(30, e ?? 0));
|
|
4600
4601
|
return t > 0 ? "." + "0".repeat(t) : "";
|
|
@@ -4602,10 +4603,10 @@ function ka(e) {
|
|
|
4602
4603
|
switch (t) {
|
|
4603
4604
|
case "General": return "General";
|
|
4604
4605
|
case "Text": return "@";
|
|
4605
|
-
case "Number": return
|
|
4606
|
-
case "Currency": return Oa(
|
|
4606
|
+
case "Number": return ka((r ? "#,##0" : "0") + s, a);
|
|
4607
|
+
case "Currency": return ka(Oa(i) + "#,##0" + s, a);
|
|
4607
4608
|
case "Accounting": {
|
|
4608
|
-
let e =
|
|
4609
|
+
let e = Oa(i);
|
|
4609
4610
|
return `_(${e}* #,##0${s}_);_(${e}* (#,##0${s});_(${e}* ${(n ?? 0) > 0 ? "\"-\"" + "?".repeat(n) : "\"-\""}_);_(@_)`;
|
|
4610
4611
|
}
|
|
4611
4612
|
case "Percentage": return "0" + s + "%";
|
|
@@ -4614,11 +4615,11 @@ function ka(e) {
|
|
|
4614
4615
|
case "Time":
|
|
4615
4616
|
case "Fraction":
|
|
4616
4617
|
case "Special":
|
|
4617
|
-
case "Custom": return o ||
|
|
4618
|
+
case "Custom": return o || Da(t);
|
|
4618
4619
|
}
|
|
4619
4620
|
}
|
|
4620
|
-
function
|
|
4621
|
-
if (
|
|
4621
|
+
function ja(e, t) {
|
|
4622
|
+
if (ma.lookupStyle(e).formatType === A.Special) return "Special";
|
|
4622
4623
|
switch (t) {
|
|
4623
4624
|
case "general": return "General";
|
|
4624
4625
|
case "text": return "Text";
|
|
@@ -4634,34 +4635,34 @@ function Aa(e, t) {
|
|
|
4634
4635
|
}(e) ? "Accounting" : "Currency";
|
|
4635
4636
|
case "number":
|
|
4636
4637
|
case "grouped": return function(e) {
|
|
4637
|
-
return
|
|
4638
|
+
return ma.lookupStyle(e).formatType === A.Special;
|
|
4638
4639
|
}(e) ? "Special" : "Number";
|
|
4639
4640
|
}
|
|
4640
4641
|
}
|
|
4641
|
-
function
|
|
4642
|
+
function Ma(e) {
|
|
4642
4643
|
let t = e.match(/\[\$([^\]-]+)(?:-[^\]]*)?\]/);
|
|
4643
4644
|
if (t) return t[1];
|
|
4644
4645
|
let n = e.match(/"([^"]+)"/);
|
|
4645
4646
|
return n && n[1] !== "-" ? n[1] : (e.includes("$"), "$");
|
|
4646
4647
|
}
|
|
4647
|
-
function
|
|
4648
|
+
function Na(e) {
|
|
4648
4649
|
let t = Li(e);
|
|
4649
4650
|
if (t.length < 2) return 0;
|
|
4650
4651
|
let n = t[1], r = /\[red\]/i.test(n);
|
|
4651
4652
|
return n.includes("(") ? r ? 3 : 2 : +!!r;
|
|
4652
4653
|
}
|
|
4653
|
-
function
|
|
4654
|
+
function Pa(e) {
|
|
4654
4655
|
if (e == null || e === "") return { category: "General" };
|
|
4655
|
-
let t = Pi().getFormatInfo(e), n =
|
|
4656
|
+
let t = Pi().getFormatInfo(e), n = ja(e, t?.type), r = { category: n };
|
|
4656
4657
|
switch (n) {
|
|
4657
4658
|
case "Number":
|
|
4658
|
-
r.decimalPlaces = t?.maxDecimals ?? 0, r.useSeparator = !!t?.grouped, r.negativeStyle =
|
|
4659
|
+
r.decimalPlaces = t?.maxDecimals ?? 0, r.useSeparator = !!t?.grouped, r.negativeStyle = Na(e);
|
|
4659
4660
|
break;
|
|
4660
4661
|
case "Currency":
|
|
4661
|
-
r.decimalPlaces = t?.maxDecimals ?? 2, r.currencySymbol =
|
|
4662
|
+
r.decimalPlaces = t?.maxDecimals ?? 2, r.currencySymbol = Ma(e), r.negativeStyle = Na(e);
|
|
4662
4663
|
break;
|
|
4663
4664
|
case "Accounting":
|
|
4664
|
-
r.decimalPlaces = t?.maxDecimals ?? 2, r.currencySymbol =
|
|
4665
|
+
r.decimalPlaces = t?.maxDecimals ?? 2, r.currencySymbol = Ma(e);
|
|
4665
4666
|
break;
|
|
4666
4667
|
case "Percentage":
|
|
4667
4668
|
case "Scientific":
|
|
@@ -4671,7 +4672,7 @@ function Na(e) {
|
|
|
4671
4672
|
}
|
|
4672
4673
|
return r;
|
|
4673
4674
|
}
|
|
4674
|
-
(
|
|
4675
|
+
(ya = va ||= {}).Type = A, ya.Parser = ta, ya.Styles = new fa(), ya.ParseRunType = ea, ya.toBuiltInID = ra, ya.resolve = Fr, ya.builtInFormat = Pr, ya.getEngine = Pi, ya.Builder = pa, (ba = H ||= {}).AdjustmentType = {
|
|
4675
4676
|
Alpha: "alpha",
|
|
4676
4677
|
AlphaOff: "alphaOff",
|
|
4677
4678
|
AlphaMod: "alphaMod",
|
|
@@ -4701,7 +4702,7 @@ function Na(e) {
|
|
|
4701
4702
|
Inv: "inv",
|
|
4702
4703
|
Gamma: "gamma",
|
|
4703
4704
|
InvGamma: "invGamma"
|
|
4704
|
-
},
|
|
4705
|
+
}, ba.Named = {
|
|
4705
4706
|
ActiveBorder: "activeBorder",
|
|
4706
4707
|
ActiveCaption: "activeCaption",
|
|
4707
4708
|
CaptionText: "captionText",
|
|
@@ -4877,7 +4878,7 @@ function Na(e) {
|
|
|
4877
4878
|
GradientInactiveCaption: "gradientInactiveCaption",
|
|
4878
4879
|
MenuBar: "menuBar",
|
|
4879
4880
|
MenuHighlight: "menuHighlight"
|
|
4880
|
-
},
|
|
4881
|
+
}, ba.Scheme = {
|
|
4881
4882
|
Bg1: "bg1",
|
|
4882
4883
|
Bg2: "bg2",
|
|
4883
4884
|
Tx1: "tx1",
|
|
@@ -4890,7 +4891,7 @@ function Na(e) {
|
|
|
4890
4891
|
Accent6: "accent6",
|
|
4891
4892
|
Hlink: "hlink",
|
|
4892
4893
|
FolHlink: "folHlink"
|
|
4893
|
-
},
|
|
4894
|
+
}, ba.Type = {
|
|
4894
4895
|
Scheme: "scheme",
|
|
4895
4896
|
Named: "named",
|
|
4896
4897
|
Index: "index",
|
|
@@ -4900,7 +4901,7 @@ function Na(e) {
|
|
|
4900
4901
|
LRGB: "lrgb",
|
|
4901
4902
|
Hex: "hex"
|
|
4902
4903
|
};
|
|
4903
|
-
var
|
|
4904
|
+
var Fa = [
|
|
4904
4905
|
[
|
|
4905
4906
|
16777215,
|
|
4906
4907
|
H.Named.Transparent,
|
|
@@ -5185,12 +5186,12 @@ var Pa = [
|
|
|
5185
5186
|
[4293980400, H.Named.MenuBar],
|
|
5186
5187
|
[4281571839, H.Named.MenuHighlight],
|
|
5187
5188
|
[4286611584, H.Named.Grey]
|
|
5188
|
-
],
|
|
5189
|
+
], Ia = new class {
|
|
5189
5190
|
constructor() {
|
|
5190
5191
|
this._lookupByName = /* @__PURE__ */ new Map();
|
|
5191
|
-
let e =
|
|
5192
|
+
let e = Fa.length;
|
|
5192
5193
|
for (let t = 0; t < e; t++) {
|
|
5193
|
-
let e =
|
|
5194
|
+
let e = Fa[t], n = e[0], r = (n >> 24 & 255) / 255, i = n >> 16 & 255, a = n >> 8 & 255, o = 255 & n, s = {
|
|
5194
5195
|
id: t,
|
|
5195
5196
|
name: e[1],
|
|
5196
5197
|
rgbaColor: {
|
|
@@ -5215,7 +5216,7 @@ var Pa = [
|
|
|
5215
5216
|
t[r] = `#${e(i)}${e(a)}${e(o)}`;
|
|
5216
5217
|
}), t;
|
|
5217
5218
|
}
|
|
5218
|
-
}(),
|
|
5219
|
+
}(), La = [
|
|
5219
5220
|
{
|
|
5220
5221
|
scheme: H.Scheme.Tx1,
|
|
5221
5222
|
description: "First Text Color"
|
|
@@ -5280,55 +5281,55 @@ var Pa = [
|
|
|
5280
5281
|
scheme: "lt2",
|
|
5281
5282
|
description: "Text/Background - Light 2"
|
|
5282
5283
|
}
|
|
5283
|
-
],
|
|
5284
|
-
for (let e = 0; e <
|
|
5285
|
-
var
|
|
5284
|
+
], Ra = /* @__PURE__ */ new Map();
|
|
5285
|
+
for (let e = 0; e < La.length; e++) Ra.set(La[e].scheme.toLowerCase(), La[e]);
|
|
5286
|
+
var za = "lastclr", Ba = (e) => {
|
|
5286
5287
|
if (!e) return null;
|
|
5287
5288
|
let t = e.replace("#", "");
|
|
5288
5289
|
if (t.length < 6) return null;
|
|
5289
5290
|
let n = parseInt(t.substring(0, 2), 16), r = parseInt(t.substring(2, 4), 16), i = parseInt(t.substring(4, 6), 16);
|
|
5290
5291
|
return isNaN(n) || isNaN(r) || isNaN(i) ? null : new L.RGBA(n, r, i, 1);
|
|
5291
|
-
},
|
|
5292
|
-
let r =
|
|
5292
|
+
}, Va = (e) => new L.HEX(e.red, e.green, e.blue, 1).toString(!1).replace("#", ""), Ha = (e) => new L.RGBA(e.rgbaColor.r, e.rgbaColor.g, e.rgbaColor.b, e.rgbaColor.a), Ua = (e, t, n) => {
|
|
5293
|
+
let r = Ia.valueOfName(e);
|
|
5293
5294
|
if (!r) return null;
|
|
5294
5295
|
if (r.system) {
|
|
5295
5296
|
let e = r.name;
|
|
5296
5297
|
return {
|
|
5297
|
-
rgba: (t ? t(e, !1) : null)?.toRGBA() ?? n ??
|
|
5298
|
+
rgba: (t ? t(e, !1) : null)?.toRGBA() ?? n ?? Ha(r),
|
|
5298
5299
|
systemName: e
|
|
5299
5300
|
};
|
|
5300
5301
|
}
|
|
5301
5302
|
return {
|
|
5302
|
-
rgba:
|
|
5303
|
+
rgba: Ha(r),
|
|
5303
5304
|
systemName: null
|
|
5304
5305
|
};
|
|
5305
|
-
},
|
|
5306
|
+
}, Wa = (e) => {
|
|
5306
5307
|
if (!e) return null;
|
|
5307
5308
|
let t = e.getAdjustments();
|
|
5308
5309
|
if (t && t.length > 0) return null;
|
|
5309
5310
|
let n = e.getType();
|
|
5310
|
-
return n === H.Type.Auto ? H.Named.WindowText : n === H.Type.Named &&
|
|
5311
|
-
},
|
|
5311
|
+
return n === H.Type.Auto ? H.Named.WindowText : n === H.Type.Named && so.isSystem(e.getVal()) ? e.getVal() : null;
|
|
5312
|
+
}, Ga = (e) => e ? {
|
|
5312
5313
|
srgb: [
|
|
5313
5314
|
e.red / 255,
|
|
5314
5315
|
e.green / 255,
|
|
5315
5316
|
e.blue / 255
|
|
5316
5317
|
],
|
|
5317
5318
|
alpha: e.alpha === void 0 ? 1 : e.alpha
|
|
5318
|
-
} : null,
|
|
5319
|
+
} : null, Ka = function(e, t, n, r, i) {
|
|
5319
5320
|
let a, o = null, s = null, c = null, l = H.Type.Named;
|
|
5320
5321
|
if (e.toLowerCase() === "auto") {
|
|
5321
|
-
let e =
|
|
5322
|
-
a =
|
|
5322
|
+
let e = Ua(H.Named.WindowText, r, i);
|
|
5323
|
+
a = Ga(e.rgba), o = e.systemName, l = H.Type.Auto;
|
|
5323
5324
|
} else {
|
|
5324
|
-
let t =
|
|
5325
|
-
a =
|
|
5325
|
+
let t = Ua(e, r, i);
|
|
5326
|
+
a = Ga(t?.rgba ?? null), o = t?.systemName ?? null;
|
|
5326
5327
|
}
|
|
5327
|
-
if (a === null && ((u = e) === "phClr" && (u = "dk1"),
|
|
5328
|
+
if (a === null && ((u = e) === "phClr" && (u = "dk1"), Ra.get(u.toLowerCase()))) {
|
|
5328
5329
|
if (!t) throw Error("a scheme val was used but a schemeLookup was not provided");
|
|
5329
5330
|
s = e;
|
|
5330
5331
|
let n = t(s);
|
|
5331
|
-
c = n.toRGBA(), a =
|
|
5332
|
+
c = n.toRGBA(), a = Ga(c), o = Wa(n), l = H.Type.Scheme;
|
|
5332
5333
|
}
|
|
5333
5334
|
var u;
|
|
5334
5335
|
if (a === null) {
|
|
@@ -5382,7 +5383,7 @@ var Ra = "lastclr", za = (e) => {
|
|
|
5382
5383
|
if (a === null) {
|
|
5383
5384
|
let t = e.match(Ln);
|
|
5384
5385
|
if (t) {
|
|
5385
|
-
let e = parseInt(t[1]), s = n?.(e), c = s ? null : Or(e), u = s ? s.toRGBA() : c ?
|
|
5386
|
+
let e = parseInt(t[1]), s = n?.(e), c = s ? null : Or(e), u = s ? s.toRGBA() : c ? Ua(c, r, i).rgba : kr(e);
|
|
5386
5387
|
u && (a = {
|
|
5387
5388
|
srgb: [
|
|
5388
5389
|
u.red / 255,
|
|
@@ -5390,7 +5391,7 @@ var Ra = "lastclr", za = (e) => {
|
|
|
5390
5391
|
u.blue / 255
|
|
5391
5392
|
],
|
|
5392
5393
|
alpha: u.alpha
|
|
5393
|
-
}, o = s ?
|
|
5394
|
+
}, o = s ? Wa(s) : c, l = H.Type.Index);
|
|
5394
5395
|
}
|
|
5395
5396
|
}
|
|
5396
5397
|
if (a === null) throw Error("Not a valid color format: " + e);
|
|
@@ -5401,7 +5402,7 @@ var Ra = "lastclr", za = (e) => {
|
|
|
5401
5402
|
type: l,
|
|
5402
5403
|
systemName: o
|
|
5403
5404
|
};
|
|
5404
|
-
},
|
|
5405
|
+
}, qa = (e, t) => {
|
|
5405
5406
|
let n = [...e.srgb], r = e.alpha === void 0 ? 1 : e.alpha, i = t ? t.length : 0;
|
|
5406
5407
|
for (var a = 0; a < i; a++) {
|
|
5407
5408
|
let e = t[a], i = Object.keys(e)[0], o = e[i];
|
|
@@ -5411,12 +5412,12 @@ var Ra = "lastclr", za = (e) => {
|
|
|
5411
5412
|
srgb: n,
|
|
5412
5413
|
alpha: r
|
|
5413
5414
|
};
|
|
5414
|
-
},
|
|
5415
|
-
for (let e = 0; e <
|
|
5416
|
-
let t =
|
|
5417
|
-
|
|
5415
|
+
}, Ja = /* @__PURE__ */ new Map(), Ya = Object.keys(H.AdjustmentType), Xa = Ya.length;
|
|
5416
|
+
for (let e = 0; e < Xa; e++) {
|
|
5417
|
+
let t = Ya[e];
|
|
5418
|
+
Ja.set(H.AdjustmentType[t].toLowerCase(), H.AdjustmentType[t]);
|
|
5418
5419
|
}
|
|
5419
|
-
var U,
|
|
5420
|
+
var U, Za, W, Qa, $a, eo = /* @__PURE__ */ RegExp("\\s+\\s*(?![^()]*\\))|,\\s*(?![^()]*\\))"), to = /* @__PURE__ */ RegExp("\\s*[,]\\s*|\\s+"), no = null, ro = null, io = "--sxl-sys-color-", ao = 0, oo = {
|
|
5420
5421
|
[H.Scheme.Bg1]: "window",
|
|
5421
5422
|
[H.Scheme.Bg2]: "E8E8E8",
|
|
5422
5423
|
[H.Scheme.Tx1]: "windowText",
|
|
@@ -5429,20 +5430,20 @@ var U, Xa, W, Za, Qa, $a = /* @__PURE__ */ RegExp("\\s+\\s*(?![^()]*\\))|,\\s*(?
|
|
|
5429
5430
|
[H.Scheme.Accent6]: "4EA72E",
|
|
5430
5431
|
[H.Scheme.Hlink]: "467886",
|
|
5431
5432
|
[H.Scheme.FolHlink]: "96607D"
|
|
5432
|
-
},
|
|
5433
|
+
}, so = class e {
|
|
5433
5434
|
constructor(t, n, r, i = null, a) {
|
|
5434
5435
|
let o = null, s = null, c = i;
|
|
5435
5436
|
if (t instanceof e) o = t.getVal(), t.getAdjustments() && (s = [...t.getAdjustments()]), c ??= t._private.last;
|
|
5436
5437
|
else if (typeof t == "string") {
|
|
5437
5438
|
let e = this._parse(t);
|
|
5438
|
-
o = e.val, s = e.adjs, e.last && (c =
|
|
5439
|
+
o = e.val, s = e.adjs, e.last && (c = Ba(e.last));
|
|
5439
5440
|
} else if (t?.val) {
|
|
5440
5441
|
o = t.val, s = t.adjs;
|
|
5441
5442
|
let e = t.last;
|
|
5442
|
-
e && (c =
|
|
5443
|
+
e && (c = Ba(e));
|
|
5443
5444
|
}
|
|
5444
5445
|
if (!o) throw Error("Unable to determine color value");
|
|
5445
|
-
let l = a ??
|
|
5446
|
+
let l = a ?? ro;
|
|
5446
5447
|
this._private = {
|
|
5447
5448
|
val: o,
|
|
5448
5449
|
last: c,
|
|
@@ -5450,24 +5451,24 @@ var U, Xa, W, Za, Qa, $a = /* @__PURE__ */ RegExp("\\s+\\s*(?![^()]*\\))|,\\s*(?
|
|
|
5450
5451
|
schemeLookup: n,
|
|
5451
5452
|
indexedLookup: r,
|
|
5452
5453
|
systemLookup: a,
|
|
5453
|
-
parsedVal:
|
|
5454
|
+
parsedVal: Ka(o, n, r, l, c),
|
|
5454
5455
|
adjusted: null,
|
|
5455
5456
|
resolved: null,
|
|
5456
|
-
resolvedEpoch:
|
|
5457
|
+
resolvedEpoch: ao
|
|
5457
5458
|
};
|
|
5458
5459
|
}
|
|
5459
5460
|
_parse(e) {
|
|
5460
|
-
let t = null, n = e.trim(), r = n.split(
|
|
5461
|
+
let t = null, n = e.trim(), r = n.split(eo);
|
|
5461
5462
|
if (r && (t = r[0], n = n.substring(t.length, n.length).trim()), !t) throw Error("no color key found");
|
|
5462
|
-
let i = [], a = null, o = n.split(
|
|
5463
|
+
let i = [], a = null, o = n.split(to), s = o.length;
|
|
5463
5464
|
for (let e = 0; e < s; e++) {
|
|
5464
5465
|
let t = o[e];
|
|
5465
5466
|
if (!t) continue;
|
|
5466
|
-
if (t.toLowerCase() ===
|
|
5467
|
+
if (t.toLowerCase() === za) {
|
|
5467
5468
|
e++, a = o[e];
|
|
5468
5469
|
continue;
|
|
5469
5470
|
}
|
|
5470
|
-
let n =
|
|
5471
|
+
let n = Ja.get(t.toLowerCase());
|
|
5471
5472
|
if (!n) throw Error("Invalid adjustment type:" + t);
|
|
5472
5473
|
let r = null;
|
|
5473
5474
|
if (n !== H.AdjustmentType.Gray && n !== H.AdjustmentType.Comp && n !== H.AdjustmentType.Inv && n !== H.AdjustmentType.Gamma && n !== H.AdjustmentType.InvGamma) {
|
|
@@ -5486,11 +5487,11 @@ var U, Xa, W, Za, Qa, $a = /* @__PURE__ */ RegExp("\\s+\\s*(?![^()]*\\))|,\\s*(?
|
|
|
5486
5487
|
}
|
|
5487
5488
|
_forceDark(e = !0) {
|
|
5488
5489
|
this._resolve();
|
|
5489
|
-
let t = this._private.parsedVal, n = this._private.systemLookup ??
|
|
5490
|
+
let t = this._private.parsedVal, n = this._private.systemLookup ?? ro;
|
|
5490
5491
|
if (t.systemName && n) {
|
|
5491
5492
|
let r = n(t.systemName, !0);
|
|
5492
5493
|
if (r) {
|
|
5493
|
-
let t =
|
|
5494
|
+
let t = qa(Ga(r.toRGBA()), this._private.adjs), n = Hn(t.alpha);
|
|
5494
5495
|
if (e) {
|
|
5495
5496
|
let e = Vn(Bn([...t.srgb]));
|
|
5496
5497
|
return new L.RGBA(e[0], e[1], e[2], n);
|
|
@@ -5535,35 +5536,35 @@ var U, Xa, W, Za, Qa, $a = /* @__PURE__ */ RegExp("\\s+\\s*(?![^()]*\\))|,\\s*(?
|
|
|
5535
5536
|
let e = this._private.parsedVal;
|
|
5536
5537
|
if (!e.key && !e.systemName) return;
|
|
5537
5538
|
if (e.systemName) {
|
|
5538
|
-
if (this._private.resolvedEpoch ===
|
|
5539
|
+
if (this._private.resolvedEpoch === ao) return;
|
|
5539
5540
|
} else {
|
|
5540
5541
|
let t = this._private.schemeLookup(e.key)?.toRGBA();
|
|
5541
5542
|
if (t === e.color || t?.isEqual(e.color)) return;
|
|
5542
5543
|
}
|
|
5543
5544
|
}
|
|
5544
|
-
let e = this._private.systemLookup ??
|
|
5545
|
+
let e = this._private.systemLookup ?? ro, t = Ka(this._private.val, this._private.schemeLookup, this._private.indexedLookup, e, this._private.last), n = t.srgbAlpha, r = qa(n, this._private.adjs), i = Bn(r.srgb);
|
|
5545
5546
|
i = Vn(i);
|
|
5546
5547
|
let a = Hn(r.alpha);
|
|
5547
|
-
this._private.adjusted = r, this._private.parsedVal = t, this._private.resolved = new L.RGBA(i[0], i[1], i[2], a), this._private.resolvedEpoch =
|
|
5548
|
+
this._private.adjusted = r, this._private.parsedVal = t, this._private.resolved = new L.RGBA(i[0], i[1], i[2], a), this._private.resolvedEpoch = ao;
|
|
5548
5549
|
}
|
|
5549
5550
|
static parse(t, n, r, i = null, a) {
|
|
5550
5551
|
if (t instanceof e) return t;
|
|
5551
5552
|
let o = t, s = null, c = o?.trim(), l = null;
|
|
5552
5553
|
try {
|
|
5553
5554
|
if (!s) {
|
|
5554
|
-
let e = c?.split(
|
|
5555
|
+
let e = c?.split(eo);
|
|
5555
5556
|
e && (s = e[0], c = c.substring(s.length, c.length).trim());
|
|
5556
5557
|
}
|
|
5557
5558
|
if (!s) throw Error("no color found");
|
|
5558
|
-
let t = [], o = null, u = c.split(
|
|
5559
|
+
let t = [], o = null, u = c.split(to), d = u.length;
|
|
5559
5560
|
for (let e = 0; e < d; e++) {
|
|
5560
5561
|
let n = u[e];
|
|
5561
5562
|
if (!n) continue;
|
|
5562
|
-
if (n.toLowerCase() ===
|
|
5563
|
+
if (n.toLowerCase() === za) {
|
|
5563
5564
|
e++, o = u[e];
|
|
5564
5565
|
continue;
|
|
5565
5566
|
}
|
|
5566
|
-
let r =
|
|
5567
|
+
let r = Ja.get(n.toLowerCase());
|
|
5567
5568
|
if (!r) throw Error("Invalid adjustment type:" + n);
|
|
5568
5569
|
let i = null;
|
|
5569
5570
|
if (r !== H.AdjustmentType.Gray && r !== H.AdjustmentType.Comp && r !== H.AdjustmentType.Inv && r !== H.AdjustmentType.Gamma && r !== H.AdjustmentType.InvGamma) {
|
|
@@ -5585,34 +5586,34 @@ var U, Xa, W, Za, Qa, $a = /* @__PURE__ */ RegExp("\\s+\\s*(?![^()]*\\))|,\\s*(?
|
|
|
5585
5586
|
return l;
|
|
5586
5587
|
}
|
|
5587
5588
|
static isSystem(e) {
|
|
5588
|
-
return !!e && !0 ===
|
|
5589
|
+
return !!e && !0 === Ia.valueOfName(e)?.system;
|
|
5589
5590
|
}
|
|
5590
5591
|
static getDefaultSystemLookup() {
|
|
5591
|
-
return
|
|
5592
|
+
return ro;
|
|
5592
5593
|
}
|
|
5593
5594
|
static setDefaultSystemLookup(e) {
|
|
5594
|
-
let t =
|
|
5595
|
-
return
|
|
5595
|
+
let t = ro;
|
|
5596
|
+
return ro = e ?? null, ao++, t;
|
|
5596
5597
|
}
|
|
5597
5598
|
static getSystemEpoch() {
|
|
5598
|
-
return
|
|
5599
|
+
return ao;
|
|
5599
5600
|
}
|
|
5600
5601
|
static invalidateSystemColors() {
|
|
5601
|
-
|
|
5602
|
+
ao++;
|
|
5602
5603
|
}
|
|
5603
5604
|
static getSystemColorDefaults() {
|
|
5604
|
-
return
|
|
5605
|
+
return Ia.getSystemColorDefaults();
|
|
5605
5606
|
}
|
|
5606
5607
|
static getDefaultSchemeLookup() {
|
|
5607
|
-
if (!
|
|
5608
|
-
let t = /* @__PURE__ */ new Map(), n = Object.keys(
|
|
5608
|
+
if (!no) {
|
|
5609
|
+
let t = /* @__PURE__ */ new Map(), n = Object.keys(oo), r = n.length;
|
|
5609
5610
|
for (let i = 0; i < r; i++) {
|
|
5610
5611
|
let r = n[i];
|
|
5611
|
-
t.set(r.toLowerCase(), e.parse(
|
|
5612
|
+
t.set(r.toLowerCase(), e.parse(oo[r], null));
|
|
5612
5613
|
}
|
|
5613
|
-
|
|
5614
|
+
no = (e) => t.get(e.toLowerCase());
|
|
5614
5615
|
}
|
|
5615
|
-
return
|
|
5616
|
+
return no;
|
|
5616
5617
|
}
|
|
5617
5618
|
isEqual(t) {
|
|
5618
5619
|
return t instanceof e && this.toString().toLowerCase() === t.toString().toLowerCase();
|
|
@@ -5630,7 +5631,7 @@ var U, Xa, W, Za, Qa, $a = /* @__PURE__ */ RegExp("\\s+\\s*(?![^()]*\\))|,\\s*(?
|
|
|
5630
5631
|
}, this._private.schemeLookup, this._private.indexedLookup, this._private.last, this._private.systemLookup);
|
|
5631
5632
|
}
|
|
5632
5633
|
getLastColor() {
|
|
5633
|
-
return this._private.last && this._private.parsedVal.systemName ?
|
|
5634
|
+
return this._private.last && this._private.parsedVal.systemName ? Va(this._private.last) : null;
|
|
5634
5635
|
}
|
|
5635
5636
|
getType() {
|
|
5636
5637
|
return this._resolve(), this._private.parsedVal.type ?? null;
|
|
@@ -5645,7 +5646,7 @@ var U, Xa, W, Za, Qa, $a = /* @__PURE__ */ RegExp("\\s+\\s*(?![^()]*\\))|,\\s*(?
|
|
|
5645
5646
|
this._resolve();
|
|
5646
5647
|
let t = this._private.parsedVal;
|
|
5647
5648
|
if (!t.systemName || this._private.adjs && this._private.adjs.length > 0) return null;
|
|
5648
|
-
let n = t.systemName.toLowerCase(), r =
|
|
5649
|
+
let n = t.systemName.toLowerCase(), r = Ua(t.systemName, null, this._private.last).rgba, i = "#" + Va(r), a = `${io}${n}`;
|
|
5649
5650
|
return e ? `var(${a}-dark, var(${a}, ${i}))` : `var(${a}, ${i})`;
|
|
5650
5651
|
}
|
|
5651
5652
|
toCSS(e = !1, t = !1) {
|
|
@@ -5695,7 +5696,7 @@ var U, Xa, W, Za, Qa, $a = /* @__PURE__ */ RegExp("\\s+\\s*(?![^()]*\\))|,\\s*(?
|
|
|
5695
5696
|
return !0;
|
|
5696
5697
|
}
|
|
5697
5698
|
};
|
|
5698
|
-
(
|
|
5699
|
+
(Za = U ||= {}).Type = {
|
|
5699
5700
|
None: "none",
|
|
5700
5701
|
Solid: "solid",
|
|
5701
5702
|
Gradient: "gradient",
|
|
@@ -5704,17 +5705,17 @@ var U, Xa, W, Za, Qa, $a = /* @__PURE__ */ RegExp("\\s+\\s*(?![^()]*\\))|,\\s*(?
|
|
|
5704
5705
|
Background: "background",
|
|
5705
5706
|
Group: "group",
|
|
5706
5707
|
Custom: "custom"
|
|
5707
|
-
},
|
|
5708
|
+
}, Za.GradientType = {
|
|
5708
5709
|
Linear: "linear",
|
|
5709
5710
|
Path: "path",
|
|
5710
5711
|
Rect: "rect",
|
|
5711
5712
|
Shape: "shape"
|
|
5712
|
-
},
|
|
5713
|
+
}, Za.TileFlip = {
|
|
5713
5714
|
None: "none",
|
|
5714
5715
|
Horizontal: "x",
|
|
5715
5716
|
Vertical: "y",
|
|
5716
5717
|
Both: "xy"
|
|
5717
|
-
},
|
|
5718
|
+
}, Za.BuiltInSheetPattern = {
|
|
5718
5719
|
None: "none",
|
|
5719
5720
|
Solid: "solid",
|
|
5720
5721
|
DarkGray: "darkGray",
|
|
@@ -5828,7 +5829,7 @@ var U, Xa, W, Za, Qa, $a = /* @__PURE__ */ RegExp("\\s+\\s*(?![^()]*\\))|,\\s*(?
|
|
|
5828
5829
|
let t = e ? n[e] : null;
|
|
5829
5830
|
return t ? [...t] : null;
|
|
5830
5831
|
};
|
|
5831
|
-
}(W ||= {}), (
|
|
5832
|
+
}(W ||= {}), (Qa ||= {}).Type = {
|
|
5832
5833
|
OuterShadow: "outerShadow",
|
|
5833
5834
|
InnerShadow: "innerShadow",
|
|
5834
5835
|
PresetShadow: "presetShadow",
|
|
@@ -5917,11 +5918,11 @@ var U, Xa, W, Za, Qa, $a = /* @__PURE__ */ RegExp("\\s+\\s*(?![^()]*\\))|,\\s*(?
|
|
|
5917
5918
|
Boxes5: "5Boxes",
|
|
5918
5919
|
NoIcons: "NoIcons"
|
|
5919
5920
|
};
|
|
5920
|
-
}(
|
|
5921
|
-
var
|
|
5921
|
+
}($a ||= {});
|
|
5922
|
+
var co = {
|
|
5922
5923
|
type: U.Type.Solid,
|
|
5923
5924
|
color: "phClr"
|
|
5924
|
-
},
|
|
5925
|
+
}, lo = (e) => ({
|
|
5925
5926
|
type: U.Type.Gradient,
|
|
5926
5927
|
isRotatedWithShape: !0,
|
|
5927
5928
|
gradientType: U.GradientType.Linear,
|
|
@@ -5931,7 +5932,7 @@ var so = {
|
|
|
5931
5932
|
offset: e,
|
|
5932
5933
|
color: t
|
|
5933
5934
|
}))
|
|
5934
|
-
}),
|
|
5935
|
+
}), uo = (e) => ({
|
|
5935
5936
|
align: W.Align.Center,
|
|
5936
5937
|
lineCap: W.LineCap.Butt,
|
|
5937
5938
|
compound: W.Compound.Single,
|
|
@@ -5939,62 +5940,62 @@ var so = {
|
|
|
5939
5940
|
lineJoin: W.LineJoin.Miter,
|
|
5940
5941
|
miterLimit: 8,
|
|
5941
5942
|
dash: W.DashStyle.Solid,
|
|
5942
|
-
fill:
|
|
5943
|
-
}),
|
|
5944
|
-
type:
|
|
5943
|
+
fill: co
|
|
5944
|
+
}), fo = {
|
|
5945
|
+
type: Qa.Type.OuterShadow,
|
|
5945
5946
|
color: "000000 alpha 0.63",
|
|
5946
5947
|
distance: 1.5,
|
|
5947
5948
|
angle: 90,
|
|
5948
5949
|
blur: 4.5,
|
|
5949
5950
|
alignment: "ctr",
|
|
5950
5951
|
isRotatedWithShape: !1
|
|
5951
|
-
},
|
|
5952
|
+
}, po = Object.freeze({
|
|
5952
5953
|
fillStyleLst: [
|
|
5953
|
-
|
|
5954
|
-
|
|
5954
|
+
co,
|
|
5955
|
+
lo([
|
|
5955
5956
|
[0, "phClr lumMod 110 satMod 105 tint 67"],
|
|
5956
5957
|
[.5, "phClr lumMod 105 satMod 103 tint 73"],
|
|
5957
5958
|
[1, "phClr lumMod 105 satMod 109 tint 81"]
|
|
5958
5959
|
]),
|
|
5959
|
-
|
|
5960
|
+
lo([
|
|
5960
5961
|
[0, "phClr satMod 103 lumMod 102 tint 94"],
|
|
5961
5962
|
[.5, "phClr satMod 110 lumMod 100 shade 100"],
|
|
5962
5963
|
[1, "phClr lumMod 99 satMod 120 shade 78"]
|
|
5963
5964
|
])
|
|
5964
5965
|
],
|
|
5965
5966
|
lnStyleLst: [
|
|
5966
|
-
|
|
5967
|
-
|
|
5968
|
-
|
|
5967
|
+
uo(.5),
|
|
5968
|
+
uo(1),
|
|
5969
|
+
uo(1.5)
|
|
5969
5970
|
],
|
|
5970
5971
|
effectStyleLst: [
|
|
5971
5972
|
[],
|
|
5972
5973
|
[],
|
|
5973
|
-
[
|
|
5974
|
+
[fo]
|
|
5974
5975
|
],
|
|
5975
5976
|
bgFillStyleLst: [
|
|
5976
|
-
|
|
5977
|
+
co,
|
|
5977
5978
|
{
|
|
5978
5979
|
type: U.Type.Solid,
|
|
5979
5980
|
color: "phClr tint 95 satMod 170"
|
|
5980
5981
|
},
|
|
5981
|
-
|
|
5982
|
+
lo([
|
|
5982
5983
|
[0, "phClr tint 93 satMod 150 shade 98 lumMod 102"],
|
|
5983
5984
|
[.5, "phClr tint 98 satMod 130 shade 90 lumMod 103"],
|
|
5984
5985
|
[1, "phClr shade 63 satMod 120"]
|
|
5985
5986
|
])
|
|
5986
5987
|
]
|
|
5987
5988
|
});
|
|
5988
|
-
function
|
|
5989
|
+
function mo(e) {
|
|
5989
5990
|
return !/^(-?\d|--)/.test(e);
|
|
5990
5991
|
}
|
|
5991
|
-
function
|
|
5992
|
+
function ho(e) {
|
|
5992
5993
|
let t = [], n = "", r = "", i = 7;
|
|
5993
5994
|
for (let a, o = 0; a = e.charAt(o); o++) if (/[a-zA-Z\d\xa0-\uffff_-]/.test(a) && i === 7) n += a;
|
|
5994
5995
|
else if (a === "\\" && i === 7) i = 6;
|
|
5995
5996
|
else if (a === " " && i === 7) {
|
|
5996
5997
|
if (n !== "") {
|
|
5997
|
-
if (!
|
|
5998
|
+
if (!mo(n)) return null;
|
|
5998
5999
|
t.push(n), n = "";
|
|
5999
6000
|
}
|
|
6000
6001
|
} else if (i === 6) /[0-9a-f]/i.test(a) ? (r += a, i = 8) : (n += a, i = 7);
|
|
@@ -6003,17 +6004,17 @@ function mo(e) {
|
|
|
6003
6004
|
/[0-9a-f]/i.test(a) && r.length < 6 ? r += a : (n += String.fromCodePoint(parseInt(r, 16)), n += a, r = "", i = 7);
|
|
6004
6005
|
}
|
|
6005
6006
|
if (n !== "") {
|
|
6006
|
-
if (!
|
|
6007
|
+
if (!mo(n)) return null;
|
|
6007
6008
|
t.push(n);
|
|
6008
6009
|
}
|
|
6009
6010
|
return t.join(" ");
|
|
6010
6011
|
}
|
|
6011
|
-
function
|
|
6012
|
+
function go(e, t) {
|
|
6012
6013
|
let n = t, r = "", i = { "font-family": [] };
|
|
6013
6014
|
for (let t, a = 0; t = e.charAt(a); a += 1) if (n !== 4 || t !== "\"" && t !== "'") {
|
|
6014
6015
|
if (n === 3 && t === ",") n = 4, r = "";
|
|
6015
6016
|
else if (n === 4 && t === ",") {
|
|
6016
|
-
let e =
|
|
6017
|
+
let e = ho(r);
|
|
6017
6018
|
e && i["font-family"].push(e), r = "";
|
|
6018
6019
|
} else if (n === 5 && t === " ") /^(?:\+|-)?(?:[0-9]*\.)?[0-9]+(?:deg|grad|rad|turn)$/.test(r) ? (i["font-style"] += " " + r, r = "") : --a, n = 1;
|
|
6019
6020
|
else if (n !== 1 || t !== " " && t !== "/") n === 2 && t === " " ? (/^(?:\+|-)?([0-9]*\.)?[0-9]+(?:em|ex|ch|rem|vh|vw|vmin|vmax|px|mm|cm|in|pt|pc|%)?$/.test(r) && (i["line-height"] = r), n = 4, r = "") : r += t;
|
|
@@ -6038,26 +6039,26 @@ function ho(e, t) {
|
|
|
6038
6039
|
}
|
|
6039
6040
|
if (n === 3 && !/^\s*$/.test(r)) return null;
|
|
6040
6041
|
if (n === 4) {
|
|
6041
|
-
let e =
|
|
6042
|
+
let e = ho(r);
|
|
6042
6043
|
e && i["font-family"].push(e);
|
|
6043
6044
|
}
|
|
6044
6045
|
return i;
|
|
6045
6046
|
}
|
|
6046
|
-
function
|
|
6047
|
+
function _o(e) {
|
|
6047
6048
|
let t = parseFloat(e);
|
|
6048
6049
|
return isNaN(t) || (t %= 360, t > 0 ? t = 360 - t : t < 0 && (t *= -1)), t;
|
|
6049
6050
|
}
|
|
6050
|
-
function
|
|
6051
|
+
function vo(e) {
|
|
6051
6052
|
return (e %= 360) < 0 && (e += 360), e > 180 ? e = 360 - e : e > 1 && (e *= -1), e;
|
|
6052
6053
|
}
|
|
6053
|
-
function
|
|
6054
|
+
function yo(e) {
|
|
6054
6055
|
if (typeof e != "string") return null;
|
|
6055
6056
|
let t = function(e) {
|
|
6056
|
-
let t =
|
|
6057
|
+
let t = go(e, 4);
|
|
6057
6058
|
return t === null ? null : t["font-family"];
|
|
6058
6059
|
}(e);
|
|
6059
6060
|
Array.isArray(t) && t.length === 0 && (t = null), t = t ? { "font-family": t } : function(e) {
|
|
6060
|
-
let t =
|
|
6061
|
+
let t = go(e, 1);
|
|
6061
6062
|
return t !== null && t["font-size"] && t["font-family"].length ? t : null;
|
|
6062
6063
|
}(e);
|
|
6063
6064
|
let n = null, r = null, i = null;
|
|
@@ -6071,46 +6072,46 @@ function vo(e) {
|
|
|
6071
6072
|
size: i
|
|
6072
6073
|
};
|
|
6073
6074
|
}
|
|
6074
|
-
function
|
|
6075
|
+
function bo(e, t = !1) {
|
|
6075
6076
|
return t === "adaptive" ? e?.toCSS("adaptive") ?? null : function(e, t = !1) {
|
|
6076
6077
|
return e?.toHex(t)?.toString(!1).toLowerCase() ?? null;
|
|
6077
6078
|
}(e, t);
|
|
6078
6079
|
}
|
|
6079
|
-
function
|
|
6080
|
+
function xo(e) {
|
|
6080
6081
|
return e == null ? null : n.roundAccurately(e, 2) + "pt";
|
|
6081
6082
|
}
|
|
6082
|
-
function
|
|
6083
|
+
function So(e, t) {
|
|
6083
6084
|
let n = "", r = !0 === t || !!t && t !== O.StrikeStyle.None, i = e && e !== O.UnderlineStyle.None;
|
|
6084
6085
|
return r && (n += "line-through"), i && r && (n += " "), i && (n += "underline", !0 !== e && e !== O.UnderlineStyle.Single && e !== O.UnderlineStyle.SingleAccounting || (n += " solid"), e !== O.UnderlineStyle.Double && e !== O.UnderlineStyle.DoubleAccounting || (n += " double")), n;
|
|
6085
6086
|
}
|
|
6086
|
-
function
|
|
6087
|
+
function Co(e) {
|
|
6087
6088
|
return e === O.UnderlineStyle.Single ? "single" : e === O.UnderlineStyle.Double ? "double" : e === O.UnderlineStyle.SingleAccounting ? "single-accounting" : e === O.UnderlineStyle.DoubleAccounting ? "double-accounting" : "none";
|
|
6088
6089
|
}
|
|
6089
|
-
var
|
|
6090
|
+
var wo = Object.freeze({
|
|
6090
6091
|
underline: O.UnderlineStyle.None,
|
|
6091
6092
|
strike: !1
|
|
6092
6093
|
});
|
|
6093
|
-
function
|
|
6094
|
-
if (!e) return
|
|
6094
|
+
function To(e) {
|
|
6095
|
+
if (!e) return wo;
|
|
6095
6096
|
let t = O.UnderlineStyle.None, n = !1;
|
|
6096
6097
|
return (e = e.toLowerCase()).includes("underline") && (t = O.UnderlineStyle.Single), (e.includes("line-through") || e.includes("linethrough")) && (n = !0), {
|
|
6097
6098
|
underline: t,
|
|
6098
6099
|
strike: n
|
|
6099
6100
|
};
|
|
6100
6101
|
}
|
|
6101
|
-
function
|
|
6102
|
+
function Eo(e) {
|
|
6102
6103
|
return e ? (e = e.toLowerCase()) === "single" ? O.UnderlineStyle.Single : e === "double" ? O.UnderlineStyle.Double : e === "single-accounting" || e === "singleaccounting" ? O.UnderlineStyle.SingleAccounting : e === "double-accounting" || e === "doubleaccounting" ? O.UnderlineStyle.DoubleAccounting : O.UnderlineStyle.None : O.UnderlineStyle.None;
|
|
6103
6104
|
}
|
|
6104
|
-
function
|
|
6105
|
+
function Do(e) {
|
|
6105
6106
|
return e ? e.toLowerCase() : null;
|
|
6106
6107
|
}
|
|
6107
|
-
function
|
|
6108
|
+
function Oo(e) {
|
|
6108
6109
|
return e ? e === c.Overflow.Visible || e === c.Overflow.Clip || e === c.Overflow.Shrink ? "nowrap" : e === c.Overflow.Wrap ? "normal" : void 0 : null;
|
|
6109
6110
|
}
|
|
6110
|
-
function
|
|
6111
|
+
function ko(e, t) {
|
|
6111
6112
|
return O.toCSSFontFamily(e, t);
|
|
6112
6113
|
}
|
|
6113
|
-
function
|
|
6114
|
+
function Ao(e) {
|
|
6114
6115
|
let t = "", n = !1, r = "";
|
|
6115
6116
|
for (let i = 0; i < e.length; i++) {
|
|
6116
6117
|
let a = e.charAt(i);
|
|
@@ -6130,12 +6131,12 @@ function ko(e) {
|
|
|
6130
6131
|
}
|
|
6131
6132
|
return "\"" + t + "\"";
|
|
6132
6133
|
}
|
|
6133
|
-
function
|
|
6134
|
+
function jo(e) {
|
|
6134
6135
|
let t = e.replace(/(\\[0-9]{4})/g, (e) => String.fromCharCode(parseInt(e.replace(/\\/g, ""), 16)));
|
|
6135
6136
|
return t = t.replace(/(\\.{1})/g, (e) => e.substring(e.length - 1, e.length)), t.includes("\\") && (t = t.replace(/(\\.{1})/g, (e) => e.substring(e.length - 1, e.length))), t = t.replace(/^"(.*)"$/, "$1"), t;
|
|
6136
6137
|
}
|
|
6137
|
-
var
|
|
6138
|
-
function
|
|
6138
|
+
var Mo = "Thin", No = "Hairline", Po = "Extra Light", Fo = "Ultra Light", Io = "Light", Lo = "Normal", Ro = "Regular", zo = "Medium", Bo = "Semi Bold", Vo = "Demi Bold", Ho = "Bold", Uo = "Extra Bold", Wo = "Ultra Bold", Go = "Black", Ko = "Heavy", qo = "Extra Black", Jo = "Ultra Black", Yo = "lighter", Xo = "normal", Zo = "bold", Qo = "bolder", G = /* @__PURE__ */ new Map();
|
|
6139
|
+
function $o(e) {
|
|
6139
6140
|
let t = 400;
|
|
6140
6141
|
if (t = typeof e == "number" ? e : parseFloat(e), !isNaN(t)) return t;
|
|
6141
6142
|
if (typeof e == "string") {
|
|
@@ -6144,14 +6145,14 @@ function Qo(e) {
|
|
|
6144
6145
|
}
|
|
6145
6146
|
return t;
|
|
6146
6147
|
}
|
|
6147
|
-
G.set(n.textToKey(
|
|
6148
|
-
var
|
|
6149
|
-
function
|
|
6148
|
+
G.set(n.textToKey(Mo), 100), G.set(n.textToKey(No), 100), G.set(n.textToKey(Po), 200), G.set(n.textToKey(Fo), 200), G.set(n.textToKey(Io), 300), G.set(n.textToKey(Lo), 400), G.set(n.textToKey(Ro), 400), G.set(n.textToKey(zo), 500), G.set(n.textToKey(Bo), 600), G.set(n.textToKey(Vo), 600), G.set(n.textToKey(Lo), 400), G.set(n.textToKey(Ho), 700), G.set(n.textToKey(Uo), 800), G.set(n.textToKey(Wo), 800), G.set(n.textToKey(Go), 900), G.set(n.textToKey(Ko), 900), G.set(n.textToKey(qo), 950), G.set(n.textToKey(Jo), 950), G.set(n.textToKey(Yo), 100), G.set(n.textToKey(Xo), 400), G.set(n.textToKey(Zo), 700), G.set(n.textToKey(Qo), 700);
|
|
6149
|
+
var es = "xx-small", ts = "x-small", ns = "small", rs = "medium", is = "large", as = "x-large", os = "xx-large", ss = "xxx-large", cs = "smaller", ls = "larger", us = "math", ds = /* @__PURE__ */ RegExp("^[0-9]*[.]?[0-9]+$", "g"), K = /* @__PURE__ */ new Map();
|
|
6150
|
+
function fs(e, t = 11, r = "pt") {
|
|
6150
6151
|
if (!e) return null;
|
|
6151
6152
|
let i = t;
|
|
6152
6153
|
e = e.trim().toLowerCase();
|
|
6153
6154
|
let a = r === "pt" ? O.getDeviceScale() : 1, o = r === "pt" ? 1 : O.getDeviceScale();
|
|
6154
|
-
if (
|
|
6155
|
+
if (ds.test(e)) {
|
|
6155
6156
|
let t = parseFloat(e);
|
|
6156
6157
|
isNaN(t) || (e = t + r);
|
|
6157
6158
|
}
|
|
@@ -6166,7 +6167,7 @@ function ds(e, t = 11, r = "pt") {
|
|
|
6166
6167
|
}
|
|
6167
6168
|
return isNaN(i) ? null : i;
|
|
6168
6169
|
}
|
|
6169
|
-
K.set(n.textToKey(
|
|
6170
|
+
K.set(n.textToKey(es), (e) => .4 * e), K.set(n.textToKey(ts), (e) => .5 * e), K.set(n.textToKey(ns), (e) => .6 * e), K.set(n.textToKey(rs), (e) => e), K.set(n.textToKey(is), (e) => 1.1 * e), K.set(n.textToKey(as), (e) => 1.25 * e), K.set(n.textToKey(os), (e) => 1.5 * e), K.set(n.textToKey(ss), (e) => 2 * e), K.set(n.textToKey(cs), (e) => .9 * e), K.set(n.textToKey(ls), (e) => 1.1 * e), K.set(n.textToKey(us), (e) => e);
|
|
6170
6171
|
var q = /* @__PURE__ */ new Map();
|
|
6171
6172
|
q.set(U.BuiltInSheetPattern.None, {
|
|
6172
6173
|
description: "None",
|
|
@@ -6226,16 +6227,16 @@ q.set(U.BuiltInSheetPattern.None, {
|
|
|
6226
6227
|
description: "Thin Diagonal Cross",
|
|
6227
6228
|
cssKey: "thin-diag-cross"
|
|
6228
6229
|
});
|
|
6229
|
-
var
|
|
6230
|
+
var ps = "", ms = /* @__PURE__ */ new Map();
|
|
6230
6231
|
q.forEach((e, t) => {
|
|
6231
|
-
|
|
6232
|
+
ps.length > 0 && (ps += "|"), ps += "\\b" + e.cssKey + "\\b", ms.set(e.cssKey, t);
|
|
6232
6233
|
});
|
|
6233
|
-
var
|
|
6234
|
-
function
|
|
6234
|
+
var hs = RegExp(`(\\s*(?:${ps}))`, "g");
|
|
6235
|
+
function gs(e) {
|
|
6235
6236
|
if (!e) return null;
|
|
6236
6237
|
let t = e.toLowerCase();
|
|
6237
6238
|
t = t.replace(/;/, "");
|
|
6238
|
-
let n = t.match(
|
|
6239
|
+
let n = t.match(hs);
|
|
6239
6240
|
if (!n) return null;
|
|
6240
6241
|
let r = null;
|
|
6241
6242
|
n && n.length > 0 && (r = ((e) => {
|
|
@@ -6245,20 +6246,20 @@ function hs(e) {
|
|
|
6245
6246
|
})(n[0])), t = t.trim();
|
|
6246
6247
|
let i = t ? t.trim() : null;
|
|
6247
6248
|
return r || i ? {
|
|
6248
|
-
patternType:
|
|
6249
|
+
patternType: ms.get(r ?? "solid"),
|
|
6249
6250
|
foreground: i
|
|
6250
6251
|
} : null;
|
|
6251
6252
|
}
|
|
6252
|
-
var
|
|
6253
|
+
var _s = (e, t = !1, n = null) => {
|
|
6253
6254
|
if (!e) return null;
|
|
6254
6255
|
let r = e.getStops();
|
|
6255
6256
|
if (!r || r.length < 1) return null;
|
|
6256
6257
|
let i = r.length;
|
|
6257
|
-
if (i === 1) return
|
|
6258
|
+
if (i === 1) return bo(r[0].getColor(), t);
|
|
6258
6259
|
let a = "";
|
|
6259
6260
|
for (let e = 0; e < i; e++) {
|
|
6260
6261
|
let n = r[e], o = n.getOffset(), s = o === void 0 ? e / (i - 1) * 100 : 100 * o;
|
|
6261
|
-
a += `${
|
|
6262
|
+
a += `${bo(n.getColor(), t)} ${s}%${e < i - 1 ? ", " : ""}`;
|
|
6262
6263
|
}
|
|
6263
6264
|
if (e.getGradientType() === U.GradientType.Linear) {
|
|
6264
6265
|
let t = e.getAngle() ?? 0;
|
|
@@ -6269,19 +6270,19 @@ var gs = (e, t = !1, n = null) => {
|
|
|
6269
6270
|
return `linear-gradient(${t}deg, ${a})`;
|
|
6270
6271
|
}
|
|
6271
6272
|
return e.getGradientType() === U.GradientType.Path || e.getGradientType() === U.GradientType.Rect || e.getGradientType() === U.GradientType.Shape ? function(e, t, n) {
|
|
6272
|
-
let r = t ??
|
|
6273
|
+
let r = t ?? Xs, i = vs(r.left ?? 0), a = vs(r.right ?? 0), o = vs(r.top ?? 0), s = vs(r.bottom ?? 0);
|
|
6273
6274
|
if (i > a || o > s) return null;
|
|
6274
6275
|
let c = (i + a) / 2, l = (o + s) / 2, u = (100 * c).toFixed(3), d = (100 * l).toFixed(3);
|
|
6275
6276
|
if (!n || n.width <= 0 || n.height <= 0) return `radial-gradient(ellipse farthest-corner at ${u}% ${d}%, ${e})`;
|
|
6276
6277
|
let f = n.width, p = n.height, m = Math.max(c, 1 - c), h = Math.max(l, 1 - l), g = Math.sqrt(m * m + h * h);
|
|
6277
6278
|
return `radial-gradient(ellipse ${(g * f).toFixed(3)}px ${(g * p).toFixed(3)}px at ${u}% ${d}%, ${e})`;
|
|
6278
|
-
}(a, e.getFocus(), n) ||
|
|
6279
|
-
},
|
|
6280
|
-
function
|
|
6279
|
+
}(a, e.getFocus(), n) || bo((r[i - 1] ?? r[0]).getColor(), t) : null;
|
|
6280
|
+
}, vs = (e) => Math.max(0, Math.min(1, e));
|
|
6281
|
+
function ys(e) {
|
|
6281
6282
|
return q.get(e)?.cssKey ?? "solid";
|
|
6282
6283
|
}
|
|
6283
6284
|
var J = /* @__PURE__ */ new Map();
|
|
6284
|
-
function
|
|
6285
|
+
function bs(e) {
|
|
6285
6286
|
if (!e) return "none";
|
|
6286
6287
|
let t = J.get(e.getStyle());
|
|
6287
6288
|
if (!t) return null;
|
|
@@ -6334,32 +6335,32 @@ J.set(k.StrokeStyle.None, {
|
|
|
6334
6335
|
size: 1,
|
|
6335
6336
|
cssKey: "dot-dash-slanted"
|
|
6336
6337
|
});
|
|
6337
|
-
var
|
|
6338
|
+
var xs = [], Ss = /* @__PURE__ */ new Set(), Cs = /* @__PURE__ */ new Map(), ws = (e, t) => {
|
|
6338
6339
|
let n = e.size === null ? e.cssKey : `${e.size.toString()} ${e.cssKey}`;
|
|
6339
|
-
|
|
6340
|
+
Cs.set(n, t), Ss.has(e.cssKey) || (xs.push(e.cssKey), Ss.add(e.cssKey));
|
|
6340
6341
|
};
|
|
6341
|
-
J.forEach(
|
|
6342
|
-
var
|
|
6343
|
-
for (let e = 0; e <
|
|
6342
|
+
J.forEach(ws);
|
|
6343
|
+
var Ts = Object.keys(k.StrokeStyle);
|
|
6344
|
+
for (let e = 0; e < Ts.length; e++) ws({
|
|
6344
6345
|
size: null,
|
|
6345
|
-
cssKey:
|
|
6346
|
-
}, k.StrokeStyle[
|
|
6347
|
-
|
|
6346
|
+
cssKey: Ts[e].toLowerCase()
|
|
6347
|
+
}, k.StrokeStyle[Ts[e]]);
|
|
6348
|
+
ws({
|
|
6348
6349
|
size: null,
|
|
6349
6350
|
cssKey: "double"
|
|
6350
|
-
}, k.StrokeStyle.Double),
|
|
6351
|
+
}, k.StrokeStyle.Double), ws({
|
|
6351
6352
|
size: null,
|
|
6352
6353
|
cssKey: "solid"
|
|
6353
|
-
}, k.StrokeStyle.Medium),
|
|
6354
|
+
}, k.StrokeStyle.Medium), ws({
|
|
6354
6355
|
size: null,
|
|
6355
6356
|
cssKey: "hidden"
|
|
6356
|
-
}, k.StrokeStyle.None),
|
|
6357
|
-
var
|
|
6358
|
-
for (let e = 0; e <
|
|
6359
|
-
var
|
|
6360
|
-
function
|
|
6357
|
+
}, k.StrokeStyle.None), xs.sort((e, t) => t.length - e.length);
|
|
6358
|
+
var Es = "", Ds = xs.length;
|
|
6359
|
+
for (let e = 0; e < Ds; e++) Es.length > 0 && (Es += "|"), Es += "\\b" + xs[e] + "\\b";
|
|
6360
|
+
var Os = RegExp(`(\\s*(?:${Es}))`, "g"), ks = /* @__PURE__ */ RegExp("(\\s*[0-9]*[.]?[0-9]+(?:pt|px){0,1})", "g");
|
|
6361
|
+
function As(e, t) {
|
|
6361
6362
|
if (!e) return null;
|
|
6362
|
-
let n = e.toLowerCase(), r = n.match(
|
|
6363
|
+
let n = e.toLowerCase(), r = n.match(Os);
|
|
6363
6364
|
if (!r) {
|
|
6364
6365
|
let e = t?.(n);
|
|
6365
6366
|
return e ? {
|
|
@@ -6374,52 +6375,52 @@ function ks(e, t) {
|
|
|
6374
6375
|
}, a = null;
|
|
6375
6376
|
if (r && r.length > 0 && (a = i(r[0])), !a) return null;
|
|
6376
6377
|
let o = null;
|
|
6377
|
-
if (r = n.match(
|
|
6378
|
+
if (r = n.match(ks), r && r.length > 0) {
|
|
6378
6379
|
let e = i(r[0]);
|
|
6379
6380
|
o = parseFloat(e.substring(0, e.length - 2));
|
|
6380
6381
|
}
|
|
6381
6382
|
n = n.trim();
|
|
6382
|
-
let s = n ? n.trim() : null, c = o === null ? a : `${o.toString()} ${a}`, l =
|
|
6383
|
-
return l ||=
|
|
6383
|
+
let s = n ? n.trim() : null, c = o === null ? a : `${o.toString()} ${a}`, l = Cs.get(c);
|
|
6384
|
+
return l ||= Cs.get(a), l ? {
|
|
6384
6385
|
color: s,
|
|
6385
6386
|
style: l
|
|
6386
6387
|
} : null;
|
|
6387
6388
|
}
|
|
6388
|
-
var
|
|
6389
|
-
function
|
|
6389
|
+
var js = "start", Ms = "end", Ns = "left", Ps = "right", Fs = "center", Is = "justify", Ls = "justify-all", Rs = "baseline", zs = "top", Bs = "middle", Vs = "bottom", Hs = "sub", Us = "text-top", Ws = "justify", Gs = "distributed", Ks = /* @__PURE__ */ new Map();
|
|
6390
|
+
function qs(e) {
|
|
6390
6391
|
let t = n.textToKey(e);
|
|
6391
|
-
return
|
|
6392
|
+
return Ks.get(t) || null;
|
|
6392
6393
|
}
|
|
6393
|
-
|
|
6394
|
-
var
|
|
6395
|
-
|
|
6396
|
-
var
|
|
6394
|
+
Ks.set(n.textToKey(js), c.HorizontalAlignment.Left), Ks.set(n.textToKey(Ns), c.HorizontalAlignment.Left), Ks.set(n.textToKey(Ms), c.HorizontalAlignment.Right), Ks.set(n.textToKey(Ps), c.HorizontalAlignment.Right), Ks.set(n.textToKey(Fs), c.HorizontalAlignment.Center), Ks.set(n.textToKey(Is), c.HorizontalAlignment.Justify), Ks.set(n.textToKey(Ls), c.HorizontalAlignment.Justify);
|
|
6395
|
+
var Js = /* @__PURE__ */ new Map();
|
|
6396
|
+
Js.set(n.textToKey(Rs), c.VerticalAlignment.Bottom), Js.set(n.textToKey(zs), c.VerticalAlignment.Top), Js.set(n.textToKey(Bs), c.VerticalAlignment.Center), Js.set(n.textToKey(Vs), c.VerticalAlignment.Bottom), Js.set(n.textToKey(Hs), c.VerticalAlignment.Bottom), Js.set(n.textToKey(Us), c.VerticalAlignment.Top), Js.set(n.textToKey(Ws), c.VerticalAlignment.Justify), Js.set(n.textToKey(Gs), c.VerticalAlignment.Distributed);
|
|
6397
|
+
var Ys = (e) => {
|
|
6397
6398
|
let t = n.textToKey(e);
|
|
6398
|
-
return
|
|
6399
|
-
},
|
|
6399
|
+
return Js.get(t) || null;
|
|
6400
|
+
}, Xs = Object.freeze({
|
|
6400
6401
|
left: 0,
|
|
6401
6402
|
right: 0,
|
|
6402
6403
|
top: 0,
|
|
6403
6404
|
bottom: 0
|
|
6404
6405
|
});
|
|
6405
|
-
function
|
|
6406
|
+
function Zs(e) {
|
|
6406
6407
|
return Math.ceil(e / 4);
|
|
6407
6408
|
}
|
|
6408
|
-
function
|
|
6409
|
+
function Qs(e) {
|
|
6409
6410
|
return 1;
|
|
6410
6411
|
}
|
|
6411
|
-
function
|
|
6412
|
+
function $s(e, t, n) {
|
|
6412
6413
|
return Ne;
|
|
6413
6414
|
}
|
|
6414
|
-
var
|
|
6415
|
-
if (e instanceof
|
|
6415
|
+
var ec = (e) => {
|
|
6416
|
+
if (e instanceof so) return { color: e.toString() };
|
|
6416
6417
|
if (typeof e == "string") try {
|
|
6417
6418
|
return { color: e === "none" || e === "transparent" ? null : e };
|
|
6418
6419
|
} catch (e) {
|
|
6419
6420
|
throw e;
|
|
6420
6421
|
}
|
|
6421
6422
|
return e;
|
|
6422
|
-
}, Y = i.PassThrough,
|
|
6423
|
+
}, Y = i.PassThrough, tc = {
|
|
6423
6424
|
shorthand: (e, t) => {
|
|
6424
6425
|
if (!e || e === "none" || e === "transparent") return null;
|
|
6425
6426
|
try {
|
|
@@ -6430,10 +6431,10 @@ var $s = (e) => {
|
|
|
6430
6431
|
return e;
|
|
6431
6432
|
},
|
|
6432
6433
|
merge: (e, t, n) => e
|
|
6433
|
-
},
|
|
6434
|
+
}, nc = {
|
|
6434
6435
|
shorthand: (e, t) => {
|
|
6435
6436
|
if (e.isIStroke) return e.getProperties();
|
|
6436
|
-
if (typeof e == "string" && (e =
|
|
6437
|
+
if (typeof e == "string" && (e = As(e, (e) => {
|
|
6437
6438
|
try {
|
|
6438
6439
|
return t.parseColor(e).toString();
|
|
6439
6440
|
} catch {}
|
|
@@ -6443,14 +6444,14 @@ var $s = (e) => {
|
|
|
6443
6444
|
return e.style && (n.style = e.style), e.color && (n.color = e.color), n;
|
|
6444
6445
|
},
|
|
6445
6446
|
properties: {
|
|
6446
|
-
color:
|
|
6447
|
+
color: tc,
|
|
6447
6448
|
style: Y
|
|
6448
6449
|
}
|
|
6449
|
-
},
|
|
6450
|
+
}, rc = {
|
|
6450
6451
|
shorthand: (e, t) => {
|
|
6451
6452
|
if (e.isIBorders) return e.getProperties();
|
|
6452
6453
|
if (typeof e == "string") {
|
|
6453
|
-
let n =
|
|
6454
|
+
let n = As(e, (e) => {
|
|
6454
6455
|
try {
|
|
6455
6456
|
return t.parseColor(e).toString();
|
|
6456
6457
|
} catch {}
|
|
@@ -6470,29 +6471,29 @@ var $s = (e) => {
|
|
|
6470
6471
|
return e;
|
|
6471
6472
|
},
|
|
6472
6473
|
properties: {
|
|
6473
|
-
top:
|
|
6474
|
-
left:
|
|
6475
|
-
right:
|
|
6476
|
-
bottom:
|
|
6477
|
-
horizontal:
|
|
6478
|
-
vertical:
|
|
6479
|
-
diagonalUp:
|
|
6480
|
-
diagonalDown:
|
|
6481
|
-
}
|
|
6482
|
-
},
|
|
6474
|
+
top: nc,
|
|
6475
|
+
left: nc,
|
|
6476
|
+
right: nc,
|
|
6477
|
+
bottom: nc,
|
|
6478
|
+
horizontal: nc,
|
|
6479
|
+
vertical: nc,
|
|
6480
|
+
diagonalUp: nc,
|
|
6481
|
+
diagonalDown: nc
|
|
6482
|
+
}
|
|
6483
|
+
}, ic = { shorthand: (e, t) => {
|
|
6483
6484
|
if (typeof e == "string") {
|
|
6484
|
-
let t =
|
|
6485
|
+
let t = va.Styles.lookupDefault(e) ?? e, n = va.toBuiltInID(t);
|
|
6485
6486
|
return typeof n == "number" && n !== 0 ? n : t;
|
|
6486
6487
|
}
|
|
6487
|
-
return typeof e == "number" ? e === 0 ?
|
|
6488
|
-
} },
|
|
6488
|
+
return typeof e == "number" ? e === 0 ? va.Type.General : va.builtInFormat(e) === void 0 ? null : e : null;
|
|
6489
|
+
} }, ac = {
|
|
6489
6490
|
shorthand: (e, t) => {
|
|
6490
6491
|
if (e.isIFontStyle) return e.toJSON();
|
|
6491
6492
|
if (typeof e == "string") {
|
|
6492
|
-
let t =
|
|
6493
|
+
let t = yo(e);
|
|
6493
6494
|
if (t) {
|
|
6494
6495
|
let e = {};
|
|
6495
|
-
if (t.family && (e.family = t.family), t.fallbacks && (e.fallbacks = t.fallbacks), t.size && (e.size =
|
|
6496
|
+
if (t.family && (e.family = t.family), t.fallbacks && (e.fallbacks = t.fallbacks), t.size && (e.size = fs(t.size)), Object.keys(t).length > 0) return e;
|
|
6496
6497
|
}
|
|
6497
6498
|
return e;
|
|
6498
6499
|
}
|
|
@@ -6504,27 +6505,27 @@ var $s = (e) => {
|
|
|
6504
6505
|
})(e);
|
|
6505
6506
|
},
|
|
6506
6507
|
properties: {
|
|
6507
|
-
family: { shorthand: (e, t) => e === Te.ThemeFamily.Heading || e === Te.ThemeFamily.Body ? e :
|
|
6508
|
+
family: { shorthand: (e, t) => e === Te.ThemeFamily.Heading || e === Te.ThemeFamily.Body ? e : yo(e)?.family ?? null },
|
|
6508
6509
|
fallbacks: { shorthand: (e, t) => {
|
|
6509
6510
|
if (typeof e != "string") return e;
|
|
6510
|
-
let n =
|
|
6511
|
+
let n = yo(e);
|
|
6511
6512
|
if (!n) return null;
|
|
6512
6513
|
let r = [n.family];
|
|
6513
6514
|
return n.fallbacks && (r = r.concat(n.fallbacks)), r;
|
|
6514
6515
|
} },
|
|
6515
6516
|
size: { shorthand: (e, t) => {
|
|
6516
6517
|
let r = e;
|
|
6517
|
-
return typeof e == "string" && (r =
|
|
6518
|
+
return typeof e == "string" && (r = fs(e, t.getNormal().getFont().getSize())), isNaN(r) || typeof r != "number" ? null : (r = Math.max(1, Math.min(n.roundAccurately(r, 1), 409)), r);
|
|
6518
6519
|
} },
|
|
6519
6520
|
weight: { shorthand: (e, t) => {
|
|
6520
6521
|
if (typeof e != "string") return e;
|
|
6521
|
-
let n =
|
|
6522
|
+
let n = $o(e);
|
|
6522
6523
|
return isNaN(n) || typeof n != "number" ? null : n;
|
|
6523
6524
|
} },
|
|
6524
6525
|
style: Y,
|
|
6525
|
-
color:
|
|
6526
|
+
color: tc,
|
|
6526
6527
|
letterSpacing: Y,
|
|
6527
|
-
underline: { shorthand: (e, t) => e ? !0 === e ? O.UnderlineStyle.Single :
|
|
6528
|
+
underline: { shorthand: (e, t) => e ? !0 === e ? O.UnderlineStyle.Single : Eo(e) : O.UnderlineStyle.None },
|
|
6528
6529
|
strike: { shorthand: (e, t) => !0 === e ? O.StrikeStyle.Single : !1 === e ? O.StrikeStyle.None : e },
|
|
6529
6530
|
baseline: Y,
|
|
6530
6531
|
shadow: Y,
|
|
@@ -6535,7 +6536,7 @@ var $s = (e) => {
|
|
|
6535
6536
|
return typeof n == "number" && Number.isFinite(n) ? n : null;
|
|
6536
6537
|
} }
|
|
6537
6538
|
}
|
|
6538
|
-
},
|
|
6539
|
+
}, oc = {
|
|
6539
6540
|
shorthand: (e, t) => e && typeof e == "object" ? ((e) => {
|
|
6540
6541
|
let { rotation: t, stacked: n } = e;
|
|
6541
6542
|
return t != null && n === void 0 ? {
|
|
@@ -6563,9 +6564,9 @@ var $s = (e) => {
|
|
|
6563
6564
|
justifyLastLine: Y,
|
|
6564
6565
|
readingDirection: Y
|
|
6565
6566
|
}
|
|
6566
|
-
},
|
|
6567
|
+
}, sc = { shorthand: (e, t) => e === "none" || e === "transparent" || typeof e == "object" && Object.keys(e).length === 0 ? { type: U.Type.None } : (e.getType?.(), U.Type.None, e) }, cc = {
|
|
6567
6568
|
shorthand: (e) => {
|
|
6568
|
-
let t =
|
|
6569
|
+
let t = ec(e);
|
|
6569
6570
|
return typeof t == "object" && t.color && (t.type = U.Type.Solid), t;
|
|
6570
6571
|
},
|
|
6571
6572
|
merge: (e, t) => {
|
|
@@ -6579,11 +6580,11 @@ var $s = (e) => {
|
|
|
6579
6580
|
} : n ? { ...n } : null);
|
|
6580
6581
|
},
|
|
6581
6582
|
properties: {
|
|
6582
|
-
color:
|
|
6583
|
+
color: tc,
|
|
6583
6584
|
type: Y,
|
|
6584
6585
|
isRotatedWithShape: Y
|
|
6585
6586
|
}
|
|
6586
|
-
},
|
|
6587
|
+
}, lc = {
|
|
6587
6588
|
shorthand: (e) => (typeof e == "object" && e.stops && (e.type = U.Type.Gradient), e),
|
|
6588
6589
|
merge: (e, t, n) => {
|
|
6589
6590
|
let r = e, i = t;
|
|
@@ -6613,12 +6614,12 @@ var $s = (e) => {
|
|
|
6613
6614
|
shorthand: (e) => (typeof e == "string" && (e = e.split(",").map((e) => e.trim())), Array.isArray(e) ? e.map((e, t) => {
|
|
6614
6615
|
if (!e) return;
|
|
6615
6616
|
let n = e;
|
|
6616
|
-
return typeof e == "string" && (n =
|
|
6617
|
+
return typeof e == "string" && (n = ec(e)), e.isIColor && (n = { color: e.toString() }), n;
|
|
6617
6618
|
}) : e),
|
|
6618
6619
|
arrayType: {
|
|
6619
|
-
shorthand: (e) =>
|
|
6620
|
+
shorthand: (e) => ec(e),
|
|
6620
6621
|
properties: {
|
|
6621
|
-
color:
|
|
6622
|
+
color: tc,
|
|
6622
6623
|
offset: Y
|
|
6623
6624
|
}
|
|
6624
6625
|
}
|
|
@@ -6631,7 +6632,7 @@ var $s = (e) => {
|
|
|
6631
6632
|
flip: Y,
|
|
6632
6633
|
isRotatedWithShape: Y
|
|
6633
6634
|
}
|
|
6634
|
-
},
|
|
6635
|
+
}, uc = {
|
|
6635
6636
|
shorthand: (e, t) => {
|
|
6636
6637
|
if (typeof e == "object") {
|
|
6637
6638
|
let t = e;
|
|
@@ -6672,11 +6673,11 @@ var $s = (e) => {
|
|
|
6672
6673
|
properties: {
|
|
6673
6674
|
type: Y,
|
|
6674
6675
|
patternType: Y,
|
|
6675
|
-
foreground:
|
|
6676
|
-
background:
|
|
6676
|
+
foreground: tc,
|
|
6677
|
+
background: tc,
|
|
6677
6678
|
isRotatedWithShape: Y
|
|
6678
6679
|
}
|
|
6679
|
-
},
|
|
6680
|
+
}, dc = { properties: {
|
|
6680
6681
|
type: Y,
|
|
6681
6682
|
resId: Y,
|
|
6682
6683
|
sourceRect: Y,
|
|
@@ -6687,40 +6688,40 @@ var $s = (e) => {
|
|
|
6687
6688
|
imageEffects: Y,
|
|
6688
6689
|
extLst: Y,
|
|
6689
6690
|
isRotatedWithShape: Y
|
|
6690
|
-
} },
|
|
6691
|
+
} }, fc = { properties: {
|
|
6691
6692
|
type: Y,
|
|
6692
6693
|
isRotatedWithShape: Y
|
|
6693
|
-
} },
|
|
6694
|
-
oc,
|
|
6694
|
+
} }, pc = [
|
|
6695
6695
|
sc,
|
|
6696
6696
|
cc,
|
|
6697
6697
|
lc,
|
|
6698
6698
|
uc,
|
|
6699
|
-
dc
|
|
6700
|
-
|
|
6701
|
-
|
|
6702
|
-
|
|
6703
|
-
t
|
|
6704
|
-
|
|
6705
|
-
|
|
6699
|
+
dc,
|
|
6700
|
+
fc
|
|
6701
|
+
], mc = [];
|
|
6702
|
+
for (let e = 0; e < pc.length; e++) {
|
|
6703
|
+
let t = pc[e]?.shorthand;
|
|
6704
|
+
t && mc.push(t);
|
|
6705
|
+
}
|
|
6706
|
+
var hc = mc.length, gc = {
|
|
6706
6707
|
shorthand: (e, t) => {
|
|
6707
6708
|
e.isIFill && (e = e.toJSON());
|
|
6708
|
-
for (let n = 0; n <
|
|
6709
|
-
let r =
|
|
6709
|
+
for (let n = 0; n < hc; n++) {
|
|
6710
|
+
let r = mc[n](e, t);
|
|
6710
6711
|
if (r?.type) return r;
|
|
6711
6712
|
}
|
|
6712
6713
|
return e;
|
|
6713
6714
|
},
|
|
6714
6715
|
getSubType: (e, t) => {
|
|
6715
6716
|
let n = e.type ?? t?.type;
|
|
6716
|
-
return n === U.Type.None ?
|
|
6717
|
-
}
|
|
6718
|
-
},
|
|
6719
|
-
font:
|
|
6720
|
-
fill:
|
|
6721
|
-
alignment:
|
|
6722
|
-
borders:
|
|
6723
|
-
numberFormat:
|
|
6717
|
+
return n === U.Type.None ? sc : n === U.Type.Solid ? cc : n === U.Type.Gradient ? lc : n === U.Type.Pattern ? uc : n === U.Type.Image ? dc : n === U.Type.Group ? fc : null;
|
|
6718
|
+
}
|
|
6719
|
+
}, _c = { properties: {
|
|
6720
|
+
font: ac,
|
|
6721
|
+
fill: gc,
|
|
6722
|
+
alignment: oc,
|
|
6723
|
+
borders: rc,
|
|
6724
|
+
numberFormat: ic,
|
|
6724
6725
|
quotePrefix: Y,
|
|
6725
6726
|
protection: { properties: {
|
|
6726
6727
|
alwaysUnlocked: Y,
|
|
@@ -6728,7 +6729,7 @@ var mc = pc.length, hc = {
|
|
|
6728
6729
|
} },
|
|
6729
6730
|
named: Y,
|
|
6730
6731
|
insets: Y
|
|
6731
|
-
} },
|
|
6732
|
+
} }, vc = Object.freeze([
|
|
6732
6733
|
"font",
|
|
6733
6734
|
"fill",
|
|
6734
6735
|
"alignment",
|
|
@@ -6737,13 +6738,13 @@ var mc = pc.length, hc = {
|
|
|
6737
6738
|
"quotePrefix",
|
|
6738
6739
|
"protection",
|
|
6739
6740
|
"insets"
|
|
6740
|
-
]),
|
|
6741
|
+
]), yc = {
|
|
6741
6742
|
shorthand: (e, t) => {
|
|
6742
6743
|
if (!e || typeof e != "object") return;
|
|
6743
6744
|
let n = e.named;
|
|
6744
6745
|
if (!n || (n.isINamed && (n = n.getName()), typeof n != "string")) return;
|
|
6745
6746
|
let r = null;
|
|
6746
|
-
if (n.toLowerCase() ===
|
|
6747
|
+
if (n.toLowerCase() === $a.BuiltInName.Normal.toLowerCase()) r = vc;
|
|
6747
6748
|
else {
|
|
6748
6749
|
let e = t?.getNamedStyles().getByName(n)?.getRanged().getPropertiesAt(0, 0, null);
|
|
6749
6750
|
e && (r = Object.keys(e));
|
|
@@ -6758,14 +6759,14 @@ var mc = pc.length, hc = {
|
|
|
6758
6759
|
}
|
|
6759
6760
|
return i;
|
|
6760
6761
|
},
|
|
6761
|
-
properties:
|
|
6762
|
-
},
|
|
6763
|
-
style:
|
|
6762
|
+
properties: _c.properties
|
|
6763
|
+
}, bc = { properties: {
|
|
6764
|
+
style: yc,
|
|
6764
6765
|
name: Y,
|
|
6765
6766
|
hidden: Y,
|
|
6766
6767
|
iLevel: Y,
|
|
6767
6768
|
customized: Y
|
|
6768
|
-
} },
|
|
6769
|
+
} }, xc = {
|
|
6769
6770
|
[U.BuiltInSheetPattern.Gray0625]: {
|
|
6770
6771
|
path: "M 0.5 0.5 L 0.5 1.5 M 0.5 4.5 L 0.5 5.5 M 4.5 2.5 L 4.5 3.5 M 4.5 6.5 L 4.5 7.5",
|
|
6771
6772
|
size: 8
|
|
@@ -6834,11 +6835,11 @@ var mc = pc.length, hc = {
|
|
|
6834
6835
|
path: "M 0.5 0.5 L 0.5 1.5 M 0.5 4.5 L 0.5 5.5 M 2.5 2.5 L 2.5 3.5 M 2.5 6.5 L 2.5 7.5 M 4.5 0.5 L 4.5 1.5 M 4.5 4.5 L 4.5 5.5 M 6.5 2.5 L 6.5 3.5 M 6.5 6.5 L 6.5 7.5",
|
|
6835
6836
|
size: 8
|
|
6836
6837
|
}
|
|
6837
|
-
},
|
|
6838
|
+
}, Sc = xc[U.BuiltInSheetPattern.Gray125], Cc = (e, t, n) => `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='${t}' height='${t}' viewBox='0 0 ${t} ${t}' shape-rendering='crispEdges' %3E%3Cpath d='${e}' stroke='${n}' %3E%3C/path%3E%3C/svg%3E")`, wc = new class {
|
|
6838
6839
|
_svgImage(e, t, n) {
|
|
6839
6840
|
let { path: r, size: i } = n;
|
|
6840
6841
|
return {
|
|
6841
|
-
backgroundImage:
|
|
6842
|
+
backgroundImage: Cc(r, i, e),
|
|
6842
6843
|
backgroundRepeat: "repeat",
|
|
6843
6844
|
backgroundSize: `${i}px ${i}px`,
|
|
6844
6845
|
backgroundPositionX: "0px",
|
|
@@ -6848,23 +6849,23 @@ var mc = pc.length, hc = {
|
|
|
6848
6849
|
};
|
|
6849
6850
|
}
|
|
6850
6851
|
toCSS(e, t, n) {
|
|
6851
|
-
return e && e !== U.BuiltInSheetPattern.None ? e === U.BuiltInSheetPattern.Solid ? { background: t } : this._svgImage(t, n,
|
|
6852
|
+
return e && e !== U.BuiltInSheetPattern.None ? e === U.BuiltInSheetPattern.Solid ? { background: t } : this._svgImage(t, n, xc[e] ?? Sc) : { background: "none" };
|
|
6852
6853
|
}
|
|
6853
6854
|
toCSSMask(e, t, n) {
|
|
6854
6855
|
if (!e || e === U.BuiltInSheetPattern.None || e === U.BuiltInSheetPattern.Solid) return null;
|
|
6855
|
-
let { path: r, size: i } =
|
|
6856
|
+
let { path: r, size: i } = xc[e] ?? Sc;
|
|
6856
6857
|
return {
|
|
6857
6858
|
base: { backgroundColor: n },
|
|
6858
6859
|
marks: {
|
|
6859
6860
|
backgroundColor: t,
|
|
6860
|
-
maskImage:
|
|
6861
|
+
maskImage: Cc(r, i, "black"),
|
|
6861
6862
|
maskRepeat: "repeat",
|
|
6862
6863
|
maskSize: `${i}px ${i}px`,
|
|
6863
6864
|
maskPosition: "0px 0px"
|
|
6864
6865
|
}
|
|
6865
6866
|
};
|
|
6866
6867
|
}
|
|
6867
|
-
}(),
|
|
6868
|
+
}(), Tc = class {
|
|
6868
6869
|
constructor(e, t) {
|
|
6869
6870
|
this._h = e, this._p = t;
|
|
6870
6871
|
}
|
|
@@ -6884,7 +6885,7 @@ var mc = pc.length, hc = {
|
|
|
6884
6885
|
get isIFill() {
|
|
6885
6886
|
return !0;
|
|
6886
6887
|
}
|
|
6887
|
-
},
|
|
6888
|
+
}, Ec = Object.freeze({ background: "none" }), Dc = class extends Tc {
|
|
6888
6889
|
getType() {
|
|
6889
6890
|
return U.Type.None;
|
|
6890
6891
|
}
|
|
@@ -6895,7 +6896,7 @@ var mc = pc.length, hc = {
|
|
|
6895
6896
|
return e === null ? this : this._update({ color: e }, s("op.setFillColor"), t);
|
|
6896
6897
|
}
|
|
6897
6898
|
toCSS(e) {
|
|
6898
|
-
return
|
|
6899
|
+
return Ec;
|
|
6899
6900
|
}
|
|
6900
6901
|
hasVisibleStyling() {
|
|
6901
6902
|
return !1;
|
|
@@ -6912,7 +6913,7 @@ var mc = pc.length, hc = {
|
|
|
6912
6913
|
toString() {
|
|
6913
6914
|
return "[NoneFill]";
|
|
6914
6915
|
}
|
|
6915
|
-
},
|
|
6916
|
+
}, Oc = class extends Tc {
|
|
6916
6917
|
getType() {
|
|
6917
6918
|
return U.Type.Solid;
|
|
6918
6919
|
}
|
|
@@ -6944,7 +6945,7 @@ var mc = pc.length, hc = {
|
|
|
6944
6945
|
toString() {
|
|
6945
6946
|
return "[SolidFill]";
|
|
6946
6947
|
}
|
|
6947
|
-
},
|
|
6948
|
+
}, kc = class extends Tc {
|
|
6948
6949
|
constructor(e, t, n, r) {
|
|
6949
6950
|
super(n, r), this._i = e, this._l = t;
|
|
6950
6951
|
}
|
|
@@ -6954,7 +6955,7 @@ var mc = pc.length, hc = {
|
|
|
6954
6955
|
getColor() {
|
|
6955
6956
|
return this._h.parseColor(this._value("color") ?? H.Scheme.Bg1);
|
|
6956
6957
|
}
|
|
6957
|
-
},
|
|
6958
|
+
}, Ac = class extends Tc {
|
|
6958
6959
|
getType() {
|
|
6959
6960
|
return U.Type.Gradient;
|
|
6960
6961
|
}
|
|
@@ -6963,7 +6964,7 @@ var mc = pc.length, hc = {
|
|
|
6963
6964
|
}
|
|
6964
6965
|
getColor() {
|
|
6965
6966
|
let e = this._stops(), t = e.length;
|
|
6966
|
-
return t === 0 ? null : new
|
|
6967
|
+
return t === 0 ? null : new kc(0, t, this._h, [e[0]]).getColor();
|
|
6967
6968
|
}
|
|
6968
6969
|
setColor(e, t) {
|
|
6969
6970
|
let n = this._stops(), r = n.length > 0 ? { ...n[0] } : {
|
|
@@ -6974,7 +6975,7 @@ var mc = pc.length, hc = {
|
|
|
6974
6975
|
}
|
|
6975
6976
|
getStops() {
|
|
6976
6977
|
let e = this._stops(), t = e.length, r = t === 0 ? n.EmptyArray : Array(t);
|
|
6977
|
-
for (let n = 0; n < t; n++) r[n] = new
|
|
6978
|
+
for (let n = 0; n < t; n++) r[n] = new kc(n, t, this._h, [e[n]]);
|
|
6978
6979
|
return r;
|
|
6979
6980
|
}
|
|
6980
6981
|
setStops(e, t) {
|
|
@@ -6999,7 +7000,7 @@ var mc = pc.length, hc = {
|
|
|
6999
7000
|
return this._update({ focus: e }, s("op.setFocus"), t);
|
|
7000
7001
|
}
|
|
7001
7002
|
toCSS(e, t) {
|
|
7002
|
-
let n =
|
|
7003
|
+
let n = _s(this, e, t);
|
|
7003
7004
|
return n ? { background: n } : null;
|
|
7004
7005
|
}
|
|
7005
7006
|
hasVisibleStyling() {
|
|
@@ -7026,7 +7027,7 @@ var mc = pc.length, hc = {
|
|
|
7026
7027
|
toString() {
|
|
7027
7028
|
return "[GradientFill]";
|
|
7028
7029
|
}
|
|
7029
|
-
},
|
|
7030
|
+
}, jc = class extends Tc {
|
|
7030
7031
|
getType() {
|
|
7031
7032
|
return U.Type.Pattern;
|
|
7032
7033
|
}
|
|
@@ -7062,10 +7063,10 @@ var mc = pc.length, hc = {
|
|
|
7062
7063
|
let n = e.toRGBA(t);
|
|
7063
7064
|
return n.alpha === 0 ? "none" : n.toString(!1);
|
|
7064
7065
|
};
|
|
7065
|
-
return
|
|
7066
|
+
return wc.toCSS(this.getPatternType(), n(this.getForeground()), n(this.getBackground()));
|
|
7066
7067
|
}
|
|
7067
7068
|
toCSSMask(e) {
|
|
7068
|
-
return
|
|
7069
|
+
return wc.toCSSMask(this.getPatternType(), this.getForeground().toCSS(e), this.getBackground().toCSS(e));
|
|
7069
7070
|
}
|
|
7070
7071
|
hasVisibleStyling() {
|
|
7071
7072
|
return !0;
|
|
@@ -7089,7 +7090,7 @@ var mc = pc.length, hc = {
|
|
|
7089
7090
|
toString() {
|
|
7090
7091
|
return "[PatternFill]";
|
|
7091
7092
|
}
|
|
7092
|
-
},
|
|
7093
|
+
}, Mc = [
|
|
7093
7094
|
"resId",
|
|
7094
7095
|
"sourceRect",
|
|
7095
7096
|
"stretch",
|
|
@@ -7098,7 +7099,7 @@ var mc = pc.length, hc = {
|
|
|
7098
7099
|
"compressionState",
|
|
7099
7100
|
"extLst",
|
|
7100
7101
|
"isRotatedWithShape"
|
|
7101
|
-
],
|
|
7102
|
+
], Nc = class extends Tc {
|
|
7102
7103
|
getType() {
|
|
7103
7104
|
return U.Type.Image;
|
|
7104
7105
|
}
|
|
@@ -7119,7 +7120,7 @@ var mc = pc.length, hc = {
|
|
|
7119
7120
|
return this._value("tile") !== void 0;
|
|
7120
7121
|
}
|
|
7121
7122
|
toCSS(e) {
|
|
7122
|
-
return
|
|
7123
|
+
return Ec;
|
|
7123
7124
|
}
|
|
7124
7125
|
hasVisibleStyling() {
|
|
7125
7126
|
return !0;
|
|
@@ -7127,12 +7128,12 @@ var mc = pc.length, hc = {
|
|
|
7127
7128
|
isEqual(e) {
|
|
7128
7129
|
if (!e || e.getType() !== U.Type.Image) return !1;
|
|
7129
7130
|
let t = e.toJSON(), n = this.toJSON();
|
|
7130
|
-
for (let e of
|
|
7131
|
+
for (let e of Mc) if (JSON.stringify(n[e]) !== JSON.stringify(t[e])) return !1;
|
|
7131
7132
|
return !0;
|
|
7132
7133
|
}
|
|
7133
7134
|
toJSON() {
|
|
7134
7135
|
let e = { type: U.Type.Image };
|
|
7135
|
-
for (let t of
|
|
7136
|
+
for (let t of Mc) {
|
|
7136
7137
|
let n = this._value(t);
|
|
7137
7138
|
n !== void 0 && (e[t] = n);
|
|
7138
7139
|
}
|
|
@@ -7145,7 +7146,7 @@ var mc = pc.length, hc = {
|
|
|
7145
7146
|
return "[ImageFill]";
|
|
7146
7147
|
}
|
|
7147
7148
|
};
|
|
7148
|
-
function
|
|
7149
|
+
function Pc(e, t) {
|
|
7149
7150
|
let n = t.filter((e) => !!e), r;
|
|
7150
7151
|
for (let e = n.length - 1; r === void 0 && e >= 0; e--) r = n[e].type;
|
|
7151
7152
|
if (r === void 0) {
|
|
@@ -7155,14 +7156,14 @@ function Nc(e, t) {
|
|
|
7155
7156
|
}
|
|
7156
7157
|
}
|
|
7157
7158
|
switch (r) {
|
|
7158
|
-
case U.Type.Solid: return new
|
|
7159
|
-
case U.Type.Gradient: return new
|
|
7160
|
-
case U.Type.Pattern: return new
|
|
7161
|
-
case U.Type.Image: return new
|
|
7162
|
-
default: return new
|
|
7159
|
+
case U.Type.Solid: return new Oc(e, n);
|
|
7160
|
+
case U.Type.Gradient: return new Ac(e, n);
|
|
7161
|
+
case U.Type.Pattern: return new jc(e, n);
|
|
7162
|
+
case U.Type.Image: return new Nc(e, n);
|
|
7163
|
+
default: return new Dc(e, n);
|
|
7163
7164
|
}
|
|
7164
7165
|
}
|
|
7165
|
-
var
|
|
7166
|
+
var Fc, Ic, Lc, Rc, zc = Object.freeze({
|
|
7166
7167
|
AccentBorderCallout1: "accentBorderCallout1",
|
|
7167
7168
|
AccentBorderCallout2: "accentBorderCallout2",
|
|
7168
7169
|
AccentBorderCallout3: "accentBorderCallout3",
|
|
@@ -7351,28 +7352,28 @@ var Pc, Fc, Ic, Lc, Rc = Object.freeze({
|
|
|
7351
7352
|
WedgeRectCallout: "wedgeRectCallout",
|
|
7352
7353
|
WedgeRoundRectCallout: "wedgeRoundRectCallout"
|
|
7353
7354
|
});
|
|
7354
|
-
(
|
|
7355
|
+
(Ic = Fc ||= {}).Preset = zc, Ic.PathLayer = {
|
|
7355
7356
|
Fill: "fill",
|
|
7356
7357
|
Stroke: "stroke",
|
|
7357
7358
|
Marker: "marker"
|
|
7358
|
-
},
|
|
7359
|
+
}, Ic.FillTransfer = Object.freeze({
|
|
7359
7360
|
norm: [1, 0],
|
|
7360
7361
|
darken: [.6, 0],
|
|
7361
7362
|
darkenLess: [.8, 0],
|
|
7362
7363
|
lighten: [.6, .4],
|
|
7363
7364
|
lightenLess: [.8, .2]
|
|
7364
|
-
}),
|
|
7365
|
+
}), Ic.HandleType = {
|
|
7365
7366
|
XY: "xy",
|
|
7366
7367
|
Polar: "polar"
|
|
7367
|
-
}, (
|
|
7368
|
+
}, (Rc = Lc ||= {}).Type = {
|
|
7368
7369
|
Shape: "shape",
|
|
7369
7370
|
Connector: "connector"
|
|
7370
|
-
},
|
|
7371
|
+
}, Rc.ConnectorType = {
|
|
7371
7372
|
Straight: "straight",
|
|
7372
7373
|
Elbow: "elbow",
|
|
7373
7374
|
Curved: "curved"
|
|
7374
7375
|
};
|
|
7375
|
-
var
|
|
7376
|
+
var Bc = 96 / 72, Vc = {
|
|
7376
7377
|
head: [
|
|
7377
7378
|
"headType",
|
|
7378
7379
|
"headWidth",
|
|
@@ -7383,8 +7384,8 @@ var zc = 96 / 72, Bc = {
|
|
|
7383
7384
|
"tailWidth",
|
|
7384
7385
|
"tailLength"
|
|
7385
7386
|
]
|
|
7386
|
-
},
|
|
7387
|
-
let [n, r, i] =
|
|
7387
|
+
}, Hc = (e, t) => {
|
|
7388
|
+
let [n, r, i] = Vc[e];
|
|
7388
7389
|
if (t === null) return {
|
|
7389
7390
|
[n]: null,
|
|
7390
7391
|
[r]: null,
|
|
@@ -7396,7 +7397,7 @@ var zc = 96 / 72, Bc = {
|
|
|
7396
7397
|
[r]: a.width ?? null,
|
|
7397
7398
|
[i]: a.length ?? null
|
|
7398
7399
|
};
|
|
7399
|
-
},
|
|
7400
|
+
}, Uc = class e {
|
|
7400
7401
|
constructor(e, t) {
|
|
7401
7402
|
this._fill = null, this._h = e, this._p = t.filter((e) => !!e);
|
|
7402
7403
|
}
|
|
@@ -7421,7 +7422,7 @@ var zc = 96 / 72, Bc = {
|
|
|
7421
7422
|
getResource: (t) => e.getResource?.(t) ?? null,
|
|
7422
7423
|
updateFill: (t, n) => e.updateStroke({ fill: t }, n).getFill()
|
|
7423
7424
|
}, n = this._p.map((e) => e.fill);
|
|
7424
|
-
return this._fill =
|
|
7425
|
+
return this._fill = Pc(t, n);
|
|
7425
7426
|
}
|
|
7426
7427
|
setFill(e, t) {
|
|
7427
7428
|
return this._update({ fill: e }, s("op.setStrokeColor"), t);
|
|
@@ -7456,7 +7457,7 @@ var zc = 96 / 72, Bc = {
|
|
|
7456
7457
|
return typeof e == "number" ? e : 10;
|
|
7457
7458
|
}
|
|
7458
7459
|
_end(e) {
|
|
7459
|
-
let [t, n, r] =
|
|
7460
|
+
let [t, n, r] = Vc[e], i = { type: this._value(t) ?? W.LineEndType.None }, a = this._value(n);
|
|
7460
7461
|
a !== void 0 && (i.width = a);
|
|
7461
7462
|
let o = this._value(r);
|
|
7462
7463
|
return o !== void 0 && (i.length = o), i;
|
|
@@ -7465,13 +7466,13 @@ var zc = 96 / 72, Bc = {
|
|
|
7465
7466
|
return this._end("head");
|
|
7466
7467
|
}
|
|
7467
7468
|
setHead(e, t) {
|
|
7468
|
-
return this._update(
|
|
7469
|
+
return this._update(Hc("head", e), s("op.setLineEnds"), t);
|
|
7469
7470
|
}
|
|
7470
7471
|
getTail() {
|
|
7471
7472
|
return this._end("tail");
|
|
7472
7473
|
}
|
|
7473
7474
|
setTail(e, t) {
|
|
7474
|
-
return this._update(
|
|
7475
|
+
return this._update(Hc("tail", e), s("op.setLineEnds"), t);
|
|
7475
7476
|
}
|
|
7476
7477
|
getCompound() {
|
|
7477
7478
|
return this._value("compound") ?? W.Compound.Single;
|
|
@@ -7495,7 +7496,7 @@ var zc = 96 / 72, Bc = {
|
|
|
7495
7496
|
if (!this.isVisible()) return { border: "none" };
|
|
7496
7497
|
let n = this.getFill().getColor(), r = this.getDash();
|
|
7497
7498
|
return {
|
|
7498
|
-
borderWidth: this.getWidth() *
|
|
7499
|
+
borderWidth: this.getWidth() * Bc + "px",
|
|
7499
7500
|
borderStyle: r === W.DashStyle.Solid ? "solid" : r === W.DashStyle.Dot || r === W.DashStyle.SysDot ? "dotted" : "dashed",
|
|
7500
7501
|
borderColor: n ? n.toCSS(e) : "currentColor"
|
|
7501
7502
|
};
|
|
@@ -7519,17 +7520,17 @@ var zc = 96 / 72, Bc = {
|
|
|
7519
7520
|
if (typeof e == "string") return { fill: e };
|
|
7520
7521
|
if (e.isIStroke) return e.toJSON();
|
|
7521
7522
|
let { head: t, tail: n, ...r } = e, i = { ...r };
|
|
7522
|
-
return t !== void 0 && Object.assign(i,
|
|
7523
|
-
}
|
|
7524
|
-
},
|
|
7525
|
-
TEXT_DEFAULTS: () =>
|
|
7526
|
-
defaultStyleRefs: () =>
|
|
7527
|
-
inheritedGroupFill: () =>
|
|
7528
|
-
inheritedTextSize: () =>
|
|
7529
|
-
resolve: () =>
|
|
7530
|
-
withThemeDefaults: () =>
|
|
7531
|
-
withoutDefaultStyleRefs: () =>
|
|
7532
|
-
}),
|
|
7523
|
+
return t !== void 0 && Object.assign(i, Hc("head", t)), n !== void 0 && Object.assign(i, Hc("tail", n)), i;
|
|
7524
|
+
}
|
|
7525
|
+
}, Wc = e({
|
|
7526
|
+
TEXT_DEFAULTS: () => Qc,
|
|
7527
|
+
defaultStyleRefs: () => Yc,
|
|
7528
|
+
inheritedGroupFill: () => il,
|
|
7529
|
+
inheritedTextSize: () => $c,
|
|
7530
|
+
resolve: () => al,
|
|
7531
|
+
withThemeDefaults: () => Xc,
|
|
7532
|
+
withoutDefaultStyleRefs: () => Zc
|
|
7533
|
+
}), Gc = Object.freeze({
|
|
7533
7534
|
fill: {
|
|
7534
7535
|
index: 1,
|
|
7535
7536
|
color: "accent1"
|
|
@@ -7546,7 +7547,7 @@ var zc = 96 / 72, Bc = {
|
|
|
7546
7547
|
index: O.Scheme.Minor,
|
|
7547
7548
|
color: "lt1"
|
|
7548
7549
|
}
|
|
7549
|
-
}),
|
|
7550
|
+
}), Kc = Object.freeze({
|
|
7550
7551
|
fill: {
|
|
7551
7552
|
index: 0,
|
|
7552
7553
|
color: "accent1"
|
|
@@ -7563,7 +7564,7 @@ var zc = 96 / 72, Bc = {
|
|
|
7563
7564
|
index: O.Scheme.Minor,
|
|
7564
7565
|
color: "tx1"
|
|
7565
7566
|
}
|
|
7566
|
-
}),
|
|
7567
|
+
}), qc = Object.freeze({
|
|
7567
7568
|
fill: { index: 0 },
|
|
7568
7569
|
stroke: { index: 0 },
|
|
7569
7570
|
effect: { index: 0 },
|
|
@@ -7571,7 +7572,7 @@ var zc = 96 / 72, Bc = {
|
|
|
7571
7572
|
index: O.Scheme.Minor,
|
|
7572
7573
|
color: "dk1"
|
|
7573
7574
|
}
|
|
7574
|
-
}),
|
|
7575
|
+
}), Jc = Object.freeze({
|
|
7575
7576
|
fill: {
|
|
7576
7577
|
type: U.Type.Solid,
|
|
7577
7578
|
color: "lt1"
|
|
@@ -7584,11 +7585,11 @@ var zc = 96 / 72, Bc = {
|
|
|
7584
7585
|
}
|
|
7585
7586
|
}
|
|
7586
7587
|
});
|
|
7587
|
-
function
|
|
7588
|
-
return e?.type ===
|
|
7588
|
+
function Yc(e) {
|
|
7589
|
+
return e?.type === Lc.Type.Connector ? Kc : e?.textBox ? qc : Gc;
|
|
7589
7590
|
}
|
|
7590
|
-
function
|
|
7591
|
-
let n = t.getObjectDefaults(), r = e.type ===
|
|
7591
|
+
function Xc(e, t) {
|
|
7592
|
+
let n = t.getObjectDefaults(), r = e.type === Lc.Type.Connector, i = (r ? n.line : e.textBox ? n.text : n.shape) ?? (e.textBox ? Jc : null);
|
|
7592
7593
|
if (!i) return e;
|
|
7593
7594
|
let { type: a, geometry: o, textBox: s, ...c } = i;
|
|
7594
7595
|
r && delete c.text;
|
|
@@ -7609,13 +7610,13 @@ function Yc(e, t) {
|
|
|
7609
7610
|
...c.text.body,
|
|
7610
7611
|
...e.text.body
|
|
7611
7612
|
}));
|
|
7612
|
-
let u =
|
|
7613
|
+
let u = Zc(l);
|
|
7613
7614
|
return u === void 0 ? delete l.style : l.style = u, l;
|
|
7614
7615
|
}
|
|
7615
|
-
function
|
|
7616
|
+
function Zc(e) {
|
|
7616
7617
|
let t = e.style;
|
|
7617
7618
|
if (!t) return t;
|
|
7618
|
-
let n =
|
|
7619
|
+
let n = Yc(e), r = {};
|
|
7619
7620
|
for (let e of [
|
|
7620
7621
|
"fill",
|
|
7621
7622
|
"stroke",
|
|
@@ -7627,35 +7628,35 @@ function Xc(e) {
|
|
|
7627
7628
|
}
|
|
7628
7629
|
return Object.keys(r).length > 0 ? r : void 0;
|
|
7629
7630
|
}
|
|
7630
|
-
var
|
|
7631
|
+
var Qc = Object.freeze({
|
|
7631
7632
|
verticalOverflow: c.Overflow.Clip,
|
|
7632
7633
|
horizontalOverflow: c.Overflow.Clip,
|
|
7633
7634
|
size: 11
|
|
7634
7635
|
});
|
|
7635
|
-
function
|
|
7636
|
+
function $c(e, t) {
|
|
7636
7637
|
let n = e.listStyle;
|
|
7637
7638
|
return t.defaultRun?.size ?? n?.levels?.[t.level ?? 0]?.defaultRun?.size ?? n?.default?.defaultRun?.size;
|
|
7638
7639
|
}
|
|
7639
|
-
var
|
|
7640
|
+
var el = (e, t) => typeof e == "string" && e.startsWith("phClr") ? (t ?? "tx1") + e.slice(5) : e, tl = (e, t) => {
|
|
7640
7641
|
let n = { ...e };
|
|
7641
|
-
return "color" in n && (n.color =
|
|
7642
|
+
return "color" in n && (n.color = el(n.color, t)), "foreground" in n && (n.foreground = el(n.foreground, t)), "background" in n && (n.background = el(n.background, t)), Array.isArray(n.stops) && (n.stops = n.stops.map((e) => typeof e == "string" ? el(e, t) : {
|
|
7642
7643
|
...e,
|
|
7643
|
-
color:
|
|
7644
|
+
color: el(e.color, t)
|
|
7644
7645
|
})), n;
|
|
7645
|
-
},
|
|
7646
|
+
}, nl = (e, t) => {
|
|
7646
7647
|
if (!e) return;
|
|
7647
7648
|
if (e.index <= 0) return { type: U.Type.None };
|
|
7648
|
-
let n = t?.fillStyleLst?.length ? t.fillStyleLst :
|
|
7649
|
-
return r ?
|
|
7650
|
-
},
|
|
7649
|
+
let n = t?.fillStyleLst?.length ? t.fillStyleLst : po.fillStyleLst, r = n[Math.min(e.index, n.length) - 1];
|
|
7650
|
+
return r ? tl(r, e.color) : void 0;
|
|
7651
|
+
}, rl = (e, t) => {
|
|
7651
7652
|
if (!e) return;
|
|
7652
7653
|
if (e.index <= 0) return { fill: { type: U.Type.None } };
|
|
7653
|
-
let n = t?.lnStyleLst?.length ? t.lnStyleLst :
|
|
7654
|
+
let n = t?.lnStyleLst?.length ? t.lnStyleLst : po.lnStyleLst, r = n[Math.min(e.index, n.length) - 1];
|
|
7654
7655
|
if (!r) return;
|
|
7655
7656
|
let i = { ...r };
|
|
7656
|
-
return i.fill &&=
|
|
7657
|
+
return i.fill &&= tl(i.fill, e.color), i;
|
|
7657
7658
|
};
|
|
7658
|
-
function
|
|
7659
|
+
function il(e) {
|
|
7659
7660
|
let t = e?.getParent() ?? null;
|
|
7660
7661
|
for (; t;) {
|
|
7661
7662
|
let e = t.getContent().getFill?.() ?? null;
|
|
@@ -7664,11 +7665,11 @@ function rl(e) {
|
|
|
7664
7665
|
}
|
|
7665
7666
|
return null;
|
|
7666
7667
|
}
|
|
7667
|
-
function
|
|
7668
|
+
function al(e, t, n) {
|
|
7668
7669
|
let r = e?.style === null ? {} : {
|
|
7669
|
-
...
|
|
7670
|
+
...Yc(e),
|
|
7670
7671
|
...e?.style
|
|
7671
|
-
}, i = (e?.fill?.type === U.Type.Group ? n ?? void 0 : e?.fill) ??
|
|
7672
|
+
}, i = (e?.fill?.type === U.Type.Group ? n ?? void 0 : e?.fill) ?? nl(r.fill, t), a = rl(r.stroke, t), o = e?.stroke, s = o || a ? {
|
|
7672
7673
|
...a,
|
|
7673
7674
|
...o,
|
|
7674
7675
|
fill: o?.fill ?? a?.fill
|
|
@@ -7680,8 +7681,8 @@ function il(e, t, n) {
|
|
|
7680
7681
|
fontColor: r.font?.color ?? (i && i.type !== U.Type.None ? "lt1" : "tx1")
|
|
7681
7682
|
};
|
|
7682
7683
|
}
|
|
7683
|
-
var
|
|
7684
|
-
[() => import("./
|
|
7684
|
+
var ol, sl = [
|
|
7685
|
+
[() => import("./JmmPE8Vsj85wdV8H.mjs"), [
|
|
7685
7686
|
"bentConnector2",
|
|
7686
7687
|
"bentConnector3",
|
|
7687
7688
|
"bentConnector4",
|
|
@@ -7694,7 +7695,7 @@ var al, ol = [
|
|
|
7694
7695
|
"lineInv",
|
|
7695
7696
|
"straightConnector1"
|
|
7696
7697
|
]],
|
|
7697
|
-
[() => import("./
|
|
7698
|
+
[() => import("./DGUOlgm1_WFmf_xO.mjs"), [
|
|
7698
7699
|
"rect",
|
|
7699
7700
|
"round1Rect",
|
|
7700
7701
|
"round2DiagRect",
|
|
@@ -7705,7 +7706,7 @@ var al, ol = [
|
|
|
7705
7706
|
"snip2SameRect",
|
|
7706
7707
|
"snipRoundRect"
|
|
7707
7708
|
]],
|
|
7708
|
-
[() => import("./
|
|
7709
|
+
[() => import("./CHByUyHFA3ESf7DX.mjs"), [
|
|
7709
7710
|
"mathDivide",
|
|
7710
7711
|
"mathEqual",
|
|
7711
7712
|
"mathMinus",
|
|
@@ -7713,9 +7714,9 @@ var al, ol = [
|
|
|
7713
7714
|
"mathNotEqual",
|
|
7714
7715
|
"mathPlus"
|
|
7715
7716
|
]],
|
|
7716
|
-
[() => import("./
|
|
7717
|
-
[() => import("./
|
|
7718
|
-
[() => import("./
|
|
7717
|
+
[() => import("./qNv1x-Ny9TPbvZzj.mjs"), /* @__PURE__ */ "flowChartAlternateProcess.flowChartCollate.flowChartConnector.flowChartDecision.flowChartDelay.flowChartDisplay.flowChartDocument.flowChartExtract.flowChartInputOutput.flowChartInternalStorage.flowChartMagneticDisk.flowChartMagneticDrum.flowChartMagneticTape.flowChartManualInput.flowChartManualOperation.flowChartMerge.flowChartMultidocument.flowChartOfflineStorage.flowChartOffpageConnector.flowChartOnlineStorage.flowChartOr.flowChartPredefinedProcess.flowChartPreparation.flowChartProcess.flowChartPunchedCard.flowChartPunchedTape.flowChartSort.flowChartSummingJunction.flowChartTerminator".split(".")],
|
|
7718
|
+
[() => import("./BuKA3E-Ev8Dp5W2I.mjs"), /* @__PURE__ */ "bentArrow.bentUpArrow.chevron.circularArrow.curvedDownArrow.curvedLeftArrow.curvedRightArrow.curvedUpArrow.downArrow.downArrowCallout.homePlate.leftArrow.leftArrowCallout.leftCircularArrow.leftRightArrow.leftRightArrowCallout.leftRightCircularArrow.leftRightUpArrow.leftUpArrow.notchedRightArrow.quadArrow.quadArrowCallout.rightArrow.rightArrowCallout.stripedRightArrow.swooshArrow.upArrow.upArrowCallout.upDownArrow.upDownArrowCallout.uturnArrow".split(".")],
|
|
7719
|
+
[() => import("./jotvQFBWO2jXAhWx.mjs"), [
|
|
7719
7720
|
"accentBorderCallout1",
|
|
7720
7721
|
"accentBorderCallout2",
|
|
7721
7722
|
"accentBorderCallout3",
|
|
@@ -7733,7 +7734,7 @@ var al, ol = [
|
|
|
7733
7734
|
"wedgeRectCallout",
|
|
7734
7735
|
"wedgeRoundRectCallout"
|
|
7735
7736
|
]],
|
|
7736
|
-
[() => import("./
|
|
7737
|
+
[() => import("./DW3kFc5t4Wnh5E9S.mjs"), [
|
|
7737
7738
|
"doubleWave",
|
|
7738
7739
|
"ellipseRibbon",
|
|
7739
7740
|
"ellipseRibbon2",
|
|
@@ -7756,7 +7757,7 @@ var al, ol = [
|
|
|
7756
7757
|
"verticalScroll",
|
|
7757
7758
|
"wave"
|
|
7758
7759
|
]],
|
|
7759
|
-
[() => import("./
|
|
7760
|
+
[() => import("./Dx_dZ7jrw5Hxeoot.mjs"), [
|
|
7760
7761
|
"actionButtonBackPrevious",
|
|
7761
7762
|
"actionButtonBeginning",
|
|
7762
7763
|
"actionButtonBlank",
|
|
@@ -7776,8 +7777,8 @@ var al, ol = [
|
|
|
7776
7777
|
"plaqueTabs",
|
|
7777
7778
|
"squareTabs"
|
|
7778
7779
|
]],
|
|
7779
|
-
[() => import("./
|
|
7780
|
-
],
|
|
7780
|
+
[() => import("./BWNQcQyx8wt6huOq.mjs"), /* @__PURE__ */ "arc.bevel.blockArc.bracePair.bracketPair.can.chord.cloud.corner.cube.decagon.diagStripe.diamond.dodecagon.donut.ellipse.foldedCorner.frame.funnel.gear6.gear9.halfFrame.heart.heptagon.hexagon.leftBrace.leftBracket.lightningBolt.moon.noSmoking.nonIsoscelesTrapezoid.octagon.parallelogram.pentagon.pie.pieWedge.plaque.plus.rightBrace.rightBracket.rtTriangle.smileyFace.sun.teardrop.trapezoid.triangle".split(".")]
|
|
7781
|
+
], cl = (e) => {
|
|
7781
7782
|
let t = null;
|
|
7782
7783
|
return () => {
|
|
7783
7784
|
if (!t) {
|
|
@@ -7788,7 +7789,7 @@ var al, ol = [
|
|
|
7788
7789
|
}
|
|
7789
7790
|
return t;
|
|
7790
7791
|
};
|
|
7791
|
-
},
|
|
7792
|
+
}, ll = cl(() => import("./DDNerAeet8uDYKhf.mjs")), ul = cl(() => import("./DCs7bk-yx0UhCvQ4.mjs")), dl = null, fl = (e) => {
|
|
7792
7793
|
let t = /* @__PURE__ */ new Map();
|
|
7793
7794
|
for (let [n, r] of Object.entries(e.BUILT_IN)) {
|
|
7794
7795
|
let { cxn: i } = r;
|
|
@@ -7801,36 +7802,36 @@ var al, ol = [
|
|
|
7801
7802
|
});
|
|
7802
7803
|
}
|
|
7803
7804
|
return t;
|
|
7804
|
-
},
|
|
7805
|
-
if (
|
|
7806
|
-
|
|
7807
|
-
for (let [e, t] of
|
|
7808
|
-
let n =
|
|
7809
|
-
for (let e of t)
|
|
7810
|
-
}
|
|
7811
|
-
return
|
|
7812
|
-
},
|
|
7813
|
-
let t =
|
|
7805
|
+
}, pl = () => {
|
|
7806
|
+
if (dl) return dl;
|
|
7807
|
+
dl = /* @__PURE__ */ new Map();
|
|
7808
|
+
for (let [e, t] of sl) {
|
|
7809
|
+
let n = cl(() => e().then(fl));
|
|
7810
|
+
for (let e of t) dl.set(e, n);
|
|
7811
|
+
}
|
|
7812
|
+
return dl;
|
|
7813
|
+
}, ml = async (e) => {
|
|
7814
|
+
let t = pl().get(e);
|
|
7814
7815
|
if (t) return (await t()).get(e);
|
|
7815
|
-
},
|
|
7816
|
+
}, hl = 96 / 72, gl = (e) => t(e, 2), _l = (e, t, n) => {
|
|
7816
7817
|
if (!e || e === W.LineEndType.None) return;
|
|
7817
7818
|
let r = { type: e };
|
|
7818
7819
|
return t && (r.width = t), n && (r.length = n), r;
|
|
7819
|
-
},
|
|
7820
|
+
}, vl = (e) => {
|
|
7820
7821
|
let t = e.stroke;
|
|
7821
|
-
return t?.fill && t.fill.type !== U.Type.None ?
|
|
7822
|
-
},
|
|
7822
|
+
return t?.fill && t.fill.type !== U.Type.None ? yl(e) / 2 * Math.SQRT2 : 0;
|
|
7823
|
+
}, yl = (e) => Math.max(Math.max(0, e.strokeWidth) * hl, 1), bl = (e, t) => ({
|
|
7823
7824
|
r: e,
|
|
7824
7825
|
b: t,
|
|
7825
7826
|
hc: e / 2,
|
|
7826
7827
|
vc: t / 2
|
|
7827
|
-
}),
|
|
7828
|
+
}), xl = (e, t, n) => ({ ...n }), Sl = {
|
|
7828
7829
|
pad: 0,
|
|
7829
7830
|
evaluate(e, t) {
|
|
7830
|
-
let { r: n, b: r, hc: i, vc: a } =
|
|
7831
|
+
let { r: n, b: r, hc: i, vc: a } = bl(e, t);
|
|
7831
7832
|
return {
|
|
7832
7833
|
paths: [{
|
|
7833
|
-
d: `M0 0 L${
|
|
7834
|
+
d: `M0 0 L${gl(n)} 0 L${gl(n)} ${gl(r)} L0 ${gl(r)} Z`,
|
|
7834
7835
|
fill: "norm",
|
|
7835
7836
|
stroke: !0
|
|
7836
7837
|
}],
|
|
@@ -7872,34 +7873,34 @@ var al, ol = [
|
|
|
7872
7873
|
adjustments: {}
|
|
7873
7874
|
};
|
|
7874
7875
|
},
|
|
7875
|
-
adjustmentsFromHandle:
|
|
7876
|
-
},
|
|
7876
|
+
adjustmentsFromHandle: xl
|
|
7877
|
+
}, Cl = (e, t, n) => {
|
|
7877
7878
|
let r = n ? { line: n } : void 0;
|
|
7878
7879
|
return {
|
|
7879
7880
|
pad: 0,
|
|
7880
7881
|
evaluate: (n, i, a) => e.evaluateGeometry(t, n, i, a, r),
|
|
7881
7882
|
adjustmentsFromHandle: (n, r, i, a, o, s) => e.adjustmentsFromHandle(t, n, r, i, a, o, s)
|
|
7882
7883
|
};
|
|
7883
|
-
},
|
|
7884
|
-
let n =
|
|
7884
|
+
}, wl = async (e, t) => {
|
|
7885
|
+
let n = al(e, t), r = await Tl(e, ((e) => {
|
|
7885
7886
|
let t = e.stroke;
|
|
7886
7887
|
if (!t?.fill || t.fill.type === U.Type.None) return;
|
|
7887
|
-
let n =
|
|
7888
|
+
let n = _l(t.headType, t.headWidth, t.headLength), r = _l(t.tailType, t.tailWidth, t.tailLength);
|
|
7888
7889
|
if (!n && !r) return;
|
|
7889
|
-
let i = { width:
|
|
7890
|
+
let i = { width: yl(e) };
|
|
7890
7891
|
return t.lineCap && (i.cap = t.lineCap), n && (i.head = n), r && (i.tail = r), i;
|
|
7891
7892
|
})(n));
|
|
7892
7893
|
return r ? {
|
|
7893
7894
|
...r,
|
|
7894
|
-
pad:
|
|
7895
|
+
pad: vl(n)
|
|
7895
7896
|
} : null;
|
|
7896
|
-
},
|
|
7897
|
+
}, Tl = async (e, t) => {
|
|
7897
7898
|
let n = e.geometry ?? "rect";
|
|
7898
|
-
if (n === "rect") return
|
|
7899
|
+
if (n === "rect") return Sl;
|
|
7899
7900
|
if (n === "line" || n === "straightConnector1") return ((e, t, n) => ({
|
|
7900
7901
|
pad: 0,
|
|
7901
7902
|
evaluate(r, i) {
|
|
7902
|
-
let { r: a, b: o } =
|
|
7903
|
+
let { r: a, b: o } = bl(r, i), s = `M0 0 L${gl(a)} ${gl(o)}`, c = e === "line", l = [], u = {
|
|
7903
7904
|
x: 0,
|
|
7904
7905
|
y: 0,
|
|
7905
7906
|
segments: [{
|
|
@@ -7954,14 +7955,14 @@ var al, ol = [
|
|
|
7954
7955
|
adjustments: {}
|
|
7955
7956
|
};
|
|
7956
7957
|
},
|
|
7957
|
-
adjustmentsFromHandle:
|
|
7958
|
-
}))(n, t, t ? await
|
|
7959
|
-
if (typeof n == "object") return
|
|
7960
|
-
if (r = n, !
|
|
7958
|
+
adjustmentsFromHandle: xl
|
|
7959
|
+
}))(n, t, t ? await ul() : null);
|
|
7960
|
+
if (typeof n == "object") return Cl(await ll(), n, t);
|
|
7961
|
+
if (r = n, !pl().has(r)) return null;
|
|
7961
7962
|
var r;
|
|
7962
|
-
let [i, a] = await Promise.all([
|
|
7963
|
-
return a ?
|
|
7964
|
-
},
|
|
7963
|
+
let [i, a] = await Promise.all([ll(), ml(n)]);
|
|
7964
|
+
return a ? Cl(i, a, t) : null;
|
|
7965
|
+
}, El = class e {
|
|
7965
7966
|
constructor(e, t, n, r) {
|
|
7966
7967
|
this._evaluator = e, this._width = t, this._height = n, this._adjustments = r, this._evaluated = e.evaluate(t, n, r);
|
|
7967
7968
|
}
|
|
@@ -7996,9 +7997,9 @@ var al, ol = [
|
|
|
7996
7997
|
fill: i
|
|
7997
7998
|
});
|
|
7998
7999
|
};
|
|
7999
|
-
for (let t of e.paths) t.d !== "" && t.fill !== "none" && t.fill !== "line" && r(t.d,
|
|
8000
|
-
for (let t of e.paths) t.d !== "" && t.stroke && r(t.d,
|
|
8001
|
-
for (let t of e.paths) t.d !== "" && t.fill === "line" && r(t.d,
|
|
8000
|
+
for (let t of e.paths) t.d !== "" && t.fill !== "none" && t.fill !== "line" && r(t.d, Fc.PathLayer.Fill, t.fill);
|
|
8001
|
+
for (let t of e.paths) t.d !== "" && t.stroke && r(t.d, Fc.PathLayer.Stroke, "norm");
|
|
8002
|
+
for (let t of e.paths) t.d !== "" && t.fill === "line" && r(t.d, Fc.PathLayer.Marker, "norm");
|
|
8002
8003
|
})(this._evaluated, e, () => t++);
|
|
8003
8004
|
}
|
|
8004
8005
|
forEachHandle(e) {
|
|
@@ -8024,15 +8025,15 @@ var al, ol = [
|
|
|
8024
8025
|
adjustmentsFromHandle(e, t, n) {
|
|
8025
8026
|
return this._evaluator.adjustmentsFromHandle(this._width, this._height, this._adjustments, e, t, n);
|
|
8026
8027
|
}
|
|
8027
|
-
},
|
|
8028
|
-
let i = await
|
|
8029
|
-
return i ? new
|
|
8030
|
-
}, X = i.PassThrough,
|
|
8031
|
-
fill:
|
|
8028
|
+
}, Dl = (e) => e instanceof El ? e._getDrawnRect() : e.getPathBounds(), Ol = async (e, t, n, r) => {
|
|
8029
|
+
let i = await wl(e, t);
|
|
8030
|
+
return i ? new El(i, n, r, e.adjustments) : null;
|
|
8031
|
+
}, X = i.PassThrough, kl = { properties: {
|
|
8032
|
+
fill: gc,
|
|
8032
8033
|
stroke: {
|
|
8033
8034
|
shorthand: (e) => typeof e == "string" ? { fill: e } : e?.isIStroke ? e.toJSON() : e,
|
|
8034
8035
|
properties: {
|
|
8035
|
-
fill:
|
|
8036
|
+
fill: gc,
|
|
8036
8037
|
width: X,
|
|
8037
8038
|
lineJoin: X,
|
|
8038
8039
|
lineCap: X,
|
|
@@ -8048,16 +8049,16 @@ var al, ol = [
|
|
|
8048
8049
|
align: X
|
|
8049
8050
|
}
|
|
8050
8051
|
}
|
|
8051
|
-
} },
|
|
8052
|
+
} }, Al = class {
|
|
8052
8053
|
constructor(e) {
|
|
8053
8054
|
this._h = e;
|
|
8054
8055
|
}
|
|
8055
8056
|
_parseColor(e) {
|
|
8056
8057
|
let t = this._h.getStyles();
|
|
8057
|
-
return t ? t.parseColor(e) : new
|
|
8058
|
+
return t ? t.parseColor(e) : new so(e);
|
|
8058
8059
|
}
|
|
8059
8060
|
_resolve(e) {
|
|
8060
|
-
return this._h.resolve ? this._h.resolve(e) :
|
|
8061
|
+
return this._h.resolve ? this._h.resolve(e) : al(e, this._h.getTheme(), il(this._h.getMovable()));
|
|
8061
8062
|
}
|
|
8062
8063
|
_describe(e, t) {
|
|
8063
8064
|
return this._h.describe?.(e) ?? t;
|
|
@@ -8071,7 +8072,7 @@ var al, ol = [
|
|
|
8071
8072
|
_fillHost() {
|
|
8072
8073
|
return {
|
|
8073
8074
|
parseColor: (e) => this._parseColor(e),
|
|
8074
|
-
getBaseFill: () =>
|
|
8075
|
+
getBaseFill: () => Pc(this._fillHost(), [this._resolve(this._without("fill")).fill]),
|
|
8075
8076
|
getResource: (e) => this._h.getResource(e),
|
|
8076
8077
|
updateFill: (e, t) => (this.setFill(e, t), this.getFill())
|
|
8077
8078
|
};
|
|
@@ -8079,13 +8080,13 @@ var al, ol = [
|
|
|
8079
8080
|
_strokeHost() {
|
|
8080
8081
|
return {
|
|
8081
8082
|
parseColor: (e) => this._parseColor(e),
|
|
8082
|
-
getBaseStroke: () => new
|
|
8083
|
+
getBaseStroke: () => new Uc(this._strokeHost(), [this._resolve(this._without("stroke")).stroke]),
|
|
8083
8084
|
getResource: (e) => this._h.getResource(e),
|
|
8084
8085
|
updateStroke: (e, t) => (this.setStroke(e, t), this.getStroke())
|
|
8085
8086
|
};
|
|
8086
8087
|
}
|
|
8087
8088
|
getFill() {
|
|
8088
|
-
return
|
|
8089
|
+
return Pc(this._fillHost(), [this._resolve(this._h.getData()).fill]);
|
|
8089
8090
|
}
|
|
8090
8091
|
setFill(e, t) {
|
|
8091
8092
|
return this.update({ fill: e }, {
|
|
@@ -8118,7 +8119,7 @@ var al, ol = [
|
|
|
8118
8119
|
}), this.getFill();
|
|
8119
8120
|
}
|
|
8120
8121
|
getStroke() {
|
|
8121
|
-
return new
|
|
8122
|
+
return new Uc(this._strokeHost(), [this._resolve(this._h.getData()).stroke]);
|
|
8122
8123
|
}
|
|
8123
8124
|
setStroke(e, t) {
|
|
8124
8125
|
return this.update({ stroke: e }, {
|
|
@@ -8142,8 +8143,8 @@ var al, ol = [
|
|
|
8142
8143
|
fill: this._resolve(a).fill,
|
|
8143
8144
|
stroke: a?.stroke
|
|
8144
8145
|
}, c = { ...r };
|
|
8145
|
-
c.stroke !== void 0 && (c.stroke =
|
|
8146
|
-
let l = this._h.getStyles(), u = i.resolveTypedUpdates(c,
|
|
8146
|
+
c.stroke !== void 0 && (c.stroke = Uc.toModifiers(c.stroke));
|
|
8147
|
+
let l = this._h.getStyles(), u = i.resolveTypedUpdates(c, kl, l, o) ?? {}, d = {};
|
|
8147
8148
|
return "fill" in r && (d.fill = u.fill), "stroke" in r && (d.stroke = u.stroke), Object.keys(d).length === 0 || this._h.write(d, {
|
|
8148
8149
|
...t,
|
|
8149
8150
|
description: n
|
|
@@ -8175,15 +8176,15 @@ var al, ol = [
|
|
|
8175
8176
|
get isIShapeStyle() {
|
|
8176
8177
|
return !0;
|
|
8177
8178
|
}
|
|
8178
|
-
},
|
|
8179
|
+
}, jl = (e) => {
|
|
8179
8180
|
let t = Math.floor(((e % 360 + 360) % 360 + 45) / 90) % 4;
|
|
8180
8181
|
return t === 1 || t === 3;
|
|
8181
|
-
},
|
|
8182
|
+
}, Ml = (e, t) => jl(t) ? {
|
|
8182
8183
|
x: e.x + (e.width - e.height) / 2,
|
|
8183
8184
|
y: e.y + (e.height - e.width) / 2,
|
|
8184
8185
|
width: e.height,
|
|
8185
8186
|
height: e.width
|
|
8186
|
-
} : e,
|
|
8187
|
+
} : e, Nl = (e) => typeof e?._getDrawnRect == "function", Pl = (e, t, n, r) => {
|
|
8187
8188
|
let i = t ?? {
|
|
8188
8189
|
l: 0,
|
|
8189
8190
|
t: 0,
|
|
@@ -8215,12 +8216,12 @@ var al, ol = [
|
|
|
8215
8216
|
width: f - u,
|
|
8216
8217
|
height: p - d
|
|
8217
8218
|
};
|
|
8218
|
-
},
|
|
8219
|
-
|
|
8219
|
+
}, Fl = (e, t) => Math.max(0, e.x - t.x, e.y - t.y, t.x + t.width - (e.x + e.width), t.y + t.height - (e.y + e.height)), Il = (e, t) => e.x <= t.x + t.width && t.x <= e.x + e.width && e.y <= t.y + t.height && t.y <= e.y + e.height, Ll = 0, Rl = () => Ll, zl = () => {
|
|
8220
|
+
Ll++;
|
|
8220
8221
|
};
|
|
8221
8222
|
(function(e) {
|
|
8222
8223
|
e.placeInParent = (e, t, r) => {
|
|
8223
|
-
let i = e.bounds, a = t.width > 0 ? i.width / t.width : 1, o = t.height > 0 ? i.height / t.height : 1, s = r.bounds, c = a !== o &&
|
|
8224
|
+
let i = e.bounds, a = t.width > 0 ? i.width / t.width : 1, o = t.height > 0 ? i.height / t.height : 1, s = r.bounds, c = a !== o && jl(r.rotation), l = c ? s.width * o : s.width * a, u = c ? s.height * a : s.height * o, d = (s.x + s.width / 2 - t.x) * a - i.width / 2, f = (s.y + s.height / 2 - t.y) * o - i.height / 2, p = e.flip.horizontal, m = e.flip.vertical;
|
|
8224
8225
|
p && (d = -d), m && (f = -f);
|
|
8225
8226
|
let h = (e.rotation || 0) * Math.PI / 180, g = Math.cos(h), _ = Math.sin(h), v = p !== m;
|
|
8226
8227
|
return {
|
|
@@ -8239,7 +8240,7 @@ var al, ol = [
|
|
|
8239
8240
|
}, e.placeInChild = (e, t, r) => {
|
|
8240
8241
|
let i = e.bounds, a = t.width > 0 ? i.width / t.width : 1, o = t.height > 0 ? i.height / t.height : 1, s = e.flip.horizontal, c = e.flip.vertical, l = n(s === c ? r.rotation - e.rotation : e.rotation - r.rotation), u = -(e.rotation || 0) * Math.PI / 180, d = Math.cos(u), f = Math.sin(u), p = r.bounds.x + r.bounds.width / 2 - (i.x + i.width / 2), m = r.bounds.y + r.bounds.height / 2 - (i.y + i.height / 2), h = p * d - m * f, g = p * f + m * d;
|
|
8241
8242
|
s && (h = -h), c && (g = -g);
|
|
8242
|
-
let _ = a !== o &&
|
|
8243
|
+
let _ = a !== o && jl(l), v = _ ? r.bounds.width / o : r.bounds.width / a, y = _ ? r.bounds.height / a : r.bounds.height / o;
|
|
8243
8244
|
return {
|
|
8244
8245
|
bounds: {
|
|
8245
8246
|
x: (h + i.width / 2) / a + t.x - v / 2,
|
|
@@ -8293,8 +8294,8 @@ var al, ol = [
|
|
|
8293
8294
|
let t = (e % 360 + 360) % 360;
|
|
8294
8295
|
return Object.is(t, -0) ? 0 : t;
|
|
8295
8296
|
};
|
|
8296
|
-
})(
|
|
8297
|
-
var
|
|
8297
|
+
})(ol ||= {});
|
|
8298
|
+
var Bl = (e) => (e || 0) * Math.PI / 180, Vl = (e) => {
|
|
8298
8299
|
let t = (e || 0) / 90;
|
|
8299
8300
|
if (Number.isInteger(t)) return [
|
|
8300
8301
|
[1, 0],
|
|
@@ -8302,25 +8303,25 @@ var zl = (e) => (e || 0) * Math.PI / 180, Bl = (e) => {
|
|
|
8302
8303
|
[-1, 0],
|
|
8303
8304
|
[0, -1]
|
|
8304
8305
|
][(t % 4 + 4) % 4].slice();
|
|
8305
|
-
let n =
|
|
8306
|
+
let n = Bl(e);
|
|
8306
8307
|
return [Math.cos(n), Math.sin(n)];
|
|
8307
|
-
},
|
|
8308
|
-
let { bounds: n, rotation: r, flip: i } = e, a = i.horizontal ? n.width - t.x : t.x, o = i.vertical ? n.height - t.y : t.y, s = a - n.width / 2, c = o - n.height / 2, [l, u] =
|
|
8308
|
+
}, Hl = (e, t) => {
|
|
8309
|
+
let { bounds: n, rotation: r, flip: i } = e, a = i.horizontal ? n.width - t.x : t.x, o = i.vertical ? n.height - t.y : t.y, s = a - n.width / 2, c = o - n.height / 2, [l, u] = Vl(r);
|
|
8309
8310
|
return {
|
|
8310
8311
|
x: n.x + n.width / 2 + s * l - c * u,
|
|
8311
8312
|
y: n.y + n.height / 2 + s * u + c * l
|
|
8312
8313
|
};
|
|
8313
|
-
},
|
|
8314
|
-
start:
|
|
8314
|
+
}, Ul = (e) => ({
|
|
8315
|
+
start: Hl(e, {
|
|
8315
8316
|
x: 0,
|
|
8316
8317
|
y: 0
|
|
8317
8318
|
}),
|
|
8318
|
-
end:
|
|
8319
|
+
end: Hl(e, {
|
|
8319
8320
|
x: e.bounds.width,
|
|
8320
8321
|
y: e.bounds.height
|
|
8321
8322
|
})
|
|
8322
|
-
}),
|
|
8323
|
-
let r = (e.x + t.x) / 2, i = (e.y + t.y) / 2, [a, o] =
|
|
8323
|
+
}), Wl = (e, t, n = 0) => {
|
|
8324
|
+
let r = (e.x + t.x) / 2, i = (e.y + t.y) / 2, [a, o] = Vl(-n), s = e.x - r, c = e.y - i, l = s * a - c * o, u = s * o + c * a, d = 2 * Math.abs(l), f = 2 * Math.abs(u);
|
|
8324
8325
|
return {
|
|
8325
8326
|
bounds: {
|
|
8326
8327
|
x: r - d / 2,
|
|
@@ -8334,10 +8335,10 @@ var zl = (e) => (e || 0) * Math.PI / 180, Bl = (e) => {
|
|
|
8334
8335
|
vertical: u > 0
|
|
8335
8336
|
}
|
|
8336
8337
|
};
|
|
8337
|
-
}, Z = 24,
|
|
8338
|
+
}, Z = 24, Gl = 4 / 3, Kl = (e, t, n) => {
|
|
8338
8339
|
let r = t.x - e.x, i = t.y - e.y;
|
|
8339
8340
|
return (Math.abs(Math.abs(r) - Math.abs(i)) < 1e-6 ? n % 2 == 1 : Math.abs(r) > Math.abs(i)) ? r >= 0 ? 0 : 2 : i >= 0 ? 1 : 3;
|
|
8340
|
-
},
|
|
8341
|
+
}, ql = (e, t) => {
|
|
8341
8342
|
switch ((t % 4 + 4) % 4) {
|
|
8342
8343
|
case 1: return {
|
|
8343
8344
|
x: -e.y,
|
|
@@ -8356,11 +8357,11 @@ var zl = (e) => (e || 0) * Math.PI / 180, Bl = (e) => {
|
|
|
8356
8357
|
y: e.y
|
|
8357
8358
|
};
|
|
8358
8359
|
}
|
|
8359
|
-
},
|
|
8360
|
-
let n =
|
|
8360
|
+
}, Jl = (e, t) => {
|
|
8361
|
+
let n = ql({
|
|
8361
8362
|
x: e.x,
|
|
8362
8363
|
y: e.y
|
|
8363
|
-
}, t), r =
|
|
8364
|
+
}, t), r = ql({
|
|
8364
8365
|
x: e.x + e.width,
|
|
8365
8366
|
y: e.y + e.height
|
|
8366
8367
|
}, t);
|
|
@@ -8370,16 +8371,16 @@ var zl = (e) => (e || 0) * Math.PI / 180, Bl = (e) => {
|
|
|
8370
8371
|
width: Math.abs(n.x - r.x),
|
|
8371
8372
|
height: Math.abs(n.y - r.y)
|
|
8372
8373
|
};
|
|
8373
|
-
},
|
|
8374
|
+
}, Yl = (e) => ({
|
|
8374
8375
|
x: e.x,
|
|
8375
8376
|
y: -e.y
|
|
8376
|
-
}), Q = (e) => e.x + e.width, $ = (e) => e.y + e.height,
|
|
8377
|
-
let r = -e.direction, i = ((t.direction - e.direction) % 4 + 4) % 4, a = i === 1, o = (e) => a ?
|
|
8377
|
+
}), Q = (e) => e.x + e.width, $ = (e) => e.y + e.height, Xl = (e, t) => e.y < t && t < $(e), Zl = (e, t, n) => {
|
|
8378
|
+
let r = -e.direction, i = ((t.direction - e.direction) % 4 + 4) % 4, a = i === 1, o = (e) => a ? Yl(ql(e, r)) : ql(e, r), s = (e) => a ? ((e) => ({
|
|
8378
8379
|
x: e.x,
|
|
8379
8380
|
y: -(e.y + e.height),
|
|
8380
8381
|
width: e.width,
|
|
8381
8382
|
height: e.height
|
|
8382
|
-
}))(
|
|
8383
|
+
}))(Jl(e, r)) : Jl(e, r), c = ((e, t, n, r, i) => {
|
|
8383
8384
|
let a = () => r.x >= Q(t) ? (Q(t) + r.x) / 2 : e.x + Z, o = (e) => e ? Q(t) <= r.x ? (Q(t) + r.x) / 2 : n.x - Z : t.x >= Q(r) ? (Q(r) + t.x) / 2 : n.x + Z, s = (t, r, i) => [
|
|
8384
8385
|
e,
|
|
8385
8386
|
{
|
|
@@ -8422,8 +8423,8 @@ var zl = (e) => (e || 0) * Math.PI / 180, Bl = (e) => {
|
|
|
8422
8423
|
}
|
|
8423
8424
|
case 0: {
|
|
8424
8425
|
let i = e.y === n.y;
|
|
8425
|
-
if (r.x >= Q(t) &&
|
|
8426
|
-
if (t.x >= Q(r) &&
|
|
8426
|
+
if (r.x >= Q(t) && Xl(r, e.y)) return s(a(), i ? $(r) + Z : r.y - Z, o(!1));
|
|
8427
|
+
if (t.x >= Q(r) && Xl(t, n.y)) return s(a(), i ? t.y - Z : $(t) + Z, o(!1));
|
|
8427
8428
|
let c = Math.max(e.x, n.x) + Z;
|
|
8428
8429
|
return [
|
|
8429
8430
|
e,
|
|
@@ -8466,13 +8467,13 @@ var zl = (e) => (e || 0) * Math.PI / 180, Bl = (e) => {
|
|
|
8466
8467
|
];
|
|
8467
8468
|
}
|
|
8468
8469
|
}
|
|
8469
|
-
})(o(e.point), s(e.box), o(t.point), s(t.box), a ? 3 : i).map((e) =>
|
|
8470
|
-
l > 3 && d.width < 1e-9 && (d.width =
|
|
8470
|
+
})(o(e.point), s(e.box), o(t.point), s(t.box), a ? 3 : i).map((e) => ql(a ? Yl(e) : e, -r)), l = c.length, u = Wl(c[0], c[l - 1], 90 * e.direction), d = { ...u.bounds };
|
|
8471
|
+
l > 3 && d.width < 1e-9 && (d.width = Gl), l > 4 && d.height < 1e-9 && (d.height = Gl);
|
|
8471
8472
|
let f = {
|
|
8472
8473
|
...u,
|
|
8473
8474
|
bounds: d
|
|
8474
8475
|
}, p = c.map((e) => ((e, t) => {
|
|
8475
|
-
let { bounds: n, rotation: r, flip: i } = e, a = t.x - (n.x + n.width / 2), o = t.y - (n.y + n.height / 2), [s, c] =
|
|
8476
|
+
let { bounds: n, rotation: r, flip: i } = e, a = t.x - (n.x + n.width / 2), o = t.y - (n.y + n.height / 2), [s, c] = Vl(-r), l = n.width / 2 + a * s - o * c, u = n.height / 2 + a * c + o * s;
|
|
8476
8477
|
return {
|
|
8477
8478
|
x: i.horizontal ? n.width - l : l,
|
|
8478
8479
|
y: i.vertical ? n.height - u : u
|
|
@@ -8570,14 +8571,14 @@ var zl = (e) => (e || 0) * Math.PI / 180, Bl = (e) => {
|
|
|
8570
8571
|
}
|
|
8571
8572
|
];
|
|
8572
8573
|
}
|
|
8573
|
-
})(l, d.width, d.height, h ?? {}).map((e) =>
|
|
8574
|
+
})(l, d.width, d.height, h ?? {}).map((e) => Hl(f, e));
|
|
8574
8575
|
return {
|
|
8575
8576
|
geometry: `${n ? "curvedConnector" : "bentConnector"}${l - 1}`,
|
|
8576
8577
|
adjustments: h,
|
|
8577
8578
|
placement: f,
|
|
8578
8579
|
points: g
|
|
8579
8580
|
};
|
|
8580
|
-
},
|
|
8581
|
+
}, Ql = (e, t, n) => {
|
|
8581
8582
|
if (!t) return null;
|
|
8582
8583
|
let r = e.getContent(), { width: i, height: a } = t.bounds, o = r.getConnections ? r.getConnections(i, a, {
|
|
8583
8584
|
adjustments: t.adjustments,
|
|
@@ -8609,7 +8610,7 @@ var zl = (e) => (e || 0) * Math.PI / 180, Bl = (e) => {
|
|
|
8609
8610
|
}
|
|
8610
8611
|
])(i, a);
|
|
8611
8612
|
return o ? o.map((e) => {
|
|
8612
|
-
let n =
|
|
8613
|
+
let n = Hl(t, e), r = Bl(e.ang), i = Hl(t, {
|
|
8613
8614
|
x: e.x + Math.cos(r),
|
|
8614
8615
|
y: e.y + Math.sin(r)
|
|
8615
8616
|
});
|
|
@@ -8620,30 +8621,30 @@ var zl = (e) => (e || 0) * Math.PI / 180, Bl = (e) => {
|
|
|
8620
8621
|
};
|
|
8621
8622
|
var a, o;
|
|
8622
8623
|
}) : null;
|
|
8623
|
-
},
|
|
8624
|
+
}, $l = (e) => {
|
|
8624
8625
|
let t = e.getContent();
|
|
8625
8626
|
return t._getSourceId ? t._getSourceId() : t.toJSON?.()?.sourceId;
|
|
8626
|
-
},
|
|
8627
|
+
}, eu = (e, t) => {
|
|
8627
8628
|
let n = e.getContent();
|
|
8628
8629
|
if (!n._ensureSourceId) throw new r(`A ${n.getTypeDescription()} cannot be glued to while it is loading.`);
|
|
8629
8630
|
return n._ensureSourceId(t);
|
|
8630
|
-
},
|
|
8631
|
+
}, tu = (e) => {
|
|
8631
8632
|
let t = e.getContent();
|
|
8632
8633
|
return t.isConnector?.() ? t.toJSON?.()?.connectorEnds ?? null : null;
|
|
8633
|
-
},
|
|
8634
|
+
}, nu = (e) => {
|
|
8634
8635
|
let t = e.getContent(), n = t.getType();
|
|
8635
8636
|
return n === "group" || n === "shape" && (!t.isConnector || t.isConnector());
|
|
8636
|
-
},
|
|
8637
|
-
for (let n of
|
|
8637
|
+
}, ru = (e) => e.getMovables().getItems({ deep: !0 }), iu = (e, t) => {
|
|
8638
|
+
for (let n of ru(e)) if ($l(n) === t) return n;
|
|
8638
8639
|
return null;
|
|
8639
|
-
},
|
|
8640
|
+
}, au = (e) => {
|
|
8640
8641
|
let t = 1;
|
|
8641
|
-
for (let n of
|
|
8642
|
-
let e =
|
|
8642
|
+
for (let n of ru(e)) {
|
|
8643
|
+
let e = $l(n);
|
|
8643
8644
|
typeof e == "number" && e > t && (t = e);
|
|
8644
8645
|
}
|
|
8645
8646
|
return t + 1;
|
|
8646
|
-
},
|
|
8647
|
+
}, ou = (e) => ol.placementOf(e), su = (e) => {
|
|
8647
8648
|
let { width: t, height: n } = e.bounds, r = [
|
|
8648
8649
|
{
|
|
8649
8650
|
x: 0,
|
|
@@ -8661,32 +8662,32 @@ var zl = (e) => (e || 0) * Math.PI / 180, Bl = (e) => {
|
|
|
8661
8662
|
x: t,
|
|
8662
8663
|
y: n
|
|
8663
8664
|
}
|
|
8664
|
-
].map((t) =>
|
|
8665
|
+
].map((t) => Hl(e, t)), i = r.map((e) => e.x), a = r.map((e) => e.y), o = Math.min(...i), s = Math.min(...a);
|
|
8665
8666
|
return {
|
|
8666
8667
|
x: o,
|
|
8667
8668
|
y: s,
|
|
8668
8669
|
width: Math.max(...i) - o,
|
|
8669
8670
|
height: Math.max(...a) - s
|
|
8670
8671
|
};
|
|
8671
|
-
},
|
|
8672
|
+
}, cu = (e, t) => {
|
|
8672
8673
|
if (!e || !t || t.adjustments !== void 0) return !1;
|
|
8673
8674
|
let n = e.bounds, r = t.bounds;
|
|
8674
8675
|
return n.width === r.width && n.height === r.height && (n.x !== r.x || n.y !== r.y) && (e.rotation || 0) === (t.rotation || 0) && e.flip.horizontal === t.flip.horizontal && e.flip.vertical === t.flip.vertical;
|
|
8675
|
-
},
|
|
8676
|
-
let o = n(t), s =
|
|
8676
|
+
}, lu = (e, t, n, r, i = (t) => iu(e, t), a) => {
|
|
8677
|
+
let o = n(t), s = tu(t);
|
|
8677
8678
|
if (!o || !s) return null;
|
|
8678
|
-
let c =
|
|
8679
|
+
let c = Ul(o), l = {};
|
|
8679
8680
|
for (let e of ["start", "end"]) {
|
|
8680
8681
|
let o = s[e];
|
|
8681
8682
|
if (!o) continue;
|
|
8682
8683
|
let c = i(o.id);
|
|
8683
8684
|
if (!c || c === t) continue;
|
|
8684
|
-
let u = n(c), d =
|
|
8685
|
+
let u = n(c), d = Ql(c, u, r)?.find((e) => e.index === o.index);
|
|
8685
8686
|
if (!d || !u) continue;
|
|
8686
|
-
let f = a ??
|
|
8687
|
+
let f = a ?? cu(ou(c), u);
|
|
8687
8688
|
l[e] = {
|
|
8688
8689
|
site: d,
|
|
8689
|
-
box:
|
|
8690
|
+
box: su(u),
|
|
8690
8691
|
translated: f
|
|
8691
8692
|
};
|
|
8692
8693
|
}
|
|
@@ -8720,21 +8721,21 @@ var zl = (e) => (e || 0) * Math.PI / 180, Bl = (e) => {
|
|
|
8720
8721
|
box: t
|
|
8721
8722
|
}, i = {
|
|
8722
8723
|
point: c[r],
|
|
8723
|
-
direction:
|
|
8724
|
+
direction: Kl(c[r], c[d], e.direction),
|
|
8724
8725
|
box: {
|
|
8725
8726
|
x: c[r].x,
|
|
8726
8727
|
y: c[r].y,
|
|
8727
8728
|
width: 0,
|
|
8728
8729
|
height: 0
|
|
8729
8730
|
}
|
|
8730
|
-
}, a = d === "start" ?
|
|
8731
|
+
}, a = d === "start" ? Zl(n, i, u === "curved") : Zl(i, n, u === "curved");
|
|
8731
8732
|
return {
|
|
8732
8733
|
placement: a.placement,
|
|
8733
8734
|
route: a
|
|
8734
8735
|
};
|
|
8735
8736
|
}
|
|
8736
8737
|
return {
|
|
8737
|
-
placement:
|
|
8738
|
+
placement: Wl(c.start, c.end, o.rotation),
|
|
8738
8739
|
route: null
|
|
8739
8740
|
};
|
|
8740
8741
|
}
|
|
@@ -8746,7 +8747,7 @@ var zl = (e) => (e || 0) * Math.PI / 180, Bl = (e) => {
|
|
|
8746
8747
|
x: p.site.x,
|
|
8747
8748
|
y: p.site.y
|
|
8748
8749
|
}, u === "elbow" || u === "curved") {
|
|
8749
|
-
let e =
|
|
8750
|
+
let e = Zl({
|
|
8750
8751
|
point: c.start,
|
|
8751
8752
|
direction: f.site.direction,
|
|
8752
8753
|
box: f.box
|
|
@@ -8761,80 +8762,80 @@ var zl = (e) => (e || 0) * Math.PI / 180, Bl = (e) => {
|
|
|
8761
8762
|
};
|
|
8762
8763
|
}
|
|
8763
8764
|
return {
|
|
8764
|
-
placement:
|
|
8765
|
+
placement: Wl(c.start, c.end, o.rotation),
|
|
8765
8766
|
route: null
|
|
8766
8767
|
};
|
|
8767
|
-
},
|
|
8768
|
+
}, uu = (e, t) => {
|
|
8768
8769
|
let { placement: n, route: r } = t, i = e.getBounds(), a = e.getFlip();
|
|
8769
|
-
if (i && !
|
|
8770
|
+
if (i && !ol.isSameBounds(i, n.bounds) || a.horizontal !== n.flip.horizontal || a.vertical !== n.flip.vertical || (e.getRotation() || 0) !== n.rotation) return !1;
|
|
8770
8771
|
if (!r) return !0;
|
|
8771
8772
|
let o = e.getContent();
|
|
8772
|
-
return o.getShapeType() === r.geometry &&
|
|
8773
|
-
},
|
|
8773
|
+
return o.getShapeType() === r.geometry && du(o.getAdjustments(), r.adjustments);
|
|
8774
|
+
}, du = (e, t) => {
|
|
8774
8775
|
let n = Object.keys(e), r = Object.keys(t ?? {});
|
|
8775
8776
|
return n.length === r.length && r.every((n) => e[n] === t[n]);
|
|
8776
|
-
},
|
|
8777
|
+
}, fu = (e, t) => {
|
|
8777
8778
|
let n = [];
|
|
8778
8779
|
for (let r of e.getMovables().getItems({
|
|
8779
8780
|
type: "shape",
|
|
8780
8781
|
deep: !0
|
|
8781
8782
|
})) {
|
|
8782
|
-
if (!
|
|
8783
|
-
let i =
|
|
8784
|
-
i && !
|
|
8783
|
+
if (!tu(r)) continue;
|
|
8784
|
+
let i = lu(e, r, ou, t);
|
|
8785
|
+
i && !uu(r, i) && n.push([r, i]);
|
|
8785
8786
|
}
|
|
8786
8787
|
return n;
|
|
8787
|
-
},
|
|
8788
|
+
}, pu = (e, t) => {
|
|
8788
8789
|
let { placement: n, route: r } = t;
|
|
8789
8790
|
(e.getRotation() || 0) !== n.rotation && e.setRotation(n.rotation);
|
|
8790
8791
|
let i = e.getBounds();
|
|
8791
|
-
i && !
|
|
8792
|
+
i && !ol.isSameBounds(i, n.bounds) && e.setBounds(n.bounds);
|
|
8792
8793
|
let a = e.getFlip();
|
|
8793
8794
|
if (a.horizontal === n.flip.horizontal && a.vertical === n.flip.vertical || e.setFlip(n.flip), !r) return;
|
|
8794
8795
|
let o = e.getContent();
|
|
8795
|
-
o.getShapeType() === r.geometry &&
|
|
8796
|
-
},
|
|
8796
|
+
o.getShapeType() === r.geometry && du(o.getAdjustments(), r.adjustments) || o._setRoute?.(r.geometry, r.adjustments);
|
|
8797
|
+
}, mu = (e, t) => {
|
|
8797
8798
|
if (t.size === 0) return [];
|
|
8798
8799
|
let n = [];
|
|
8799
8800
|
for (let r of e.getMovables().getItems({
|
|
8800
8801
|
type: "shape",
|
|
8801
8802
|
deep: !0
|
|
8802
8803
|
})) {
|
|
8803
|
-
let e =
|
|
8804
|
+
let e = tu(r);
|
|
8804
8805
|
e && (e.start && t.has(e.start.id) || e.end && t.has(e.end.id)) && n.push(r);
|
|
8805
8806
|
}
|
|
8806
8807
|
return n;
|
|
8807
|
-
},
|
|
8808
|
+
}, hu = (e) => {
|
|
8808
8809
|
let t = /* @__PURE__ */ new Map();
|
|
8809
8810
|
for (let n of e) for (let e of [n, ...n.getMovables()?.getItems({ deep: !0 }) ?? []]) {
|
|
8810
|
-
let n =
|
|
8811
|
+
let n = $l(e);
|
|
8811
8812
|
n !== void 0 && t.set(n, e);
|
|
8812
8813
|
}
|
|
8813
8814
|
return t;
|
|
8814
|
-
},
|
|
8815
|
-
if (
|
|
8816
|
-
let i =
|
|
8815
|
+
}, gu = /* @__PURE__ */ new WeakSet(), _u = (e, t, n, r = !1) => {
|
|
8816
|
+
if (gu.has(t)) return;
|
|
8817
|
+
let i = hu([t]), a = mu(e, i);
|
|
8817
8818
|
if (a.length !== 0) {
|
|
8818
|
-
|
|
8819
|
+
gu.add(t);
|
|
8819
8820
|
try {
|
|
8820
|
-
let t = (t) => i.get(t) ??
|
|
8821
|
+
let t = (t) => i.get(t) ?? iu(e, t);
|
|
8821
8822
|
for (let i of a) {
|
|
8822
|
-
let a =
|
|
8823
|
-
a &&
|
|
8823
|
+
let a = lu(e, i, ou, n, t, r);
|
|
8824
|
+
a && pu(i, a);
|
|
8824
8825
|
}
|
|
8825
8826
|
} finally {
|
|
8826
|
-
|
|
8827
|
+
gu.delete(t);
|
|
8827
8828
|
}
|
|
8828
8829
|
}
|
|
8829
|
-
},
|
|
8830
|
-
if (!
|
|
8831
|
-
|
|
8830
|
+
}, vu = (e, t, n) => {
|
|
8831
|
+
if (!gu.has(t)) {
|
|
8832
|
+
gu.add(t);
|
|
8832
8833
|
try {
|
|
8833
|
-
let r =
|
|
8834
|
-
r &&
|
|
8834
|
+
let r = lu(e, t, ou, n);
|
|
8835
|
+
r && pu(t, r);
|
|
8835
8836
|
} finally {
|
|
8836
|
-
|
|
8837
|
+
gu.delete(t);
|
|
8837
8838
|
}
|
|
8838
8839
|
}
|
|
8839
8840
|
};
|
|
8840
|
-
export {
|
|
8841
|
+
export { ys as $, Oe as $t, Fc as A, bi as At, To as B, Ir as Bt, jl as C, Yr as Ct, Dl as D, Oi as Dt, Ol as E, Di as Et, Zs as F, Jr as Ft, $o as G, Or as Gt, Ys as H, Nr as Ht, Qs as I, Qr as It, bo as J, bt as Jt, gs as K, At as Kt, $s as L, Kr as Lt, _c as M, ti as Mt, yc as N, ri as Nt, Wc as O, Ur as Ot, bc as P, qr as Pt, Ao as Q, Te as Qt, _o as R, $r as Rt, Fl as S, Pi as St, Al as T, ii as Tt, yo as U, Fr as Ut, Eo as V, Pr as Vt, fs as W, kr as Wt, xo as X, k as Xt, ko as Y, xt as Yt, _s as Z, ke as Zt, zl as _, ta as _t, vu as a, b as an, jo as at, Il as b, $i as bt, lu as c, Qa as ct, au as d, so as dt, O as en, So as et, fu as f, io as ft, ol as g, ra as gt, Wl as h, na as ht, iu as i, w as in, vo as it, Pc as j, yi as jt, Lc as k, ki as kt, nu as l, W as lt, Ul as m, va as mt, Ql as n, me as nn, Do as nt, _u as o, _ as on, po as ot, hu as p, H as pt, bs as q, Ot as qt, eu as r, ae as rn, Oo as rt, mu as s, c as sn, $a as st, pu as t, ce as tn, Co as tt, ou as u, U as ut, Pl as v, zi as vt, Ml as w, ei as wt, Nl as x, Vi as xt, Rl as y, Bi as yt, qs as z, ai as zt };
|