@unseenco/theatre-core 0.2.3 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -28,16 +28,13 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
28
28
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
29
29
  mod
30
30
  ));
31
- var __publicField = (obj, key, value) => {
32
- __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
33
- return value;
34
- };
31
+ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
35
32
 
36
33
  // ../node_modules/timing-function/lib/UnitBezier.js
37
34
  var require_UnitBezier = __commonJS({
38
35
  "../node_modules/timing-function/lib/UnitBezier.js"(exports2, module2) {
39
36
  var UnitBezier2;
40
- module2.exports = UnitBezier2 = function() {
37
+ module2.exports = UnitBezier2 = (function() {
41
38
  function UnitBezier3(p1x, p1y, p2x, p2y) {
42
39
  this.set(p1x, p1y, p2x, p2y);
43
40
  }
@@ -111,7 +108,7 @@ var require_UnitBezier = __commonJS({
111
108
  return this._sampleCurveY(this._solveCurveX(x2, 1e-6));
112
109
  };
113
110
  return UnitBezier3;
114
- }();
111
+ })();
115
112
  }
116
113
  });
117
114
 
@@ -120,38 +117,28 @@ var require_fast_deep_equal = __commonJS({
120
117
  "../node_modules/fast-deep-equal/index.js"(exports2, module2) {
121
118
  "use strict";
122
119
  module2.exports = function equal(a2, b2) {
123
- if (a2 === b2)
124
- return true;
120
+ if (a2 === b2) return true;
125
121
  if (a2 && b2 && typeof a2 == "object" && typeof b2 == "object") {
126
- if (a2.constructor !== b2.constructor)
127
- return false;
122
+ if (a2.constructor !== b2.constructor) return false;
128
123
  var length, i2, keys2;
129
124
  if (Array.isArray(a2)) {
130
125
  length = a2.length;
131
- if (length != b2.length)
132
- return false;
126
+ if (length != b2.length) return false;
133
127
  for (i2 = length; i2-- !== 0; )
134
- if (!equal(a2[i2], b2[i2]))
135
- return false;
128
+ if (!equal(a2[i2], b2[i2])) return false;
136
129
  return true;
137
130
  }
138
- if (a2.constructor === RegExp)
139
- return a2.source === b2.source && a2.flags === b2.flags;
140
- if (a2.valueOf !== Object.prototype.valueOf)
141
- return a2.valueOf() === b2.valueOf();
142
- if (a2.toString !== Object.prototype.toString)
143
- return a2.toString() === b2.toString();
131
+ if (a2.constructor === RegExp) return a2.source === b2.source && a2.flags === b2.flags;
132
+ if (a2.valueOf !== Object.prototype.valueOf) return a2.valueOf() === b2.valueOf();
133
+ if (a2.toString !== Object.prototype.toString) return a2.toString() === b2.toString();
144
134
  keys2 = Object.keys(a2);
145
135
  length = keys2.length;
146
- if (length !== Object.keys(b2).length)
147
- return false;
136
+ if (length !== Object.keys(b2).length) return false;
148
137
  for (i2 = length; i2-- !== 0; )
149
- if (!Object.prototype.hasOwnProperty.call(b2, keys2[i2]))
150
- return false;
138
+ if (!Object.prototype.hasOwnProperty.call(b2, keys2[i2])) return false;
151
139
  for (i2 = length; i2-- !== 0; ) {
152
140
  var key = keys2[i2];
153
- if (!equal(a2[key], b2[key]))
154
- return false;
141
+ if (!equal(a2[key], b2[key])) return false;
155
142
  }
156
143
  return true;
157
144
  }
@@ -411,10 +398,10 @@ var coreJsData = root_default["__core-js_shared__"];
411
398
  var coreJsData_default = coreJsData;
412
399
 
413
400
  // ../node_modules/lodash-es/_isMasked.js
414
- var maskSrcKey = function() {
401
+ var maskSrcKey = (function() {
415
402
  var uid = /[^.]+$/.exec(coreJsData_default && coreJsData_default.keys && coreJsData_default.keys.IE_PROTO || "");
416
403
  return uid ? "Symbol(src)_1." + uid : "";
417
- }();
404
+ })();
418
405
  function isMasked(func) {
419
406
  return !!maskSrcKey && maskSrcKey in func;
420
407
  }
@@ -823,8 +810,7 @@ var get_default = get;
823
810
 
824
811
  // shared/src/utils/getDeep.ts
825
812
  function getDeep(v2, path) {
826
- if (path.length === 0)
827
- return v2;
813
+ if (path.length === 0) return v2;
828
814
  return get_default(v2, path);
829
815
  }
830
816
 
@@ -862,14 +848,14 @@ var SimpleCache = class {
862
848
  import { Atom as Atom4, getPointerParts as getPointerParts2, prism as prism5, val as val5 } from "@unseenco/theatre-dataverse";
863
849
 
864
850
  // ../node_modules/lodash-es/_defineProperty.js
865
- var defineProperty = function() {
851
+ var defineProperty = (function() {
866
852
  try {
867
853
  var func = getNative_default(Object, "defineProperty");
868
854
  func({}, "", {});
869
855
  return func;
870
856
  } catch (e2) {
871
857
  }
872
- }();
858
+ })();
873
859
  var defineProperty_default = defineProperty;
874
860
 
875
861
  // ../node_modules/lodash-es/_baseAssignValue.js
@@ -1209,8 +1195,7 @@ __export(propTypes_exports, {
1209
1195
 
1210
1196
  // shared/src/utils/ellipsify.ts
1211
1197
  function ellipsify(str, maxLength) {
1212
- if (str.length <= maxLength)
1213
- return str;
1198
+ if (str.length <= maxLength) return str;
1214
1199
  return str.substr(0, maxLength - 3) + "...";
1215
1200
  }
1216
1201
 
@@ -1314,7 +1299,7 @@ var WeakMap_default = WeakMap2;
1314
1299
 
1315
1300
  // ../node_modules/lodash-es/_baseCreate.js
1316
1301
  var objectCreate = Object.create;
1317
- var baseCreate = function() {
1302
+ var baseCreate = /* @__PURE__ */ (function() {
1318
1303
  function object() {
1319
1304
  }
1320
1305
  return function(proto) {
@@ -1329,7 +1314,7 @@ var baseCreate = function() {
1329
1314
  object.prototype = void 0;
1330
1315
  return result;
1331
1316
  };
1332
- }();
1317
+ })();
1333
1318
  var baseCreate_default = baseCreate;
1334
1319
 
1335
1320
  // ../node_modules/lodash-es/_apply.js
@@ -1538,9 +1523,9 @@ var baseIsArguments_default = baseIsArguments;
1538
1523
  var objectProto8 = Object.prototype;
1539
1524
  var hasOwnProperty6 = objectProto8.hasOwnProperty;
1540
1525
  var propertyIsEnumerable = objectProto8.propertyIsEnumerable;
1541
- var isArguments = baseIsArguments_default(function() {
1526
+ var isArguments = baseIsArguments_default(/* @__PURE__ */ (function() {
1542
1527
  return arguments;
1543
- }()) ? baseIsArguments_default : function(value) {
1528
+ })()) ? baseIsArguments_default : function(value) {
1544
1529
  return isObjectLike_default(value) && hasOwnProperty6.call(value, "callee") && !propertyIsEnumerable.call(value, "callee");
1545
1530
  };
1546
1531
  var isArguments_default = isArguments;
@@ -1606,7 +1591,7 @@ var freeExports2 = typeof exports == "object" && exports && !exports.nodeType &&
1606
1591
  var freeModule2 = freeExports2 && typeof module == "object" && module && !module.nodeType && module;
1607
1592
  var moduleExports2 = freeModule2 && freeModule2.exports === freeExports2;
1608
1593
  var freeProcess = moduleExports2 && freeGlobal_default.process;
1609
- var nodeUtil = function() {
1594
+ var nodeUtil = (function() {
1610
1595
  try {
1611
1596
  var types = freeModule2 && freeModule2.require && freeModule2.require("util").types;
1612
1597
  if (types) {
@@ -1615,7 +1600,7 @@ var nodeUtil = function() {
1615
1600
  return freeProcess && freeProcess.binding && freeProcess.binding("util");
1616
1601
  } catch (e2) {
1617
1602
  }
1618
- }();
1603
+ })();
1619
1604
  var nodeUtil_default = nodeUtil;
1620
1605
 
1621
1606
  // ../node_modules/lodash-es/isTypedArray.js
@@ -3118,10 +3103,8 @@ function clampRgba(rgba2) {
3118
3103
  }
3119
3104
  function linearSrgbToSrgb(rgba2) {
3120
3105
  function compress(x2) {
3121
- if (x2 >= 31308e-7)
3122
- return 1.055 * x2 ** (1 / 2.4) - 0.055;
3123
- else
3124
- return 12.92 * x2;
3106
+ if (x2 >= 31308e-7) return 1.055 * x2 ** (1 / 2.4) - 0.055;
3107
+ else return 12.92 * x2;
3125
3108
  }
3126
3109
  return clampRgba({
3127
3110
  r: compress(rgba2.r),
@@ -3132,10 +3115,8 @@ function linearSrgbToSrgb(rgba2) {
3132
3115
  }
3133
3116
  function srgbToLinearSrgb(rgba2) {
3134
3117
  function expand(x2) {
3135
- if (x2 >= 0.04045)
3136
- return ((x2 + 0.055) / (1 + 0.055)) ** 2.4;
3137
- else
3138
- return x2 / 12.92;
3118
+ if (x2 >= 0.04045) return ((x2 + 0.055) / (1 + 0.055)) ** 2.4;
3119
+ else return x2 / 12.92;
3139
3120
  }
3140
3121
  return {
3141
3122
  r: expand(rgba2.r),
@@ -3192,8 +3173,7 @@ function toLonghandProp(p2) {
3192
3173
  } else if (typeof p2 === "string") {
3193
3174
  return string(p2);
3194
3175
  } else if (typeof p2 === "object" && !!p2) {
3195
- if (isLonghandPropType(p2))
3196
- return p2;
3176
+ if (isLonghandPropType(p2)) return p2;
3197
3177
  if (isPlainObject_default(p2)) {
3198
3178
  return compound(p2);
3199
3179
  } else {
@@ -3251,8 +3231,7 @@ function sanitizeCompoundProps(props) {
3251
3231
  // core/src/propTypes/index.ts
3252
3232
  var validateCommonOpts = (fnCallSignature, opts) => {
3253
3233
  if (process.env.NODE_ENV !== "production") {
3254
- if (opts === void 0)
3255
- return;
3234
+ if (opts === void 0) return;
3256
3235
  if (typeof opts !== "object" || opts === null) {
3257
3236
  throw new Error(
3258
3237
  "opts in ".concat(fnCallSignature, " must either be undefined or an object.")
@@ -3291,8 +3270,7 @@ function compoundFromSanitizedProps(sanitizedProps, opts = {}) {
3291
3270
  label: opts.label,
3292
3271
  default: mapValues_default(sanitizedProps, (p2) => p2.default),
3293
3272
  deserializeAndSanitize: (json) => {
3294
- if (typeof json !== "object" || !json)
3295
- return void 0;
3273
+ if (typeof json !== "object" || !json) return void 0;
3296
3274
  if (deserializationCache.has(json)) {
3297
3275
  return deserializationCache.get(json);
3298
3276
  }
@@ -3343,16 +3321,13 @@ var file = (defaultValue, opts = {}) => {
3343
3321
  };
3344
3322
  };
3345
3323
  var _ensureFile = (val11) => {
3346
- if (!val11)
3347
- return void 0;
3324
+ if (!val11) return void 0;
3348
3325
  let valid = true;
3349
3326
  if (typeof val11.id !== "string" && ![null, void 0].includes(val11.id)) {
3350
3327
  valid = false;
3351
3328
  }
3352
- if (val11.type !== "file")
3353
- valid = false;
3354
- if (!valid)
3355
- return void 0;
3329
+ if (val11.type !== "file") valid = false;
3330
+ if (!valid) return void 0;
3356
3331
  return val11;
3357
3332
  };
3358
3333
  var image = (defaultValue, opts = {}) => {
@@ -3378,16 +3353,13 @@ var image = (defaultValue, opts = {}) => {
3378
3353
  };
3379
3354
  };
3380
3355
  var _ensureImage = (val11) => {
3381
- if (!val11)
3382
- return void 0;
3356
+ if (!val11) return void 0;
3383
3357
  let valid = true;
3384
3358
  if (typeof val11.id !== "string" && ![null, void 0].includes(val11.id)) {
3385
3359
  valid = false;
3386
3360
  }
3387
- if (val11.type !== "image")
3388
- valid = false;
3389
- if (!valid)
3390
- return void 0;
3361
+ if (val11.type !== "image") valid = false;
3362
+ if (!valid) return void 0;
3391
3363
  return val11;
3392
3364
  };
3393
3365
  var number = (defaultValue, opts = {}) => {
@@ -3471,8 +3443,7 @@ var number = (defaultValue, opts = {}) => {
3471
3443
  };
3472
3444
  };
3473
3445
  var numberDeserializer = (range) => range ? (json) => {
3474
- if (!(typeof json === "number" && isFinite(json)))
3475
- return void 0;
3446
+ if (!(typeof json === "number" && isFinite(json))) return void 0;
3476
3447
  return clamp_default(json, range[0], range[1]);
3477
3448
  } : _ensureNumber;
3478
3449
  var _ensureNumber = (value) => typeof value === "number" && isFinite(value) ? value : void 0;
@@ -3513,16 +3484,14 @@ var rgba = (defaultValue = { r: 0, g: 0, b: 0, a: 1 }, opts = {}) => {
3513
3484
  };
3514
3485
  };
3515
3486
  var _sanitizeRgba = (val11) => {
3516
- if (!val11)
3517
- return void 0;
3487
+ if (!val11) return void 0;
3518
3488
  let valid = true;
3519
3489
  for (const c2 of ["r", "g", "b", "a"]) {
3520
3490
  if (!Object.prototype.hasOwnProperty.call(val11, c2) || typeof val11[c2] !== "number") {
3521
3491
  valid = false;
3522
3492
  }
3523
3493
  }
3524
- if (!valid)
3525
- return void 0;
3494
+ if (!valid) return void 0;
3526
3495
  const sanitized = {};
3527
3496
  for (const c2 of ["r", "g", "b", "a"]) {
3528
3497
  ;
@@ -3607,8 +3576,7 @@ function stringLiteral(defaultValue, valuesAndLabels, opts = {}) {
3607
3576
  label: opts.label,
3608
3577
  interpolate: opts.interpolate ?? leftInterpolate,
3609
3578
  deserializeAndSanitize(json) {
3610
- if (typeof json !== "string")
3611
- return void 0;
3579
+ if (typeof json !== "string") return void 0;
3612
3580
  if (Object.prototype.hasOwnProperty.call(valuesAndLabels, json)) {
3613
3581
  return json;
3614
3582
  } else {
@@ -3842,8 +3810,7 @@ var encodePathToProp = memoizeFn(
3842
3810
 
3843
3811
  // shared/src/utils/removePathFromObject.ts
3844
3812
  function removePathFromObject(base, path) {
3845
- if (typeof base !== "object" || base === null)
3846
- return;
3813
+ if (typeof base !== "object" || base === null) return;
3847
3814
  if (path.length === 0) {
3848
3815
  for (const key of Object.keys(base)) {
3849
3816
  delete base[key];
@@ -3935,16 +3902,13 @@ function stripTransientPathsFromSerializableMap(map, prefixes) {
3935
3902
  return result;
3936
3903
  }
3937
3904
  function stripTransientPathsFromSequenceTracks(sequence, objectKey, prefixes) {
3938
- if (!sequence || prefixes.size === 0)
3939
- return;
3905
+ if (!sequence || prefixes.size === 0) return;
3940
3906
  const objectTracks = sequence.tracksByObject?.[objectKey];
3941
- if (!objectTracks)
3942
- return;
3907
+ if (!objectTracks) return;
3943
3908
  for (const [encodedPath, trackId] of Object.entries(
3944
3909
  objectTracks.trackIdByPropPath
3945
3910
  )) {
3946
- if (typeof trackId !== "string")
3947
- continue;
3911
+ if (typeof trackId !== "string") continue;
3948
3912
  const path = JSON.parse(encodedPath);
3949
3913
  if (isPathUnderTransientPrefix(path, prefixes)) {
3950
3914
  delete objectTracks.trackIdByPropPath[encodedPath];
@@ -3961,8 +3925,7 @@ function stripTransientPathsFromSequenceTracks(sequence, objectKey, prefixes) {
3961
3925
  }
3962
3926
  }
3963
3927
  function stripSequenceTracksForPathsFromObjectInSheetState(sheetState, objectKey, prefixes) {
3964
- if (prefixes.size === 0)
3965
- return;
3928
+ if (prefixes.size === 0) return;
3966
3929
  stripTransientPathsFromSequenceTracks(
3967
3930
  sheetState.sequence,
3968
3931
  objectKey,
@@ -4007,13 +3970,11 @@ function getOrphanedTopLevelPropPathEncodings(config, sheetState, objectKey) {
4007
3970
  }
4008
3971
  const considerTracks = (sequence) => {
4009
3972
  const objectTracks = sequence?.tracksByObject?.[objectKey];
4010
- if (!objectTracks)
4011
- return;
3973
+ if (!objectTracks) return;
4012
3974
  for (const encodedPath of Object.keys(objectTracks.trackIdByPropPath)) {
4013
3975
  try {
4014
3976
  const path = JSON.parse(encodedPath);
4015
- if (path.length === 0)
4016
- continue;
3977
+ if (path.length === 0) continue;
4017
3978
  if (!getPropConfigByPath(config, path)) {
4018
3979
  considerTopKey(String(path[0]));
4019
3980
  }
@@ -4030,8 +3991,7 @@ function getOrphanedTopLevelPropPathEncodings(config, sheetState, objectKey) {
4030
3991
  return orphaned;
4031
3992
  }
4032
3993
  function stripTransientPropsFromObjectInSheetState(sheetState, objectKey, prefixes) {
4033
- if (prefixes.size === 0)
4034
- return;
3994
+ if (prefixes.size === 0) return;
4035
3995
  const staticOverrides = sheetState.staticOverrides.byObject[objectKey];
4036
3996
  if (staticOverrides) {
4037
3997
  sheetState.staticOverrides.byObject[objectKey] = stripTransientPathsFromSerializableMap(staticOverrides, prefixes);
@@ -4075,13 +4035,10 @@ function isPropConfigComposite(c2) {
4075
4035
  return c2.type === "compound" || c2.type === "enum";
4076
4036
  }
4077
4037
  function getPropConfigByPath(parentConf, path) {
4078
- if (!parentConf)
4079
- return void 0;
4038
+ if (!parentConf) return void 0;
4080
4039
  const [key, ...rest] = path;
4081
- if (key === void 0)
4082
- return parentConf;
4083
- if (!isPropConfigComposite(parentConf))
4084
- return void 0;
4040
+ if (key === void 0) return parentConf;
4041
+ if (!isPropConfigComposite(parentConf)) return void 0;
4085
4042
  const sub = parentConf.type === "enum" ? parentConf.cases[key] : parentConf.props[key];
4086
4043
  return getPropConfigByPath(sub, rest);
4087
4044
  }
@@ -4142,8 +4099,7 @@ function* iteratePropType(conf, pathPrefix) {
4142
4099
 
4143
4100
  // shared/src/utils/updateDeep.ts
4144
4101
  function updateDeep(obj, path, reducer) {
4145
- if (path.length === 0)
4146
- return reducer(obj);
4102
+ if (path.length === 0) return reducer(obj);
4147
4103
  return hoop(obj, path, reducer);
4148
4104
  }
4149
4105
  var hoop = (s2, path, reducer) => {
@@ -4153,12 +4109,10 @@ var hoop = (s2, path, reducer) => {
4153
4109
  if (Array.isArray(s2)) {
4154
4110
  let [index, ...restOfPath] = path;
4155
4111
  index = parseInt(String(index), 10);
4156
- if (isNaN(index))
4157
- index = 0;
4112
+ if (isNaN(index)) index = 0;
4158
4113
  const oldVal = s2[index];
4159
4114
  const newVal = hoop(oldVal, restOfPath, reducer);
4160
- if (oldVal === newVal)
4161
- return s2;
4115
+ if (oldVal === newVal) return s2;
4162
4116
  const newS = [...s2];
4163
4117
  newS.splice(index, 1, newVal);
4164
4118
  return newS;
@@ -4166,8 +4120,7 @@ var hoop = (s2, path, reducer) => {
4166
4120
  const [key, ...restOfPath] = path;
4167
4121
  const oldVal = s2[key];
4168
4122
  const newVal = hoop(oldVal, restOfPath, reducer);
4169
- if (oldVal === newVal)
4170
- return s2;
4123
+ if (oldVal === newVal) return s2;
4171
4124
  const newS = { ...s2, [key]: newVal };
4172
4125
  return newS;
4173
4126
  } else {
@@ -4196,8 +4149,7 @@ function mergeSequenceTrackMaps(defaultTracks, overrideTracks, activeVariant) {
4196
4149
  const merged = {};
4197
4150
  if (defaultTracks) {
4198
4151
  for (const [encodedPath, trackId] of Object.entries(defaultTracks)) {
4199
- if (!trackId)
4200
- continue;
4152
+ if (!trackId) continue;
4201
4153
  merged[encodedPath] = {
4202
4154
  trackId,
4203
4155
  trackVariant: DEFAULT_SEQUENCE_VARIANT
@@ -4206,8 +4158,7 @@ function mergeSequenceTrackMaps(defaultTracks, overrideTracks, activeVariant) {
4206
4158
  }
4207
4159
  if (activeVariant !== DEFAULT_SEQUENCE_VARIANT && overrideTracks) {
4208
4160
  for (const [encodedPath, trackId] of Object.entries(overrideTracks)) {
4209
- if (!trackId)
4210
- continue;
4161
+ if (!trackId) continue;
4211
4162
  merged[encodedPath] = {
4212
4163
  trackId,
4213
4164
  trackVariant: activeVariant
@@ -4232,22 +4183,17 @@ function getEffectiveStaticOverrideForObject(sheetState, variantId, objectKey) {
4232
4183
  variantId,
4233
4184
  objectKey
4234
4185
  ) ? sheetState?.staticOverridesByVariant?.[variantId]?.byObject?.[objectKey] : void 0;
4235
- if (!defaultOverrides && !variantOverrides)
4236
- return void 0;
4237
- if (!variantOverrides)
4238
- return defaultOverrides;
4239
- if (!defaultOverrides)
4240
- return variantOverrides;
4186
+ if (!defaultOverrides && !variantOverrides) return void 0;
4187
+ if (!variantOverrides) return defaultOverrides;
4188
+ if (!defaultOverrides) return variantOverrides;
4241
4189
  return merge_default(cloneDeep_default(defaultOverrides), cloneDeep_default(variantOverrides));
4242
4190
  }
4243
4191
  function isObjectAssignedToSequenceVariant(sheetState, variantId, objectKey) {
4244
- if (variantId === DEFAULT_SEQUENCE_VARIANT)
4245
- return true;
4192
+ if (variantId === DEFAULT_SEQUENCE_VARIANT) return true;
4246
4193
  return sheetState?.variantObjectOverrides?.[variantId]?.includes(objectKey) ?? false;
4247
4194
  }
4248
4195
  function getSequenceStateFromSheet(sheetState, variantId) {
4249
- if (!sheetState)
4250
- return void 0;
4196
+ if (!sheetState) return void 0;
4251
4197
  if (sheetState.sequencesById?.[variantId]) {
4252
4198
  return sheetState.sequencesById[variantId];
4253
4199
  }
@@ -4274,8 +4220,7 @@ function valTrackIdByPropPathForObject(sheetStatePointer, variantId, objectKey)
4274
4220
  return void 0;
4275
4221
  }
4276
4222
  function valUnsequencedPropPathsForObject(sheetStatePointer, variantId, objectKey) {
4277
- if (variantId === DEFAULT_SEQUENCE_VARIANT)
4278
- return void 0;
4223
+ if (variantId === DEFAULT_SEQUENCE_VARIANT) return void 0;
4279
4224
  val3(sheetStatePointer.sequencesById);
4280
4225
  const sequenceFromMap = val3(sheetStatePointer.sequencesById[variantId]);
4281
4226
  if (sequenceFromMap !== void 0) {
@@ -4500,8 +4445,7 @@ var SheetObject = class {
4500
4445
  () => {
4501
4446
  const untaps = [];
4502
4447
  for (const { trackId, pathToProp, trackVariant } of tracksToProcess) {
4503
- if (this.template.isNonSequencablePropPath(pathToProp))
4504
- continue;
4448
+ if (this.template.isNonSequencablePropPath(pathToProp)) continue;
4505
4449
  const pr = this._trackIdToPrism(trackId, trackVariant);
4506
4450
  const propConfig = getPropConfigByPath(
4507
4451
  config,
@@ -4570,11 +4514,9 @@ var SheetObject = class {
4570
4514
  }
4571
4515
  setSessionOverride(path, value) {
4572
4516
  const propConfig = getPropConfigByPath(this.template.staticConfig, path);
4573
- if (!propConfig)
4574
- return;
4517
+ if (!propConfig) return;
4575
4518
  const sanitized = propConfig.deserializeAndSanitize(value);
4576
- if (sanitized === void 0)
4577
- return;
4519
+ if (sanitized === void 0) return;
4578
4520
  this._sessionOverrides.set(
4579
4521
  setDeepImmutable(this._sessionOverrides.get(), path, sanitized)
4580
4522
  );
@@ -4688,8 +4630,7 @@ var DEFAULTS = {
4688
4630
  // create collapsed name
4689
4631
  // insert collapsed name into cssMemo with original's style
4690
4632
  collapsed(name) {
4691
- if (name.length < 5)
4692
- return name;
4633
+ if (name.length < 5) return name;
4693
4634
  const collapsed = name.replace(this.collapseOnRE, "");
4694
4635
  if (!this.cssMemo.has(collapsed)) {
4695
4636
  this.cssMemo.set(collapsed, this.css(name));
@@ -4698,8 +4639,7 @@ var DEFAULTS = {
4698
4639
  },
4699
4640
  css(name) {
4700
4641
  const found = this.cssMemo.get(name);
4701
- if (found)
4702
- return found;
4642
+ if (found) return found;
4703
4643
  let css = "color:".concat(this.color?.(name) ?? "hsl(".concat((name.charCodeAt(0) + name.charCodeAt(name.length - 1)) % 360, ", 100%, 60%)"));
4704
4644
  if (this.bold?.test(name)) {
4705
4645
  css += ";font-weight:600";
@@ -5037,8 +4977,7 @@ var logger_default = internal.getLogger().named("Theatre.js (default logger)").u
5037
4977
  var cache = /* @__PURE__ */ new WeakMap();
5038
4978
  function getOrderingOfPropTypeConfig(config) {
5039
4979
  const existing = cache.get(config);
5040
- if (existing)
5041
- return existing;
4980
+ if (existing) return existing;
5042
4981
  const map = /* @__PURE__ */ new Map();
5043
4982
  cache.set(config, map);
5044
4983
  iterateOnCompound([], config, map);
@@ -5085,10 +5024,8 @@ function registerObjectPropConfig(projectId, sheetId, objectKey, config) {
5085
5024
  // shared/src/propTypes/numberPrecision.ts
5086
5025
  var DEFAULT_NUMBER_PRECISION = 3;
5087
5026
  function resolveNumberPrecision(propPrecision, projectPrecision) {
5088
- if (propPrecision !== void 0)
5089
- return propPrecision;
5090
- if (projectPrecision !== void 0)
5091
- return projectPrecision;
5027
+ if (propPrecision !== void 0) return propPrecision;
5028
+ if (projectPrecision !== void 0) return projectPrecision;
5092
5029
  return DEFAULT_NUMBER_PRECISION;
5093
5030
  }
5094
5031
  function applyNumberPrecisionDefaultsToPropConfig(config, projectNumberPrecision) {
@@ -5097,8 +5034,7 @@ function applyNumberPrecisionDefaultsToPropConfig(config, projectNumberPrecision
5097
5034
  projectNumberPrecision
5098
5035
  );
5099
5036
  if (config.type === "number") {
5100
- if (config.precision !== void 0)
5101
- return config;
5037
+ if (config.precision !== void 0) return config;
5102
5038
  return {
5103
5039
  ...config,
5104
5040
  precision: defaultPrecision
@@ -5247,8 +5183,7 @@ var SheetObjectTemplate = class {
5247
5183
  );
5248
5184
  }
5249
5185
  _stripTransientFromHistoricState() {
5250
- if (this._transientPropPaths.size === 0)
5251
- return;
5186
+ if (this._transientPropPaths.size === 0) return;
5252
5187
  this.project._stripTransientPropsFromHistoric(
5253
5188
  this.address.sheetId,
5254
5189
  this.address.objectKey,
@@ -5256,8 +5191,7 @@ var SheetObjectTemplate = class {
5256
5191
  );
5257
5192
  }
5258
5193
  _stripSequencedStaticPathsFromHistoricState() {
5259
- if (this._staticPropPaths.size === 0)
5260
- return;
5194
+ if (this._staticPropPaths.size === 0) return;
5261
5195
  this.project._stripSequenceTracksFromHistoric(
5262
5196
  this.address.sheetId,
5263
5197
  this.address.objectKey,
@@ -5461,8 +5395,7 @@ var SheetObjectTemplate = class {
5461
5395
  for (const [pathToPropInString, effectiveTrack] of Object.entries(
5462
5396
  mergedTrackMap
5463
5397
  )) {
5464
- if (!effectiveTrack)
5465
- continue;
5398
+ if (!effectiveTrack) continue;
5466
5399
  if (unsequencedPropPathSet?.has(
5467
5400
  pathToPropInString
5468
5401
  )) {
@@ -5470,14 +5403,11 @@ var SheetObjectTemplate = class {
5470
5403
  }
5471
5404
  const { trackId, trackVariant } = effectiveTrack;
5472
5405
  const pathToProp = parsePathToProp(pathToPropInString);
5473
- if (!pathToProp)
5474
- continue;
5475
- if (this.isNonSequencablePropPath(pathToProp))
5476
- continue;
5406
+ if (!pathToProp) continue;
5407
+ if (this.isNonSequencablePropPath(pathToProp)) continue;
5477
5408
  const propConfig = getPropConfigByPath(objectConfig, pathToProp);
5478
5409
  const isSequencable = propConfig && isPropConfSequencable(propConfig);
5479
- if (!isSequencable)
5480
- continue;
5410
+ if (!isSequencable) continue;
5481
5411
  arrayOfIds.push({ pathToProp, trackId, trackVariant });
5482
5412
  }
5483
5413
  const mapping = getOrderingOfPropTypeConfig(objectConfig);
@@ -5546,8 +5476,7 @@ var SheetObjectTemplate = class {
5546
5476
  staticButNotSequencedOverrides,
5547
5477
  parentPath
5548
5478
  );
5549
- if (!isObjectEmpty(parentValue))
5550
- break;
5479
+ if (!isObjectEmpty(parentValue)) break;
5551
5480
  unset_default(staticButNotSequencedOverrides, parentPath);
5552
5481
  parentPath = parentPath.slice(0, -1);
5553
5482
  }
@@ -5755,8 +5684,7 @@ var DefaultPlaybackController = class {
5755
5684
  this._stopPlayCallback = () => {
5756
5685
  ticker.offThisOrNextTick(tick);
5757
5686
  ticker.offNextTick(tick);
5758
- if (this.playing)
5759
- deferred.resolve(false);
5687
+ if (this.playing) deferred.resolve(false);
5760
5688
  };
5761
5689
  const requestNextTick = () => ticker.onNextTick(tick);
5762
5690
  ticker.onThisOrNextTick(tick);
@@ -5873,8 +5801,7 @@ var AudioPlaybackController = class {
5873
5801
  }
5874
5802
  playDynamicRange(rangeD, ticker) {
5875
5803
  const deferred = defer();
5876
- if (this._playing)
5877
- this.pause();
5804
+ if (this._playing) this.pause();
5878
5805
  this._playing = true;
5879
5806
  let stop = void 0;
5880
5807
  const play = () => {
@@ -6031,8 +5958,7 @@ var AudioPlaybackController = class {
6031
5958
  cleanup();
6032
5959
  ticker.offThisOrNextTick(tick);
6033
5960
  ticker.offNextTick(tick);
6034
- if (this._playing)
6035
- deferred.resolve(false);
5961
+ if (this._playing) deferred.resolve(false);
6036
5962
  };
6037
5963
  const requestNextTick = () => ticker.onNextTick(tick);
6038
5964
  ticker.onThisOrNextTick(tick);
@@ -6178,11 +6104,9 @@ var TheatreSequence = class {
6178
6104
  };
6179
6105
  async function resolveAudioBuffer(args) {
6180
6106
  function getAudioContext() {
6181
- if (args.audioContext)
6182
- return Promise.resolve(args.audioContext);
6107
+ if (args.audioContext) return Promise.resolve(args.audioContext);
6183
6108
  const ctx = new AudioContext();
6184
- if (ctx.state === "running")
6185
- return Promise.resolve(ctx);
6109
+ if (ctx.state === "running") return Promise.resolve(ctx);
6186
6110
  if (typeof window === "undefined") {
6187
6111
  return Promise.resolve(ctx);
6188
6112
  }
@@ -6641,15 +6565,12 @@ var hour = minute * 60;
6641
6565
  // shared/src/utils/slashedPaths.ts
6642
6566
  var normalizeSlashedPath = (p2) => p2.replace(/^[\s\/]*/, "").replace(/[\s\/]*$/, "").replace(/\s*\/\s*/g, " / ");
6643
6567
  var getValidationErrorsOfSlashedPath = (p2) => {
6644
- if (typeof p2 !== "string")
6645
- return "it is not a string. (it is a ".concat(typeof p2, ")");
6568
+ if (typeof p2 !== "string") return "it is not a string. (it is a ".concat(typeof p2, ")");
6646
6569
  const components = p2.split(/\//);
6647
- if (components.length === 0)
6648
- return "it is empty.";
6570
+ if (components.length === 0) return "it is empty.";
6649
6571
  for (let i2 = 0; i2 < components.length; i2++) {
6650
6572
  const component = components[i2].trim();
6651
- if (component.length === 0)
6652
- return "the component #".concat(i2 + 1, " is empty.");
6573
+ if (component.length === 0) return "the component #".concat(i2 + 1, " is empty.");
6653
6574
  if (component.length > 64)
6654
6575
  return "the component '".concat(component, "' must have 64 characters or less.");
6655
6576
  }
@@ -7218,39 +7139,36 @@ var delay_default = delay;
7218
7139
 
7219
7140
  // ../node_modules/immer/dist/immer.esm.js
7220
7141
  function n(n2) {
7221
- for (var t2 = arguments.length, r2 = Array(t2 > 1 ? t2 - 1 : 0), e2 = 1; e2 < t2; e2++)
7222
- r2[e2 - 1] = arguments[e2];
7142
+ for (var t2 = arguments.length, r2 = Array(t2 > 1 ? t2 - 1 : 0), e2 = 1; e2 < t2; e2++) r2[e2 - 1] = arguments[e2];
7223
7143
  if ("production" !== process.env.NODE_ENV) {
7224
7144
  var i2 = Y[n2], o2 = i2 ? "function" == typeof i2 ? i2.apply(null, r2) : i2 : "unknown error nr: " + n2;
7225
7145
  throw Error("[Immer] " + o2);
7226
7146
  }
7227
- throw Error("[Immer] minified error nr: " + n2 + (r2.length ? " " + r2.map(function(n3) {
7147
+ throw Error("[Immer] minified error nr: " + n2 + (r2.length ? " " + r2.map((function(n3) {
7228
7148
  return "'" + n3 + "'";
7229
- }).join(",") : "") + ". Find the full error at: https://bit.ly/3cXEKWf");
7149
+ })).join(",") : "") + ". Find the full error at: https://bit.ly/3cXEKWf");
7230
7150
  }
7231
7151
  function t(n2) {
7232
7152
  return !!n2 && !!n2[Q];
7233
7153
  }
7234
7154
  function r(n2) {
7235
- return !!n2 && (function(n3) {
7236
- if (!n3 || "object" != typeof n3)
7237
- return false;
7155
+ return !!n2 && ((function(n3) {
7156
+ if (!n3 || "object" != typeof n3) return false;
7238
7157
  var t2 = Object.getPrototypeOf(n3);
7239
- if (null === t2)
7240
- return true;
7158
+ if (null === t2) return true;
7241
7159
  var r2 = Object.hasOwnProperty.call(t2, "constructor") && t2.constructor;
7242
7160
  return r2 === Object || "function" == typeof r2 && Function.toString.call(r2) === Z;
7243
- }(n2) || Array.isArray(n2) || !!n2[L] || !!n2.constructor[L] || s(n2) || v(n2));
7161
+ })(n2) || Array.isArray(n2) || !!n2[L] || !!n2.constructor[L] || s(n2) || v(n2));
7244
7162
  }
7245
7163
  function e(r2) {
7246
7164
  return t(r2) || n(23, r2), r2[Q].t;
7247
7165
  }
7248
7166
  function i(n2, t2, r2) {
7249
- void 0 === r2 && (r2 = false), 0 === o(n2) ? (r2 ? Object.keys : nn)(n2).forEach(function(e2) {
7167
+ void 0 === r2 && (r2 = false), 0 === o(n2) ? (r2 ? Object.keys : nn)(n2).forEach((function(e2) {
7250
7168
  r2 && "symbol" == typeof e2 || t2(e2, n2[e2], n2);
7251
- }) : n2.forEach(function(r3, e2) {
7169
+ })) : n2.forEach((function(r3, e2) {
7252
7170
  return t2(e2, r3, n2);
7253
- });
7171
+ }));
7254
7172
  }
7255
7173
  function o(n2) {
7256
7174
  var t2 = n2[Q];
@@ -7279,8 +7197,7 @@ function p(n2) {
7279
7197
  return n2.o || n2.t;
7280
7198
  }
7281
7199
  function l(n2) {
7282
- if (Array.isArray(n2))
7283
- return Array.prototype.slice.call(n2);
7200
+ if (Array.isArray(n2)) return Array.prototype.slice.call(n2);
7284
7201
  var t2 = tn(n2);
7285
7202
  delete t2[Q];
7286
7203
  for (var r2 = nn(t2), e2 = 0; e2 < r2.length; e2++) {
@@ -7290,9 +7207,9 @@ function l(n2) {
7290
7207
  return Object.create(Object.getPrototypeOf(n2), t2);
7291
7208
  }
7292
7209
  function d(n2, e2) {
7293
- return void 0 === e2 && (e2 = false), y(n2) || t(n2) || !r(n2) ? n2 : (o(n2) > 1 && (n2.set = n2.add = n2.clear = n2.delete = h), Object.freeze(n2), e2 && i(n2, function(n3, t2) {
7210
+ return void 0 === e2 && (e2 = false), y(n2) || t(n2) || !r(n2) ? n2 : (o(n2) > 1 && (n2.set = n2.add = n2.clear = n2.delete = h), Object.freeze(n2), e2 && i(n2, (function(n3, t2) {
7294
7211
  return d(t2, true);
7295
- }, true), n2);
7212
+ }), true), n2);
7296
7213
  }
7297
7214
  function h() {
7298
7215
  n(2);
@@ -7329,36 +7246,30 @@ function P(t2, e2) {
7329
7246
  return e2.h.g || b("ES5").S(e2, t2, o2), o2 ? (i2[Q].P && (O(e2), n(4)), r(t2) && (t2 = M(e2, t2), e2.l || x(e2, t2)), e2.u && b("Patches").M(i2[Q], t2, e2.u, e2.s)) : t2 = M(e2, i2, []), O(e2), e2.u && e2.v(e2.u, e2.s), t2 !== H ? t2 : void 0;
7330
7247
  }
7331
7248
  function M(n2, t2, r2) {
7332
- if (y(t2))
7333
- return t2;
7249
+ if (y(t2)) return t2;
7334
7250
  var e2 = t2[Q];
7335
- if (!e2)
7336
- return i(t2, function(i2, o3) {
7337
- return A(n2, e2, t2, i2, o3, r2);
7338
- }, true), t2;
7339
- if (e2.A !== n2)
7340
- return t2;
7341
- if (!e2.P)
7342
- return x(n2, e2.t, true), e2.t;
7251
+ if (!e2) return i(t2, (function(i2, o3) {
7252
+ return A(n2, e2, t2, i2, o3, r2);
7253
+ }), true), t2;
7254
+ if (e2.A !== n2) return t2;
7255
+ if (!e2.P) return x(n2, e2.t, true), e2.t;
7343
7256
  if (!e2.I) {
7344
7257
  e2.I = true, e2.A._--;
7345
7258
  var o2 = 4 === e2.i || 5 === e2.i ? e2.o = l(e2.k) : e2.o;
7346
- i(3 === e2.i ? new Set(o2) : o2, function(t3, i2) {
7259
+ i(3 === e2.i ? new Set(o2) : o2, (function(t3, i2) {
7347
7260
  return A(n2, e2, o2, t3, i2, r2);
7348
- }), x(n2, o2, false), r2 && n2.u && b("Patches").R(e2, r2, n2.u, n2.s);
7261
+ })), x(n2, o2, false), r2 && n2.u && b("Patches").R(e2, r2, n2.u, n2.s);
7349
7262
  }
7350
7263
  return e2.o;
7351
7264
  }
7352
7265
  function A(e2, i2, o2, a2, c2, s2) {
7353
7266
  if ("production" !== process.env.NODE_ENV && c2 === o2 && n(5), t(c2)) {
7354
7267
  var v2 = M(e2, c2, s2 && i2 && 3 !== i2.i && !u(i2.D, a2) ? s2.concat(a2) : void 0);
7355
- if (f(o2, a2, v2), !t(v2))
7356
- return;
7268
+ if (f(o2, a2, v2), !t(v2)) return;
7357
7269
  e2.m = false;
7358
7270
  }
7359
7271
  if (r(c2) && !y(c2)) {
7360
- if (!e2.h.F && e2._ < 1)
7361
- return;
7272
+ if (!e2.h.F && e2._ < 1) return;
7362
7273
  M(e2, c2), i2 && i2.A.l || x(e2, c2);
7363
7274
  }
7364
7275
  }
@@ -7370,13 +7281,11 @@ function z(n2, t2) {
7370
7281
  return (r2 ? p(r2) : n2)[t2];
7371
7282
  }
7372
7283
  function I(n2, t2) {
7373
- if (t2 in n2)
7374
- for (var r2 = Object.getPrototypeOf(n2); r2; ) {
7375
- var e2 = Object.getOwnPropertyDescriptor(r2, t2);
7376
- if (e2)
7377
- return e2;
7378
- r2 = Object.getPrototypeOf(r2);
7379
- }
7284
+ if (t2 in n2) for (var r2 = Object.getPrototypeOf(n2); r2; ) {
7285
+ var e2 = Object.getOwnPropertyDescriptor(r2, t2);
7286
+ if (e2) return e2;
7287
+ r2 = Object.getPrototypeOf(r2);
7288
+ }
7380
7289
  }
7381
7290
  function k(n2) {
7382
7291
  n2.P || (n2.P = true, n2.l && k(n2.l));
@@ -7385,29 +7294,26 @@ function E(n2) {
7385
7294
  n2.o || (n2.o = l(n2.t));
7386
7295
  }
7387
7296
  function R(n2, t2, r2) {
7388
- var e2 = s(t2) ? b("MapSet").N(t2, r2) : v(t2) ? b("MapSet").T(t2, r2) : n2.g ? function(n3, t3) {
7297
+ var e2 = s(t2) ? b("MapSet").N(t2, r2) : v(t2) ? b("MapSet").T(t2, r2) : n2.g ? (function(n3, t3) {
7389
7298
  var r3 = Array.isArray(n3), e3 = { i: r3 ? 1 : 0, A: t3 ? t3.A : _(), P: false, I: false, D: {}, l: t3, t: n3, k: null, o: null, j: null, C: false }, i2 = e3, o2 = en;
7390
7299
  r3 && (i2 = [e3], o2 = on);
7391
7300
  var u2 = Proxy.revocable(i2, o2), a2 = u2.revoke, f2 = u2.proxy;
7392
7301
  return e3.k = f2, e3.j = a2, f2;
7393
- }(t2, r2) : b("ES5").J(t2, r2);
7302
+ })(t2, r2) : b("ES5").J(t2, r2);
7394
7303
  return (r2 ? r2.A : _()).p.push(e2), e2;
7395
7304
  }
7396
7305
  function D(e2) {
7397
- return t(e2) || n(22, e2), function n2(t2) {
7398
- if (!r(t2))
7399
- return t2;
7306
+ return t(e2) || n(22, e2), (function n2(t2) {
7307
+ if (!r(t2)) return t2;
7400
7308
  var e3, u2 = t2[Q], c2 = o(t2);
7401
7309
  if (u2) {
7402
- if (!u2.P && (u2.i < 4 || !b("ES5").K(u2)))
7403
- return u2.t;
7310
+ if (!u2.P && (u2.i < 4 || !b("ES5").K(u2))) return u2.t;
7404
7311
  u2.I = true, e3 = F(t2, c2), u2.I = false;
7405
- } else
7406
- e3 = F(t2, c2);
7407
- return i(e3, function(t3, r2) {
7312
+ } else e3 = F(t2, c2);
7313
+ return i(e3, (function(t3, r2) {
7408
7314
  u2 && a(u2.t, t3) === r2 || f(e3, t3, n2(r2));
7409
- }), 3 === c2 ? new Set(e3) : e3;
7410
- }(e2);
7315
+ })), 3 === c2 ? new Set(e3) : e3;
7316
+ })(e2);
7411
7317
  }
7412
7318
  function F(n2, t2) {
7413
7319
  switch (t2) {
@@ -7448,20 +7354,18 @@ var nn = "undefined" != typeof Reflect && Reflect.ownKeys ? Reflect.ownKeys : vo
7448
7354
  } : Object.getOwnPropertyNames;
7449
7355
  var tn = Object.getOwnPropertyDescriptors || function(n2) {
7450
7356
  var t2 = {};
7451
- return nn(n2).forEach(function(r2) {
7357
+ return nn(n2).forEach((function(r2) {
7452
7358
  t2[r2] = Object.getOwnPropertyDescriptor(n2, r2);
7453
- }), t2;
7359
+ })), t2;
7454
7360
  };
7455
7361
  var rn = {};
7456
7362
  var en = { get: function(n2, t2) {
7457
- if (t2 === Q)
7458
- return n2;
7363
+ if (t2 === Q) return n2;
7459
7364
  var e2 = p(n2);
7460
- if (!u(e2, t2))
7461
- return function(n3, t3, r2) {
7462
- var e3, i3 = I(t3, r2);
7463
- return i3 ? "value" in i3 ? i3.value : null === (e3 = i3.get) || void 0 === e3 ? void 0 : e3.call(n3.k) : void 0;
7464
- }(n2, e2, t2);
7365
+ if (!u(e2, t2)) return (function(n3, t3, r2) {
7366
+ var e3, i3 = I(t3, r2);
7367
+ return i3 ? "value" in i3 ? i3.value : null === (e3 = i3.get) || void 0 === e3 ? void 0 : e3.call(n3.k) : void 0;
7368
+ })(n2, e2, t2);
7465
7369
  var i2 = e2[t2];
7466
7370
  return n2.I || !r(i2) ? i2 : i2 === z(n2.t, t2) ? (E(n2), n2.o[t2] = R(n2.A.h, i2, n2)) : i2;
7467
7371
  }, has: function(n2, t2) {
@@ -7470,14 +7374,11 @@ var en = { get: function(n2, t2) {
7470
7374
  return Reflect.ownKeys(p(n2));
7471
7375
  }, set: function(n2, t2, r2) {
7472
7376
  var e2 = I(p(n2), t2);
7473
- if (null == e2 ? void 0 : e2.set)
7474
- return e2.set.call(n2.k, r2), true;
7377
+ if (null == e2 ? void 0 : e2.set) return e2.set.call(n2.k, r2), true;
7475
7378
  if (!n2.P) {
7476
7379
  var i2 = z(p(n2), t2), o2 = null == i2 ? void 0 : i2[Q];
7477
- if (o2 && o2.t === r2)
7478
- return n2.o[t2] = r2, n2.D[t2] = false, true;
7479
- if (c(r2, i2) && (void 0 !== r2 || u(n2.t, t2)))
7480
- return true;
7380
+ if (o2 && o2.t === r2) return n2.o[t2] = r2, n2.D[t2] = false, true;
7381
+ if (c(r2, i2) && (void 0 !== r2 || u(n2.t, t2))) return true;
7481
7382
  E(n2), k(n2);
7482
7383
  }
7483
7384
  return n2.o[t2] === r2 && "number" != typeof r2 && (void 0 !== r2 || t2 in n2.o) || (n2.o[t2] = r2, n2.D[t2] = true, true);
@@ -7494,16 +7395,16 @@ var en = { get: function(n2, t2) {
7494
7395
  n(12);
7495
7396
  } };
7496
7397
  var on = {};
7497
- i(en, function(n2, t2) {
7398
+ i(en, (function(n2, t2) {
7498
7399
  on[n2] = function() {
7499
7400
  return arguments[0] = arguments[0][0], t2.apply(this, arguments);
7500
7401
  };
7501
- }), on.deleteProperty = function(t2, r2) {
7402
+ })), on.deleteProperty = function(t2, r2) {
7502
7403
  return "production" !== process.env.NODE_ENV && isNaN(parseInt(r2)) && n(13), en.deleteProperty.call(this, t2[0], r2);
7503
7404
  }, on.set = function(t2, r2, e2) {
7504
7405
  return "production" !== process.env.NODE_ENV && "length" !== r2 && isNaN(parseInt(r2)) && n(14), en.set.call(this, t2[0], r2, e2, t2[0]);
7505
7406
  };
7506
- var un = function() {
7407
+ var un = (function() {
7507
7408
  function e2(t2) {
7508
7409
  var e3 = this;
7509
7410
  this.g = B, this.F = true, this.produce = function(t3, i3, o2) {
@@ -7514,12 +7415,11 @@ var un = function() {
7514
7415
  return function(n2) {
7515
7416
  var t4 = this;
7516
7417
  void 0 === n2 && (n2 = u2);
7517
- for (var r2 = arguments.length, e4 = Array(r2 > 1 ? r2 - 1 : 0), o3 = 1; o3 < r2; o3++)
7518
- e4[o3 - 1] = arguments[o3];
7519
- return a2.produce(n2, function(n3) {
7418
+ for (var r2 = arguments.length, e4 = Array(r2 > 1 ? r2 - 1 : 0), o3 = 1; o3 < r2; o3++) e4[o3 - 1] = arguments[o3];
7419
+ return a2.produce(n2, (function(n3) {
7520
7420
  var r3;
7521
7421
  return (r3 = i3).call.apply(r3, [t4, n3].concat(e4));
7522
- });
7422
+ }));
7523
7423
  };
7524
7424
  }
7525
7425
  var f2;
@@ -7530,28 +7430,26 @@ var un = function() {
7530
7430
  } finally {
7531
7431
  v2 ? O(c2) : g(c2);
7532
7432
  }
7533
- return "undefined" != typeof Promise && f2 instanceof Promise ? f2.then(function(n2) {
7433
+ return "undefined" != typeof Promise && f2 instanceof Promise ? f2.then((function(n2) {
7534
7434
  return j(c2, o2), P(n2, c2);
7535
- }, function(n2) {
7435
+ }), (function(n2) {
7536
7436
  throw O(c2), n2;
7537
- }) : (j(c2, o2), P(f2, c2));
7437
+ })) : (j(c2, o2), P(f2, c2));
7538
7438
  }
7539
7439
  if (!t3 || "object" != typeof t3) {
7540
- if ((f2 = i3(t3)) === H)
7541
- return;
7440
+ if ((f2 = i3(t3)) === H) return;
7542
7441
  return void 0 === f2 && (f2 = t3), e3.F && d(f2, true), f2;
7543
7442
  }
7544
7443
  n(21, t3);
7545
7444
  }, this.produceWithPatches = function(n2, t3) {
7546
7445
  return "function" == typeof n2 ? function(t4) {
7547
- for (var r3 = arguments.length, i4 = Array(r3 > 1 ? r3 - 1 : 0), o2 = 1; o2 < r3; o2++)
7548
- i4[o2 - 1] = arguments[o2];
7549
- return e3.produceWithPatches(t4, function(t5) {
7446
+ for (var r3 = arguments.length, i4 = Array(r3 > 1 ? r3 - 1 : 0), o2 = 1; o2 < r3; o2++) i4[o2 - 1] = arguments[o2];
7447
+ return e3.produceWithPatches(t4, (function(t5) {
7550
7448
  return n2.apply(void 0, [t5].concat(i4));
7551
- });
7552
- } : [e3.produce(n2, t3, function(n3, t4) {
7449
+ }));
7450
+ } : [e3.produce(n2, t3, (function(n3, t4) {
7553
7451
  r2 = n3, i3 = t4;
7554
- }), r2, i3];
7452
+ })), r2, i3];
7555
7453
  var r2, i3;
7556
7454
  }, "boolean" == typeof (null == t2 ? void 0 : t2.useProxies) && this.setUseProxies(t2.useProxies), "boolean" == typeof (null == t2 ? void 0 : t2.autoFreeze) && this.setAutoFreeze(t2.autoFreeze);
7557
7455
  }
@@ -7579,11 +7477,11 @@ var un = function() {
7579
7477
  }
7580
7478
  }
7581
7479
  var o2 = b("Patches").$;
7582
- return t(n2) ? o2(n2, r2) : this.produce(n2, function(n3) {
7480
+ return t(n2) ? o2(n2, r2) : this.produce(n2, (function(n3) {
7583
7481
  return o2(n3, r2.slice(e3 + 1));
7584
- });
7482
+ }));
7585
7483
  }, e2;
7586
- }();
7484
+ })();
7587
7485
  var an = new un();
7588
7486
  var fn = an.produce;
7589
7487
  var cn = an.produceWithPatches.bind(an);
@@ -7690,8 +7588,7 @@ var RemoteSync = class {
7690
7588
  __publicField(this, "objectUnsubs", /* @__PURE__ */ new Map());
7691
7589
  __publicField(this, "studio");
7692
7590
  __publicField(this, "activeSheet");
7693
- if (typeof BroadcastChannel === "undefined")
7694
- return;
7591
+ if (typeof BroadcastChannel === "undefined") return;
7695
7592
  this.channel = new BroadcastChannel(
7696
7593
  "theatre-remote:".concat(project.address.projectId)
7697
7594
  );
@@ -7769,14 +7666,12 @@ var RemoteSync = class {
7769
7666
  }
7770
7667
  attachStudio(studio) {
7771
7668
  this.studio = studio;
7772
- if (!this.isEditor || !this.channel)
7773
- return;
7669
+ if (!this.isEditor || !this.channel) return;
7774
7670
  const channel = this.channel;
7775
7671
  const projectId = this.project.address.projectId;
7776
7672
  studio.publicApi.onSelectionChange((selection) => {
7777
7673
  for (const item of selection) {
7778
- if (item.address.projectId !== projectId)
7779
- continue;
7674
+ if (item.address.projectId !== projectId) continue;
7780
7675
  if (item.type === "Theatre_Sheet_PublicAPI") {
7781
7676
  this.activeSheet = this.sheets.get(item.address.sheetId);
7782
7677
  const message = {
@@ -7831,8 +7726,7 @@ var RemoteSync = class {
7831
7726
  }
7832
7727
  case "updateSheetObject": {
7833
7728
  const obj = this.objects.get(msg.data.sheetObject);
7834
- if (obj)
7835
- obj.setRemoteOverride(msg.data.values);
7729
+ if (obj) obj.setRemoteOverride(msg.data.values);
7836
7730
  break;
7837
7731
  }
7838
7732
  case "updateTimeline": {
@@ -7879,10 +7773,8 @@ function _coreLogger(config) {
7879
7773
  });
7880
7774
  if (config) {
7881
7775
  const { logger, logging } = config;
7882
- if (logger)
7883
- internal2.configureLogger(logger);
7884
- if (logging)
7885
- internal2.configureLogging(logging);
7776
+ if (logger) internal2.configureLogger(logger);
7777
+ if (logging) internal2.configureLogging(logging);
7886
7778
  else {
7887
7779
  internal2.configureLogging({
7888
7780
  dev: process.env.NODE_ENV !== "production"
@@ -7929,8 +7821,7 @@ var isRGBA = (value) => {
7929
7821
  function stripImageAssetsFromAhistoricStaticOverrides(ahistoricStaticOverridesByObject) {
7930
7822
  for (const objectKey of Object.keys(ahistoricStaticOverridesByObject)) {
7931
7823
  const overrides = ahistoricStaticOverridesByObject[objectKey];
7932
- if (!overrides)
7933
- continue;
7824
+ if (!overrides) continue;
7934
7825
  const cloned = cloneDeep_default(overrides);
7935
7826
  forEachPropDeep(
7936
7827
  cloned,
@@ -7949,8 +7840,7 @@ function stripImageAssetsFromAhistoricStaticOverrides(ahistoricStaticOverridesBy
7949
7840
  }
7950
7841
  }
7951
7842
  function isDirectAssetUrl(assetId) {
7952
- if (/^(?:https?:\/\/|blob:|data:)/i.test(assetId))
7953
- return true;
7843
+ if (/^(?:https?:\/\/|blob:|data:)/i.test(assetId)) return true;
7954
7844
  return assetId.includes("/") || assetId.includes("\\");
7955
7845
  }
7956
7846
 
@@ -8110,8 +8000,7 @@ var Project = class {
8110
8000
  getSheets() {
8111
8001
  const sheets = [];
8112
8002
  for (const template of Object.values(this._sheetTemplates.get())) {
8113
- if (!template)
8114
- continue;
8003
+ if (!template) continue;
8115
8004
  sheets.push(...template.getInstances());
8116
8005
  }
8117
8006
  return sheets;
@@ -8179,13 +8068,11 @@ var Project = class {
8179
8068
  for (const [sheetId, template] of Object.entries(
8180
8069
  this._sheetTemplates.get()
8181
8070
  )) {
8182
- if (!template)
8183
- continue;
8071
+ if (!template) continue;
8184
8072
  for (const [namespacePathKey, config] of Object.entries(
8185
8073
  template.getPendingOutlineNamespaces()
8186
8074
  )) {
8187
- if (!config)
8188
- continue;
8075
+ if (!config) continue;
8189
8076
  this._commitOutlineNamespaceConfig(
8190
8077
  sheetId,
8191
8078
  namespacePathKey,
@@ -8215,8 +8102,7 @@ var Project = class {
8215
8102
  _stripImageAssetsFromAhistoricState() {
8216
8103
  const strip = (ahistoric) => {
8217
8104
  for (const sheetState of Object.values(ahistoric.sheetsById ?? {})) {
8218
- if (!sheetState)
8219
- continue;
8105
+ if (!sheetState) continue;
8220
8106
  stripImageAssetsFromAhistoricStaticOverrides(
8221
8107
  sheetState.staticOverrides.byObject
8222
8108
  );
@@ -8225,8 +8111,7 @@ var Project = class {
8225
8111
  if (this._studio) {
8226
8112
  this._studio.transaction(({ drafts }) => {
8227
8113
  const ahistoric = drafts.ahistoric.coreByProject[this.address.projectId];
8228
- if (ahistoric)
8229
- strip(ahistoric);
8114
+ if (ahistoric) strip(ahistoric);
8230
8115
  });
8231
8116
  } else {
8232
8117
  this._mutateCoreAhistoric(strip);
@@ -8234,12 +8119,10 @@ var Project = class {
8234
8119
  }
8235
8120
  _stripNonPersistingPropsFromAhistoric(sheetId, objectKey, config) {
8236
8121
  const paths = getNonPersistingPropPathEncodings(config);
8237
- if (paths.size === 0)
8238
- return;
8122
+ if (paths.size === 0) return;
8239
8123
  const strip = (ahistoric) => {
8240
8124
  const sheetState = ahistoric.sheetsById?.[sheetId];
8241
- if (!sheetState)
8242
- return;
8125
+ if (!sheetState) return;
8243
8126
  const staticOverrides = sheetState.staticOverrides.byObject[objectKey];
8244
8127
  if (staticOverrides) {
8245
8128
  sheetState.staticOverrides.byObject[objectKey] = stripTransientPathsFromSerializableMap(staticOverrides, paths);
@@ -8248,8 +8131,7 @@ var Project = class {
8248
8131
  if (this._studio) {
8249
8132
  this._studio.transaction(({ drafts }) => {
8250
8133
  const ahistoric = drafts.ahistoric.coreByProject[this.address.projectId];
8251
- if (ahistoric)
8252
- strip(ahistoric);
8134
+ if (ahistoric) strip(ahistoric);
8253
8135
  });
8254
8136
  } else {
8255
8137
  this._mutateCoreAhistoric(strip);
@@ -8257,12 +8139,10 @@ var Project = class {
8257
8139
  }
8258
8140
  _stripNonPersistingPropsFromHistoric(sheetId, objectKey, config) {
8259
8141
  const paths = getNonPersistingPropPathEncodings(config);
8260
- if (paths.size === 0)
8261
- return;
8142
+ if (paths.size === 0) return;
8262
8143
  const strip = (historic) => {
8263
8144
  const sheetState = historic.sheetsById[sheetId];
8264
- if (!sheetState)
8265
- return;
8145
+ if (!sheetState) return;
8266
8146
  stripTransientPropsFromObjectInSheetState(sheetState, objectKey, paths);
8267
8147
  stripSequenceTracksForPathsFromObjectInSheetState(
8268
8148
  sheetState,
@@ -8273,8 +8153,7 @@ var Project = class {
8273
8153
  if (this._studio) {
8274
8154
  this._studio.transaction(({ drafts }) => {
8275
8155
  const historic = drafts.historic.coreByProject[this.address.projectId];
8276
- if (historic)
8277
- strip(historic);
8156
+ if (historic) strip(historic);
8278
8157
  });
8279
8158
  } else {
8280
8159
  this._onDiskStateAtom.reduce((state) => {
@@ -8291,22 +8170,19 @@ var Project = class {
8291
8170
  _stripPropsMissingFromConfig(sheetId, objectKey, config) {
8292
8171
  const stripHistoric = (historic) => {
8293
8172
  const sheetState = historic.sheetsById[sheetId];
8294
- if (!sheetState)
8295
- return;
8173
+ if (!sheetState) return;
8296
8174
  const orphaned = getOrphanedTopLevelPropPathEncodings(
8297
8175
  config,
8298
8176
  sheetState,
8299
8177
  objectKey
8300
8178
  );
8301
- if (orphaned.size === 0)
8302
- return;
8179
+ if (orphaned.size === 0) return;
8303
8180
  stripTransientPropsFromObjectInSheetState(sheetState, objectKey, orphaned);
8304
8181
  };
8305
8182
  if (this._studio) {
8306
8183
  this._studio.transaction(({ drafts }) => {
8307
8184
  const historic = drafts.historic.coreByProject[this.address.projectId];
8308
- if (historic)
8309
- stripHistoric(historic);
8185
+ if (historic) stripHistoric(historic);
8310
8186
  });
8311
8187
  } else {
8312
8188
  this._onDiskStateAtom.reduce((state) => {
@@ -8317,15 +8193,13 @@ var Project = class {
8317
8193
  }
8318
8194
  const stripAhistoric = (ahistoric) => {
8319
8195
  const sheetState = ahistoric.sheetsById?.[sheetId];
8320
- if (!sheetState)
8321
- return;
8196
+ if (!sheetState) return;
8322
8197
  const orphaned = getOrphanedTopLevelPropPathEncodings(
8323
8198
  config,
8324
8199
  sheetState,
8325
8200
  objectKey
8326
8201
  );
8327
- if (orphaned.size === 0)
8328
- return;
8202
+ if (orphaned.size === 0) return;
8329
8203
  const staticOverrides = sheetState.staticOverrides.byObject[objectKey];
8330
8204
  if (staticOverrides) {
8331
8205
  sheetState.staticOverrides.byObject[objectKey] = stripTransientPathsFromSerializableMap(staticOverrides, orphaned);
@@ -8334,20 +8208,17 @@ var Project = class {
8334
8208
  if (this._studio) {
8335
8209
  this._studio.transaction(({ drafts }) => {
8336
8210
  const ahistoric = drafts.ahistoric.coreByProject[this.address.projectId];
8337
- if (ahistoric)
8338
- stripAhistoric(ahistoric);
8211
+ if (ahistoric) stripAhistoric(ahistoric);
8339
8212
  });
8340
8213
  } else {
8341
8214
  this._mutateCoreAhistoric(stripAhistoric);
8342
8215
  }
8343
8216
  }
8344
8217
  _stripTransientPropsFromHistoric(sheetId, objectKey, transientPaths) {
8345
- if (transientPaths.size === 0)
8346
- return;
8218
+ if (transientPaths.size === 0) return;
8347
8219
  const strip = (historic) => {
8348
8220
  const sheetState = historic.sheetsById[sheetId];
8349
- if (!sheetState)
8350
- return;
8221
+ if (!sheetState) return;
8351
8222
  stripTransientPropsFromObjectInSheetState(
8352
8223
  sheetState,
8353
8224
  objectKey,
@@ -8357,8 +8228,7 @@ var Project = class {
8357
8228
  if (this._studio) {
8358
8229
  this._studio.transaction(({ drafts }) => {
8359
8230
  const historic = drafts.historic.coreByProject[this.address.projectId];
8360
- if (historic)
8361
- strip(historic);
8231
+ if (historic) strip(historic);
8362
8232
  });
8363
8233
  } else {
8364
8234
  this._onDiskStateAtom.reduce((state) => {
@@ -8369,12 +8239,10 @@ var Project = class {
8369
8239
  }
8370
8240
  }
8371
8241
  _stripSequenceTracksFromHistoric(sheetId, objectKey, propPaths) {
8372
- if (propPaths.size === 0)
8373
- return;
8242
+ if (propPaths.size === 0) return;
8374
8243
  const strip = (historic) => {
8375
8244
  const sheetState = historic.sheetsById[sheetId];
8376
- if (!sheetState)
8377
- return;
8245
+ if (!sheetState) return;
8378
8246
  stripSequenceTracksForPathsFromObjectInSheetState(
8379
8247
  sheetState,
8380
8248
  objectKey,
@@ -8384,8 +8252,7 @@ var Project = class {
8384
8252
  if (this._studio) {
8385
8253
  this._studio.transaction(({ drafts }) => {
8386
8254
  const historic = drafts.historic.coreByProject[this.address.projectId];
8387
- if (historic)
8388
- strip(historic);
8255
+ if (historic) strip(historic);
8389
8256
  });
8390
8257
  } else {
8391
8258
  this._onDiskStateAtom.reduce((state) => {
@@ -8579,8 +8446,7 @@ var deepValidateOnDiskState = (projectId, s2) => {
8579
8446
  shallowValidateOnDiskState(projectId, s2);
8580
8447
  };
8581
8448
  var validateProjectNumberPrecisionOrThrow = (numberPrecision) => {
8582
- if (numberPrecision === void 0)
8583
- return;
8449
+ if (numberPrecision === void 0) return;
8584
8450
  if (typeof numberPrecision !== "number" || !isFinite(numberPrecision) || numberPrecision < 0 || Math.floor(numberPrecision) !== numberPrecision) {
8585
8451
  throw new InvalidArgumentError(
8586
8452
  "Argument config.numberPrecision in Theatre.getProject(projectId, config) must be a non-negative integer. ".concat(userReadableTypeOfValue_default(
@@ -8639,7 +8505,7 @@ var CoreBundle = class {
8639
8505
  return "Theatre_CoreBundle";
8640
8506
  }
8641
8507
  get version() {
8642
- return "0.2.3";
8508
+ return "0.3.0";
8643
8509
  }
8644
8510
  getBitsForStudio(studio, callback) {
8645
8511
  if (this._studio) {
@@ -8661,8 +8527,7 @@ var CoreBundle = class {
8661
8527
  // core/src/index.ts
8662
8528
  registerCoreBundle();
8663
8529
  function registerCoreBundle() {
8664
- if (typeof window == "undefined")
8665
- return;
8530
+ if (typeof window == "undefined") return;
8666
8531
  const existingBundle = (
8667
8532
  // @ts-ignore ignore
8668
8533
  window[coreBundle]