@roomle/web-sdk 7.0.0-alpha.2 → 7.0.0-alpha.3
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/THIRD-PARTY-NOTICES.txt +2 -2
- package/lib/ConfiguratorKernel.js +2 -2
- package/lib/ConfiguratorKernel.wasm +0 -0
- package/lib/RoomleCore.js +2 -2
- package/lib/RoomleCore.wasm +0 -0
- package/lib/RoomleToolsCore.wasm +0 -0
- package/lib/{api-DOHbOr7K.mjs → api-B_Mu7Mg1.mjs} +2 -2
- package/lib/{api-DOHbOr7K.mjs.map → api-B_Mu7Mg1.mjs.map} +1 -1
- package/lib/asset-loader.worker-Bdvb-pt7.mjs.map +1 -1
- package/lib/budgeteer.sw-ByZxiRBr.mjs.map +1 -1
- package/lib/{configuration-operations-DJD9A1xP.mjs → configuration-operations-C5rnDS8e.mjs} +10 -4
- package/lib/configuration-operations-C5rnDS8e.mjs.map +1 -0
- package/lib/{configurator-DCynrn7X.mjs → configurator-BeDJ8jD1.mjs} +3 -3
- package/lib/{configurator-DCynrn7X.mjs.map → configurator-BeDJ8jD1.mjs.map} +1 -1
- package/lib/{configurator-capabilities-BfSMwdWh.mjs → configurator-capabilities-C3TQUu_S.mjs} +2 -2
- package/lib/{configurator-capabilities-BfSMwdWh.mjs.map → configurator-capabilities-C3TQUu_S.mjs.map} +1 -1
- package/lib/configurator-capabilities-C42HYCCb.mjs +3 -0
- package/lib/{configurator-mcp-tools-D00ndjOy.mjs → configurator-mcp-tools-D7vZ7ozM.mjs} +3 -3
- package/lib/configurator-mcp-tools-D7vZ7ozM.mjs.map +1 -0
- package/lib/configurator-yctV6IDY.mjs +3 -0
- package/lib/{glb-viewer-BhiCqjpE.mjs → glb-viewer-BkU2Z-HJ.mjs} +3 -3
- package/lib/{glb-viewer-BhiCqjpE.mjs.map → glb-viewer-BkU2Z-HJ.mjs.map} +1 -1
- package/lib/glb-viewer-jt9mrYrF.mjs +3 -0
- package/lib/{homag-intelligence-DuFtYgdG.mjs → homag-intelligence-DboRA-Yd.mjs} +6 -3
- package/lib/homag-intelligence-DboRA-Yd.mjs.map +1 -0
- package/lib/kernel-2ku6lFfE.mjs.map +1 -1
- package/lib/{material-viewer-uEDqIbCx.mjs → material-viewer-BkaTt8Sn.mjs} +3 -3
- package/lib/{material-viewer-uEDqIbCx.mjs.map → material-viewer-BkaTt8Sn.mjs.map} +1 -1
- package/lib/{packages-DOCmEOxI.mjs → packages-DZzpY6V8.mjs} +5 -5
- package/lib/{packages-DOCmEOxI.mjs.map → packages-DZzpY6V8.mjs.map} +1 -1
- package/lib/planner-C7kZ9SKV.mjs +3 -0
- package/lib/{planner-D8UVNfkJ.mjs → planner-CuZaTB-P.mjs} +3 -3
- package/lib/{planner-D8UVNfkJ.mjs.map → planner-CuZaTB-P.mjs.map} +1 -1
- package/lib/roomle-headless.d.ts +130 -2
- package/lib/roomle-headless.js +8 -8
- package/lib/{roomle-sdk-C0YpFZdj.mjs → roomle-sdk-CSH3WHXV.mjs} +263 -235
- package/lib/roomle-sdk-CSH3WHXV.mjs.map +1 -0
- package/lib/roomle-sdk.d.ts +130 -2
- package/lib/roomle-sdk.js +6 -6
- package/lib/{roomle-webgpu-renderer-DZ9LaZfc.mjs → roomle-webgpu-renderer-D43bHxhT.mjs} +2 -2
- package/lib/{roomle-webgpu-renderer-DZ9LaZfc.mjs.map → roomle-webgpu-renderer-D43bHxhT.mjs.map} +1 -1
- package/lib/{runtime-Bz0u5ckH.mjs → runtime-D5zrHj-e.mjs} +181 -78
- package/lib/runtime-D5zrHj-e.mjs.map +1 -0
- package/lib/{script-loader-jRBMP-ca.mjs → script-loader-O8x5UOnP.mjs} +2 -2
- package/lib/{script-loader-jRBMP-ca.mjs.map → script-loader-O8x5UOnP.mjs.map} +1 -1
- package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/package.json +1 -1
- package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/src/embind/configuratorCoreInterface.d.ts +8 -0
- package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/src/embind/configuratorCoreInterface.js.map +1 -1
- package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/wasm_modern/ConfiguratorKernel.js +2 -2
- package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/wasm_modern/ConfiguratorKernel.wasm +0 -0
- package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/wasm_modern/RoomleCore.js +2 -2
- package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/wasm_modern/RoomleCore.wasm +0 -0
- package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/wasm_modern/RoomleToolsCore.wasm +0 -0
- package/lib/{tools-core-k93qrqfB.mjs → tools-core-DJvn2gR6.mjs} +3 -3
- package/lib/{tools-core-k93qrqfB.mjs.map → tools-core-DJvn2gR6.mjs.map} +1 -1
- package/package.json +2 -2
- package/sbom.cdx.json +5 -5
- package/lib/configuration-operations-DJD9A1xP.mjs.map +0 -1
- package/lib/configurator-D5Ehj649.mjs +0 -3
- package/lib/configurator-capabilities-DAJuxSTw.mjs +0 -3
- package/lib/configurator-mcp-tools-D00ndjOy.mjs.map +0 -1
- package/lib/glb-viewer-BrggGLte.mjs +0 -3
- package/lib/homag-intelligence-DuFtYgdG.mjs.map +0 -1
- package/lib/planner-B9GbQLSB.mjs +0 -3
- package/lib/roomle-sdk-C0YpFZdj.mjs.map +0 -1
- package/lib/runtime-Bz0u5ckH.mjs.map +0 -1
|
@@ -40906,6 +40906,7 @@ var df = (e, t) => !e.sort && !t.sort ? 0 : e.sort ? t.sort ? e.sort - t.sort :
|
|
|
40906
40906
|
throw Error("Stop the current configuration assistant before starting another.");
|
|
40907
40907
|
}
|
|
40908
40908
|
if (this._turn) throw Error("Wait for the current assistant turn to finish before starting another.");
|
|
40909
|
+
this._report = void 0;
|
|
40909
40910
|
let r = new AbortController(), i = (e) => {
|
|
40910
40911
|
this._session === a && !this._destroyed && this._output(e);
|
|
40911
40912
|
}, a = {
|
|
@@ -40914,7 +40915,7 @@ var df = (e, t) => !e.sort && !t.sort ? 0 : e.sort ? t.sort ? e.sort - t.sort :
|
|
|
40914
40915
|
ready: new Promise((e, a) => {
|
|
40915
40916
|
let o = () => a(r.signal.reason);
|
|
40916
40917
|
r.signal.addEventListener("abort", o, { once: !0 }), Promise.resolve().then(() => (r.signal.throwIfAborted(), (n ?? this._load)(t, r.signal, i))).then(e, a).finally(() => r.signal.removeEventListener("abort", o));
|
|
40917
|
-
}).then((e) => (r.signal.throwIfAborted(), i({
|
|
40918
|
+
}).then((e) => (r.signal.throwIfAborted(), this._report = e.report, i({
|
|
40918
40919
|
type: "images",
|
|
40919
40920
|
enabled: t.readsImages
|
|
40920
40921
|
}), i({
|
|
@@ -40953,6 +40954,9 @@ var df = (e, t) => !e.sort && !t.sort ? 0 : e.sort ? t.sort ? e.sort - t.sort :
|
|
|
40953
40954
|
this._turn = null;
|
|
40954
40955
|
}
|
|
40955
40956
|
}
|
|
40957
|
+
report() {
|
|
40958
|
+
return this._report?.();
|
|
40959
|
+
}
|
|
40956
40960
|
destroy() {
|
|
40957
40961
|
this._destroyed = !0, this._session && this.stop(this._session.id);
|
|
40958
40962
|
}
|
|
@@ -40978,7 +40982,7 @@ var df = (e, t) => !e.sort && !t.sort ? 0 : e.sort ? t.sort ? e.sort - t.sort :
|
|
|
40978
40982
|
}
|
|
40979
40983
|
constructor(e, t) {
|
|
40980
40984
|
this._onInitDoneCollection = [], this._isKernelReady = !1, this._isWebGlReady = !1, this._isPreloadReady = !0, this._isLoadError = !1, this._isReloading = !1, this._needsSync = !1, this._configuratorAgentTools = null, this._creator_ = e, this._activePlugins = t || [], this._configurationAssistant = Lf(this._configuratorContext, async (e, t, n) => {
|
|
40981
|
-
let { createConfigurationAssistant: r } = await import("./runtime-
|
|
40985
|
+
let { createConfigurationAssistant: r } = await import("./runtime-D5zrHj-e.mjs");
|
|
40982
40986
|
return t.throwIfAborted(), r(this, e, t, n);
|
|
40983
40987
|
}, (e) => this.planningAssistantOutput(e)), this._lifeCycleManager.addEventListener({
|
|
40984
40988
|
pause: () => void 0,
|
|
@@ -41010,7 +41014,7 @@ var df = (e, t) => !e.sort && !t.sort ? 0 : e.sort ? t.sort ? e.sort - t.sort :
|
|
|
41010
41014
|
initSceneManager(e) {
|
|
41011
41015
|
if (e) this._sceneManager = e;
|
|
41012
41016
|
else {
|
|
41013
|
-
let e =
|
|
41017
|
+
let e = rA.lookup("configurator-scene-manager", this._creator_);
|
|
41014
41018
|
if (!e) throw Error("Failed to resolve configurator-scene-manager from DI container");
|
|
41015
41019
|
this._sceneManager = e;
|
|
41016
41020
|
}
|
|
@@ -41377,6 +41381,9 @@ var df = (e, t) => !e.sort && !t.sort ? 0 : e.sort ? t.sort ? e.sort - t.sort :
|
|
|
41377
41381
|
planningAssistantPrompt(e) {
|
|
41378
41382
|
return this._configurationAssistant.prompt(e, (e) => this.callbacks.onPlanningAssistantPrompt(e));
|
|
41379
41383
|
}
|
|
41384
|
+
getConfigurationAssistantReport() {
|
|
41385
|
+
return this._configurationAssistant.report();
|
|
41386
|
+
}
|
|
41380
41387
|
async getConfiguratorAgentTools() {
|
|
41381
41388
|
let e = await this._getConfiguratorAgentTools();
|
|
41382
41389
|
return Object.entries(e).map(([e, { description: t, inputSchema: n, annotations: r }]) => ({
|
|
@@ -41408,20 +41415,20 @@ var df = (e, t) => !e.sort && !t.sort ? 0 : e.sort ? t.sort ? e.sort - t.sort :
|
|
|
41408
41415
|
};
|
|
41409
41416
|
}
|
|
41410
41417
|
_getConfiguratorAgentTools() {
|
|
41411
|
-
return this._configuratorAgentTools ??= import("./configurator-mcp-tools-
|
|
41418
|
+
return this._configuratorAgentTools ??= import("./configurator-mcp-tools-D7vZ7ozM.mjs").then(({ createConfiguratorMcpTools: e }) => e(this, () => this._sceneManager.getConfigurationHistoryState())).catch((e) => {
|
|
41412
41419
|
throw this._configuratorAgentTools = null, e;
|
|
41413
41420
|
}), this._configuratorAgentTools;
|
|
41414
41421
|
}
|
|
41415
41422
|
async getConfiguratorCapabilities(e) {
|
|
41416
|
-
let { collectConfiguratorCapabilities: t } = await import("./configurator-capabilities-
|
|
41423
|
+
let { collectConfiguratorCapabilities: t } = await import("./configurator-capabilities-C42HYCCb.mjs");
|
|
41417
41424
|
return t(this._configuratorContext, this._plannerKernelAccess, this._rapiAccess, e);
|
|
41418
41425
|
}
|
|
41419
41426
|
async queryConfigurationOperation(e, t) {
|
|
41420
|
-
let { queryConfigurationOperation: n } = await import("./configuration-operations-
|
|
41427
|
+
let { queryConfigurationOperation: n } = await import("./configuration-operations-C5rnDS8e.mjs");
|
|
41421
41428
|
return n(this._configuratorContext, this._plannerKernelAccess, this._rapiAccess, this, e, t);
|
|
41422
41429
|
}
|
|
41423
41430
|
async executeConfigurationOperation(e, t) {
|
|
41424
|
-
let { executeConfigurationOperation: n } = await import("./configuration-operations-
|
|
41431
|
+
let { executeConfigurationOperation: n } = await import("./configuration-operations-C5rnDS8e.mjs");
|
|
41425
41432
|
return n(this._configuratorContext, this._plannerKernelAccess, this._rapiAccess, this, () => this._sceneManager.getConfigurationHistoryState(), e, t);
|
|
41426
41433
|
}
|
|
41427
41434
|
getParametersOfPlanObject() {
|
|
@@ -41801,7 +41808,7 @@ var df = (e, t) => !e.sort && !t.sort ? 0 : e.sort ? t.sort ? e.sort - t.sort :
|
|
|
41801
41808
|
return this._sceneManager.getComponent(e);
|
|
41802
41809
|
}
|
|
41803
41810
|
async getTools() {
|
|
41804
|
-
let e =
|
|
41811
|
+
let e = rA.lookup("roomle-tools-core", this._creator_);
|
|
41805
41812
|
if (!e) throw Error("Failed to resolve roomle-tools-core from DI container");
|
|
41806
41813
|
return await e.init(), e;
|
|
41807
41814
|
}
|
|
@@ -43318,7 +43325,7 @@ var dp = /* @__PURE__ */ function(e) {
|
|
|
43318
43325
|
return this.getMeshGenerator().materialQueue;
|
|
43319
43326
|
}
|
|
43320
43327
|
_getKernelAccess() {
|
|
43321
|
-
let e =
|
|
43328
|
+
let e = rA.lookup("planner-kernel-access", this._creator_);
|
|
43322
43329
|
if (!e) throw Error("PlannerKernelAccess not found in dependency injection");
|
|
43323
43330
|
return e;
|
|
43324
43331
|
}
|
|
@@ -43748,13 +43755,13 @@ var wp = class extends Map {
|
|
|
43748
43755
|
return e.CONFIGURATOR = "configurator", e.PLANNER = "planner", e.GLB_VIEWER = "glb-viewer", e.MATERIAL_VIEWER = "material-viewer", e.TOOLS_CORE = "tools-core", e;
|
|
43749
43756
|
}({}), Op = class {
|
|
43750
43757
|
constructor(e) {
|
|
43751
|
-
e ? this._context = e : this._context =
|
|
43758
|
+
e ? this._context = e : this._context = rA.getContext(this.getContextName()), window.TWEEN || (window.TWEEN = new Re()), zd.start("loadingTime");
|
|
43752
43759
|
}
|
|
43753
43760
|
_setupCommonGlobals() {
|
|
43754
43761
|
window.__RML__DEBUG__ || (window.__RML__DEBUG__ = {}), window.__RML__ENV__ || (window.__RML__ENV__ = {}, window.__RML__ENV__.assetPath || (window.__RML__ENV__.assetPath = ""));
|
|
43755
43762
|
}
|
|
43756
43763
|
_setupCommonDependencies() {
|
|
43757
|
-
|
|
43764
|
+
rA.setup(nA);
|
|
43758
43765
|
let e = Dp();
|
|
43759
43766
|
this.lookup("global-init-data").setOverrides(e), this.lookup("init-data", this._context).setOverrides(e);
|
|
43760
43767
|
}
|
|
@@ -43791,7 +43798,7 @@ var wp = class extends Map {
|
|
|
43791
43798
|
e && this.lookup("dom-helper", this._context).setDomElement(e), this.lookup("life-cycle-manager", this._context).resume();
|
|
43792
43799
|
}
|
|
43793
43800
|
destroy() {
|
|
43794
|
-
this.pause(), this.lookup("life-cycle-manager", this._context).destroy(),
|
|
43801
|
+
this.pause(), this.lookup("life-cycle-manager", this._context).destroy(), rA.cleanUp(this._context);
|
|
43795
43802
|
}
|
|
43796
43803
|
getRapiAccess() {
|
|
43797
43804
|
return this.lookup("rapi-access", this._context);
|
|
@@ -47448,7 +47455,7 @@ var eg = 3e3, tg = .65, ng = 1.16, rg = class {
|
|
|
47448
47455
|
}, this._initData.linearAoFilter);
|
|
47449
47456
|
e.setQualityMap(hh), e.setAutoQuality(this._initData.autoQuality), this._initData.debug && e.loadLutImages(Ah), this._roomleRenderer = e;
|
|
47450
47457
|
} else {
|
|
47451
|
-
let { RoomleWebGPURenderer: e } = await import("./roomle-webgpu-renderer-
|
|
47458
|
+
let { RoomleWebGPURenderer: e } = await import("./roomle-webgpu-renderer-D43bHxhT.mjs"), t = new e(this._creator_, this._renderer, !0, {
|
|
47452
47459
|
outlineVisibleEdgeColor: this._initData.colors.SELECTION.getHex(),
|
|
47453
47460
|
outlineHiddenEdgeColor: this._initData.colors.SELECTION.getHex()
|
|
47454
47461
|
});
|
|
@@ -47928,7 +47935,7 @@ var ig = class extends Wf {
|
|
|
47928
47935
|
let t = new jh(this._creator_, e, og, og);
|
|
47929
47936
|
return t.setQualityMap(hh), t;
|
|
47930
47937
|
}
|
|
47931
|
-
let { RoomleWebGPURenderer: t } = await import("./roomle-webgpu-renderer-
|
|
47938
|
+
let { RoomleWebGPURenderer: t } = await import("./roomle-webgpu-renderer-D43bHxhT.mjs");
|
|
47932
47939
|
return new t(this._creator_, e, !1);
|
|
47933
47940
|
}
|
|
47934
47941
|
async switchToPlannerSettings(e) {
|
|
@@ -48244,7 +48251,7 @@ var dg = class {
|
|
|
48244
48251
|
}
|
|
48245
48252
|
get viewModel() {
|
|
48246
48253
|
if (!this._viewModel) {
|
|
48247
|
-
let e =
|
|
48254
|
+
let e = rA.lookup("configurator-view-model", this._creator_);
|
|
48248
48255
|
if (!e) throw Error("ConfiguratorSceneManager: configurator-view-model not found in DI container");
|
|
48249
48256
|
this._viewModel = e, this._viewModel.setRequestRenderCallback(() => this._renderEverything()), this._viewModel.setRequestRenderSceneUpdateCallback(() => this._roomleRenderer?.clearCache()), this._viewModel.setInvalidateRenderCallback(() => this._roomleRenderer?.forceShadowUpdates(!0));
|
|
48250
48257
|
}
|
|
@@ -54237,26 +54244,29 @@ var Qv = "external:root-tag", $v = class {
|
|
|
54237
54244
|
items: []
|
|
54238
54245
|
});
|
|
54239
54246
|
let o = e.get(a), { depth: s, width: c, height: l } = r.roots.reduce((e, { attributes: t }) => (t && t.forEach((t) => {
|
|
54240
|
-
t.id === "mod_Depth" && (e.depth += parseInt(t.value, 10)
|
|
54247
|
+
t.id === "mod_Depth" && (e.depth += parseInt(t.value, 10)), t.id === "mod_Width" && (e.width += parseInt(t.value, 10)), t.id === "mod_Height" && (e.height += parseInt(t.value, 10));
|
|
54241
54248
|
}), e), {
|
|
54242
54249
|
depth: 0,
|
|
54243
54250
|
width: 0,
|
|
54244
54251
|
height: 0
|
|
54245
|
-
}), u = s > 0 && c > 0 && l > 0, d = r.id ?? r.articleId, f = r.name ?? d, p = yg({
|
|
54252
|
+
}), u = s > 0 && c > 0 && l > 0 ? `${l / 10}x${c / 10}x${s / 10}` : "", d = r.id ?? r.articleId, f = r.name ?? d, p = yg({
|
|
54246
54253
|
id: d,
|
|
54247
54254
|
uiLabels: {
|
|
54248
54255
|
desktop: {
|
|
54249
54256
|
line1: f,
|
|
54250
54257
|
line2: r.desc,
|
|
54251
|
-
line3: u
|
|
54258
|
+
line3: u
|
|
54252
54259
|
},
|
|
54253
54260
|
mobile: {
|
|
54254
54261
|
line1: f,
|
|
54255
|
-
line2: u
|
|
54262
|
+
line2: u,
|
|
54256
54263
|
line3: r.desc
|
|
54257
54264
|
}
|
|
54258
54265
|
},
|
|
54259
54266
|
label: f,
|
|
54267
|
+
width: c,
|
|
54268
|
+
depth: s,
|
|
54269
|
+
height: l,
|
|
54260
54270
|
externalObject: !0,
|
|
54261
54271
|
configuration: { imageUrl: r.imageUrl || "https://dfcorecdn.homag.cloud/images/material-icons/document.svg" }
|
|
54262
54272
|
});
|
|
@@ -54277,7 +54287,7 @@ var ey = "<plan version=\"2\"><walls><nodes/><edges/></walls><planobjects/><text
|
|
|
54277
54287
|
}(sy || {}), cy = class {
|
|
54278
54288
|
constructor(e, t) {
|
|
54279
54289
|
this._homagIntelligence = null, this._hiAgentTools = null, this._fenceAgentTools = null, this._pendingExternalMasterData = null, this._earlyHiTagCatalogCallbacks = null, this._hscInstance = null, this._glbInstance = null, this._configurator = null, this._currentMode = sy.PLANNER, this._isDragInInProgress = !1, this._creator_ = e, this._activePlugins = t || [], this._configurationAssistant = Lf(this._configuratorContext, async (e, t, n) => {
|
|
54280
|
-
let { createConfigurationAssistant: r } = await import("./runtime-
|
|
54290
|
+
let { createConfigurationAssistant: r } = await import("./runtime-D5zrHj-e.mjs");
|
|
54281
54291
|
return t.throwIfAborted(), r(this.getConfiguratorApi(), e, t, n);
|
|
54282
54292
|
}, (e) => this.planningAssistantOutput(e)), this._lifeCycleManager.addEventListener({
|
|
54283
54293
|
pause: () => void 0,
|
|
@@ -54430,7 +54440,7 @@ var ey = "<plan version=\"2\"><walls><nodes/><edges/></walls><planobjects/><text
|
|
|
54430
54440
|
async switchToConfigurator() {
|
|
54431
54441
|
let e = await this._singlePromiseFactory.create(Bo.START_HSC, "startHSC", (e) => {
|
|
54432
54442
|
if (this._hscInstance) return e(this._hscInstance);
|
|
54433
|
-
import("./configurator-
|
|
54443
|
+
import("./configurator-yctV6IDY.mjs").then(({ Configurator: t }) => {
|
|
54434
54444
|
let n = new t(this._creator_);
|
|
54435
54445
|
n.boot({
|
|
54436
54446
|
kernelInstance: this._planInteractionManager.getConfiguratorKernel(),
|
|
@@ -54448,7 +54458,7 @@ var ey = "<plan version=\"2\"><walls><nodes/><edges/></walls><planobjects/><text
|
|
|
54448
54458
|
async switchToViewer() {
|
|
54449
54459
|
let e = await this._singlePromiseFactory.create(Bo.START_GLB, "startGLB", (e) => {
|
|
54450
54460
|
if (this._glbInstance) return e(this._glbInstance);
|
|
54451
|
-
import("./glb-viewer-
|
|
54461
|
+
import("./glb-viewer-jt9mrYrF.mjs").then((t) => {
|
|
54452
54462
|
let n = new t.GlbViewer(this._creator_);
|
|
54453
54463
|
n.boot(), n.getApi().setOverrides(this._initData);
|
|
54454
54464
|
let r = this._domHelper.element;
|
|
@@ -55217,6 +55227,16 @@ var ey = "<plan version=\"2\"><walls><nodes/><edges/></walls><planobjects/><text
|
|
|
55217
55227
|
let t = this.getConfiguratorContext(), n = this._sceneManager.getObjectComponent(t.planElementId, D.PLANNER);
|
|
55218
55228
|
return n?.runtimeId ? this._homagIntelligence?.getGlueLogic().findValidSubArticles(n.externalObjectGroupId) ?? [] : [];
|
|
55219
55229
|
}
|
|
55230
|
+
getExternalObjectArticleInfo(e, t) {
|
|
55231
|
+
let n = this._homagIntelligence?.getGlueLogic().getGroup(e)?.posDataJson.roots.find((e) => e.id === t);
|
|
55232
|
+
if (!n) return;
|
|
55233
|
+
let { articleId: r, articleName: i, desc: a } = n;
|
|
55234
|
+
return {
|
|
55235
|
+
articleId: r,
|
|
55236
|
+
articleName: i,
|
|
55237
|
+
desc: a
|
|
55238
|
+
};
|
|
55239
|
+
}
|
|
55220
55240
|
selectExternalObjectSubArticle(e) {
|
|
55221
55241
|
let t = this.getConfiguratorContext(), n = this._sceneManager.getObjectComponent(t.planElementId, D.PLANNER);
|
|
55222
55242
|
n?.runtimeId && (this._sceneManager.cancelDockings(), this._plannerKernelAccess.webGlPreviewDockingsForPlanObject(n.configurationRuntimeId, {
|
|
@@ -55551,7 +55571,7 @@ var ey = "<plan version=\"2\"><walls><nodes/><edges/></walls><planobjects/><text
|
|
|
55551
55571
|
globalInitData: JSON.parse(JSON.stringify(this._globalInitData))
|
|
55552
55572
|
}, "*", [t.port2]);
|
|
55553
55573
|
let n = Fv(t.port1), r = null;
|
|
55554
|
-
this._initData.hi?.libraryId && (r = n.onLoadArticleCatalog(this._initData.hi.libraryId), this._earlyHiTagCatalogCallbacks = new $v(this._creator_, r)), await new (await (import("./homag-intelligence-
|
|
55574
|
+
this._initData.hi?.libraryId && (r = n.onLoadArticleCatalog(this._initData.hi.libraryId), this._earlyHiTagCatalogCallbacks = new $v(this._creator_, r)), await new (await (import("./homag-intelligence-DboRA-Yd.mjs"))).HomagIntelligence(this, e, n, () => this._plannerKernelAccess.arrangementCorrectionEnabled).loadSavedPosData(), this._initData.hi?.libraryId && await this.loadExternalObjectLibrary(this._initData.hi.libraryId, r ?? void 0);
|
|
55555
55575
|
}
|
|
55556
55576
|
async _loadHomagIntelligenceArticles(e, t) {
|
|
55557
55577
|
let n = this._homagIntelligence;
|
|
@@ -55763,7 +55783,9 @@ var ly = {
|
|
|
55763
55783
|
this._updateComponentParameters(e), this._updateComponentChildren(e);
|
|
55764
55784
|
}
|
|
55765
55785
|
async _updatePlanObjectParameters(e) {
|
|
55766
|
-
let t = this._nextParameterUpdateId("planObject", e), n
|
|
55786
|
+
let t = this._nextParameterUpdateId("planObject", e), n;
|
|
55787
|
+
this._configuratorContext.selectedRuntimeComponentId ? (n = this._kernelInstance.getPlanObjectParameters(e), this._addAnimationParameters(n, this._kernelInstance.getPlanObjectAnimations(e))) : n = await this.getPlanObjectParameters(e);
|
|
55788
|
+
let r = n.length === 0, i;
|
|
55767
55789
|
if (r) {
|
|
55768
55790
|
let t = this._kernelInstance.getRootPlanComponentIdFromObjectId(e);
|
|
55769
55791
|
n = await this.getComponentParameters(t), i = this._kernelInstance.getComponent(t);
|
|
@@ -55821,6 +55843,10 @@ var ly = {
|
|
|
55821
55843
|
swapComponents(e, t, n) {
|
|
55822
55844
|
this._kernelInstance.swapComponents(e, t, n);
|
|
55823
55845
|
}
|
|
55846
|
+
moveComponent(e, t, n) {
|
|
55847
|
+
let r = this._kernelInstance.getComponentId(t), i = this._kernelInstance.getComponentId(n.parentId);
|
|
55848
|
+
this._kernelInstance.moveComponent(e, t, n), this._configuratorUiCallbacks.onUserInitiatedDockDone(r, n.childDockId, i, n.parentDockId, n.position ?? null);
|
|
55849
|
+
}
|
|
55824
55850
|
setComponentParameter(e, t, n) {
|
|
55825
55851
|
this._kernelInstance.setComponentParameter(e, t, n);
|
|
55826
55852
|
}
|
|
@@ -55880,7 +55906,13 @@ var ly = {
|
|
|
55880
55906
|
if (t.startsWith("animation:")) {
|
|
55881
55907
|
let n = this._kernelInstance.getComponent(e).animations?.find((e) => e.key === t.split(":")[1]), i = n?.applyToChildren ? ly.OBJECT_COMPONENT : ly.COMPONENT, a = !this._globalInitData.e2e && (n?.animate ?? !1), o = n?.level ?? 0;
|
|
55882
55908
|
this.changeAnimationValue(e, t, r, o, i, a), this._updateCommonComponentDependencies([e]), this._configuratorContext.configurationRuntimeId && this.updatePlanObjectDependencies(this._configuratorContext.configurationRuntimeId);
|
|
55883
|
-
} else typeof r == "string"
|
|
55909
|
+
} else if (typeof r == "string") {
|
|
55910
|
+
if (this._kernelInstance.isExternalPlanObject(e)) {
|
|
55911
|
+
this._externalObjectParameterChanged(e, t, r), this._finishParameterChange(n, i, a);
|
|
55912
|
+
return;
|
|
55913
|
+
}
|
|
55914
|
+
this._kernelInstance.setComponentParameter(e, t, r);
|
|
55915
|
+
} else console.warn(Sy, r, t, n);
|
|
55884
55916
|
this._finishParameterChange(n, i, a), this._updateComponentDependencies(e);
|
|
55885
55917
|
}
|
|
55886
55918
|
changePlanObjectParameter(e, t, n, r, i, a) {
|
|
@@ -63617,20 +63649,28 @@ var Qy = class {
|
|
|
63617
63649
|
].join(" "), ZD = "Plan the furniture in the image as close to it as possible - follow image-planning, using its supplied text or fetching it with get-skill if missing.", QD = () => ({
|
|
63618
63650
|
systemPrompt: XD,
|
|
63619
63651
|
imagePrompt: ZD
|
|
63620
|
-
}), $D =
|
|
63652
|
+
}), $D = 1e3, eO = (e) => {
|
|
63653
|
+
let t = e % 360;
|
|
63654
|
+
t < 0 && (t += 360);
|
|
63655
|
+
let n = Math.round(t * $D) / $D;
|
|
63656
|
+
return n >= 360 ? 0 : n + 0;
|
|
63657
|
+
}, tO = (e) => {
|
|
63658
|
+
e.rotationY !== void 0 && (e.rotationY = eO(e.rotationY));
|
|
63659
|
+
for (let t of e.roots ?? []) t.rotationY !== void 0 && (t.rotationY = eO(t.rotationY));
|
|
63660
|
+
}, nO = (e) => e.includes("."), rO = (e, t) => e === t || e !== void 0 && t !== void 0 && e.length === t.length && e.every((e, n) => e === t[n]), iO = (e, t) => {
|
|
63621
63661
|
let n = (e) => new Set(e.roots.filter((e) => !e.isGenerated).map((e) => e.id)), r = n(e), i = n(t);
|
|
63622
63662
|
return r.size === i.size && [...r].every((e) => i.has(e));
|
|
63623
|
-
},
|
|
63624
|
-
let n = new Set(
|
|
63625
|
-
return
|
|
63626
|
-
},
|
|
63663
|
+
}, aO = new Set([wy.Error, wy.Fatal]), oO = (e) => e.roots.filter((e) => (e.logMessages ?? []).some((e) => aO.has(e.category))), sO = (e, t) => {
|
|
63664
|
+
let n = new Set(oO(t).map((e) => e.id));
|
|
63665
|
+
return oO(e).filter((e) => !n.has(e.id));
|
|
63666
|
+
}, cO = (e) => (e ?? []).flatMap((e) => [
|
|
63627
63667
|
e,
|
|
63628
|
-
...
|
|
63629
|
-
...
|
|
63630
|
-
]),
|
|
63668
|
+
...cO(e.modules),
|
|
63669
|
+
...cO(e.containers)
|
|
63670
|
+
]), lO = (e) => e.roots.flatMap((e) => [...cO(e.modules), ...cO(e.containers)]), uO = (e) => new Set(lO(e).map((e) => e.id)), dO = (e, t) => [...e.roots, ...lO(e)].find((e) => e.id === t), fO = (e, t, n) => lO(e).filter((e) => !t.has(e.id) && e.articleInfo !== void 0 && e.articleInfo.articleId === n), pO = (e, t) => {
|
|
63631
63671
|
let n = new Map(t.roots.map((e) => [e.id, !!e.dockInfos?.length]));
|
|
63632
63672
|
return e.roots.some((e) => !e.isGenerated && n.has(e.id) && n.get(e.id) !== !!e.dockInfos?.length);
|
|
63633
|
-
},
|
|
63673
|
+
}, mO = (e, t, n) => {
|
|
63634
63674
|
let r = (e, t, n) => n ?? fx(e?.dockInfos ?? [], t), i = (i, a, o) => {
|
|
63635
63675
|
let s = t.find((e) => e.id === o.id);
|
|
63636
63676
|
return (n.dockedRoots ?? []).some((t) => t.ownDockingVector === i && r(e, i, t.ownDockingVectorIndex) === r(e, i, a) && (t.dockedRoots ?? []).some((e) => e.id === o.id && e.dockingVector === o.dockingVector && r(s, e.dockingVector, e.dockingVectorIndex) === r(s, o.dockingVector, o.dockingVectorIndex)));
|
|
@@ -63642,7 +63682,7 @@ var Qy = class {
|
|
|
63642
63682
|
...n,
|
|
63643
63683
|
dockedRoots: [...a, ...n.dockedRoots ?? []]
|
|
63644
63684
|
};
|
|
63645
|
-
},
|
|
63685
|
+
}, hO = class e {
|
|
63646
63686
|
static {
|
|
63647
63687
|
this.CHANGEABLE_PROPERTIES = ["additionalText", "quantity"];
|
|
63648
63688
|
}
|
|
@@ -64075,7 +64115,7 @@ var Qy = class {
|
|
|
64075
64115
|
}
|
|
64076
64116
|
}
|
|
64077
64117
|
getMaterialUrl(e, t) {
|
|
64078
|
-
if (
|
|
64118
|
+
if (!nO(e)) return null;
|
|
64079
64119
|
let n = this._getLibraryFromGroupOrModuleId(t);
|
|
64080
64120
|
if (!n?.masterData) return null;
|
|
64081
64121
|
let r = e.indexOf("."), i = e.slice(0, r), a = e.slice(r + 1);
|
|
@@ -64120,7 +64160,7 @@ var Qy = class {
|
|
|
64120
64160
|
_setRootModuleContextData(e, t) {
|
|
64121
64161
|
if (t.contextData) for (let n of e.posDataJson.roots) {
|
|
64122
64162
|
let r = t.contextData.find((e) => e.rootModuleId === n.id)?.contextData;
|
|
64123
|
-
r && (n.contextData =
|
|
64163
|
+
r && (n.contextData = mO(n, e.posDataJson.roots, r));
|
|
64124
64164
|
}
|
|
64125
64165
|
}
|
|
64126
64166
|
_loadPosData(e, t, n) {
|
|
@@ -64186,11 +64226,11 @@ var Qy = class {
|
|
|
64186
64226
|
let t = this._calculate(e.posDataJson);
|
|
64187
64227
|
if (!t) return e.posDataJson;
|
|
64188
64228
|
let n = e.lastCalculatedPosDataJson;
|
|
64189
|
-
n && this._logFailedRootModules(t.id,
|
|
64229
|
+
n && this._logFailedRootModules(t.id, sO(t, n));
|
|
64190
64230
|
let r = e.pendingArrangement;
|
|
64191
|
-
if (r &&
|
|
64231
|
+
if (r && iO(e.posDataJson, t)) {
|
|
64192
64232
|
let n = t.pos;
|
|
64193
|
-
t = this.arrangeRootModulesAndCalculateIfChanged(t, r.allowRepositioning, r.originalGroup, r.carrierOverrides), e.appliesGroupPosition = !
|
|
64233
|
+
t = this.arrangeRootModulesAndCalculateIfChanged(t, r.allowRepositioning, r.originalGroup, r.carrierOverrides), e.appliesGroupPosition = !rO(n, t.pos) || r.originalGroup !== void 0 && pO(t, r.originalGroup);
|
|
64194
64234
|
}
|
|
64195
64235
|
return this.storeCalculatedGroup(e, t), t;
|
|
64196
64236
|
} finally {
|
|
@@ -64640,7 +64680,7 @@ var Qy = class {
|
|
|
64640
64680
|
let { group: i, changed: a } = new px(e, n).arrangeRootModules();
|
|
64641
64681
|
delete i.repositioningData;
|
|
64642
64682
|
let o = !t && n !== void 0, s = o && Gb(n, i, r);
|
|
64643
|
-
return !a && !s ? i : (o && tx(n, i), this._calculate(i) ?? i);
|
|
64683
|
+
return tO(i), !a && !s ? i : (o && tx(n, i), this._calculate(i) ?? i);
|
|
64644
64684
|
}
|
|
64645
64685
|
_runInitialCheck(e, t, n) {
|
|
64646
64686
|
let r = this.getLibraryData(e);
|
|
@@ -64653,7 +64693,7 @@ var Qy = class {
|
|
|
64653
64693
|
}
|
|
64654
64694
|
for (let e of a.logs) {
|
|
64655
64695
|
let n = `Initial check of ${t}: ${e.msg}`;
|
|
64656
|
-
|
|
64696
|
+
aO.has(e.category) ? console.error(n, e) : console.log(n, e);
|
|
64657
64697
|
}
|
|
64658
64698
|
return a.hasChanged ? i : null;
|
|
64659
64699
|
}
|
|
@@ -64662,7 +64702,7 @@ var Qy = class {
|
|
|
64662
64702
|
}
|
|
64663
64703
|
_solveInitialModules(e, t) {
|
|
64664
64704
|
let n = null;
|
|
64665
|
-
for (let { moduleId: r, articleId: i } of t) n = this._runInitialCheck(n ?? e, `module ${r} of group ${e.id}`, (e, t, n) => t.solveInitialModule(
|
|
64705
|
+
for (let { moduleId: r, articleId: i } of t) n = this._runInitialCheck(n ?? e, `module ${r} of group ${e.id}`, (e, t, n) => t.solveInitialModule(dO(e, r), n, i)) ?? n;
|
|
64666
64706
|
return n;
|
|
64667
64707
|
}
|
|
64668
64708
|
solveInitialNewGroup(e) {
|
|
@@ -64678,7 +64718,7 @@ var Qy = class {
|
|
|
64678
64718
|
t && this.storeCalculatedGroup(e, this._calculate(t) ?? t);
|
|
64679
64719
|
}
|
|
64680
64720
|
_solveInitialSubArticleModules(e, t, n, r) {
|
|
64681
|
-
let i =
|
|
64721
|
+
let i = fO(t, n, r);
|
|
64682
64722
|
if (i.length === 0) return console.error(`No module of sub-article '${r}' found in group ${t.id}, its initial check is skipped.`), t;
|
|
64683
64723
|
let a = this._solveInitialModules(t, i.map((e) => ({
|
|
64684
64724
|
moduleId: e.id,
|
|
@@ -64705,7 +64745,7 @@ var Qy = class {
|
|
|
64705
64745
|
let c = hT(e, o, [{
|
|
64706
64746
|
rootId: s,
|
|
64707
64747
|
instanceId: n
|
|
64708
|
-
}]), l =
|
|
64748
|
+
}]), l = uO(c), u = hT(c, o, [], {
|
|
64709
64749
|
article: t,
|
|
64710
64750
|
rootId: r,
|
|
64711
64751
|
parentModuleId: i,
|
|
@@ -64722,13 +64762,13 @@ var Qy = class {
|
|
|
64722
64762
|
_addSubArticle(e, t, n, r, i) {
|
|
64723
64763
|
let a = this.updatePosData(e, (a, o) => {
|
|
64724
64764
|
try {
|
|
64725
|
-
let s =
|
|
64765
|
+
let s = uO(a), c = hT(a, o, [], {
|
|
64726
64766
|
article: t,
|
|
64727
64767
|
rootId: n,
|
|
64728
64768
|
parentModuleId: r,
|
|
64729
64769
|
insertPosition: i
|
|
64730
64770
|
}), l = this._solveInitialSubArticleModules(o, o.calculateGroup(c), s, t.articleId);
|
|
64731
|
-
return this._logFailedRootModules(l.id,
|
|
64771
|
+
return this._logFailedRootModules(l.id, sO(l, e)), l;
|
|
64732
64772
|
} catch (e) {
|
|
64733
64773
|
console.error("Error adding sub article to group:", e);
|
|
64734
64774
|
}
|
|
@@ -64757,7 +64797,7 @@ var Qy = class {
|
|
|
64757
64797
|
let i = Ur(e);
|
|
64758
64798
|
i.libraryId = n, i.logMessages &&= [];
|
|
64759
64799
|
let a = t(i, r);
|
|
64760
|
-
return a ? (this.takeOverPropertiesFromOriginalGroup(n, r, e, a), a) : null;
|
|
64800
|
+
return a ? (this.takeOverPropertiesFromOriginalGroup(n, r, e, a), tO(a), a) : null;
|
|
64761
64801
|
}
|
|
64762
64802
|
_getLibrary(e) {
|
|
64763
64803
|
return {
|
|
@@ -64775,13 +64815,13 @@ var Qy = class {
|
|
|
64775
64815
|
t.libraryId = r?.libraryId ?? e, t.articleName = t.articleInfo?.articleName ?? t.articleInfo?.articleId ?? r?.articleName ?? r?.articleId ?? a?.name ?? a?.id, t.articleId = t.articleInfo?.articleId ?? t.articleInfo?.articleName ?? r?.articleId ?? r?.articleName ?? a?.id ?? a?.name, t.imageUrl = t.articleInfo?.imageUrl ?? r?.imageUrl ?? a?.imageUrl, t.desc = t.articleInfo?.desc ?? r?.desc ?? a?.desc, t.category = t.articleInfo?.category ?? r?.category, t.additionalText = r?.additionalText, t.canBeDeleted === void 0 && (t.canBeDeleted = !t.isGenerated), this._setSubmoduleImages(t, i);
|
|
64776
64816
|
});
|
|
64777
64817
|
}
|
|
64778
|
-
},
|
|
64818
|
+
}, gO = class {
|
|
64779
64819
|
constructor(e) {
|
|
64780
64820
|
this._creator_ = e;
|
|
64781
64821
|
}
|
|
64782
64822
|
_getExternalMaterialUrl(e) {
|
|
64783
64823
|
let t = this._plannerKernelAccess?.homagIntelligence?.getGlueLogic();
|
|
64784
|
-
return !t ||
|
|
64824
|
+
return !t || !nO(e) ? null : t.getMaterialUrl(e);
|
|
64785
64825
|
}
|
|
64786
64826
|
async _fetchExternalMaterial(e) {
|
|
64787
64827
|
try {
|
|
@@ -64806,10 +64846,10 @@ var Qy = class {
|
|
|
64806
64846
|
return [...r, ...i];
|
|
64807
64847
|
}
|
|
64808
64848
|
};
|
|
64809
|
-
L([I, F("design:type", Object)],
|
|
64849
|
+
L([I, F("design:type", Object)], gO.prototype, "_rapiAccess", void 0), L([I, F("design:type", Object)], gO.prototype, "_plannerKernelAccess", void 0);
|
|
64810
64850
|
//#endregion
|
|
64811
64851
|
//#region packages/common-core/src/webgl/svg-foreign-object-renderer.ts
|
|
64812
|
-
var
|
|
64852
|
+
var _O = class {
|
|
64813
64853
|
constructor(e, t) {
|
|
64814
64854
|
this.canvas = document.createElement("canvas"), this.context = this.canvas.getContext("2d"), this.canvas.width = e * window.devicePixelRatio, this.canvas.height = t * window.devicePixelRatio;
|
|
64815
64855
|
}
|
|
@@ -64841,7 +64881,7 @@ var mO = class {
|
|
|
64841
64881
|
}, r.onerror = n, r.src = `data:image/svg+xml;charset=utf-8,${encodeURIComponent(new XMLSerializer().serializeToString(e))}`;
|
|
64842
64882
|
});
|
|
64843
64883
|
}
|
|
64844
|
-
},
|
|
64884
|
+
}, vO = class {
|
|
64845
64885
|
constructor(e) {
|
|
64846
64886
|
this.overlayRenderers = [], this._creator_ = e;
|
|
64847
64887
|
}
|
|
@@ -64897,7 +64937,7 @@ var mO = class {
|
|
|
64897
64937
|
let i = await e.renderSnapshot(t, n, r);
|
|
64898
64938
|
i && (i.removeAttribute("id"), a.appendChild(i));
|
|
64899
64939
|
}
|
|
64900
|
-
return await new
|
|
64940
|
+
return await new _O(n, r).renderToCanvas(a);
|
|
64901
64941
|
} finally {
|
|
64902
64942
|
i.remove();
|
|
64903
64943
|
}
|
|
@@ -64913,14 +64953,14 @@ var mO = class {
|
|
|
64913
64953
|
e.textContent = "\n .dimension-label {\n padding: 0.25rem 0.625rem;\n background: rgba(252, 252, 252, 0.95);\n box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.12);\n backdrop-filter: blur(0.5rem);\n -webkit-backdrop-filter: blur(0.5rem);\n cursor: pointer;\n pointer-events: auto;\n outline: none;\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n .dimension-label:hover:not(.dimension-label--editing) {\n background: #ffffff;\n border-color: rgba(0, 0, 0, 0.14);\n box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.13);\n transform: translate(-50%, -50%) scale(1.02);\n transition: all 0.2s var(--interaction-timing);\n }\n\n .dimension-label--editing {\n background: #ffffff;\n box-shadow:\n 0 0 0 2px rgba(59, 130, 246, 0.2),\n 0 2px 8px 0 rgba(0, 0, 0, 0.12);\n transform: translate(-50%, -50%) scale(1.05);\n transition: none;\n }\n\n .dimension-label__value {\n font-family: var(--font-family);\n font-size: 2rem;\n font-weight: 500;\n color: #2d2d2d;\n white-space: nowrap;\n letter-spacing: 0.02em;\n line-height: 1.2;\n pointer-events: none;\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n .dimension-label__input {\n min-width: 3.75rem;\n font-family: inherit;\n font-size: inherit;\n font-weight: inherit;\n color: inherit;\n border: none;\n outline: none;\n text-align: center;\n pointer-events: auto;\n line-height: 1.2;\n display: flex;\n align-items: center;\n justify-content: center;\n text-overflow: ellipsis;\n width: fit-content;\n max-width: 4rem;\n padding: 0;\n background-color: transparent;\n }\n\n .dimension-label__input:hover {\n filter: contrast(1.2);\n }\n\n .dimension-label--primary {\n background: rgba(247, 247, 247, 0.9);\n border: 1px solid rgba(0, 0, 0, 0.14);\n }\n\n .dimension-label--primary .dimension-label__value,\n .dimension-label--primary .dimension-label__input {\n font-size: 0.9rem;\n font-weight: 500;\n color: #000;\n }\n\n .dimension-label--primary:hover:not(.dimension-label--editing) {\n border-color: #8f8f8f;\n }\n\n .dimension-label--secondary {\n background: rgba(255, 255, 255, 0.75);\n }\n\n .dimension-label--secondary .dimension-label__value,\n .dimension-label--secondary .dimension-label__input {\n font-size: 0.75rem;\n color: #5a5a5a;\n }\n\n .dimension-label--disabled {\n pointer-events: none !important;\n }\n\n .dimension-label--disabled.dimension-label--has-tooltip {\n pointer-events: auto !important;\n cursor: default;\n position: relative;\n }\n\n .dimension-tooltip {\n position: absolute;\n bottom: calc(100% + 0.35rem);\n left: 50%;\n transform: translateX(-50%);\n background: rgba(255, 255, 255, 0.92);\n color: #2d2d2d;\n font-family: var(--font-family);\n font-size: 0.65rem;\n font-weight: 400;\n line-height: 1.4;\n padding: 0.3rem 0.6rem;\n border-radius: 0.15rem;\n white-space: nowrap;\n pointer-events: none;\n box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);\n animation: dimension-tooltip-fade 2.5s ease-in-out forwards;\n z-index: 1;\n }\n\n @keyframes dimension-tooltip-fade {\n 0% { opacity: 0; transform: translateX(-50%) translateY(2px); }\n 10% { opacity: 1; transform: translateX(-50%) translateY(0); }\n 75% { opacity: 1; }\n 100% { opacity: 0; }\n }\n\n /* Planner 3D dimension labels: compact size, tappable for editing */\n .dimension-label--planner-3d {\n pointer-events: none;\n cursor: pointer;\n padding: 0.1rem 0.35rem;\n box-shadow: none;\n }\n\n .dimension-label--planner-3d .dimension-label__value,\n .dimension-label--planner-3d .dimension-label__input {\n font-size: 0.65rem;\n font-weight: 500;\n line-height: 1.1;\n pointer-events: auto;\n }\n\n .dimension-label--planner-3d .dimension-label__input {\n min-width: 2.5rem;\n max-width: 3rem;\n }\n\n .dimension-label--planner-3d:hover:not(.dimension-label--editing) {\n transform: translate(-50%, -50%) scale(1);\n }\n\n .dimension-label--planner-3d.dimension-label--editing {\n cursor: text;\n pointer-events: auto;\n }\n\n /* Disable pointer-events during camera drag to prevent input interference */\n .camera-moving .dimension-label--planner-3d .dimension-label__value,\n .camera-moving .dimension-label--planner-3d .dimension-label__input {\n pointer-events: none;\n }\n\n ", document.head.appendChild(e);
|
|
64914
64954
|
}
|
|
64915
64955
|
};
|
|
64916
|
-
L([I, F("design:type", Object)],
|
|
64956
|
+
L([I, F("design:type", Object)], vO.prototype, "domHelper", void 0), L([I, F("design:type", Object)], vO.prototype, "initData", void 0), L([I, F("design:type", Object)], vO.prototype, "componentDimensioningHelper", void 0);
|
|
64917
64957
|
//#endregion
|
|
64918
64958
|
//#region packages/common-core/src/services/kernel-callback-guard.ts
|
|
64919
|
-
var
|
|
64959
|
+
var yO = class {
|
|
64920
64960
|
wrap(e) {
|
|
64921
64961
|
return e;
|
|
64922
64962
|
}
|
|
64923
|
-
},
|
|
64963
|
+
}, bO = class {
|
|
64924
64964
|
constructor(e) {
|
|
64925
64965
|
this._floorMesh = void 0, this._topLight = void 0, this._reflectiveMaterial = void 0, this._shadowOnlyMaterial = void 0, this._creator_ = e;
|
|
64926
64966
|
}
|
|
@@ -64933,7 +64973,7 @@ var gO = class {
|
|
|
64933
64973
|
depth: !0,
|
|
64934
64974
|
bounces: !1
|
|
64935
64975
|
}), f = d.getDepthNode();
|
|
64936
|
-
await this.
|
|
64976
|
+
await this.bypassVxgiRenderContext(d);
|
|
64937
64977
|
let p = s(u.startFadeout), m = s(u.endFadeout), h = s(u.intensity), g = s(Mr(u.baseColor));
|
|
64938
64978
|
this._startFadeout = p, this._endFadeout = m, this._intensity = h, this._baseColor = g, this._reflectiveMaterial = new t({ colorNode: n(() => {
|
|
64939
64979
|
let e = o(p, m, f.x).remap(0, 1, r(1).sub(h), 1);
|
|
@@ -64956,28 +64996,16 @@ var gO = class {
|
|
|
64956
64996
|
setReceiveShadow(e) {
|
|
64957
64997
|
this._floorMesh !== void 0 && (this._floorMesh.receiveShadow = e);
|
|
64958
64998
|
}
|
|
64959
|
-
async
|
|
64999
|
+
async bypassVxgiRenderContext(e) {
|
|
64960
65000
|
let { context: t } = await import("./three.tsl-BPRuJXUM.mjs"), n = e.reflector, r = n.updateBefore.bind(n), i = t();
|
|
64961
65001
|
n.updateBefore = (e) => {
|
|
64962
65002
|
let { renderer: t } = e;
|
|
64963
65003
|
if (!t) return r(e);
|
|
64964
|
-
let n =
|
|
64965
|
-
t.contextNode = i;
|
|
65004
|
+
let n = t.contextNode;
|
|
64966
65005
|
try {
|
|
64967
|
-
|
|
64968
|
-
n.offset = {
|
|
64969
|
-
left: 1 - a.right,
|
|
64970
|
-
top: a.top,
|
|
64971
|
-
right: 1 - a.left,
|
|
64972
|
-
bottom: a.bottom
|
|
64973
|
-
};
|
|
64974
|
-
try {
|
|
64975
|
-
return r(e);
|
|
64976
|
-
} finally {
|
|
64977
|
-
n.offset = a;
|
|
64978
|
-
}
|
|
65006
|
+
return t.contextNode = i, r(e);
|
|
64979
65007
|
} finally {
|
|
64980
|
-
t.contextNode =
|
|
65008
|
+
t.contextNode = n;
|
|
64981
65009
|
}
|
|
64982
65010
|
};
|
|
64983
65011
|
}
|
|
@@ -65000,16 +65028,16 @@ var gO = class {
|
|
|
65000
65028
|
}), n.add(this._startFadeout, "value", 0, 1, .001).name("start fadeout").onChange(() => t()), n.add(this._endFadeout, "value", 0, 1, .001).name("end fadeout").onChange(() => t()), n.add(this._intensity, "value", 0, 1, .01).name("intensity").onChange(() => t()), n.addColor(this._baseColor, "value").name("base color").onChange(() => t());
|
|
65001
65029
|
}
|
|
65002
65030
|
};
|
|
65003
|
-
L([I, F("design:type", Object)],
|
|
65031
|
+
L([I, F("design:type", Object)], bO.prototype, "_initData", void 0);
|
|
65004
65032
|
//#endregion
|
|
65005
65033
|
//#region ../../node_modules/three/examples/jsm/renderers/Projector.js
|
|
65006
|
-
var
|
|
65034
|
+
var xO = class {
|
|
65007
65035
|
constructor() {
|
|
65008
65036
|
this.id = 0, this.object = null, this.z = 0, this.renderOrder = 0;
|
|
65009
65037
|
}
|
|
65010
|
-
},
|
|
65038
|
+
}, SO = class {
|
|
65011
65039
|
constructor() {
|
|
65012
|
-
this.id = 0, this.v1 = new
|
|
65040
|
+
this.id = 0, this.v1 = new CO(), this.v2 = new CO(), this.v3 = new CO(), this.normalModel = new k(), this.vertexNormalsModel = [
|
|
65013
65041
|
new k(),
|
|
65014
65042
|
new k(),
|
|
65015
65043
|
new k()
|
|
@@ -65019,22 +65047,22 @@ var vO = class {
|
|
|
65019
65047
|
new P()
|
|
65020
65048
|
], this.z = 0, this.renderOrder = 0;
|
|
65021
65049
|
}
|
|
65022
|
-
},
|
|
65050
|
+
}, CO = class {
|
|
65023
65051
|
constructor() {
|
|
65024
65052
|
this.position = new k(), this.positionWorld = new k(), this.positionScreen = new ht(), this.visible = !0;
|
|
65025
65053
|
}
|
|
65026
65054
|
copy(e) {
|
|
65027
65055
|
this.positionWorld.copy(e.positionWorld), this.positionScreen.copy(e.positionScreen);
|
|
65028
65056
|
}
|
|
65029
|
-
},
|
|
65057
|
+
}, wO = class {
|
|
65030
65058
|
constructor() {
|
|
65031
|
-
this.id = 0, this.v1 = new
|
|
65059
|
+
this.id = 0, this.v1 = new CO(), this.v2 = new CO(), this.vertexColors = [new N(), new N()], this.material = null, this.z = 0, this.renderOrder = 0;
|
|
65032
65060
|
}
|
|
65033
|
-
},
|
|
65061
|
+
}, TO = class {
|
|
65034
65062
|
constructor() {
|
|
65035
65063
|
this.id = 0, this.object = null, this.x = 0, this.y = 0, this.z = 0, this.rotation = 0, this.scale = new P(), this.material = null, this.renderOrder = 0;
|
|
65036
65064
|
}
|
|
65037
|
-
},
|
|
65065
|
+
}, EO = class {
|
|
65038
65066
|
constructor() {
|
|
65039
65067
|
let e, t, n = 0, r, i, a = 0, o, s, c = 0, l, u, d = 0, f, p, m = 0, h, g = [], _ = [], v = {
|
|
65040
65068
|
objects: [],
|
|
@@ -65102,7 +65130,7 @@ var vO = class {
|
|
|
65102
65130
|
if (!(ee < 3)) {
|
|
65103
65131
|
for (let e = 0; e < ee; e++) {
|
|
65104
65132
|
let t = g[e], n = ce[e];
|
|
65105
|
-
n || (n = new
|
|
65133
|
+
n || (n = new CO(), ce[e] = n);
|
|
65106
65134
|
let r = 1 / t.w;
|
|
65107
65135
|
n.positionScreen.set(t.x * r, t.y * r, t.z * r, 1), n.positionWorld.copy(u.positionWorld), n.visible = !0;
|
|
65108
65136
|
}
|
|
@@ -65230,35 +65258,35 @@ var vO = class {
|
|
|
65230
65258
|
}
|
|
65231
65259
|
function ge() {
|
|
65232
65260
|
if (t === n) {
|
|
65233
|
-
let e = new
|
|
65261
|
+
let e = new xO();
|
|
65234
65262
|
return ee.push(e), n++, t++, e;
|
|
65235
65263
|
}
|
|
65236
65264
|
return ee[t++];
|
|
65237
65265
|
}
|
|
65238
65266
|
function _e() {
|
|
65239
65267
|
if (i === a) {
|
|
65240
|
-
let e = new
|
|
65268
|
+
let e = new CO();
|
|
65241
65269
|
return te.push(e), a++, i++, e;
|
|
65242
65270
|
}
|
|
65243
65271
|
return te[i++];
|
|
65244
65272
|
}
|
|
65245
65273
|
function ve() {
|
|
65246
65274
|
if (s === c) {
|
|
65247
|
-
let e = new
|
|
65275
|
+
let e = new SO();
|
|
65248
65276
|
return O.push(e), c++, s++, e;
|
|
65249
65277
|
}
|
|
65250
65278
|
return O[s++];
|
|
65251
65279
|
}
|
|
65252
65280
|
function ye() {
|
|
65253
65281
|
if (u === d) {
|
|
65254
|
-
let e = new
|
|
65282
|
+
let e = new wO();
|
|
65255
65283
|
return ne.push(e), d++, u++, e;
|
|
65256
65284
|
}
|
|
65257
65285
|
return ne[u++];
|
|
65258
65286
|
}
|
|
65259
65287
|
function be() {
|
|
65260
65288
|
if (p === m) {
|
|
65261
|
-
let e = new
|
|
65289
|
+
let e = new TO();
|
|
65262
65290
|
return re.push(e), m++, p++, e;
|
|
65263
65291
|
}
|
|
65264
65292
|
return re[p++];
|
|
@@ -65294,9 +65322,9 @@ var vO = class {
|
|
|
65294
65322
|
return i >= 0 && a >= 0 && o >= 0 && s >= 0 ? !0 : i < 0 && a < 0 || o < 0 && s < 0 ? !1 : (i < 0 ? n = Math.max(n, i / (i - a)) : a < 0 && (r = Math.min(r, i / (i - a))), o < 0 ? n = Math.max(n, o / (o - s)) : s < 0 && (r = Math.min(r, o / (o - s))), r < n ? !1 : (e.lerp(t, n), t.lerp(e, 1 - r), !0));
|
|
65295
65323
|
}
|
|
65296
65324
|
}
|
|
65297
|
-
},
|
|
65325
|
+
}, DO = class {
|
|
65298
65326
|
constructor() {
|
|
65299
|
-
let e, t, n, r, i, a, o, s, c, l, u, d = 0, f = 0, p = 0, m = null, h = 1, g, _, v = this, y = new sn(), b = new sn(), x = new N(), S = new N(), C = new N(), w = new N(), T = new N(), E = new N(), D = new k(), ee = new k(), te = new k(), O = new k(), ne = new kn(), re = new Ln(), ie = new Ln(), ae = [], oe = [], se = [], ce = new
|
|
65327
|
+
let e, t, n, r, i, a, o, s, c, l, u, d = 0, f = 0, p = 0, m = null, h = 1, g, _, v = this, y = new sn(), b = new sn(), x = new N(), S = new N(), C = new N(), w = new N(), T = new N(), E = new N(), D = new k(), ee = new k(), te = new k(), O = new k(), ne = new kn(), re = new Ln(), ie = new Ln(), ae = [], oe = [], se = [], ce = new EO(), le = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
65300
65328
|
this.domElement = le, this.autoClear = !0, this.sortObjects = !0, this.sortElements = !0, this.overdraw = .5, this.outputColorSpace = Kt, this.info = { render: {
|
|
65301
65329
|
vertices: 0,
|
|
65302
65330
|
faces: 0
|
|
@@ -65363,7 +65391,7 @@ var vO = class {
|
|
|
65363
65391
|
n.setAttribute("transform", "translate(" + e.x + "," + e.y + ")"), le.appendChild(n);
|
|
65364
65392
|
} else {
|
|
65365
65393
|
let e = t.data, n = t.material;
|
|
65366
|
-
b.makeEmpty(), e instanceof
|
|
65394
|
+
b.makeEmpty(), e instanceof TO ? (s = e, s.x *= a, s.y *= -o, he(s, e, n)) : e instanceof wO ? (s = e.v1, c = e.v2, s.positionScreen.x *= a, s.positionScreen.y *= -o, c.positionScreen.x *= a, c.positionScreen.y *= -o, b.setFromPoints([s.positionScreen, c.positionScreen]), y.intersectsBox(b) === !0 && ge(s, c, n)) : e instanceof SO && (s = e.v1, c = e.v2, l = e.v3, s.positionScreen.x *= a, s.positionScreen.y *= -o, c.positionScreen.x *= a, c.positionScreen.y *= -o, l.positionScreen.x *= a, l.positionScreen.y *= -o, this.overdraw > 0 && (ve(s.positionScreen, c.positionScreen, this.overdraw), ve(c.positionScreen, l.positionScreen, this.overdraw), ve(l.positionScreen, s.positionScreen, this.overdraw)), b.setFromPoints([
|
|
65367
65395
|
s.positionScreen,
|
|
65368
65396
|
c.positionScreen,
|
|
65369
65397
|
l.positionScreen
|
|
@@ -65446,20 +65474,20 @@ var vO = class {
|
|
|
65446
65474
|
}, se[e] = i, i) : (i.type = t, i.data = n, i.material = r, i);
|
|
65447
65475
|
}
|
|
65448
65476
|
}
|
|
65449
|
-
},
|
|
65477
|
+
}, OO = 1e3, kO = (e, t) => {
|
|
65450
65478
|
let n = Math.cos(t), r = Math.sin(t);
|
|
65451
65479
|
return new k(e.x * n - e.y * r, e.x * r + e.y * n, 0);
|
|
65452
|
-
},
|
|
65453
|
-
let r = new k(n.x - t.x, n.y - t.y, 0).normalize(), i =
|
|
65454
|
-
x: a.x + e.x *
|
|
65455
|
-
y: a.y + e.y *
|
|
65480
|
+
}, AO = (e, t, n) => {
|
|
65481
|
+
let r = new k(n.x - t.x, n.y - t.y, 0).normalize(), i = kO(r, -e.deflectionAngleInRadians), { connectionPosition: a } = e, o = (e) => ({
|
|
65482
|
+
x: a.x + e.x * OO,
|
|
65483
|
+
y: a.y + e.y * OO,
|
|
65456
65484
|
z: a.z
|
|
65457
65485
|
});
|
|
65458
65486
|
return {
|
|
65459
65487
|
moduleLegPoint: o(r),
|
|
65460
65488
|
postLegPoint: o(i)
|
|
65461
65489
|
};
|
|
65462
|
-
},
|
|
65490
|
+
}, jO = (e, t) => {
|
|
65463
65491
|
let n = t.z > e.z, r = n ? e : t, i = n ? t : e;
|
|
65464
65492
|
return {
|
|
65465
65493
|
vertex: r,
|
|
@@ -65470,35 +65498,35 @@ var vO = class {
|
|
|
65470
65498
|
z: r.z
|
|
65471
65499
|
}
|
|
65472
65500
|
};
|
|
65473
|
-
},
|
|
65501
|
+
}, MO = 1, NO = .4, PO = 1.4, FO = 4, IO = 5, LO = 120, RO = (e, t, n, r, i, a) => {
|
|
65474
65502
|
let o = document.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
65475
65503
|
o.setAttribute("d", `M${t.x},${t.y} A${r},${r} 0 0,${i ? 1 : 0} ${n.x},${n.y}`), o.setAttribute("style", wf(a)), e.appendChild(o);
|
|
65476
|
-
},
|
|
65477
|
-
let o = new k().subVectors(n, t), s = new k().subVectors(r, t), c = Math.atan2(o.x * s.y - o.y * s.x, o.x * s.x + o.y * s.y), l = Math.abs(hn.radToDeg(c)).toFixed(
|
|
65504
|
+
}, zO = (e, t, n, r, i, a) => {
|
|
65505
|
+
let o = new k().subVectors(n, t), s = new k().subVectors(r, t), c = Math.atan2(o.x * s.y - o.y * s.x, o.x * s.x + o.y * s.y), l = Math.abs(hn.radToDeg(c)).toFixed(MO);
|
|
65478
65506
|
if (Number(l) === 0) return;
|
|
65479
|
-
let u = Math.min(o.length(), s.length()), d = 2 * u *
|
|
65507
|
+
let u = Math.min(o.length(), s.length()), d = 2 * u * NO * Math.sin(Math.abs(c) / 2) >= i * PO, f = d ? u * NO : u, p = o.clone().normalize(), m = d ? 0 : IO / f, h = (e) => kO(p, e), g = h(c / 2), _ = `${l}°`, { width: v, height: y } = Af(_, i), b = Math.abs(g.x) * (v / 2) + Math.abs(g.y) * (y / 2), x = t.clone().addScaledVector(g, f + FO + b);
|
|
65480
65508
|
jf(e, x.x, x.y, 0, _, i, a.color), Tf(e, [
|
|
65481
65509
|
n,
|
|
65482
65510
|
t,
|
|
65483
65511
|
r
|
|
65484
65512
|
], a);
|
|
65485
65513
|
let S = c > 0 ? 1 : -1;
|
|
65486
|
-
|
|
65487
|
-
},
|
|
65514
|
+
RO(e, t.clone().addScaledVector(h(-S * m), f), t.clone().addScaledVector(h(c + S * m), f), f, c > 0, a);
|
|
65515
|
+
}, BO = (e, t, n) => e.clone().addScaledVector(new k().subVectors(t, e).normalize(), n), VO = (e, t, n, r, i, a) => {
|
|
65488
65516
|
if (!t) return;
|
|
65489
|
-
let { moduleLegPoint: o, postLegPoint: s } =
|
|
65490
|
-
|
|
65491
|
-
},
|
|
65492
|
-
|
|
65493
|
-
}),
|
|
65494
|
-
let { vertex: a, slopeLegPoint: o, horizontalLegPoint: s } =
|
|
65495
|
-
|
|
65496
|
-
},
|
|
65497
|
-
|
|
65498
|
-
}),
|
|
65499
|
-
let n =
|
|
65500
|
-
return Math.abs(
|
|
65501
|
-
},
|
|
65517
|
+
let { moduleLegPoint: o, postLegPoint: s } = AO(t, n, r), c = i(R(t.connectionPosition)), l = (e) => BO(c, i(R(e)), LO);
|
|
65518
|
+
zO(e, c, l(o), l(s), 13, a);
|
|
65519
|
+
}, HO = (e, t, n, r) => t.forEach((t) => {
|
|
65520
|
+
VO(e, t.startDeflection, t.start, t.end, n, r), VO(e, t.endDeflection, t.end, t.start, n, r);
|
|
65521
|
+
}), UO = (e, t, n, r, i) => {
|
|
65522
|
+
let { vertex: a, slopeLegPoint: o, horizontalLegPoint: s } = jO(t.position, n.position), c = r(R(a)), l = r(R(s)), u = Math.min(LO, c.distanceTo(l));
|
|
65523
|
+
zO(e, c, BO(c, l, u), BO(c, r(R(o)), u), 13, i);
|
|
65524
|
+
}, WO = (e, t, n, r) => t.slice(0, -1).forEach((i, a) => {
|
|
65525
|
+
UO(e, i, t[a + 1], n, r);
|
|
65526
|
+
}), GO = 1, KO = Math.sin(hn.degToRad(1)), qO = (e, t) => e.x * t.y - e.y * t.x, JO = ({ from: e, to: t }) => new k().subVectors(t, e).normalize(), YO = (e, t) => {
|
|
65527
|
+
let n = JO(e), r = new k().subVectors(t.from, e.from);
|
|
65528
|
+
return Math.abs(qO(n, JO(t))) < KO && Math.abs(qO(n, r)) < GO;
|
|
65529
|
+
}, XO = (e, t, n) => {
|
|
65502
65530
|
let r = new P().subVectors(t, e), i = [
|
|
65503
65531
|
[-r.x, e.x - n.min.x],
|
|
65504
65532
|
[r.x, n.max.x - e.x],
|
|
@@ -65514,10 +65542,10 @@ var vO = class {
|
|
|
65514
65542
|
e < 0 ? a = Math.max(a, n) : o = Math.min(o, n);
|
|
65515
65543
|
}
|
|
65516
65544
|
return Math.max(0, o - a) * r.length();
|
|
65517
|
-
},
|
|
65518
|
-
let [r] = e, i =
|
|
65545
|
+
}, ZO = (e, t, n) => {
|
|
65546
|
+
let [r] = e, i = JO(r), a = (e) => new k().subVectors(e, r.from).dot(i), o = e.flatMap(({ from: e, to: t }) => [a(e), a(t)]), s = Math.min(...o), c = r.from.clone().addScaledVector(i, s), l = Math.max(...o) - s, u = Math.max(...e.map(({ labelDistance: e }) => e)), d = [new sn(new P(GO, GO), new P(l - GO, u)), ...e.map(({ from: e, to: t, labelDistance: n, labelSize: r }) => {
|
|
65519
65547
|
let i = (a(e) + a(t)) / 2 - s;
|
|
65520
|
-
return new sn(new P(i - r.width / 2, Math.max(
|
|
65548
|
+
return new sn(new P(i - r.width / 2, Math.max(GO, n - r.height)), new P(i + r.width / 2, n + r.height));
|
|
65521
65549
|
})], f = (e) => {
|
|
65522
65550
|
let n = (t) => {
|
|
65523
65551
|
let n = new k().subVectors(t, c);
|
|
@@ -65525,75 +65553,75 @@ var vO = class {
|
|
|
65525
65553
|
};
|
|
65526
65554
|
return t.reduce((e, t) => {
|
|
65527
65555
|
let r = n(t.start), i = n(t.end);
|
|
65528
|
-
return e + d.reduce((e, t) => e +
|
|
65529
|
-
}, 0) <
|
|
65556
|
+
return e + d.reduce((e, t) => e + XO(r, i, t), 0);
|
|
65557
|
+
}, 0) < GO;
|
|
65530
65558
|
}, p = new k(-i.y, i.x, 0), m = [p, p.clone().negate()].filter(f);
|
|
65531
65559
|
if (m.length === 1) return m[0];
|
|
65532
65560
|
if (!n) return null;
|
|
65533
65561
|
let h = c.clone().addScaledVector(i, l / 2), g = new k().subVectors(h, n).dot(p);
|
|
65534
65562
|
return g === 0 ? null : g > 0 ? p : p.negate();
|
|
65535
|
-
},
|
|
65563
|
+
}, QO = (e, t, n) => {
|
|
65536
65564
|
let r = [];
|
|
65537
|
-
e.filter(({ from: e, to: t }) => e.distanceTo(t) >=
|
|
65538
|
-
let t = r.find(([t]) =>
|
|
65565
|
+
e.filter(({ from: e, to: t }) => e.distanceTo(t) >= GO).forEach((e) => {
|
|
65566
|
+
let t = r.find(([t]) => YO(t, e));
|
|
65539
65567
|
t ? t.push(e) : r.push([e]);
|
|
65540
65568
|
});
|
|
65541
65569
|
let i = /* @__PURE__ */ new Map();
|
|
65542
65570
|
return r.forEach((e) => {
|
|
65543
|
-
let r =
|
|
65571
|
+
let r = ZO(e, t, n);
|
|
65544
65572
|
e.forEach((e) => i.set(e, r));
|
|
65545
65573
|
}), e.map((e) => i.get(e) ?? null);
|
|
65546
|
-
},
|
|
65574
|
+
}, $O = /M(-?[\d.]+),(-?[\d.]+)L(-?[\d.]+),(-?[\d.]+)/g, ek = (e) => e === "-0" ? "0" : e, tk = (e, t) => `${ek(e)},${ek(t)}`, nk = (e) => e.replace(/ d="([^"]*)"/g, (e, t) => {
|
|
65547
65575
|
let n = /* @__PURE__ */ new Set();
|
|
65548
|
-
return ` d="${t.replace(
|
|
65549
|
-
let o =
|
|
65576
|
+
return ` d="${t.replace($O, (e, t, r, i, a) => {
|
|
65577
|
+
let o = tk(t, r), s = tk(i, a);
|
|
65550
65578
|
if (o === s) return "";
|
|
65551
65579
|
let c = o < s ? `${o}|${s}` : `${s}|${o}`;
|
|
65552
65580
|
return n.has(c) ? "" : (n.add(c), e);
|
|
65553
65581
|
})}"`;
|
|
65554
|
-
}),
|
|
65555
|
-
let t =
|
|
65582
|
+
}), rk = async (e) => {
|
|
65583
|
+
let t = nk(e), { optimize: n } = await import("./svgo.browser-gKngRVwn.mjs"), { data: r } = n(t, {
|
|
65556
65584
|
multipass: !0,
|
|
65557
65585
|
floatPrecision: 0
|
|
65558
65586
|
});
|
|
65559
65587
|
return r || t;
|
|
65560
|
-
},
|
|
65588
|
+
}, ik = {
|
|
65561
65589
|
color: "#404040",
|
|
65562
65590
|
width: 1.5
|
|
65563
|
-
},
|
|
65591
|
+
}, ak = {
|
|
65564
65592
|
color: "#000000",
|
|
65565
65593
|
width: 1
|
|
65566
|
-
},
|
|
65567
|
-
color:
|
|
65568
|
-
width: t ??
|
|
65569
|
-
}),
|
|
65570
|
-
color:
|
|
65571
|
-
width: t ??
|
|
65572
|
-
}),
|
|
65594
|
+
}, ok = (e, t) => e ? `#${new N(t).setStyle(e.trim()).getHexString()}` : t, sk = ({ lineColor: e, lineWidth: t }) => ({
|
|
65595
|
+
color: ok(e, ik.color),
|
|
65596
|
+
width: t ?? ik.width
|
|
65597
|
+
}), ck = ({ dimensioningColor: e, dimensioningLineWidth: t }) => ({
|
|
65598
|
+
color: ok(e, ak.color),
|
|
65599
|
+
width: t ?? ak.width
|
|
65600
|
+
}), lk = Math.sin(hn.degToRad(5)), uk = 26, dk = (e, { from: t, to: n }) => {
|
|
65573
65601
|
let r = R(e.origin), i = R(e.direction).normalize();
|
|
65574
65602
|
return {
|
|
65575
65603
|
fromPoint: r.clone().addScaledVector(i, t / 1e3),
|
|
65576
65604
|
toPoint: r.clone().addScaledVector(i, n / 1e3)
|
|
65577
65605
|
};
|
|
65578
|
-
},
|
|
65579
|
-
if (e !==
|
|
65606
|
+
}, fk = "y", pk = (e, t, n, r) => {
|
|
65607
|
+
if (e !== fk) return;
|
|
65580
65608
|
let i = R(t.origin).y + ur(t.size).y;
|
|
65581
65609
|
n.setY(i), r.setY(i);
|
|
65582
|
-
},
|
|
65610
|
+
}, mk = (e, t) => {
|
|
65583
65611
|
let n = new M(), r = new Ln();
|
|
65584
65612
|
return t.forEach((t) => {
|
|
65585
65613
|
t.updateMatrixWorld(!0), t.meshes.forEach((t) => {
|
|
65586
65614
|
t.updateWorldMatrix(!0, !1), t.geometry.boundingBox || t.geometry.computeBoundingBox(), r.multiplyMatrices(e.matrixWorldInverse, t.matrixWorld), n.union(t.geometry.boundingBox.clone().applyMatrix4(r));
|
|
65587
65615
|
});
|
|
65588
65616
|
}), n;
|
|
65589
|
-
},
|
|
65617
|
+
}, hk = (e, t) => {
|
|
65590
65618
|
let n = [];
|
|
65591
65619
|
return e.traverse((e) => {
|
|
65592
65620
|
if (!e.isLineSegments) return;
|
|
65593
65621
|
let { geometry: r, matrixWorld: i } = e, a = r.getAttribute("position"), o = (e) => t(new k().fromBufferAttribute(a, e).applyMatrix4(i));
|
|
65594
65622
|
for (let e = 0; e + 1 < a.count; e += 2) n.push(new ot(o(e), o(e + 1)));
|
|
65595
65623
|
}), n;
|
|
65596
|
-
},
|
|
65624
|
+
}, gk = (e, t) => {
|
|
65597
65625
|
let { min: n, max: r } = e, i = (e, n) => new k(e, n, r.z).applyMatrix4(t);
|
|
65598
65626
|
return [{
|
|
65599
65627
|
fromPoint: i(n.x, r.y),
|
|
@@ -65602,7 +65630,7 @@ var vO = class {
|
|
|
65602
65630
|
fromPoint: i(n.x, n.y),
|
|
65603
65631
|
toPoint: i(n.x, r.y)
|
|
65604
65632
|
}];
|
|
65605
|
-
},
|
|
65633
|
+
}, _k = class e {
|
|
65606
65634
|
static {
|
|
65607
65635
|
this.SVG_PADDING = 30;
|
|
65608
65636
|
}
|
|
@@ -65619,8 +65647,8 @@ var vO = class {
|
|
|
65619
65647
|
a.remove();
|
|
65620
65648
|
}
|
|
65621
65649
|
}
|
|
65622
|
-
return
|
|
65623
|
-
}, this._creator_ = e, this.svgRenderer = new
|
|
65650
|
+
return rk(n.outerHTML);
|
|
65651
|
+
}, this._creator_ = e, this.svgRenderer = new DO(), this.svgRenderer.setSize(512, 512), this.svgRenderer.setQuality("high"), this.svgRenderer.setPrecision(0), this.svgRenderer.domElement.style.display = "block", this.svgRenderer.domElement.setAttribute("xmlns", "http://www.w3.org/2000/svg"), this.svgRenderer.domElement.innerHTML = "";
|
|
65624
65652
|
}
|
|
65625
65653
|
resizeSvgToScale(e, t) {
|
|
65626
65654
|
let n = e.right - e.left, r = e.top - e.bottom;
|
|
@@ -65628,19 +65656,19 @@ var vO = class {
|
|
|
65628
65656
|
}
|
|
65629
65657
|
async renderWithDimensionings(t, n, r, i, a) {
|
|
65630
65658
|
n.updateProjectionMatrix(), n.updateMatrixWorld(!0), this.resizeSvgToScale(n, a), this.svgRenderer.render(t, n);
|
|
65631
|
-
let o = this.createViewProjection(n, r, t), s = r.flatMap((e) => this.dimensionsOfComponent(n, e, o)), c = s.reduce((e, t) => t === null ? e : Math.max(e, t.labelDistance +
|
|
65632
|
-
return u.forEach(({ from: e, to: t, labelDistance: n, label: r }, i) => Ff(this.svgRenderer.domElement, m, e, t, n, 13, f, r, o.planToSvgScaleMm, p, d[i])), this.svgRenderer.domElement.appendChild(m),
|
|
65659
|
+
let o = this.createViewProjection(n, r, t), s = r.flatMap((e) => this.dimensionsOfComponent(n, e, o)), c = s.reduce((e, t) => t === null ? e : Math.max(e, t.labelDistance + uk), e.SVG_PADDING), l = [...s, ...i.objectRuntimeIds.flatMap((e) => this.dimensionsOfObject(n, e, r, o, c))], u = (l.length > 0 ? l : this.measurementBoxDimensions(n, r, o)).filter((e) => e !== null), d = QO(u, o.drawnLines, o.drawingCentre), f = ck(i), p = [], m = document.createElementNS("http://www.w3.org/2000/svg", "g");
|
|
65660
|
+
return u.forEach(({ from: e, to: t, labelDistance: n, label: r }, i) => Ff(this.svgRenderer.domElement, m, e, t, n, 13, f, r, o.planToSvgScaleMm, p, d[i])), this.svgRenderer.domElement.appendChild(m), HO(this.svgRenderer.domElement, i.floorPlanEdges.edges, o.toSvg, f), WO(this.svgRenderer.domElement, i.profile.profileContour, o.toSvg, f), this.exportSvgAsString(e.SVG_PADDING, i.label);
|
|
65633
65661
|
}
|
|
65634
65662
|
createViewProjection(e, t, n) {
|
|
65635
65663
|
let { width: r, height: i } = this.svgRenderer.getSize(), a = (t) => {
|
|
65636
65664
|
let n = t.clone().project(e);
|
|
65637
65665
|
return new k(n.x * r / 2, -n.y * i / 2, 0);
|
|
65638
|
-
}, o =
|
|
65666
|
+
}, o = mk(e, t);
|
|
65639
65667
|
return {
|
|
65640
65668
|
toSvg: a,
|
|
65641
65669
|
planToSvgScaleMm: r / 2 / ((e.right - e.left) / 2 * 1e3),
|
|
65642
65670
|
drawingCentre: o.isEmpty() ? null : a(o.getCenter(new k()).applyMatrix4(e.matrixWorld)),
|
|
65643
|
-
drawnLines:
|
|
65671
|
+
drawnLines: hk(n, a)
|
|
65644
65672
|
};
|
|
65645
65673
|
}
|
|
65646
65674
|
dimensionsOfComponent(t, n, r) {
|
|
@@ -65648,9 +65676,9 @@ var vO = class {
|
|
|
65648
65676
|
return n.updateMatrixWorld(!0), a.map((a) => {
|
|
65649
65677
|
let s = o.find((e) => e.key === a.axis);
|
|
65650
65678
|
if (!s) return null;
|
|
65651
|
-
let { fromPoint: c, toPoint: l } =
|
|
65652
|
-
|
|
65653
|
-
let u = e.SVG_PADDING +
|
|
65679
|
+
let { fromPoint: c, toPoint: l } = dk(s, a);
|
|
65680
|
+
pk(s.key, i.boxForMeasurement, c, l), c.applyMatrix4(n.matrixWorld), l.applyMatrix4(n.matrixWorld);
|
|
65681
|
+
let u = e.SVG_PADDING + uk * (a.maxLevel - a.level);
|
|
65654
65682
|
return this.dimensionInView(t, r, c, l, u, Math.abs(a.to - a.from));
|
|
65655
65683
|
});
|
|
65656
65684
|
}
|
|
@@ -65662,15 +65690,15 @@ var vO = class {
|
|
|
65662
65690
|
return o.map((t) => {
|
|
65663
65691
|
let n = s.find((e) => e.key === t.axis);
|
|
65664
65692
|
if (!n) return null;
|
|
65665
|
-
let { fromPoint: a, toPoint: o } =
|
|
65693
|
+
let { fromPoint: a, toPoint: o } = dk(n, t);
|
|
65666
65694
|
a.applyMatrix4(u), o.applyMatrix4(u);
|
|
65667
|
-
let c = i +
|
|
65695
|
+
let c = i + uk * (t.maxLevel - t.level);
|
|
65668
65696
|
return this.dimensionInView(e, r, a, o, c, Math.abs(t.to - t.from));
|
|
65669
65697
|
});
|
|
65670
65698
|
}
|
|
65671
65699
|
measurementBoxDimensions(t, n, r) {
|
|
65672
65700
|
let i = this.measurementBoxInViewPlane(t, n);
|
|
65673
|
-
return i.isEmpty() ? [] :
|
|
65701
|
+
return i.isEmpty() ? [] : gk(i, t.matrixWorld).map(({ fromPoint: n, toPoint: i }) => this.dimensionInView(t, r, n, i, e.SVG_PADDING, n.distanceTo(i) * 1e3));
|
|
65674
65702
|
}
|
|
65675
65703
|
measurementBoxInViewPlane(e, t) {
|
|
65676
65704
|
let n = new M(), r = new Ln();
|
|
@@ -65681,7 +65709,7 @@ var vO = class {
|
|
|
65681
65709
|
}
|
|
65682
65710
|
dimensionInView(e, { toSvg: t }, n, r, i, a) {
|
|
65683
65711
|
let o = new k().subVectors(r, n).normalize(), s = e.getWorldDirection(new k());
|
|
65684
|
-
if (!(Math.abs(o.dot(s)) <
|
|
65712
|
+
if (!(Math.abs(o.dot(s)) < lk)) return null;
|
|
65685
65713
|
let c = t(n), l = t(r), u = this._unitFormatter.formatMMValueToUnitString(a);
|
|
65686
65714
|
return {
|
|
65687
65715
|
from: c,
|
|
@@ -65695,10 +65723,10 @@ var vO = class {
|
|
|
65695
65723
|
};
|
|
65696
65724
|
}
|
|
65697
65725
|
};
|
|
65698
|
-
L([I, F("design:type", Object)],
|
|
65726
|
+
L([I, F("design:type", Object)], _k.prototype, "_plannerKernelAccess", void 0), L([I, F("design:type", Object)], _k.prototype, "_unitFormatter", void 0);
|
|
65699
65727
|
//#endregion
|
|
65700
65728
|
//#region packages/configurator-core/src/elevation-plan/outline-extractor.ts
|
|
65701
|
-
var
|
|
65729
|
+
var vk = .01 / 1e3, yk = [
|
|
65702
65730
|
0,
|
|
65703
65731
|
-1,
|
|
65704
65732
|
1
|
|
@@ -65714,19 +65742,19 @@ var hk = .01 / 1e3, gk = [
|
|
|
65714
65742
|
e,
|
|
65715
65743
|
t,
|
|
65716
65744
|
n
|
|
65717
|
-
]))),
|
|
65745
|
+
]))), bk = .5 / 1e3, xk = .01 / 1e3, Sk = .05 / 1e3, Ck = 1, wk = 3, Tk = hn.degToRad(1), Ek = Math.sin(Tk), Dk = Math.cos(Tk), Ok = hn.degToRad(15), kk = .001 / 1e3, Ak = (e, t) => {
|
|
65718
65746
|
let n = -e.dot(t);
|
|
65719
|
-
return n >
|
|
65720
|
-
},
|
|
65747
|
+
return n > Ek ? "front" : n < -Ek ? "back" : "edgeOn";
|
|
65748
|
+
}, jk = (e, t) => {
|
|
65721
65749
|
e.updateWorldMatrix(!0, !1);
|
|
65722
65750
|
let n = e.geometry.getAttribute("position"), r = e.geometry.getAttribute("normal"), i = e.geometry.getIndex(), a = new kn().getNormalMatrix(e.matrixWorld), o = e.matrixWorld.determinant() < 0 ? -1 : 1, s = /* @__PURE__ */ new Map(), c = 0, l = (e) => {
|
|
65723
65751
|
let t = [
|
|
65724
65752
|
e.x,
|
|
65725
65753
|
e.y,
|
|
65726
65754
|
e.z
|
|
65727
|
-
].map((e) => Math.round(e /
|
|
65728
|
-
for (let n of
|
|
65729
|
-
let r = s.get(t.map((e, t) => e + n[t]).join(","))?.find(({ position: t }) => t.distanceToSquared(e) <=
|
|
65755
|
+
].map((e) => Math.round(e / vk));
|
|
65756
|
+
for (let n of yk) {
|
|
65757
|
+
let r = s.get(t.map((e, t) => e + n[t]).join(","))?.find(({ position: t }) => t.distanceToSquared(e) <= vk * vk);
|
|
65730
65758
|
if (r) return r.id;
|
|
65731
65759
|
}
|
|
65732
65760
|
let n = c;
|
|
@@ -65743,18 +65771,18 @@ var hk = .01 / 1e3, gk = [
|
|
|
65743
65771
|
1,
|
|
65744
65772
|
2
|
|
65745
65773
|
].map((e) => i ? i.getX(s + e) : s + e), u = c.map((t) => new k().fromBufferAttribute(n, t).applyMatrix4(e.matrixWorld)), f = new k().subVectors(u[1], u[0]).cross(new k().subVectors(u[2], u[0])), p = Math.max(...u.map((e, t) => e.distanceTo(u[(t + 1) % 3])));
|
|
65746
|
-
if (f.length() <=
|
|
65774
|
+
if (f.length() <= kk * p) continue;
|
|
65747
65775
|
let m = u.map(l);
|
|
65748
65776
|
new Set(m).size < 3 || (f.normalize().multiplyScalar(o), d.push({
|
|
65749
65777
|
corners: u,
|
|
65750
65778
|
cornerNormals: c.map((e) => r ? new k().fromBufferAttribute(r, e).applyMatrix3(a).normalize() : f.clone()),
|
|
65751
65779
|
weldedCorners: m,
|
|
65752
65780
|
normal: f,
|
|
65753
|
-
facing:
|
|
65781
|
+
facing: Ak(f, t)
|
|
65754
65782
|
}));
|
|
65755
65783
|
}
|
|
65756
65784
|
return d;
|
|
65757
|
-
},
|
|
65785
|
+
}, Mk = (e) => {
|
|
65758
65786
|
let t = /* @__PURE__ */ new Map();
|
|
65759
65787
|
return e.forEach((e) => {
|
|
65760
65788
|
for (let n = 0; n < 3; n += 1) {
|
|
@@ -65766,19 +65794,19 @@ var hk = .01 / 1e3, gk = [
|
|
|
65766
65794
|
c ? c.push(s) : t.set(o, [s]);
|
|
65767
65795
|
}
|
|
65768
65796
|
}), t;
|
|
65769
|
-
},
|
|
65797
|
+
}, Nk = (e, t) => e.triangle.weldedCorners[e.startCorner] === t ? e.triangle.cornerNormals[e.startCorner] : e.triangle.cornerNormals[e.endCorner], Pk = (e) => {
|
|
65770
65798
|
let [t] = e, n = [t.triangle.weldedCorners[t.startCorner], t.triangle.weldedCorners[t.endCorner]], r = !1, i = 0, a = 0;
|
|
65771
65799
|
return e.forEach((t, o) => {
|
|
65772
65800
|
e.slice(o + 1).forEach((e) => {
|
|
65773
65801
|
n.forEach((n) => {
|
|
65774
|
-
|
|
65802
|
+
Nk(t, n).angleTo(Nk(e, n)) > Tk && (r = !0);
|
|
65775
65803
|
});
|
|
65776
65804
|
let o = t.triangle.normal.angleTo(e.triangle.normal);
|
|
65777
65805
|
a = Math.max(a, o), i = Math.max(i, Math.min(o, Math.PI - o));
|
|
65778
65806
|
});
|
|
65779
|
-
}), r && i >
|
|
65780
|
-
},
|
|
65781
|
-
let i = Math.max(
|
|
65807
|
+
}), r && i > Tk && a >= Ok;
|
|
65808
|
+
}, Fk = (e, t, n, r) => {
|
|
65809
|
+
let i = Math.max(wk, Math.ceil(e.distanceTo(t) / n)), a = [], o = null;
|
|
65782
65810
|
for (let n = 0; n <= i; n += 1) {
|
|
65783
65811
|
let s = n < i && r(new k().lerpVectors(e, t, (n + .5) / i));
|
|
65784
65812
|
s && o === null && (o = n), !s && o !== null && (a.push({
|
|
@@ -65787,21 +65815,21 @@ var hk = .01 / 1e3, gk = [
|
|
|
65787
65815
|
}), o = null);
|
|
65788
65816
|
}
|
|
65789
65817
|
return a;
|
|
65790
|
-
},
|
|
65818
|
+
}, Ik = (e, t, n) => {
|
|
65791
65819
|
let r = new k();
|
|
65792
65820
|
return n.shapecast({
|
|
65793
|
-
intersectsBounds: (t) => t.distanceToPoint(e) <=
|
|
65794
|
-
intersectsTriangle: (n) => Math.abs(n.getNormal(r).dot(t)) >
|
|
65821
|
+
intersectsBounds: (t) => t.distanceToPoint(e) <= xk,
|
|
65822
|
+
intersectsTriangle: (n) => Math.abs(n.getNormal(r).dot(t)) > Dk && n.distanceToPoint(e) <= xk
|
|
65795
65823
|
});
|
|
65796
|
-
},
|
|
65824
|
+
}, Lk = (e, t, n, r, i) => {
|
|
65797
65825
|
let { triangle: a, startCorner: o, endCorner: s } = e, c = new k().addVectors(t, n).multiplyScalar(.5), l = new k().subVectors(n, t).cross(a.normal).normalize(), u = new k().subVectors(a.corners[3 - o - s], c);
|
|
65798
|
-
return l.dot(u) > 0 && l.negate(),
|
|
65799
|
-
},
|
|
65826
|
+
return l.dot(u) > 0 && l.negate(), Fk(t, n, r, (e) => !Ik(e.clone().addScaledVector(l, bk), a.normal, i));
|
|
65827
|
+
}, Rk = (e, t, n) => {
|
|
65800
65828
|
let r = [];
|
|
65801
|
-
return
|
|
65829
|
+
return Mk(e).forEach((e) => {
|
|
65802
65830
|
let [i] = e, a = i.triangle.corners[i.startCorner], o = i.triangle.corners[i.endCorner];
|
|
65803
65831
|
if (e.length === 1) {
|
|
65804
|
-
r.push(...
|
|
65832
|
+
r.push(...Lk(i, a, o, t, n));
|
|
65805
65833
|
return;
|
|
65806
65834
|
}
|
|
65807
65835
|
let s = e.map(({ triangle: e }) => e.facing);
|
|
@@ -65813,42 +65841,42 @@ var hk = .01 / 1e3, gk = [
|
|
|
65813
65841
|
});
|
|
65814
65842
|
return;
|
|
65815
65843
|
}
|
|
65816
|
-
|
|
65844
|
+
Pk(e) && r.push({
|
|
65817
65845
|
start: a,
|
|
65818
65846
|
end: o
|
|
65819
65847
|
});
|
|
65820
65848
|
}
|
|
65821
65849
|
}), r;
|
|
65822
|
-
},
|
|
65850
|
+
}, zk = (e) => {
|
|
65823
65851
|
let t = new M();
|
|
65824
65852
|
return e.forEach(({ corners: e }) => e.forEach((e) => t.expandByPoint(e))), t.getSize(new k()).length() * 2;
|
|
65825
|
-
},
|
|
65853
|
+
}, Bk = (e, t, n, r, i) => {
|
|
65826
65854
|
let a = new _t(new k(), t.clone());
|
|
65827
|
-
return
|
|
65828
|
-
},
|
|
65855
|
+
return Fk(e.start, e.end, r, (e) => (a.origin.copy(e).addScaledVector(t, -n), i.raycastFirst(a, 2, 0, n - Sk) === null));
|
|
65856
|
+
}, Vk = async (e) => {
|
|
65829
65857
|
let t = new Float32Array(e.length * 9);
|
|
65830
65858
|
e.forEach((e, n) => e.corners.forEach((e, r) => e.toArray(t, n * 9 + r * 3)));
|
|
65831
65859
|
let n = new pn();
|
|
65832
65860
|
n.setAttribute("position", new Rn(t, 3));
|
|
65833
65861
|
let { MeshBVH: r } = await import("./src-C4Ruhiao.mjs");
|
|
65834
65862
|
return new r(n);
|
|
65835
|
-
},
|
|
65836
|
-
let r = t.clone().normalize(), i = e.map((e) =>
|
|
65863
|
+
}, Hk = async (e, t, n) => {
|
|
65864
|
+
let r = t.clone().normalize(), i = e.map((e) => jk(e, r)), a = i.flat();
|
|
65837
65865
|
if (a.length === 0) return new Float32Array();
|
|
65838
|
-
let o = await
|
|
65866
|
+
let o = await Vk(a), s = zk(a), c = Ck / n, l = i.flatMap((e) => Rk(e, c, o)).flatMap((e) => Bk(e, r, s, c, o)), u = new Float32Array(l.length * 6);
|
|
65839
65867
|
return l.forEach(({ start: e, end: t }, n) => {
|
|
65840
65868
|
e.toArray(u, n * 6), t.toArray(u, n * 6 + 3);
|
|
65841
65869
|
}), u;
|
|
65842
|
-
},
|
|
65870
|
+
}, Uk = async (e, t, n, { color: r, width: i }) => {
|
|
65843
65871
|
let a = new Wt(), o = new pn();
|
|
65844
|
-
return o.setAttribute("position", new Rn(await
|
|
65872
|
+
return o.setAttribute("position", new Rn(await Hk(e, t, n), 3)), a.add(new Dt(o, new qt({
|
|
65845
65873
|
color: r,
|
|
65846
65874
|
linewidth: i
|
|
65847
65875
|
}))), a;
|
|
65848
|
-
},
|
|
65876
|
+
}, Wk = (e) => {
|
|
65849
65877
|
let t = e.filter(({ view: e }) => e.viewType.value !== Ae.FLOOR), n = t.length > 0 ? t : e;
|
|
65850
65878
|
return 512 / Math.max(...n.map(({ camera: e }) => e.top - e.bottom));
|
|
65851
|
-
},
|
|
65879
|
+
}, Gk = class {
|
|
65852
65880
|
constructor(e) {
|
|
65853
65881
|
this.createCameraForPlanView = (e, t) => {
|
|
65854
65882
|
let n = new M();
|
|
@@ -65876,9 +65904,9 @@ var hk = .01 / 1e3, gk = [
|
|
|
65876
65904
|
async create2DPlanViews(e, t) {
|
|
65877
65905
|
let n = e.map((e) => this.preparePlanView(e, t)).filter((e) => e !== null);
|
|
65878
65906
|
if (n.length === 0) return { plans: [] };
|
|
65879
|
-
let r =
|
|
65907
|
+
let r = Wk(n), i = [];
|
|
65880
65908
|
for (let e of n) {
|
|
65881
|
-
let t = await this._roomleSvgRenderer.renderWithDimensionings(await
|
|
65909
|
+
let t = await this._roomleSvgRenderer.renderWithDimensionings(await Uk(e.meshesToRender, e.camera.getWorldDirection(new k()), r, sk(e.view)), e.camera, e.componentsToRender, e.view, r);
|
|
65882
65910
|
i.push({
|
|
65883
65911
|
planSvg: t,
|
|
65884
65912
|
viewType: e.view.viewType,
|
|
@@ -65903,10 +65931,10 @@ var hk = .01 / 1e3, gk = [
|
|
|
65903
65931
|
};
|
|
65904
65932
|
}
|
|
65905
65933
|
};
|
|
65906
|
-
L([I, F("design:type", Object)],
|
|
65934
|
+
L([I, F("design:type", Object)], Gk.prototype, "_roomleSvgRenderer", void 0);
|
|
65907
65935
|
//#endregion
|
|
65908
65936
|
//#region packages/common-core/src/webgpu/web-gpu-sky-container.ts
|
|
65909
|
-
var
|
|
65937
|
+
var Kk = 100, qk = 50, Jk = 1.1, Yk = .1, Xk = 2048, Zk = hn.degToRad(25), Qk = hn.degToRad(10), $k = new N(16777215), eA = new N(16306595), tA = class {
|
|
65910
65938
|
constructor(e) {
|
|
65911
65939
|
this._sky = void 0, this._sunLight = void 0, this._creator_ = e;
|
|
65912
65940
|
}
|
|
@@ -65922,19 +65950,19 @@ var Uk = 100, Wk = 50, Gk = 1.1, Kk = .1, qk = 2048, Jk = hn.degToRad(25), Yk =
|
|
|
65922
65950
|
}
|
|
65923
65951
|
syncSunLightColor() {
|
|
65924
65952
|
if (this._sky !== void 0 && this._sunLight !== void 0) {
|
|
65925
|
-
let e = Math.asin(hn.clamp(this._sky.getClonedSunPosition().y, -1, 1)), t = hn.clamp((e -
|
|
65926
|
-
this._sunLight.color.lerpColors(
|
|
65953
|
+
let e = Math.asin(hn.clamp(this._sky.getClonedSunPosition().y, -1, 1)), t = hn.clamp((e - Qk) / (Zk - Qk), 0, 1);
|
|
65954
|
+
this._sunLight.color.lerpColors(eA, $k, t);
|
|
65927
65955
|
}
|
|
65928
65956
|
}
|
|
65929
65957
|
createSunLight(e) {
|
|
65930
65958
|
let t = new Zt(16777215, e);
|
|
65931
|
-
return t.castShadow = !0, t.shadow.radius =
|
|
65959
|
+
return t.castShadow = !0, t.shadow.radius = Jk, t.shadow.normalBias = Yk, this.applySunLightShadowFrustum(t, qk), t.shadow.mapSize.set(Xk, Xk), t.shadow.camera.layers.enable(B.OBJECT), t.shadow.camera.layers.enable(B.COMPONENT), t.shadow.camera.layers.enable(B.SHADOW_ONLY), t;
|
|
65932
65960
|
}
|
|
65933
65961
|
applySunLightShadowFrustum(e, t) {
|
|
65934
65962
|
e.shadow.camera.top = t, e.shadow.camera.bottom = -t, e.shadow.camera.left = -t, e.shadow.camera.right = t, e.shadow.camera.updateProjectionMatrix();
|
|
65935
65963
|
}
|
|
65936
65964
|
setSunPosition(e, t) {
|
|
65937
|
-
this._sky !== void 0 && this._sunLight !== void 0 && (this._sky.setSunPosition(e, t), this._sunLight.position.copy(this._sky.getClonedSunPosition()).multiplyScalar(
|
|
65965
|
+
this._sky !== void 0 && this._sunLight !== void 0 && (this._sky.setSunPosition(e, t), this._sunLight.position.copy(this._sky.getClonedSunPosition()).multiplyScalar(Kk));
|
|
65938
65966
|
}
|
|
65939
65967
|
addParametersToGUI(e, t) {
|
|
65940
65968
|
let n = e.addFolder("Sky"), r = {
|
|
@@ -65963,10 +65991,10 @@ var Uk = 100, Wk = 50, Gk = 1.1, Kk = .1, qk = 2048, Jk = hn.degToRad(25), Yk =
|
|
|
65963
65991
|
n.add(i.tonemapExposure, "value", 0, 2, .01).name("tonemap exposure").onChange(t), n.add(i.tonemapWhite, "value", .1, 30, .1).name("tonemap white").onChange(t), n.add(i.fixColorBanding, "value").name("fix color banding").onChange(t), n.add(i.cloudCoverage, "value", 0, 1, .01).name("cloud coverage").onChange(t), n.add(i.cloudDensity, "value", 0, 1, .01).name("cloud density").onChange(t), n.add(i.cloudElevation, "value", 0, 1, .01).name("cloud elevation").onChange(t), n.add(i.cloudScale, "value", 1e-4, .001, 1e-5).name("cloud scale").onChange(t);
|
|
65964
65992
|
}
|
|
65965
65993
|
};
|
|
65966
|
-
L([I, F("design:type", Object)],
|
|
65994
|
+
L([I, F("design:type", Object)], tA.prototype, "_initData", void 0), L([I, F("design:type", Object)], tA.prototype, "_skyStateTracker", void 0);
|
|
65967
65995
|
//#endregion
|
|
65968
65996
|
//#region packages/common-core/src/di/injectables.ts
|
|
65969
|
-
var
|
|
65997
|
+
var nA = [
|
|
65970
65998
|
new U("error-handler", La),
|
|
65971
65999
|
new U("form-data-util", Fa),
|
|
65972
66000
|
new U("hdr-environment-loader", Wy),
|
|
@@ -66008,17 +66036,17 @@ var $k = [
|
|
|
66008
66036
|
new U("model-export-state", Gy, H.GLOBAL),
|
|
66009
66037
|
new U("idb-manager", Zy, H.GLOBAL),
|
|
66010
66038
|
new U("camera-behaviour-state", Qy, H.CONTEXT),
|
|
66011
|
-
new U("material-provider",
|
|
66012
|
-
new U("css2-d-renderer-manager",
|
|
66013
|
-
new U("kernel-callback-guard",
|
|
66014
|
-
new U("web-gpu-ground-shadow-reflection",
|
|
66015
|
-
new U("roomle-svg-renderer",
|
|
66016
|
-
new U("elevation-plan2d-generator",
|
|
66017
|
-
new U("web-gpu-sky-container",
|
|
66039
|
+
new U("material-provider", gO, H.GLOBAL),
|
|
66040
|
+
new U("css2-d-renderer-manager", vO, H.GLOBAL),
|
|
66041
|
+
new U("kernel-callback-guard", yO, H.GLOBAL),
|
|
66042
|
+
new U("web-gpu-ground-shadow-reflection", bO, H.CONTEXT),
|
|
66043
|
+
new U("roomle-svg-renderer", _k, H.CONTEXT),
|
|
66044
|
+
new U("elevation-plan2d-generator", Gk, H.CONTEXT),
|
|
66045
|
+
new U("web-gpu-sky-container", tA, H.CONTEXT),
|
|
66018
66046
|
new U("sky-state-tracker", $h, H.CONTEXT)
|
|
66019
|
-
],
|
|
66047
|
+
], rA = class e {
|
|
66020
66048
|
static _ensureContainer() {
|
|
66021
|
-
return (!window.__RML__DI__ || !window.__RML__DI__.lookup) && (window.__RML__DI__ = new zo(), window.__RML__DI__.addDependencyInjectionAssignments(
|
|
66049
|
+
return (!window.__RML__DI__ || !window.__RML__DI__.lookup) && (window.__RML__DI__ = new zo(), window.__RML__DI__.addDependencyInjectionAssignments(nA)), window.__RML__DI__;
|
|
66022
66050
|
}
|
|
66023
66051
|
static setup(t) {
|
|
66024
66052
|
e.addToContainer(t);
|
|
@@ -66035,11 +66063,11 @@ var $k = [
|
|
|
66035
66063
|
static addToContainer(t) {
|
|
66036
66064
|
e._ensureContainer().addDependencyInjectionAssignments(t);
|
|
66037
66065
|
}
|
|
66038
|
-
},
|
|
66066
|
+
}, iA = class {
|
|
66039
66067
|
static getConfigurator(e, t) {
|
|
66040
66068
|
t = this._setupDI(X.CONFIGURATOR, e, t);
|
|
66041
|
-
let n =
|
|
66042
|
-
return n === null ? Promise.reject(/* @__PURE__ */ Error("global-init-data is not available")) : n.configuratorId ? new Promise((e, n) => import("./configurator-
|
|
66069
|
+
let n = rA.lookup("global-init-data");
|
|
66070
|
+
return n === null ? Promise.reject(/* @__PURE__ */ Error("global-init-data is not available")) : n.configuratorId ? new Promise((e, n) => import("./configurator-yctV6IDY.mjs").then(({ Configurator: n }) => e(new n(t)), n)) : Promise.reject(/* @__PURE__ */ Error("configuratorId is not set"));
|
|
66043
66071
|
}
|
|
66044
66072
|
static getPlanner(e, t) {
|
|
66045
66073
|
return this._getPlanner(e, t);
|
|
@@ -66049,51 +66077,51 @@ var $k = [
|
|
|
66049
66077
|
}
|
|
66050
66078
|
static async getGlbViewer(e, t) {
|
|
66051
66079
|
t = this._setupDI(X.GLB_VIEWER, e, t);
|
|
66052
|
-
let n =
|
|
66053
|
-
return n === null ? Promise.reject(/* @__PURE__ */ Error("global-init-data is not available")) : n.configuratorId ? new Promise((e, n) => import("./glb-viewer-
|
|
66080
|
+
let n = rA.lookup("global-init-data");
|
|
66081
|
+
return n === null ? Promise.reject(/* @__PURE__ */ Error("global-init-data is not available")) : n.configuratorId ? new Promise((e, n) => import("./glb-viewer-jt9mrYrF.mjs").then(({ GlbViewer: n }) => e(new n(t)), n)) : Promise.reject(/* @__PURE__ */ Error("configuratorId is not set"));
|
|
66054
66082
|
}
|
|
66055
66083
|
static getMaterialViewer(e, t) {
|
|
66056
66084
|
t = this._setupDI(X.CONFIGURATOR, e, t);
|
|
66057
|
-
let n =
|
|
66058
|
-
return n === null ? Promise.reject(/* @__PURE__ */ Error("global-init-data is not available")) : n.configuratorId ? new Promise((e, n) => import("./material-viewer-
|
|
66085
|
+
let n = rA.lookup("global-init-data");
|
|
66086
|
+
return n === null ? Promise.reject(/* @__PURE__ */ Error("global-init-data is not available")) : n.configuratorId ? new Promise((e, n) => import("./material-viewer-BkaTt8Sn.mjs").then(({ MaterialViewer: n }) => e(new n(t)), n)) : Promise.reject(/* @__PURE__ */ Error("configuratorId is not set"));
|
|
66059
66087
|
}
|
|
66060
66088
|
static getCoreTools(e, t) {
|
|
66061
|
-
return t = this._setupDI(X.TOOLS_CORE, e, t), new Promise((e, n) => import("./tools-core-
|
|
66089
|
+
return t = this._setupDI(X.TOOLS_CORE, e, t), new Promise((e, n) => import("./tools-core-DJvn2gR6.mjs").then(({ ToolsCore: n }) => {
|
|
66062
66090
|
let r = new n(t);
|
|
66063
66091
|
r.boot(), e(r);
|
|
66064
66092
|
}, n));
|
|
66065
66093
|
}
|
|
66066
66094
|
static getRapiAccess() {
|
|
66067
|
-
|
|
66068
|
-
let e =
|
|
66095
|
+
rA.addToContainer([new U("rapi-access", Fo, H.GLOBAL), new U("global-callback", gl, H.GLOBAL)]);
|
|
66096
|
+
let e = rA.lookup("rapi-access");
|
|
66069
66097
|
return e === null ? Promise.reject(/* @__PURE__ */ Error("rapi-access is not available")) : Promise.resolve(e);
|
|
66070
66098
|
}
|
|
66071
66099
|
static get callbacks() {
|
|
66072
|
-
|
|
66073
|
-
let e =
|
|
66100
|
+
rA.addToContainer([new U("global-callback", gl, H.GLOBAL)]);
|
|
66101
|
+
let e = rA.lookup("global-callback");
|
|
66074
66102
|
return e === null ? Promise.reject(/* @__PURE__ */ Error("global-callback is not available")) : Promise.resolve(e);
|
|
66075
66103
|
}
|
|
66076
66104
|
static async setGlobalInitData(e) {
|
|
66077
66105
|
if (e) {
|
|
66078
|
-
|
|
66079
|
-
let t =
|
|
66106
|
+
rA.addToContainer([new U("global-init-data", fl, H.GLOBAL)]);
|
|
66107
|
+
let t = rA.lookup("global-init-data");
|
|
66080
66108
|
if (t === null) throw Error("global-init-data is not available");
|
|
66081
66109
|
t.setOverrides(e), (await this.getRapiAccess()).setConfiguratorSettings();
|
|
66082
66110
|
}
|
|
66083
66111
|
}
|
|
66084
66112
|
static getContext(e) {
|
|
66085
|
-
return
|
|
66113
|
+
return rA.getContext(e);
|
|
66086
66114
|
}
|
|
66087
66115
|
static _getPlanner(e, t, n) {
|
|
66088
|
-
let r = this._setupDI(X.PLANNER, e, t), i =
|
|
66089
|
-
return i === null ? Promise.reject(/* @__PURE__ */ Error("global-init-data is not available")) : i.configuratorId ? new Promise((e, t) => import("./planner-
|
|
66116
|
+
let r = this._setupDI(X.PLANNER, e, t), i = rA.lookup("global-init-data");
|
|
66117
|
+
return i === null ? Promise.reject(/* @__PURE__ */ Error("global-init-data is not available")) : i.configuratorId ? new Promise((e, t) => import("./planner-C7kZ9SKV.mjs").then(({ Planner: t }) => {
|
|
66090
66118
|
e(n ? new t(r, n) : new t(r));
|
|
66091
66119
|
}, t)) : Promise.reject(/* @__PURE__ */ Error("configuratorId is not set"));
|
|
66092
66120
|
}
|
|
66093
66121
|
static _setupDI(e, t, n) {
|
|
66094
66122
|
if (t) {
|
|
66095
|
-
|
|
66096
|
-
let r =
|
|
66123
|
+
rA.addToContainer([new U("init-data", dl, H.CONTEXT)]), n ||= rA.getContext(e);
|
|
66124
|
+
let r = rA.lookup("init-data", n);
|
|
66097
66125
|
if (r === null) throw Error("init-data is not available");
|
|
66098
66126
|
r.setOverrides(t);
|
|
66099
66127
|
}
|
|
@@ -66101,6 +66129,6 @@ var $k = [
|
|
|
66101
66129
|
}
|
|
66102
66130
|
};
|
|
66103
66131
|
//#endregion
|
|
66104
|
-
export { wl as $, Tm as A, gf as B, ug as C, Jm as D, rh as E, rp as F, Md as G, nf as H, Y as I, Hu as J, md as K, Jf as L, Op as M, Cp as N, Wm as O, bp as P, Pl as Q, Wf as R, dg as S, rg as T, Kd as U, hf as V, zd as W, Nu as X, Iu as Y, Eu as Z, yg as _, Wa as _t,
|
|
66132
|
+
export { wl as $, Tm as A, gf as B, ug as C, Jm as D, rh as E, rp as F, Md as G, nf as H, Y as I, Hu as J, md as K, Jf as L, Op as M, Cp as N, Wm as O, bp as P, Pl as Q, Wf as R, dg as S, rg as T, Kd as U, hf as V, zd as W, Nu as X, Iu as Y, Eu as Z, yg as _, Wa as _t, hO as a, vs as at, gg as b, Ma as bt, Wy as c, ts as ct, Ay as d, H as dt, _l as et, Dy as f, U as ft, Og as g, Ao as gt, xv as h, jo as ht, bO as i, K as it, X as j, wm as k, Uy as l, Bo as lt, Sv as m, Fo as mt, rA as n, fl as nt, FS as o, is as ot, cy as p, Io as pt, rd as q, nA as r, Zc as rt, IS as s, rs as st, iA as t, hl as tt, Hy as u, zo as ut, _g as v, Ra as vt, ig as w, mg as x, vg as y, Na as yt, Uf as z };
|
|
66105
66133
|
|
|
66106
|
-
//# sourceMappingURL=roomle-sdk-
|
|
66134
|
+
//# sourceMappingURL=roomle-sdk-CSH3WHXV.mjs.map
|