odsa/dist/bundle.js

1 line
24 KiB
JavaScript
Raw Normal View History

2019-05-04 05:31:27 +02:00
!function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s=0)}([function(e,t,n){"use strict";n.r(t);var o=function(e,t){var n=new a(e,t);return function(){return n.current()}};Object.defineProperty(o,"default",{value:o});var r=o;o.root=function(e){var t=m,n=0===e.length?y:new a(null,null),o=void 0,r=0===e.length?null:function(){null!==g?h.disposes.add(n):O(n)};return m=n,null===g?o=function(e,t,n){try{return null===t?e():e(t)}finally{m=n}}(e,r,t):(o=null===r?e():e(r),m=t),o},o.on=function(e,t,n,r){var l;return Array.isArray(e)&&(l=e,e=function(){for(var e=0;e<l.length;e++)l[e]()}),r=!!r,o(i,n);function i(n){var o=v;return e(),r?r=!1:(v=null,n=t(n),v=o),n}},o.effect=function(e,t){new a(e,t)},o.data=function(e){var t=new s(e);return function(e){return 0===arguments.length?t.current():t.next(e)}},o.value=function(e,t){var n=o.data(e),r=-1;return function(o){if(0===arguments.length)return n();if(!(t?t(e,o):e===o)){var l=h.time;if(r===l)throw new Error("conflicting values: "+o+" is not the same as "+e);r=l,e=o,n(o)}return o}},o.freeze=function(e){var t=void 0;if(null!==g)t=e();else{(g=h).changes.reset();try{t=e(),x()}finally{g=null}}return t},o.sample=function(e){var t,n=v;return null!==n?(v=null,t=e(),v=n):t=e(),t},o.cleanup=function(e){null!==m?null===m.cleanups?m.cleanups=[e]:m.cleanups.push(e):console.warn("cleanups created without a root or parent will never be run")},o.makeDataNode=function(e){return new s(e)},o.makeComputationNode=function(e,t){return new a(e,t)},o.isFrozen=function(){return null!==g},o.isListening=function(){return null!==v};var l=function(){return function(){this.time=0,this.changes=new c,this.updates=new c,this.disposes=new c}}(),i={time:function(){return h.time}},s=function(){function e(e){this.value=e,this.pending=d,this.log=null}return e.prototype.current=function(){return null!==v&&function(e,t){null===e.log&&(e.log=new u);w(e.log,t)}(this,v),this.value},e.prototype.next=function(e){if(null!==g)if(this.pending!==d){if(e!==this.pending)throw new Error("conflicting changes: "+e+" !== "+this.pending)}else this.pending=e,h.changes.add(this);else null!==this.log?(this.pending=e,h.changes.add(this),x()):this.value=e;return e},e.prototype.clock=function(){return i},e}(),a=function(){function e(e,t){if(this.state=f,this.source1=null,this.source1slot=0,this.sources=null,this.sourceslots=null,this.log=null,this.owned=null,this.cleanups=null,this.fn=e,this.value=t,this.age=h.time,null!==e){var n=m,o=v;null===n&&console.warn("computations created without a root or parent will never be disposed"),m=v=this,null===g?function(e){g=h,h.changes.reset(),h.updates.reset();try{e.value=e.fn(e.value),(h.changes.count>0||h.updates.count>0)&&(h.time++,S(h))}finally{g=m=v=null}}(this):this.value=this.fn(this.value),n&&n!==y&&(null===n.owned?n.owned=[this]:n.owned.push(this)),m=n,v=o}}return e.prototype.current=function(){if(null!==v){if(this.age===h.time){if(this.state===b)throw new Error("circular dependency");N(this)}!function(e,t){null===e.log&&(e.log=new u);w(e.log,t)}(this,v)}return this.value},e.prototype.clock=function(){return i},e}(),u=function(){return function(){this.node1=null,this.node1slot=0,this.nodes=null,this.nodeslots=null}}(),c=function(){function e(){this.items=[],thi