@imagineio/configurator-sdk 0.1.0-beta.1

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.
Files changed (246) hide show
  1. package/LICENSE.md +294 -0
  2. package/README.md +103 -0
  3. package/dist/00a41227ff.js +1 -0
  4. package/dist/00ab3dcbb5.js +1 -0
  5. package/dist/01a664fa9f.css +51 -0
  6. package/dist/04746bff9a.js +1 -0
  7. package/dist/04931f795e.js +1 -0
  8. package/dist/05973a4da2.js +3 -0
  9. package/dist/061b81ad81.js +1 -0
  10. package/dist/066fc9aa40.js +1 -0
  11. package/dist/09c4973968.js +1 -0
  12. package/dist/0a35b2c5f4.js +1 -0
  13. package/dist/0af28430ab.js +1 -0
  14. package/dist/0e2dedae0d.js +1 -0
  15. package/dist/0f7c8345a8.js +1 -0
  16. package/dist/12b8165d6d.js +1 -0
  17. package/dist/1458417bdb.js +1 -0
  18. package/dist/14c83bc57a.js +1 -0
  19. package/dist/15d6bec3b5.css +150 -0
  20. package/dist/16a399703e.js +1 -0
  21. package/dist/17876f4322.css +114 -0
  22. package/dist/1870fc037b.js +1 -0
  23. package/dist/1a2629800a.css +196 -0
  24. package/dist/1e243363f6.js +1 -0
  25. package/dist/1fac915f8b.js +1 -0
  26. package/dist/1fff100656.js +1 -0
  27. package/dist/205827c5c8.js +1 -0
  28. package/dist/20b0104576.js +1 -0
  29. package/dist/2239b22616.js +1 -0
  30. package/dist/22bd38ddcf.js +1 -0
  31. package/dist/239b619005.css +1849 -0
  32. package/dist/23dc0ccf32.js +1 -0
  33. package/dist/26155bf68c.js +1 -0
  34. package/dist/2774152dd2.js +1 -0
  35. package/dist/27fee7007f.js +1 -0
  36. package/dist/281cf952fa.js +1 -0
  37. package/dist/28a9d58274.js +1 -0
  38. package/dist/28d887bf8a.js +1 -0
  39. package/dist/28df2aa12f.js +1 -0
  40. package/dist/297e653adf.js +1 -0
  41. package/dist/2990ba64d6.js +1 -0
  42. package/dist/2b6aa27f6d.js +1 -0
  43. package/dist/2c7c1bcef1.js +1 -0
  44. package/dist/2cab5c5c23.js +1 -0
  45. package/dist/2cafe3274b.js +1 -0
  46. package/dist/2e366d7386.js +1 -0
  47. package/dist/2f8cc8b292.js +1 -0
  48. package/dist/30be653f00.css +110 -0
  49. package/dist/31ea036f5c.js +1 -0
  50. package/dist/32861ea2b0.js +1 -0
  51. package/dist/33fa2c8ca2.js +1 -0
  52. package/dist/35d8449ed8.js +1 -0
  53. package/dist/3656ffa1b8.js +1 -0
  54. package/dist/367a479d3a.js +1 -0
  55. package/dist/371ed78aa2.js +1 -0
  56. package/dist/37596ace72.js +1 -0
  57. package/dist/37addc7fb3.js +1 -0
  58. package/dist/388cadacbd.js +1 -0
  59. package/dist/39a62ef7b8.js +1 -0
  60. package/dist/3bbcee0334.js +1 -0
  61. package/dist/3c916f744f.js +1 -0
  62. package/dist/3f37665dd1.js +1 -0
  63. package/dist/3fb3ab6757.js +1 -0
  64. package/dist/40d6aeb28c.js +1 -0
  65. package/dist/41ed5985ad.js +1 -0
  66. package/dist/431a2d8618.js +1 -0
  67. package/dist/44a229099f.js +1 -0
  68. package/dist/4741e5d07d.css +263 -0
  69. package/dist/4910c07ca8.css +411 -0
  70. package/dist/4a99ddb3fd.js +1 -0
  71. package/dist/4aa671f9f6.js +1 -0
  72. package/dist/4b8958aa4c.js +1 -0
  73. package/dist/4ba4f544b9.js +1 -0
  74. package/dist/4c24338793.js +1 -0
  75. package/dist/4d7a0d1897.js +1 -0
  76. package/dist/4e1db1e3b0.js +1 -0
  77. package/dist/4e7d0a0d4a.js +1 -0
  78. package/dist/51b23203e5.css +1447 -0
  79. package/dist/52436e0169.js +1 -0
  80. package/dist/54413c1eae.js +1 -0
  81. package/dist/54f0fcf38b.js +1 -0
  82. package/dist/55ab45ada4.css +370 -0
  83. package/dist/561dc3f1ab.js +1 -0
  84. package/dist/58e6419ba8.js +1 -0
  85. package/dist/5c9fd9201c.js +1 -0
  86. package/dist/5d05e8982e.js +1 -0
  87. package/dist/5d5e8a9c58.js +3 -0
  88. package/dist/5e4f2349ff.js +1 -0
  89. package/dist/609e5e5d28.js +1 -0
  90. package/dist/60d697292c.js +1 -0
  91. package/dist/61e0c0c9b5.js +1 -0
  92. package/dist/631a9f7fac.js +1 -0
  93. package/dist/64e9020b49.js +1 -0
  94. package/dist/66c461dc2c.js +1 -0
  95. package/dist/672404d987.js +1 -0
  96. package/dist/67f6338a4a.js +1 -0
  97. package/dist/6855e6a3b1.js +1 -0
  98. package/dist/6b0a81e4f8.js +1 -0
  99. package/dist/6ba86aa3b8.js +1 -0
  100. package/dist/6bff84d27e.js +1 -0
  101. package/dist/6c0a2572dd.js +1 -0
  102. package/dist/6d238282c1.js +1 -0
  103. package/dist/6e2595aa36.js +1 -0
  104. package/dist/6f9ae59d6c.js +1 -0
  105. package/dist/70dd811d74.js +1 -0
  106. package/dist/710c1ab641.js +1 -0
  107. package/dist/7206ce49c6.js +1 -0
  108. package/dist/7281d77ed9.js +1 -0
  109. package/dist/73f7d65985.js +1 -0
  110. package/dist/776277593f.js +1 -0
  111. package/dist/79a397bb92.js +1 -0
  112. package/dist/7a748aae59.js +1 -0
  113. package/dist/7bfb0ecfbb.css +572 -0
  114. package/dist/7bfcd0a517.js +1 -0
  115. package/dist/7d9ddaeb47.js +1 -0
  116. package/dist/7f833bc5af.js +1 -0
  117. package/dist/811b403d43.js +1 -0
  118. package/dist/817d930a49.js +1 -0
  119. package/dist/81802759ca.js +1 -0
  120. package/dist/81eb433604.js +1 -0
  121. package/dist/82a8a4bc35.js +1 -0
  122. package/dist/85af90fade.js +1 -0
  123. package/dist/872c4302e0.js +1 -0
  124. package/dist/87bb469216.js +1 -0
  125. package/dist/87dcc12b65.js +1 -0
  126. package/dist/87f511c4a8.js +1 -0
  127. package/dist/88251d6671.js +1 -0
  128. package/dist/882bc739c8.js +1 -0
  129. package/dist/89ab18ebc5.js +1 -0
  130. package/dist/8a22e8944f.css +563 -0
  131. package/dist/8a3a57c008.js +1 -0
  132. package/dist/8ade32d067.js +1 -0
  133. package/dist/8bf6d26ad6.css +233 -0
  134. package/dist/8c27edda0f.js +1 -0
  135. package/dist/8db8655f21.js +24 -0
  136. package/dist/8f60e5059a.js +1 -0
  137. package/dist/91707f5ca0.css +78 -0
  138. package/dist/921bf270dd.js +20 -0
  139. package/dist/9326c23506.js +1 -0
  140. package/dist/94a0a79c65.js +1 -0
  141. package/dist/9526094bb7.js +1 -0
  142. package/dist/9544661159.js +1 -0
  143. package/dist/95a44ebec2.js +1 -0
  144. package/dist/970313b92b.js +1 -0
  145. package/dist/9794652102.js +1 -0
  146. package/dist/983cbed22c.js +1 -0
  147. package/dist/9840b9ce12.js +1 -0
  148. package/dist/98f3644031.js +1 -0
  149. package/dist/992778075d.css +353 -0
  150. package/dist/9c6c598569.js +1 -0
  151. package/dist/9f474b5d1a.js +1 -0
  152. package/dist/a0f71d0bf5.js +1 -0
  153. package/dist/a3c983d431.js +1 -0
  154. package/dist/a3f18e76fe.js +1 -0
  155. package/dist/a493e9aa8f.js +1 -0
  156. package/dist/a77b15c0d6.js +1 -0
  157. package/dist/a811c90bd5.js +1 -0
  158. package/dist/a822c5e4f2.js +1 -0
  159. package/dist/aaa0e82d7f.css +69 -0
  160. package/dist/ab6c80484f.js +1 -0
  161. package/dist/ae96f219e3.js +1 -0
  162. package/dist/b11b38869d.css +427 -0
  163. package/dist/b1349d5a21.js +4 -0
  164. package/dist/b14379d31b.css +151 -0
  165. package/dist/b3efb26fd7.js +1 -0
  166. package/dist/b59b0dde17.js +1 -0
  167. package/dist/b5c372377f.js +1 -0
  168. package/dist/b976df09ec.js +1 -0
  169. package/dist/baeaed46c9.js +1 -0
  170. package/dist/bb719febc6.js +1 -0
  171. package/dist/bcd44b4040.js +1 -0
  172. package/dist/bdc4e4c5b9.css +209 -0
  173. package/dist/bdec200d00.js +1 -0
  174. package/dist/be0cfe2236.js +1 -0
  175. package/dist/be337ddda5.js +1 -0
  176. package/dist/c12c112c6f.js +1 -0
  177. package/dist/c2a14a77ae.js +1 -0
  178. package/dist/c3b8f1973b.js +1 -0
  179. package/dist/c44d37da7a.js +1 -0
  180. package/dist/c4790179f1.js +1 -0
  181. package/dist/c5e990946e.js +1 -0
  182. package/dist/c71892453b.js +1 -0
  183. package/dist/c9a1656c62.js +1 -0
  184. package/dist/ca497b066c.js +1 -0
  185. package/dist/cdb4a0f7b3.js +3 -0
  186. package/dist/ce663020e4.js +60 -0
  187. package/dist/cec035efb1.js +1 -0
  188. package/dist/d0f9681634.js +1 -0
  189. package/dist/d118c2e7ba.js +1 -0
  190. package/dist/d20718159b.js +3 -0
  191. package/dist/d30f1f506e.js +1 -0
  192. package/dist/d3cd7f1bc1.js +1 -0
  193. package/dist/d4378d9afa.js +1 -0
  194. package/dist/d464da28a5.js +1 -0
  195. package/dist/d566d3874b.js +1 -0
  196. package/dist/d617bbb9f5.js +26 -0
  197. package/dist/d65f32e004.js +1 -0
  198. package/dist/d6851ea979.js +1 -0
  199. package/dist/d7c9500ba9.js +1 -0
  200. package/dist/d803155241.js +1 -0
  201. package/dist/d903df4e0d.js +1 -0
  202. package/dist/d94df858ea.js +1 -0
  203. package/dist/da7b5f450d.js +1 -0
  204. package/dist/daa11edd01.js +1 -0
  205. package/dist/db4afd43c9.js +1 -0
  206. package/dist/dbd5ba1d07.js +1 -0
  207. package/dist/dc2a1a0e13.js +1 -0
  208. package/dist/dc812f3e14.js +1 -0
  209. package/dist/dcbf419090.css +122 -0
  210. package/dist/dcdba78ddf.js +1 -0
  211. package/dist/de408c4516.js +1 -0
  212. package/dist/e1cd279733.js +1 -0
  213. package/dist/e379e0039b.js +1 -0
  214. package/dist/e4fe0551fd.js +1 -0
  215. package/dist/e6eed481cc.css +28 -0
  216. package/dist/e75f1e5992.js +1 -0
  217. package/dist/ea8577d22b.js +1 -0
  218. package/dist/ec4a34fc80.css +313 -0
  219. package/dist/ed6a54cdf6.js +1 -0
  220. package/dist/ee242c0099.js +1 -0
  221. package/dist/ee9b9fd7d1.js +1 -0
  222. package/dist/f0c3d8a28a.js +1 -0
  223. package/dist/f11a45a150.js +1 -0
  224. package/dist/f1b3b2622a.js +1 -0
  225. package/dist/f7b4a178e3.js +1 -0
  226. package/dist/f89d7cd931.js +1 -0
  227. package/dist/f8cb80a93c.js +1 -0
  228. package/dist/f8fec86f10.js +1 -0
  229. package/dist/fbd844f2d1.js +1 -0
  230. package/dist/fe235d7160.js +1 -0
  231. package/dist/fe58a84b85.js +1 -0
  232. package/dist/fe68b361ba.js +1 -0
  233. package/dist/ff5b3d17e2.js +1 -0
  234. package/dist/styles/globals.css +442 -0
  235. package/dist/styles/themes.css +532 -0
  236. package/dist/styles/variables.css +299 -0
  237. package/package.json +68 -0
  238. package/static/assets/draco/README.md +32 -0
  239. package/static/assets/draco/draco_decoder.js +34 -0
  240. package/static/assets/draco/draco_decoder.wasm +0 -0
  241. package/static/assets/draco/draco_encoder.js +35 -0
  242. package/static/assets/draco/draco_encoder.wasm +0 -0
  243. package/static/assets/draco/draco_encoder_wrapper.js +98 -0
  244. package/static/assets/draco/draco_wasm_wrapper.js +117 -0
  245. package/static/favicon.svg +28 -0
  246. package/static/version.txt +1 -0
@@ -0,0 +1,427 @@
1
+ @layer sdk-base, vendor, sdk;
2
+ @layer sdk {
3
+ /* ============================================
4
+ LIVE STATUS BAR - Floating bottom-right bar
5
+ ============================================ */
6
+ .live-status-bar {
7
+ position: absolute;
8
+ bottom: 16px;
9
+ right: 16px;
10
+ z-index: 20;
11
+ background: var(--bg-primary, #fff);
12
+ border-radius: 8px;
13
+ box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
14
+ min-width: 320px;
15
+ max-width: 480px;
16
+ overflow: hidden;
17
+ transition: max-height 0.3s ease;
18
+ }
19
+
20
+ .live-status-bar--expanded {
21
+ max-width: 520px;
22
+ }
23
+
24
+ /* Header bar */
25
+ .live-status-bar__header {
26
+ display: flex;
27
+ align-items: center;
28
+ gap: 10px;
29
+ padding: 12px 14px;
30
+ cursor: pointer;
31
+ user-select: none;
32
+ transition: background 0.15s;
33
+ }
34
+
35
+ .live-status-bar__header:hover {
36
+ background: var(--bg-muted, #fafafa);
37
+ }
38
+
39
+ .live-status-bar__left {
40
+ display: flex;
41
+ align-items: center;
42
+ gap: 8px;
43
+ flex-shrink: 0;
44
+ }
45
+
46
+ .live-status-bar__title {
47
+ font-size: 11px;
48
+ font-weight: 600;
49
+ color: var(--text-primary, #363636);
50
+ letter-spacing: 0.5px;
51
+ text-transform: uppercase;
52
+ }
53
+
54
+ .live-status-bar__summary {
55
+ flex: 1;
56
+ font-size: 12px;
57
+ color: var(--text-secondary, #666);
58
+ overflow: hidden;
59
+ text-overflow: ellipsis;
60
+ white-space: nowrap;
61
+ }
62
+
63
+ .live-status-bar__right {
64
+ display: flex;
65
+ align-items: center;
66
+ flex-shrink: 0;
67
+ margin-left: auto;
68
+ }
69
+
70
+ /* Download icon button */
71
+ .live-status-bar__download-btn {
72
+ display: flex;
73
+ align-items: center;
74
+ justify-content: center;
75
+ padding: 4px;
76
+ border-radius: 4px;
77
+ border: none;
78
+ background: transparent;
79
+ color: var(--text-tertiary, #888);
80
+ cursor: pointer;
81
+ margin-right: 6px;
82
+ transition: color 0.15s, background 0.15s;
83
+ }
84
+
85
+ .live-status-bar__download-btn:hover {
86
+ background: rgba(0, 0, 0, 0.06);
87
+ color: var(--text-primary, #333);
88
+ }
89
+
90
+ .live-status-bar__upload-btn {
91
+ display: flex;
92
+ align-items: center;
93
+ justify-content: center;
94
+ padding: 4px;
95
+ border-radius: 4px;
96
+ border: none;
97
+ background: transparent;
98
+ color: var(--text-tertiary, #888);
99
+ cursor: pointer;
100
+ margin-right: 2px;
101
+ transition: color 0.15s, background 0.15s;
102
+ }
103
+
104
+ .live-status-bar__upload-btn:hover {
105
+ background: rgba(0, 0, 0, 0.06);
106
+ color: var(--text-primary, #333);
107
+ }
108
+
109
+ /* Status badge — pill with dot */
110
+ .live-status-bar__badge {
111
+ display: flex;
112
+ align-items: center;
113
+ gap: 6px;
114
+ padding: 4px 10px;
115
+ border-radius: 14px;
116
+ font-size: 10px;
117
+ font-weight: 600;
118
+ letter-spacing: 0.5px;
119
+ }
120
+
121
+ .live-status-bar__badge--stable {
122
+ background: rgba(76, 175, 80, 0.1);
123
+ color: #4caf50;
124
+ }
125
+
126
+ .live-status-bar__badge--processing {
127
+ background: rgba(var(--color-brand-primary-rgb, 236, 78, 11), 0.08);
128
+ color: var(--color-brand-primary, #EC4E0B);
129
+ }
130
+
131
+ .live-status-bar__badge-dot {
132
+ width: 6px;
133
+ height: 6px;
134
+ border-radius: 50%;
135
+ flex-shrink: 0;
136
+ }
137
+
138
+ .live-status-bar__badge-dot--stable {
139
+ background: #4caf50;
140
+ }
141
+
142
+ .live-status-bar__badge-dot--processing {
143
+ background: var(--color-brand-primary, #EC4E0B);
144
+ animation: statusPulse 1.5s ease-in-out infinite;
145
+ }
146
+
147
+ @keyframes statusPulse {
148
+ 0%, 100% { opacity: 1; }
149
+ 50% { opacity: 0.4; }
150
+ }
151
+
152
+ /* JSON content — directly below header, no tabs */
153
+ .live-status-bar__content {
154
+ max-height: 300px;
155
+ overflow: auto;
156
+ border-top: 1px solid var(--bg-secondary, #f0f0f0);
157
+ scroll-behavior: smooth;
158
+ }
159
+
160
+ .live-status-bar__code {
161
+ font-family: 'SF Mono', 'Monaco', 'Menlo', 'Consolas', monospace;
162
+ font-size: 11px;
163
+ line-height: 1.6;
164
+ padding: 8px 12px;
165
+ }
166
+
167
+ /* ============================================
168
+ JSON Tree - Collapsible accordion viewer
169
+ ============================================ */
170
+ .json-tree {
171
+ color: var(--text-primary, #333);
172
+ counter-reset: json-line;
173
+ }
174
+
175
+ .json-tree__row {
176
+ display: flex;
177
+ align-items: baseline;
178
+ padding: 1px 0;
179
+ white-space: nowrap;
180
+ border-radius: 3px;
181
+ counter-increment: json-line;
182
+ border-left: 2px solid transparent;
183
+ transition: background 0.4s ease, border-color 0.4s ease;
184
+ }
185
+
186
+ .json-tree__row::before {
187
+ content: counter(json-line);
188
+ min-width: 24px;
189
+ text-align: right;
190
+ padding-right: 10px;
191
+ color: var(--text-tertiary, #bbb);
192
+ user-select: none;
193
+ flex-shrink: 0;
194
+ font-size: 10px;
195
+ }
196
+
197
+ .json-tree__content {
198
+ flex: 1;
199
+ }
200
+
201
+ .json-tree__row--toggle {
202
+ cursor: pointer;
203
+ user-select: none;
204
+ }
205
+
206
+ .json-tree__row--toggle:hover {
207
+ background: var(--bg-secondary, #f0f4ff);
208
+ }
209
+
210
+ /* Toggle arrow */
211
+ .json-tree__arrow {
212
+ display: inline-block;
213
+ width: 14px;
214
+ height: 14px;
215
+ margin-right: 2px;
216
+ vertical-align: middle;
217
+ position: relative;
218
+ top: -1px;
219
+ }
220
+
221
+ .json-tree__arrow::before {
222
+ content: '';
223
+ display: inline-block;
224
+ border: 4px solid transparent;
225
+ border-left: 5px solid var(--text-tertiary, #999);
226
+ border-right: 0;
227
+ transition: transform 0.15s ease;
228
+ }
229
+
230
+ .json-tree__arrow--open::before {
231
+ transform: rotate(90deg);
232
+ transform-origin: 2px 4px;
233
+ }
234
+
235
+ .json-tree__colon {
236
+ color: var(--text-primary, #333);
237
+ }
238
+
239
+ .json-tree__bracket {
240
+ color: var(--text-primary, #333);
241
+ font-weight: 600;
242
+ }
243
+
244
+ .json-tree__preview {
245
+ color: var(--text-tertiary, #999);
246
+ font-size: 10px;
247
+ font-style: italic;
248
+ margin: 0 4px;
249
+ }
250
+
251
+ /* JSON SYNTAX HIGHLIGHTING — derived from the theme, not fixed.
252
+ ─────────────────────────────────────────────────────────────────────────────
253
+ These were treated as "semantic" and left hardcoded, on the argument that a success green
254
+ which follows the accent stops meaning success. That argument does not transfer: "error red"
255
+ carries meaning, "string red" does not. A code view's palette is decoration — editor themes
256
+ recolour it freely — and since these five colours are most of the pixels in this panel,
257
+ excluding them is why theming it produced no visible change at all.
258
+
259
+ Keys take the ink (they are structure), strings the brand (they are the values being read),
260
+ numbers and booleans a darker brand step so the two stay distinguishable, and nulls the muted
261
+ text colour. Each keeps its old literal as the fallback, so an unthemed app is unchanged. */
262
+ .json-key {
263
+ color: var(--text-primary, #c41a16);
264
+ }
265
+
266
+ .json-string {
267
+ color: var(--color-brand-primary, #c41a16);
268
+ }
269
+
270
+ .json-number {
271
+ color: var(--color-brand-primary-dark, #1c00cf);
272
+ }
273
+
274
+ .json-boolean {
275
+ color: var(--color-brand-primary-dark, #0000ff);
276
+ }
277
+
278
+ .json-null {
279
+ color: var(--text-tertiary, #808080);
280
+ font-style: italic;
281
+ }
282
+
283
+ /* ============================================
284
+ CHANGE DETECTION — Highlight animations
285
+ ============================================ */
286
+
287
+ /* Change banner — sits between header and JSON content */
288
+ .live-status-bar__change-banner {
289
+ display: flex;
290
+ align-items: center;
291
+ gap: 6px;
292
+ padding: 6px 14px;
293
+ background: rgba(var(--color-brand-primary-rgb, 236, 78, 11), 0.06);
294
+ border-top: 1px solid rgba(var(--color-brand-primary-rgb, 236, 78, 11), 0.12);
295
+ border-bottom: 1px solid rgba(var(--color-brand-primary-rgb, 236, 78, 11), 0.12);
296
+ animation: bannerSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1), bannerFade 3s ease-out forwards;
297
+ }
298
+
299
+ .live-status-bar__change-dot {
300
+ width: 5px;
301
+ height: 5px;
302
+ border-radius: 50%;
303
+ background: var(--color-brand-primary, #EC4E0B);
304
+ flex-shrink: 0;
305
+ }
306
+
307
+ .live-status-bar__change-text {
308
+ font-size: 11px;
309
+ font-weight: 500;
310
+ color: var(--color-brand-primary, #EC4E0B);
311
+ overflow: hidden;
312
+ text-overflow: ellipsis;
313
+ white-space: nowrap;
314
+ }
315
+
316
+ @keyframes bannerSlideIn {
317
+ 0% { opacity: 0; transform: translateY(-4px); }
318
+ 100% { opacity: 1; transform: translateY(0); }
319
+ }
320
+
321
+ @keyframes bannerFade {
322
+ 0% { opacity: 1; }
323
+ 75% { opacity: 1; }
324
+ 100% { opacity: 0; }
325
+ }
326
+
327
+ /* Expanded: orange highlight on changed JSON rows, fades out smoothly */
328
+ .json-tree__row--changed {
329
+ animation: rowHighlight 3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
330
+ border-left: 2px solid var(--color-brand-primary, #EC4E0B);
331
+ }
332
+
333
+ @keyframes rowHighlight {
334
+ 0% {
335
+ background: rgba(var(--color-brand-primary-rgb, 236, 78, 11), 0.22);
336
+ }
337
+ 15% {
338
+ background: rgba(var(--color-brand-primary-rgb, 236, 78, 11), 0.16);
339
+ }
340
+ 50% {
341
+ background: rgba(var(--color-brand-primary-rgb, 236, 78, 11), 0.08);
342
+ }
343
+ 100% {
344
+ background: transparent;
345
+ }
346
+ }
347
+
348
+ /* Collapsed: glow pulse on the entire status bar */
349
+ .live-status-bar--flash {
350
+ animation: barFlash 3s cubic-bezier(0.4, 0, 0.2, 1);
351
+ }
352
+
353
+ @keyframes barFlash {
354
+ 0% {
355
+ box-shadow: 0 0 0 3px rgba(var(--color-brand-primary-rgb, 236, 78, 11), 0.35), 0 4px 20px rgba(0, 0, 0, 0.12);
356
+ }
357
+ 30% {
358
+ box-shadow: 0 0 0 2px rgba(var(--color-brand-primary-rgb, 236, 78, 11), 0.2), 0 4px 20px rgba(0, 0, 0, 0.12);
359
+ }
360
+ 100% {
361
+ box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
362
+ }
363
+ }
364
+
365
+ /* Collapsed: summary text flashes orange */
366
+ .live-status-bar__summary {
367
+ animation: summaryFlash 3s cubic-bezier(0.4, 0, 0.2, 1);
368
+ }
369
+
370
+ @keyframes summaryFlash {
371
+ 0% {
372
+ color: var(--color-brand-primary, #EC4E0B);
373
+ }
374
+ 40% {
375
+ color: var(--color-brand-primary, #EC4E0B);
376
+ }
377
+ 100% {
378
+ color: var(--text-secondary, #666);
379
+ }
380
+ }
381
+
382
+ /* Embedded mode — used inside mobile accordion */
383
+ .live-status-bar--embedded {
384
+ position: static;
385
+ min-width: auto;
386
+ max-width: none;
387
+ border-radius: 0;
388
+ box-shadow: none;
389
+ border: none;
390
+ }
391
+
392
+ .live-status-bar__content--embedded {
393
+ max-height: none;
394
+ border-top: none;
395
+ }
396
+
397
+ /* Tablet */
398
+ @media (max-width: 1023px) and (min-width: 768px) {
399
+ .live-status-bar {
400
+ min-width: 260px;
401
+ max-width: 380px;
402
+ bottom: 12px;
403
+ right: 12px;
404
+ }
405
+ }
406
+
407
+ /* Mobile — rendered inside .mobile-bottom flow container */
408
+ @media (max-width: 767px) {
409
+ .live-status-bar {
410
+ position: static;
411
+ min-width: auto;
412
+ max-width: none;
413
+ border-radius: 0;
414
+ box-shadow: none;
415
+ border-top: 1px solid var(--border-default, #e5e5e5);
416
+ }
417
+
418
+ .live-status-bar--expanded {
419
+ max-width: none;
420
+ }
421
+
422
+ /* .live-status-bar__content {
423
+ max-height: 200px;
424
+ } */
425
+ }
426
+
427
+ }
@@ -0,0 +1,4 @@
1
+ const g=["primary","primaryDark","secondary","accent","background","foreground","surface","border","brandPrimary","brandAccent"],y=/^#([0-9a-f]{3}|[0-9a-f]{6}|[0-9a-f]{8})$/i,d=/^https:\/\/[^\s"'<>]+$/i;function A(e){const o=[],r=[];if(!e||typeof e!="object")return{valid:!1,errors:["theme must be an object"],warnings:r};const t=e.config&&typeof e.config=="object"?e.config:{},n={sizing:["cardWidth","cardPadding","radius","controlHeight","gap"],typography:["baseSize","labelSize","headingSize","fontWeight","fontFamily"],buttons:["buttonStyle","buttonRadius","shadow"]};for(const[u,i]of Object.entries(n)){const c=t[u];if(!(!c||typeof c!="object"))for(const a of Object.keys(c))i.includes(a)||r.push(`config.${u}.${a}: not a recognised key \u2014 it will be ignored (expected one of: ${i.join(", ")})`)}const s=e.colors||{};for(const[u,i]of Object.entries(s))i==null||i===""||((typeof i!="string"||!y.test(i.trim()))&&o.push(`colors.${u}: "${i}" is not a hex colour (#rgb, #rrggbb or #rrggbbaa)`),g.includes(u)||r.push(`colors.${u}: not a recognised colour slot \u2014 it will be ignored`));for(const u of["fontUrl","logo","logoUrl"]){const i=e[u]??e.logo?.url;if(i==null||i==="")continue;const c=typeof i=="string"?i:i?.url;typeof c=="string"&&!d.test(c.trim())&&!c.startsWith("data:image/")&&o.push(`${u}: must be an https URL (or a data:image URI), got "${c}"`)}return e.customCss!=null&&typeof e.customCss!="string"&&o.push("customCss: must be a string"),typeof e.customCss=="string"&&/@import|javascript:/i.test(e.customCss)&&o.push("customCss: @import and javascript: are not allowed"),{valid:o.length===0,errors:o,warnings:r}}function p(e){const o=String(e).trim().replace("#",""),r=o.length===3?o.split("").map(s=>s+s).join(""):o.slice(0,6),t=parseInt(r,16);if(Number.isNaN(t))return null;const n=[t>>16&255,t>>8&255,t&255].map(s=>{const u=s/255;return u<=.03928?u/12.92:((u+.055)/1.055)**2.4});return .2126*n[0]+.7152*n[1]+.0722*n[2]}function h(e,o){const r=p(e),t=p(o);if(r==null||t==null)return null;const[n,s]=r>t?[r,t]:[t,r];return(n+.05)/(s+.05)}function O(e){const o=e&&e.colors||{},t=[["foreground","background",4.5],["foreground","surface",4.5],["primary","background",3],["border","surface",3]].filter(([n,s])=>o[n]&&o[s]).map(([n,s,u])=>{const i=h(o[n],o[s]);return{pair:`${n} on ${s}`,ratio:i==null?null:Math.round(i*100)/100,min:u,pass:i!=null&&i>=u}});return{pass:t.every(n=>n.pass),results:t}}const l="sdk-tenant-css",f="sdk-theme-font",b=new Set(["toolbar-button","option-card","option-set","option-set/title","option-set/options","option-set/toggle","popover","modal","modal/panel","sidebar-frame","loading","quote","quote/head","quote/brand","quote/for","quote/scene","quote/render","quote/renders","quote/lines","quote/totals","quote/terms","quote/qr","quote/additional","assets/imagery","unavailable","unlicensed","summary","summary/group","summary/row"]),$=":where([data-imagine-root], #root)";function q(e,{scope:o=$,nonce:r}={}){if(typeof document>"u")return()=>{};const t=document.getElementById(l);t?.remove();const n=c=>()=>{if(typeof document>"u")return;const a=document.getElementById(l);a===c&&(a?.remove(),t&&document.head.appendChild(t))};if(typeof e!="string"||!e.trim()||/@import|javascript:/i.test(e))return n(null);const u=Array.from(e.matchAll(/data-part\s*=\s*["']([^"']+)["']/g),c=>c[1]).filter(c=>!b.has(c)),i=document.createElement("style");return i.id=l,i.dataset.source="tenant",r&&i.setAttribute("nonce",r),i.textContent=j(e,o),document.head.appendChild(i),n(i)}const v=/^@(media|supports|container|layer|document)\b/i,_=/^@(-\w+-)?(keyframes|font-face|page|counter-style|font-feature-values|property|viewport)\b/i,C=/^(:root|html|:host|body)$/i,E=/^(:root|html|:host|body)(?:\s+|\s*>\s*)(.+)$/i;function S(e){const o=[];let r=0,t=0,n=-1;for(let s=0;s<e.length;s+=1){const u=e[s];u==="{"?(r===0&&(n=s),r+=1):u==="}"&&(r-=1,r===0&&n!==-1&&(o.push({prelude:e.slice(t,n),body:e.slice(n+1,s)}),t=s+1,n=-1),r<0&&(r=0))}return o}function k(e){const o=[];let r=0,t="";for(const n of e){if(n==="("||n==="["?r+=1:(n===")"||n==="]")&&(r-=1),n===","&&r===0){o.push(t),t="";continue}t+=n}return t.trim()&&o.push(t),o}function T(e,o){return k(e).map(r=>{const t=r.trim();if(!t)return"";if(C.test(t))return o;const n=t.match(E);return n?`${o} ${n[2].trim()}`:t===o||t.startsWith(`${o} `)||t.startsWith(`${o}>`)?t:`${o} ${t}`}).filter(Boolean).join(", ")}function m(e,o){const r=[];for(const{prelude:t,body:n}of S(e)){const s=t.trim();if(s){if(_.test(s)){r.push(`${s} { ${n.trim()} }`);continue}if(v.test(s)){r.push(`${s} {
2
+ ${m(n,o)}
3
+ }`);continue}if(s.startsWith("@")){r.push(`${s} { ${n.trim()} }`);continue}r.push(`${T(s,o)} { ${n.trim()} }`)}}return r.join(`
4
+ `)}function j(e,o){return m(e.replace(/\/\*[\s\S]*?\*\//g,""),o)}function w(e){if(typeof document>"u")return()=>{};const o=document.getElementById(f);o?.remove();const r=n=>()=>{if(typeof document>"u")return;const s=document.getElementById(f);s===n&&(s?.remove(),o&&document.head.appendChild(o))};if(typeof e!="string"||!d.test(e.trim()))return r(null);const t=document.createElement("link");return t.id=f,t.rel="stylesheet",t.href=e.trim(),document.head.appendChild(t),r(t)}export{$ as DEFAULT_CSS_SCOPE,b as KNOWN_DATA_PARTS,q as applyCustomCss,w as applyFontUrl,O as checkThemeContrast,h as contrastRatio,A as validateTheme};
@@ -0,0 +1,151 @@
1
+ @layer sdk-base, vendor, sdk;
2
+ @layer sdk {
3
+ .btn {
4
+ display: inline-flex;
5
+ align-items: center;
6
+ justify-content: center;
7
+ gap: var(--spacing-sm);
8
+ padding: var(--spacing-sm) var(--spacing-md);
9
+ /* Theme buttonRadius (--btn-border-radius) with the generic radius as fallback. */
10
+ border-radius: var(--btn-border-radius, var(--border-radius));
11
+ /* Theme buttonShadow (--btn-shadow); default `none` so untheme'd is unchanged. */
12
+ box-shadow: var(--btn-shadow, none);
13
+ font-weight: 500;
14
+ transition: all 0.2s ease;
15
+ cursor: pointer;
16
+ border: 2px solid transparent;
17
+ }
18
+
19
+ .btn:disabled {
20
+ opacity: 0.5;
21
+ cursor: not-allowed;
22
+ }
23
+
24
+ /* Variants */
25
+ .btn--primary {
26
+ background: var(--color-primary);
27
+ color: var(--text-inverse);
28
+ }
29
+
30
+ .btn--primary:hover:not(:disabled) {
31
+ background: var(--color-primary-dark);
32
+ }
33
+
34
+ /* Theme buttonStyle="outline" (applyTheme stamps data-button-style on <html>):
35
+ render primary buttons as an outline instead of a filled fill. */
36
+ :root[data-button-style="outline"] .btn--primary {
37
+ background: transparent;
38
+ color: var(--color-primary);
39
+ border: 1px solid var(--color-primary);
40
+ }
41
+ :root[data-button-style="outline"] .btn--primary:hover:not(:disabled) {
42
+ background: var(--color-primary);
43
+ color: var(--text-inverse);
44
+ }
45
+
46
+ .btn--secondary {
47
+ /* --color-brand-secondary (#424242), NOT --color-secondary. The latter is the
48
+ "muted text" token that applyTheme now writes from the theme; using it here
49
+ filled secondary buttons with muted-grey text-colour (fails contrast). */
50
+ background: var(--color-brand-secondary);
51
+ color: var(--text-inverse);
52
+ }
53
+
54
+ .btn--secondary:hover:not(:disabled) {
55
+ background: #333;
56
+ }
57
+
58
+ .btn--outline {
59
+ background: transparent;
60
+ border-color: var(--border-color);
61
+ color: var(--text-primary);
62
+ }
63
+
64
+ .btn--outline:hover:not(:disabled) {
65
+ border-color: var(--color-primary);
66
+ color: var(--color-primary);
67
+ }
68
+
69
+ .btn--ghost {
70
+ background: transparent;
71
+ color: var(--text-primary);
72
+ }
73
+
74
+ .btn--ghost:hover:not(:disabled) {
75
+ background: var(--bg-tertiary);
76
+ }
77
+
78
+ /* Sizes */
79
+ .btn--small {
80
+ padding: var(--spacing-xs) var(--spacing-sm);
81
+ font-size: var(--font-size-sm);
82
+ }
83
+
84
+ .btn--medium {
85
+ padding: var(--spacing-sm) var(--spacing-md);
86
+ font-size: var(--font-size-md);
87
+ }
88
+
89
+ .btn--large {
90
+ padding: var(--spacing-md) var(--spacing-lg);
91
+ font-size: var(--font-size-lg);
92
+ }
93
+
94
+ /* Modifiers */
95
+ .btn--full-width {
96
+ width: 100%;
97
+ }
98
+
99
+ .btn--icon-only {
100
+ padding: var(--spacing-sm);
101
+ }
102
+
103
+ .btn--icon-only.btn--small {
104
+ padding: var(--spacing-xs);
105
+ }
106
+
107
+ .btn--icon-only.btn--large {
108
+ padding: var(--spacing-md);
109
+ }
110
+
111
+ /* Loading */
112
+ .btn--loading {
113
+ position: relative;
114
+ color: transparent;
115
+ }
116
+
117
+ .btn__spinner {
118
+ position: absolute;
119
+ width: 16px;
120
+ height: 16px;
121
+ border: 2px solid currentColor;
122
+ border-top-color: transparent;
123
+ border-radius: 50%;
124
+ animation: spin 0.8s linear infinite;
125
+ }
126
+
127
+ .btn--primary .btn__spinner,
128
+ .btn--secondary .btn__spinner {
129
+ border-color: var(--text-inverse);
130
+ border-top-color: transparent;
131
+ }
132
+
133
+ /* Icons */
134
+ .btn__icon {
135
+ display: flex;
136
+ align-items: center;
137
+ justify-content: center;
138
+ }
139
+
140
+ .btn__icon svg {
141
+ width: 18px;
142
+ height: 18px;
143
+ }
144
+
145
+ @keyframes spin {
146
+ to {
147
+ transform: rotate(360deg);
148
+ }
149
+ }
150
+
151
+ }
@@ -0,0 +1 @@
1
+ const F={width:2227,height:410},l=F.width/F.height,L='<path d="M236.96 273.328L351.756 409.995H473.909L236.96 273.328Z" fill="#919191"/> <path d="M236.96 273.328L236.503 273.595L0.0102539 409.995H122.163L236.96 273.328Z" fill="#727272"/> <path d="M236.96 273.328L286.755 409.995H351.756L236.96 273.328Z" fill="#828282"/> <path d="M236.96 409.995H286.755L236.96 273.328V409.995Z" fill="#828282"/> <path d="M187.165 409.995H236.96V273.328L187.165 409.995Z" fill="#828282"/> <path d="M236.96 273.328L122.164 409.995H187.165L236.96 273.328Z" fill="#828282"/> <path d="M236.96 273.328L237.288 273.518L473.914 409.99L412.833 304.309L236.96 273.328Z" fill="#D7D7D7"/> <path d="M236.96 273.328L412.833 304.309L380.332 248.071L236.96 273.328Z" fill="#E6E6E6"/> <path d="M236.96 273.328L380.332 248.072L355.44 204.995L236.96 273.328Z" fill="#E6E6E6"/> <path d="M355.44 204.995L330.542 161.918L236.96 273.328L355.44 204.995Z" fill="#E6E6E6"/> <path d="M236.96 273.328L330.542 161.918L298.041 105.68L236.96 273.328Z" fill="#E6E6E6"/> <path d="M236.96 273.328L298.041 105.68L236.96 0V273.328Z" fill="#F6F6F6"/> <path d="M0 410L0.0102607 409.995H0V410Z" fill="#FFFFFF"/> <path d="M236.96 273.328V0L175.878 105.68L236.96 273.328Z" fill="#242424"/> <path d="M236.96 273.328L61.0868 304.309L0.00512695 409.99L236.96 273.328Z" fill="#434343"/> <path d="M236.96 273.328L175.878 105.68L143.377 161.918L236.96 273.328Z" fill="#333333"/> <path d="M143.377 161.918L118.48 204.995L236.96 273.328L143.377 161.918Z" fill="#333333"/> <path d="M236.96 273.328L118.48 204.995L93.5874 248.072L236.96 273.328Z" fill="#333333"/> <path d="M236.96 273.328L93.5873 248.071L61.0867 304.309L236.96 273.328Z" fill="#333333"/> <g style="mix-blend-mode:color"> <mask id="mask0_253_8965" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="0" y="-1" width="474" height="411"> <g style="mix-blend-mode:difference"> <path fill-rule="evenodd" clip-rule="evenodd" d="M0.00500852 409.98L236.96 273.318L236.503 273.585L0.0102714 409.985H122.163L122.163 409.985H187.165L236.96 409.984H286.755H351.756L351.756 409.985H473.909L253.227 282.701L473.914 409.98L412.833 304.3L380.332 248.062L355.44 204.985L330.542 161.909L330.542 161.908L298.041 105.67L236.96 -0.00976562L175.878 105.67L236.96 273.318L175.878 105.671L143.377 161.909L143.377 161.909L118.48 204.985L93.5874 248.062L61.0867 304.3L0.00500852 409.98ZM0 409.99V409.985H0.0102607L0 409.99Z" fill="white"/> </g> </mask> <g mask="url(#mask0_253_8965)"> <rect y="-0.00976562" width="470.451" height="410.01" fill="#DD5E27"/> </g> </g> <path d="M624.652 71.958V111.247H665.229V71.958H624.652ZM627.211 144.977V334.01H663.036V144.977H627.211Z" fill="#FFFFFF"/> <path d="M702.893 334.01H738.717V217.995C738.717 189.455 755.533 170.552 782.219 170.552C809.635 170.552 814.753 187.602 814.753 212.806V334.01H850.578V217.995C850.578 189.455 867.393 170.552 894.079 170.552C921.496 170.552 926.613 187.602 926.613 212.806V334.01H962.438V202.798C962.438 162.397 943.429 139.417 905.777 139.417C876.898 139.417 858.254 154.243 844.729 172.405H843.998C836.321 151.278 820.602 139.417 794.647 139.417C766.5 139.417 749.318 154.243 739.448 168.698H738.717V144.977H702.893V334.01Z" fill="#FFFFFF"/> <path d="M1051.48 339.199C1081.82 339.199 1103.02 326.967 1115.45 307.323H1116.18C1118.01 328.82 1127.88 335.863 1145.42 335.863C1151.27 335.863 1157.49 335.121 1163.7 333.639V311.4C1161.51 311.77 1160.41 311.77 1159.32 311.77C1152.37 311.77 1150.54 304.728 1150.54 291.014V204.281C1150.54 155.355 1119.84 139.046 1081.45 139.046C1024.43 139.046 1001.03 167.586 999.202 203.91H1035.76C1037.59 178.706 1047.46 168.328 1079.99 168.328C1107.41 168.328 1115.45 179.818 1115.45 193.532C1115.45 212.065 1097.54 215.771 1068.29 221.331C1021.87 230.597 990.429 242.829 990.429 285.083C990.429 317.33 1014.19 339.199 1051.48 339.199ZM1059.52 309.917C1037.22 309.917 1028.08 300.28 1028.08 282.489C1028.08 262.844 1041.61 253.949 1074.51 246.906C1093.52 242.829 1109.6 238.752 1115.45 233.192V260.25C1115.45 293.238 1091.69 309.917 1059.52 309.917Z" fill="#FFFFFF"/> <path d="M1322.51 321.407C1322.51 356.99 1304.97 372.187 1270.97 372.187C1240.63 372.187 1227.84 358.843 1224.18 341.793H1187.26C1190.91 375.893 1217.6 401.839 1270.97 401.839C1324.34 401.839 1358.34 376.264 1358.34 319.183V144.977H1322.51V167.216H1321.78C1311.55 153.872 1294.37 139.417 1264.39 139.417C1217.97 139.417 1182.14 171.293 1182.14 232.08C1182.14 292.496 1217.97 324.373 1264.39 324.373C1294.37 324.373 1311.55 311.029 1321.78 295.832H1322.51V321.407ZM1270.97 169.81C1303.14 169.81 1322.15 190.567 1322.15 232.08C1322.15 273.222 1303.14 294.35 1270.97 294.35C1235.88 294.35 1219.43 267.663 1219.43 232.08C1219.43 196.497 1235.88 169.81 1270.97 169.81Z" fill="#FFFFFF"/> <path d="M1396.11 71.958V111.247H1436.68V71.958H1396.11ZM1398.66 144.977V334.01H1434.49V144.977H1398.66Z" fill="#FFFFFF"/> <path d="M1474.35 334.01H1510.17V217.995C1510.17 189.455 1529.91 170.552 1560.62 170.552C1587.3 170.552 1598.27 187.602 1598.27 212.806V334.01H1634.46V202.798C1634.46 159.432 1606.68 139.417 1572.32 139.417C1540.15 139.417 1520.77 154.243 1510.9 168.698H1510.17V144.977H1474.35V334.01Z" fill="#FFFFFF"/> <path d="M1754.77 339.569C1803.75 339.569 1831.17 312.141 1840.67 275.817H1804.48C1800.83 288.419 1788.4 309.917 1755.5 309.917C1718.58 309.917 1700.3 281.006 1699.57 249.13H1842.87C1843.23 246.165 1843.23 240.605 1843.23 235.416C1843.23 176.853 1811.43 139.046 1754.77 139.046C1697.74 139.046 1662.65 179.818 1662.65 239.122C1662.65 296.944 1695.55 339.569 1754.77 339.569ZM1753.67 168.698C1785.47 168.698 1805.58 190.938 1805.58 220.59H1699.57C1701.76 189.455 1723.7 168.698 1753.67 168.698Z" fill="#FFFFFF"/> <path d="M1856.62 293.608V334.01H1896.47V293.608H1856.62Z" fill="#FFFFFF"/> <path d="M1943.01 71.958V111.247H1983.59V71.958H1943.01ZM1945.57 144.977V334.01H1981.4V144.977H1945.57Z" fill="#FFFFFF"/> <path d="M2104.29 339.569C2162.41 339.569 2197.5 298.427 2197.5 239.122C2197.5 180.189 2162.41 139.046 2104.29 139.046C2046.16 139.046 2011.07 180.559 2011.07 239.493C2011.07 298.798 2046.16 339.569 2104.29 339.569ZM2104.29 309.546C2065.9 309.546 2048.36 278.782 2048.36 239.493C2048.36 199.833 2065.9 169.44 2104.29 169.44C2142.3 169.44 2160.22 199.833 2160.22 239.493C2160.22 278.782 2142.3 309.546 2104.29 309.546Z" fill="#FFFFFF"/>',C=[{d:"M236.96 273.328L351.756 409.995H473.909L236.96 273.328Z",fill:"#919191"},{d:"M236.96 273.328L236.503 273.595L0.0102539 409.995H122.163L236.96 273.328Z",fill:"#727272"},{d:"M236.96 273.328L286.755 409.995H351.756L236.96 273.328Z",fill:"#828282"},{d:"M236.96 409.995H286.755L236.96 273.328V409.995Z",fill:"#828282"},{d:"M187.165 409.995H236.96V273.328L187.165 409.995Z",fill:"#828282"},{d:"M236.96 273.328L122.164 409.995H187.165L236.96 273.328Z",fill:"#828282"},{d:"M236.96 273.328L237.288 273.518L473.914 409.99L412.833 304.309L236.96 273.328Z",fill:"#D7D7D7"},{d:"M236.96 273.328L412.833 304.309L380.332 248.071L236.96 273.328Z",fill:"#E6E6E6"},{d:"M236.96 273.328L380.332 248.072L355.44 204.995L236.96 273.328Z",fill:"#E6E6E6"},{d:"M355.44 204.995L330.542 161.918L236.96 273.328L355.44 204.995Z",fill:"#E6E6E6"},{d:"M236.96 273.328L330.542 161.918L298.041 105.68L236.96 273.328Z",fill:"#E6E6E6"},{d:"M236.96 273.328L298.041 105.68L236.96 0V273.328Z",fill:"#F6F6F6"},{d:"M0 410L0.0102607 409.995H0V410Z",fill:"#FFFFFF"},{d:"M236.96 273.328V0L175.878 105.68L236.96 273.328Z",fill:"#242424"},{d:"M236.96 273.328L61.0868 304.309L0.00512695 409.99L236.96 273.328Z",fill:"#434343"},{d:"M236.96 273.328L175.878 105.68L143.377 161.918L236.96 273.328Z",fill:"#333333"},{d:"M143.377 161.918L118.48 204.995L236.96 273.328L143.377 161.918Z",fill:"#333333"},{d:"M236.96 273.328L118.48 204.995L93.5874 248.072L236.96 273.328Z",fill:"#333333"},{d:"M236.96 273.328L93.5873 248.071L61.0867 304.309L236.96 273.328Z",fill:"#333333"},{d:"M624.652 71.958V111.247H665.229V71.958H624.652ZM627.211 144.977V334.01H663.036V144.977H627.211Z",fill:"#FFFFFF"},{d:"M702.893 334.01H738.717V217.995C738.717 189.455 755.533 170.552 782.219 170.552C809.635 170.552 814.753 187.602 814.753 212.806V334.01H850.578V217.995C850.578 189.455 867.393 170.552 894.079 170.552C921.496 170.552 926.613 187.602 926.613 212.806V334.01H962.438V202.798C962.438 162.397 943.429 139.417 905.777 139.417C876.898 139.417 858.254 154.243 844.729 172.405H843.998C836.321 151.278 820.602 139.417 794.647 139.417C766.5 139.417 749.318 154.243 739.448 168.698H738.717V144.977H702.893V334.01Z",fill:"#FFFFFF"},{d:"M1051.48 339.199C1081.82 339.199 1103.02 326.967 1115.45 307.323H1116.18C1118.01 328.82 1127.88 335.863 1145.42 335.863C1151.27 335.863 1157.49 335.121 1163.7 333.639V311.4C1161.51 311.77 1160.41 311.77 1159.32 311.77C1152.37 311.77 1150.54 304.728 1150.54 291.014V204.281C1150.54 155.355 1119.84 139.046 1081.45 139.046C1024.43 139.046 1001.03 167.586 999.202 203.91H1035.76C1037.59 178.706 1047.46 168.328 1079.99 168.328C1107.41 168.328 1115.45 179.818 1115.45 193.532C1115.45 212.065 1097.54 215.771 1068.29 221.331C1021.87 230.597 990.429 242.829 990.429 285.083C990.429 317.33 1014.19 339.199 1051.48 339.199ZM1059.52 309.917C1037.22 309.917 1028.08 300.28 1028.08 282.489C1028.08 262.844 1041.61 253.949 1074.51 246.906C1093.52 242.829 1109.6 238.752 1115.45 233.192V260.25C1115.45 293.238 1091.69 309.917 1059.52 309.917Z",fill:"#FFFFFF"},{d:"M1322.51 321.407C1322.51 356.99 1304.97 372.187 1270.97 372.187C1240.63 372.187 1227.84 358.843 1224.18 341.793H1187.26C1190.91 375.893 1217.6 401.839 1270.97 401.839C1324.34 401.839 1358.34 376.264 1358.34 319.183V144.977H1322.51V167.216H1321.78C1311.55 153.872 1294.37 139.417 1264.39 139.417C1217.97 139.417 1182.14 171.293 1182.14 232.08C1182.14 292.496 1217.97 324.373 1264.39 324.373C1294.37 324.373 1311.55 311.029 1321.78 295.832H1322.51V321.407ZM1270.97 169.81C1303.14 169.81 1322.15 190.567 1322.15 232.08C1322.15 273.222 1303.14 294.35 1270.97 294.35C1235.88 294.35 1219.43 267.663 1219.43 232.08C1219.43 196.497 1235.88 169.81 1270.97 169.81Z",fill:"#FFFFFF"},{d:"M1396.11 71.958V111.247H1436.68V71.958H1396.11ZM1398.66 144.977V334.01H1434.49V144.977H1398.66Z",fill:"#FFFFFF"},{d:"M1474.35 334.01H1510.17V217.995C1510.17 189.455 1529.91 170.552 1560.62 170.552C1587.3 170.552 1598.27 187.602 1598.27 212.806V334.01H1634.46V202.798C1634.46 159.432 1606.68 139.417 1572.32 139.417C1540.15 139.417 1520.77 154.243 1510.9 168.698H1510.17V144.977H1474.35V334.01Z",fill:"#FFFFFF"},{d:"M1754.77 339.569C1803.75 339.569 1831.17 312.141 1840.67 275.817H1804.48C1800.83 288.419 1788.4 309.917 1755.5 309.917C1718.58 309.917 1700.3 281.006 1699.57 249.13H1842.87C1843.23 246.165 1843.23 240.605 1843.23 235.416C1843.23 176.853 1811.43 139.046 1754.77 139.046C1697.74 139.046 1662.65 179.818 1662.65 239.122C1662.65 296.944 1695.55 339.569 1754.77 339.569ZM1753.67 168.698C1785.47 168.698 1805.58 190.938 1805.58 220.59H1699.57C1701.76 189.455 1723.7 168.698 1753.67 168.698Z",fill:"#FFFFFF"},{d:"M1856.62 293.608V334.01H1896.47V293.608H1856.62Z",fill:"#FFFFFF"},{d:"M1943.01 71.958V111.247H1983.59V71.958H1943.01ZM1945.57 144.977V334.01H1981.4V144.977H1945.57Z",fill:"#FFFFFF"},{d:"M2104.29 339.569C2162.41 339.569 2197.5 298.427 2197.5 239.122C2197.5 180.189 2162.41 139.046 2104.29 139.046C2046.16 139.046 2011.07 180.559 2011.07 239.493C2011.07 298.798 2046.16 339.569 2104.29 339.569ZM2104.29 309.546C2065.9 309.546 2048.36 278.782 2048.36 239.493C2048.36 199.833 2065.9 169.44 2104.29 169.44C2142.3 169.44 2160.22 199.833 2160.22 239.493C2160.22 278.782 2142.3 309.546 2104.29 309.546Z",fill:"#FFFFFF"}],H="M236.96 0L473.914 410H0.005L236.96 0Z",V="#DD5E27";export{l as LOGO_ASPECT,C as LOGO_PATHS,H as LOGO_SILHOUETTE,L as LOGO_SVG_INNER,V as LOGO_TINT,F as LOGO_VIEWBOX};
@@ -0,0 +1 @@
1
+ import*as M from"three";import{getWatermarkShown as v}from"./d3cd7f1bc1.js";import{LOGO_PATHS as I,LOGO_SILHOUETTE as G,LOGO_TINT as U,LOGO_VIEWBOX as W,LOGO_ASPECT as F}from"./b3efb26fd7.js";const X=1e3,E=new WeakMap;function N(t){t&&typeof t.render=="function"&&!E.has(t)&&E.set(t,t.render)}function V(t,r,n){return(E.get(t)||t.render).call(t,r,n)}const $='-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',z="rgba(240, 74, 42, 0.55)",K="rgba(255, 255, 255, 0.72)",k=28,A=(t,r,n)=>Math.min(Math.max(r,t),n);function B(t){return{em:A(10,.012*t+6,13.5),inset:A(8,.02*t,14)}}function _(t,r,n,e,o,s){if(typeof t.roundRect=="function"){t.beginPath(),t.roundRect(r,n,e,o,s);return}const c=Math.min(s,e/2,o/2);t.beginPath(),t.moveTo(r+c,n),t.arcTo(r+e,n,r+e,n+o,c),t.arcTo(r+e,n+o,r,n+o,c),t.arcTo(r,n+o,r,n,c),t.arcTo(r,n,r+e,n,c),t.closePath()}function Y(t,r){if(typeof document>"u")return null;const n=document.createElement("canvas"),e=n.getContext("2d");if(!e)return null;const o=(P,H)=>{e.font=`${P} ${t}px ${$}`;try{e.letterSpacing=`${H}em`}catch{}};o(400,.01);const s=e.measureText("Powered by").width,c=.96*t,l=.67*t,u=.95*t,p=1.2*t,T=.6*t,a=1.4*t+2*T,d=1.05*t,f=d*F,i=u+s+l+f+p,g=Math.ceil((i+2*k)*r),R=Math.ceil((a+2*k)*r);n.width=g,n.height=R,e.scale(r,r),e.translate(k,k);const m=a/2,h=a/2,S=Math.SQRT1_2,w=S*(i+a),b=e.createLinearGradient(i/2-S*w/2,h-S*w/2,i/2+S*w/2,h+S*w/2);b.addColorStop(0,"rgba(26, 26, 34, 0.88)"),b.addColorStop(1,"rgba(14, 14, 18, 0.80)"),_(e,0,0,i,a,m),e.save(),e.shadowColor="rgba(0, 0, 0, 0.28)",e.shadowBlur=16,e.shadowOffsetY=4,e.fillStyle=b,e.fill(),e.restore(),e.save(),_(e,0,0,i,a,m),e.clip(),_(e,0,0,i,a,m),e.lineWidth=2,e.strokeStyle="rgba(255, 255, 255, 0.10)",e.stroke(),e.translate(0,1),_(e,0,0,i,a,m),e.lineWidth=2,e.strokeStyle="rgba(255, 255, 255, 0.08)",e.stroke(),e.restore(),e.textBaseline="middle",o(400,.01),e.fillStyle=K,e.fillText("Powered by",u,h);const C=u+s+l,L=h-d/2;e.save(),e.translate(C,L),e.scale(f/W.width,d/W.height);for(const P of I)e.fillStyle=P.fill,e.fill(new Path2D(P.d));return e.save(),e.clip(new Path2D(G)),e.globalCompositeOperation="color",e.fillStyle=U,e.fill(new Path2D(G)),e.restore(),e.restore(),{canvas:n,w:i,h:a,texW:g,texH:R,res:r,anchors:{tri:[C+f*(.62*W.height/W.width),L+d*.74],pill:[u+s+l*.5,h]}}}let y=null,O=null,x=null;function D(){if(y)return y;const t=new M.Scene,r=new M.OrthographicCamera(0,1,1,0,-1,1),n=new M.MeshBasicMaterial({transparent:!0,depthTest:!1,depthWrite:!1,toneMapped:!1}),e=new M.Mesh(new M.PlaneGeometry(1,1),n);return e.frustumCulled=!1,t.add(e),y={scene:t,camera:r,mesh:e,material:n},y}function q(t,r){const n=`${t.toFixed(3)}|${r}`;if(O&&O.key===n)return O.painted;const e=Y(t,r);if(!e)return null;const o=new M.CanvasTexture(e.canvas);o.colorSpace=M.SRGBColorSpace,o.minFilter=M.LinearFilter,o.magFilter=M.LinearFilter,o.generateMipmaps=!1;const s=D(),c=O?.texture;return s.material.map=o,s.material.needsUpdate=!0,O={key:n,texture:o,painted:e},c&&c.dispose(),e}function J(t,{width:r,height:n,dpr:e=1,vw:o=r,avoid:s=null}={}){if(!v()||!t||!(r>0)||!(n>0))return!1;N(t);const{em:c,inset:l}=B(o),u=q(c,e*2);if(!u)return!1;const p=D(),T=u.texW/u.res,a=u.texH/u.res,d=C=>Math.round(C*e)/e,f=Math.max(0,Math.min(s?.bottom||0,Math.max(0,n-a-l*2))),i=Math.max(0,Math.min(s?.left||0,Math.max(0,r-T-l*2))),g=d(l-k+i),R=d(l-k+f);p.camera.left=0,p.camera.right=r,p.camera.top=n,p.camera.bottom=0,p.camera.updateProjectionMatrix(),p.mesh.scale.set(T,a,1),p.mesh.position.set(g+T/2,R+a/2,0);const m=t.autoClear,h=t.getScissorTest(),S=t.clippingPlanes,w=t.getRenderTarget(),b=new M.Vector4;t.getViewport(b),t.autoClear=!1,t.setScissorTest(!1),t.clippingPlanes=[],w||t.setViewport(0,0,r,n),t.clearDepth();try{V(t,p.scene,p.camera)}finally{t.autoClear=m,t.setScissorTest(h),t.clippingPlanes=S,w||t.setViewport(b)}return x={width:r,height:n,dpr:e,inset:l,painted:u,target:!!w,shiftUp:f,shiftRight:i},!0}function Z(t){const r=x;if(!t||!r||r.target||t.getRenderTarget())return null;const n=typeof t.getContext=="function"?t.getContext():null;if(!n||typeof n.isContextLost=="function"&&n.isContextLost())return null;const{width:e,height:o,dpr:s,inset:c,painted:l,shiftUp:u=0,shiftRight:p=0}=r;if(Math.abs(t.domElement.width-Math.round(e*s))>1||Math.abs(t.domElement.height-Math.round(o*s))>1)return null;const T=([m,h])=>[Math.floor((c+p+m)*s),Math.floor((c+u+(l.h-h))*s)],a=new Uint8Array(4),d=([m,h])=>(n.readPixels(m,h,1,1,n.RGBA,n.UNSIGNED_BYTE,a),[a[0],a[1],a[2],a[3]]),f=d(T(l.anchors.tri)),i=d(T(l.anchors.pill)),g=f[0]>=170&&f[1]>=20&&f[1]<=150&&f[2]<=130,R=i[0]<=130&&i[1]<=130&&i[2]<=130;return{ok:g&&R,tri:f,pill:i}}function tt(){if(!v())return null;const t=x;return!t||!t.painted?null:{left:t.inset+(t.shiftRight||0),bottom:t.inset+(t.shiftUp||0),width:t.painted.w,height:t.painted.h}}function et(t,r){const{em:n,inset:e}=B(r),o=x?.painted;return o?{width:o.w,height:o.h,inset:e}:{width:n*13,height:n*2.6,inset:e}}function nt(){if(!x)return null;const{width:t,height:r,dpr:n,inset:e,painted:o}=x;return{width:t,height:r,dpr:n,inset:e,pillW:o.w,pillH:o.h,anchors:o.anchors}}export{X as WATERMARK_RENDER_PRIORITY,nt as _getWatermarkLayout,B as computeWatermarkMetrics,J as drawWatermarkOverlay,et as getWatermarkMetrics,tt as getWatermarkPlacement,Y as paintMark,Z as probeWatermarkPixels,N as rememberRenderer,V as renderWith};
@@ -0,0 +1 @@
1
+ import a from"./872c4302e0.js";const u=e=>{if(e==null)return null;const t=Number(e);return Number.isFinite(t)?t:null};function p(e,t=null){if(!e)return null;const s=u(e.basePrice??e.base_price);if(s!=null)return s;const n=e.graph??e.productGraph;if(n&&typeof n=="object"){const r=u(n.basePrice??n.base_price);if(r!=null)return r}const l=typeof n=="number"||typeof n=="string"?n:e.productGraphId??e.product_graph;if(l!=null){let r=t;if(r==null)try{r=a.getState().productGraphs}catch{r=null}const i=r?.[l]??r?.[String(l)];if(i){const c=u(i.basePrice??i.base_price);if(c!=null)return c}}return null}export{p as resolveBasePrice};
@@ -0,0 +1 @@
1
+ import{useSyncExternalStore as e}from"react";import{isReadOnlyCredential as n,onReadOnlyChange as r}from"./431a2d8618.js";function t(){return e(r,n,()=>!1)}export{t as default};
@@ -0,0 +1 @@
1
+ import{jsx as t,jsxs as o}from"react/jsx-runtime";import i,{useEffect as p,useState as Z,Suspense as m}from"react";import s from"./8f60e5059a.js";import{useUIRegions as ee}from"./9840b9ce12.js";import{useLabels as te}from"./28d887bf8a.js";import ae from"./9c6c598569.js";import M from"./be337ddda5.js";import{applySystemTheme as oe}from"./5c9fd9201c.js";import{useCopilotAvailable as se}from"./672404d987.js";import ie from"./ce663020e4.js";import ne from"./921bf270dd.js";import le from"./35d8449ed8.js";import re from"./d0f9681634.js";import ce from"./a822c5e4f2.js";import me from"./bdec200d00.js";import z from"./9794652102.js";import be from"./54413c1eae.js";import{resolveComponent as n,useComponentRegistry as B}from"./882bc739c8.js";import E from"./37596ace72.js";import de from"./26155bf68c.js";import ue from"./2cab5c5c23.js";import{useHasIcon as pe}from"./09c4973968.js";import{ChevronRight as ve,LogoIcon as fe,MobileConfiguratorIcon as _e,MobileChatIcon as he,MobileLiveStatusIcon as ye}from"./c5e990946e.js";import"./7bfb0ecfbb.css";import"@copilotkit/react-ui/styles.css";const T=i.lazy(()=>import("./7a748aae59.js")),ge=i.lazy(()=>import("./54f0fcf38b.js")),I=i.lazy(()=>import("./5d5e8a9c58.js")),$=i.lazy(()=>import("./28df2aa12f.js")),G=i.lazy(()=>import("./4c24338793.js")),R=i.lazy(()=>import("./f89d7cd931.js"));function x(){return ie(),null}function Se(l){if(!l||l==="default")return"";const b=String(l).replace(/[^a-z0-9-]/g,"");return b?` main-layout--tpl-${b}`:""}function Ne({Scene:l,template:b}){B();const v=n("Sidebar",me);B();const O=n("SceneToolbar",be),j=n("SaveProjectButton",ue),D=n("GenerateAssetsButton",de),U=n("ChatBar",ge),C=Se(b),w=M(e=>e.systemTheme),L=M(e=>e.systemName)||"Configurator",A=M(e=>e.systemThemeRecord);p(()=>{let e=A??w,c=!1;try{const u=new URLSearchParams(window.location.search);u.has("theme")&&(e=u.get("theme"),c=!0)}catch{}oe(e,{force:c})},[w,A]);const a=ee(),d=te(),k=s(e=>e.sidebarOpen),H=s(e=>e.jsonPanelOpen),W=pe("logo"),f=s(e=>e.isMobile),_=s(e=>e.setIsMobile),{isOn:h}=re({isMobile:f}),Ce=s(e=>e.addNotification),q=s(e=>e.openModal),F=ae(e=>e.setCameraPosition),r=s(e=>e.mobileActiveAccordion),y=s(e=>e.setMobileActiveAccordion),J=s(e=>e.isSceneLoading),g=s(e=>e.isLayoutLoading),we=s(e=>e.liveStatusSummary),S=s(e=>e.isLandscapeMode),K=s(e=>e.landscapeMethod),N=se();le({disabled:f}),p(()=>{const e=()=>{if(s.getState().isLandscapeMode){_(!0);return}_(window.innerWidth<768)};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[_]);const[P,Q]=Z(!1);p(()=>{const e="ontouchstart"in window||navigator.maxTouchPoints>0,c=()=>{const u=Math.min(window.innerWidth,window.innerHeight)<768;Q(e&&u)};return c(),window.addEventListener("resize",c),()=>window.removeEventListener("resize",c)},[]),p(()=>{window.dispatchEvent(new Event("resize"))},[S]);const{handleGenerateAssets:V,isGenerating:X}=ne({openModal:q,setCameraPosition:F}),Y=J?"processing":"stable";return f?o("div",{className:`main-layout main-layout--mobile${S?" main-layout--landscape":""}${K==="css-rotation"?" main-layout--css-rotated":""}${C}`,children:[t(z,{}),N&&t(x,{}),a.header&&o("div",{className:"mobile-top-bar",children:[o("div",{className:"mobile-top-bar__logo",children:[W?t(fe,{className:"mobile-top-bar__logo-icon"}):null,t("span",{className:"mobile-top-bar__title",children:L})]}),o("div",{style:{display:"flex",gap:"6px",alignItems:"center"},children:[t(j,{disabled:g}),t(D,{onClick:V,isGenerating:X,disabled:g,className:"header__generate-btn"})]})]}),o("div",{className:`mobile-main${S?" mobile-main--landscape":""}`,children:[o("main",{className:"main-layout__scene",children:[t(l,{isMobile:P}),a.notifications&&t(E,{maxCount:1}),a.toolbar&&t(O,{variant:"mobile"})]}),(a.sidebar||a.chat||a.panels)&&o("div",{"data-sdk-overlay":!0,className:"mobile-tabs",style:g?{opacity:.5,pointerEvents:"none"}:void 0,children:[o("div",{className:"mobile-tabs__bar",children:[a.sidebar&&o("button",{className:`mobile-tabs__tab ${r==="configurator"?"mobile-tabs__tab--active":""}`,onClick:()=>y("configurator"),children:[t(_e,{}),t("span",{className:"mobile-tabs__tab-label",children:L})]}),a.chat&&o("button",{className:`mobile-tabs__tab ${r==="chat"?"mobile-tabs__tab--active":""}`,onClick:()=>y("chat"),children:[t(he,{}),o("span",{className:"mobile-tabs__tab-label",children:[d("tabs.chat","Chat"),!N&&o("span",{style:{marginLeft:"4px",fontSize:"12px",color:"#ff6b6b"},children:["(",t("span",{style:{color:"#ff9800"},children:"\u26A0"}),")"]})]})]}),a.panels&&h("liveStatus")&&o("button",{className:`mobile-tabs__tab ${r==="livestatus"?"mobile-tabs__tab--active":""}`,onClick:()=>y("livestatus"),children:[t(ye,{}),d("tabs.status","Status")?t("span",{className:"mobile-tabs__tab-label",children:d("tabs.status","Status")}):null,t("span",{className:`mobile-tabs__badge-dot mobile-tabs__badge-dot--${Y}`})]})]}),o("div",{className:"mobile-tabs__content",children:[a.sidebar&&t("div",{className:"mobile-tabs__panel mobile-tabs__panel--configurator",style:{display:r==="configurator"?void 0:"none"},children:t(v,{})}),a.chat&&t("div",{className:"mobile-tabs__panel mobile-tabs__panel--chat",style:{display:r==="chat"?void 0:"none"},children:t(m,{fallback:null,children:t(U,{alwaysExpanded:!0})})}),a.panels&&h("liveStatus")&&t("div",{className:"mobile-tabs__panel mobile-tabs__panel--livestatus",style:{display:r==="livestatus"?void 0:"none"},children:t(m,{fallback:null,children:i.createElement(n("LiveStatusPanel",T),{embedded:!0})})})]})]})]}),o(m,{fallback:null,children:[t(I,{}),t($,{}),t(G,{}),t(R,{})]})]}):o("div",{className:`main-layout${C}`,children:[t(z,{}),N&&t(x,{}),t("div",{className:"main-layout__content",children:o("main",{className:`main-layout__scene${k&&a.sidebar?" main-layout__scene--sidebar-open":""}`,children:[t(l,{isMobile:P}),a.header&&t(ce,{}),a.sidebar?k?t(v,{}):t("button",{className:"sidebar-toggle-btn",onClick:()=>s.getState().openSidebar(),title:d("sidebar.open","Open sidebar"),children:t(ve,{})}):a.chat&&t(v,{}),a.panels&&H&&h("liveStatus")&&t(m,{fallback:null,children:i.createElement(n("LiveStatusPanel",T))})]})}),a.notifications&&t(E,{}),o(m,{fallback:null,children:[t(I,{}),t($,{}),t(G,{}),t(R,{})]})]})}var Ve=Ne;export{Ve as default};
@@ -0,0 +1 @@
1
+ import{FEATURE_ROLES as d}from"./f8cb80a93c.js";const _=Object.freeze({countertop_finish:d.SURFACE_FINISH,cabinet_finish:d.PIECE_FINISH,door_style:d.DOOR_STYLE,door_handle:d.HANDLE_TYPE,hardware_finish:d.HARDWARE_FINISH,door_handle_finish:d.HARDWARE_FINISH}),P=Object.freeze({cabinet_finish:d.PIECE_FINISH,door_style:d.DOOR_STYLE,door_handle:d.HANDLE_TYPE,door_handle_finish:d.HARDWARE_FINISH});function h(e,r){const n={};if(!e||typeof e!="object")return n;for(const[s,t]of Object.entries(r))e[s]!=null&&e[s]!==""&&n[t]==null&&(n[t]=e[s]);return n}function A(e){if(!e||typeof e!="object")return e;const{cabinet_finish:r,cabinet_material:n,door_style:s,door_handle:t,door_handle_finish:i,appliance:c,appliances:o,...a}=e,p={...h(e,P),...a.selections||{}},E=[...c!=null?[c]:[],...Array.isArray(o)?o:[]].map(l=>typeof l=="object"&&l!==null?{id:l.id,...l.featureSelections?{featureSelections:l.featureSelections}:{}}:{id:l}),u=[...Array.isArray(a.hosted)?a.hosted:[],...E];return{...a,...Object.keys(p).length?{selections:p}:{},...a.materialId==null&&n!=null?{materialId:n}:{},...u.length?{hosted:u}:{}}}const S=Object.freeze({sceneAppliances:"sceneHostedProducts",cabinetConfigSnapshot:"pieceConfigSnapshot",occupiedCabinetSlots:"occupiedPieceSlots",islandTier:"freePieceTier",islandWidthOption:"freePieceWidthOption",islandPosition:"freePiecePosition",islandRotation:"freePieceRotation"});function f(e){if(typeof e!="string")return e;const r=/^([a-z_]+)-door-(\d+)$/.exec(e);return r?`${r[1]}-part-${r[2]}`:e}const b=["hostFinishes","hostMaterials","hostStyles","hostHandleTypes","hostHardwareFinishes","hostProductOverrides","hostMaterialOverrides","hostWidths","hostDoorTypes","occupiedPieceSlots"];function H(e){if(!e||typeof e!="object")return e;const r={...e};for(const[t,i]of Object.entries(S))r[t]!==void 0&&r[i]===void 0&&(r[i]=r[t],delete r[t]);for(const t of b){const i=r[t];!i||typeof i!="object"||Array.isArray(i)||Object.keys(i).some(c=>c!==f(c))&&(r[t]=Object.fromEntries(Object.entries(i).map(([c,o])=>[f(c),o])))}const n={applianceId:"hostedProductId",pairedApplianceId:"pairedHostedProductId",pairedWithApplianceId:"pairedWithHostedProductId"},s=t=>{if(!t||typeof t!="object")return t;const i={...t};for(const[c,o]of Object.entries(n))i[c]!==void 0&&i[o]===void 0&&(i[o]=i[c],delete i[c]);return i};return Array.isArray(r.sceneHostedProducts)&&(r.sceneHostedProducts=r.sceneHostedProducts.map(t=>t&&typeof t=="object"?{...s(t),replacedPiece:f(t.replacedPiece),pairedWithPiece:f(t.pairedWithPiece)}:t)),r.occupiedPieceSlots&&typeof r.occupiedPieceSlots=="object"&&(r.occupiedPieceSlots=Object.fromEntries(Object.entries(r.occupiedPieceSlots).map(([t,i])=>[t,s(i)]))),r}function I(e){if(!e||typeof e!="object")return!0;if(e.islandConfig||Object.keys(_).some(s=>e[s]!=null))return!1;const r=Array.isArray(e.products)?e.products:[],n=[...Object.keys(P),"cabinet_material","appliance","appliances"];return!r.some(s=>s&&typeof s=="object"&&n.some(t=>s[t]!=null))}function R(e,r,n){if(!e||typeof e!="object"||I(e))return e;const s=h(e,_),t=n?n(s,r):{},i={...e.default_scene_selections||{},...t},c=Array.isArray(e.products)?e.products.map(A):e.products,o=e.islandConfig,a=o?{...o.tier!=null?{tier:o.tier}:{},...o.width!=null?{width:o.width}:{},...Array.isArray(o.product_id)?{product_id:o.product_id.map(A)}:{},selections:h(o,_)}:e.freePieceConfig,{countertop_finish:p,cabinet_finish:E,door_style:u,door_handle:l,hardware_finish:O,islandConfig:m,...y}=e;return{...y,products:c,...a?{freePieceConfig:a}:{},...Object.keys(i).length?{default_scene_selections:i}:{}}}export{I as isGenericLayoutShape,H as migrateLegacyUiKeys,f as migrateRenderKey,R as normalizeLayoutConfig,A as normalizeLayoutProduct};