text: /*! This software is copyrighted by TheaterJS Oy, all rights reserved. Visit theatrejs.com to obtain a license. */
  !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Theatre=t():e.Theatre=t()}(window,function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=324)}({0:function(e,t,r){"use strict";var n=r(9);class i{constructor(e){this._cb=(e=>{this._tappers.forEach(t=>{t(e)})}),this._lastTapperId=0,this._untapFromSource=null,this._props=e,this._tappers=new Map}_check(){this._untapFromSource?0===this._tappers.size&&(this._untapFromSource(),this._untapFromSource=null):0!==this._tappers.size&&(this._untapFromSource=this._props.tapToSource(this._cb))}tap(e){const t=this._lastTapperId++;return this._tappers.set(t,e),this._check(),()=>{this._removeTapperById(t)}}_removeTapperById(e){this._tappers.delete(e)}map(e){return new i({tapToSource:t=>this.tap(r=>t(e(r)))})}}class o{constructor(){this._lastTapperId=0,this._tappers=new Map,this.tappable=new i({tapToSource:e=>this._tap(e)})}_tap(e){const t=this._lastTapperId++;return this._tappers.set(t,e),this._onNumberOfTappersChangeListener&&this._onNumberOfTappersChangeListener(this._tappers.size),()=>{this._removeTapperById(t)}}_removeTapperById(e){const t=this._tappers.size;this._tappers.delete(e),t!==this._tappers.size&&this._onNumberOfTappersChangeListener&&this._onNumberOfTappersChangeListener(this._tappers.size)}emit(e){this._tappers.forEach(t=>{t(e)})}hasTappers(){return 0!==this._tappers.size}onNumberOfTappersChange(e){this._onNumberOfTappersChangeListener=e}}class a{constructor(e,t){return this._derivation=e,this._ticker=t,this._emitter=new o,this._emitter.onNumberOfTappersChange(()=>{this._reactToNumberOfTappersChange()}),this._hadTappers=!1,this._lastValueRecorded=!1,this._lastValue=void 0,this}_youMayNeedToUpdateYourself(){this._ticker.registerComputationUpdate(this)}_reactToNumberOfTappersChange(){const e=this._emitter.hasTappers();e!==this._hadTappers&&(this._hadTappers=e,e?this._derivation._addDependent(this):this._derivation._removeDependent(this))}tappable(){return this._emitter.tappable}_updateComputation(){const e=this._derivation.getValue();e===this._lastValue&&!0===this._lastValueRecorded||(this._lastValue=e,this._lastValueRecorded=!0,this._emitter.emit(e))}}r(8);class s{constructor(e,t=!1){return this.dontEmitValues=t,this._derivation=e,this._emitter=new o,this._emitter.onNumberOfTappersChange(()=>{this._reactToNumberOfTappersChange()}),this._hadTappers=!1,this._lastValueRecorded=!1,this._lastValue=void 0,this}_youMayNeedToUpdateYourself(){this._emitter.emit(void 0)}_reactToNumberOfTappersChange(){const e=this._emitter.hasTappers();e!==this._hadTappers&&(this._hadTappers=e,e?this._derivation._addDependent(this):this._derivation._removeDependent(this))}tappable(){return this._emitter.tappable}}r.d(t,"a",function(){return l}),r.d(t,"b",function(){return h});const c=0,u=1,p=2;class l{constructor(){this.isDerivation=!0,this._didNotifyDownstreamOfUpcomingUpdate=!1,this._id=y++,this._freshnessState=c,this._lastValue=void 0,this._thereAreMoreThanOneDependents=!1,this._dependencies=new Set,this._dependents=new Set}_addDependency(e){this._dependencies.has(e)||(this._dependencies.add(e),this._thereAreMoreThanOneDependents&&e._addDependent(this))}_removeDependency(e){this._dependencies.has(e)&&(this._dependencies.delete(e),this._thereAreMoreThanOneDependents&&e._removeDependent(this))}_removeAllDependencies(){this._dependencies.forEach(e=>{this._removeDependency(e)})}changes(e){return new a(this,e).tappable()}changesWithoutValues(){return new s(this).tappable()}keepHot(){return this.changesWithoutValues().tap(()=>{})}tapImmediate(e,t){const r=this.changes(e).tap(t);return t(this.getValue()),r}_hasDependents(){return 0!==this._dependents.size}_addDependent(e){const t=this._dependents.size>0;this._dependents.add(e),t!==this._dependents.size>0&&this._reactToNumberOfDependentsChange()}_removeDependent(e){const t=this._dependents.size>0;this._dependents.delete(e),t!==this._dependents.size>0&&this._reactToNumberOfDependentsChange()}_youMayNeedToUpdateYourself(){this._didNotifyDownstreamOfUpcomingUpdate||(this._didNotifyDownstreamOfUpcomingUpdate=!0,this._freshnessState=u,this._hasDependents()&&this._dependents.forEach(e=>{e._youMayNeedToUpdateYourself(this)}))}getValue(){return this._getValue(!1)}_getValue(e){if(Object(n.d)(this),this._freshnessState!==p){const e=this._recalculate();this._lastValue=e,this._freshnessState===u&&(this._freshnessState=p,this._didNotifyDownstreamOfUpcomingUpdate=!1)}return Object(n.c)(this),this._lastValue}getValueCold(){return this._getValue(!0)}_reactToNumberOfDependentsChange(){const e=this._dependents.size>0;e!==this._thereAreMoreThanOneDependents&&(this._thereAreMoreThanOneDependents=e,this._didNotifyDownstreamOfUpcomingUpdate=!1,e?(this._freshnessState=u,this._dependencies.forEach(e=>{e._addDependent(this)}),this._keepUptodate()):(this._freshnessState=c,this._dependencies.forEach(e=>{e._removeDependent(this)}),this._stopKeepingUptodate()))}_keepUptodate(){}_stopKeepingUptodate(){}map(e){return v.default(this,e)}flatMap(e){return d.default(this,e)}flatten(){return this.flattenDeep(1)}flattenDeep(e){return f.default(this,e)}toJS(){return this.flatMap(m.default)}}function h(e){return e&&e.isDerivation&&!0===e.isDerivation}const f=r(325),d=r(326),v=r(327),m=r(349);let y=0},1:function(e,t,r){"use strict";var n=r(15),i="object"==typeof self&&self&&self.Object===Object&&self,o=n.a||i||Function("return this")();t.a=o},10:function(e,t){var r;r=function(){return this}();try{r=r||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(r=window)}e.exports=r},11:function(e,t,r){"use strict";var n=r(12),i=r(5),o=r(13),a=r(3);e.exports=function(e,t,r,s){if(void 0===r)return"[op:add] require value, but got undefined";var c=a(t),u=c[c.length-1],p=i(e,c);if(null===p)return"[op:add] path not found: "+t;if(Array.isArray(p)){var l=o(p,u);if(p.length<l)return"[op:add] invalid array index: "+t;s(e,c).splice(l,0,r)}else n(p[u],r)||(s(e,c)[u]=r)}},12:function(e,t,r){"use strict";e.exports=function e(t,r){if(t===r)return!0;if(!t||!r||"object"!=typeof t||"object"!=typeof r)return!1;if(t.length!==r.length)return!1;if(Array.isArray(t)){if(!Array.isArray(r))return!1;for(var n=0,i=t.length;n<i;n++)if(!e(t[n],r[n]))return!1;return!0}var o=Object.keys(t);if(o.length!==Object.keys(r).length)return!1;for(var a=0,s=o.length;a<s;a++){var c=o[a];if(!e(t[c],r[c]))return!1}return!0}},13:function(e,t,r){"use strict";e.exports=function(e,t){if("-"===t)return e.length;for(var r=0,n=t.length;r<n;r++){var i=t.charCodeAt(r);if(57<i||i<48)return 1/0}return+t}},14:function(e,t,r){"use strict";t.a=function(){return!1}},15:function(e,t,r){"use strict";(function(e){var r="object"==typeof e&&e&&e.Object===Object&&e;t.a=r}).call(this,r(10))},2:function(e,t,r){"use strict";t.a=(()=>{})},21:function(e,t,r){
  /** @license MIT License (c) copyright 2010-2014 original author or authors */
  var n=r(333);t.find=function(e,t,r,o){if("string"!=typeof t)return;if(""===t)return{target:e,key:void 0};if(t===i)return{target:e,key:""};var a,s=e,c=void 0!==o;return n(t,function(t){if(null==e)return s=null,!1;a=Array.isArray(e)?c?function(e,t,r,n){var i=t;if(i<0)throw new Error("array index out of bounds "+i);if(void 0!==n&&"function"==typeof e&&(i=e(t,r,n))<0)throw new Error("could not find patch context "+n);return i}(r,d(t),e,o):"-"===t?t:d(t):t,s=e,e=e[a]}),null===s?void 0:{target:s,key:a}},t.join=function(e){return e.join(i)},t.absolute=function(e){return e[0]===i?e:i+e},t.parse=function(e){var t=[];return n(e,t.push.bind(t)),t},t.contains=function(e,t){return 0===t.indexOf(e)&&t[e.length]===i},t.encodeSegment=function(e){return e.replace(u,p).replace(o,a)},t.decodeSegment=function(e){return e.replace(s,i).replace(l,c)},t.parseArrayIndex=d,t.isValidArrayIndex=f;var i="/",o=/\//g,a="~1",s=/~1/g,c="~",u=/~/g,p="~0",l=/~0/g;var h=/^(0|[1-9]\d*)$/;function f(e){return h.test(e)}function d(e){if(f(e))return+e;throw new SyntaxError("invalid array index "+e)}},22:function(e,t){function r(e){Error.call(this),this.name=this.constructor.name,this.message=e,"function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}e.exports=r,r.prototype=Object.create(Error.prototype),r.prototype.constructor=r},23:function(e,t,r){"use strict";e.exports=function(e){if(!e||"object"!=typeof e)return e;if(Array.isArray(e)){for(var t=e.length,r=new Array(t),n=0;n<t;n++)r[n]=e[n];return r}for(var i=Object.keys(e),o={},a=0,s=i.length;a<s;a++){var c=i[a];o[c]=e[c]}return o}},24:function(e,t,r){"use strict";(function(e){var n=r(15),i="object"==typeof exports&&exports&&!exports.nodeType&&exports,o=i&&"object"==typeof e&&e&&!e.nodeType&&e,a=o&&o.exports===i&&n.a.process,s=function(){try{var e=o&&o.require&&o.require("util").types;return e||a&&a.binding&&a.binding("util")}catch(e){}}();t.a=s}).call(this,r(28)(e))},25:function(e,t,r){
  /** @license MIT License (c) copyright 2010-2014 original author or authors */
  var n=r(331),i=r(29),o=r(332),a=r(336),s=r(21).encodeSegment;t.diff=function(e,t,r){return p(e,t,"",function(e,t){return"object"==typeof e?{patch:t,hash:l(f,e.hash,u),makeContext:l(f,e.makeContext,h),invertible:!(!1===e.invertible)}:{patch:t,hash:l(f,e,u),makeContext:h,invertible:!0}}(r,[])).patch},t.patch=o.apply,t.patchInPlace=o.applyInPlace,t.inverse=a,t.clone=o.clone,t.InvalidPatchOperationError=r(22),t.TestFailedError=r(32),t.PatchNotInvertibleError=r(33);var c=o.isValidObject,u=o.defaultHash;function p(e,t,r,o){return Array.isArray(e)&&Array.isArray(t)?function(e,t,r,o){var a=i.map(o.hash,e),s=i.map(o.hash,t),c=n.compare(a,s);return function(e,t,r,i,o){var a=0;return n.reduce(function(i,o,s,c){var u,l,h=i.patch,f=r+"/"+(c+a);return o===n.REMOVE?(u=h[h.length-1],l=i.makeContext(c,e),i.invertible&&h.push({op:"test",path:f,value:e[c],context:l}),void 0!==u&&"add"===u.op&&u.path===f?(u.op="replace",u.context=l):h.push({op:"remove",path:f,context:l}),a-=1):o===n.ADD?(h.push({op:"add",path:f,value:t[s],context:i.makeContext(c,e)}),a+=1):p(e[c],t[s],f,i),i},i,o)}(e,t,r,o,c)}(e,t,r,o):c(e)&&c(t)?function(e,t,r,n){var i,o,a=Object.keys(t),c=n.patch;for(i=a.length-1;i>=0;--i){o=a[i];var u=r+"/"+s(o);void 0!==e[o]?p(e[o],t[o],u,n):c.push({op:"add",path:u,value:t[o]})}for(a=Object.keys(e),i=a.length-1;i>=0;--i)if(o=a[i],void 0===t[o]){var l=r+"/"+s(o);n.invertible&&c.push({op:"test",path:l,value:e[o]}),c.push({op:"remove",path:l})}return n}(e,t,r,o):function(e,t,r,n){e!==t&&(n.invertible&&n.patch.push({op:"test",path:r,value:e}),n.patch.push({op:"replace",path:r,value:t}));return n}(e,t,r,o)}function l(e,t,r){return e(t)?t:r}function h(){}function f(e){return"function"==typeof e}},26:function(e,t,r){e.exports=r(337)},27:function(e,t,r){e.exports=r(345)},28:function(e,t){e.exports=function(e){if(!e.webpackPolyfill){var t=Object.create(e);t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),Object.defineProperty(t,"exports",{enumerable:!0}),t.webpackPolyfill=1}return t}},29:function(e,t){
  /** @license MIT License (c) copyright 2010-2014 original author or authors */
  t.cons=function(e,t){var r=t.length,n=new Array(r+1);n[0]=e;for(var i=0;i<r;++i)n[i+1]=t[i];return n},t.tail=function(e){for(var t=e.length-1,r=new Array(t),n=0;n<t;++n)r[n]=e[n+1];return r},t.map=function(e,t){for(var r=new Array(t.length),n=0;n<t.length;++n)r[n]=e(t[n]);return r}},3:function(e,t,r){"use strict";function n(e){return"~0"===e?"~":"/"}e.exports=function(e){var t=e.split("/");if(-1===e.indexOf("~"))return t;for(var r=0,i=t.length;r<i;r++)-1!==t[r].indexOf("~")&&(t[r]=t[r].replace(/~[01]/g,n));return t}},30:function(e,t,r){var n=r(21),i=r(31),o=r(334),a=r(335),s=r(29),c=r(32),u=r(22),p=r(33),l=n.find,h=n.parseArrayIndex;function f(e,t){var r=e.target;if(Array.isArray(r))if("-"===e.key)r.push(t);else{if(e.key>r.length)throw new u("target of add outside of array bounds");r.splice(e.key,0,t)}else{if(!_(r))throw new u("target of add must be an object or array "+e.key);r[e.key]=t}}function d(e,t){if(e.path===t.path&&"remove"===t.op)throw new TypeError("Can't commute add,remove -> remove,add for same path");return a(e,t)}function v(e){var t,r=e.target;if(Array.isArray(r))return(t=r.splice(h(e.key),1))[0];if(_(r))return t=r[e.key],delete r[e.key],t;throw new u("target of remove must be an object or array")}function m(e){return void 0===e||null==e.target&&void 0!==e.key}function y(e){return void 0!==e.key&&void 0===e.target[e.key]}function _(e){return null!==e&&"object"==typeof e}t.test={apply:function(e,t,r){var n,i,a=l(e,t.path,r.findContext,t.context),s=a.target;Array.isArray(s)?(n=h(a.key),i=s[n]):i=void 0===a.key?a.target:a.target[a.key];if(!o(i,t.value))throw new c("test failed "+JSON.stringify(t));return e},inverse:function(e,t){return e.push(t),1},commute:function(e,t){if(e.path===t.path&&"remove"===t.op)throw new TypeError("Can't commute test,remove -> remove,test for same path");if("test"===t.op||"replace"===t.op)return[t,e];return a(e,t)}},t.add={apply:function(e,t,r){var n=l(e,t.path,r.findContext,t.context);if(m(n))throw new u("path does not exist "+t.path);if(void 0===t.value)throw new u("missing value");var o=i(t.value);if(void 0===n.key)return o;return f(n,o),e},inverse:function(e,t){var r=t.context;void 0!==r&&(r={before:r.before,after:s.cons(t.value,r.after)});return e.push({op:"test",path:t.path,value:t.value,context:r}),e.push({op:"remove",path:t.path,context:r}),1},commute:d},t.remove={apply:function(e,t,r){var n=l(e,t.path,r.findContext,t.context);if(m(n)||void 0===n.target[n.key])throw new u("path does not exist "+t.path);return v(n),e},inverse:function(e,t,r,n){var i=n[r-1];if(void 0===i||"test"!==i.op||i.path!==t.path)throw new p("cannot invert remove w/o test");var o=i.context;void 0!==o&&(o={before:o.before,after:s.tail(o.after)});return e.push({op:"add",path:i.path,value:i.value,context:o}),2},commute:function(e,t){if(e.path===t.path&&"remove"===t.op)return[t,e];return a(e,t)}},t.replace={apply:function(e,t,r){var n=l(e,t.path,r.findContext,t.context);if(m(n)||y(n))throw new u("path does not exist "+t.path);if(void 0===t.value)throw new u("missing value");var o=i(t.value);if(void 0===n.key)return o;var a=n.target;Array.isArray(a)?a[h(n.key)]=o:a[n.key]=o;return e},inverse:function(e,t,r,n){var i=n[r-1];if(void 0===i||"test"!==i.op||i.path!==t.path)throw new p("cannot invert replace w/o test");var o=i.context;void 0!==o&&(o={before:o.before,after:s.cons(i.value,s.tail(o.after))});return e.push({op:"test",path:i.path,value:t.value}),e.push({op:"replace",path:i.path,value:i.value}),2},commute:function(e,t){if(e.path===t.path&&"remove"===t.op)throw new TypeError("Can't commute replace,remove -> remove,replace for same path");if("test"===t.op||"replace"===t.op)return[t,e];return a(e,t)}},t.move={apply:function(e,t,r){if(n.contains(t.path,t.from))throw new u("move.from cannot be ancestor of move.path");var i=l(e,t.path,r.findContext,t.context),o=l(e,t.from,r.findContext,t.fromContext);return f(i,v(o)),e},inverse:function(e,t){return e.push({op:"move",path:t.from,context:t.fromContext,from:t.path,fromContext:t.context}),1},commute:function(e,t){if(e.path===t.path&&"remove"===t.op)throw new TypeError("Can't commute move,remove -> move,replace for same path");return a(e,t)}},t.copy={apply:function(e,t,r){var n=l(e,t.path,r.findContext,t.context),o=l(e,t.from,r.findContext,t.fromContext);if(m(o)||y(o))throw new u("copy.from must exist");var a,s=o.target;a=Array.isArray(s)?s[h(o.key)]:s[o.key];return f(n,i(a)),e},inverse:function(e,t){throw new p("cannot invert "+t.op)},commute:d}},31:function(e,t){function r(e){return null==e||"object"!=typeof e?e:Array.isArray(e)?function(e){for(var t=e.length,n=new Array(t),i=0;i<t;++i)n[i]=r(e[i]);return n}(e):function(e){for(var t,n=Object.keys(e),i={},o=0,a=n.length;o<a;++o)t=n[o],i[t]=r(e[t]);return i}(e)}
  /** @license MIT License (c) copyright 2010-2014 original author or authors */
  e.exports=r},32:function(e,t){function r(e){Error.call(this),this.name=this.constructor.name,this.message=e,"function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}e.exports=r,r.prototype=Object.create(Error.prototype),r.prototype.constructor=r},324:function(e,t,r){e.exports=r(348)},325:function(e,t,r){"use strict";r.r(t),r.d(t,"FlattenDeepDerivation",function(){return i});var n=r(0);class i extends n.a{constructor(e,t=200){return super(),this._stackOfDependencies=[e],this._maxDepth=t,this._updateNeededFromIndex=0,this._addDependency(e),this}_recalculate(){const e=-1===this._updateNeededFromIndex?0:this._updateNeededFromIndex;this._updateNeededFromIndex=-1;for(let t=this._stackOfDependencies.length-1;t>e;t--){const e=this._stackOfDependencies.pop();this._removeDependency(e)}let t=e;for(;;){const e=t,r=this._stackOfDependencies[t].getValue();if(e===this._maxDepth)return r;if(!(r instanceof n.a))return r;this._stackOfDependencies.push(r),this._addDependency(r),t++}}_youMayNeedToUpdateYourself(e){const t=this._stackOfDependencies.indexOf(e);if(-1===t)throw Error("got a _youMayNeedToUpdateYourself() from a dep that's not in the stack");if(-1===this._updateNeededFromIndex)this._updateNeededFromIndex=t,n.a.prototype._youMayNeedToUpdateYourself.call(this,e);else{if(this._updateNeededFromIndex<=t)return;this._updateNeededFromIndex=t,n.a.prototype._youMayNeedToUpdateYourself.call(this,e)}}_keepUptodate(){this.getValue()}}t.default=function(e,t=7){return new i(e,t)}},326:function(e,t,r){"use strict";r.r(t),r.d(t,"FlatMapDerivation",function(){return o}),r.d(t,"default",function(){return a});var n=r(0);const i={none:0,dep:1,inner:2};class o extends n.a{constructor(e,t){return super(),this._depDerivation=e,this._fn=t,this._innerDerivation=void 0,this._updateNeededFrom=i.dep,this._hot=!1,this._addDependency(e),this}_recalculateHot(){const e=this._updateNeededFrom;if(this._updateNeededFrom=i.none,e===i.inner)return this._innerDerivation.getValue();const t=this._fn(this._depDerivation.getValue());return t instanceof n.a?(this._innerDerivation=t,this._addDependency(t),t.getValue()):t}_recalculateCold(){const e=this._fn(this._depDerivation.getValue());return e instanceof n.a?e.getValue():e}_recalculate(){return this._hot?this._recalculateHot():this._recalculateCold()}_youMayNeedToUpdateYourself(e){const t=e===this._depDerivation?i.dep:i.inner;if(t===i.inner&&e!==this._innerDerivation)throw Error("got a _youMayNeedToUpdateYourself() from neither the dep nor the inner derivation");this._updateNeededFrom===i.none?(this._updateNeededFrom=t,t===i.dep&&this._removeInnerDerivation()):this._updateNeededFrom===i.dep||t===i.dep&&(this._updateNeededFrom=i.dep,this._removeInnerDerivation()),n.a.prototype._youMayNeedToUpdateYourself.call(this,e)}_removeInnerDerivation(){this._innerDerivation&&(this._removeDependency(this._innerDerivation),this._innerDerivation=void 0)}_keepUptodate(){this._hot=!0,this._updateNeededFrom=i.dep,this.getValue()}_stopKeepingUptodate(){this._hot=!1,this._updateNeededFrom=i.dep,this._removeInnerDerivation()}}function a(e,t){return new o(e,t)}o.displayName="flatMap"},327:function(e,t,r){"use strict";r.r(t),r.d(t,"MapDerivation",function(){return i}),r.d(t,"default",function(){return o});var n=r(0);class i extends n.a{constructor(e,t){super(),this._dep=e,this._fn=t,this._addDependency(e)}_recalculate(){return this._fn(this._dep.getValue())}}function o(e,t){return new i(e,t)}},328:function(e,t){var r,n;r=[],n=[],e.exports=function(e,t,i){var o,a,s,c,u,p,l,h;if(e===t)return 0;if(o=e.length,a=t.length,0===o)return a;if(0===a)return o;for(i&&(e=e.toLowerCase(),t=t.toLowerCase()),l=0;l<o;)n[l]=e.charCodeAt(l),r[l]=++l;for(h=0;h<a;)for(s=t.charCodeAt(h),c=u=h++,l=-1;++l<o;)p=s===n[l]?u:u+1,u=r[l],r[l]=c=u>c?p>c?c+1:p:p>u?u+1:p;return c}},329:function(e,t,r){(function(t){var r,n=t.crypto||t.msCrypto;if(n&&n.getRandomValues){var i=new Uint8Array(16);r=function(){return n.getRandomValues(i),i}}if(!r){var o=new Array(16);r=function(){for(var e,t=0;t<16;t++)0==(3&t)&&(e=4294967296*Math.random()),o[t]=e>>>((3&t)<<3)&255;return o}}e.exports=r}).call(this,r(10))},33:function(e,t){function r(e){Error.call(this),this.name=this.constructor.name,this.message=e,"function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}e.exports=r,r.prototype=Object.create(Error.prototype),r.prototype.constructor=r},330:function(e,t){for(var r=[],n=0;n<256;++n)r[n]=(n+256).toString(16).substr(1);e.exports=function(e,t){var n=t||0,i=r;return i[e[n++]]+i[e[n++]]+i[e[n++]]+i[e[n++]]+"-"+i[e[n++]]+i[e[n++]]+"-"+i[e[n++]]+i[e[n++]]+"-"+i[e[n++]]+i[e[n++]]+"-"+i[e[n++]]+i[e[n++]]+i[e[n++]]+i[e[n++]]+i[e[n++]]+i[e[n++]]}},331:function(e,t){var r,n,i;function o(e,t,o,a,s,c){return t[s+a]===o[c+a]?{value:e[c+1][s+1].value,type:i}:e[c][s+1].value<e[c+1][s].value?{value:e[c][s+1].value+1,type:r}:{value:e[c+1][s].value+1,type:n}}
  /** @license MIT License (c) copyright 2010-2014 original author or authors */
  t.compare=function(e,t){for(var a=e.length,s=t.length,c=function(e,t){var r=0,n=Math.min(e.length,t.length);for(;r<n&&e[r]===t[r];)++r;return r}(e,t),u=c<a&&c<s?function(e,t){var r=e.length-1,n=t.length-1,i=Math.min(r,n),o=0;for(;o<i&&e[r-o]===t[n-o];)++o;return o}(e,t):0,p=u+c-1,l=function(e,t){var o,a,s,c=[];for(s=c[t]=[],a=0;a<e;++a)s[a]={value:e-a,type:r};for(o=0;o<t;++o)c[o]=[],c[o][e]={value:t-o,type:n};return c[t][e]={value:0,type:i},c}(a-=p,s-=p),h=a-1;h>=0;--h)for(var f=s-1;f>=0;--f)l[f][h]=o(l,e,t,c,h,f);return{prefix:c,matrix:l,suffix:u}},t.reduce=function(e,t,o){var a,s,c,u,p=o.matrix,l=o.prefix;for(a=0;a<l;++a)t=e(t,i,a,a);c=a,l=p.length,a=0,s=0;for(;a<l;)switch(u=p[a][s].type,t=e(t,u,a+c,s+c),u){case i:++a,++s;break;case r:++s;break;case n:++a}for(a+=c,s+=c,l=o.suffix,c=0;c<l;++c)t=e(t,i,a+c,s+c);return t},t.REMOVE=r=-1,t.ADD=n=1,t.EQUAL=i=0},332:function(e,t,r){
  /** @license MIT License (c) copyright 2010-2014 original author or authors */
  var n=r(30),i=r(31),o=r(22);t.apply=function(e,t,r){return s(e,i(t),r)},t.applyInPlace=s,t.clone=i,t.isValidObject=c,t.defaultHash=function(e){return c(e)||function(e){return"[object Array]"===Object.prototype.toString.call(e)}(e)?JSON.stringify(e):e};var a={};function s(e,t,r){if(r||(r=a),!Array.isArray(e))return t;for(var i,s,c=0;c<e.length;++c){if(s=e[c],void 0===(i=n[s.op]))throw new o("invalid op "+JSON.stringify(s));t=i.apply(t,s,r)}return t}function c(e){return null!==e&&"[object Object]"===Object.prototype.toString.call(e)}},333:function(e,t){
  /** @license MIT License (c) copyright 2010-2014 original author or authors */
  e.exports=function(e,t){var a,s,c,u;a=e.charAt(0)===n?1:0,s="",r.lastIndex=a;for(;c=r.exec(e);)if(u=c[0],s+=e.slice(a,r.lastIndex-u.length),a=r.lastIndex,u===n){if(!1===t(s))return e;s=""}else s+=u===o?n:i;return s+=e.slice(a),t(s),e};var r=/\/|~1|~0/g,n="/",i="~",o="~1"},334:function(e,t){function r(e,t){return e===t||(Array.isArray(e)&&Array.isArray(t)?function(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;++n)if(!r(e[n],t[n]))return!1;return!0}(e,t):"object"==typeof e&&"object"==typeof t&&function(e,t){if(null===e&&null!==t||null!==e&&null===t)return!1;var n=Object.keys(e),i=Object.keys(t);if(n.length!==i.length)return!1;for(var o,a=0;a<n.length;++a)if(!((o=n[a])in t&&r(e[o],t[o])))return!1;return!0}(e,t))}e.exports=r},335:function(e,t,r){var n=r(21);function i(e,t,r,n,i){var o=t.length-1,a=+t[o],s=+n[o],c=n.slice();return a>s?c:("add"===e.op||"copy"===e.op?c[o]=Math.max(0,s-i):"remove"===e.op&&(c[o]=Math.max(0,s+i)),c)}function o(e){return"remove"===e.op?{op:e.op,path:e.path}:"copy"===e.op||"move"===e.op?{op:e.op,path:e.path,from:e.from}:{op:e.op,path:e.path,value:e.value}}e.exports=function(e,t){var r=n.parse(e.path),a=n.parse(t.path),s=function(e,t){var r=e.length,n=t.length;if(0===r||0===n||r<2&&n<2)return[];var i=r===n?r-1:Math.min(r,n),o=0;for(;o<i&&e[o]===t[o];)++o;return e.slice(0,o)}(r,a),c=function(e,t,r){return n.isValidArrayIndex(e[r])&&n.isValidArrayIndex(t[r])}(r,a,s.length),u=o(e),p=o(t);return 0!==s.length||c?c?function(e,t,r,o){if(t.length===o.length)return function(e,t,r,i){var o,a=t.length-1,s=+t[a],c=+i[a];s<c?"add"===e.op||"copy"===e.op?((o=i.slice())[a]=Math.max(0,c-1),r.path=n.absolute(n.join(o))):"remove"===e.op&&((o=i.slice())[a]=c+1,r.path=n.absolute(n.join(o))):"add"===r.op||"copy"===r.op?((o=t.slice())[a]=s+1,e.path=n.absolute(n.join(o))):s>c&&"remove"===r.op&&((o=t.slice())[a]=Math.max(0,s-1),e.path=n.absolute(n.join(o)));return[r,e]}(e,t,r,o);t.length>o.length?(t=i(r,o,e,t,-1),e.path=n.absolute(n.join(t))):(o=i(e,t,r,o,1),r.path=n.absolute(n.join(o)));return[r,e]}(u,r,p,a):function(e,t,r,n){if(e.path===r.path)throw new TypeError("cannot commute "+e.op+","+r.op+" with identical object paths");return[r,e]}(u,0,p):[p,u]}},336:function(e,t,r){var n=r(30);function i(e,t,r,i){var o=n[t.op];return void 0!==o&&"function"==typeof o.inverse?o.inverse(e,t,r,i):1}e.exports=function(e){var t,r,n=[];for(t=e.length-1;t>=0;t-=r)r=i(n,e[t],t,e);return n}},337:function(e,t,r){"use strict";(function(t){var n=r(338),i=r(340),o=r(341),a=r(342),s=r(343),c=r(344),u=r(11),p=r(34),l=r(35),h=r(36),f=r(37),d=r(38),v=t.Set||function(){var e=[];return e.has=function(e){return-1!==this.indexOf(e)},e.add=function(e){this.push(e)},e};e.exports=function(e,t,r){if(0===t.length)return e;for(var m,y=(r=r||{}).strict?a:o,_=1===t.length?s:function(e){return function(t,r){return c(t,r,e)}}(new v),g={"":e},b=0,w=t.length;b<w;b++){var j=t[b];switch(j.op){case"add":if(y(u(g,""+j.path,j.value,_)))return i(e,g,j,r);break;case"remove":if(y(p(g,""+j.path,_)))return i(e,g,j,r);break;case"replace":if(y(l(g,""+j.path,j.value,_)))return i(e,g,j,r);break;case"move":if(y(h(g,""+j.from,""+j.path,_)))return i(e,g,j,r);break;case"copy":if(y(f(g,""+j.from,""+j.path,_)))return i(e,g,j,r);break;case"test":if(y(d(g,""+j.path,j.value)))return i(e,g,j,r);break;default:if(!r.custom||!r.custom[j.op])return y("[op:"+j.op+"] unknown"),i(e,g,j,r);if(m=m||n(g,_),y(r.custom[j.op](m,j,b,t)))return i(e,g,j,r)}}return g[""]}}).call(this,r(10))},338:function(e,t,r){"use strict";var n=r(339),i=r(11),o=r(34),a=r(35),s=r(36),c=r(37),u=r(38),p=r(12),l=r(23),h=r(3);e.exports=function(e,t){return{get:function(t){return n(e,t)},add:function(r,n){return i(e,r,n,t)},remove:function(r){return o(e,r,t)},replace:function(r,n){return a(e,r,n,t)},move:function(r,n){return s(e,r,n,t)},copy:function(r,n){return c(e,r,n,t)},test:function(t,r){return u(e,t,r)},deepEqual:p,shallowCopy:l,toKeys:h}}},339:function(e,t,r){"use strict";var n=r(5),i=r(3);e.exports=function(e,t){var r=i(t),o=r[r.length-1],a=n(e,r);return a?a[o]:void 0}},34:function(e,t,r){"use strict";var n=r(5),i=r(13),o=r(3);e.exports=function(e,t,r){var a=o(t),s=a[a.length-1],c=n(e,a);if(null===c)return"[op:remove] path not found: "+t;if(Array.isArray(c)){var u=i(c,s);if(c.length<=u)return"[op:remove] invalid array index: "+t;r(e,a).splice(u,1)}else delete r(e,a)[s]}},340:function(e,t,r){"use strict";e.exports=function(e,t,r,n){return n.error=r,n.partial?t[""]:e}},341:function(e,t,r){"use strict";e.exports=function(e){return!!e}},342:function(e,t,r){"use strict";e.exports=function(e){if(e)throw new TypeError(e)}},343:function(e,t,r){"use strict";var n=r(23);e.exports=function(e,t){for(var r=0,i=t.length-1;r<i;r++)e=e[t[r]]=n(e[t[r]]);return e}},344:function(e,t,r){"use strict";var n=r(23);function i(e,t,r){var i=e[t];return r.has(i)||(i=n(i),r.add(i)),i}e.exports=function(e,t,r){for(var n=0,o=t.length-1;n<o;n++)e=e[t[n]]=i(e,t[n],r);return e}},345:function(e,t,r){"use strict";(function(e,n){Object.defineProperty(t,"__esModule",{value:!0});var i,o=function(e){return e&&e.__esModule?e:{default:e}}(r(347));i="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==e?e:n;var a=(0,o.default)(i);t.default=a}).call(this,r(10),r(346)(e))},346:function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},347:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,r=e.Symbol;"function"==typeof r?r.observable?t=r.observable:(t=r("observable"),r.observable=t):t="@@observable";return t}},348:function(e,t,r){"use strict";r.r(t);var n={};r.r(n),r.d(n,"CubicBezier",function(){return ii});var i={};r.r(i),r.d(i,"blah",function(){return xo});var o={};r.r(o),r.d(o,"getTimelineTemplateState",function(){return To}),r.d(o,"getObjectState",function(){return Co}),r.d(o,"getPropState",function(){return Po}),r.d(o,"getTimelineDuration",function(){return Do});var a={};r.r(a),r.d(a,"isBlah",function(){return Io});var s={};r.r(s),r.d(s,"isReady",function(){return Ao}),r.d(s,"getDiskRevisionsBrowserStateIsBasedOn",function(){return ko});var c={};r.r(c),r.d(c,"setTimelineDuration",function(){return zo}),r.d(c,"setPointsInBezierCurvesOfScalarValues",function(){return $o}),r.d(c,"addPointInBezierCurvesOfScalarValues",function(){return Fo}),r.d(c,"addConnectorInBezierCurvesOfScalarValues",function(){return Ro}),r.d(c,"removeConnectorInBezierCurvesOfScalarValues",function(){return Ho}),r.d(c,"removePointInBezierCurvesOfScalarValues",function(){return Uo}),r.d(c,"movePointToNewCoordsInBezierCurvesOfScalarValues",function(){return Lo}),r.d(c,"movePointLeftHandleInBezierCurvesOfScalarValues",function(){return Jo}),r.d(c,"movePointRightHandleInBezierCurvesOfScalarValues",function(){return Ko}),r.d(c,"makePointLeftHandleHorizontalInBezierCurvesOfScalarValues",function(){return Wo}),r.d(c,"makePointRightHandleHorizontalInBezierCurvesOfScalarValues",function(){return Yo}),r.d(c,"resetPointHandlesInBezierCurvesOfScalarValues",function(){return qo}),r.d(c,"moveDopesheetConnectorInBezierCurvesOfScalarValues",function(){return Xo}),r.d(c,"moveSelectionOfPointsInBezierCurvesOfScalarValues",function(){return Go}),r.d(c,"removeSelectionOfPointsInBezierCurvesOfScalarValues",function(){return Qo}),r.d(c,"setPointCoordsInBezierCurvesOfScalarValues",function(){return Zo}),r.d(c,"prop_setNumberValueInStaticValueContainer",function(){return ea}),r.d(c,"prop_convertPropToBezierCurves",function(){return ta}),r.d(c,"prop_convertPropToStaticValue",function(){return ra});var u={};r.r(u),r.d(u,"setLoadingStateToLoaded",function(){return sa}),r.d(u,"pushOnDiskRevisionBrowserStateIsBasedOn",function(){return ca}),r.d(u,"setLoadingStateToBrowserStateIsNotBasedOnDiskStateError",function(){return ua}),r.d(u,"prepareExportJson",function(){return pa});var p=r(0),l=r(2);function h(e,t,r){return 0===e.length?t(r):f(r,e,t)}const f=(e,t,r)=>{if(0===t.length)return r(e);if(Array.isArray(e)){let[n,...i]=t;n=parseInt(String(n),10),isNaN(n)&&(n=0);const o=e[n],a=f(o,i,r);if(o===a)return e;const s=[...e];return s.splice(n,1,a),s}if("object"==typeof e&&null!==e){const[n,...i]=t,o=e[n],a=f(o,i,r);return o===a?e:Object.assign({},e,{[n]:a})}{const[e,...n]=t;return{[e]:f(void 0,n,r)}}};var d=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)},v=r(1),m=v.a.Symbol,y=Object.prototype,_=y.hasOwnProperty,g=y.toString,b=m?m.toStringTag:void 0;var w=function(e){var t=_.call(e,b),r=e[b];try{e[b]=void 0;var n=!0}catch(e){}var i=g.call(e);return n&&(t?e[b]=r:delete e[b]),i},j=Object.prototype.toString;var O=function(e){return j.call(e)},x="[object Null]",S="[object Undefined]",T=m?m.toStringTag:void 0;var C=function(e){return null==e?void 0===e?S:x:T&&T in Object(e)?w(e):O(e)};var P=function(e){return null!=e&&"object"==typeof e},D="[object Symbol]";var I=function(e){return"symbol"==typeof e||P(e)&&C(e)==D},A=NaN,k=/^\s+|\s+$/g,E=/^[-+]0x[0-9a-f]+$/i,V=/^0b[01]+$/i,N=/^0o[0-7]+$/i,B=parseInt;var z=function(e){if("number"==typeof e)return e;if(I(e))return A;if(d(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=d(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(k,"");var r=V.test(e);return r||N.test(e)?B(e.slice(2),r?2:8):E.test(e)?A:+e};Math.max,Math.min;var M=Array.isArray,$=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,F=/^\w*$/;var R=function(e,t){if(M(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!I(e))||F.test(e)||!$.test(e)||null!=t&&e in Object(t)},H="[object AsyncFunction]",U="[object Function]",L="[object GeneratorFunction]",J="[object Proxy]";var K=function(e){if(!d(e))return!1;var t=C(e);return t==U||t==L||t==H||t==J},W=v.a["__core-js_shared__"],Y=function(){var e=/[^.]+$/.exec(W&&W.keys&&W.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();var q=function(e){return!!Y&&Y in e},X=Function.prototype.toString;var G=function(e){if(null!=e){try{return X.call(e)}catch(e){}try{return e+""}catch(e){}}return""},Q=/^\[object .+?Constructor\]$/,Z=Function.prototype,ee=Object.prototype,te=Z.toString,re=ee.hasOwnProperty,ne=RegExp("^"+te.call(re).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var ie=function(e){return!(!d(e)||q(e))&&(K(e)?ne:Q).test(G(e))};var oe=function(e,t){return null==e?void 0:e[t]};var ae=function(e,t){var r=oe(e,t);return ie(r)?r:void 0},se=ae(Object,"create");var ce=function(){this.__data__=se?se(null):{},this.size=0};var ue=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},pe="__lodash_hash_undefined__",le=Object.prototype.hasOwnProperty;var he=function(e){var t=this.__data__;if(se){var r=t[e];return r===pe?void 0:r}return le.call(t,e)?t[e]:void 0},fe=Object.prototype.hasOwnProperty;var de=function(e){var t=this.__data__;return se?void 0!==t[e]:fe.call(t,e)},ve="__lodash_hash_undefined__";var me=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=se&&void 0===t?ve:t,this};function ye(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}ye.prototype.clear=ce,ye.prototype.delete=ue,ye.prototype.get=he,ye.prototype.has=de,ye.prototype.set=me;var _e=ye;var ge=function(){this.__data__=[],this.size=0};var be=function(e,t){return e===t||e!=e&&t!=t};var we=function(e,t){for(var r=e.length;r--;)if(be(e[r][0],t))return r;return-1},je=Array.prototype.splice;var Oe=function(e){var t=this.__data__,r=we(t,e);return!(r<0||(r==t.length-1?t.pop():je.call(t,r,1),--this.size,0))};var xe=function(e){var t=this.__data__,r=we(t,e);return r<0?void 0:t[r][1]};var Se=function(e){return we(this.__data__,e)>-1};var Te=function(e,t){var r=this.__data__,n=we(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this};function Ce(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Ce.prototype.clear=ge,Ce.prototype.delete=Oe,Ce.prototype.get=xe,Ce.prototype.has=Se,Ce.prototype.set=Te;var Pe=Ce,De=ae(v.a,"Map");var Ie=function(){this.size=0,this.__data__={hash:new _e,map:new(De||Pe),string:new _e}};var Ae=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e};var ke=function(e,t){var r=e.__data__;return Ae(t)?r["string"==typeof t?"string":"hash"]:r.map};var Ee=function(e){var t=ke(this,e).delete(e);return this.size-=t?1:0,t};var Ve=function(e){return ke(this,e).get(e)};var Ne=function(e){return ke(this,e).has(e)};var Be=function(e,t){var r=ke(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this};function ze(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}ze.prototype.clear=Ie,ze.prototype.delete=Ee,ze.prototype.get=Ve,ze.prototype.has=Ne,ze.prototype.set=Be;var Me=ze,$e="Expected a function";function Fe(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError($e);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var a=e.apply(this,n);return r.cache=o.set(i,a)||o,a};return r.cache=new(Fe.Cache||Me),r}Fe.Cache=Me;var Re=Fe,He=500;var Ue=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Le=/\\(\\)?/g,Je=function(e){var t=Re(e,function(e){return r.size===He&&r.clear(),e}),r=t.cache;return t}(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(Ue,function(e,r,n,i){t.push(n?i.replace(Le,"$1"):r||e)}),t});var Ke=function(e,t){for(var r=-1,n=null==e?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i},We=1/0,Ye=m?m.prototype:void 0,qe=Ye?Ye.toString:void 0;var Xe=function e(t){if("string"==typeof t)return t;if(M(t))return Ke(t,e)+"";if(I(t))return qe?qe.call(t):"";var r=t+"";return"0"==r&&1/t==-We?"-0":r};var Ge=function(e){return null==e?"":Xe(e)};var Qe=function(e,t){return M(e)?e:R(e,t)?[e]:Je(Ge(e))},Ze=1/0;var et=function(e){if("string"==typeof e||I(e))return e;var t=e+"";return"0"==t&&1/e==-Ze?"-0":t};var tt=function(e,t){for(var r=0,n=(t=Qe(t,e)).length;null!=e&&r<n;)e=e[et(t[r++])];return r&&r==n?e:void 0};var rt=function(e,t,r){var n=null==e?void 0:tt(e,t);return void 0===n?r:n};var nt=function(e){return e};var it=function(e,t){return function(r){return e(t(r))}},ot=it(Object.getPrototypeOf,Object),at="[object Object]",st=Function.prototype,ct=Object.prototype,ut=st.toString,pt=ct.hasOwnProperty,lt=ut.call(Object);var ht=function(e){if(!P(e)||C(e)!=at)return!1;var t=ot(e);if(null===t)return!0;var r=pt.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&ut.call(r)==lt},ft=function(){try{var e=ae(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();var dt=function(e,t,r){"__proto__"==t&&ft?ft(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r};var vt=function(e,t,r,n){for(var i=-1,o=null==e?0:e.length;++i<o;){var a=e[i];t(n,a,r(a),e)}return n};var mt=function(e){return function(t,r,n){for(var i=-1,o=Object(t),a=n(t),s=a.length;s--;){var c=a[e?s:++i];if(!1===r(o[c],c,o))break}return t}}();var yt=function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n},_t="[object Arguments]";var gt=function(e){return P(e)&&C(e)==_t},bt=Object.prototype,wt=bt.hasOwnProperty,jt=bt.propertyIsEnumerable,Ot=gt(function(){return arguments}())?gt:function(e){return P(e)&&wt.call(e,"callee")&&!jt.call(e,"callee")},xt=r(6),St=9007199254740991,Tt=/^(?:0|[1-9]\d*)$/;var Ct=function(e,t){var r=typeof e;return!!(t=null==t?St:t)&&("number"==r||"symbol"!=r&&Tt.test(e))&&e>-1&&e%1==0&&e<t},Pt=9007199254740991;var Dt=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=Pt},It={};It["[object Float32Array]"]=It["[object Float64Array]"]=It["[object Int8Array]"]=It["[object Int16Array]"]=It["[object Int32Array]"]=It["[object Uint8Array]"]=It["[object Uint8ClampedArray]"]=It["[object Uint16Array]"]=It["[object Uint32Array]"]=!0,It["[object Arguments]"]=It["[object Array]"]=It["[object ArrayBuffer]"]=It["[object Boolean]"]=It["[object DataView]"]=It["[object Date]"]=It["[object Error]"]=It["[object Function]"]=It["[object Map]"]=It["[object Number]"]=It["[object Object]"]=It["[object RegExp]"]=It["[object Set]"]=It["[object String]"]=It["[object WeakMap]"]=!1;var At=function(e){return P(e)&&Dt(e.length)&&!!It[C(e)]};var kt=function(e){return function(t){return e(t)}},Et=r(24),Vt=Et.a&&Et.a.isTypedArray,Nt=Vt?kt(Vt):At,Bt=Object.prototype.hasOwnProperty;var zt=function(e,t){var r=M(e),n=!r&&Ot(e),i=!r&&!n&&Object(xt.a)(e),o=!r&&!n&&!i&&Nt(e),a=r||n||i||o,s=a?yt(e.length,String):[],c=s.length;for(var u in e)!t&&!Bt.call(e,u)||a&&("length"==u||i&&("offset"==u||"parent"==u)||o&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||Ct(u,c))||s.push(u);return s},Mt=Object.prototype;var $t=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Mt)},Ft=it(Object.keys,Object),Rt=Object.prototype.hasOwnProperty;var Ht=function(e){if(!$t(e))return Ft(e);var t=[];for(var r in Object(e))Rt.call(e,r)&&"constructor"!=r&&t.push(r);return t};var Ut=function(e){return null!=e&&Dt(e.length)&&!K(e)};var Lt=function(e){return Ut(e)?zt(e):Ht(e)};var Jt=function(e,t){return e&&mt(e,t,Lt)};var Kt=function(e,t){return function(r,n){if(null==r)return r;if(!Ut(r))return e(r,n);for(var i=r.length,o=t?i:-1,a=Object(r);(t?o--:++o<i)&&!1!==n(a[o],o,a););return r}}(Jt);var Wt=function(e,t,r,n){return Kt(e,function(e,i,o){t(n,e,r(e),o)}),n};var Yt=function(){this.__data__=new Pe,this.size=0};var qt=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r};var Xt=function(e){return this.__data__.get(e)};var Gt=function(e){return this.__data__.has(e)},Qt=200;var Zt=function(e,t){var r=this.__data__;if(r instanceof Pe){var n=r.__data__;if(!De||n.length<Qt-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new Me(n)}return r.set(e,t),this.size=r.size,this};function er(e){var t=this.__data__=new Pe(e);this.size=t.size}er.prototype.clear=Yt,er.prototype.delete=qt,er.prototype.get=Xt,er.prototype.has=Gt,er.prototype.set=Zt;var tr=er,rr="__lodash_hash_undefined__";var nr=function(e){return this.__data__.set(e,rr),this};var ir=function(e){return this.__data__.has(e)};function or(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new Me;++t<r;)this.add(e[t])}or.prototype.add=or.prototype.push=nr,or.prototype.has=ir;var ar=or;var sr=function(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1};var cr=function(e,t){return e.has(t)},ur=1,pr=2;var lr=function(e,t,r,n,i,o){var a=r&ur,s=e.length,c=t.length;if(s!=c&&!(a&&c>s))return!1;var u=o.get(e);if(u&&o.get(t))return u==t;var p=-1,l=!0,h=r&pr?new ar:void 0;for(o.set(e,t),o.set(t,e);++p<s;){var f=e[p],d=t[p];if(n)var v=a?n(d,f,p,t,e,o):n(f,d,p,e,t,o);if(void 0!==v){if(v)continue;l=!1;break}if(h){if(!sr(t,function(e,t){if(!cr(h,t)&&(f===e||i(f,e,r,n,o)))return h.push(t)})){l=!1;break}}else if(f!==d&&!i(f,d,r,n,o)){l=!1;break}}return o.delete(e),o.delete(t),l},hr=v.a.Uint8Array;var fr=function(e){var t=-1,r=Array(e.size);return e.forEach(function(e,n){r[++t]=[n,e]}),r};var dr=function(e){var t=-1,r=Array(e.size);return e.forEach(function(e){r[++t]=e}),r},vr=1,mr=2,yr="[object Boolean]",_r="[object Date]",gr="[object Error]",br="[object Map]",wr="[object Number]",jr="[object RegExp]",Or="[object Set]",xr="[object String]",Sr="[object Symbol]",Tr="[object ArrayBuffer]",Cr="[object DataView]",Pr=m?m.prototype:void 0,Dr=Pr?Pr.valueOf:void 0;var Ir=function(e,t,r,n,i,o,a){switch(r){case Cr:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Tr:return!(e.byteLength!=t.byteLength||!o(new hr(e),new hr(t)));case yr:case _r:case wr:return be(+e,+t);case gr:return e.name==t.name&&e.message==t.message;case jr:case xr:return e==t+"";case br:var s=fr;case Or:var c=n&vr;if(s||(s=dr),e.size!=t.size&&!c)return!1;var u=a.get(e);if(u)return u==t;n|=mr,a.set(e,t);var p=lr(s(e),s(t),n,i,o,a);return a.delete(e),p;case Sr:if(Dr)return Dr.call(e)==Dr.call(t)}return!1};var Ar=function(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e};var kr=function(e,t,r){var n=t(e);return M(e)?n:Ar(n,r(e))};var Er=function(e,t){for(var r=-1,n=null==e?0:e.length,i=0,o=[];++r<n;){var a=e[r];t(a,r,e)&&(o[i++]=a)}return o};var Vr=function(){return[]},Nr=Object.prototype.propertyIsEnumerable,Br=Object.getOwnPropertySymbols,zr=Br?function(e){return null==e?[]:(e=Object(e),Er(Br(e),function(t){return Nr.call(e,t)}))}:Vr;var Mr=function(e){return kr(e,Lt,zr)},$r=1,Fr=Object.prototype.hasOwnProperty;var Rr=function(e,t,r,n,i,o){var a=r&$r,s=Mr(e),c=s.length;if(c!=Mr(t).length&&!a)return!1;for(var u=c;u--;){var p=s[u];if(!(a?p in t:Fr.call(t,p)))return!1}var l=o.get(e);if(l&&o.get(t))return l==t;var h=!0;o.set(e,t),o.set(t,e);for(var f=a;++u<c;){var d=e[p=s[u]],v=t[p];if(n)var m=a?n(v,d,p,t,e,o):n(d,v,p,e,t,o);if(!(void 0===m?d===v||i(d,v,r,n,o):m)){h=!1;break}f||(f="constructor"==p)}if(h&&!f){var y=e.constructor,_=t.constructor;y!=_&&"constructor"in e&&"constructor"in t&&!("function"==typeof y&&y instanceof y&&"function"==typeof _&&_ instanceof _)&&(h=!1)}return o.delete(e),o.delete(t),h},Hr=ae(v.a,"DataView"),Ur=ae(v.a,"Promise"),Lr=ae(v.a,"Set"),Jr=ae(v.a,"WeakMap"),Kr=G(Hr),Wr=G(De),Yr=G(Ur),qr=G(Lr),Xr=G(Jr),Gr=C;(Hr&&"[object DataView]"!=Gr(new Hr(new ArrayBuffer(1)))||De&&"[object Map]"!=Gr(new De)||Ur&&"[object Promise]"!=Gr(Ur.resolve())||Lr&&"[object Set]"!=Gr(new Lr)||Jr&&"[object WeakMap]"!=Gr(new Jr))&&(Gr=function(e){var t=C(e),r="[object Object]"==t?e.constructor:void 0,n=r?G(r):"";if(n)switch(n){case Kr:return"[object DataView]";case Wr:return"[object Map]";case Yr:return"[object Promise]";case qr:return"[object Set]";case Xr:return"[object WeakMap]"}return t});var Qr=Gr,Zr=1,en="[object Arguments]",tn="[object Array]",rn="[object Object]",nn=Object.prototype.hasOwnProperty;var on=function(e,t,r,n,i,o){var a=M(e),s=M(t),c=a?tn:Qr(e),u=s?tn:Qr(t),p=(c=c==en?rn:c)==rn,l=(u=u==en?rn:u)==rn,h=c==u;if(h&&Object(xt.a)(e)){if(!Object(xt.a)(t))return!1;a=!0,p=!1}if(h&&!p)return o||(o=new tr),a||Nt(e)?lr(e,t,r,n,i,o):Ir(e,t,c,r,n,i,o);if(!(r&Zr)){var f=p&&nn.call(e,"__wrapped__"),d=l&&nn.call(t,"__wrapped__");if(f||d){var v=f?e.value():e,m=d?t.value():t;return o||(o=new tr),i(v,m,r,n,o)}}return!!h&&(o||(o=new tr),Rr(e,t,r,n,i,o))};var an=function e(t,r,n,i,o){return t===r||(null==t||null==r||!P(t)&&!P(r)?t!=t&&r!=r:on(t,r,n,i,e,o))},sn=1,cn=2;var un=function(e,t,r,n){var i=r.length,o=i,a=!n;if(null==e)return!o;for(e=Object(e);i--;){var s=r[i];if(a&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++i<o;){var c=(s=r[i])[0],u=e[c],p=s[1];if(a&&s[2]){if(void 0===u&&!(c in e))return!1}else{var l=new tr;if(n)var h=n(u,p,c,e,t,l);if(!(void 0===h?an(p,u,sn|cn,n,l):h))return!1}}return!0};var pn=function(e){return e==e&&!d(e)};var ln=function(e){for(var t=Lt(e),r=t.length;r--;){var n=t[r],i=e[n];t[r]=[n,i,pn(i)]}return t};var hn=function(e,t){return function(r){return null!=r&&r[e]===t&&(void 0!==t||e in Object(r))}};var fn=function(e){var t=ln(e);return 1==t.length&&t[0][2]?hn(t[0][0],t[0][1]):function(r){return r===e||un(r,e,t)}};var dn=function(e,t){return null!=e&&t in Object(e)};var vn=function(e,t,r){for(var n=-1,i=(t=Qe(t,e)).length,o=!1;++n<i;){var a=et(t[n]);if(!(o=null!=e&&r(e,a)))break;e=e[a]}return o||++n!=i?o:!!(i=null==e?0:e.length)&&Dt(i)&&Ct(a,i)&&(M(e)||Ot(e))};var mn=function(e,t){return null!=e&&vn(e,t,dn)},yn=1,_n=2;var gn=function(e,t){return R(e)&&pn(t)?hn(et(e),t):function(r){var n=rt(r,e);return void 0===n&&n===t?mn(r,e):an(t,n,yn|_n)}};var bn=function(e){return function(t){return null==t?void 0:t[e]}};var wn=function(e){return function(t){return tt(t,e)}};var jn=function(e){return R(e)?bn(et(e)):wn(e)};var On=function(e){return"function"==typeof e?e:null==e?nt:"object"==typeof e?M(e)?gn(e[0],e[1]):fn(e):jn(e)};var xn=function(e,t){return function(r,n){var i=M(r)?vt:Wt,o=t?t():{};return i(r,e,On(n,2),o)}}(function(e,t,r){dt(e,r,t)});var Sn=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0};var Tn=function(e,t){var r={};return t=On(t,3),Jt(e,function(e,n,i){dt(r,n,t(e,n,i))}),r},Cn=Math.ceil,Pn=Math.max;var Dn=function(e,t,r,n){for(var i=-1,o=Pn(Cn((t-e)/(r||1)),0),a=Array(o);o--;)a[n?o:++i]=e,e+=r;return a};var In=function(e,t,r){if(!d(r))return!1;var n=typeof t;return!!("number"==n?Ut(r)&&Ct(t,r.length):"string"==n&&t in r)&&be(r[t],e)},An=1/0,kn=1.7976931348623157e308;var En=function(e){return e?(e=z(e))===An||e===-An?(e<0?-1:1)*kn:e==e?e:0:0===e?e:0};var Vn=function(e){return function(t,r,n){return n&&"number"!=typeof n&&In(t,r,n)&&(r=n=void 0),t=En(t),void 0===r?(r=t,t=0):r=En(r),n=void 0===n?t<r?1:-1:En(n),Dn(t,r,n,e)}}();
  /**
   * @license
   * Lodash (Custom Build) <https://lodash.com/>
   * Build: `lodash modularize exports="es" -o ./`
   * Copyright JS Foundation and other contributors <https://js.foundation/>
   * Released under MIT license <https://lodash.com/license>
   * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
   * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
   */
  const Nn={get(e,t){const r=e.$pointerMeta;if("$pointerMeta"===t)return r;if(r.cachedSubPointers[t])return r.cachedSubPointers[t];const n=Bn({root:r.root,path:[...r.path,t]});return r.cachedSubPointers[t]=n,n}},Bn=({root:e,path:t})=>new Proxy({$pointerMeta:{type:null,root:e,path:t,cachedSubPointers:{}}},Nn);var zn,Mn=Bn;!function(e){e[e.Dict=0]="Dict",e[e.Array=1]="Array",e[e.Other=2]="Other"}(zn||(zn={}));const $n=e=>Array.isArray(e)?zn.Array:ht(e)?zn.Dict:zn.Other,Fn=(e,t,r=$n(e))=>r===zn.Dict&&"string"==typeof t?e[t]:r===zn.Array&&Rn(t)?e[t]:void 0,Rn=e=>{const t="number"==typeof e?e:parseInt(e,10);return!isNaN(t)&&t>=0&&t<1/0&&(0|t)===t};class Hn{constructor(e,t){this._parent=e,this._path=t,this.children=new Map,this.identityChangeListeners=new Set}addIdentityChangeListener(e){this.identityChangeListeners.add(e)}removeIdentityChangeListener(e){this.identityChangeListeners.delete(e),this._checkForGC()}removeChild(e){this.children.delete(e),this._checkForGC()}getChild(e){return this.children.get(e)}getOrCreateChild(e){let t=this.children.get(e);return t||(t=t=new Hn(this,this._path.concat([e])),this.children.set(e,t)),t}_checkForGC(){this.identityChangeListeners.size>0||this.children.size>0||this._parent&&this._parent.removeChild(Sn(this._path))}}class Un{constructor(e){this.reduceState=((e,t)=>{const r=h(e,t,this.getState());return this.setState(r),r}),this._currentState=e,this._rootThingy=new Hn(void 0,[]),this.pointer=Mn({root:this,path:[]})}setState(e){const t=this._currentState;this._currentState=e,this._comp([],this._rootThingy,t,e)}getState(){return this._currentState}getIn(e){return 0===e.length?this.getState():rt(this.getState(),e)}_comp(e,t,r,n){if(r===n)return;if(t.identityChangeListeners.forEach(e=>e(n)),0===t.children.size)return;const i=$n(r),o=$n(n);i===zn.Other&&i===o||t.children.forEach((t,a)=>{const s=Fn(r,a,i),c=Fn(n,a,o);this._comp([...e,a],t,s,c)})}getValueByPath(e){return rt(this._currentState,e)}_getOrCreateThingyForPath(e){let t=this._rootThingy;for(const r of e)t=t.getOrCreateChild(r);return t}_getThingyForPath(e){let t=this._rootThingy;for(const r of e){const e=t.getChild(r);if(!e)return;t=e}return t}_getIdentityByPath(e){return 0===e.length?this._currentState:rt(this._currentState,e)}_tapIntoIdentityOfPathChanges(e,t){const r=this._getOrCreateThingyForPath(e);r.identityChangeListeners.add(t);return()=>{r.identityChangeListeners.delete(t)}}}var Ln=e=>new Un(e);const Jn=e=>{const t=e.$pointerMeta;let r=t.identityDerivation;return r||(r=t.identityDerivation=new class extends p.a{constructor(e,t){super(),this._root=e,this._path=t,this._untapFromChanges=l.a,this._cachedValue=void 0,this._hasCachedValue=!1}_recalculate(){return this._hot?(this._hasCachedValue||(this._cachedValue=this._root._getIdentityByPath(this._path),this._hasCachedValue=!0),this._cachedValue):this._root._getIdentityByPath(this._path)}_keepUptodate(){this._hot=!0,this._hasCachedValue=!1,this._cachedValue=void 0,this._untapFromChanges=this._root._tapIntoIdentityOfPathChanges(this._path,e=>{this._hasCachedValue=!0,this._cachedValue=e,this._youMayNeedToUpdateYourself(this)})}_stopKeepingUptodate(){this._untapFromChanges(),this._untapFromChanges=l.a,this._hot=!1,this._hasCachedValue=!1,this._cachedValue=void 0}}(t.root,t.path)),r},Kn=e=>Wn(e)?Jn(e).getValue():Object(p.b)(e)?e.getValue():e,Wn=e=>!(!e||!e.$pointerMeta);window.__studiojsProjectsSingleton||(window.__studiojsProjectsSingleton=new class{constructor(){this.atom=new Un({projects:{}})}add(e,t){this.atom.reduceState(["projects",e],()=>t)}get(e){return this.atom.getState().projects[e]}has(e){return!!this.get(e)}});var Yn=window.__studiojsProjectsSingleton,qn=r(39),Xn=r.n(qn);function Gn(e,t,r="Did you mean ",n="?"){const i=Xn()(e,t,{threshold:.7});return i?r+JSON.stringify(i)+n:""}var Qn=r(40),Zn=r.n(Qn);class ei extends p.a{constructor(e,t){super(),this._deps=e,this._fn=t;for(const t in e)this._addDependency(e[t])}_recalculate(){return this._fn(this._deps)}}var ti=r(9);class ri extends p.a{constructor(e){super(),this._fn=e}_recalculate(){let e;const t=new Set;return Object(ti.a)(()=>{e=this._fn()},e=>{t.add(e),this._addDependency(e)}),this._dependencies.forEach(e=>{t.has(e)||this._removeDependency(e)}),this._dependencies=t,e}_keepUptodate(){this.getValue()}}function ni(e){return new ri(e)}function ii(e){return ai(e).flatMap(t=>t?si(e):e.leftPointValueD)}const oi=({timeD:e,leftPointTimeD:t,rightPointTimeD:r})=>(function(e,t){return new ei(e,t)})({timeD:e,leftPointTimeD:t,rightPointTimeD:r},({timeD:e,leftPointTimeD:t,rightPointTimeD:r})=>{const n=r.getValue();if("number"==typeof n){const r=n-t.getValue();return(e.getValue()-t.getValue())/r}return 0}),ai=({interpolationDescriptorP:e})=>Jn(e.connected),si=e=>{const t=oi(e),r=(e=>ni(()=>{const t=Kn(e.handles[0]),r=Kn(e.handles[1]),n=Kn(e.handles[2]),i=Kn(e.handles[3]);return new Zn.a(t,r,1-n,1-i)}))(e.interpolationDescriptorP),{leftPointValueD:n,rightPointValueD:i}=e;return ni(()=>{const e=r.getValue().solveSimple(t.getValue()),o=i.getValue()-n.getValue();return n.getValue()+e*o})};var ci=r(8);const ui={timelineIsEmpty:{type:"TimelineIsEmpty"},error:{type:"Error"},timeIsBeforeFirstPoint:{type:"TimeIsBeforeFirstPoint"}},pi={TimelineIsEmpty:{transitionIn(e,t){const r=Jn(t._pointsP[0]);return t._addDependency(r),Object.assign({},e,{firstIndexPD:r})},recalculateValue(e,t){return t._changeObservedIn.has(e.firstIndexPD)?this._transitionOutAndRecalculateValue(e,t):t._emptyValue()},_transitionOutAndRecalculateValue:(e,t)=>(t._removeDependency(e.firstIndexPD),t._determineNewState(),t._recalculate())},TimeIsBeforeFirstPoint:{transitionIn(e,t){const r=Jn(t._pointsP[0].time),n=Jn(t._pointsP[0].value);return t._addDependency(r),t._addDependency(n),Object.assign({},e,{timeOfFirstPointPD:r,valueOfFirstPointD:n})},recalculateValue(e,t){if(t._changeObservedIn.has(e.timeOfFirstPointPD)){const r=e.timeOfFirstPointPD.getValue();return void 0===r?this._transitionOutAndRecalculateValue(e,t):r>t.timeD.getValue()?e.valueOfFirstPointD.getValue():this._transitionOutAndRecalculateValue(e,t)}return t._changeObservedIn.has(t.timeD)&&t.timeD.getValue()>=e.timeOfFirstPointPD.getValue()?this._transitionOutAndRecalculateValue(e,t):e.valueOfFirstPointD.getValue()},_transitionOutAndRecalculateValue:(e,t)=>(t._removeDependency(e.timeOfFirstPointPD),t._determineNewState(),t._recalculate())},Error:{transitionIn:(e,t)=>ui.error,recalculateValue:(e,t)=>t._emptyValue(),_transitionOutAndRecalculateValue:(e,t)=>(t._determineNewState(),t._recalculate())},ObservingKey:{transitionIn(e,t){const r=t._pointsP[e.currentPointIndex],i=t._pointsP[e.currentPointIndex+1],o=Jn(i).map(e=>!e),a=Jn(i.time),s=Jn(i.value),c=Jn(r.time),u=r.interpolationDescriptor,p=u.interpolationType,l=Jn(p).flatMap(e=>{const i=n[e];if(i)return i({timeD:t.timeD,interpolationDescriptorP:u,leftPointTimeD:Jn(r.time),leftPointValueD:Jn(r.value),rightPointTimeD:a,rightPointValueD:s});throw new Error(`Unkown interpolationType '${e||"undefined"}'`)});return t._addDependency(c),t._addDependency(o),t._addDependency(a),t._addDependency(l),Object.assign({},e,{leftPointTimePD:c,isLastPointD:o,possibleRightPointTimePD:a,interpolatorD:l})},recalculateValue(e,t){const r=e.leftPointTimePD.getValue(),n=t.timeD.getValue(),i=e.possibleRightPointTimePD.getValue();return void 0===r||r>n?this._transitionOutAndRecalculateValue(e,t):!0===e.isLastPointD.getValue()||"number"==typeof i&&i>n?e.interpolatorD.getValue():this._transitionOutAndRecalculateValue(e,t)},_transitionOutAndRecalculateValue:(e,t)=>(t._removeDependency(e.leftPointTimePD),t._removeDependency(e.isLastPointD),t._removeDependency(e.possibleRightPointTimePD),t._removeDependency(e.interpolatorD),t._determineNewState(),t._recalculate())}};class li extends p.a{constructor(e,t){super(),this._pointsP=e,this.timeD=t,this._addDependency(t),this._state={type:"started"},this._changeObservedIn=new Set}_keepUptodate(){this._hot=!0,this._determineNewState()}_stopkeepingUptodate(){this._hot=!1}_emptyValue(){return 0}_recalculate(){if(!this._hot)throw new Error("Cold reads aren't supported on Timeline/DerivationOfBezierCurvesOfScalarValues");const e=this._state,t=pi[e.type].recalculateValue(e,this);return this._changeObservedIn.clear(),t}_determineNewState(e=0){const t=this._determinNewBaseState(e);this._state=pi[t.type].transitionIn(t,this)}_determinNewBaseState(e){Object(ci.c)();const t=Kn(this._pointsP);if(Object(ci.a)(),0===t.length)return ui.timelineIsEmpty;let r;r=0===e?0:t[e]?e:0;const n=this.timeD.getValue();for(;;){const e=t[r];if(!e)return console.error("Bug here"),ui.error;if(!(e.time>n)){if(e.time===n)return{type:"ObservingKey",currentPointIndex:r};if(r===t.length-1)return{type:"ObservingKey",currentPointIndex:r};{const e=r+1;if(t[e].time<=n){r=e;continue}return{type:"ObservingKey",currentPointIndex:r}}}if(0===r)return ui.timeIsBeforeFirstPoint;r--}}_youMayNeedToUpdateYourself(e){this._changeObservedIn.add(e),p.a.prototype._youMayNeedToUpdateYourself.call(this,e)}}class hi{constructor(e,t){this._timelnieInstanceObject=e,this.name=t;const r=this._timelnieInstanceObject._objectTemplate._pointerToState.props[this.name].valueContainer,n=Jn(r.type);this._valueDerivation=n.flatMap(e=>e?"StaticValueContainer"===e?Jn(r.value).map(e=>"number"==typeof e?e:0):"BezierCurvesOfScalarValues"===e?new li(r.points,Jn(this._timelnieInstanceObject._timelineInstance.statePointer.time)):(console.error("@todo",e),0):0)}get value(){return this._valueDerivation.getValue()}}function fi(e,t){return e.length<=t?e:e.substr(0,t-3)+"..."}var di=e=>"string"==typeof e?`string("${fi(e,10)}")`:"number"==typeof e?`number(${fi(String(e),10)})`:null===e?"null":void 0===e?"undefined":"boolean"==typeof e?String(e):Array.isArray(e)?"array":"object"==typeof e?"object":"unknown";const vi=new WeakMap,mi=e=>vi.get(e);class yi{constructor(e){vi.set(this,e)}get path(){return mi(this).path}get nativeObject(){return mi(this).nativeObject}onValuesChange(e){return mi(this).onValuesChange(e)}}class _i extends Error{}class gi extends _i{}const bi=new WeakMap,wi=e=>bi.get(e);class ji{constructor(e){bi.set(this,e)}add(e,t=5){const r=wi(this);r._adaptersByPriority[t];const n=e;r.add(n,t)}}class Oi{constructor(e,t,r,n,i){this._timelineInstance=e,this.path=t,this.nativeObject=r,this.config=n,this._propInstances={},this._project=e._project,this._objectTemplate=this._timelineInstance._timelineTemplate.getObjectTemplate(t,r,n,i);const o=this._objectTemplate.adapter;o&&o.start&&this._project.ready.then(()=>{o.start(this.facade)}),this.facade=new yi(this)}getProp(e){if(!this._objectTemplate.nativeObjectType.props[e])throw new Error(`Object '${this.path}' does not have a prop named ${JSON.stringify(e)}. ${Gn(e,Object.keys(this._objectTemplate.nativeObjectType.props))}`);return this._propInstances[e]||(this._propInstances[e]=new hi(this,e)),this._propInstances[e]}onValuesChange(e){const t=Tn(this._objectTemplate.nativeObjectType.props,(e,t)=>this.getProp(t)),r=ni(()=>{return Tn(t,e=>e.value)}),n=r.changes(this._objectTemplate._project.ticker).tap(t=>{e(t,this._timelineInstance.time)});return this._project.ticker.registerSideEffect(()=>{e(r.getValue(),this._timelineInstance.time)}),n}}const xi=(e,t,r)=>{return e.adapters.findAdapterForNativeObject(t)},Si=e=>e.replace(/^[\s\/]*/,"").replace(/[\s\/]*$/,"").replace(/\s*\/\s*/," / "),Ti=e=>{if("string"!=typeof e)return`it is not a string. (it is a ${typeof e})`;const t=e.split(/\//);if(0===t.length)return"it is empty.";for(let e=0;e<t.length;e++){if(0===t[e].trim().length)return`the component #${e+1} is empty.`}};function Ci(e,t){const r=Si(e),n=Ti(r);if(n)throw new gi(`The path in ${t}(${"string"==typeof e?`"${e}"`:""}) is invalid because ${n}`);return e!==r&&console.warn(`The path in ${t}("${e}") was sanitised to "${r}".`),r}const Pi=(e,t)=>{if(!e||"object"!=typeof e)return console.warn(t.propsIsntObject(e)),{};const r=Object.keys(e);if(0===r.length)return console.warn(t.propsEmpty()),{};const n={};for(let i of r){const r=e[i];if(r&&"object"==typeof r){if(!r.hasOwnProperty("type")){console.warn(t.propDoesntHaveAType(i));continue}if("string"!=typeof r.type){console.warn(t.propTypeIsNotAString(i,r.type));continue}if("number"!==r.type){console.warn(t.invalidPropTypeEnum(i,r.type));continue}n[i]=r}else console.warn(t.propConfigMustBeObject(i,r))}return n},Di=(e,t)=>Pi(e,new class{constructor(e,t){this._objectPath=e,this._createObjectTemplate=t}_configToCreateObjectIsInvalid(){return`The config given to timeline.createObject("${this._objectPath}", ..., config) is invalid:\n`}_wellFormedConfigExample(){return"const config = {\n  props: {\n    x: {\n      type: 'number'\n    }\n  }\n}"}propsIsntObject(e){return this._configToCreateObjectIsInvalid()+`The value config.props must be an object. Instead, it is ${di(e)}.\n`+"To fix this, you can either remove 'props' from config.props to allow an adapter to provide it, or write is as an object. Example:\n\n"+this._wellFormedConfigExample()}propsEmpty(){return this._configToCreateObjectIsInvalid()+"config.props is empty {}, so the object will have no properties for us to animate.\nTo fix this, you can add a prop by changing your config like this:\nm"+this._wellFormedConfigExample()}propDoesntHaveAType(e){return this._configToCreateObjectIsInvalid()+`config.props["${e}"] does not seem to have a 'type'.\n`+"To fix this, add a 'type' key to this prop. Here is an example of a correct prop type: {type: 'number'}"}propTypeIsNotAString(e,t){return this._configToCreateObjectIsInvalid()+`Value config.props["${e}"].type must be a string. Instead, it was ${di(t)}.\n`+"Here is an example of a correct prop type: {type: 'number'}"}invalidPropTypeEnum(e,t){return this._configToCreateObjectIsInvalid()+`config.props["${e}"].type is "${t}", which is invalid. At the moment, only the 'number' prop type is supported.`}propConfigMustBeObject(e,t){return this._configToCreateObjectIsInvalid()+`config.props["${e}"] must be an object. Instead, it is ${di(t)}.\n`+"Example of a correct prop type: {type: 'number'}"}}(t,`timeline.createObject("${t}", ..., config)`));function Ii(){let e,t;const r=new Promise((r,n)=>{e=r,t=n});return{resolve:e,reject:t,promise:r}}const Ai=new WeakMap,ki=e=>Ai.get(e);class Ei{constructor(e){Ai.set(this,e)}get time(){return ki(this).time/1e3}set time(e){ki(this).time=1e3*e}get playing(){return ki(this).playing}createObject(e,t,r){const n=ki(this),i=Ci(e,`timeline.createObject("${e}", ...)`);if(n._objects[i])throw new gi(`Looks like you're creating two different objects on the same path "${i}". `+"If you're trying to create two different objects, give each a unique path. Otherwise if you're trying to query the same existing object, you can run timeline.getObject(path) to get access to that object after it's been created.");const o=r?Object.assign({},r):{props:{}};let a=o;if(r&&r.hasOwnProperty("props"))a.props=Di(r.props,e);else{const e=xi(n._project,t,o);e?a=e.getType(t,o):a.props={}}return n.createObject(i,t,o,a).facade}getObject(e){const t=Ci(e,`timeline.getObject("${e}")`),r=ki(this).getObject(t);return r?r.facade:void 0}play(e){if(ki(this)._project.isReady())return ki(this).play(e);{0;const e=Ii();return e.resolve(!0),e.promise}}pause(){ki(this).pause()}}const Vi=["normal","reverse","alternate","alternateReverse"];class Ni{constructor(e,t,r){this._project=e,this._path=t,this._instanceId=r,this._objects={},this._state=Ln({time:0}),this._playing=!1,this._stopPlayCallback=l.a,this._gotoTime=(e=>{this._state.reduceState(["time"],()=>"number"==typeof e&&e>=0?e:0)}),this._timelineTemplate=e._getTimelineTemplate(t),this.statePointer=this._state.pointer,this._address=Object.assign({},this._timelineTemplate._address,{timelineInstanceId:r}),this.facade=new Ei(this)}createObject(e,t,r,n){return this._objects[e]=new Oi(this,e,t,r,n)}getObject(e){return this._objects[e]}get time(){return this._state.getState().time}set time(e){let t=e;this.pause(),"number"!=typeof t&&(console.error(`value t in timeline.time = t must be a number. ${typeof t} given`),t=0),t<0&&(console.error(`timeline.time must be a positive number. ${t} given`),t=0),t>this._timelineTemplate.duration&&(t=this._timelineTemplate.duration);const r=this._timelineTemplate.duration;this._gotoTime(t>r?r:t)}get playing(){return this._playing}_makeRangeFromTimelineTemplate(){return ni(()=>({from:0,to:Kn(this._timelineTemplate._durationD)}))}play(e){const t=this._timelineTemplate.duration,r=e&&e.range?e.range:{from:0,to:t};if("number"!=typeof r.from||r.from<0)throw new gi(`Argument conf.range.from in timeline.play(conf) must be a positive number. ${JSON.stringify(r.from)} given.`);if(r.from>=t)throw new gi(`Argument conf.range.from in timeline.play(conf) cannot be longer than the duration of the timeline, which is ${t}ms. ${JSON.stringify(r.from)} given.`);if("number"!=typeof r.to||r.to<=0)throw new gi(`Argument conf.range.to in timeline.play(conf) must be a number larger than zero. ${JSON.stringify(r.to)} given.`);if(r.from>t)throw new gi(`Argument conf.range.to in timeline.play(conf) cannot be longer than the duration of the timeline, which is ${t}ms. ${JSON.stringify(r.to)} given.`);if(r.to<=r.from)throw new gi(`Argument conf.range.to in timeline.play(conf) must be larger than conf.range.from. ${JSON.stringify(r)} given.`);const n=e&&"number"==typeof e.iterationCount?e.iterationCount:1;if(!(Number.isInteger(n)&&n>0)&&n!==1/0)throw new gi(`Argument conf.iterationCount in timeline.play(conf) must be an integer larger than 0. ${JSON.stringify(n)} given.`);const i=e&&void 0!==e.rate?e.rate:1;if("number"!=typeof i||0===i)throw new gi(`Argument conf.rate in timeline.play(conf) must be a number larger than 0. ${JSON.stringify(i)} given.`);if(i<0)throw new gi(`Argument conf.rate in timeline.play(conf) must be a number larger than 0. ${JSON.stringify(i)} given. If you want the animation to play backwards, try setting conf.direction to 'reverse' or 'alternateReverse'.`);const o=e&&e.direction?e.direction:"normal";if(-1===Vi.indexOf(o))throw new gi(`Argument conf.direction in timeline.play(conf) must be one of ${JSON.stringify(Vi)}. ${JSON.stringify(o)} given. ${Gn(o,Vi)}`);return this._play(n,r,i,o)}_play(e,t,r,n){this._playing&&this.pause(),this._playing=!0;const i=this._project.ticker;let o=i.time;const a=t.to-t.from;(this.time<t.from||this.time>t.to)&&this._gotoTime(t.from);let s="alternateReverse"===n||"reverse"===n?-1:1,c=1;const u=Ii(),p=i=>{const p=this.time,h=r*s*(i-o);o=i;const f=p+h;if(f<t.from){if(c===e)return this._gotoTime(t.from),this._playing=!1,void u.resolve(!0);{c++;const e=(t.from-f)%a;return"reverse"===n?this._gotoTime(t.to-e):(s=1,this._gotoTime(t.from+e)),void l()}}if(f===t.to)return this._gotoTime(t.to),c===e?(this._playing=!1,void u.resolve(!0)):void l();if(f>t.to){if(c===e)return this._gotoTime(t.to),this._playing=!1,void u.resolve(!0);{c++;const e=(f-t.to)%a;return"normal"===n?this._gotoTime(t.from+e):(s=-1,this._gotoTime(t.to-e)),void l()}}return this._gotoTime(f),void l()};this._stopPlayCallback=(()=>{i.unregisterSideEffect(p),i.unregisterSideEffectForNextTick(p),this.playing&&u.resolve(!1)});const l=()=>i.registerSideEffectForNextTick(p);return i.registerSideEffect(p),u.promise}pause(){this._stopPlayCallback(),this._playing=!1,this._stopPlayCallback=l.a}}class Bi{constructor(e,t,r,n,i){this.timelineTemplate=e,this.path=t,this.nativeObjectType=i,this._address=Object.assign({},e._address,{objectPath:t}),this.adapter=xi(this.timelineTemplate.project,r,n)}get _project(){return this.timelineTemplate.project}get _pointerToState(){return this.timelineTemplate._pointerToState.objects[this.path]}ensureNativeObjectIsAcceptable(e,t){}}class zi extends p.a{constructor(e){return super(),this._v=e,this}_recalculate(){return this._v}}class Mi{constructor(e,t){this.project=e,this._path=t,this._objectTemplates=new Un({}),this._durationD=ni(()=>Kn(this.project._selectors.historic.getTimelineDuration(this.project.atomP.historic,this.address))),this._address=Object.assign({},this.project._address,{timelinePath:t}),this._playableRangeD=void 0}get _pointerToState(){return this.project.atomP.historic.timelineTemplates[this._path]}getObjectTemplate(e,t,r,n){let i=this._objectTemplates.getState()[e];return i?i.ensureNativeObjectIsAcceptable(t,r):(i=new Bi(this,e,t,r,n),this._objectTemplates.reduceState([e],()=>i)),i}_getPlayableRangeD(){if(this._playableRangeD)return this._playableRangeD;const e=new zi(0),t=this._durationD;return this._playableRangeD=ni(()=>({start:e.getValue(),end:t.getValue()}))}get duration(){return this._durationD.getValue()}get address(){return this._address}}const $i=Vn(1,11);class Fi{constructor(e){this.project=e,this._adaptersByPriority=Tn(xn($i,e=>e),()=>new Set),this._adaptersByName=new Map,this.facade=new ji(this)}add(e,t=5){this._adaptersByPriority[t].add(e),this._adaptersByName.set(e.name,e)}getAdapterByName(e){return this._adaptersByName.get(e)}findAdapterForNativeObject(e){for(const t of $i){const r=this._adaptersByPriority[t];for(const t of r){const r=t.canHandle(e);if("boolean"==typeof r){if(!0===r)return t}else 0}}}}function Ri(e,t,r,n,i,o){r&&(Array.isArray(i)?function(e,t,r,n,i,o){for(var a=Math.min(i.length,o.length),s=0;s<a;s++)if(e.assigned[s]&&i[s]!==o[s]){var c=t.concat(s);r.push({op:"replace",path:c,value:o[s]}),n.push({op:"replace",path:c,value:i[s]})}if(a<o.length){for(var u=a;u<o.length;u++){var p=t.concat(u);r.push({op:"add",path:p,value:o[u]})}n.push({op:"replace",path:t.concat("length"),value:i.length})}else if(a<i.length){r.push({op:"replace",path:t.concat("length"),value:o.length});for(var l=a;l<i.length;l++){var h=t.concat(l);n.push({op:"add",path:h,value:i[l]})}}}(e,t,r,n,i,o):function(e,t,r,n,i,o){Qi(e.assigned,function(e,a){var s=i[e],c=o[e],u=a?e in i?"replace":"add":"remove";if(s!==i||"replace"!==u){var p=t.concat(e);r.push("remove"===u?{op:u,path:p}:{op:u,path:p,value:c}),n.push("add"===u?{op:"remove",path:p}:"remove"===u?{op:"add",path:p,value:s}:{op:"replace",path:p,value:s})}})}(e,t,r,n,i,o))}var Hi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ui="undefined"!=typeof Symbol?Symbol("immer-proxy-state"):"__$immer_state",Li="An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.";var Ji=!("undefined"!=typeof process||"verifyMinified"!==function(){}.name),Ki="undefined"!=typeof Proxy;function Wi(e){return!!e&&!!e[Ui]}function Yi(e){if(!e)return!1;if("object"!==(void 0===e?"undefined":Hi(e)))return!1;if(Array.isArray(e))return!0;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function qi(e){return Ji&&Object.freeze(e),e}var Xi=Object.assign||function(e,t){for(var r in t)Zi(t,r)&&(e[r]=t[r]);return e};function Gi(e){if(Array.isArray(e))return e.slice();var t=void 0===e.__proto__?Object.create(null):{};return Xi(t,e)}function Qi(e,t){if(Array.isArray(e))for(var r=0;r<e.length;r++)t(r,e[r]);else for(var n in e)t(n,e[n])}function Zi(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function eo(e,t,r,n){if(Wi(e)){var i=e[Ui];if(!0===i.modified){if(!0===i.finalized)return i.copy;i.finalized=!0;var o=function(e,t,r,n,i){var o=t.base;return Qi(e,function(a,s){if(s!==o[a]){var c=n&&!Zi(t.assigned,a);e[a]=eo(s,c&&r.concat(a),c&&n,i)}}),qi(e)}(Ki?i.copy:i.copy=Gi(e),i,t,r,n);return Ri(i,t,r,n,i.base,o),o}return i.base}return function e(t){if(!Yi(t))return;if(Object.isFrozen(t))return;Qi(t,function(r,n){Wi(n)?t[r]=eo(n):e(n)});qi(t)}(e),e}function to(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}var ro=null,no={get:function(e,t){if(t===Ui)return e;if(e.modified){var r=e.copy[t];return r===e.base[t]&&Yi(r)?e.copy[t]=so(e,r):r}if(Zi(e.proxies,t))return e.proxies[t];var n=e.base[t];return!Wi(n)&&Yi(n)?e.proxies[t]=so(e,n):n},has:function(e,t){return t in oo(e)},ownKeys:function(e){return Reflect.ownKeys(oo(e))},set:function(e,t,r){if(e.assigned[t]=!0,!e.modified){if(t in e.base&&to(e.base[t],r)||Zi(e.proxies,t)&&e.proxies[t]===r)return!0;ao(e)}return e.copy[t]=r,!0},deleteProperty:function(e,t){return e.assigned[t]=!1,ao(e),delete e.copy[t],!0},getOwnPropertyDescriptor:function(e,t){var r=e.modified?e.copy:Zi(e.proxies,t)?e.proxies:e.base,n=Reflect.getOwnPropertyDescriptor(r,t);!n||Array.isArray(r)&&"length"===t||(n.configurable=!0);return n},defineProperty:function(){throw new Error("Immer does not support defining properties on draft objects.")},setPrototypeOf:function(){throw new Error("Immer does not support `setPrototypeOf()`.")}},io={};function oo(e){return!0===e.modified?e.copy:e.base}function ao(e){e.modified||(e.modified=!0,e.copy=Gi(e.base),Object.assign(e.copy,e.proxies),e.parent&&ao(e.parent))}function so(e,t,r){if(Wi(t))throw new Error("Immer bug. Plz report.");var n=function(e,t){return{modified:!1,assigned:{},finalized:!1,parent:e,base:t,copy:void 0,proxies:{}}}(e,t),i=Array.isArray(t)?Proxy.revocable([n],io):Proxy.revocable(n,no);return ro.push(i),i.proxy}Qi(no,function(e,t){io[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),io.deleteProperty=function(e,t){if(isNaN(parseInt(t)))throw new Error("Immer does not support deleting properties from arrays: "+t);return no.deleteProperty.call(this,e[0],t)},io.set=function(e,t,r){if("length"!==t&&isNaN(parseInt(t)))throw new Error("Immer does not support setting non-numeric properties on arrays: "+t);return no.set.call(this,e[0],t,r)};var co={},uo=null;function po(e){return e.hasCopy?e.copy:e.base}function lo(e){e.modified||(e.modified=!0,e.parent&&lo(e.parent))}function ho(e){e.hasCopy||(e.hasCopy=!0,e.copy=Gi(e.base))}function fo(e,t){var r=Gi(t);Qi(t,function(e){Object.defineProperty(r,""+e,function(e){return co[e]||(co[e]={configurable:!0,enumerable:!0,get:function(){return function(e,t){vo(e);var r=po(e)[t];return!e.finalizing&&r===e.base[t]&&Yi(r)?(ho(e),e.copy[t]=fo(e,r)):r}(this[Ui],e)},set:function(t){!function(e,t,r){if(vo(e),e.assigned[t]=!0,!e.modified){if(to(po(e)[t],r))return;lo(e),ho(e)}e.copy[t]=r}(this[Ui],e,t)}})}(""+e))});var n=function(e,t,r){return{modified:!1,assigned:{},hasCopy:!1,parent:e,base:r,proxy:t,copy:void 0,finished:!1,finalizing:!1,finalized:!1}}(e,r,t);return function(e,t,r){Object.defineProperty(e,t,{value:r,enumerable:!1,writable:!0})}(r,Ui,n),uo.push(n),r}function vo(e){if(!0===e.finished)throw new Error("Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? "+JSON.stringify(e.copy||e.base))}function mo(e){if(e&&"object"===(void 0===e?"undefined":Hi(e))){var t=e[Ui];if(t){var r=t.proxy,n=t.base;if(Array.isArray(e)){if(_o(t)){if(lo(t),t.assigned.length=!0,r.length<n.length)for(var i=r.length;i<n.length;i++)t.assigned[i]=!1;else for(var o=n.length;o<r.length;o++)t.assigned[o]=!0;Qi(r,function(e,r){t.assigned[e]||mo(r)})}}else{var a=function(e,t){var r=Object.keys(e),n=Object.keys(t);return{added:n.filter(function(e){return-1===r.indexOf(e)}),removed:r.filter(function(e){return-1===n.indexOf(e)})}}(n,r),s=a.added,c=a.removed;(s.length>0||c.length>0)&&lo(t),Qi(s,function(e,r){t.assigned[r]=!0}),Qi(c,function(e,r){t.assigned[r]=!1}),Qi(r,function(e,r){t.assigned[e]||mo(r)})}}}}function yo(e){return!function(e,t){if(to(e,t))return!0;if("object"!==(void 0===e?"undefined":Hi(e))||null===e||"object"!==(void 0===t?"undefined":Hi(t))||null===t)return!1;var r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(var i=0;i<r.length;i++)if(!hasOwnProperty.call(t,r[i])||!to(e[r[i]],t[r[i]]))return!1;return!0}(Object.keys(e.base),Object.keys(e.proxy))}function _o(e){var t=e.proxy;if(t.length!==e.base.length)return!0;var r=Object.getOwnPropertyDescriptor(t,t.length-1);return!(!r||r.get)}function go(e,t,r){if(Wi(e)){var n=t.call(e,e);return void 0===n?e:n}var i=uo;uo=[];var o=r&&[],a=r&&[];try{var s=fo(void 0,e),c=t.call(s,s);Qi(uo,function(e,t){t.finalizing=!0});var u=void 0;if(void 0!==c&&c!==s){if(s[Ui].modified)throw new Error(Li);u=eo(c),o&&(o.push({op:"replace",path:[],value:u}),a.push({op:"replace",path:[],value:e}))}else r&&mo(s),function(){for(var e=uo.length-1;e>=0;e--){var t=uo[e];!1===t.modified&&(Array.isArray(t.base)?_o(t)&&lo(t):yo(t)&&lo(t))}}(),u=eo(s,[],o,a);return Qi(uo,function(e,t){t.finished=!0}),r&&r(o,a),u}finally{uo=i}}function bo(e,t,r){if(arguments.length<1||arguments.length>3)throw new Error("produce expects 1 to 3 arguments, got "+arguments.length);if("function"==typeof e){if("function"==typeof t)throw new Error("if first argument is a function (curried invocation), the second argument to produce cannot be a function");var n=t,i=e;return function(){var e=arguments;return bo(void 0===e[0]&&void 0!==n?n:e[0],function(t){return e[0]=t,i.apply(t,e)})}}if("function"!=typeof t)throw new Error("if first argument is not a function, the second argument to produce should be a function");if(void 0!==r&&"function"!=typeof r)throw new Error("the third argument of a producer should not be set or a function");if("object"!==(void 0===e?"undefined":Hi(e))||null===e){var o=t(e);return void 0===o?e:o}if(!Yi(e))throw new Error("the first argument to an immer producer should be a primitive, plain object or array, got "+(void 0===e?"undefined":Hi(e))+': "'+e+'"');return Ki?function(e,t,r){if(Wi(e)){var n=t.call(e,e);return void 0===n?e:n}var i=ro;ro=[];var o=r&&[],a=r&&[];try{var s=so(void 0,e),c=t.call(s,s),u=void 0;if(void 0!==c&&c!==s){if(s[Ui].modified)throw new Error(Li);u=eo(c),o&&(o.push({op:"replace",path:[],value:u}),a.push({op:"replace",path:[],value:e}))}else u=eo(s,[],o,a);return Qi(ro,function(e,t){return t.revoke()}),r&&r(o,a),u}finally{ro=i}}(e,t,r):go(e,t,r)}bo(function(e,t){for(var r=function(r){var n=t[r];if(0===n.path.length&&"replace"===n.op)e=n.value;else{var i=n.path.slice(),o=i.pop(),a=i.reduce(function(e,t){if(!e)throw new Error("Cannot apply patch, path doesn't resolve: "+n.path.join("/"));return e[t]},e);if(!a)throw new Error("Cannot apply patch, path doesn't resolve: "+n.path.join("/"));switch(n.op){case"replace":case"add":a[o]=n.value;break;case"remove":if(Array.isArray(a)){if(o!==a.length-1)throw new Error("Remove can only remove the last key of an array, index: "+o+", length: "+a.length);a.length-=1}else delete a[o];break;default:throw new Error("Unsupported patch operation: "+n.op)}}},n=0;n<t.length;n++)r(n);return e});var wo=bo;var jo=e=>e=>{const t=(t,r)=>wo(t,t=>e(t,r.payload));return t.originalReducer=e,t},Oo=r(4);const xo=jo(Oo.$ProjectAhistoricState)((e,t)=>{});var So=e=>e;const To=So((e,t)=>e.timelineTemplates[t.timelinePath]),Co=So((e,t)=>{const r=To(e,t);return r&&r.objects[t.objectPath]}),Po=So((e,t)=>{const r=Co(e,t);return r&&r.props[t.propKey]}),Do=So((e,t)=>{const r=Kn(e.timelineTemplates[t.timelinePath].duration);return"number"==typeof r?r:2e3}),Io=So(e=>!0),Ao=So(e=>"loaded"===Kn(e.loadingState.type)),ko=So(e=>e.loadingState.diskRevisionsThatBrowserStateIsBasedOn);var Eo={historic:o,ahistoric:a,ephemeral:s};const Vo=jo(Oo.$ProjectHistoricState),No=(e,t)=>(e.timelineTemplates[t.timelinePath]||(e.timelineTemplates[t.timelinePath]={objects:{},duration:null}),e.timelineTemplates[t.timelinePath]),Bo=(e,t)=>{const r=No(e,t);return r.objects[t.objectPath]||(r.objects[t.objectPath]={props:{}}),r.objects[t.objectPath]},zo=Vo((e,t)=>{No(e,t).duration=t.duration}),Mo=(e,t)=>{return Eo.historic.getPropState(e,t).valueContainer.points},$o=Vo((e,t)=>{Eo.historic.getPropState(e,t).valueContainer.points=t.points}),Fo=Vo((e,t)=>{const r=Mo(e,t.propAddress);let n=r.findIndex(e=>e.time>t.pointProps.time);-1===n&&(n=r.length),r.splice(n,0,t.pointProps)}),Ro=Vo((e,t)=>{const r=Mo(e,t.propAddress);t.pointIndex!==r.length-1&&(r[t.pointIndex].interpolationDescriptor.connected=!0)}),Ho=Vo((e,t)=>{Mo(e,t.propAddress)[t.pointIndex].interpolationDescriptor.connected=!1}),Uo=Vo((e,t)=>{const r=Mo(e,t.propAddress);null!=r[t.pointIndex-1]&&null==r[t.pointIndex+1]&&(r[t.pointIndex-1].interpolationDescriptor.connected=!1),r.splice(t.pointIndex,1)}),Lo=Vo((e,t)=>{const r=Mo(e,t.propAddress)[t.pointIndex];r.time=t.newCoords.time,r.value=t.newCoords.value}),Jo=Vo((e,t)=>{const r=Mo(e,t.propAddress)[t.pointIndex-1].interpolationDescriptor.handles;r[2]=t.newHandle[0],r[3]=t.newHandle[1]}),Ko=Vo((e,t)=>{const r=Mo(e,t.propAddress)[t.pointIndex].interpolationDescriptor.handles;r[0]=t.newHandle[0],r[1]=t.newHandle[1]}),Wo=Vo((e,t)=>{Mo(e,t.propAddress)[t.pointIndex-1].interpolationDescriptor.handles[3]=0}),Yo=Vo((e,t)=>{Mo(e,t.propAddress)[t.pointIndex].interpolationDescriptor.handles[1]=0}),qo=Vo((e,t)=>{Mo(e,t.propAddress)[t.pointIndex].interpolationDescriptor.handles=[.5,0,.5,0]}),Xo=Vo((e,t)=>{const r=Mo(e,t.propAddress);r[t.leftPoint.index].time=t.leftPoint.newTime,r[t.rightPoint.index].time=t.rightPoint.newTime}),Go=Vo((e,t)=>{t.forEach(({propAddress:t,pointsNewCoords:r})=>{const n=Mo(e,t);Object.entries(r).forEach(([e,t])=>{const r=n[Number(e)];r.time=t.time,null!=t.value&&(r.value=t.value)})})}),Qo=Vo((e,t)=>{t.forEach(({propAddress:t,pointsIndices:r})=>{const n=Mo(e,t);r.forEach((e,t)=>{null!=n[(e-=t)-1]&&null==n[e+1]&&(n[e-1].interpolationDescriptor.connected=!1),n.splice(e,1)})})}),Zo=Vo((e,t)=>{const r=Mo(e,t.propAddress),n=r[t.pointIndex],i=r[t.pointIndex+1],o=r[t.pointIndex-1],a=i&&i.time||1/0,s=o&&o.time||-1/0,{time:c,value:u}=t.newCoords;if(n.value=u,c>s&&c<a)n.time=c;else if(n.value=u,c<=s){if(s===-1/0)return void(n.time=0);if(a===1/0)n.time=s+1;else{if(!(a-s>1))return;n.time=s+1}}else if(c>=a){if(a===1/0)return;if(s===-1/0)n.time=a-1;else{if(!(a-s>1))return;n.time=a-1}}}),ea=Vo((e,t)=>{Bo(e,t);const r=Eo.historic.getObjectState(e,t);r.props[t.propKey]?r.props[t.propKey].valueContainer.value=t.value:r.props[t.propKey]={valueContainer:{type:"StaticValueContainer",value:t.value}}}),ta=Vo((e,t)=>{Bo(e,t);const r=Eo.historic.getObjectState(e,t),n=r.props[t.propKey];if(n){if("StaticValueContainer"===n.valueContainer.type){const e=n.valueContainer;n.valueContainer=na(e.value)}}else r.props[t.propKey]={valueContainer:na(0)}}),ra=Vo((e,t)=>{Bo(e,t);const r=Eo.historic.getObjectState(e,t),n=r.props[t.propKey];if(n){if("BezierCurvesOfScalarValues"===n.valueContainer.type){const e=n.valueContainer;n.valueContainer={type:"StaticValueContainer",value:e.points[0]?e.points[0].value:0}}}else r.props[t.propKey]={valueContainer:{type:"StaticValueContainer",value:0}}}),na=e=>({type:"BezierCurvesOfScalarValues",points:[{value:e,time:0,interpolationDescriptor:{__descriptorType:"TimelinePointInterpolationDescriptor",connected:!1,interpolationType:"CubicBezier",handles:[.5,0,.5,0]}}]});var ia=r(7),oa=r.n(ia);const aa=jo(Oo.$ProjectEphemeralState),sa=aa((e,t)=>{e.loadingState={type:"loaded",diskRevisionsThatBrowserStateIsBasedOn:t.diskRevisionsThatBrowserStateIsBasedOn}}),ca=aa((e,t)=>{const{loadingState:r}=e;if("loaded"!==r.type)throw new Error("Pushing to diskRevisionsThatBrowserStateIsBasedOn only works when loadingState.type === 'loaded'");const{diskRevisionsThatBrowserStateIsBasedOn:n}=r,i=n.length;i>=50&&n.splice(0,i-50+1),n.push(t)}),ua=aa((e,{onDiskState:t,browserState:r})=>{e.loadingState={type:"browserStateIsNotBasedOnDiskState",onDiskState:t,browserState:r}}),pa=aa((e,t)=>{if("loaded"!==e.loadingState.type)throw new Error("Only implemented for loadingState.type === 'loaded'");const r=oa()();e.lastExportedObject={revision:r,definitionVersion:"0.1.0",projectState:t.historicState},ca.originalReducer(e,r)});var la=(e,t=function(e){return e})=>{const r=r=>({type:e,payload:t(r)});return r.type=e,r.is=(t=>t&&t.type&&t.type===e),r};const ha=la("@@batched",e=>e);var fa=e=>(t,r)=>ha.is(r)?r.payload.reduce((t,r)=>e(t,r),t):e(t,r);var da=()=>e=>({actions:Tn(e,(e,t)=>e=>({type:t,payload:e})),reducer:(t,r)=>{const{type:n}=r,i=e[n];return i?i(t,r):(console.error(`Unkown action type '${n}'`),t)}}),va=r(25),ma=r.n(va);la("@history/reduceEntireState",e=>e);const ya=la("@history/replaceHistory",e=>e),_a=la("@history/clearHistoryAndReplaceInnerState",e=>e),ga=la("@history/undo"),ba=la("@history/redo"),wa=la("@history/pushTempAction",e=>e),ja=la("@history/discardTempAction",e=>e),Oa=la("@history/commitTempAction",e=>e);la("@history/ahistorical",e=>e);var xa=r(26),Sa=r.n(xa);const Ta={maxNumberOfCommits:100},Ca=(e,t=Ta)=>{const r=(r,n)=>{if(void 0===r){return Aa(e(void 0,n))}return ga.is(n)?function(e){if(void 0===e.currentCommitHash)return e;const t=e.listOfCommitHashes.findIndex(t=>t===e.currentCommitHash);if(-1===t)throw new Error("This should never happen");const r=e.commitsByHash[e.currentCommitHash],n=Sa()(e.innerState,r.backwardDiff),i=t-1,o=-1===i?void 0:e.listOfCommitHashes[i];return Object.assign({},e,{currentCommitHash:o,innerState:n})}(r):ba.is(n)?function(e){if(0===e.listOfCommitHashes.length)return e;const t=e.listOfCommitHashes.findIndex(t=>t===e.currentCommitHash);if(t===e.listOfCommitHashes.length-1)return e;const r=t+1,n=e.listOfCommitHashes[r],i=e.commitsByHash[n],o=Sa()(e.innerState,i.forwardDiff);return Object.assign({},e,{currentCommitHash:n,innerState:o})}(r):function(e,t,r,n){const i=t(e.innerState,r),o=function(e,t){const r=ma.a.diff(e,t,{invertible:!1}),n=ma.a.diff(t,e,{invertible:!1}),i=Date.now(),o=oa()();return{forwardDiff:r,backwardDiff:n,timestamp:i,hash:o}}(e.innerState,i);if(0===o.forwardDiff.length)return e;const a=Sn(e.listOfCommitHashes),s={currentCommitHash:o.hash,commitsByHash:Object.assign({},e.commitsByHash),listOfCommitHashes:[...e.listOfCommitHashes],innerState:i};if(e.currentCommitHash!==a){const t=e.listOfCommitHashes.findIndex(t=>t===e.currentCommitHash),r=e.listOfCommitHashes.slice(t+1);r.forEach(e=>{delete s.commitsByHash[e]}),s.listOfCommitHashes.splice(t+1,s.listOfCommitHashes.length)}if(s.listOfCommitHashes.push(o.hash),s.commitsByHash[o.hash]=o,s.listOfCommitHashes.length>n.maxNumberOfCommits){const e=s.listOfCommitHashes.length-n.maxNumberOfCommits,t=s.listOfCommitHashes.slice(0,e);t.forEach(e=>{delete s.commitsByHash[e]}),s.listOfCommitHashes.splice(0,e)}return s}(r,e,n,t)};return(t,n)=>{let i,o;if(t)if(i=t["@@history"],o=t["@@tempActions"],_a.is(n))i=Aa(n.payload);else if(ya.is(n))i=n.payload;else if(wa.is(n))o=Pa(t["@@tempActions"],n);else if(ja.is(n))o=Da(t["@@tempActions"],n);else if(Oa.is(n)){const e=n.payload,a=t["@@tempActions"].find(t=>t.payload.id===e);if(a){const e=a.payload.originalAction;i=r(t["@@history"],e)}o=Da(t["@@tempActions"],n)}else i=r(t["@@history"],n);else i=r(void 0,n),o=[];const a=Ia(i.innerState,o,e);return Object.assign({},a,{"@@history":i,"@@tempActions":o})}},Pa=(e,t)=>{const r=t.payload.id;return[...e.filter(e=>e.payload.id!==r),t]},Da=(e,t)=>{const r=t.payload;return e.filter(e=>e.payload.id!==r)},Ia=(e,t,r)=>t.reduce((e,t)=>r(e,t.payload.originalAction),e);function Aa(e){return{currentCommitHash:void 0,commitsByHash:{},listOfCommitHashes:[],innerState:e}}const ka=["@@redux/INIT","@@INIT"];var Ea=e=>{const{actions:t,reducer:r}=da()(e.handlers.ahistoric),n=r,{actions:i,reducer:o}=da()(e.handlers.ephemeral),a=o,{actions:s,reducer:c}=da()(e.handlers.historic),u=Ca((t=e.initialState.historic,r)=>c(t,r)),p=la("@@ahistoric",e=>e),l=la("@@ephemeral",e=>e),h=la("@@historic",e=>e),f=Object.assign({},s,{undo:ga,redo:ba,__unsafe_replaceHistory:ya,__unsafe_clearHistoryAndReplaceInnerState:_a}),d=Object.assign({},Tn(f,e=>t=>h(e(t))),{temp:()=>((e=nt,t=nt)=>{const r=oa()();return{push:n=>e(wa({id:r,originalAction:t(n)})),discard:()=>e(ja(r)),commit:()=>e(Oa(r))}})(h,({payload:e})=>e)}),v={ahistoric:Tn(t,e=>t=>p(e(t))),ephemeral:Tn(i,e=>t=>l(e(t))),historic:d,batched:ha};return{rootReducer:fa((t=e.initialState,r)=>p.is(r)?Object.assign({},t,{ahistoric:n(t.ahistoric,r.payload)}):h.is(r)?Object.assign({},t,{historic:u(t.historic,r.payload)}):l.is(r)?Object.assign({},t,{ephemeral:a(t.ephemeral,r.payload)}):(-1===ka.indexOf(r.type)&&console.error(`Unkown action type ${r.type} in rootReducer`),t)),actions:v}};const Va={timelineTemplates:{}},Na={ahistoric:{},historic:Object.assign({},Va,{"@@history":{commitsByHash:{},currentCommitHash:void 0,innerState:Object.assign({},Va),listOfCommitHashes:[]},"@@tempActions":[]}),ephemeral:{loadingState:{type:"loading"},lastExportedObject:null}},{actions:Ba,rootReducer:za}=Ea({handlers:{historic:c,ahistoric:i,ephemeral:u},initialState:Na});class Ma{constructor(){this._computationsToUpdate=new Set,this._objectsWhoseStructureShouldBeUpdated=new Set,this._sideEffectsToCall=new Set,this._sideEffectsToCallOnNextTick=new Set,this._tickingT=0}registerComputationUpdate(e){this._computationsToUpdate.has(e)||this._computationsToUpdate.add(e)}addObjectWhoseStructureShouldBeUpdated(e){this._objectsWhoseStructureShouldBeUpdated.add(e)}registerSideEffect(e){this._sideEffectsToCall.add(e)}registerSideEffectForNextTick(e){this._sideEffectsToCallOnNextTick.add(e)}unregisterSideEffect(e){this._sideEffectsToCall.delete(e)}unregisterSideEffectForNextTick(e){this._sideEffectsToCallOnNextTick.delete(e)}get time(){return this.ticking?this._tickingT:performance.now()}tick(e=performance.now()){this.ticking=!0,this._tickingT=e,this._sideEffectsToCallOnNextTick.forEach(e=>this._sideEffectsToCall.add(e)),this._sideEffectsToCallOnNextTick.clear(),this._tick(0),this.ticking=!1}_tick(e){const t=this.time;if(e>10&&console.warn("tick() recursing for 10 times"),e>100)throw new Error("Maximum recursion limit for tick()");const r=this._objectsWhoseStructureShouldBeUpdated;if(this._objectsWhoseStructureShouldBeUpdated=new Set,r.forEach(e=>{e._updateStructure()}),this._objectsWhoseStructureShouldBeUpdated.size>0)return this._tick(e+1);const n=this._computationsToUpdate;this._computationsToUpdate=new Set,n.forEach(e=>{e._updateComputation()});const i=this._sideEffectsToCall;return this._sideEffectsToCall=new Set,i.forEach(e=>{e(t)}),this._objectsWhoseStructureShouldBeUpdated.size>0||this._computationsToUpdate.size>0||this._sideEffectsToCall.size>0?this._tick(e+1):void 0}}var $a=r(27),Fa=r.n($a),Ra={INIT:"@@redux/INIT"};function Ha(e,t,r){var n;if("function"==typeof t&&void 0===r&&(r=t,t=void 0),void 0!==r){if("function"!=typeof r)throw new Error("Expected the enhancer to be a function.");return r(Ha)(e,t)}if("function"!=typeof e)throw new Error("Expected the reducer to be a function.");var i=e,o=t,a=[],s=a,c=!1;function u(){s===a&&(s=a.slice())}function p(){return o}function l(e){if("function"!=typeof e)throw new Error("Expected listener to be a function.");var t=!0;return u(),s.push(e),function(){if(t){t=!1,u();var r=s.indexOf(e);s.splice(r,1)}}}function h(e){if(!ht(e))throw new Error("Actions must be plain objects. Use custom middleware for async actions.");if(void 0===e.type)throw new Error('Actions may not have an undefined "type" property. Have you misspelled a constant?');if(c)throw new Error("Reducers may not dispatch actions.");try{c=!0,o=i(o,e)}finally{c=!1}for(var t=a=s,r=0;r<t.length;r++){(0,t[r])()}return e}return h({type:Ra.INIT}),(n={dispatch:h,subscribe:l,getState:p,replaceReducer:function(e){if("function"!=typeof e)throw new Error("Expected the nextReducer to be a function.");i=e,h({type:Ra.INIT})}})[Fa.a]=function(){var e,t=l;return(e={subscribe:function(e){if("object"!=typeof e)throw new TypeError("Expected the observer to be an object.");function r(){e.next&&e.next(p())}return r(),{unsubscribe:t(r)}}})[Fa.a]=function(){return this},e},n}function Ua(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return 0===t.length?function(e){return e}:1===t.length?t[0]:t.reduce(function(e,t){return function(){return e(t.apply(void 0,arguments))}})}var La=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e};function Ja(e){const t=[];t.unshift(function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(e){return function(r,n,i){var o,a=e(r,n,i),s=a.dispatch,c={getState:a.getState,dispatch:function(e){return s(e)}};return o=t.map(function(e){return e(c)}),s=Ua.apply(void 0,o)(a.dispatch),La({},a,{dispatch:s})}}}(...[]));const r=Ua(...t);return Ha(e.rootReducer,void 0,r)}var Ka=new Promise(e=>e());class Wa{constructor(e,t={}){this.id=e,this.config=t,this._timelineInstances=new Un({}),this._timelineTemplates=new Un({}),this._enabled=!1,this._actions=Ba,this._selectors=Eo,this._isReady=!1,Yn.add(e,this),this.adapters=new Fi(this),this.reduxStore=Ja({rootReducer:za,devtoolsOptions:{name:"Theatre.js Project "+e}}),this.atom=function(e){let t=e.getState();const r=Ln(t);return e.subscribe(()=>{const n=e.getState();r.setState(n),t=n}),r}(this.reduxStore),this.atomP=this.atom.pointer,this.ticker=new Ma,this._address={projectId:this.id};const r=e=>{this.ticker.tick(e),window.requestAnimationFrame(r)};window.requestAnimationFrame(r),this._isReady=!0,this._readyPromise=Ka}getTimeline(e,t="default"){let r=this._timelineInstances.getIn([e,t]);return r||(r=new Ni(this,e,t),this._timelineInstances.reduceState([e],(e={})=>Object.assign({},e,{[t]:r}))),r}_getTimelineTemplate(e){let t=this._timelineTemplates.getState()[e];return t||(t=new Mi(this,e),this._timelineTemplates.reduceState([e],()=>t)),t}_dispatch(...e){return this.reduxStore.dispatch(this._actions.batched(e))}get ready(){return this._readyPromise}isReady(){return this._isReady}}Wa.version="0.1.3",function(){var e=new Error("Cannot find module '$shared/ioTypes/userFacingReporter'");throw e.code="MODULE_NOT_FOUND",e}();const Ya=new WeakMap;class qa{constructor(e,t={}){if(Yn.has(e))throw new gi(`Looks like you're calling \`new Project("${e}")\` twice. If you're trying to make two separate projects, make sure to assign a unique ID to each of them. `);if(!t.state)throw new gi(`Argument config.state in new Project("${e}", config) cannot be empty in theatre/core. Read more at https://theatrejs.com/docs/state-persistence.html`);Ga(e,t.state),Ya.set(this,new Wa(e,t))}getTimeline(e,t="default"){const r=Ci(e,"project.getTimeline");return Xa(this).getTimeline(r,t).facade}get adapters(){return Xa(this).adapters.facade}get ready(){return Xa(this).ready}get isReady(){return Xa(this).isReady()}}const Xa=e=>Ya.get(e),Ga=(e,t)=>{if(Array.isArray(t)||null==t||"0.1.0"!==t.definitionVersion)throw new gi(`Error validating conf.state in new Project(${JSON.stringify(e)}, conf). The state seems to be formatted in a way that is unreadable to Theatre.js. Read more at https://theatrejs.com/docs/state-persistence.html`)};r.d(t,"Project",function(){return qa})},349:function(e,t,r){"use strict";r.r(t);var n=e=>"object"==typeof e&&null!==e&&!0===e.isAtom;t.default=(e=>"object"==typeof e&&e?n(e)?e.unboxDeep():!0===e.isDerivedArray?e.toJS():!0===e.isDerivedDict?e.toJS():e:e)},35:function(e,t,r){"use strict";var n=r(12),i=r(5),o=r(13),a=r(3);e.exports=function(e,t,r,s){if(void 0===r)return"[op:replace] require value, but got undefined";var c=a(t),u=c[c.length-1],p=i(e,c);if(null===p)return"[op:replace] path not found: "+t;if(Array.isArray(p)){var l=o(p,u);if(p.length<=l)return"[op:replace] invalid array index: "+t;n(p[l],r)||s(e,c).splice(l,1,r)}else n(p[u],r)||(s(e,c)[u]=r)}},36:function(e,t,r){"use strict";var n=r(11),i=r(5),o=r(13),a=r(3);e.exports=function(e,t,r,s){if(r!==t){var c=a(t),u=c[c.length-1],p=i(e,c);if(null===p)return"[op:move] path not found: "+t;var l=void 0;if(Array.isArray(p)){var h=o(p,u);if(p.length<=h)return"[op:move] invalid array index: "+r;l=p[h],s(e,c).splice(h,1)}else l=p[u],delete s(e,c)[u];return n(e,r,l,s)}}},37:function(e,t,r){"use strict";var n=r(5),i=r(3),o=r(11);e.exports=function(e,t,r,a){var s=i(t),c=s[s.length-1],u=n(e,s);return null===u?"[op:copy] path not found: "+t:o(e,r,u[c],a)}},38:function(e,t,r){"use strict";var n=r(12),i=r(5),o=r(3);e.exports=function(e,t,r){var a=o(t),s=a[a.length-1],c=i(e,a);return null===c?"[op:test] path not found: "+t:n(c[s],r)?void 0:"[op:test] not matched: "+JSON.stringify(c[s])+" "+JSON.stringify(r)}},39:function(e,t,r){var n=r(328);e.exports=function(){var e,t,r,i,o,a=0,s=arguments[0],c=arguments[1],u=c.length,p=arguments[2];p&&(i=p.threshold,o=p.ignoreCase),void 0===i&&(i=0);for(var l=0;l<u;++l)(e=(t=o?n(s,c[l],!0):n(s,c[l]))>s.length?1-t/c[l].length:1-t/s.length)>a&&(a=e,r=c[l]);return a>=i?r:null}},4:function(e,t){},40:function(e,t){e.exports=function(){function e(e,t,r,n){this.set(e,t,r,n)}return e.prototype.set=function(e,t,r,n){this._cx=3*e,this._bx=3*(r-e)-this._cx,this._ax=1-this._cx-this._bx,this._cy=3*t,this._by=3*(n-t)-this._cy,this._ay=1-this._cy-this._by},e.epsilon=1e-6,e.prototype._sampleCurveX=function(e){return((this._ax*e+this._bx)*e+this._cx)*e},e.prototype._sampleCurveY=function(e){return((this._ay*e+this._by)*e+this._cy)*e},e.prototype._sampleCurveDerivativeX=function(e){return(3*this._ax*e+2*this._bx)*e+this._cx},e.prototype._solveCurveX=function(e,t){var r,n,i,o,a,s;for(i=void 0,o=void 0,a=void 0,s=void 0,r=void 0,n=void 0,a=e,n=0;n<8;){if(s=this._sampleCurveX(a)-e,Math.abs(s)<t)return a;if(r=this._sampleCurveDerivativeX(a),Math.abs(r)<t)break;a-=s/r,n++}if(o=1,(a=e)<(i=0))return i;if(a>o)return o;for(;i<o;){if(s=this._sampleCurveX(a),Math.abs(s-e)<t)return a;e>s?i=a:o=a,a=.5*(o-i)+i}return a},e.prototype.solve=function(e,t){return this._sampleCurveY(this._solveCurveX(e,t))},e.prototype.solveSimple=function(e){return this._sampleCurveY(this._solveCurveX(e,1e-6))},e}()},5:function(e,t,r){"use strict";e.exports=function(e,t){for(var r=0,n=t.length-1;r<n;r++){if(!e[t[r]])return null;e=e[t[r]]}return e}},6:function(e,t,r){"use strict";(function(e){var n=r(1),i=r(14),o="object"==typeof exports&&exports&&!exports.nodeType&&exports,a=o&&"object"==typeof e&&e&&!e.nodeType&&e,s=a&&a.exports===o?n.a.Buffer:void 0,c=(s?s.isBuffer:void 0)||i.a;t.a=c}).call(this,r(28)(e))},7:function(e,t,r){var n=r(329),i=r(330);e.exports=function(e,t,r){var o=t&&r||0;"string"==typeof e&&(t="binary"==e?new Array(16):null,e=null);var a=(e=e||{}).random||(e.rng||n)();if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,t)for(var s=0;s<16;++s)t[o+s]=a[s];return t||i(a)}},8:function(e,t,r){"use strict";r.d(t,"b",function(){return n}),r.d(t,"d",function(){return i}),r.d(t,"c",function(){return o}),r.d(t,"a",function(){return a});const n=!0;let i=!1;const o=()=>{i=!0},a=()=>{i=!1}},9:function(e,t,r){"use strict";var n=r(2);r.d(t,"a",function(){return a}),r.d(t,"d",function(){return s}),r.d(t,"c",function(){return c}),r.d(t,"b",function(){return u});const i=new class{constructor(){this._head=void 0}peek(){return this._head&&this._head.data}pop(){const e=this._head;if(e)return this._head=e.next,e.data}push(e){const t={next:this._head,data:e};this._head=t}},o=n.a,a=(e,t)=>{i.push(t),e(),i.pop()},s=e=>{const t=i.peek();t&&t(e),i.push(o)},c=e=>{i.pop()},u=()=>i.peek()!==o}})});
  //# sourceMappingURL=core.js.map